Commit 313f610c authored by 黄奎's avatar 黄奎

约课修改

parent 0118f1e9
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
<div>{{ dateObj.date }} </div> <div>{{ dateObj.date }} </div>
</template> </template>
</q-field> </q-field>
<!-- 详情显示内容 start--> <!-- 详情显示内容 start-->
<div class="col-12" v-if="editType == 2"> <div class="col-12" v-if="editType == 2">
<Detail :dateObj="dateObj" :saveObj="saveObj" :auth="auth" :CourseChapterName="CourseChapterName" <Detail :dateObj="dateObj" :saveObj="saveObj" :auth="auth" :CourseChapterName="CourseChapterName"
...@@ -24,7 +23,7 @@ ...@@ -24,7 +23,7 @@
<q-select filled stack-label use-input option-value="CourseId" option-label="CourseName" <q-select filled stack-label use-input option-value="CourseId" option-label="CourseName"
v-model="saveMsg.CourseId" ref="CourseId" :options="CourseList" label="课程" :dense="false" class="col-12" v-model="saveMsg.CourseId" ref="CourseId" :options="CourseList" label="课程" :dense="false" class="col-12"
emit-value map-options @filter="filterCourse" emit-value map-options @filter="filterCourse"
@input="getCanTeacherTimeList(), getChapterTree(), changeCourse()" v-if="editType == 1" @input="changeCourse(),getChapterTree(),getCanTeacherTimeList() " v-if="editType == 1"
:rules="[val => !!val || '请选择课程']"> :rules="[val => !!val || '请选择课程']">
<template v-slot:no-option> <template v-slot:no-option>
<q-item> <q-item>
...@@ -51,14 +50,9 @@ ...@@ -51,14 +50,9 @@
<q-select v-show="saveMsg.CourseId > 0 && editType == 1" filled v-model="saveMsg.TeacherId" <q-select v-show="saveMsg.CourseId > 0 && editType == 1" filled v-model="saveMsg.TeacherId"
option-value="TId" option-label="TeacherName" :options="teacherList" emit-value map-options label="老师" option-value="TId" option-label="TeacherName" :options="teacherList" emit-value map-options label="老师"
class="col-6" @input="getCanTeacherTimeList" /> class="col-6" @input="getCanTeacherTimeList" />
<q-select v-show=" <q-select v-show="saveMsg.CourseId > 0 && editType == 1" filled v-model="saveMsg.RoomId"
saveMsg.CourseId > 0 && option-value="RoomId" option-label="RoomName" :options="ClassRoomList" emit-value map-options label="教室"
saveMsg.TeacherId && :disable="addStuList.length > 0" class="col-6">
teacherTimeList.length > 0 &&
editType == 1
" filled v-model="saveMsg.RoomId" option-value="RoomId" option-label="RoomName"
:options="ClassRoomList" emit-value map-options label="教室" :disable="addStuList.length > 0"
class="col-6">
<template v-slot:selected-item="scope"> <template v-slot:selected-item="scope">
<div class="row col-12 flex justify-between"> <div class="row col-12 flex justify-between">
<span>{{scope.opt.RoomName}}</span><span>{{ scope.opt.SchoolName}}</span></div> <span>{{scope.opt.RoomName}}</span><span>{{ scope.opt.SchoolName}}</span></div>
...@@ -74,7 +68,7 @@ ...@@ -74,7 +68,7 @@
</q-select> </q-select>
</div> </div>
<template v-if="editType==1"> <template v-if="editType==1">
<q-field filled label-slot stack-label class="col-12" v-if="saveMsg.TeacherId > 0 &&editType==1 "> <q-field filled label-slot stack-label class="col-12" v-if="editType==1 ">
<template #label> <template #label>
<div class="row flex"> <div class="row flex">
上课时段 上课时段
...@@ -137,8 +131,8 @@ ...@@ -137,8 +131,8 @@
</div> </div>
<div class="col-3 q-pt-md q-pl-md"> <div class="col-3 q-pt-md q-pl-md">
<q-btn v-if="(saveObj.State==1||saveObj.State==2||editType==1)||currentUser.Id==1" size="sm" color="accent" label="添加" <q-btn v-if="(saveObj.State==1||saveObj.State==2||editType==1)||currentUser.Id==1" size="sm"
@click="subscribeCourse" /> color="accent" label="添加" @click="subscribeCourse" />
</div> </div>
</div> </div>
<div class="row col-12" style="margin-top: 20px;"> <div class="row col-12" style="margin-top: 20px;">
...@@ -214,8 +208,8 @@ ...@@ -214,8 +208,8 @@
<tfoot> <tfoot>
<tr> <tr>
<td colspan="1" style="text-align: center;"> <td colspan="1" style="text-align: center;">
<q-btn v-if="(saveObj.State==1||saveObj.State==2||editType==1)||currentUser.Id==1" size="sm" color="accent" label="保存" <q-btn v-if="(saveObj.State==1||saveObj.State==2||editType==1)||currentUser.Id==1" size="sm"
@click="SaveStuAppointment" :loading="addLoading" /> color="accent" label="保存" @click="SaveStuAppointment" :loading="addLoading" />
</td> </td>
</tr> </tr>
</tfoot> </tfoot>
...@@ -244,7 +238,6 @@ ...@@ -244,7 +238,6 @@
import { import {
GetCanTeacherClassTimeList, GetCanTeacherClassTimeList,
getCanAppointmentStuList_V2, getCanAppointmentStuList_V2,
setAdminScrollAppointment_V2,
setAdminScrollAppointment_V3, setAdminScrollAppointment_V3,
getScrollCourseChapterName, getScrollCourseChapterName,
} from "../../../api/studyabroad/subscribe.js"; } from "../../../api/studyabroad/subscribe.js";
...@@ -389,7 +382,7 @@ ...@@ -389,7 +382,7 @@
addStuList: [], //新增时展示用 addStuList: [], //新增时展示用
ClassRoomList: [], //教室下拉 ClassRoomList: [], //教室下拉
CourseChapterName: "", CourseChapterName: "",
currentUser:{}, currentUser: {},
}; };
}, },
created() { created() {
...@@ -460,7 +453,6 @@ ...@@ -460,7 +453,6 @@
this.saveMsg.Date = this.dateObj.date; this.saveMsg.Date = this.dateObj.date;
this.courseCheckList = []; this.courseCheckList = [];
this.stuInfo = ""; this.stuInfo = "";
if (this.saveMsg.TeacherId == 0) return;
var qMsg = { var qMsg = {
Date: this.saveMsg.Date, Date: this.saveMsg.Date,
TeacherId: this.saveMsg.TeacherId, TeacherId: this.saveMsg.TeacherId,
...@@ -552,8 +544,8 @@ ...@@ -552,8 +544,8 @@
} }
}); });
this.saveMsg.ChapterNo = this.checkChapter.ChapterNo; this.saveMsg.ChapterNo = this.checkChapter.ChapterNo;
this.saveMsg.TeacherId = 0; // this.saveMsg.TeacherId = 0;
this.teacherTimeList = []; // this.teacherTimeList = [];
//获取学生列表 //获取学生列表
this.getStu_V2(); this.getStu_V2();
}, },
......
...@@ -37,14 +37,18 @@ ...@@ -37,14 +37,18 @@
<q-separator vertical /> <q-separator vertical />
<q-btn dense text-color="primary" flat unelevated :label="viewType == 'day' ? '下一天' : '下一周'" <q-btn dense text-color="primary" flat unelevated :label="viewType == 'day' ? '下一天' : '下一周'"
@click="calendarNext" /> @click="calendarNext" />
<q-separator vertical /> <q-separator vertical />
<!-- <q-btn v-if="msg.ClassType==2" dense text-color="primary" icon="download" flat unelevated label="下载排课表" <!-- <q-btn v-if="msg.ClassType==2" dense text-color="primary" icon="download" flat unelevated label="下载排课表"
@click="DownLoadStuLearnChapterStatic" /> --> @click="DownLoadStuLearnChapterStatic" /> -->
<div style="margin-left:10px;"> <q-btn v-if="msg.ClassType==3" color="accent" class="q-mr-md" size="sm" icon="download" <div style="margin-left:10px;">
label="下载老师排课表" @click="DownLoadStuLearnChapterStatic" /></div> <q-btn dense text-color="primary" flat unelevated class="q-mr-md" size="sm" icon="download" label="下载老师排课表"
<q-separator vertical /> @click="DownLoadStuLearnChapterStatic" />
<div style="margin-left:10px;"> <q-btn v-if="msg.ClassType==3" color="accent" class="q-mr-md" size="sm" icon="download" </div>
label="下载学生发课表" @click="DownLoadPlanStudentExcel" /></div> <q-separator vertical />
<div style="margin-left:10px;">
<q-btn dense text-color="primary" flat unelevated class="q-mr-md" size="sm" icon="download" label="下载学生发课表"
@click="DownLoadPlanStudentExcel" />
</div>
</div> </div>
<div class="viewbox"> <div class="viewbox">
<q-calendar v-model="selectedDate" :view="viewType" ref="calendar" locale="zh-CN" class="calendar-container " <q-calendar v-model="selectedDate" :view="viewType" ref="calendar" locale="zh-CN" class="calendar-container "
...@@ -159,8 +163,7 @@ ...@@ -159,8 +163,7 @@
<span class="">最小成班人数:</span><span>{{ __item.ScrollMinNum }}</span> <span class="">最小成班人数:</span><span>{{ __item.ScrollMinNum }}</span>
</div> </div>
</div> </div>
<div v-if="viewType == 'week'&&__item.ClassType === 3" <div v-if="viewType == 'week'&&__item.ClassType === 3" style="white-space:normal;font-size:10px">
style="white-space:normal;font-size:10px">
{{__item.CourseGradeName}}<span>({{__item.Ranks||0}})</span> </div> {{__item.CourseGradeName}}<span>({{__item.Ranks||0}})</span> </div>
</div> </div>
<div style="position:relative"> <div style="position:relative">
...@@ -388,9 +391,9 @@ ...@@ -388,9 +391,9 @@
saveObj: {}, saveObj: {},
auth: { auth: {
IsEdit: false, IsEdit: false,
addBefore:false,//新增今天以前的约课 addBefore: false, //新增今天以前的约课
}, },
saveLoading:false, saveLoading: false,
}; };
}, },
components: { components: {
...@@ -414,7 +417,7 @@ ...@@ -414,7 +417,7 @@
} else { } else {
this.auth.IsEdit = false; this.auth.IsEdit = false;
} }
const res2 = ActionMenuList.find(e => { const res2 = ActionMenuList.find(e => {
return e.FunctionCode == "subscribe_addBefore"; return e.FunctionCode == "subscribe_addBefore";
}); });
...@@ -431,22 +434,24 @@ ...@@ -431,22 +434,24 @@
[`text-white bg-${bg}`]: true [`text-white bg-${bg}`]: true
}; };
}, },
//下载课表 //下载课表
DownLoadStuLearnChapterStatic() { DownLoadStuLearnChapterStatic() {
let dateStartDate = new Date(this.msg.StartDate); let dateStartDate = new Date(this.msg.StartDate);
let dateEndDate = new Date(this.msg.EndDate); let dateEndDate = new Date(this.msg.EndDate);
EduDownLoad("/TeacherClass/GetAppointmentPlanStatExcel", this.msg, (dateStartDate.getMonth() + 1)+"月"+dateStartDate.getDate()+"日-"+ (dateEndDate.getMonth() + 1)+"月"+dateEndDate.getDate()+"日老师排课统计.xls", res => { EduDownLoad("/TeacherClass/GetAppointmentPlanStatExcel", this.msg, (dateStartDate.getMonth() + 1) + "月" +
}); dateStartDate.getDate() + "日-" + (dateEndDate.getMonth() + 1) + "月" + dateEndDate.getDate() + "日老师排课统计.xls",
res => {});
}, },
//下载课表 //下载课表
DownLoadPlanStudentExcel() { DownLoadPlanStudentExcel() {
let dateStartDate = new Date(this.msg.StartDate); let dateStartDate = new Date(this.msg.StartDate);
let dateEndDate = new Date(this.msg.EndDate); let dateEndDate = new Date(this.msg.EndDate);
EduDownLoad("/TeacherClass/GetAppointmentPlanStudentExcel", this.msg, (dateStartDate.getMonth() + 1)+"月"+dateStartDate.getDate()+"日-"+ (dateEndDate.getMonth() + 1)+"月"+dateEndDate.getDate()+"日学生排课统计.xls", res => { EduDownLoad("/TeacherClass/GetAppointmentPlanStudentExcel", this.msg, (dateStartDate.getMonth() + 1) + "月" +
}); dateStartDate.getDate() + "日-" + (dateEndDate.getMonth() + 1) + "月" + dateEndDate.getDate() + "日学生排课统计.xls",
res => {});
},
},
badgeStyles(event, type, timeStartPos, timeDurationHeight, index, total) { badgeStyles(event, type, timeStartPos, timeDurationHeight, index, total) {
const s = {}; const s = {};
if (timeStartPos) { if (timeStartPos) {
...@@ -575,7 +580,7 @@ ...@@ -575,7 +580,7 @@
onClickInterval2(data) {}, onClickInterval2(data) {},
onClickTime2(data) { onClickTime2(data) {
//小于今天不显示弹窗,有权限除外 //小于今天不显示弹窗,有权限除外
if ((this.showAddStu(data.scope.timestamp.date)|| this.auth.addBefore)&& this.auth.IsEdit) { if ((this.showAddStu(data.scope.timestamp.date) || this.auth.addBefore) && this.auth.IsEdit) {
this.showForm = true; this.showForm = true;
this.editType = 1; this.editType = 1;
this.saveObj = {}; this.saveObj = {};
...@@ -599,14 +604,14 @@ ...@@ -599,14 +604,14 @@
}); });
return; return;
} }
this.saveLoading=true; this.saveLoading = true;
const msg = { const msg = {
Date: date, Date: date,
TeacherId: id, TeacherId: id,
ShiftSort: item.ShiftSort ShiftSort: item.ShiftSort
}; };
SetSureAppointment(msg).then(res => { SetSureAppointment(msg).then(res => {
this.saveLoading=false; this.saveLoading = false;
if (res.Code == 1) { if (res.Code == 1) {
this.$q.notify({ this.$q.notify({
message: "操作成功", message: "操作成功",
...@@ -647,6 +652,7 @@ ...@@ -647,6 +652,7 @@
} }
} }
}; };
</script> </script>
<style lang="scss"> <style lang="scss">
...@@ -689,4 +695,5 @@ ...@@ -689,4 +695,5 @@
width: 100%; width: 100%;
display: inline-block; display: inline-block;
} }
</style>
\ No newline at end of file </style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment