| | |
| | | <!-- |
| | | * @Date: 2024-05-04 16:37:48 |
| | | * @LastEditors: gaoshp |
| | | * @LastEditTime: 2024-10-09 22:50:13 |
| | | * @LastEditTime: 2024-10-09 23:30:14 |
| | | * @FilePath: /cps-web/src/views/console/base/Add.vue |
| | | --> |
| | | <template> |
| | |
| | | }, |
| | | }) |
| | | // 优先 |
| | | this.months[i].attributes.push({ |
| | | dates: dates.filter(v => v.isHighPriority === 1).map(v => v.calendarDate), |
| | | bar: { |
| | | style: { |
| | | backgroundColor: 'red', |
| | | } |
| | | }, |
| | | }) |
| | | console.log('------------->>>>', dates) |
| | | let hiIndex = this.months[i].attributes.findIndex(v => v.bar) |
| | | if (hiIndex > -1) { |
| | | this.months[i].attributes[hiIndex].dates.push(...dates.filter(v => v.isHighPriority === 1).map(v => v.calendarDate)) |
| | | } else { |
| | | this.months[i].attributes.push({ |
| | | dates: dates.filter(v => v.isHighPriority === 1).map(v => v.calendarDate), |
| | | bar: { |
| | | style: { |
| | | backgroundColor: 'red', |
| | | } |
| | | }, |
| | | }) |
| | | } |
| | | |
| | | this.months[i].attributes[1] = { |
| | | highlight: true, |
| | | dates: [] |
| | |
| | | return false |
| | | }, |
| | | changeHigh(val) { |
| | | console.log('------------changeHigh') |
| | | if (this.currentDateItem) { |
| | | // 设置优先 |
| | | let index = this.currentDateItem.attributes.findIndex(item => !!item.bar) |