|
@@ -61,8 +61,7 @@
|
|
|
</el-col>
|
|
|
<el-col :span="12" class="month">
|
|
|
<span>{{currentDateStr }}排班情况</span>
|
|
|
- {{NowHours}}
|
|
|
- <!-- {{DutyTemplateListInfo}} -->
|
|
|
+ <!-- {{DutyTemplateListSTUS}} -->
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-row :gutter="24">
|
|
@@ -91,21 +90,21 @@
|
|
|
<el-table-column width="150" label="日期" header-align="center" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
<span
|
|
|
- :class="[scope.$index == 0?'date-time-active':'']"
|
|
|
+ :class="[DaytimeFn(scope.row.arrangeDate) >0 ||timeFn(Nowyear+'-'+Nowmonth+'-' + D +scope.row.startInterval+':' + '00') >= -4 && DaytimeFn(scope.row.arrangeDate)>=0?'date-time-active':'']"
|
|
|
>{{scope.row.startInterval}}-{{scope.row.endInterval}}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column width="60" label="最少" header-align="center" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
<span
|
|
|
- :class="[scope.$index == 0?'date-time-active':'']"
|
|
|
+ :class="[DaytimeFn(scope.row.arrangeDate) >0 ||timeFn(Nowyear+'-'+Nowmonth+'-' + D +scope.row.startInterval+':' + '00') >= -4 && DaytimeFn(scope.row.arrangeDate)>=0?'date-time-active':'']"
|
|
|
>{{scope.row.miniNum}}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column width="60" label="饱和" header-align="center" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
<span
|
|
|
- :class="[scope.$index == 0?'date-time-active':'']"
|
|
|
+ :class="[DaytimeFn(scope.row.arrangeDate) >0 ||timeFn(Nowyear+'-'+Nowmonth+'-' + D +scope.row.startInterval+':' + '00') >= -4 && DaytimeFn(scope.row.arrangeDate)>=0?'date-time-active':'']"
|
|
|
>{{scope.row.maxNum}}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -113,7 +112,7 @@
|
|
|
<el-table-column width="60" label="已选" header-align="center" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
<span
|
|
|
- :class="[scope.$index == 0?'date-time-active':'']"
|
|
|
+ :class="[DaytimeFn(scope.row.arrangeDate) >0 ||timeFn(Nowyear+'-'+Nowmonth+'-' + D +scope.row.startInterval+':' + '00') >= -4 && DaytimeFn(scope.row.arrangeDate)>=0?'date-time-active':'']"
|
|
|
>{{scope.row.haveNum}}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -125,20 +124,18 @@
|
|
|
align="center"
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
- <el-button
|
|
|
- size="small"
|
|
|
- type="primary"
|
|
|
- @click="isShow(1,scope.row.id)"
|
|
|
- round
|
|
|
- :class="[scope.$index == 0?'date-btn-active':'']"
|
|
|
- >排班</el-button>
|
|
|
+ <div
|
|
|
+ :class="[DaytimeFn(scope.row.arrangeDate) >0 ||timeFn(Nowyear+'-'+Nowmonth+'-' + D +scope.row.startInterval+':' + '00') >= -4 && DaytimeFn(scope.row.arrangeDate)>=0?'date-btn-active':'Buttonhole']"
|
|
|
+ @click="isShow(1,scope.row.id,timeFn(Nowyear+'-'+Nowmonth+'-' + D +scope.row.startInterval+':' + '00'),DaytimeFn(scope.row.arrangeDate))"
|
|
|
+ >排班</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
<div
|
|
|
slot="reference"
|
|
|
+
|
|
|
@click="classSet(index,item.date,item.month,item.dateList.intervalList)"
|
|
|
- :class="[item.status ? 'checked' : '']"
|
|
|
+ :class="[item.pastDay ? 'psatchecked' : '']"
|
|
|
class="day-setting"
|
|
|
>
|
|
|
<!-- {{FindCalendarList}} -->
|
|
@@ -155,7 +152,7 @@
|
|
|
<div class="people-items">
|
|
|
<div
|
|
|
class="people-items-num"
|
|
|
- :class="[item.dateList.haveNum >= item.dateList.miniNum?'num-red':'']"
|
|
|
+ :class="[item.dateList.haveNum < item.dateList.miniNum?'num-red':'']"
|
|
|
>{{item.dateList.haveNum}}</div>
|
|
|
<div class="people-items-text">已选</div>
|
|
|
</div>
|
|
@@ -169,21 +166,20 @@
|
|
|
</el-row>
|
|
|
</el-col>
|
|
|
<!--排班设置-->
|
|
|
+ <!-- <SuperworkListSeting v-if="this.modelindex == 1"></SuperworkListSeting> -->
|
|
|
<el-col :span="17" class="main" v-if="modelindex == 1">
|
|
|
<el-row :gutter="20">
|
|
|
<el-col :span="18" class="month" :offset="2">
|
|
|
<span>{{currentDateStr }}排班设置</span>
|
|
|
- <div class="model-btn-items model-grdeen" style="float:right" @click="saveOpenCloseDAys()">保存</div>
|
|
|
+ <div
|
|
|
+ class="model-btn-items model-grdeen"
|
|
|
+ style="float:right"
|
|
|
+ @click="saveOpenCloseDAys()"
|
|
|
+ >保存</div>
|
|
|
</el-col>
|
|
|
- <!-- <el-col :span="4" >
|
|
|
- <div class="model-btn">
|
|
|
-
|
|
|
- </div>
|
|
|
- </el-col> -->
|
|
|
</el-row>
|
|
|
<el-row :gutter="24">
|
|
|
<el-col :span="20" :offset="2">
|
|
|
- <!-- 日期 -->
|
|
|
<div class="date">
|
|
|
<div class="calendar-week">
|
|
|
<div class="week-item" v-for="item of weekList" :key="item">{{ item }}</div>
|
|
@@ -196,24 +192,26 @@
|
|
|
:class="[item.disable ? 'disabled' : '']"
|
|
|
>
|
|
|
<el-popover placement="bottom" width="108" trigger="click">
|
|
|
- <div class="date-set">
|
|
|
+ <div class="date-set" v-if="!item.disable">
|
|
|
<div @click="UnOrWaitOpen(item,1,index)">待开放</div>
|
|
|
<div @click="UnOrWaitOpen(item,2,index)">不开放</div>
|
|
|
</div>
|
|
|
+ <div class="date-set" v-if="item.disable">当前时段不可操作!</div>
|
|
|
<div
|
|
|
slot="reference"
|
|
|
- v-if="!item.disable"
|
|
|
@click="settingClick(index)"
|
|
|
:class="[item.status ? 'checked' : '']"
|
|
|
class="day-setting"
|
|
|
>
|
|
|
<div class="date-day-set-num">{{ item.date }}</div>
|
|
|
- <div class="date-day-set" v-if="item.dateList.isOpen == 1">待开放</div>
|
|
|
+ <div>
|
|
|
+ <div class="date-day-set" v-if="item.dateList.isOpen == 1">待开放</div>
|
|
|
<div
|
|
|
class="date-day-set"
|
|
|
style="color:#FF6465"
|
|
|
v-if="item.dateList.isOpen == 0"
|
|
|
>不开放</div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</el-popover>
|
|
|
</div>
|
|
@@ -245,7 +243,7 @@
|
|
|
</div>
|
|
|
<div style="font-size:12px;text-align:left;font-weight:700;margin-bottom:10px;">
|
|
|
<span class="tr-slogn">最少:{{FindHaveTeacherList.arrangeDetail.miniNum}}</span>
|
|
|
- <span class="tr-slogn">最多:{{FindHaveTeacherList.arrangeDetail.haveNum}}</span>
|
|
|
+ <span class="tr-slogn">已选:{{FindHaveTeacherList.arrangeDetail.haveNum}}</span>
|
|
|
<span class="tr-slogn">饱和:{{FindHaveTeacherList.arrangeDetail.miniNum}}</span>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -281,7 +279,7 @@
|
|
|
<!-- <div class="btsnius">
|
|
|
<div class="yesBtn">确定</div>
|
|
|
<div class="closeBtn">取消</div>
|
|
|
- </div> -->
|
|
|
+ </div>-->
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -301,14 +299,14 @@
|
|
|
/>
|
|
|
<span @click="SearchNoHaveTeacher()" class="DaySeachIcon el-icon-search"></span>
|
|
|
</div>
|
|
|
- <div>
|
|
|
+ <div>
|
|
|
<span
|
|
|
- style="font-size:12px;text-align:left;font-weight:700"
|
|
|
- class
|
|
|
- >最少:{{FindNoHaveTeacherList.arrangeDetail.miniNum}}</span>
|
|
|
- <span class="tr-slogn">饱和:{{FindNoHaveTeacherList.arrangeDetail.maxNum}}</span>
|
|
|
- <span class="tr-slogn">已选:{{FindNoHaveTeacherList.arrangeDetail.haveNum}}</span>
|
|
|
- </div>
|
|
|
+ style="font-size:12px;text-align:left;font-weight:700"
|
|
|
+ class
|
|
|
+ >最少:{{FindNoHaveTeacherList.arrangeDetail.miniNum}}</span>
|
|
|
+ <span class="tr-slogn">饱和:{{FindNoHaveTeacherList.arrangeDetail.maxNum}}</span>
|
|
|
+ <span class="tr-slogn">已选:{{FindNoHaveTeacherList.arrangeDetail.haveNum}}</span>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<div>
|
|
|
<img src="../../assets/img/del@2x.png" alt @click="allShowModel(4)" />
|
|
@@ -351,7 +349,7 @@
|
|
|
</div>
|
|
|
<div class="btsnius">
|
|
|
<div @click="GetAddArrangeByTeacherStatus()" class="yesBtn">确定</div>
|
|
|
- <div @click="allShowModel(4)" class="closeBtn">取消</div>
|
|
|
+ <div @click="allShowModel(4)" class="closeBtn">取消</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -369,7 +367,7 @@
|
|
|
class="model-text-items-close"
|
|
|
/>
|
|
|
</div>
|
|
|
- <div>是否确定将{{name}}老师移除?</div>
|
|
|
+ <div>是否确定将{{this.DetailteacherName}}老师移除?</div>
|
|
|
</div>
|
|
|
<div class="model-btn">
|
|
|
<div class="model-btn-items main-gay" @click="DetetaiApplyOperate()">是</div>
|
|
@@ -381,9 +379,11 @@
|
|
|
</template>
|
|
|
<script>
|
|
|
import { mapGetters, mapActions } from "vuex";
|
|
|
+import SuperworkListSeting from "@/components/SuperworkListSeting.vue";
|
|
|
import { IMG_BASE_URL } from "@/ImgConfig";
|
|
|
+import { Message } from "element-ui";
|
|
|
export default {
|
|
|
- components: {},
|
|
|
+ components: {SuperworkListSeting},
|
|
|
name: "actvResolveLabel",
|
|
|
props: {},
|
|
|
data() {
|
|
@@ -392,7 +392,7 @@ export default {
|
|
|
Nowyear: new Date().getFullYear(),
|
|
|
D: new Date().getDate() + " ",
|
|
|
Nowmonth: new Date().getMonth() + 1,
|
|
|
- NowHours: new Date().getHours(),
|
|
|
+ NowHours: new Date().getHours(),
|
|
|
isSelected: false,
|
|
|
BASE_URL: IMG_BASE_URL,
|
|
|
selMonth: "",
|
|
@@ -403,7 +403,7 @@ export default {
|
|
|
gardeListDownage: false,
|
|
|
AddTeacherModel: false,
|
|
|
modelindex: 0,
|
|
|
- selecttitlepag: "匹配知识点",
|
|
|
+ selecttitlepag: "批改老师",
|
|
|
selecttitleage: "语文",
|
|
|
current: {}, // 当前时间
|
|
|
weekList: ["一", "二", "三", "四", "五", "六", "日"],
|
|
@@ -414,8 +414,10 @@ export default {
|
|
|
today: "",
|
|
|
teacherIds: [],
|
|
|
detetaiTeacherid: [],
|
|
|
+ DetailteacherName:'',
|
|
|
gridData: [],
|
|
|
SettingDays: [],
|
|
|
+ setrefultList:[],
|
|
|
filters: {
|
|
|
actvNm: "",
|
|
|
actvCrtUserId: "",
|
|
@@ -451,11 +453,6 @@ export default {
|
|
|
value: "1",
|
|
|
label: "批改老师",
|
|
|
str: "8"
|
|
|
- },
|
|
|
- {
|
|
|
- value: "2",
|
|
|
- label: "全部"
|
|
|
- // str:''
|
|
|
}
|
|
|
],
|
|
|
grades: [
|
|
@@ -474,11 +471,6 @@ export default {
|
|
|
label: "英语",
|
|
|
str: "英语"
|
|
|
},
|
|
|
- {
|
|
|
- value: "3",
|
|
|
- label: "全部"
|
|
|
- // str:""
|
|
|
- }
|
|
|
],
|
|
|
allotList: {
|
|
|
pageNo: 1,
|
|
@@ -498,10 +490,41 @@ export default {
|
|
|
}
|
|
|
};
|
|
|
},
|
|
|
+ created() {
|
|
|
+ this.GetFindCalendarListInfo();
|
|
|
+ this.GetDutyTemplateListInfo()
|
|
|
+ },
|
|
|
watch: {
|
|
|
- SaveSysTeacherDutyStatus(val, oldVal) {
|
|
|
+ SaveSysTeacherDutyStatus(val, oldVal) {
|
|
|
//保存排班设置成功的watch监听回调
|
|
|
- this.GetDutyTemplateListInfo()
|
|
|
+ this.GetDutyTemplateListInfo();
|
|
|
+ },
|
|
|
+ DutyTemplateListSTUS(val, oldVal) {
|
|
|
+ // debugger
|
|
|
+ //排班列表请求成功的watch监听回调
|
|
|
+ this.init();
|
|
|
+ },
|
|
|
+ DeleteArrangeByTeacher(val, oldVal) {
|
|
|
+ // debugger
|
|
|
+ //保存排班设置成功的watch监听回调
|
|
|
+ this.GetFindCalendarListInfo();
|
|
|
+ },
|
|
|
+ AddArrangeByTeacherStatus(val, oldVal) {
|
|
|
+ // debugger
|
|
|
+ //保存排班设置成功的watch监听回调
|
|
|
+ this.GetFindCalendarListInfo();
|
|
|
+ },
|
|
|
+ TeacherThisMonthDutyREfultInfo(val, oldVal) {
|
|
|
+ var that = this;
|
|
|
+ if (that.DutyTemplateListInfo && that.DutyTemplateListInfo.dayList){
|
|
|
+ for (let t = 0; t < that.DutyTemplateListInfo.dayList.length; t++) {
|
|
|
+ if (that.DutyTemplateListInfo.dayList[t].isOpen == 0) {
|
|
|
+ this.SettingDays.push(that.DutyTemplateListInfo.dayList[t].day);
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
},
|
|
|
},
|
|
|
// ,'homeworkRecoveryList'
|
|
@@ -514,6 +537,9 @@ export default {
|
|
|
"AddArrangeByTeacherStatus",
|
|
|
"SaveSysTeacherDutyStatus",
|
|
|
"DutyTemplateListInfo",
|
|
|
+ "DutyTemplateListSTUS",
|
|
|
+ "TeacherThisMonthDutyREfultInfo",
|
|
|
+ "DeleteArrangeByTeacher"
|
|
|
]),
|
|
|
// 显示当前时间
|
|
|
currentDateStr() {
|
|
@@ -528,45 +554,53 @@ export default {
|
|
|
return "table-head-th";
|
|
|
},
|
|
|
//弹框
|
|
|
- isShow(str, id) {
|
|
|
+ isShow(str, id, timeFnd,DaytimeFn) {
|
|
|
let _this = this;
|
|
|
if (str == 1) {
|
|
|
- _this.isApporTeacher = true;
|
|
|
- this.HaveTeacherList.Teacherid = id;
|
|
|
- this.GetFindHaveTeacherListInfo();
|
|
|
+ if (timeFnd < -4 && DaytimeFn <= 0 || DaytimeFn < 0 ){
|
|
|
+ _this.isApporTeacher = true;
|
|
|
+ this.HaveTeacherList.teacherName = '';
|
|
|
+ this.HaveTeacherList.Teacherid = id;
|
|
|
+ this.GetFindHaveTeacherListInfo();
|
|
|
+ } else {
|
|
|
+ Message.error("请提前4小时开始排班,当前时间已关闭不可操作!");
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
// 添加老师勾选数组
|
|
|
- async DetetaiOrAddeacherTeam(item, type) {
|
|
|
+ async DetetaiOrAddeacherTeam(item, type) {
|
|
|
if (type == 1) {
|
|
|
- const index = this.teacherIds.indexOf(item.teacherId);
|
|
|
+ const index = this.teacherIds.indexOf(item.teacherId);
|
|
|
if (index > -1) {
|
|
|
- this.teacherIds.splice(index, 1);
|
|
|
+ this.teacherIds.splice(index, 1);
|
|
|
}
|
|
|
- // item.dateList.isOpen = 1
|
|
|
- // this.$set(this.setCalendarList.dateList, Setindex, item);
|
|
|
+ // item.dateList.isOpen = 1
|
|
|
+ // this.$set(this.setCalendarList.dateList, Setindex, item);
|
|
|
}
|
|
|
if (type == 2) {
|
|
|
- const index = this.teacherIds.indexOf(item.teacherId);
|
|
|
+ const index = this.teacherIds.indexOf(item.teacherId);
|
|
|
if (index == -1) {
|
|
|
- this.teacherIds.push(item.teacherId);
|
|
|
+ this.teacherIds.push(item.teacherId);
|
|
|
}
|
|
|
- // item.dateList.isOpen = 0
|
|
|
- // this.$set(this.setCalendarList.dateList, Setindex, item);
|
|
|
+ // item.dateList.isOpen = 0
|
|
|
+ // this.$set(this.setCalendarList.dateList, Setindex, item);
|
|
|
}
|
|
|
},
|
|
|
showAddTeacherModel() {
|
|
|
+ this.NoHaveTeacherList.teacherName = ''
|
|
|
this.isApporTeacher = false;
|
|
|
this.AddTeacherModel = true;
|
|
|
this.GetFindNoHaveTeacherListInfo();
|
|
|
},
|
|
|
// 时段移除老师
|
|
|
detailTeacherTeam(item) {
|
|
|
+ this.DetailteacherName = item.teacherName;
|
|
|
this.isApporTeacher = false;
|
|
|
this.hiddenModel = true;
|
|
|
this.detetaiTeacherid = item.teacherId;
|
|
|
},
|
|
|
DetetaiApplyOperate() {
|
|
|
+ this.hiddenModel = false;
|
|
|
this.$store.dispatch("GetDeleteArrangeByTeacher", {
|
|
|
id: this.HaveTeacherList.Teacherid,
|
|
|
teacherId: this.detetaiTeacherid
|
|
@@ -581,6 +615,7 @@ export default {
|
|
|
} else if (str == 2) {
|
|
|
_this.isPigai = false;
|
|
|
} else if (str == 3) {
|
|
|
+ this.HaveTeacherList.teacherName = '';
|
|
|
_this.isApporTeacher = false;
|
|
|
} else if (str == 4) {
|
|
|
_this.AddTeacherModel = false;
|
|
@@ -589,6 +624,43 @@ export default {
|
|
|
_this.NoAllotManagerModel = false;
|
|
|
}
|
|
|
},
|
|
|
+ timeFn(d1) {
|
|
|
+ //di作为一个变量传进来
|
|
|
+ //如果时间格式是正确的,那下面这一步转化时间格式就可以不用了
|
|
|
+ var dateBegin = new Date(d1.replace(/-/g, "/")); //将-转化为/,使用new Date
|
|
|
+ var dateEnd = new Date(); //获取当前时间
|
|
|
+ var dateDiff = dateEnd.getTime() - dateBegin.getTime(); //时间差的毫秒数
|
|
|
+ var dayDiff = Math.floor(dateDiff / (24 * 3600 * 1000)); //计算出相差天数
|
|
|
+ var leave1 = dateDiff % (24 * 3600 * 1000); //计算天数后剩余的毫秒数
|
|
|
+ var hours = Math.floor(leave1 / (3600 * 1000)); //计算出小时数
|
|
|
+ //计算相差分钟数
|
|
|
+ var leave2 = leave1 % (3600 * 1000); //计算小时数后剩余的毫秒数
|
|
|
+ var minutes = Math.floor(leave2 / (60 * 1000)); //计算相差分钟数
|
|
|
+ //计算相差秒数
|
|
|
+ var leave3 = leave2 % (60 * 1000); //计算分钟数后剩余的毫秒数
|
|
|
+ var seconds = Math.round(leave3 / 1000);
|
|
|
+ return hours;
|
|
|
+ // console.log(" 相差" + dayDiff + "天" + hours + "小时 " + minutes + "分钟" + seconds + " 秒")
|
|
|
+ // console.log(dateDiff + "时间差的毫秒数",dayDiff + "计算出相差天数",leave1 + "计算天数后剩余的毫秒数"
|
|
|
+ // ,hours + "计算出小时数",minutes + "计算相差分钟数",seconds + "计算相差秒数");
|
|
|
+ },
|
|
|
+ DaytimeFn (d1) {//di作为一个变量传进来
|
|
|
+ //如果时间格式是正确的,那下面这一步转化时间格式就可以不用了
|
|
|
+ var dateBegin = new Date(d1.replace(/-/g, "/"));//将-转化为/,使用new Date
|
|
|
+ var dateEnd = new Date();//获取当前时间
|
|
|
+ var dateDiff = dateEnd.getTime() - dateBegin.getTime();//时间差的毫秒数
|
|
|
+ var dayDiff = Math.floor(dateDiff / (24 * 3600 * 1000));//计算出相差天数
|
|
|
+ var leave1 = dateDiff % (24 * 3600 * 1000) //计算天数后剩余的毫秒数
|
|
|
+ var hours = Math.floor(leave1 / (3600 * 1000))//计算出小时数
|
|
|
+ //计算相差分钟数
|
|
|
+ var leave2 = leave1 % (3600 * 1000) //计算小时数后剩余的毫秒数
|
|
|
+ var minutes = Math.floor(leave2 / (60 * 1000))//计算相差分钟数
|
|
|
+ //计算相差秒数
|
|
|
+ var leave3 = leave2 % (60 * 1000) //计算分钟数后剩余的毫秒数
|
|
|
+ var seconds = Math.round(leave3 / 1000)
|
|
|
+ // return hours
|
|
|
+ return dayDiff
|
|
|
+},
|
|
|
// 获取校区管理员排班表
|
|
|
async GetFindCalendarListInfo() {
|
|
|
this.$store.dispatch("GetFindCalendarList", {
|
|
@@ -612,6 +684,7 @@ export default {
|
|
|
},
|
|
|
// 时段添加老师
|
|
|
async GetAddArrangeByTeacherStatus() {
|
|
|
+ this.AddTeacherModel = false
|
|
|
this.$store.dispatch("GetAddArrangeByTeacher", {
|
|
|
id: this.HaveTeacherList.Teacherid,
|
|
|
teacherIds: this.teacherIds
|
|
@@ -623,28 +696,28 @@ export default {
|
|
|
days: this.SettingDays
|
|
|
});
|
|
|
},
|
|
|
- async UnOrWaitOpen(item, type,Setindex) {
|
|
|
+ async UnOrWaitOpen(item, type, Setindex) {
|
|
|
if (type == 1) {
|
|
|
const index = this.SettingDays.indexOf(item.value);
|
|
|
if (index > -1) {
|
|
|
this.SettingDays.splice(index, 1);
|
|
|
}
|
|
|
- item.dateList.isOpen = 1
|
|
|
- this.$set(this.setCalendarList.dateList, Setindex, item);
|
|
|
+ item.dateList.isOpen = 1;
|
|
|
+ this.$set(this.setCalendarList.dateList, Setindex, item);
|
|
|
}
|
|
|
if (type == 2) {
|
|
|
const index = this.SettingDays.indexOf(item.value);
|
|
|
if (index == -1) {
|
|
|
this.SettingDays.push(item.value);
|
|
|
}
|
|
|
- item.dateList.isOpen = 0
|
|
|
- this.$set(this.setCalendarList.dateList, Setindex, item);
|
|
|
+ item.dateList.isOpen = 0;
|
|
|
+ this.$set(this.setCalendarList.dateList, Setindex, item);
|
|
|
}
|
|
|
},
|
|
|
- // 排班设置返回接口
|
|
|
+ // 排班设置返回接口
|
|
|
async GetDutyTemplateListInfo() {
|
|
|
- this.$store.dispatch("GetDutyTemplateList", {
|
|
|
- });
|
|
|
+ this.SettingDays = []
|
|
|
+ this.$store.dispatch("GetDutyTemplateList", {});
|
|
|
},
|
|
|
SearchNoHaveTeacher() {
|
|
|
this.GetFindNoHaveTeacherListInfo();
|
|
@@ -665,18 +738,19 @@ export default {
|
|
|
this.gardeListDownage = false;
|
|
|
},
|
|
|
selectTitle(k) {
|
|
|
- this.modelindex = k;
|
|
|
- if (k == 0){
|
|
|
- if (this.Nowmonth !== this.current.month + 1) {
|
|
|
- this.prevMonth()
|
|
|
- }
|
|
|
- this.GetFindCalendarListInfo();
|
|
|
+ this.modelindex = k;
|
|
|
+ if (k == 0) {
|
|
|
+ if (this.Nowmonth !== this.current.month + 1) {
|
|
|
+ this.prevMonth();
|
|
|
+ }
|
|
|
+ this.GetFindCalendarListInfo();
|
|
|
}
|
|
|
- if (k == 1){
|
|
|
- if (this.Nowmonth == this.current.month + 1) {
|
|
|
- this.nextMonth()
|
|
|
- }
|
|
|
- this.GetDutyTemplateListInfo()
|
|
|
+ if (k == 1) {
|
|
|
+ if (this.Nowmonth == this.current.month + 1) {
|
|
|
+ this.nextMonth();
|
|
|
+ }
|
|
|
+ this.SettingDays = []
|
|
|
+ this.GetDutyTemplateListInfo();
|
|
|
}
|
|
|
},
|
|
|
selectTip(item) {
|
|
@@ -850,8 +924,9 @@ export default {
|
|
|
year: year,
|
|
|
month: curMonth,
|
|
|
date: date,
|
|
|
- disable: curMonth !== month,
|
|
|
+ disable: curMonth !== month ,
|
|
|
status: false,
|
|
|
+ pastDay: date < today && curMonth == month,
|
|
|
value: this.stringify(year, curMonth, date)
|
|
|
});
|
|
|
// 排班设置
|
|
@@ -866,19 +941,23 @@ export default {
|
|
|
begin += oneDayMS;
|
|
|
}
|
|
|
var that = this;
|
|
|
+ if (that.FindCalendarList && that.FindCalendarList.list){
|
|
|
for (let i = 0; i < list.length; i++) {
|
|
|
if (!list[i].disable) {
|
|
|
- const dateValue = list[i].value + " 00:00:00";
|
|
|
+ const dateValue = list[i].value;
|
|
|
for (let t = 0; t < that.FindCalendarList.list.length; t++) {
|
|
|
if (dateValue == that.FindCalendarList.list[t].arrangeDate) {
|
|
|
list[i].dateList = that.FindCalendarList.list[t];
|
|
|
+ console.log(list[i].dateList)
|
|
|
}
|
|
|
}
|
|
|
} else {
|
|
|
list[i].dateList = {};
|
|
|
}
|
|
|
}
|
|
|
- for (let i = 0; i < setList.length; i++) {
|
|
|
+ }
|
|
|
+ if (that.DutyTemplateListInfo && that.DutyTemplateListInfo.dayList){
|
|
|
+ for (let i = 0; i < setList.length; i++) {
|
|
|
if (!setList[i].disable) {
|
|
|
const dateValue = setList[i].value;
|
|
|
for (let t = 0; t < that.DutyTemplateListInfo.dayList.length; t++) {
|
|
@@ -890,12 +969,13 @@ export default {
|
|
|
setList[i].dateList = {};
|
|
|
}
|
|
|
}
|
|
|
+ }
|
|
|
this.calendarList = list;
|
|
|
this.setCalendarList = setList;
|
|
|
},
|
|
|
// 排班点击
|
|
|
classSet(k, d, m, intervalList) {
|
|
|
- // console.log(k,d,m)
|
|
|
+ console.log(k,d,m)
|
|
|
this.month = m + 1;
|
|
|
this.today = d;
|
|
|
for (var i in this.calendarList) {
|
|
@@ -913,10 +993,9 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
|
+ // debugger
|
|
|
sessionStorage.setItem("tabIndex", 5);
|
|
|
- this.init();
|
|
|
- this.GetFindCalendarListInfo();
|
|
|
- console.log("hahahahhahahahah")
|
|
|
+
|
|
|
// console.log(DutyTemplateListInfo)
|
|
|
}
|
|
|
};
|
|
@@ -1118,6 +1197,7 @@ el-table {
|
|
|
border-left: 1px solid #e5e5e5;
|
|
|
}
|
|
|
.calendar-item {
|
|
|
+ cursor: pointer;
|
|
|
float: left;
|
|
|
width: 14.28%;
|
|
|
height: 130px;
|
|
@@ -1132,11 +1212,15 @@ el-table {
|
|
|
line-height: 130px;
|
|
|
}
|
|
|
.calendar-item.disabled {
|
|
|
- color: #ffff;
|
|
|
+ color:#fff;
|
|
|
}
|
|
|
.checked {
|
|
|
background: #f6f7fb;
|
|
|
}
|
|
|
+.psatchecked{
|
|
|
+ color: rgba(0, 0, 0, 0.3);
|
|
|
+ opacity: 0.5;
|
|
|
+}
|
|
|
.date-day {
|
|
|
font-size: 16px;
|
|
|
line-height: 60px;
|
|
@@ -1175,18 +1259,18 @@ el-table {
|
|
|
cursor: pointer;
|
|
|
}
|
|
|
.date-set > div {
|
|
|
- height: 40px;
|
|
|
- line-height: 40px;
|
|
|
+ height: 30px;
|
|
|
+ line-height: 30px;
|
|
|
/* width: 100%; */
|
|
|
color: #393939;
|
|
|
font-size: 16px;
|
|
|
- margin: 25px;
|
|
|
+ margin: 25px 0px;
|
|
|
/* background-color: #52cc60; */
|
|
|
}
|
|
|
.date-set > div:hover {
|
|
|
background-color: #52cc60;
|
|
|
color: #fff;
|
|
|
- font-size: 25px;
|
|
|
+ /* font-size: 25px; */
|
|
|
}
|
|
|
.date-day-set {
|
|
|
line-height: 40px;
|
|
@@ -1207,6 +1291,14 @@ el-table {
|
|
|
.date-btn-active {
|
|
|
background: rgba(114, 151, 255, 0.3);
|
|
|
border: none;
|
|
|
+ cursor: pointer;
|
|
|
+ margin-top: 10px;
|
|
|
+ width: 80px;
|
|
|
+ height: 30px;
|
|
|
+ line-height: 30px;
|
|
|
+ border-radius: 15px;
|
|
|
+ margin:0 auto;
|
|
|
+ color: #fff;
|
|
|
}
|
|
|
.abbTeachers {
|
|
|
width: 100%;
|