diff --git a/ah-jjzhgd-web/src/views/basic/single/index.vue b/ah-jjzhgd-web/src/views/basic/single/index.vue index f06a2fc..fdd5669 100644 --- a/ah-jjzhgd-web/src/views/basic/single/index.vue +++ b/ah-jjzhgd-web/src/views/basic/single/index.vue @@ -166,6 +166,10 @@ + + + @@ -179,6 +183,8 @@ import { addSingleItem, deleteSingleItem, getSingleItemDetail, getSingleList, up import BuildSelect from '@/views/basic/project/components/BuildSelect.vue' import ProjectNoSelect from '@/views/basic/single/components/ProjectNoSelect.vue' import { getDictSelectList } from '@/api/public' +import { verifyPwd } from '@/api/verifyPwd' +import modulDialog from '@/components/pwdVerifiers/pwdVerifiers.vue' const defaultTmp = { singleName: '', signleNo: '', @@ -197,9 +203,15 @@ const defaultTmp = { singleDesc: '' } export default { - components: { ProjectNoSelect, BuildSelect, Pagination }, + components: { ProjectNoSelect, BuildSelect, Pagination,modulDialog }, data() { return { + componentDialog: { + modulName: '', //组件名称 + title: '', + width: '', + openFalg: false + }, tableKey: 0, list: [], currentProjectType: '', @@ -272,6 +284,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(); + }) + + }, getSelect() { getDictSelectList(10).then(res => { this.options = res.data.map(item => { @@ -342,7 +377,12 @@ export default { updateData() { this.$refs['dataForm'].validate((valid) => { if (valid) { - updateSingleItem(this.temp).then((response) => { + this.openModulDialog('验证密码', 'pwdVerifiers', '600px', true) + } + }) + }, + commitUpdateData() { + updateSingleItem(this.temp).then((response) => { this.$message({ showClose: true, message: response.msg, @@ -354,8 +394,6 @@ export default { }).finally(() => { }) - } - }) }, // 删除数据 handleDelete(row, index) {