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