Commit b5530c87 by zhaochengxiang

资产浏览

parent eac3e8fc
...@@ -39,7 +39,6 @@ ...@@ -39,7 +39,6 @@
"react-virtualized": "^9.22.3", "react-virtualized": "^9.22.3",
"redux": "^4.0.1", "redux": "^4.0.1",
"redux-saga": "^1.0.5", "redux-saga": "^1.0.5",
"rxjs": "^7.5.4",
"showdown": "^1.9.1", "showdown": "^1.9.1",
"smooth-scroll": "^16.1.3", "smooth-scroll": "^16.1.3",
"typescript": "^4.6.2", "typescript": "^4.6.2",
......
...@@ -93,6 +93,7 @@ const RelationContainer = (props) => { ...@@ -93,6 +93,7 @@ const RelationContainer = (props) => {
const index = (data||[]).findIndex(node => node.id === nodeParams?.centerId); const index = (data||[]).findIndex(node => node.id === nodeParams?.centerId);
if (index !== -1) { if (index !== -1) {
let rootNode = data[index]; let rootNode = data[index];
let totalLevel = 1;
rootNode = {...rootNode, center: true}; rootNode = {...rootNode, center: true};
...@@ -106,6 +107,9 @@ const RelationContainer = (props) => { ...@@ -106,6 +107,9 @@ const RelationContainer = (props) => {
if (node.pid === parentId) { if (node.pid === parentId) {
let newNode = { ...node, children: [] }; let newNode = { ...node, children: [] };
if (totalLevel < node.levelId.split('-').length) {
totalLevel = node.levelId.split('-').length;
}
(subData||[]).push(newNode); (subData||[]).push(newNode);
recursion(newNode.children, newNode.id); recursion(newNode.children, newNode.id);
...@@ -115,6 +119,8 @@ const RelationContainer = (props) => { ...@@ -115,6 +119,8 @@ const RelationContainer = (props) => {
recursion(newRelationData.children, rootNode.id); recursion(newRelationData.children, rootNode.id);
newRelationData = {...newRelationData, totalLevel};
// const _index = (dirs||[]).findIndex(dir => dir.nodeId === rootNode.id); // const _index = (dirs||[]).findIndex(dir => dir.nodeId === rootNode.id);
// if (_index !== -1) { // if (_index !== -1) {
// if (reference === AssetBrowseReference) { // if (reference === AssetBrowseReference) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment