设备管理修改添加密码校验
This commit is contained in:
parent
612f7c0973
commit
4492881e05
|
|
@ -115,6 +115,10 @@
|
|||
</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<modul-dialog ref="pwdVerifiersDialog" :title="componentDialog.title" :width="componentDialog.width"
|
||||
v-model="componentDialog.openFalg">
|
||||
<component :is="componentDialog.modulName" />
|
||||
</modul-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -120,6 +120,10 @@
|
|||
</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<modul-dialog ref="pwdVerifiersDialog" :title="componentDialog.title" :width="componentDialog.width"
|
||||
v-model="componentDialog.openFalg">
|
||||
<component :is="componentDialog.modulName" />
|
||||
</modul-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -103,6 +103,10 @@
|
|||
|
||||
<!--边带子设备模态框-->
|
||||
<SidebandChildTable :component-visible.sync="sidebandChildVisible" :current-id="currentSidebandId" :bid-code="currentBidCode" :gt-id="currentGtId" />
|
||||
<modul-dialog ref="pwdVerifiersDialog" :title="componentDialog.title" :width="componentDialog.width"
|
||||
v-model="componentDialog.openFalg">
|
||||
<component :is="componentDialog.modulName" />
|
||||
</modul-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -108,6 +108,10 @@
|
|||
|
||||
<!-- 详情模态框-->
|
||||
<SidebandDetailTable :component-visible.sync="detailVisible" :current-id="currentId" />
|
||||
<modul-dialog ref="pwdVerifiersDialog" :title="componentDialog.title" :width="componentDialog.width"
|
||||
v-model="componentDialog.openFalg">
|
||||
<component :is="componentDialog.modulName" />
|
||||
</modul-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue