Explorar o código

Merge branch 'http_test' of git.xiaojukeji.com:pu_qa_tool/thoth-frontend into http_test

qinzhipeng_v@didiglobal.com %!s(int64=4) %!d(string=hai) anos
pai
achega
151bbf5fdc

+ 1 - 1
src/components/select/searchTeam.vue

@@ -132,7 +132,7 @@ export default {
     overflow:hidden
   }
 }
->>>.el-tag.el-tag--info {
+/deep/.el-tag.el-tag--info {
     margin: 2px 0 2px 15px !important;
 }
 </style>

+ 5 - 5
src/styles/detail-pages.scss

@@ -148,26 +148,26 @@
       margin-left: 6px;
     }
   }
-  >>>.el-form-item__label {
+  /deep/.el-form-item__label {
     color: #666666;
     font-size: 14px;
     font-weight: 400;
   }
-  >>>.el-form-item__content {
+  /deep/.el-form-item__content {
     color: #333333;
     font-size: 14px;
   }
   .module {
-    >>>.el-form-item__content {
+    /deep/.el-form-item__content {
       padding-left: 15px;
     }
   }
   .detail-info {
-    >>>.el-input__inner{
+    /deep/.el-input__inner{
       color: #333333;
       font-size: 14px;
     }
-    >>>.el-form-item{
+    /deep/.el-form-item{
       margin-bottom: 0;
     }
   }

+ 27 - 16
src/views/workbench/components/searchSection.vue

@@ -7,7 +7,7 @@
         <el-checkbox v-for="item in memberList" :key="item.idap" :label="item.idap">
           <div class="check-point">
             {{ item.name }}
-            <div v-if="workbench === '团队'" class="point" :style="{'background-color': mapMemberColor.get(item.idap).bgColor}" />
+            <div v-if="workbench === '团队'" class="point" :style="{'background-color': mapMemberColor[item.idap].bgColor}" />
           </div>
         </el-checkbox>
       </el-checkbox-group>
@@ -29,6 +29,7 @@
           <el-checkbox v-for="item in taskScheduleEvent" :key="item.code" :label="item.code">
             <div class="check-point">
               {{ item.msg }}
+              <div class="point" :style="{'background-color': mapTypeColor[item.code].bgColor}" />
             </div>
           </el-checkbox>
         </el-checkbox-group>
@@ -48,6 +49,7 @@
 </template>
 <script>
 import { queryTeamMember, showWorkbenchEnum } from '@/api/workSchedule'
+import { colorList } from '../mixins/utils'
 export default {
   props: {
     value: {
@@ -61,8 +63,13 @@ export default {
       required: false
     },
     memberColor: {
-      type: Map,
-      default: () => new Map(),
+      type: Object,
+      default: () => {},
+      required: false
+    },
+    typeColor: {
+      type: Object,
+      default: () => {},
       required: false
     },
     type: {
@@ -85,13 +92,14 @@ export default {
       isIndeterminate: false,
       isIndeterminate_1: false,
       isIndeterminate_2: false,
-      colorList: [
-        'rgba(64,127,232,1)', 'rgba(11,160,188,1)', 'rgba(28,188,126,1)', 'rgba(235,172,0,1)', 'rgba(132,100,247,1)',
-        'rgba(73,92,197,1)', 'rgba(193,67,96,1)', 'rgba(211,87,35,1)', 'rgba(40,28,149,1)', 'rgba(85,138,43,1)',
-        'rgba(67,17,59,1)', 'rgba(221,57,222,1)', 'rgba(149,114,109,1)', 'rgba(202,50,31,1)', 'rgba(226,119,141,1)',
-        'rgba(240,164,126,1)', 'rgba(59,64,72,1)', 'rgba(115,159,158,1)', 'rgba(122,209,67,1)', 'rgba(152,40,49,1)'
-      ],
+      // colorList: [
+      //   'rgba(64,127,232,1)', 'rgba(11,160,188,1)', 'rgba(28,188,126,1)', 'rgba(235,172,0,1)', 'rgba(132,100,247,1)',
+      //   'rgba(73,92,197,1)', 'rgba(193,67,96,1)', 'rgba(211,87,35,1)', 'rgba(40,28,149,1)', 'rgba(85,138,43,1)',
+      //   'rgba(67,17,59,1)', 'rgba(221,57,222,1)', 'rgba(149,114,109,1)', 'rgba(202,50,31,1)', 'rgba(226,119,141,1)',
+      //   'rgba(240,164,126,1)', 'rgba(59,64,72,1)', 'rgba(115,159,158,1)', 'rgba(122,209,67,1)', 'rgba(152,40,49,1)'
+      // ],
       mapMemberColor: this.memberColor, // 人员对应颜色表
+      mapTypeColor: this.typeColor,
       checkList: [0, 1], // 类型默认全部选择
       ScheduleAndSchedule: [0, 1],
       selfScheduleType: [], // 日程类型
@@ -130,13 +138,14 @@ export default {
           this.memberList = this.handleMember(res.data)
           this.filtrate.checkedMembers = this.memberList.map(item => item.idap)
           this.checkAllMember = true
-          this.colorHandler(this.memberList)
+          this.colorHandler(this.memberList, 'mapMemberColor', 'idap')
         }
       }
       const res_1 = await showWorkbenchEnum()
       if (res_1.code === 200) {
         this.selfScheduleType = res_1.data.selfScheduleType // 日程类型
         this.taskScheduleEvent = res_1.data.taskScheduleEvent // 排期类型
+        this.colorHandler(this.taskScheduleEvent, 'mapTypeColor', 'code')
         this.selfScheduleType.unshift({ code: -1, msg: '未分类' })
         this.schedule = this.selfScheduleType.map(item => item.code)
         this.scheduling = this.taskScheduleEvent.map(item => item.code)
@@ -151,15 +160,17 @@ export default {
         this.$emit('change')
         this.$emit('update:value', this.filtrate)
         this.$emit('update:memberColor', this.mapMemberColor)
+        this.$emit('update:typeColor', this.mapTypeColor)
       })
     },
-    colorHandler(arr) { // 成员对应颜色处理
-      this.mapMemberColor.clear()
+    colorHandler(arr, type, key) { // 成员对应颜色处理
+      // this.mapMemberColor.clear()
+      this[type] = {}
       arr.map((item, index) => {
-        this.mapMemberColor.set(item.idap, {
+        this[type][item[key]] = {
           color: '#FFFFFF',
-          bgColor: this.colorList[index % 20]
-        })
+          bgColor: colorList[index]
+        }
       })
     },
     handleMember(arr) { // 人员和颜色的映射处理
@@ -254,7 +265,7 @@ export default {
   margin: 0 20px 0 0;
   font-weight: 400;
 }
->>>.el-checkbox {
+/deep/.el-checkbox {
   margin-bottom: 20px;
 }
 .check-point {

+ 6 - 0
src/views/workbench/mixins/utils.js

@@ -0,0 +1,6 @@
+export const colorList = [
+  'rgba(64,127,232,1)', 'rgba(11,160,188,1)', 'rgba(28,188,126,1)', 'rgba(235,172,0,1)', 'rgba(132,100,247,1)',
+  'rgba(73,92,197,1)', 'rgba(193,67,96,1)', 'rgba(211,87,35,1)', 'rgba(40,28,149,1)', 'rgba(85,138,43,1)',
+  'rgba(67,17,59,1)', 'rgba(221,57,222,1)', 'rgba(149,114,109,1)', 'rgba(202,50,31,1)', 'rgba(226,119,141,1)',
+  'rgba(240,164,126,1)', 'rgba(59,64,72,1)', 'rgba(115,159,158,1)', 'rgba(122,209,67,1)', 'rgba(152,40,49,1)'
+]

+ 25 - 16
src/views/workbench/person/components/myFullCalendar.vue

@@ -153,6 +153,15 @@ export default {
       calendarTitle: ''
     }
   },
+  watch: {
+    events: {
+      handler(newV) {
+        setTimeout(() => { this.setIcon() }, 0)
+      },
+      immediate: true,
+      deep: true
+    }
+  },
   mounted() {
     this.settingGetCalendar()
     this.callCalendarApi()
@@ -194,7 +203,7 @@ export default {
         }
       }
       this.$nextTick(() => {
-        setTimeout(() => { this.setIcon() }, 2000)
+        setTimeout(() => { this.setIcon() }, 200)
         this.$emit('change', calendarApi.view)
         if (methods === 'today' && this.methods > 1) return false
         this.setDate()
@@ -255,17 +264,17 @@ export default {
 </script>
 
 <style scoped lang="scss">
->>>.addStyle {
+/deep/.addStyle {
   width: 20px;
   text-align: center;
   font-size: 12px;
   color: #FFF;
   background-color: #409eff;
 }
->>>.el-tabs__nav-scroll{
+/deep/.el-tabs__nav-scroll{
   margin: 0 35px;
 }
->>>.el-tabs__nav-wrap::after{
+/deep/.el-tabs__nav-wrap::after{
   height: 1px;
 }
 .calender-top {
@@ -280,47 +289,47 @@ export default {
     color:rgba(51,59,74,1);
   }
 }
->>>.fc-content {
+/deep/.fc-content {
   height: auto !important;
   display: flex;
   padding-top: 2px;
 }
->>>.fc-title {
+/deep/.fc-title {
   line-height: 15px;
   padding-left: 4px;
   font-weight: bold !important;
 }
->>>.fc-event-container .fc-content {
+/deep/.fc-event-container .fc-content {
   text-overflow: inherit;
 }
->>>.fc-day-grid-event .fc-content{
+/deep/.fc-day-grid-event .fc-content{
   white-space: normal;
 }
->>>.fc-event {
+/deep/.fc-event {
   line-height: auto !important;
 }
->>>.fc-day-header {
+/deep/.fc-day-header {
   height: 52px;
   line-height: 52px;
 }
->>>#small-calendar .fc-dayGridMonth-view .table-bordered .fc-body .fc-day-number {
+/deep/#small-calendar .fc-dayGridMonth-view .table-bordered .fc-body .fc-day-number {
   transform: scale(1);
   font-size: 14px;
 }
->>>#small-calendar .fc-view-container .table-bordered .fc-head .fc-day-header {
+/deep/#small-calendar .fc-view-container .table-bordered .fc-head .fc-day-header {
   transform: scale(1);
   font-size: 14px;
 }
->>>.fc-scroller::-webkit-scrollbar {
+/deep/.fc-scroller::-webkit-scrollbar {
   display:none !important;
 }
->>>.fc-today {
+/deep/.fc-today {
   background-color: rgba(235,172,0,0.1);
 }
->>>.fc th{
+/deep/.fc th{
   border-color: #D8D8D8;
 }
->>>.fc td {
+/deep/.fc td {
   border-color: #D8D8D8;
 }
 </style>

+ 21 - 20
src/views/workbench/person/index.vue

@@ -149,6 +149,7 @@
             :value.sync="filtrate"
             :type="'个人'"
             style="margin: 0 30px;"
+            :type-color.sync="mapTypeColor"
             @change="queryWorkListByTime(calendarView)"
             @loading="loading = false"
           />
@@ -266,6 +267,7 @@ import websocket from '@/views/workbench/mixins/websocket'
 import listView from '@/views/workbench/components/listView.vue'
 import { getAllTime } from '@/utils/global.js'
 import { settingGetBizList } from '@/api/defectManage'
+// import { colorList } from '../mixins/utils'
 import '@/styles/PublicStyle/index.scss'
 
 export default {
@@ -337,12 +339,8 @@ export default {
       showDetail: false,
       visibleSchedule: false, // 排期任务弹框
       detailXY: [0, 0], // 详情弹框位置
-      colorList: [
-        'rgba(64,127,232,1)', 'rgba(11,160,188,1)', 'rgba(28,188,126,1)', 'rgba(235,172,0,1)', 'rgba(132,100,247,1)',
-        'rgba(73,92,197,1)', 'rgba(193,67,96,1)', 'rgba(211,87,35,1)', 'rgba(40,28,149,1)', 'rgba(85,138,43,1)',
-        'rgba(67,17,59,1)', 'rgba(221,57,222,1)', 'rgba(149,114,109,1)', 'rgba(202,50,31,1)', 'rgba(226,119,141,1)',
-        'rgba(240,164,126,1)', 'rgba(59,64,72,1)', 'rgba(115,159,158,1)', 'rgba(122,209,67,1)', 'rgba(152,40,49,1)'
-      ],
+      mapTypeColor: {}, // 状态对应色表
+      // colorList: ,
       tabTips: { // 顶部tab红点提示
         require: false,
         task: false,
@@ -536,26 +534,29 @@ export default {
       const res = await queryWorkListByTime(params)
       if (res.code === 200) {
         res.data = res.data.sort((a, b) => a.id - b.id)
-        let num = 0
+        // let num = 0
         this.calendarEvents = res.data.map((item, index) => {
           const title = item.origin ? '日程:' : '排期:'
           let require = ''
-          if (item.requireList && item.requireList.length > 0) {
-            require = `所属需求:${item.requireList.map(item => item.name).join(',')}`
-          } else if (item.taskList && item.taskList.length > 0) {
+          const name = item.origin ? item.name : `【${item.name}】`
+          // if (item.requireList && item.requireList.length > 0) {
+          //   require = `所属需求:${item.requireList.map(item => item.name).join(',')}`
+          // } else
+          if (item.taskList && item.taskList.length > 0) {
             require = `所属任务:${item.taskList.map(item => item.name).join(',')}`
           }
-          if (index >= 1 && item.id === res.data[index - 1].id) {
-            num = num + 1
-          }
+          // if (index >= 1 && item.id === res.data[index - 1].id) {
+          //   num = num + 1
+          // }
+          // const bgColor = params.peoples.length < 2 ? this.mapTypeColor[item.type].bgColor : colorObj.bgColor
           return {
             id: item.id,
-            title: `${title}【${item.peopleObject.name}】 ${item.name} ${item.desc ? ':' + item.desc : ''}; ${item.origin ? '' : require}`,
+            title: `${title}【${item.peopleObject.name}】${name}${item.desc ? item.desc + ';' : ''} ${item.origin ? '' : require}`,
             start: moment(item.startTime).toDate(),
             end: moment(item.endTime).add(1, 'day').toDate(),
             detailData: item,
             className: item.origin ? 'schedule1' : 'schedule2',
-            backgroundColor: this.colorList[(index - num) % 20],
+            backgroundColor: item.origin ? 'rgba(122,209,67,1)' : this.mapTypeColor[item.type].bgColor,
             textColor: '#FFFFFF'
           }
         })
@@ -681,7 +682,7 @@ export default {
   @include main-header;
   margin-bottom: 0;
   border-bottom: 1px solid rgba(155, 155, 155, .2);
-  >>>.el-tabs__nav-wrap::after {
+  /deep/.el-tabs__nav-wrap::after {
     height: 0;
   }
   .top-tabs {
@@ -773,22 +774,22 @@ export default {
 .my-fullCalendar {
   padding-bottom: 150px;
 }
->>>.schedule1 {
+/deep/.schedule1 {
   margin: 4px;
   padding: 2px 10px;
   border: none;
 }
->>>.schedule2 {
+/deep/.schedule2 {
   margin: 4px;
   padding: 2px 10px;
   border: none;
 }
->>>.fc-content{
+/deep/.fc-content{
   transform: scale(1) !important;
   margin-left: 0 !important;
   width: auto !important;
 }
->>>.fc-content span{
+/deep/.fc-content span{
   bottom: 0 !important;
 }
 </style>

+ 20 - 16
src/views/workbench/team/index.vue

@@ -50,6 +50,7 @@
           :search-form="searchForm"
           :type="'团队'"
           style="margin: 0 30px;"
+          :type-color.sync="mapTypeColor"
           :member-color.sync="mapMemberColor"
           @change="queryTeamWorkListByTime(calendarView)"
           @loading="loading = false"
@@ -270,7 +271,8 @@ export default {
       filtrate: {// 筛选区域
         checkedMembers: [] // 被选中的成员列表
       },
-      mapMemberColor: new Map(), // 人员对应颜色表
+      mapMemberColor: {}, // 人员对应颜色表
+      mapTypeColor: {}, // 状态对应色表
       calendarEvents: [// 日程图标数据
         {
           title: 'Event Now',
@@ -550,24 +552,26 @@ export default {
       const res = await queryTeamWorkListByTime(params)
       if (res.code === 200) {
         this.calendarEvents = res.data.map((item, index) => {
-          const colorObj = this.mapMemberColor.get(item.peopleObject.idap)
+          const colorObj = this.mapMemberColor[item.peopleObject.idap]
+          const bgColor = params.peoples.length < 2 ? item.origin ? 'rgba(122,209,67,1)' : this.mapTypeColor[item.type].bgColor : colorObj.bgColor
           const title = item.origin ? '日程:' : '排期:'
-          let require = ''
+          // let require = ''
           let task = ''
-          if (item.requireList && item.requireList.length > 0) {
-            require = `所属需求:${item.requireList.map(item => item.name).join(',')}`
-          }
+          const name = item.origin ? item.name : `【${item.name}】`
+          // if (item.requireList && item.requireList.length > 0) {
+          //   require = `所属需求:${item.requireList.map(item => item.name).join(',')}`
+          // }
           if (item.taskList && item.taskList.length > 0) {
             task = `所属任务:${item.taskList.map(item => item.name).join(',')}`
           }
           return {
             id: item.id,
-            title: `${title}【${item.peopleObject.name}】${item.name} ${item.desc ? ':' + item.desc : ''}; ${item.origin ? '' : require + ';'} ${task}`,
+            title: `${title}【${item.peopleObject.name}】${name}${item.desc ? item.desc + ';' : ''} ${task}`,
             start: moment(item.startTime).toDate(),
             end: moment(item.endTime).add(1, 'day').toDate(),
             detailData: item,
             className: item.origin ? 'schedule1' : 'schedule2',
-            backgroundColor: colorObj && colorObj.bgColor || null,
+            backgroundColor: bgColor || null,
             textColor: colorObj && colorObj.color || null
           }
         })
@@ -649,7 +653,7 @@ export default {
   margin-bottom: 0;
   margin-right: 0;
   border-bottom: 1px solid rgba(155, 155, 155, .2);
-  >>>.el-tabs__nav-wrap::after {
+  /deep/.el-tabs__nav-wrap::after {
     height: 0;
   }
   .top-tabs {
@@ -700,26 +704,26 @@ export default {
   font-weight: 600;
   cursor: pointer;
 }
->>>.el-dropdown-menu__item {
+/deep/.el-dropdown-menu__item {
   max-width: 20vw;
   overflow: scroll;
 }
->>>.schedule1 {
+/deep/.schedule1 {
   margin: 4px;
   padding: 2px 10px;
   border: none;
 }
->>>.schedule2 {
+/deep/.schedule2 {
   margin: 4px;
   padding: 2px 10px;
   border: none;
 }
->>>.fc-content{
+/deep/.fc-content{
   transform: scale(1) !important;
   margin-left: 0 !important;
   width: auto !important;
 }
->>>.fc-content span{
+/deep/.fc-content span{
   bottom: 0 !important;
 }
 </style>
@@ -727,10 +731,10 @@ export default {
 .cascader {
   position: absolute;
   width: 20px;
-  >>>.el-input__inner {
+  /deep/.el-input__inner {
     opacity: 0;
   }
-  >>>.el-input__icon {
+  /deep/.el-input__icon {
     display: none;
 }
 }