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

master
Guo XIn 1 year ago
parent 831fcc9694
commit a454814979
  1. 5
      dbsql/update/update202306.sql
  2. 2
      shandan-bianmu/src/main/java/com/keyware/shandan/bianmu/controller/BianmuIndexController.java
  3. 65
      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 '涉密级别';
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,8 +108,9 @@ cite button.tag-item {
margin-top: 0;
margin-left: 10px;
}
.layui-checkbox-disabled.layui-form-checked[lay-skin=primary] i{
border-color: #c2c2c2!important;
.layui-checkbox-disabled.layui-form-checked[lay-skin=primary] i {
border-color: #c2c2c2 !important;
background-color: #c2c2c2;
}
@ -119,26 +120,32 @@ cite button.tag-item {
justify-content: space-between;
align-items: center;
}
.permis-item {
margin-top: 10px;
padding-left: 15px;
}
.permis-item .line{
.permis-item .line {
flex: 0.9;
height: 0;
border-bottom: 1px dashed #CCC;
}
.permis-item label{
.permis-item label {
align-self: center
}
.permis-ops .layui-form-checkbox[lay-skin=primary]{
.permis-ops .layui-form-checkbox[lay-skin=primary] {
margin-top: 0;
padding-left: 25px;
}
.permis-item .layui-form-checkbox{
.permis-item .layui-form-checkbox {
margin-top: 0;
}
.label-set-component{
.label-set-component {
display: flex;
flex-direction: row;
align-items: center;
@ -146,7 +153,8 @@ cite button.tag-item {
flex-wrap: wrap;
border-bottom: 1px inset #efefef;
}
.label-type{
.label-type {
padding: 5px;
border: 1px solid gray;
border-radius: 5px;
@ -155,46 +163,65 @@ cite button.tag-item {
min-width: fit-content;
margin: 5px 0;
}
.label-type:hover{color: #0C0C0C}
.data-container{
.label-type:hover {
color: #0C0C0C
}
.data-container {
}
.arrow{
.arrow {
margin: 5px;
color: #a3a3a3
}
.new-data, .choose-data, .new-data:hover, .choose-data:hover{
.new-data, .choose-data, .new-data:hover, .choose-data:hover {
cursor: pointer;
border-color: #009688;
color: #009688;
}
.choose-data, .clear-data{
.choose-data, .clear-data {
cursor: pointer;
border:0;
border: 0;
margin-left: 5px
}
.clear-data, .clear-data:hover{
.clear-data, .clear-data:hover {
color: #cfcfcf;
}
.label-layer{
.label-layer {
display: flex;
flex-direction: column;
}
.label-tree{
.label-tree {
flex: 1
}
.label-btns{
.label-btns {
display: flex;
flex-direction: row;
justify-content: flex-end;
padding: 10px 20px;
border-top: 1px solid #f0f0f0;
}
.add-other{
.add-other {
margin: 0;
padding: 0;
position: absolute;
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');