Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cs_vsofpm
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wuhao
cs_vsofpm
Commits
172f4201
Commit
172f4201
authored
Aug 18, 2023
by
wuhao
🎯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
asder
parent
9c2cdc66
Pipeline
#4328
passed with stages
in 9 minutes and 48 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
10 deletions
+36
-10
proxy.ts
config/proxy.ts
+11
-1
index.jsx
src/components/AutoTable/index.jsx
+3
-4
index.jsx
src/pages/checkhomework/index.jsx
+22
-5
No files found.
config/proxy.ts
View file @
172f4201
/*
* @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"
:
""
},
},
...
...
src/components/AutoTable/index.jsx
View file @
172f4201
...
...
@@ -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
);
...
...
src/pages/checkhomework/index.jsx
View file @
172f4201
...
...
@@ -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}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment