区域管理修改添加密码校验

This commit is contained in:
cwchen 2024-09-12 09:28:05 +08:00
parent 011ee8d2ba
commit bc96c67def
1 changed files with 42 additions and 5 deletions

View File

@ -112,6 +112,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>
@ -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) {