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
41da8b2d
Commit
41da8b2d
authored
Jul 06, 2022
by
chenshouchao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 新增按钮样式的单选组组件
parent
92ced994
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
142 additions
and
61 deletions
+142
-61
index.module.css
...CommonComponents/RadioGroupOfButtonStyle/index.module.css
+29
-0
index.tsx
...onents/CommonComponents/RadioGroupOfButtonStyle/index.tsx
+39
-0
index.tsx
src/views/Project/ProjectSubmitWork/index.tsx
+74
-61
addTemplate.tsx
...ectWorkbench/workbenchTemplate/components/addTemplate.tsx
+0
-0
index.tsx
...iews/Project/ProjectWorkbench/workbenchTemplate/index.tsx
+0
-0
No files found.
src/components/CommonComponents/RadioGroupOfButtonStyle/index.module.css
0 → 100644
View file @
41da8b2d
.RadiosBox
{
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
border
:
1px
solid
#e6e8eb
;
border-radius
:
4px
;
background-color
:
#e6e8eb
;
cursor
:
pointer
;
height
:
32px
;
box-sizing
:
border-box
;
padding
:
2px
;
}
.radio
{
height
:
28px
;
box-sizing
:
border-box
;
font-size
:
14px
;
color
:
#565c66
;
border-radius
:
4px
;
line-height
:
20px
;
padding
:
3px
18px
;
background-color
:
#e6e8eb
;
display
:
flex
;
align-items
:
center
;
}
.radioActive
{
color
:
#1370ff
;
background-color
:
#fff
;
border
:
1px
solid
#e6e8eb
;
}
src/components/CommonComponents/RadioGroupOfButtonStyle/index.tsx
0 → 100644
View file @
41da8b2d
// 按钮样式的单选组
import
classnames
from
"classnames"
;
import
style
from
"./index.module.css"
;
type
radioOption
=
{
value
:
string
;
label
:
string
;
};
type
IRadioGroupOfButtonStyleProps
=
{
radioOptions
:
Array
<
radioOption
>
;
value
:
string
;
handleRadio
:
any
;
};
const
RadioGroupOfButtonStyle
=
(
props
:
IRadioGroupOfButtonStyleProps
)
=>
{
const
{
radioOptions
,
value
,
handleRadio
}
=
props
;
return
(
<
div
className=
{
style
.
RadiosBox
}
>
{
radioOptions
.
map
((
options
)
=>
{
return
(
<
div
key=
{
options
.
value
}
className=
{
classnames
({
[
style
.
radio
]:
true
,
[
style
.
radioActive
]:
value
===
options
.
value
,
})
}
onClick=
{
()
=>
handleRadio
(
options
.
value
)
}
>
{
options
.
label
}
</
div
>
);
})
}
</
div
>
);
};
export
default
RadioGroupOfButtonStyle
;
src/views/Project/ProjectSubmitWork/index.tsx
View file @
41da8b2d
...
...
@@ -30,7 +30,6 @@ import MyPopconfirm from "@/components/mui/MyPopconfirm";
import
styles
from
"./index.module.css"
;
const
ProjectSubmitWork
=
()
=>
{
const
Message
=
useMessage
();
const
{
currentProjectStore
}
=
useStores
();
...
...
@@ -67,7 +66,14 @@ const ProjectSubmitWork = () => {
task
.
parameters
.
forEach
((
parameter
)
=>
{
let
value
:
any
=
undefined
;
if
(
parameter
.
defaultValue
)
{
value
=
parameter
.
defaultValue
;
if
(
parameter
.
domType
.
toLowerCase
()
===
"multipleselect"
||
parameter
.
domType
.
toLowerCase
()
===
"checkbox"
)
{
value
=
parameter
.
defaultValue
.
split
(
","
);
}
else
{
value
=
parameter
.
defaultValue
;
}
}
else
if
(
parameter
.
domType
.
toLowerCase
()
===
"multipleselect"
||
parameter
.
domType
.
toLowerCase
()
===
"checkbox"
...
...
@@ -192,71 +198,78 @@ const ProjectSubmitWork = () => {
return
(
<
div
className=
{
styles
.
swBox
}
>
{
fullScreenShow
?
null
:
<
div
className=
{
styles
.
swHeader
}
>
<
div
className=
{
styles
.
swHeaderLeft
}
>
<
MyPopconfirm
title=
"返回后,当前页面已填写内容将不保存,确认返回吗?"
onConfirm=
{
handleGoBack
}
>
<
IconButton
color=
"primary"
// onClick=
{()
=
>
handleGoBack()}
aria-label="upload picture"
component="span"
size="small"
{
fullScreenShow
?
null
:
(
<
div
className=
{
styles
.
swHeader
}
>
<
div
className=
{
styles
.
swHeaderLeft
}
>
<
MyPopconfirm
title=
"返回后,当前页面已填写内容将不保存,确认返回吗?"
onConfirm=
{
handleGoBack
}
>
<
ArrowBackIosNewIcon
sx=
{
{
color
:
"rgba(194, 198, 204, 1)"
,
width
:
"12px"
,
height
:
"12px"
,
}
}
/>
</
IconButton
>
</
MyPopconfirm
>
<
IconButton
color=
"primary"
// onClick=
{()
=
>
handleGoBack()}
aria-label="upload picture"
component="span"
size="small"
>
<
ArrowBackIosNewIcon
sx=
{
{
color
:
"rgba(194, 198, 204, 1)"
,
width
:
"12px"
,
height
:
"12px"
,
}
}
/>
</
IconButton
>
</
MyPopconfirm
>
<
div
className=
{
styles
.
swTemplateTitle
}
>
{
templateConfigInfo
?.
title
}
<
div
className=
{
styles
.
swTemplateTitle
}
>
{
templateConfigInfo
?.
title
}
</
div
>
<
div
className=
{
styles
.
swTemplateVersionBox
}
>
<
span
className=
{
styles
.
swHeaderLable
}
>
版本:
</
span
>
<
span
className=
{
styles
.
swHeaderValue
}
>
{
templateConfigInfo
?.
languageVersion
}
</
span
>
</
div
>
<
div
className=
{
styles
.
swTemplateUpdateTimeBox
}
>
<
span
className=
{
styles
.
swHeaderLable
}
>
更新时间:
</
span
>
<
span
className=
{
styles
.
swHeaderValue
}
>
{
templateConfigInfo
?.
updateTime
?
moment
(
templateConfigInfo
?.
updateTime
).
format
(
"YYYY-MM-DD HH:mm:ss"
)
:
"-"
}
</
span
>
</
div
>
<
div
className=
{
styles
.
swHeaderGoback
}
></
div
>
</
div
>
<
div
className=
{
styles
.
swTemplateVersionBox
}
>
<
span
className=
{
styles
.
swHeaderLable
}
>
版本:
</
span
>
<
span
className=
{
styles
.
swHeaderValue
}
>
{
templateConfigInfo
?.
languageVersion
}
</
span
>
</
div
>
<
div
className=
{
styles
.
swTemplateUpdateTimeBox
}
>
<
span
className=
{
styles
.
swHeaderLable
}
>
更新时间:
</
span
>
<
span
className=
{
styles
.
swHeaderValue
}
>
{
templateConfigInfo
?.
updateTime
?
moment
(
templateConfigInfo
?.
updateTime
).
format
(
"YYYY-MM-DD HH:mm:ss"
)
:
"-"
}
</
span
>
<
div
className=
{
styles
.
swHeaderRight
}
>
<
MyPopconfirm
title=
"提交前请先确认参数填写无误,确认提交吗?"
onConfirm=
{
handleSubmitForm
}
>
<
ButtonComponent
text=
"提交任务"
// click=
{
handleSubmitForm
}
></
ButtonComponent
>
</
MyPopconfirm
>
</
div
>
<
div
className=
{
styles
.
swHeaderGoback
}
></
div
>
</
div
>
<
div
className=
{
styles
.
swHeaderRight
}
>
<
MyPopconfirm
title=
"提交前请先确认参数填写无误,确认提交吗?"
onConfirm=
{
handleSubmitForm
}
>
<
ButtonComponent
text=
"提交任务"
// click=
{
handleSubmitForm
}
></
ButtonComponent
>
</
MyPopconfirm
>
</
div
>
</
div
>
}
)
}
<
div
className=
{
styles
.
swContent
}
>
{
fullScreenShow
?
null
:
<
div
className=
{
styles
.
swFormBox
}
>
<
ConfigForm
onRef=
{
configFormRef
}
templateConfigInfo=
{
templateConfigInfo
}
setParameter=
{
setParameter
}
/>
</
div
>
}
<
div
className=
{
styles
.
swFlowBox
}
style=
{
fullScreenShow
?
{
height
:
"100vh"
}
:
undefined
}
>
{
fullScreenShow
?
null
:
(
<
div
className=
{
styles
.
swFormBox
}
>
<
ConfigForm
onRef=
{
configFormRef
}
templateConfigInfo=
{
templateConfigInfo
}
setParameter=
{
setParameter
}
/>
</
div
>
)
}
<
div
className=
{
styles
.
swFlowBox
}
style=
{
fullScreenShow
?
{
height
:
"100vh"
}
:
undefined
}
>
<
WorkFlow
templateConfigInfo=
{
templateConfigInfo
}
/>
</
div
>
</
div
>
...
...
src/views/Project/ProjectWorkbench/workbenchTemplate/components/addTemplate.tsx
View file @
41da8b2d
This diff is collapsed.
Click to expand it.
src/views/Project/ProjectWorkbench/workbenchTemplate/index.tsx
View file @
41da8b2d
This diff is collapsed.
Click to expand it.
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