feat: 同步代码

This commit is contained in:
cgd_mac 2022-02-25 08:56:32 +08:00
commit 3034a1a3b0
2 changed files with 41 additions and 16 deletions

View File

@ -268,7 +268,8 @@
typeData: [],
fileList: [],
fileList2: [],
fileList3: []
fileList3: [],
isRegister: 0
}
},
mounted () {
@ -277,9 +278,10 @@
methods: {
//
registerEdit (record) {
this.modalTitle = '新增人员'
this.modalTitle = '审核人员'
this.confirmLoading = true
this.visible = true
this.isRegister = 1
this.registerDisabled = true
setTimeout(() => {
@ -290,7 +292,9 @@
userName: record.userName,
phone: record.phone,
orgId: record.orgId,
orgName: record.orgName
orgName: record.orgName,
id: record.personId, // personId
userId: record.userId
}
)
}, 100)
@ -302,6 +306,7 @@
this.modalTitle = '编辑人员'
this.confirmLoading = true
this.visible = true
this.isRegister = 0
this.registerDisabled = true
@ -382,30 +387,50 @@
handleSubmit () {
const { form: { validateFields } } = this
this.confirmLoading = true
const _this = this
validateFields((errors, values) => {
if (!errors) {
values.type = values.type.join(',')
values.idPhotoFace = JSON.stringify(this.fileList)
values.idPhotoBack = JSON.stringify(this.fileList2)
if (this.fileList3.length > 0) values.avatar = this.fileList3[0].url
personAddOrUpdate(values).then((res) => {
this.confirmLoading = false
if (res.code === 200) {
this.$message.success('操作成功')
this.$emit('ok', values)
this.handleCancel()
} else {
this.$message.error('操作失败:' + res.msg)
}
}, (err) => {
this.$message.error(err)
})
//
if(_this.isRegister === 1) {
this.$confirm({
title: '提示',
content: '确认通过审核吗?',
onOk () {
values.isRegister = 1 //
_this.addOrUpdate(values)
},
onCancel () {}
})
} else {
_this.addOrUpdate(values)
}
} else {
this.confirmLoading = false
}
})
},
addOrUpdate (values) {
personAddOrUpdate(values).then((res) => {
this.confirmLoading = false
if (res.code === 200) {
this.$message.success('操作成功')
this.$emit('ok', values)
this.handleCancel()
} else {
this.$message.error('操作失败:' + res.msg)
}
}, (err) => {
this.$message.error(err)
})
},
idCardNoBlur (event) {
const idCardNo = event.target.value
this.analyzeIdCardNo(idCardNo)

View File

@ -48,7 +48,7 @@
</a-card>
<a-card :bordered="false">
<div class="table-operator">
<a-button @click="addPerson" icon="plus" type="primary" v-if="hasPerm('person:edit')">新增人员</a-button>
<a-button @click="addPerson" icon="plus" type="primary" v-if="hasPerm('person:edit')">人员</a-button>
<template v-if="orgType === 1">
<a-button @click="transfer" type="primary" v-if="hasPerm('person:transfer')">转移部门</a-button>