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
590aa4c2
Commit
590aa4c2
authored
May 22, 2023
by
wuhao
🎯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
asder
parent
b8a303e3
Pipeline
#3411
passed with stages
in 5 minutes and 4 seconds
Changes
8
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
62 additions
and
38 deletions
+62
-38
env.ts
config/env.ts
+4
-2
index.jsx
src/components/ImportExcel/index.jsx
+23
-7
FormItems.jsx
src/components/InitForm/FormItems.jsx
+7
-4
stucard.jsx
src/components/ProductCard/stucard.jsx
+0
-10
sxcard.jsx
src/components/ProductCard/sxcard.jsx
+2
-2
index.jsx
src/pages/organization/index.jsx
+7
-1
index.jsx
src/pages/student/index.jsx
+7
-1
index.jsx
src/pages/teacher/index.jsx
+12
-11
No files found.
config/env.ts
View file @
590aa4c2
...
...
@@ -5,12 +5,14 @@ export default {
dev
:{
"REACT_APP_URL"
:
"http://192.168.40.36:8044/vstp"
,
// http://tasks-dev.nangaoyun.com
"DEFAULT_HEAD_IMG"
:
"./assets/images/avatars/avatar_21.jpg"
,
"DEFAULT_404_IMG"
:
"./assets/illustrations/illustration_404.svg"
"DEFAULT_404_IMG"
:
"./assets/illustrations/illustration_404.svg"
,
"DOWNLOAD_URL"
:
"http://192.168.40.2"
,
},
test
:{
"REACT_APP_URL"
:
"/vstp"
,
"DEFAULT_HEAD_IMG"
:
"./assets/images/avatars/avatar_21.jpg"
,
"DEFAULT_404_IMG"
:
"./assets/illustrations/illustration_404.svg"
"DEFAULT_404_IMG"
:
"./assets/illustrations/illustration_404.svg"
,
"DOWNLOAD_URL"
:
"http://192.168.40.2"
,
},
prod
:{
"REACT_APP_URL"
:
"http://tasks.nangaoyun.com"
...
...
src/components/ImportExcel/index.jsx
View file @
590aa4c2
import
{
Button
,
Stack
,
Typography
}
from
"@mui/material"
;
import
{
useState
}
from
"react"
;
import
DraggableDialog
from
"../DraggableDialog"
;
import
InitForm
from
"../InitForm"
import
InitForm
from
"../InitForm"
;
function
ImportExcel
()
{
function
ImportExcel
(
{
importurl
,
downloadurl
,
refresh
}
)
{
const
[
dialogprops
,
setdialogprops
]
=
useState
();
return
(
...
...
@@ -15,6 +15,7 @@ function ImportExcel() {
setdialogprops
({
open
:
true
,
title
:
"导入"
,
footer
:
false
,
});
}
}
>
...
...
@@ -22,11 +23,11 @@ function ImportExcel() {
</
Button
>
<
DraggableDialog
dialogprops=
{
dialogprops
}
handleClose=
{
()
=>
{
setdialogprops
(
s
=>
({
handleClose=
{
()
=>
{
setdialogprops
(
(
s
)
=>
({
...
s
,
open
:
false
}))
open
:
false
,
}))
;
}
}
formdom=
{
<
InitForm
...
...
@@ -37,11 +38,17 @@ function ImportExcel() {
dataIndex
:
"file"
,
key
:
"file"
,
valueType
:
"uploadDragger"
,
url
:
importurl
,
colProps
:
{
span
:
24
,
},
},
]
}
onValuesChange=
{
(
vals
)
=>
{
if
(
Object
.
values
(
vals
)?.[
0
]?.
url
){
refresh
?.()
}
}
}
></
InitForm
>
}
>
...
...
@@ -55,7 +62,16 @@ function ImportExcel() {
<
Typography
variant=
{
"b"
}
color=
{
"#999999"
}
>
*请先下载模板文件
</
Typography
>
<
Button
variant=
"text"
>
模板文件
</
Button
>
<
Button
variant=
"text"
onClick=
{
()
=>
{
console
.
log
(
downloadurl
);
window
.
open
(
DOWNLOAD_URL
+
downloadurl
);
}
}
>
模板文件
</
Button
>
</
Stack
>
</
Stack
>
</
DraggableDialog
>
...
...
src/components/InitForm/FormItems.jsx
View file @
590aa4c2
...
...
@@ -1225,12 +1225,15 @@ function UploadImage({ item, colProps }) {
// uploadDragger
function
UploadDragger
({
item
,
colProps
})
{
let
token
=
localStorage
.
getItem
(
"TOKENES"
);
return
(
<>
<
ProFormUploadDragger
fieldProps=
{
{
...
item
?.
fieldProps
,
action
:
REACT_APP_URL
+
"/file/upload"
,
action
:
REACT_APP_URL
+
(
item
?.
url
??
"/file/upload"
),
headers
:
{
token
},
onPreview
:
(
file
)
=>
{
let
url
=
""
;
if
(
file
.
response
)
{
...
...
@@ -1361,13 +1364,13 @@ function TableSelect({ item, value, onChange, params = {} }) {
color
:
chooses
.
includes
(
it
[
rowKey
])
?
"#1890ff"
:
"#333333"
,
transition
:
"all 0.4s"
,
userSelect
:
"none"
,
paddingRight
:
12
paddingRight
:
12
,
}
}
>
{
it
[
item
.
rowName
??
"name"
]
}
{
it
[
item
.
rowName
??
"name"
]
}
</
span
>
<
CloseOutlined
style=
{
{
color
:
"red"
}
}
style=
{
{
color
:
"red"
}
}
onClick=
{
(
e
)
=>
{
e
.
stopPropagation
();
let
newvalue
=
value
.
filter
(
...
...
src/components/ProductCard/stucard.jsx
View file @
590aa4c2
...
...
@@ -37,12 +37,6 @@ ShopProductCard.propTypes = {
export
default
function
ShopProductCard
({
product
,
remove
,
edit
,
copy
,
publish
,
authorized
,
tauthorized
,
})
{
const
{
trainName
,
...
...
@@ -53,15 +47,11 @@ export default function ShopProductCard({
deadline
,
sectionNum
,
experimentNum
,
studentNum
,
startTime
,
totalSubmitExperimentNum
,
totalExperimentNum
,
}
=
product
;
const
[
confirm
,
setconfirm
]
=
useState
(
false
);
const
[
shut
,
setshut
]
=
useState
(
false
);
const
ifs
=
type
===
1
||
type
===
3
;
return
(
<
Card
sx=
{
{
borderRadius
:
3
}
}
className=
"hovered"
id=
"jikl"
>
...
...
src/components/ProductCard/sxcard.jsx
View file @
590aa4c2
...
...
@@ -218,7 +218,7 @@ export default function ShopProductCard({
<
Progress
type=
"circle"
size=
{
20
}
percent=
{
parseInt
(
Math
.
random
()
*
100
)
}
percent=
{
(
totalSubmitExperimentNum
*
100
)
/
(
totalExperimentNum
??
1
)
}
strokeColor=
{
{
"0%"
:
"#00c6fb"
,
"100%"
:
"#005bea"
,
...
...
@@ -270,7 +270,7 @@ export default function ShopProductCard({
paddingLeft
:
1
,
}
}
>
{
startTime
??
"-"
}
~
{
deadline
}
{
startTime
??
"-"
}
~
{
deadline
}
</
Typography
>
</
Stack
>
</
Stack
>
...
...
src/pages/organization/index.jsx
View file @
590aa4c2
...
...
@@ -276,7 +276,13 @@ function Organization() {
>
<
Typography
variant=
"h5"
>
组织管理
</
Typography
>
<
Stack
spacing=
{
2
}
direction=
"row"
>
<
ImportExcel
></
ImportExcel
>
<
ImportExcel
importurl=
"/organization/dataImport"
downloadurl=
"/download/组织架构导入模板.xlsx"
refresh=
{
()
=>
{
actionRef
?.
current
?.
reload
();
}
}
></
ImportExcel
>
<
PremButton
btn=
{
{
variant
:
"contained"
,
...
...
src/pages/student/index.jsx
View file @
590aa4c2
...
...
@@ -655,7 +655,13 @@ function Student() {
<
Typography
variant=
"h5"
>
学生管理
</
Typography
>
{
active
===
"1"
?
(
<
Stack
spacing=
{
2
}
direction=
"row"
>
<
ImportExcel
></
ImportExcel
>
<
ImportExcel
importurl=
"/user/studentImport"
downloadurl=
"/download/学生管理数据导入模板.xlsx"
refresh=
{
()
=>
{
actionRef
?.
current
?.
reload
();
}
}
></
ImportExcel
>
<
PremButton
btn=
{
{
variant
:
"contained"
,
...
...
src/pages/teacher/index.jsx
View file @
590aa4c2
...
...
@@ -488,10 +488,7 @@ function Teacher() {
key
:
"1"
,
label
:
`正式用户`
,
children
:
(
<
Box
boxShadow=
{
"0 0 18px #f0f0f0"
}
borderRadius=
{
2
}
>
<
Box
boxShadow=
{
"0 0 18px #f0f0f0"
}
borderRadius=
{
2
}
>
<
AutoTable
actionRef=
{
actionRef
}
scroll=
{
{
x
:
1366
}
}
...
...
@@ -519,10 +516,7 @@ function Teacher() {
key
:
"2"
,
label
:
`教师认证申请`
,
children
:
(
<
Box
boxShadow=
{
"0 0 18px #f0f0f0"
}
borderRadius=
{
2
}
>
<
Box
boxShadow=
{
"0 0 18px #f0f0f0"
}
borderRadius=
{
2
}
>
<
AutoTable
actionRef=
{
actionRefs
}
scroll=
{
{
x
:
1366
}
}
...
...
@@ -661,7 +655,13 @@ function Teacher() {
<
Typography
variant=
"h5"
>
教师管理
</
Typography
>
{
active
===
"1"
?
(
<
Stack
spacing=
{
2
}
direction=
"row"
>
<
ImportExcel
></
ImportExcel
>
<
ImportExcel
importurl=
"/user/teacherImport"
downloadurl=
"/download/教师管理数据导入模板.xlsx"
refresh=
{
()
=>
{
actionRef
?.
current
?.
reload
();
}
}
></
ImportExcel
>
<
PremButton
btn=
{
{
variant
:
"contained"
,
...
...
@@ -678,8 +678,9 @@ function Teacher() {
新增教师
</
PremButton
>
</
Stack
>
):<
Box
height=
{
36
}
/>
}
)
:
(
<
Box
height=
{
36
}
/>
)
}
</
Box
>
<
Tabs
...
...
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