feat:添加type类型 为 23 24的 bar

This commit is contained in:
zhangyu
2022-01-19 17:42:41 +08:00
parent 759cbe3ce6
commit c2f0af81bb
8 changed files with 308 additions and 3 deletions

View File

@@ -38,6 +38,7 @@
<script>
import ChartHeader from './ChartHeader'
import Chart from '@/views/charts/Chart2'
import testData from './charts/testData'
import {
isEcharts,
isSingleValue,
@@ -177,6 +178,12 @@ export default {
const requestUrl = url || (chartParams && chartParams.url)
if (requestUrl) {
get(replaceUrlPlaceholder(requestUrl, this.queryParams)).then(response => {
console.log(testData)
if (this.chartInfo.type === 23 && testData) {
response = testData.data
} else if (this.chartInfo.type === 24 && testData) {
response = testData.data2
}
if (response.code === 200) {
this.chartData = response.data.result
this.resultType = response.data.resultType