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

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

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

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

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

Loading…
Cancel
Save