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
e7fb8f33
Commit
e7fb8f33
authored
Mar 07, 2024
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增项目
parent
baf74eea
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
71 additions
and
3 deletions
+71
-3
ModelTree.jsx
src/view/Manage/Model/Component/ModelTree.jsx
+13
-3
update-branch.jsx
src/view/Manage/Model/Component/update-branch.jsx
+58
-0
No files found.
src/view/Manage/Model/Component/ModelTree.jsx
View file @
e7fb8f33
...
@@ -9,6 +9,7 @@ import { dispatch } from '../../../../model';
...
@@ -9,6 +9,7 @@ import { dispatch } from '../../../../model';
import
{
showMessage
,
getQueryParam
,
highlightSearchContentByTerms
}
from
'../../../../util'
;
import
{
showMessage
,
getQueryParam
,
highlightSearchContentByTerms
}
from
'../../../../util'
;
import
{
AnchorDirId
,
AnchorId
,
AnchorTimestamp
,
DataModelerRoleAdmin
}
from
'../../../../util/constant'
;
import
{
AnchorDirId
,
AnchorId
,
AnchorTimestamp
,
DataModelerRoleAdmin
}
from
'../../../../util/constant'
;
import
{
AppContext
}
from
"../../../../App"
;
import
{
AppContext
}
from
"../../../../App"
;
import
UpdateBranch
from
'./update-branch'
;
import
'./ModelTree.less'
;
import
'./ModelTree.less'
;
import
'react-contexify/dist/ReactContexify.css'
;
import
'react-contexify/dist/ReactContexify.css'
;
...
@@ -592,8 +593,8 @@ const ModelTree = (props) => {
...
@@ -592,8 +593,8 @@ const ModelTree = (props) => {
</
Dropdown
>
</
Dropdown
>
{
{
(
viewSelectedKey
===
'dir'
&&
isAdmin
)
&&
(
(
(
viewSelectedKey
===
'dir'
&&
isAdmin
)
||
viewSelectedKey
===
'branch'
)
&&
(
<
Tooltip
title=
"新增目录"
>
<
Tooltip
title=
{
(
viewSelectedKey
===
'dir'
)?
"新增目录"
:
'新增项目'
}
>
<
PlusOutlined
className=
'default'
onClick=
{
add
}
style=
{
{
fontSize
:
16
,
cursor
:
'pointer'
}
}
/>
<
PlusOutlined
className=
'default'
onClick=
{
add
}
style=
{
{
fontSize
:
16
,
cursor
:
'pointer'
}
}
/>
</
Tooltip
>
</
Tooltip
>
)
)
...
@@ -689,14 +690,23 @@ const ModelTree = (props) => {
...
@@ -689,14 +690,23 @@ const ModelTree = (props) => {
/>
/>
</
Spin
>
</
Spin
>
</
div
>
</
div
>
<
UpdateTreeItemModal
{
viewSelectedKey
===
'dir'
?
<
UpdateTreeItemModal
visible=
{
visible
}
visible=
{
visible
}
type=
{
type
}
type=
{
type
}
item=
{
(
type
===
'add'
)?
item
:
currentRightClickDir
}
item=
{
(
type
===
'add'
)?
item
:
currentRightClickDir
}
rootId=
{
rootId
}
rootId=
{
rootId
}
onOk=
{
onUpdateTreeItemModalOk
}
onOk=
{
onUpdateTreeItemModalOk
}
onCancel=
{
onUpdateTreeItemModalCancel
}
onCancel=
{
onUpdateTreeItemModalCancel
}
/>
:
<
UpdateBranch
visible=
{
visible
}
type=
{
type
}
item=
{
(
type
===
'add'
)?
item
:
currentRightClickDir
}
onCancel=
{
()
=>
{
setVisible
(
false
)
}
}
/>
/>
}
{
{
(
refrence
!==
'recatalog'
)
&&
<
RcMenu
id=
{
MENU_ID
}
>
(
refrence
!==
'recatalog'
)
&&
<
RcMenu
id=
{
MENU_ID
}
>
<
RcItem
id=
"edit"
onClick=
{
update
}
>
<
RcItem
id=
"edit"
onClick=
{
update
}
>
...
...
src/view/Manage/Model/Component/update-branch.jsx
0 → 100644
View file @
e7fb8f33
import
React
from
'react'
import
{
Modal
,
Button
,
Spin
}
from
'antd'
const
FC
=
(
props
)
=>
{
const
{
visible
,
type
,
item
,
onCancel
}
=
props
const
[
waiting
,
setWaiting
]
=
React
.
useState
(
false
)
const
title
=
React
.
useMemo
(()
=>
{
if
(
type
===
'add'
)
return
'新增项目'
if
(
type
===
'edit'
)
return
'编辑项目'
return
''
},
[
type
])
const
close
=
()
=>
{
setWaiting
(
false
)
onCancel
?.()
}
const
save
=
async
()
=>
{
try
{
}
catch
(
e
)
{
}
}
const
footer
=
React
.
useMemo
(()
=>
{
return
[
<
Button
key=
{
'cancel'
}
onClick=
{
()
=>
close
()
}
>
取消
</
Button
>,
<
Button
key=
{
'save'
}
type=
'primary'
disabled=
{
waiting
}
onClick=
{
()
=>
save
()
}
>
保存
</
Button
>
]
},
[
close
,
save
,
waiting
])
return
(
<
Modal
visible=
{
visible
}
footer=
{
footer
}
width=
'90%'
bodyStyle=
{
{
padding
:
'15px'
,
overflowX
:
'auto'
,
maxHeight
:
'80vh'
}
}
title=
{
title
}
centered
destroyOnClose
onCancel=
{
()
=>
{
close
()
}
}
>
<
Spin
spinning=
{
waiting
}
>
</
Spin
>
</
Modal
>
)
}
export
default
FC
\ No newline at end of file
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