From bc96c67deff3619c7777d0a1b16d7dd308d9ac0d Mon Sep 17 00:00:00 2001 From: cwchen <1048842385@qq.com> Date: Thu, 12 Sep 2024 09:28:05 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8C=BA=E5=9F=9F=E7=AE=A1=E7=90=86=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 --- ah-jjzhgd-web/src/views/basic/area/index.vue | 47 +++++++++++++++++--- 1 file changed, 42 insertions(+), 5 deletions(-) diff --git a/ah-jjzhgd-web/src/views/basic/area/index.vue b/ah-jjzhgd-web/src/views/basic/area/index.vue index 12ba445..a9ea240 100644 --- a/ah-jjzhgd-web/src/views/basic/area/index.vue +++ b/ah-jjzhgd-web/src/views/basic/area/index.vue @@ -112,6 +112,10 @@ + + + @@ -124,7 +128,8 @@ import _ from 'lodash/fp' import { addAreaItem, deleteAreaItem, getAreaList, updateAreaItem } from '@/api/basic/area' import ProjectSelect from '@/views/device/sideband/components/ProjectSelect.vue' import GtSelect from '@/views/device/sideband/components/GtSelect.vue' - +import { verifyPwd } from '@/api/verifyPwd' +import modulDialog from '@/components/pwdVerifiers/pwdVerifiers.vue' const areaTypeMap = { 0: '否', 1: '是' @@ -138,9 +143,15 @@ const defaultTmp = { areaType: '' } export default { - components: { GtSelect, ProjectSelect, Pagination }, + components: { GtSelect, ProjectSelect, Pagination,modulDialog }, data() { return { + componentDialog: { + modulName: '', //组件名称 + title: '', + width: '', + openFalg: false + }, tableKey: 0, list: [], currentProjectType: '', @@ -174,6 +185,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(); + }) + + }, getStatus(val) { return this.areaTypeMap[val] }, @@ -233,7 +267,12 @@ export default { updateData() { this.$refs['dataForm'].validate((valid) => { if (valid) { - updateAreaItem(this.temp).then((response) => { + this.openModulDialog('验证密码', 'pwdVerifiers', '600px', true) + } + }) + }, + commitUpdateData() { + updateAreaItem(this.temp).then((response) => { this.$message({ showClose: true, message: response.msg, @@ -245,8 +284,6 @@ export default { }).finally(() => { }) - } - }) }, // 删除数据 handleDelete(row, index) {