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
aa4106f1
Commit
aa4106f1
authored
Sep 09, 2024
by
吴春
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/luochao/confucius
parents
799e1a16
cc52bc80
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
1605 additions
and
173 deletions
+1605
-173
quasar.conf.js
quasar.conf.js
+2
-1
schedu.js
src/api/scheduling/schedu.js
+16
-0
index.js
src/api/studentmsg/index.js
+22
-0
common.css
src/assets/css/common.css
+5
-0
StudentProgress.vue
src/pages/stuMan/StudentProgress.vue
+566
-172
setStudentTeacher.vue
src/pages/stuMan/components/setStudentTeacher.vue
+143
-0
setStudyMethod.vue
src/pages/stuMan/components/setStudyMethod.vue
+90
-0
setStudyPlan.vue
src/pages/stuMan/components/setStudyPlan.vue
+509
-0
setStudyStatus.vue
src/pages/stuMan/components/setStudyStatus.vue
+125
-0
studyHeader.vue
src/pages/stuMan/components/studyHeader.vue
+127
-0
No files found.
quasar.conf.js
View file @
aa4106f1
...
...
@@ -164,7 +164,8 @@ module.exports = function(ctx) {
'Meta'
,
'Notify'
,
'Dialog'
,
'LoadingBar'
'LoadingBar'
,
'Loading'
]
},
...
...
src/api/scheduling/schedu.js
View file @
aa4106f1
...
...
@@ -403,3 +403,19 @@ export function getToDayCoursePlanList(data) {
data
:
data
})
}
export
function
getStuAppointPlan
(
data
)
{
return
request
({
url
:
'/ScheduleCourse/GetStuAppointPlan'
,
method
:
'post'
,
data
:
data
})
}
export
function
cancelStuAppointment
(
data
)
{
return
request
({
url
:
'/Scroll/CancelStuAppointment'
,
method
:
'post'
,
data
:
data
})
}
\ No newline at end of file
src/api/studentmsg/index.js
View file @
aa4106f1
...
...
@@ -57,3 +57,25 @@ export function getAccountStudentList(data) {
data
})
}
export
function
setGuestTeachingMethod
(
data
)
{
return
request
({
url
:
'/ScheduleCourse/SetGuestTeachingMethod'
,
method
:
'post'
,
data
})
}
export
function
setGuestRemark
(
data
)
{
return
request
({
url
:
'/ScheduleCourse/SetGuestRemark'
,
method
:
'post'
,
data
})
}
export
function
setGuestScheduleStatus
(
data
)
{
return
request
({
url
:
'/ScheduleCourse/SetGuestScheduleStatus'
,
method
:
'post'
,
data
})
}
\ No newline at end of file
src/assets/css/common.css
View file @
aa4106f1
...
...
@@ -120,6 +120,11 @@
.q-btn
.q-icon
,
.q-btn
.q-spinner
{
font-size
:
max
(
12px
,
1em
)
!important
;
}
.text-small
{
font-size
:
12px
;
font-family
:
microsoft
yahei
;
}
/* 控制下拉长度 */
/* .q-menu{
max-height: 29vh;
...
...
src/pages/stuMan/StudentProgress.vue
View file @
aa4106f1
<
template
>
<!--
<div
class=
"page-body"
style=
"height:calc(100% - 30px);"
>
-->
<div
class=
"sptable-box"
id=
"sptable"
>
<div
class=
"column"
style=
"background-color: #e3e6ed; overflow: hidden; position: absolute; left: 0; right: 0; top: 0; bottom: 0;"
@
click=
"cancleCellHandle"
>
<study-header
@
change=
"getStudents"
ref=
"studyHeaderRef"
></study-header>
<div
class=
"sptable-box col"
id=
"sptable"
>
<div
class=
"sptable-wrap"
v-loading=
"loading"
>
<table
class=
"sptable"
id=
"sptableWrap"
:style=
"
{'zoom':zoom
}">
<table
class=
"sptable"
id=
"sptableWrap"
:style=
"
{ zoom: zoom
}">
<thead>
<tr
class=
"sticky-header"
>
<th
class=
"sticky-column stubg"
>
学员
</th>
<th
class=
"stubg"
v-for=
"(x,i) in students"
:key=
"i"
>
{{
x
.
GuestName
}}
</th>
<th
class=
"stubg cursor-pointer"
v-for=
"(x, i) in students"
:key=
"i"
@
click=
"showStuRight(x)"
>
{{
x
.
GuestName
}}
</th>
</tr>
</thead>
<tbody>
<tr>
<td
class=
"sticky-column coursebg"
>
课程
</td>
<td
class=
"coursebg"
v-for=
"(x,
i) in students"
:key=
"i"
>
{{
currentCourse
.
CourseName
}}
<td
class=
"coursebg "
v-for=
"(x,
i) in students"
:key=
"i"
>
{{
x
.
CourseName
}}
</td>
</tr>
<tr>
<td
class=
"sticky-column teacherbg"
>
班主任
</td>
<td
class=
"teacherbg"
v-for=
"(x,i) in students"
:key=
"i"
>
{{
x
.
HeadMasterName
}}
</td>
<td
class=
"teacherbg cursor-pointer "
v-for=
"(x, i) in students"
@
click=
"showDialogHandle(x, 1)"
:key=
"i"
>
{{
x
.
HeadMasterName
}}
</td>
</tr>
<tr>
<td
class=
"sticky-column studybg"
>
方式
</td>
<td
:class=
"
{ 'study-online-bg': x.TeachingMethod== 2, studybg: x.TeachingMethod!= 2 }"
v-for="(x,i) in students" :key="i"
@
click=
"showDialogHandle(x, 2)"
class=
"cursor-pointer "
:class=
"
{
'study-online-bg': x.TeachingMethod == 2,
studybg: x.TeachingMethod != 2
}"
v-for="(x, i) in students"
:key="i"
>
{{
x
.
TeachingMethod
==
2
?
"线上"
:
"面授"
}}
{{
x
.
TeachingMethod
==
2
?
"线上"
:
"面授"
}}
</td>
</tr>
<tr>
<td
class=
"sticky-column defaultBg"
>
进度
<br
/>
(
{{
currentCourse
.
ClassHours
}}
课时)
</td>
<td
v-for=
"(x,i) in students"
:key=
"i"
:class=
"
{ 'stop': currentCourse.ClassHours-x.ClassProgress
<0
||
x
.
ScheduleStatus=
=1
}"
>
<span>
剩余
{{
((
currentCourse
.
CourseRate
==
10
||
currentCourse
.
CourseRate
==
11
)?
x
.
TotalTimes
:
currentCourse
.
ClassHours
)
-
x
.
ClassProgress
}}
课时
</span>
<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>
<td
@
click=
"showDialogHandle(x, 3)"
v-for=
"(x, i) in students"
:key=
"i"
:class=
"
{
stop:
currentCourse.ClassHours - x.ClassProgress
<
0
||
x
.
ScheduleStatus =
=
1
}"
class=
"cursor-pointer "
>
<div
v-if=
"
(currentCourse.CourseRate == 10 ||
currentCourse.CourseRate == 11
? x.TotalTimes
: currentCourse.ClassHours) -
x.ClassProgress
<
0
||
x
.
ScheduleStatus =
=
1
"
>
<div>
暂停排课
</div>
<div
style=
"font-size: 12px;font-family: microsoft yahei;"
>
{{
x
.
StopDeadline
&&
x
.
StopDeadline
!=
""
?
`${x.StopDeadline
}
复课`
:
"截至时间未知"
}}
<
/div
>
<
/div
>
<
div
v
-
else
class
=
"text-primary"
>
{{
x
.
ScheduleRemark
&&
x
.
ScheduleRemark
!=
""
?
x
.
ScheduleRemark
:
"正常排课"
}}
<
/div
>
<
span
style
=
"font-size: 12px;font-family: microsoft yahei;"
>
剩余
{{
(
currentCourse
.
CourseRate
==
10
||
currentCourse
.
CourseRate
==
11
?
x
.
TotalTimes
:
currentCourse
.
ClassHours
)
-
x
.
ClassProgress
}}
课时
<
/spa
n
>
<
/td
>
<
/tr
>
<
tr
>
<
td
class
=
"sticky-column studybg"
>
备注
<
/td
>
<
td
v-for=
"(x,i) in students"
:key=
"i"
v
-
for
=
"(x, i) in students"
:
key
=
"i"
style
=
"word-wrap: break-word;white-space: wrap; max-width: 150px; vertical-align: middle;"
@
dblclick=
"changeRemark(i)"
:contenteditable=
"i==currentRemark"
></td>
@
click
=
"changeRemark(i)"
@
blur
=
"setRemark(i)"
:
contenteditable
=
"i == currentRemark"
:
ref
=
"`stu_remark_${x.GuestId
}
`"
>
{{
x
.
XGRemark
}}
<
/td
>
<
/tr
>
<
tr
>
<td
:colspan=
"students.length+
1"
>
</td>
<
td
:
colspan
=
"students.length +
1"
>&
nbsp
;
<
/td
>
<
/tr
>
<!--
表格内容
study
-
online
-
bg
-->
<tr
v-for=
"(x,i) in chapters"
:key=
"i"
>
<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,'disable-class':y
&&
y.overlayer}">
<q-tooltip
:offset=
"[0, 0]"
v-if=
"y && !y.overlayer"
>
{{
y
.
Date
}}
<
tr
v
-
for
=
"(x, i) in chapters"
:
key
=
"i"
>
<
td
class
=
"sticky-column defaultBg"
style
=
"text-align: left;"
>
{{
x
.
ChapterName
}}
<
/td
>
<
td
v
-
for
=
"(y, yi) in x.assemble"
@
click
.
stop
=
"() => resetContextmenu(i, yi)"
@
contextmenu
.
prevent
=
"e => contextMenuHandle(i, yi, e,y)"
:
key
=
"yi"
:
class
=
"{
'disable-class': y && y.overlayer,
'focus-box': coor[0] == i && coor[1] == yi,
'unchecked':y &&y.State==1,
'unstudy':y &&y.State==2,
'onlineStudy':y &&y.State==3 && y.AttendanceMethod==2,
'notChecked':y &&y.State==3 && y.AttendanceMethod==3,
'study-normal':y &&y.State==3 && y.AttendanceMethod==1
}
"
>
<
template
v
-
if
=
"y&&y.State<3"
>
{{
y
.
StateName
}}
<
/template
>
<
template
v
-
else
-
if
=
"y&&y.State==3"
>
{{
y
.
AttendanceMethodName
}}
<
/template
>
<
q
-
tooltip
:
offset
=
"[0, 0]"
v
-
if
=
"y && !y.overlayer"
:
ref
=
"`plantime_${i
}
_${yi
}
`"
>
<
div
style
=
"width:200px"
>
<
div
class
=
"row items-center q-mb-sm"
>
<
div
class
=
"col-3 q-mr-sm"
>
上课日期
:
<
/div
>
<
div
class
=
"col"
>
{{
y
.
Date
}}
{{
y
.
StartTime
}}
-
{{
y
.
EndTime
}}
<
/div
>
<
/div
>
<
div
class
=
"row items-center q-mb-sm"
>
<
div
class
=
"col-3 q-mr-sm"
>
上课老师
:
<
/div
>
<
div
class
=
"col"
>
{{
y
.
TeacherName
}}
(
{{
y
.
RoomName
}}
)
<
/div
>
<
/div
>
<
div
class
=
"row items-center q-mb-sm"
>
<
div
class
=
"col-3 q-mr-sm"
>
课程内容
:
<
/div
>
<
div
class
=
"col"
>
{{
currentCourse
.
CourseName
}}
(
{{
x
.
ChapterName
}}
)
<
/div
>
<
/div
>
<
div
class
=
"row items-center q-mb-sm"
v
-
if
=
"y.State==3"
>
<
div
class
=
"col-3 q-mr-sm"
>
签到状态
:
<
/div
>
<
div
class
=
"col"
>
{{
y
.
AttendanceMethodName
}}
<
/div
>
<
/div
>
<
/div
>
<
/q-tooltip
>
<
/td
>
<
/tr
>
<
/tbody
>
<
/table
>
<
q
-
card
class
=
"rounded-borders"
v
-
if
=
"locationMenu[0] > 0 && locationMenu[0] > 0"
style
=
"width: 200px; position: absolute; z-index: 9;margin-left: -100px;"
:
style
=
"{ left: locationMenu[0] + 'px', top: locationMenu[1] + 'px'
}
"
>
<
q
-
list
bordered
>
<
q
-
item
v
-
close
-
popup
clickable
@
click
=
"showDialogHandle(students[coor[1]], 4)"
v
-
if
=
"currentMenuState==0"
>
<
q
-
item
-
section
>
立即排课
<
/q-item-section
>
<
/q-item
>
<
q
-
item
v
-
close
-
popup
clickable
v
-
if
=
"currentMenuState==1"
@
click
=
"showDialogHandle(students[coor[1]], 4)"
>
<
q
-
item
-
section
>
修改排课
<
/q-item-section
>
<
/q-item
>
<
q
-
item
v
-
close
-
popup
clickable
v
-
if
=
"currentMenuState==1||currentMenuState==2"
@
click
=
"showDialogHandle(students[coor[1]], 4)"
>
<
q
-
item
-
section
>
取消排课
<
/q-item-section
>
<
/q-item
>
<!--
<
q
-
item
v
-
close
-
popup
clickable
v
-
if
=
"currentMenuState==3||currentMenuState==2"
@
click
=
"showDialogHandle(students[coor[1]], 4)"
>
<
q
-
item
-
section
>
上课详情
<
/q-item-section
>
<
/q-item> --
>
<
/q-list
>
<
/q-card
>
<
/div
>
<
div
class
=
"cusor-tools row"
>
<
div
class
=
"col row"
>
...
...
@@ -70,7 +220,7 @@
class
=
"item"
@
click
=
"changeCourseHandle(x)"
:
class
=
"{ active: x.CourseId == currentCourse.CourseId
}
"
v-for="(x,
i) in list"
v
-
for
=
"(x,
i) in list"
:
key
=
"i"
>
{{
x
.
CourseName
}}
...
...
@@ -83,19 +233,82 @@
ref
=
"scrollBar"
><
/scroll-bar
>
<
div
class
=
"q-ml-md row items-center"
>
<span>
{{
Math
.
ceil
(
zoom
*
100
)
}}
%
</span>
<q-btn
@
click=
"resetZoom"
color=
"primary"
v-show=
"zoom!=1"
style=
"padding: 0; font-size: 11px !important;font-family: microsoft yahei !important; font-weight: 400;"
flat
label=
"重置"
/>
<
span
>
{{
Math
.
ceil
(
zoom
*
100
)
}}
%<
/span
>
<
q
-
btn
@
click
=
"resetZoom"
color
=
"primary"
v
-
show
=
"zoom != 1"
style
=
"padding: 0; font-size: 11px !important;font-family: microsoft yahei !important; font-weight: 400;"
flat
label
=
"重置"
/>
<
/div
>
<
/div
>
<
q
-
dialog
v
-
if
=
"showDialog != 0"
v
-
model
=
"dialogVisible"
persistent
>
<
set
-
student
-
teacher
:
stuInfo
=
"currentStu"
@
close
=
"() => (showDialog = 0)"
v
-
if
=
"showDialog == 1"
@
success
=
"setTeacherHandle"
><
/set-student-teacher
>
<
set
-
study
-
method
:
stuInfo
=
"currentStu"
@
close
=
"() => (showDialog = 0)"
v
-
if
=
"showDialog == 2"
@
success
=
"setStudyHandle"
><
/set-study-method
>
<
set
-
study
-
status
:
stuInfo
=
"currentStu"
@
close
=
"() => (showDialog = 0)"
v
-
if
=
"showDialog == 3"
@
success
=
"settGuestScheduleHandle"
><
/set-study-status
>
<
set
-
study
-
plan
:
stuInfo
=
"currentStu"
:
sourceList
=
"sourceStudents"
:
chapters
=
"chapters"
:
rate
=
"currentCourse"
:
coor
=
"coor"
@
close
=
"() => (showDialog = 0)"
v
-
if
=
"showDialog == 4"
@
success
=
"setStudyPlayHandle"
:
planTime
=
"currentSchedu"
><
/set-study-plan
>
<
/q-dialog
>
<
/div
>
<
studentRight
-
form
v
-
if
=
"stuInfoVisible"
:
save
-
obj
=
"stuOption"
@
close
=
"() => (stuInfoVisible = false)"
><
/studentRight-form
>
<
/div
>
<!--
</div>
-->
<
/template
>
<
script
>
import
scrollBar
from
"src/components/common/scrollBar.vue"
;
import
{
queryCoursePage
,
queryChapterTree
,
queryScheduleCourseStu
}
from
"../../api/course/index"
;
import
{
queryCoursePage
,
queryChapterTree
,
queryScheduleCourseStu
}
from
"../../api/course/index"
;
import
{
getStudentInfo
}
from
"src/api/school/index"
;
import
{
setGuestRemark
}
from
"src/api/studentmsg/index"
;
import
setStudentTeacher
from
"./components/setStudentTeacher.vue"
;
import
SetStudyMethod
from
"./components/setStudyMethod.vue"
;
import
SetStudyStatus
from
"./components/setStudyStatus.vue"
;
import
StudyHeader
from
"./components/studyHeader.vue"
;
import
studentRightForm
from
"src/components/school/student/studentRight-form.vue"
;
import
SetStudyPlan
from
"./components/setStudyPlan.vue"
;
export
default
{
components
:
{
scrollBar
},
components
:
{
scrollBar
,
setStudentTeacher
,
SetStudyMethod
,
SetStudyStatus
,
StudyHeader
,
studentRightForm
,
SetStudyPlan
}
,
meta
:
{
title
:
"学员学习进度表"
}
,
...
...
@@ -115,12 +328,29 @@ export default {
CourseSubject
:
1
,
SaleState
:
1
}
,
showDialog
:
0
,
dialogVisible
:
false
,
currentCourse
:
{
}
,
currentStu
:
{
}
,
chapters
:
[],
currentRemark
:
0
,
students
:[],
assemble
:[],
zoom
:
1
students
:
[],
sourceStudents
:
[],
assemble
:
[],
zoom
:
1
,
stuInfoVisible
:
false
,
stuOption
:
{
}
,
queryParemeter
:
{
HeadMasterId
:
0
,
GuestState
:
-
1
,
ScheduleStatus
:
-
1
,
TeachingMethod
:
-
1
,
GuestName
:
""
}
,
coor
:
[
-
1
,
-
1
],
locationMenu
:
[
0
,
0
],
currentMenuState
:
0
,
currentSchedu
:
null
}
;
}
,
methods
:
{
...
...
@@ -134,21 +364,21 @@ export default {
.
then
(
res
=>
{
this
.
loading
=
false
;
this
.
list
=
res
.
Data
.
PageData
.
reverse
();
this
.
currentCourse
=
this
.
list
[
0
];
this
.
getChapters
()
this
.
currentCourse
=
this
.
list
[
this
.
list
.
length
-
1
];
this
.
getChapters
()
;
}
)
.
catch
(()
=>
{
this
.
loading
=
false
;
}
);
}
,
getChapters
()
{
if
(
!
this
.
currentCourse
||
!
this
.
currentCourse
.
CourseId
)
return
if
(
!
this
.
currentCourse
||
!
this
.
currentCourse
.
CourseId
)
return
;
this
.
loading
=
true
;
queryChapterTree
({
CourseId
:
this
.
currentCourse
.
CourseId
})
queryChapterTree
({
CourseId
:
this
.
currentCourse
.
CourseId
}
)
.
then
(
res
=>
{
this
.
loading
=
false
;
this
.
chapters
=
res
.
Data
this
.
getStudents
()
this
.
chapters
=
res
.
Data
;
this
.
getStudents
()
;
}
)
.
catch
(()
=>
{
this
.
loading
=
false
;
...
...
@@ -156,94 +386,247 @@ export default {
}
,
changeCourseHandle
(
item
)
{
this
.
currentCourse
=
item
;
this
.
getChapters
()
this
.
getChapters
();
}
,
changeRemark
(
i
)
{
this
.
currentRemark
=
i
;
}
,
changeRemark
(
i
){
this
.
currentRemark
=
i
setStudyPlayHandle
(){
this
.
showDialog
=
0
;
this
.
getStudentByStoreage
()
}
,
getStudents
(
)
{
if
(
!
this
.
currentCourse
||
!
this
.
currentCourse
.
CourseId
)
return
getStudents
(
playload
=
null
)
{
if
(
!
this
.
currentCourse
||
!
this
.
currentCourse
.
CourseId
)
return
;
this
.
loading
=
true
;
queryScheduleCourseStu
({
CourseRate
:
this
.
currentCourse
.
CourseRate
}).
then
(
r
=>
{
this
.
students
=
r
.
Data
this
.
loading
=
false
;
this
.
setFillChapters
()
this
.
assembleHandler
()
}).
catch
(()
=>
{
if
(
playload
)
this
.
queryParemeter
=
{
...
this
.
queryParemeter
,
...
playload
}
;
console
.
log
(
this
.
currentCourse
.
CourseRate
,
this
.
queryParemeter
.
CourseRate
);
if
(
this
.
currentCourse
.
CourseRate
!=
this
.
queryParemeter
.
CourseRate
)
{
this
.
queryParemeter
.
CourseRate
=
this
.
currentCourse
.
CourseRate
;
this
.
getStudentByStoreage
();
}
else
{
this
.
getStudentByCache
();
}
}
,
getStudentByCache
()
{
let
tempArray
=
[];
const
q
=
this
.
queryParemeter
;
this
.
sourceStudents
.
forEach
(
x
=>
{
if
(
q
.
HeadMasterId
!=
0
&&
x
.
HeadMasterId
!=
q
.
HeadMasterId
)
return
;
if
(
q
.
GuestState
!=
-
1
&&
x
.
GuestState
!=
q
.
GuestState
)
return
;
if
(
q
.
ScheduleStatus
!=
-
1
&&
x
.
ScheduleStatus
!=
q
.
ScheduleStatus
)
return
;
if
(
q
.
TeachingMethod
!=
-
1
&&
x
.
TeachingMethod
!=
q
.
TeachingMethod
)
return
;
if
(
q
.
GuestName
&&
q
.
GuestName
!=
""
&&
!
x
.
GuestName
.
includes
(
q
.
GuestName
)
)
return
;
tempArray
.
push
(
x
);
}
);
this
.
students
=
tempArray
;
this
.
setFillChapters
();
this
.
assembleHandler
();
this
.
loading
=
false
;
}
,
getStudentByStoreage
()
{
this
.
sourceStudents
=
[];
this
.
students
=
[];
const
parameters
=
{
HeadMasterId
:
0
,
GuestState
:
-
1
,
ScheduleStatus
:
-
1
,
TeachingMethod
:
-
1
,
GuestName
:
""
,
CourseRate
:
this
.
queryParemeter
.
CourseRate
}
;
queryScheduleCourseStu
(
parameters
)
.
then
(
r
=>
{
this
.
sourceStudents
=
r
.
Data
;
this
.
getStudentByCache
();
}
)
.
catch
(()
=>
{
this
.
loading
=
false
;
}
);
}
,
setFillChapters
(){
if
(
this
.
currentCourse
.
CourseRate
==
10
||
this
.
currentCourse
.
CourseRate
==
11
){
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
){
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
}
次`
})
ChapterId
:
i
+
1
,
ChapterName
:
`第${i + 1
}
次`
}
);
}
this
.
currentCourse
.
ClassHours
=
maxTemp
this
.
currentCourse
.
ClassHours
=
maxTemp
;
}
}
}
,
assembleHandler
(){
this
.
assemble
=
[]
this
.
chapters
.
forEach
((
x
,
i
)
=>
{
x
.
assemble
=
[]
this
.
students
.
forEach
(
stu
=>
{
const
r
=
stu
.
CourseItems
.
find
(
item
=>
item
.
ChapterId
==
x
.
ChapterGradeNo
)
if
(
!
r
&&
(
this
.
currentCourse
.
CourseRate
==
10
||
this
.
currentCourse
.
CourseRate
==
11
)
&&
stu
.
TotalTimes
<
(
i
+
1
)){
x
.
assemble
.
push
({
overlayer
:
true
})
}
else
{
x
.
assemble
.
push
(
r
)
assembleHandler
()
{
this
.
assemble
=
[];
this
.
chapters
.
forEach
((
x
,
i
)
=>
{
x
.
assemble
=
[];
this
.
students
.
forEach
(
stu
=>
{
const
r
=
stu
.
CourseItems
.
find
(
item
=>
item
.
ChapterId
==
x
.
ChapterGradeNo
);
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
.
$refs
.
scrollBar
.
calcHandle
()
})
}
);
}
);
this
.
$nextTick
(()
=>
{
this
.
$refs
.
scrollBar
.
calcHandle
();
}
);
}
,
handleWheel
(
event
)
{
if
(
event
.
ctrlKey
===
true
||
event
.
metaKey
===
true
)
{
if
(
event
.
ctrlKey
===
true
||
event
.
metaKey
===
true
)
{
if
(
event
.
deltaY
>
0
)
{
this
.
zoomOut
();
}
else
{
this
.
zoomIn
();
}
this
.
$refs
.
scrollBar
.
calcHandle
()
this
.
$refs
.
scrollBar
.
calcHandle
()
;
event
.
preventDefault
();
return
false
return
false
;
}
}
,
zoomIn
()
{
// 放大逻辑
if
(
this
.
zoom
<
4
)
this
.
zoom
+=
0.05
if
(
this
.
zoom
<
4
)
this
.
zoom
+=
0.05
;
}
,
zoomOut
()
{
// 缩小逻辑
if
(
this
.
zoom
>
0.1
)
this
.
zoom
-=
0.05
if
(
this
.
zoom
>
0.1
)
this
.
zoom
-=
0.05
;
}
,
resetZoom
()
{
this
.
zoom
=
1
;
this
.
$refs
.
scrollBar
.
calcHandle
();
}
,
showDialogHandle
(
stu
,
type
)
{
this
.
currentStu
=
stu
;
this
.
showDialog
=
type
;
this
.
dialogVisible
=
true
;
}
,
setTeacherHandle
(
playload
)
{
this
.
showDialog
=
0
;
const
i
=
this
.
students
.
findIndex
(
x
=>
x
.
GuestId
==
this
.
currentStu
.
GuestId
);
if
(
i
<
0
)
return
;
this
.
students
[
i
].
HeadMasterName
=
playload
.
HeadMasterName
;
this
.
students
[
i
].
HeadMasterId
=
playload
.
HeadMasterId
;
}
,
resetZoom
(){
this
.
zoom
=
1
this
.
$refs
.
scrollBar
.
calcHandle
()
setStudyHandle
(
playload
)
{
this
.
showDialog
=
0
;
const
i
=
this
.
students
.
findIndex
(
x
=>
x
.
GuestId
==
this
.
currentStu
.
GuestId
);
if
(
i
<
0
)
return
;
this
.
students
[
i
].
TeachingMethod
=
playload
;
}
,
settGuestScheduleHandle
(
playload
)
{
this
.
showDialog
=
0
;
const
i
=
this
.
students
.
findIndex
(
x
=>
x
.
GuestId
==
this
.
currentStu
.
GuestId
);
const
j
=
this
.
sourceStudents
.
findIndex
(
x
=>
x
.
GuestId
==
this
.
currentStu
.
GuestId
);
if
(
i
<
0
)
return
;
this
.
students
[
i
]
=
{
...
this
.
students
[
i
],
...
playload
}
;
this
.
sourceStudents
[
j
]
=
{
...
this
.
sourceStudents
[
j
],
...
playload
}
;
}
,
resetContextmenu
(
i
,
yi
)
{
this
.
locationMenu
=
[
-
1
,
-
1
];
this
.
coor
=
[
i
,
yi
];
}
,
setRemark
(
i
)
{
const
user
=
this
.
students
[
i
];
const
dom
=
this
.
$refs
[
`stu_remark_${user.GuestId
}
`
];
if
(
dom
&&
dom
.
length
>
0
)
{
setGuestRemark
({
XGRemark
:
dom
[
0
].
innerText
,
GuestId
:
user
.
GuestId
}
).
then
(
r
=>
{
if
(
r
.
Code
!=
1
)
{
this
.
$q
.
notify
({
color
:
"negative"
,
message
:
"操作失败"
,
position
:
"top"
}
);
}
}
);
}
}
,
showStuRight
(
obj
)
{
if
(
obj
)
{
this
.
$q
.
loading
.
show
();
console
.
log
(
obj
.
StuId
);
getStudentInfo
({
StuId
:
obj
.
StuId
}
)
.
then
(
r
=>
{
this
.
stuOption
=
r
.
Data
;
this
.
stuOption
.
noEdit
=
true
;
this
.
stuInfoVisible
=
true
;
this
.
$q
.
loading
.
hide
();
}
)
.
catch
(
e
=>
{
this
.
$q
.
loading
.
hide
();
}
);
}
}
,
contextMenuHandle
(
i
,
yi
,
e
,
y
)
{
this
.
currentMenuState
=
y
?
y
.
State
:
0
this
.
currentSchedu
=
y
const
tips
=
this
.
$refs
[
`plantime_${i
}
_${yi
}
`
]
if
(
tips
&&
tips
.
length
>
0
){
tips
[
0
].
hide
()
}
this
.
coor
=
[
i
,
yi
];
const
t
=
e
.
target
;
let
top
=
t
.
offsetTop
+
t
.
offsetHeight
;
top
=
document
.
querySelector
(
".sptable-wrap"
).
offsetHeight
<
top
+
48
?
t
.
offsetTop
-
48
:
top
;
//sptable-wrap
this
.
locationMenu
=
[
t
.
offsetLeft
+
t
.
offsetWidth
/
2
,
top
];
}
,
cancleCellHandle
()
{
this
.
coor
=
[
-
1
,
-
1
];
this
.
locationMenu
=
[
-
1
,
-
1
];
}
}
,
created
()
{
this
.
getCourse
();
}
,
mounted
(){
document
.
addEventListener
(
'wheel'
,
this
.
handleWheel
,
{
passive
:
false
});
mounted
()
{
document
.
addEventListener
(
"wheel"
,
this
.
handleWheel
,
{
passive
:
false
}
);
}
,
beforeDestroy
(){
document
.
removeEventListener
(
'wheel'
,
this
.
handleWheel
,
{
passive
:
false
});
beforeDestroy
()
{
document
.
removeEventListener
(
"wheel"
,
this
.
handleWheel
,
{
passive
:
false
}
);
}
}
;
<
/script
>
...
...
@@ -278,14 +661,14 @@ export default {
}
.
sptable
{
border
-
collapse
:
collapse
;
border
:
1px
solid
#
000
;
border
:
1
px
solid
#
2
a363b
;
border
-
top
:
none
;
min
-
width
:
100
%
;
}
.
sptable
td
,
.
sptable
th
{
border-right
:
1px
solid
#
000
;
border-bottom
:
1px
solid
#
000
;
border
-
right
:
1
px
solid
#
2
a363b
;
border
-
bottom
:
1
px
solid
#
2
a363b
;
padding
:
6
px
15
px
;
/* min-width: 200px; */
white
-
space
:
nowrap
;
...
...
@@ -294,10 +677,8 @@ export default {
outline
:
none
;
position
:
relative
;
}
.sptable
td
:focus::before
{
}
.sptable
td
:focus::before
{
.
sptable
td
.
focus
-
box
::
before
,
.
sptable
td
:
focus
::
before
{
position
:
absolute
;
content
:
" "
;
display
:
block
;
...
...
@@ -306,7 +687,7 @@ export default {
right
:
-
1
px
;
bottom
:
-
1
px
;
z
-
index
:
15
;
border
:
3px
solid
#418
F1F
;
border
:
3
px
solid
#
418
f1f
;
pointer
-
events
:
none
;
}
.
sptable
tr
td
:
last
-
child
{
...
...
@@ -338,7 +719,7 @@ export default {
content
:
""
;
display
:
block
;
width
:
1
px
;
background
:
#
000
;
background
:
#
2
a363b
;
top
:
0
;
left
:
-
1
px
;
bottom
:
0
;
...
...
@@ -347,6 +728,7 @@ export default {
}
.
sptable
-
box
::
before
{
left
:
0
;
top
:
55
px
;
}
.
sptable
.
sticky
-
header
th
::
before
{
top
:
0
;
...
...
@@ -375,8 +757,8 @@ export default {
background
:
#
e3e6ed
;
border
-
top
:
1
px
solid
#
c9ccd2
;
border
-
bottom
:
1
px
solid
#
c9ccd2
;
border-left
:
1px
solid
#
000
;
border-right
:
1px
solid
#
000
;
border
-
left
:
1
px
solid
#
2
a363b
;
border
-
right
:
1
px
solid
#
2
a363b
;
z
-
index
:
9
;
padding
:
0
30
px
;
}
...
...
@@ -408,31 +790,43 @@ export default {
line
-
height
:
23
px
;
}
.
sptable
.
coursebg
{
background
:
#f
fd964
;
background
:
#
f
5cd79
;
}
.
sptable
.
stubg
{
background
:
#
92d050
;
background
:
#
26
de81
;
}
.
sptable
.
teacherbg
{
background
:
#
9999ff
;
background
:
#
778
beb
;
}
.
sptable
.
studybg
{
background
:
#
f08784
;
background
:
#
cf6a87
;
}
.
sptable
.
study
-
online
-
bg
{
background
:
#
ed7b30
;
background
:
#
fa8231
;
}
.
sptable
.
stop
{
background
:
#
ea3680
;
background
:
#
fc427b
;
}
.sptable
.defaultBg
{
background
:
#
cfcfcf
;
.
sptable
.
defaultBg
{
background
:
#
dfe4ea
;
}
.sptable
.study-normal
{
background
:
#
548235
;
.
sptable
.
study
-
normal
{
background
:
#
20
bf6b
;
}
.sptable
.disable-class
{
background
:
#
dfdfdf
;
.
sptable
.
disable
-
class
{
background
:
#
e3e6ed
;
cursor
:
not
-
allowed
;
}
.
sptable
.
unchecked
{
background
:
#
778
ca3
;
}
.
sptable
.
unstudy
{
background
:
#
58
B19F
;
}
.
sptable
.
onlineStudy
{
background
:
#
8854
d0
;
}
.
sptable
.
notChecked
{
background
:
#
eb3b5a
;
}
<
/style
>
src/pages/stuMan/components/setStudentTeacher.vue
0 → 100644
View file @
aa4106f1
<
template
>
<q-card
style=
"width: 450px"
class=
"q-pa-md"
v-loading=
""
>
<div
class=
"row items-center"
>
<div
class=
"text-h6"
>
设置班主任
</div>
</div>
<q-card-section>
<q-input
filled
stack-label
maxlength=
"20"
:dense=
"false"
v-model=
"stuInfo.GuestName"
class=
" q-pb-lg"
label=
"学员姓名"
readonly
/>
<template
v-if=
"stuInfo.HeadMasterName && stuInfo.HeadMasterName != ''"
>
<q-input
filled
stack-label
maxlength=
"20"
:dense=
"false"
v-model=
"stuInfo.GuestName"
class=
"q-pb-lg"
label=
"班主任"
readonly
/>
<div
class=
"q-mt-md text-negative"
>
当前班主任已经设置生效,如需修改请联系教学主管
</div>
</
template
>
<q-select
v-else
stack-label
color=
"primary"
filled
clearable
label=
"班主任"
option-value=
"Id"
option-label=
"EmployeeName"
:options=
"teachers"
v-model=
"teacherId"
ref=
"teacherRef"
map-options
:rules=
"[val => !!val || '请选择班主任信息']"
/>
<div
class=
"q-mt-md text-right"
>
<q-btn
label=
"保存"
@
click=
"setTeacher"
color=
"primary"
class=
"q-mr-md"
:loading=
"subLoading"
unelevated
v-if=
"!stuInfo.HeadMasterName || stuInfo.HeadMasterName == ''"
/>
<q-btn
label=
"关闭"
@
click=
"close"
unelevated
/>
</div>
</q-card-section>
</q-card>
</template>
<
script
>
import
{
queryEmployee
}
from
"src/api/users/user"
;
import
{
SetStudentAssist
}
from
"src/api/sale/sale"
;
export
default
{
props
:
{
stuInfo
:
{
type
:
Object
,
required
:
true
}
},
data
()
{
return
{
teacherId
:
null
,
teachers
:
[],
loading
:
false
,
subLoading
:
false
};
},
methods
:
{
close
()
{
this
.
$emit
(
"close"
);
},
async
getTeachers
()
{
if
(
this
.
loading
)
return
;
this
.
loading
=
true
;
const
queryObj
=
{
IsLeave
:
1
,
UserRole
:
0
,
AccountTypeStr
:
"2"
};
const
response
=
await
queryEmployee
(
queryObj
);
if
(
response
.
Code
==
1
)
{
this
.
teachers
=
response
.
Data
;
}
this
.
loading
=
false
;
},
setTeacher
()
{
if
(
this
.
subLoading
)
return
;
this
.
subLoading
=
true
;
this
.
$refs
.
teacherRef
.
validate
();
if
(
this
.
$refs
.
teacherRef
.
hasError
)
return
;
SetStudentAssist
({
StuId
:
this
.
stuInfo
.
GuestId
,
Id
:
0
,
AssistId
:
this
.
teacherId
.
Id
,
AssistType
:
4
})
.
then
(
r
=>
{
if
(
r
.
Code
==
1
)
{
this
.
$q
.
notify
({
icon
:
"iconfont icon-chenggong"
,
color
:
"accent"
,
timeout
:
2000
,
message
:
"数据保存成功!"
,
position
:
"top"
});
this
.
$emit
(
"success"
,
{
HeadMasterId
:
this
.
teacherId
.
Id
,
HeadMasterName
:
this
.
teacherId
.
EmployeeName
});
}
else
{
this
.
$q
.
notify
({
color
:
"negative"
,
message
:
"操作失败"
,
position
:
"top"
});
}
this
.
subLoading
=
false
;
})
.
catch
(
e
=>
{
this
.
subLoading
=
false
;
});
}
},
created
()
{
this
.
getTeachers
();
}
};
</
script
>
<
style
></
style
>
src/pages/stuMan/components/setStudyMethod.vue
0 → 100644
View file @
aa4106f1
<
template
>
<q-card
style=
"width: 450px"
class=
"q-pa-md"
>
<div
class=
"row items-center"
>
<div
class=
"text-h6"
>
设置上课方式
</div>
</div>
<q-card-section>
<q-select
stack-label
color=
"primary"
filled
label=
"授课方式"
option-value=
"value"
option-label=
"label"
:options=
"methodTypes"
v-model=
"methodType"
map-options
/>
<div
class=
"q-mt-md text-right"
>
<q-btn
label=
"保存"
@
click=
"setStudyMethodHandle"
color=
"primary"
class=
"q-mr-md"
:loading=
"subLoading"
unelevated
/>
<q-btn
label=
"关闭"
@
click=
"close"
unelevated
/>
</div>
</q-card-section>
</q-card>
</
template
>
<
script
>
import
{
setGuestTeachingMethod
}
from
"src/api/studentmsg/index"
;
import
{
SetStudentAssist
}
from
"src/api/sale/sale"
;
export
default
{
props
:
{
stuInfo
:
{
type
:
Object
,
required
:
true
}
},
data
()
{
return
{
methodType
:
1
,
methodTypes
:[{
value
:
1
,
label
:
'面授'
},{
value
:
2
,
label
:
'线上'
}],
subLoading
:
false
};
},
methods
:
{
close
()
{
this
.
$emit
(
"close"
);
},
setStudyMethodHandle
()
{
if
(
this
.
subLoading
)
return
;
this
.
subLoading
=
true
;
setGuestTeachingMethod
({
TeachingMethod
:
this
.
methodType
.
value
,
GuestId
:
this
.
stuInfo
.
GuestId
}).
then
(
r
=>
{
if
(
r
.
Code
==
1
)
{
this
.
$q
.
notify
({
icon
:
"iconfont icon-chenggong"
,
color
:
"accent"
,
timeout
:
2000
,
message
:
"数据保存成功!"
,
position
:
"top"
});
this
.
$emit
(
"success"
,
this
.
methodType
.
value
);
}
else
{
this
.
$q
.
notify
({
color
:
"negative"
,
message
:
"操作失败"
,
position
:
"top"
});
}
this
.
subLoading
=
false
;
})
.
catch
(
e
=>
{
this
.
subLoading
=
false
;
});
}
},
created
()
{
this
.
methodType
=
this
.
stuInfo
.
TeachingMethod
==-
1
?
1
:
this
.
stuInfo
.
TeachingMethod
}
};
</
script
>
<
style
></
style
>
src/pages/stuMan/components/setStudyPlan.vue
0 → 100644
View file @
aa4106f1
<
template
>
<q-card
style=
"width: 700px;max-width: unset !important;"
class=
"q-pa-md"
>
<div
class=
"row items-center"
>
<div
class=
"text-h6"
>
学员排课
</div>
</div>
<q-card-section>
<div
class=
"row items-center"
>
<q-chip
square
icon=
"face"
size=
"md"
color=
"primary"
text-color=
"white"
>
{{
stuInfo
.
GuestName
}}
</q-chip>
<q-chip
square
color=
"teal"
text-color=
"white"
class=
"q-mx-md"
v-if=
"chapter"
>
<q-avatar
color=
"red"
text-color=
"white"
>
{{
acCoor
[
0
]
+
1
}}
</q-avatar>
{{
chapter
.
ChapterName
}}
</q-chip>
<q-chip
square
icon=
"book"
size=
"md"
class=
"col q-ma-none"
>
{{
rate
.
CourseName
}}
</q-chip>
</div>
<div
class=
"q-mt-md row"
>
<q-input
dense
standout
id=
"startDateRef"
v-model=
"plan.startDate"
:disable=
"planTime && planTime.State!=1"
label=
"上课日期"
readonly
:rules=
"[val => !!val || '请选择上课日期']"
class=
"col q-mr-md"
>
<q-menu
ref=
"qDateProxy"
anchor=
"bottom middle"
self=
"top middle"
:offset=
"[0, 0]"
>
<q-date
v-model=
"plan.startDate"
:options=
"optionsFn"
mask=
"YYYY-MM-DD"
minimal
@
input=
"changeDateHandle"
></q-date>
</q-menu>
</q-input>
<q-select
dense
stack-label
color=
"primary"
standout
label=
"时段"
:disable=
"planTime && planTime.State!=1"
option-value=
"value"
option-label=
"label"
:options=
"sections"
v-model=
"plan.section"
map-options
class=
"col"
/>
</div>
<div
class=
"row"
>
<q-select
stack-label
dense
color=
"primary"
standout
label=
"讲师"
:disable=
"planTime && planTime.State!=1"
option-value=
"Id"
option-label=
"EmployeeName"
:options=
"teachers"
v-model=
"plan.teacher"
ref=
"teacherRef"
map-options
:rules=
"[val => !!val || '请选择讲师']"
class=
"col q-mr-md"
/>
<q-select
stack-label
dense
color=
"primary"
standout
label=
"上课教室"
:disable=
"planTime && planTime.State!=1"
option-value=
"RoomId"
option-label=
"RoomName"
:options=
"classRoomList"
v-model=
"plan.classRoom"
map-options
:rules=
"[val => !!val || '请选择使用教室']"
class=
"col"
/>
</div>
<div
v-if=
"recommendStus.length>0 && !planTime"
>
<div
class=
"row items-center"
>
<div
class=
"text-xs col"
>
匹配学员
</div>
</div>
<div
class=
"bg-grey-2 q-pa-md rounded-borders q-mt-sm row"
style=
"border:1px dashed #CFCFCF"
>
<q-chip
square
v-for=
"(x, n) in recommendStus"
clickable
@
click=
"checkedStuHandle(x.stuInfo)"
:class=
"
{'text-white':x.disable}" :key="n" class="cursor-pointer" :color="x.disable?'primary':''">
{{
x
.
StuName
}}
<q-tooltip>
<div
class=
"text-small row"
>
<div
class=
"q-mr-md"
>
当日约课时段:
</div>
<div
class=
"col"
>
<div
v-for=
"(s, i) in x.sections"
:key=
"i"
>
{{
sections
[
s
].
label
}}
</div>
</div>
</div>
<div
class=
"text-small row"
>
<div
class=
"q-mr-md"
>
上课进度:
</div>
<div
class=
"col text-right"
>
<div>
{{
x
.
stuInfo
.
ClassProgress
}}
/
{{
rate
.
ClassHours
}}
</div>
</div>
</div>
</q-tooltip>
</q-chip>
</div>
</div>
<div
class=
"q-mt-md"
v-if=
"rate.CourseRate!=10 && rate.CourseRate!=11 "
>
<div
class=
"row items-center"
>
<div
class=
"text-xs col"
>
已选择学员
</div>
<q-btn-dropdown
unelevated
label=
"添加学员"
dense
v-if=
"planTime && planTime.State
<3
"
>
<div
class=
"column"
>
<div
class=
"q-ma-sm"
>
<q-input
style=
"width:120px;"
v-model=
"filterStuName"
type=
"text"
placeholder=
"姓名关键字"
dense
standout
/>
</div>
<q-scroll-area
style=
"width: 100%; height: 30vh;"
:thumb-style=
"thumbStyle"
:bar-style=
"barStyle"
>
<q-list>
<template
v-for=
"(x, i) in currentChapterStus"
>
<q-item
clickable
v-close-popup
@
click=
"checkedStuHandle(x)"
v-if=
"filterStuName=='' || x.GuestName.includes(filterStuName)"
:key=
"i"
:disable=
"x.disable"
>
<q-item-section>
<q-item-label>
{{
x
.
GuestName
}}
</q-item-label>
</q-item-section>
</q-item>
</
template
>
</q-list>
</q-scroll-area>
</div>
</q-btn-dropdown>
</div>
<div
class=
"bg-grey-2 q-pa-md rounded-borders q-mt-sm row"
style=
"border:1px dashed #CFCFCF"
>
<q-chip
square
v-for=
"(x,i) in plan.checkedStus"
:key=
"i"
:removable=
"(planTime && planTime.State!=3)||!plantime"
@
remove=
"removeCheckedStusHandle(x)"
>
{{ x.GuestName }}
</q-chip>
</div>
</div>
<div
class=
"q-mt-md text-right"
>
<q-btn
label=
"保存"
color=
"primary"
class=
"q-mr-md"
:loading=
"subLoading"
@
click=
"validateSubmit"
unelevated
/>
<q-btn
label=
"关闭"
@
click=
"close"
:disable=
"subLoading"
unelevated
/>
</div>
</q-card-section>
<q-dialog
v-model=
"cancelConfirm"
persistent
>
<q-card>
<q-card-section
class=
"row items-center"
>
<div>
你正在执行取消已确认学员的上课计划,请确认以下操作
</div>
<div
class=
"q-mt-sm"
>
<q-radio
v-model=
"adminCancelChosenOpera"
checked-icon=
"task_alt"
unchecked-icon=
"panorama_fish_eye"
val=
"yes"
label=
"扣除学员课时按缺勤处理"
/>
<q-radio
v-model=
"adminCancelChosenOpera"
checked-icon=
"task_alt"
unchecked-icon=
"panorama_fish_eye"
val=
"no"
label=
"无损取消"
/>
</div>
</q-card-section>
<q-card-actions
align=
"right"
>
<q-btn
flat
label=
"不执行此次操作"
color=
"primary"
v-close-popup
/>
<q-btn
unelevated
label=
"确认选择"
@
click=
"checkRemoveChosenHandle"
:disable=
"adminCancelChosenOpera==''"
color=
"primary"
v-close-popup
/>
</q-card-actions>
</q-card>
</q-dialog>
</q-card>
</template>
<
script
>
import
{
queryEmployee
}
from
"src/api/users/user"
;
import
{
queryClassRoomList
}
from
"src/api/school/index"
;
import
{
queryPlanAppointmentStatic
}
from
"src/api/stuMan/index"
;
import
{
setAdminScrollAppointment_V3
}
from
"src/api/studyabroad/subscribe"
;
import
{
getStuAppointPlan
,
cancelStuAppointment
}
from
'src/api/scheduling/schedu'
export
default
{
props
:
{
stuInfo
:
{
type
:
Object
,
required
:
true
},
sourceList
:
{
type
:
Array
,
required
:
true
},
coor
:
{
type
:
Array
,
required
:
true
},
chapters
:
{
type
:
Array
,
require
:
true
},
rate
:
{
type
:
Object
,
require
:
true
},
planTime
:{
type
:
Object
}
},
data
()
{
return
{
subLoading
:
false
,
chapter
:
{},
sectionNames
:
[
"一"
,
"二"
,
"三"
,
"四"
,
"五"
,
"六"
],
sections
:
[],
acCoor
:
[],
teachers
:
[],
classRoomList
:
[],
plan
:
{
startDate
:
""
,
section
:
{},
teacher
:
null
,
classRoom
:
null
,
checkedStus
:
[]
},
recommendStus
:
[],
appointmentStudents
:
[],
today
:
""
,
currentChapterStus
:
[],
filterStuName
:
''
,
thumbStyle
:
{
right
:
"4px"
,
borderRadius
:
"5px"
,
backgroundColor
:
"#027be3"
,
width
:
"5px"
,
opacity
:
0.75
},
barStyle
:
{
right
:
"2px"
,
borderRadius
:
"9px"
,
backgroundColor
:
"#027be3"
,
width
:
"9px"
,
opacity
:
0.2
},
updatePlan
:
null
,
cancelConfirm
:
false
,
adminCancelChosenOpera
:
''
,
cancelStu
:
null
};
},
methods
:
{
close
()
{
this
.
$emit
(
"close"
);
},
initSection
()
{
this
.
sectionNames
.
forEach
((
x
,
i
)
=>
{
this
.
sections
.
push
({
value
:
i
+
1
,
label
:
`第
${
x
}
节课`
});
});
this
.
plan
.
section
=
this
.
sections
[
0
];
},
optionsFn
(
date
)
{
return
date
>=
this
.
today
;
},
getToday
()
{
var
myDate
=
new
Date
();
let
month
=
myDate
.
getMonth
()
+
1
;
if
(
month
<
10
)
{
month
=
"0"
+
month
;
}
let
day
=
myDate
.
getDate
();
if
(
day
<
10
)
{
day
=
"0"
+
day
;
}
this
.
today
=
myDate
.
getFullYear
()
+
"/"
+
month
+
"/"
+
day
;
},
async
getTeachers
()
{
const
queryObj
=
{
IsLeave
:
1
,
UserRole
:
0
,
AccountTypeStr
:
"2"
};
const
response
=
await
queryEmployee
(
queryObj
);
if
(
response
.
Code
==
1
)
{
this
.
teachers
=
response
.
Data
;
if
(
this
.
planTime
){
this
.
plan
.
teacher
=
this
.
teachers
.
find
(
x
=>
x
.
Id
==
this
.
planTime
.
AccountId
)
}
}
},
getClassRoomList
()
{
queryClassRoomList
({}).
then
(
r
=>
{
if
(
r
.
Code
==
1
)
{
this
.
classRoomList
=
r
.
Data
;
if
(
this
.
planTime
){
this
.
getPlan
()
}
}
});
},
changeDateHandle
()
{
this
.
$refs
.
qDateProxy
.
hide
();
this
.
calcRecommendHandle
();
},
calcRecommendHandle
()
{
if
(
!
this
.
plan
.
startDate
||
this
.
plan
.
startDate
==
""
)
return
;
if
(
!
this
.
plan
.
startDate
||
this
.
plan
.
startDate
==
""
)
return
;
this
.
recommendStus
=
[];
const
tempAppointment
=
this
.
appointmentStudents
.
find
(
x
=>
x
.
DateStr
==
this
.
plan
.
startDate
);
if
(
tempAppointment
&&
tempAppointment
.
TimeList
)
{
//查询当天有预约的学员
const
resultUser
=
tempAppointment
.
TimeList
.
reduce
(
(
accumulator
,
current
,
i
)
=>
{
current
.
StuList
.
forEach
(
x
=>
{
x
.
section
=
i
;
});
accumulator
=
accumulator
??
[];
accumulator
=
[...
accumulator
,
...
current
.
StuList
];
return
accumulator
;
},
[]
);
//查询符合课程和章节条件的学员
if
(
resultUser
.
length
>
0
)
{
const
rateUser
=
resultUser
.
filter
(
x
=>
{
const
student
=
this
.
sourceList
.
find
(
s
=>
s
.
StuId
==
x
.
StuId
&&
s
.
StuId
!=
this
.
stuInfo
.
StuId
);
if
(
student
)
{
x
.
stuInfo
=
student
;
const
unStudy
=
student
.
CourseItems
.
findIndex
(
c
=>
c
.
ChapterId
==
this
.
acCoor
[
0
]
+
1
)
==
-
1
;
if
(
unStudy
)
return
x
;
}
});
this
.
recommendStus
=
this
.
uniqueArray
(
rateUser
)
}
}
},
uniqueArray
(
arr
)
{
const
uniqueSet
=
new
Set
();
const
newArray
=
arr
.
filter
(
item
=>
{
if
(
!
uniqueSet
.
has
(
item
.
StuId
))
{
uniqueSet
.
add
(
item
.
StuId
);
return
true
;
}
return
false
;
});
newArray
.
forEach
(
x
=>
{
x
.
sections
=
arr
.
filter
(
item
=>
item
.
StuId
==
x
.
StuId
).
map
(
item
=>
item
.
section
)
})
return
newArray
},
getPlanApointment
()
{
queryPlanAppointmentStatic
({
StartTime
:
this
.
today
,
EndTime
:
""
}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
appointmentStudents
=
res
.
Data
;
}
}
);
},
initCurrentChapterStus
(){
const
stus
=
this
.
sourceList
.
filter
(
x
=>
{
const
unStudy
=
x
.
CourseItems
.
findIndex
(
c
=>
c
.
ChapterId
==
this
.
acCoor
[
0
]
+
1
)
==
-
1
;
const
checked
=
this
.
plan
.
checkedStus
.
findIndex
(
c
=>
c
.
StuId
==
x
.
StuId
)
!=
-
1
x
.
disable
=
checked
if
(
unStudy
&&
x
.
ScheduleStatus
!=
1
&&
x
.
StuId
!=
this
.
stuInfo
.
StuId
)
return
x
;
})
this
.
currentChapterStus
=
stus
},
checkedStuHandle
(
item
){
const
i
=
this
.
plan
.
checkedStus
.
findIndex
(
x
=>
x
.
StuId
==
item
.
StuId
)
if
(
i
!=-
1
)
{
this
.
removeCheckedStusHandle
(
item
)
return
}
const
temps
=
this
.
currentChapterStus
.
find
(
x
=>
x
.
StuId
==
item
.
StuId
)
if
(
temps
)
temps
.
disable
=
true
this
.
plan
.
checkedStus
.
push
(
item
)
const
temp
=
this
.
recommendStus
.
find
(
x
=>
x
.
StuId
==
item
.
StuId
)
if
(
temp
)
temp
.
disable
=
true
},
removeCheckedStusHandle
(
item
){
if
(
this
.
planTime
){
const
stuIndex
=
this
.
updatePlan
.
ChooseStuList
.
findIndex
(
x
=>
x
.
StuId
==
item
.
StuId
)
if
(
stuIndex
!=-
1
){
this
.
cancelStu
=
stuIndex
if
(
this
.
planTime
.
State
==
1
){
this
.
adminCancelChosenOpera
=
'no'
this
.
removePlanHandle
(
stuIndex
)
}
else
if
(
this
.
planTime
.
State
==
2
)
{
this
.
adminCancelChosenOpera
=
''
this
.
cancelConfirm
=
true
}
return
}
}
const
temps
=
this
.
currentChapterStus
.
find
(
x
=>
x
.
StuId
==
item
.
StuId
)
if
(
temps
)
temps
.
disable
=
false
const
i
=
this
.
plan
.
checkedStus
.
findIndex
(
x
=>
x
.
StuId
==
item
.
StuId
)
if
(
i
!=-
1
)
this
.
plan
.
checkedStus
.
splice
(
i
,
1
)
const
temp
=
this
.
recommendStus
.
find
(
x
=>
x
.
StuId
==
item
.
StuId
)
if
(
temp
)
temp
.
disable
=
false
},
checkRemoveChosenHandle
(){
if
(
this
.
adminCancelChosenOpera
==
''
){
this
.
errorMsgHandle
(
'请选择执行的内容'
)
return
}
this
.
cancelConfirm
=
false
this
.
removePlanHandle
()
},
removePlanHandle
(){
const
stu
=
this
.
updatePlan
.
ChooseStuList
[
this
.
cancelStu
]
console
.
log
(
stu
)
cancelStuAppointment
({
AccountId
:
this
.
planTime
.
AccountId
,
Date
:
this
.
updatePlan
.
Date
,
ShiftSort
:
this
.
updatePlan
.
ShiftSort
,
ChooseStuList
:[
{
AppointId
:
stu
.
AppointmentId
,
IsCalcStuCheck
:
this
.
adminCancelChosenOpera
==
'yes'
?
1
:
0
}
]
}).
then
(
r
=>
{
if
(
r
.
Code
==
1
){
this
.
updatePlan
.
ChooseStuList
.
splice
(
this
.
cancelStu
,
1
)
const
removeObj
=
this
.
plan
.
checkedStus
.
find
(
x
=>
x
.
StuId
==
stu
.
StuId
)
if
(
removeObj
)
this
.
removeCheckedStusHandle
(
removeObj
)
}
})
},
validateSubmit
(){
let
msg
=
''
const
t
=
this
.
plan
if
(
t
.
startDate
==
''
)
msg
=
'请选择上课日期'
else
if
(
!
t
.
teacher
||
!
t
.
teacher
.
Id
)
msg
=
'请选择讲师'
else
if
(
!
t
.
classRoom
||
!
t
.
classRoom
.
RoomId
)
msg
=
'请选择教室'
if
(
msg
!=
''
){
this
.
errorMsgHandle
(
msg
)
return
}
if
(
t
.
checkedStus
.
length
==
0
&&
(
this
.
rate
.
CourseRate
!=
10
&&
this
.
rate
.
CourseRate
!=
11
)){
this
.
$q
.
dialog
({
title
:
'重要提醒'
,
message
:
'该课程并非1对1VIP课程,目前只有一个学员,是否继续提交?'
,
cancel
:
true
,
persistent
:
true
,
ok
:
'确认继续提交'
,
cancel
:
`取消`
}).
onOk
(()
=>
{
this
.
setAppointment
()
}).
onCancel
(()
=>
{
})
}
else
{
this
.
setAppointment
()
}
},
setAppointment
(){
if
(
this
.
subLoading
)
return
this
.
subLoading
=
true
const
t
=
this
.
plan
const
u
=
this
.
stuInfo
const
msg
=
{
Date
:
t
.
startDate
,
TeacherId
:
t
.
teacher
.
AccountId
,
ShiftSort
:
t
.
section
.
value
,
RoomId
:
t
.
classRoom
.
RoomId
,
CourseId
:
this
.
rate
.
CourseId
,
ChapterNo
:
`
${
this
.
acCoor
[
0
]
+
1
}
`
,
CourseGradeNo
:
`
${
this
.
acCoor
[
0
]
+
1
}
`
,
CourseGradeId
:
this
.
rate
.
CourseRate
}
const
newStuArray
=
[
u
,...
t
.
checkedStus
]
const
stus
=
[]
newStuArray
.
forEach
(
x
=>
{
const
tu
=
{
StuId
:
x
.
StuId
,
StuName
:
x
.
GuestName
,
GuestId
:
x
.
GuestId
,
LearnCourseId
:
x
.
CourseId
,
CourseGradeId
:
this
.
rate
.
CourseRate
,
CourseGradeNo
:
`
${
this
.
acCoor
[
0
]
+
1
}
`
,
AppointmentId
:
this
.
updatePlan
?(
this
.
updatePlan
.
ChooseStuList
.
find
(
y
=>
x
.
StuId
==
y
.
StuId
)?.
AppointmentId
??
0
):
0
}
stus
.
push
(
tu
)
})
msg
.
ChooseStuList
=
stus
setAdminScrollAppointment_V3
(
msg
).
then
(
r
=>
{
if
(
r
.
Code
==
1
){
this
.
$q
.
notify
({
icon
:
"iconfont icon-chenggong"
,
color
:
"accent"
,
timeout
:
2000
,
message
:
"数据保存成功!"
,
position
:
"top"
});
this
.
$emit
(
"success"
);
}
else
{
this
.
errorMsgHandle
(
r
.
Message
)
}
this
.
subLoading
=
false
}).
catch
(
e
=>
{
this
.
subLoading
=
false
})
// startDate: "",
// section: {},
// teacher: null,
// classRoom: null,
// checkedStus: []
},
errorMsgHandle
(
msg
){
this
.
$q
.
notify
({
color
:
"negative"
,
message
:
msg
,
position
:
"top"
});
},
getPlan
(){
console
.
log
(
this
.
planTime
)
const
p
=
this
.
planTime
getStuAppointPlan
({
AccountId
:
p
.
AccountId
,
Date
:
p
.
Date
,
ShiftSort
:
p
.
ShiftSort
}).
then
(
r
=>
{
if
(
r
.
Code
==
1
){
const
d
=
r
.
Data
this
.
updatePlan
=
d
const
q
=
this
.
plan
q
.
startDate
=
p
.
Date
q
.
section
=
this
.
sections
[(
d
.
ShiftSort
-
1
)]
q
.
classRoom
=
this
.
classRoomList
.
find
(
x
=>
x
.
RoomId
==
d
.
RoomId
)
this
.
acCoor
[
0
]
=
d
.
CourseGradeNo
-
1
this
.
initCurrentChapterStus
()
const
stus
=
this
.
sourceList
.
filter
(
x
=>
{
return
d
.
ChooseStuList
.
findIndex
(
y
=>
y
.
StuId
==
x
.
StuId
)
!=-
1
&&
x
.
StuId
!=
this
.
stuInfo
.
StuId
})
??
[]
stus
.
forEach
(
x
=>
{
this
.
checkedStuHandle
(
x
)
})
}
else
{
this
.
close
()
}
}).
catch
((
e
)
=>
{
this
.
close
()
})
},
},
created
()
{
this
.
acCoor
=
this
.
coor
;
this
.
chapter
=
this
.
chapters
[
this
.
coor
[
0
]];
this
.
getToday
();
this
.
initSection
();
this
.
getTeachers
();
this
.
getClassRoomList
();
this
.
getPlanApointment
();
this
.
initCurrentChapterStus
()
}
};
</
script
>
<
style
></
style
>
src/pages/stuMan/components/setStudyStatus.vue
0 → 100644
View file @
aa4106f1
<
template
>
<q-card
style=
"width: 450px"
class=
"q-pa-md"
>
<div
class=
"row items-center"
>
<div
class=
"text-h6"
>
设置排课状态
</div>
</div>
<q-card-section>
<q-select
stack-label
color=
"primary"
filled
label=
"状态"
option-value=
"value"
option-label=
"label"
:options=
"studys"
v-model=
"studyStatus"
map-options
/>
<div
class=
"row items-center q-mt-sm"
v-if=
"studyStatus==1 || studyStatus.value==1"
>
<q-input
filled
v-model=
"endDate"
mask=
"####-##-##"
class=
"col"
label=
"截至日期"
:disable=
"unknow"
readonly
ref=
"StartTime"
:rules=
"[val => !!val || '请选择截至日期']"
>
<template
v-slot:append
>
<q-icon
name=
"event"
class=
"cursor-pointer"
>
<q-popup-proxy
ref=
"qDateProxy"
transition-show=
"scale"
transition-hide=
"scale"
>
<div
class=
"q-gutter-md"
>
<q-date
v-model=
"endDate"
mask=
"YYYY-MM-DD"
></q-date>
</div>
<q-btn
v-close-popup
label=
"关闭"
color=
"primary"
flat
style=
"float:right"
/>
</q-popup-proxy>
</q-icon>
</
template
>
</q-input>
<q-checkbox
v-model=
"unknow"
label=
"未知"
class=
"q-ml-md"
dense
@
input=
"changeUnknowHandle"
/>
</div>
<div
class=
"q-mt-sm"
v-if=
"studyStatus==0 || studyStatus.value==0"
>
<q-input
v-model=
"remark"
type=
"textarea"
label=
"排课备注"
filled
autogrow
/>
</div>
<div
class=
"q-mt-md text-right"
>
<q-btn
label=
"保存"
@
click=
"setStudySchedule"
color=
"primary"
class=
"q-mr-md"
:loading=
"subLoading"
unelevated
/>
<q-btn
label=
"关闭"
@
click=
"close"
unelevated
/>
</div>
</q-card-section>
</q-card>
</template>
<
script
>
import
{
setGuestScheduleStatus
}
from
"src/api/studentmsg/index"
;
export
default
{
props
:
{
stuInfo
:
{
type
:
Object
,
required
:
true
}
},
data
()
{
return
{
methodType
:
0
,
studys
:[{
value
:
0
,
label
:
'正常排课'
},{
value
:
1
,
label
:
'暂停排课'
}],
studyStatus
:
0
,
subLoading
:
false
,
endDate
:
''
,
unknow
:
false
,
remark
:
''
};
},
methods
:
{
close
()
{
this
.
$emit
(
"close"
);
},
setStudyMethodHandle
()
{
if
(
this
.
subLoading
)
return
;
this
.
subLoading
=
true
;
},
changeUnknowHandle
(){
if
(
this
.
unknow
)
this
.
endDate
=
''
},
setStudySchedule
()
{
if
(
this
.
subLoading
)
return
;
this
.
subLoading
=
true
;
const
parameters
=
{
ScheduleStatus
:
this
.
studyStatus
.
label
?
this
.
studyStatus
.
value
:
this
.
studyStatus
,
StopDeadline
:
this
.
endDate
,
ScheduleRemark
:
this
.
remark
,
GuestId
:
this
.
stuInfo
.
GuestId
}
setGuestScheduleStatus
(
parameters
).
then
(
r
=>
{
if
(
r
.
Code
==
1
)
{
this
.
$q
.
notify
({
icon
:
"iconfont icon-chenggong"
,
color
:
"accent"
,
timeout
:
2000
,
message
:
"数据保存成功!"
,
position
:
"top"
});
this
.
$emit
(
"success"
,
parameters
);
}
else
{
this
.
$q
.
notify
({
color
:
"negative"
,
message
:
"操作失败"
,
position
:
"top"
});
}
this
.
subLoading
=
false
;
})
.
catch
(
e
=>
{
this
.
subLoading
=
false
;
});
}
},
created
()
{
this
.
studyStatus
=
this
.
stuInfo
.
ScheduleStatus
==-
1
?
0
:
this
.
stuInfo
.
ScheduleStatus
this
.
unknow
=
this
.
studyStatus
==
1
?
(
this
.
stuInfo
.
StopDeadline
==
''
):
false
this
.
remark
=
this
.
stuInfo
.
ScheduleRemark
this
.
endDate
=
this
.
stuInfo
.
StopDeadline
}
};
</
script
>
<
style
></
style
>
src/pages/stuMan/components/studyHeader.vue
0 → 100644
View file @
aa4106f1
<
template
>
<div
class=
"rounded-borders row bg-white q-mb-sm"
style=
"border: 1px solid #c9ccd2;box-shadow:rgb(201, 204, 210) 0px 3px 5px 0px;margin-top: 5px; flex-direction: row-reverse;"
>
<q-btn-dropdown
unelevated
:label=
"`排课状态:$
{stuQueryMsg.schedule.name}`">
<q-list>
<q-item
clickable
v-close-popup
@
click=
"setScheduleStatus(x)"
v-for=
"(x, i) in schedules"
:key=
"i"
>
<q-item-section>
<q-item-label>
{{
x
.
name
}}
</q-item-label>
</q-item-section>
</q-item>
</q-list>
</q-btn-dropdown>
<q-btn-dropdown
unelevated
:label=
"`结课状态:$
{stuQueryMsg.progress.name}`">
<q-list>
<q-item
clickable
v-close-popup
@
click=
"setProgressStatus(x)"
v-for=
"(x, i) in progresss"
:key=
"i"
>
<q-item-section>
<q-item-label>
{{
x
.
name
}}
</q-item-label>
</q-item-section>
</q-item>
</q-list>
</q-btn-dropdown>
<q-btn-dropdown
unelevated
:label=
"`班主任:$
{stuQueryMsg.teacher.EmployeeName}`">
<q-list>
<q-item
clickable
v-close-popup
@
click=
"setTeacher(x)"
v-for=
"(x, i) in teachers"
:key=
"i"
>
<q-item-section>
<q-item-label>
{{
x
.
EmployeeName
}}
</q-item-label>
</q-item-section>
</q-item>
</q-list>
</q-btn-dropdown>
<q-btn-dropdown
unelevated
:label=
"`上课方式:$
{stuQueryMsg.stuType.name}`">
<q-list>
<q-item
clickable
v-close-popup
@
click=
"setStuType(x)"
v-for=
"(x, i) in stuTypes"
:key=
"i"
>
<q-item-section>
<q-item-label>
{{
x
.
name
}}
</q-item-label>
</q-item-section>
</q-item>
</q-list>
</q-btn-dropdown>
<q-input
v-model=
"stuQueryMsg.stuName"
dense
type=
"text"
standout
placeholder=
"输入学员姓名,按回车查询"
style=
"width:200px;"
@
keypress
.
enter=
"setChangeHandle"
/>
</div>
</
template
>
<
script
>
import
{
queryEmployee
}
from
"src/api/users/user"
;
export
default
{
data
()
{
return
{
stuQueryMsg
:
{
schedule
:
{},
progress
:
{},
teacher
:{},
stuName
:
''
,
stuType
:{}
},
schedules
:
[{
id
:
-
1
,
name
:
'全部'
},
{
id
:
0
,
name
:
'正常排课'
},
{
id
:
1
,
name
:
'暂停排课'
}],
progresss
:
[{
id
:
-
1
,
name
:
'全部'
},
{
id
:
1
,
name
:
'未完结'
},
{
id
:
7
,
name
:
'已完结'
}],
stuTypes
:
[{
id
:
-
1
,
name
:
'全部'
},
{
id
:
0
,
name
:
'面授'
},
{
id
:
1
,
name
:
'线上'
}],
teachers
:[]
}
},
methods
:
{
setScheduleStatus
(
schedule
)
{
if
(
schedule
.
id
!=
this
.
stuQueryMsg
.
schedule
.
id
){
this
.
stuQueryMsg
.
schedule
=
schedule
this
.
setChangeHandle
()
}
},
setProgressStatus
(
progress
)
{
if
(
progress
.
id
!=
this
.
stuQueryMsg
.
progress
.
id
){
this
.
stuQueryMsg
.
progress
=
progress
this
.
setChangeHandle
()
}
},
setTeacher
(
teacher
)
{
if
(
teacher
.
Id
!=
this
.
stuQueryMsg
.
teacher
.
Id
){
this
.
stuQueryMsg
.
teacher
=
teacher
this
.
setChangeHandle
()
}
},
setStuType
(
stuType
)
{
if
(
stuType
.
id
!=
this
.
stuQueryMsg
.
stuType
.
id
){
this
.
stuQueryMsg
.
stuType
=
stuType
this
.
setChangeHandle
()
}
},
async
getTeachers
()
{
const
queryObj
=
{
IsLeave
:
1
,
UserRole
:
0
,
AccountTypeStr
:
"2"
};
const
response
=
await
queryEmployee
(
queryObj
);
if
(
response
.
Code
==
1
)
{
this
.
teachers
=
response
.
Data
;
this
.
teachers
.
splice
(
0
,
0
,{
Id
:
0
,
EmployeeName
:
'全部'
})
this
.
stuQueryMsg
.
teacher
=
this
.
teachers
[
0
]
}
},
setChangeHandle
(){
const
parameters
=
{
HeadMasterId
:
this
.
stuQueryMsg
.
teacher
.
Id
,
GuestState
:
this
.
stuQueryMsg
.
progress
.
id
,
ScheduleStatus
:
this
.
stuQueryMsg
.
schedule
.
id
,
TeachingMethod
:
this
.
stuQueryMsg
.
stuType
.
id
,
GuestName
:
this
.
stuQueryMsg
.
stuName
}
this
.
$emit
(
'change'
,
parameters
)
},
resetQuery
(){
this
.
stuQueryMsg
.
schedule
=
this
.
schedules
[
0
]
this
.
stuQueryMsg
.
progress
=
this
.
progresss
[
0
]
this
.
stuQueryMsg
.
stuType
=
this
.
stuTypes
[
0
]
this
.
stuQueryMsg
.
stuName
=
''
this
.
stuQueryMsg
.
teacher
=
this
.
teachers
[
0
]
}
},
created
()
{
this
.
getTeachers
()
this
.
stuQueryMsg
.
schedule
=
this
.
schedules
[
0
]
this
.
stuQueryMsg
.
progress
=
this
.
progresss
[
0
]
this
.
stuQueryMsg
.
stuType
=
this
.
stuTypes
[
0
]
}
};
</
script
>
<
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