应用系统雷达数据
This commit is contained in:
@ -60,6 +60,8 @@ export default {
|
||||
})
|
||||
},
|
||||
setOptions(resData) {
|
||||
let newList = [] // 新的累计数组
|
||||
let newTotal = []
|
||||
let titList = [] // 标题title
|
||||
let titData = [] // 雷达指标名称
|
||||
let month = [] // 当月
|
||||
@ -67,11 +69,15 @@ export default {
|
||||
for (let i = 0; i < resData.length; i++) {
|
||||
const item = resData[i]
|
||||
titList.push(item.systemName + '系统')
|
||||
newTotal.push([])
|
||||
newList.push([])
|
||||
titData.push([])
|
||||
month.push([])
|
||||
monthTotal.push([])
|
||||
for (let j = 0; j < item.month.length; j++) {
|
||||
const item2 = item.month[j]
|
||||
// newList[i] = newList[i].concat(item2.indexName)
|
||||
newList[i].push(item2.indexName)
|
||||
titData[i].push({
|
||||
name: item2.indexName,
|
||||
axisLabel: {
|
||||
@ -80,13 +86,27 @@ export default {
|
||||
})
|
||||
month[i].push(item2.allount)
|
||||
}
|
||||
// 对累计数组排序并去除无关指标
|
||||
for (let m = 0; m < newList[i].length; m++) {
|
||||
const item4 = newList[i][m]
|
||||
for (let k = 0; k < item.total.length; k++) {
|
||||
const item3 = item.total[k]
|
||||
if (item4 == item3.indexName) {
|
||||
newTotal[i].push(item3)
|
||||
}
|
||||
}
|
||||
}
|
||||
item.total = newTotal[i]
|
||||
for (let j = 0; j < item.total.length; j++) {
|
||||
const item2 = item.total[j]
|
||||
if (titData[i][j]) {
|
||||
Object.assign(titData[i][j], { max: item2.allount })
|
||||
// Object.assign(titData[i][j], { max: item2.allount })
|
||||
}
|
||||
if (newList[i].indexOf(item2.indexName) !== -1) {
|
||||
monthTotal[i].push(item2.allount)
|
||||
}
|
||||
// monthTotal[i].push(item2.allount)
|
||||
}
|
||||
}
|
||||
this.chart.setOption({
|
||||
title: [
|
||||
|
@ -166,7 +166,7 @@ export default {
|
||||
},
|
||||
},
|
||||
grid: {
|
||||
left: 20,
|
||||
left: 0,
|
||||
right: 20,
|
||||
top: 30,
|
||||
bottom: 50,
|
||||
|
@ -172,6 +172,14 @@ export default {
|
||||
return dataStr
|
||||
},
|
||||
},
|
||||
dataZoom: {
|
||||
type: 'slider',
|
||||
// start: 0,
|
||||
// end: 50,
|
||||
textStyle: {
|
||||
color: '#fff',
|
||||
},
|
||||
},
|
||||
series: {
|
||||
type: 'bar',
|
||||
barWidth: 20,
|
||||
|
@ -1,7 +1,11 @@
|
||||
<template>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="24" :xs="24">
|
||||
<el-button class="mb10" size="mini" :disabled="dataInfo.pic ? false : true" @click="handleUpdate">更新</el-button>
|
||||
<el-tooltip content="更换图片后点击更新按钮即可生效" placement="top">
|
||||
<el-button class="mb10" size="mini" :disabled="dataInfo.pic ? false : true" @click="handleUpdate"
|
||||
>更新<i class="el-icon-question el-icon--right"></i
|
||||
></el-button>
|
||||
</el-tooltip>
|
||||
<ImageUpload v-model="dataInfo.pic" :isShowTip="false" :limit="1" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
Reference in New Issue
Block a user