Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
szse
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhaochengxiang
szse
Commits
bde8c08a
Commit
bde8c08a
authored
May 27, 2021
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
解决资产id重复的问题
parent
87a376ba
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
8 deletions
+5
-8
Org.jsx
src/view/Manage/Map/Component/Org.jsx
+0
-1
Relation.jsx
src/view/Manage/Map/Component/Relation.jsx
+0
-1
Tree.jsx
src/view/Manage/Map/Component/Tree.jsx
+0
-1
MapContent.jsx
src/view/Manage/Map/MapContent.jsx
+5
-5
No files found.
src/view/Manage/Map/Component/Org.jsx
View file @
bde8c08a
...
@@ -262,7 +262,6 @@ class Org extends React.Component {
...
@@ -262,7 +262,6 @@ class Org extends React.Component {
}
}
}
else
if
(
model
.
dbType
!==
'Root'
)
{
}
else
if
(
model
.
dbType
!==
'Root'
)
{
//通过资产id跳转到资产详情页
//通过资产id跳转到资产详情页
// model.tableModelId
// history && history.push(`${ContextPath}/home`);
// history && history.push(`${ContextPath}/home`);
}
}
...
...
src/view/Manage/Map/Component/Relation.jsx
View file @
bde8c08a
...
@@ -261,7 +261,6 @@ class Relation extends React.Component {
...
@@ -261,7 +261,6 @@ class Relation extends React.Component {
}
}
}
else
if
(
model
.
dbType
!==
'Root'
)
{
}
else
if
(
model
.
dbType
!==
'Root'
)
{
//通过资产id跳转到资产详情页
//通过资产id跳转到资产详情页
// model.tableModelId
// history && history.push(`${ContextPath}/home`);
// history && history.push(`${ContextPath}/home`);
}
}
...
...
src/view/Manage/Map/Component/Tree.jsx
View file @
bde8c08a
...
@@ -223,7 +223,6 @@ class Tree extends React.Component {
...
@@ -223,7 +223,6 @@ class Tree extends React.Component {
}
}
}
else
if
(
model
.
dbType
!==
'Root'
)
{
}
else
if
(
model
.
dbType
!==
'Root'
)
{
//通过资产id跳转到资产详情页
//通过资产id跳转到资产详情页
// model.tableModelId
// history && history.push(`${ContextPath}/home`);
// history && history.push(`${ContextPath}/home`);
}
}
...
...
src/view/Manage/Map/MapContent.jsx
View file @
bde8c08a
...
@@ -91,7 +91,7 @@ class MapContent extends React.Component {
...
@@ -91,7 +91,7 @@ class MapContent extends React.Component {
})
})
}
}
convertRemoteData
=
(
data
)
=>
{
convertRemoteData
=
(
data
,
parentDirId
=
''
)
=>
{
data
.
forEach
((
item
,
index
)
=>
{
data
.
forEach
((
item
,
index
)
=>
{
if
(
item
.
dbType
===
'Dir'
)
{
if
(
item
.
dbType
===
'Dir'
)
{
item
.
text
=
item
.
dirName
||
''
;
item
.
text
=
item
.
dirName
||
''
;
...
@@ -106,11 +106,11 @@ class MapContent extends React.Component {
...
@@ -106,11 +106,11 @@ class MapContent extends React.Component {
})
})
item
.
text
=
assetCnName
||
''
;
item
.
text
=
assetCnName
||
''
;
item
.
id
=
`t
${
item
.
id
||
''
}
`
;
item
.
id
=
`t
${
parentDirId
}${
item
.
id
||
''
}
`
;
}
}
if
(
item
.
children
)
{
if
(
item
.
children
)
{
this
.
convertRemoteData
(
item
.
children
);
this
.
convertRemoteData
(
item
.
children
,
item
.
dirId
||
''
);
}
}
})
})
}
}
...
@@ -142,7 +142,7 @@ class MapContent extends React.Component {
...
@@ -142,7 +142,7 @@ class MapContent extends React.Component {
payload
:
{
dirId
:
item
.
dirId
},
payload
:
{
dirId
:
item
.
dirId
},
callback
:
data
=>
{
callback
:
data
=>
{
this
.
convertRemoteData
(
data
||
[]);
this
.
convertRemoteData
(
data
||
[]
,
item
.
dirId
);
item
.
children
=
(
data
||
[]);
item
.
children
=
(
data
||
[]);
this
.
setSquareGraphState
(
item
);
this
.
setSquareGraphState
(
item
);
}
}
...
@@ -167,7 +167,7 @@ class MapContent extends React.Component {
...
@@ -167,7 +167,7 @@ class MapContent extends React.Component {
type
:
'map.getTableModelByDirIid'
,
type
:
'map.getTableModelByDirIid'
,
payload
:
{
dirId
},
payload
:
{
dirId
},
callback
:
data
=>
{
callback
:
data
=>
{
this
.
convertRemoteData
(
data
||
[]);
this
.
convertRemoteData
(
data
||
[]
,
dirId
);
this
.
setState
({
this
.
setState
({
parentNodeId
:
nodeId
,
parentNodeId
:
nodeId
,
orgChildData
:
JSON
.
parse
(
JSON
.
stringify
(
data
||
[])),
orgChildData
:
JSON
.
parse
(
JSON
.
stringify
(
data
||
[])),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment