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() { ...@@ -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( const columns = useMemo(
() => [ () => [
{ title: "学生姓名", dataIndex: "studentName", key: "studentName" }, { title: "学生姓名", dataIndex: "studentName", key: "studentName" },
...@@ -223,50 +249,64 @@ function Checkhomework() { ...@@ -223,50 +249,64 @@ function Checkhomework() {
} }
); );
const items = [ //全部数量
{ let totaldata = useRequest(async () => {
key: "2", let res = await doFetch({
label: `已提交`, url: "/studentExperiment/queryCountByLoginTeacher",
children: ( params: {},
<Box boxShadow={"0 0 18px #f0f0f0"} borderRadius={2}> });
<AutoTable return res?.data?.data;
actionRef={actionRefs} }, {});
formRef={formRefs}
scroll={{ x: 1366 }} const items = useMemo(() => {
columns={[ return [
...columes, {
{ key: "2",
title: "操作", label: `已提交 ${totaldata?.data?.submitNum ?? 0}`,
valueType: "option", children: (
width: 88, <Box boxShadow={"0 0 18px #f0f0f0"} borderRadius={2}>
render: (text, row, _, action) => [audit(text, row, _, action)], <AutoTable
}, actionRef={actionRefs}
]} formRef={formRefs}
path="/studentExperiment/queryPageByLoginTeacher" scroll={{ x: 1366 }}
rerendered={false} columns={[
extraparams={{ type: "2" }} ...columes,
></AutoTable> {
</Box> title: "操作",
), valueType: "option",
}, width: 136,
{ render: (text, row, _, action) => [
key: "1", audit(text, row, _, action),
label: `待提交`, remove(text, row, _, action)
children: ( ],
<Box boxShadow={"0 0 18px #f0f0f0"} borderRadius={2}> },
<AutoTable ]}
actionRef={actionRef} path="/studentExperiment/queryPageByLoginTeacher"
formRef={formRef} rerendered={false}
scroll={{ x: 1366 }} extraparams={{ type: "2" }}
columns={[...columns]} ></AutoTable>
extraparams={{ type: "1" }} </Box>
path="/studentExperiment/queryPageByLoginTeacher" ),
rerendered={false} },
></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 ( return (
<Container maxWidth={false}> <Container maxWidth={false}>
......
...@@ -6,9 +6,6 @@ import ShopProductLoadingCard from "@/components/ProductCard/loading"; ...@@ -6,9 +6,6 @@ import ShopProductLoadingCard from "@/components/ProductCard/loading";
import { doFetch } from "@/utils/doFetch"; import { doFetch } from "@/utils/doFetch";
import PRODUCTS from "@/_mock/products"; import PRODUCTS from "@/_mock/products";
import { Box, Container, Grid, Stack, Typography } from "@mui/material"; 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 { useRequest } from "ahooks";
import { Empty, Input, message,Tabs } from "antd"; import { Empty, Input, message,Tabs } from "antd";
import { useMemo, useState } from "react"; import { useMemo, useState } from "react";
......
...@@ -5,9 +5,6 @@ import ShopProductCard from "@/components/ProductCard/stucard"; ...@@ -5,9 +5,6 @@ import ShopProductCard from "@/components/ProductCard/stucard";
import { doFetch } from "@/utils/doFetch"; import { doFetch } from "@/utils/doFetch";
import PRODUCTS from "@/_mock/products"; import PRODUCTS from "@/_mock/products";
import { Box, Container, Grid, Stack, Typography } from "@mui/material"; 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 { useRequest } from "ahooks";
import { Empty, Input, message,Tabs } from "antd"; import { Empty, Input, message,Tabs } from "antd";
import { useMemo, useState } from "react"; 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