Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
confucius
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
罗超
confucius
Commits
35ddb5e7
Commit
35ddb5e7
authored
Aug 30, 2024
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化表格
parent
1d2810ba
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
6 deletions
+35
-6
StudentProgress.vue
src/pages/stuMan/StudentProgress.vue
+35
-6
No files found.
src/pages/stuMan/StudentProgress.vue
View file @
35ddb5e7
...
@@ -34,8 +34,8 @@
...
@@ -34,8 +34,8 @@
进度
<br
/>
(
{{
currentCourse
.
ClassHours
}}
课时)
进度
<br
/>
(
{{
currentCourse
.
ClassHours
}}
课时)
</td>
</td>
<td
v-for=
"(x,i) in students"
:key=
"i"
:class=
"
{ 'stop': currentCourse.ClassHours-x.ClassProgress
<0
||
x
.
ScheduleStatus=
=1
}"
>
<td
v-for=
"(x,i) in students"
:key=
"i"
:class=
"
{ 'stop': currentCourse.ClassHours-x.ClassProgress
<0
||
x
.
ScheduleStatus=
=1
}"
>
<span>
剩余
{{
currentCourse
.
ClassHours
-
x
.
ClassProgress
}}
课时
</span>
<span>
剩余
{{
((
currentCourse
.
CourseRate
==
10
||
currentCourse
.
CourseRate
==
11
)?
x
.
TotalTimes
:
currentCourse
.
ClassHours
)
-
x
.
ClassProgress
}}
课时
</span>
<div
v-if=
"
currentCourse.ClassHours
-x.ClassProgress
<0
||
x
.
ScheduleStatus=
=1"
>
暂停排课
</div>
<div
v-if=
"
((currentCourse.CourseRate==10||currentCourse.CourseRate==11)?x.TotalTimes:currentCourse.ClassHours)
-x.ClassProgress
<0
||
x
.
ScheduleStatus=
=1"
>
暂停排课
</div>
<div
v-else
class=
"text-primary"
>
周一,五排课
</div>
<div
v-else
class=
"text-primary"
>
周一,五排课
</div>
</td>
</td>
</tr>
</tr>
...
@@ -54,9 +54,9 @@
...
@@ -54,9 +54,9 @@
<!-- 表格内容 study-online-bg -->
<!-- 表格内容 study-online-bg -->
<tr
v-for=
"(x,i) in chapters"
:key=
"i"
>
<tr
v-for=
"(x,i) in chapters"
:key=
"i"
>
<td
class=
"sticky-column defaultBg"
style=
"text-align: left;"
>
{{
x
.
ChapterName
}}
</td>
<td
class=
"sticky-column defaultBg"
style=
"text-align: left;"
>
{{
x
.
ChapterName
}}
</td>
<td
v-for=
"(y,yi) in x.assemble"
:key=
"yi"
:class=
"
{'study-normal':y}">
<td
v-for=
"(y,yi) in x.assemble"
:key=
"yi"
:class=
"
{'study-normal':y
,'disable-class':y
&&
y.overlayer
}">
<q-tooltip
:offset=
"[0, 0]"
v-if=
"y"
>
<q-tooltip
:offset=
"[0, 0]"
v-if=
"y
&& !y.overlayer
"
>
{{
y
.
Date
}}
{{
y
.
Date
}}
</q-tooltip>
</q-tooltip>
</td>
</td>
...
@@ -167,18 +167,43 @@ export default {
...
@@ -167,18 +167,43 @@ export default {
queryScheduleCourseStu
({
CourseRate
:
this
.
currentCourse
.
CourseRate
}).
then
(
r
=>
{
queryScheduleCourseStu
({
CourseRate
:
this
.
currentCourse
.
CourseRate
}).
then
(
r
=>
{
this
.
students
=
r
.
Data
this
.
students
=
r
.
Data
this
.
loading
=
false
;
this
.
loading
=
false
;
this
.
setFillChapters
()
this
.
assembleHandler
()
this
.
assembleHandler
()
}).
catch
(()
=>
{
}).
catch
(()
=>
{
this
.
loading
=
false
;
this
.
loading
=
false
;
})
})
},
},
setFillChapters
(){
if
(
this
.
currentCourse
.
CourseRate
==
10
||
this
.
currentCourse
.
CourseRate
==
11
){
//TotalTimes
let
maxTemp
=
0
this
.
students
.
forEach
(
stu
=>
{
if
(
stu
.
TotalTimes
&&
stu
.
TotalTimes
>
maxTemp
)
maxTemp
=
stu
.
TotalTimes
})
if
(
maxTemp
>
0
){
for
(
let
i
=
0
;
i
<
maxTemp
;
i
++
)
{
this
.
chapters
.
push
({
ChapterId
:
i
+
1
,
ChapterName
:
`第
${
i
+
1
}
次`
})
}
this
.
currentCourse
.
ClassHours
=
maxTemp
}
}
},
assembleHandler
(){
assembleHandler
(){
this
.
assemble
=
[]
this
.
assemble
=
[]
this
.
chapters
.
forEach
(
x
=>
{
this
.
chapters
.
forEach
(
(
x
,
i
)
=>
{
x
.
assemble
=
[]
x
.
assemble
=
[]
this
.
students
.
forEach
(
stu
=>
{
this
.
students
.
forEach
(
stu
=>
{
const
r
=
stu
.
CourseItems
.
find
(
item
=>
item
.
ChapterId
==
x
.
ChapterGradeNo
)
const
r
=
stu
.
CourseItems
.
find
(
item
=>
item
.
ChapterId
==
x
.
ChapterGradeNo
)
x
.
assemble
.
push
(
r
)
if
(
!
r
&&
(
this
.
currentCourse
.
CourseRate
==
10
||
this
.
currentCourse
.
CourseRate
==
11
)
&&
stu
.
TotalTimes
<
(
i
+
1
)){
x
.
assemble
.
push
({
overlayer
:
true
})
}
else
{
x
.
assemble
.
push
(
r
)
}
})
})
})
})
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
...
@@ -406,4 +431,8 @@ export default {
...
@@ -406,4 +431,8 @@ export default {
.sptable
.study-normal
{
.sptable
.study-normal
{
background
:
#548235
;
background
:
#548235
;
}
}
.sptable
.disable-class
{
background
:
#dfdfdf
;
cursor
:
not-allowed
;
}
</
style
>
</
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