|
@@ -5,7 +5,7 @@
|
|
<el-menu :default-active="activeIndex" active-text-color="#409EFF" mode="horizontal" @select="handleSelect">
|
|
<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="0">业务线数据</el-menu-item>
|
|
<el-menu-item index="3">部门数据</el-menu-item>
|
|
<el-menu-item index="3">部门数据</el-menu-item>
|
|
- <!-- <el-menu-item index="5">客户端数据</el-menu-item> -->
|
|
|
|
|
|
+ <el-menu-item index="5">客户端数据</el-menu-item>
|
|
</el-menu>
|
|
</el-menu>
|
|
<el-date-picker
|
|
<el-date-picker
|
|
v-model="timeInterval"
|
|
v-model="timeInterval"
|
|
@@ -19,14 +19,29 @@
|
|
</el-header>
|
|
</el-header>
|
|
<el-container style="height:calc(100vh - 140px);">
|
|
<el-container style="height:calc(100vh - 140px);">
|
|
<el-aside class="aside">
|
|
<el-aside class="aside">
|
|
- <el-tree ref="treeBox" accordion :data="dealWithBusinessDate" node-key="id" highlight-current :props="defaultProps" style="margin-top:20px" @node-click="handleNodeClick" />
|
|
|
|
|
|
+ <el-tree ref="treeBox" :default-expanded-keys="expandedClient" accordion :data="dealWithBusinessDate" node-key="id" highlight-current :props="defaultProps" style="margin-top:20px" @node-click="handleNodeClick" />
|
|
</el-aside>
|
|
</el-aside>
|
|
<el-main class="combine-table">
|
|
<el-main class="combine-table">
|
|
<el-tabs v-model="activeIndexSecondary" @tab-click="handleClick">
|
|
<el-tabs v-model="activeIndexSecondary" @tab-click="handleClick">
|
|
<el-tab-pane :label="guild" name="first">
|
|
<el-tab-pane :label="guild" name="first">
|
|
<!-- 上线过程 -->
|
|
<!-- 上线过程 -->
|
|
- <h4>1.上线过程</h4>
|
|
|
|
|
|
+ <h4>1. 上线过程</h4>
|
|
<el-table
|
|
<el-table
|
|
|
|
+ v-show="pauseKey === 5"
|
|
|
|
+ :data="clientOnline"
|
|
|
|
+ border
|
|
|
|
+ style="width: 100%"
|
|
|
|
+ size="mini"
|
|
|
|
+ >
|
|
|
|
+ <el-table-column
|
|
|
|
+ label="上线总数"
|
|
|
|
+ align="center"
|
|
|
|
+ >
|
|
|
|
+ <template slot-scope="scope"><a href="javascript:void(0)" style="color:#20a0ff" @click="toClientView()">{{ scope.row.clientOnlineCount }}</a></template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ </el-table>
|
|
|
|
+ <el-table
|
|
|
|
+ v-show="pauseKey !== 5"
|
|
:data="[onlineProcess]"
|
|
:data="[onlineProcess]"
|
|
border
|
|
border
|
|
style="width: 100%"
|
|
style="width: 100%"
|
|
@@ -49,6 +64,7 @@
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
<el-table
|
|
<el-table
|
|
|
|
+ v-show="pauseKey !== 5"
|
|
:data="[onlineProcess]"
|
|
:data="[onlineProcess]"
|
|
border
|
|
border
|
|
style="width: 100%"
|
|
style="width: 100%"
|
|
@@ -97,6 +113,7 @@
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
<el-table
|
|
<el-table
|
|
|
|
+ v-show="pauseKey !== 5"
|
|
:data="[onlineProcess]"
|
|
:data="[onlineProcess]"
|
|
border
|
|
border
|
|
style="width: 100%"
|
|
style="width: 100%"
|
|
@@ -168,6 +185,7 @@
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
<el-table
|
|
<el-table
|
|
|
|
+ v-show="pauseKey !== 5"
|
|
:data="[onlineProcess]"
|
|
:data="[onlineProcess]"
|
|
border
|
|
border
|
|
style="width: 100%"
|
|
style="width: 100%"
|
|
@@ -202,8 +220,9 @@
|
|
/>
|
|
/>
|
|
</el-table>
|
|
</el-table>
|
|
<!-- 线上问题 -->
|
|
<!-- 线上问题 -->
|
|
- <h4>2.线上问题</h4>
|
|
|
|
|
|
+ <h4 v-show="pauseKey !== 5">2. 线上问题</h4>
|
|
<el-table
|
|
<el-table
|
|
|
|
+ v-show="pauseKey !== 5"
|
|
:data="[problemData]"
|
|
:data="[problemData]"
|
|
border
|
|
border
|
|
style="width: 100%"
|
|
style="width: 100%"
|
|
@@ -211,7 +230,7 @@
|
|
>
|
|
>
|
|
<el-table-column
|
|
<el-table-column
|
|
prop="totalCount"
|
|
prop="totalCount"
|
|
- label="上线次数"
|
|
|
|
|
|
+ label="问题总数"
|
|
width="170"
|
|
width="170"
|
|
align="center"
|
|
align="center"
|
|
/>
|
|
/>
|
|
@@ -265,24 +284,13 @@
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
<el-table
|
|
<el-table
|
|
|
|
+ v-show="pauseKey !== 5"
|
|
:data="[problemData]"
|
|
:data="[problemData]"
|
|
border
|
|
border
|
|
style="width: 100%"
|
|
style="width: 100%"
|
|
class="move-border-top"
|
|
class="move-border-top"
|
|
size="mini"
|
|
size="mini"
|
|
>
|
|
>
|
|
- <el-table-column
|
|
|
|
- prop="unResponsibilityTimeCount"
|
|
|
|
- label="未定责P5+问题"
|
|
|
|
- style="width:25%;"
|
|
|
|
- align="center"
|
|
|
|
- />
|
|
|
|
- <el-table-column
|
|
|
|
- prop="historyResponsibilityCount"
|
|
|
|
- label="遗留P5+问题定责"
|
|
|
|
- style="width:25%;"
|
|
|
|
- align="center"
|
|
|
|
- />
|
|
|
|
<el-table-column
|
|
<el-table-column
|
|
prop="handleDurationPercent"
|
|
prop="handleDurationPercent"
|
|
label="线上问题处理完成率"
|
|
label="线上问题处理完成率"
|
|
@@ -297,8 +305,9 @@
|
|
/>
|
|
/>
|
|
</el-table>
|
|
</el-table>
|
|
<!-- 线下缺陷 -->
|
|
<!-- 线下缺陷 -->
|
|
- <h4>3.线下缺陷</h4>
|
|
|
|
|
|
+ <h4 v-show="pauseKey !== 5">3. 线下缺陷</h4>
|
|
<el-table
|
|
<el-table
|
|
|
|
+ v-show="pauseKey !== 5"
|
|
:data="[DefeatData]"
|
|
:data="[DefeatData]"
|
|
border
|
|
border
|
|
style="width: 100%"
|
|
style="width: 100%"
|
|
@@ -440,7 +449,7 @@
|
|
|
|
|
|
<script>
|
|
<script>
|
|
import axios from 'axios'
|
|
import axios from 'axios'
|
|
-import { getBusiness, getDepartment, getOnlineProblem, getOnlineAllCount, getOnlineVitium, getHandlerCount } from '@/api/qualityCenter'
|
|
|
|
|
|
+import { getBusiness, getDepartment, getOnlineProblem, getOnlineAllCount, getOnlineVitium, getHandlerCount, getClientInfo, getHotpatch } from '@/api/qualityCenter'
|
|
|
|
|
|
export default {
|
|
export default {
|
|
filters: {
|
|
filters: {
|
|
@@ -461,6 +470,8 @@ export default {
|
|
guild: '',
|
|
guild: '',
|
|
businessData: [],
|
|
businessData: [],
|
|
DefeatData: [],
|
|
DefeatData: [],
|
|
|
|
+ expandedClient: [],
|
|
|
|
+ noWayId: 1,
|
|
problemData: '',
|
|
problemData: '',
|
|
defaultProps: {
|
|
defaultProps: {
|
|
children: 'child',
|
|
children: 'child',
|
|
@@ -468,6 +479,9 @@ export default {
|
|
},
|
|
},
|
|
loadingOnlineProcess: true,
|
|
loadingOnlineProcess: true,
|
|
activeIndex: '0',
|
|
activeIndex: '0',
|
|
|
|
+ clientOnline: [{
|
|
|
|
+ clientOnlineCount: ''
|
|
|
|
+ }],
|
|
activeIndexSecondary: 'first',
|
|
activeIndexSecondary: 'first',
|
|
// timeInterval: '',
|
|
// timeInterval: '',
|
|
pauseTreeNode: {},
|
|
pauseTreeNode: {},
|
|
@@ -488,7 +502,7 @@ export default {
|
|
async _initBusinessTreeAndBeginInfo() {
|
|
async _initBusinessTreeAndBeginInfo() {
|
|
this.loadingOnlineProcess = true
|
|
this.loadingOnlineProcess = true
|
|
await getBusiness().then(res => {
|
|
await getBusiness().then(res => {
|
|
- this.businessData = res.code === 0 ? res.data : ''
|
|
|
|
|
|
+ res.code === 0 ? this.businessData = res.data : this.errorFun(res.msg)
|
|
const processFunc = (arr) => { // modules和child
|
|
const processFunc = (arr) => { // modules和child
|
|
arr.forEach((each) => {
|
|
arr.forEach((each) => {
|
|
if (each.modules) {
|
|
if (each.modules) {
|
|
@@ -510,7 +524,7 @@ export default {
|
|
async initDepartmentTree() {
|
|
async initDepartmentTree() {
|
|
this.loadingOnlineProcess = true
|
|
this.loadingOnlineProcess = true
|
|
await getDepartment().then(res => {
|
|
await getDepartment().then(res => {
|
|
- this.dealWithBusinessDate = res.code === 0 ? res.data : ''
|
|
|
|
|
|
+ res.code === 0 ? this.dealWithBusinessDate = res.data : this.errorFun(res.msg)
|
|
this.pauseTreeNode = this.dealWithBusinessDate[0] ? this.dealWithBusinessDate[0] : ''
|
|
this.pauseTreeNode = this.dealWithBusinessDate[0] ? this.dealWithBusinessDate[0] : ''
|
|
this.pauseKey = 3
|
|
this.pauseKey = 3
|
|
this.pauseId = this.pauseTreeNode.id ? this.pauseTreeNode.id : ''
|
|
this.pauseId = this.pauseTreeNode.id ? this.pauseTreeNode.id : ''
|
|
@@ -518,23 +532,36 @@ export default {
|
|
this.deleteAfter()
|
|
this.deleteAfter()
|
|
},
|
|
},
|
|
// 点击客户端数据导航栏显示默认数据
|
|
// 点击客户端数据导航栏显示默认数据
|
|
- // async initClientTree() {
|
|
|
|
- // // this.loadingOnlineProcess = true
|
|
|
|
- // await getClientInfo().then(res => {
|
|
|
|
- // this.businessData = res.code === 0 ? res.data : ''
|
|
|
|
- // this.dealWithBusinessDate = this.businessData.map(each => ({
|
|
|
|
- // ...each,
|
|
|
|
- // child: each.details.map(detail => ({
|
|
|
|
- // ...detail,
|
|
|
|
- // name: detail.step
|
|
|
|
- // }))
|
|
|
|
- // }))
|
|
|
|
- // this.pauseTreeNode = this.dealWithBusinessDate[0] ? this.dealWithBusinessDate[0] : ''
|
|
|
|
- // this.pauseKey = 5
|
|
|
|
- // this.pauseId = this.pauseTreeNode.appKey ? this.pauseTreeNode.appKey : ''
|
|
|
|
- // })
|
|
|
|
- // this.clientAfter()
|
|
|
|
- // },
|
|
|
|
|
|
+ async initClientTree() {
|
|
|
|
+ this.loadingOnlineProcess = true
|
|
|
|
+ await getClientInfo().then(res => {
|
|
|
|
+ res.code === 0 ? this.businessData = res.data : this.errorFun(res.msg)
|
|
|
|
+ this.dealWithBusinessDate = this.businessData.map(each => ({
|
|
|
|
+ ...each,
|
|
|
|
+ id: this.noWayId++,
|
|
|
|
+ child: each.details.map(detail => ({
|
|
|
|
+ ...detail,
|
|
|
|
+ name: detail.osType,
|
|
|
|
+ id: each.name + detail.appKey + detail.osType
|
|
|
|
+ }))
|
|
|
|
+ }))
|
|
|
|
+ this.pauseTreeNode = this.dealWithBusinessDate[0].child[0] ? this.dealWithBusinessDate[0].child[0] : ''
|
|
|
|
+ this.expandedClient = [this.dealWithBusinessDate[0].id]
|
|
|
|
+ this.pauseKey = 5
|
|
|
|
+ this.pauseId = this.pauseTreeNode.id ? this.pauseTreeNode.id : ''
|
|
|
|
+ })
|
|
|
|
+ this.clientAfter()
|
|
|
|
+ },
|
|
|
|
+ // 客户端数据
|
|
|
|
+ clientAfter() {
|
|
|
|
+ this.guild = this.treeGuideClient(this.dealWithBusinessDate, this.pauseTreeNode.id).join('/')
|
|
|
|
+ // const pretermitSearch = { appKey: 'f9a0bc6213db35deb155ff08bffa90a9', startTime: this.timeInterval[0], endTime: this.timeInterval[1] }
|
|
|
|
+ const pretermitSearch = { appKey: 'f9a0bc6213db35deb155ff08bffa90a9' }
|
|
|
|
+ getHotpatch(pretermitSearch).then((res) => {
|
|
|
|
+ res.code === 0 ? this.clientOnline[0].clientOnlineCount = res.data : this.errorFun(res.msg)
|
|
|
|
+ this.loadingOnlineProcess = false
|
|
|
|
+ })
|
|
|
|
+ },
|
|
// 部门table数据不需要缺陷数据
|
|
// 部门table数据不需要缺陷数据
|
|
deleteAfter() {
|
|
deleteAfter() {
|
|
this.guild = this.treeGuide(this.dealWithBusinessDate, this.pauseTreeNode.id, this.pauseTreeNode.type).join('/')
|
|
this.guild = this.treeGuide(this.dealWithBusinessDate, this.pauseTreeNode.id, this.pauseTreeNode.type).join('/')
|
|
@@ -613,6 +640,16 @@ export default {
|
|
})
|
|
})
|
|
window.open(href, '_blank')
|
|
window.open(href, '_blank')
|
|
},
|
|
},
|
|
|
|
+ toClientView() {
|
|
|
|
+ // 新页面跳转
|
|
|
|
+ const { href } = this.$router.resolve({
|
|
|
|
+ name: '热修复过程',
|
|
|
|
+ query: {
|
|
|
|
+ appKey: this.pauseTreeNode.appKey
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ window.open(href, '_blank')
|
|
|
|
+ },
|
|
toDefectView() {
|
|
toDefectView() {
|
|
// 新页面跳转
|
|
// 新页面跳转
|
|
const { href } = this.$router.resolve({
|
|
const { href } = this.$router.resolve({
|
|
@@ -640,12 +677,31 @@ export default {
|
|
getPath(myArr, id, type)
|
|
getPath(myArr, id, type)
|
|
return res
|
|
return res
|
|
},
|
|
},
|
|
|
|
+ // 树形结构导航
|
|
|
|
+ treeGuideClient(myArr, id) {
|
|
|
|
+ let res
|
|
|
|
+ // path,存储路径
|
|
|
|
+ const getPath = (arr, id, path = []) => {
|
|
|
|
+ return arr.reduce((a, c) => {
|
|
|
|
+ if (c.id === id) {
|
|
|
|
+ res = [...path, c.name]
|
|
|
|
+ }
|
|
|
|
+ if (c.child) {
|
|
|
|
+ return getPath(c.child, id, [...path, c.name])
|
|
|
|
+ }
|
|
|
|
+ }, [])
|
|
|
|
+ }
|
|
|
|
+ getPath(myArr, id)
|
|
|
|
+ return res
|
|
|
|
+ },
|
|
// 业务树
|
|
// 业务树
|
|
handleNodeClick(data) {
|
|
handleNodeClick(data) {
|
|
this.loadingOnlineProcess = true
|
|
this.loadingOnlineProcess = true
|
|
this.pauseTreeNode = data
|
|
this.pauseTreeNode = data
|
|
this.pauseId = data.id
|
|
this.pauseId = data.id
|
|
- this.pauseKey = data.type
|
|
|
|
|
|
+ if (this.pauseKey !== 5) {
|
|
|
|
+ this.pauseKey = data.type
|
|
|
|
+ }
|
|
if (this.pauseKey === 3 && this.activeIndexSecondary === 'first') {
|
|
if (this.pauseKey === 3 && this.activeIndexSecondary === 'first') {
|
|
this.deleteAfter()
|
|
this.deleteAfter()
|
|
return
|
|
return
|
|
@@ -653,6 +709,12 @@ export default {
|
|
this.guild = this.treeGuide(this.dealWithBusinessDate, this.pauseTreeNode.id, this.pauseTreeNode.type).join('/')
|
|
this.guild = this.treeGuide(this.dealWithBusinessDate, this.pauseTreeNode.id, this.pauseTreeNode.type).join('/')
|
|
this.handleClick()
|
|
this.handleClick()
|
|
return
|
|
return
|
|
|
|
+ } else if (this.pauseKey === 5 && this.pauseTreeNode.appKey) {
|
|
|
|
+ this.clientAfter()
|
|
|
|
+ return
|
|
|
|
+ } else if (this.pauseKey === 5 && !this.pauseTreeNode.appKey) {
|
|
|
|
+ this.loadingOnlineProcess = false
|
|
|
|
+ return
|
|
}
|
|
}
|
|
this.allCountAndProlemGet()
|
|
this.allCountAndProlemGet()
|
|
},
|
|
},
|