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
2ff10eeb
Commit
2ff10eeb
authored
Jan 14, 2022
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
右键操作
parent
6e32fc0e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
26 deletions
+27
-26
ModelTable.jsx
src/view/Manage/Model/Component/ModelTable.jsx
+27
-26
No files found.
src/view/Manage/Model/Component/ModelTable.jsx
View file @
2ff10eeb
...
@@ -407,21 +407,6 @@ const ModelTable = (props) => {
...
@@ -407,21 +407,6 @@ const ModelTable = (props) => {
onItemAction
&&
onItemAction
(
record
,
'detail'
);
onItemAction
&&
onItemAction
(
record
,
'detail'
);
}
}
const
onMoreMenuClick
=
(
e
,
record
)
=>
{
const
{
key
}
=
e
;
if
(
key
===
'history'
)
{
historyItem
(
record
);
}
else
if
(
key
===
'copy'
)
{
window
.
open
(
`/data-govern/data-model-action?
${
Action
}
=add&
${
CatalogId
}
=
${(
view
===
'dir'
)?(
catalogId
||
''
):
''
}
&
${
ModelerId
}
=
${
record
.
id
}
`
);
}
else
if
(
key
===
'createTable'
)
{
deployAction
(
record
);
}
else
if
(
key
.
indexOf
(
'action'
)
!==
-
1
)
{
const
index
=
(
key
.
split
(
'-'
))[
1
];
const
action
=
record
.
state
?.
supportedActions
[
index
];
stateAction
(
record
,
action
);
}
}
const
deployAction
=
(
record
)
=>
{
const
deployAction
=
(
record
)
=>
{
onAutoCreateTable
&&
onAutoCreateTable
(
record
);
onAutoCreateTable
&&
onAutoCreateTable
(
record
);
}
}
...
@@ -594,21 +579,22 @@ const ModelTable = (props) => {
...
@@ -594,21 +579,22 @@ const ModelTable = (props) => {
}
}
const
handleItemClick
=
({
event
,
props
,
data
,
triggerEvent
})
=>
{
const
handleItemClick
=
({
event
,
props
,
data
,
triggerEvent
})
=>
{
switch
(
event
.
currentTarget
.
id
)
{
const
key
=
event
.
currentTarget
.
id
;
case
"edit"
:
if
(
key
===
'edit'
)
{
editItem
(
currentItem
);
editItem
(
currentItem
);
break
;
}
else
if
(
key
===
'delete'
)
{
case
"delete"
:
deleteItem
(
currentItem
);
deleteItem
(
currentItem
);
break
;
}
else
if
(
key
===
'history'
)
{
case
"history"
:
historyItem
(
currentItem
);
historyItem
(
currentItem
);
break
;
}
else
if
(
key
===
'copy'
)
{
case
"copy"
:
window
.
open
(
`/data-govern/data-model-action?
${
Action
}
=add&
${
CatalogId
}
=
${(
view
===
'dir'
)?(
catalogId
||
''
):
''
}
&
${
ModelerId
}
=
${
currentItem
.
id
}
`
);
window
.
open
(
`/data-govern/data-model-action?
${
Action
}
=add&
${
CatalogId
}
=
${(
view
===
'dir'
)?(
catalogId
||
''
):
''
}
&
${
ModelerId
}
=
${
currentItem
.
id
}
`
);
break
;
}
else
if
(
key
===
'createTable'
)
{
default
:
deployAction
(
currentItem
);
break
;
}
else
if
(
key
.
indexOf
(
'action'
)
!==
-
1
)
{
const
index
=
(
key
.
split
(
'-'
))[
1
];
const
action
=
currentItem
?.
state
?.
supportedActions
[
index
];
stateAction
(
currentItem
,
action
);
}
}
}
}
...
@@ -705,6 +691,21 @@ const ModelTable = (props) => {
...
@@ -705,6 +691,21 @@ const ModelTable = (props) => {
<
RcItem
id=
"copy"
onClick=
{
handleItemClick
}
>
<
RcItem
id=
"copy"
onClick=
{
handleItemClick
}
>
复制模型
复制模型
</
RcItem
>
</
RcItem
>
{
(
currentItem
?.
state
?.
supportedActions
||
[]).
length
>
0
&&
currentItem
?.
state
?.
supportedActions
.
map
((
item
,
index
)
=>
{
return
(
<
RcItem
id=
{
`action-${index}`
}
onClick=
{
handleItemClick
}
>
{
item
.
cnName
||
''
}
</
RcItem
>
);
})
}
{
currentItem
?.
deployable
&&
<
RcItem
id=
'createTable'
onClick=
{
handleItemClick
}
>
建表
</
RcItem
>
}
</
RcMenu
>
</
RcMenu
>
{
contextHolder
}
{
contextHolder
}
</
div
>
</
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