Bladeren bron

工作台颜色调整

wangziqian 5 jaren geleden
bovenliggende
commit
ecb57a01c9

+ 6 - 1
src/views/projectManage/iteration/components/iterationTable.vue

@@ -73,7 +73,12 @@
     </el-table>
     <div class="bottom-detail">
       <el-row>排期总汇:{{ scheduleDetail.startTime | handlerDate }} ~ {{ scheduleDetail.endTime | handlerDate }}</el-row>
-      <el-row v-if="scheduleDetail.preOnlineVersion && scheduleDetail.preOnlineVersion.length>0">预计上线版本:{{ scheduleDetail.preOnlineVersion }}</el-row>
+      <el-row v-if="scheduleDetail.preOnlineVersion && scheduleDetail.preOnlineVersion.length>0">
+        <el-col :span="2">预计上线版本:</el-col>
+        <el-col :span="6">
+          <span v-for="item in scheduleDetail.preOnlineVersion" :key="item">{{ item }}</span><br>
+        </el-col>
+      </el-row>
       <el-row v-else>预计上线版本:</el-row>
     </div>
     <modify-schedule

+ 4 - 2
src/views/projectManage/projectList/components/scheduleList.vue

@@ -74,8 +74,10 @@
     <div class="bottom-detail">
       <el-row>排期总汇:{{ scheduleDetail.startTime | handlerDate }} ~ {{ scheduleDetail.endTime | handlerDate }}</el-row>
       <el-row v-if="scheduleDetail.preOnlineVersion && scheduleDetail.preOnlineVersion.length>0">
-        预计上线版本:
-        <span v-for="item in scheduleDetail.preOnlineVersion" :key="item">{{ item }}</span>
+        <el-col :span="2">预计上线版本:</el-col>
+        <el-col :span="6">
+          <span v-for="item in scheduleDetail.preOnlineVersion" :key="item">{{ item }}</span><br>
+        </el-col>
       </el-row>
       <el-row v-else>预计上线版本:</el-row>
     </div>

+ 4 - 2
src/views/projectManage/requirement/components/scheduleList.vue

@@ -75,8 +75,10 @@
     <div class="bottom-detail">
       <el-row>排期总汇:{{ scheduleDetail.startTime | handlerDate }} ~ {{ scheduleDetail.endTime | handlerDate }}</el-row>
       <el-row v-if="scheduleDetail.preOnlineVersion && scheduleDetail.preOnlineVersion.length>0">
-        预计上线版本:
-        <span v-for="item in scheduleDetail.preOnlineVersion" :key="item">{{ item }}</span>
+        <el-col :span="2">预计上线版本:</el-col>
+        <el-col :span="6">
+          <span v-for="item in scheduleDetail.preOnlineVersion" :key="item">{{ item }}</span><br>
+        </el-col>
       </el-row>
       <el-row v-else>预计上线版本:</el-row>
     </div>

+ 4 - 2
src/views/projectManage/taskList/components/scheduleList.vue

@@ -74,8 +74,10 @@
     <div class="bottom-detail">
       <el-row>排期总汇:{{ scheduleDetail.startTime | handlerDate }} ~ {{ scheduleDetail.endTime | handlerDate }}</el-row>
       <el-row v-if="scheduleDetail.preOnlineVersion && scheduleDetail.preOnlineVersion.length>0">
-        预计上线版本:
-        <span v-for="item in scheduleDetail.preOnlineVersion" :key="item">{{ item }}</span>
+        <el-col :span="2">预计上线版本:</el-col>
+        <el-col :span="6">
+          <span v-for="item in scheduleDetail.preOnlineVersion" :key="item">{{ item }}</span><br>
+        </el-col>
       </el-row>
       <el-row v-else>预计上线版本:</el-row>
     </div>

+ 2 - 8
src/views/workbench/person/components/calenderDetail.vue

@@ -1,7 +1,7 @@
 <template>
   <article v-show="showDetail" ref="show-schedule-detail" class="show-schedule-detail">
     <template v-if="nowDetailData && nowDetailData.origin === 0">
