Commit 18a23dab authored by 罗超's avatar 罗超

2

parent d6d85367
...@@ -73,7 +73,7 @@ ...@@ -73,7 +73,7 @@
color="accent" color="accent"
size="xs" size="xs"
label="确认" label="确认"
v-if="saveObj.AppointState == 1&&saveObj.GuestList.length>=saveObj.ScrollMinNum" v-if="saveObj.AppointState == 1&&saveObj.GuestList.length>=saveObj.ScrollMinNum&&auth.IsEdit"
@click="confirmSub" @click="confirmSub"
class="q-ml-md" class="q-ml-md"
/> />
...@@ -110,7 +110,7 @@ ...@@ -110,7 +110,7 @@
v-if="saveObj.ClassType == 3" v-if="saveObj.ClassType == 3"
> >
<template v-slot:control> <template v-slot:control>
<div v-if="saveObj.AppointState == 1"> <div v-if="saveObj.AppointState == 1&&auth.IsEdit">
<div class="q-mt-sm flex justify-start"> <div class="q-mt-sm flex justify-start">
<q-btn <q-btn
color="accent" color="accent"
...@@ -179,6 +179,14 @@ export default { ...@@ -179,6 +179,14 @@ export default {
saveObj: { saveObj: {
type: Object, type: Object,
default: null default: null
},
auth:{
type:Object,
default:()=>{
return {
IsEdit:false
}
}
} }
}, },
data() { data() {
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
<Detail <Detail
:dateObj="dateObj" :dateObj="dateObj"
:saveObj="saveObj" :saveObj="saveObj"
:auth="auth"
@success="detailSuccessHandle" @success="detailSuccessHandle"
@close="detailCloseHandle" @close="detailCloseHandle"
/> />
...@@ -134,7 +135,7 @@ ...@@ -134,7 +135,7 @@
</q-field> </q-field>
<div <div
class="row col" class="row col"
v-show="(editType == 1 || saveObj.ClassType == 3) && showAddStu()" v-show="(editType == 1 || saveObj.ClassType == 3)&&auth.IsEdit"
> >
<div class="col-10"> <div class="col-10">
<q-select <q-select
...@@ -231,10 +232,20 @@ export default { ...@@ -231,10 +232,20 @@ export default {
teacherList: { teacherList: {
type: Array, type: Array,
default: () => [] default: () => []
},
auth:{
type:Object,
default:()=>{
return {
IsEdit:false
}
}
} }
}, },
watch: { watch: {
show(val) { show(val) {
console.log(1111111)
this.addLoading = false
if (val) { if (val) {
this.stuInfo = ""; this.stuInfo = "";
this.teaClassMsg.CourseId = 0; this.teaClassMsg.CourseId = 0;
...@@ -350,6 +361,7 @@ export default { ...@@ -350,6 +361,7 @@ export default {
this.teacherTimeList = res.Data; this.teacherTimeList = res.Data;
}); });
}, },
//获取学生列表
getStu() { getStu() {
this.stuMsg.CourseId = this.teaClassMsg.CourseId || 0; this.stuMsg.CourseId = this.teaClassMsg.CourseId || 0;
this.stuMsg.CourseGradeId = this.stuMsg.CourseGradeId =
...@@ -361,7 +373,7 @@ export default { ...@@ -361,7 +373,7 @@ export default {
this.allStuList = JSON.parse(JSON.stringify(res.Data)); this.allStuList = JSON.parse(JSON.stringify(res.Data));
}); });
}, },
//筛选学 //筛选学
filterStu(val, update) { filterStu(val, update) {
update(() => { update(() => {
if (val === "") { if (val === "") {
...@@ -518,17 +530,6 @@ export default { ...@@ -518,17 +530,6 @@ export default {
this.addLoading = false; this.addLoading = false;
}); });
}, },
showAddStu() {
if (
new Date(this.dateObj.date).getTime() <
new Date(QCalendar.today()).getTime()
) {
return false;
} else {
return true;
}
},
detailSuccessHandle() { detailSuccessHandle() {
this.getStu(); this.getStu();
this.$emit("success"); this.$emit("success");
......
<template> <template>
<div class="page-body" style="width: 100%;"> <div class="page-body">
<div class="col row wrap q-mr-lg q-col-gutter-md searchBox"> <div class="col row wrap q-mr-lg q-col-gutter-md searchBox">
<div class="col-2"> <div class="col-2">
<q-select <q-select
...@@ -86,7 +86,7 @@ ...@@ -86,7 +86,7 @@
emit-value emit-value
map-options map-options
label="显示模式" label="显示模式"
@input ="changeDate" @input="changeDate"
/> />
</div> </div>
</div> </div>
...@@ -109,13 +109,13 @@ ...@@ -109,13 +109,13 @@
@click="calendarNext" @click="calendarNext"
/> />
</div> </div>
<div class="viewbox">
<q-calendar <q-calendar
v-model="selectedDate" v-model="selectedDate"
:view="viewType" :view="viewType"
ref="calendar" ref="calendar"
locale="zh-CN" locale="zh-CN"
class="calendar-container" class="calendar-container "
style="height:calc(100% - 32px)"
bordered bordered
hour24-format hour24-format
:interval-start="8" :interval-start="8"
...@@ -133,7 +133,7 @@ ...@@ -133,7 +133,7 @@
@click:interval:header2="onClickIntervalHeader2" @click:interval:header2="onClickIntervalHeader2"
> >
<template #day-header="{ timestamp }"> <template #day-header="{ timestamp }">
<div class="justify-center items-center " v-if="viewType == 'week'"> <div v-if="viewType == 'week'">
<q-badge <q-badge
:color="item.bg" :color="item.bg"
:label="item.TeacherName" :label="item.TeacherName"
...@@ -142,16 +142,15 @@ ...@@ -142,16 +142,15 @@
class="q-mr-xs" class="q-mr-xs"
/> />
</div> </div>
<div class="justify-center items-center " v-if="viewType == 'day'"> <div class="flex no-wrap" v-if="viewType == 'day'">
<q-badge <q-badge
:color="item.bg" :color="item.bg"
:label="item.TeacherName" :label="item.TeacherName"
v-for="(item, index) in legendList" v-for="(item, index) in legendList"
:key="index" :key="index"
class="q-mr-xs" style="height:20px"
:style="{ width: `${(1 / legendList.length) * 100}%` }"
/> />
<!-- style="height:20px"
:style="{ width: `${(1 / legendList.length) * 100}%` }" -->
</div> </div>
</template> </template>
...@@ -195,8 +194,8 @@ ...@@ -195,8 +194,8 @@
" "
/> />
<q-icon <q-icon
name="lock" name="lock_open"
color="res" color="dark"
style="position:absolute;top:0;right:0" style="position:absolute;top:0;right:0"
v-if=" v-if="
viewType == 'week' && viewType == 'week' &&
...@@ -243,7 +242,9 @@ ...@@ -243,7 +242,9 @@
类型:<span></span 类型:<span></span
><span v-if="__item.ClassType == 1">跟班</span ><span v-if="__item.ClassType == 1">跟班</span
><span v-if="__item.ClassType == 2">试听课</span ><span v-if="__item.ClassType == 2">试听课</span
><span v-if="__item.ClassType == 3">约课</span></span ><span v-if="__item.ClassType == 3"
>约课</span
></span
> >
</div> </div>
...@@ -278,7 +279,12 @@ ...@@ -278,7 +279,12 @@
color="accent" color="accent"
size="xs" size="xs"
label="确认" label="确认"
v-if="__item.AppointState == 1&&__item.GuestList.length>=__item.ScrollMinNum" v-if="
__item.AppointState == 1 &&
__item.GuestList.length >=
__item.ScrollMinNum &&
auth.IsEdit
"
@click=" @click="
confirmSub( confirmSub(
item.ClassDate, item.ClassDate,
...@@ -306,7 +312,10 @@ ...@@ -306,7 +312,10 @@
label="未成班" label="未成班"
style="position:absolute;top:0;right:0" style="position:absolute;top:0;right:0"
v-if=" v-if="
isShowTag(__item.GuestList.length, __item.ScrollMinNum) isShowTag(
__item.GuestList.length,
__item.ScrollMinNum
)
" "
/> />
<div class="flex"> <div class="flex">
...@@ -327,12 +336,18 @@ ...@@ -327,12 +336,18 @@
</div> </div>
<div class="flex no-wrap"> <div class="flex no-wrap">
<span class="detailLabel">时间:</span <span class="detailLabel">时间:</span
><span>{{ __item.StartTime }}-{{ __item.EndTime }}</span> ><span
>{{ __item.StartTime }}-{{ __item.EndTime }}</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
><span>{{ __item.Ranks }}/{{ __item.TotalPlanNum }}</span> ><span
<span class="q-ml-sm">{{ __item.CourseGradeName }}</span> >{{ __item.Ranks }}/{{ __item.TotalPlanNum }}</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 <span class="detailLabel"> 类型:</span
...@@ -363,9 +378,18 @@ ...@@ -363,9 +378,18 @@
color="accent" color="accent"
size="xs" size="xs"
label="确认" label="确认"
v-if="__item.AppointState == 1&&__item.GuestList.length>=__item.ScrollMinNum" v-if="
__item.AppointState == 1 &&
__item.GuestList.length >=
__item.ScrollMinNum &&
auth.IsEdit
"
@click=" @click="
confirmSub(item.ClassDate, _item.TeacherId, __item) confirmSub(
item.ClassDate,
_item.TeacherId,
__item
)
" "
/> />
</span> </span>
...@@ -386,11 +410,14 @@ ...@@ -386,11 +410,14 @@
</div> </div>
</template> </template>
</q-calendar> </q-calendar>
</div>
<SubscribeForm <SubscribeForm
v-model="showForm" v-model="showForm"
:editType="editType" :editType="editType"
:dateObj="dateObj" :dateObj="dateObj"
:saveObj="saveObj" :saveObj="saveObj"
:auth="auth"
:teacherList="TeacherList2" :teacherList="TeacherList2"
@success="successHandle" @success="successHandle"
/> />
...@@ -420,7 +447,6 @@ export default { ...@@ -420,7 +447,6 @@ export default {
}, },
pickerOptions: { pickerOptions: {
disabledDate: time => { disabledDate: time => {
// let timeRange = this.config.AppointDay * 24 * 60 * 60 * 1000; // 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 (
...@@ -505,7 +531,10 @@ export default { ...@@ -505,7 +531,10 @@ export default {
TeacherList2: [], TeacherList2: [],
events: [], events: [],
dateObj: {}, dateObj: {},
saveObj: {} saveObj: {},
auth: {
IsEdit: false
}
}; };
}, },
components: { components: {
...@@ -519,6 +548,15 @@ export default { ...@@ -519,6 +548,15 @@ export default {
this.msg.EndDate = this.$refs.calendar.lastEnd; this.msg.EndDate = this.$refs.calendar.lastEnd;
this.getData(); this.getData();
this.getAppointmentConfig(); this.getAppointmentConfig();
const ActionMenuList = JSON.parse(localStorage.getItem("loginUserInfo")).data.ActionMenuList
const res = ActionMenuList.find(e => {
return e.FunctionCode == "subscribe_edit";
});
if (res) {
this.auth.IsEdit = true;
} else {
this.auth.IsEdit = false;
}
}, },
methods: { methods: {
badgeClasses(event, type, TeacherId) { badgeClasses(event, type, TeacherId) {
...@@ -570,7 +608,7 @@ export default { ...@@ -570,7 +608,7 @@ export default {
}, 100); }, 100);
}, },
getTeacherList() { getTeacherList() {
getTeacherDropDownList({ LeaveStatus: 1,IsShow :1 }).then(res => { getTeacherDropDownList({ LeaveStatus: 1, IsShow: 1 }).then(res => {
if (res.Code == 1) { if (res.Code == 1) {
this.TeacherList = JSON.parse(JSON.stringify(res.Data)); this.TeacherList = JSON.parse(JSON.stringify(res.Data));
var obj = { var obj = {
...@@ -605,7 +643,19 @@ export default { ...@@ -605,7 +643,19 @@ export default {
}, },
getData() { getData() {
GetAppointmentPlanStat(this.msg).then(res => { GetAppointmentPlanStat(this.msg).then(res => {
this.events = res.Data; // this.events = res.Data;
let data = JSON.parse(JSON.stringify(res.Data));
res.Data.map((e, i) => {
data[i].RList = [];
e.RList.map(x => {
this.legendList.map(y => {
if (y.TId == x.TeacherId) {
data[i].RList.push(x);
}
});
});
});
this.events = data;
}); });
}, },
changeDate() { changeDate() {
...@@ -637,10 +687,13 @@ export default { ...@@ -637,10 +687,13 @@ export default {
onClickDayHeader2(data) {}, onClickDayHeader2(data) {},
onClickInterval2(data) {}, onClickInterval2(data) {},
onClickTime2(data) { onClickTime2(data) {
//小于今天,不显示弹窗
if (this.showAddStu(data.scope.timestamp.date) && this.auth.IsEdit) {
this.showForm = true; this.showForm = true;
this.editType = 1; this.editType = 1;
this.saveObj = {}; this.saveObj = {};
this.dateObj = data.scope.timestamp; this.dateObj = data.scope.timestamp;
}
}, },
onClickIntervalHeader2(data) {}, onClickIntervalHeader2(data) {},
showDetail(data, date, tid) { showDetail(data, date, tid) {
...@@ -690,28 +743,33 @@ export default { ...@@ -690,28 +743,33 @@ export default {
this.config = res.Data; this.config = res.Data;
}); });
}, },
showAddStu(date) {
if (new Date(date).getTime() < new Date(QCalendar.today()).getTime()) {
return false;
} else {
return true;
}
}
} }
}; };
</script> </script>
<style lang="sass">
.calendar-container
position: relative
.my-event
// width: 100%
position: absolute
font-size: 12px
// .full-width
// left: 0
// width: 100%
// .left-side
// left: 0
// width: 49.75%
// .right-side
// left: 50.25%
// width: 49.75%
</style>
<style lang="scss"> <style lang="scss">
.viewbox {
// width:1500px;
overflow-x: auto;
box-sizing: border-box;
}
.calendar-container {
position: relative;
// height: calc(100% - 32px);
// width: 200%;
overflow: auto;
}
.my-event {
position: absolute;
font-size: 12px;
}
.searchBox .el-input__inner { .searchBox .el-input__inner {
border: none; border: none;
background-color: transparent; background-color: transparent;
...@@ -727,25 +785,6 @@ export default { ...@@ -727,25 +785,6 @@ export default {
// padding: 3px; // padding: 3px;
height: 100%; height: 100%;
} }
.courseItem::-webkit-scrollbar {
/*滚动条整体样式*/
width: 4px; /*高宽分别对应横竖滚动条的尺寸*/
height: 4px;
scrollbar-arrow-color: #999;
}
.courseItem::-webkit-scrollbar-thumb {
/*滚动条里面小方块*/
border-radius: 5px;
-webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
background: rgba(0, 0, 0, 0.2);
scrollbar-arrow-color: #999;
}
.courseItem::-webkit-scrollbar-track {
/*滚动条里面轨道*/
-webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
border-radius: 0;
background: rgba(0, 0, 0, 0.1);
}
.detailLabel { .detailLabel {
width: 35px; width: 35px;
white-space: nowrap; white-space: nowrap;
......
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