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
72f8ff82
Commit
72f8ff82
authored
Jul 08, 2022
by
chenshouchao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 删除不必要的引用
parent
0388a4d0
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
336 additions
and
328 deletions
+336
-328
raysyncApi.ts
src/api/fileserver/raysyncApi.ts
+3
-3
index.tsx
src/views/Project/ProjectSetting/ProjectMembers/index.tsx
+0
-1
index.tsx
src/views/Project/ProjectSubmitWork/ConfigForm/index.tsx
+2
-3
index.tsx
src/views/Project/ProjectSubmitWork/index.tsx
+3
-2
index.tsx
src/views/Project/ProjectWorkbench/workbenchList/index.tsx
+167
-130
index.tsx
...kbench/workbenchTemplate/components/AddTemplate/index.tsx
+1
-1
index.module.css
...oject/ProjectWorkbench/workbenchTemplate/index.module.css
+9
-9
index.tsx
...iews/Project/ProjectWorkbench/workbenchTemplate/index.tsx
+2
-79
index.tsx
src/views/WorkFlowEdit/components/OperatorList/index.tsx
+0
-1
button.tsx
src/views/mui_demo/button.tsx
+117
-64
input.tsx
src/views/mui_demo/input.tsx
+32
-35
No files found.
src/api/fileserver/raysyncApi.ts
View file @
72f8ff82
...
@@ -28,9 +28,9 @@ const APIPORT = function () {
...
@@ -28,9 +28,9 @@ const APIPORT = function () {
};
};
// 当前计算区
// 当前计算区
let
currentRegion
=
localStorage
.
getItem
(
"current-region"
);
//
let currentRegion = localStorage.getItem("current-region");
let
currentRegionJson
=
currentRegion
&&
JSON
.
parse
(
currentRegion
);
//
let currentRegionJson = currentRegion && JSON.parse(currentRegion);
let
user
=
getLoaclStorageOfKey
(
"userinfo"
);
//
let user = getLoaclStorageOfKey("userinfo");
// 文件路径
// 文件路径
// const FILEPATH =
// const FILEPATH =
...
...
src/views/Project/ProjectSetting/ProjectMembers/index.tsx
View file @
72f8ff82
...
@@ -24,7 +24,6 @@ import styles from "./index.module.css";
...
@@ -24,7 +24,6 @@ import styles from "./index.module.css";
import
{
IDialogInfo
}
from
"./interface"
;
import
{
IDialogInfo
}
from
"./interface"
;
import
{
toJS
}
from
"mobx"
;
import
{
toJS
}
from
"mobx"
;
import
{
useStores
}
from
"@/store"
;
import
{
useStores
}
from
"@/store"
;
import
{
isProjectOwner
}
from
"@/utils/util"
;
import
{
observer
}
from
"mobx-react"
;
import
{
observer
}
from
"mobx-react"
;
const
ProjectMembers
=
observer
(()
=>
{
const
ProjectMembers
=
observer
(()
=>
{
...
...
src/views/Project/ProjectSubmitWork/ConfigForm/index.tsx
View file @
72f8ff82
import
{
ITemplateConfig
,
IRenderTasks
,
IRenderTask
}
from
"../interface"
;
import
{
ITemplateConfig
,
IRenderTasks
}
from
"../interface"
;
import
styles
from
"./index.module.css"
;
import
styles
from
"./index.module.css"
;
import
MyInput
from
"@/components/mui/MyInput"
;
import
MyInput
from
"@/components/mui/MyInput"
;
import
Tooltip
from
"@mui/material/Tooltip"
;
import
Tooltip
from
"@mui/material/Tooltip"
;
import
classnames
from
"classnames"
;
import
classnames
from
"classnames"
;
import
{
useState
,
useMemo
,
useImperativeHandle
,
useCallback
}
from
"react"
;
import
{
useState
,
useMemo
,
useImperativeHandle
}
from
"react"
;
import
FileSelect
from
"@/components/FileSelect"
;
import
FileSelect
from
"@/components/FileSelect"
;
import
moment
from
"moment"
;
import
moment
from
"moment"
;
import
MySelect
,
{
optionsTransform
}
from
"../components/MySelect"
;
import
MySelect
,
{
optionsTransform
}
from
"../components/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
_
from
"lodash"
;
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
questionMark
from
"@/assets/project/questionMark.svg"
;
...
...
src/views/Project/ProjectSubmitWork/index.tsx
View file @
72f8ff82
...
@@ -26,11 +26,12 @@ import fullScreen from "@/assets/project/fullScreen.svg";
...
@@ -26,11 +26,12 @@ import fullScreen from "@/assets/project/fullScreen.svg";
import
partialScreen
from
"@/assets/project/partialScreen.svg"
;
import
partialScreen
from
"@/assets/project/partialScreen.svg"
;
import
{
useMessage
}
from
"@/components/MySnackbar"
;
import
{
useMessage
}
from
"@/components/MySnackbar"
;
import
{
useStores
}
from
"@/store"
;
import
{
useStores
}
from
"@/store"
;
import
{
observer
}
from
"mobx-react-lite"
;
import
MyPopconfirm
from
"@/components/mui/MyPopconfirm"
;
import
MyPopconfirm
from
"@/components/mui/MyPopconfirm"
;
import
styles
from
"./index.module.css"
;
import
styles
from
"./index.module.css"
;
const
ProjectSubmitWork
=
()
=>
{
const
ProjectSubmitWork
=
observer
(
()
=>
{
const
Message
=
useMessage
();
const
Message
=
useMessage
();
const
{
currentProjectStore
}
=
useStores
();
const
{
currentProjectStore
}
=
useStores
();
const
projectId
=
toJS
(
currentProjectStore
.
currentProjectInfo
.
id
);
const
projectId
=
toJS
(
currentProjectStore
.
currentProjectInfo
.
id
);
...
@@ -291,6 +292,6 @@ const ProjectSubmitWork = () => {
...
@@ -291,6 +292,6 @@ const ProjectSubmitWork = () => {
/>
/>
</
div
>
</
div
>
);
);
};
}
)
;
export
default
ProjectSubmitWork
;
export
default
ProjectSubmitWork
;
src/views/Project/ProjectWorkbench/workbenchList/index.tsx
View file @
72f8ff82
...
@@ -7,93 +7,96 @@
...
@@ -7,93 +7,96 @@
* @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
*/
*/
import
{
memo
,
useCallback
,
useEffect
,
useState
}
from
"react"
;
import
{
memo
,
useCallback
,
useEffect
,
useState
}
from
"react"
;
import
_
from
"lodash"
;
import
{
useNavigate
}
from
"react-router-dom"
;
import
{
useNavigate
}
from
"react-router-dom"
;
import
{
Box
,
Typography
}
from
"@mui/material"
;
import
{
Box
,
Typography
}
from
"@mui/material"
;
import
OutlinedInput
from
"@mui/material/OutlinedInput"
;
import
OutlinedInput
from
"@mui/material/OutlinedInput"
;
import
SearchIcon
from
"@mui/icons-material/Search"
;
import
SearchIcon
from
"@mui/icons-material/Search"
;
import
LinearProgress
,
{
linearProgressClasses
}
from
'@mui/material/LinearProgress'
;
import
LinearProgress
,
{
import
{
TablePagination
}
from
'@mui/material'
;
linearProgressClasses
,
import
TextField
from
'@mui/material/TextField'
;
}
from
"@mui/material/LinearProgress"
;
import
MenuItem
from
'@mui/material/MenuItem'
;
import
{
TablePagination
}
from
"@mui/material"
;
import
TextField
from
"@mui/material/TextField"
;
import
MenuItem
from
"@mui/material/MenuItem"
;
import
SimpleDialog
from
"./components/simpleDialog"
import
SimpleDialog
from
"./components/simpleDialog"
;
import
{
useStores
}
from
"@/store"
;
import
{
useStores
}
from
"@/store"
;
import
{
observer
}
from
"mobx-react-lite"
;
import
useMyRequest
from
"@/hooks/useMyRequest"
;
import
useMyRequest
from
"@/hooks/useMyRequest"
;
import
ActionsComponent
from
"../../../../components/Material.Ui/Table/ActionsComponent"
import
ActionsComponent
from
"../../../../components/Material.Ui/Table/ActionsComponent"
;
import
runTime
from
'../../../../assets/project/runTime.svg'
import
runTime
from
"../../../../assets/project/runTime.svg"
;
import
jobCost
from
'../../../../assets/project/jobCost.svg'
import
jobCost
from
"../../../../assets/project/jobCost.svg"
;
import
jobSue
from
'../../../../assets/project/jobSue.svg'
import
jobSue
from
"../../../../assets/project/jobSue.svg"
;
import
jobFail
from
'../../../../assets/project/jobFail.svg'
import
jobFail
from
"../../../../assets/project/jobFail.svg"
;
import
jobRun
from
'../../../../assets/project/jobRun.svg'
import
jobRun
from
"../../../../assets/project/jobRun.svg"
;
import
jobCadence
from
'../../../../assets/project/jobCadence.svg'
import
jobCadence
from
"../../../../assets/project/jobCadence.svg"
;
import
jobStop
from
'../../../../assets/project/jobStop.svg'
import
jobStop
from
"../../../../assets/project/jobStop.svg"
;
import
jobDel
from
'../../../../assets/project/jobDel.svg'
import
jobDel
from
"../../../../assets/project/jobDel.svg"
;
import
noData
from
'../../../../assets/project/noTemplate.svg'
import
noData
from
"../../../../assets/project/noTemplate.svg"
;
import
{
import
{
getWorkflowJobList
,
getWorkflowJobList
,
deleteWorkflowJob
,
deleteWorkflowJob
,
cancelWorkflowJob
cancelWorkflowJob
,
}
from
"@/api/workbench_api"
;
}
from
"@/api/workbench_api"
;
import
styles
from
"./index.module.css"
;
import
styles
from
"./index.module.css"
;
import
{
toJS
}
from
"mobx"
;
const
currencies
=
[
const
currencies
=
[
{
{
value
:
'ALL'
,
value
:
"ALL"
,
label
:
'全部'
,
label
:
"全部"
,
},
},
{
{
value
:
'RUNNING'
,
value
:
"RUNNING"
,
label
:
'正在运行'
,
label
:
"正在运行"
,
},
},
{
{
value
:
'SUCCEEDED'
,
value
:
"SUCCEEDED"
,
label
:
'运行成功'
,
label
:
"运行成功"
,
},
},
{
{
value
:
'FAILED'
,
value
:
"FAILED"
,
label
:
'运行失败'
,
label
:
"运行失败"
,
},
},
{
{
value
:
'ABORTED'
,
value
:
"ABORTED"
,
label
:
'运行终止'
,
label
:
"运行终止"
,
},
},
];
];
const
ProjectMembers
=
()
=>
{
const
ProjectMembers
=
observer
(
()
=>
{
const
{
currentProjectStore
}
=
useStores
();
const
{
currentProjectStore
}
=
useStores
();
const
[
jobName
,
setJobName
]
=
useState
(
''
)
const
projectId
=
toJS
(
currentProjectStore
.
currentProjectInfo
.
id
);
const
[
jobList
,
setJobList
]
=
useState
([])
const
[
jobName
,
setJobName
]
=
useState
(
""
);
const
[
currency
,
setCurrency
]
=
useState
(
'ALL'
);
const
[
jobList
,
setJobList
]
=
useState
([]);
const
[
page
,
setPage
]
=
useState
(
0
)
const
[
currency
,
setCurrency
]
=
useState
(
"ALL"
);
const
[
size
,
setSize
]
=
useState
(
10
)
const
[
page
,
setPage
]
=
useState
(
0
);
const
[
rowsPerPage
,
setRowsPerPage
]
=
useState
(
10
)
const
[
size
,
setSize
]
=
useState
(
10
);
const
[
count
,
setCount
]
=
useState
(
0
)
const
[
rowsPerPage
,
setRowsPerPage
]
=
useState
(
10
);
const
[
count
,
setCount
]
=
useState
(
0
);
/** 简单弹窗 */
/** 简单弹窗 */
const
[
jobData
,
setJobData
]
=
useState
(
''
);
const
[
jobData
,
setJobData
]
=
useState
(
""
);
const
[
openDialog
,
setOpenDialog
]
=
useState
(
false
);
const
[
openDialog
,
setOpenDialog
]
=
useState
(
false
);
const
[
dialogType
,
setDialogType
]
=
useState
(
'del'
);
const
[
dialogType
,
setDialogType
]
=
useState
(
"del"
);
// 获取作业列表
// 获取作业列表
const
{
run
:
getWorkflowJobInfo
}
=
useMyRequest
(
getWorkflowJobList
,
{
const
{
run
:
getWorkflowJobInfo
}
=
useMyRequest
(
getWorkflowJobList
,
{
onSuccess
:
(
result
:
any
)
=>
{
onSuccess
:
(
result
:
any
)
=>
{
setJobList
(
result
.
data
.
content
);
setJobList
(
result
.
data
.
content
);
setCount
(
result
.
data
.
totalElements
)
setCount
(
result
.
data
.
totalElements
);
},
},
});
});
const
navigate
=
useNavigate
()
const
navigate
=
useNavigate
();
// 删除作业
// 删除作业
const
{
run
:
delWorkflowJob
}
=
useMyRequest
(
deleteWorkflowJob
,
{
const
{
run
:
delWorkflowJob
}
=
useMyRequest
(
deleteWorkflowJob
,
{
onSuccess
:
(
result
:
any
)
=>
{
onSuccess
:
(
result
:
any
)
=>
{
setOpenDialog
(
false
)
setOpenDialog
(
false
);
getWorkflowJobInfo
({
getWorkflowJobInfo
({
projectId
:
currentProjectStore
.
currentProjectInfo
.
i
d
as
string
,
projectId
:
projectI
d
as
string
,
page
:
page
,
page
:
page
,
size
:
size
,
size
:
size
,
name
:
jobName
,
name
:
jobName
,
state
:
currency
===
'ALL'
?
""
:
currency
state
:
currency
===
"ALL"
?
""
:
currency
,
});
});
},
},
});
});
...
@@ -101,20 +104,20 @@ const ProjectMembers = () => {
...
@@ -101,20 +104,20 @@ const ProjectMembers = () => {
// 删除作业
// 删除作业
const
{
run
:
cancelWorkflowJobInfo
}
=
useMyRequest
(
cancelWorkflowJob
,
{
const
{
run
:
cancelWorkflowJobInfo
}
=
useMyRequest
(
cancelWorkflowJob
,
{
onSuccess
:
(
result
:
any
)
=>
{
onSuccess
:
(
result
:
any
)
=>
{
setOpenDialog
(
false
)
setOpenDialog
(
false
);
getWorkflowJobInfo
({
getWorkflowJobInfo
({
projectId
:
currentProjectStore
.
currentProjectInfo
.
i
d
as
string
,
projectId
:
projectI
d
as
string
,
page
:
page
,
page
:
page
,
size
:
size
,
size
:
size
,
name
:
jobName
,
name
:
jobName
,
state
:
currency
===
'ALL'
?
""
:
currency
state
:
currency
===
"ALL"
?
""
:
currency
,
});
});
},
},
});
});
const
searchChange
=
(
data
:
any
)
=>
{
const
searchChange
=
(
data
:
any
)
=>
{
setJobName
(
data
.
length
>
30
?
data
.
slice
(
0
,
30
)
:
data
);
setJobName
(
data
.
length
>
30
?
data
.
slice
(
0
,
30
)
:
data
);
}
};
const
handleChange
=
(
event
:
any
)
=>
{
const
handleChange
=
(
event
:
any
)
=>
{
setCurrency
(
event
.
target
.
value
);
setCurrency
(
event
.
target
.
value
);
...
@@ -129,104 +132,112 @@ const ProjectMembers = () => {
...
@@ -129,104 +132,112 @@ const ProjectMembers = () => {
const
onConfirm
=
()
=>
{
const
onConfirm
=
()
=>
{
if
(
dialogType
===
"del"
)
{
if
(
dialogType
===
"del"
)
{
delWorkflowJob
({
delWorkflowJob
({
id
:
jobData
id
:
jobData
,
})
});
}
else
{
}
else
{
cancelWorkflowJobInfo
({
cancelWorkflowJobInfo
({
jobid
:
jobData
jobid
:
jobData
,
})
});
}
}
};
};
useEffect
(()
=>
{
useEffect
(()
=>
{
getWorkflowJobInfo
({
getWorkflowJobInfo
({
projectId
:
currentProjectStore
.
currentProjectInfo
.
i
d
as
string
,
projectId
:
projectI
d
as
string
,
page
:
page
,
page
:
page
,
size
:
size
,
size
:
size
,
name
:
jobName
,
name
:
jobName
,
state
:
currency
===
'ALL'
?
""
:
currency
state
:
currency
===
"ALL"
?
""
:
currency
,
});
});
},
[
currentProjectStore
.
currentProjectInfo
.
id
,
getWorkflowJobInfo
]);
},
[
currentProjectStore
.
currentProjectInfo
.
id
,
getWorkflowJobInfo
,
projectId
,
page
,
size
,
jobName
,
currency
,
]);
const
handleChangePage
=
(
event
:
any
,
newPage
:
any
)
=>
{
const
handleChangePage
=
(
event
:
any
,
newPage
:
any
)
=>
{
setPage
(
newPage
)
setPage
(
newPage
);
getWorkflowJobInfo
({
getWorkflowJobInfo
({
projectId
:
currentProjectStore
.
currentProjectInfo
.
i
d
as
string
,
projectId
:
projectI
d
as
string
,
page
:
newPage
,
page
:
newPage
,
size
:
size
,
size
:
size
,
name
:
jobName
,
name
:
jobName
,
state
:
currency
===
'ALL'
?
""
:
currency
state
:
currency
===
"ALL"
?
""
:
currency
,
});
});
}
};
const
handleChangeRowsPerPage
=
(
event
:
any
)
=>
{
const
handleChangeRowsPerPage
=
(
event
:
any
)
=>
{
setRowsPerPage
(
event
.
target
.
value
)
setRowsPerPage
(
event
.
target
.
value
);
setSize
(
event
.
target
.
value
)
setSize
(
event
.
target
.
value
);
getWorkflowJobInfo
({
getWorkflowJobInfo
({
projectId
:
currentProjectStore
.
currentProjectInfo
.
i
d
as
string
,
projectId
:
projectI
d
as
string
,
page
:
page
,
page
:
page
,
size
:
event
.
target
.
value
,
size
:
event
.
target
.
value
,
name
:
jobName
,
name
:
jobName
,
state
:
currency
===
'ALL'
?
""
:
currency
state
:
currency
===
"ALL"
?
""
:
currency
,
});
});
}
};
useEffect
(()
=>
{
useEffect
(()
=>
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
getWorkflowJobInfo
({
getWorkflowJobInfo
({
projectId
:
currentProjectStore
.
currentProjectInfo
.
i
d
as
string
,
projectId
:
projectI
d
as
string
,
page
:
page
,
page
:
page
,
size
:
size
,
size
:
size
,
name
:
jobName
,
name
:
jobName
,
state
:
currency
===
'ALL'
?
""
:
currency
state
:
currency
===
"ALL"
?
""
:
currency
,
});
});
},
300
)
},
300
);
},
[
jobName
,
currency
]);
},
[
jobName
,
currency
,
projectId
,
getWorkflowJobInfo
,
page
,
size
]);
const
renderStatusIcon
=
(
data
:
string
)
=>
{
const
renderStatusIcon
=
(
data
:
string
)
=>
{
switch
(
data
)
{
switch
(
data
)
{
case
"RUNNING"
:
case
"RUNNING"
:
return
jobRun
return
jobRun
;
case
"ABORTED"
:
case
"ABORTED"
:
return
jobCadence
return
jobCadence
;
case
"FAILED"
:
case
"FAILED"
:
return
jobFail
return
jobFail
;
case
"SUCCEEDED"
:
case
"SUCCEEDED"
:
return
jobSue
return
jobSue
;
default
:
default
:
return
jobCadence
return
jobCadence
;
}
}
}
};
const
renderStatusText
=
(
data
:
string
)
=>
{
const
renderStatusText
=
(
data
:
string
)
=>
{
switch
(
data
)
{
switch
(
data
)
{
case
"RUNNING"
:
case
"RUNNING"
:
return
'正在运行'
return
"正在运行"
;
case
"ABORTED"
:
case
"ABORTED"
:
return
'运行终止'
return
"运行终止"
;
case
"FAILED"
:
case
"FAILED"
:
return
'运行失败'
return
"运行失败"
;
case
"SUCCEEDED"
:
case
"SUCCEEDED"
:
return
'运行成功'
return
"运行成功"
;
default
:
default
:
return
'未知'
return
"未知"
;
}
}
}
};
const
renderProgress
=
(
data
:
any
)
=>
{
const
renderProgress
=
(
data
:
any
)
=>
{
switch
(
data
)
{
switch
(
data
)
{
case
"RUNNING"
:
case
"RUNNING"
:
return
'#1370FF'
return
"#1370FF"
;
case
"ABORTED"
:
case
"ABORTED"
:
return
'#C2C6CC'
return
"#C2C6CC"
;
case
"FAILED"
:
case
"FAILED"
:
return
'#FF4E4E'
return
"#FF4E4E"
;
case
"SUCCEEDED"
:
case
"SUCCEEDED"
:
return
'#0DD09B'
return
"#0DD09B"
;
default
:
default
:
return
'#C2C6CC'
return
"#C2C6CC"
;
}
}
}
};
/** 点击每一行 */
/** 点击每一行 */
const
rowClick
=
useCallback
(
const
rowClick
=
useCallback
(
...
@@ -235,16 +246,15 @@ const ProjectMembers = () => {
...
@@ -235,16 +246,15 @@ const ProjectMembers = () => {
state
:
{
taskId
:
id
},
state
:
{
taskId
:
id
},
});
});
},
},
[
navigate
],
[
navigate
]
);
);
return
(
return
(
<
Box
className=
{
styles
.
headerBox
}
>
<
Box
className=
{
styles
.
headerBox
}
>
<
Box
className=
{
styles
.
tabHeader
}
>
<
Box
className=
{
styles
.
tabHeader
}
>
<
OutlinedInput
<
OutlinedInput
onChange=
{
(
e
:
any
)
=>
{
onChange=
{
(
e
:
any
)
=>
{
searchChange
(
e
.
target
.
value
)
searchChange
(
e
.
target
.
value
);
}
}
}
}
value=
{
jobName
}
value=
{
jobName
}
placeholder=
"输入关键词搜索"
placeholder=
"输入关键词搜索"
...
@@ -261,15 +271,16 @@ const ProjectMembers = () => {
...
@@ -261,15 +271,16 @@ const ProjectMembers = () => {
onChange=
{
handleChange
}
onChange=
{
handleChange
}
size=
"small"
size=
"small"
sx=
{
{
sx=
{
{
width
:
180
,
height
:
32
,
width
:
180
,
'& .MuiOutlinedInput-root'
:
{
height
:
32
,
height
:
'32px'
,
"& .MuiOutlinedInput-root"
:
{
height
:
"32px"
,
color
:
"#1E2633"
,
color
:
"#1E2633"
,
fontSize
:
'14px'
fontSize
:
"14px"
,
},
},
'& .MuiInputLabel-root'
:
{
"& .MuiInputLabel-root"
:
{
color
:
"#8A9099"
,
color
:
"#8A9099"
,
fontSize
:
'14px'
fontSize
:
"14px"
,
},
},
}
}
}
}
>
>
...
@@ -280,29 +291,43 @@ const ProjectMembers = () => {
...
@@ -280,29 +291,43 @@ const ProjectMembers = () => {
))
}
))
}
</
TextField
>
</
TextField
>
</
Box
>
</
Box
>
</
Box
>
</
Box
>
<
Box
className=
{
styles
.
body
}
>
<
Box
className=
{
styles
.
body
}
>
{
{
jobList
.
length
===
0
&&
(
jobList
.
length
===
0
&&
<
Box
<
Box
sx=
{
{
sx=
{
{
display
:
'flex'
,
alignItems
:
'center'
,
flexDirection
:
'column'
,
minHeight
:
'calc(100vh - 376px)'
,
display
:
"flex"
,
justifyContent
:
'center'
alignItems
:
"center"
,
}
}
>
flexDirection
:
"column"
,
minHeight
:
"calc(100vh - 376px)"
,
justifyContent
:
"center"
,
}
}
>
<
img
alt=
""
src=
{
noData
}
/>
<
img
alt=
""
src=
{
noData
}
/>
<
Typography
sx=
{
{
fontSize
:
'12px'
,
fontWeight
:
'400'
,
color
:
'#8A9099'
}
}
>
暂未任务
</
Typography
>
<
Typography
sx=
{
{
fontSize
:
"12px"
,
fontWeight
:
"400"
,
color
:
"#8A9099"
}
}
>
暂未任务
</
Typography
>
</
Box
>
</
Box
>
}
)
}
{
{
jobList
.
length
>
0
&&
jobList
.
length
>
0
&&
jobList
.
map
((
item
:
any
,
key
)
=>
{
jobList
.
map
((
item
:
any
,
key
)
=>
{
return
(
return
(
<
Box
className=
{
styles
.
tabBox
}
onClick=
{
()
=>
rowClick
(
item
.
id
)
}
>
<
Box
className=
{
styles
.
tabBox
}
onClick=
{
()
=>
rowClick
(
item
.
id
)
}
>
<
Box
className=
{
styles
.
tabBoxInfo
}
>
<
Box
className=
{
styles
.
tabBoxInfo
}
>
<
div
className=
{
styles
.
tabBoxTitle
}
>
{
item
.
name
}
</
div
>
<
div
className=
{
styles
.
tabBoxTitle
}
>
{
item
.
name
}
</
div
>
<
Box
className=
{
styles
.
tabBoxDescInfo
}
>
<
Box
className=
{
styles
.
tabBoxDescInfo
}
>
<
div
className=
{
styles
.
tabBoxDesc
}
style=
{
{
marginRight
:
"24px"
}
}
>
创建时间:
{
item
.
createTime
}
</
div
>
<
div
<
div
className=
{
styles
.
tabBoxDesc
}
>
创建人:
{
item
.
creator
}
</
div
>
className=
{
styles
.
tabBoxDesc
}
style=
{
{
marginRight
:
"24px"
}
}
>
创建时间:
{
item
.
createTime
}
</
div
>
<
div
className=
{
styles
.
tabBoxDesc
}
>
创建人:
{
item
.
creator
}
</
div
>
</
Box
>
</
Box
>
</
Box
>
</
Box
>
<
Box
className=
{
styles
.
tabBoxMiddle
}
>
<
Box
className=
{
styles
.
tabBoxMiddle
}
>
...
@@ -315,65 +340,77 @@ const ProjectMembers = () => {
...
@@ -315,65 +340,77 @@ const ProjectMembers = () => {
</
Box
>
</
Box
>
<
Box
className=
{
styles
.
tabBoxJobStatus
}
>
<
Box
className=
{
styles
.
tabBoxJobStatus
}
>
<
img
alt=
""
src=
{
renderStatusIcon
(
item
.
state
)
}
/>
<
img
alt=
""
src=
{
renderStatusIcon
(
item
.
state
)
}
/>
<
div
className=
{
styles
.
tabBoxStatusText
}
>
{
renderStatusText
(
item
.
state
)
}
</
div
>
<
div
className=
{
styles
.
tabBoxStatusText
}
>
<
Box
sx=
{
{
width
:
'100%'
}
}
>
{
renderStatusText
(
item
.
state
)
}
<
LinearProgress
variant=
"determinate"
value=
{
(
item
.
completeNum
/
item
.
totalNum
)
*
100
}
</
div
>
<
Box
sx=
{
{
width
:
"100%"
}
}
>
<
LinearProgress
variant=
"determinate"
value=
{
(
item
.
completeNum
/
item
.
totalNum
)
*
100
}
sx=
{
{
sx=
{
{
borderRadius
:
'3px'
,
height
:
"6px"
,
borderRadius
:
"3px"
,
height
:
"6px"
,
backgroundColor
:
"#F0F2F5"
,
backgroundColor
:
"#F0F2F5"
,
marginRight
:
'16px'
,
marginRight
:
"16px"
,
[
`& .${linearProgressClasses.bar}`
]:
{
[
`& .${linearProgressClasses.bar}`
]:
{
backgroundColor
:
renderProgress
(
item
.
state
),
backgroundColor
:
renderProgress
(
item
.
state
),
borderRadius
:
'3px'
,
borderRadius
:
"3px"
,
},
},
}
}
}
}
/>
/>
</
Box
>
</
Box
>
<
div
style=
{
{
color
:
renderProgress
(
item
.
state
)
}
}
className=
{
styles
.
tabBoxStatusText
}
>
{
item
.
completeNum
+
"/"
+
item
.
totalNum
}
</
div
>
<
div
style=
{
{
color
:
renderProgress
(
item
.
state
)
}
}
className=
{
styles
.
tabBoxStatusText
}
>
{
item
.
completeNum
+
"/"
+
item
.
totalNum
}
</
div
>
</
Box
>
</
Box
>
<
Box
className=
{
styles
.
tabBoxJobOperate
}
>
<
Box
className=
{
styles
.
tabBoxJobOperate
}
>
<
img
alt=
""
<
img
alt=
""
src=
{
item
.
state
===
"RUNNING"
?
jobStop
:
jobDel
}
src=
{
item
.
state
===
"RUNNING"
?
jobStop
:
jobDel
}
style=
{
{
cursor
:
"pointer"
}
}
style=
{
{
cursor
:
"pointer"
}
}
onClick=
{
(
event
)
=>
{
onClick=
{
(
event
)
=>
{
event
.
stopPropagation
();
event
.
stopPropagation
();
event
.
nativeEvent
.
stopImmediatePropagation
();
event
.
nativeEvent
.
stopImmediatePropagation
();
setJobData
(
item
.
id
)
setJobData
(
item
.
id
);
setOpenDialog
(
true
)
setOpenDialog
(
true
);
setDialogType
(
item
.
state
===
"RUNNING"
?
'stop'
:
'del'
)
setDialogType
(
item
.
state
===
"RUNNING"
?
"stop"
:
"del"
);
}
}
}
}
/>
/>
</
Box
>
</
Box
>
</
Box
>
</
Box
>
)
);
})
})
}
}
</
Box
>
</
Box
>
<
TablePagination
<
TablePagination
rowsPerPageOptions=
{
[
5
,
10
,
20
,
50
]
}
rowsPerPageOptions=
{
[
5
,
10
,
20
,
50
]
}
labelRowsPerPage=
{
'每页行数:'
}
labelRowsPerPage=
{
"每页行数:"
}
ActionsComponent=
{
ActionsComponent
}
ActionsComponent=
{
ActionsComponent
}
component=
"div"
component=
"div"
count=
{
count
||
jobList
.
length
}
count=
{
count
||
jobList
.
length
}
rowsPerPage=
{
rowsPerPage
||
10
}
rowsPerPage=
{
rowsPerPage
||
10
}
page=
{
page
}
page=
{
page
}
onPageChange=
{
handleChangePage
}
//
onPageChange=
{
handleChangePage
}
//
onRowsPerPageChange=
{
handleChangeRowsPerPage
}
//
onRowsPerPageChange=
{
handleChangeRowsPerPage
}
//
/>
/>
<
SimpleDialog
<
SimpleDialog
text=
{
dialogType
===
"del"
?
'任务被删除后将无法恢复,确认继续吗?'
:
'正在运行的任务终止后将无法重新运行,确认继续吗?'
}
text=
{
title=
{
dialogType
===
"del"
?
'删除任务'
:
'终止任务'
}
dialogType
===
"del"
?
"任务被删除后将无法恢复,确认继续吗?"
:
"正在运行的任务终止后将无法重新运行,确认继续吗?"
}
title=
{
dialogType
===
"del"
?
"删除任务"
:
"终止任务"
}
openDialog=
{
openDialog
}
openDialog=
{
openDialog
}
closeDialog=
{
closeDialog
}
closeDialog=
{
closeDialog
}
onConfirm=
{
onConfirm
}
onConfirm=
{
onConfirm
}
/>
/>
</
Box
>
</
Box
>
);
);
};
}
)
;
export
default
memo
(
ProjectMembers
);
export
default
memo
(
ProjectMembers
);
src/views/Project/ProjectWorkbench/workbenchTemplate/components/AddTemplate/index.tsx
View file @
72f8ff82
import
{
memo
,
useEffect
,
useState
,
useMemo
}
from
"react"
;
import
{
useEffect
,
useState
,
useMemo
}
from
"react"
;
import
style
from
"./index.module.css"
;
import
style
from
"./index.module.css"
;
import
classNames
from
"classnames"
;
import
classNames
from
"classnames"
;
import
CloseOutlinedIcon
from
"@mui/icons-material/CloseOutlined"
;
import
CloseOutlinedIcon
from
"@mui/icons-material/CloseOutlined"
;
...
...
src/views/Project/ProjectWorkbench/workbenchTemplate/index.module.css
View file @
72f8ff82
...
@@ -19,9 +19,9 @@
...
@@ -19,9 +19,9 @@
.templateBlock
{
.templateBlock
{
width
:
21.4876%
;
width
:
21.4876%
;
height
:
160px
;
height
:
160px
;
background
:
#FFFFFF
;
background
:
#ffffff
;
border-radius
:
4px
;
border-radius
:
4px
;
border
:
1px
solid
#EBEDF
0
;
border
:
1px
solid
#ebedf
0
;
padding
:
16px
20px
;
padding
:
16px
20px
;
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
flex-direction
:
column
;
...
@@ -38,12 +38,12 @@
...
@@ -38,12 +38,12 @@
width
:
100%
;
width
:
100%
;
height
:
100%
;
height
:
100%
;
display
:
flex
;
display
:
flex
;
align-items
:
end
;
align-items
:
flex-
end
;
flex-direction
:
column
;
flex-direction
:
column
;
}
}
.addTemplateBlock
{
.addTemplateBlock
{
background
:
#FFFFFF
;
background
:
#ffffff
;
z-index
:
900
;
z-index
:
900
;
border-radius
:
16px
0px
0px
0px
;
border-radius
:
16px
0px
0px
0px
;
height
:
100%
;
height
:
100%
;
...
@@ -53,9 +53,9 @@
...
@@ -53,9 +53,9 @@
.addTemplateBox
{
.addTemplateBox
{
width
:
16.8751%
;
width
:
16.8751%
;
height
:
114px
;
height
:
114px
;
background
:
#FFFFFF
;
background
:
#ffffff
;
border-radius
:
4px
;
border-radius
:
4px
;
border
:
1px
solid
#F0F2F
5
;
border
:
1px
solid
#f0f2f
5
;
padding
:
16px
20px
;
padding
:
16px
20px
;
margin
:
8px
;
margin
:
8px
;
cursor
:
pointer
;
cursor
:
pointer
;
...
@@ -74,15 +74,15 @@
...
@@ -74,15 +74,15 @@
height
:
54px
;
height
:
54px
;
font-size
:
12px
!important
;
font-size
:
12px
!important
;
font-weight
:
400
!important
;
font-weight
:
400
!important
;
color
:
#8A
9099
!important
;
color
:
#8a
9099
!important
;
}
}
.addNewTemplate
{
.addNewTemplate
{
width
:
380px
;
width
:
380px
;
height
:
194px
;
height
:
194px
;
background
:
#FFFFFF
;
background
:
#ffffff
;
border-radius
:
4px
;
border-radius
:
4px
;
border
:
1px
solid
#EBEDF
0
;
border
:
1px
solid
#ebedf
0
;
display
:
flex
;
display
:
flex
;
justify-content
:
center
;
justify-content
:
center
;
align-items
:
center
;
align-items
:
center
;
...
...
src/views/Project/ProjectWorkbench/workbenchTemplate/index.tsx
View file @
72f8ff82
...
@@ -12,21 +12,17 @@ import OutlinedInput from "@mui/material/OutlinedInput";
...
@@ -12,21 +12,17 @@ import OutlinedInput from "@mui/material/OutlinedInput";
import
SearchIcon
from
"@mui/icons-material/Search"
;
import
SearchIcon
from
"@mui/icons-material/Search"
;
import
{
toJS
}
from
"mobx"
;
import
{
toJS
}
from
"mobx"
;
import
{
observer
}
from
"mobx-react-lite"
;
import
{
observer
}
from
"mobx-react-lite"
;
// import Button from "@mui/material/Button";
import
Add
from
"@mui/icons-material/Add"
;
import
Add
from
"@mui/icons-material/Add"
;
import
Button
from
"@/components/mui/Button"
;
import
Button
from
"@/components/mui/Button"
;
import
useMyRequest
from
"@/hooks/useMyRequest"
;
import
useMyRequest
from
"@/hooks/useMyRequest"
;
import
TemplateBox
from
"./components/templateBox"
;
import
TemplateBox
from
"./components/templateBox"
;
import
SimpleDialog
from
"./components/simpleDialog"
;
import
SimpleDialog
from
"./components/simpleDialog"
;
// import AddTemplate from "./components/addTemplate";
import
AddTemplate
from
"./components/AddTemplate/index"
;
import
AddTemplate
from
"./components/AddTemplate/index"
;
import
noData
from
"../../../../assets/project/noTemplate.svg"
;
import
noData
from
"../../../../assets/project/noTemplate.svg"
;
import
{
import
{
getWorkbenchTemplate
,
getWorkbenchTemplate
,
deleteWorkbenchTemplate
,
deleteWorkbenchTemplate
,
getAddWorkbenchTemplate
,
addWorkbenchTemplate
,
}
from
"@/api/workbench_api"
;
}
from
"@/api/workbench_api"
;
import
usePass
from
"@/hooks/usePass"
;
import
usePass
from
"@/hooks/usePass"
;
import
{
useStores
}
from
"@/store"
;
import
{
useStores
}
from
"@/store"
;
...
@@ -47,12 +43,6 @@ const ProjectMembers = observer(() => {
...
@@ -47,12 +43,6 @@ const ProjectMembers = observer(() => {
const
[
templateId
,
setTemplateId
]
=
useState
(
""
);
const
[
templateId
,
setTemplateId
]
=
useState
(
""
);
/** 简单弹窗(删除模板) */
/** 简单弹窗(删除模板) */
const
[
openDialog
,
setOpenDialog
]
=
useState
(
false
);
const
[
openDialog
,
setOpenDialog
]
=
useState
(
false
);
/** 增加模板 */
const
[
openAddTemplate
,
setOpenAddTemplate
]
=
useState
(
false
);
/** 可增加模板列表 */
const
[
addTemplateList
,
setAddTemplateList
]
=
useState
([]);
/** 已选择增加的模板列表 */
const
[
selectTemplateData
,
setSelectTemplateData
]
=
useState
<
string
[]
>
([]);
const
[
showAddTemplate
,
setShowAddTemplate
]
=
useState
(
false
);
const
[
showAddTemplate
,
setShowAddTemplate
]
=
useState
(
false
);
// 获取模板列表
// 获取模板列表
...
@@ -73,25 +63,6 @@ const ProjectMembers = observer(() => {
...
@@ -73,25 +63,6 @@ const ProjectMembers = observer(() => {
},
},
});
});
// 添加工作流模板-获取模板列表
const
{
run
:
getAddTemplateList
}
=
useMyRequest
(
getAddWorkbenchTemplate
,
{
onSuccess
:
(
result
:
any
)
=>
{
setAddTemplateList
(
result
.
data
);
setOpenAddTemplate
(
true
);
},
});
// 项目管理员-添加工作流模板-提交
const
{
run
:
addTemplate
}
=
useMyRequest
(
addWorkbenchTemplate
,
{
onSuccess
:
(
result
:
any
)
=>
{
setOpenAddTemplate
(
false
);
getTemplateInfo
({
projectId
:
currentProjectStore
.
currentProjectInfo
.
id
as
string
,
});
setSelectTemplateData
([]);
},
});
useEffect
(()
=>
{
useEffect
(()
=>
{
getTemplateInfo
({
getTemplateInfo
({
projectId
:
currentProjectStore
.
currentProjectInfo
.
id
as
string
,
projectId
:
currentProjectStore
.
currentProjectInfo
.
id
as
string
,
...
@@ -124,44 +95,6 @@ const ProjectMembers = observer(() => {
...
@@ -124,44 +95,6 @@ const ProjectMembers = observer(() => {
/** 增加模板 */
/** 增加模板 */
const
addTemplateBlock
=
()
=>
{
const
addTemplateBlock
=
()
=>
{
setShowAddTemplate
(
true
);
setShowAddTemplate
(
true
);
// getAddTemplateList({
// projectId: currentProjectStore.currentProjectInfo.id as string,
// productId: "cadd",
// });
};
/** 关闭增加模板 */
const
closeAddTemplateBlock
=
()
=>
{
setOpenAddTemplate
(
false
);
setSelectTemplateData
([]);
};
/** 增加模板操作 */
const
addTemplateCallback
=
()
=>
{
addTemplate
({
projectId
:
currentProjectStore
.
currentProjectInfo
.
id
as
string
,
workflowSpecIds
:
selectTemplateData
,
});
};
/** 搜索模板 */
const
searchTemplateNameCallback
=
(
data
:
any
)
=>
{
getAddTemplateList
({
projectId
:
currentProjectStore
.
currentProjectInfo
.
id
as
string
,
productId
:
"cadd"
,
title
:
data
,
});
};
const
templateSelectCallback
=
(
data
:
string
)
=>
{
let
list
:
string
[]
=
[...
selectTemplateData
];
if
(
selectTemplateData
.
filter
((
e
)
=>
e
===
data
).
length
>
0
)
{
list
=
list
.
filter
((
e
)
=>
e
!==
data
);
setSelectTemplateData
(
list
);
}
else
{
list
.
push
(
data
);
setSelectTemplateData
(
list
);
}
};
};
const
searchChange
=
(
data
:
any
)
=>
{
const
searchChange
=
(
data
:
any
)
=>
{
...
@@ -171,11 +104,11 @@ const ProjectMembers = observer(() => {
...
@@ -171,11 +104,11 @@ const ProjectMembers = observer(() => {
useEffect
(()
=>
{
useEffect
(()
=>
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
getTemplateInfo
({
getTemplateInfo
({
projectId
:
currentProjectStore
.
currentProjectInfo
.
id
as
string
,
projectId
:
projectIdData
as
string
,
title
:
templateName
,
title
:
templateName
,
});
});
},
300
);
},
300
);
},
[
templateName
]);
},
[
templateName
,
getTemplateInfo
,
projectIdData
]);
return
(
return
(
<
Box
className=
{
styles
.
headerBox
}
>
<
Box
className=
{
styles
.
headerBox
}
>
...
@@ -256,16 +189,6 @@ const ProjectMembers = observer(() => {
...
@@ -256,16 +189,6 @@ const ProjectMembers = observer(() => {
</
Box
>
</
Box
>
)
}
)
}
{
/* <AddTemplate
openAddTemplate={openAddTemplate}
closeAddTemplateBlock={closeAddTemplateBlock}
addTemplateList={addTemplateList}
templateSelectCallback={templateSelectCallback}
selectTemplateData={selectTemplateData}
addTemplateCallback={addTemplateCallback}
searchTemplateNameCallback={searchTemplateNameCallback}
/> */
}
{
showAddTemplate
&&
(
{
showAddTemplate
&&
(
<
AddTemplate
<
AddTemplate
setShowAddTemplate=
{
setShowAddTemplate
}
setShowAddTemplate=
{
setShowAddTemplate
}
...
...
src/views/WorkFlowEdit/components/OperatorList/index.tsx
View file @
72f8ff82
...
@@ -6,7 +6,6 @@ import { observer } from "mobx-react-lite";
...
@@ -6,7 +6,6 @@ import { observer } from "mobx-react-lite";
import
{
toJS
}
from
"mobx"
;
import
{
toJS
}
from
"mobx"
;
import
cloneDeep
from
"lodash/cloneDeep"
;
import
cloneDeep
from
"lodash/cloneDeep"
;
import
{
mockData
}
from
"./mock"
;
import
{
IOperatorItemProps
,
IOperatorListProps
}
from
"./interface"
;
import
{
IOperatorItemProps
,
IOperatorListProps
}
from
"./interface"
;
import
{
ITask
}
from
"@/views/Project/ProjectSubmitWork/interface"
;
import
{
ITask
}
from
"@/views/Project/ProjectSubmitWork/interface"
;
import
useMyRequest
from
"@/hooks/useMyRequest"
;
import
useMyRequest
from
"@/hooks/useMyRequest"
;
...
...
src/views/mui_demo/button.tsx
View file @
72f8ff82
import
{
memo
,
useCallback
,
useEffect
,
useMemo
,
useState
}
from
"react"
;
import
{
memo
}
from
"react"
;
import
_
from
"lodash"
;
import
DeleteIcon
from
"@mui/icons-material/Delete"
;
import
{
IResponse
,
useHttp
}
from
"@/api/http"
;
import
{
useStores
}
from
"@/store"
;
import
DeleteIcon
from
'@mui/icons-material/Delete'
;
import
Button
from
"@/components/mui/Button"
;
import
Button
from
"@/components/mui/Button"
;
const
ProjectMembers
=
()
=>
{
const
ProjectMembers
=
()
=>
{
const
http
=
useHttp
();
const
{
currentProjectStore
}
=
useStores
();
useEffect
(()
=>
{
},
[]);
return
(
return
(
<>
<>
<
Button
size=
{
"large"
}
text=
{
'确定'
}
/>
<
Button
size=
{
"large"
}
text=
{
"确定"
}
/>
<
Button
text=
{
'确定'
}
/>
<
Button
text=
{
"确定"
}
/>
<
Button
size=
{
"small"
}
text=
{
'确定'
}
/>
<
Button
size=
{
"small"
}
text=
{
"确定"
}
/>
<
br
/><
br
/>
<
br
/>
<
Button
size=
{
"large"
}
text=
{
'确定'
}
disabled
/>
<
br
/>
<
Button
size=
{
"large"
}
text=
{
"确定"
}
disabled
/>
<
Button
text=
{
'确定'
}
disabled
/>
<
Button
text=
{
"确定"
}
disabled
/>
<
Button
size=
{
"small"
}
text=
{
'确定'
}
disabled
/>
<
Button
size=
{
"small"
}
text=
{
"确定"
}
disabled
/>
<
br
/><
br
/>
<
br
/>
<
Button
size=
{
"large"
}
color=
{
"secondary"
}
text=
{
'确定'
}
/>
<
br
/>
<
Button
size=
{
"large"
}
color=
{
"secondary"
}
text=
{
"确定"
}
/>
<
Button
color=
{
"secondary"
}
text=
{
'确定'
}
/>
<
Button
color=
{
"secondary"
}
text=
{
"确定"
}
/>
<
Button
size=
{
"small"
}
color=
{
"secondary"
}
text=
{
'确定'
}
/>
<
Button
size=
{
"small"
}
color=
{
"secondary"
}
text=
{
"确定"
}
/>
<
br
/>
<
br
/>
<
br
/>
<
br
/>
<
Button
text=
{
'确定'
}
size=
{
"large"
}
style=
{
{
color
:
"aqua"
,
background
:
"burlywood"
}
}
/>
<
Button
text=
{
"确定"
}
size=
{
"large"
}
style=
{
{
color
:
"aqua"
,
background
:
"burlywood"
}
}
/>
<
Button
text=
{
'确定'
}
style=
{
{
color
:
"aqua"
,
background
:
"burlywood"
}
}
/>
<
Button
text=
{
"确定"
}
style=
{
{
color
:
"aqua"
,
background
:
"burlywood"
}
}
/>
<
Button
text=
{
'确定'
}
size=
{
"small"
}
style=
{
{
color
:
"aqua"
,
background
:
"burlywood"
}
}
/>
<
Button
text=
{
"确定"
}
size=
{
"small"
}
style=
{
{
color
:
"aqua"
,
background
:
"burlywood"
}
}
/>
<
br
/>
<
br
/>
<
br
/>
<
br
/>
outlined
outlined
<
br
/>
<
br
/>
<
Button
size=
{
"large"
}
variant=
{
"outlined"
}
text=
{
'确定'
}
/>
<
Button
size=
{
"large"
}
variant=
{
"outlined"
}
text=
{
"确定"
}
/>
<
Button
variant=
{
"outlined"
}
text=
{
'确定'
}
/>
<
Button
variant=
{
"outlined"
}
text=
{
"确定"
}
/>
<
Button
size=
{
"small"
}
variant=
{
"outlined"
}
text=
{
'确定'
}
/>
<
Button
size=
{
"small"
}
variant=
{
"outlined"
}
text=
{
"确定"
}
/>
<
br
/>
<
br
/>
<
br
/>
<
br
/>
<
Button
size=
{
"large"
}
variant=
{
"outlined"
}
disabled
text=
{
'确定'
}
/>
<
Button
size=
{
"large"
}
variant=
{
"outlined"
}
disabled
text=
{
"确定"
}
/>
<
Button
variant=
{
"outlined"
}
disabled
text=
{
'确定'
}
/>
<
Button
variant=
{
"outlined"
}
disabled
text=
{
"确定"
}
/>
<
Button
size=
{
"small"
}
variant=
{
"outlined"
}
disabled
text=
{
'确定'
}
/>
<
Button
size=
{
"small"
}
variant=
{
"outlined"
}
disabled
text=
{
"确定"
}
/>
<
br
/>
<
br
/>
<
br
/>
<
br
/>
<
Button
size=
{
"large"
}
variant=
{
"outlined"
}
color=
{
"secondary"
}
text=
{
'确定'
}
/>
<
Button
size=
{
"large"
}
variant=
{
"outlined"
}
color=
{
"secondary"
}
text=
{
"确定"
}
/>
<
Button
variant=
{
"outlined"
}
color=
{
"secondary"
}
text=
{
'确定'
}
/>
<
Button
variant=
{
"outlined"
}
color=
{
"secondary"
}
text=
{
"确定"
}
/>
<
Button
size=
{
"small"
}
variant=
{
"outlined"
}
color=
{
"secondary"
}
text=
{
'确定'
}
/>
<
Button
size=
{
"small"
}
variant=
{
"outlined"
}
color=
{
"secondary"
}
text=
{
"确定"
}
/>
<
br
/>
<
br
/>
<
br
/>
<
br
/>
<
Button
text=
{
'确定'
}
size=
{
"large"
}
variant=
{
"outlined"
}
style=
{
{
color
:
"aqua"
,
background
:
"burlywood"
}
}
/>
<
Button
text=
{
"确定"
}
size=
{
"large"
}
variant=
{
"outlined"
}
style=
{
{
color
:
"aqua"
,
background
:
"burlywood"
}
}
/>
<
Button
text=
{
'确定'
}
variant=
{
"outlined"
}
style=
{
{
color
:
"aqua"
,
background
:
"burlywood"
}
}
/>
<
Button
text=
{
"确定"
}
variant=
{
"outlined"
}
style=
{
{
color
:
"aqua"
,
background
:
"burlywood"
}
}
/>
<
Button
text=
{
'确定'
}
size=
{
"small"
}
variant=
{
"outlined"
}
style=
{
{
color
:
"aqua"
,
background
:
"burlywood"
}
}
/>
<
Button
text=
{
"确定"
}
size=
{
"small"
}
variant=
{
"outlined"
}
style=
{
{
color
:
"aqua"
,
background
:
"burlywood"
}
}
/>
<
br
/>
<
br
/>
<
br
/>
<
br
/>
text
text
<
br
/>
<
br
/>
<
Button
size=
{
"large"
}
variant=
{
"text"
}
text=
{
'确定确定确定确定确定确定'
}
/>
<
Button
size=
{
"large"
}
variant=
{
"text"
}
text=
{
"确定确定确定确定确定确定"
}
/>
<
Button
variant=
{
"text"
}
text=
{
'确定确定确定确定确定确定'
}
/>
<
Button
variant=
{
"text"
}
text=
{
"确定确定确定确定确定确定"
}
/>
<
Button
size=
{
"small"
}
variant=
{
"text"
}
text=
{
'确定确定确定确定确定确定'
}
/>
<
Button
size=
{
"small"
}
variant=
{
"text"
}
text=
{
"确定确定确定确定确定确定"
}
/>
<
br
/>
<
br
/>
<
Button
size=
{
"large"
}
disabled
variant=
{
"text"
}
text=
{
'确定确定确定确定确定确定'
}
/>
<
Button
size=
{
"large"
}
disabled
variant=
{
"text"
}
text=
{
"确定确定确定确定确定确定"
}
/>
<
Button
variant=
{
"text"
}
disabled
text=
{
'确定确定确定确定确定确定'
}
/>
<
Button
variant=
{
"text"
}
disabled
text=
{
"确定确定确定确定确定确定"
}
/>
<
Button
size=
{
"small"
}
disabled
variant=
{
"text"
}
text=
{
'确定确定确定确定确定确定'
}
/>
<
Button
size=
{
"small"
}
disabled
variant=
{
"text"
}
text=
{
"确定确定确定确定确定确定"
}
/>
<
br
/>
<
br
/>
<
Button
size=
{
"large"
}
color=
{
"secondary"
}
variant=
{
"text"
}
text=
{
'确定确定确定确定确定确定'
}
/>
<
Button
size=
{
"large"
}
color=
{
"secondary"
}
variant=
{
"text"
}
text=
{
"确定确定确定确定确定确定"
}
/>
<
Button
variant=
{
"text"
}
color=
{
"secondary"
}
text=
{
'确定确定确定确定确定确定'
}
/>
<
Button
variant=
{
"text"
}
color=
{
"secondary"
}
text=
{
"确定确定确定确定确定确定"
}
/>
<
Button
size=
{
"small"
}
color=
{
"secondary"
}
variant=
{
"text"
}
text=
{
'确定确定确定确定确定确定'
}
/>
<
Button
size=
{
"small"
}
color=
{
"secondary"
}
variant=
{
"text"
}
text=
{
"确定确定确定确定确定确定"
}
/>
<
br
/>
<
br
/>
<
br
/>
<
br
/>
img
img
<
br
/>
<
br
/>
<
Button
text=
{
'确定确定确定确定确定确定'
}
img=
{
<
DeleteIcon
/>
}
/>
<
Button
text=
{
"确定确定确定确定确定确定"
}
img=
{
<
DeleteIcon
/>
}
/>
<
br
/>
<
br
/>
<
br
/>
<
br
/>
select
select
<
br
/>
<
br
/>
<
Button
<
Button
text=
{
'更多'
}
text=
{
"更多"
}
select=
{
select=
{
[
[
{
name
:
"1111111"
},
{
name
:
"1111111"
},
{
name
:
"1111111"
},
{
name
:
"1111111"
},
{
name
:
"1111111"
},
{
name
:
"1111111"
},
{
name
:
"1111111"
,
color
:
"red"
},
{
name
:
"1111111"
,
color
:
"red"
},
]
]
}
}
/>
/>
<
Button
<
Button
text=
{
'更多'
}
text=
{
"更多"
}
color=
{
"secondary"
}
variant=
{
"text
"
}
color=
{
"secondary
"
}
select=
{
variant=
{
"text"
}
[
select=
{
[
{
name
:
"1111111"
},
{
name
:
"1111111"
},
{
name
:
"1111111"
},
{
name
:
"1111111"
},
{
name
:
"1111111"
},
{
name
:
"1111111"
},
{
name
:
"1111111"
,
color
:
"red"
},
{
name
:
"1111111"
,
color
:
"red"
},
]
]
}
}
/>
/>
</>
</>
);
);
};
};
...
...
src/views/mui_demo/input.tsx
View file @
72f8ff82
import
{
memo
,
useCallback
,
useEffect
,
useMemo
,
useState
}
from
"react"
;
import
{
memo
}
from
"react"
;
import
_
from
"lodash"
;
import
{
InputAdornment
}
from
"@mui/material"
;
import
{
IResponse
,
useHttp
}
from
"@/api/http"
;
import
{
useStores
}
from
"@/store"
;
import
DeleteIcon
from
'@mui/icons-material/Delete'
;
import
{
InputAdornment
}
from
'@mui/material'
;
import
InputComponent
from
"@/components/mui/Input"
;
import
InputComponent
from
"@/components/mui/Input"
;
const
ProjectMembers
=
()
=>
{
const
ProjectMembers
=
()
=>
{
const
http
=
useHttp
();
const
{
currentProjectStore
}
=
useStores
();
useEffect
(()
=>
{
},
[]);
return
(
return
(
<>
<>
<
InputComponent
<
InputComponent
fullWidth=
{
false
}
fullWidth=
{
false
}
label=
{
"test"
}
label=
{
"test"
}
defaultValue=
{
"sssssssss"
}
defaultValue=
{
"sssssssss"
}
size=
{
'large'
}
size=
{
"large"
}
/>
/>
<
InputComponent
<
InputComponent
...
@@ -31,34 +17,45 @@ const ProjectMembers = () => {
...
@@ -31,34 +17,45 @@ const ProjectMembers = () => {
label=
{
"test"
}
label=
{
"test"
}
error=
{
true
}
error=
{
true
}
helperText=
{
"你还急急急靠靠靠靠靠靠靠靠靠靠靠靠靠靠"
}
helperText=
{
"你还急急急靠靠靠靠靠靠靠靠靠靠靠靠靠靠"
}
/>
/>
<
InputComponent
<
InputComponent
fullWidth=
{
false
}
fullWidth=
{
false
}
label=
{
"test"
}
label=
{
"test"
}
size=
{
'small'
}
size=
{
"small"
}
disabled
disabled
/>
/>
<
InputComponent
fullWidth=
{
false
}
label=
{
"xsmall"
}
size=
{
"xsmall"
}
/>
<
InputComponent
<
InputComponent
fullWidth=
{
false
}
fullWidth=
{
false
}
label=
{
"xsmall"
}
placeholder=
{
"测试机哦"
}
size=
{
'xsmall'
}
endAdornment=
{
/>
<
InputAdornment
position=
"end"
>
11
</
InputAdornment
>
}
/>
<
InputComponent
<
InputComponent
fullWidth=
{
false
}
fullWidth=
{
false
}
placeholder=
{
"测试机哦"
}
size=
{
"small"
}
endAdornment=
{
<
InputAdornment
position=
"end"
>
11
</
InputAdornment
>
}
placeholder=
{
"xxxxxx"
}
/>
endAdornment=
{
<
InputComponent
fullWidth=
{
false
}
size=
{
"small"
}
placeholder=
{
"xxxxxx"
}
endAdornment=
{
<
InputAdornment
position=
"end"
>
11
</
InputAdornment
>
}
/>
<
InputAdornment
position=
"end"
>
11
</
InputAdornment
>
}
/>
<
br
/>
<
br
/>
<
br
/>
<
br
/>
<
InputComponent
<
InputComponent
fullWidth=
{
true
}
fullWidth=
{
true
}
select=
{
select=
{
{
{
json
:
[
json
:
[{
value
:
'1'
,
label
:
"2"
},{
value
:
'3'
,
label
:
"4"
}]
{
value
:
"1"
,
label
:
"2"
},
}
{
value
:
"3"
,
label
:
"4"
},
}
],
}
}
/>
/>
<
br
/><
br
/>
<
br
/>
<
br
/>
{
/* <SelectComponent
{
/* <SelectComponent
option={json}
option={json}
/>
/>
...
@@ -72,8 +69,8 @@ const ProjectMembers = () => {
...
@@ -72,8 +69,8 @@ const ProjectMembers = () => {
option={json}
option={json}
size={"small"}
size={"small"}
/> */
}
/> */
}
<
br
/>
<
br
/>
<
br
/>
<
br
/>
</>
</>
);
);
};
};
...
...
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