ry-vue-map 0.2.2 → 0.2.3
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/README.MD +1 -1
- package/lib/ryui.common.js +592 -153
- package/lib/ryui.common.js.gz +0 -0
- package/lib/ryui.css +1 -1
- package/lib/ryui.umd.js +592 -153
- package/lib/ryui.umd.js.gz +0 -0
- package/lib/ryui.umd.min.js +5 -5
- package/lib/ryui.umd.min.js.gz +0 -0
- package/package.json +7 -3
- package/src/assets/map.png +0 -0
- package/src/components/index.js +2 -1
- package/src/components/maps/models/ryMapTool/mapTool.js +7 -0
- package/src/components/maps/models/ryStaticMap/map.js +36 -0
- package/src/components/maps/models/ryStaticMap/view.js +66 -0
- package/src/components/maps/ryClusters/src/index.vue +4 -2
- package/src/components/maps/ryMap/src/index.vue +4 -2
- package/src/components/maps/ryMapTool/src/index.vue +6 -6
- package/src/components/maps/ryPolygons/src/index.vue +0 -1
- package/src/components/maps/ryStaticMap/index.js +7 -0
- package/src/components/maps/ryStaticMap/src/index.vue +233 -0
- package/src/components/maps/ryVectorMap/src/index.vue +1 -3
- package/src/components/maps/switchMap/src/newIndex.vue +39 -19
- package/src/router/index.js +28 -3
- package/src/utils/lMapServices.js +26 -5
- package/src/views/docx/index.vue +36 -0
- package/src/views/excel/index.vue +26 -0
- package/src/views/map/dksj.js +1103 -0
- package/src/views/map/index.vue +44 -386
- package/src/views/map/indexNew.vue +625 -0
- package/src/views/pdf/index.vue +24 -0
- package/src/views/staticMap/index.vue +91 -0
- package/src/views/tree/index.vue +193 -0
- package/src/views/vectorMap/index.vue +26 -5
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import 'ol/ol.css';
|
|
2
|
+
import Map from 'ol/Map';
|
|
2
3
|
import {
|
|
3
4
|
AM,
|
|
4
5
|
BingMapsServices,
|
|
@@ -270,10 +271,31 @@ export default class LMapServices {
|
|
|
270
271
|
});
|
|
271
272
|
|
|
272
273
|
}
|
|
273
|
-
|
|
274
|
+
|
|
275
|
+
async initStaticMap(target,opt){
|
|
276
|
+
return await new Promise((res, rej) => {
|
|
277
|
+
setTimeout(r => {
|
|
278
|
+
const map = new Map({
|
|
279
|
+
target,
|
|
280
|
+
view: opt.view,
|
|
281
|
+
layers:[opt.layer],
|
|
282
|
+
});
|
|
283
|
+
this.map = map;
|
|
284
|
+
this.layers = [opt.layer];
|
|
285
|
+
if (map) {
|
|
286
|
+
res(map);
|
|
287
|
+
return;
|
|
288
|
+
}
|
|
289
|
+
rej(null);
|
|
290
|
+
}, 30);
|
|
291
|
+
});
|
|
292
|
+
}
|
|
293
|
+
|
|
274
294
|
getVectorLayerView() {
|
|
275
295
|
return MapConfig.getVectorLayerView;
|
|
276
296
|
}
|
|
297
|
+
|
|
298
|
+
|
|
277
299
|
|
|
278
300
|
onSetLayers(type) {
|
|
279
301
|
this.type = type;
|
|
@@ -295,7 +317,7 @@ export default class LMapServices {
|
|
|
295
317
|
});
|
|
296
318
|
}
|
|
297
319
|
|
|
298
|
-
onCreatePolygon(callback,
|
|
320
|
+
onCreatePolygon(callback,isHideAreaAndKM=false) {
|
|
299
321
|
if (this.polygonGeojson) {
|
|
300
322
|
this.map.removeLayer(this.polygonGeojson);
|
|
301
323
|
}
|
|
@@ -307,8 +329,7 @@ export default class LMapServices {
|
|
|
307
329
|
this._lPolygon = new LPolygon(this.map, {
|
|
308
330
|
strokeColor: 'rgba(255,201,14, 1)',
|
|
309
331
|
fillColor: 'rgba(255,201,14, 0.4)',
|
|
310
|
-
|
|
311
|
-
});
|
|
332
|
+
},isHideAreaAndKM);
|
|
312
333
|
return this._lPolygon;
|
|
313
334
|
// if (callback) {
|
|
314
335
|
// callback();
|
|
@@ -964,4 +985,4 @@ export default class LMapServices {
|
|
|
964
985
|
}
|
|
965
986
|
}
|
|
966
987
|
|
|
967
|
-
}
|
|
988
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div id="docx-demo">
|
|
3
|
+
<el-upload :limit="1" :file-list="fileList" accept=".docx" :beforeUpload="beforeUpload" action="">
|
|
4
|
+
<el-button size="small" type="warning">点击上传</el-button>
|
|
5
|
+
</el-upload>
|
|
6
|
+
<vue-office-docx :src="src" />
|
|
7
|
+
</div>
|
|
8
|
+
</template>
|
|
9
|
+
|
|
10
|
+
<script>
|
|
11
|
+
import VueOfficeDocx from '@vue-office/docx'
|
|
12
|
+
import '@vue-office/docx/lib/index.css'
|
|
13
|
+
export default {
|
|
14
|
+
components: {
|
|
15
|
+
VueOfficeDocx
|
|
16
|
+
},
|
|
17
|
+
data(){
|
|
18
|
+
return {
|
|
19
|
+
src:'',
|
|
20
|
+
fileList:[]
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
methods:{
|
|
24
|
+
|
|
25
|
+
beforeUpload(file){
|
|
26
|
+
let reader = new FileReader();
|
|
27
|
+
reader.readAsArrayBuffer(file);
|
|
28
|
+
reader.onload = (loadEvent) => {
|
|
29
|
+
let arrayBuffer = loadEvent.target.result;
|
|
30
|
+
this.src = arrayBuffer
|
|
31
|
+
};
|
|
32
|
+
return false
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
</script>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<vue-office-excel :src="excel" @rendered="rendered" style="height: 100vh;"/>
|
|
3
|
+
</template>
|
|
4
|
+
|
|
5
|
+
<script>
|
|
6
|
+
//引入VueOfficeExcel组件
|
|
7
|
+
import VueOfficeExcel from '@vue-office/excel'
|
|
8
|
+
//引入相关样式
|
|
9
|
+
import '@vue-office/excel/lib/index.css'
|
|
10
|
+
|
|
11
|
+
export default {
|
|
12
|
+
components:{
|
|
13
|
+
VueOfficeExcel
|
|
14
|
+
},
|
|
15
|
+
data(){
|
|
16
|
+
return {
|
|
17
|
+
excel: 'http://static.shanhuxueyuan.com/demo/excel.xlsx'//设置文档地址
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
methods:{
|
|
21
|
+
rendered(){
|
|
22
|
+
console.log("渲染完成")
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
</script>
|