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

update:修改排班日历

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