系统用户界面增加身份证上传
parent
6703fc0bd1
commit
c9fb9f9f56
|
@ -104,6 +104,7 @@ public class SysUser extends BaseEntity
|
||||||
/** 角色对象 */
|
/** 角色对象 */
|
||||||
private List<SysRole> roles;
|
private List<SysRole> roles;
|
||||||
|
|
||||||
|
private String userInfos;
|
||||||
/** 角色组 */
|
/** 角色组 */
|
||||||
private Long[] roleIds;
|
private Long[] roleIds;
|
||||||
|
|
||||||
|
@ -119,6 +120,14 @@ public class SysUser extends BaseEntity
|
||||||
return workType;
|
return workType;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getUserInfos() {
|
||||||
|
return userInfos;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUserInfos(String userInfos) {
|
||||||
|
this.userInfos = userInfos;
|
||||||
|
}
|
||||||
|
|
||||||
public void setWorkType(Long workType) {
|
public void setWorkType(Long workType) {
|
||||||
this.workType = workType;
|
this.workType = workType;
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,6 +18,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<result property="isActive" column="is_active" />
|
<result property="isActive" column="is_active" />
|
||||||
<result property="phonenumber" column="phonenumber" />
|
<result property="phonenumber" column="phonenumber" />
|
||||||
<result property="sex" column="sex" />
|
<result property="sex" column="sex" />
|
||||||
|
<result property="userInfos" column="user_infos" />
|
||||||
<result property="avatar" column="avatar" />
|
<result property="avatar" column="avatar" />
|
||||||
<result property="password" column="password" />
|
<result property="password" column="password" />
|
||||||
<result property="status" column="status" />
|
<result property="status" column="status" />
|
||||||
|
@ -65,7 +66,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
select u.user_id, u.com_id, com.dept_name as com_name, u.dept_id, u.user_name, u.nick_name, ex.user_type,ex.work_type, u.card_code, u.email
|
select u.user_id, u.com_id, com.dept_name as com_name, u.dept_id, u.user_name, u.nick_name, ex.user_type,ex.work_type, u.card_code, u.email
|
||||||
, u.avatar, u.phonenumber, u.password, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark,
|
, u.avatar, u.phonenumber, u.password, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark,
|
||||||
d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.dept_short_name, d.dept_code, d.dept_type, d.order_num, d.leader, d.status as dept_status,
|
d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.dept_short_name, d.dept_code, d.dept_type, d.order_num, d.leader, d.status as dept_status,
|
||||||
r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status,com.dept_name com_dept_name
|
r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status,com.dept_name com_dept_name,u.user_infos
|
||||||
from sys_user u
|
from sys_user u
|
||||||
left join sys_dept d on u.dept_id = d.dept_id
|
left join sys_dept d on u.dept_id = d.dept_id
|
||||||
left join sys_dept com on u.com_id = com.dept_id
|
left join sys_dept com on u.com_id = com.dept_id
|
||||||
|
@ -208,6 +209,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="avatar != null and avatar != ''">avatar,</if>
|
<if test="avatar != null and avatar != ''">avatar,</if>
|
||||||
<if test="phonenumber != null and phonenumber != ''">phonenumber,</if>
|
<if test="phonenumber != null and phonenumber != ''">phonenumber,</if>
|
||||||
<if test="sex != null and sex != ''">sex,</if>
|
<if test="sex != null and sex != ''">sex,</if>
|
||||||
|
<if test="userInfos != null and userInfos != ''">user_infos,</if>
|
||||||
<if test="password != null and password != ''">password,</if>
|
<if test="password != null and password != ''">password,</if>
|
||||||
<if test="status != null and status != ''">status,</if>
|
<if test="status != null and status != ''">status,</if>
|
||||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||||
|
@ -224,6 +226,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="avatar != null and avatar != ''">#{avatar},</if>
|
<if test="avatar != null and avatar != ''">#{avatar},</if>
|
||||||
<if test="phonenumber != null and phonenumber != ''">#{phonenumber},</if>
|
<if test="phonenumber != null and phonenumber != ''">#{phonenumber},</if>
|
||||||
<if test="sex != null and sex != ''">#{sex},</if>
|
<if test="sex != null and sex != ''">#{sex},</if>
|
||||||
|
<if test="userInfos != null and userInfos != ''">#{userInfos},</if>
|
||||||
<if test="password != null and password != ''">#{password},</if>
|
<if test="password != null and password != ''">#{password},</if>
|
||||||
<if test="status != null and status != ''">#{status},</if>
|
<if test="status != null and status != ''">#{status},</if>
|
||||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||||
|
@ -244,6 +247,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="email != null ">email = #{email},</if>
|
<if test="email != null ">email = #{email},</if>
|
||||||
<if test="phonenumber != null ">phonenumber = #{phonenumber},</if>
|
<if test="phonenumber != null ">phonenumber = #{phonenumber},</if>
|
||||||
<if test="sex != null and sex != ''">sex = #{sex},</if>
|
<if test="sex != null and sex != ''">sex = #{sex},</if>
|
||||||
|
<if test="userInfos != null and userInfos != ''">user_infos = #{userInfos},</if>
|
||||||
<if test="avatar != null and avatar != ''">avatar = #{avatar},</if>
|
<if test="avatar != null and avatar != ''">avatar = #{avatar},</if>
|
||||||
<if test="password != null and password != ''">password = #{password},</if>
|
<if test="password != null and password != ''">password = #{password},</if>
|
||||||
<if test="status != null and status != ''">status = #{status},</if>
|
<if test="status != null and status != ''">status = #{status},</if>
|
||||||
|
|
|
@ -145,6 +145,7 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu
|
||||||
sysUser.setUpdateTime(DateUtils.getNowDate());
|
sysUser.setUpdateTime(DateUtils.getNowDate());
|
||||||
sysUser.setComId(proProjectInfoSubdeptsUsers.getComId());
|
sysUser.setComId(proProjectInfoSubdeptsUsers.getComId());
|
||||||
sysUser.setDeptId(proProjectInfoSubdeptsUsers.getProjectId());
|
sysUser.setDeptId(proProjectInfoSubdeptsUsers.getProjectId());
|
||||||
|
sysUser.setUserInfos(proProjectInfoSubdeptsUsers.getUserInfos());
|
||||||
String subDeptType = proProjectInfoSubdeptsUsers.getSubDeptType();
|
String subDeptType = proProjectInfoSubdeptsUsers.getSubDeptType();
|
||||||
// 判断单位类型
|
// 判断单位类型
|
||||||
if(Objects.nonNull(subDeptType)){
|
if(Objects.nonNull(subDeptType)){
|
||||||
|
|
|
@ -434,6 +434,7 @@ public class SysUserServiceImpl implements ISysUserService
|
||||||
data.put("userId",user.getUserId());
|
data.put("userId",user.getUserId());
|
||||||
data.put("userName",user.getNickName());
|
data.put("userName",user.getNickName());
|
||||||
data.put("cardType","1");
|
data.put("cardType","1");
|
||||||
|
data.put("userInfos",user.getUserInfos());
|
||||||
data.put("workType",user.getWorkType());
|
data.put("workType",user.getWorkType());
|
||||||
data.put("cardCode",user.getCardCode());
|
data.put("cardCode",user.getCardCode());
|
||||||
data.put("userSex",user.getSex());
|
data.put("userSex",user.getSex());
|
||||||
|
|
|
@ -1,46 +1,45 @@
|
||||||
import request from '@/utils/request'
|
import request from "@/utils/request";
|
||||||
import { parseStrEmpty } from "@/utils/ruoyi";
|
import { parseStrEmpty } from "@/utils/ruoyi";
|
||||||
|
|
||||||
// 查询用户列表
|
// 查询用户列表
|
||||||
export function listUser(query) {
|
export function listUser(query) {
|
||||||
return request({
|
return request({
|
||||||
url: '/system/user/list',
|
url: "/system/user/list",
|
||||||
method: 'get',
|
method: "get",
|
||||||
params: query
|
params: query,
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询用户详细
|
// 查询用户详细
|
||||||
export function getUser(userId) {
|
export function getUser(userId) {
|
||||||
return request({
|
return request({
|
||||||
url: '/system/user/' + parseStrEmpty(userId),
|
url: "/system/user/" + parseStrEmpty(userId),
|
||||||
method: 'get'
|
method: "get",
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 按手机号码查询用户
|
// 按手机号码查询用户
|
||||||
export function selectByPhone(phone) {
|
export function selectByPhone(phone) {
|
||||||
return request({
|
return request({
|
||||||
url: '/system/user/selectByPhone/' + phone,
|
url: "/system/user/selectByPhone/" + phone,
|
||||||
method: 'get'
|
method: "get",
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// 新增用户
|
// 新增用户
|
||||||
export function addUser(data) {
|
export function addUser(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/system/user',
|
url: "/system/user",
|
||||||
method: 'post',
|
method: "post",
|
||||||
data: data
|
data: data,
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 修改用户
|
// 修改用户
|
||||||
export function updateUser(data) {
|
export function updateUser(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/system/user',
|
url: "/system/user",
|
||||||
method: 'put',
|
method: "put",
|
||||||
data: {
|
data: {
|
||||||
userId: data.userId,
|
userId: data.userId,
|
||||||
nickName: data.nickName,
|
nickName: data.nickName,
|
||||||
|
@ -48,149 +47,150 @@ export function updateUser(data) {
|
||||||
workType: data.workType,
|
workType: data.workType,
|
||||||
sex: data.sex,
|
sex: data.sex,
|
||||||
status: data.status,
|
status: data.status,
|
||||||
|
userInfos: data.userInfos,
|
||||||
postIds: data.postIds,
|
postIds: data.postIds,
|
||||||
roles: data.roles,
|
roles: data.roles,
|
||||||
comId: data.comId,
|
comId: data.comId,
|
||||||
deptId: data.deptId,
|
deptId: data.deptId,
|
||||||
roleIds:data.roleIds
|
roleIds: data.roleIds,
|
||||||
}
|
},
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 删除用户
|
// 删除用户
|
||||||
export function delUser(userId) {
|
export function delUser(userId) {
|
||||||
return request({
|
return request({
|
||||||
url: '/system/user/' + userId,
|
url: "/system/user/" + userId,
|
||||||
method: 'delete'
|
method: "delete",
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 用户密码重置
|
// 用户密码重置
|
||||||
export function resetUserPwd(userId, password) {
|
export function resetUserPwd(userId, password) {
|
||||||
const data = {
|
const data = {
|
||||||
userId,
|
userId,
|
||||||
password
|
password,
|
||||||
}
|
};
|
||||||
return request({
|
return request({
|
||||||
url: '/system/user/resetPwd',
|
url: "/system/user/resetPwd",
|
||||||
method: 'put',
|
method: "put",
|
||||||
data: data
|
data: data,
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 用户状态修改
|
// 用户状态修改
|
||||||
export function changeUserStatus(userId, status) {
|
export function changeUserStatus(userId, status) {
|
||||||
const data = {
|
const data = {
|
||||||
userId,
|
userId,
|
||||||
status
|
status,
|
||||||
}
|
};
|
||||||
return request({
|
return request({
|
||||||
url: '/system/user/changeStatus',
|
url: "/system/user/changeStatus",
|
||||||
method: 'put',
|
method: "put",
|
||||||
data: data
|
data: data,
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询用户个人信息
|
// 查询用户个人信息
|
||||||
export function getUserProfile() {
|
export function getUserProfile() {
|
||||||
return request({
|
return request({
|
||||||
url: '/system/user/profile',
|
url: "/system/user/profile",
|
||||||
method: 'get'
|
method: "get",
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 修改用户个人信息
|
// 修改用户个人信息
|
||||||
export function updateUserProfile(data) {
|
export function updateUserProfile(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/system/user/profile',
|
url: "/system/user/profile",
|
||||||
method: 'put',
|
method: "put",
|
||||||
data: data
|
data: data,
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 用户密码重置
|
// 用户密码重置
|
||||||
export function updateUserPwd(oldPassword, newPassword) {
|
export function updateUserPwd(oldPassword, newPassword) {
|
||||||
const data = {
|
const data = {
|
||||||
oldPassword,
|
oldPassword,
|
||||||
newPassword
|
newPassword,
|
||||||
}
|
};
|
||||||
return request({
|
return request({
|
||||||
url: '/system/user/profile/updatePwd',
|
url: "/system/user/profile/updatePwd",
|
||||||
method: 'put',
|
method: "put",
|
||||||
params: data
|
params: data,
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 用户头像上传
|
// 用户头像上传
|
||||||
export function uploadAvatar(data) {
|
export function uploadAvatar(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/system/user/profile/avatar',
|
url: "/system/user/profile/avatar",
|
||||||
method: 'post',
|
method: "post",
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'multipart/form-data'
|
"Content-Type": "multipart/form-data",
|
||||||
},
|
},
|
||||||
data: data
|
data: data,
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询授权角色
|
// 查询授权角色
|
||||||
export function getAuthRole(userId) {
|
export function getAuthRole(userId) {
|
||||||
return request({
|
return request({
|
||||||
url: '/system/user/authRole/' + userId,
|
url: "/system/user/authRole/" + userId,
|
||||||
method: 'get'
|
method: "get",
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 保存授权角色
|
// 保存授权角色
|
||||||
export function updateAuthRole(data) {
|
export function updateAuthRole(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/system/user/authRole',
|
url: "/system/user/authRole",
|
||||||
method: 'put',
|
method: "put",
|
||||||
params: data
|
params: data,
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询部门下拉树结构
|
// 查询部门下拉树结构
|
||||||
export function deptTreeSelect() {
|
export function deptTreeSelect() {
|
||||||
return request({
|
return request({
|
||||||
url: '/system/user/deptTree',
|
url: "/system/user/deptTree",
|
||||||
method: 'get'
|
method: "get",
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询部门下拉树结构
|
// 查询部门下拉树结构
|
||||||
export function deptFirTreeSelect() {
|
export function deptFirTreeSelect() {
|
||||||
return request({
|
return request({
|
||||||
url: '/system/user/deptTree',
|
url: "/system/user/deptTree",
|
||||||
method: 'get'
|
method: "get",
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getUserComs(userId) {
|
export function getUserComs(userId) {
|
||||||
return request({
|
return request({
|
||||||
url: '/system/user/profile/getUserComps/'+userId,
|
url: "/system/user/profile/getUserComps/" + userId,
|
||||||
method: 'get'
|
method: "get",
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export function activeUserCom(userCom) {
|
export function activeUserCom(userCom) {
|
||||||
return request({
|
return request({
|
||||||
url:'/system/user/activeUserCom',
|
url: "/system/user/activeUserCom",
|
||||||
method:'post',
|
method: "post",
|
||||||
data:userCom
|
data: userCom,
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export function reload() {
|
export function reload() {
|
||||||
return request({
|
return request({
|
||||||
url: '/system/user/reload',
|
url: "/system/user/reload",
|
||||||
method: 'get'
|
method: "get",
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getUserByName(userName) {
|
export function getUserByName(userName) {
|
||||||
return request({
|
return request({
|
||||||
url: '/system/user/getUserByName/'+userName,
|
url: "/system/user/getUserByName/" + userName,
|
||||||
method: 'get'
|
method: "get",
|
||||||
})
|
});
|
||||||
}
|
}
|
|
@ -128,7 +128,7 @@
|
||||||
<el-button v-if="scope.row.subDeptType != '4' && scope.row.subDeptType != '5'" link disabled> - </el-button>
|
<el-button v-if="scope.row.subDeptType != '4' && scope.row.subDeptType != '5'" link disabled> - </el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="人员岗位" align="center" prop="craftPost" v-if="1==2">
|
<el-table-column label="人员岗位" align="center" prop="craftPost">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
{{ getWorkType(scope.row.workType) }}
|
{{ getWorkType(scope.row.workType) }}
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container sys-user-manage">
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<!--部门数据-->
|
<!--部门数据-->
|
||||||
<el-col :span="4" :xs="24">
|
<el-col :span="4" :xs="24">
|
||||||
|
@ -123,14 +123,15 @@
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<!-- 添加或修改用户配置对话框 -->
|
<!-- 添加或修改用户配置对话框 -->
|
||||||
<el-dialog :title="title" v-model="open" width="880px" append-to-body>
|
<el-dialog :title="title" v-model="open" width="880px" append-to-body modal-class="sys-user-manage-dlg">
|
||||||
<el-form :model="form" :rules="rules" ref="userRef" label-width="88px">
|
<el-form :model="form" :rules="rules" ref="userRef" label-width="88px">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="所属部门" prop="deptId">
|
<el-form-item label="所属部门" prop="deptId">
|
||||||
<el-tree-select ref="selTreeDept" v-if="data.mode == 'add'" v-model="form.deptId" :data="deptOptions"
|
<el-tree-select ref="selTreeDept" v-if="data.mode == 'add'" v-model="form.deptId"
|
||||||
:props="{ value: 'id', label: 'label', children: 'children' }" value-key="id"
|
:data="deptOptions" :props="{ value: 'id', label: 'label', children: 'children' }"
|
||||||
placeholder="请选择所属部门" check-strictly style="width:100%" @change="v=>handleChangeDept(v)" />
|
value-key="id" placeholder="请选择所属部门" check-strictly style="width:100%"
|
||||||
|
@change="v => handleChangeDept(v)" />
|
||||||
<el-tag type="primary" v-else>{{ form.dept?.deptName }}</el-tag>
|
<el-tag type="primary" v-else>{{ form.dept?.deptName }}</el-tag>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
|
@ -221,9 +222,25 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="24" v-if="form.userType == '99'">
|
<el-col :span="24" v-if="form.userType == '99'">
|
||||||
|
<el-form-item label="身份证信息" prop="cardImgPos">
|
||||||
|
<el-col :span="8">
|
||||||
|
<div class="div-header">头像面</div>
|
||||||
|
<image-upload v-model="form.cardImgPos" :limit="1" class="identification-card-1"
|
||||||
|
@change="doImageUpload(1)" />
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<div class="div-header">国徽面</div>
|
||||||
|
<image-upload v-model="form.cardImgInv" :limit="1" class="identification-card-2" />
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<div class="div-header">人脸识别头像</div>
|
||||||
|
<image-upload v-model="form.avatar" :limit="1" class="face-image" />
|
||||||
|
</el-col>
|
||||||
|
</el-form-item>
|
||||||
|
<!--
|
||||||
<el-form-item label="入场近照" prop="avatar">
|
<el-form-item label="入场近照" prop="avatar">
|
||||||
<image-upload v-model="form.avatar" :limit="1" />
|
<image-upload v-model="form.avatar" :limit="1" />
|
||||||
</el-form-item>
|
</el-form-item>-->
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
@ -371,6 +388,44 @@ function getDeptTree() {
|
||||||
getUserWorkType();
|
getUserWorkType();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//图片上传
|
||||||
|
function doImageUpload(type) {
|
||||||
|
setTimeout(() => {
|
||||||
|
let url = '';
|
||||||
|
if (type == 1) {
|
||||||
|
url = form.value.cardImgPos;
|
||||||
|
if (url) {
|
||||||
|
url = location.origin + url;
|
||||||
|
//url="http://62.234.3.186/statics/2025/01/19/4491f170cd1609142f9a6f097cbf681f_20250119000046A004.jpg"
|
||||||
|
proxy.$http.get(`/system/tools/id/front?url=${url}`).then(d => {
|
||||||
|
form.value.userName = d.data.name || form.value.userName || '';
|
||||||
|
form.value.certificateCode = d.data.cardId || form.value.certificateCode || '';
|
||||||
|
form.value.address = d.data.address || form.value.address || '';
|
||||||
|
form.value.nativePlace = d.data.native || form.value.native || '';
|
||||||
|
let nation = d.data.nation || "";
|
||||||
|
if (nation) {
|
||||||
|
let tmps = data.nationOpts.filter(it => it.indexOf(nation) >= 0);
|
||||||
|
if (tmps.length > 0) {
|
||||||
|
form.value.nation = tmps[0] || form.value.nation || '';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
let sex = d.data.sex || '';
|
||||||
|
if (sex) {
|
||||||
|
form.value.sex = sex ? (sex == '男' ? "0" : "1") : form.value.sex;
|
||||||
|
}
|
||||||
|
let birthDay = d.data.birthDay;
|
||||||
|
if (birthDay && birthDay.length == 8) {
|
||||||
|
birthDay = birthDay.substr(0, 4) + "-" + birthDay.substr(4, 2) + "-" + birthDay.substr(6);
|
||||||
|
form.value.birthDay = birthDay || form.value.birthDay;
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}, 800);
|
||||||
|
}
|
||||||
|
|
||||||
//用于用户增加的查询
|
//用于用户增加的查询
|
||||||
function doQueryUser() {
|
function doQueryUser() {
|
||||||
selectByPhone(form.value.phonenumber).then(d => {
|
selectByPhone(form.value.phonenumber).then(d => {
|
||||||
|
@ -598,6 +653,9 @@ function reset() {
|
||||||
nickName: undefined,
|
nickName: undefined,
|
||||||
password: undefined,
|
password: undefined,
|
||||||
phonenumber: undefined,
|
phonenumber: undefined,
|
||||||
|
cardImgPos: undefined,
|
||||||
|
cardImgInv: undefined,
|
||||||
|
avatar: undefined,
|
||||||
email: undefined,
|
email: undefined,
|
||||||
sex: undefined,
|
sex: undefined,
|
||||||
status: "0",
|
status: "0",
|
||||||
|
@ -652,6 +710,10 @@ function handleUpdate(row) {
|
||||||
phonenumber: [{ required: true, message: "手机号码不能为空", trigger: "blur" }, { pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/, message: "请输入正确的手机号码", trigger: "blur" }]
|
phonenumber: [{ required: true, message: "手机号码不能为空", trigger: "blur" }, { pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/, message: "请输入正确的手机号码", trigger: "blur" }]
|
||||||
}
|
}
|
||||||
form.value = response.data;
|
form.value = response.data;
|
||||||
|
let obj = proxy.$tryToJson(response.data.userInfos || "{}");
|
||||||
|
form.value.userInfos = obj;
|
||||||
|
form.value.cardImgPos = obj.cardImgPos || "";
|
||||||
|
form.value.cardImgInv = obj.cardImgInv || "";
|
||||||
postOptions.value = response.posts;
|
postOptions.value = response.posts;
|
||||||
form.value.postIds = response.postIds;
|
form.value.postIds = response.postIds;
|
||||||
form.value.roleIds = response.roleIds;
|
form.value.roleIds = response.roleIds;
|
||||||
|
@ -718,6 +780,11 @@ function submitForm() {
|
||||||
data.loading = true;
|
data.loading = true;
|
||||||
proxy.$refs["userRef"].validate(valid => {
|
proxy.$refs["userRef"].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
|
debugger
|
||||||
|
let obj = form.value.userInfos || {};
|
||||||
|
obj.cardImgPos = form.value.cardImgPos;
|
||||||
|
obj.cardImgInv = form.value.cardImgInv;
|
||||||
|
form.value.userInfos = JSON.stringify(obj);
|
||||||
if (form.value.userId != undefined) {
|
if (form.value.userId != undefined) {
|
||||||
updateUser(form.value).then(response => {
|
updateUser(form.value).then(response => {
|
||||||
proxy.$modal.msgSuccess("修改成功");
|
proxy.$modal.msgSuccess("修改成功");
|
||||||
|
@ -727,6 +794,7 @@ function submitForm() {
|
||||||
data.loading = false;
|
data.loading = false;
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
form.value.userInfos = JSON.stringify(obj);
|
||||||
addUser(form.value).then(response => {
|
addUser(form.value).then(response => {
|
||||||
proxy.$modal.msgSuccess("新增成功");
|
proxy.$modal.msgSuccess("新增成功");
|
||||||
open.value = false;
|
open.value = false;
|
||||||
|
@ -759,3 +827,62 @@ getDeptTree();
|
||||||
getList();
|
getList();
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
<style lang="scss">
|
||||||
|
.sys-user-manage-dlg {
|
||||||
|
.identification-card-1 {
|
||||||
|
.el-upload--picture-card {
|
||||||
|
width: 240px;
|
||||||
|
background-image: url("../../../assets/images/card1.svg");
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-position: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-upload__tip {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-upload-list--picture-card {
|
||||||
|
.el-upload-list__item {
|
||||||
|
width: 240px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.identification-card-2 {
|
||||||
|
.el-upload--picture-card {
|
||||||
|
width: 240px;
|
||||||
|
background-image: url("../../../assets/images/card2.svg");
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-position: center;
|
||||||
|
background-size: 60%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-upload__tip {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-upload-list--picture-card {
|
||||||
|
.el-upload-list__item {
|
||||||
|
width: 240px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.face-image {
|
||||||
|
&>div {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-upload--picture-card {
|
||||||
|
background-image: url("../../../assets/images/face.svg");
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-position: center;
|
||||||
|
background-size: 60%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-upload__tip {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
Loading…
Reference in New Issue