工程管理修改添加密码校验
This commit is contained in:
parent
7d5af7e6f9
commit
011ee8d2ba
|
|
@ -352,6 +352,10 @@
|
|||
|
||||
<!--杆塔管理-->
|
||||
<GtTable :component-visible.sync="gtModalVisible" :current-id="bidCode" />
|
||||
<modul-dialog ref="pwdVerifiersDialog" :title="componentDialog.title" :width="componentDialog.width"
|
||||
v-model="componentDialog.openFalg">
|
||||
<component :is="componentDialog.modulName" />
|
||||
</modul-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
@ -374,6 +378,8 @@ import GtTable from '@/views/basic/project/components/GtTable.vue'
|
|||
import CostTable from '@/views/basic/project/components/CostTable.vue'
|
||||
import ProjectNoSelect from '@/views/basic/single/components/ProjectNoSelect.vue'
|
||||
import SingleProSelect from '@/views/basic/single/components/SingleProSelect.vue'
|
||||
import { verifyPwd } from '@/api/verifyPwd'
|
||||
import modulDialog from '@/components/pwdVerifiers/pwdVerifiers.vue'
|
||||
|
||||
const defaultTmp = {
|
||||
org: '',
|
||||
|
|
@ -411,10 +417,16 @@ const defaultCompleteTmp = {
|
|||
export default {
|
||||
components: {
|
||||
SingleProSelect,
|
||||
ProjectNoSelect, CostTable, GtTable, ProjectStatusSelect, Pagination, BuildSelect, ProcessTable },
|
||||
ProjectNoSelect, CostTable, GtTable, ProjectStatusSelect, Pagination, BuildSelect, ProcessTable,modulDialog },
|
||||
directives: { waves },
|
||||
data() {
|
||||
return {
|
||||
componentDialog: {
|
||||
modulName: '', //组件名称
|
||||
title: '',
|
||||
width: '',
|
||||
openFalg: false
|
||||
},
|
||||
// 建筑单位列表
|
||||
buildOptions: [],
|
||||
imageList: [],
|
||||
|
|
@ -483,6 +495,29 @@ export default {
|
|||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
openModulDialog(title, modulName, width, openFalg) {
|
||||
this.componentDialog.title = title
|
||||
this.componentDialog.modulName = modulName
|
||||
this.componentDialog.width = width
|
||||
this.componentDialog.openFalg = openFalg
|
||||
},
|
||||
verifiersPwd(data) {
|
||||
verifyPwd(data).then((response) => {
|
||||
this.$message({
|
||||
showClose: true,
|
||||
message: response.msg,
|
||||
type: 'success',
|
||||
duration: 500
|
||||
})
|
||||
// 关闭验证密码页面
|
||||
this.componentDialog.openFalg = false;
|
||||
if (this.$refs.pwdVerifiersDialog) {
|
||||
this.$refs.pwdVerifiersDialog.resetForm();
|
||||
}
|
||||
this.commitUpdateData();
|
||||
})
|
||||
|
||||
},
|
||||
handleExceed(files, fileList) {
|
||||
this.$message.error(`最多只能上传 1 张图片`);
|
||||
},
|
||||
|
|
@ -613,30 +648,7 @@ export default {
|
|||
updateData() {
|
||||
this.$refs['dataForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
const reqData = new FormData()
|
||||
const reqD = _.cloneDeep(this.temp)
|
||||
reqD['delFiles'] = this.delFiles.join(',')
|
||||
delete reqD['fileData']
|
||||
reqData.append('params', JSON.stringify(reqD))
|
||||
|
||||
const { type, file } = this.getFileData()
|
||||
file.forEach(item => {
|
||||
reqData.append('file[]', item)
|
||||
})
|
||||
reqData.append('type[]', type)
|
||||
|
||||
updateProjectItem(reqData).then((response) => {
|
||||
this.$message({
|
||||
showClose: true,
|
||||
message: response.msg,
|
||||
type: 'success',
|
||||
duration: 2000
|
||||
})
|
||||
this.dialogFormVisible = false
|
||||
this.getList()
|
||||
}).finally(() => {
|
||||
// this.dialogFormVisible = false
|
||||
})
|
||||
this.openModulDialog('验证密码', 'pwdVerifiers', '600px', true)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
|
@ -682,6 +694,32 @@ export default {
|
|||
this.bidCode = row.bidCode
|
||||
this.costModalVisible = true
|
||||
},
|
||||
commitUpdateData() {
|
||||
const reqData = new FormData()
|
||||
const reqD = _.cloneDeep(this.temp)
|
||||
reqD['delFiles'] = this.delFiles.join(',')
|
||||
delete reqD['fileData']
|
||||
reqData.append('params', JSON.stringify(reqD))
|
||||
|
||||
const { type, file } = this.getFileData()
|
||||
file.forEach(item => {
|
||||
reqData.append('file[]', item)
|
||||
})
|
||||
reqData.append('type[]', type)
|
||||
|
||||
updateProjectItem(reqData).then((response) => {
|
||||
this.$message({
|
||||
showClose: true,
|
||||
message: response.msg,
|
||||
type: 'success',
|
||||
duration: 2000
|
||||
})
|
||||
this.dialogFormVisible = false
|
||||
this.getList()
|
||||
}).finally(() => {
|
||||
// this.dialogFormVisible = false
|
||||
})
|
||||
},
|
||||
// 删除数据
|
||||
handleDelete(row, index) {
|
||||
this.$confirm(`确定要删除该数据吗?`, {
|
||||
|
|
|
|||
Loading…
Reference in New Issue