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
9cdeace0
Commit
9cdeace0
authored
Mar 16, 2023
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
采集增加抽取方式和入库审核
parent
169a5eba
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
6 deletions
+40
-6
UpdateTaskModal.jsx
...iew/Manage/DatasourceManage/Component/UpdateTaskModal.jsx
+40
-6
No files found.
src/view/Manage/DatasourceManage/Component/UpdateTaskModal.jsx
View file @
9cdeace0
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
React
,
{
useEffect
,
useState
,
useMemo
}
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
ApprovalCheckbox
=
({
value
,
onChange
})
=>
{
const
currentChecked
=
useMemo
(()
=>
{
if
(
value
===
'true'
)
return
true
;
if
(
value
===
'false'
)
return
false
;
return
null
;
},
[
value
])
const
handleChange
=
(
e
)
=>
{
onChange
?.(
`
${
e
.
target
.
checked
}
`
);
}
return
(
<
Checkbox
checked=
{
currentChecked
}
onChange=
{
handleChange
}
/>
)
}
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
([]);
...
@@ -157,6 +177,22 @@ const UpdateTaskModal = (props) => {
...
@@ -157,6 +177,22 @@ const UpdateTaskModal = (props) => {
}
}
}
}
const
targetItem
=
(
param
)
=>
{
if
(
param
.
selectMode
===
'select'
)
{
return
(
<
Select
allowClear
>
{
param
.
selectItem
?.
map
((
item
,
index
)
=>
<
Select
.
Option
key=
{
index
}
value=
{
item
}
>
{
item
}
</
Select
.
Option
>)
}
</
Select
>
)
}
else
if
(
param
.
selectMode
===
'checkBox'
)
{
return
<
ApprovalCheckbox
/>;
}
return
(
param
.
show
?
<
Input
placeholder=
{
param
.
explain
||
''
}
/>
:
<
Input
.
Password
placeholder=
{
param
.
explain
||
''
}
visibilityToggle=
{
false
}
/>
)
}
const
formItemLayout
=
{
const
formItemLayout
=
{
labelCol
:
{
labelCol
:
{
xs
:
{
span
:
24
},
xs
:
{
span
:
24
},
...
@@ -219,7 +255,7 @@ const UpdateTaskModal = (props) => {
...
@@ -219,7 +255,7 @@ const UpdateTaskModal = (props) => {
<
Divider
>
过滤信息
</
Divider
>
<
Divider
>
过滤信息
</
Divider
>
<
Form
{
...
formItemLayout
}
form=
{
form
}
>
<
Form
{
...
formItemLayout
}
form=
{
form
}
>
{
{
taskSettings
&&
(
taskSettings
.
targetConfParameters
||
[]).
filter
(
item
=>
item
.
name
!==
'schema'
).
map
((
param
,
index
)
=>
{
taskSettings
&&
(
taskSettings
.
targetConfParameters
||
[]).
sort
((
val1
,
val2
)
=>
(
val1
.
seq
-
val2
.
seq
)).
filter
(
item
=>
item
.
name
!==
'schema'
).
map
((
param
,
index
)
=>
{
return
(
return
(
<
Form
.
Item
<
Form
.
Item
label=
{
param
.
cnName
||
''
}
label=
{
param
.
cnName
||
''
}
...
@@ -227,9 +263,7 @@ const UpdateTaskModal = (props) => {
...
@@ -227,9 +263,7 @@ const UpdateTaskModal = (props) => {
key=
{
index
}
key=
{
index
}
rules=
{
[{
required
:
param
.
required
,
message
:
'必填项'
}]
}
rules=
{
[{
required
:
param
.
required
,
message
:
'必填项'
}]
}
>
>
{
{
targetItem
(
param
)
}
(
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