From 2a7929bfb3ea05686ce3670a822fe95239d2879b Mon Sep 17 00:00:00 2001 From: cwchen <1048842385@qq.com> Date: Fri, 20 Sep 2024 13:56:46 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=BE=E5=A4=87=E7=AE=A1=E7=90=86-=E5=AF=86?= =?UTF-8?q?=E7=A0=81=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/device/devData/index.vue | 12 +++++++-- .../src/views/device/deviceMange/index.vue | 12 +++++++-- .../src/views/device/sideband/index.vue | 27 ++++++++++++++++++- .../src/views/device/sidebandDevice/index.vue | 12 +++++++-- 4 files changed, 56 insertions(+), 7 deletions(-) diff --git a/ah-jjzhgd-web/src/views/device/devData/index.vue b/ah-jjzhgd-web/src/views/device/devData/index.vue index 0ef126b..af4fe20 100644 --- a/ah-jjzhgd-web/src/views/device/devData/index.vue +++ b/ah-jjzhgd-web/src/views/device/devData/index.vue @@ -151,6 +151,7 @@ export default { components: {ProjectSelect, Pagination,modulDialog }, data() { return { + checkRow:{}, componentDialog: { modulName: '', //组件名称 title: '', @@ -212,7 +213,7 @@ export default { if (this.$refs.pwdVerifiersDialog) { this.$refs.pwdVerifiersDialog.resetForm(); } - this.commitUpdateData(); + this.isOpenEditDialog(); }) }, @@ -267,6 +268,12 @@ export default { }, // 编辑 handleUpdate(row) { + this.checkRow = _.cloneDeep(row); + this.openModulDialog('验证密码', 'pwdVerifiers', '600px', true) + + }, + isOpenEditDialog(){ + let row = this.checkRow; this.temp = Object.assign({}, row) getDevDataById({ id: row.id }).then((res) => { this.temp = Object.assign({}, res.data) @@ -277,7 +284,7 @@ export default { updateData() { this.$refs['dataForm'].validate((valid) => { if (valid) { - this.openModulDialog('验证密码', 'pwdVerifiers', '600px', true) + this.commitUpdateData(); } }) }, @@ -289,6 +296,7 @@ export default { type: 'success', duration: 2000 }) + this.checkRow = {}; this.getList() this.dialogFormVisible = false }).finally(() => { diff --git a/ah-jjzhgd-web/src/views/device/deviceMange/index.vue b/ah-jjzhgd-web/src/views/device/deviceMange/index.vue index 22e7c62..64a0ca2 100644 --- a/ah-jjzhgd-web/src/views/device/deviceMange/index.vue +++ b/ah-jjzhgd-web/src/views/device/deviceMange/index.vue @@ -156,6 +156,7 @@ export default { components: { DeviceTypeSelect, Pagination,modulDialog }, data() { return { + checkRow:{}, componentDialog: { modulName: '', //组件名称 title: '', @@ -217,7 +218,7 @@ export default { if (this.$refs.pwdVerifiersDialog) { this.$refs.pwdVerifiersDialog.resetForm(); } - this.commitUpdateData(); + this.isOpenEditDialog(); }) }, @@ -272,6 +273,12 @@ export default { }, // 编辑 handleUpdate(row) { + this.checkRow = _.cloneDeep(row); + this.openModulDialog('验证密码', 'pwdVerifiers', '600px', true) + + }, + isOpenEditDialog(){ + let row = this.checkRow; this.temp = Object.assign({}, row) // getCarItemDetail({ id: row.id }).then((res) => { // this.temp = Object.assign({}, res.data) @@ -282,7 +289,7 @@ export default { updateData() { this.$refs['dataForm'].validate((valid) => { if (valid) { - this.openModulDialog('验证密码', 'pwdVerifiers', '600px', true) + this.commitUpdateData(); } }) }, @@ -294,6 +301,7 @@ export default { type: 'success', duration: 2000 }) + this.checkRow = {}; this.getList() this.dialogFormVisible = false }).finally(() => { diff --git a/ah-jjzhgd-web/src/views/device/sideband/index.vue b/ah-jjzhgd-web/src/views/device/sideband/index.vue index 61487aa..3c16b1d 100644 --- a/ah-jjzhgd-web/src/views/device/sideband/index.vue +++ b/ah-jjzhgd-web/src/views/device/sideband/index.vue @@ -141,6 +141,7 @@ export default { components: { Pagination, SidebandChildTable, ProjectSelect, DeviceSelect, GtSelect, SidebandTypeSelect,modulDialog }, data() { return { + checkRow:{}, componentDialog: { modulName: '', //组件名称 title: '', @@ -210,6 +211,23 @@ export default { 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.isOpenEditDialog(); + }) + + }, getList() { this.listLoading = true getSidebandList(this.listQuery).then((response) => { @@ -250,6 +268,12 @@ export default { }, // 编辑 handleUpdate(row) { + this.checkRow = _.cloneDeep(row); + this.openModulDialog('验证密码', 'pwdVerifiers', '600px', true) + + }, + isOpenEditDialog(){ + let row = this.checkRow; getSidebandItemDetail({ id: row.id }).then((res) => { this.temp = Object.assign({}, res.data) }) @@ -259,7 +283,7 @@ export default { updateData() { this.$refs['dataForm'].validate((valid) => { if (valid) { - this.openModulDialog('验证密码', 'pwdVerifiers', '600px', true) + this.commitUpdateData(); } }) }, @@ -271,6 +295,7 @@ export default { type: 'success', duration: 2000 }) + this.checkRow = {}; this.getList() this.dialogFormVisible = false }) diff --git a/ah-jjzhgd-web/src/views/device/sidebandDevice/index.vue b/ah-jjzhgd-web/src/views/device/sidebandDevice/index.vue index 1607f3b..b3d6103 100644 --- a/ah-jjzhgd-web/src/views/device/sidebandDevice/index.vue +++ b/ah-jjzhgd-web/src/views/device/sidebandDevice/index.vue @@ -152,6 +152,7 @@ export default { components: { SidebandDetailTable, SidebandSelect, AreaSelect, DeviceStatusSelect, DeviceSelect, Pagination,modulDialog }, data() { return { + checkRow:{}, componentDialog: { modulName: '', //组件名称 title: '', @@ -231,7 +232,7 @@ export default { if (this.$refs.pwdVerifiersDialog) { this.$refs.pwdVerifiersDialog.resetForm(); } - this.commitUpdateData(); + this.isOpenEditDialog(); }) }, @@ -280,6 +281,12 @@ export default { }, // 编辑 handleUpdate(row) { + this.checkRow = _.cloneDeep(row); + this.openModulDialog('验证密码', 'pwdVerifiers', '600px', true) + + }, + isOpenEditDialog(){ + let row = this.checkRow; getSidebandChildItemDetail({ id: row.deviceId }).then((res) => { this.temp = Object.assign({}, res.data) if (this.temp.bdId) { @@ -294,7 +301,7 @@ export default { updateData() { this.$refs['dataForm'].validate((valid) => { if (valid) { - this.openModulDialog('验证密码', 'pwdVerifiers', '600px', true) + this.commitUpdateData(); } }) }, @@ -307,6 +314,7 @@ export default { type: 'success', duration: 2000 }) + this.checkRow = {}; this.dialogFormVisible = false this.getList() }).finally(() => {