Selaa lähdekoodia

数据大盘改造

洪海涛 4 vuotta sitten
vanhempi
sitoutus
8acb79b4ee

+ 3 - 0
src/components/baseTable/table.vue

@@ -156,4 +156,7 @@ export default {
   border-radius: 4px;
   padding: 2px 10px;
 }
+.ellipsis {
+  width: calc(100% - 5px);
+}
 </style>

+ 111 - 25
src/views/dataBigManage/components/drawerModal/drawerModalData.js

@@ -95,7 +95,7 @@ export const columns = {
     {
       label: '优先级',
       key: 'priorityName',
-      minWidth: 90,
+      minWidth: 65,
       align: 'left',
       type: 'level'
     }
@@ -214,8 +214,9 @@ export const columns = {
       {
         label: '优先级',
         key: 'priorityStr',
-        minWidth: 50,
+        minWidth: 65,
         type: 'level',
+        fixed: true,
         align: 'left'
       },
       {
@@ -224,15 +225,44 @@ export const columns = {
         minWidth: 200,
         align: 'left',
         type: 'topTitle',
+        fixed: true,
         topName: 'REQUIREMENT',
         topKey: 'id'
       },
+      // {
+      //   label: '需求交付周期',
+      //   key: 'title',
+      //   minWidth: 100,
+      //   // tips: '需求从开始到交付(已上线取实际上线时间,未上线取排期交付时间)的总周期 / 参与计算的需求总量',
+      //   align: 'center'
+      // },
       {
         label: '需求交付周期',
         key: 'title',
+        minWidth: 130,
+        tips: '需求从开始到交付(已上线取实际上线时间,未上线取排期交付时间)的总周期',
+        align: 'left'
+      },
+      {
+        label: '产品周期',
+        key: 'title2',
         minWidth: 100,
-        // tips: '需求从开始到交付(已上线取实际上线时间,未上线取排期交付时间)的总周期 / 参与计算的需求总量',
-        align: 'center'
+        tips: '计算范围内需求,需求从BRD评审通过到技术准入的总周期',
+        align: 'left'
+      },
+      {
+        label: '研发周期',
+        key: 'title3',
+        minWidth: 100,
+        tips: '计算范围内需求, 需求排期里开发、联调、提测、上线类型排期的总周期',
+        align: 'left'
+      },
+      {
+        label: '测试周期',
+        key: 'title4',
+        minWidth: 100,
+        tips: '计算范围内需求,需求排期里用例、测试、准出、上线类型排期的总周期',
+        align: 'left'
       },
       {
         label: '状态',
@@ -245,7 +275,7 @@ export const columns = {
       {
         label: '需求交付周期',
         key: 'title',
-        minWidth: 100,
+        minWidth: 180,
         tips: '需求从开始到交付(已上线取实际上线时间,未上线取排期交付时间)的总周期',
         align: 'left'
       },
@@ -276,7 +306,7 @@ export const columns = {
       {
         label: '优先级',
         key: 'priorityStr',
-        minWidth: 50,
+        minWidth: 65,
         type: 'level',
         align: 'left'
       },
@@ -292,10 +322,24 @@ export const columns = {
       {
         label: '任务交付周期',
         key: 'title',
-        minWidth: 90,
+        minWidth: 130,
         tips: '计算范围内任务,任务从开始到交付(已上线取实际上线时间,未上线取排期交付时间)的总周期',
         align: 'center'
       },
+      {
+        label: '研发周期',
+        key: 'title2',
+        minWidth: 100,
+        tips: '计算范围内任务,任务开发、联调、提测、上线排期的总周期',
+        align: 'center'
+      },
+      {
+        label: '测试周期',
+        key: 'title3',
+        minWidth: 100,
+        tips: '计算范围内任务,任务用例、测试、准出、上线排期的总周期',
+        align: 'center'
+      },
       {
         label: '状态',
         key: 'statusStr',
@@ -307,21 +351,21 @@ export const columns = {
       {
         label: '任务交付周期',
         key: 'title',
-        minWidth: 90,
+        minWidth: 150,
         tips: '计算范围内任务,任务从开始到交付(已上线取实际上线时间,未上线取排期交付时间)的总周期',
         align: 'center'
       },
       {
         label: '研发周期',
         key: 'title',
-        minWidth: 90,
+        minWidth: 100,
         tips: '计算范围内任务,任务开发、联调、提测、上线排期的总周期',
         align: 'center'
       },
       {
         label: '测试周期',
         key: 'title',
-        minWidth: 90,
+        minWidth: 100,
         tips: '计算范围内任务,任务用例、测试、准出、上线排期的总周期',
         align: 'center'
       }
@@ -331,7 +375,7 @@ export const columns = {
       {
         label: '优先级',
         key: 'priorityStr',
-        minWidth: 50,
+        minWidth: 65,
         type: 'level',
         align: 'left'
       },
@@ -347,14 +391,35 @@ export const columns = {
       {
         label: '需求使用人力',
         key: 'title',
-        minWidth: 90,
+        minWidth: 130,
         tips: '团队成员参与的在统计时间范围内需求状态在"已排期"到"已上线"(不包含)状态的需求,或在统计时间范围内变更为已上线的需求',
         align: 'center'
       },
+      {
+        label: '开发人力',
+        key: 'title2',
+        minWidth: 100,
+        tips: ' 计算范围内需求,需求开发、联调、提测、上线排期人日总量',
+        align: 'center'
+      },
+      {
+        label: '测试人力',
+        key: 'title3',
+        minWidth: 100,
+        tips: '计算范围内需求,需求用例、测试、准出、上线排期人日总量',
+        align: 'center'
+      },
+      {
+        label: '联调人力',
+        key: 'title4',
+        minWidth: 100,
+        tips: '计算范围内需求,需求联调排期人日总量',
+        align: 'center'
+      },
       {
         label: '状态',
         key: 'statusStr',
-        minWidth: 90,
+        minWidth: 100,
         align: 'center'
       }
     ],
@@ -362,28 +427,28 @@ export const columns = {
       {
         label: '需求使用人力',
         key: 'title',
-        minWidth: 90,
+        minWidth: 200,
         tips: '团队成员参与的在统计时间范围内需求状态在"已排期"到"已上线"(不包含)状态的需求,或在统计时间范围内变更为已上线的需求',
         align: 'center'
       },
       {
         label: '开发人力',
         key: 'title',
-        minWidth: 90,
+        minWidth: 100,
         tips: ' 计算范围内需求,需求开发、联调、提测、上线排期人日总量',
         align: 'center'
       },
       {
         label: '测试人力',
         key: 'title',
-        minWidth: 90,
+        minWidth: 100,
         tips: '计算范围内需求,需求用例、测试、准出、上线排期人日总量',
         align: 'center'
       },
       {
         label: '联调人力',
         key: 'title',
-        minWidth: 90,
+        minWidth: 100,
         tips: '计算范围内需求,需求联调排期人日总量',
         align: 'center'
       }
@@ -393,7 +458,7 @@ export const columns = {
       {
         label: '优先级',
         key: 'priorityStr',
-        minWidth: 50,
+        minWidth: 65,
         type: 'level',
         align: 'left'
       },
@@ -409,10 +474,31 @@ export const columns = {
       {
         label: '任务使用人力',
         key: 'title',
-        minWidth: 90,
+        minWidth: 130,
         tips: '团队成员参与的在统计时间范围内任务状态在"已排期"到"已上线"(不包含)状态的任务,或在统计时间范围内变更为已上线的任务',
         align: 'center'
       },
+      {
+        label: '开发人力',
+        key: 'title2',
+        minWidth: 100,
+        tips: '计算范围内任务,开发、联调、提测、上线排期人日总量 / 参与计算的任务总量',
+        align: 'center'
+      },
+      {
+        label: '测试人力',
+        key: 'title3',
+        minWidth: 100,
+        tips: '计算范围内任务,任务用例、测试、准出、上线排期人日总量 / 参与计算的任务总量',
+        align: 'center'
+      },
+      {
+        label: '联调人力',
+        key: 'title4',
+        minWidth: 100,
+        tips: '计算范围内任务,任务联调排期人日总量 / 参与计算的任务总量',
+        align: 'center'
+      },
       {
         label: '状态',
         key: 'statusStr',
@@ -424,28 +510,28 @@ export const columns = {
       {
         label: '任务使用人力',
         key: 'title',
-        minWidth: 90,
+        minWidth: 130,
         tips: '团队成员参与的在统计时间范围内需求状态在"已排期"到"已上线"(不包含)状态的需求,或在统计时间范围内变更为已上线的需求',
         align: 'center'
       },
       {
         label: '开发人力',
         key: 'title',
-        minWidth: 90,
+        minWidth: 100,
         tips: '计算范围内任务,开发、联调、提测、上线排期人日总量 / 参与计算的任务总量',
         align: 'center'
       },
       {
         label: '测试人力',
         key: 'title',
-        minWidth: 90,
+        minWidth: 100,
         tips: '计算范围内任务,任务用例、测试、准出、上线排期人日总量 / 参与计算的任务总量',
         align: 'center'
       },
       {
         label: '联调人力',
         key: 'title',
-        minWidth: 90,
+        minWidth: 100,
         tips: '计算范围内任务,任务联调排期人日总量 / 参与计算的任务总量',
         align: 'center'
       }
@@ -487,7 +573,7 @@ export const columns = {
       {
         label: '优先级',
         key: 'priorityStr',
-        minWidth: 50,
+        minWidth: 65,
         type: 'level',
         align: 'left'
       },
@@ -526,7 +612,7 @@ export const columns = {
       {
         label: '优先级',
         key: 'priorityStr',
-        minWidth: 50,
+        minWidth: 65,
         type: 'level',
         align: 'left'
       },

+ 19 - 11
src/views/dataBigManage/components/drawerModal/index.vue

@@ -247,6 +247,7 @@ export default {
       const paging = _.cloneDeep(this.paging)
       paging.pageSize = Number.parseInt(pageSize)
       this.paging = _.cloneDeep(paging)
+      console.log(this.paging, 250)
     },
     // 设置标题
     setTitle() {
@@ -415,7 +416,7 @@ export default {
       paging.pageSize = value
       this.paging = _.cloneDeep(paging)
       window.localStorage.setItem('pageSize', value)
-      if (this.headerTitle === '效率' && this.title !== '需求人力' && this.title !== '任务人力') {
+      if (this.headerTitle === '效率' && this.title !== '需求人力') {
         this.tableListPagination()
       } else {
         this.setTableList()
@@ -427,7 +428,7 @@ export default {
       paging.curIndex = value
       this.paging = _.cloneDeep(paging)
       // console.log(this.title)
-      if (this.headerTitle === '效率' && this.title !== '需求人力' && this.title !== '任务人力') {
+      if (this.headerTitle === '效率' && this.title !== '需求人力') {
         this.tableListPagination()
       } else {
         this.setTableList()
@@ -490,11 +491,11 @@ export default {
         if (this.title.search(/缺陷修复时长|缺陷24小时修复率/) > -1) {
           columnsKey = 'bugRepairDataColumns'
         }
-        const columnsTipsKey = `${columnsKey}Tips`
+        // const columnsTipsKey = `${columnsKey}Tips`
         this.column = columns.efficiency[columnsKey].map((elm, index) => {
-          if (index === 2 && this.title.search(/任务周期|需求人力|任务人力|需求周期/) > -1) {
-            return columns.efficiency[columnsTipsKey][this.timelineData.firstActive || 0]
-          }
+          // if (index === 2 && this.title.search(/任务周期|需求人力|任务人力|需求周期/) > -1) {
+          //   return columns.efficiency[columnsTipsKey][this.timelineData.firstActive || 0]
+          // }
           return elm
         })
       }
@@ -837,12 +838,13 @@ export default {
       delete params.pageTotal
       const res = await getTaskPeopleData(params)
       if (res.code === 200) {
-        // console.log(res.data)
-        this.tableList = res.data
-        // this.tableListOld = res.data.length && res.data.map(e => e)
-        // this.tableListPagination()
+        // this.tableList = res.data
+        this.tableListOld = res.data.length && res.data.map(e => e)
+        this.tableListPagination()
+        paging.pageTotal = this.tableListOld.length
         paging.pageTotal = this.sourceData[0].IdList.length
         this.paging = { ...paging }
+        console.log(847, this.paging)
         this.loading = false
       }
     },
@@ -951,7 +953,9 @@ export default {
         this.tableHeight = 'calc(100vh - 290px)'
       } else if (this.title.search(/状态停留分布图数据|状态累积流量图数据/) > -1) {
         this.tableHeight = 'calc(100vh - 363px)'
-      } else if (this.title.search(/需求周期|新增项目|新增任务|reopen|新增缺陷|需求人力|任务人力|任务周期|缺陷修复时长|延期准出率|延期提测率/) > -1) {
+      } else if (this.title.search(/需求周期|需求人力|任务人力|任务周期/) > -1) {
+        this.tableHeight = 'calc(100vh - 136px)'
+      } else if (this.title.search(/新增项目|新增任务|reopen|新增缺陷|缺陷修复时长|延期准出率|延期提测率/) > -1) {
         this.tableHeight = 'calc(100vh - 288px)'
       } else if (this.title.search(/需求|任务|项目/) > -1) {
         // 吞吐量: 需求
@@ -1046,6 +1050,10 @@ export default {
         if (this.drawerData.moduleName && this.drawerData.moduleName === '回滚次数') {
           return true
         }
+        console.log(1049, this.title, this.headerTitle)
+        if (this.headerTitle.search(/效率/) > -1 && this.title.search(/需求周期|任务周期|需求人力|任务人力/) > -1) {
+          return false
+        }
         return this.headerTitle.search(/吞吐量|效率/) > -1
       }
       // 是第二条