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

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

@ -108,6 +108,7 @@ cite button.tag-item {
margin-top: 0;
margin-left: 10px;
}
.layui-checkbox-disabled.layui-form-checked[lay-skin=primary] i {
border-color: #c2c2c2 !important;
background-color: #c2c2c2;
@ -119,25 +120,31 @@ cite button.tag-item {
justify-content: space-between;
align-items: center;
}
.permis-item {
margin-top: 10px;
padding-left: 15px;
}
.permis-item .line {
flex: 0.9;
height: 0;
border-bottom: 1px dashed #CCC;
}
.permis-item label {
align-self: center
}
.permis-ops .layui-form-checkbox[lay-skin=primary] {
margin-top: 0;
padding-left: 25px;
}
.permis-item .layui-form-checkbox {
margin-top: 0;
}
.label-set-component {
display: flex;
flex-direction: row;
@ -146,6 +153,7 @@ cite button.tag-item {
flex-wrap: wrap;
border-bottom: 1px inset #efefef;
}
.label-type {
padding: 5px;
border: 1px solid gray;
@ -155,24 +163,32 @@ cite button.tag-item {
min-width: fit-content;
margin: 5px 0;
}
.label-type:hover{color: #0C0C0C}
.label-type:hover {
color: #0C0C0C
}
.data-container {
}
.arrow {
margin: 5px;
color: #a3a3a3
}
.new-data, .choose-data, .new-data:hover, .choose-data:hover {
cursor: pointer;
border-color: #009688;
color: #009688;
}
.choose-data, .clear-data {
cursor: pointer;
border: 0;
margin-left: 5px
}
.clear-data, .clear-data:hover {
color: #cfcfcf;
}
@ -181,9 +197,11 @@ cite button.tag-item {
display: flex;
flex-direction: column;
}
.label-tree {
flex: 1
}
.label-btns {
display: flex;
flex-direction: row;
@ -191,6 +209,7 @@ cite button.tag-item {
padding: 10px 20px;
border-top: 1px solid #f0f0f0;
}
.add-other {
margin: 0;
padding: 0;
@ -198,3 +217,11 @@ cite button.tag-item {
left: 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")
private DirectoryType directoryType;
/**
* 数据密级
*/
@TableField("SECRET_LEVEL")
private Integer secretLevel;
/**
* 资源ID
* 当目录类型为DIRECTORY时该字段值为null

@ -1,5 +1,5 @@
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;
orgTree = layui.orgTree;
gtable = layui.gtable;
@ -36,9 +36,14 @@ function openDirectoryEditLayer(data, callback, view) {
<input type="hidden" name="directoryType" value="DIRECTORY" />
<input type="hidden" name="basicDir" value="${data.basicDir || bus_type}" />
<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;">
</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">
<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>
@ -113,9 +118,9 @@ function openDirectoryEditLayer(data, callback, view) {
<a lay-submit lay-filter="directoryEditForm" id="directoryEditFormSubmit" style=""></a>
</div>
<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>
<input type="hidden" name="createUserName" value="${data.createUserName}" />
<input type="hidden" name="createUser" value="${data.createUser}" />
<label style="color: #555">目录创建人</label><span style="color: #000" >${data.createUserName || user.userName}</span>
<input type="hidden" name="createUserName" value="${data.createUserName || user.userName}" />
<input type="hidden" name="createUser" value="${data.createUser || user.userId}" />
</div>
</div>
</div>`,
@ -131,6 +136,13 @@ function openDirectoryEditLayer(data, callback, view) {
style: 'border: 1px solid #d3d3d3;',
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', () => {
let formVal = form.val('directoryEditForm');