单项工程修改添加密码校验
This commit is contained in:
parent
56c8a64a5e
commit
7d5af7e6f9
|
|
@ -166,6 +166,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>
|
||||
|
||||
|
|
@ -179,6 +183,8 @@ import { addSingleItem, deleteSingleItem, getSingleItemDetail, getSingleList, up
|
|||
import BuildSelect from '@/views/basic/project/components/BuildSelect.vue'
|
||||
import ProjectNoSelect from '@/views/basic/single/components/ProjectNoSelect.vue'
|
||||
import { getDictSelectList } from '@/api/public'
|
||||
import { verifyPwd } from '@/api/verifyPwd'
|
||||
import modulDialog from '@/components/pwdVerifiers/pwdVerifiers.vue'
|
||||
const defaultTmp = {
|
||||
singleName: '',
|
||||
signleNo: '',
|
||||
|
|
@ -197,9 +203,15 @@ const defaultTmp = {
|
|||
singleDesc: ''
|
||||
}
|
||||
export default {
|
||||
components: { ProjectNoSelect, BuildSelect, Pagination },
|
||||
components: { ProjectNoSelect, BuildSelect, Pagination,modulDialog },
|
||||
data() {
|
||||
return {
|
||||
componentDialog: {
|
||||
modulName: '', //组件名称
|
||||
title: '',
|
||||
width: '',
|
||||
openFalg: false
|
||||
},
|
||||
tableKey: 0,
|
||||
list: [],
|
||||
currentProjectType: '',
|
||||
|
|
@ -272,6 +284,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();
|
||||
})
|
||||
|
||||
},
|
||||
getSelect() {
|
||||
getDictSelectList(10).then(res => {
|
||||
this.options = res.data.map(item => {
|
||||
|
|
@ -342,7 +377,12 @@ export default {
|
|||
updateData() {
|
||||
this.$refs['dataForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
updateSingleItem(this.temp).then((response) => {
|
||||
this.openModulDialog('验证密码', 'pwdVerifiers', '600px', true)
|
||||
}
|
||||
})
|
||||
},
|
||||
commitUpdateData() {
|
||||
updateSingleItem(this.temp).then((response) => {
|
||||
this.$message({
|
||||
showClose: true,
|
||||
message: response.msg,
|
||||
|
|
@ -354,8 +394,6 @@ export default {
|
|||
}).finally(() => {
|
||||
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 删除数据
|
||||
handleDelete(row, index) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue