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
a11c2461
Commit
a11c2461
authored
May 30, 2022
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
1c57d044
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
390 additions
and
172 deletions
+390
-172
index.js
src/api/index.js
+2
-2
courseCard.vue
src/components/index/workSituation/courseCard.vue
+69
-100
examList.vue
src/components/index/workSituation/examList.vue
+21
-1
operation.vue
src/components/index/workSituation/operation.vue
+22
-2
studentList.vue
src/components/index/workSituation/studentList.vue
+27
-8
pages.json
src/pages.json
+6
-1
indexassembly.vue
src/pages/index/components/indexassembly.vue
+2
-1
jobDetails.vue
src/pages/index/jobDetails.vue
+21
-13
workSituation.vue
src/pages/index/workSituation.vue
+68
-42
accountLogin.vue
src/pages/login/accountLogin.vue
+3
-2
student.vue
src/pages/student/student.vue
+149
-0
No files found.
src/api/index.js
View file @
a11c2461
...
...
@@ -195,9 +195,9 @@ export function getClassFeedBackList(data) {
* 扫码签到
* @param {JSON参数} data
*/
export
function
get
SweepCod
e
(
data
)
{
export
function
get
TeacherCours
e
(
data
)
{
return
request
({
url
:
"/
class/AddClassCheck
"
,
url
:
"/
Teacher/GetTeacherCourse
"
,
method
:
'post'
,
data
})
...
...
src/components/index/workSituation/courseCard.vue
View file @
a11c2461
...
...
@@ -3,22 +3,24 @@
<view
class=
"course-item"
>
<view
style=
"width:287rpx;"
>
<view
class=
"course-name"
>
成都2022科学益智L4-05乐思会
{{
currentCourse
?
currentCourse
.
CourseName
:
'暂无课程'
}}
</view>
<van-progress
percentage=
"75"
:show-pivot=
"false"
track-color=
"#EFEFEF"
color=
"#282828"
stroke-width=
"5"
/>
<view
class=
"course-progress"
>
上课进度 5/12
</view>
<view
class=
"course-opera"
>
<van-button
@
click=
"exchangeItemHandler"
class-prefix=
"iconfont"
icon=
" icon-qiehuan1"
round
type=
"default"
size=
"mini"
custom-style=
"color:#E23B4A;font-size: 24rpx;padding-left:10rpx;padding-right:10px;"
>
切换课程
</van-button>
<view
v-if=
"currentCourse"
>
<van-progress
:percentage=
"(parseFloat(currentCourse.CompleteNum)/parseFloat(currentCourse.TotalClassNum))*100"
:show-pivot=
"false"
track-color=
"#EFEFEF"
color=
"#282828"
stroke-width=
"5"
/>
<view
class=
"course-progress"
>
上课进度
{{
currentCourse
.
CompleteNum
}}
/
{{
currentCourse
.
TotalClassNum
}}
</view>
<view
class=
"course-opera"
>
<van-button
@
click=
"exchangeItemHandler"
class-prefix=
"iconfont"
icon=
" icon-qiehuan1"
round
type=
"default"
size=
"mini"
custom-style=
"color:#E23B4A;font-size: 24rpx;padding-left:10rpx;padding-right:10px;"
>
切换课程
</van-button>
</view>
</view>
</view>
<image
class=
"illustration"
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1653
464014000_49
4.png"
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1653
902313000_81
4.png"
mode=
"widthFix"
></image>
</view>
...
...
@@ -30,125 +32,65 @@
:show=
"showItems"
round
position=
"bottom"
@
click-overlay=
"hideExchangeBoxHandler"
@
click-overlay=
"hideExchangeBoxHandler
(null)
"
custom-style=
"height: 75%"
>
<view
class=
"exchange-items"
>
<view
class=
"title-box"
>
<text
class=
"main-title"
>
课程选择
</text>
<text
class=
"sub-title"
>
(共有
3
门课程)
</text>
<text
class=
"main-title"
>
课程选择
{{
Keywords
}}
</text>
<text
class=
"sub-title"
>
(共有
{{
courses
.
AllCourseList
.
length
}}
门课程)
</text>
</view>
<view
class=
"courseCard-search"
>
<view
class=
"courseCard-search"
v-if=
"courses.AllCourseList.length>0"
>
<van-search
v-model
=
"Keywords"
:value
=
"Keywords"
shape=
"round"
style=
"border-radius: 20rpx;"
input-align=
"center"
background=
"#F6F6F6"
@
search=
"searchHandler"
placeholder=
"请输入搜索关键词"
/>
<!--
<input
v-model=
"Keywords"
placeholder=
"请输入搜索关键词"
/>
-->
</view>
<view
class=
"courseCard-title"
>
<view
class=
"courseCard-title"
v-if=
"courses.AllCourseList.length>0"
>
<view
class=
"workSituation-title-box flex"
>
<view
class=
"workSituation-title flex"
:class=
"
tabNme==t.name?'active':''
"
:class=
"
{'active':currentIndex==index}
"
v-for="(t,index) in titleList" :key="index"
@
click=
"toggleTitle(
t.name
)"
>
@click="toggleTitle(
index
)">
<text
class=
"name"
>
{{
t
.
name
}}
</text>
<view
class=
"num"
>
(
{{
t
.
num
}}
)
</view>
<view
class=
"num"
>
(
{{
t
.
data
.
length
}}
)
</view>
<view
class=
"current-title-box flex"
v-show=
"tabNme==t.name"
>
<text
class=
"name"
>
{{
t
.
name
}}
</text>
<view
class=
"num"
>
(
{{
t
.
num
}}
)
</view>
<view
class=
"num"
>
(
{{
t
.
data
.
length
}}
)
</view>
</view>
</view>
</view>
</view>
<view
class=
"items"
>
<view
class=
"item-course"
>
<view
class=
"course-pic"
>
<image
src=
"https://www.kfzimg.com/G06/M00/B5/48/p4YBAFsJY12AK0n7AAEM2KDUHRw535_n.jpg"
mode=
"aspectFill"
></image>
</view>
<view
class=
"content"
>
<view
class=
"one_line course-name"
>
高中物理鸿志班(二期周五下午上课)
</view>
<van-progress
percentage=
"46"
:show-pivot=
"false"
track-color=
"#EFEFEF"
color=
"#282828"
stroke-width=
"5"
/>
<view
class=
"course-progress"
>
上课进度 5/12
</view>
<view
style=
"text-align: right;"
>
<van-button
@
click=
"hideExchangeBoxHandler"
color=
"#C91727"
round
size=
"mini"
custom-style=
"color:#FFF;font-size: 24rpx;padding-left:16rpx;padding-right:10px;"
>
选择课程
</van-button>
</view>
</view>
</view>
<view
class=
"item-course"
>
<view
class=
"items"
v-if=
"titleList[currentIndex].data.length>0"
>
<template
v-for=
"(x,i) in titleList[currentIndex].data"
>
<view
class=
"item-course"
v-if=
"x.CourseName.indexOf(Keywords)!=-1"
:key=
"i"
>
<view
class=
"course-pic"
>
<image
src=
"https://www.kfzimg.com/G06/M00/B5/48/p4YBAFsJY12AK0n7AAEM2KDUHRw535_n.jpg
"
mode=
"aspectFill"
></image>
<image
:src=
"x.CoverImg!=''?x.CoverImg:'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1653901833000_638.png'
"
mode=
"aspectFill"
></image>
</view>
<view
class=
"content"
>
<view
class=
"one_line course-name"
>
高中物理鸿志班(二期周五下午上课)
{{
x
.
CourseName
}}
</view>
<van-progress
percentage=
"46
"
:show-pivot=
"false"
track-color=
"#EFEFEF"
color=
"#282828"
<van-progress
:percentage=
"(parseFloat(x.CompleteNum)/parseFloat(x.TotalClassNum))*100
"
:show-pivot=
"false"
track-color=
"#EFEFEF"
color=
"#282828"
stroke-width=
"5"
/>
<view
class=
"course-progress"
>
上课进度
5/12
上课进度
{{
x
.
CompleteNum
}}
/
{{
x
.
TotalClassNum
}}
</view>
<view
style=
"text-align: right;"
>
<van-button
@
click=
"hideExchangeBoxHandler"
color=
"#C91727"
round
size=
"mini"
custom-style=
"color:#FFF;font-size: 24rpx;padding-left:16rpx;padding-right:10px;"
>
选择课程
</van-button>
</view>
</view>
</view>
<view
class=
"item-course"
>
<view
class=
"course-pic"
>
<image
src=
"https://www.kfzimg.com/G06/M00/B5/48/p4YBAFsJY12AK0n7AAEM2KDUHRw535_n.jpg"
mode=
"aspectFill"
></image>
</view>
<view
class=
"content"
>
<view
class=
"one_line course-name"
>
高中物理鸿志班(二期周五下午上课)
</view>
<van-progress
percentage=
"46"
:show-pivot=
"false"
track-color=
"#EFEFEF"
color=
"#282828"
stroke-width=
"5"
/>
<view
class=
"course-progress"
>
上课进度 5/12
</view>
<view
style=
"text-align: right;"
>
<van-button
@
click=
"hideExchangeBoxHandler"
color=
"#C91727"
round
size=
"mini"
custom-style=
"color:#FFF;font-size: 24rpx;padding-left:16rpx;padding-right:10px;"
>
选择课程
</van-button>
</view>
</view>
</view>
<view
class=
"item-course"
>
<view
class=
"course-pic"
>
<image
src=
"https://www.kfzimg.com/G06/M00/B5/48/p4YBAFsJY12AK0n7AAEM2KDUHRw535_n.jpg"
mode=
"aspectFill"
></image>
</view>
<view
class=
"content"
>
<view
class=
"one_line course-name"
>
高中物理鸿志班(二期周五下午上课)
</view>
<van-progress
percentage=
"46"
:show-pivot=
"false"
track-color=
"#EFEFEF"
color=
"#282828"
stroke-width=
"5"
/>
<view
class=
"course-progress"
>
上课进度 5/12
</view>
<view
style=
"text-align: right;"
>
<van-button
@
click=
"hideExchangeBoxHandler"
color=
"#C91727"
round
size=
"mini"
<van-button
@
click=
"hideExchangeBoxHandler(x)"
color=
"#C91727"
round
size=
"mini"
custom-style=
"color:#FFF;font-size: 24rpx;padding-left:16rpx;padding-right:10px;"
>
选择课程
</van-button>
</view>
</view>
</view>
</
template
>
</view>
</view>
</van-popup>
...
...
@@ -167,34 +109,61 @@
watch
,
computed
,
onMounted
,
defineEmits
}
from
"vue"
;
import
{
getTeacherCourse
}
from
'../../../api/index'
export
default
{
props
:
{},
setup
()
{
emits
:[
'change'
],
setup
(
props
,
ctx
)
{
const
Keywords
=
ref
(
''
)
let
data
=
reactive
({
statusBarHeight
:
24
,
showItems
:
false
,
Keywords
:
''
,
titleList
:[
{
name
:
'全部课程'
,
num
:
18
},
{
name
:
'进行中'
,
num
:
5
},
{
name
:
'已完成'
,
num
:
18
},
{
name
:
'全部课程'
,
data
:[]
},
{
name
:
'进行中'
,
data
:[]
},
{
name
:
'已完成'
,
data
:[]
},
],
tabNme
:
'进行中'
currentIndex
:
0
,
courses
:{},
currentCourse
:
null
,
});
let
methods
=
{
toggleTitle
(
t
)
{
data
.
tabNme
=
t
data
.
currentIndex
=
t
},
exchangeItemHandler
(){
data
.
showItems
=
true
},
hideExchangeBoxHandler
(){
hideExchangeBoxHandler
(
item
){
if
(
item
){
data
.
currentCourse
=
item
ctx
.
emit
(
'change'
,
item
.
courseId
)
}
data
.
showItems
=
false
},
queryTecherCourse
(){
getTeacherCourse
().
then
(
r
=>
{
data
.
courses
=
r
.
Data
data
.
titleList
[
0
].
data
=
r
.
Data
.
AllCourseList
data
.
titleList
[
1
].
data
=
r
.
Data
.
NotFinishList
data
.
titleList
[
2
].
data
=
r
.
Data
.
FinishList
data
.
currentCourse
=
r
.
Data
.
AllCourseList
.
length
>
0
?
r
.
Data
.
AllCourseList
[
0
]:
null
console
.
log
(
data
.
currentCourse
)
ctx
.
emit
(
'change'
,
data
.
currentCourse
?
data
.
currentCourse
.
courseId
:
0
)
})
},
searchHandler
(
e
){
Keywords
.
value
=
e
.
detail
}
}
methods
.
queryTecherCourse
()
return
{
...
toRefs
(
data
),
Keywords
,
...
methods
};
},
...
...
src/components/index/workSituation/examList.vue
View file @
a11c2461
...
...
@@ -4,6 +4,7 @@
<van-icon
name=
"plus"
/>
<text>
导入考试信息
</text>
</view>
<block
v-if=
"dataList && dataList.length>0"
>
<view
class=
"examList activeOne"
v-for=
"(item,index) in dataList"
:key=
"index"
>
<view
class=
"examList-center-box"
@
click=
"examDetails(item.ExamId)"
>
<view
class=
"examList-center-line"
></view>
...
...
@@ -44,7 +45,12 @@
</view>
</view>
<van-popup
:show=
"show"
:round=
"true"
>
</block>
<view
class=
"noData"
v-else
>
<image
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1653902791000_806.png"
mode=
"widthFix"
></image>
<view>
暂无考试信息
</view>
</view>
<van-popup
:show=
"show"
:round=
"true"
>
<view
class=
"examList-popup-box"
>
<van-icon
class=
"examList-popup-closure"
name=
"cross"
@
click=
"show=false"
/>
<view
class=
"examList-popup-title"
>
导入考试信息
</view>
...
...
@@ -190,6 +196,20 @@
};
</
script
>
<
style
scoped
>
.examList-box
.noData
{
text-align
:
center
;
flex
:
1
;
width
:
100%
;
}
.examList-box
.noData
image
{
width
:
200
rpx
;
margin-bottom
:
40
rpx
;
}
.examList-box
.noData
view
{
font-size
:
24
rpx
;
color
:
#cecece
;
text-align
:
center
;
}
.examList-hint-right
view
{
padding
:
16
rpx
30
rpx
;
background
:
#C91727
;
...
...
src/components/index/workSituation/operation.vue
View file @
a11c2461
<
template
>
<view
class=
"operation-box"
>
<block
v-if=
"dataList && dataList.length>0"
>
<view
class=
"operation activeOne"
v-for=
"(item,index) in dataList"
:key=
"index"
>
<view
class=
"operation-center-box"
@
click=
"JobDetails"
>
...
...
@@ -41,6 +42,11 @@
</view>
</view>
</view>
</block>
<view
class=
"noData"
v-else
>
<image
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1653902791000_806.png"
mode=
"widthFix"
></image>
<view>
暂无课程信息
</view>
</view>
</view>
</
template
>
<
script
>
...
...
@@ -64,7 +70,7 @@
});
let
methods
=
{
JobDetails
(){
uni
.
reLaunch
({
uni
.
navigateTo
({
url
:
'/pages/index/jobDetails'
});
}
...
...
@@ -77,6 +83,20 @@
};
</
script
>
<
style
scoped
>
.operation-box
.noData
{
text-align
:
center
;
flex
:
1
;
width
:
100%
;
}
.operation-box
.noData
image
{
width
:
200
rpx
;
margin-bottom
:
40
rpx
;
}
.operation-box
.noData
view
{
font-size
:
24
rpx
;
color
:
#cecece
;
text-align
:
center
;
}
.homework-score-num
view
:last-child
{
font-size
:
23
rpx
;
margin-top
:
25
rpx
;
...
...
@@ -117,7 +137,7 @@
color
:
#CE8086
;
}
.operation.activeOne
.operation-state-text
{
color
:
#0
BFF5B
;
color
:
#0
8be42
;
}
.operation-state-text
{
font-size
:
20
rpx
;
...
...
src/components/index/workSituation/studentList.vue
View file @
a11c2461
<
template
>
<view
class=
"studentList-box flex"
>
<view
class=
"studentList-content"
v-for=
"(item,index) in dataList"
:key=
"index"
>
<block
v-if=
"dataList && dataList.length>0"
>
<view
class=
"studentList-content"
@
click=
"selectStuHandler(item)"
v-for=
"(item,index) in dataList"
:key=
"index"
>
<view
class=
"studentList flex"
>
<view
class=
"studentList-img"
>
<van-image
width=
"100%"
height=
"100%"
fit=
"cover"
class=
"img"
...
...
@@ -11,6 +12,11 @@
</text>
</view>
</view>
</block>
<view
class=
"noData"
v-else
>
<image
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1653902791000_806.png"
mode=
"widthFix"
></image>
<view>
暂无学员信息
</view>
</view>
</view>
</
template
>
<
script
>
...
...
@@ -24,10 +30,11 @@
export
default
{
props
:
{
dataList
:
[]
dataList
:
[]
,
},
components
:
{},
setup
(
props
)
{
emits
:[
'selected'
],
setup
(
props
,
ctx
)
{
let
data
=
reactive
({
obj
:
{
...
...
@@ -39,11 +46,9 @@
dataList
:
props
.
dataList
});
let
methods
=
{
JobDetails
(){
uni
.
reLaunch
({
url
:
'/pages/index/workSituation'
});
}
selectStuHandler
(
item
){
ctx
.
emit
(
"selected"
,
item
.
StuId
,
item
.
StuName
)
}
}
return
{
...
toRefs
(
data
),
...
...
@@ -53,6 +58,20 @@
};
</
script
>
<
style
scoped
>
.studentList-box
.noData
{
text-align
:
center
;
flex
:
1
;
width
:
100%
;
}
.studentList-box
.noData
image
{
width
:
200
rpx
;
margin-bottom
:
40
rpx
;
}
.studentList-box
.noData
view
{
font-size
:
24
rpx
;
color
:
#cecece
;
text-align
:
center
;
}
.studentList
text
{
text-align
:
center
;
color
:
#2E2E2E
;
...
...
src/pages.json
View file @
a11c2461
...
...
@@ -41,7 +41,12 @@
"style"
:
{
"navigationStyle"
:
"custom"
}
}
},{
"path"
:
"pages/student/student"
,
"style"
:
{
"navigationStyle"
:
"custom"
}
}
],
"subPackages"
:
[],
...
...
src/pages/index/components/indexassembly.vue
View file @
a11c2461
...
...
@@ -147,7 +147,8 @@
let
res
=
await
parsePhone
({
code
,
encryptedData
,
iv
iv
,
AccountType
:
2
})
console
.
log
(
res
)
if
(
res
&&
res
.
Data
.
UserMobile
)
{
...
...
src/pages/index/jobDetails.vue
View file @
a11c2461
<
template
>
<view
class=
"jobDetails-box"
>
<navbar
class=
"navbarSticky"
bg=
"#F6F6F6
"
>
<view
class=
"jobDetails-header-box"
>
<navbar
class=
"navbarSticky"
bg=
"#FCEEEF
"
>
<view
class=
"jobDetails-header-box
flex
"
>
<van-icon
class=
"jobDetails-header-left"
name=
"arrow-left"
@
click=
"back"
/>
<text
class=
"jobDetails-header-title"
>
作业情况
</text>
</view>
<text
class=
"jobDetails-header-title"
>
作业情况
</text>
</view>
</navbar>
<view
class=
"jobDetails-content"
>
<view
class=
"jobDetails-content-header"
>
...
...
@@ -46,13 +46,14 @@
getCurrentInstance
,
inject
}
from
"vue"
;
import
navbar
from
'../../components/navbar.vue'
export
default
{
props
:
{
},
components
:
{
jobDetailsComponents
jobDetailsComponents
,
navbar
},
setup
()
{
...
...
@@ -66,9 +67,12 @@
});
let
methods
=
{
back
(){
uni
.
reLaunch
({
url
:
'/pages/index/workSituation?tabNme='
+
'作业情况'
});
// uni.reLaunch({
// url: '/pages/index/workSituation?tabNme=' + '作业情况'
// });
uni
.
navigateBack
({
delta
:
1
})
}
}
return
{
...
...
@@ -135,16 +139,19 @@
z-index
:
0
;
}
.jobDetails-header-title
{
position
:
absolute
;
/*
position: absolute;
left: 0;
right: 0;
top: 0;
padding: 37rpx 31rpx;
text-align: center;
letter-spacing
:
1
rpx
;
letter-spacing: 1rpx;
*/
font-size
:
32
rpx
;
font-weight
:
500
;
color
:
#282828
;
flex
:
1
;
text-align
:
center
;
padding-right
:
40
rpx
;
}
.jobDetails-header
{
margin
:
50
rpx
50
rpx
0
50
rpx
;
...
...
@@ -156,8 +163,9 @@
z-index
:
3
;
}
.jobDetails-header-box
{
padding
:
37
rpx
31
rpx
;
position
:
relative
;
padding
:
20
rpx
42
rpx
;
flex-direction
:
row
;
align-items
:
center
;
}
.navbarSticky
{
display
:
sticky
;
...
...
src/pages/index/workSituation.vue
View file @
a11c2461
...
...
@@ -10,43 +10,40 @@
<view
class=
"index-header-title"
>
welcome
</view>
<view
class=
"index-header-name"
>
周一围
</view>
<view
class=
"index-header-name"
>
{{
userData
.
AccountName
}}
</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;"
>
李
老师
</view>
<view
style=
"font-size: 36rpx;"
>
Hi
,
</view>
<view
style=
"font-size: 50rpx;"
>
{{
userData
.
AccountName
}}
老师
</view>
</view>
</view>
<courseCard></courseCard>
<courseCard
@
change=
"changeCourseHandler"
></courseCard>
<view
class=
"index-student-information"
>
<view
class=
"workSituation-title-box flex"
>
<view
class=
"workSituation-title
flex
"
<view
class=
"workSituation-title"
:class=
"tabNme==t.name?'active':''"
v-for=
"(t,index) in titleList"
:key=
"index"
@
click=
"toggleTitle(t.name)"
>
<text
class=
"name"
>
{{
t
.
name
}}
</text>
<view
class=
"num"
>
(
{{
t
.
num
}}
)
</view>
<view
class=
"current-title-box flex"
v-show=
"tabNme==t.name"
>
<text
class=
"name"
>
{{
t
.
name
}}
</text>
<view
class=
"num"
>
(
{{
t
.
num
}}
)
</view>
</view>
</view>
</view>
<van-empty
description=
"暂无数据"
v-if=
"
dataList.length
=== 0"
/>
<van-empty
description=
"暂无数据"
v-if=
"
currentCourseId
=== 0"
/>
<scroll-view
:scroll-top=
"0"
scroll-y=
"true"
class=
"scroll-box"
@
scrolltolower=
"lower"
v-if=
"
dataList.length
> 0"
v-if=
"
currentCourseId
> 0"
>
<operation
v-if=
"tabNme=='作业情况'"
:dataList=
"
dataList
"
></operation>
<studentList
v-if=
"tabNme=='学生列表'"
:dataList=
"dataList
"
></studentList>
<examList
v-if=
"tabNme=='考试信息'"
:dataList=
"
dataList
"
></examList>
<
Loadmore
:state=
"pageState"
/
>
<operation
v-if=
"tabNme=='作业情况'"
:dataList=
"
homeWorks
"
></operation>
<studentList
@
selected=
"selectStuHandler"
v-if=
"tabNme=='学生列表'"
:dataList=
"students
"
></studentList>
<examList
v-if=
"tabNme=='考试信息'"
:dataList=
"
exams
"
></examList>
<
!--
<Loadmore
:state=
"pageState"
/>
--
>
</scroll-view>
</view>
</view>
...
...
@@ -107,23 +104,41 @@
courseId
:
''
},
OperationMsg
:{
courseId
:
''
courseId
:
''
,
},
pageCount
:
0
,
timer
:
null
,
//防抖
dataList
:[],
students
:[],
homeWorks
:[],
exams
:[],
pageState
:
"more"
,
currentCourseId
:
0
,
userData
:{},
loading
:
false
});
data
.
userData
=
uni
.
getStorageSync
(
"userInfo"
)
let
methods
=
{
back
()
{
uni
.
navigateTo
({
url
:
'/pages/index/index'
});
},
selectStuHandler
(
id
,
name
){
uni
.
navigateTo
({
url
:
'/pages/student/student?stuId='
+
id
+
'&courseId='
+
data
.
currentCourseId
+
'&stuName='
+
encodeURIComponent
(
name
)
})
},
changeCourseHandler
(
id
){
console
.
log
(
id
,
'........................'
)
data
.
Msg
.
courseId
=
id
data
.
OperationMsg
.
courseId
=
id
data
.
currentCourseId
=
id
methods
.
getCourseStuList
()
methods
.
getExamPageList
()
methods
.
getGetCourseHomeWorkList
()
},
toggleTitle
(
t
)
{
data
.
tabNme
=
t
data
.
dataList
=
[]
if
(
data
.
tabNme
==
'学生列表'
){
that
.
getCourseStuList
()
}
else
if
(
data
.
tabNme
==
'作业情况'
){
...
...
@@ -141,7 +156,7 @@
item
.
num
=
res
.
Data
.
length
}
});
data
.
dataList
=
res
.
Data
;
data
.
students
=
res
.
Data
;
data
.
pageState
=
"none"
;
}
})
...
...
@@ -155,7 +170,7 @@
item
.
num
=
res
.
Data
.
length
}
});
data
.
dataList
=
res
.
Data
;
data
.
homeWorks
=
res
.
Data
;
data
.
pageState
=
"none"
;
}
})
...
...
@@ -171,9 +186,9 @@
});
if
(
data
.
timer
)
data
.
timer
=
null
;
if
(
data
.
Msg
.
PageIndex
===
1
)
{
data
.
dataList
=
res
.
Data
.
PageData
;
data
.
exams
=
res
.
Data
.
PageData
;
}
else
{
data
.
dataList
=
[...
res
.
Data
.
PageData
,
...
data
.
dataList
];
data
.
exams
=
[...
res
.
Data
.
PageData
,
...
data
.
exams
];
}
data
.
pageCount
=
res
.
Data
.
PageCount
;
if
(
data
.
Msg
.
PageIndex
>=
res
.
Data
.
PageCount
)
{
...
...
@@ -214,19 +229,18 @@
};
},
onLoad
(
option
)
{
this
.
tabNme
=
option
.
tabNme
this
.
OperationMsg
.
courseId
=
option
.
courseId
this
.
Msg
.
courseId
=
option
.
courseId
//
this.tabNme = option.tabNme
//
this.OperationMsg.courseId = option.courseId
//
this.Msg.courseId = option.courseId
},
onShow
()
{
this
.
dataList
=
[]
if
(
this
.
tabNme
==
'学生列表'
){
this
.
getCourseStuList
()
}
else
if
(
this
.
tabNme
==
'作业情况'
){
this
.
getGetCourseHomeWorkList
()
}
else
{
this
.
getExamPageList
()
}
// if(this.tabNme=='学生列表'){
// this.getCourseStuList()
// }else if(this.tabNme=='作业情况'){
// this.getGetCourseHomeWorkList()
// }else{
// this.getExamPageList()
// }
},
onShareAppMessage
()
{
...
...
@@ -252,7 +266,7 @@
display
:
inline-block
;
margin-top
:
5
rpx
;
}
.current-title-box
{
/*
.current-title-box{
color: #FFFFFF;
background: #282828;
padding: 26rpx 36rpx;
...
...
@@ -263,24 +277,36 @@
top: -28rpx;
border-radius: 39rpx;
justify-content: center;
}
}
*/
.workSituation-title.active
{
position
:
relative
;
background-color
:
#282828
;
color
:
#FFF
;
}
.workSituation-title.active
.name
{
font-size
:
30
rpx
;
font-weight
:
bold
;
}
.workSituation-title.active
.num
{
font-size
:
20
rpx
;
}
.workSituation-title
{
flex
:
1
;
color
:
#282828
;
font-size
:
26
rpx
;
font-weight
:
bold
;
align-items
:
center
;
letter-spacing
:
1px
;
text-align
:
center
;
border-radius
:
39
rpx
;
font-size
:
30
rpx
;
font-weight
:
400
;
color
:
#282828
;
line-height
:
77
rpx
;
}
.workSituation-title-box
{
margin-bottom
:
5
0
rpx
;
margin-bottom
:
3
0
rpx
;
margin
:
0
50
rpx
50
rpx
;
padding
:
17
rpx
0
17
rpx
28
rpx
;
height
:
77
rpx
;
background
:
#F0F0F0
;
border-radius
:
3
0
rpx
;
border-radius
:
3
9
rpx
;
}
.index-student-information
{
min-height
:
800
rpx
;
...
...
src/pages/login/accountLogin.vue
View file @
a11c2461
...
...
@@ -79,8 +79,8 @@
}
=
getCurrentInstance
();
let
Toast
=
inject
(
"$toast"
);
let
msg
=
reactive
({
Account
:
"13
80255750
8"
,
Password
:
"
55750
8"
,
Account
:
"13
98212895
8"
,
Password
:
"
12895
8"
,
});
let
data
=
reactive
({
phoneNum
:
""
,
...
...
@@ -129,6 +129,7 @@
return
;
}
let
url
=
data
.
userLoginType
==
2
?
'/Login/Login'
:
'/Login/LoginByAccount'
msg
.
AccountType
=
data
.
userLoginType
==
2
?
1
:
2
;
let
res
=
await
this
.
$request
(
url
,
msg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
){
if
((
res
.
Data
.
AccountType
==
1
&&
data
.
userLoginType
==
2
)
||
res
.
Data
.
AccountType
==
2
&&
data
.
userLoginType
==
1
){
...
...
src/pages/student/student.vue
0 → 100644
View file @
a11c2461
<
template
>
<view
class=
"indexpage"
>
<navbar
class=
"navbarSticky"
bg=
"#fff"
>
<view
class=
"student-header-box flex"
>
<van-icon
class=
"student-header-left"
name=
"arrow-left"
@
click=
"back"
/>
<text
class=
"student-header-title"
>
学员详情
</text>
</view>
</navbar>
<view
style=
"margin: 40rpx 0 10rpx 0;"
>
<view
style=
"padding:0 50rpx;font-weight: 800;color: #282828;"
>
<view
style=
"font-size: 36rpx;"
>
{{
stuName
}}
的学情反馈
</view>
</view>
</view>
<view
class=
"index-student-title flex"
>
<text>
学情反馈
</text>
<view>
(共
{{
workList
!=
null
&&
workList
.
length
>
0
?
workList
.
length
:
0
}}
条)
</view>
</view>
<view
class=
"index-student-information"
>
<template
v-for=
"(item,index) in workList"
>
<JobComponents
v-if=
"item.ResultType==1"
:jobData=
"item"
></JobComponents>
<examComponents
v-if=
"item.ResultType==2"
:jobData=
"item"
></examComponents>
<commentsComponents
v-if=
"item.ResultType==3"
:jobData=
"item"
></commentsComponents>
</
template
>
</view>
</view>
</template>
<
script
>
import
JobComponents
from
'@/components/index/JobComponents'
import
examComponents
from
'@/components/index/examComponents'
import
commentsComponents
from
'@/components/index/commentsComponents'
import
navbar
from
'../../components/navbar.vue'
import
vue
,
{
ref
,
reactive
,
toRefs
,
toRef
,
getCurrentInstance
,
watch
,
computed
,
onMounted
,
provide
,
nextTick
,
}
from
"vue"
;
export
default
{
components
:
{
JobComponents
,
examComponents
,
commentsComponents
,
navbar
},
setup
(
props
)
{
let
{
proxy
}
=
getCurrentInstance
();
let
data
=
reactive
({
stuCourseList
:
[],
//学员课程列表
userData
:
{},
//用户信息
//学员作业和考试查询参数
workMsg
:
{
courseId
:
0
,
stuId
:
0
},
stuName
:
''
,
workList
:
[],
//学员作业、考试、评语数据
});
let
methods
=
{
back
()
{
uni
.
navigateTo
({
url
:
'/pages/index/index'
});
},
//获取学员作业、考试、评语
getStuHomeWorkAndExam
()
{
data
.
workList
=
[];
proxy
.
$request
(
"/Stu/GetStuWork"
,
data
.
workMsg
).
then
(
res
=>
{
data
.
workList
=
res
.
Data
;
})
}
};
onMounted
(()
=>
{
});
return
{
...
toRefs
(
data
),
...
methods
,
};
},
onLoad
(
option
)
{
this
.
workMsg
.
stuId
=
option
.
stuId
this
.
workMsg
.
courseId
=
option
.
courseId
this
.
stuName
=
decodeURIComponent
(
option
.
stuName
)
this
.
getStuHomeWorkAndExam
()
}
};
</
script
>
<
style
scoped
>
.student-header-box
{
padding
:
20
rpx
42
rpx
;
flex-direction
:
row
;
align-items
:
center
;
}
.student-header-title
{
font-size
:
32
rpx
;
font-weight
:
500
;
color
:
#282828
;
flex
:
1
;
text-align
:
center
;
padding-right
:
40
rpx
;
}
.student-header-left
{
font-size
:
40
rpx
;
position
:
relative
;
z-index
:
3
;
}
.navbarSticky
{
display
:
sticky
;
top
:
0
;
z-index
:
9
;
}
.index-student-title
view
{
font-size
:
25
rpx
;
color
:
#ABABAB
;
margin-left
:
20
rpx
;
padding
:
13
rpx
0
0
0
;
}
.index-student-title
text
{
font-size
:
36
rpx
;
font-weight
:
800
;
color
:
#282828
;
}
.index-student-title
{
padding
:
0
50
rpx
45
rpx
;
}
.index-student-information
{
min-height
:
500
rpx
;
background
:
rgba
(
255
,
255
,
255
,
.7
);
border-radius
:
50
rpx
50
rpx
0
0
;
padding
:
71
rpx
0
0
0
;
}
</
style
>
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