目录表、实体类、编辑页面增加数据密级字段

master
Guo XIn 1 year ago
parent 831fcc9694
commit a454814979
  1. 3
      dbsql/update/update202306.sql
  2. 2
      shandan-bianmu/src/main/java/com/keyware/shandan/bianmu/controller/BianmuIndexController.java
  3. 29
      shandan-common/src/main/resources/static/css/common/contianer.css
  4. 6
      shandan-system/src/main/java/com/keyware/shandan/bianmu/entity/DirectoryVo.java
  5. 22
      shandan-system/src/main/resources/static/js/business/directory/dirCommon.js

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

@ -7,6 +7,7 @@ import com.keyware.shandan.system.entity.SysUser;
import com.keyware.shandan.system.service.SysRoleService; import com.keyware.shandan.system.service.SysRoleService;
import com.keyware.shandan.system.service.SysUserService; import com.keyware.shandan.system.service.SysUserService;
import com.keyware.shandan.system.utils.MenuUtil; import com.keyware.shandan.system.utils.MenuUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
@ -25,6 +26,7 @@ import java.util.Set;
* @author Administrator * @author Administrator
* @since 2021/6/17 * @since 2021/6/17
*/ */
@Slf4j
@RestController @RestController
@RequestMapping("/") @RequestMapping("/")
public class BianmuIndexController { public class BianmuIndexController {

@ -108,6 +108,7 @@ cite button.tag-item {
margin-top: 0; margin-top: 0;
margin-left: 10px; margin-left: 10px;
} }
.layui-checkbox-disabled.layui-form-checked[lay-skin=primary] i { .layui-checkbox-disabled.layui-form-checked[lay-skin=primary] i {
border-color: #c2c2c2 !important; border-color: #c2c2c2 !important;
background-color: #c2c2c2; background-color: #c2c2c2;
@ -119,25 +120,31 @@ cite button.tag-item {
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
} }
.permis-item { .permis-item {
margin-top: 10px; margin-top: 10px;
padding-left: 15px; padding-left: 15px;
} }
.permis-item .line { .permis-item .line {
flex: 0.9; flex: 0.9;
height: 0; height: 0;
border-bottom: 1px dashed #CCC; border-bottom: 1px dashed #CCC;
} }
.permis-item label { .permis-item label {
align-self: center align-self: center
} }
.permis-ops .layui-form-checkbox[lay-skin=primary] { .permis-ops .layui-form-checkbox[lay-skin=primary] {
margin-top: 0; margin-top: 0;
padding-left: 25px; padding-left: 25px;
} }
.permis-item .layui-form-checkbox { .permis-item .layui-form-checkbox {
margin-top: 0; margin-top: 0;
} }
.label-set-component { .label-set-component {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
@ -146,6 +153,7 @@ cite button.tag-item {
flex-wrap: wrap; flex-wrap: wrap;
border-bottom: 1px inset #efefef; border-bottom: 1px inset #efefef;
} }
.label-type { .label-type {
padding: 5px; padding: 5px;
border: 1px solid gray; border: 1px solid gray;
@ -155,24 +163,32 @@ cite button.tag-item {
min-width: fit-content; min-width: fit-content;
margin: 5px 0; margin: 5px 0;
} }
.label-type:hover{color: #0C0C0C}
.label-type:hover {
color: #0C0C0C
}
.data-container { .data-container {
} }
.arrow { .arrow {
margin: 5px; margin: 5px;
color: #a3a3a3 color: #a3a3a3
} }
.new-data, .choose-data, .new-data:hover, .choose-data:hover { .new-data, .choose-data, .new-data:hover, .choose-data:hover {
cursor: pointer; cursor: pointer;
border-color: #009688; border-color: #009688;
color: #009688; color: #009688;
} }
.choose-data, .clear-data { .choose-data, .clear-data {
cursor: pointer; cursor: pointer;
border: 0; border: 0;
margin-left: 5px margin-left: 5px
} }
.clear-data, .clear-data:hover { .clear-data, .clear-data:hover {
color: #cfcfcf; color: #cfcfcf;
} }
@ -181,9 +197,11 @@ cite button.tag-item {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
} }
.label-tree { .label-tree {
flex: 1 flex: 1
} }
.label-btns { .label-btns {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
@ -191,6 +209,7 @@ cite button.tag-item {
padding: 10px 20px; padding: 10px 20px;
border-top: 1px solid #f0f0f0; border-top: 1px solid #f0f0f0;
} }
.add-other { .add-other {
margin: 0; margin: 0;
padding: 0; padding: 0;
@ -198,3 +217,11 @@ cite button.tag-item {
left: 10px; left: 10px;
top: 10px; top: 10px;
} }
.layui-form-radio {
margin: 0 10px 0 0;
}
.layui-form-radio > i {
margin-right: 5px;
}

@ -60,6 +60,12 @@ public class DirectoryVo extends BaseEntity {
@TableField("DIRECTORY_TYPE") @TableField("DIRECTORY_TYPE")
private DirectoryType directoryType; private DirectoryType directoryType;
/**
* 数据密级
*/
@TableField("SECRET_LEVEL")
private Integer secretLevel;
/** /**
* 资源ID * 资源ID
* 当目录类型为DIRECTORY时该字段值为null * 当目录类型为DIRECTORY时该字段值为null

@ -1,5 +1,5 @@
let layer, orgTree, gtable, globalTree, tag, listPage, form, element; let layer, orgTree, gtable, globalTree, tag, listPage, form, element;
layui.use(['layer', 'orgTree', 'gtable', 'globalTree', 'tag', 'listPage', 'form', 'element'], function () { layui.use(['layer', 'orgTree', 'gtable', 'globalTree', 'tag', 'listPage', 'form', 'element', 'dict'], function () {
layer = layui.layer; layer = layui.layer;
orgTree = layui.orgTree; orgTree = layui.orgTree;
gtable = layui.gtable; gtable = layui.gtable;
@ -36,9 +36,14 @@ function openDirectoryEditLayer(data, callback, view) {
<input type="hidden" name="directoryType" value="DIRECTORY" /> <input type="hidden" name="directoryType" value="DIRECTORY" />
<input type="hidden" name="basicDir" value="${data.basicDir || bus_type}" /> <input type="hidden" name="basicDir" value="${data.basicDir || bus_type}" />
<input type="hidden" name="createTime" value="${data.createTime || ''}" /> <input type="hidden" name="createTime" value="${data.createTime || ''}" />
<label style="color: #555;">目录名称</label> <label style="color: #555;"><label style="color: red">*</label></label>
<input class="layui-input" type="text" name="directoryName" autocomplete="off" value="${data.directoryName || ''}" ${readOnly} placeholder="请输入目录名称" lay-verify="required" style="margin-top: 5px; width: 380px;"> <input class="layui-input" type="text" name="directoryName" autocomplete="off" value="${data.directoryName || ''}" ${readOnly} placeholder="请输入目录名称" lay-verify="required" style="margin-top: 5px; width: 380px;">
</div> </div>
<div class="layui-inline" style="width: calc(100% - 30px); margin:15px 15px 0 15px;display: flex;align-items: center;">
<label style="color: #555;"><label style="color: red">*</label></label>
<div dict-component="radio" dict-type="secret_level" dict-name="secretLevel"
id="dict-secret-level"></div>
</div>
<div class="layui-inline" style="width: calc(100% - 30px); margin:15px 15px 0 15px"> <div class="layui-inline" style="width: calc(100% - 30px); margin:15px 15px 0 15px">
<label style="color: #555">目录归属${data.ownerType === 'org' ? '单位' : '用户'}</label><span style="color: #000" id="ownerNameSpan">${data.owner || user.userName}</span> <label style="color: #555">目录归属${data.ownerType === 'org' ? '单位' : '用户'}</label><span style="color: #000" id="ownerNameSpan">${data.owner || user.userName}</span>
<button class="layui-btn layui-btn-primary layui-btn-xs ${disablePermisBtn ? 'layui-disabled' : ''}" id="ownerChooseBtn" ${disablePermisBtn} style="border:0; color: #009688">变更</button> <button class="layui-btn layui-btn-primary layui-btn-xs ${disablePermisBtn ? 'layui-disabled' : ''}" id="ownerChooseBtn" ${disablePermisBtn} style="border:0; color: #009688">变更</button>
@ -113,9 +118,9 @@ function openDirectoryEditLayer(data, callback, view) {
<a lay-submit lay-filter="directoryEditForm" id="directoryEditFormSubmit" style=""></a> <a lay-submit lay-filter="directoryEditForm" id="directoryEditFormSubmit" style=""></a>
</div> </div>
<div class="layui-inline" style="width: calc(100% - 30px); margin:15px 15px 0 15px"> <div class="layui-inline" style="width: calc(100% - 30px); margin:15px 15px 0 15px">
<label style="color: #555">目录创建人</label><span style="color: #000" >${data.createUserName}</span> <label style="color: #555">目录创建人</label><span style="color: #000" >${data.createUserName || user.userName}</span>
<input type="hidden" name="createUserName" value="${data.createUserName}" /> <input type="hidden" name="createUserName" value="${data.createUserName || user.userName}" />
<input type="hidden" name="createUser" value="${data.createUser}" /> <input type="hidden" name="createUser" value="${data.createUser || user.userId}" />
</div> </div>
</div> </div>
</div>`, </div>`,
@ -131,6 +136,13 @@ function openDirectoryEditLayer(data, callback, view) {
style: 'border: 1px solid #d3d3d3;', style: 'border: 1px solid #d3d3d3;',
click: dirOwnerChangeCallback click: dirOwnerChangeCallback
}); });
layui.dict.render();
if(!data || !data.secretLevel){
data['secretLevel'] = 0;
}
layui.dict.setData('dict-secret-level', data)
$('div.dict-component').css({'margin-top': '5px', 'width': '380px', 'margin-left': '4px'})
// 目录成员管理事件 // 目录成员管理事件
$('#memberManageBtn').on('click', () => { $('#memberManageBtn').on('click', () => {
let formVal = form.val('directoryEditForm'); let formVal = form.val('directoryEditForm');