Prechádzať zdrojové kódy

优化缺陷抽屉筛选功能(月报查看页面)

qinzhipeng_v@didiglobal.com 4 rokov pred
rodič
commit
b3a8a709f8

+ 15 - 14
src/views/monthlyReport/childrenPage/editReport/components/SubTitle.vue

@@ -67,25 +67,26 @@ export default {
         this.requireList = { toType: '缺陷', xaxis: this.bugPriority, title: title, yaxis: yaxis, dataIndex: index }
       } else if (index > 3) {
         let [one, tow, three] = [[], [], []]
+        const [a, s, d, f, g, h, j, k, l] = [[], [], [], [], [], [], [], [], []]
         if (data.option[0]) {
           data.option.map(item => {
             if (item.isRepaired && item.repairTime < 24) { // 24小时内修复
               this.setOption(item, one)
-              q.push(item.id)
-              if (item.priority < 2) { w.push(item.id) }
-              if (item.priority > 1) { e.push(item.id) }
-              one = [q, w, e]
-            } else if (item.isRepaired) { // 全不修复
-              q.push(item.id)
-              if (item.priority < 2) { w.push(item.id) }
-              if (item.priority > 1) { e.push(item.id) }
-              tow = [q, w, e]
-            } else if (!item.isRepaired && item.repairTime > 24) { // 24小时内未修复
-              q.push(item.id)
-              if (item.priority < 2) { w.push(item.id) }
-              if (item.priority > 1) { e.push(item.id) }
-              three = [q, w, e]
+              f.push(item.id) // 全部
+              if (item.priority < 2) { g.push(item.id) } // P0&P1
+              if (item.priority > 1) { h.push(item.id) } // P1以上
+              one = [f, g, h]
             }
+            if (!item.isRepaired) { // 24小时内未修复
+              a.push(item.id)
+              if (item.priority < 2) { s.push(item.id) }
+              if (item.priority > 1) { d.push(item.id) }
+              three = [a, s, d]
+            }
+            j.push(item.id)
+            if (item.priority < 2) { k.push(item.id) }
+            if (item.priority > 1) { l.push(item.id) }
+            tow = [j, k, l]
           })
         }
         if (index === 4 || index === 5) {

+ 2 - 2
src/views/quality/components/drawerAll.vue

@@ -183,8 +183,7 @@ export default {
       } else if (this.Statistics.title === '缺陷24小时修复') {
         this.bgMargin = true
         this.defaultKey = this.Statistics.dataIndex
-        this.defaultKey2 = 0
-        this.defaultKey = this.Statistics.dataIndex
+        this.defaultKey2 = this.Statistics.dataIndex
         const listData = this.Statistics.yaxis[this.defaultKey]
         this.dataList = listData[this.defaultKey2]
         this.getTableData(this.dataList)
@@ -241,6 +240,7 @@ export default {
       } else if (this.Statistics.title === '缺陷24小时修复') {
         const listData = this.Statistics.yaxis[this.defaultKey]
         this.dataList = listData[this.defaultKey2]
+        console.log(this.defaultKey, this.defaultKey2, this.dataList)
       }
       if (this.dataList[0]) { // 判断idList有没有数据
         this.getTableData(this.dataList)