1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
| <template>
| <div class="homeBox">
| <div class="threeMap" :class="{ 'secondMapFlag': setMenuFlag != false }">
| <jw-chat></jw-chat>
| </div>
| <div class="secondMap">
| <map-view></map-view>
| </div>
|
| </div>
| </template>
|
| <script>
| import mapViewer from '../../assets/js/map/mapView';
| import jwChat from '../chart/index.vue';
| import mapView from '../mapView/index.vue'
| import store from '../../store';
| export default {
| name: 'homePage',
| components: {
| jwChat,
| mapView
| },
| data() {
| return {
| setMenuFlag: false
| }
| },
| computed: {
| Obj() {
| return store.state.setMenuFlag
| }
|
| },
| watch: {
| Obj(newVal, oldVal) {
| console.log(oldVal)
| console.log(newVal)
| this.setMenuFlag = newVal;
| }
| },
|
| methods: {
|
| },
| mounted() {
| mapViewer.initMap();
| }
| }
| </script>
|
| <style scoped >
| .homeBox {
| width: 100%;
| height: 100%;
|
| display: flex;
|
| }
|
| .homeBox .threeMap {
| width: 30%;
| height: 100%;
| transition: width 1s;
| }
|
| .homeBox .secondMapFlag {
| width: 0px;
| transition: width 1s;
| }
|
| .homeBox .secondMap {
| flex: 1;
|
|
| }
| </style>
|
|