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
4e03cefc
Commit
4e03cefc
authored
Mar 07, 2024
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
分支模型设置
parent
80906d50
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
5 deletions
+40
-5
branch-select-model.jsx
src/view/Manage/Model/Component/branch-select-model.jsx
+0
-0
branch-select-model.less
src/view/Manage/Model/Component/branch-select-model.less
+7
-0
update-branch.jsx
src/view/Manage/Model/Component/update-branch.jsx
+33
-5
No files found.
src/view/Manage/Model/Component/branch-select-model.jsx
0 → 100644
View file @
4e03cefc
This diff is collapsed.
Click to expand it.
src/view/Manage/Model/Component/branch-select-model.less
0 → 100644
View file @
4e03cefc
.branch-select-model {
.tree {
height: calc(80vh - 30px);
overflow: auto;
}
}
\ No newline at end of file
src/view/Manage/Model/Component/update-branch.jsx
View file @
4e03cefc
...
...
@@ -2,10 +2,11 @@ import React from 'react'
import
{
Modal
,
Button
,
Spin
,
Form
,
Input
,
Select
,
}
from
'antd'
import
{
useDebounceEffect
}
from
'ahooks'
import
{
SettingOutlined
}
from
'@ant-design/icons'
import
produce
from
'immer'
import
{
dispatch
}
from
'../../../../model'
import
{
AppContext
}
from
'../../../../App'
import
produce
from
'immer
'
import
SelectModel
from
'./branch-select-model
'
const
FC
=
(
props
)
=>
{
const
{
visible
,
type
,
item
,
onCancel
}
=
props
...
...
@@ -92,7 +93,7 @@ const Basic = React.forwardRef(function ({ type, item }, ref) {
let
rows
=
await
form
.
validateFields
()
if
(
type
===
'add'
)
{
rows
=
{...
rows
,
easyDataModelerMemberShip
:
{
easyDataModelerMember
Ship
:
[
easyDataModelerMember
s
:
[
{
admin
:
true
,
id
:
app
?.
user
?.
userId
,
...
...
@@ -183,6 +184,7 @@ const Basic = React.forwardRef(function ({ type, item }, ref) {
</
Form
.
Item
>
<
Form
.
Item
label=
'模型设置'
name=
'forked'
style=
{
{
marginBottom
}
}
>
<
ModelConfigItem
/>
...
...
@@ -224,12 +226,37 @@ const UsersItem = ({ loading, users, value, onChange }) => {
)
}
const
ModelConfigItem
=
()
=>
{
const
ModelConfigItem
=
({
value
,
onChange
})
=>
{
const
[
selectModelParams
,
setSelectModelParams
]
=
React
.
useState
({
visible
:
false
,
items
:
undefined
,
})
const
onConfigClick
=
()
=>
{
setSelectModelParams
({
visible
:
true
,
items
:
(
value
??[]).
map
(
item
=>
({
id
:
item
})),
})
}
return
(
<
Button
icon=
{
<
SettingOutlined
/>
}
onClick=
{
onConfigClick
}
/>
<
span
>
<
span
className=
'mr-3'
>
{
`共${(value??[]).length}个`
}
</
span
>
<
Button
icon=
{
<
SettingOutlined
/>
}
onClick=
{
onConfigClick
}
/>
<
SelectModel
{
...
selectModelParams
}
onCancel=
{
(
val
)
=>
{
setSelectModelParams
({
visible
:
false
,
items
:
undefined
,
})
if
(
val
)
{
onChange
?.(
val
.
map
(
item
=>
item
.
id
))
}
}
}
/>
</
span
>
)
}
\ 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