|
@@ -343,9 +343,13 @@ export default {
|
|
|
}
|
|
|
const res = await queryWorkListByTime(params)
|
|
|
if (res.code === 200) {
|
|
|
+ let num = 0
|
|
|
this.calendarEvents = res.data.map((item, index) => {
|
|
|
const title = item.origin ? '日程' : '排期'
|
|
|
const require = `${item.requireNames && item.requireNames.length > 0 ? item.requireNames.join(',') : '无'}`
|
|
|
+ if (index >= 1 && item.id === res.data[index - 1].id) {
|
|
|
+ num = num + 1
|
|
|
+ }
|
|
|
return {
|
|
|
id: item.id,
|
|
|
title: `${title}:${item.peopleObject.name}:${item.name}-${item.desc || '无'};所属需求:${require}`,
|
|
@@ -353,8 +357,8 @@ export default {
|
|
|
end: moment(item.endTime).add(1, 'day').toDate(),
|
|
|
detailData: item,
|
|
|
className: item.origin ? 'schedule1' : 'schedule2',
|
|
|
- backgroundColor: this.bgColorList[index % 10],
|
|
|
- textColor: this.colorList[index % 10]
|
|
|
+ backgroundColor: this.bgColorList[(index - num) % 10],
|
|
|
+ textColor: this.colorList[(index - num) % 10]
|
|
|
}
|
|
|
})
|
|
|
}
|