ry-vue-map 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.js +11 -0
- package/README.MD +439 -0
- package/babel.config.js +3 -0
- package/jsconfig.json +10 -0
- package/lib/demo.html +10 -0
- package/lib/ryui.common.js +58381 -0
- package/lib/ryui.common.js.gz +0 -0
- package/lib/ryui.css +1 -0
- package/lib/ryui.umd.js +58391 -0
- package/lib/ryui.umd.js.gz +0 -0
- package/lib/ryui.umd.min.js +2 -0
- package/lib/ryui.umd.min.js.gz +0 -0
- package/package.json +73 -0
- package/prettier.config.js +20 -0
- package/src/App.vue +5 -0
- package/src/assets/fonts/index.scss +2 -0
- package/src/assets/fonts/ry-bg/iconfont.css +40 -0
- package/src/assets/fonts/ry-bg/iconfont.ttf +0 -0
- package/src/assets/fonts/ry-bg/iconfont.woff +0 -0
- package/src/assets/fonts/ry-bg/iconfont.woff2 +0 -0
- package/src/assets/fonts/ry.css +347 -0
- package/src/assets/ic-403.svg +480 -0
- package/src/assets/ic-404.svg +299 -0
- package/src/assets/ic-500.svg +191 -0
- package/src/assets/logo.svg +24 -0
- package/src/assets/upload.svg +12 -0
- package/src/components/index.js +27 -0
- package/src/components/maps/models/base/base.js +14 -0
- package/src/components/maps/models/multiPolygonGeoJsonModel.js +11 -0
- package/src/components/maps/models/ryMap/map.js +120 -0
- package/src/components/maps/models/ryMap/view.js +62 -0
- package/src/components/maps/models/ryMapTool/mapTool.js +105 -0
- package/src/components/maps/models/ryPolygon/ryPolygon.js +40 -0
- package/src/components/maps/models/ryPolygons/ryPolygons.js +122 -0
- package/src/components/maps/models/switchMap/switchMap.js +54 -0
- package/src/components/maps/ryClusters/index.js +7 -0
- package/src/components/maps/ryClusters/src/index.vue +238 -0
- package/src/components/maps/ryCrossHair/index.js +7 -0
- package/src/components/maps/ryCrossHair/src/index.vue +44 -0
- package/src/components/maps/ryMap/index.js +6 -0
- package/src/components/maps/ryMap/src/index.vue +306 -0
- package/src/components/maps/ryMapTool/index.js +7 -0
- package/src/components/maps/ryMapTool/src/index.vue +330 -0
- package/src/components/maps/ryOverlay/index.vue +22 -0
- package/src/components/maps/ryPolygon/index.js +7 -0
- package/src/components/maps/ryPolygon/src/index.vue +246 -0
- package/src/components/maps/ryPolygons/index.js +7 -0
- package/src/components/maps/ryPolygons/src/index.vue +524 -0
- package/src/components/maps/switchMap/index.js +7 -0
- package/src/components/maps/switchMap/src/index.vue +224 -0
- package/src/components/maps/switchMap/src/newIndex.vue +256 -0
- package/src/config/setting.js +40 -0
- package/src/directives/index.js +4 -0
- package/src/directives/map.js +41 -0
- package/src/layout/components/footer.vue +35 -0
- package/src/layout/components/header-right.vue +135 -0
- package/src/layout/components/notice.vue +418 -0
- package/src/layout/components/password.vue +133 -0
- package/src/layout/index.vue +252 -0
- package/src/main.js +35 -0
- package/src/router/index.js +92 -0
- package/src/store/getters.js +7 -0
- package/src/store/index.js +21 -0
- package/src/store/modules/theme.js +544 -0
- package/src/store/modules/user.js +74 -0
- package/src/styles/index.scss +9 -0
- package/src/utils/index.js +4 -0
- package/src/utils/lMapServices.js +873 -0
- package/src/utils/page-tab-util.js +106 -0
- package/src/utils/permission.js +118 -0
- package/src/utils/request.js +68 -0
- package/src/utils/token-util.js +40 -0
- package/src/views/exception/403.vue +31 -0
- package/src/views/exception/404.vue +31 -0
- package/src/views/exception/500.vue +31 -0
- package/src/views/map/index.vue +340 -0
- package/vue.config.js +28 -0
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="switch-map">
|
|
3
|
+
<div class="top" :style="{height:height + 'px'}">
|
|
4
|
+
<p
|
|
5
|
+
:class="bottomRight?(isExpand?'el-icon-arrow-left':'el-icon-arrow-right'):(!isExpand?'el-icon-arrow-left':'el-icon-arrow-right')"
|
|
6
|
+
@click="changeExpand"
|
|
7
|
+
/>
|
|
8
|
+
<ul>
|
|
9
|
+
<li
|
|
10
|
+
v-for="(obj,index) in mapTypeCopy"
|
|
11
|
+
:key="index"
|
|
12
|
+
@click="mapTypeClick(index)"
|
|
13
|
+
:class="{ color: !isExpand?mapTypeActive === index:true }"
|
|
14
|
+
><i
|
|
15
|
+
:class="isExpand?obj.activeIcon:(mapTypeActive === index?obj.activeIcon:obj.icon)"/>
|
|
16
|
+
{{ obj.name }}
|
|
17
|
+
</li>
|
|
18
|
+
</ul>
|
|
19
|
+
</div>
|
|
20
|
+
<ul
|
|
21
|
+
:class="{bottom:true,marginLeft:bottomRight}"
|
|
22
|
+
>
|
|
23
|
+
<li
|
|
24
|
+
v-for="(row,index) in mapStyleCopy"
|
|
25
|
+
:key="index"
|
|
26
|
+
:class="{color:!isTop?mapStyleActive === index:true}"
|
|
27
|
+
:style="{height:height + 'px',lineHeight:height + 'px'}"
|
|
28
|
+
>
|
|
29
|
+
<span @click="mapStyleClick(index)">
|
|
30
|
+
{{ row }}
|
|
31
|
+
</span>
|
|
32
|
+
<i
|
|
33
|
+
v-show="index===0"
|
|
34
|
+
@click="changeDirectionArrow"
|
|
35
|
+
:class="isTop?'el-icon-arrow-down':'el-icon-arrow-up'"/>
|
|
36
|
+
</li>
|
|
37
|
+
</ul>
|
|
38
|
+
</div>
|
|
39
|
+
</template>
|
|
40
|
+
|
|
41
|
+
<script>
|
|
42
|
+
import Dto from './../../models/switchMap/switchMap.js';
|
|
43
|
+
|
|
44
|
+
export default {
|
|
45
|
+
name: 'SwitchMap',
|
|
46
|
+
props: {
|
|
47
|
+
...new Dto(),
|
|
48
|
+
},
|
|
49
|
+
data() {
|
|
50
|
+
return {
|
|
51
|
+
isExpand: true,
|
|
52
|
+
mapTypeActive: 1,
|
|
53
|
+
mapStyleActive: 2,
|
|
54
|
+
isTop: true,
|
|
55
|
+
mapTypeCopy: [[...this.mapType][1]],
|
|
56
|
+
mapStyleCopy: [[...this.mapStyle][2]]
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
watch: {
|
|
60
|
+
switchMapDefaultTypeOrLayer: {
|
|
61
|
+
handler(e) {
|
|
62
|
+
if(!e)return;
|
|
63
|
+
const isCorrect = this.formatToJudge(e);
|
|
64
|
+
if (!isCorrect) return;
|
|
65
|
+
setTimeout(() => {
|
|
66
|
+
this.$emit('changeSwitchMap', {
|
|
67
|
+
mapType: (isCorrect || isCorrect===0)?e[0]:1,
|
|
68
|
+
layerType: (isCorrect || isCorrect===1)?e[1]:2
|
|
69
|
+
});
|
|
70
|
+
}, 100)
|
|
71
|
+
},
|
|
72
|
+
immediate: true
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
mounted() {
|
|
76
|
+
if(!this.switchMapDefaultTypeOrLayer){
|
|
77
|
+
setTimeout(()=>{
|
|
78
|
+
this.$emit('changeSwitchMap', {
|
|
79
|
+
mapType: 1,
|
|
80
|
+
layerType: 2
|
|
81
|
+
});
|
|
82
|
+
},100);
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
methods: {
|
|
86
|
+
formatToJudge(arr) {
|
|
87
|
+
const length = [1, 2];
|
|
88
|
+
const isArr = Array.isArray(arr);
|
|
89
|
+
const isLength = length.includes(arr.length);
|
|
90
|
+
const isType = arr[0] >= 0 && arr[0] <= this.mapType.length - 1;
|
|
91
|
+
const isLayer = arr[1] >=0 && arr[1] <= this.mapStyle.length - 1;
|
|
92
|
+
|
|
93
|
+
if(!isArr || !isLength) return false;
|
|
94
|
+
|
|
95
|
+
if(isType && !isLayer){
|
|
96
|
+
this.mapTypeActive = arr[0];
|
|
97
|
+
this.mapTypeCopy = [[...this.mapType][arr[0]]];
|
|
98
|
+
return 0;
|
|
99
|
+
}
|
|
100
|
+
if(isLayer && !isType){
|
|
101
|
+
this.mapStyleActive = arr[1];
|
|
102
|
+
this.mapStyleCopy = [[...this.mapStyle][arr[1]]];
|
|
103
|
+
return 1;
|
|
104
|
+
}
|
|
105
|
+
if(isType && isLayer){
|
|
106
|
+
this.mapTypeActive = arr[0];
|
|
107
|
+
this.mapTypeCopy = [[...this.mapType][arr[0]]];
|
|
108
|
+
this.mapStyleActive = arr[1];
|
|
109
|
+
this.mapStyleCopy = [[...this.mapStyle][arr[1]]];
|
|
110
|
+
return true
|
|
111
|
+
}
|
|
112
|
+
return false;
|
|
113
|
+
},
|
|
114
|
+
changeExpand() {
|
|
115
|
+
this.isExpand = !this.isExpand;
|
|
116
|
+
if (this.isExpand) {
|
|
117
|
+
this.mapTypeCopy = this.mapType.filter((v, i) => this.mapTypeActive === i);
|
|
118
|
+
if (!this.isTop) {
|
|
119
|
+
this.isTop = true;
|
|
120
|
+
this.mapStyleCopy = this.mapStyle.filter((v, i) => this.mapStyleActive === i);
|
|
121
|
+
}
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
124
|
+
this.mapTypeCopy = [...this.mapType];
|
|
125
|
+
},
|
|
126
|
+
changeDirectionArrow() {
|
|
127
|
+
this.isTop = !this.isTop;
|
|
128
|
+
if (this.isTop) {
|
|
129
|
+
this.mapStyleCopy = this.mapStyle.filter((v, i) => this.mapStyleActive === i);
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
this.mapStyleCopy = [...this.mapStyle];
|
|
133
|
+
},
|
|
134
|
+
mapTypeClick(index) {
|
|
135
|
+
if (this.mapTypeActive === index || this.isExpand) return;
|
|
136
|
+
this.mapTypeActive = index;
|
|
137
|
+
this.$emit('changeSwitchMap', {
|
|
138
|
+
mapType: this.mapTypeActive,
|
|
139
|
+
layerType: this.mapStyleActive
|
|
140
|
+
});
|
|
141
|
+
},
|
|
142
|
+
mapStyleClick(index) {
|
|
143
|
+
if (this.mapStyleActive === index || this.isTop) return;
|
|
144
|
+
this.mapStyleActive = index;
|
|
145
|
+
this.$emit('changeSwitchMap', {
|
|
146
|
+
mapType: this.mapTypeActive,
|
|
147
|
+
layerType: this.mapStyleActive
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
</script>
|
|
153
|
+
|
|
154
|
+
<style scoped lang="scss">
|
|
155
|
+
.switch-map {
|
|
156
|
+
ul {
|
|
157
|
+
list-style: none;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.top {
|
|
161
|
+
width: 100%;
|
|
162
|
+
display: flex;
|
|
163
|
+
align-items: center;
|
|
164
|
+
border-radius: 8px;
|
|
165
|
+
margin-top: 10px;
|
|
166
|
+
background-color: white;
|
|
167
|
+
|
|
168
|
+
p {
|
|
169
|
+
font-size: 18px;
|
|
170
|
+
cursor: pointer;
|
|
171
|
+
margin-left: 8px;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
ul {
|
|
175
|
+
height: 100%;
|
|
176
|
+
display: flex;
|
|
177
|
+
align-items: center;
|
|
178
|
+
justify-content: space-between;
|
|
179
|
+
|
|
180
|
+
li {
|
|
181
|
+
width: 98px;
|
|
182
|
+
text-align: center;
|
|
183
|
+
cursor: pointer;
|
|
184
|
+
|
|
185
|
+
span {
|
|
186
|
+
width: 100%;
|
|
187
|
+
height: 100%;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
i {
|
|
191
|
+
margin-right: 6px;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.bottom {
|
|
198
|
+
width: 100px;
|
|
199
|
+
border-radius: 8px;
|
|
200
|
+
padding: 0 10px;
|
|
201
|
+
margin-top: 20px;
|
|
202
|
+
box-sizing: border-box;
|
|
203
|
+
background-color: white;
|
|
204
|
+
|
|
205
|
+
li {
|
|
206
|
+
cursor: pointer;
|
|
207
|
+
text-align: center;
|
|
208
|
+
border-bottom: #EFEFEF 1px solid;
|
|
209
|
+
|
|
210
|
+
&:nth-last-child(1) {
|
|
211
|
+
border-bottom: 0;
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.marginLeft {
|
|
217
|
+
margin-left: 32px;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
.color {
|
|
221
|
+
color: #1890FF;
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
</style>
|
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="switch-map" v-if="mapTypeAndLayer && mapTypeAndLayer.length > 0">
|
|
3
|
+
<div class="top" :style="{height:height + 'px'}">
|
|
4
|
+
<p
|
|
5
|
+
:class="bottomRight?(isExpand?'el-icon-arrow-left':'el-icon-arrow-right'):(!isExpand?'el-icon-arrow-left':'el-icon-arrow-right')"
|
|
6
|
+
@click="changeExpand"
|
|
7
|
+
/>
|
|
8
|
+
<ul>
|
|
9
|
+
<li
|
|
10
|
+
v-for="(obj,index) in mapTypeCopy"
|
|
11
|
+
:key="index"
|
|
12
|
+
@click="mapTypeClick(obj)"
|
|
13
|
+
:class="{ color: !isExpand?mapTypeActive === obj.id:true }"
|
|
14
|
+
><i
|
|
15
|
+
:class="isExpand?obj.activeIcon:(mapTypeActive === obj.id?obj.activeIcon:obj.icon)"/>
|
|
16
|
+
{{ obj.name }}
|
|
17
|
+
</li>
|
|
18
|
+
</ul>
|
|
19
|
+
</div>
|
|
20
|
+
<ul
|
|
21
|
+
:class="{bottom:true,marginLeft:bottomRight}"
|
|
22
|
+
>
|
|
23
|
+
<li
|
|
24
|
+
v-for="(row,index) in mapStyleCopy"
|
|
25
|
+
:key="index"
|
|
26
|
+
:class="{color:!isTop?mapStyleActive === row.id:true}"
|
|
27
|
+
:style="{height:height + 'px',lineHeight:height + 'px'}"
|
|
28
|
+
>
|
|
29
|
+
<span @click="mapStyleClick(row)">
|
|
30
|
+
{{ row.name }}
|
|
31
|
+
</span>
|
|
32
|
+
<i
|
|
33
|
+
v-show="index===0"
|
|
34
|
+
@click="changeDirectionArrow"
|
|
35
|
+
:class="isTop?'el-icon-arrow-down':'el-icon-arrow-up'"/>
|
|
36
|
+
</li>
|
|
37
|
+
</ul>
|
|
38
|
+
</div>
|
|
39
|
+
</template>
|
|
40
|
+
|
|
41
|
+
<script>
|
|
42
|
+
import Dto from './../../models/switchMap/switchMap.js';
|
|
43
|
+
|
|
44
|
+
export default {
|
|
45
|
+
name: 'SwitchMap',
|
|
46
|
+
props: {
|
|
47
|
+
...new Dto(),
|
|
48
|
+
},
|
|
49
|
+
data() {
|
|
50
|
+
return {
|
|
51
|
+
isExpand: true,
|
|
52
|
+
mapTypeActive: 1,
|
|
53
|
+
mapStyleActive: 2,
|
|
54
|
+
isTop: true,
|
|
55
|
+
mapTypeCopy: [],
|
|
56
|
+
mapStyleCopy: []
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
watch: {
|
|
60
|
+
switchMapDefaultTypeOrLayer: {
|
|
61
|
+
handler(e) {
|
|
62
|
+
if(!e)return;
|
|
63
|
+
const isCorrect = this.formatToJudge(e);
|
|
64
|
+
if (!isCorrect) return;
|
|
65
|
+
const active = this.mapStyleActive;
|
|
66
|
+
const mapType = (isCorrect || isCorrect===0)?e[0]:1;
|
|
67
|
+
const layerType = (isCorrect || isCorrect===1)?active:2;
|
|
68
|
+
setTimeout(() => {
|
|
69
|
+
this.$emit('changeSwitchMap', {
|
|
70
|
+
mapType,
|
|
71
|
+
layerType
|
|
72
|
+
});
|
|
73
|
+
}, 100);
|
|
74
|
+
},
|
|
75
|
+
immediate: true
|
|
76
|
+
},
|
|
77
|
+
mapTypeAndLayer :{
|
|
78
|
+
handler(e){
|
|
79
|
+
if(!Array.isArray(e) || !e[1])return;
|
|
80
|
+
e.forEach((r,index)=>{
|
|
81
|
+
if(index===1 && !this.switchMapDefaultTypeOrLayer){
|
|
82
|
+
this.mapStyleCopy = [r.layer[2]];
|
|
83
|
+
this.mapTypeCopy = [r];
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
},
|
|
87
|
+
immediate:true
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
mounted() {
|
|
91
|
+
if(!this.switchMapDefaultTypeOrLayer){
|
|
92
|
+
setTimeout(()=>{
|
|
93
|
+
this.$emit('changeSwitchMap', {
|
|
94
|
+
mapType: 1,
|
|
95
|
+
layerType: 2
|
|
96
|
+
});
|
|
97
|
+
},100);
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
methods: {
|
|
101
|
+
formatToJudge(arr) {
|
|
102
|
+
const length = [1, 2];
|
|
103
|
+
const isArr = Array.isArray(arr);
|
|
104
|
+
const isLength = length.includes(arr.length);
|
|
105
|
+
const isType = arr[0] >= 0 && arr[0] <= this.mapTypeAndLayer.length - 1;
|
|
106
|
+
const isLayer = arr[1] >=0 && arr[1] <= this.mapTypeAndLayer[arr[0]]?.layer.length - 1;
|
|
107
|
+
|
|
108
|
+
if(!isArr || !isLength)return false;
|
|
109
|
+
|
|
110
|
+
if(!isType || !isLayer){
|
|
111
|
+
const type = this.mapTypeActive;
|
|
112
|
+
const layer = this.mapStyleActive;
|
|
113
|
+
this.mapTypeCopy = [this.mapTypeAndLayer[type]];
|
|
114
|
+
this.mapStyleCopy = [this.mapTypeAndLayer[type]?.layer[layer]];
|
|
115
|
+
this.mapStyleActive = this.mapStyleCopy[0]?.id;
|
|
116
|
+
return false;
|
|
117
|
+
}
|
|
118
|
+
if(isType && !isLayer){
|
|
119
|
+
this.mapTypeActive = arr[0];
|
|
120
|
+
this.mapTypeCopy = [this.mapTypeAndLayer[arr[0]]];
|
|
121
|
+
return 0;
|
|
122
|
+
}
|
|
123
|
+
if(isLayer && !isType){
|
|
124
|
+
this.mapStyleCopy = [this.mapTypeAndLayer[arr[0]]?.layer[arr[1]]];
|
|
125
|
+
this.mapStyleActive = this.mapStyleCopy[0].id;
|
|
126
|
+
return 1;
|
|
127
|
+
}
|
|
128
|
+
if(isType && isLayer){
|
|
129
|
+
this.mapTypeActive = arr[0];
|
|
130
|
+
this.mapTypeCopy = [this.mapTypeAndLayer[arr[0]]];
|
|
131
|
+
this.mapStyleCopy = [this.mapTypeAndLayer[arr[0]]?.layer[arr[1]]];
|
|
132
|
+
this.mapStyleActive = this.mapStyleCopy[0]?.id;
|
|
133
|
+
return true
|
|
134
|
+
}
|
|
135
|
+
return false;
|
|
136
|
+
},
|
|
137
|
+
changeExpand() {
|
|
138
|
+
this.isExpand = !this.isExpand;
|
|
139
|
+
if (this.isExpand) {
|
|
140
|
+
this.mapTypeCopy = this.mapTypeAndLayer.filter((v, i) => this.mapTypeActive === i);
|
|
141
|
+
if (!this.isTop) {
|
|
142
|
+
this.isTop = true;
|
|
143
|
+
this.mapStyleCopy = this.mapTypeAndLayer[this.mapTypeActive].layer.filter((v) => this.mapStyleActive === v.id);
|
|
144
|
+
}
|
|
145
|
+
return;
|
|
146
|
+
}
|
|
147
|
+
this.mapTypeCopy = [...this.mapTypeAndLayer];
|
|
148
|
+
},
|
|
149
|
+
changeDirectionArrow() {
|
|
150
|
+
this.isTop = !this.isTop;
|
|
151
|
+
const active = this.mapTypeActive;
|
|
152
|
+
const mapStyle = this.mapTypeAndLayer[active].layer;
|
|
153
|
+
if (this.isTop) {
|
|
154
|
+
this.mapStyleCopy = mapStyle.filter((v) => active === v.id);
|
|
155
|
+
return;
|
|
156
|
+
}
|
|
157
|
+
this.mapStyleCopy = [...mapStyle];
|
|
158
|
+
},
|
|
159
|
+
mapTypeClick({id}) {
|
|
160
|
+
if (this.mapTypeActive === id || this.isExpand) return;
|
|
161
|
+
const layer = this.mapTypeAndLayer[id].layer;
|
|
162
|
+
this.mapTypeActive = id;
|
|
163
|
+
this.mapStyleActive = layer[layer.length - 1].id;
|
|
164
|
+
if(!this.isTop){
|
|
165
|
+
this.mapStyleCopy = layer;
|
|
166
|
+
}else {
|
|
167
|
+
this.mapStyleCopy = layer.filter((v) => this.mapStyleActive === v.id);
|
|
168
|
+
}
|
|
169
|
+
this.$emit('changeSwitchMap', {
|
|
170
|
+
mapType: this.mapTypeActive,
|
|
171
|
+
layerType: this.mapStyleActive
|
|
172
|
+
});
|
|
173
|
+
},
|
|
174
|
+
mapStyleClick({id}) {
|
|
175
|
+
if (this.mapStyleActive === id || this.isTop) return;
|
|
176
|
+
this.mapStyleActive = id;
|
|
177
|
+
this.$emit('changeSwitchMap', {
|
|
178
|
+
mapType: this.mapTypeActive,
|
|
179
|
+
layerType: this.mapStyleActive
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
</script>
|
|
185
|
+
|
|
186
|
+
<style scoped lang="scss">
|
|
187
|
+
.switch-map {
|
|
188
|
+
ul {
|
|
189
|
+
list-style: none;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.top {
|
|
193
|
+
width: 100%;
|
|
194
|
+
display: flex;
|
|
195
|
+
align-items: center;
|
|
196
|
+
border-radius: 8px;
|
|
197
|
+
margin-top: 10px;
|
|
198
|
+
background-color: white;
|
|
199
|
+
|
|
200
|
+
p {
|
|
201
|
+
font-size: 18px;
|
|
202
|
+
cursor: pointer;
|
|
203
|
+
margin-left: 8px;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
ul {
|
|
207
|
+
height: 100%;
|
|
208
|
+
display: flex;
|
|
209
|
+
align-items: center;
|
|
210
|
+
justify-content: space-between;
|
|
211
|
+
|
|
212
|
+
li {
|
|
213
|
+
width: 98px;
|
|
214
|
+
text-align: center;
|
|
215
|
+
cursor: pointer;
|
|
216
|
+
|
|
217
|
+
span {
|
|
218
|
+
width: 100%;
|
|
219
|
+
height: 100%;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
i {
|
|
223
|
+
margin-right: 6px;
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.bottom {
|
|
230
|
+
width: 100px;
|
|
231
|
+
border-radius: 8px;
|
|
232
|
+
padding: 0 10px;
|
|
233
|
+
margin-top: 20px;
|
|
234
|
+
box-sizing: border-box;
|
|
235
|
+
background-color: white;
|
|
236
|
+
|
|
237
|
+
li {
|
|
238
|
+
cursor: pointer;
|
|
239
|
+
text-align: center;
|
|
240
|
+
border-bottom: #EFEFEF 1px solid;
|
|
241
|
+
|
|
242
|
+
&:nth-last-child(1) {
|
|
243
|
+
border-bottom: 0;
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
.marginLeft {
|
|
249
|
+
margin-left: 32px;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
.color {
|
|
253
|
+
color: #1890FF;
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
</style>
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
// 不显示侧栏的路由
|
|
2
|
+
export const HIDE_SIDEBARS = [];
|
|
3
|
+
|
|
4
|
+
// 不显示页脚的路由
|
|
5
|
+
export const HIDE_FOOTERS = [
|
|
6
|
+
'/system/dictionary',
|
|
7
|
+
'/system/organization',
|
|
8
|
+
'/form/advanced',
|
|
9
|
+
'/example/choose'
|
|
10
|
+
];
|
|
11
|
+
|
|
12
|
+
// 页签同路由不同参数可重复打开的路由
|
|
13
|
+
export const REPEATABLE_TABS = ['/system/user-info'];
|
|
14
|
+
|
|
15
|
+
// 不需要登录的路由
|
|
16
|
+
export const WHITE_LIST = ['/login', '/forget'];
|
|
17
|
+
|
|
18
|
+
// 直接指定菜单数据
|
|
19
|
+
export const USER_MENUS = null;
|
|
20
|
+
|
|
21
|
+
// token传递的header名称
|
|
22
|
+
export const TOKEN_HEADER_NAME = 'Authorization';
|
|
23
|
+
|
|
24
|
+
// token存储的名称
|
|
25
|
+
export const TOKEN_STORE_NAME = 'access_token';
|
|
26
|
+
|
|
27
|
+
// 主题配置存储的名称
|
|
28
|
+
export const THEME_STORE_NAME = 'theme';
|
|
29
|
+
|
|
30
|
+
// 首页名称, 为空则取第一个菜单的名称
|
|
31
|
+
export const HOME_TITLE = '主页';
|
|
32
|
+
|
|
33
|
+
// 首页路径, 为空则取第一个菜单的地址
|
|
34
|
+
export const HOME_PATH = null;
|
|
35
|
+
|
|
36
|
+
// 顶栏是否显示主题设置按钮
|
|
37
|
+
export const ENABLE_SETTING = true;
|
|
38
|
+
|
|
39
|
+
// 开启多页签后是否缓存组件
|
|
40
|
+
export const TAB_KEEP_ALIVE = process.env.NODE_ENV !== 'development';
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { SvgModel, geo2svg } from 'ry-map';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
install(Vue) {
|
|
5
|
+
Vue.directive('lmap', {
|
|
6
|
+
bind: function (el, binding, vnode) {
|
|
7
|
+
const that = vnode.context;
|
|
8
|
+
that[binding.arg](el);
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
Vue.directive('lGeoSvg', {
|
|
13
|
+
inserted: function (el, binding, vnode) {
|
|
14
|
+
let {
|
|
15
|
+
geoJSON,
|
|
16
|
+
svgModel = new SvgModel(),
|
|
17
|
+
isStringConvertGeoJso = true
|
|
18
|
+
} = binding.value;
|
|
19
|
+
|
|
20
|
+
if (isStringConvertGeoJso) {
|
|
21
|
+
el.innerHTML = geo2svg(JSON.parse(geoJSON), svgModel);
|
|
22
|
+
} else {
|
|
23
|
+
el.innerHTML = geo2svg(geoJSON, svgModel);
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
update: function (el, binding, vnode) {
|
|
27
|
+
//组件更新
|
|
28
|
+
let {
|
|
29
|
+
geoJSON,
|
|
30
|
+
svgModel = new SvgModel(),
|
|
31
|
+
isStringConvertGeoJso = true
|
|
32
|
+
} = binding.value;
|
|
33
|
+
if (isStringConvertGeoJso) {
|
|
34
|
+
el.innerHTML = geo2svg(JSON.parse(geoJSON), svgModel);
|
|
35
|
+
} else {
|
|
36
|
+
el.innerHTML = geo2svg(geoJSON, svgModel);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
<!-- 页脚 -->
|
|
2
|
+
<template>
|
|
3
|
+
<div class="ele-text-center" style="padding: 16px 0">
|
|
4
|
+
<div>
|
|
5
|
+
<a target="_blank" class="ele-text-secondary" href="https://eleadmin.com">
|
|
6
|
+
{{ $t('layout.footer.website') }}
|
|
7
|
+
</a>
|
|
8
|
+
<em />
|
|
9
|
+
<a
|
|
10
|
+
target="_blank"
|
|
11
|
+
class="ele-text-secondary"
|
|
12
|
+
href="https://eleadmin.com/doc/eleadmin/"
|
|
13
|
+
>
|
|
14
|
+
{{ $t('layout.footer.document') }}
|
|
15
|
+
</a>
|
|
16
|
+
<em />
|
|
17
|
+
<a
|
|
18
|
+
target="_blank"
|
|
19
|
+
class="ele-text-secondary"
|
|
20
|
+
href="https://eleadmin.com/goods/8"
|
|
21
|
+
>
|
|
22
|
+
{{ $t('layout.footer.authorization') }}
|
|
23
|
+
</a>
|
|
24
|
+
</div>
|
|
25
|
+
<div class="ele-text-secondary" style="margin-top: 8px">
|
|
26
|
+
{{ $t('layout.footer.copyright') }}
|
|
27
|
+
</div>
|
|
28
|
+
</div>
|
|
29
|
+
</template>
|
|
30
|
+
|
|
31
|
+
<script>
|
|
32
|
+
export default {
|
|
33
|
+
name: 'EleFooter'
|
|
34
|
+
};
|
|
35
|
+
</script>
|