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
83c99a26
Commit
83c99a26
authored
May 27, 2022
by
zhengke
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/youjie/thinkapp
parents
2acfd29f
ef9d42a2
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
750 additions
and
823 deletions
+750
-823
JobComponents.vue
src/components/index/JobComponents.vue
+243
-212
commentsComponents.vue
src/components/index/commentsComponents.vue
+129
-122
course-card.vue
src/components/index/course-card.vue
+93
-134
examComponents.vue
src/components/index/examComponents.vue
+223
-196
index.vue
src/pages/index/index.vue
+62
-159
No files found.
src/components/index/JobComponents.vue
View file @
83c99a26
<
template
>
<view
class=
"JobComponents-box"
>
<view
class=
"JobComponents activeOne flex"
>
<view
class=
"JobComponents-time-box flex"
>
<view
class=
"JobComponents-time"
>
<view>
05/25 17:13
</view>
</view>
<view
class=
"JobComponents-line"
>
<view
class=
"JobComponents-point"
></view>
</view>
</view>
<view
class=
"JobComponents-center-box"
@
click=
"JobDetails"
>
<view
class=
"JobComponents-center-line"
></view>
<view
class=
"JobComponents-center flex"
>
<view
class=
"JobComponents-left"
>
<view
class=
"operation-name"
>
作业名称作业名称作业名称作业名称
</view>
<view
class=
"operation-state flex"
>
<view
class=
"operation-state-img"
></view>
<view
class=
"operation-state-text"
>
批阅
</view>
</view>
</view>
<view
class=
"JobComponents-right flex"
>
<view
class=
"homework-score"
>
<view
class=
"homework-score-title"
>
得分
</view>
<view
class=
"homework-score-num flex"
>
<view>
86
</view><view>
分
</view>
</view>
</view>
<view
class=
"homework-score"
>
<view
class=
"homework-score-title"
>
得分率
</view>
<view
class=
"homework-score-num flex"
>
<view>
86
</view><view>
%
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<view
class=
"JobComponents-time-box flex"
>
<view
class=
"JobComponents-time"
>
<view>
{{
jobData
.
CreateTime
}}
</view>
</view>
<view
class=
"JobComponents-line"
>
<view
class=
"JobComponents-point"
></view>
</view>
</view>
<view
class=
"JobComponents-center-box"
@
click=
"JobDetails"
>
<view
class=
"JobComponents-center-line"
></view>
<view
class=
"JobComponents-center flex"
>
<view
class=
"JobComponents-left"
>
<view
class=
"operation-name"
>
{{
jobData
.
Title
}}
</view>
<view
class=
"operation-state flex"
>
<view
class=
"operation-state-img"
></view>
<view
class=
"operation-state-text"
>
{{
jobData
.
DataObj
.
HomeWorkStatusStr
}}
</view>
</view>
</view>
<view
class=
"JobComponents-right flex"
>
<view
class=
"homework-score"
>
<view
class=
"homework-score-title"
>
得分
</view>
<view
class=
"homework-score-num flex"
>
<view>
{{
jobData
.
DataObj
.
Score
}}
</view>
<view>
分
</view>
</view>
</view>
<view
class=
"homework-score"
>
<view
class=
"homework-score-title"
>
得分率
</view>
<view
class=
"homework-score-num flex"
>
<view>
{{
jobData
.
DataObj
.
Score_p
}}
</view>
<view>
%
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</
template
>
<
script
>
...
...
@@ -48,12 +50,9 @@
}
from
"vue"
;
export
default
{
props
:
{
},
props
:
[
"jobData"
],
components
:
{},
setup
()
{
let
data
=
reactive
({
obj
:
{
Name
:
''
,
...
...
@@ -62,185 +61,217 @@
showPhone
:
false
,
showLogin
:
true
,
//多次点击
});
let
methods
=
{
JobDetails
()
{
uni
.
reLaunch
({
url
:
'/pages/index/workSituation'
let
methods
=
{
JobDetails
()
{
uni
.
reLaunch
({
url
:
'/pages/index/workSituation'
});
}
}
}
}
return
{
...
toRefs
(
data
),
...
methods
...
methods
};
},
};
</
script
>
<
style
scoped
>
.homework-score-num
view
:last-child
{
font-size
:
23
rpx
;
margin-top
:
25
rpx
;
}
.homework-score-num
view
:first-child
{
margin-right
:
10
rpx
;
font-size
:
46
rpx
;
font-weight
:
800
;
}
.homework-score-num
{
color
:
#3E3D3D
;
}
.homework-score-title
{
color
:
#484646
;
font-size
:
20
rpx
;
margin-bottom
:
23
rpx
;
font-weight
:
400
;
letter-spacing
:
1px
;
}
.homework-score
:first-child
{
margin-right
:
16
rpx
;
}
.JobComponents-right
{
height
:
122
rpx
;
background
:
#FFFFFF
;
padding
:
22
rpx
26
rpx
15
rpx
26
rpx
;
border-radius
:
30
rpx
;
justify-content
:
space-between
;
flex-shrink
:
0
;
margin-left
:
11
rpx
;
}
.JobComponents.activeThree
.operation-state-text
{
color
:
#CD3D47
;
}
.JobComponents.activeTwo
.operation-state-text
{
color
:
#4E4A4A
;
}
.JobComponents.activeOne
.operation-state-text
{
color
:
#FFFFFF
;
}
.operation-state-text
{
font-size
:
20
rpx
;
letter-spacing
:
2px
;
}
.JobComponents.activeThree
.operation-state-img
{
background
:
url('https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1653464014000_480.png')
no-repeat
;
background-size
:
22
rpx
22
rpx
;
}
.JobComponents.activeTwo
.operation-state-img
{
background
:
url('https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1653464014000_781.png')
no-repeat
;
background-size
:
22
rpx
22
rpx
;
}
.JobComponents.activeOne
.operation-state-img
{
background
:
url('https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1653464014000_44.png')
no-repeat
;
background-size
:
22
rpx
22
rpx
;
}
.operation-state-img
{
width
:
22
rpx
;
height
:
22
rpx
;
margin-right
:
9
rpx
;
margin-top
:
4
rpx
;
}
.operation-state
{
margin-top
:
35
rpx
;
font-size
:
20
rpx
;
}
.JobComponents.activeThree
.operation-name
{
color
:
#282828
;
}
.JobComponents.activeTwo
.operation-name
{
color
:
#282828
;
}
.JobComponents.activeOne
.operation-name
{
color
:
#FFFFFF
;
}
.operation-name
{
font-size
:
26
rpx
;
word-break
:
break-all
;
text-overflow
:
ellipsis
;
display
:
-webkit-box
;
-webkit-box-orient
:
vertical
;
-webkit-line-clamp
:
2
;
overflow
:
hidden
;
margin-top
:
9
rpx
;
letter-spacing
:
1px
;
font-weight
:
500
;
}
.JobComponents-left
{
flex
:
1
;
flex-grow
:
1
;
}
.JobComponents-center
{
justify-content
:
space-between
;
}
.JobComponents-center-line
{
width
:
4
rpx
;
height
:
23px
;
background
:
#FEFEFE
;
position
:
absolute
;
left
:
0
;
top
:
33
rpx
;
}
.JobComponents.activeThree
.JobComponents-center-box
{
background
:
#EEEEEE
;
}
.JobComponents.activeTwo
.JobComponents-center-box
{
background
:
#F9E0E2
;
}
.JobComponents.activeOne
.JobComponents-center-box
{
background
:
#E64150
;
}
.JobComponents-center-box
{
flex-grow
:
1
;
position
:
relative
;
border-radius
:
30
rpx
;
padding
:
21
rpx
18
rpx
21
rpx
24
rpx
;
margin-bottom
:
50
rpx
;
}
.JobComponents.activeThree
.JobComponents-point
{
background
:
#C1C1C1
;
}
.JobComponents.activeTwo
.JobComponents-point
{
background
:
#282828
;
}
.JobComponents.activeOne
.JobComponents-point
{
background
:
#C81727
;
box-shadow
:
0px
0px
12px
0px
rgba
(
200
,
23
,
39
,
0.46
);
}
.JobComponents
.JobComponents-point
{
width
:
19
rpx
;
height
:
19
rpx
;
position
:
absolute
;
top
:
20
rpx
;
left
:
-13
rpx
;
border-radius
:
50%
;
border
:
3px
solid
#FFFFFF
;
box-shadow
:
0px
0px
12px
0px
rgba
(
255
,
255
,
255
,
0.46
);
}
.JobComponents-line
{
width
:
4
rpx
;
height
:
100%
;
background
:
#F1F1F1
;
margin-left
:
46
rpx
;
margin-right
:
46
rpx
;
position
:
relative
;
}
.JobComponents-time
{
width
:
61
rpx
;
height
:
55
rpx
;
color
:
#CCC8C6
;
font-size
:
20
rpx
;
border-radius
:
20
rpx
;
padding
:
14
rpx
13
rpx
;
background
:
#F6F6F6
;
}
.JobComponents-time-box
{
}
.JobComponents
{
justify-content
:
space-between
;
padding
:
0
50
rpx
;
}
.JobComponents-box
{
/* background: #FFFFFF; */
}
.homework-score-num
view
:last-child
{
font-size
:
23
rpx
;
margin-top
:
25
rpx
;
}
.homework-score-num
view
:first-child
{
margin-right
:
10
rpx
;
font-size
:
46
rpx
;
font-weight
:
800
;
}
.homework-score-num
{
color
:
#3E3D3D
;
}
.homework-score-title
{
color
:
#484646
;
font-size
:
20
rpx
;
margin-bottom
:
23
rpx
;
font-weight
:
400
;
letter-spacing
:
1px
;
}
.homework-score
:first-child
{
margin-right
:
16
rpx
;
}
.JobComponents-right
{
height
:
122
rpx
;
background
:
#FFFFFF
;
padding
:
22
rpx
26
rpx
15
rpx
26
rpx
;
border-radius
:
30
rpx
;
justify-content
:
space-between
;
flex-shrink
:
0
;
margin-left
:
11
rpx
;
}
.JobComponents.activeThree
.operation-state-text
{
color
:
#CD3D47
;
}
.JobComponents.activeTwo
.operation-state-text
{
color
:
#4E4A4A
;
}
.JobComponents.activeOne
.operation-state-text
{
color
:
#FFFFFF
;
}
.operation-state-text
{
font-size
:
20
rpx
;
letter-spacing
:
2px
;
}
.JobComponents.activeThree
.operation-state-img
{
background
:
url('https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1653464014000_480.png')
no-repeat
;
background-size
:
22
rpx
22
rpx
;
}
.JobComponents.activeTwo
.operation-state-img
{
background
:
url('https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1653464014000_781.png')
no-repeat
;
background-size
:
22
rpx
22
rpx
;
}
.JobComponents.activeOne
.operation-state-img
{
background
:
url('https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1653464014000_44.png')
no-repeat
;
background-size
:
22
rpx
22
rpx
;
}
.operation-state-img
{
width
:
22
rpx
;
height
:
22
rpx
;
margin-right
:
9
rpx
;
margin-top
:
4
rpx
;
}
.operation-state
{
margin-top
:
35
rpx
;
font-size
:
20
rpx
;
}
.JobComponents.activeThree
.operation-name
{
color
:
#282828
;
}
.JobComponents.activeTwo
.operation-name
{
color
:
#282828
;
}
.JobComponents.activeOne
.operation-name
{
color
:
#FFFFFF
;
}
.operation-name
{
font-size
:
26
rpx
;
word-break
:
break-all
;
text-overflow
:
ellipsis
;
display
:
-webkit-box
;
-webkit-box-orient
:
vertical
;
-webkit-line-clamp
:
2
;
overflow
:
hidden
;
margin-top
:
9
rpx
;
letter-spacing
:
1px
;
font-weight
:
500
;
}
.JobComponents-left
{
flex
:
1
;
flex-grow
:
1
;
}
.JobComponents-center
{
justify-content
:
space-between
;
}
.JobComponents-center-line
{
width
:
4
rpx
;
height
:
23px
;
background
:
#FEFEFE
;
position
:
absolute
;
left
:
0
;
top
:
33
rpx
;
}
.JobComponents.activeThree
.JobComponents-center-box
{
background
:
#EEEEEE
;
}
.JobComponents.activeTwo
.JobComponents-center-box
{
background
:
#F9E0E2
;
}
.JobComponents.activeOne
.JobComponents-center-box
{
background
:
#E64150
;
}
.JobComponents-center-box
{
flex-grow
:
1
;
position
:
relative
;
border-radius
:
30
rpx
;
padding
:
21
rpx
18
rpx
21
rpx
24
rpx
;
margin-bottom
:
50
rpx
;
}
.JobComponents.activeThree
.JobComponents-point
{
background
:
#C1C1C1
;
}
.JobComponents.activeTwo
.JobComponents-point
{
background
:
#282828
;
}
.JobComponents.activeOne
.JobComponents-point
{
background
:
#C81727
;
box-shadow
:
0px
0px
12px
0px
rgba
(
200
,
23
,
39
,
0.46
);
}
.JobComponents
.JobComponents-point
{
width
:
19
rpx
;
height
:
19
rpx
;
position
:
absolute
;
top
:
20
rpx
;
left
:
-13
rpx
;
border-radius
:
50%
;
border
:
3px
solid
#FFFFFF
;
box-shadow
:
0px
0px
12px
0px
rgba
(
255
,
255
,
255
,
0.46
);
}
.JobComponents-line
{
width
:
4
rpx
;
height
:
100%
;
background
:
#F1F1F1
;
margin-left
:
46
rpx
;
margin-right
:
46
rpx
;
position
:
relative
;
}
.JobComponents-time
{
width
:
61
rpx
;
height
:
55
rpx
;
color
:
#CCC8C6
;
font-size
:
20
rpx
;
border-radius
:
20
rpx
;
padding
:
14
rpx
13
rpx
;
background
:
#F6F6F6
;
}
.JobComponents-time-box
{}
.JobComponents
{
justify-content
:
space-between
;
padding
:
0
50
rpx
;
}
.JobComponents-box
{
/* background: #FFFFFF; */
}
</
style
>
src/components/index/commentsComponents.vue
View file @
83c99a26
<
template
>
<view
class=
"CommentsComponents-box"
>
<view
class=
"CommentsComponents activeOne flex"
>
<view
class=
"CommentsComponents-time-box flex"
>
<view
class=
"CommentsComponents-time"
>
<view>
05/25 17:13
</view>
</view>
<view
class=
"CommentsComponents-line"
>
<view
class=
"CommentsComponents-point"
></view>
</view>
</view>
<view
class=
"CommentsComponents-center-box"
>
<view
class=
"CommentsComponents-center-line"
></view>
<view
class=
"CommentsComponents-center flex"
>
<view
class=
"CommentsComponents-left flex"
>
<van-image
width=
"38rpx"
height=
"38rpx"
fit=
"cover"
class=
"operation-img"
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1653464014000_713.png"
/>
<view
class=
"operation-name"
>
周老师的评语
</view>
</view>
<view
class=
"CommentsComponents-right"
>
你是个做事小心翼翼,感情细腻丰富的女孩
,每次看你认真的样子老师都很感动。你也是幸运的,周
边有很多人都在关爱着你,所以,对他们,尤其是父母,记得不要
太莽撞,不要太任性,要学着体谅,学着换位思考
,学着懂事。另外,今后要多运动、多锻炼,有健康才能成就美好未来!
</view>
</view>
</view>
</view>
<view
class=
"CommentsComponents-time-box flex"
>
<view
class=
"CommentsComponents-time"
>
<view>
{{
jobData
.
CreateTime
}}
</view>
</view>
<view
class=
"CommentsComponents-line"
>
<view
class=
"CommentsComponents-point"
></view>
</view>
</view>
<view
class=
"CommentsComponents-center-box"
>
<view
class=
"CommentsComponents-center-line"
></view>
<view
class=
"CommentsComponents-center flex"
>
<view
class=
"CommentsComponents-left flex"
>
<van-image
width=
"38rpx"
height=
"38rpx"
fit=
"cover"
class=
"operation-img"
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1653464014000_713.png"
/>
<view
class=
"operation-name"
>
{{
jobData
.
Title
}}
</view>
</view>
<view
class=
"CommentsComponents-right"
>
{{
jobData
.
DataObj
.
Comment
}}
</view>
</view>
</view>
</view>
</view>
</
template
>
<
script
>
...
...
@@ -40,12 +34,9 @@
}
from
"vue"
;
export
default
{
props
:
{
},
props
:
[
"jobData"
],
components
:
{},
setup
()
{
let
data
=
reactive
({
obj
:
{
Name
:
''
,
...
...
@@ -61,95 +52,111 @@
};
</
script
>
<
style
scoped
>
.CommentsComponents-right
{
color
:
#FFFFFF
;
font-size
:
20
rpx
;
line-height
:
35
rpx
;
letter-spacing
:
1
rpx
;
}
.CommentsComponents.activeThree
.operation-name
{
color
:
#282828
;
}
.CommentsComponents.activeTwo
.operation-name
{
color
:
#282828
;
}
.CommentsComponents.activeOne
.operation-name
{
color
:
#FFFFFF
;
}
.operation-name
{
font-size
:
26
rpx
;
letter-spacing
:
1px
;
font-weight
:
500
;
flex-grow
:
1
;
}
.operation-img
{
margin-right
:
12
rpx
;
border-radius
:
50%
;
flex-shrink
:
0
;
}
.CommentsComponents-left
{
flex
:
1
;
flex-grow
:
1
;
margin-top
:
-5
rpx
;
margin-bottom
:
10
rpx
;
}
.CommentsComponents-center
{
flex-direction
:
column
;
}
.CommentsComponents-center-line
{
width
:
4
rpx
;
height
:
23
rpx
;
background
:
#FEFEFE
;
position
:
absolute
;
left
:
0
;
top
:
33
rpx
;
}
.CommentsComponents.activeOne
.CommentsComponents-center-box
{
background
:
#52C1CA
;
}
.CommentsComponents-center-box
{
flex-grow
:
1
;
position
:
relative
;
border-radius
:
30
rpx
;
padding
:
31
rpx
18
rpx
21
rpx
24
rpx
;
margin-bottom
:
50
rpx
;
}
.CommentsComponents.activeOne
.CommentsComponents-point
{
background
:
#1E7BF5
;
box-shadow
:
0px
0px
12px
0px
rgba
(
30
,
123
,
245
,
0.46
);
}
.CommentsComponents-point
{
width
:
19
rpx
;
height
:
19
rpx
;
position
:
absolute
;
top
:
20
rpx
;
left
:
-13
rpx
;
border-radius
:
50%
;
border
:
3px
solid
#FFFFFF
;
box-shadow
:
0px
0px
12px
0px
rgba
(
255
,
255
,
255
,
0.46
);
}
.CommentsComponents-line
{
width
:
4
rpx
;
height
:
100%
;
background
:
#F1F1F1
;
margin-left
:
46
rpx
;
margin-right
:
46
rpx
;
position
:
relative
;
}
.CommentsComponents-time
{
width
:
61
rpx
;
height
:
55
rpx
;
color
:
#CCC8C6
;
font-size
:
20
rpx
;
border-radius
:
20
rpx
;
padding
:
14
rpx
13
rpx
;
background
:
#F6F6F6
;
}
.CommentsComponents
{
justify-content
:
space-between
;
padding
:
0
50
rpx
;
}
.CommentsComponents-box
{
background
:
#FFFFFF
;
}
.CommentsComponents-right
{
color
:
#FFFFFF
;
font-size
:
20
rpx
;
line-height
:
35
rpx
;
letter-spacing
:
1
rpx
;
}
.CommentsComponents.activeThree
.operation-name
{
color
:
#282828
;
}
.CommentsComponents.activeTwo
.operation-name
{
color
:
#282828
;
}
.CommentsComponents.activeOne
.operation-name
{
color
:
#FFFFFF
;
}
.operation-name
{
font-size
:
26
rpx
;
letter-spacing
:
1px
;
font-weight
:
500
;
flex-grow
:
1
;
}
.operation-img
{
margin-right
:
12
rpx
;
border-radius
:
50%
;
flex-shrink
:
0
;
}
.CommentsComponents-left
{
flex
:
1
;
flex-grow
:
1
;
margin-top
:
-5
rpx
;
margin-bottom
:
10
rpx
;
}
.CommentsComponents-center
{
flex-direction
:
column
;
}
.CommentsComponents-center-line
{
width
:
4
rpx
;
height
:
23
rpx
;
background
:
#FEFEFE
;
position
:
absolute
;
left
:
0
;
top
:
33
rpx
;
}
.CommentsComponents.activeOne
.CommentsComponents-center-box
{
background
:
#52C1CA
;
}
.CommentsComponents-center-box
{
flex-grow
:
1
;
position
:
relative
;
border-radius
:
30
rpx
;
padding
:
31
rpx
18
rpx
21
rpx
24
rpx
;
margin-bottom
:
50
rpx
;
}
.CommentsComponents.activeOne
.CommentsComponents-point
{
background
:
#1E7BF5
;
box-shadow
:
0px
0px
12px
0px
rgba
(
30
,
123
,
245
,
0.46
);
}
.CommentsComponents-point
{
width
:
19
rpx
;
height
:
19
rpx
;
position
:
absolute
;
top
:
20
rpx
;
left
:
-13
rpx
;
border-radius
:
50%
;
border
:
3px
solid
#FFFFFF
;
box-shadow
:
0px
0px
12px
0px
rgba
(
255
,
255
,
255
,
0.46
);
}
.CommentsComponents-line
{
width
:
4
rpx
;
height
:
100%
;
background
:
#F1F1F1
;
margin-left
:
46
rpx
;
margin-right
:
46
rpx
;
position
:
relative
;
}
.CommentsComponents-time
{
width
:
61
rpx
;
height
:
55
rpx
;
color
:
#CCC8C6
;
font-size
:
20
rpx
;
border-radius
:
20
rpx
;
padding
:
14
rpx
13
rpx
;
background
:
#F6F6F6
;
}
.CommentsComponents
{
justify-content
:
space-between
;
padding
:
0
50
rpx
;
}
.CommentsComponents-box
{
background
:
#FFFFFF
;
}
</
style
>
src/components/index/course-card.vue
View file @
83c99a26
...
...
@@ -3,132 +3,67 @@
<view
class=
"course-item"
>
<view
style=
"width:287rpx;"
>
<view
class=
"course-name"
>
成都2022科学益智L4-05乐思会
{{
stuCourseList
[
0
].
CourseName
}}
</view>
<van-progress
percentage=
"75
"
:show-pivot=
"false"
track-color=
"#EFEFEF"
color=
"#282828"
stroke-width=
"5"
/>
<van-progress
:percentage=
"calcPercentage(stuCourseList[0])
"
:show-pivot=
"false"
track-color=
"#EFEFEF"
color=
"#282828"
stroke-width=
"5"
/>
<view
class=
"course-progress"
>
上课进度
5/12
上课进度
{{
stuCourseList
[
0
].
CompleteNum
}}
/
{{
stuCourseList
[
0
].
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;"
>
切换课程
custom-style=
"color:#E23B4A;font-size: 24rpx;padding-left:10rpx;padding-right:10px;"
>
切换课程
</van-button>
</view>
</view>
<image
class=
"illustration"
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1653464014000_494.png"
mode=
"widthFix"
></image>
<template
v-if=
"stuCourseList[0].CoverImg"
>
<image
class=
"illustration"
:src=
"stuCourseList[0].CoverImg"
mode=
"widthFix"
></image>
</
template
>
<
template
v-else
>
<image
class=
"illustration"
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1653464014000_494.png"
mode=
"widthFix"
></image>
</
template
>
</view>
<image
class=
"end"
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1653464014000_413.png"
mode=
"widthFix"
></image>
<van-popup
:show=
"showItems"
round
position=
"bottom"
@
click-overlay=
"hideExchangeBoxHandler"
custom-style=
"height: 60%"
>
<image
class=
"end"
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1653464014000_413.png"
mode=
"widthFix"
></image>
<van-popup
:show=
"showItems"
round
position=
"bottom"
@
click-overlay=
"hideExchangeBoxHandler"
custom-style=
"height: 60%"
>
<view
class=
"exchange-items"
>
<view
class=
"title-box"
>
<text
class=
"main-title"
>
课程选择
</text>
<text
class=
"sub-title"
>
(共有
3
门课程)
</text>
<text
class=
"sub-title"
>
(共有
{{stuCourseList.length}}
门课程)
</text>
</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=
"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
<
template
v-for=
"(item,index) in stuCourseList"
>
<view
class=
"item-course"
>
<view
class=
"course-pic"
>
<image
v-if=
"item.CoverImg"
:src=
"item.CoverImg"
mode=
"aspectFill"
></image>
<image
v-else
src=
"https://www.kfzimg.com/G06/M00/B5/48/p4YBAFsJY12AK0n7AAEM2KDUHRw535_n.jpg"
mode=
"aspectFill"
></image>
</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
class=
"content"
>
<view
class=
"one_line course-name"
>
{{
item
.
CourseName
}}
</view>
<van-progress
:percentage=
"calcPercentage(item)"
:show-pivot=
"false"
track-color=
"#EFEFEF"
color=
"#282828"
stroke-width=
"5"
/>
<view
class=
"course-progress"
>
上课进度
{{
item
.
CompleteNum
}}
/
{{
item
.
TotalClassNum
}}
</view>
<view
style=
"text-align: right;"
>
<van-button
@
click=
"hideExchangeBoxHandler(item)"
color=
"#C91727"
round
size=
"mini"
custom-style=
"color:#FFF;font-size: 24rpx;padding-left:16rpx;padding-right:10px;"
>
选择课程
</van-button>
</view>
</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"
custom-style=
"color:#FFF;font-size: 24rpx;padding-left:16rpx;padding-right:10px;"
>
选择课程
</van-button>
</view>
</view>
</view>
</
template
>
</view>
</view>
</van-popup>
</view>
</template>
<
script
>
...
...
@@ -143,18 +78,31 @@
onMounted
,
}
from
"vue"
;
export
default
{
props
:
{}
,
setup
()
{
props
:
[
"stuCourseList"
]
,
setup
(
props
,
context
)
{
let
data
=
reactive
({
statusBarHeight
:
24
,
showItems
:
false
showItems
:
false
,
});
let
methods
=
{
exchangeItemHandler
(){
data
.
showItems
=
true
let
methods
=
{
exchangeItemHandler
()
{
data
.
showItems
=
true
},
//点击切换课程
hideExchangeBoxHandler
(
item
)
{
//调用父页面方法
this
.
$parent
.
getStuHomeWorkAndExam
(
item
.
courseId
);
data
.
showItems
=
false
},
hideExchangeBoxHandler
(){
data
.
showItems
=
false
//计算完成百分比
calcPercentage
(
item
)
{
let
percent
=
0
;
if
(
item
)
{
if
(
item
.
TotalClassNum
>
0
)
{
percent
=
Number
(
item
.
CompleteNum
/
item
.
TotalClassNum
)
*
100
}
}
return
percent
;
}
}
return
{
...
...
@@ -215,8 +163,9 @@
.course-card
.course-item
.course-opera
{
margin-top
:
20
rpx
;
}
.course-card
.exchange-items
{
padding
:
50
rpx
0
;
.course-card
.exchange-items
{
padding
:
50
rpx
0
;
padding-bottom
:
0
;
height
:
100%
;
box-sizing
:
border-box
;
...
...
@@ -224,59 +173,69 @@
flex-direction
:
column
;
background
:
#F6F6F6
;
}
.course-card
.exchange-items
.title-box
{
padding
:
0
50
rpx
;
.course-card
.exchange-items
.title-box
{
padding
:
0
50
rpx
;
}
.course-card
.exchange-items
.title-box
.main-title
{
.course-card
.exchange-items
.title-box
.main-title
{
font-size
:
36
rpx
;
font-weight
:
800
;
color
:
#282828
;
color
:
#282828
;
}
.course-card
.exchange-items
.title-box
.sub-title
{
.course-card
.exchange-items
.title-box
.sub-title
{
font-size
:
26
rpx
;
font-weight
:
normal
;
color
:
#6F6F6F
;
color
:
#6F6F6F
;
margin-left
:
10
rpx
;
}
.course-card
.exchange-items
.items
{
.course-card
.exchange-items
.items
{
width
:
100%
;
flex
:
1
;
overflow-y
:
auto
;
margin-top
:
40
rpx
;
padding
:
0
50
rpx
;
flex
:
1
;
overflow-y
:
auto
;
margin-top
:
40
rpx
;
padding
:
0
50
rpx
;
box-sizing
:
border-box
;
}
.course-card
.exchange-items
.items
.item-course
{
.course-card
.exchange-items
.items
.item-course
{
margin-bottom
:
50
rpx
;
padding
:
40
rpx
36
rpx
;
padding
:
40
rpx
36
rpx
;
display
:
flex
;
align-items
:
flex-start
;
background-color
:
#FFF
;
border-radius
:
30
rpx
;
}
.course-card
.exchange-items
.items
.item-course
.course-pic
{
.course-card
.exchange-items
.items
.item-course
.course-pic
{
width
:
100
rpx
;
height
:
140
rpx
;
margin-right
:
36
rpx
;
overflow
:
hidden
;
}
.course-card
.exchange-items
.items
.item-course
.course-pic
image
{
width
:
100%
;
.course-card
.exchange-items
.items
.item-course
.course-pic
image
{
width
:
100%
;
height
:
100%
;
}
.course-card
.exchange-items
.items
.item-course
.content
{
flex
:
1
;
.course-card
.exchange-items
.items
.item-course
.content
{
flex
:
1
;
width
:
1px
;
}
.course-card
.exchange-items
.items
.item-course
.content
.course-name
{
.course-card
.exchange-items
.items
.item-course
.content
.course-name
{
font-size
:
30
rpx
;
font-weight
:
bold
;
color
:
#282828
;
line-height
:
42
rpx
;
margin-bottom
:
20
rpx
;
}
.course-card
.exchange-items
.items
.item-course
.content
.course-progress
{
.course-card
.exchange-items
.items
.item-course
.content
.course-progress
{
color
:
#282828
;
font-weight
:
400
;
font-size
:
20
rpx
;
...
...
src/components/index/examComponents.vue
View file @
83c99a26
<
template
>
<view
class=
"examComponents-box"
>
<view
class=
"examComponents activeOne flex"
>
<view
class=
"examComponents-time-box flex"
>
<view
class=
"examComponents-time"
>
<view>
05/25 17:13
</view>
</view>
<view
class=
"examComponents-line"
>
<view
class=
"examComponents-point"
></view>
<view
class=
"examComponents-year"
>
2021 年
</view>
</view>
</view>
<view
class=
"examComponents-center-box"
@
click=
"scoreDetails"
>
<view
class=
"examComponents-center-line"
></view>
<view
class=
"examComponents-center flex"
>
<view
class=
"examComponents-left"
>
<view
class=
"operation-name"
>
考试名称
</view>
</view>
<view
class=
"examComponents-right flex"
>
<view
class=
"homework-score"
>
<view
class=
"homework-score-title"
>
总分
</view>
<view
class=
"homework-score-num flex"
>
<view>
86
</view><view>
分
</view>
</view>
</view>
<view
class=
"homework-score"
>
<view
class=
"homework-score-title"
>
得分率
</view>
<view
class=
"homework-score-num flex"
>
<view>
86
</view><view>
%
</view>
</view>
</view>
<view
class=
"homework-score"
>
<view
class=
"homework-score-title"
>
排名
</view>
<view
class=
"homework-score-num flex"
>
<view>
15
</view><view></view>
</view>
</view>
<view
class=
"homework-score"
>
<view
class=
"homework-score-title"
>
领先度
</view>
<view
class=
"homework-score-num flex"
>
<view>
86
</view><view>
%
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<view
class=
"examComponents-time-box flex"
>
<view
class=
"examComponents-time"
>
<view>
{{
jobData
.
CreateTime
}}
</view>
</view>
<view
class=
"examComponents-line"
>
<view
class=
"examComponents-point"
></view>
<view
class=
"examComponents-year"
>
2021 年
</view>
</view>
</view>
<view
class=
"examComponents-center-box"
@
click=
"scoreDetails"
>
<view
class=
"examComponents-center-line"
></view>
<view
class=
"examComponents-center flex"
>
<view
class=
"examComponents-left"
>
<view
class=
"operation-name"
>
{{
jobData
.
Title
}}
</view>
</view>
<view
class=
"examComponents-right flex"
>
<view
class=
"homework-score"
>
<view
class=
"homework-score-title"
>
总分
</view>
<view
class=
"homework-score-num flex"
>
<view>
{{
jobData
.
DataObj
.
Score
}}
</view>
<view>
分
</view>
</view>
</view>
<view
class=
"homework-score"
>
<view
class=
"homework-score-title"
>
得分率
</view>
<view
class=
"homework-score-num flex"
>
<view>
{{
jobData
.
DataObj
.
Score_p
}}
</view>
<view>
%
</view>
</view>
</view>
<view
class=
"homework-score"
>
<view
class=
"homework-score-title"
>
排名
</view>
<view
class=
"homework-score-num flex"
>
<view>
{{
jobData
.
DataObj
.
ExamRank
}}
</view>
<view></view>
</view>
</view>
<view
class=
"homework-score"
>
<view
class=
"homework-score-title"
>
领先度
</view>
<view
class=
"homework-score-num flex"
>
<view>
{{
jobData
.
DataObj
.
ExamRankRate
}}
</view>
<view>
%
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</
template
>
<
script
>
...
...
@@ -60,167 +64,190 @@
}
from
"vue"
;
export
default
{
props
:
{
},
props
:
[
"jobData"
],
components
:
{},
setup
()
{
let
data
=
reactive
({
showPhone
:
false
,
showLogin
:
true
,
//多次点击
});
let
methods
=
{
scoreDetails
()
{
uni
.
reLaunch
({
url
:
'/pages/index/scoreDetails'
let
methods
=
{
scoreDetails
()
{
uni
.
reLaunch
({
url
:
'/pages/index/scoreDetails'
});
}
}
}
}
return
{
...
toRefs
(
data
),
...
methods
...
methods
};
},
};
</
script
>
<
style
scoped
>
.homework-score-num
view
:last-child
{
font-size
:
23
rpx
;
margin-top
:
25
rpx
;
}
.homework-score-num
view
:first-child
{
margin-right
:
10
rpx
;
font-size
:
46
rpx
;
font-weight
:
800
;
}
.homework-score-num
{
color
:
#3E3D3D
;
}
.homework-score-title
{
color
:
#484646
;
font-size
:
20
rpx
;
margin-bottom
:
23
rpx
;
font-weight
:
400
;
letter-spacing
:
1px
;
}
.homework-score
{
margin-right
:
16
rpx
;
}
.homework-score
:last-child
{
margin-right
:
0
;
}
.examComponents-right
{
height
:
122
rpx
;
background
:
#FFFFFF
;
padding
:
22
rpx
26
rpx
15
rpx
26
rpx
;
border-radius
:
30
rpx
;
justify-content
:
space-between
;
}
.examComponents.activeThree
.operation-name
{
color
:
#282828
;
}
.examComponents.activeTwo
.operation-name
{
color
:
#282828
;
}
.examComponents.activeOne
.operation-name
{
color
:
#FFFFFF
;
}
.operation-name
{
font-size
:
26
rpx
;
letter-spacing
:
1px
;
font-weight
:
500
;
margin-bottom
:
20
rpx
;
}
.examComponents-left
{
flex
:
1
;
flex-grow
:
1
;
}
.examComponents-center
{
flex-direction
:
column
;
}
.examComponents-center-line
{
width
:
4
rpx
;
height
:
23px
;
background
:
#FEFEFE
;
position
:
absolute
;
left
:
0
;
top
:
33
rpx
;
}
.examComponents.activeThree
.examComponents-center-box
{
background
:
#EEEEEE
;
}
.examComponents.activeTwo
.examComponents-center-box
{
background
:
#DBE9FB
;
}
.examComponents.activeOne
.examComponents-center-box
{
background
:
#1E7BF5
;
}
.examComponents-center-box
{
flex-grow
:
1
;
position
:
relative
;
border-radius
:
30
rpx
;
padding
:
31
rpx
18
rpx
21
rpx
24
rpx
;
margin-bottom
:
50
rpx
;
}
.examComponents-year
{
width
:
127
rpx
;
line-height
:
111
rpx
;
text-align
:
center
;
position
:
absolute
;
left
:
-125
rpx
;
top
:
-110
rpx
;
background
:
url('https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1653476346000_445.png')
no-repeat
;
background-size
:
100%
100%
;
color
:
#FFFFFF
;
font-size
:
30
rpx
;
font-weight
:
bold
;
}
.examComponents.activeThree
.examComponents-point
{
background
:
#C1C1C1
;
}
.examComponents.activeTwo
.examComponents-point
{
background
:
#282828
;
}
.examComponents.activeOne
.examComponents-point
{
background
:
#1E7BF5
;
box-shadow
:
0px
0px
12px
0px
rgba
(
30
,
123
,
245
,
0.46
);
}
.examComponents-point
{
width
:
19
rpx
;
height
:
19
rpx
;
position
:
absolute
;
top
:
20
rpx
;
left
:
-13
rpx
;
border-radius
:
50%
;
border
:
3px
solid
#FFFFFF
;
box-shadow
:
0px
0px
12px
0px
rgba
(
255
,
255
,
255
,
0.46
);
}
.examComponents-line
{
width
:
4
rpx
;
height
:
100%
;
background
:
#F1F1F1
;
margin-left
:
46
rpx
;
margin-right
:
46
rpx
;
position
:
relative
;
}
.examComponents-time
{
width
:
61
rpx
;
height
:
55
rpx
;
color
:
#CCC8C6
;
font-size
:
20
rpx
;
border-radius
:
20
rpx
;
padding
:
14
rpx
13
rpx
;
background
:
#F6F6F6
;
}
.examComponents
{
justify-content
:
space-between
;
padding
:
0
50
rpx
;
}
.examComponents-box
{
background
:
#FFFFFF
;
margin-top
:
30
rpx
;
}
.homework-score-num
view
:last-child
{
font-size
:
23
rpx
;
margin-top
:
25
rpx
;
}
.homework-score-num
view
:first-child
{
margin-right
:
10
rpx
;
font-size
:
46
rpx
;
font-weight
:
800
;
}
.homework-score-num
{
color
:
#3E3D3D
;
}
.homework-score-title
{
color
:
#484646
;
font-size
:
20
rpx
;
margin-bottom
:
23
rpx
;
font-weight
:
400
;
letter-spacing
:
1px
;
}
.homework-score
{
margin-right
:
16
rpx
;
}
.homework-score
:last-child
{
margin-right
:
0
;
}
.examComponents-right
{
height
:
122
rpx
;
background
:
#FFFFFF
;
padding
:
22
rpx
26
rpx
15
rpx
26
rpx
;
border-radius
:
30
rpx
;
justify-content
:
space-between
;
}
.examComponents.activeThree
.operation-name
{
color
:
#282828
;
}
.examComponents.activeTwo
.operation-name
{
color
:
#282828
;
}
.examComponents.activeOne
.operation-name
{
color
:
#FFFFFF
;
}
.operation-name
{
font-size
:
26
rpx
;
letter-spacing
:
1px
;
font-weight
:
500
;
margin-bottom
:
20
rpx
;
}
.examComponents-left
{
flex
:
1
;
flex-grow
:
1
;
}
.examComponents-center
{
flex-direction
:
column
;
}
.examComponents-center-line
{
width
:
4
rpx
;
height
:
23px
;
background
:
#FEFEFE
;
position
:
absolute
;
left
:
0
;
top
:
33
rpx
;
}
.examComponents.activeThree
.examComponents-center-box
{
background
:
#EEEEEE
;
}
.examComponents.activeTwo
.examComponents-center-box
{
background
:
#DBE9FB
;
}
.examComponents.activeOne
.examComponents-center-box
{
background
:
#1E7BF5
;
}
.examComponents-center-box
{
flex-grow
:
1
;
position
:
relative
;
border-radius
:
30
rpx
;
padding
:
31
rpx
18
rpx
21
rpx
24
rpx
;
margin-bottom
:
50
rpx
;
}
.examComponents-year
{
width
:
127
rpx
;
line-height
:
111
rpx
;
text-align
:
center
;
position
:
absolute
;
left
:
-125
rpx
;
top
:
-110
rpx
;
background
:
url('https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1653476346000_445.png')
no-repeat
;
background-size
:
100%
100%
;
color
:
#FFFFFF
;
font-size
:
30
rpx
;
font-weight
:
bold
;
}
.examComponents.activeThree
.examComponents-point
{
background
:
#C1C1C1
;
}
.examComponents.activeTwo
.examComponents-point
{
background
:
#282828
;
}
.examComponents.activeOne
.examComponents-point
{
background
:
#1E7BF5
;
box-shadow
:
0px
0px
12px
0px
rgba
(
30
,
123
,
245
,
0.46
);
}
.examComponents-point
{
width
:
19
rpx
;
height
:
19
rpx
;
position
:
absolute
;
top
:
20
rpx
;
left
:
-13
rpx
;
border-radius
:
50%
;
border
:
3px
solid
#FFFFFF
;
box-shadow
:
0px
0px
12px
0px
rgba
(
255
,
255
,
255
,
0.46
);
}
.examComponents-line
{
width
:
4
rpx
;
height
:
100%
;
background
:
#F1F1F1
;
margin-left
:
46
rpx
;
margin-right
:
46
rpx
;
position
:
relative
;
}
.examComponents-time
{
width
:
61
rpx
;
height
:
55
rpx
;
color
:
#CCC8C6
;
font-size
:
20
rpx
;
border-radius
:
20
rpx
;
padding
:
14
rpx
13
rpx
;
background
:
#F6F6F6
;
}
.examComponents
{
justify-content
:
space-between
;
padding
:
0
50
rpx
;
}
.examComponents-box
{
background
:
#FFFFFF
;
margin-top
:
30
rpx
;
}
</
style
>
src/pages/index/index.vue
View file @
83c99a26
...
...
@@ -3,32 +3,34 @@
<navbar
class=
"navbarSticky"
bg=
"#F6F6F6"
>
<view
class=
"index-header-box"
>
<view
class=
"index-header-img"
>
<van-image
width=
"100%"
height=
"100%"
fit=
"cover"
class=
"img"
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1653464014000_713.png"
/>
<van-image
width=
"100%"
height=
"100%"
fit=
"cover"
class=
"img"
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1653464014000_713.png"
/>
</view>
<view
class=
"index-header-tetx"
>
<view
class=
"index-header-title"
>
welcome
{{
userData
}}
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;"
>
Hello,
</view>
<view
style=
"font-size: 36rpx;"
>
Hello,
{{
userData
.
AccountName
}}
</view>
<view
style=
"font-size: 50rpx;"
>
您的学情反馈已准备好
</view>
</view>
</view>
<course-card></course-card>
<course-card
:stuCourseList=
"stuCourseList"
></course-card>
<view
class=
"index-student-title flex"
>
<text>
考情详情
</text>
<view>
(共
53
条)
</view>
<view>
(共
{{
workList
!=
null
&&
workList
.
length
>
0
?
workList
.
length
:
0
}}
条)
</view>
</view>
<view
class=
"index-student-information"
>
<JobComponents></JobComponents>
<examComponents></examComponents>
<commentsComponents></commentsComponents>
<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>
...
...
@@ -51,9 +53,9 @@
nextTick
,
}
from
"vue"
;
import
{
getSweepCode
}
from
'../../api/index.js'
import
{
getSweepCode
}
from
'../../api/index.js'
import
{
getImageColor
}
from
'../../utils/index.js'
...
...
@@ -61,11 +63,6 @@
import
navbar
from
'../../components/navbar.vue'
import
bottom
from
'../../components/bottom.vue'
export
default
{
// data(){
// return{
// }
// }
components
:
{
indexassembly
,
navbar
,
...
...
@@ -80,25 +77,16 @@
proxy
}
=
getCurrentInstance
();
let
data
=
reactive
({
ActiveMsg
:
{
pageIndex
:
1
,
pageSize
:
10
,
ActivityType
:
0
,
SelectIsEnd
:
0
,
},
ActivityList
:
[],
pageData
:
{
LearningGardenList
:
[]
},
SurveyObj
:{
ActivitySurveyId
:
0
,
ActivitySurveyGuestId
:
0
,
stuCourseList
:
[],
//学员课程列表
userData
:
{},
//用户信息
//学员作业和考试查询参数
workMsg
:
{
courseId
:
0
,
},
userData
:
{}
workList
:
[],
//学员作业、考试、评语数据
});
let
methods
=
{
jumpPage
(
url
)
{
uni
.
navigateTo
({
url
:
url
,
...
...
@@ -109,10 +97,7 @@
url
:
'/pages/timetable/timeTable'
,
})
},
//跳转至详情
goActiveDetail
(
Id
)
{
// this.jumpPage(`/pages/activity/activityDetails?Id=${Id}`);
},
base64_decode
(
data
)
{
var
b64
=
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="
;
var
o1
,
...
...
@@ -149,91 +134,26 @@
}
}
while
(
i
<
data
.
length
);
dec
=
tmp_arr
.
join
(
""
);
//dec = utf8_decode(dec);
return
dec
;
},
//{"cmd":"checkin","params":{"classId":0,"ClassDate":"2022-4-19","ClassRoomId":27,
//"School_Id":0,"TeacherId":8,"CheckStatus":0,"StudyNum":"90","ClassTimeId":16531}}
scan
()
{
//调起条码扫描
console
.
log
(
"进来了"
)
let
that
=
this
uni
.
scanCode
({
scanType
:
[
'qrCode'
],
success
:
function
(
res
)
{
// 解码
var
saveObj
=
{};
try
{
saveObj
=
that
.
base64_decode
(
res
.
result
)
// console.log(saveObj)
}
catch
(
e
)
{
//TODO handle the exception
// console.log(e)
}
var
jsonObj
=
JSON
.
parse
(
saveObj
)
if
(
jsonObj
.
cmd
==
"checkin"
){
var
userData
=
uni
.
getStorageSync
(
'userInfo'
);
console
.
log
(
"userData"
,
userData
);
jsonObj
.
params
.
StuId
=
userData
.
AccountId
;
var
array
=
[];
array
.
push
(
jsonObj
.
params
);
console
.
log
(
"jsonObj.params"
,
jsonObj
.
params
)
let
result
=
getSweepCode
(
array
);
if
(
result
)
{
// console.log(result)
if
(
result
.
Code
==
1
)
{
console
.
log
(
'扫码成功'
)
uni
.
navigateTo
({
url
:
'./success'
,
})
}
else
{
console
.
log
(
'扫码失败'
)
uni
.
navigateTo
({
url
:
'./fail'
})
}
}
}
},
});
},
async
getActivityData
()
{
// let res = await getActivityList(data.ActiveMsg);
// if (res.resultCode == 1) {
// data.ActivityList = res.data.pageData;
// }
},
getIndexData
()
{
//获取学员课程列表
getStuCourse
()
{
proxy
.
$request
(
"/Stu/GetStuCourse"
,
{}).
then
(
res
=>
{
data
.
pageData
=
res
.
Data
uni
.
setStorageSync
(
"indexData"
,
res
.
Data
);
data
.
SurveyObj
.
ActivitySurveyId
=
res
.
Data
.
ActivitySurveyId
;
data
.
SurveyObj
.
ActivitySurveyGuestId
=
res
.
Data
.
ActivitySurveyGuestId
;
if
(
data
.
pageData
.
LearningGardenList
.
length
>
0
)
{
data
.
pageData
.
LearningGardenList
.
forEach
((
x
,
y
)
=>
{
if
(
x
.
List
.
length
>
0
)
{
x
.
List
.
forEach
(
async
(
item
,
index
)
=>
{
await
this
.
getColor
(
item
.
Img
,
index
,
y
).
then
(
v
=>
{
data
.
pageData
.
LearningGardenList
[
v
.
y
]
.
List
[
v
.
index
].
bgcolor
=
v
.
formatres
;
data
.
pageData
.
LearningGardenList
[
v
.
y
]
.
List
[
v
.
index
].
bgcolor1
=
v
.
formatres1
;
data
.
pageData
.
LearningGardenList
[
v
.
y
]
.
List
[
v
.
index
].
bgcolor2
=
v
.
formatres2
;
})
})
}
})
let
tempArray
=
res
.
Data
;
data
.
stuCourseList
=
tempArray
;
if
(
tempArray
&&
tempArray
.
length
>
0
)
{
this
.
getStuHomeWorkAndExam
(
tempArray
[
0
].
courseId
)
}
})
},
//获取学员作业、考试、评语
getStuHomeWorkAndExam
(
courseId
)
{
this
.
workMsg
.
courseId
=
courseId
;
data
.
workList
=
[];
proxy
.
$request
(
"/Stu/GetStuWork"
,
this
.
workMsg
).
then
(
res
=>
{
data
.
workList
=
res
.
Data
;
})
},
async
getColor
(
src
,
index
,
y
)
{
let
res
=
await
getImageColor
(
'myCanvas'
,
'img'
+
index
,
src
)
let
obj
=
{}
...
...
@@ -244,33 +164,6 @@
obj
.
y
=
y
return
obj
},
againdata
()
{
data
.
userData
=
uni
.
getStorageSync
(
'userInfo'
);
methods
.
getIndexData
();
methods
.
getActivityData
();
},
jumpGarden
(
id
)
{
if
(
id
==
1
)
{
uni
.
navigateTo
({
url
:
"/pages/learningGarden/learningGardenList"
})
}
else
if
(
id
==
2
)
{
// uni.navigateTo({
// url:"/pages/learningGarden/learningGardenList"
// })
}
},
jumpJiahemini
()
{
let
userinfo
=
uni
.
getStorageSync
(
'userInfo'
);
wx
.
navigateToMiniProgram
({
appId
:
'wx38e054ee42b054f4'
,
path
:
''
,
//为空则打开首页
extraData
:
{
Id
:
userinfo
.
Id
||
0
}
})
}
};
onMounted
(()
=>
{
...
...
@@ -282,8 +175,7 @@
};
},
onShow
()
{
this
.
getActivityData
();
this
.
getIndexData
();
this
.
getStuCourse
();
this
.
userData
=
uni
.
getStorageSync
(
'userInfo'
);
},
onShareAppMessage
()
{
...
...
@@ -304,35 +196,41 @@
</
script
>
<
style
scoped
>
.index-student-title
view
{
.index-student-title
view
{
font-size
:
25
rpx
;
color
:
#ABABAB
;
margin-left
:
20
rpx
;
padding
:
13
rpx
0
0
0
;
}
.index-student-title
text
{
.index-student-title
text
{
font-size
:
36
rpx
;
font-weight
:
800
;
color
:
#282828
;
}
.index-student-title
{
.index-student-title
{
padding
:
0
50
rpx
45
rpx
;
}
.index-student-information
{
.index-student-information
{
min-height
:
500
rpx
;
background
:
rgba
(
255
,
255
,
255
,
.7
);
background
:
rgba
(
255
,
255
,
255
,
.7
);
border-radius
:
50
rpx
50
rpx
0
0
;
padding
:
71
rpx
0
0
0
;
}
.index-header-name
{
.index-header-name
{
font-size
:
30
rpx
;
color
:
#474747
;
}
.index-header-tetx
{
.index-header-tetx
{
color
:
#D0D0D0
;
font-size
:
24
rpx
;
}
.index-header-img
.img
{
.index-header-img
.img
{
display
:
block
;
border
:
2
rpx
solid
rgba
(
164
,
164
,
164
,
0.32
);
border-radius
:
50%
;
...
...
@@ -342,7 +240,8 @@
box-sizing
:
border-box
;
margin
:
4
rpx
;
}
.index-header-img
{
.index-header-img
{
width
:
68
rpx
;
height
:
68
rpx
;
border-radius
:
50%
;
...
...
@@ -351,6 +250,7 @@
margin-right
:
20
rpx
;
background
:
#FFFFFF
;
}
.indexpage
{
min-height
:
100vh
;
background-color
:
#f6f6f6
;
...
...
@@ -360,26 +260,29 @@
background-repeat
:
no-repeat
;
background-size
:
100%
auto
;
}
.index-header-box
{
.index-header-box
{
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
padding
:
0
rpx
42
rpx
;
padding
:
0
rpx
42
rpx
;
}
.index-header-box
.index-header-title
{
.index-header-box
.index-header-title
{
font-size
:
24
rpx
;
font-weight
:
400
;
color
:
#B8B8B8
;
}
.index-header-box
.index-header-name
{
.index-header-box
.index-header-name
{
font-size
:
30
rpx
;
font-weight
:
800
;
color
:
#282828
;
}
.navbarSticky
{
display
:
sticky
;
top
:
0
;
z-index
:
9
;
}
</
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