From 4492881e0548a8dddaf3e75572cdc8cfd56abc9c Mon Sep 17 00:00:00 2001 From: cwchen <1048842385@qq.com> Date: Thu, 12 Sep 2024 10:00:08 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=BE=E5=A4=87=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 --- .../src/views/device/devData/index.vue | 46 ++++++++++++++++-- .../src/views/device/deviceMange/index.vue | 47 +++++++++++++++++-- .../src/views/device/sideband/index.vue | 30 ++++++++++-- .../src/views/device/sidebandDevice/index.vue | 47 +++++++++++++++++-- 4 files changed, 151 insertions(+), 19 deletions(-) diff --git a/ah-jjzhgd-web/src/views/device/devData/index.vue b/ah-jjzhgd-web/src/views/device/devData/index.vue index ef8ff38..0ef126b 100644 --- a/ah-jjzhgd-web/src/views/device/devData/index.vue +++ b/ah-jjzhgd-web/src/views/device/devData/index.vue @@ -115,6 +115,10 @@ + + + @@ -125,6 +129,8 @@ import _ from 'lodash/fp' // import { downloadFile } from '@/utils/download' import { getDavDataList, addDevData, updateDevData, deleteDevData,getDevDataById } from '@/api/devData/devData' import ProjectSelect from '@/views/device/sideband/components/ProjectSelect.vue' +import { verifyPwd } from '@/api/verifyPwd' +import modulDialog from '@/components/pwdVerifiers/pwdVerifiers.vue' const onLineMap = { 0: '不在线', 1: '在线' @@ -142,9 +148,15 @@ const defaultTmp = { devCode: '' } export default { - components: {ProjectSelect, Pagination }, + components: {ProjectSelect, Pagination,modulDialog }, data() { return { + componentDialog: { + modulName: '', //组件名称 + title: '', + width: '', + openFalg: false + }, tableKey: 0, list: [], currentProjectType:'', @@ -181,6 +193,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.onLineMap[val] }, @@ -242,7 +277,12 @@ export default { updateData() { this.$refs['dataForm'].validate((valid) => { if (valid) { - updateDevData(this.temp).then((response) => { + this.openModulDialog('验证密码', 'pwdVerifiers', '600px', true) + } + }) + }, + commitUpdateData() { + updateDevData(this.temp).then((response) => { this.$message({ showClose: true, message: response.msg, @@ -254,8 +294,6 @@ export default { }).finally(() => { }) - } - }) }, // 删除数据 handleDelete(row, index) { diff --git a/ah-jjzhgd-web/src/views/device/deviceMange/index.vue b/ah-jjzhgd-web/src/views/device/deviceMange/index.vue index 29b20d3..22e7c62 100644 --- a/ah-jjzhgd-web/src/views/device/deviceMange/index.vue +++ b/ah-jjzhgd-web/src/views/device/deviceMange/index.vue @@ -120,6 +120,10 @@ + + + @@ -131,7 +135,8 @@ import _ from 'lodash/fp' import { addDeviceItem, deleteDeviceItem, getDeviceList, updateDeviceItem } from '@/api/device/deviceMange' import DeviceTypeSelect from '@/views/device/deviceMange/components/DeviceTypeSelect.vue' - +import { verifyPwd } from '@/api/verifyPwd' +import modulDialog from '@/components/pwdVerifiers/pwdVerifiers.vue' const onLineMap = { 0: '不在线', 1: '在线' @@ -148,9 +153,15 @@ const defaultTmp = { manufacturer: '' } export default { - components: { DeviceTypeSelect, Pagination }, + components: { DeviceTypeSelect, Pagination,modulDialog }, data() { return { + componentDialog: { + modulName: '', //组件名称 + title: '', + width: '', + openFalg: false + }, tableKey: 0, list: [], onLineMap: onLineMap, @@ -187,6 +198,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.onLineMap[val] }, @@ -248,7 +282,12 @@ export default { updateData() { this.$refs['dataForm'].validate((valid) => { if (valid) { - updateDeviceItem(this.temp).then((response) => { + this.openModulDialog('验证密码', 'pwdVerifiers', '600px', true) + } + }) + }, + commitUpdateData() { + updateDeviceItem(this.temp).then((response) => { this.$message({ showClose: true, message: response.msg, @@ -260,8 +299,6 @@ export default { }).finally(() => { }) - } - }) }, // 删除数据 handleDelete(row, index) { diff --git a/ah-jjzhgd-web/src/views/device/sideband/index.vue b/ah-jjzhgd-web/src/views/device/sideband/index.vue index 4cc1249..61487aa 100644 --- a/ah-jjzhgd-web/src/views/device/sideband/index.vue +++ b/ah-jjzhgd-web/src/views/device/sideband/index.vue @@ -103,6 +103,10 @@ + + + @@ -122,7 +126,8 @@ import { getSidebandList, updateSidebandItem } from '@/api/basic/sideband' - +import { verifyPwd } from '@/api/verifyPwd' +import modulDialog from '@/components/pwdVerifiers/pwdVerifiers.vue' const defaultTmp = { bdName: '', bdCode: '', @@ -133,9 +138,15 @@ const defaultTmp = { bidCode: '' } export default { - components: { Pagination, SidebandChildTable, ProjectSelect, DeviceSelect, GtSelect, SidebandTypeSelect }, + components: { Pagination, SidebandChildTable, ProjectSelect, DeviceSelect, GtSelect, SidebandTypeSelect,modulDialog }, data() { return { + componentDialog: { + modulName: '', //组件名称 + title: '', + width: '', + openFalg: false + }, tableKey: 0, list: [], // 边带类型列表 @@ -193,6 +204,12 @@ 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 + }, getList() { this.listLoading = true getSidebandList(this.listQuery).then((response) => { @@ -242,7 +259,12 @@ export default { updateData() { this.$refs['dataForm'].validate((valid) => { if (valid) { - updateSidebandItem(this.temp).then((response) => { + this.openModulDialog('验证密码', 'pwdVerifiers', '600px', true) + } + }) + }, + commitUpdateData() { + updateSidebandItem(this.temp).then((response) => { this.$message({ showClose: true, message: response.msg, @@ -252,8 +274,6 @@ export default { this.getList() this.dialogFormVisible = false }) - } - }) }, // 删除数据 handleDelete(row, index) { diff --git a/ah-jjzhgd-web/src/views/device/sidebandDevice/index.vue b/ah-jjzhgd-web/src/views/device/sidebandDevice/index.vue index 95d0145..1607f3b 100644 --- a/ah-jjzhgd-web/src/views/device/sidebandDevice/index.vue +++ b/ah-jjzhgd-web/src/views/device/sidebandDevice/index.vue @@ -108,6 +108,10 @@ + + + @@ -126,7 +130,8 @@ import DeviceStatusSelect from '@/views/device/sideband/components/DeviceStatusS import AreaSelect from '@/views/device/sideband/components/AreaSelect.vue' import SidebandSelect from '@/views/device/sideband/components/SidebandSelect.vue' import SidebandDetailTable from '@/views/device/sidebandDevice/components/SidebandDetailTable.vue' - +import { verifyPwd } from '@/api/verifyPwd' +import modulDialog from '@/components/pwdVerifiers/pwdVerifiers.vue' const defaultTmp = { deviceId: '', deviceCode: '', @@ -144,9 +149,15 @@ const defaultTmp = { gtId: '' } export default { - components: { SidebandDetailTable, SidebandSelect, AreaSelect, DeviceStatusSelect, DeviceSelect, Pagination }, + components: { SidebandDetailTable, SidebandSelect, AreaSelect, DeviceStatusSelect, DeviceSelect, Pagination,modulDialog }, data() { return { + componentDialog: { + modulName: '', //组件名称 + title: '', + width: '', + openFalg: false + }, bidCode: '', gtId: '', tableKey: 0, @@ -201,6 +212,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(); + }) + + }, getList() { this.listLoading = true // this.listQuery.id = this.currentId @@ -260,7 +294,12 @@ export default { updateData() { this.$refs['dataForm'].validate((valid) => { if (valid) { - this.temp.gtId = this.gtId + this.openModulDialog('验证密码', 'pwdVerifiers', '600px', true) + } + }) + }, + commitUpdateData() { + this.temp.gtId = this.gtId updateSidebandChildItem(this.temp).then((response) => { this.$message({ showClose: true, @@ -273,8 +312,6 @@ export default { }).finally(() => { }) - } - }) }, // 删除数据 handleDelete(row, index) {