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
f5818d25
Commit
f5818d25
authored
Jun 21, 2022
by
chenshouchao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 任务配置数据结构完成
parent
23a11fc2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
9 deletions
+27
-9
index.tsx
src/views/Project/ProjectSubmitWork/index.tsx
+2
-1
interface.ts
src/views/Project/ProjectSubmitWork/interface.ts
+25
-8
No files found.
src/views/Project/ProjectSubmitWork/index.tsx
View file @
f5818d25
...
...
@@ -6,10 +6,11 @@ import WorkFlow from "./WorkFlow";
import
ButtonComponent
from
"@/components/mui/Button"
;
import
ArrowBackIosNewIcon
from
"@mui/icons-material/ArrowBackIosNew"
;
import
IconButton
from
"@mui/material/IconButton"
;
import
{
ITemplateConfig
}
from
"./interface"
;
const
ProjectSubmitWork
=
()
=>
{
const
[
templateConfigInfo
,
setTemplateConfigInfo
]
=
useState
(
templateConfigJson
);
useState
<
ITemplateConfig
>
(
templateConfigJson
);
return
(
<
div
className=
{
styles
.
swBox
}
>
...
...
src/views/Project/ProjectSubmitWork/interface.ts
View file @
f5818d25
...
...
@@ -8,10 +8,10 @@ export interface ITemplateConfig {
tags
:
Array
<
string
>
;
source
:
string
;
productId
:
string
;
tasks
:
Array
<
ITask
>
;
tasks
?:
Array
<
ITaskFlow
|
ITaskBatch
>
;
}
export
interface
ITask
{
export
interface
ITask
Flow
{
id
:
string
;
title
:
string
;
description
:
string
;
...
...
@@ -19,16 +19,31 @@ export interface ITask {
x
:
number
;
y
:
number
;
};
type
:
"batch"
|
"flow"
;
type
:
"flow"
|
string
;
parentNode
:
string
;
parameters
:
Array
<
IParameter
>
;
edges
:
Array
<
IEdge
>
;
}
export
interface
ITaskBatch
{
id
:
string
;
title
:
string
;
description
:
string
;
position
:
{
x
:
number
;
y
:
number
;
};
type
:
"batch"
|
string
;
parameters
:
Array
<
IParameter
>
;
edges
:
Array
<
IEdge
>
;
}
export
interface
IParameter
{
hidden
:
boolean
;
id
?:
string
;
name
:
string
;
required
:
boolean
;
domType
:
IDomType
;
domType
:
IDomType
|
string
;
dataType
:
string
;
value
:
string
;
description
:
string
;
...
...
@@ -47,9 +62,10 @@ export enum IDomType {
Checkbox
=
"checkbox"
,
}
export
interface
IValidator
{
// 待定
}
type
IValidator
=
any
;
// export interface IValidator {
// // 待定
// }
export
interface
IChoice
{
key
:
string
;
...
...
@@ -59,7 +75,8 @@ export interface IChoice {
export
interface
IEdge
{
id
:
string
;
source
:
string
;
sourceHandle
id
:
string
;
sourceHandle
:
string
;
target
:
string
;
targetHandle
:
string
;
lable
:
string
;
}
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