人员信息添加核验状态
This commit is contained in:
parent
474e796242
commit
a5731d7c48
|
|
@ -224,7 +224,7 @@
|
||||||
label="用户账号"
|
label="用户账号"
|
||||||
align="center"
|
align="center"
|
||||||
key="userName"
|
key="userName"
|
||||||
prop="userName"
|
prop="userName"
|
||||||
v-if="columns[1].visible"
|
v-if="columns[1].visible"
|
||||||
:show-overflow-tooltip="true"
|
:show-overflow-tooltip="true"
|
||||||
>
|
>
|
||||||
|
|
@ -272,15 +272,15 @@
|
||||||
label="性别"
|
label="性别"
|
||||||
align="center"
|
align="center"
|
||||||
key="sex"
|
key="sex"
|
||||||
prop="sex"
|
prop="sex"
|
||||||
width="80"
|
width="60"
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span v-if="scope.row.sex==0">男</span>
|
<span v-if="scope.row.sex==0">男</span>
|
||||||
<span v-if="scope.row.sex==1">女</span>
|
<span v-if="scope.row.sex==1">女</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="状态"
|
label="状态"
|
||||||
align="center"
|
align="center"
|
||||||
|
|
@ -308,6 +308,11 @@
|
||||||
<span v-if="scope.row.faceStatus==2">上传失败</span>
|
<span v-if="scope.row.faceStatus==2">上传失败</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column label="人脸核验状态" align="center" width="100">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ scope.row.features == 0 ? '核验失败' : '核验成功'}}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="账号时效" align="center">
|
<el-table-column label="账号时效" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{
|
<span>{{
|
||||||
|
|
@ -392,7 +397,7 @@
|
||||||
<el-dropdown-menu slot="dropdown">
|
<el-dropdown-menu slot="dropdown">
|
||||||
<!-- <el-dropdown-item
|
<!-- <el-dropdown-item
|
||||||
command="handleUpFace"
|
command="handleUpFace"
|
||||||
icon="el-icon-key"
|
icon="el-icon-key"
|
||||||
>人脸上传
|
>人脸上传
|
||||||
</el-dropdown-item> -->
|
</el-dropdown-item> -->
|
||||||
<el-dropdown-item
|
<el-dropdown-item
|
||||||
|
|
@ -472,7 +477,7 @@
|
||||||
noResultsText="没有搜索结果"
|
noResultsText="没有搜索结果"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="手机号码" prop="phonenumber">
|
<el-form-item label="手机号码" prop="phonenumber">
|
||||||
<el-input
|
<el-input
|
||||||
|
|
@ -490,7 +495,7 @@
|
||||||
maxlength="50"
|
maxlength="50"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item
|
<el-form-item
|
||||||
v-if="form.userId == undefined"
|
v-if="form.userId == undefined"
|
||||||
|
|
@ -518,7 +523,7 @@
|
||||||
show-password
|
show-password
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="用户性别">
|
<el-form-item label="用户性别">
|
||||||
<el-select
|
<el-select
|
||||||
|
|
@ -586,7 +591,7 @@
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="角色" prop="roleIds">
|
<el-form-item label="角色" prop="roleIds">
|
||||||
<el-select
|
<el-select
|
||||||
|
|
@ -618,7 +623,7 @@
|
||||||
</el-radio>
|
</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="登录权限" prop="loginTypeArr">
|
<el-form-item label="登录权限" prop="loginTypeArr">
|
||||||
<el-checkbox-group v-model="loginTypeArr">
|
<el-checkbox-group v-model="loginTypeArr">
|
||||||
|
|
@ -644,9 +649,9 @@
|
||||||
end-placeholder="结束日期" clearable
|
end-placeholder="结束日期" clearable
|
||||||
format="yyyy-MM-dd" style="width: 100%"
|
format="yyyy-MM-dd" style="width: 100%"
|
||||||
:picker-options="pickerOptions" >
|
:picker-options="pickerOptions" >
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="人脸图片">
|
<el-form-item label="人脸图片">
|
||||||
<el-upload
|
<el-upload
|
||||||
|
|
@ -671,7 +676,7 @@
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="备注">
|
<el-form-item label="备注">
|
||||||
|
|
@ -693,7 +698,7 @@
|
||||||
<!-- 人脸上传弹窗 -->
|
<!-- 人脸上传弹窗 -->
|
||||||
<el-dialog title="上传人脸" :visible.sync="openFace" width="500px" append-to-body>
|
<el-dialog title="上传人脸" :visible.sync="openFace" width="500px" append-to-body>
|
||||||
<el-form ref="baseForm" :model="baseForm" label-width="100px">
|
<el-form ref="baseForm" :model="baseForm" label-width="100px">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="人脸图片">
|
<el-form-item label="人脸图片">
|
||||||
<el-upload
|
<el-upload
|
||||||
|
|
@ -724,7 +729,7 @@
|
||||||
<el-button @click="openFace=false">取 消</el-button>
|
<el-button @click="openFace=false">取 消</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<el-dialog :visible.sync="dialogVisible" width="700px">
|
<el-dialog :visible.sync="dialogVisible" width="700px">
|
||||||
<img style="width: 100%;height: 100%;" :src="dialogImageUrl" alt="">
|
<img style="width: 100%;height: 100%;" :src="dialogImageUrl" alt="">
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
@ -795,8 +800,8 @@ import Treeselect from '@riophae/vue-treeselect'
|
||||||
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||||
import { validateNewPassword } from '@/utils/validate'
|
import { validateNewPassword } from '@/utils/validate'
|
||||||
|
|
||||||
import store from "@/store";
|
import store from "@/store";
|
||||||
import { imgUpLoadTwo } from '@/api/system/upload'
|
import { imgUpLoadTwo } from '@/api/system/upload'
|
||||||
import { decryptWithSM4,encryptWithSM4 } from '@/utils/sm';
|
import { decryptWithSM4,encryptWithSM4 } from '@/utils/sm';
|
||||||
export default {
|
export default {
|
||||||
name: 'User',
|
name: 'User',
|
||||||
|
|
@ -978,7 +983,7 @@ export default {
|
||||||
checkUrlList: [],//图片
|
checkUrlList: [],//图片
|
||||||
checkUrlNameList: [],//图片
|
checkUrlNameList: [],//图片
|
||||||
dialogVisible:false,//图片弹窗
|
dialogVisible:false,//图片弹窗
|
||||||
dialogImageUrl:"",//图片弹窗
|
dialogImageUrl:"",//图片弹窗
|
||||||
loadingBtn:false,
|
loadingBtn:false,
|
||||||
// 是否显示cropper
|
// 是否显示cropper
|
||||||
visible: false,
|
visible: false,
|
||||||
|
|
@ -1047,11 +1052,11 @@ export default {
|
||||||
(response) => {
|
(response) => {
|
||||||
this.userList = response.rows
|
this.userList = response.rows
|
||||||
this.total = response.total
|
this.total = response.total
|
||||||
// this.userList.forEach(item=>{
|
// this.userList.forEach(item=>{
|
||||||
// if(item.phonenumber&&item.phonenumber!=""){
|
// if(item.phonenumber&&item.phonenumber!=""){
|
||||||
// this.$set(item,"phonenumber",decryptWithSM4(item.phonenumber))
|
// this.$set(item,"phonenumber",decryptWithSM4(item.phonenumber))
|
||||||
// }
|
// }
|
||||||
// })
|
// })
|
||||||
this.loading = false
|
this.loading = false
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
@ -1207,16 +1212,16 @@ export default {
|
||||||
this.form = response.data
|
this.form = response.data
|
||||||
// if(this.form.phonenumber&&this.form..phonenumber!=""){
|
// if(this.form.phonenumber&&this.form..phonenumber!=""){
|
||||||
// this.$set(this.form,"phonenumber",decryptWithSM4(response.data.phonenumber))
|
// this.$set(this.form,"phonenumber",decryptWithSM4(response.data.phonenumber))
|
||||||
// }
|
// }
|
||||||
// if(this.form.email&&this.form..email!=""){
|
// if(this.form.email&&this.form..email!=""){
|
||||||
// this.$set(this.form,"email",decryptWithSM4(response.data.email))
|
// this.$set(this.form,"email",decryptWithSM4(response.data.email))
|
||||||
// }
|
// }
|
||||||
const loginType = response.data.loginType
|
const loginType = response.data.loginType
|
||||||
if (loginType) {
|
if (loginType) {
|
||||||
this.loginTypeArr = loginType.split(',')
|
this.loginTypeArr = loginType.split(',')
|
||||||
}
|
}
|
||||||
if(this.form.isPermanent==0){
|
if(this.form.isPermanent==0){
|
||||||
this.effectiveDateRange = [new Date(this.form.effectiveStartDay).getTime(),new Date(this.form.effectiveEndDay).getTime()]
|
this.effectiveDateRange = [new Date(this.form.effectiveStartDay).getTime(),new Date(this.form.effectiveEndDay).getTime()]
|
||||||
}
|
}
|
||||||
this.postOptions = response.posts
|
this.postOptions = response.posts
|
||||||
this.roleOptions = response.roles
|
this.roleOptions = response.roles
|
||||||
|
|
@ -1231,7 +1236,7 @@ export default {
|
||||||
this.fileList=[]
|
this.fileList=[]
|
||||||
this.checkUrlList=[]
|
this.checkUrlList=[]
|
||||||
this.checkUrlNameList = []
|
this.checkUrlNameList = []
|
||||||
}
|
}
|
||||||
this.open = true
|
this.open = true
|
||||||
this.title = '修改用户'
|
this.title = '修改用户'
|
||||||
this.form.password = ''
|
this.form.password = ''
|
||||||
|
|
@ -1330,9 +1335,9 @@ export default {
|
||||||
this.form.photoUrl = null
|
this.form.photoUrl = null
|
||||||
// this.$message.warning('请先上传人脸图片')
|
// this.$message.warning('请先上传人脸图片')
|
||||||
}else{
|
}else{
|
||||||
this.form.photoUrl = this.checkUrlList[0]
|
this.form.photoUrl = this.checkUrlList[0]
|
||||||
}
|
}
|
||||||
if(this.form.isPermanent==0){
|
if(this.form.isPermanent==0){
|
||||||
this.form.effectiveStartDay = this.formatDate(this.effectiveDateRange[0])
|
this.form.effectiveStartDay = this.formatDate(this.effectiveDateRange[0])
|
||||||
this.form.effectiveEndDay = this.formatDate(this.effectiveDateRange[1])
|
this.form.effectiveEndDay = this.formatDate(this.effectiveDateRange[1])
|
||||||
}else{
|
}else{
|
||||||
|
|
@ -1343,10 +1348,10 @@ export default {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
// if(param.phonenumber&¶m.phonenumber!=""){
|
// if(param.phonenumber&¶m.phonenumber!=""){
|
||||||
// this.$set(param,"phonenumber",encryptWithSM4(param.phonenumber))
|
// this.$set(param,"phonenumber",encryptWithSM4(param.phonenumber))
|
||||||
// }
|
// }
|
||||||
// if(param.email&¶m.email!=""){
|
// if(param.email&¶m.email!=""){
|
||||||
// this.$set(param,"email",encryptWithSM4(param.email))
|
// this.$set(param,"email",encryptWithSM4(param.email))
|
||||||
// }
|
// }
|
||||||
if (param.userId != undefined) {
|
if (param.userId != undefined) {
|
||||||
updateUser(param).then((response) => {
|
updateUser(param).then((response) => {
|
||||||
this.$modal.msgSuccess('修改成功')
|
this.$modal.msgSuccess('修改成功')
|
||||||
|
|
@ -1421,7 +1426,7 @@ export default {
|
||||||
// 提交上传文件
|
// 提交上传文件
|
||||||
submitFileForm() {
|
submitFileForm() {
|
||||||
this.$refs.upload.submit()
|
this.$refs.upload.submit()
|
||||||
},
|
},
|
||||||
hasSystemOrAuditrRole(roles) {
|
hasSystemOrAuditrRole(roles) {
|
||||||
if (!roles || !Array.isArray(roles)) {
|
if (!roles || !Array.isArray(roles)) {
|
||||||
return false // 如果 roles 为空或不是数组,返回 false
|
return false // 如果 roles 为空或不是数组,返回 false
|
||||||
|
|
@ -1430,7 +1435,7 @@ export default {
|
||||||
(role) =>
|
(role) =>
|
||||||
role.roleKey === 'systemAdmin' || role.roleKey === 'audit',
|
role.roleKey === 'systemAdmin' || role.roleKey === 'audit',
|
||||||
) // 检查是否存在 roleKey 为 admin 的角色
|
) // 检查是否存在 roleKey 为 admin 的角色
|
||||||
},
|
},
|
||||||
// 检查行是否可选
|
// 检查行是否可选
|
||||||
checkSelectable(row) {
|
checkSelectable(row) {
|
||||||
return !(
|
return !(
|
||||||
|
|
@ -1438,7 +1443,7 @@ export default {
|
||||||
row.isBuiltIn === '0' ||
|
row.isBuiltIn === '0' ||
|
||||||
this.hasSystemOrAuditrRole(row.roles)
|
this.hasSystemOrAuditrRole(row.roles)
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
getRowClassName(row) {
|
getRowClassName(row) {
|
||||||
return !this.checkSelectable(row) ? 'disabled-row' : ''
|
return !this.checkSelectable(row) ? 'disabled-row' : ''
|
||||||
},
|
},
|
||||||
|
|
@ -1449,9 +1454,9 @@ export default {
|
||||||
console.log(row)
|
console.log(row)
|
||||||
const userId = row.userId || this.ids
|
const userId = row.userId || this.ids
|
||||||
getUser(userId).then((response) => {
|
getUser(userId).then((response) => {
|
||||||
this.baseForm = response.data
|
this.baseForm = response.data
|
||||||
this.openFace = true
|
this.openFace = true
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
submitFace(){
|
submitFace(){
|
||||||
// console.log(this.baseForm)
|
// console.log(this.baseForm)
|
||||||
|
|
@ -1462,7 +1467,7 @@ export default {
|
||||||
this.baseForm.photoUrl = this.checkUrlList[0]
|
this.baseForm.photoUrl = this.checkUrlList[0]
|
||||||
updateUser(this.baseForm).then((response) => {
|
updateUser(this.baseForm).then((response) => {
|
||||||
this.$modal.msgSuccess('上传成功')
|
this.$modal.msgSuccess('上传成功')
|
||||||
store.commit('SET_FACE', this.checkUrlList[0]);
|
store.commit('SET_FACE', this.checkUrlList[0]);
|
||||||
this.openFace = false;
|
this.openFace = false;
|
||||||
this.getList()
|
this.getList()
|
||||||
})
|
})
|
||||||
|
|
@ -1477,12 +1482,12 @@ export default {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
this.checkUrlList.push(res.data.url)
|
this.checkUrlList.push(res.data.url)
|
||||||
this.checkUrlNameList.push(res.data.name)
|
this.checkUrlNameList.push(res.data.name)
|
||||||
} else {
|
} else {
|
||||||
this.$modal.msgError(res.msg)
|
this.$modal.msgError(res.msg)
|
||||||
}
|
}
|
||||||
this.loadingBtn=false
|
this.loadingBtn=false
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
this.$modal.msgError(error)
|
this.$modal.msgError(error)
|
||||||
this.loadingBtn=false
|
this.loadingBtn=false
|
||||||
})
|
})
|
||||||
|
|
@ -1491,7 +1496,7 @@ export default {
|
||||||
console.log('success')
|
console.log('success')
|
||||||
},
|
},
|
||||||
// 上传之前
|
// 上传之前
|
||||||
handleBeforeUpload(file) {
|
handleBeforeUpload(file) {
|
||||||
const isLt = file.size / 1024 / 1024 < 5
|
const isLt = file.size / 1024 / 1024 < 5
|
||||||
if (!isLt) {
|
if (!isLt) {
|
||||||
this.$modal.msgError(`图片大小不能超过 5 MB`)
|
this.$modal.msgError(`图片大小不能超过 5 MB`)
|
||||||
|
|
@ -1530,7 +1535,7 @@ export default {
|
||||||
const month = String(date.getMonth() + 1).padStart(2, '0'); // 月份从0开始
|
const month = String(date.getMonth() + 1).padStart(2, '0'); // 月份从0开始
|
||||||
const day = String(date.getDate()).padStart(2, '0');
|
const day = String(date.getDate()).padStart(2, '0');
|
||||||
return `${year}-${month}-${day}`;
|
return `${year}-${month}-${day}`;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue