Commit 5ab557f9 authored by jiangzijing's avatar jiangzijing

Merge branch 'feat-20220801' of http://120.77.149.83/root/bkunyun into feat-20220801

parents e18a5483 98755972
...@@ -103,7 +103,7 @@ const MyDialog: React.FunctionComponent<IDialogProps> = (props) => { ...@@ -103,7 +103,7 @@ const MyDialog: React.FunctionComponent<IDialogProps> = (props) => {
disabled={disabledConfirm} disabled={disabledConfirm}
isLoadingButton={true} isLoadingButton={true}
loading={loading} loading={loading}
style={{ marginLeft: '12px', ...okSx }} style={{ marginLeft: "12px", ...okSx }}
/> />
) : null} ) : null}
</DialogActions> </DialogActions>
...@@ -122,16 +122,13 @@ const MyDialog: React.FunctionComponent<IDialogProps> = (props) => { ...@@ -122,16 +122,13 @@ const MyDialog: React.FunctionComponent<IDialogProps> = (props) => {
"& .MuiPaper-root": { "& .MuiPaper-root": {
// 设置最大宽度, 实际宽度让子元素撑大 // 设置最大宽度, 实际宽度让子元素撑大
maxWidth: "1920px", maxWidth: "1920px",
borderRadius: "8px" borderRadius: "8px",
}, },
}, },
}} }}
> >
{isHideHeader ? null : ( {isHideHeader ? null : (
<DialogTitle <DialogTitle id="alert-dialog-title" sx={{ padding: "20px 24px" }}>
id="alert-dialog-title"
sx={{ padding: "20px 24px" }}
>
<div <div
style={{ style={{
display: "flex", display: "flex",
...@@ -140,10 +137,19 @@ const MyDialog: React.FunctionComponent<IDialogProps> = (props) => { ...@@ -140,10 +137,19 @@ const MyDialog: React.FunctionComponent<IDialogProps> = (props) => {
fontWeight: 600, fontWeight: 600,
}} }}
> >
<span style={{ fontSize: 16, lineHeight: '24px', color: '#1E2633' }}>{title}</span> <span
style={{ fontSize: 16, lineHeight: "24px", color: "#1E2633" }}
>
{title}
</span>
<CloseIcon <CloseIcon
onClick={onClose} onClick={onClose}
sx={{ color: "#C2C6CC", cursor: "pointer", ":hover": { background: "#f0f2f5", borderRadius: '2px' } }} sx={{
fontSize: "18px",
color: "#C2C6CC",
cursor: "pointer",
":hover": { background: "#f0f2f5", borderRadius: "2px" },
}}
/> />
</div> </div>
</DialogTitle> </DialogTitle>
......
...@@ -108,3 +108,8 @@ ...@@ -108,3 +108,8 @@
background: #f0f2f5; background: #f0f2f5;
border-radius: 4px; border-radius: 4px;
} }
.pagination {
padding: 19px 0;
display: flex;
justify-content: end;
}
...@@ -12,6 +12,7 @@ import { useNavigate } from "react-router-dom"; ...@@ -12,6 +12,7 @@ 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 { TablePagination } from "@mui/material"; import { TablePagination } from "@mui/material";
import MyPagination from "@/components/mui/MyPagination";
import MySelect from "@/components/mui/MySelect"; import MySelect from "@/components/mui/MySelect";
import SimpleDialog from "./components/simpleDialog"; import SimpleDialog from "./components/simpleDialog";
...@@ -93,7 +94,7 @@ const ProjectMembers = observer(() => { ...@@ -93,7 +94,7 @@ const ProjectMembers = observer(() => {
onSuccess: (result: any) => { onSuccess: (result: any) => {
setLoading(false); setLoading(false);
setJobList(result.data.content); setJobList(result.data.content);
setCount(result.data.totalElements); setCount(result.data.totalPages - 1);
timer && clearTimeout(timer as number); timer && clearTimeout(timer as number);
timer = null; timer = null;
timer = setTimeout(() => { timer = setTimeout(() => {
...@@ -176,11 +177,11 @@ const ProjectMembers = observer(() => { ...@@ -176,11 +177,11 @@ const ProjectMembers = observer(() => {
}); });
}, [projectId, getWorkflowJobInfo]); }, [projectId, getWorkflowJobInfo]);
const handleChangePage = (event: any, newPage: any) => { const handleChangePage = (newPage: any) => {
setPage(newPage); setPage(newPage - 1);
getWorkflowJobInfo({ getWorkflowJobInfo({
projectId: currentProjectStore.currentProjectInfo.id as string, projectId: currentProjectStore.currentProjectInfo.id as string,
page: newPage, page: newPage - 1,
size: size, size: size,
name: jobName, name: jobName,
state: currency === "ALL" ? "" : currency, state: currency === "ALL" ? "" : currency,
...@@ -452,7 +453,7 @@ const ProjectMembers = observer(() => { ...@@ -452,7 +453,7 @@ const ProjectMembers = observer(() => {
<Box className={styles.tabBoxJobOperate}> <Box className={styles.tabBoxJobOperate}>
{currentProjectStore.currentProjectInfo.projectRole === {currentProjectStore.currentProjectInfo.projectRole ===
"USER" && "USER" &&
item.creator !== item.creator !==
JSON.parse(localStorage.getItem("userInfo") || "{}") JSON.parse(localStorage.getItem("userInfo") || "{}")
?.name ? ( ?.name ? (
"" ""
...@@ -494,9 +495,16 @@ const ProjectMembers = observer(() => { ...@@ -494,9 +495,16 @@ const ProjectMembers = observer(() => {
); );
})} })}
</MyCircularProgress> </MyCircularProgress>
<div className={styles.pagination}>
<MyPagination
page={page}
pageChange={handleChangePage}
count={count || jobList.length}
/>
</div>
</Box> </Box>
<TablePagination {/* <TablePagination
rowsPerPageOptions={[5, 10, 20, 50]} rowsPerPageOptions={[5, 10, 20, 50]}
labelRowsPerPage={"每页行数:"} labelRowsPerPage={"每页行数:"}
ActionsComponent={ActionsComponent} ActionsComponent={ActionsComponent}
...@@ -506,7 +514,7 @@ const ProjectMembers = observer(() => { ...@@ -506,7 +514,7 @@ const ProjectMembers = observer(() => {
page={page} page={page}
onPageChange={handleChangePage} // onPageChange={handleChangePage} //
onRowsPerPageChange={handleChangeRowsPerPage} // onRowsPerPageChange={handleChangeRowsPerPage} //
/> /> */}
<SimpleDialog <SimpleDialog
text={ text={
......
import { memo } from "react"; import { memo } from "react";
import { Box, Typography } from "@mui/material"; import { Box, Typography } from "@mui/material";
import Dialog from "@/components/mui/MyDialog"; import MyDialog from "@/components/mui/MyDialog";
const SimpleDialog = (props: any) => { const SimpleDialog = (props: any) => {
const { openDialog, closeDialog, onConfirm, text, title } = props; const { openDialog, closeDialog, onConfirm, text, title } = props;
return ( return (
<> <>
<Dialog <MyDialog
open={openDialog} open={openDialog}
onClose={closeDialog} onClose={closeDialog}
onConfirm={onConfirm} onConfirm={onConfirm}
title={title} title={title}
okSx={{ background: "#FF4E4E", color: "#fff" }}
> >
<Box> <Box>
<Typography sx={{ fontSize: "14px", fontWeight: "400" }}> <Typography sx={{ fontSize: "14px", fontWeight: "400" }}>
{text} {text}
</Typography> </Typography>
</Box> </Box>
</Dialog> </MyDialog>
</> </>
); );
}; };
......
...@@ -32,7 +32,6 @@ ...@@ -32,7 +32,6 @@
.templateBlock { .templateBlock {
height: 194px; height: 194px;
background: #ffffff; background: #ffffff;
box-shadow: 0px 3px 10px 0px rgba(0, 24, 57, 0.04);
border-radius: 4px; border-radius: 4px;
border: 1px solid #ebedf0; border: 1px solid #ebedf0;
padding: 16px 20px; padding: 16px 20px;
...@@ -43,6 +42,9 @@ ...@@ -43,6 +42,9 @@
position: relative; position: relative;
box-sizing: border-box; box-sizing: border-box;
} }
.templateBlock:hover {
box-shadow: 6px 8px 22px 0px rgba(0, 24, 57, 0.08);
}
@media screen and (max-width: 1220px) { @media screen and (max-width: 1220px) {
.template { .template {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment