用户增加涉密等级字段

master
Guo XIn 1 year ago
parent 499825bce5
commit ee29d66257
  1. 3
      dbsql/update/update202306.sql
  2. 4
      shandan-common/src/main/resources/static/js/common/layui/extend/dict.js
  3. 6
      shandan-system/src/main/java/com/keyware/shandan/system/entity/SysUser.java
  4. 4
      shandan-system/src/main/resources/static/js/sys/user/edit.js
  5. 13
      shandan-system/src/main/resources/view/sys/user/userEdit.html

@ -0,0 +1,3 @@
-- 用户表增加涉密级别字段
alter table BIANMU.SYS_USER add SECRET_LEVEL integer default 0 not null;
comment on column BIANMU.SYS_USER.SECRET_LEVEL is '涉密级别';

@ -127,10 +127,10 @@ layui.define(['form'], function (exports) {
return; return;
} }
if (typeof data == 'object') { if (typeof data == 'object') {
data = data[this.name] || ''; data = data[this.name] || (data[this.name] === 0 ? 0 : '');
} }
if (this.type == 'checkbox') { if (this.type === 'checkbox') {
let values = data; let values = data;
let elements = $(`[lay-filter="${this.formFilter}"] input[type="checkbox"][name="${this.name}"]`); let elements = $(`[lay-filter="${this.formFilter}"] input[type="checkbox"][name="${this.name}"]`);
if (!Array.isArray(data)) { if (!Array.isArray(data)) {

@ -53,6 +53,12 @@ public class SysUser extends BaseEntity implements Serializable {
@TableField(value = "VALID") @TableField(value = "VALID")
private Boolean valid; private Boolean valid;
/**
* 数据密级
*/
@TableField("SECRET_LEVEL")
private Integer secretLevel;
/** /**
* 限制允许登录的IP集合 * 限制允许登录的IP集合
*/ */

@ -1,7 +1,9 @@
let form; let form;
layui.use(['element', 'form', 'table', 'layer', 'laydate', 'tree', 'util', 'dtree'], function () { layui.use(['element', 'form', 'table', 'layer', 'laydate', 'tree', 'dict', 'dtree'], function () {
let layDate = layui.laydate; let layDate = layui.laydate;
form = layui.form; form = layui.form;
console.info(user);
layui.dict.setData('dict-secret-level', user);
//日期选择器 //日期选择器
layDate.render({ layDate.render({

@ -12,7 +12,13 @@
.layui-form-label { .layui-form-label {
width: 150px !important; width: 150px !important;
} }
.dict-component{
width: 100% !important;
}
</style> </style>
<script th:inline="javascript">
const user = /*[[${user}]]*/ {}
</script>
</head> </head>
<body> <body>
<div class="layui-row"> <div class="layui-row">
@ -54,6 +60,13 @@
<input type="radio" name="orgLeader" th:checked="${user.orgLeader != true}" value="false" title="否"> <input type="radio" name="orgLeader" th:checked="${user.orgLeader != true}" value="false" title="否">
</div> </div>
</div> </div>
<div class="layui-form-item">
<label class="layui-form-label">涉密等级</label>
<div class="layui-input-block">
<div dict-component="select" dict-type="secret_level" dict-name="secretLevel"
id="dict-secret-level"></div>
</div>
</div>
<!-- <div class="layui-form-item"> <!-- <div class="layui-form-item">
<label class="layui-form-label">是否允许多人在线</label> <label class="layui-form-label">是否允许多人在线</label>
<div class="layui-input-block"> <div class="layui-input-block">