-      <div class="detail-title">【任务排期】{{ nowDetailData.name }}:{{ nowDetailData.desc }}</div>
+      <div class="detail-title">【任务排期】{{ nowDetailData.bizName }}. {{ nowDetailData.name }}:{{ nowDetailData.desc }}</div>
       <div class="detail-time item">
         <div class="label">排期:</div>
         <div>{{ nowDetailData.seperateDaysNoHoliday }}(用时<span>{{ nowDetailData.needDays }}</span>天)</div>
@@ -67,12 +67,6 @@ export default {
     data: {
       handler(newV) {
         this.nowDetailData = newV
-        this.$nextTick(() => {
-          const ele = document.querySelector('.detail-title')
-          if (ele) {
-            ele.style.color = newV.textColor
-          }
-        })
       },
       deep: true
     },
@@ -151,7 +145,7 @@ export default {
     }
   }
   .detail-title {
-    color: #0C77E5;
+    color: #333333;
     font-size: 14px;
     margin-bottom: 20px;
   }

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

@@ -223,7 +223,15 @@ export default {
       nowDetailData: {}, // 当前日程详情
       showDetail: false,
       visibleSchedule: false, // 排期任务弹框
-      detailXY: [0, 0] // 详情弹框位置
+      detailXY: [0, 0], // 详情弹框位置
+      colorList: [
+        'rgba(8,172,133,1)', 'rgba(12,119,229,1)', 'rgba(237,82,9,1)', 'rgba(209,194,0,1)', 'rgba(126,211,33,1)',
+        'rgba(245,108,108,1)', 'rgba(88,118,240,1)', 'rgba(235,103,175,1)', 'rgba(255,256,110,1)', 'rgba(186,230,55,1)'
+      ],
+      bgColorList: [
+        'rgba(8,172,133,0.6)', 'rgba(12,119,229,0.6)', 'rgba(237,82,9,0.6)', 'rgba(209,194,0,0.6)', 'rgba(126,211,33,0.6)',
+        'rgba(245,108,108,0.6)', 'rgba(88,118,240,0.6)', 'rgba(235,103,175,0.6)', 'rgba(255,256,110,0.6)', 'rgba(186,230,55,0.6)'
+      ]
     }
   },
   created() {
@@ -323,10 +331,7 @@ export default {
       }
       const res = await queryWorkListByTime(params)
       if (res.code === 200) {
-        const colorList = ['#08AC85', '#0C77E5', '#ED5209', '#D1C200']
-        const bgList = ['rgba(97,211,184,0.6)', 'rgba(64,157,254,0.6)', 'rgba(255,137,82,0.6)', 'rgba(245,227,0,0.6)']
         this.calendarEvents = res.data.map((item, index) => {
-          item.textColor = colorList[index % 4]
           const title = item.origin ? '日程' : '排期'
           const require = `${item.requireNames && item.requireNames.length > 0 ? item.requireNames.join(',') : '无'}`
           return {
@@ -336,8 +341,8 @@ export default {
             end: moment(item.endTime).add(1, 'day').toDate(),
             detailData: item,
             className: item.origin ? 'schedule1' : 'schedule2',
-            backgroundColor: bgList[index % 4],
-            textColor: item.textColor
+            backgroundColor: this.bgColorList[index % 10],
+            textColor: this.colorList[index % 10]
           }
         })
       }

+ 39 - 8
src/views/workbench/team/index.vue

@@ -49,7 +49,12 @@
           <div v-show="activeSchedule === '1'" class="member-list">
             <el-checkbox v-model="checkAllMember" :indeterminate="isIndeterminate" style="margin: 0 20px 0 5px" @change="checkAllChange">全选</el-checkbox>
             <el-checkbox-group v-model="checkedMembers" @change="membersChange">
-              <el-checkbox v-for="item in memberList" :key="item.idap" :label="item.idap">{{ item.name }}</el-checkbox>
+              <el-checkbox v-for="item in memberList" :key="item.idap" :label="item.idap">
+                <div class="check-point">
+                  {{ item.name }}
+                  <div class="point" :style="{'background-color': mapMemberColor.get(item.idap).bgColor}" />
+                </div>
+              </el-checkbox>
             </el-checkbox-group>
           </div>
           <MyFullCalendar
@@ -167,7 +172,16 @@ export default {
         visible: false,
         data: null
       },
-      visibleSchedule: false // 排期任务弹框
+      visibleSchedule: false, // 排期任务弹框
+      colorList: [
+        'rgba(8,172,133,1)', 'rgba(12,119,229,1)', 'rgba(237,82,9,1)', 'rgba(209,194,0,1)', 'rgba(126,211,33,1)',
+        'rgba(245,108,108,1)', 'rgba(88,118,240,1)', 'rgba(235,103,175,1)', 'rgba(255,256,110,1)', 'rgba(186,230,55,1)'
+      ],
+      bgColorList: [
+        'rgba(8,172,133,0.6)', 'rgba(12,119,229,0.6)', 'rgba(237,82,9,0.6)', 'rgba(209,194,0,0.6)', 'rgba(126,211,33,0.6)',
+        'rgba(245,108,108,0.6)', 'rgba(88,118,240,0.6)', 'rgba(235,103,175,0.6)', 'rgba(255,256,110,0.6)', 'rgba(186,230,55,0.6)'
+      ],
+      mapMemberColor: new Map()// 人员对应颜色表
     }
   },
   mounted() {
@@ -203,8 +217,18 @@ export default {
         this.checkedMembers = this.memberList.map(item => item.idap)
         this.checkAllMember = true
         this.queryTeamWorkListByTime(this.calendarView)
+        this.colorHandler(this.memberList)
       }
     },
