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

约课修改

parent 0118f1e9
......@@ -14,7 +14,6 @@
<div>{{ dateObj.date }} </div>
</template>
</q-field>
<!-- 详情显示内容 start-->
<div class="col-12" v-if="editType == 2">
<Detail :dateObj="dateObj" :saveObj="saveObj" :auth="auth" :CourseChapterName="CourseChapterName"
......@@ -24,7 +23,7 @@
<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"
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 || '请选择课程']">
<template v-slot:no-option>
<q-item>
......@@ -51,14 +50,9 @@
<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="老师"
class="col-6" @input="getCanTeacherTimeList" />
<q-select v-show="
saveMsg.CourseId > 0 &&
saveMsg.TeacherId &&
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">
<q-select v-show="saveMsg.CourseId > 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">
<div class="row col-12 flex justify-between">
<span>{{scope.opt.RoomName}}</span><span>{{ scope.opt.SchoolName}}</span></div>
......@@ -74,7 +68,7 @@
</q-select>
</div>
<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>
<div class="row flex">
上课时段
......@@ -137,8 +131,8 @@
</div>
<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="添加"
@click="subscribeCourse" />
<q-btn v-if="(saveObj.State==1||saveObj.State==2||editType==1)||currentUser.Id==1" size="sm"
color="accent" label="添加" @click="subscribeCourse" />
</div>
</div>
<div class="row col-12" style="margin-top: 20px;">
......@@ -214,8 +208,8 @@
<tfoot>
<tr>
<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="保存"
@click="SaveStuAppointment" :loading="addLoading" />
<q-btn v-if="(saveObj.State==1||saveObj.State==2||editType==1)||currentUser.Id==1" size="sm"
color="accent" label="保存" @click="SaveStuAppointment" :loading="addLoading" />
</td>
</tr>
</tfoot>
......@@ -244,7 +238,6 @@
import {
GetCanTeacherClassTimeList,
getCanAppointmentStuList_V2,
setAdminScrollAppointment_V2,
setAdminScrollAppointment_V3,
getScrollCourseChapterName,
} from "../../../api/studyabroad/subscribe.js";
......@@ -389,7 +382,7 @@
addStuList: [], //新增时展示用
ClassRoomList: [], //教室下拉
CourseChapterName: "",
currentUser:{},
currentUser: {},
};
},
created() {
......@@ -460,7 +453,6 @@
this.saveMsg.Date = this.dateObj.date;
this.courseCheckList = [];
this.stuInfo = "";
if (this.saveMsg.TeacherId == 0) return;
var qMsg = {
Date: this.saveMsg.Date,
TeacherId: this.saveMsg.TeacherId,
......@@ -552,8 +544,8 @@
}
});
this.saveMsg.ChapterNo = this.checkChapter.ChapterNo;
this.saveMsg.TeacherId = 0;
this.teacherTimeList = [];
// this.saveMsg.TeacherId = 0;
// this.teacherTimeList = [];
//获取学生列表
this.getStu_V2();
},
......
......@@ -37,14 +37,18 @@
<q-separator vertical />
<q-btn dense text-color="primary" flat unelevated :label="viewType == 'day' ? '下一天' : '下一周'"
@click="calendarNext" />
<q-separator vertical />
<!-- <q-btn v-if="msg.ClassType==2" dense text-color="primary" icon="download" flat unelevated label="下载排课表"
<q-separator vertical />
<!-- <q-btn v-if="msg.ClassType==2" dense text-color="primary" icon="download" flat unelevated label="下载排课表"
@click="DownLoadStuLearnChapterStatic" /> -->
<div style="margin-left:10px;"> <q-btn v-if="msg.ClassType==3" color="accent" class="q-mr-md" size="sm" icon="download"
label="下载老师排课表" @click="DownLoadStuLearnChapterStatic" /></div>
<q-separator vertical />
<div style="margin-left:10px;"> <q-btn v-if="msg.ClassType==3" color="accent" class="q-mr-md" size="sm" icon="download"
label="下载学生发课表" @click="DownLoadPlanStudentExcel" /></div>
<div style="margin-left:10px;">
<q-btn dense text-color="primary" flat unelevated class="q-mr-md" size="sm" icon="download" label="下载老师排课表"
@click="DownLoadStuLearnChapterStatic" />
</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 class="viewbox">
<q-calendar v-model="selectedDate" :view="viewType" ref="calendar" locale="zh-CN" class="calendar-container "
......@@ -159,8 +163,7 @@
<span class="">最小成班人数:</span><span>{{ __item.ScrollMinNum }}</span>
</div>
</div>
<div v-if="viewType == 'week'&&__item.ClassType === 3"
style="white-space:normal;font-size:10px">
<div v-if="viewType == 'week'&&__item.ClassType === 3" style="white-space:normal;font-size:10px">
{{__item.CourseGradeName}}<span>({{__item.Ranks||0}})</span> </div>
</div>
<div style="position:relative">
......@@ -388,9 +391,9 @@
saveObj: {},
auth: {
IsEdit: false,
addBefore:false,//新增今天以前的约课
addBefore: false, //新增今天以前的约课
},
saveLoading:false,
saveLoading: false,
};
},
components: {
......@@ -414,7 +417,7 @@
} else {
this.auth.IsEdit = false;
}
const res2 = ActionMenuList.find(e => {
return e.FunctionCode == "subscribe_addBefore";
});
......@@ -431,22 +434,24 @@
[`text-white bg-${bg}`]: true
};
},
//下载课表
DownLoadStuLearnChapterStatic() {
//下载课表
DownLoadStuLearnChapterStatic() {
let dateStartDate = new Date(this.msg.StartDate);
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() {
let dateStartDate = new Date(this.msg.StartDate);
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) {
const s = {};
if (timeStartPos) {
......@@ -575,7 +580,7 @@
onClickInterval2(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.editType = 1;
this.saveObj = {};
......@@ -599,14 +604,14 @@
});
return;
}
this.saveLoading=true;
this.saveLoading = true;
const msg = {
Date: date,
TeacherId: id,
ShiftSort: item.ShiftSort
};
SetSureAppointment(msg).then(res => {
this.saveLoading=false;
this.saveLoading = false;
if (res.Code == 1) {
this.$q.notify({
message: "操作成功",
......@@ -647,6 +652,7 @@
}
}
};
</script>
<style lang="scss">
......@@ -689,4 +695,5 @@
width: 100%;
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