Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
thinkApp
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
游洁
thinkApp
Commits
454432b1
Commit
454432b1
authored
May 30, 2022
by
罗超
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/youjie/thinkapp
# Conflicts: # src/pages/index/workSituation.vue
parents
7e949616
8dc5bb5b
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
54 additions
and
90 deletions
+54
-90
course-card.vue
src/components/index/course-card.vue
+0
-1
examList.vue
src/components/index/workSituation/examList.vue
+23
-31
workSituation.vue
src/pages/index/workSituation.vue
+31
-58
No files found.
src/components/index/course-card.vue
View file @
454432b1
...
...
@@ -98,7 +98,6 @@
url
:
'/pages/index/workSituation?tabNme='
+
'作业情况'
+
'&courseId='
+
item
.
courseId
});
},
500
)
},
//计算完成百分比
calcPercentage
(
item
)
{
...
...
src/components/index/workSituation/examList.vue
View file @
454432b1
<
template
>
<view
class=
"examList-box"
>
<view
class=
"examList-import"
@
click=
"ImportInformation"
>
<view
class=
"examList-import"
@
click
.
stop
=
"ImportInformation"
>
<van-icon
name=
"plus"
/>
<text>
导入考试信息
</text>
</view>
...
...
@@ -38,7 +38,7 @@
</view>
</view>
<view
class=
"examList-hint-right"
>
<view
@
click=
"clickReimport(item)"
>
重新导入
</view>
<view
@
click
.
stop
=
"clickReimport(item)"
>
重新导入
</view>
</view>
</view>
</view>
...
...
@@ -49,7 +49,7 @@
<van-icon
class=
"examList-popup-closure"
name=
"cross"
@
click=
"show=false"
/>
<view
class=
"examList-popup-title"
>
导入考试信息
</view>
<view
class=
"examList-popup-content"
>
<input
v-model=
"
obj.n
ame"
class=
"examList-popup-name"
placeholder=
"请输入考试名称"
>
<input
v-model=
"
uploadParm.ExamN
ame"
class=
"examList-popup-name"
placeholder=
"请输入考试名称"
>
<van-uploader
class=
"examList-popup-fil-box flex"
multiple
...
...
@@ -94,10 +94,12 @@
showPhone
:
false
,
showLogin
:
false
,
//多次点击
show
:
false
,
params
:{
Uid
:
''
,
CourseId
:
''
,
ExamName
:
''
uploadParm
:
{
// Uid:726615,
// CourseId:44977497,
Uid
:
0
,
CourseId
:
0
,
ExamName
:
'考试测试530'
},
fileList
:[],
Msg
:{
...
...
@@ -114,22 +116,19 @@
url
:
'/pages/index/examDetails?examId='
+
item
});
},
//获取考试信息列表
getExamPageList
(){
proxy
.
$request
(
"/Exam/GetExamPageList"
,
data
.
Msg
).
then
(
res
=>
{
data
.
dataList
=
res
.
Data
;
})
// 重新导入
clickReimport
(
item
){
data
.
uploadParm
=
{
Uid
:
item
.
ExamId
,
CourseId
:
item
.
CourseId
,
ExamName
:
item
.
ExamName
}
},
ImportInformation
(){
this
.
show
=
true
data
.
show
=
true
},
uploadFilesBefore
(){
},
// 重新导入
clickReimport
(
item
){
},
// 添加导入
customUpload
(
event
){
...
...
@@ -149,26 +148,19 @@
})
return
}
let
params
=
{
// Uid: data.params.Uid,
// CourseId: data.params.CourseId,
// ExamName: data.params.ExamName,
Uid
:
1
,
CourseId
:
1
,
ExamName
:
''
,
}
uni
.
uploadFile
({
url
:
host
+
'/Upload/UploadStuExamScore'
,
filePath
:
file
[
0
].
url
,
name
:
'file'
,
formData
:
{
'myfile'
:
file
[
0
],
'params'
:
JSON
.
stringify
(
params
)
myfile
:
file
[
0
],
params
:
JSON
.
stringify
(
data
.
uploadParm
)
},
success
(
res
)
{
uni
.
hideLoading
();
uni
.
showToast
({
title
:
res
.
Message
,
title
:
res
.
Code
==
1
?
'导入成功'
:
'导入失败'
,
icon
:
'none'
,
duration
:
500
})
...
...
src/pages/index/workSituation.vue
View file @
454432b1
...
...
@@ -10,14 +10,14 @@
<view
class=
"index-header-title"
>
welcome
</view>
<view
class=
"index-header-name"
>
{{
userData
.
AccountName
}}
</view>
<view
class=
"index-header-name"
>
周一围
</view>
</view>
</view>
</navbar>
<view
style=
"margin: 40rpx 0 10rpx 0;"
>
<view
style=
"padding:0 50rpx;font-weight: 800;color: #282828;"
>
<view
style=
"font-size: 36rpx;"
>
Good afternoon,
</view>
<view
style=
"font-size: 50rpx;"
>
{{
userData
.
AccountName
}}
老师
</view>
<view
style=
"font-size: 50rpx;"
>
李
老师
</view>
</view>
</view>
<courseCard></courseCard>
...
...
@@ -49,7 +49,6 @@
<Loadmore
:state=
"pageState"
/>
</scroll-view>
</view>
<van-toast
id=
"van-toast"
/>
</view>
</
template
>
...
...
@@ -70,7 +69,6 @@
onMounted
,
provide
,
nextTick
,
inject
}
from
"vue"
;
import
{
...
...
@@ -95,17 +93,11 @@
let
{
proxy
}
=
getCurrentInstance
();
let
Toast
=
inject
(
"$toast"
)
Toast
.
loading
({
message
:
'加载中...'
,
forbidClick
:
true
,
loadingType
:
'spinner'
,
});
let
data
=
reactive
({
titleList
:[
{
name
:
'学生列表'
,
num
:
18
},
{
name
:
'作业情况'
,
num
:
5
},
{
name
:
'考试信息'
,
num
:
18
},
{
name
:
'学生列表'
,
num
:
0
},
{
name
:
'作业情况'
,
num
:
0
},
{
name
:
'考试信息'
,
num
:
0
},
],
tabNme
:
'作业情况'
,
Msg
:{
...
...
@@ -121,10 +113,8 @@
timer
:
null
,
//防抖
dataList
:[],
pageState
:
"more"
,
loading
:
true
,
userData
:{}
});
data
.
userData
=
uni
.
getStorageSync
(
'userInfo'
);
let
methods
=
{
back
()
{
uni
.
navigateTo
({
...
...
@@ -133,9 +123,10 @@
},
toggleTitle
(
t
)
{
data
.
tabNme
=
t
if
(
this
.
tabNme
==
'学生列表'
){
data
.
dataList
=
[]
if
(
data
.
tabNme
==
'学生列表'
){
that
.
getCourseStuList
()
}
else
if
(
this
.
tabNme
==
'作业情况'
){
}
else
if
(
data
.
tabNme
==
'作业情况'
){
that
.
getGetCourseHomeWorkList
()
}
else
{
that
.
getExamPageList
()
...
...
@@ -143,59 +134,41 @@
},
//获取学生列表
getCourseStuList
(){
data
.
loading
=
true
proxy
.
$request
(
"/Teacher/GetCourseStu"
,
data
.
OperationMsg
).
then
(
res
=>
{
if
(
res
){
data
.
dataList
=
res
.
Data
;
data
.
pageState
=
"none"
;
data
.
loading
=
false
return
if
(
data
.
timer
)
data
.
timer
=
null
;
if
(
data
.
Msg
.
PageIndex
===
1
)
{
data
.
dataList
=
res
.
Data
.
PageData
;
}
else
{
data
.
dataList
=
[...
res
.
Data
.
PageData
,
...
data
.
dataList
];
data
.
titleList
.
forEach
(
item
=>
{
if
(
item
.
name
==
'学生列表'
){
item
.
num
=
res
.
Data
.
length
}
data
.
pageCount
=
res
.
Data
.
PageCount
;
if
(
data
.
Msg
.
PageIndex
>=
res
.
Data
.
PageCount
)
{
})
;
data
.
dataList
=
res
.
Data
;
data
.
pageState
=
"none"
;
}
else
{
data
.
pageState
=
"more"
;
}
}
})
},
//获取作业情况列表
getGetCourseHomeWorkList
(){
data
.
loading
=
true
proxy
.
$request
(
"/Teacher/GetCourseHomeWork"
,
data
.
OperationMsg
).
then
(
res
=>
{
if
(
res
){
data
.
dataList
=
res
.
Data
;
data
.
pageState
=
"none"
;
return
if
(
data
.
timer
)
data
.
timer
=
null
;
if
(
data
.
Msg
.
PageIndex
===
1
)
{
data
.
dataList
=
res
.
Data
.
PageData
;
}
else
{
data
.
dataList
=
[...
res
.
Data
.
PageData
,
...
data
.
dataList
];
data
.
titleList
.
forEach
(
item
=>
{
if
(
item
.
name
==
'作业情况'
){
item
.
num
=
res
.
Data
.
length
}
data
.
pageCount
=
res
.
Data
.
PageCount
;
if
(
data
.
Msg
.
PageIndex
>=
res
.
Data
.
PageCount
)
{
})
;
data
.
dataList
=
res
.
Data
;
data
.
pageState
=
"none"
;
}
else
{
data
.
pageState
=
"more"
;
}
data
.
loading
=
false
}
})
},
//获取考试信息列表
getExamPageList
(){
data
.
loading
=
true
proxy
.
$request
(
"/Exam/GetExamPageList"
,
data
.
Msg
).
then
(
res
=>
{
if
(
res
){
data
.
titleList
.
forEach
(
item
=>
{
if
(
item
.
name
==
'考试信息'
){
item
.
num
=
res
.
Data
.
RowsCount
}
});
if
(
data
.
timer
)
data
.
timer
=
null
;
if
(
data
.
Msg
.
PageIndex
===
1
)
{
data
.
dataList
=
res
.
Data
.
PageData
;
...
...
@@ -208,7 +181,6 @@
}
else
{
data
.
pageState
=
"more"
;
}
data
.
loading
=
false
}
})
},
...
...
@@ -218,12 +190,12 @@
data
.
Msg
.
PageIndex
++
;
if
(
data
.
timer
)
clearTimeout
(
data
.
timer
);
data
.
timer
=
setTimeout
(()
=>
{
if
(
this
.
tabNme
==
'学生列表'
){
th
is
.
getCourseStuList
()
}
else
if
(
this
.
tabNme
==
'作业情况'
){
th
is
.
getGetCourseHomeWorkList
()
if
(
data
.
tabNme
==
'学生列表'
){
th
at
.
getCourseStuList
()
}
else
if
(
data
.
tabNme
==
'作业情况'
){
th
at
.
getGetCourseHomeWorkList
()
}
else
{
th
is
.
getExamPageList
()
th
at
.
getExamPageList
()
}
},
1000
);
}
else
{
...
...
@@ -247,7 +219,7 @@
this
.
Msg
.
courseId
=
option
.
courseId
},
onShow
()
{
//this.userData = uni.getStorageSync('userInfo');
this
.
dataList
=
[]
if
(
this
.
tabNme
==
'学生列表'
){
this
.
getCourseStuList
()
}
else
if
(
this
.
tabNme
==
'作业情况'
){
...
...
@@ -255,6 +227,7 @@
}
else
{
this
.
getExamPageList
()
}
},
onShareAppMessage
()
{
return
{
...
...
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