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

2

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