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