1、修复前端树状图不显示问题,依赖局部引入错误

2、修复性能监控图标不显示问题,props属性options改为option
pull/254/head
xjs 4 years ago
parent 1a129c561f
commit bf7411c573

@ -106,15 +106,15 @@
</div>
</el-card>
<!-- <div>
<div>
<el-row :gutter="6">
<el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12" style="margin-bottom: 10px">
<el-card class="box-card">
<div slot="header" class="clearfix">
<span style="font-weight: bold;color: #666;font-size: 15px">CPU使用率监控</span>
</div>
<div style="height: 400px;width: 400px">
<v-chart :options="cpuInfo" />
<div style="height: 350px;">
<v-chart :option="cpuInfo" />
</div>
</el-card>
</el-col>
@ -123,19 +123,21 @@
<div slot="header" class="clearfix">
<span style="font-weight: bold;color: #666;font-size: 15px">内存使用率监控</span>
</div>
<div style="height: 400px;width: 400px">
<v-chart :options="memoryInfo" />
<div style="height: 350px;">
<v-chart :option="memoryInfo" />
</div>
</el-card>
</el-col>
</el-row>
</div>-->
</div>
</div>
</div>
</template>
<script>
import ECharts from 'vue-echarts'
import * as echarts from 'echarts';
import { getPerformance } from '@/api/business/monitor/performance/performancemonitor'
export default {
name: 'Performance',

@ -20,13 +20,16 @@
import {getStatisticsHistoryApi, getStatisticsTodayApi} from "@/api/business/statistics/apistatistics";
// ECharts
var echarts = require('echarts/lib/echarts');
//
require('echarts/lib/chart/bar');
//
require('echarts/lib/component/tooltip');
require('echarts/lib/component/title');
import * as echarts from 'echarts/core';
import {GridComponent} from 'echarts/components';
import {LineChart} from 'echarts/charts';
import {UniversalTransition} from 'echarts/features';
import {CanvasRenderer} from 'echarts/renderers';
import {TitleComponent} from 'echarts/components';
import {BarChart} from 'echarts/charts';
import { TooltipComponent } from 'echarts/components';
echarts.use([GridComponent, LineChart, CanvasRenderer, UniversalTransition, TitleComponent, BarChart,TooltipComponent]);
export default {
name: "ApiStatistics",
@ -57,12 +60,12 @@ export default {
historyChart.setOption({
title: {
text: '总计API调用次数',
textStyle:{
textStyle: {
color: '#541264',
fontWeight:'1000',
align:'center',
fontWeight: '1000',
align: 'center',
},
left:"center",
left: "center",
},
tooltip: {},
xAxis: {
@ -70,7 +73,7 @@ export default {
},
yAxis: {
splitNumber: 10,
max:2000,
max: 2000,
},
series: [{
name: '次数',
@ -86,12 +89,12 @@ export default {
todayChart.setOption({
title: {
text: '今日API调用次数',
textStyle:{
textStyle: {
color: '#541264',
fontWeight:'1000',
align:'center',
fontWeight: '1000',
align: 'center',
},
left:"center",
left: "center",
},
tooltip: {},
xAxis: {
@ -99,7 +102,7 @@ export default {
},
yAxis: {
splitNumber: 10,
max:60,
max: 60,
},
series: [{
name: '次数',
@ -120,13 +123,13 @@ export default {
//API
getStatisticsTodayApi() {
this.loading=true
this.loading = true
getStatisticsTodayApi().then(res => {
this.loading=false
this.loading = false
this.todayApiData = res.data
this.initToday()
}).catch(err =>{
this.loading=false
}).catch(err => {
this.loading = false
})
},

@ -40,13 +40,15 @@
import {getHistoryWeather, getFutureWeather} from "@/api/business/statistics/weatherstatistics";
import {pickerOptions} from "@/layout/mixin/PickerOptions";
// ECharts
var echarts = require('echarts/lib/echarts');
//
require('echarts/lib/chart/line');
//
require('echarts/lib/component/tooltip');
require('echarts/lib/component/title');
import * as echarts from 'echarts/core';
import {GridComponent} from 'echarts/components';
import {LineChart} from 'echarts/charts';
import {UniversalTransition} from 'echarts/features';
import {CanvasRenderer} from 'echarts/renderers';
import {TitleComponent} from 'echarts/components';
import {BarChart} from 'echarts/charts';
import { TooltipComponent } from 'echarts/components';
echarts.use([GridComponent, LineChart, CanvasRenderer, UniversalTransition, TitleComponent, BarChart,TooltipComponent]);
export default {
name: "WeatherStatistics",

Loading…
Cancel
Save