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
b598386b
Commit
b598386b
authored
Mar 14, 2023
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
采集新增任务多选
parent
217e9974
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
1 deletion
+33
-1
UpdateTaskModal.jsx
...iew/Manage/DatasourceManage/Component/UpdateTaskModal.jsx
+33
-1
No files found.
src/view/Manage/DatasourceManage/Component/UpdateTaskModal.jsx
View file @
b598386b
import
React
,
{
useEffect
,
useMemo
,
useState
}
from
'react'
;
import
React
,
{
useEffect
,
useMemo
,
useState
}
from
'react'
;
import
{
Modal
,
Checkbox
,
Row
,
Col
,
Divider
,
Input
,
Typography
,
Form
,
Switch
}
from
'antd'
;
import
{
Modal
,
Checkbox
,
Row
,
Col
,
Divider
,
Input
,
Typography
,
Form
,
Switch
,
Select
}
from
'antd'
;
import
{
dispatch
}
from
'../../../../model'
;
import
{
dispatch
}
from
'../../../../model'
;
const
MultiSelect
=
({
value
=
''
,
data
,
onChange
})
=>
{
const
handleChange
=
(
newValue
)
=>
{
if
(
newValue
?.
length
>
0
)
{
onChange
?.(
newValue
.
toString
());
}
else
{
onChange
?.(
null
);
}
}
return
(
<
Select
mode=
"multiple"
placeholder=
{
data
?.
explain
}
value=
{
value
?
value
.
split
(
','
):[]
}
onChange=
{
handleChange
}
allowClear
style=
{
{
width
:
'100%'
,
}
}
>
{
data
?.
selectItem
?.
map
((
item
,
index
)
=>
{
return
(
<
Select
.
Option
key=
{
index
}
value=
{
item
}
>
{
item
}
</
Select
.
Option
>
);
})
}
</
Select
>
)
}
const
UpdateTaskModal
=
(
props
)
=>
{
const
UpdateTaskModal
=
(
props
)
=>
{
const
{
visible
,
onCancel
,
action
,
id
,
datasourceId
,
currentDatabase
}
=
props
;
const
{
visible
,
onCancel
,
action
,
id
,
datasourceId
,
currentDatabase
}
=
props
;
const
[
schemas
,
setSchemas
]
=
useState
([]);
const
[
schemas
,
setSchemas
]
=
useState
([]);
...
@@ -241,6 +272,7 @@ const UpdateTaskModal = (props) => {
...
@@ -241,6 +272,7 @@ const UpdateTaskModal = (props) => {
rules=
{
[{
required
:
param
.
required
,
message
:
'必填项'
}]
}
rules=
{
[{
required
:
param
.
required
,
message
:
'必填项'
}]
}
>
>
{
{
(
param
.
selectMode
===
'multiSelect'
)
?
<
MultiSelect
data=
{
param
}
/>
:
(
param
.
show
?
<
Input
placeholder=
{
param
.
explain
||
''
}
/>
:
<
Input
.
Password
placeholder=
{
param
.
explain
||
''
}
visibilityToggle=
{
false
}
/>
)
(
param
.
show
?
<
Input
placeholder=
{
param
.
explain
||
''
}
/>
:
<
Input
.
Password
placeholder=
{
param
.
explain
||
''
}
visibilityToggle=
{
false
}
/>
)
}
}
</
Form
.
Item
>
</
Form
.
Item
>
...
...
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