Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
bkunyun
Project
Project
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
Administrator
bkunyun
Commits
bf27ccf6
Commit
bf27ccf6
authored
Oct 19, 2022
by
wuyongsheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: addOperator文件回退
parent
5fa270bf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
85 deletions
+26
-85
index.tsx
...sources/WorkflowOperator/components/AddOperator/index.tsx
+26
-85
No files found.
src/views/ResourceCenter/UserResources/WorkflowOperator/components/AddOperator/index.tsx
View file @
bf27ccf6
...
...
@@ -2,7 +2,7 @@
* @Author: 吴永生 15770852798@163.com
* @Date: 2022-10-18 16:12:55
* @LastEditors: 吴永生 15770852798@163.com
* @LastEditTime: 2022-10-19
17:57:14
* @LastEditTime: 2022-10-19
21:23:39
* @FilePath: /bkunyun/src/views/ResourceCenter/UserResources/WorkflowOperator/components/AddOperator/index.tsx
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
...
...
@@ -13,7 +13,6 @@ import { observer } from "mobx-react";
import
MyInput
from
"@/components/mui/MyInput"
;
import
MySelect
from
"@/components/mui/MySelect"
;
import
MyButton
from
"@/components/mui/MyButton"
;
import
{
useForm
,
Controller
}
from
"react-hook-form"
;
import
style
from
"./index.module.css"
;
import
SwitchBatchFolw
from
"@/views/ResourceCenter/components/SwitchBatchFolw"
;
...
...
@@ -43,14 +42,11 @@ const AddOperator = observer((props: IAddOperator) => {
const
[
operatorList
,
setOperatorList
]
=
useState
<
ITask
[]
>
([]);
/** 流程编排 算子是否选中 */
const
[
inputActive
,
setInputActive
]
=
useState
(
false
);
const
{
control
,
getValues
,
reset
,
setValue
}
=
useForm
({
mode
:
"onChange"
,
});
/** 产品store */
const
{
productListStore
}
=
useStores
();
console
.
log
(
productListStore
,
"productListStore"
);
const
[
code
,
setCode
]
=
useState
(
""
);
// const [formData, setFormData] = useState<any>();
const
buildTypeList
=
useMemo
(()
=>
{
return
[
...
...
@@ -103,19 +99,9 @@ const AddOperator = observer((props: IAddOperator) => {
itemFlex=
"column"
require
>
<
Controller
render=
{
()
=>
{
return
(
<
MyInput
helperText=
"30字符以内,仅限字母、数字、中文"
placeholder=
"请输入算子名称"
/>
);
}
}
control=
{
control
}
name=
"name"
// rules={
// }
<
MyInput
helperText=
"30字符以内,仅限字母、数字、中文"
placeholder=
"请输入算子名称"
/>
</
FormItemBox
>
<
FormItemBox
...
...
@@ -125,15 +111,7 @@ const AddOperator = observer((props: IAddOperator) => {
itemFlex=
"column"
require
>
<
Controller
render=
{
()
=>
{
return
<
MyInput
/>;
}
}
control=
{
control
}
name=
"name"
// rules={
// }
/>
<
MyInput
/>
</
FormItemBox
>
<
FormItemBox
label=
"所属产品"
...
...
@@ -142,19 +120,9 @@ const AddOperator = observer((props: IAddOperator) => {
itemFlex=
"column"
require
>
<
Controller
render=
{
()
=>
{
return
(
<
MySelect
fullWidth
options=
{
productListStore
?.
productList
||
[]
}
/>
);
}
}
control=
{
control
}
name=
"name"
// rules={
// }
<
MySelect
fullWidth
options=
{
productListStore
?.
productList
||
[]
}
/>
</
FormItemBox
>
{
batchBuildType
===
"ENVIRONMENT"
?
(
...
...
@@ -165,19 +133,9 @@ const AddOperator = observer((props: IAddOperator) => {
itemFlex=
"column"
require
>
<
Controller
render=
{
()
=>
{
return
(
<
MySelect
fullWidth
options=
{
[{
label
:
"cadd"
,
value
:
"CADD"
}]
}
/>
);
}
}
control=
{
control
}
name=
"name"
// rules=
{
//
}
<
MySelect
fullWidth
options=
{
[{
label
:
"cadd"
,
value
:
"CADD"
}]
}
/>
</
FormItemBox
>
)
:
null
}
...
...
@@ -188,21 +146,7 @@ const AddOperator = observer((props: IAddOperator) => {
className=
{
style
.
operatorFormItem
}
itemFlex=
"column"
>
<
Controller
render=
{
()
=>
{
return
(
<
MyInput
multiline
rows=
{
4
}
placeholder=
"请输入算子描述"
/>
);
}
}
control=
{
control
}
name=
"desc"
// rules=
{
//
}
/>
<
MyInput
multiline
rows=
{
4
}
placeholder=
"请输入算子描述"
/>
</
FormItemBox
>
)
:
null
}
</
div
>
...
...
@@ -226,21 +170,11 @@ const AddOperator = observer((props: IAddOperator) => {
className=
{
style
.
operatorFormItem
}
itemFlex=
"column"
>
<
Controller
render=
{
()
=>
{
return
(
<
MyInput
style=
{
{
width
:
"420px"
}
}
multiline
rows=
{
10
}
placeholder=
"请输入算子描述"
/>
);
}
}
control=
{
control
}
name=
"desc"
// rules=
{
//
}
<
MyInput
style=
{
{
width
:
"420px"
}
}
multiline
rows=
{
10
}
placeholder=
"请输入算子描述"
/>
</
FormItemBox
>
</
div
>
...
...
@@ -282,7 +216,14 @@ const AddOperator = observer((props: IAddOperator) => {
)
}
</
div
>
<
div
className=
{
style
.
buttonBox
}
>
<
MyButton
text=
"开始构建"
onClick=
{
()
=>
handleSubmit
()
}
></
MyButton
>
<
MyButton
text=
"开始构建"
onClick=
{
()
=>
handleSubmit
((
data
)
=>
{
console
.
log
(
data
,
"1111"
);
})()
}
></
MyButton
>
</
div
>
</
div
>
</
div
>
...
...
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