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
d5f78e01
Commit
d5f78e01
authored
Oct 20, 2022
by
wuyongsheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 批流算子新增表单联调
parent
12c2f227
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
137 additions
and
31 deletions
+137
-31
api_manager.ts
src/api/api_manager.ts
+2
-1
resourceCenter.ts
src/api/resourceCenter.ts
+12
-2
index.module.css
src/components/mui/FormItemBox/index.module.css
+2
-2
index.tsx
...sources/WorkflowOperator/components/AddOperator/index.tsx
+105
-16
index.tsx
...s/ResourceCenter/UserResources/WorkflowOperator/index.tsx
+5
-9
interface.ts
...esourceCenter/UserResources/WorkflowOperator/interface.ts
+11
-1
No files found.
src/api/api_manager.ts
View file @
d5f78e01
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: 吴永生#A02208 yongsheng.wu@wholion.com
* @Author: 吴永生#A02208 yongsheng.wu@wholion.com
* @Date: 2022-06-13 09:56:57
* @Date: 2022-06-13 09:56:57
* @LastEditors: 吴永生 15770852798@163.com
* @LastEditors: 吴永生 15770852798@163.com
* @LastEditTime: 2022-10-
19 21:14:1
1
* @LastEditTime: 2022-10-
20 14:56:2
1
* @FilePath: /bkunyun/src/api/api_manager.ts
* @FilePath: /bkunyun/src/api/api_manager.ts
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
*/
...
@@ -55,6 +55,7 @@ const RESTAPI = {
...
@@ -55,6 +55,7 @@ const RESTAPI = {
API_ACTORENV_LIST
:
`
${
BACKEND_API_URI_PREFIX
}
/cpp/actorenv/list`
,
// 查询用户的应用环境(算子环境)
API_ACTORENV_LIST
:
`
${
BACKEND_API_URI_PREFIX
}
/cpp/actorenv/list`
,
// 查询用户的应用环境(算子环境)
API_ACTORENV_DELETE
:
`
${
BACKEND_API_URI_PREFIX
}
/cpp/actorenv/delete`
,
// 删除用户算子环境
API_ACTORENV_DELETE
:
`
${
BACKEND_API_URI_PREFIX
}
/cpp/actorenv/delete`
,
// 删除用户算子环境
API_ACTORENV_DETAIL
:
`
${
BACKEND_API_URI_PREFIX
}
/cpp/actorenv/detail`
,
// 查询应用环境的详情信息
API_ACTORENV_DETAIL
:
`
${
BACKEND_API_URI_PREFIX
}
/cpp/actorenv/detail`
,
// 查询应用环境的详情信息
API_ACTOR_ENV_OPTIONS
:
`
${
BACKEND_API_URI_PREFIX
}
/cpp/actorenv/usableenv`
,
// 查询用户应用环境下拉
};
};
export
default
RESTAPI
;
export
default
RESTAPI
;
src/api/resourceCenter.ts
View file @
d5f78e01
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: 吴永生 15770852798@163.com
* @Author: 吴永生 15770852798@163.com
* @Date: 2022-10-19 17:09:23
* @Date: 2022-10-19 17:09:23
* @LastEditors: 吴永生 15770852798@163.com
* @LastEditors: 吴永生 15770852798@163.com
* @LastEditTime: 2022-10-20
09:26:12
* @LastEditTime: 2022-10-20
15:01:36
* @FilePath: /bkunyun/src/api/resourceCenter.ts
* @FilePath: /bkunyun/src/api/resourceCenter.ts
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
*/
...
@@ -55,7 +55,7 @@ const addActorenvBuildenv = (params: addActorenvBuildenvParams) => {
...
@@ -55,7 +55,7 @@ const addActorenvBuildenv = (params: addActorenvBuildenvParams) => {
// 获取公共环境
// 获取公共环境
const
getActorenvList
=
(
params
:
{
const
getActorenvList
=
(
params
:
{
type
:
'BATCH'
|
'FLOW'
|
''
,
type
?
:
'BATCH'
|
'FLOW'
|
''
,
page
:
number
,
page
:
number
,
size
:
number
,
size
:
number
,
title
?:
string
,
title
?:
string
,
...
@@ -93,6 +93,15 @@ const getActorenvDetail = (params: {id: string}) => {
...
@@ -93,6 +93,15 @@ const getActorenvDetail = (params: {id: string}) => {
});
});
};
};
// 查询应用环境的详情信息
const
getActorEnvOptions
=
(
params
:
{
type
:
string
})
=>
{
return
request
({
url
:
`
${
Api
.
API_ACTOR_ENV_OPTIONS
}
`
,
method
:
"get"
,
params
});
};
export
{
export
{
getPublicEnv
,
getPublicEnv
,
getPublicProject
,
getPublicProject
,
...
@@ -101,4 +110,5 @@ export {
...
@@ -101,4 +110,5 @@ export {
deleteActorenv
,
deleteActorenv
,
getOperatorList
,
getOperatorList
,
getActorenvDetail
,
getActorenvDetail
,
getActorEnvOptions
};
};
src/components/mui/FormItemBox/index.module.css
View file @
d5f78e01
...
@@ -31,7 +31,7 @@
...
@@ -31,7 +31,7 @@
.dynamicFormitem_helpText
{
.dynamicFormitem_helpText
{
position
:
absolute
;
position
:
absolute
;
bottom
:
-36px
;
bottom
:
-36px
;
font-size
:
1
3
px
;
font-size
:
1
2
px
;
line-height
:
1.15
;
line-height
:
1.15
;
color
:
#9894a5
;
color
:
#9894a5
;
}
}
...
@@ -41,6 +41,6 @@
...
@@ -41,6 +41,6 @@
.dynamicFormitem_errorTips
{
.dynamicFormitem_errorTips
{
position
:
absolute
;
position
:
absolute
;
bottom
:
-20px
;
bottom
:
-20px
;
font-size
:
1
3
px
;
font-size
:
1
2
px
;
color
:
#ff4e4e
;
color
:
#ff4e4e
;
}
}
src/views/ResourceCenter/UserResources/WorkflowOperator/components/AddOperator/index.tsx
View file @
d5f78e01
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: 吴永生 15770852798@163.com
* @Author: 吴永生 15770852798@163.com
* @Date: 2022-10-18 16:12:55
* @Date: 2022-10-18 16:12:55
* @LastEditors: 吴永生 15770852798@163.com
* @LastEditors: 吴永生 15770852798@163.com
* @LastEditTime: 2022-10-20 1
1:59:34
* @LastEditTime: 2022-10-20 1
9:44:43
* @FilePath: /bkunyun/src/views/ResourceCenter/UserResources/WorkflowOperator/components/AddOperator/index.tsx
* @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
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
*/
...
@@ -13,9 +13,7 @@ import { observer } from "mobx-react";
...
@@ -13,9 +13,7 @@ import { observer } from "mobx-react";
import
MyInput
from
"@/components/mui/MyInput"
;
import
MyInput
from
"@/components/mui/MyInput"
;
import
MySelect
from
"@/components/mui/MySelect"
;
import
MySelect
from
"@/components/mui/MySelect"
;
import
MyButton
from
"@/components/mui/MyButton"
;
import
MyButton
from
"@/components/mui/MyButton"
;
import
style
from
"./index.module.css"
;
import
SwitchBatchFolw
from
"@/views/ResourceCenter/components/SwitchBatchFolw"
;
import
SwitchBatchFolw
from
"@/views/ResourceCenter/components/SwitchBatchFolw"
;
import
Code
from
"@/components/CommonComponents/Code"
;
import
Code
from
"@/components/CommonComponents/Code"
;
import
RadioGroupOfButtonStyle
from
"@/components/CommonComponents/RadioGroupOfButtonStyle"
;
import
RadioGroupOfButtonStyle
from
"@/components/CommonComponents/RadioGroupOfButtonStyle"
;
import
{
ITask
}
from
"@/views/Project/ProjectSubmitWork/interface"
;
import
{
ITask
}
from
"@/views/Project/ProjectSubmitWork/interface"
;
...
@@ -23,6 +21,13 @@ import BatchOperatorFlow from "@/views/Project/components/Flow/components/BatchO
...
@@ -23,6 +21,13 @@ import BatchOperatorFlow from "@/views/Project/components/Flow/components/BatchO
import
OperatorList
from
"@/views/CustomOperator/components/OperatorList"
;
import
OperatorList
from
"@/views/CustomOperator/components/OperatorList"
;
import
FormItemBox
from
"@/components/mui/FormItemBox"
;
import
FormItemBox
from
"@/components/mui/FormItemBox"
;
import
{
useStores
}
from
"@/store"
;
import
{
useStores
}
from
"@/store"
;
import
useMyRequest
from
"@/hooks/useMyRequest"
;
import
{
getActorEnvOptions
}
from
"@/api/resourceCenter"
;
import
{
IOperatorAddFormData
}
from
"../../interface"
;
import
style
from
"./index.module.css"
;
import
{
checkFormData
,
checkParamsConfig
}
from
"./utils"
;
import
{
Base64
}
from
"js-base64"
;
interface
IAddOperator
{
interface
IAddOperator
{
pageType
:
string
;
pageType
:
string
;
...
@@ -45,9 +50,17 @@ const AddOperator = observer((props: IAddOperator) => {
...
@@ -45,9 +50,17 @@ const AddOperator = observer((props: IAddOperator) => {
const
[
inputActive
,
setInputActive
]
=
useState
(
false
);
const
[
inputActive
,
setInputActive
]
=
useState
(
false
);
/** 产品store */
/** 产品store */
const
{
productListStore
}
=
useStores
();
const
{
productListStore
}
=
useStores
();
/** 应用环境下拉 */
const
[
actorEnvOptions
,
setActorEnvOptions
]
=
useState
([]);
/** 参数配置 */
const
[
code
,
setCode
]
=
useState
(
""
);
const
[
code
,
setCode
]
=
useState
(
""
);
// const [formData, setFormData] = useState<any>();
/** 运行脚本 */
const
[
command
,
setCommand
]
=
useState
<
string
>
(
""
);
/** 表单数据 */
const
[
formData
,
setFormData
]
=
useState
<
IOperatorAddFormData
>
({});
/** 表单数据修改 */
const
[
formErrors
,
setFormErrors
]
=
useState
<
IOperatorAddFormData
>
({});
const
buildTypeList
=
useMemo
(()
=>
{
const
buildTypeList
=
useMemo
(()
=>
{
return
[
return
[
...
@@ -56,14 +69,47 @@ const AddOperator = observer((props: IAddOperator) => {
...
@@ -56,14 +69,47 @@ const AddOperator = observer((props: IAddOperator) => {
];
];
},
[]);
},
[]);
/** 表单数据 */
const
changeFormData
=
useCallback
(
(
val
:
IOperatorAddFormData
)
=>
{
setFormData
({
...
formData
,
...
val
});
},
[
formData
]
);
/** 获取应用环境下拉 */
const
{
run
:
fetchActorEnvOptions
}
=
useMyRequest
(
getActorEnvOptions
,
{
onSuccess
:
(
res
:
any
)
=>
{
if
(
res
.
message
===
"success"
)
{
const
newActorEnvOptions
=
res
?.
data
?.
map
((
item
:
any
)
=>
{
return
{
label
:
item
.
title
,
value
:
item
.
id
};
})
||
[];
setActorEnvOptions
(
newActorEnvOptions
);
}
},
});
useEffect
(()
=>
{
fetchActorEnvOptions
({
type
:
taskType
});
},
[
fetchActorEnvOptions
,
taskType
]);
/** 切换类型 */
/** 切换类型 */
const
handleRadio
=
(
val
:
IBuildType
)
=>
{
const
handleRadio
=
(
val
:
IBuildType
)
=>
{
setBatchBuildType
(
val
);
setBatchBuildType
(
val
);
};
};
const
handleSubmit
=
()
=>
{
const
handleSubmit
=
useCallback
(()
=>
{
console
.
log
(
33
);
const
paramsError
=
checkParamsConfig
(
code
);
};
const
resultErrors
=
checkFormData
(
formData
,
taskType
);
setFormErrors
(
resultErrors
);
if
(
!
Object
.
getOwnPropertyNames
(
resultErrors
)?.
length
)
return
;
const
params
=
{
...
formData
,
command
:
Base64
.
encode
(
command
),
};
console
.
log
(
params
,
33
);
},
[
command
,
formData
,
taskType
,
code
]);
return
(
return
(
<
div
className=
{
style
.
addOperatorBox
}
>
<
div
className=
{
style
.
addOperatorBox
}
>
...
@@ -100,12 +146,23 @@ const AddOperator = observer((props: IAddOperator) => {
...
@@ -100,12 +146,23 @@ const AddOperator = observer((props: IAddOperator) => {
<
FormItemBox
<
FormItemBox
label=
"算子名称"
label=
"算子名称"
labelClassName=
{
style
.
labelClassName
}
labelClassName=
{
style
.
labelClassName
}
className=
{
classNames
({
[
style
.
operatorFormItem
]:
formErrors
?.
title
,
})
}
itemFlex=
"column"
itemFlex=
"column"
errorMessage=
{
formErrors
?.
title
||
""
}
require
require
>
>
<
MyInput
<
MyInput
helperText=
"30字符以内,仅限字母、数字、中文"
helperText=
{
formErrors
?.
title
?
""
:
"15字符以内,仅限字母、数字、中文"
}
placeholder=
"请输入算子名称"
placeholder=
"请输入算子名称"
value=
{
formData
?.
title
}
onChange=
{
(
e
)
=>
{
if
(
e
.
target
.
value
?.
length
>
15
)
return
;
changeFormData
({
title
:
e
.
target
.
value
});
}
}
/>
/>
</
FormItemBox
>
</
FormItemBox
>
<
FormItemBox
<
FormItemBox
...
@@ -113,13 +170,20 @@ const AddOperator = observer((props: IAddOperator) => {
...
@@ -113,13 +170,20 @@ const AddOperator = observer((props: IAddOperator) => {
labelClassName=
{
style
.
labelClassName
}
labelClassName=
{
style
.
labelClassName
}
className=
{
style
.
operatorFormItem
}
className=
{
style
.
operatorFormItem
}
itemFlex=
"column"
itemFlex=
"column"
errorMessage=
{
formErrors
?.
version
||
""
}
require
require
>
>
<
MyInput
/>
<
MyInput
value=
{
formData
?.
version
}
onChange=
{
(
e
)
=>
{
changeFormData
({
version
:
e
.
target
.
value
});
}
}
/>
</
FormItemBox
>
</
FormItemBox
>
<
FormItemBox
<
FormItemBox
label=
"所属产品"
label=
"所属产品"
labelClassName=
{
style
.
labelClassName
}
labelClassName=
{
style
.
labelClassName
}
errorMessage=
{
formErrors
?.
productId
||
""
}
className=
{
classNames
({
className=
{
classNames
({
[
style
.
operatorFormItem
]:
batchBuildType
===
"ENVIRONMENT"
,
[
style
.
operatorFormItem
]:
batchBuildType
===
"ENVIRONMENT"
,
})
}
})
}
...
@@ -129,6 +193,10 @@ const AddOperator = observer((props: IAddOperator) => {
...
@@ -129,6 +193,10 @@ const AddOperator = observer((props: IAddOperator) => {
<
MySelect
<
MySelect
fullWidth
fullWidth
options=
{
productListStore
?.
productList
||
[]
}
options=
{
productListStore
?.
productList
||
[]
}
value=
{
formData
?.
productId
}
onChange=
{
(
e
)
=>
{
changeFormData
({
productId
:
e
});
}
}
/>
/>
</
FormItemBox
>
</
FormItemBox
>
{
batchBuildType
===
"ENVIRONMENT"
?
(
{
batchBuildType
===
"ENVIRONMENT"
?
(
...
@@ -136,12 +204,17 @@ const AddOperator = observer((props: IAddOperator) => {
...
@@ -136,12 +204,17 @@ const AddOperator = observer((props: IAddOperator) => {
label=
"应用环境"
label=
"应用环境"
labelClassName=
{
style
.
labelClassName
}
labelClassName=
{
style
.
labelClassName
}
className=
{
style
.
operatorFormItem
}
className=
{
style
.
operatorFormItem
}
errorMessage=
{
formErrors
?.
envId
||
""
}
itemFlex=
"column"
itemFlex=
"column"
require
require
>
>
<
MySelect
<
MySelect
fullWidth
fullWidth
options=
{
[{
label
:
"cadd"
,
value
:
"CADD"
}]
}
options=
{
actorEnvOptions
||
[]
}
value=
{
formData
?.
envId
}
onChange=
{
(
e
)
=>
{
changeFormData
({
envId
:
e
});
}
}
/>
/>
</
FormItemBox
>
</
FormItemBox
>
)
:
null
}
)
:
null
}
...
@@ -150,8 +223,17 @@ const AddOperator = observer((props: IAddOperator) => {
...
@@ -150,8 +223,17 @@ const AddOperator = observer((props: IAddOperator) => {
label=
"描述"
label=
"描述"
labelClassName=
{
style
.
labelClassName
}
labelClassName=
{
style
.
labelClassName
}
itemFlex=
"column"
itemFlex=
"column"
errorMessage=
{
formErrors
?.
description
||
""
}
>
>
<
MyInput
multiline
rows=
{
4
}
placeholder=
"请输入算子描述"
/>
<
MyInput
multiline
rows=
{
4
}
placeholder=
"请输入算子描述"
value=
{
formData
?.
description
}
onChange=
{
(
e
)
=>
{
changeFormData
({
description
:
e
.
target
.
value
});
}
}
/>
</
FormItemBox
>
</
FormItemBox
>
)
:
null
}
)
:
null
}
</
div
>
</
div
>
...
@@ -162,7 +244,9 @@ const AddOperator = observer((props: IAddOperator) => {
...
@@ -162,7 +244,9 @@ const AddOperator = observer((props: IAddOperator) => {
<
div
className=
{
style
.
code
}
>
<
div
className=
{
style
.
code
}
>
<
Code
<
Code
value=
{
code
}
value=
{
code
}
onChange=
{
(
e
:
string
)
=>
setCode
(
e
)
}
onChange=
{
(
e
:
string
)
=>
{
setCode
(
e
);
}
}
height=
"535px"
height=
"535px"
/>
/>
</
div
>
</
div
>
...
@@ -174,12 +258,17 @@ const AddOperator = observer((props: IAddOperator) => {
...
@@ -174,12 +258,17 @@ const AddOperator = observer((props: IAddOperator) => {
labelClassName=
{
style
.
labelClassName
}
labelClassName=
{
style
.
labelClassName
}
className=
{
style
.
operatorFormItem
}
className=
{
style
.
operatorFormItem
}
itemFlex=
"column"
itemFlex=
"column"
errorMessage=
{
formErrors
?.
description
||
""
}
>
>
<
MyInput
<
MyInput
style=
{
{
width
:
"420px"
}
}
style=
{
{
width
:
"420px"
}
}
multiline
multiline
rows=
{
10
}
rows=
{
10
}
placeholder=
"请输入算子描述"
placeholder=
"请输入算子描述"
value=
{
formData
?.
description
}
onChange=
{
(
e
)
=>
{
changeFormData
({
description
:
e
.
target
.
value
});
}
}
/>
/>
</
FormItemBox
>
</
FormItemBox
>
</
div
>
</
div
>
...
@@ -192,8 +281,8 @@ const AddOperator = observer((props: IAddOperator) => {
...
@@ -192,8 +281,8 @@ const AddOperator = observer((props: IAddOperator) => {
{
batchBuildType
===
"ENVIRONMENT"
?
(
{
batchBuildType
===
"ENVIRONMENT"
?
(
<
div
className=
{
style
.
code
}
>
<
div
className=
{
style
.
code
}
>
<
Code
<
Code
value=
{
co
de
}
value=
{
co
mmand
}
onChange=
{
(
e
:
string
)
=>
setCo
de
(
e
)
}
onChange=
{
(
e
:
string
)
=>
setCo
mmand
(
e
)
}
height=
"350px"
height=
"350px"
/>
/>
</
div
>
</
div
>
...
@@ -221,7 +310,7 @@ const AddOperator = observer((props: IAddOperator) => {
...
@@ -221,7 +310,7 @@ const AddOperator = observer((props: IAddOperator) => {
)
}
)
}
</
div
>
</
div
>
<
div
className=
{
style
.
buttonBox
}
>
<
div
className=
{
style
.
buttonBox
}
>
<
MyButton
text=
"开始构建"
></
MyButton
>
<
MyButton
text=
"开始构建"
onClick=
{
handleSubmit
}
/
>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
...
...
src/views/ResourceCenter/UserResources/WorkflowOperator/index.tsx
View file @
d5f78e01
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: 吴永生 15770852798@163.com
* @Author: 吴永生 15770852798@163.com
* @Date: 2022-10-17 14:35:11
* @Date: 2022-10-17 14:35:11
* @LastEditors: 吴永生 15770852798@163.com
* @LastEditors: 吴永生 15770852798@163.com
* @LastEditTime: 2022-10-20 1
1:30:10
* @LastEditTime: 2022-10-20 1
7:11:22
* @FilePath: /bkunyun/src/views/ResourceCenter/UserResources/WorkflowOperator/index.tsx
* @FilePath: /bkunyun/src/views/ResourceCenter/UserResources/WorkflowOperator/index.tsx
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
*/
...
@@ -10,6 +10,7 @@
...
@@ -10,6 +10,7 @@
import
{
useCallback
,
useEffect
,
useState
}
from
"react"
;
import
{
useCallback
,
useEffect
,
useState
}
from
"react"
;
import
{
observer
}
from
"mobx-react"
;
import
{
observer
}
from
"mobx-react"
;
import
_
from
"lodash"
;
import
_
from
"lodash"
;
import
Add
from
"@mui/icons-material/Add"
;
import
SearchInput
from
"@/components/BusinessComponents/SearchInput"
;
import
SearchInput
from
"@/components/BusinessComponents/SearchInput"
;
import
MySelect
from
"@/components/mui/MySelect"
;
import
MySelect
from
"@/components/mui/MySelect"
;
...
@@ -18,11 +19,11 @@ import OperatorCard from "./components/OperatorCard";
...
@@ -18,11 +19,11 @@ import OperatorCard from "./components/OperatorCard";
import
AddOperator
from
"./components/AddOperator"
;
import
AddOperator
from
"./components/AddOperator"
;
import
{
useStores
}
from
"@/store"
;
import
{
useStores
}
from
"@/store"
;
import
{
getOperatorList
,
IOperatorListParams
}
from
"@/api/resourceCenter"
;
import
{
getOperatorList
,
IOperatorListParams
}
from
"@/api/resourceCenter"
;
import
styles
from
"./index.module.css"
;
import
useMyRequest
from
"@/hooks/useMyRequest"
;
import
useMyRequest
from
"@/hooks/useMyRequest"
;
import
{
IOperatorInfo
}
from
"./interface"
;
import
{
IOperatorInfo
}
from
"./interface"
;
import
styles
from
"./index.module.css"
;
const
WorkflowOperator
=
observer
(()
=>
{
const
WorkflowOperator
=
observer
(()
=>
{
const
[
pageType
,
setPageType
]
=
useState
<
string
>
(
""
);
const
[
pageType
,
setPageType
]
=
useState
<
string
>
(
""
);
/** 产品store */
/** 产品store */
...
@@ -119,12 +120,7 @@ const WorkflowOperator = observer(() => {
...
@@ -119,12 +120,7 @@ const WorkflowOperator = observer(() => {
</
div
>
</
div
>
<
MyButton
<
MyButton
text=
"构建算子"
text=
"构建算子"
img=
{
startIcon=
{
<
Add
/>
}
<
span
style=
{
{
fontSize
:
"14px"
,
marginRight
:
"8px"
}
}
className=
"iconfont icon-dianzan"
></
span
>
}
onClick=
{
()
=>
setPageType
(
"add"
)
}
onClick=
{
()
=>
setPageType
(
"add"
)
}
></
MyButton
>
></
MyButton
>
</
div
>
</
div
>
...
...
src/views/ResourceCenter/UserResources/WorkflowOperator/interface.ts
View file @
d5f78e01
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: 吴永生 15770852798@163.com
* @Author: 吴永生 15770852798@163.com
* @Date: 2022-10-19 20:50:18
* @Date: 2022-10-19 20:50:18
* @LastEditors: 吴永生 15770852798@163.com
* @LastEditors: 吴永生 15770852798@163.com
* @LastEditTime: 2022-10-20 1
1:03:29
* @LastEditTime: 2022-10-20 1
9:05:27
* @FilePath: /bkunyun/src/views/ResourceCenter/UserResources/WorkflowOperator/interface.ts
* @FilePath: /bkunyun/src/views/ResourceCenter/UserResources/WorkflowOperator/interface.ts
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
*/
...
@@ -19,4 +19,13 @@ export interface IOperatorInfo{
...
@@ -19,4 +19,13 @@ export interface IOperatorInfo{
export
enum
operatorType
{
export
enum
operatorType
{
'FLOW'
=
'流算子'
,
'FLOW'
=
'流算子'
,
'BATCH'
=
'批算子'
,
'BATCH'
=
'批算子'
,
}
export
interface
IOperatorAddFormData
{
title
?:
string
;
type
?:
IOperatorType
;
version
?:
string
;
productId
?:
string
;
description
?:
string
;
envId
?:
string
;
}
}
\ 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