소스 검색

个人工作台颜色问题

wangziqian 5 년 전
부모
커밋
34394b60ec
2개의 변경된 파일7개의 추가작업 그리고 3개의 파일을 삭제
  1. 1 1
      src/views/workbench/person/components/myFullCalendar.vue
  2. 6 2
      src/views/workbench/person/index.vue

+ 1 - 1
src/views/workbench/person/components/myFullCalendar.vue

@@ -186,7 +186,7 @@ export default {
         // const color = grandParent.style.color
         const div = document.createElement('div')
         div.style.display = 'inline-block'
-        div.style.paddingTop = '2px'
+        div.style.paddingTop = '0'
         const icon = document.createElement('i')
         if (item.innerText.match(/排期/)) {
           icon.className = 'el-icon-document'

+ 6 - 2
src/views/workbench/person/index.vue

@@ -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]
           }
         })
       }