Commit 89a3da6b authored by wuhao's avatar wuhao 🎯

asder

parent 2067db83
Pipeline #4232 failed with stages
in 3 minutes and 27 seconds
......@@ -83,6 +83,32 @@ function Checkhomework() {
);
};
const remove = (text, row, _) => {
return (
<PremButton
pop={{
disabled: row?.reviewType !== 1,
title: "是否退回该实训?",
okText: "确认",
cancelText: "取消",
onConfirm: async () => {
await runAsync({
url: "/studentExperiment/remake",
params: { id: row?.id },
});
},
}}
btn={{
disabled: row?.reviewType !== 1,
size: "small",
color: "error",
}}
>
退回
</PremButton>
);
};
const columns = useMemo(
() => [
{ title: "学生姓名", dataIndex: "studentName", key: "studentName" },
......@@ -223,50 +249,64 @@ function Checkhomework() {
}
);
const items = [
{
key: "2",
label: `已提交`,
children: (
<Box boxShadow={"0 0 18px #f0f0f0"} borderRadius={2}>
<AutoTable
actionRef={actionRefs}
formRef={formRefs}
scroll={{ x: 1366 }}
columns={[
...columes,
{
title: "操作",
valueType: "option",
width: 88,
render: (text, row, _, action) => [audit(text, row, _, action)],
},
]}
path="/studentExperiment/queryPageByLoginTeacher"
rerendered={false}
extraparams={{ type: "2" }}
></AutoTable>
</Box>
),
},
{
key: "1",
label: `待提交`,
children: (
<Box boxShadow={"0 0 18px #f0f0f0"} borderRadius={2}>
<AutoTable
actionRef={actionRef}
formRef={formRef}
scroll={{ x: 1366 }}
columns={[...columns]}
extraparams={{ type: "1" }}
path="/studentExperiment/queryPageByLoginTeacher"
rerendered={false}
></AutoTable>
</Box>
),
},
];
//全部数量
let totaldata = useRequest(async () => {
let res = await doFetch({
url: "/studentExperiment/queryCountByLoginTeacher",
params: {},
});
return res?.data?.data;
}, {});
const items = useMemo(() => {
return [
{
key: "2",
label: `已提交 ${totaldata?.data?.submitNum ?? 0}`,
children: (
<Box boxShadow={"0 0 18px #f0f0f0"} borderRadius={2}>
<AutoTable
actionRef={actionRefs}
formRef={formRefs}
scroll={{ x: 1366 }}
columns={[
...columes,
{
title: "操作",
valueType: "option",
width: 136,
render: (text, row, _, action) => [
audit(text, row, _, action),
remove(text, row, _, action)
],
},
]}
path="/studentExperiment/queryPageByLoginTeacher"
rerendered={false}
extraparams={{ type: "2" }}
></AutoTable>
</Box>
),
},
{
key: "1",
label: `待提交 ${totaldata?.data?.notSubmitNum ?? 0}`,
children: (
<Box boxShadow={"0 0 18px #f0f0f0"} borderRadius={2}>
<AutoTable
actionRef={actionRef}
formRef={formRef}
scroll={{ x: 1366 }}
columns={[...columns]}
extraparams={{ type: "1" }}
path="/studentExperiment/queryPageByLoginTeacher"
rerendered={false}
></AutoTable>
</Box>
),
},
];
}, [totaldata]);
return (
<Container maxWidth={false}>
......
......@@ -6,9 +6,6 @@ import ShopProductLoadingCard from "@/components/ProductCard/loading";
import { doFetch } from "@/utils/doFetch";
import PRODUCTS from "@/_mock/products";
import { Box, Container, Grid, Stack, Typography } from "@mui/material";
import Checkbox from "@mui/material/Checkbox";
import FormControlLabel from "@mui/material/FormControlLabel";
import FormGroup from "@mui/material/FormGroup";
import { useRequest } from "ahooks";
import { Empty, Input, message,Tabs } from "antd";
import { useMemo, useState } from "react";
......
......@@ -5,9 +5,6 @@ import ShopProductCard from "@/components/ProductCard/stucard";
import { doFetch } from "@/utils/doFetch";
import PRODUCTS from "@/_mock/products";
import { Box, Container, Grid, Stack, Typography } from "@mui/material";
import Checkbox from "@mui/material/Checkbox";
import FormControlLabel from "@mui/material/FormControlLabel";
import FormGroup from "@mui/material/FormGroup";
import { useRequest } from "ahooks";
import { Empty, Input, message,Tabs } from "antd";
import { useMemo, useState } from "react";
......
This diff is collapsed.
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