diff --git a/ah-jjzhgd-web/src/views/basic/project/index.vue b/ah-jjzhgd-web/src/views/basic/project/index.vue index 2b4cb06..cdaa286 100644 --- a/ah-jjzhgd-web/src/views/basic/project/index.vue +++ b/ah-jjzhgd-web/src/views/basic/project/index.vue @@ -352,6 +352,10 @@ + + + @@ -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(`确定要删除该数据吗?`, {