Commit e1f145ab authored by 罗超's avatar 罗超

2

parent 8140af14
<template> <template>
<div> <div>
<q-dialog <q-dialog v-model="show" persistent transition-show="scale" transition-hide="scale" @input="changeDig">
v-model="show"
persistent
transition-show="scale"
transition-hide="scale"
@input="changeDig"
>
<q-card style="width: 800px;max-width:900px;"> <q-card style="width: 800px;max-width:900px;">
<q-card-section class="row items-center q-pb-none"> <q-card-section class="row items-center q-pb-none">
<div class="text-h6">{{ editType == 1 ? "新增约课" : "详情" }}</div> <div class="text-h6">{{ editType == 1 ? "新增约课" : "详情" }}</div>
...@@ -14,7 +8,7 @@ ...@@ -14,7 +8,7 @@
<q-btn icon="close" flat round dense @click="changeDig(false)" /> <q-btn icon="close" flat round dense @click="changeDig(false)" />
</q-card-section> </q-card-section>
<q-card-section class="q-pt-none scroll" style="max-height: 70vh"> <q-card-section class="q-pt-none scroll" style="max-height: 70vh">
<div class="row col q-mr-lg q-col-gutter-md" > <div class="row col q-mr-lg q-col-gutter-md">
<q-field filled label="日期" stack-label class="col-12"> <q-field filled label="日期" stack-label class="col-12">
<template v-slot:control> <template v-slot:control>
<div>{{ dateObj.date }}</div> <div>{{ dateObj.date }}</div>
...@@ -22,33 +16,14 @@ ...@@ -22,33 +16,14 @@
</q-field> </q-field>
<!-- 详情显示内容 start--> <!-- 详情显示内容 start-->
<div class="col-12" v-if="editType == 2"> <div class="col-12" v-if="editType == 2">
<Detail <Detail :dateObj="dateObj" :saveObj="saveObj" :auth="auth" @success="detailSuccessHandle"
:dateObj="dateObj" @close="detailCloseHandle" />
:saveObj="saveObj"
:auth="auth"
@success="detailSuccessHandle"
@close="detailCloseHandle"
/>
</div> </div>
<!-- 详情显示内容 end --> <!-- 详情显示内容 end -->
<q-select <q-select filled stack-label use-input option-value="CourseId" option-label="CourseName"
filled v-model="teaClassMsg.CourseId" ref="CourseId" :options="CourseList" label="课程" :dense="false"
stack-label class="col-12" emit-value map-options @filter="filterCourse"
use-input @input="getCanTeacherTimeList(), getChapterTree(), changeCourse()" v-if="editType == 1">
option-value="CourseId"
option-label="CourseName"
v-model="teaClassMsg.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"
>
<template v-slot:no-option> <template v-slot:no-option>
<q-item> <q-item>
<q-item-section class="text-grey"> <q-item-section class="text-grey">
...@@ -57,49 +32,19 @@ ...@@ -57,49 +32,19 @@
</q-item> </q-item>
</template> </template>
</q-select> </q-select>
<select-tree <select-tree v-show="teaClassMsg.CourseId > 0 && editType == 1" :treeData="chapterList"
v-show="teaClassMsg.CourseId > 0 && editType == 1" :defaultArray="returnString" nodeKey="ChapterId" labelKey="ChapterName" childrenKey="ChildList"
:treeData="chapterList" tipText="章节" @getChild="getChapter" class="col-12" ref="selectTree"></select-tree>
:defaultArray="returnString"
nodeKey="ChapterId"
labelKey="ChapterName"
childrenKey="ChildList"
tipText="章节"
@getChild="getChapter"
class="col-12"
ref="selectTree"
></select-tree>
<q-select <q-select v-if="teaClassMsg.CourseId > 0 && editType == 1" filled v-model="teaClassMsg.TeacherId"
v-if="teaClassMsg.CourseId > 0 && editType == 1" option-value="TId" option-label="TeacherName" :options="teacherList" emit-value map-options label="老师"
filled class="col-12" @input="getCanTeacherTimeList" />
v-model="teaClassMsg.TeacherId" <q-field filled label-slot stack-label class="col-12" v-if="teaClassMsg.TeacherId > 0">
option-value="TId"
option-label="TeacherName"
:options="teacherList"
emit-value
map-options
label="老师"
class="col-12"
@input="getCanTeacherTimeList"
/>
<q-field
filled
label-slot
stack-label
class="col-12"
v-if="teaClassMsg.TeacherId > 0"
>
<template #label> <template #label>
<div class="row flex"> <div class="row flex">
上课时段 上课时段
<span <span style="color:#f5576c;font-size:13px;margin-left:5px;font-weight:500">(按顺序选择)</span>
style="color:#f5576c;font-size:13px;margin-left:5px;font-weight:500" <div style="color:#333;font-size:13px;margin-left:10px;font-weight:500">
>(按顺序选择)</span
>
<div
style="color:#333;font-size:13px;margin-left:10px;font-weight:500"
>
需选课时:{{ checkChapter.StudyMinutes }}分钟 需选课时:{{ checkChapter.StudyMinutes }}分钟
</div> </div>
</div> </div>
...@@ -107,16 +52,10 @@ ...@@ -107,16 +52,10 @@
<template v-slot:control> <template v-slot:control>
<div v-if="teacherTimeList.length > 0"> <div v-if="teacherTimeList.length > 0">
<div v-for="(item, index) in teacherTimeList" :key="index"> <div v-for="(item, index) in teacherTimeList" :key="index">
<div <div v-if="
v-if="
item.CourseTimeList && item.CourseTimeList.length > 0 item.CourseTimeList && item.CourseTimeList.length > 0
" ">
> <div v-for="(_item, _index) in item.CourseTimeList" :key="_index" class="timeItem">
<div
v-for="(_item, _index) in item.CourseTimeList"
:key="_index"
class="timeItem"
>
<q-checkbox v-model="courseCheckList" :val="_item"> <q-checkbox v-model="courseCheckList" :val="_item">
{{ item.SchoolName }} {{ item.RoomName }} {{ item.SchoolName }} {{ item.RoomName }}
{{ _item.StartTime }}-{{ _item.EndTime }} {{ _item.StartTime }}-{{ _item.EndTime }}
...@@ -133,29 +72,14 @@ ...@@ -133,29 +72,14 @@
</div> </div>
</template> </template>
</q-field> </q-field>
<div <div class="row col" v-show="
class="row col"
v-show="
(editType == 1 || (editType == 1 ||
(saveObj.ClassType == 3 && saveObj.AppointState == 1)) && (saveObj.ClassType == 3 && saveObj.AppointState == 1)) &&
auth.IsEdit&&showAddStu() auth.IsEdit&&showAddStu()
" ">
>
<div class="col-10"> <div class="col-10">
<q-select <q-select filled stack-label use-input option-value="StuId" option-label="StuName" v-model="stuInfo"
filled ref="CourseId" :options="stuList" label="添加学员" :dense="false" class="col-6" @filter="filterStu">
stack-label
use-input
option-value="StuId"
option-label="StuName"
v-model="stuInfo"
ref="CourseId"
:options="stuList"
label="添加学员"
:dense="false"
class="col-6"
@filter="filterStu"
>
<template v-slot:no-option> <template v-slot:no-option>
<q-item> <q-item>
<q-item-section class="text-grey"> <q-item-section class="text-grey">
...@@ -166,433 +90,438 @@ ...@@ -166,433 +90,438 @@
</q-select> </q-select>
</div> </div>
<div class="col-2 q-pt-md"> <div class="col-2 q-pt-md">
<q-btn <q-btn size="sm" color="accent" label="添加" @click="subscribeCourse" :loading="addLoading"
size="sm" class="q-ml-md" :disable="!stuInfo.StuId || stuInfo.StuId <= 0" />
color="accent"
label="添加"
@click="subscribeCourse"
:loading="addLoading"
class="q-ml-md"
:disable="!stuInfo.StuId || stuInfo.StuId <= 0"
/>
</div> </div>
</div> </div>
<q-field filled label="已约学员" stack-label disable class="col-12" v-if="editType == 1&&addStuList.length>0">
<template v-slot:control>
<div v-for="(item,index) in addStuList" :key="index" class="q-mr-md">
{{ item }}
</div>
</template>
</q-field>
</div> </div>
</q-card-section> </q-card-section>
<q-separator /> <q-separator />
<q-card-actions align="right" class="bg-white"> <q-card-actions align="right" class="bg-white">
<q-btn <q-btn label="取消" flat color="grey-10" style="font-weight:400 !important" @click="changeDig(false)" />
label="取消"
flat
color="grey-10"
style="font-weight:400 !important"
@click="changeDig(false)"
/>
</q-card-actions> </q-card-actions>
</q-card> </q-card>
</q-dialog> </q-dialog>
</div> </div>
</template> </template>
<script> <script>
import { import {
GetCanTeacherClassTimeList, GetCanTeacherClassTimeList,
GetCanAppointmentStuList, GetCanAppointmentStuList,
SetAdminScrollAppointment SetAdminScrollAppointment
} from "../../../api/studyabroad/subscribe.js"; } from "../../../api/studyabroad/subscribe.js";
import { import {
queryCourseDropdownList, queryCourseDropdownList,
queryChapterTree queryChapterTree
} from "../../../api/course/index"; } from "../../../api/course/index";
import selectTree from "../../../components/common/select-tree"; import selectTree from "../../../components/common/select-tree";
import Detail from "./detail.vue"; import Detail from "./detail.vue";
import QCalendar from "@quasar/quasar-ui-qcalendar"; import QCalendar from "@quasar/quasar-ui-qcalendar";
export default { export default {
components: { components: {
selectTree, selectTree,
Detail Detail
},
model: {
prop: "show",
event: "changeshow"
},
props: {
dateObj: {
type: Object,
default: null
},
saveObj: {
type: Object,
default: null
}, },
show: { model: {
type: Boolean, prop: "show",
default: false event: "changeshow"
}, },
editType: { props: {
type: Number, dateObj: {
default: 1 //1:新增,2详情 type: Object,
}, default: null
teacherList: {
type: Array,
default: () => []
},
auth: {
type: Object,
default: () => {
return {
IsEdit: false
};
}
}
},
watch: {
show(val) {
this.addLoading = false;
if (val) {
this.stuInfo = "";
this.teaClassMsg.CourseId = 0;
this.teaClassMsg.TeacherId = 0;
this.chapterList = [];
this.teacherTimeList = [];
this.courseCheckList = [];
this.stuList = [];
this.allStuList = [];
if (this.editType == 2) {
this.getStu();
}
}
}
},
data() {
return {
CourseList: [], //关联课程下拉数据
AllCourseList: [], //所有课程列表
teacherTimeList: [],
teaClassMsg: {
Date: "",
TeacherId: 0,
CourseId: 0
}, },
stuList: [], saveObj: {
allStuList: [], type: Object,
stuMsg: { default: null
CourseId: 0,
NextChapterNo: 0
}, },
detailObj: {}, show: {
detailMsg: { type: Boolean,
StuId: 0, default: false
GuestId: 0
}, },
saveMsg: { editType: {
Date: "", type: Number,
TeacherId: 0, default: 1 //1:新增,2详情
ShiftSort: "",
StuId: 0,
GuestId: 0,
CourseId: 0,
ChapterNo: 0,
CourseGradeId: 0
}, },
stuInfo: "", teacherList: {
checkStuList: [], type: Array,
courseCheckList: [], default: () => []
addLoading: false, },
chapterList: [], //章节列表, auth: {
checkChapter: {}, //选择的章节 type: Object,
returnString: [] //章节默认值 default: () => {
}; return {
}, IsEdit: false
mounted() {
this.getCourseList();
},
methods: {
//开关弹窗
changeDig(val) {
this.$emit("changeshow", val);
if (!val) {
this.stuList = [];
this.allStuList = [];
}
},
//获取课程
getCourseList() {
queryCourseDropdownList({
IsQPrice: 1,
IsQuerySalePlat: 1,
IsScrollClass: 1
}).then(res => {
if (res.Code == 1) {
this.CourseList = res.Data;
var obj = {
CourseName: "请选择",
CourseId: 0
}; };
this.CourseList.unshift(obj);
this.AllCourseList = res.Data;
} }
}); }
},
changeCourse() {
this.teaClassMsg.TeacherId = 0;
this.checkChapter = {};
this.checkStuList = [];
this.stuInfo = "";
this.$refs.selectTree.clearData();
}, },
//筛选课程 watch: {
filterCourse(val, update) { show(val) {
update(() => { this.addLoading = false;
if (val === "") { this.addStuList = []
this.CourseList = JSON.parse(JSON.stringify(this.AllCourseList)); if (val) {
} else { this.stuInfo = "";
const needle = val.toLowerCase(); this.teaClassMsg.CourseId = 0;
this.CourseList = this.AllCourseList.filter( this.teaClassMsg.TeacherId = 0;
v => v.CourseName.toLowerCase().indexOf(needle) > -1 this.chapterList = [];
); this.teacherTimeList = [];
this.courseCheckList = [];
this.stuList = [];
this.allStuList = [];
if (this.editType == 2) {
this.getStu();
}
} }
}); }
}, },
data() {
//获取老师的空闲上课时段 return {
getCanTeacherTimeList() { CourseList: [], //关联课程下拉数据
this.teaClassMsg.Date = this.dateObj.date; AllCourseList: [], //所有课程列表
this.stuInfo = ""; teacherTimeList: [],
if (this.teaClassMsg.TeacherId == 0) return; teaClassMsg: {
GetCanTeacherClassTimeList(this.teaClassMsg).then(res => { Date: "",
this.teacherTimeList = res.Data; TeacherId: 0,
}); CourseId: 0
},
stuList: [],
allStuList: [],
stuMsg: {
CourseId: 0,
NextChapterNo: 0
},
detailObj: {},
detailMsg: {
StuId: 0,
GuestId: 0
},
saveMsg: {
Date: "",
TeacherId: 0,
ShiftSort: "",
StuId: 0,
GuestId: 0,
CourseId: 0,
ChapterNo: 0,
CourseGradeId: 0
},
stuInfo: "",
checkStuList: [],
courseCheckList: [],
addLoading: false,
chapterList: [], //章节列表,
checkChapter: {}, //选择的章节
returnString: [], //章节默认值
addStuList: [], //新增时展示用
};
}, },
//获取学生列表 mounted() {
getStu() { this.getCourseList();
this.stuMsg.CourseId = this.teaClassMsg.CourseId || 0;
if (this.editType == 1) {
this.stuMsg.CourseGradeId = this.checkChapter.CourseRate||0;
this.stuMsg.NextChapterNo = this.checkChapter.ChapterNo||0;
}
if (this.editType == 2) {
this.stuMsg.CourseGradeId = this.saveObj.CourseGradeId||0;
this.stuMsg.NextChapterNo = this.saveObj.Ranks||0;
}
GetCanAppointmentStuList(this.stuMsg).then(res => {
this.stuList = JSON.parse(JSON.stringify(res.Data));
this.allStuList = JSON.parse(JSON.stringify(res.Data));
});
}, },
//筛选学生 methods: {
filterStu(val, update) { //开关弹窗
update(() => { changeDig(val) {
if (val === "") { this.$emit("changeshow", val);
this.stuList = JSON.parse(JSON.stringify(this.allStuList)); if (!val) {
} else { this.stuList = [];
const needle = val.toLowerCase(); this.allStuList = [];
this.stuList = this.allStuList.filter(
v => v.StuName.toLowerCase().indexOf(needle) > -1
);
} }
}); },
}, //获取课程
//获取章节 getCourseList() {
getChapterTree() { queryCourseDropdownList({
if (this.teaClassMsg.CourseId == 0) return; IsQPrice: 1,
const msg = { CourseId: this.teaClassMsg.CourseId }; IsQuerySalePlat: 1,
queryChapterTree(msg).then(res => { IsScrollClass: 1
this.chapterList = res.Data; }).then(res => {
this.chapterList.forEach(e => { if (res.Code == 1) {
this.mapChapter(e.ChildList, "ChildList"); this.CourseList = res.Data;
var obj = {
CourseName: "请选择",
CourseId: 0
};
this.CourseList.unshift(obj);
this.AllCourseList = res.Data;
}
}); });
}); },
}, changeCourse() {
//禁用第一层后的子级 this.teaClassMsg.TeacherId = 0;
mapChapter(arr = [], key) { this.checkChapter = {};
arr.forEach(e => { this.checkStuList = [];
e.disabled = true; this.stuInfo = "";
if (e[key] && e[key].length > 0) { this.$refs.selectTree.clearData();
this.mapChapter(e[key]); },
//筛选课程
filterCourse(val, update) {
update(() => {
if (val === "") {
this.CourseList = JSON.parse(JSON.stringify(this.AllCourseList));
} else {
const needle = val.toLowerCase();
this.CourseList = this.AllCourseList.filter(
v => v.CourseName.toLowerCase().indexOf(needle) > -1
);
}
});
},
//获取老师的空闲上课时段
getCanTeacherTimeList() {
this.teaClassMsg.Date = this.dateObj.date;
this.stuInfo = "";
if (this.teaClassMsg.TeacherId == 0) return;
GetCanTeacherClassTimeList(this.teaClassMsg).then(res => {
this.teacherTimeList = res.Data;
});
},
//获取学生列表
getStu() {
this.stuMsg.CourseId = this.teaClassMsg.CourseId || 0;
if (this.editType == 1) {
this.stuMsg.CourseGradeId = this.checkChapter.CourseRate || 0;
this.stuMsg.NextChapterNo = this.checkChapter.ChapterNo || 0;
} }
}); if (this.editType == 2) {
}, this.stuMsg.CourseGradeId = this.saveObj.CourseGradeId || 0;
//章节选择 this.stuMsg.NextChapterNo = this.saveObj.Ranks || 0;
getChapter(data) {
this.checkStuList = [];
this.stuInfo = "";
this.chapterList.map(e => {
if (e.ChapterId == data) {
this.checkChapter = e;
return;
} }
});
if (this.checkChapter.CourseRate && this.checkChapter.ChapterNo) { GetCanAppointmentStuList(this.stuMsg).then(res => {
this.getStu(); this.stuList = JSON.parse(JSON.stringify(res.Data));
} this.allStuList = JSON.parse(JSON.stringify(res.Data));
this.teaClassMsg.TeacherId = 0;
this.teacherTimeList = [];
},
subscribeCourse() {
if (
new Date(this.dateObj.date).getTime() <
new Date(QCalendar.today()).getTime()
) {
this.$q.notify({
message: `日期小于今天,请重新选择日期`,
position: "top",
type: "negative"
}); });
return; },
} //筛选学生
if (this.stuInfo.AppointDate) { filterStu(val, update) {
update(() => {
if (val === "") {
this.stuList = JSON.parse(JSON.stringify(this.allStuList));
} else {
const needle = val.toLowerCase();
this.stuList = this.allStuList.filter(
v => v.StuName.toLowerCase().indexOf(needle) > -1
);
}
});
},
//获取章节
getChapterTree() {
if (this.teaClassMsg.CourseId == 0) return;
const msg = {
CourseId: this.teaClassMsg.CourseId
};
queryChapterTree(msg).then(res => {
this.chapterList = res.Data;
this.chapterList.forEach(e => {
this.mapChapter(e.ChildList, "ChildList");
});
});
},
//禁用第一层后的子级
mapChapter(arr = [], key) {
arr.forEach(e => {
e.disabled = true;
if (e[key] && e[key].length > 0) {
this.mapChapter(e[key]);
}
});
},
//章节选择
getChapter(data) {
this.checkStuList = [];
this.stuInfo = "";
this.chapterList.map(e => {
if (e.ChapterId == data) {
this.checkChapter = e;
return;
}
});
if (this.checkChapter.CourseRate && this.checkChapter.ChapterNo) {
this.getStu();
}
this.teaClassMsg.TeacherId = 0;
this.teacherTimeList = [];
},
subscribeCourse() {
if ( if (
new Date(this.dateObj.date).getTime() < new Date(this.dateObj.date).getTime() <
new Date(this.stuInfo.AppointDate).getTime() new Date(QCalendar.today()).getTime()
) { ) {
this.$q.notify({ this.$q.notify({
message: `${this.stuInfo.StuName},不能预约${this.stuInfo.AppointDate}之前的日期`, message: `日期小于今天,请重新选择日期`,
position: "top", position: "top",
type: "negative" type: "negative"
}); });
return; return;
} }
} if (this.stuInfo.AppointDate) {
if (
if (this.editType == 1) { new Date(this.dateObj.date).getTime() <
if (this.courseCheckList.length === 0) { new Date(this.stuInfo.AppointDate).getTime()
this.$q.notify({ ) {
message: "请选择上课时段", this.$q.notify({
position: "top", message: `${this.stuInfo.StuName},不能预约${this.stuInfo.AppointDate}之前的日期`,
type: "negative" position: "top",
}); type: "negative"
return; });
return;
}
} }
const totalTime = this.courseCheckList.reduce((pre, cur) => {
return (pre += cur.Minutes); if (this.editType == 1) {
}, 0); if (this.courseCheckList.length === 0) {
if (this.checkChapter.StudyMinutes !== totalTime) { this.$q.notify({
this.$q.notify({ message: "请选择上课时段",
message: "课时不匹配,请重新上课时段", position: "top",
position: "top", type: "negative"
type: "negative" });
return;
}
const totalTime = this.courseCheckList.reduce((pre, cur) => {
return (pre += cur.Minutes);
}, 0);
if (this.checkChapter.StudyMinutes !== totalTime) {
this.$q.notify({
message: "课时不匹配,请重新上课时段",
position: "top",
type: "negative"
});
return;
}
let newCourseCheckList = this.courseCheckList.sort((a, b) => {
return a.Sort - b.Sort;
}); });
return; for (let i = 0; i < newCourseCheckList.length; i++) {
} if (i > 0) {
let newCourseCheckList = this.courseCheckList.sort((a, b) => { const cur = newCourseCheckList[i].Sort;
return a.Sort - b.Sort; const pre = newCourseCheckList[i - 1].Sort;
}); if (cur - pre > 1) {
for (let i = 0; i < newCourseCheckList.length; i++) { this.$q.notify({
if (i > 0) { message: "请按顺序选择上课时段",
const cur = newCourseCheckList[i].Sort; position: "top",
const pre = newCourseCheckList[i - 1].Sort; type: "negative"
if (cur - pre > 1) { });
this.$q.notify({ return;
message: "请按顺序选择上课时段", }
position: "top",
type: "negative"
});
return;
} }
} }
this.saveMsg.Date = this.dateObj.date;
this.saveMsg.StuId = this.stuInfo.StuId;
this.saveMsg.StuName = this.stuInfo.StuName;
this.saveMsg.GuestId = this.stuInfo.GuestId;
this.saveMsg.CourseId = this.teaClassMsg.CourseId;
this.saveMsg.TeacherId = this.teaClassMsg.TeacherId;
this.saveMsg.ChapterNo = this.checkChapter.ChapterNo;
this.saveMsg.CourseGradeId = this.checkChapter.CourseRate;
this.saveMsg.ShiftSort = newCourseCheckList.map(e => e.Sort).toString();
} else if (this.editType == 2) {
this.saveMsg.Date = this.dateObj.date;
this.saveMsg.StuId = this.stuInfo.StuId;
this.saveMsg.StuName = this.stuInfo.StuName;
this.saveMsg.GuestId = this.stuInfo.GuestId;
this.saveMsg.CourseId = 0;
this.saveMsg.TeacherId = this.saveObj.Tid;
this.saveMsg.ChapterNo = this.saveObj.Ranks;
this.saveMsg.CourseGradeId = this.saveObj.CourseGradeId;
this.saveMsg.ShiftSort = this.saveObj.ShiftSort;
} }
this.saveMsg.Date = this.dateObj.date; this.addLoading = true;
this.saveMsg.StuId = this.stuInfo.StuId; SetAdminScrollAppointment(this.saveMsg)
this.saveMsg.StuName = this.stuInfo.StuName; .then(res => {
this.saveMsg.GuestId = this.stuInfo.GuestId; this.addLoading = false;
this.saveMsg.CourseId = this.teaClassMsg.CourseId; if (res.Code == 1) {
this.saveMsg.TeacherId = this.teaClassMsg.TeacherId; this.$q.notify({
this.saveMsg.ChapterNo = this.checkChapter.ChapterNo; message: "操作成功",
this.saveMsg.CourseGradeId = this.checkChapter.CourseRate; position: "top"
this.saveMsg.ShiftSort = newCourseCheckList.map(e => e.Sort).toString();
} else if (this.editType == 2) {
this.saveMsg.Date = this.dateObj.date;
this.saveMsg.StuId = this.stuInfo.StuId;
this.saveMsg.StuName = this.stuInfo.StuName;
this.saveMsg.GuestId = this.stuInfo.GuestId;
this.saveMsg.CourseId = 0;
this.saveMsg.TeacherId = this.saveObj.Tid;
this.saveMsg.ChapterNo = this.saveObj.Ranks;
this.saveMsg.CourseGradeId = this.saveObj.CourseGradeId;
this.saveMsg.ShiftSort = this.saveObj.ShiftSort;
}
this.addLoading = true;
SetAdminScrollAppointment(this.saveMsg)
.then(res => {
this.addLoading = false;
if (res.Code == 1) {
this.$q.notify({
message: "操作成功",
position: "top"
});
if (this.editType == 2) {
this.saveObj.GuestList.push({
GuestName: this.stuInfo.StuName,
AppointmentId: res.Data
}); });
if (this.editType == 1) {
this.addStuList.push(this.stuInfo.StuName)
}
if (this.editType == 2) {
this.saveObj.GuestList.push({
GuestName: this.stuInfo.StuName,
AppointmentId: res.Data
});
}
this.stuInfo = "";
this.getStu();
this.$emit("success");
} }
this.stuInfo = ""; })
this.getStu(); .catch(() => {
this.$emit("success"); this.addLoading = false;
} });
}) },
.catch(() => { detailSuccessHandle() {
this.addLoading = false; this.getStu();
}); this.$emit("success");
}, },
detailSuccessHandle() { detailCloseHandle() {
this.getStu(); this.changeDig(false);
this.$emit("success"); this.$emit("success");
}, },
detailCloseHandle() { showAddStu() {
this.changeDig(false); if (new Date(this.dateObj.date).getTime() < new Date(QCalendar.today()).getTime()) {
this.$emit("success"); return false;
}, } else {
showAddStu() { return true;
if (new Date(this.dateObj.date).getTime() < new Date(QCalendar.today()).getTime()) { }
return false;
} else {
return true;
} }
} }
} };
};
</script> </script>
<style> <style>
.q-calendar-daily__day-interval:hover { .q-calendar-daily__day-interval:hover {
background: rgba(0, 0, 255, 0.1); background: rgba(0, 0, 255, 0.1);
} }
.q-calendar-weekly__workweek:hover { .q-calendar-weekly__workweek:hover {
background: rgba(0, 0, 255, 0.1); background: rgba(0, 0, 255, 0.1);
} }
.q-calendar-weekly__day:hover {
background: rgba(0, 0, 255, 0.1);
}
.q-calendar-weekly__day:hover { .q-calendar-weekly__head-weekday:hover {
background: rgba(0, 0, 255, 0.1); background: rgba(0, 0, 255, 0.1);
} }
.q-calendar-weekly__head-weekday:hover { .q-calendar-scheduler__day:hover {
background: rgba(0, 0, 255, 0.1); background: rgba(0, 0, 255, 0.1);
} }
.q-calendar-scheduler__day:hover { .q-calendar-resource__resource-interval:hover {
background: rgba(0, 0, 255, 0.1); background: rgba(0, 0, 255, 0.1);
} }
.q-calendar-resource__resource-interval:hover { .q-calendar-daily__day:hover {
background: rgba(0, 0, 255, 0.1); background: rgba(0, 0, 255, 0.1);
} }
.q-calendar-daily__day:hover {
background: rgba(0, 0, 255, 0.1);
}
</style> </style>
<style> <style>
.upload-assiatant-box .q-uploader__list { .upload-assiatant-box .q-uploader__list {
display: none; display: none;
} }
.upload-assiatant-box .q-uploader {
width: auto;
}
.timeItem {
margin: 10px 0;
}
.upload-assiatant-box .q-uploader {
width: auto;
}
.timeItem {
margin: 10px 0;
}
</style> </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