feat: chart颜色定义/单值图样式优化等

This commit is contained in:
chenjinsong
2021-07-06 17:51:17 +08:00
parent c08ceb1966
commit c80d554596
12 changed files with 86 additions and 352 deletions

View File

@@ -78,9 +78,10 @@
v-else-if="isSingleValue"
:type="chartInfo.type"
:style="computePosition"
:icon="singleValue.icon"
>
<template #title><span title="TCP Connection Establish Time">{{chartInfo.i18n ? $t(chartInfo.i18n) : chartInfo.name}}</span></template>
<template #data>{{singleValue}}</template>
<template #data>{{singleValue.value}}</template>
</single-value>
<!-- 表格 -->
<chart-table
@@ -200,7 +201,10 @@ export default {
currentPageData: [] // table当前页的数据
},
pieTableData: [],
singleValue: '-',
singleValue: {
value: '-',
icon: ''
},
activeTab: '',
statisticsData: []
}
@@ -401,10 +405,11 @@ export default {
}
} else if (this.isSingleValue) {
if (chartParams) {
this.singleValue.icon = chartParams.icon
const queryParams = { startTime: parseInt(this.startTime / 1000), endTime: parseInt(this.endTime / 1000) }
get(replaceUrlPlaceholder(chartParams.url, queryParams)).then(response => {
if (response.code === 200) {
this.singleValue = response.data.result
this.singleValue.value = response.data.result
}
})
}