35bbb8a2 by 任超

style:地图

1 parent a3611f9c
1 <template><div :id="id" :class="className" :style="{ height: height, width: width }" /></template> 1 <template>
2 <div :id="id" :class="className" :style="{ height: height, width: width }" />
3 </template>
2 4
3 <script> 5 <script>
4 import tdTheme from "./theme.json"; // 引入默认主题 6 import tdTheme from "./theme.json"; // 引入默认主题
7 import { mapGetters } from "vuex";
5 export default { 8 export default {
6 name: "echart", 9 name: "echart",
7 props: { 10 props: {
...@@ -42,12 +45,23 @@ export default { ...@@ -42,12 +45,23 @@ export default {
42 } 45 }
43 }); 46 });
44 }, 47 },
45 deep: true, 48 deep: true
49 },
50 },
51 computed: {
52 ...mapGetters(["dicData"]),
53 logoName () {
54 return (
55 this.dicData["sysCode"] &&
56 this.dicData["sysCode"].filter((item) => item.DCODE == "areaMap")
57 );
46 }, 58 },
47 }, 59 },
48 mounted () { 60 mounted () {
49 this.$echarts.registerTheme("tdTheme", tdTheme); // 覆盖默认主题 61 this.$echarts.registerTheme("tdTheme", tdTheme); // 覆盖默认主题
62 this.$nextTick(() => {
50 this.initChart(); 63 this.initChart();
64 })
51 }, 65 },
52 beforeDestroy () { 66 beforeDestroy () {
53 this.chart.dispose(); 67 this.chart.dispose();
......