|
@@ -275,19 +275,33 @@ export default { |
|
|
}, |
|
|
}, |
|
|
save(){ |
|
|
save(){ |
|
|
if(this.showFlag){ |
|
|
if(this.showFlag){ |
|
|
// let arr2=[] |
|
|
|
|
|
// this.arr.map((item,idx)=>{ |
|
|
|
|
|
// let idx1=this.arr1.findIndex(item1=>item1==item) |
|
|
|
|
|
// if(idx1==-1){ |
|
|
|
|
|
// // 没有重复的 |
|
|
|
|
|
// console.log(item); |
|
|
|
|
|
// arr2.push(this.arr1[idx]) |
|
|
|
|
|
// } |
|
|
|
|
|
// }) |
|
|
|
|
|
// console.log(arr2); |
|
|
|
|
|
|
|
|
let arr2=[] |
|
|
|
|
|
let arr3=[] |
|
|
|
|
|
console.log(this.arr1); |
|
|
|
|
|
this.arr.map((item,idx)=>{ |
|
|
|
|
|
let idx1=this.arr1.findIndex(item1=>item1==item) |
|
|
|
|
|
if(idx1==-1){ |
|
|
|
|
|
// 没有重复的 |
|
|
|
|
|
console.log(item); |
|
|
|
|
|
arr2.push(item) |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
this.arr1.map((item,idx)=>{ |
|
|
|
|
|
let idx1=this.arr.findIndex(item1=>item1==item) |
|
|
|
|
|
if(idx1==-1){ |
|
|
|
|
|
// 没有重复的 |
|
|
|
|
|
console.log(item); |
|
|
|
|
|
arr3.push(item) |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
// console.log(arr2,'新增的数据'); |
|
|
|
|
|
// console.log(arr3,'修改的'); |
|
|
|
|
|
// console.log(this.arr); |
|
|
|
|
|
// return |
|
|
|
|
|
|
|
|
this.$api.api.scheduling({ |
|
|
this.$api.api.scheduling({ |
|
|
chosed:this.arr.join(','), |
|
|
|
|
|
// unChosed:arr2.join(','), |
|
|
|
|
|
|
|
|
chosed:arr2.join(','), |
|
|
|
|
|
unChosed:arr3.join(','), |
|
|
id:this.roleId |
|
|
id:this.roleId |
|
|
}) |
|
|
}) |
|
|
.then(res=>{ |
|
|
.then(res=>{ |
|
@@ -334,7 +348,7 @@ export default { |
|
|
res.data.map(item=>{ |
|
|
res.data.map(item=>{ |
|
|
this.arr.push(item.jobDate) |
|
|
this.arr.push(item.jobDate) |
|
|
}) |
|
|
}) |
|
|
this.arr1=this.arr |
|
|
|
|
|
|
|
|
this.arr1=[...this.arr] |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
clickDay(data) { |
|
|
clickDay(data) { |
|
@@ -346,6 +360,7 @@ export default { |
|
|
this.arr.push(data) |
|
|
this.arr.push(data) |
|
|
}else{ |
|
|
}else{ |
|
|
this.arr.splice(idx,1) |
|
|
this.arr.splice(idx,1) |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
changeDate(data) { |
|
|
changeDate(data) { |
|
|