|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
<div id="top-right">
|
|
|
- <div id="chart" style="height:280px;margin:40px 0 0 0"></div>
|
|
|
+ <div id="chart" style="height:280px;margin:20px 0 0 0"></div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -15,8 +15,7 @@ import 'echarts/lib/component/toolbox';
|
|
|
import 'echarts/lib/component/markPoint';
|
|
|
import 'echarts/lib/component/tooltip';
|
|
|
import { mapState, createNamespacedHelpers } from 'vuex';
|
|
|
-const { mapActions } = createNamespacedHelpers('news');
|
|
|
-// const { mapActions: personalRoom } = createNamespacedHelpers('personalroom');
|
|
|
+const { mapActions: news } = createNamespacedHelpers('news');
|
|
|
export default {
|
|
|
name: 'top-right',
|
|
|
props: {},
|
|
@@ -30,23 +29,13 @@ export default {
|
|
|
this.init();
|
|
|
},
|
|
|
methods: {
|
|
|
- ...mapActions(['query']),
|
|
|
- // ...personalRoom(['countRoom']),
|
|
|
+ ...news(['query']),
|
|
|
async init() {
|
|
|
let res = await this.query();
|
|
|
- console.log(res.data);
|
|
|
-
|
|
|
- // let rooms = await this.countRoom();
|
|
|
if (this.$checkRes(res)) {
|
|
|
- let arr = res.data.filter(f => f.status != '3');
|
|
|
- console.log(arr);
|
|
|
-
|
|
|
- let s1 = res.data.filter(f => f.status == '1'); //达成意向
|
|
|
- console.log(s1);
|
|
|
- let s2 = res.data.filter(f => f.status == '2'); //对接完成
|
|
|
- console.log(s2);
|
|
|
-
|
|
|
- let s3 = res.data.filter(f => f.status == '0'); //正在洽谈
|
|
|
+ let s1 = [{ name: '1' }];
|
|
|
+ let s2 = [{ name: '1' }, { name: '2' }];
|
|
|
+ let s3 = [{ name: '1' }, { name: '2' }, { name: '3' }];
|
|
|
this.myChart = echarts.init(document.getElementById('chart'));
|
|
|
const option = {
|
|
|
title: { text: '运行动态', left: 'center' },
|
|
@@ -81,7 +70,7 @@ export default {
|
|
|
},
|
|
|
},
|
|
|
computed: {
|
|
|
- ...mapState(['top-right']),
|
|
|
+ ...mapState(['']),
|
|
|
pageTitle() {
|
|
|
return `${this.$route.meta.title}`;
|
|
|
},
|