用户增加涉密等级字段

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;
}
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 elements = $(`[lay-filter="${this.formFilter}"] input[type="checkbox"][name="${this.name}"]`);
if (!Array.isArray(data)) {

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

@ -1,7 +1,9 @@
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;
form = layui.form;
console.info(user);
layui.dict.setData('dict-secret-level', user);
//日期选择器
layDate.render({

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