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
59bff2cd
Commit
59bff2cd
authored
Jun 20, 2024
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
模型增加负责人
parent
eedc1dc1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
86 additions
and
9 deletions
+86
-9
datamodeler.js
src/service/datamodeler.js
+1
-1
ImportAction.jsx
src/view/Manage/Model/Component/ImportAction.jsx
+1
-0
ImportActionManage.jsx
src/view/Manage/Model/Component/ImportActionManage.jsx
+84
-8
No files found.
src/service/datamodeler.js
View file @
59bff2cd
...
...
@@ -749,7 +749,7 @@ export function getModelMetadataCompareResult(payload) {
}
export
function
getModelBranchNotice
(
payload
)
{
return
GetJSON
(
"/
shan
datamodeler/easyDataModelerNotice/getModelBranchNotice"
,
payload
)
return
GetJSON
(
"/datamodeler/easyDataModelerNotice/getModelBranchNotice"
,
payload
)
}
export
function
getMetadataTable
(
payload
)
{
...
...
src/view/Manage/Model/Component/ImportAction.jsx
View file @
59bff2cd
...
...
@@ -676,6 +676,7 @@ const ImportAction = React.forwardRef((props, ref) => {
roughModelerData={roughModelerData}
editable={action!=='detail'&&action!=='flow'&&action!=='detail-version'&&action!=='edit-inherited'}
action={action}
onChange={onHeaderChange}
/>
<ImportActionRelation
modelerData={modelerData} action={action}
...
...
src/view/Manage/Model/Component/ImportActionManage.jsx
View file @
59bff2cd
import
React
from
'react'
import
{
Button
,
Form
,
Descriptions
,
Input
,
Row
,
Col
,
Space
}
from
'antd'
import
{
Button
,
Form
,
Descriptions
,
Input
,
Row
,
Col
,
Space
,
Select
}
from
'antd'
import
{
DownOutlined
,
UpOutlined
}
from
'@ant-design/icons'
import
{
Subject
}
from
'rxjs'
;
import
{
Subject
}
from
'rxjs'
import
{
useDebounceEffect
}
from
'ahooks'
import
{
dispatch
}
from
'../../../../model'
import
{
importActionSubject
}
from
'./ImportAction'
;
import
{
importActionSubject
}
from
'./ImportAction'
import
'./ImportActionHeader.less'
;
export
const
ImportActionHeaderSubject
=
new
Subject
();
const
FC
=
(
props
)
=>
{
const
{
editable
,
form
,
modelerData
,
action
}
=
props
const
{
editable
,
form
,
modelerData
,
action
,
onChange
}
=
props
const
[
isCollapse
,
setCollapse
]
=
React
.
useState
(
true
)
const
[
maintenanceRecords
,
setMaintenanceRecords
]
=
React
.
useState
()
const
[
loadingUsers
,
setLoadingUsers
]
=
React
.
useState
(
false
)
const
[
users
,
setUsers
]
=
React
.
useState
()
React
.
useEffect
(()
=>
{
const
$importActionSubject
=
importActionSubject
.
subscribe
((
props
)
=>
{
...
...
@@ -28,6 +31,10 @@ const FC = (props) => {
},
[
action
])
React
.
useEffect
(()
=>
{
getUsers
()
},
[])
React
.
useEffect
(()
=>
{
if
(
modelerData
?.
id
)
{
getMaintenanceRecords
()
}
...
...
@@ -57,6 +64,20 @@ const FC = (props) => {
return
''
},
[
maintenanceRecords
])
const
getUsers
=
()
=>
{
setLoadingUsers
(
true
)
dispatch
({
type
:
'user.getOAUsers'
,
callback
:
data
=>
{
setLoadingUsers
(
false
)
setUsers
(
data
)
},
error
:
()
=>
{
setLoadingUsers
(
false
)
}
})
}
const
getMaintenanceRecords
=
()
=>
{
dispatch
({
type
:
'datamodel.getMaintenanceRecords'
,
...
...
@@ -69,6 +90,10 @@ const FC = (props) => {
})
}
const
onValuesChange
=
(
changedValues
,
allValues
)
=>
{
onChange
?.(
changedValues
,
allValues
);
}
const
formItemLayout
=
{
labelCol
:
{
xs
:
{
span
:
24
},
...
...
@@ -96,9 +121,19 @@ const FC = (props) => {
!
isCollapse
&&
<
div
className=
'mt-3'
>
{
editable
?
(
<
Form
form=
{
form
}
{
...
formItemLayout
}
>
<
Form
form=
{
form
}
{
...
formItemLayout
}
onValuesChange=
{
onValuesChange
}
>
<
Row
gutter=
{
10
}
>
<
Col
xs=
{
24
}
sm=
{
24
}
lg=
{
12
}
xl=
{
8
}
>
<
Col
xs=
{
24
}
sm=
{
24
}
lg=
{
12
}
xl=
{
8
}
>
<
Form
.
Item
label=
'技术负责人'
name=
'technicalManagerId'
>
<
UsersItem
loading=
{
loadingUsers
}
users=
{
users
}
/>
</
Form
.
Item
>
</
Col
>
<
Col
xs=
{
24
}
sm=
{
24
}
lg=
{
12
}
xl=
{
8
}
>
<
Form
.
Item
label=
'业务负责人'
name=
'businessManagerId'
>
<
UsersItem
loading=
{
loadingUsers
}
users=
{
users
}
/>
</
Form
.
Item
>
</
Col
>
<
Col
xs=
{
24
}
sm=
{
24
}
lg=
{
12
}
xl=
{
8
}
>
<
Form
.
Item
label=
"维护历史"
>
...
...
@@ -109,6 +144,12 @@ const FC = (props) => {
</
Form
>
)
:
(
<
Descriptions
column=
{
3
}
>
<
Descriptions
.
Item
label=
{
<
div
style=
{
{
textAlign
:
'right'
,
width
:
106
}
}
>
技术负责人
</
div
>
}
>
{
modelerData
?.
technicalManagerName
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
{
<
div
style=
{
{
textAlign
:
'right'
,
width
:
106
}
}
>
业务负责人
</
div
>
}
>
{
modelerData
?.
businessManagerName
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
{
<
div
style=
{
{
textAlign
:
'right'
,
width
:
106
}
}
>
维护历史
</
div
>
}
>
<
div
style=
{
{
maxHeight
:
70
,
overflow
:
'auto'
}
}
>
{
...
...
@@ -127,4 +168,39 @@ const FC = (props) => {
)
}
export
default
FC
\ No newline at end of file
export
default
FC
const
UsersItem
=
({
loading
,
users
,
value
,
onChange
})
=>
{
const
[
searchValue
,
setSearchValue
]
=
React
.
useState
()
const
[
options
,
setOptions
]
=
React
.
useState
()
useDebounceEffect
(()
=>
{
setOptions
(
(
users
??[])
.
filter
(
item
=>
!
searchValue
||
(
item
.
loginName
??
''
).
indexOf
(
searchValue
)
!==-
1
||
(
item
.
realName
??
''
).
indexOf
(
searchValue
)
!==-
1
)
.
map
(
item
=>
({
label
:
item
.
realName
,
value
:
`
${
item
.
id
}
`
,
}))
)
},
[
searchValue
,
users
],
{
wait
:
300
})
return
(
<
Select
loading=
{
loading
}
allowClear
showSearch
placeholder=
'请选择用户'
value=
{
(
options
??[]).
length
>
0
?
value
:
undefined
}
searchValue=
{
searchValue
}
onSearch=
{
(
val
)
=>
{
setSearchValue
(
val
)
}
}
onClear=
{
()
=>
{
setSearchValue
()
}
}
filterOption=
{
false
}
options=
{
options
}
onChange=
{
(
val
)
=>
{
onChange
?.(
val
)
}
}
/>
)
}
\ 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