Sfoglia il codice sorgente

数据大盘:半浮层改造(0.7)

洪海涛 4 anni fa
parent
commit
d1e2747caf

+ 5 - 1
src/views/dataBigManage/components/drawerModal/drawerModalData.js

@@ -535,7 +535,11 @@ export const timelineList = {
   ],
   // 上线过程
   lineRate: [
-    '全部上线', '裸奔上线', '回滚'
+    '全部上线', '裸奔上线'//  '回滚'
+  ],
+  // 回滚次数
+  returnCase: [
+    '全部', '预发回滚', '全量回滚', '小流量回滚'
   ]
 }
 

+ 28 - 6
src/views/dataBigManage/components/drawerModal/index.vue

@@ -215,6 +215,7 @@ export default {
       console.log(this.drawerData, 210)
       this.headerTitle = this.drawerData.headerTitle
       this.title = this.headerTitle.search(/质量|效率/) > -1 ? this.drawerData.label || '' : this.drawerData.activeLabel
+      console.log(this.headerTitle, this.title)
       if (this.headerTitle && this.title) {
         // console.log(this.drawerData)
         this.pagingInit()
@@ -251,6 +252,9 @@ export default {
         if (this.drawerData.label === '准出不通过率') {
           this.title = '准出记录'
         }
+        if (this.drawerData.moduleName && this.drawerData.moduleName === '回滚次数') {
+          this.title = !this.drawerData.index ? '回滚次数' : this.drawerData[this.drawerData.itemKey].label
+        }
       }
       if (this.headerTitle === '效率') {
         this.activeLabel = this.drawerData.activeLabel
@@ -286,12 +290,15 @@ export default {
     },
     // 设置ids
     setIds() {
-      if (this.headerTitle === '质量') {
+      if (this.headerTitle === '质量' && !this.drawerData.moduleName) {
         this.ids = this.drawerData.IdList.map(e => e)
       }
       if (this.drawerData.moduleName && this.drawerData.moduleName === '上线过程') {
         this.ids = this.drawerData.IdList.map(e => e)
       }
+      if (this.drawerData.moduleName && this.drawerData.moduleName === '回滚次数') {
+        this.ids = this.drawerData[this.drawerData.itemKey].idList.map(e => e)
+      }
       if (this.headerTitle === '吞吐量') {
         this.drawerData.list.forEach(elm => {
           if (elm.label === this.drawerData.activeLabel && elm.idList) {
@@ -315,6 +322,10 @@ export default {
             first = [...timelineList.lineRate]
             firstActive = this.drawerData.index
           }
+          if (this.drawerData.moduleName && this.drawerData.moduleName === '回滚次数') {
+            first = [...timelineList.returnCase]
+            firstActive = this.drawerData.index
+          }
         }
         if (this.headerTitle === '吞吐量') {
           secondActive = 0
@@ -423,6 +434,10 @@ export default {
       if (this.drawerData.moduleName && this.drawerData.moduleName === '上线过程') {
         this.column = columns.test_freeOn_lineRateIdListColumns.map(e => e)
       }
+      if (this.drawerData.moduleName && this.drawerData.moduleName === '回滚次数') {
+        // this.ids = this.drawerData[this.drawerData.itemKey].idList.map(e => e)
+        this.column = columns.test_freeOn_lineRateIdListColumns.map(e => e)
+      }
       if (this.title.search(/新增问题/) > -1) {
         this.column = columns.newQuestionColumns.map(e => e)
       }
@@ -481,6 +496,10 @@ export default {
             // console.log(this.drawerData.parent.list[value])
             this.ids = this.drawerData.parent.list[value].IdList.map(e => e)
           }
+          if (this.drawerData.moduleName && this.drawerData.moduleName === '回滚次数') {
+            const items = ['countStr', 'preCountStr', 'fullCountStr', 'lowCountStr']
+            this.ids = this.drawerData[items[value]].idList.map(e => e)
+          }
         }
         if (this.headerTitle === '吞吐量') {
           this.timelineData.firstActive = value || 0
@@ -531,7 +550,7 @@ export default {
             this.setReportList()
           }
         }
-        if (this.drawerData.moduleName && this.drawerData.moduleName === '上线过程') {
+        if (this.drawerData.moduleName && (this.drawerData.moduleName === '上线过程' || this.drawerData.moduleName === '回滚次数')) {
           if (this.ids.length) {
             this.loading = true
             this.getOdinJobListFn()
@@ -882,8 +901,8 @@ export default {
     },
     // 设置表格高度
     setTitleHeight() {
-      if (this.drawerData.moduleName && this.drawerData.moduleName === '上线过程') {
-        this.tableHeight = 'calc(100vh - 288px)'
+      if (this.drawerData.moduleName && this.drawerData.moduleName.search(/上线过程|回滚次数/) > -1) {
+        this.tableHeight = 'calc(100vh - 290px)'
       } else if (this.title.search(/状态停留分布图数据|状态累积流量图数据/) > -1) {
         this.tableHeight = 'calc(100vh - 363px)'
       } else if (this.title.search(/需求周期|新增项目|新增任务|reopen|新增缺陷|需求人力|任务周期|缺陷修复时长|延期准出率|延期提测率/) > -1) {
@@ -909,7 +928,7 @@ export default {
       if (this.headerTitle === '质量' && this.drawerData.label === '新增问题') {
         const url = `http://odin.xiaojukeji.com/#/risk/starflower/casedetail?id=${row.id}&name=${row.title}`
         window.open(url, '_blank')
-      } else if (this.drawerData.moduleName && this.drawerData.moduleName === '上线过程') {
+      } else if (this.drawerData.moduleName && this.drawerData.moduleName.search(/上线过程|回滚次数/) > -1) {
         const url = `http://odin.v5.intra.xiaojukeji.com/#/deploy/job/status/?jobId=${row.id}`
         window.open(url, '_blank')
       } else if (this.headerTitle === '质量' && this.drawerData.label.search(/^(提测报告|准出记录)/) > -1) {
@@ -978,6 +997,9 @@ export default {
         if (this.drawerData.moduleName && this.drawerData.moduleName === '上线过程') {
           return true
         }
+        if (this.drawerData.moduleName && this.drawerData.moduleName === '回滚次数') {
+          return true
+        }
         return this.headerTitle.search(/吞吐量|效率/) > -1
       }
       // 是第二条
@@ -1035,7 +1057,7 @@ export default {
   background: #F7F7F7;
   border-radius: 4px;
   min-height: 120px;
-  margin: 20px 30px;
+  margin: 20px 30px 10px;
   overflow: hidden;
 }
 .drawer-padding {

+ 4 - 4
src/views/dataBigManage/components/qualityModule/index.vue

@@ -99,7 +99,7 @@
           style="margin-top: 40px"
         >
           <el-col :span="12" class="mb10">
-            <span class="rollBackItem" :style="{ cursor: 'pointer'}" @click.stop="onDetial('上线过程', mainData.onlineProcessList.rollBack.countStr)">
+            <span class="rollBackItem" :style="{ cursor: 'pointer'}" @click.stop="onDetial('上线过程', {...mainData.onlineProcessList.rollBack, itemKey: 'countStr', index: 0, label:'回滚次数', moduleName: '回滚次数'})">
               <span class="bigCircle" style="background: #7ED321" />
               回滚
               <span class="numText" style="font-size: 20px">{{ mainData.onlineProcessList.rollBack.countStr.countStr }}</span>
@@ -107,19 +107,19 @@
             </span>
           </el-col>
           <el-col :span="12" class="mb10">
-            <div class="rollBackItem pointer" @click.stop="onDetial('上线过程', mainData.onlineProcessList.rollBack.preCountStr)">
+            <div class="rollBackItem pointer" @click.stop="onDetial('上线过程', {...mainData.onlineProcessList.rollBack, itemKey: 'preCountStr', index: 1, label:'预发回滚', moduleName: '回滚次数'})">
               <span class="circle" style="background: #3F9DFE" />
               预发回滚
               <span class="numText">{{ mainData.onlineProcessList.rollBack.preCountStr.countStr }}</span>
             </div>
-            <div class="rollBackItem pointer" @click.stop="onDetial('上线过程', mainData.onlineProcessList.rollBack.fullCountStr)">
+            <div class="rollBackItem pointer" @click.stop="onDetial('上线过程', {...mainData.onlineProcessList.rollBack, itemKey: 'fullCountStr', index: 2, label:'全量回滚', moduleName: '回滚次数'})">
               <span class="circle" style="background: #3F9DFE" />
               全量回滚
               <span class="numText">{{ mainData.onlineProcessList.rollBack.fullCountStr.countStr }}</span>
             </div>
-            <div class="rollBackItem pointer" @click.stop="onDetial('上线过程', mainData.onlineProcessList.rollBack.lowCountStr)">
+            <div class="rollBackItem pointer" @click.stop="onDetial('上线过程',{...mainData.onlineProcessList.rollBack, itemKey: 'lowCountStr', index: 3, label:'小流量回滚', moduleName: '回滚次数'})">
               <span class="circle" style="background: #3F9DFE" />
               小流量回滚
               <span class="numText">{{ mainData.onlineProcessList.rollBack.lowCountStr.countStr }}</span>