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
3287dfa9
Commit
3287dfa9
authored
Mar 18, 2021
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
数据地图
parent
90accdb2
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
8 deletions
+16
-8
Tree.jsx
src/view/Manage/Map/Component/Tree.jsx
+2
-2
MapContent.jsx
src/view/Manage/Map/MapContent.jsx
+8
-4
index.jsx
src/view/Manage/Map/index.jsx
+6
-2
No files found.
src/view/Manage/Map/Component/Tree.jsx
View file @
3287dfa9
...
...
@@ -30,7 +30,7 @@ class Tree extends React.Component {
],
},
defaultNode
:
{
size
:
26
,
size
:
9
,
anchorPoints
:
[
[
0
,
0.5
],
[
1
,
0.5
],
...
...
@@ -65,7 +65,7 @@ class Tree extends React.Component {
// const node = e.item;
// const model = node.getModel();
history
&&
history
.
push
(
`
${
ContextPath
}
/home`
);
//
history && history.push(`${ContextPath}/home`);
});
if
(
typeof
window
!==
'undefined'
)
{
...
...
src/view/Manage/Map/MapContent.jsx
View file @
3287dfa9
import
React
from
'react'
;
import
{
Row
,
Col
,
Breadcrumb
}
from
'antd'
;
import
{
Row
,
Col
,
Breadcrumb
,
Spin
}
from
'antd'
;
import
{
HomeOutlined
}
from
'@ant-design/icons'
;
import
SquareItem
from
'./Component/SquareItem'
;
...
...
@@ -26,13 +26,13 @@ class MapContent extends React.Component {
componentDidMount
()
{
const
{
tid
}
=
this
.
props
;
this
.
setState
({
loading
TableModel
:
true
},
()
=>
{
this
.
setState
({
loading
:
true
},
()
=>
{
dispatchLatest
({
type
:
'map.getTableAndTreeModelByTid'
,
payload
:
{
dirId
:
tid
},
callback
:
data
=>
{
this
.
setState
({
loading
TableModel
:
false
,
loading
:
false
,
tableModelData
:
data
.
tables
||
[],
curTableModelData
:
data
.
tables
||
[],
treeModelData
:
data
.
trees
||
{},
...
...
@@ -99,7 +99,7 @@ class MapContent extends React.Component {
render
()
{
const
{
diagram
,
type
}
=
this
.
props
;
const
{
curTableModelData
,
breadcrumbContents
,
treeModelData
,
relationModelData
}
=
this
.
state
;
const
{
curTableModelData
,
breadcrumbContents
,
treeModelData
,
relationModelData
,
loading
}
=
this
.
state
;
let
groups
=
[];
if
(
curTableModelData
)
{
...
...
@@ -111,6 +111,8 @@ class MapContent extends React.Component {
return
(
<>
{
loading
?
<
Spin
/>
:
<>
{
diagram
===
'square'
&&
<>
{
breadcrumbContents
&&
breadcrumbContents
.
length
>
1
&&
<
Breadcrumb
className=
'mb-3'
>
...
...
@@ -155,6 +157,8 @@ class MapContent extends React.Component {
diagram
===
'relation'
&&
<
Relation
data=
{
relationModelData
}
type=
{
type
}
{
...
this
.
props
}
/>
}
</>
}
</>
);
}
}
...
...
src/view/Manage/Map/index.jsx
View file @
3287dfa9
import
React
from
'react'
;
import
{
Tabs
,
Radio
}
from
'antd'
;
import
{
Tabs
,
Radio
,
Spin
}
from
'antd'
;
import
MapContent
from
'./MapContent'
;
import
{
dispatchLatest
}
from
'../../../model'
;
...
...
@@ -42,10 +42,12 @@ class Map extends React.Component {
}
render
()
{
const
{
diagram
,
tabKey
,
topics
}
=
this
.
state
;
const
{
diagram
,
tabKey
,
topics
,
loadingTopics
}
=
this
.
state
;
return
(
<
div
style=
{
{
backgroundColor
:
'#fff'
,
height
:
'100%'
}
}
>
{
loadingTopics
?
<
Spin
/>
:
<>
{
topics
&&
topics
.
length
>
0
&&
<
Tabs
activeKey=
{
tabKey
}
size=
'large'
...
...
@@ -72,6 +74,8 @@ class Map extends React.Component {
}
</
Tabs
>
}
</>
}
</
div
>
);
}
...
...
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