Commit 54271902 authored by 张海景's avatar 张海景

update:修改排班日历

parent 0894b4df
......@@ -70,17 +70,17 @@ export default {
date:{
handler(newVal,oldVal){
console.log(newVal.getFullYear()+'-'+(newVal.getMonth()+1)+'-'+newVal.getDate());
this.teamShiftQueryParams.theDay = newVal.getFullYear()+'-'+(newVal.getMonth()+1)+'-'+newVal.getDate();
// this.teamShiftQueryParams.theDay = newVal.getFullYear()+'-'+(newVal.getMonth()+1)+'-'+newVal.getDate();
this.queryParams.theDay = newVal.getFullYear()+'-'+(newVal.getMonth()+1)+'-'+newVal.getDate();
listCalendars(this.teamShiftQueryParams).then(response =>{
this.calendarDayList = response.data;
});
// listCalendars(this.teamShiftQueryParams).then(response =>{
// this.calendarDayList = response.data;
// });
this.getList();
}
}
},
created() {
this.getList();
this.getList();
},
methods:{
/** 查询节假日设置列表 */
......@@ -88,8 +88,10 @@ export default {
this.loading = true;
this.holidayList =[];
this.workdayList =[];
this.calendarDayList = []
let that = this;
listCalholiday(this.queryParams).then(response => {
this.calendarDayList = response.data
if(response.data !=null){
response.data.forEach(theDay => {
if(theDay.holidayType =='HOLIDAY'){
......
......@@ -81,11 +81,11 @@ export default {
date:{
handler(newVal,oldVal){
console.log(newVal.getFullYear()+'-'+(newVal.getMonth()+1)+'-'+newVal.getDate());
this.teamShiftQueryParams.theDay = newVal.getFullYear()+'-'+(newVal.getMonth()+1)+'-'+newVal.getDate();
// this.teamShiftQueryParams.theDay = newVal.getFullYear()+'-'+(newVal.getMonth()+1)+'-'+newVal.getDate();
this.queryParams.theDay = newVal.getFullYear()+'-'+(newVal.getMonth()+1)+'-'+newVal.getDate();
listCalendars(this.teamShiftQueryParams).then(response =>{
this.calendarDayList = response.data;
});
// listCalendars(this.teamShiftQueryParams).then(response =>{
// this.calendarDayList = response.data;
// });
this.getList();
}
}
......@@ -102,35 +102,36 @@ export default {
},
/** 查询节假日设置列表 */
getList() {
this.loading = true;
this.holidayList =[];
this.workdayList =[];
let that = this;
if (this.teamShiftQueryParams.workunitName) {
this.queryParams.workunitName = this.teamShiftQueryParams.workunitName
}
listCalholiday(this.queryParams).then(response => {
if(response.data !=null){
response.data.forEach(theDay => {
if(theDay.holidayType =='HOLIDAY'){
that.holidayList.push(theDay.theDay);
}else if(theDay.holidayType == 'WORKDAY'){
that.workdayList.push(theDay.theDay);
}
});
this.loading = false;
}
});
this.loading = true;
this.holidayList =[];
this.workdayList =[];
let that = this;
if (this.teamShiftQueryParams.workunitName) {
this.queryParams.workunitName = this.teamShiftQueryParams.workunitName
}
listCalholiday(this.queryParams).then(response => {
this.calendarDayList = response.data;
if(response.data !=null){
response.data.forEach(theDay => {
if(theDay.holidayType =='HOLIDAY'){
that.holidayList.push(theDay.theDay);
}else if(theDay.holidayType == 'WORKDAY'){
that.workdayList.push(theDay.theDay);
}
});
this.loading = false;
}
});
},
//点击班组类型
onSelected(teamId){
this.loading = true;
this.teamShiftQueryParams.workunitName = teamId;
this.teamShiftQueryParams.theDay = this.date.getFullYear()+'-'+(this.date.getMonth()+1)+'-'+this.date.getDate();
listCalendars(this.teamShiftQueryParams).then(response =>{
this.calendarDayList = response.data;
this.loading = false;
});
this.queryParams.workunitName = teamId;
this.queryParams.theDay = this.date.getFullYear()+'-'+(this.date.getMonth()+1)+'-'+this.date.getDate();
// listCalendars(this.teamShiftQueryParams).then(response =>{
// this.calendarDayList = response.data;
// this.loading = false;
// });
this.getList()
},
isFestival(slotDate, slotData) {
......
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