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