Commit 172f4201 authored by wuhao's avatar wuhao 🎯

asder

parent 9c2cdc66
Pipeline #4328 passed with stages
in 9 minutes and 48 seconds
/*
* @Author: wuhao930406 1148547900@qq.com
* @Date: 2023-07-10 14:21:33
* @LastEditors: wuhao930406 1148547900@qq.com
* @LastEditTime: 2023-08-18 08:51:10
* @FilePath: /cs_vsofpm/config/proxy.ts
* @Description:
*
* Copyright (c) 2023 by ${git_name_email}, All Rights Reserved.
*/
/**
* @name 代理的配置
* @see 在生产环境 代理是无法生效的,所以这里没有生产环境的配置
......@@ -12,7 +22,7 @@
export default {
dev: {
"/vstp/": {
target: "http://192.168.40.117:8044/vstp",
target: "http://192.168.40.36:8022",
changeOrigin: true,
pathRewrite: { "^/vstp": "" },
},
......
......@@ -39,6 +39,7 @@ const AutoTable = (props) => {
rerendered = true,
onValuesChange = () => {},
dataSource = null,
setparams
} = props;
const actionRefs = actionRef ?? useRef(),
......@@ -76,6 +77,8 @@ const AutoTable = (props) => {
data = result?.data?.dataList;
total = result?.data?.dataList?.length;
}
setparams(total);
return {
data,
success,
......@@ -288,10 +291,6 @@ const AutoTable = (props) => {
onValuesChange?.(changedValues, values);
},
}}
onSubmit={(params) => {
console.log(params);
// formRef?.current?
}}
onSizeChange={(size) => {
localStorage.setItem("size", size); //设置全局表格规格缓存
setsize(size);
......
......@@ -21,6 +21,7 @@ function Checkhomework() {
open: false,
});
const [active, setactive] = useState("2");
const [params, setparams] = useState();
const handleClose = () => {
setdialogprops((s) => ({
......@@ -256,13 +257,13 @@ function Checkhomework() {
params: {},
});
return res?.data?.data;
}, {});
});
const items = useMemo(() => {
return [
{
key: "2",
label: `已提交 ${totaldata?.data?.submitNum ?? 0}`,
label: `已提交 ${params?.already ?? totaldata?.data?.submitNum ?? 0}`,
children: (
<Box boxShadow={"0 0 18px #f0f0f0"} borderRadius={2}>
<AutoTable
......@@ -277,20 +278,28 @@ function Checkhomework() {
width: 136,
render: (text, row, _, action) => [
audit(text, row, _, action),
remove(text, row, _, action)
remove(text, row, _, action),
],
},
]}
path="/studentExperiment/queryPageByLoginTeacher"
rerendered={false}
extraparams={{ type: "2" }}
setparams={(val) => {
setparams((s) => ({
...s,
already: val,
}));
}}
></AutoTable>
</Box>
),
},
{
key: "1",
label: `待提交 ${totaldata?.data?.notSubmitNum ?? 0}`,
label: `待提交 ${
params?.unalready ?? totaldata?.data?.notSubmitNum ?? 0
}`,
children: (
<Box boxShadow={"0 0 18px #f0f0f0"} borderRadius={2}>
<AutoTable
......@@ -301,6 +310,12 @@ function Checkhomework() {
extraparams={{ type: "1" }}
path="/studentExperiment/queryPageByLoginTeacher"
rerendered={false}
setparams={(val) => {
setparams((s) => ({
...s,
unalready: val,
}));
}}
></AutoTable>
</Box>
),
......@@ -508,7 +523,9 @@ function Checkhomework() {
<Tabs
activeKey={active}
onChange={setactive}
onChange={(value) => {
setactive(value);
}}
items={items}
tabPosition="top"
animated={true}
......
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