+    colorHandler(arr) { // 成员对应颜色处理
+      this.mapMemberColor.clear()
+      arr.map((item, index) => {
+        this.mapMemberColor.set(item.idap, {
+          color: this.colorList[index % 10],
+          bgColor: this.bgColorList[index % 10]
+        })
+      })
+    },
     handleMember(arr) {
       const newMap = new Map()
       return arr.filter(item => {
@@ -322,14 +346,11 @@ export default {
         teamSearchInfo: this.searchForm,
         searchScheduleInfo: { origin: this.origin }
       }
-
       params.peoples = this.checkedMembers
       const res = await queryTeamWorkListByTime(params)
       if (res.code === 200) {
-        const colorList = ['rgba(8,172,133,1)', 'rgba(12,119,229,1)', 'rgba(237,82,9,1)', 'rgba(209,194,0,1)']
-        const bgList = ['rgba(97,211,184,0.6)', 'rgba(64,157,254,0.6)', 'rgba(255,137,82,0.6)', 'rgba(245,227,0,0.6)']
         this.calendarEvents = res.data.map((item, index) => {
-          item.textColor = colorList[index % 4]
+          const colorObj = this.mapMemberColor.get(item.peopleObject.idap)
           const title = item.origin ? '日程' : '排期'
           const require = `${item.requireNames && item.requireNames.length > 0 ? item.requireNames.join(',') : '无'}`
           return {
@@ -339,8 +360,8 @@ export default {
             end: moment(item.endTime).add(1, 'day').toDate(),
             detailData: item,
             className: item.origin ? 'schedule1' : 'schedule2',
-            backgroundColor: bgList[index % 4],
-            textColor: item.textColor
+            backgroundColor: colorObj && colorObj.bgColor || null,
+            textColor: colorObj && colorObj.color || null
           }
         })
       }
@@ -396,6 +417,16 @@ export default {
   color: #333B4A;
   font-weight: 600;
 }
+.check-point {
+  display: flex;
+  align-items: center;
+  .point {
+    margin-left: 5px;
+    height: 6px;
+    width: 6px;
+    border-radius: 50%;
+  }
+}
 >>>.el-dropdown-menu__item {
   max-width: 20vw;
   overflow: scroll;