Commit 59885584 authored by 罗超's avatar 罗超

2

parent 7423bf7a
...@@ -10,8 +10,8 @@ ...@@ -10,8 +10,8 @@
<span v-if="subItem.TimeStr==='早上'" class="commonTimeStr greenTime">{{subItem.TimeStr}}</span> <span v-if="subItem.TimeStr==='早上'" class="commonTimeStr greenTime">{{subItem.TimeStr}}</span>
<span v-if="subItem.TimeStr==='下午'" class="commonTimeStr blueTime">{{subItem.TimeStr}}</span> <span v-if="subItem.TimeStr==='下午'" class="commonTimeStr blueTime">{{subItem.TimeStr}}</span>
<span v-if="subItem.TimeStr==='晚上'" class="commonTimeStr orangeTime">{{subItem.TimeStr}}</span> <span v-if="subItem.TimeStr==='晚上'" class="commonTimeStr orangeTime">{{subItem.TimeStr}}</span>
<span v-if="subItem.ClassType==2">试听课</span> <q-badge rounded color="orange" label="试听课" v-if="subItem.ClassType==2" style="margin-left:5px;font-size:10px"/>
<span v-if="subItem.ClassType==3">预约课</span> <q-badge rounded color="cyan-7" label="预约课" v-if="subItem.ClassType==3" style="margin-left:5px;font-size:10px"/>
<span style="color:red;margin:0 5px;">{{subItem.TeacherName}}</span> <span style="color:red;margin:0 5px;">{{subItem.TeacherName}}</span>
<span>[{{subItem.RoomName}}]</span> <span>[{{subItem.RoomName}}]</span>
</div> </div>
......
...@@ -80,14 +80,14 @@ ...@@ -80,14 +80,14 @@
<div class="row wrap shifttc"> <div class="row wrap shifttc">
<el-time-select class="q-mr-lg" v-model="shiftOption.StartTime" :picker-options="{ <el-time-select class="q-mr-lg" v-model="shiftOption.StartTime" :picker-options="{
start: '00:00', start: '00:00',
step: '00:15', step: '00:05',
end: '23:55', end: '23:55',
maxTime:shiftOption.EndTime maxTime:shiftOption.EndTime
}" placeholder="班次开始时间(格式00:00)"> }" placeholder="班次开始时间(格式00:00)">
</el-time-select> </el-time-select>
<el-time-select v-model="shiftOption.EndTime" :picker-options="{ <el-time-select v-model="shiftOption.EndTime" :picker-options="{
start: '06:00', start: '06:00',
step: '00:15', step: '00:05',
end: '23:55', end: '23:55',
minTime:shiftOption.StartTime minTime:shiftOption.StartTime
}" placeholder="班次结束时间(格式00:00)"> }" placeholder="班次结束时间(格式00:00)">
......
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
</q-field> </q-field>
<q-field filled label="进度" stack-label class="col-6"> <q-field filled label="进度" stack-label class="col-6">
<template v-slot:control> <template v-slot:control>
<div>{{ saveObj.Ranks }}/{{ saveObj.TotalPlanNum }} <span class="q-ml-sm">({{ saveObj.CourseGradeName }})</span></div> <div>{{ saveObj.Ranks }}/{{ saveObj.TotalPlanNum }} <span class="q-ml-sm" v-if="saveObj.ClassType == 3">({{ saveObj.CourseGradeName }})</span></div>
</template> </template>
</q-field> </q-field>
<q-field <q-field
......
...@@ -162,6 +162,7 @@ ...@@ -162,6 +162,7 @@
color="accent" color="accent"
label="添加" label="添加"
@click="subscribeCourse" @click="subscribeCourse"
:loading="addLoading"
class="q-ml-md" class="q-ml-md"
:disable="!stuInfo.StuId || stuInfo.StuId <= 0" :disable="!stuInfo.StuId || stuInfo.StuId <= 0"
/> />
...@@ -234,7 +235,7 @@ export default { ...@@ -234,7 +235,7 @@ export default {
this.stuInfo = ""; this.stuInfo = "";
this.teaClassMsg.CourseId=0 this.teaClassMsg.CourseId=0
this.teaClassMsg.TeacherId=0 this.teaClassMsg.TeacherId=0
this.teaClassMsg.chapterList=[] this.chapterList=[]
this.teacherTimeList=[] this.teacherTimeList=[]
this.courseCheckList=[] this.courseCheckList=[]
this.stuList=[] this.stuList=[]
...@@ -279,6 +280,7 @@ export default { ...@@ -279,6 +280,7 @@ export default {
stuInfo: "", stuInfo: "",
checkStuList: [], checkStuList: [],
courseCheckList: [], courseCheckList: [],
addLoading:false,
chapterList: [], //章节列表, chapterList: [], //章节列表,
checkChapter: {}, //选择的章节 checkChapter: {}, //选择的章节
returnString: [], //章节默认值 returnString: [], //章节默认值
...@@ -297,7 +299,8 @@ export default { ...@@ -297,7 +299,8 @@ export default {
getCourseList() { getCourseList() {
queryCourseDropdownList({ queryCourseDropdownList({
IsQPrice: 1, IsQPrice: 1,
IsQuerySalePlat: 1 IsQuerySalePlat: 1,
IsScrollClass :1
}).then(res => { }).then(res => {
if (res.Code == 1) { if (res.Code == 1) {
this.CourseList = res.Data; this.CourseList = res.Data;
...@@ -483,7 +486,9 @@ export default { ...@@ -483,7 +486,9 @@ 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
SetAdminScrollAppointment(this.saveMsg).then(res => { SetAdminScrollAppointment(this.saveMsg).then(res => {
this.addLoading=false
if (res.Code == 1) { if (res.Code == 1) {
this.getStu(); this.getStu();
this.stuInfo = ""; this.stuInfo = "";
...@@ -510,6 +515,8 @@ export default { ...@@ -510,6 +515,8 @@ export default {
this.$emit("success"); this.$emit("success");
} }
}).catch(()=>{
this.addLoading=false
}); });
}, },
......
...@@ -69,6 +69,7 @@ ...@@ -69,6 +69,7 @@
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd"
:clearable="false" :clearable="false"
@change="changeDate" @change="changeDate"
:picker-options="pickerOptions"
> >
</el-date-picker> </el-date-picker>
</template> </template>
...@@ -177,8 +178,31 @@ ...@@ -177,8 +178,31 @@
> >
<el-popover placement="top-start" width="200" trigger="hover"> <el-popover placement="top-start" width="200" trigger="hover">
<div slot="reference" style="height:80vh;position:relative"> <div slot="reference" style="height:80vh;position:relative">
<q-badge rounded color="red" label="未成班" style="position:absolute;top:0;right:0" v-if="viewType=='day'&&isShowTag(__item.GuestList.length, __item.ScrollMinNum)"/> <q-badge
<q-icon name="lock" color="res" style="position:absolute;top:0;right:0" v-if="viewType=='week'&&isShowTag(__item.GuestList.length, __item.ScrollMinNum)"/> rounded
color="red"
label="未成班"
style="position:absolute;top:0;right:0"
v-if="
viewType == 'day' &&
isShowTag(
__item.GuestList.length,
__item.ScrollMinNum
)
"
/>
<q-icon
name="lock"
color="res"
style="position:absolute;top:0;right:0"
v-if="
viewType == 'week' &&
isShowTag(
__item.GuestList.length,
__item.ScrollMinNum
)
"
/>
<div <div
v-if="viewType == 'day' || item.RList.length == 1" v-if="viewType == 'day' || item.RList.length == 1"
class="q-pa-xs" class="q-pa-xs"
...@@ -198,10 +222,8 @@ ...@@ -198,10 +222,8 @@
> >
</div> </div>
<div class="row flex no-wrap"> <div class="row flex no-wrap">
<span class="detailLabel">课程:</span <span class="detailLabel">课程:</span>
><div class="detailValue">{{ <div class="detailValue">{{ __item.CourseName }}</div>
__item.CourseName
}}</div>
</div> </div>
<div class="flex no-wrap"> <div class="flex no-wrap">
<span class="detailLabel">班级:</span <span class="detailLabel">班级:</span
...@@ -227,7 +249,9 @@ ...@@ -227,7 +249,9 @@
><span ><span
>{{ __item.Ranks }}/{{ __item.TotalPlanNum }}</span >{{ __item.Ranks }}/{{ __item.TotalPlanNum }}</span
> >
<span class="q-ml-sm">{{__item.CourseGradeName}}</span> <span class="q-ml-sm">{{
__item.CourseGradeName
}}</span>
</div> </div>
<div class="flex no-wrap" v-if="__item.ClassType !== 2"> <div class="flex no-wrap" v-if="__item.ClassType !== 2">
<span class="detailLabel">学员:</span <span class="detailLabel">学员:</span
...@@ -238,8 +262,15 @@ ...@@ -238,8 +262,15 @@
<div class="flex no-wrap" v-if="__item.ClassType == 3"> <div class="flex no-wrap" v-if="__item.ClassType == 3">
<span class="detailLabel"> <span class="detailLabel">
状态:<span></span 状态:<span></span
><span v-if="__item.AppointState == 1" style="color:#ef5350">待确认</span ><span
><span v-if="__item.AppointState == 2" style="color:#21ba45">已确认</span> v-if="__item.AppointState == 1"
style="color:#ef5350"
>待确认</span
><span
v-if="__item.AppointState == 2"
style="color:#21ba45"
>已确认</span
>
<q-btn <q-btn
color="accent" color="accent"
size="xs" size="xs"
...@@ -266,7 +297,15 @@ ...@@ -266,7 +297,15 @@
</div> </div>
</div> </div>
<div style="position:relative"> <div style="position:relative">
<q-badge rounded color="red" label="未成班" style="position:absolute;top:0;right:0" v-if="isShowTag(__item.GuestList.length, __item.ScrollMinNum)"/> <q-badge
rounded
color="red"
label="未成班"
style="position:absolute;top:0;right:0"
v-if="
isShowTag(__item.GuestList.length, __item.ScrollMinNum)
"
/>
<div class="flex"> <div class="flex">
<span class="detailLabel">老师:</span <span class="detailLabel">老师:</span
><span>{{ _item.TeacherName }}</span> ><span>{{ _item.TeacherName }}</span>
...@@ -290,7 +329,7 @@ ...@@ -290,7 +329,7 @@
<div class="flex no-wrap" v-if="__item.ClassType !== 2"> <div class="flex no-wrap" v-if="__item.ClassType !== 2">
<span class="detailLabel">进度</span <span class="detailLabel">进度</span
><span>{{ __item.Ranks }}/{{ __item.TotalPlanNum }}</span> ><span>{{ __item.Ranks }}/{{ __item.TotalPlanNum }}</span>
<span class="q-ml-sm">{{__item.CourseGradeName}}</span> <span class="q-ml-sm">{{ __item.CourseGradeName }}</span>
</div> </div>
<div class="flex no-wrap"> <div class="flex no-wrap">
<span class="detailLabel"> <span class="detailLabel">
...@@ -310,8 +349,15 @@ ...@@ -310,8 +349,15 @@
<div class="flex no-wrap" v-if="__item.ClassType == 3"> <div class="flex no-wrap" v-if="__item.ClassType == 3">
<span class="detailLabel"> <span class="detailLabel">
状态:<span></span 状态:<span></span
><span v-if="__item.AppointState == 1" style="color:#ef5350">待确认</span ><span
><span v-if="__item.AppointState == 2" style="color:#21ba45">已确认</span> v-if="__item.AppointState == 1"
style="color:#ef5350"
>待确认</span
><span
v-if="__item.AppointState == 2"
style="color:#21ba45"
>已确认</span
>
<q-btn <q-btn
color="accent" color="accent"
size="xs" size="xs"
...@@ -353,7 +399,8 @@ ...@@ -353,7 +399,8 @@
<script> <script>
import { import {
GetAppointmentPlanStat, GetAppointmentPlanStat,
SetSureAppointment SetSureAppointment,
GetAppointmentConfig
} from "../../api/studyabroad/subscribe.js"; } from "../../api/studyabroad/subscribe.js";
import { date } from "quasar"; import { date } from "quasar";
import { import {
...@@ -366,6 +413,20 @@ import QCalendar from "@quasar/quasar-ui-qcalendar"; ...@@ -366,6 +413,20 @@ import QCalendar from "@quasar/quasar-ui-qcalendar";
export default { export default {
data() { data() {
return { return {
config: {
AdvanceDay: 0,
AppointDay: 7,
},
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
); //设置选择今天以及今天之后的日期
}
},
viewType: "week", viewType: "week",
viewTypeList: [ viewTypeList: [
{ {
...@@ -449,16 +510,6 @@ export default { ...@@ -449,16 +510,6 @@ export default {
components: { components: {
SubscribeForm SubscribeForm
}, },
computed: {
// convert the events into a map of lists keyed by date
eventsMap() {
const map = {};
this.events.forEach(event =>
(map[event.date] = map[event.date] || []).push(event)
);
return map;
}
},
mounted() { mounted() {
this.selectedDate = QCalendar.today(); this.selectedDate = QCalendar.today();
this.getTeacherList(); this.getTeacherList();
...@@ -466,6 +517,7 @@ export default { ...@@ -466,6 +517,7 @@ export default {
this.msg.StartDate = this.$refs.calendar.lastStart; this.msg.StartDate = this.$refs.calendar.lastStart;
this.msg.EndDate = this.$refs.calendar.lastEnd; this.msg.EndDate = this.$refs.calendar.lastEnd;
this.getData(); this.getData();
this.getAppointmentConfig();
}, },
methods: { methods: {
badgeClasses(event, type, TeacherId) { badgeClasses(event, type, TeacherId) {
...@@ -625,12 +677,17 @@ export default { ...@@ -625,12 +677,17 @@ export default {
successHandle() { successHandle() {
this.getData(); this.getData();
}, },
isShowTag(n,min){ isShowTag(n, min) {
if(n<min){ if (n < min) {
return true return true;
}else{ } else {
return false return false;
} }
},
getAppointmentConfig() {
GetAppointmentConfig({}).then(res => {
this.config=res.Data
});
} }
} }
}; };
...@@ -658,6 +715,12 @@ export default { ...@@ -658,6 +715,12 @@ export default {
border: none; border: none;
background-color: transparent; background-color: transparent;
} }
.searchBox .el-input .el-input__inner,
.el-select .el-input {
border-radius: 0;
height: 25px;
}
.courseItem { .courseItem {
// overflow: auto; // overflow: auto;
// padding: 3px; // padding: 3px;
...@@ -683,10 +746,10 @@ export default { ...@@ -683,10 +746,10 @@ export default {
background: rgba(0, 0, 0, 0.1); background: rgba(0, 0, 0, 0.1);
} }
.detailLabel { .detailLabel {
width: 40px; width: 35px;
white-space: nowrap; white-space: nowrap;
} }
.detailValue{ .detailValue {
width: 100%; width: 100%;
display: inline-block; display: inline-block;
} }
......
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