风险值班管理修改添加密码校验
This commit is contained in:
parent
5453665420
commit
612f7c0973
|
|
@ -95,7 +95,12 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<modul-dialog ref="pwdVerifiersDialog" :title="componentDialog.title" :width="componentDialog.width"
|
||||
v-model="componentDialog.openFalg">
|
||||
<component :is="componentDialog.modulName" />
|
||||
</modul-dialog>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
|
@ -104,7 +109,8 @@ import waves from '@/directive/waves'
|
|||
import _ from 'lodash/fp'
|
||||
import { downloadFile } from '@/utils/download'
|
||||
import { exportDutyPlan, getDutyPlan, getTimeList, updateDutyPlan } from '@/api/risk/dutyPlan'
|
||||
|
||||
import { verifyPwd } from '@/api/verifyPwd'
|
||||
import modulDialog from '@/components/pwdVerifiers/pwdVerifiers.vue'
|
||||
const defaultTmp = {
|
||||
mon: '',
|
||||
mon1: '',
|
||||
|
|
@ -123,8 +129,15 @@ const defaultTmp = {
|
|||
}
|
||||
export default {
|
||||
directives: { waves },
|
||||
components: { modulDialog },
|
||||
data() {
|
||||
return {
|
||||
componentDialog: {
|
||||
modulName: '', //组件名称
|
||||
title: '',
|
||||
width: '',
|
||||
openFalg: false
|
||||
},
|
||||
tableKey: 0,
|
||||
list: [],
|
||||
timeList: [],
|
||||
|
|
@ -144,6 +157,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();
|
||||
})
|
||||
|
||||
},
|
||||
// 选择日期
|
||||
handleSelect(index) {
|
||||
this.currentTime = index
|
||||
|
|
@ -152,7 +188,11 @@ export default {
|
|||
// 保存编辑计划
|
||||
handleSave() {
|
||||
if (this.currentTime) {
|
||||
this.temp.createDay = this.currentTime
|
||||
this.openModulDialog('验证密码', 'pwdVerifiers', '600px', true)
|
||||
}
|
||||
},
|
||||
commitUpdateData() {
|
||||
this.temp.createDay = this.currentTime
|
||||
updateDutyPlan(this.temp).then((response) => {
|
||||
this.$message({
|
||||
showClose: true,
|
||||
|
|
@ -165,7 +205,6 @@ export default {
|
|||
}).finally(() => {
|
||||
// this.dialogFormVisible = false
|
||||
})
|
||||
}
|
||||
},
|
||||
handleExit() {
|
||||
this.planEditMode = false
|
||||
|
|
|
|||
|
|
@ -98,6 +98,10 @@
|
|||
|
||||
<!-- 文件模态框-->
|
||||
<FileTable :component-visible.sync="fileModalVisible" :file-list="fileList" />
|
||||
<modul-dialog ref="pwdVerifiersDialog" :title="componentDialog.title" :width="componentDialog.width"
|
||||
v-model="componentDialog.openFalg">
|
||||
<component :is="componentDialog.modulName" />
|
||||
</modul-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
@ -113,15 +117,22 @@ import {
|
|||
updateEmergencyCaseItem
|
||||
} from '@/api/risk/emergency'
|
||||
import FileTable from '@/views/risk/emergency/components/FileTable.vue'
|
||||
|
||||
import { verifyPwd } from '@/api/verifyPwd'
|
||||
import modulDialog from '@/components/pwdVerifiers/pwdVerifiers.vue'
|
||||
const defaultTmp = {
|
||||
name: '',
|
||||
addition: ''
|
||||
}
|
||||
export default {
|
||||
components: { FileTable, Pagination },
|
||||
components: { FileTable, Pagination,modulDialog },
|
||||
data() {
|
||||
return {
|
||||
componentDialog: {
|
||||
modulName: '', //组件名称
|
||||
title: '',
|
||||
width: '',
|
||||
openFalg: false
|
||||
},
|
||||
tableKey: 0,
|
||||
list: [],
|
||||
total: 0,
|
||||
|
|
@ -154,6 +165,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
|
||||
getEmergencyCaseList(this.listQuery).then((response) => {
|
||||
|
|
@ -216,7 +250,12 @@ export default {
|
|||
updateData() {
|
||||
this.$refs['dataForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
const reqData = new FormData()
|
||||
this.openModulDialog('验证密码', 'pwdVerifiers', '600px', true)
|
||||
}
|
||||
})
|
||||
},
|
||||
commitUpdateData() {
|
||||
const reqData = new FormData()
|
||||
reqData.append('emergencyName', this.temp.emergencyName)
|
||||
reqData.append('id', this.temp.id)
|
||||
reqData.append('delFile', this.delFiles.join('@'))
|
||||
|
|
@ -237,8 +276,6 @@ export default {
|
|||
}).finally(() => {
|
||||
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 删除数据
|
||||
handleDelete(row, index) {
|
||||
|
|
|
|||
|
|
@ -78,6 +78,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>
|
||||
|
||||
|
|
@ -92,15 +96,22 @@ import {
|
|||
getEmergencyPhoneList,
|
||||
updateEmergencyPhoneItem
|
||||
} from '@/api/risk/emergency'
|
||||
|
||||
import { verifyPwd } from '@/api/verifyPwd'
|
||||
import modulDialog from '@/components/pwdVerifiers/pwdVerifiers.vue'
|
||||
const defaultTmp = {
|
||||
emergencyName: '',
|
||||
emergencySource: ''
|
||||
}
|
||||
export default {
|
||||
components: { Pagination },
|
||||
components: { Pagination,modulDialog },
|
||||
data() {
|
||||
return {
|
||||
componentDialog: {
|
||||
modulName: '', //组件名称
|
||||
title: '',
|
||||
width: '',
|
||||
openFalg: false
|
||||
},
|
||||
tableKey: 0,
|
||||
list: [],
|
||||
total: 0,
|
||||
|
|
@ -129,6 +140,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
|
||||
getEmergencyPhoneList(this.listQuery).then((response) => {
|
||||
|
|
@ -176,7 +210,12 @@ export default {
|
|||
updateData() {
|
||||
this.$refs['dataForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
updateEmergencyPhoneItem(this.temp).then((response) => {
|
||||
this.openModulDialog('验证密码', 'pwdVerifiers', '600px', true)
|
||||
}
|
||||
})
|
||||
},
|
||||
commitUpdateData() {
|
||||
updateEmergencyPhoneItem(this.temp).then((response) => {
|
||||
this.$message({
|
||||
showClose: true,
|
||||
message: response.msg,
|
||||
|
|
@ -188,8 +227,6 @@ export default {
|
|||
}).finally(() => {
|
||||
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 删除数据
|
||||
handleDelete(row, index) {
|
||||
|
|
|
|||
|
|
@ -98,6 +98,10 @@
|
|||
|
||||
<!-- 文件模态框-->
|
||||
<FileTable :component-visible.sync="fileModalVisible" :file-list="fileList" />
|
||||
<modul-dialog ref="pwdVerifiersDialog" :title="componentDialog.title" :width="componentDialog.width"
|
||||
v-model="componentDialog.openFalg">
|
||||
<component :is="componentDialog.modulName" />
|
||||
</modul-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
@ -113,15 +117,22 @@ import {
|
|||
updateEmergencyProcessItem
|
||||
} from '@/api/risk/emergency'
|
||||
import FileTable from '@/views/risk/emergency/components/FileTable.vue'
|
||||
|
||||
import { verifyPwd } from '@/api/verifyPwd'
|
||||
import modulDialog from '@/components/pwdVerifiers/pwdVerifiers.vue'
|
||||
const defaultTmp = {
|
||||
name: '',
|
||||
addition: ''
|
||||
}
|
||||
export default {
|
||||
components: { FileTable, Pagination },
|
||||
components: { FileTable, Pagination,modulDialog },
|
||||
data() {
|
||||
return {
|
||||
componentDialog: {
|
||||
modulName: '', //组件名称
|
||||
title: '',
|
||||
width: '',
|
||||
openFalg: false
|
||||
},
|
||||
tableKey: 0,
|
||||
list: [],
|
||||
teamList: [],
|
||||
|
|
@ -155,6 +166,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
|
||||
getEmergencyProcessList(this.listQuery).then((response) => {
|
||||
|
|
@ -217,7 +251,12 @@ export default {
|
|||
updateData() {
|
||||
this.$refs['dataForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
const reqData = new FormData()
|
||||
this.openModulDialog('验证密码', 'pwdVerifiers', '600px', true)
|
||||
}
|
||||
})
|
||||
},
|
||||
commitUpdateData() {
|
||||
const reqData = new FormData()
|
||||
reqData.append('emergencyName', this.temp.emergencyName)
|
||||
reqData.append('id', this.temp.id)
|
||||
reqData.append('delFile', this.delFiles.join('@'))
|
||||
|
|
@ -238,8 +277,6 @@ export default {
|
|||
}).finally(() => {
|
||||
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 删除数据
|
||||
handleDelete(row, index) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue