Commit 3c3fc762 authored by 黄奎's avatar 黄奎

页面修改

parent 94d7e325
...@@ -87,16 +87,21 @@ ...@@ -87,16 +87,21 @@
getTeacherDropDownList({ getTeacherDropDownList({
LeaveStatus: 1, LeaveStatus: 1,
}).then(res => { }).then(res => {
var obj2 = {
TeacherName: "消课",
TId: 0
};
this.TeacherList = res.Data; this.TeacherList = res.Data;
this.TeacherList.unshift(obj2);
}); });
}, },
save() { save() {
if (this.teacherObj.Tid == 0) { if (this.teacherObj.Tid == 0) {
this.$q.notify({ // this.$q.notify({
message: "请选择老师", // message: "请选择老师",
position: "top" // position: "top"
}); // });
return; // return;
} }
const saveMsg = { const saveMsg = {
Date: this.date, Date: this.date,
...@@ -111,7 +116,6 @@ ...@@ -111,7 +116,6 @@
message: "操作成功", message: "操作成功",
position: "top" position: "top"
}); });
var tempTeacher = this.TeacherList.find(qitem => qitem.TId == this.teacherObj.Tid); var tempTeacher = this.TeacherList.find(qitem => qitem.TId == this.teacherObj.Tid);
this.$emit("success", { this.$emit("success", {
Name: tempTeacher.TeacherName, Name: tempTeacher.TeacherName,
......
...@@ -595,14 +595,14 @@ ...@@ -595,14 +595,14 @@
} }
} }
if (!this.saveMsg.TeacherId) { // if (!this.saveMsg.TeacherId) {
this.$q.notify({ // this.$q.notify({
type: 'negative', // type: 'negative',
position: "top", // position: "top",
message: `请选择老师` // message: `请选择老师`
}) // })
return; // return;
} // }
if (!this.stuInfo) { if (!this.stuInfo) {
this.$q.notify({ this.$q.notify({
......
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
<q-badge style="background:#eb3b5a;color:black;">待确认</q-badge>&nbsp; <q-badge style="background:#eb3b5a;color:black;">待确认</q-badge>&nbsp;
<q-badge style="background:yellow;color:black;">待上课</q-badge>&nbsp; <q-badge style="background:yellow;color:black;">待上课</q-badge>&nbsp;
<q-badge style="background:#20bf6b;color:black;">已上课</q-badge>&nbsp; <q-badge style="background:#20bf6b;color:black;">已上课</q-badge>&nbsp;
<q-badge style="background:#CA8EFF;color:black;">学员消课(无老师,不计算老师课时费)</q-badge>&nbsp;
<font style="color:blue;">{{msg.StartDate}}~{{msg.EndDate}} 排课计划</font>&nbsp; <font style="color:blue;">{{msg.StartDate}}~{{msg.EndDate}} 排课计划</font>&nbsp;
<q-btn dense text-color="primary" flat unelevated :label="viewType == 'day' ? '上一天' : '上一周'" <q-btn dense text-color="primary" flat unelevated :label="viewType == 'day' ? '上一天' : '上一周'"
@click="calendarPrev" /> @click="calendarPrev" />
...@@ -57,7 +58,7 @@ ...@@ -57,7 +58,7 @@
{{rootItem.ClassDate}}<br />({{rootItem.WeekStr}}) {{rootItem.ClassDate}}<br />({{rootItem.WeekStr}})
</th> </th>
<template v-for="(item, index) in rootItem.RList"> <template v-for="(item, index) in rootItem.RList">
<template v-if="item.Dept_Id==8"> <template v-if="item.Dept_Id==8||item.TeacherId==0">
<th :key="`r_teacher_`+rootIndex+index" style="width:100px;"> <th :key="`r_teacher_`+rootIndex+index" style="width:100px;">
{{item.TeacherName}} {{item.TeacherName}}
</th> </th>
...@@ -77,7 +78,7 @@ ...@@ -77,7 +78,7 @@
({{timeItem.ClassHours}}课时) ({{timeItem.ClassHours}}课时)
</td> </td>
<template v-for="(aItem, aIndex) in rootItem.RList"> <template v-for="(aItem, aIndex) in rootItem.RList">
<template v-if="aItem.Dept_Id==8"> <template v-if="aItem.Dept_Id==8||aItem.TeacherId==0">
<td :key="`r_a_`+rootIndex+aIndex" style="width:100px;cursor:pointer;" <td :key="`r_a_`+rootIndex+aIndex" style="width:100px;cursor:pointer;"
@click="showDetail(aItem,rootItem.ClassDate,aItem.TeacherId,timeItem)" @click="showDetail(aItem,rootItem.ClassDate,aItem.TeacherId,timeItem)"
:class="getAppointItemClass(aItem,timeItem)"> :class="getAppointItemClass(aItem,timeItem)">
...@@ -279,6 +280,8 @@ ...@@ -279,6 +280,8 @@
str = "unstudy"; str = "unstudy";
} else if (obj.State == 3) { } else if (obj.State == 3) {
str = "study-normal"; str = "study-normal";
} else if (obj.State == 6) {
str = "stu-check";
} }
} }
return str; return str;
...@@ -453,6 +456,7 @@ ...@@ -453,6 +456,7 @@
}, },
} }
}; };
</script> </script>
<style lang="scss"> <style lang="scss">
.viewbox { .viewbox {
...@@ -492,6 +496,11 @@ ...@@ -492,6 +496,11 @@
background: #20bf6b; background: #20bf6b;
} }
.viewbox .appointtable .stu-check {
background: #CA8EFF;
}
.calendar-container { .calendar-container {
position: relative; position: relative;
overflow: auto; overflow: auto;
...@@ -522,4 +531,5 @@ ...@@ -522,4 +531,5 @@
width: 100%; width: 100%;
display: inline-block; display: inline-block;
} }
</style>
\ No newline at end of file </style>
...@@ -59,12 +59,12 @@ ...@@ -59,12 +59,12 @@
@click:interval:header2="onClickIntervalHeader2"> @click:interval:header2="onClickIntervalHeader2">
<template #day-header="{ timestamp }"> <template #day-header="{ timestamp }">
<div v-if="viewType == 'week'"> <div v-if="viewType == 'week'">
<q-badge :color="item.bg" :label="item.TeacherName" v-for="(item, index) in legendList" :key="index" <q-badge :color="item.bg" :label="item.TeacherName" v-for="(item, index) in legendList" v-if="item.TId>0"
class="q-mr-xs" /> :key="index" class="q-mr-xs" />
</div> </div>
<div class="flex no-wrap" v-if="viewType == 'day'"> <div class="flex no-wrap" v-if="viewType == 'day'">
<q-badge :color="item.bg" :label="item.TeacherName" v-for="(item, index) in legendList" :key="index" <q-badge :color="item.bg" :label="item.TeacherName" v-for="(item, index) in legendList" v-if="item.TId>0"
style="height:20px" :style="{ width: `${(1 / legendList.length) * 100}%` }" /> :key="index" style="height:20px" :style="{ width: `${(1 / legendList.length) * 100}%` }" />
</div> </div>
</template> </template>
...@@ -430,6 +430,7 @@ ...@@ -430,6 +430,7 @@
methods: { methods: {
badgeClasses(event, type, TeacherId) { badgeClasses(event, type, TeacherId) {
const bg = this.getColor(TeacherId); const bg = this.getColor(TeacherId);
return { return {
[`text-white bg-${bg}`]: true [`text-white bg-${bg}`]: true
}; };
...@@ -507,6 +508,11 @@ ...@@ -507,6 +508,11 @@
}; };
this.TeacherList.unshift(obj); this.TeacherList.unshift(obj);
this.legendList = JSON.parse(JSON.stringify(res.Data)); this.legendList = JSON.parse(JSON.stringify(res.Data));
var obj2 = {
TeacherName: "消课",
TId: 0
};
this.legendList.unshift(obj2);
this.legendList.forEach((item, index) => { this.legendList.forEach((item, index) => {
item.bg = this.colorList[index]; item.bg = this.colorList[index];
}); });
......
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