|
@@ -1,11 +1,10 @@
|
|
|
|
|
|
<template>
|
|
|
- <!-- <el-container v-loading.fullscreen.lock="loadingOnlineProcess" element-loading-background="rgba(0, 0, 0, 0.7)" element-loading-text="拼命加载中" class="set-background"> -->
|
|
|
- <el-container class="set-background">
|
|
|
+ <el-container v-loading.fullscreen.lock="loadingOnlineProcess" element-loading-background="rgba(0, 0, 0, 0.7)" element-loading-text="拼命加载中" class="set-background">
|
|
|
<el-header class="header">
|
|
|
<el-menu :default-active="activeIndex" active-text-color="#409EFF" mode="horizontal" @select="handleSelect">
|
|
|
<el-menu-item index="0">业务线数据</el-menu-item>
|
|
|
- <el-menu-item index="2">部门数据</el-menu-item>
|
|
|
+ <el-menu-item index="3">部门数据</el-menu-item>
|
|
|
</el-menu>
|
|
|
<el-date-picker
|
|
|
v-model="timeInterval"
|
|
@@ -14,6 +13,7 @@
|
|
|
start-placeholder="开始日期"
|
|
|
end-placeholder="结束日期"
|
|
|
value-format="timestamp"
|
|
|
+ @change="dataSearch"
|
|
|
/>
|
|
|
</el-header>
|
|
|
<el-container style="height:calc(100vh - 140px);">
|
|
@@ -38,14 +38,14 @@
|
|
|
style="width:50%;"
|
|
|
align="center"
|
|
|
>
|
|
|
- <template slot-scope="scope"><a href="javascript:void(0)" style="color:#20a0ff" @click="toReportView(0)">{{ scope.row.totalOnlineNum }}</a></template>
|
|
|
+ <template slot-scope="scope"><a href="javascript:void(0)" style="color:#20a0ff" @click="toReportView('0')">{{ scope.row.totalOnlineNum }}</a></template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
label="免提测上线数"
|
|
|
style="width:50%;"
|
|
|
align="center"
|
|
|
>
|
|
|
- <template slot-scope="scope"><a href="javascript:void(0)" style="color:#20a0ff" @click="toReportView(1)">{{ scope.row.noTestNum }}</a></template>
|
|
|
+ <template slot-scope="scope"><a href="javascript:void(0)" style="color:#20a0ff" @click="toReportView('1')">{{ scope.row.noTestNum }}</a></template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
<el-table
|
|
@@ -65,7 +65,7 @@
|
|
|
style="width:20%;"
|
|
|
align="center"
|
|
|
>
|
|
|
- <template slot-scope="scope"><a href="javascript:void(0)" style="color:#20a0ff" @click="toReportView(2)">{{ scope.row.rollbackNum }}</a></template>
|
|
|
+ <template slot-scope="scope"><a href="javascript:void(0)" style="color:#20a0ff" @click="toReportView('2')">{{ scope.row.rollbackNum }}</a></template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
prop="name"
|
|
@@ -78,21 +78,21 @@
|
|
|
style="width:20%;"
|
|
|
align="center"
|
|
|
>
|
|
|
- <template slot-scope="scope"><a href="javascript:void(0)" style="color:#20a0ff" @click="toReportView(3)">{{ scope.row.preRollbackNum }}</a></template>
|
|
|
+ <template slot-scope="scope"><a href="javascript:void(0)" style="color:#20a0ff" @click="toReportView('3')">{{ scope.row.preRollbackNum }}</a></template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
label="小流量回滚数"
|
|
|
style="width:20%;"
|
|
|
align="center"
|
|
|
>
|
|
|
- <template slot-scope="scope"><a href="javascript:void(0)" style="color:#20a0ff" @click="toReportView(4)">{{ scope.row.preLess5Min }}</a></template>
|
|
|
+ <template slot-scope="scope"><a href="javascript:void(0)" style="color:#20a0ff" @click="toReportView('4')">{{ scope.row.preLess5Min }}</a></template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
label="全量回滚数"
|
|
|
style="width:20%;"
|
|
|
align="center"
|
|
|
>
|
|
|
- <template slot-scope="scope"><a href="javascript:void(0)" style="color:#20a0ff" @click="toReportView(5)">{{ scope.row.allRollbackNum }}</a></template>
|
|
|
+ <template slot-scope="scope"><a href="javascript:void(0)" style="color:#20a0ff" @click="toReportView('5')">{{ scope.row.allRollbackNum }}</a></template>
|
|
|
</el-table-column>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -299,10 +299,11 @@
|
|
|
size="mini"
|
|
|
>
|
|
|
<el-table-column
|
|
|
- prop="totalBugNum"
|
|
|
label="提报bug数"
|
|
|
align="center"
|
|
|
- />
|
|
|
+ >
|
|
|
+ <template slot-scope="scope"><a href="javascript:void(0)" style="color:#20a0ff" @click="toDefectView()">{{ scope.row.totalBugNum }}</a></template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column
|
|
|
label="缺陷分级"
|
|
|
align="center"
|
|
@@ -423,11 +424,11 @@ export default {
|
|
|
loadingOnlineProcess: true,
|
|
|
activeIndex: '0',
|
|
|
activeIndexSecondary: '3',
|
|
|
- timeInterval: '',
|
|
|
+ // timeInterval: '',
|
|
|
pauseTreeNode: {},
|
|
|
pauseKey: '',
|
|
|
- dealWithBusinessDate: []
|
|
|
- // timeInterval: [new Date().getTime() - 15 * 24 * 60 * 60 * 1000, new Date().getTime()]
|
|
|
+ dealWithBusinessDate: [],
|
|
|
+ timeInterval: [new Date().getTime() - 365 * 24 * 60 * 60 * 1000, new Date().getTime()]
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
@@ -462,9 +463,18 @@ export default {
|
|
|
await getDepartment().then(res => {
|
|
|
this.dealWithBusinessDate = res.code === 0 ? res.data : ''
|
|
|
this.pauseTreeNode = this.dealWithBusinessDate[0] ? this.dealWithBusinessDate[0] : ''
|
|
|
- this.pauseKey = 2
|
|
|
+ this.pauseKey = 3
|
|
|
})
|
|
|
- this.allCountAndProlemGet()
|
|
|
+ this.deleteAfter()
|
|
|
+ },
|
|
|
+ deleteAfter() {
|
|
|
+ const pretermitSearch = { id: this.pauseTreeNode.id, type: this.pauseKey, startTime: this.timeInterval[0], endTime: this.timeInterval[1] }
|
|
|
+ axios.all([getOnlineAllCount(pretermitSearch), getOnlineProblem({ id: this.pauseTreeNode.id })]).then(axios.spread((resAllCount, resProblem) => {
|
|
|
+ this.onlineProcess = resAllCount.code === 0 ? resAllCount.data : ''
|
|
|
+ this.problemData = resProblem.code === 0 ? resProblem.data : ''
|
|
|
+ // Object.assign(this.onlineProcess, this.toPercent([this.onlineProcess.allRollbackPercent, this.onlineProcess.preLess5MinPercent, this.onlineProcess.preRollbackPercent, this.onlineProcess.rollbackPercent, this.onlineProcess.noTestPercent]))
|
|
|
+ this.loadingOnlineProcess = false
|
|
|
+ }))
|
|
|
},
|
|
|
allCountAndProlemGet() {
|
|
|
const pretermitSearch = { id: this.pauseTreeNode.id, type: this.pauseKey, startTime: this.timeInterval[0], endTime: this.timeInterval[1] }
|
|
@@ -476,11 +486,18 @@ export default {
|
|
|
this.loadingOnlineProcess = false
|
|
|
}))
|
|
|
},
|
|
|
+ dataSearch() {
|
|
|
+ if (this.pauseKey === 0) {
|
|
|
+ this._initBusinessTreeAndBeginInfo()
|
|
|
+ } else if (this.pauseKey === 3) {
|
|
|
+ this.initDepartmentTree()
|
|
|
+ }
|
|
|
+ },
|
|
|
handleSelect(key) {
|
|
|
if (key === '0') {
|
|
|
this.pauseKey = key
|
|
|
this._initBusinessTreeAndBeginInfo()
|
|
|
- } else if (key === '2') {
|
|
|
+ } else if (key === '3') {
|
|
|
this.pauseKey = key
|
|
|
this.initDepartmentTree()
|
|
|
} else {
|
|
@@ -490,17 +507,19 @@ export default {
|
|
|
toReportView(e) {
|
|
|
this.$router.push({ name: '上线过程', query: { id: this.pauseTreeNode.id, type: this.pauseKey, dataType: e, startTime: this.timeInterval[0], endTime: this.timeInterval[1] }})
|
|
|
},
|
|
|
+ toDefectView() {
|
|
|
+ this.$router.push({ name: '上线过程', query: { id: this.pauseTreeNode.id, type: this.pauseKey, startTime: this.timeInterval[0], endTime: this.timeInterval[1] }})
|
|
|
+ },
|
|
|
handleSelectSecondary(key) {
|
|
|
console.log(key)
|
|
|
},
|
|
|
handleNodeClick(data) {
|
|
|
this.loadingOnlineProcess = true
|
|
|
this.pauseTreeNode = data
|
|
|
- if (!this.pauseTreeNode.child) {
|
|
|
- this.pauseKey = 1
|
|
|
- }
|
|
|
- if (this.pauseTreeNode.modules) {
|
|
|
- this.pauseKey = 0
|
|
|
+ this.pauseKey = data.type
|
|
|
+ if (this.pauseKey === 3) {
|
|
|
+ this.deleteAfter()
|
|
|
+ return
|
|
|
}
|
|
|
this.allCountAndProlemGet()
|
|
|
},
|