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
3144251a
Commit
3144251a
authored
Jul 27, 2022
by
chenshouchao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
UI: 样式优化
parent
e44927b1
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
63 additions
and
43 deletions
+63
-43
MyButton.tsx
src/components/mui/MyButton.tsx
+7
-0
MyDialog.tsx
src/components/mui/MyDialog.tsx
+8
-2
MyInput.tsx
src/components/mui/MyInput.tsx
+1
-1
MySelect.tsx
src/components/mui/MySelect.tsx
+8
-0
index.tsx
src/views/Project/ProjectData/AddFolder/index.tsx
+6
-5
index.tsx
src/views/Project/ProjectData/index.tsx
+8
-9
index.module.css
src/views/Project/ProjectJobDetail/index.module.css
+2
-2
index.tsx
src/views/Project/ProjectSubmitWork/ConfigForm/index.tsx
+13
-15
interface.ts
src/views/Project/ProjectSubmitWork/interface.ts
+1
-1
index.tsx
src/views/WorkFlowEdit/components/ParameterSetting/index.tsx
+9
-8
No files found.
src/components/mui/MyButton.tsx
View file @
3144251a
...
@@ -47,6 +47,10 @@ const theme = createTheme({
...
@@ -47,6 +47,10 @@ const theme = createTheme({
"&.MuiButton-textError"
:
{
"&.MuiButton-textError"
:
{
color
:
"rgba(255, 78, 78, 1)"
,
color
:
"rgba(255, 78, 78, 1)"
,
},
},
"&.MuiButton-outlinedError"
:
{
color
:
"rgba(255, 78, 78, 1)"
,
border
:
"1px solid rgba(255, 78, 78, 1)"
,
},
},
},
contained
:
{
contained
:
{
backgroundColor
:
"#1370FF"
,
backgroundColor
:
"#1370FF"
,
...
@@ -60,6 +64,9 @@ const theme = createTheme({
...
@@ -60,6 +64,9 @@ const theme = createTheme({
boxShadow
:
"none !important"
,
boxShadow
:
"none !important"
,
color
:
"#1370FF"
,
color
:
"#1370FF"
,
"&:hover"
:
{
backgroundColor
:
"#ECF4FF "
},
"&:hover"
:
{
backgroundColor
:
"#ECF4FF "
},
"&.MuiButton-textError"
:
{
color
:
"rgba(255, 78, 78, 1)"
,
},
},
},
text
:
{
text
:
{
backgroundColor
:
"transparent"
,
backgroundColor
:
"transparent"
,
...
...
src/components/mui/MyDialog.tsx
View file @
3144251a
...
@@ -8,7 +8,7 @@ import {
...
@@ -8,7 +8,7 @@ import {
}
from
"@mui/material"
;
}
from
"@mui/material"
;
import
CloseIcon
from
"@mui/icons-material/Close"
;
import
CloseIcon
from
"@mui/icons-material/Close"
;
import
MyButton
from
'./MyButton'
import
MyButton
from
"./MyButton"
;
export
interface
IDialogProps
{
export
interface
IDialogProps
{
/** 自定义类名 */
/** 自定义类名 */
...
@@ -84,7 +84,12 @@ const MyDialog: React.FunctionComponent<IDialogProps> = (props) => {
...
@@ -84,7 +84,12 @@ const MyDialog: React.FunctionComponent<IDialogProps> = (props) => {
)
:
(
)
:
(
<
DialogActions
style=
{
{
padding
:
"0 24px 24px 24px"
}
}
>
<
DialogActions
style=
{
{
padding
:
"0 24px 24px 24px"
}
}
>
{
showCancel
?
(
{
showCancel
?
(
<
MyButton
text=
{
cancelText
||
"取消"
}
onClick=
{
onClose
}
variant=
"outlined"
size=
"small"
/>
<
MyButton
text=
{
cancelText
||
"取消"
}
onClick=
{
onClose
}
variant=
"outlined"
size=
"small"
/>
)
:
null
}
)
:
null
}
{
showConfirm
?
(
{
showConfirm
?
(
<
MyButton
<
MyButton
...
@@ -123,6 +128,7 @@ const MyDialog: React.FunctionComponent<IDialogProps> = (props) => {
...
@@ -123,6 +128,7 @@ const MyDialog: React.FunctionComponent<IDialogProps> = (props) => {
display
:
"flex"
,
display
:
"flex"
,
justifyContent
:
"space-between"
,
justifyContent
:
"space-between"
,
alignItems
:
"center"
,
alignItems
:
"center"
,
fontWeight
:
600
,
}
}
}
}
>
>
<
span
>
{
title
}
</
span
>
<
span
>
{
title
}
</
span
>
...
...
src/components/mui/MyInput.tsx
View file @
3144251a
...
@@ -20,7 +20,7 @@ interface MyInputProps extends Omit<TextFieldProps, "value"> {
...
@@ -20,7 +20,7 @@ interface MyInputProps extends Omit<TextFieldProps, "value"> {
const
MyInput
=
(
props
:
MyInputProps
)
=>
{
const
MyInput
=
(
props
:
MyInputProps
)
=>
{
const
{
const
{
size
=
"
small
"
,
size
=
"
medium
"
,
placeholder
=
"请输入"
,
placeholder
=
"请输入"
,
fullWidth
=
true
,
fullWidth
=
true
,
error
=
false
,
error
=
false
,
...
...
src/components/mui/MySelect.tsx
View file @
3144251a
...
@@ -9,6 +9,7 @@
...
@@ -9,6 +9,7 @@
import
InputLabel
from
"@mui/material/InputLabel"
;
import
InputLabel
from
"@mui/material/InputLabel"
;
import
MenuItem
from
"@mui/material/MenuItem"
;
import
MenuItem
from
"@mui/material/MenuItem"
;
import
FormControl
from
"@mui/material/FormControl"
;
import
FormControl
from
"@mui/material/FormControl"
;
import
FormHelperText
from
"@mui/material/FormHelperText"
;
import
Select
,
{
SelectChangeEvent
,
SelectProps
}
from
"@mui/material/Select"
;
import
Select
,
{
SelectChangeEvent
,
SelectProps
}
from
"@mui/material/Select"
;
import
{
createTheme
,
ThemeProvider
}
from
"@mui/material"
;
import
{
createTheme
,
ThemeProvider
}
from
"@mui/material"
;
...
@@ -44,6 +45,10 @@ interface IProps
...
@@ -44,6 +45,10 @@ interface IProps
title
?:
string
;
title
?:
string
;
/** 是否显示title */
/** 是否显示title */
isTitle
?:
boolean
;
isTitle
?:
boolean
;
/** 是否显示提示文案 */
error
?:
boolean
;
/** 提示文案 */
helpertext
?:
string
;
}
}
export
default
function
MySelect
(
props
:
IProps
)
{
export
default
function
MySelect
(
props
:
IProps
)
{
const
{
const
{
...
@@ -55,6 +60,8 @@ export default function MySelect(props: IProps) {
...
@@ -55,6 +60,8 @@ export default function MySelect(props: IProps) {
multiple
=
false
,
multiple
=
false
,
onChange
,
onChange
,
fullWidth
,
fullWidth
,
error
=
false
,
helpertext
,
...
other
...
other
}
=
props
;
}
=
props
;
...
@@ -151,6 +158,7 @@ export default function MySelect(props: IProps) {
...
@@ -151,6 +158,7 @@ export default function MySelect(props: IProps) {
})
})
:
null
}
:
null
}
</
Select
>
</
Select
>
{
helpertext
&&
error
&&
<
FormHelperText
>
{
helpertext
}
</
FormHelperText
>
}
</
FormControl
>
</
FormControl
>
</
ThemeProvider
>
</
ThemeProvider
>
);
);
...
...
src/views/Project/ProjectData/AddFolder/index.tsx
View file @
3144251a
...
@@ -7,6 +7,7 @@ import { useMessage } from "@/components/MySnackbar";
...
@@ -7,6 +7,7 @@ import { useMessage } from "@/components/MySnackbar";
import
CloudEController
from
"@/api/fileserver/CloudEController"
;
import
CloudEController
from
"@/api/fileserver/CloudEController"
;
import
usePass
from
"@/hooks/usePass"
;
import
usePass
from
"@/hooks/usePass"
;
import
InputAdornment
from
"@mui/material/InputAdornment"
;
import
InputAdornment
from
"@mui/material/InputAdornment"
;
import
MyInput
from
"@/components/mui/MyInput"
;
import
MyButton
from
"@/components/mui/MyButton"
;
import
MyButton
from
"@/components/mui/MyButton"
;
type
IAddFolderProps
=
{
type
IAddFolderProps
=
{
...
@@ -93,7 +94,7 @@ const AddFolder = (props: IAddFolderProps) => {
...
@@ -93,7 +94,7 @@ const AddFolder = (props: IAddFolderProps) => {
return
(
return
(
<>
<>
<
MyButton
<
MyButton
text=
'新建文件夹'
text=
"新建文件夹"
variant=
"outlined"
variant=
"outlined"
size=
"small"
size=
"small"
onClick=
{
()
=>
setDeleteDialogOpen
(
true
)
}
onClick=
{
()
=>
setDeleteDialogOpen
(
true
)
}
...
@@ -108,11 +109,10 @@ const AddFolder = (props: IAddFolderProps) => {
...
@@ -108,11 +109,10 @@ const AddFolder = (props: IAddFolderProps) => {
onConfirm=
{
handleAddSubmit
}
onConfirm=
{
handleAddSubmit
}
title=
"新建文件夹"
title=
"新建文件夹"
>
>
<
TextField
<
div
style=
{
{
padding
:
"12px 0"
}
}
>
<
MyInput
sx=
{
{
sx=
{
{
width
:
"388px"
,
width
:
"388px"
,
border
:
"1px solide #E6E8EB"
,
marginTop
:
"12px"
,
}
}
}
}
required
required
error=
{
fileNameCheck
.
error
}
error=
{
fileNameCheck
.
error
}
...
@@ -129,8 +129,9 @@ const AddFolder = (props: IAddFolderProps) => {
...
@@ -129,8 +129,9 @@ const AddFolder = (props: IAddFolderProps) => {
</
InputAdornment
>
</
InputAdornment
>
),
),
}
}
}
}
size=
"small
"
size=
"medium
"
/>
/>
</
div
>
</
MyDialog
>
</
MyDialog
>
</>
</>
);
);
...
...
src/views/Project/ProjectData/index.tsx
View file @
3144251a
...
@@ -370,9 +370,9 @@ const ProjectData = observer(() => {
...
@@ -370,9 +370,9 @@ const ProjectData = observer(() => {
text=
"下载"
text=
"下载"
style=
{
{
style=
{
{
position
:
"relative"
,
position
:
"relative"
,
left
:
"-1
6
px"
,
left
:
"-1
0
px"
,
minWidth
:
"10px"
,
minWidth
:
"10px"
,
marginRight
:
"
10px"
,
padding
:
"0
10px"
,
visibility
:
visibility
:
item
.
type
!==
"dataSet"
&&
item
.
type
!==
"directory"
item
.
type
!==
"dataSet"
&&
item
.
type
!==
"directory"
?
"visible"
?
"visible"
...
@@ -388,9 +388,9 @@ const ProjectData = observer(() => {
...
@@ -388,9 +388,9 @@ const ProjectData = observer(() => {
text=
"移动至"
text=
"移动至"
style=
{
{
style=
{
{
position
:
"relative"
,
position
:
"relative"
,
left
:
"-1
6
px"
,
left
:
"-1
0
px"
,
minWidth
:
"10px"
,
minWidth
:
"10px"
,
marginRight
:
"
10px"
,
padding
:
"0
10px"
,
}
}
}
}
variant=
"text"
variant=
"text"
size=
"medium"
size=
"medium"
...
@@ -407,9 +407,9 @@ const ProjectData = observer(() => {
...
@@ -407,9 +407,9 @@ const ProjectData = observer(() => {
text=
"删除"
text=
"删除"
style=
{
{
style=
{
{
position
:
"relative"
,
position
:
"relative"
,
left
:
"-1
6
px"
,
left
:
"-1
0
px"
,
minWidth
:
"10px"
,
minWidth
:
"10px"
,
marginRight
:
"
10px"
,
padding
:
"0
10px"
,
}
}
}
}
variant=
"text"
variant=
"text"
size=
"medium"
size=
"medium"
...
@@ -541,6 +541,7 @@ const ProjectData = observer(() => {
...
@@ -541,6 +541,7 @@ const ProjectData = observer(() => {
value=
{
keyWord
}
value=
{
keyWord
}
required
required
size=
"small"
size=
"small"
// size="medium"
placeholder=
"输入关键词搜索"
placeholder=
"输入关键词搜索"
onChange=
{
handleKeyWordChange
}
onChange=
{
handleKeyWordChange
}
onKeyUp=
{
handleKeyWordChangeKeyUp
}
onKeyUp=
{
handleKeyWordChangeKeyUp
}
...
@@ -549,13 +550,11 @@ const ProjectData = observer(() => {
...
@@ -549,13 +550,11 @@ const ProjectData = observer(() => {
<
SearchIcon
<
SearchIcon
className=
{
style
.
searchIcon
}
className=
{
style
.
searchIcon
}
style=
{
{
style=
{
{
color
:
"#999"
,
color
:
"rgba(153, 153, 153, 1)"
,
cursor
:
"pointer"
,
fontSize
:
"22px"
,
fontSize
:
"22px"
,
position
:
"relative"
,
position
:
"relative"
,
left
:
"4px"
,
left
:
"4px"
,
}
}
}
}
onClick=
{
handleRefresh
}
/>
/>
),
),
}
}
}
}
...
...
src/views/Project/ProjectJobDetail/index.module.css
View file @
3144251a
...
@@ -30,7 +30,7 @@
...
@@ -30,7 +30,7 @@
line-height
:
22px
;
line-height
:
22px
;
font-size
:
14px
;
font-size
:
14px
;
color
:
rgba
(
30
,
38
,
51
,
1
);
color
:
rgba
(
30
,
38
,
51
,
1
);
font-weight
:
6
00
;
font-weight
:
7
00
;
}
}
.swContent
{
.swContent
{
...
@@ -74,7 +74,7 @@
...
@@ -74,7 +74,7 @@
font-size
:
14px
;
font-size
:
14px
;
}
}
.outputLiLeftImg
{
.outputLiLeftImg
{
margin-right
:
15
px
;
margin-right
:
12
px
;
}
}
.outputLiRight
{
.outputLiRight
{
color
:
rgba
(
138
,
144
,
153
,
1
);
color
:
rgba
(
138
,
144
,
153
,
1
);
...
...
src/views/Project/ProjectSubmitWork/ConfigForm/index.tsx
View file @
3144251a
...
@@ -7,12 +7,11 @@ import MyInput from "@/components/mui/MyInput";
...
@@ -7,12 +7,11 @@ import MyInput from "@/components/mui/MyInput";
import
FileSelect
,
{
import
FileSelect
,
{
FileSelectType
,
FileSelectType
,
}
from
"@/components/BusinessComponents/FileSelect"
;
}
from
"@/components/BusinessComponents/FileSelect"
;
import
MySelect
,
{
optionsTransform
}
from
"../components
/MySelect"
;
import
MySelect
from
"@/components/mui
/MySelect"
;
import
MyCheckBox
from
"@/components/mui/MyCheckBox"
;
import
MyCheckBox
from
"@/components/mui/MyCheckBox"
;
import
MyRadio
from
"@/components/mui/MyRadio"
;
import
MyRadio
from
"@/components/mui/MyRadio"
;
import
{
getCheckResult
}
from
"../util"
;
import
{
getCheckResult
}
from
"../util"
;
import
fileSelectIcon
from
"@/assets/project/fileSelect.svg"
;
import
fileSelectIcon
from
"@/assets/project/fileSelect.svg"
;
import
questionMark
from
"@/assets/project/questionMark.svg"
;
import
tipsIcon
from
"@/assets/project/tipsIcon.svg"
;
import
tipsIcon
from
"@/assets/project/tipsIcon.svg"
;
import
jobSueIcon
from
"@/assets/project/jobSue.svg"
;
import
jobSueIcon
from
"@/assets/project/jobSue.svg"
;
import
{
IParameter
}
from
"../interface"
;
import
{
IParameter
}
from
"../interface"
;
...
@@ -214,6 +213,7 @@ const ConfigForm = (props: ConfigFormProps) => {
...
@@ -214,6 +213,7 @@ const ConfigForm = (props: ConfigFormProps) => {
{
parameter
.
classTypeName
}
{
parameter
.
classTypeName
}
</
span
>
</
span
>
</
div
>
</
div
>
<
MyTooltip
title=
{
parameter
.
description
}
placement=
"right"
>
<
div
className=
{
styles
.
parameterContent
}
>
<
div
className=
{
styles
.
parameterContent
}
>
{
parameter
.
domType
.
toLowerCase
()
===
"file"
&&
(
{
parameter
.
domType
.
toLowerCase
()
===
"file"
&&
(
<
MyInput
<
MyInput
...
@@ -236,6 +236,7 @@ const ConfigForm = (props: ConfigFormProps) => {
...
@@ -236,6 +236,7 @@ const ConfigForm = (props: ConfigFormProps) => {
placeholder=
"请选择"
placeholder=
"请选择"
error=
{
parameter
.
error
||
false
}
error=
{
parameter
.
error
||
false
}
helperText=
{
parameter
.
helperText
}
helperText=
{
parameter
.
helperText
}
size=
"medium"
></
MyInput
>
></
MyInput
>
)
}
)
}
{
parameter
.
domType
.
toLowerCase
()
===
"path"
&&
(
{
parameter
.
domType
.
toLowerCase
()
===
"path"
&&
(
...
@@ -259,6 +260,7 @@ const ConfigForm = (props: ConfigFormProps) => {
...
@@ -259,6 +260,7 @@ const ConfigForm = (props: ConfigFormProps) => {
placeholder=
"请选择"
placeholder=
"请选择"
error=
{
parameter
.
error
||
false
}
error=
{
parameter
.
error
||
false
}
helperText=
{
parameter
.
helperText
}
helperText=
{
parameter
.
helperText
}
size=
"medium"
></
MyInput
>
></
MyInput
>
)
}
)
}
{
parameter
.
domType
.
toLowerCase
()
===
"dataset"
&&
(
{
parameter
.
domType
.
toLowerCase
()
===
"dataset"
&&
(
...
@@ -282,6 +284,7 @@ const ConfigForm = (props: ConfigFormProps) => {
...
@@ -282,6 +284,7 @@ const ConfigForm = (props: ConfigFormProps) => {
placeholder=
"请选择"
placeholder=
"请选择"
error=
{
parameter
.
error
||
false
}
error=
{
parameter
.
error
||
false
}
helperText=
{
parameter
.
helperText
}
helperText=
{
parameter
.
helperText
}
size=
"medium"
></
MyInput
>
></
MyInput
>
)
}
)
}
{
parameter
.
domType
.
toLowerCase
()
===
"input"
&&
(
{
parameter
.
domType
.
toLowerCase
()
===
"input"
&&
(
...
@@ -298,6 +301,7 @@ const ConfigForm = (props: ConfigFormProps) => {
...
@@ -298,6 +301,7 @@ const ConfigForm = (props: ConfigFormProps) => {
placeholder=
"请输入"
placeholder=
"请输入"
error=
{
parameter
.
error
||
false
}
error=
{
parameter
.
error
||
false
}
helperText=
{
parameter
.
helperText
}
helperText=
{
parameter
.
helperText
}
size=
"medium"
></
MyInput
>
></
MyInput
>
)
}
)
}
{
parameter
.
domType
.
toLowerCase
()
===
"select"
&&
(
{
parameter
.
domType
.
toLowerCase
()
===
"select"
&&
(
...
@@ -310,7 +314,8 @@ const ConfigForm = (props: ConfigFormProps) => {
...
@@ -310,7 +314,8 @@ const ConfigForm = (props: ConfigFormProps) => {
}
}
error=
{
parameter
.
error
||
false
}
error=
{
parameter
.
error
||
false
}
helpertext=
{
parameter
.
helperText
}
helpertext=
{
parameter
.
helperText
}
options=
{
optionsTransform
(
parameter
?.
choices
||
[],
"label"
)
}
options=
{
parameter
?.
choices
||
[]
}
fullWidth
></
MySelect
>
></
MySelect
>
)
}
)
}
{
parameter
.
domType
.
toLowerCase
()
===
"multipleselect"
&&
(
{
parameter
.
domType
.
toLowerCase
()
===
"multipleselect"
&&
(
...
@@ -324,7 +329,8 @@ const ConfigForm = (props: ConfigFormProps) => {
...
@@ -324,7 +329,8 @@ const ConfigForm = (props: ConfigFormProps) => {
multiple=
{
true
}
multiple=
{
true
}
error=
{
parameter
.
error
||
false
}
error=
{
parameter
.
error
||
false
}
helpertext=
{
parameter
.
helperText
}
helpertext=
{
parameter
.
helperText
}
options=
{
optionsTransform
(
parameter
.
choices
,
"label"
)
}
options=
{
parameter
?.
choices
||
[]
}
fullWidth
></
MySelect
>
></
MySelect
>
)
}
)
}
{
parameter
.
domType
.
toLowerCase
()
===
"radio"
&&
(
{
parameter
.
domType
.
toLowerCase
()
===
"radio"
&&
(
...
@@ -335,7 +341,7 @@ const ConfigForm = (props: ConfigFormProps) => {
...
@@ -335,7 +341,7 @@ const ConfigForm = (props: ConfigFormProps) => {
}
}
onFocus=
{
()
=>
setSelectedBatchNodeId
(
batchId
||
""
)
}
onFocus=
{
()
=>
setSelectedBatchNodeId
(
batchId
||
""
)
}
onBlur=
{
()
=>
setSelectedBatchNodeId
(
""
)
}
onBlur=
{
()
=>
setSelectedBatchNodeId
(
""
)
}
options=
{
optionsTransform
(
parameter
.
choices
,
"label"
)
}
options=
{
parameter
?.
choices
||
[]
}
error=
{
parameter
.
error
||
false
}
error=
{
parameter
.
error
||
false
}
helperText=
{
parameter
.
helperText
}
helperText=
{
parameter
.
helperText
}
></
MyRadio
>
></
MyRadio
>
...
@@ -354,23 +360,15 @@ const ConfigForm = (props: ConfigFormProps) => {
...
@@ -354,23 +360,15 @@ const ConfigForm = (props: ConfigFormProps) => {
parameter
.
name
||
""
parameter
.
name
||
""
)
)
}
}
options=
{
optionsTransform
(
parameter
.
choices
,
"label"
)
}
options=
{
parameter
?.
choices
||
[]
}
onFocus=
{
()
=>
setSelectedBatchNodeId
(
batchId
||
""
)
}
onFocus=
{
()
=>
setSelectedBatchNodeId
(
batchId
||
""
)
}
onBlur=
{
()
=>
setSelectedBatchNodeId
(
""
)
}
onBlur=
{
()
=>
setSelectedBatchNodeId
(
""
)
}
error=
{
parameter
.
error
||
false
}
error=
{
parameter
.
error
||
false
}
helperText=
{
parameter
.
helperText
}
helperText=
{
parameter
.
helperText
}
/>
/>
)
}
)
}
{
parameter
.
description
&&
(
<
MyTooltip
title=
{
parameter
.
description
}
placement=
"top"
>
<
img
className=
{
styles
.
parameterDesc
}
src=
{
questionMark
}
alt=
""
/>
</
MyTooltip
>
)
}
</
div
>
</
div
>
</
MyTooltip
>
</
div
>
</
div
>
);
);
});
});
...
...
src/views/Project/ProjectSubmitWork/interface.ts
View file @
3144251a
...
@@ -85,7 +85,7 @@ export type IValidator = {
...
@@ -85,7 +85,7 @@ export type IValidator = {
export
interface
IChoice
{
export
interface
IChoice
{
label
:
string
;
label
:
string
;
value
:
boolean
|
string
|
number
;
value
:
string
;
}
}
export
interface
IEdge
{
export
interface
IEdge
{
...
...
src/views/WorkFlowEdit/components/ParameterSetting/index.tsx
View file @
3144251a
...
@@ -9,9 +9,10 @@ import {
...
@@ -9,9 +9,10 @@ import {
import
noTemplate
from
"@/assets/project/noTemplate.svg"
;
import
noTemplate
from
"@/assets/project/noTemplate.svg"
;
import
MyInput
from
"@/components/mui/MyInput"
;
import
MyInput
from
"@/components/mui/MyInput"
;
import
MyCheckBox
from
"@/components/mui/MyCheckBox"
;
import
MyCheckBox
from
"@/components/mui/MyCheckBox"
;
import
MySelect
,
{
// import MySelect, {
optionsTransform
,
// optionsTransform,
}
from
"../../../Project/ProjectSubmitWork/components/MySelect"
;
// } from "../../../Project/ProjectSubmitWork/components/MySelect";
import
MySelect
from
"@/components/mui/MySelect"
;
import
FileSelect
,
{
import
FileSelect
,
{
FileSelectType
,
FileSelectType
,
}
from
"@/components/BusinessComponents/FileSelect"
;
}
from
"@/components/BusinessComponents/FileSelect"
;
...
@@ -397,7 +398,7 @@ const ParameterSetting = (props: IParameterSettingProps) => {
...
@@ -397,7 +398,7 @@ const ParameterSetting = (props: IParameterSettingProps) => {
const
renderInput
=
useCallback
(
const
renderInput
=
useCallback
(
(
parameter
:
IParameter
)
=>
{
(
parameter
:
IParameter
)
=>
{
return
(
return
(
<
MyTooltip
title=
{
parameter
.
description
}
placement=
"
top
"
>
<
MyTooltip
title=
{
parameter
.
description
}
placement=
"
right
"
>
<
div
>
<
div
>
{
parameter
.
domType
.
toLowerCase
()
===
"file"
&&
(
{
parameter
.
domType
.
toLowerCase
()
===
"file"
&&
(
<
MyInput
<
MyInput
...
@@ -494,7 +495,7 @@ const ParameterSetting = (props: IParameterSettingProps) => {
...
@@ -494,7 +495,7 @@ const ParameterSetting = (props: IParameterSettingProps) => {
}
}
error=
{
parameter
.
error
||
false
}
error=
{
parameter
.
error
||
false
}
helpertext=
{
parameter
.
helperText
}
helpertext=
{
parameter
.
helperText
}
options=
{
optionsTransform
(
parameter
?.
choices
||
[],
"label"
)
}
options=
{
parameter
?.
choices
||
[]
}
disabled=
{
parameter
.
parameterGroup
===
"out"
}
disabled=
{
parameter
.
parameterGroup
===
"out"
}
></
MySelect
>
></
MySelect
>
)
}
)
}
...
@@ -507,7 +508,7 @@ const ParameterSetting = (props: IParameterSettingProps) => {
...
@@ -507,7 +508,7 @@ const ParameterSetting = (props: IParameterSettingProps) => {
multiple=
{
true
}
multiple=
{
true
}
error=
{
parameter
.
error
||
false
}
error=
{
parameter
.
error
||
false
}
helpertext=
{
parameter
.
helperText
}
helpertext=
{
parameter
.
helperText
}
options=
{
optionsTransform
(
parameter
.
choices
,
"label"
)
}
options=
{
parameter
?.
choices
||
[]
}
disabled=
{
parameter
.
parameterGroup
===
"out"
}
disabled=
{
parameter
.
parameterGroup
===
"out"
}
></
MySelect
>
></
MySelect
>
)
}
)
}
...
@@ -517,7 +518,7 @@ const ParameterSetting = (props: IParameterSettingProps) => {
...
@@ -517,7 +518,7 @@ const ParameterSetting = (props: IParameterSettingProps) => {
onChange=
{
(
e
:
any
)
=>
onChange=
{
(
e
:
any
)
=>
handleParameterChange
(
e
,
parameter
.
name
||
""
)
handleParameterChange
(
e
,
parameter
.
name
||
""
)
}
}
options=
{
optionsTransform
(
parameter
.
choices
,
"label"
)
}
options=
{
parameter
?.
choices
||
[]
}
error=
{
parameter
.
error
||
false
}
error=
{
parameter
.
error
||
false
}
helperText=
{
parameter
.
helperText
}
helperText=
{
parameter
.
helperText
}
></
MyRadio
>
></
MyRadio
>
...
@@ -535,7 +536,7 @@ const ParameterSetting = (props: IParameterSettingProps) => {
...
@@ -535,7 +536,7 @@ const ParameterSetting = (props: IParameterSettingProps) => {
parameter
.
name
||
""
parameter
.
name
||
""
)
)
}
}
options=
{
optionsTransform
(
parameter
.
choices
,
"label"
)
}
options=
{
parameter
?.
choices
||
[]
}
error=
{
parameter
.
error
||
false
}
error=
{
parameter
.
error
||
false
}
helperText=
{
parameter
.
helperText
}
helperText=
{
parameter
.
helperText
}
></
MyCheckBox
>
></
MyCheckBox
>
...
...
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