涉密人员登记,添加和编辑修改

master
dsh 12 months ago
parent e1c5c7da69
commit 7b746c5787

@ -3,6 +3,7 @@
<head>
<th:block th:include="include :: header('新增用户')" />
<th:block th:include="include :: select2-css" />
<th:block th:include="include :: datetimepicker-css" />
</head>
<body>
<div class="main-content">
@ -101,22 +102,20 @@
</div>
</div>
<div class="row">
<div class="col-sm-12">
<div class="col-sm-6">
<div class="form-group">
<label class="col-xs-2 control-label">岗位:</label>
<div class="col-xs-4">
<label class="col-sm-4 control-label">岗位:</label>
<div class="col-sm-8">
<select id="post" class="form-control select2-multiple" multiple>
<option th:each="post:${posts}" th:value="${post.postId}" th:text="${post.postName}" th:disabled="${post.status == '1'}"></option>
</select>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-12">
<div class="col-sm-6">
<div class="form-group">
<label class="col-xs-2 control-label">角色:</label>
<div class="col-xs-10">
<label class="col-sm-4 control-label">角色:</label>
<div class="col-sm-8">
<label th:each="role:${roles}" class="check-box">
<input name="role" type="checkbox" th:value="${role.roleId}" th:text="${role.roleName}" th:disabled="${role.status == '1'}">
</label>
@ -124,22 +123,30 @@
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-3 control-label">用户地区:</label>
<label class="col-sm-4 control-label">用户地区:</label>
<div class="col-sm-8">
<input name="userarea" class="form-control" type="text">
</div>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-3 control-label">民族:</label>
<label class="col-sm-4 control-label">民族:</label>
<div class="col-sm-8">
<select name="nation" class="form-control m-b" th:with="type=${@dict.getType('sys_user_nation')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-3 control-label">出生年月:</label>
<label class="col-sm-4 control-label">出生年月:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="birthday" class="form-control" placeholder="yyyy-MM-dd" type="text">
@ -147,46 +154,66 @@
</div>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-3 control-label">政治面貌:</label>
<label class="col-sm-4 control-label">政治面貌:</label>
<div class="col-sm-8">
<select name="politics" class="form-control m-b" th:with="type=${@dict.getType('sys_user_politics')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-3 control-label">涉密程度:</label>
<label class="col-sm-4 control-label">涉密程度:</label>
<div class="col-sm-8">
<select name="shemichengdu" class="form-control m-b" th:with="type=${@dict.getType('sys_user_shemi')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-3 control-label">学历:</label>
<label class="col-sm-4 control-label">学历:</label>
<div class="col-sm-8">
<input name="graduate" class="form-control" type="text">
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-3 control-label">生效时间:</label>
<label class="col-sm-4 control-label">生效时间:</label>
<div class="col-sm-8">
<input name="startdata" class="form-control" type="text">
<input name="startdate" class="form-control" type="text">
</div>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-3 control-label">失效时间:</label>
<label class="col-sm-4 control-label">失效时间:</label>
<div class="col-sm-8">
<input name="enddata" class="form-control" value="2050-12-31" type="text">
<input name="enddate" class="form-control" value="2050-12-31" type="text">
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-3 control-label">健康状况:</label>
<label class="col-sm-4 control-label">健康状况:</label>
<div class="col-sm-8">
<input name="helthy" class="form-control" type="text">
</div>
</div>
</div>
</div>
<h4 class="form-header h4">其他信息</h4>
<div class="row">
<div class="col-sm-12">
@ -209,6 +236,7 @@
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: select2-js" />
<th:block th:include="include :: datetimepicker-js" />
<script>
var prefix = ctx + "system/user";
@ -278,6 +306,7 @@
minView: "month",
autoclose: true
});
$("input[name='startdate']").val(new Date().toLocaleDateString().replace(/\//g, '-'));
function submitHandler() {
var chrtype = [[${#strings.defaultString(@config.getKey('sys.account.chrtype'), 0)}]];

@ -3,6 +3,7 @@
<head>
<th:block th:include="include :: header('修改用户')" />
<th:block th:include="include :: select2-css" />
<th:block th:include="include :: datetimepicker-css" />
</head>
<body>
<div class="main-content">
@ -99,19 +100,88 @@
</div>
</div>
<div class="row">
<div class="col-sm-12">
<div class="col-sm-6">
<div class="form-group">
<label class="col-xs-2 control-label">角色:</label>
<div class="col-xs-10">
<label class="col-sm-4 control-label">角色:</label>
<div class="col-sm-8">
<label th:each="role:${roles}" class="check-box">
<input name="role" type="checkbox" th:value="${role.roleId}" th:text="${role.roleName}" th:checked="${role.flag}" th:disabled="${role.status == '1'}">
</label>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-4 control-label">健康状况:</label>
<div class="col-sm-8">
<input name="helthy" class="form-control" th:field="*{helthy}" type="text">
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-4 control-label">用户地区:</label>
<div class="col-sm-8">
<input name="userarea" class="form-control" th:field="*{userarea}" type="text">
</div>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-4 control-label">民族:</label>
<div class="col-sm-8">
<select name="nation" class="form-control m-b" th:with="type=${@dict.getType('sys_user_nation')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-4 control-label">出生年月:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="birthday" th:value="${#dates.format(user.birthday, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-4 control-label">政治面貌:</label>
<div class="col-sm-8">
<select name="politics" class="form-control m-b" th:with="type=${@dict.getType('sys_user_politics')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-4 control-label">涉密程度:</label>
<div class="col-sm-8">
<select name="shemichengdu" class="form-control m-b" th:with="type=${@dict.getType('sys_user_shemi')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-4 control-label">学历:</label>
<div class="col-sm-8">
<input name="graduate" th:field="*{graduate}" class="form-control" type="text">
</div>
</div>
</div>
</div>
<h4 class="form-header h4">其他信息</h4>
<div class="row">
<div class="col-sm-12">
@ -133,6 +203,7 @@
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: select2-js" />
<th:block th:include="include :: datetimepicker-js" />
<script type="text/javascript">
var prefix = ctx + "system/user";

@ -32,8 +32,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="politics" column="politics" />
<result property="shemichengdu" column="shemichengdu" />
<result property="graduate" column="graduate" />
<result property="startdata" column="startdata" />
<result property="enddata" column="enddata" />
<result property="startdate" column="startdate" />
<result property="enddate" column="enddate" />
<result property="helthy" column="helthy" />
<association property="dept" column="dept_id" javaType="SysDept" resultMap="deptResult" />
<collection property="roles" javaType="java.util.List" resultMap="RoleResult" />
@ -59,7 +59,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectUserVo">
select u.user_id, u.dept_id, u.login_name, u.user_name, u.user_type, u.email, u.avatar, u.phonenumber, u.sex, u.password, u.salt, u.status, u.del_flag, u.login_ip, u.login_date, u.pwd_update_date, u.create_time, u.remark,userarea, nation, birthday, politics, shemichengdu, graduate, startdata, enddata, helthy,
select u.user_id, u.dept_id, u.login_name, u.user_name, u.user_type, u.email, u.avatar, u.phonenumber, u.sex, u.password, u.salt, u.status, u.del_flag, u.login_ip, u.login_date, u.pwd_update_date, u.create_time, u.remark,userarea, nation, birthday, politics, shemichengdu, graduate, startdate, enddate, helthy,
d.dept_id, d.parent_id, d.ancestors, d.dept_name, 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
from sys_user u
@ -69,7 +69,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</sql>
<select id="selectUserList" parameterType="SysUser" resultMap="SysUserResult">
select u.user_id, u.dept_id, u.login_name, u.user_name, u.user_type, u.email, u.avatar, u.phonenumber, u.password, u.sex, u.salt, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, userarea, nation, birthday, politics, shemichengdu, graduate, startdata, enddata, helthy,d.dept_name, d.leader from sys_user u
select u.user_id, u.dept_id, u.login_name, u.user_name, u.user_type, u.email, u.avatar, u.phonenumber, u.password, u.sex, u.salt, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, userarea, nation, birthday, politics, shemichengdu, graduate, startdate, enddate, helthy,d.dept_name, d.leader from sys_user u
left join sys_dept d on u.dept_id = d.dept_id
where u.del_flag = '0'
<if test="userId != null and userId != 0">
@ -98,7 +98,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select id="selectAllocatedList" parameterType="SysUser" resultMap="SysUserResult">
select distinct u.user_id, u.dept_id, u.login_name, u.user_name, u.user_type, u.email, u.avatar, u.phonenumber, u.status, u.create_time,userarea, nation, birthday, politics, shemichengdu, graduate, startdata, enddata, helthy
select distinct u.user_id, u.dept_id, u.login_name, u.user_name, u.user_type, u.email, u.avatar, u.phonenumber, u.status, u.create_time,userarea, nation, birthday, politics, shemichengdu, graduate, startdate, enddate, helthy
from sys_user u
left join sys_dept d on u.dept_id = d.dept_id
left join sys_user_role ur on u.user_id = ur.user_id
@ -115,7 +115,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select id="selectUnallocatedList" parameterType="SysUser" resultMap="SysUserResult">
select distinct u.user_id, u.dept_id, u.login_name, u.user_name, u.user_type, u.email, u.avatar, u.phonenumber, u.status, u.create_time,userarea, nation, birthday, politics, shemichengdu, graduate, startdata, enddata, helthy
select distinct u.user_id, u.dept_id, u.login_name, u.user_name, u.user_type, u.email, u.avatar, u.phonenumber, u.status, u.create_time,userarea, nation, birthday, politics, shemichengdu, graduate, startdate, enddate, helthy
from sys_user u
left join sys_dept d on u.dept_id = d.dept_id
left join sys_user_role ur on u.user_id = ur.user_id
@ -253,8 +253,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="politics != null">#{politics},</if>
<if test="shemichengdu != null">#{shemichengdu},</if>
<if test="graduate != null">#{graduate},</if>
<if test="startdata != null">#{startdata},</if>
<if test="enddata != null">#{enddata},</if>
<if test="startdate != null">#{startdate},</if>
<if test="enddate != null">#{enddate},</if>
<if test="helthy != null">#{helthy},</if>
sysdate()
)

Loading…
Cancel
Save