Commit 1e26ecc0 authored by 罗超's avatar 罗超

2

parent 12ff5570
...@@ -39,6 +39,7 @@ ...@@ -39,6 +39,7 @@
:key="_index" :key="_index"
:val="_item" :val="_item"
@input="courseCheck(item.TeacherId, _item)" @input="courseCheck(item.TeacherId, _item)"
v-if="_item.ClassType==3"
> >
{{ item.TeacherName }} {{ _item.CourseName }} {{ item.TeacherName }} {{ _item.CourseName }}
{{ _item.RoomName }} {{ _item.StartTime }}-{{ {{ _item.RoomName }} {{ _item.StartTime }}-{{
......
...@@ -202,6 +202,14 @@ export default { ...@@ -202,6 +202,14 @@ export default {
message: "操作成功", message: "操作成功",
position: "top" position: "top"
}); });
this.checkStuType2.map((e)=>{
this.saveObj.GuestList.map((_e,_i)=>{
if(e==_e.AppointmentId){
this.saveObj.GuestList.splice(_i,1)
}
})
})
this.checkStuType2=[]
this.$emit("success"); this.$emit("success");
} }
}); });
...@@ -229,7 +237,7 @@ export default { ...@@ -229,7 +237,7 @@ export default {
position: "top", position: "top",
type: "positive" type: "positive"
}); });
this.$emit("success"); this.$emit("close");
} }
}); });
}, },
...@@ -243,7 +251,7 @@ export default { ...@@ -243,7 +251,7 @@ export default {
}, },
ChangeCourseSuccessHandle(){ ChangeCourseSuccessHandle(){
this.$emit("success"); this.$emit("close");
} }
} }
}; };
......
...@@ -21,8 +21,13 @@ ...@@ -21,8 +21,13 @@
</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" @success="detailSuccessHandle"/> <Detail
:dateObj="dateObj"
:saveObj="saveObj"
@success="detailSuccessHandle"
@close="detailCloseHandle"
/>
</div> </div>
<!-- 详情显示内容 end --> <!-- 详情显示内容 end -->
<q-select <q-select
...@@ -189,14 +194,14 @@ ...@@ -189,14 +194,14 @@
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: {
...@@ -230,19 +235,19 @@ export default { ...@@ -230,19 +235,19 @@ export default {
} }
}, },
watch: { watch: {
show(val){ show(val) {
if (val) { if (val) {
this.stuInfo = ""; this.stuInfo = "";
this.teaClassMsg.CourseId=0 this.teaClassMsg.CourseId = 0;
this.teaClassMsg.TeacherId=0 this.teaClassMsg.TeacherId = 0;
this.chapterList=[] this.chapterList = [];
this.teacherTimeList=[] this.teacherTimeList = [];
this.courseCheckList=[] this.courseCheckList = [];
this.stuList=[] this.stuList = [];
this.allStuList = [];
if (this.editType == 2) { if (this.editType == 2) {
this.getStu(); this.getStu();
} }
} }
} }
}, },
...@@ -280,11 +285,10 @@ export default { ...@@ -280,11 +285,10 @@ export default {
stuInfo: "", stuInfo: "",
checkStuList: [], checkStuList: [],
courseCheckList: [], courseCheckList: [],
addLoading:false, addLoading: false,
chapterList: [], //章节列表, chapterList: [], //章节列表,
checkChapter: {}, //选择的章节 checkChapter: {}, //选择的章节
returnString: [], //章节默认值 returnString: [] //章节默认值
}; };
}, },
mounted() { mounted() {
...@@ -294,13 +298,17 @@ export default { ...@@ -294,13 +298,17 @@ export default {
//开关弹窗 //开关弹窗
changeDig(val) { changeDig(val) {
this.$emit("changeshow", val); this.$emit("changeshow", val);
if (!val) {
this.stuList = [];
this.allStuList = [];
}
}, },
//获取课程 //获取课程
getCourseList() { getCourseList() {
queryCourseDropdownList({ queryCourseDropdownList({
IsQPrice: 1, IsQPrice: 1,
IsQuerySalePlat: 1, IsQuerySalePlat: 1,
IsScrollClass :1 IsScrollClass: 1
}).then(res => { }).then(res => {
if (res.Code == 1) { if (res.Code == 1) {
this.CourseList = res.Data; this.CourseList = res.Data;
...@@ -400,8 +408,8 @@ export default { ...@@ -400,8 +408,8 @@ export default {
if (this.checkChapter.CourseRate && this.checkChapter.ChapterNo) { if (this.checkChapter.CourseRate && this.checkChapter.ChapterNo) {
this.getStu(); this.getStu();
} }
this.teaClassMsg.TeacherId=0 this.teaClassMsg.TeacherId = 0;
this.teacherTimeList=[] this.teacherTimeList = [];
}, },
subscribeCourse() { subscribeCourse() {
if ( if (
...@@ -486,37 +494,27 @@ export default { ...@@ -486,37 +494,27 @@ export default {
this.saveMsg.CourseGradeId = this.saveObj.CourseGradeId; this.saveMsg.CourseGradeId = this.saveObj.CourseGradeId;
this.saveMsg.ShiftSort = this.saveObj.ShiftSort; this.saveMsg.ShiftSort = this.saveObj.ShiftSort;
} }
this.addLoading=true this.addLoading = true;
SetAdminScrollAppointment(this.saveMsg).then(res => { SetAdminScrollAppointment(this.saveMsg)
this.addLoading=false .then(res => {
this.addLoading = false;
if (res.Code == 1) { if (res.Code == 1) {
this.getStu();
this.stuInfo = "";
if(this.editType==1){
this.$q
.dialog({
title: "预约成功",
message: "是否继续预约?",
cancel: "否",
ok: "是",
persistent: true
})
.onOk(() => {})
.onCancel(() => {
this.changeDig(false);
});
}else if(this.editType==2){
this.changeDig(false);
this.$q.notify({ this.$q.notify({
message: "操作成功", message: "操作成功",
position: "top", position: "top"
}); });
}
this.saveObj.GuestList.push({
GuestName:this.stuInfo.StuName,
AppointmentId:res.Data
})
this.stuInfo = "";
this.getStu();
this.$emit("success"); this.$emit("success");
} }
}).catch(()=>{ })
this.addLoading=false .catch(() => {
this.addLoading = false;
}); });
}, },
...@@ -530,7 +528,11 @@ export default { ...@@ -530,7 +528,11 @@ export default {
return true; return true;
} }
}, },
detailSuccessHandle(){ detailSuccessHandle() {
this.getStu();
this.$emit("success");
},
detailCloseHandle() {
this.changeDig(false); this.changeDig(false);
this.$emit("success"); this.$emit("success");
} }
......
...@@ -86,6 +86,7 @@ ...@@ -86,6 +86,7 @@
emit-value emit-value
map-options map-options
label="显示模式" label="显示模式"
@input ="changeDate"
/> />
</div> </div>
</div> </div>
...@@ -123,6 +124,7 @@ ...@@ -123,6 +124,7 @@
animated animated
transition-prev="slide-right" transition-prev="slide-right"
transition-next="slide-left" transition-next="slide-left"
:weekdays="[1, 2, 3, 4, 5, 6, 0]"
@input="onModelChanged" @input="onModelChanged"
@click:date2="onClickDate2" @click:date2="onClickDate2"
@click:day:header2="onClickDayHeader2" @click:day:header2="onClickDayHeader2"
...@@ -146,9 +148,10 @@ ...@@ -146,9 +148,10 @@
:label="item.TeacherName" :label="item.TeacherName"
v-for="(item, index) in legendList" v-for="(item, index) in legendList"
:key="index" :key="index"
style="height:20px" class="q-mr-xs"
:style="{ width: `${(1 / legendList.length) * 100}%` }"
/> />
<!-- style="height:20px"
:style="{ width: `${(1 / legendList.length) * 100}%` }" -->
</div> </div>
</template> </template>
...@@ -275,7 +278,7 @@ ...@@ -275,7 +278,7 @@
color="accent" color="accent"
size="xs" size="xs"
label="确认" label="确认"
v-if="__item.AppointState == 1" v-if="__item.AppointState == 1&&__item.GuestList.length>=__item.ScrollMinNum"
@click=" @click="
confirmSub( confirmSub(
item.ClassDate, item.ClassDate,
...@@ -360,7 +363,7 @@ ...@@ -360,7 +363,7 @@
color="accent" color="accent"
size="xs" size="xs"
label="确认" label="确认"
v-if="__item.AppointState == 1" v-if="__item.AppointState == 1&&__item.GuestList.length>=__item.ScrollMinNum"
@click=" @click="
confirmSub(item.ClassDate, _item.TeacherId, __item) confirmSub(item.ClassDate, _item.TeacherId, __item)
" "
...@@ -417,12 +420,12 @@ export default { ...@@ -417,12 +420,12 @@ export default {
}, },
pickerOptions: { pickerOptions: {
disabledDate: time => { disabledDate: time => {
//time跟页面没有关系 相当于日期数组
let timeRange = this.config.AppointDay * 24 * 60 * 60 * 1000; // 7天 // let timeRange = this.config.AppointDay * 24 * 60 * 60 * 1000;
let _maxTime = Date.now() - 8.64e7 + timeRange; // 最大时间 // let _maxTime = Date.now() - 8.64e7 + timeRange; // 最大时间
return ( // return (
time.getTime() < Date.now() - 8.64e7 || time.getTime() > _maxTime // time.getTime() < Date.now() - 8.64e7 || time.getTime() > _maxTime
); //设置选择今天以及今天之后的日期 // );
} }
}, },
viewType: "week", viewType: "week",
...@@ -686,7 +689,7 @@ export default { ...@@ -686,7 +689,7 @@ export default {
GetAppointmentConfig({}).then(res => { GetAppointmentConfig({}).then(res => {
this.config = res.Data; this.config = res.Data;
}); });
} },
} }
}; };
</script> </script>
......
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