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

页面修改

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