基础数据目录调试

master
guoxin 1 year ago
parent 54cea26eb0
commit 0079a889a2
  1. 1
      shandan-bianmu/src/main/resources/static/js/business/directory/directory.js
  2. 2
      shandan-bianmu/src/main/resources/view/business/directory/directory.html
  3. 1
      shandan-common/src/main/resources/static/js/common/common.js
  4. 25
      shandan-system/src/main/java/com/keyware/shandan/bianmu/service/DirectoryTreeService.java
  5. 2
      shandan-system/src/main/resources/static/js/business/directory/directory-basicdata.js

@ -704,6 +704,7 @@ function startRender() {
success: function (layerObj, index) {
directorySelectTree = globalTree.init({
id: 'moveFileTree',
//url: `${treeChildrenUrl}&all=${operateType !== 'move'}`.replace('busType=0', 'busType=2'),
url: `${treeChildrenUrl}&all=${operateType !== 'move'}`,
cache: true,
scroll: '#moveFileTreeBox',

@ -12,7 +12,7 @@
const user = JSON.parse(user_str);
const ReadPermisDirIds = /*[[${readDirIds}]]*/ [];
const WritePermisDirIds = /*[[${writeDirIds}]]*/ [];
// 目录业务类型,0:资源目录;1:基础数据目录
// 目录业务类型,0:资源目录;1:基础数据目录,2:资源目录+基础目录
const bus_type = 0;
</script>
</head>

@ -42,6 +42,7 @@ const viewType = {
const DIR_ROOT_ID = "ROOT";
// 主题目录根节点ID
const DIR_THEME_ROOT_ID = "ROOT_THEME";
const DIR_BASIC_ROOT_ID = "ROOT_BASIC_DATA";
/**
* 审核数据实体类型

@ -129,15 +129,24 @@ public class DirectoryTreeService {
private List<DirectoryVo> getDirectoryList(DirectoryVo parentDir, boolean allChild, boolean hasResource, int busType) {
QueryWrapper<DirectoryVo> wrapper = new QueryWrapper<>();
if (parentDir == null) {
wrapper.eq("ID", "ROOT");
switch (busType) {
case 2:
wrapper.in("ID", "ROOT", "ROOT_BASIC_DATA");
break;
case 1:
wrapper.eq("ID", "ROOT_BASIC_DATA");
break;
case 0:
default:
wrapper.eq("ID", "ROOT");
}
} else {
wrapper.in(!hasResource, "DIRECTORY_TYPE", DirectoryType.DIRECTORY, DirectoryType.LINK_DIR).eq("IS_BASIC_DIR", busType);
if (parentDir != null) {
if (allChild) {
wrapper.likeRight("DIRECTORY_PATH", parentDir.getDirectoryPath() + "/");
} else {
wrapper.eq("PARENT_ID", parentDir.getId());
}
wrapper.in(!hasResource, "DIRECTORY_TYPE", DirectoryType.DIRECTORY, DirectoryType.LINK_DIR).eq("IS_BASIC_DIR", (busType == 1 || busType == 2));
if (allChild) {
wrapper.likeRight("DIRECTORY_PATH", parentDir.getDirectoryPath() + "/");
} else {
wrapper.eq("PARENT_ID", parentDir.getId());
}
}

@ -153,7 +153,7 @@ function startRender() {
loadToolbarBefore: function (buttons, param, $div) {
const {basicData} = param;
// 根据数据审核状态判断是否显示相关功能按钮
if (basicData && basicData.id !== DIR_ROOT_ID && basicData.id !== DIR_THEME_ROOT_ID) {
if (basicData && basicData.id !== DIR_ROOT_ID && basicData.id !== DIR_THEME_ROOT_ID && basicData.id !== DIR_BASIC_ROOT_ID) {
switch (basicData.reviewStatus) {
case ReviewStatus.SUBMITTED:
case ReviewStatus.PASS: