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
776ffde1
Commit
776ffde1
authored
Jul 12, 2021
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
ec387072
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1060 additions
and
432 deletions
+1060
-432
index.js
src/api/school/index.js
+12
-0
changeClassForm.vue
src/components/teacher/changeClassForm.vue
+1044
-431
teacherSchedule.vue
src/pages/teacher/teacherSchedule.vue
+4
-1
No files found.
src/api/school/index.js
View file @
776ffde1
...
@@ -556,3 +556,15 @@ export function propertyGetPageList(data) {
...
@@ -556,3 +556,15 @@ export function propertyGetPageList(data) {
data
data
});
});
}
}
/**
* 保存调课申请单
*/
export
function
SetChangeClassPlan
(
data
)
{
return
request
({
url
:
'/ChangePlan/SetChangeClassPlan'
,
method
:
'post'
,
data
});
}
src/components/teacher/changeClassForm.vue
View file @
776ffde1
<
style
>
.common_Style
{
display
:
inline-block
;
width
:
30px
;
height
:
30px
;
border-radius
:
50%
;
text-align
:
center
;
line-height
:
30px
;
}
.classForm_monday
{
background-color
:
#ced9f8
;
color
:
#2961FE
;
}
.classForm_tuesday
{
background-color
:
#d9f3ff
;
color
:
#3FC4FF
;
}
.classForm_wednesday
{
background-color
:
#f6e2cb
;
color
:
#F28C1D
;
}
.classForm_thursday
{
background-color
:
#ccf3eb
;
color
:
#02C499
;
}
.classForm_friday
{
background-color
:
#f7cfd6
;
color
:
#F72E52
;
}
.classForm_saturday
{
background-color
:
#fff5cc
;
color
:
#FFCC00
;
}
.classForm_sunday
{
background-color
:
#e6e3fe
;
color
:
#8175FB
;
}
.planTimeLi
tbody
::before
{
content
:
''
;
display
:
table-row
;
height
:
20px
;
}
</
style
>
<
template
>
<
template
>
<q-dialog
v-model=
"persistent"
content-class=
"bg-grey-1"
persistent
transition-show=
"scale"
transition-hide=
"scale"
>
<q-dialog
v-model=
"persistent"
content-class=
"bg-grey-1"
persistent
transition-show=
"scale"
transition-hide=
"scale"
>
<q-card
style=
"width: 800px;max-width:900px;"
>
<q-card
style=
"width: 800px;max-width:900px;"
>
<q-card-section>
<q-card-section>
<div
class=
"text-h6"
>
创建调课申请单
</div>
<div
class=
"text-h6"
>
创建调课申请单
</div>
</q-card-section>
</q-card-section>
<q-card-section
class=
"q-pt-none"
style=
"height: 70vh"
>
<q-card-section
class=
"q-pt-none"
style=
"height: 70vh"
>
<q-scroll-area
:thumb-style=
"thumbStyle"
:content-style=
"contentStyle"
<q-scroll-area
:thumb-style=
"thumbStyle"
:content-style=
"contentStyle"
:content-active-style=
"contentActiveStyle"
class=
"full-width full-height"
>
:content-active-style=
"contentActiveStyle"
class=
"full-width full-height"
>
<div
class=
"text-caption q-mb-lg q-px-md text-grey-6"
>
基本资料
</div>
<div
class=
"text-caption q-mb-lg q-px-md text-grey-6"
>
基本资料
</div>
<div
class=
"row q-col-gutter-lg"
>
<div
class=
"row q-col-gutter-lg"
>
<!--
<q-select
filled
stack-label
option-value=
"SId"
option-label=
"SName"
v-model=
"msg.classId"
ref=
"School_Id"
:options=
"schoolList"
label=
"所属校区"
:dense=
"false"
class=
"col-6"
emit-value
map-options
@
input=
"schoolChagne"
/>
-->
<!--
<q-select
filled
stack-label
option-value=
"SId"
option-label=
"SName"
v-model=
"msg.classId"
ref=
"School_Id"
:options=
"schoolList"
label=
"所属校区"
:dense=
"false"
class=
"col-6"
emit-value
map-options
@
input=
"schoolChagne"
/>
-->
<q-select
filled
stack-label
option-value=
"SId"
option-label=
"SName"
v-model=
"msg.SchoolId"
<q-select
filled
stack-label
option-value=
"SId"
option-label=
"SName"
v-model=
"msg.SchoolId"
ref=
"School_Id"
ref=
"School_Id"
:options=
"schoolList"
label=
"校区"
:dense=
"false"
class=
"col-6"
emit-value
:options=
"schoolList"
label=
"校区"
:dense=
"false"
class=
"col-6"
emit-value
map-options
map-options
@
input=
"changeSchool"
/>
@
input=
"changeSchool"
/>
<q-select
filled
stack-label
option-value=
"CourseId"
option-label=
"CourseName"
<q-select
filled
stack-label
option-value=
"CourseId"
option-label=
"CourseName"
v-model=
"msg.CouseId"
v-model=
"msg.CouseId"
ref=
"CouseId"
:options=
"courseList"
label=
"关联课程"
:dense=
"false"
ref=
"CouseId"
:options=
"courseList"
label=
"关联课程"
:dense=
"false"
class=
"col-6"
emit-value
map-options
class=
"col-6"
emit-value
map-options
@
input=
"changeCourse"
/>
@
input=
"changeCourse"
/>
<q-select
standout=
"bg-dark text-white"
option-value=
"ClassId"
option-label=
"ClassName"
<q-select
filled
stack-label
option-value=
"ClassId"
option-label=
"ClassName"
v-model=
"msg.ClassId"
v-model=
"msg.ClassId"
:options=
"classList"
@
input=
"changeClass"
emit-value
map-options
:options=
"classList"
@
input=
"changeClass"
emit-value
map-options
label=
"班级"
class=
"col-6"
>
label=
"班级"
class=
"col-6"
>
<template
v-slot:option=
"
{ itemProps, itemEvents, opt, selected, toggleOption }">
<template
v-slot:option=
"
{ itemProps, itemEvents, opt, selected, toggleOption }">
<q-item
v-bind=
"itemProps"
v-on=
"itemEvents"
>
<q-item
v-bind=
"itemProps"
v-on=
"itemEvents"
>
<q-item-section>
<q-item-section>
<q-item-label
v-html=
"opt.ClassName"
></q-item-label>
<q-item-label
v-html=
"opt.ClassName"
></q-item-label>
</q-item-section>
</q-item-section>
<q-item-section
side
>
<q-item-section
side
>
<q-item-label
v-html=
"opt.OpenTime"
></q-item-label>
<q-item-label
v-html=
"opt.OpenTime"
></q-item-label>
</q-item-section>
</q-item-section>
</q-item>
</q-item>
</
template
>
</
template
>
</q-select>
</q-select>
<q-select
filled
stack-label
option-value=
"Id"
option-label=
"Name"
v-model=
"msg.ChangeType"
<q-select
filled
stack-label
option-value=
"Id"
option-label=
"Name"
v-model=
"msg.ChangeType"
:options=
"changeType"
label=
"变更类型"
:dense=
"false"
class=
"col-6"
emit-value
map-options
:options=
"changeType"
label=
"变更类型"
:dense=
"false"
class=
"col-6"
emit-value
map-options
@
input=
"changeTypeResult"
/>
@
input=
"changeTypeResult"
/>
</div>
</div>
<div
class=
"row items-center"
>
<div
class=
"row items-center"
>
<div
class=
"text-caption q-my-lg q-px-md text-grey-6 col"
>
变更内容 注意:需要对变更的内容进行打钩
</div>
<div
class=
"text-caption q-my-lg q-px-md text-grey-6 col"
>
变更内容 注意:需要对变更的内容进行打钩
</div>
<div
class=
"row items-center"
>
<div
class=
"row items-center"
>
<div
class=
"text-grey-6"
>
变更范围:
</div>
<div
class=
"text-grey-6"
>
变更范围:
</div>
<q-radio
size=
"xs"
v-model=
"msg.MoveType"
val=
"1"
label=
"单个或多个"
/>
<q-radio
size=
"xs"
v-model=
"msg.SettingType"
val=
"1"
label=
"单个或多个"
/>
<q-radio
size=
"xs"
v-model=
"msg.MoveType"
val=
"2"
label=
"全局"
/>
<q-radio
size=
"xs"
v-model=
"msg.SettingType"
val=
"2"
label=
"全局"
/>
</div>
</div>
</div>
</div>
<div
v-if=
"msg.MoveType=='1'"
class=
"row items-center"
>
<div
v-if=
"msg.SettingType=='1'"
class=
"row items-center"
>
<div
class=
"col"
>
<div
class=
"col"
>
<q-table
no-data-label=
"暂无相关数据"
flat
style=
"max-height: 300px;"
:pagination=
"pages"
<q-table
no-data-label=
"暂无相关数据"
flat
style=
"max-height: 300px;"
:pagination=
"pages"
class=
"sticky-column-table sticky-header-column-table"
separator=
"none"
:data=
"currentClass"
class=
"sticky-column-table sticky-header-column-table"
separator=
"none"
:columns=
"msg.ChangeType==1?columns:columns2"
row-key=
"ClassPlanId"
selection=
"multiple"
:data=
"currentClass"
:columns=
"msg.ChangeType==1?columns:columns2"
:selected
.
sync=
"selected"
>
row-key=
"ClassPlanId"
selection=
"multiple"
:selected
.
sync=
"selected"
>
<
template
v-slot:body-cell-TimeList=
"props"
>
<
template
v-slot:body-cell-TimeList=
"props"
>
<q-td
auto-width
:props=
"props"
>
<q-td
auto-width
:props=
"props"
>
<div
v-for=
"(item,index) in props.row.TimeList"
class=
"lessForm_Class"
>
<div
v-for=
"(item,index) in props.row.TimeList"
class=
"lessForm_Class"
>
{{
index
+
1
}}
节课
{{
item
.
StartTime
}}
-
{{
item
.
EndTime
}}
{{
index
+
1
}}
节课
{{
item
.
StartTime
}}
-
{{
item
.
EndTime
}}
</div>
</div>
</q-td>
</q-td>
</
template
>
</
template
>
<
template
v-slot:body-cell-TargetClassDate=
"props"
>
<
template
v-slot:body-cell-TargetClassDate=
"props"
>
<q-td
auto-width
:props=
"props"
style=
"border-left:1xp solid #000;"
>
<q-td
auto-width
:props=
"props"
style=
"border-left:1xp solid #000;"
>
{{
props
.
row
.
NewPlan
.
ClassDate
}}
{{
props
.
row
.
NewPlan
.
ClassDate
}}
<q-popup-edit
v-model=
"props.row.NewPlan.ClassDate"
title=
"变更日期"
persistent
buttons
label-set=
"确认"
<q-popup-edit
v-model=
"props.row.NewPlan.ClassDate"
title=
"变更日期"
persistent
buttons
label-set=
"确认"
label-cancel=
"取消"
>
label-cancel=
"取消"
>
<el-date-picker
<el-date-picker
v-model=
"props.row.NewPlan.ClassDate"
type=
"date"
:picker-options=
"pickerOptions"
v-model=
"props.row.NewPlan.ClassDate"
:clearable=
"false"
value-format=
"yyyy-MM-dd"
placeholder=
"选择日期"
>
type=
"date"
</el-date-picker>
:picker-options=
"pickerOptions"
</q-popup-edit>
:clearable=
"false"
</q-td>
value-format=
"yyyy-MM-dd"
</
template
>
placeholder=
"选择日期"
>
<
template
v-slot:body-cell-TargetTimeList=
"props"
>
</el-date-picker>
<q-td
auto-width
:props=
"props"
>
</q-popup-edit>
<div
v-for=
"(item,index) in props.row.NewPlan.TimeList"
class=
"lessForm_Class"
>
</q-td>
{{
index
+
1
}}
节课
{{
item
.
StartTime
}}
-
{{
item
.
EndTime
}}
</
template
>
</div>
<
template
v-slot:body-cell-TargetTimeList=
"props"
>
<q-popup-edit
:validate=
"proteinRangeValidation"
persistent
v-model=
"props.row.NewPlan.TimeList"
<q-td
auto-width
:props=
"props"
>
title=
"变更时间"
buttons
label-set=
"确认"
label-cancel=
"取消"
>
<div
v-for=
"(item,index) in props.row.NewPlan.TimeList"
class=
"lessForm_Class"
>
<div
v-for=
"(item,index) in props.row.NewPlan.TimeList"
class=
"q-mb-md row items-center"
{{
index
+
1
}}
节课
{{
item
.
StartTime
}}
-
{{
item
.
EndTime
}}
style=
"width:430px"
>
</div>
<div
class=
"lessForm_Class col"
>
<q-popup-edit
:validate=
"proteinRangeValidation"
persistent
v-model=
"props.row.NewPlan.TimeList"
title=
"变更时间"
buttons
label-set=
"确认"
{{
index
+
1
}}
节课
label-cancel=
"取消"
>
</div>
<div
v-for=
"(item,index) in props.row.NewPlan.TimeList"
class=
"q-mb-md row items-center"
style=
"width:430px"
>
<div
class=
"row items-center"
>
<div
class=
"lessForm_Class col"
>
<el-time-select
placeholder=
"起始时间"
v-model=
"item.StartTime"
style=
"width:100px"
{{
index
+
1
}}
节课
:picker-options=
"pickers"
>
</div>
</el-time-select>
<div
class=
"row items-center"
>
<el-time-select
placeholder=
"结束时间"
v-model=
"item.EndTime"
<el-time-select
style=
"width:100px;margin-left:12px;"
:picker-options=
"
{
placeholder=
"起始时间"
v-model=
"item.StartTime"
style=
"width:100px"
:picker-options=
"pickers"
>
</el-time-select>
<el-time-select
placeholder=
"结束时间"
v-model=
"item.EndTime"
style=
"width:100px;margin-left:12px;"
:picker-options=
"
{
start: '09:00',
start: '09:00',
step: '00:15',
step: '00:15',
end: '22:30',
end: '22:30',
minTime: item.StartTime
minTime: item.StartTime
}">
}">
</el-time-select>
</el-time-select>
<q-input
filled
v-model=
"item.TimeHour"
size=
"xs"
mask=
"#.#"
fill-mask=
"0.0"
label=
"有效课时"
suffix=
"课时"
style=
"width:100px;margin-left:12px"
/>
<q-input
filled
v-model=
"item.TimeHour"
size=
"xs"
mask=
"#.#"
fill-mask=
"0.0"
label=
"有效课时"
<q-btn
v-if=
"props.row.NewPlan.TimeList.length>1"
round
color=
"negative"
class=
"q-ml-md"
size=
"xs"
icon=
"iconfont icon-guanbi1"
@
click=
"removeTime(props.row.NewPlan,index)"
></q-btn>
suffix=
"课时"
style=
"width:100px;margin-left:12px"
/>
</div>
<q-btn
v-if=
"props.row.NewPlan.TimeList.length>1"
round
color=
"negative"
class=
"q-ml-md"
</div>
size=
"xs"
icon=
"iconfont icon-guanbi1"
@
click=
"removeTime(props.row.NewPlan,index)"
></q-btn>
<q-btn
round
color=
"primary"
size=
"xs"
icon=
"iconfont icon-img_haha"
@
click=
"addTime(props.row.NewPlan)"
></q-btn>
</q-popup-edit>
</q-td>
</
template
>
<
template
v-slot:bottom
></
template
>
</q-table>
</div>
</div>
<div
v-if=
"msg.ChangeType==3"
>
<div
class=
"text-caption q-mb-lg q-px-md text-grey-6 col"
>
目标教室
</div>
<div
class=
"row"
>
<q-select
standout=
"bg-dark text-white"
option-value=
"RoomId"
option-label=
"RoomName"
v-model=
"msg.TargetRoom"
:options=
"roomList"
emit-value
map-options
label=
"教室"
class=
"col-6"
>
<
template
v-slot:option=
"{ itemProps, itemEvents, opt, selected, toggleOption }"
>
<q-item
v-bind=
"itemProps"
v-on=
"itemEvents"
>
<q-item-section>
<q-item-label
v-html=
"opt.RoomName"
></q-item-label>
</q-item-section>
<q-item-section
side
>
<q-item-label
v-html=
"opt.SchoolName"
></q-item-label>
</q-item-section>
</q-item>
</
template
>
</q-select>
</div>
</div>
</div>
</div>
<div
v-if=
"msg.ChangeType==2"
>
<q-btn
round
color=
"primary"
size=
"xs"
icon=
"iconfont icon-img_haha"
<div
class=
"text-caption q-mb-lg q-px-md text-grey-6 col"
>
目标老师
</div>
@
click=
"addTime(props.row.NewPlan)"
></q-btn>
<div
class=
"row"
>
</q-popup-edit>
<q-select
standout=
"bg-dark text-white"
option-value=
"TId"
option-label=
"TeacherName"
</q-td>
v-model=
"msg.TargetTeacherId"
:options=
"TeacherList"
emit-value
map-options
</
template
>
label=
"老师"
class=
"col-6"
>
<
template
v-slot:bottom
></
template
>
</q-select>
</q-table>
</div>
</div>
</div>
</q-scroll-area>
</q-card-section>
<q-separator
/>
</div>
<q-card-actions
align=
"right"
class=
"bg-white"
>
<div
v-if=
"msg.ChangeType==1&&msg.MoveType==2"
>
<q-btn
label=
"取消"
flat
color=
"grey-10"
style=
"font-weight:400 !important"
@
click=
"closeSaveForm"
/>
<div
class=
"row"
>
<q-btn
label=
"立即提交"
color=
"accent q-px-md"
style=
"font-weight:400 !important"
:loading=
"saveLoading"
<q-input
filled
v-model=
"msg.AllChangePlanItem.OpenTimeStr"
class=
"col-6 q-pr-lg q-pb-lg"
mask=
"date"
label=
"开班时间"
>
@
click=
"save"
/>
<
template
v-slot:append
>
</q-card-actions>
<q-icon
name=
"event"
class=
"cursor-pointer"
>
</q-card>
<q-popup-proxy
ref=
"qDateProxy1"
transition-show=
"scale"
transition-hide=
"scale"
>
</q-dialog>
<q-date
v-model=
"msg.AllChangePlanItem.OpenTimeStr"
@
input=
"() => $refs.qDateProxy1.hide()"
/>
</q-popup-proxy>
</q-icon>
</
template
>
</q-input>
<q-select
filled
stack-label
option-value=
"Id"
option-label=
"Name"
v-model=
"msg.AllChangePlanItem.ClassStyle"
ref=
"ClassStyle"
:options=
"classSetList"
label=
"排课安排"
:dense=
"false"
class=
"col-6 q-pr-lg q-pb-lg"
emit-value
map-options
@
input=
"changeClassStyle(msg.AllChangePlanItem.ClassStyle)"
/>
</div>
<div
class=
"row wrap"
v-if=
"msg.AllChangePlanItem.ClassStyle==1"
>
<div
class=
"col-6"
>
<q-select
filled
stack-label
multiple
option-value=
"value"
option-label=
"label"
v-model=
"checkedDays"
ref=
"ClassStyle"
:options=
"weekList"
label=
"选择周几"
:dense=
"false"
class=
"col-6 q-pr-lg"
emit-value
map-options
>
<
template
v-slot:option=
"{ itemProps, itemEvents, opt, selected, toggleOption }"
>
<q-item
v-bind=
"itemProps"
v-on=
"itemEvents"
>
<q-item-section
avatar
>
<span
v-if=
"opt.icon==1"
class=
"common_Style classForm_monday"
>
月
</span>
<span
v-if=
"opt.icon==2"
class=
"common_Style classForm_tuesday"
>
火
</span>
<span
v-if=
"opt.icon==3"
class=
"common_Style classForm_wednesday"
>
水
</span>
<span
v-if=
"opt.icon==4"
class=
"common_Style classForm_thursday"
>
木
</span>
<span
v-if=
"opt.icon==5"
class=
"common_Style classForm_friday"
>
金
</span>
<span
v-if=
"opt.icon==6"
class=
"common_Style classForm_saturday"
>
土
</span>
<span
v-if=
"opt.icon==7"
class=
"common_Style classForm_sunday"
>
日
</span>
</q-item-section>
<q-item-section>
<q-item-label
v-html=
"opt.label"
/>
</q-item-section>
<q-item-section
side
>
<i
style=
"color:#2961FE"
v-if=
"selected"
class=
"iconfont icon-chenggong"
></i>
</q-item-section>
</q-item>
</
template
>
</q-select>
</div>
</div>
<div
class=
"row wrap"
v-if=
"msg.AllChangePlanItem.ClassStyle==2"
>
<q-select
filled
stack-label
multiple
option-value=
"value"
option-label=
"label"
v-model=
"checkedDays"
ref=
"ClassStyle"
:options=
"dayList"
label=
"选择日期"
:dense=
"false"
class=
"col-6 q-pr-lg q-pr-lg"
emit-value
map-options
>
</q-select>
</div>
<div
class=
"row wrap"
v-if=
"msg.AllChangePlanItem.ClassStyle==3"
>
<div
class=
"col-12"
>
<q-date
v-model=
"checkedDays"
minimal
multiple
style=
"width:100%"
/>
</div>
</div>
<div
class=
"row wrap"
style=
"margin:20px 0;"
>
<div
class=
"col-6"
>
学习时段
<q-btn
style=
"margin-left:30px;"
size=
"10px"
@
click=
"addPlan()"
round
color=
"primary"
icon=
"iconfont icon-img_haha"
/>
</div>
</div>
<
template
v-if=
"DefaultPlanTimeList&&DefaultPlanTimeList.length>0"
>
<table
style=
"width:100%;border-collapse: collapse;"
class=
"planTimeLi"
>
<thead>
<tr>
<th>
日期/周
</th>
<th
colspan=
"2"
>
时间
</th>
<th>
消耗课时
</th>
<th>
操作
</th>
</tr>
</thead>
<tbody
v-for=
"(nItem,nIndex) in DefaultPlanTimeList"
:key=
"nIndex+10000"
>
<tr
v-for=
"(sItem,sIndex) in nItem.TimeList"
>
<td
:rowspan=
"nItem.TimeList.length"
v-if=
"sIndex==0"
style=
"position:relative;"
>
<q-select
filled
style=
"width:220px;"
stack-label
multiple
v-model=
"nItem.DateList"
ref=
"DateList"
:options=
"checkedDays"
:label=
"msg.AllChangePlanItem.ClassStyle==1?'选择周几':'选择日期'"
:dense=
"false"
class=
"col-6"
emit-value
map-options
clearable
>
</q-select>
<a
@
click=
"deletePlan(nIndex)"
style=
"color:blue;cursor:pointer;position:absolute;"
>
删除
</a>
</td>
<td>
<q-input
filled
v-model=
"sItem.StartTime"
class=
"col-6 q-pl-lg"
placeholder=
"开始时间"
mask=
"time"
>
<template
v-slot:append
>
<q-icon
name=
"access_time"
class=
"cursor-pointer"
>
<q-popup-proxy
transition-show=
"scale"
transition-hide=
"scale"
>
<q-time
v-model=
"sItem.StartTime"
>
<div
class=
"row items-center justify-end"
>
<q-btn
v-close-popup
label=
"确定"
color=
"primary"
flat
/>
</div>
</q-time>
</q-popup-proxy>
</q-icon>
</
template
>
</q-input>
</td>
<td>
<q-input
filled
v-model=
"sItem.EndTime"
class=
"col-6 q-pr-lg"
placeholder=
"结束时间"
mask=
"time"
>
<
template
v-slot:append
>
<q-icon
name=
"access_time"
class=
"cursor-pointer"
>
<q-popup-proxy
transition-show=
"scale"
transition-hide=
"scale"
>
<q-time
v-model=
"sItem.EndTime"
>
<div
class=
"row items-center justify-end"
>
<q-btn
v-close-popup
label=
"确定"
color=
"primary"
flat
/>
</div>
</q-time>
</q-popup-proxy>
</q-icon>
</
template
>
</q-input>
</td>
<td>
<q-input
filled
stack-label
maxlength=
"20"
v-model=
"sItem.TimeHour"
@
keyup
.
native=
"checkPrice(sItem,'TimeHour')"
:dense=
"false"
class=
"col-6 q-pr-lg"
label=
"消耗课时"
/>
</td>
<td>
<q-btn
size=
"10px"
v-if=
"sIndex==0"
@
click=
"addPlanTime(nItem)"
round
color=
"primary"
icon=
"iconfont icon-img_haha"
/>
<q-btn
v-if=
"sIndex>0"
size=
"10px"
@
click=
"deletePlanTime(nItem,sIndex)"
round
color=
"red"
icon=
"iconfont icon-guanbi1"
/>
</td>
</tr>
</tbody>
</table>
</template>
<div
class=
"row wrap"
style=
"margin-top:30px;"
>
<div
class=
"col-6"
>
<q-input
filled
stack-label
maxlength=
"6"
v-model=
"msg.AllChangePlanItem.ClassHours"
:dense=
"false"
class=
"col-6 q-pr-lg q-pb-lg"
label=
"学习课时"
@
keyup
.
native=
"checkInteger(msg.AllChangePlanItem,'ClassHours')"
/>
</div>
<div
class=
"col-6"
>
<q-select
label=
"课时分钟数"
filled
stack-label
v-model=
"msg.AllChangePlanItem.ClassHourMinute"
:options=
"ClassHourMinuteArray"
option-value=
"Id"
option-label=
"Name"
:dense=
"false"
class=
"col-6 q-pr-lg q-pb-lg"
emit-value
map-options
>
</q-select>
</div>
</div>
</div>
<div
v-if=
"msg.ChangeType==3"
>
<div
class=
"text-caption q-mb-lg q-px-md text-grey-6 col"
>
目标教室
</div>
<div
class=
"row"
>
<q-select
filled
option-value=
"RoomId"
option-label=
"RoomName"
v-model=
"msg.ClassRoomId"
:options=
"roomList"
emit-value
map-options
label=
"教室"
class=
"col-6"
>
<
template
v-slot:option=
"{ itemProps, itemEvents, opt, selected, toggleOption }"
>
<q-item
v-bind=
"itemProps"
v-on=
"itemEvents"
>
<q-item-section>
<q-item-label
v-html=
"opt.RoomName"
></q-item-label>
</q-item-section>
<q-item-section
side
>
<q-item-label
v-html=
"opt.SchoolName"
></q-item-label>
</q-item-section>
</q-item>
</
template
>
</q-select>
</div>
</div>
<div
v-if=
"msg.ChangeType==2"
>
<div
class=
"text-caption q-mb-lg q-px-md text-grey-6 col"
>
目标老师
</div>
<div
class=
"row"
>
<q-select
filled
option-value=
"TId"
option-label=
"TeacherName"
v-model=
"msg.TeacherId"
:options=
"TeacherList"
emit-value
map-options
label=
"老师"
class=
"col-6"
>
</q-select>
</div>
</div>
</q-scroll-area>
</q-card-section>
<q-separator
/>
<q-card-actions
align=
"right"
class=
"bg-white"
>
<q-btn
label=
"取消"
flat
color=
"grey-10"
style=
"font-weight:400 !important"
@
click=
"closeSaveForm"
/>
<q-btn
label=
"立即提交"
color=
"accent q-px-md"
style=
"font-weight:400 !important"
:loading=
"saveLoading"
@
click=
"save"
/>
</q-card-actions>
</q-card>
</q-dialog>
</template>
</template>
<
script
>
<
script
>
import
{
import
{
getClassDropDownList
,
getClassDropDownList
,
getSchoolDropdown
,
getSchoolDropdown
,
queryClassRoomPage
,
queryClassRoomPage
,
getTeacherDropDownList
getTeacherDropDownList
,
}
from
"../../api/school/index"
;
SetChangeClassPlan
import
{
}
from
"../../api/school/index"
;
queryCourseDropdownList
,
import
{
}
from
'../../api/course/index'
queryCourseDropdownList
,
import
Lockr
from
'lockr'
}
from
'../../api/course/index'
export
default
{
import
Lockr
from
'lockr'
data
()
{
export
default
{
return
{
data
()
{
TeacherList
:[],
return
{
pickerOptions
:
{
TeacherList
:
[],
disabledDate
(
time
)
{
pickerOptions
:
{
return
time
.
getTime
()
<
Date
.
now
();
disabledDate
(
time
)
{
}
return
time
.
getTime
()
<
Date
.
now
();
},
}
pages
:{
},
rowsPerPage
:
100000
pages
:
{
},
rowsPerPage
:
100000
persistent
:
true
,
},
saveLoading
:
false
,
persistent
:
true
,
contentStyle
:
{},
saveLoading
:
false
,
contentActiveStyle
:
{},
contentStyle
:
{},
pickers
:
{
contentActiveStyle
:
{},
start
:
'09:00'
,
pickers
:
{
step
:
'00:15'
,
start
:
'09:00'
,
end
:
'22:30'
step
:
'00:15'
,
},
end
:
'22:30'
},
thumbStyle
:
{
right
:
'2px'
,
borderRadius
:
'5px'
,
backgroundColor
:
'#027be3'
,
width
:
'5px'
,
opacity
:
0.75
},
msg
:
{
Id
:
0
,
ClassId
:
0
,
SchoolId
:
-
1
,
CouseId
:
0
,
ChangeType
:
1
,
MoveType
:
"1"
,
ClassRoomId
:
0
,
TeacherId
:
0
,
OldChangePlanItemList
:
[],
NewChangePlanItemList
:
[],
AllChangePlanItem
:{
OpenTimeStr
:
''
,
//开班时间
ClassStyle
:
1
,
//排课方式(1-周,2-月,3-固定日期,4-约课)
ClassHours
:
0
,
//
ClassHourMinute
:
0
,
WeekDayList
:[],
//周几
TeacherId
:
0
,
ClassRoomId
:
0
,
DefaultTimeList
:[]
}
},
selected
:
[],
classList
:
[],
schoolList
:
[],
courseList
:
[],
queryClass
:
{
CourseId
:
0
,
IsAddDefault
:
1
,
SchoolId
:
-
1
,
Teacher_Id
:
0
,
MoreStatus
:
"1,2"
,
IsQuerySurplusPlan
:
1
},
currentClass
:
[],
columns2
:
[{
name
:
'RoomName'
,
label
:
'教室名称'
,
field
:
'RoomName'
,
align
:
'left'
,
},
{
name
:
'ClassDate'
,
label
:
'上课日期'
,
field
:
'ClassDate'
,
align
:
'left'
},
{
name
:
'TeacherName'
,
label
:
'老师'
,
field
:
'TeacherName'
,
align
:
'left'
},
{
name
:
'TimeList'
,
label
:
'上课时间'
,
field
:
'TimeList'
,
align
:
'left'
}
],
columns
:
[{
name
:
'RoomName'
,
label
:
'教室名称'
,
field
:
'RoomName'
,
align
:
'left'
,
},
{
name
:
'ClassDate'
,
label
:
'上课日期'
,
field
:
'ClassDate'
,
align
:
'left'
},
{
name
:
'TeacherName'
,
label
:
'老师'
,
field
:
'TeacherName'
,
align
:
'left'
},
{
name
:
'TimeList'
,
label
:
'上课时间'
,
field
:
'TimeList'
,
align
:
'left'
},
{
name
:
'TargetClassDate'
,
label
:
'目标日期'
,
field
:
'TargetClassDate'
,
align
:
'left'
},
{
name
:
'TargetTimeList'
,
label
:
'目标时间'
,
field
:
'TargetTimeList'
,
align
:
'left'
}
],
changeType
:
[{
Id
:
1
,
Name
:
"课程时间"
},
{
Id
:
2
,
Name
:
"老师"
},
{
Id
:
3
,
Name
:
"教室"
},
{
Id
:
4
,
Name
:
"取消上课"
}
],
classSetList
:
[{
Name
:
'按周排课'
,
Id
:
1
},
{
Name
:
'按月排课'
,
Id
:
2
},
{
Name
:
'固定日期'
,
Id
:
3
},
{
Name
:
'约课'
,
Id
:
4
}],
roomList
:
[],
//选中日期/星期
checkedDays
:
[],
//周几
weekList
:
[{
label
:
'周一'
,
value
:
'1'
,
icon
:
1
},
{
label
:
'周二'
,
value
:
'2'
,
icon
:
2
},
{
label
:
'周三'
,
value
:
'3'
,
icon
:
3
},
{
label
:
'周四'
,
value
:
'4'
,
icon
:
4
},
{
label
:
'周五'
,
value
:
'5'
,
icon
:
5
},
{
label
:
'周六'
,
value
:
'6'
,
icon
:
6
},
{
label
:
'周日'
,
value
:
'7'
,
icon
:
7
}],
dayList
:
[],
//日期数组1-31
//默认上课时间数组
DefaultPlanTimeList
:
[],
ClassHourMinuteArray
:
[{
Id
:
45
,
Name
:
45
},
{
Id
:
60
,
Name
:
60
},
],
thumbStyle
:
{
classSetMsg
:
{
right
:
'2px'
,
OpenTime
:
''
,
//开班时间
borderRadius
:
'5px'
,
ClassStyle
:
1
,
//排课方式(1-周,2-月,3-固定日期,4-约课)
backgroundColor
:
'#027be3'
,
ClassHours
:
''
,
width
:
'5px'
,
ClassHourMinute
:
''
,
opacity
:
0.75
}
},
}
msg
:
{
},
ClassId
:
0
,
mounted
()
{
SchoolId
:
-
1
,
let
u
=
Lockr
.
get
(
"loginUserInfo"
)
CouseId
:
0
,
if
(
u
)
{
ChangeType
:
1
,
this
.
queryClass
.
Teacher_Id
=
u
.
AccountId
SettingType
:
"1"
,
}
TargetRoom
:
0
,
this
.
getClass
()
TargetTeacherId
:
0
this
.
getSchool
()
},
this
.
getCourseList
()
selected
:
[],
this
.
getClassRoomPage
()
classList
:
[],
this
.
GetTeacherList
()
schoolList
:
[],
this
.
initDayList
();
courseList
:
[],
},
queryClass
:
{
methods
:
{
CourseId
:
0
,
GetTeacherList
()
{
IsAddDefault
:
1
,
getTeacherDropDownList
({}).
then
(
res
=>
{
SchoolId
:
-
1
,
if
(
res
.
Code
==
1
)
{
Teacher_Id
:
0
,
this
.
TeacherList
=
res
.
Data
;
MoreStatus
:
"1,2"
,
var
obj
=
{
IsQuerySurplusPlan
:
1
TeacherName
:
'请选择'
,
},
TId
:
0
currentClass
:
[],
}
columns2
:
[{
this
.
TeacherList
.
unshift
(
obj
);
name
:
'RoomName'
,
}
label
:
'教室名称'
,
})
field
:
'RoomName'
,
},
align
:
'left'
,
getClassRoomPage
()
{
},
{
queryClassRoomPage
({
name
:
'ClassDate'
,
pageIndex
:
1
,
label
:
'上课日期'
,
pageSize
:
10000
,
field
:
'ClassDate'
,
RoomName
:
""
,
align
:
'left'
School_Id
:
0
,
//校区编号
},
Status
:
'-1'
,
//状态
{
}).
then
(
res
=>
{
name
:
'TeacherName'
,
this
.
roomList
=
res
.
Data
.
PageData
;
label
:
'老师'
,
var
obj
=
{
field
:
'TeacherName'
,
RoomName
:
'请选择'
,
align
:
'left'
RoomId
:
0
,
},
SchoolName
:
""
{
}
name
:
'TimeList'
,
this
.
roomList
.
push
(
obj
)
label
:
'上课时间'
,
})
field
:
'TimeList'
,
},
align
:
'left'
closeSaveForm
()
{
}
this
.
$emit
(
'close'
)
],
this
.
persistent
=
false
columns
:
[{
},
name
:
'RoomName'
,
//保存修改
label
:
'教室名称'
,
save
()
{
field
:
'RoomName'
,
//变更类型课程时间 变更范围单个或多个
align
:
'left'
,
if
(
this
.
msg
.
ChangeType
==
1
&&
this
.
msg
.
MoveType
==
1
)
{
},
{
if
(
this
.
selected
.
length
>
0
)
{
name
:
'ClassDate'
,
this
.
msg
.
OldChangePlanItemList
=
[];
label
:
'上课日期'
,
this
.
msg
.
NewChangePlanItemList
=
[];
field
:
'ClassDate'
,
let
obj
=
{
align
:
'left'
ClassPlanId
:
0
,
},
ClassDate
:
''
,
{
TeacherId
:
0
,
name
:
'TeacherName'
,
ClassRoomId
:
0
,
label
:
'老师'
,
PlanTimeList
:
[]
field
:
'TeacherName'
,
}
align
:
'left'
let
newObj
=
{
},
ClassPlanId
:
0
,
{
ClassDate
:
''
,
name
:
'TimeList'
,
TeacherId
:
0
,
label
:
'上课时间'
,
ClassRoomId
:
0
,
field
:
'TimeList'
,
PlanTimeList
:
[]
align
:
'left'
}
},
this
.
selected
.
forEach
(
x
=>
{
{
obj
.
ClassPlanId
=
x
.
ClassPlanId
;
name
:
'TargetClassDate'
,
obj
.
ClassDate
=
x
.
ClassDate
;
label
:
'目标日期'
,
obj
.
TeacherId
=
x
.
TeacherId
;
field
:
'TargetClassDate'
,
obj
.
ClassRoomId
=
x
.
ClassRoomId
;
align
:
'left'
x
.
TimeList
.
forEach
(
y
=>
{
},
let
obj2
=
{
{
ClassTimeId
:
0
,
name
:
'TargetTimeList'
,
StartTime
:
''
,
label
:
'目标时间'
,
EndTime
:
''
field
:
'TargetTimeList'
,
}
align
:
'left'
obj2
.
StartTime
=
y
.
StartTime
;
}
obj2
.
EndTime
=
y
.
EndTime
;
],
obj2
.
ClassTimeId
=
y
.
ClassTimeId
;
changeType
:
[{
obj
.
PlanTimeList
.
push
(
obj2
);
Id
:
1
,
})
Name
:
"课程时间"
this
.
msg
.
OldChangePlanItemList
.
push
(
obj
);
},
{
newObj
.
ClassPlanId
=
x
.
NewPlan
.
ClassPlanId
;
Id
:
2
,
newObj
.
ClassDate
=
x
.
NewPlan
.
ClassDate
;
Name
:
"老师"
newObj
.
TeacherId
=
x
.
NewPlan
.
TeacherId
;
},
newObj
.
ClassRoomId
=
x
.
NewPlan
.
ClassRoomId
;
{
x
.
NewPlan
.
TimeList
.
forEach
(
z
=>
{
Id
:
3
,
let
obj
=
{
Name
:
"教室"
ClassTimeId
:
0
,
},
StartTime
:
''
,
{
EndTime
:
''
Id
:
4
,
}
Name
:
"取消上课"
obj
.
StartTime
=
z
.
StartTime
;
}
obj
.
EndTime
=
z
.
EndTime
;
],
obj
.
ClassTimeId
=
z
.
ClassTimeId
;
roomList
:[]
newObj
.
PlanTimeList
.
push
(
obj
);
}
})
},
this
.
msg
.
NewChangePlanItemList
.
push
(
newObj
);
mounted
()
{
})
let
u
=
Lockr
.
get
(
"loginUserInfo"
)
this
.
msg
.
AllChangePlanItem
=
{};
if
(
u
)
{
}
else
{
this
.
queryClass
.
Teacher_Id
=
u
.
AccountId
this
.
$q
.
notify
({
}
type
:
'negative'
,
this
.
getClass
()
position
:
"top"
,
this
.
getSchool
()
message
:
`请选择变更数据`
this
.
getCourseList
()
})
this
.
getClassRoomPage
()
return
;
this
.
GetTeacherList
()
}
},
}
methods
:
{
//变更类型课程时间 变更范围 全局
GetTeacherList
()
{
if
(
this
.
msg
.
ChangeType
==
1
&&
this
.
msg
.
MoveType
==
2
)
{
getTeacherDropDownList
({}).
then
(
res
=>
{
this
.
msg
.
AllChangePlanItem
.
WeekDayList
=
this
.
checkedDays
;
if
(
res
.
Code
==
1
)
{
this
.
msg
.
AllChangePlanItem
.
DefaultTimeList
=
this
.
DefaultPlanTimeList
;
this
.
TeacherList
=
res
.
Data
;
}
var
obj
=
{
//变更类型老师 变更范围单个或多个
TeacherName
:
'请选择'
,
if
(
this
.
msg
.
ChangeType
==
2
&&
this
.
msg
.
MoveType
==
1
)
{
TId
:
0
if
(
this
.
selected
.
length
>
0
)
{
}
if
(
this
.
msg
.
TeacherId
==
0
)
{
this
.
TeacherList
.
unshift
(
obj
);
this
.
$q
.
notify
({
}
type
:
'negative'
,
})
position
:
"top"
,
},
message
:
`请选择目标老师`
getClassRoomPage
()
{
})
queryClassRoomPage
({
return
;
pageIndex
:
1
,
}
pageSize
:
10000
,
this
.
msg
.
OldChangePlanItemList
=
[];
RoomName
:
""
,
this
.
msg
.
NewChangePlanItemList
=
[];
School_Id
:
0
,
//校区编号
let
obj
=
{
Status
:
'-1'
,
//状态
ClassPlanId
:
0
,
}).
then
(
res
=>
{
ClassDate
:
''
,
this
.
roomList
=
res
.
Data
.
PageData
;
TeacherId
:
0
,
var
obj
=
{
ClassRoomId
:
0
,
RoomName
:
'请选择'
,
PlanTimeList
:
[]
RoomId
:
0
,
}
SchoolName
:
""
let
newObj
=
{
}
ClassPlanId
:
0
,
this
.
roomList
.
push
(
obj
)
ClassDate
:
''
,
})
TeacherId
:
0
,
},
ClassRoomId
:
0
,
closeSaveForm
()
{
PlanTimeList
:
[]
this
.
$emit
(
'close'
)
}
this
.
persistent
=
false
this
.
selected
.
forEach
(
x
=>
{
},
obj
.
ClassPlanId
=
x
.
ClassPlanId
;
save
()
{
obj
.
ClassDate
=
x
.
ClassDate
;
obj
.
TeacherId
=
x
.
TeacherId
;
obj
.
ClassRoomId
=
x
.
ClassRoomId
;
x
.
TimeList
.
forEach
(
y
=>
{
let
obj2
=
{
ClassTimeId
:
0
,
StartTime
:
''
,
EndTime
:
''
}
obj2
.
StartTime
=
y
.
StartTime
;
obj2
.
EndTime
=
y
.
EndTime
;
obj2
.
ClassTimeId
=
y
.
ClassTimeId
;
obj
.
PlanTimeList
.
push
(
obj2
);
})
this
.
msg
.
OldChangePlanItemList
.
push
(
obj
);
},
newObj
.
ClassPlanId
=
x
.
NewPlan
.
ClassPlanId
;
proteinRangeValidation
(
val
){
newObj
.
ClassDate
=
x
.
NewPlan
.
ClassDate
;
let
newList
=
[]
newObj
.
TeacherId
=
this
.
msg
.
TeacherId
;
let
errorMsg
=
""
newObj
.
ClassRoomId
=
x
.
NewPlan
.
ClassRoomId
;
val
.
forEach
(
x
=>
{
x
.
NewPlan
.
TimeList
.
forEach
(
z
=>
{
if
(
x
.
StartTime
&&
x
.
EndTime
&&
x
.
TimeHour
&&
x
.
StartTime
!=
""
&&
x
.
EndTime
!=
""
&&
x
.
TimeHour
!=
"0.0"
){
let
obj
=
{
newList
.
push
({
ClassTimeId
:
0
,
StartTime
:
x
.
StartTime
,
StartTime
:
''
,
EndTime
:
x
.
EndTime
,
EndTime
:
''
TimeHour
:
x
.
TimeHour
});
}
else
{
errorMsg
=
"存在不完善的数据,请完善数据信息"
}
})
if
(
errorMsg
!=
""
){
this
.
$q
.
notify
({
icon
:
'iconfont icon-guanbi1'
,
color
:
'negative'
,
timeout
:
2000
,
message
:
errorMsg
,
position
:
'top'
})
}
}
console
.
log
(
val
)
obj
.
StartTime
=
z
.
StartTime
;
return
errorMsg
==
""
obj
.
EndTime
=
z
.
EndTime
;
},
obj
.
ClassTimeId
=
z
.
ClassTimeId
;
removeTime
(
plan
,
i
){
newObj
.
PlanTimeList
.
push
(
obj
);
plan
.
TimeList
.
splice
(
i
,
1
)
})
},
this
.
msg
.
NewChangePlanItemList
.
push
(
newObj
);
addTime
(
plan
){
})
let
obj
=
{
this
.
msg
.
AllChangePlanItem
=
{};
EndTime
:
""
,
}
else
{
StartTime
:
""
,
this
.
$q
.
notify
({
TimeHour
:
0
type
:
'negative'
,
position
:
"top"
,
message
:
`请选择变更数据`
})
return
;
}
}
//变更类型老师 变更范围 单全局
if
(
this
.
msg
.
ChangeType
==
2
&&
this
.
msg
.
MoveType
==
2
)
{
this
.
msg
.
AllChangePlanItem
.
TeacherId
=
this
.
msg
.
TeacherId
;
}
//变更类型教室 变更范围单个或多个
if
(
this
.
msg
.
ChangeType
==
3
&&
this
.
msg
.
MoveType
==
1
)
{
if
(
this
.
selected
.
length
>
0
)
{
if
(
this
.
msg
.
ClassRoomId
==
0
)
{
this
.
$q
.
notify
({
type
:
'negative'
,
position
:
"top"
,
message
:
`请选择目标教室`
})
return
;
}
this
.
msg
.
OldChangePlanItemList
=
[];
this
.
msg
.
NewChangePlanItemList
=
[];
let
obj
=
{
ClassPlanId
:
0
,
ClassDate
:
''
,
TeacherId
:
0
,
ClassRoomId
:
0
,
PlanTimeList
:
[]
}
let
newObj
=
{
ClassPlanId
:
0
,
ClassDate
:
''
,
TeacherId
:
0
,
ClassRoomId
:
0
,
PlanTimeList
:
[]
}
this
.
selected
.
forEach
(
x
=>
{
obj
.
ClassPlanId
=
x
.
ClassPlanId
;
obj
.
ClassDate
=
x
.
ClassDate
;
obj
.
TeacherId
=
x
.
TeacherId
;
obj
.
ClassRoomId
=
x
.
ClassRoomId
;
x
.
TimeList
.
forEach
(
y
=>
{
let
obj2
=
{
ClassTimeId
:
0
,
StartTime
:
''
,
EndTime
:
''
}
}
plan
.
TimeList
.
push
(
plan
)
obj2
.
StartTime
=
y
.
StartTime
;
},
obj2
.
EndTime
=
y
.
EndTime
;
changeClass
(
val
)
{
obj2
.
ClassTimeId
=
y
.
ClassTimeId
;
this
.
currentClass
=
this
.
classList
.
find
(
x
=>
{
obj
.
PlanTimeList
.
push
(
obj2
);
return
x
.
ClassId
==
val
})
}).
PlanList
this
.
msg
.
OldChangePlanItemList
.
push
(
obj
);
console
.
log
(
this
.
currentClass
)
},
newObj
.
ClassPlanId
=
x
.
NewPlan
.
ClassPlanId
;
changeTypeResult
(
val
)
{},
newObj
.
ClassDate
=
x
.
NewPlan
.
ClassDate
;
changeSchool
(
val
)
{
newObj
.
TeacherId
=
x
.
NewPlan
.
TeacherId
;
this
.
queryClass
.
SchoolId
=
val
newObj
.
ClassRoomId
=
this
.
msg
.
ClassRoomId
;
this
.
getClass
()
x
.
NewPlan
.
TimeList
.
forEach
(
z
=>
{
},
let
obj
=
{
changeCourse
(
val
)
{
ClassTimeId
:
0
,
this
.
queryClass
.
CourseId
=
val
StartTime
:
''
,
this
.
getClass
()
EndTime
:
''
},
}
getClass
()
{
obj
.
StartTime
=
z
.
StartTime
;
getClassDropDownList
(
this
.
queryClass
).
then
(
res
=>
{
obj
.
EndTime
=
z
.
EndTime
;
this
.
classList
=
[];
obj
.
ClassTimeId
=
z
.
ClassTimeId
;
this
.
msg
.
classId
=
0
newObj
.
PlanTimeList
.
push
(
obj
);
if
(
res
.
Code
==
1
)
{
})
res
.
Data
.
forEach
(
x
=>
{
this
.
msg
.
NewChangePlanItemList
.
push
(
newObj
);
x
.
PlanList
.
forEach
(
y
=>
{
})
let
newPlan
=
JSON
.
parse
(
JSON
.
stringify
(
y
))
this
.
msg
.
AllChangePlanItem
=
{};
y
.
NewPlan
=
newPlan
}
else
{
})
this
.
$q
.
notify
({
type
:
'negative'
,
position
:
"top"
,
message
:
`请选择变更数据`
})
return
;
}
}
//变更类型教室 变更范围全局
if
(
this
.
msg
.
ChangeType
==
3
&&
this
.
msg
.
MoveType
==
2
)
{
this
.
msg
.
AllChangePlanItem
.
ClassRoomId
=
this
.
msg
.
ClassRoomId
;
}
//变更类型 取消上课 变更范围单个或多个
if
(
this
.
msg
.
ChangeType
==
4
&&
this
.
msg
.
MoveType
==
1
)
{
if
(
this
.
selected
.
length
>
0
)
{
this
.
msg
.
OldChangePlanItemList
=
[];
this
.
msg
.
NewChangePlanItemList
=
[];
let
obj
=
{
ClassPlanId
:
0
,
ClassDate
:
''
,
TeacherId
:
0
,
ClassRoomId
:
0
,
PlanTimeList
:
[]
}
this
.
selected
.
forEach
(
x
=>
{
obj
.
ClassPlanId
=
x
.
ClassPlanId
;
obj
.
ClassDate
=
x
.
ClassDate
;
obj
.
TeacherId
=
x
.
TeacherId
;
obj
.
ClassRoomId
=
x
.
ClassRoomId
;
x
.
TimeList
.
forEach
(
y
=>
{
let
obj2
=
{
ClassTimeId
:
0
,
StartTime
:
''
,
EndTime
:
''
}
obj2
.
StartTime
=
y
.
StartTime
;
obj2
.
EndTime
=
y
.
EndTime
;
obj2
.
ClassTimeId
=
y
.
ClassTimeId
;
obj
.
PlanTimeList
.
push
(
obj2
);
})
this
.
msg
.
OldChangePlanItemList
.
push
(
obj
);
})
this
.
msg
.
AllChangePlanItem
=
{};
}
else
{
this
.
$q
.
notify
({
type
:
'negative'
,
position
:
"top"
,
message
:
`请选择变更数据`
})
return
;
}
}
//变更类型 取消上课 变更范围 全局
if
(
this
.
msg
.
ChangeType
==
4
&&
this
.
msg
.
MoveType
==
2
){
this
.
msg
.
OldChangePlanItemList
=
[];
this
.
msg
.
NewChangePlanItemList
=
[];
this
.
msg
.
AllChangePlanItem
=
{}
}
SetChangeClassPlan
(
this
.
msg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
closeSaveForm
();
this
.
$emit
(
"success"
)
this
.
$q
.
notify
({
icon
:
"iconfont icon-chenggong"
,
color
:
"accent"
,
timeout
:
2000
,
message
:
res
.
Message
,
position
:
"top"
});
}
})
},
proteinRangeValidation
(
val
)
{
let
newList
=
[]
let
errorMsg
=
""
val
.
forEach
(
x
=>
{
if
(
x
.
StartTime
&&
x
.
EndTime
&&
x
.
TimeHour
&&
x
.
StartTime
!=
""
&&
x
.
EndTime
!=
""
&&
x
.
TimeHour
!=
"0.0"
)
{
newList
.
push
({
StartTime
:
x
.
StartTime
,
EndTime
:
x
.
EndTime
,
TimeHour
:
x
.
TimeHour
});
}
else
{
errorMsg
=
"存在不完善的数据,请完善数据信息"
}
})
if
(
errorMsg
!=
""
)
{
this
.
$q
.
notify
({
icon
:
'iconfont icon-guanbi1'
,
color
:
'negative'
,
timeout
:
2000
,
message
:
errorMsg
,
position
:
'top'
})
}
return
errorMsg
==
""
},
removeTime
(
plan
,
i
)
{
plan
.
TimeList
.
splice
(
i
,
1
)
},
addTime
(
plan
)
{
let
obj
=
{
EndTime
:
""
,
StartTime
:
""
,
TimeHour
:
0
}
plan
.
TimeList
.
push
(
plan
)
},
changeClass
(
val
)
{
this
.
currentClass
=
this
.
classList
.
find
(
x
=>
{
return
x
.
ClassId
==
val
}).
PlanList
},
changeTypeResult
(
val
)
{
this
.
selected
=
[];
},
changeSchool
(
val
)
{
this
.
queryClass
.
SchoolId
=
val
this
.
getClass
()
},
changeCourse
(
val
)
{
this
.
queryClass
.
CourseId
=
val
this
.
getClass
()
},
getClass
()
{
getClassDropDownList
(
this
.
queryClass
).
then
(
res
=>
{
this
.
classList
=
[];
this
.
msg
.
ClassId
=
0
if
(
res
.
Code
==
1
)
{
res
.
Data
.
forEach
(
x
=>
{
x
.
PlanList
.
forEach
(
y
=>
{
let
newPlan
=
JSON
.
parse
(
JSON
.
stringify
(
y
))
y
.
NewPlan
=
newPlan
})
})
this
.
classList
=
res
.
Data
;
var
obj
=
{
ClassName
:
'请选择'
,
ClassId
:
0
}
this
.
classList
.
unshift
(
obj
);
}
});
},
getSchool
()
{
getSchoolDropdown
({}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
schoolList
=
res
.
Data
;
var
obj
=
{
SName
:
'请选择'
,
SId
:
-
1
}
this
.
schoolList
.
unshift
(
obj
);
}
})
},
getCourseList
()
{
queryCourseDropdownList
({
IsQPrice
:
1
}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
courseList
=
res
.
Data
;
var
obj
=
{
CourseName
:
'请选择'
,
CourseId
:
0
}
this
.
courseList
.
unshift
(
obj
);
}
})
},
//下拉选择改变
changeClassStyle
(
style
)
{
this
.
checkedDays
=
[];
},
//初始化日期-天
initDayList
()
{
this
.
dayList
=
[];
for
(
var
i
=
1
;
i
<=
31
;
i
++
)
{
this
.
dayList
.
push
({
label
:
i
,
value
:
i
,
});
}
},
//添加学习时间
addPlan
()
{
var
planObj
=
{
DateList
:
[],
TimeList
:
[{
StartTime
:
""
,
EndTime
:
""
,
TimeHour
:
''
}],
}
this
.
DefaultPlanTimeList
.
push
(
planObj
);
},
//删除学习时间
deletePlan
(
index
)
{
this
.
$q
.
dialog
({
title
:
'提示信息'
,
message
:
"是否要删除"
,
cancel
:
true
,
persistent
:
true
,
ok
:
"确定"
,
cancel
:
"取消"
,
}).
onOk
(()
=>
{
this
.
DefaultPlanTimeList
.
splice
(
index
,
1
);
}).
onCancel
(()
=>
{
});
},
//添加学习时段
addPlanTime
(
item
)
{
var
obj
=
{
StartTime
:
""
,
EndTime
:
""
,
}
item
.
TimeList
.
push
(
obj
);
},
//删除学习时段
deletePlanTime
(
item
,
index
)
{
this
.
$q
.
dialog
({
title
:
'提示信息'
,
message
:
"是否要删除此学习时间段"
,
cancel
:
true
,
persistent
:
true
,
ok
:
"确定"
,
cancel
:
"取消"
,
}).
onOk
(()
=>
{
item
.
TimeList
.
splice
(
index
,
1
);
}).
onCancel
(()
=>
{
});
},
},
}
})
this
.
classList
=
res
.
Data
;
var
obj
=
{
ClassName
:
'请选择'
,
ClassId
:
0
}
this
.
classList
.
unshift
(
obj
);
}
});
},
getSchool
()
{
getSchoolDropdown
({}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
schoolList
=
res
.
Data
;
var
obj
=
{
SName
:
'请选择'
,
SId
:
-
1
}
this
.
schoolList
.
unshift
(
obj
);
}
})
},
getCourseList
()
{
queryCourseDropdownList
({
IsQPrice
:
1
}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
courseList
=
res
.
Data
;
var
obj
=
{
CourseName
:
'请选择'
,
CourseId
:
0
}
this
.
courseList
.
unshift
(
obj
);
}
})
},
},
}
</
script
>
</
script
>
<
style
>
<
style
>
...
...
src/pages/teacher/teacherSchedule.vue
View file @
776ffde1
...
@@ -33,7 +33,7 @@
...
@@ -33,7 +33,7 @@
</div>
</div>
</div>
</div>
<classmateForm
:dataList=
"dataList"
v-if=
"commonType==1"
></classmateForm>
<classmateForm
:dataList=
"dataList"
v-if=
"commonType==1"
></classmateForm>
<change-class-form
v-if=
"persistent"
@
close=
"closeSaveForm"
></change-class-form>
<change-class-form
v-if=
"persistent"
@
close=
"closeSaveForm"
@
success=
"refreshPage"
></change-class-form>
<teachTable
v-if=
"commonType==2"
:tableData=
"tableData"
:PageCount=
"PageCount"
:setMsg=
"tabMsg"
@
getChange=
"getChange"
></teachTable>
<teachTable
v-if=
"commonType==2"
:tableData=
"tableData"
:PageCount=
"PageCount"
:setMsg=
"tabMsg"
@
getChange=
"getChange"
></teachTable>
</div>
</div>
</
template
>
</
template
>
...
@@ -107,6 +107,9 @@
...
@@ -107,6 +107,9 @@
this
.
getPlanList
();
this
.
getPlanList
();
},
},
methods
:
{
methods
:
{
refreshPage
(){
this
.
getPlanList
();
},
openForm
()
{
openForm
()
{
this
.
persistent
=
true
this
.
persistent
=
true
},
},
...
...
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