应用系统雷达数据

This commit is contained in:
熊丽君
2021-12-24 09:46:24 +08:00
parent 4d85cda3ac
commit 143cc233e2
4 changed files with 36 additions and 4 deletions

View File

@ -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,12 +86,26 @@ 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 })
}
monthTotal[i].push(item2.allount)
if (newList[i].indexOf(item2.indexName) !== -1) {
monthTotal[i].push(item2.allount)
}
// monthTotal[i].push(item2.allount)
}
}
this.chart.setOption({

View File

@ -166,7 +166,7 @@ export default {
},
},
grid: {
left: 20,
left: 0,
right: 20,
top: 30,
bottom: 50,

View File

@ -172,6 +172,14 @@ export default {
return dataStr
},
},
dataZoom: {
type: 'slider',
// start: 0,
// end: 50,
textStyle: {
color: '#fff',
},
},
series: {
type: 'bar',
barWidth: 20,

View File

@ -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>