From a5731d7c4815d8ac4aa41e5ffc0741cd666da7ff Mon Sep 17 00:00:00 2001
From: liux <963924687@qq.com>
Date: Fri, 28 Nov 2025 16:23:44 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BA=BA=E5=91=98=E4=BF=A1=E6=81=AF=E6=B7=BB?=
=?UTF-8?q?=E5=8A=A0=E6=A0=B8=E9=AA=8C=E7=8A=B6=E6=80=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/system/user/index.vue | 91 +++++++++++++++++----------------
1 file changed, 48 insertions(+), 43 deletions(-)
diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue
index d33992b3..49ba986d 100644
--- a/src/views/system/user/index.vue
+++ b/src/views/system/user/index.vue
@@ -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"
>
男
女
-
+
上传失败
+
+
+ {{ scope.row.features == 0 ? '核验失败' : '核验成功'}}
+
+
{{
@@ -392,7 +397,7 @@
-
+
-
+
-
+
-
+
-
+
@@ -644,9 +649,9 @@
end-placeholder="结束日期" clearable
format="yyyy-MM-dd" style="width: 100%"
:picker-options="pickerOptions" >
-
+
-
+
-
+
@@ -693,7 +698,7 @@
-
+
取 消
-
+
@@ -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}`;
- }
+ }
},
}