|
@@ -19,6 +19,7 @@
|
|
|
import * as echarts from 'echarts';
|
|
|
import { mapState, createNamespacedHelpers } from 'vuex';
|
|
|
const { mapActions: ticket } = createNamespacedHelpers('ticket');
|
|
|
+const { mapActions: statistics } = createNamespacedHelpers('statistics');
|
|
|
export default {
|
|
|
name: 'one',
|
|
|
props: {},
|
|
@@ -32,9 +33,11 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
...ticket(['staQuery']),
|
|
|
+ ...statistics(['query']),
|
|
|
async init() {
|
|
|
let res = await this.staQuery();
|
|
|
if (this.$checkRes(res)) {
|
|
|
+ console.log(res);
|
|
|
var chartDom = document.getElementById('oneChart');
|
|
|
var myChart = echarts.init(chartDom);
|
|
|
var option;
|
|
@@ -60,13 +63,13 @@ export default {
|
|
|
borderColor: '#fff',
|
|
|
borderWidth: 2,
|
|
|
},
|
|
|
- data: res.data.ticket,
|
|
|
+ data: res.data,
|
|
|
},
|
|
|
],
|
|
|
};
|
|
|
option && myChart.setOption(option);
|
|
|
}
|
|
|
- res = await this.staQuery();
|
|
|
+ res = await this.query({ type: 'data' });
|
|
|
if (this.$checkRes(res)) {
|
|
|
var chartDom = document.getElementById('twoChart');
|
|
|
var myChart = echarts.init(chartDom);
|
|
@@ -93,7 +96,7 @@ export default {
|
|
|
borderColor: '#fff',
|
|
|
borderWidth: 2,
|
|
|
},
|
|
|
- data: res.data.policy,
|
|
|
+ data: res.data,
|
|
|
},
|
|
|
],
|
|
|
};
|