From 7d5af7e6f9dd8360d095ff913cf410b8a8045499 Mon Sep 17 00:00:00 2001 From: cwchen <1048842385@qq.com> Date: Thu, 12 Sep 2024 09:11:04 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=95=E9=A1=B9=E5=B7=A5=E7=A8=8B=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E6=B7=BB=E5=8A=A0=E5=AF=86=E7=A0=81=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/basic/single/index.vue | 46 +++++++++++++++++-- 1 file changed, 42 insertions(+), 4 deletions(-) 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) {