vue-openlayers-plugin 1.1.10 → 1.1.12
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/lib/{BasemapPanel-dc7a4eee.mjs → BasemapPanel-d34c9745.mjs} +1 -1
- package/lib/{CoordinateLocationDialog-2408a2f1.mjs → CoordinateLocationDialog-75a15e82.mjs} +1 -1
- package/lib/{MapPrintDialog-47cfa293.mjs → FilterPanel-e045d024.mjs} +1 -1
- package/lib/{FilterPanel-fca46cd4.mjs → LayerPanel-78fca227.mjs} +1 -1
- package/lib/{LayerPanel-422d6624.mjs → MapPrintDialog-1dc333aa.mjs} +1 -1
- package/lib/{MeasurementDialog-ea82711b.mjs → MeasurementDialog-7938e1a6.mjs} +3 -3
- package/lib/{MyMarkersDialog-c06e0198.mjs → MyMarkersDialog-3c2d2924.mjs} +20 -5
- package/lib/{QuadCompareDialog-c60ebd0d.mjs → QuadCompareDialog-856464ee.mjs} +1 -1
- package/lib/{RegionNavigationDialog-a6a59743.mjs → RegionNavigationDialog-e73d52d8.mjs} +9 -9
- package/lib/{SplitCompareDialog-ab18a5af.mjs → SplitCompareDialog-d02daf25.mjs} +1 -1
- package/lib/{SwipeCompareDialog-bb784c1a.mjs → SwipeCompareDialog-aa16cffb.mjs} +1 -1
- package/lib/{ViewBookmarksDialog-b7fe4017.mjs → ViewBookmarksDialog-70dc8e7b.mjs} +27 -162
- package/lib/{index-e250ff39.mjs → index-cc29567b.mjs} +1 -1
- package/lib/{index-f4ad10d6.mjs → index-eb8bed87.mjs} +52 -36
- package/lib/{index.es-67bd240e.mjs → index.es-ea8eeb3c.mjs} +1 -1
- package/lib/index.esm.js +1 -1
- package/lib/index.umd.js +108 -212
- package/lib/style.css +16 -16
- package/package.json +1 -1
- package/types/components/OlDialogs/MyMarkersDialog.vue.d.ts +18 -2
- package/types/components/OlDialogs/MyMarkersDialog.vue.d.ts.map +1 -1
- package/types/components/OlDialogs/ViewBookmarksDialog.vue.d.ts.map +1 -1
- package/types/components/OlMap.vue.d.ts +2 -0
- package/types/components/OlMap.vue.d.ts.map +1 -1
- package/types/core/MapManager.d.ts.map +1 -1
- package/types/core/drawing/DrawingManager.d.ts.map +1 -1
- package/types/lowcode-entry.d.ts +5 -0
- package/types/lowcode-entry.d.ts.map +1 -1
- package/types/types/map.d.ts +1 -1
- package/types/types/map.d.ts.map +1 -1
- package/types/utils/html2pdf.d.ts.map +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent, inject, computed, ref, watch, onMounted, onUnmounted, openBlock, createBlock, unref, withCtx, createElementVNode, createElementBlock, Fragment, renderList, normalizeClass, toDisplayString } from "vue";
|
|
2
|
-
import { r as resolveBasemapThumbnail, l as layerEventBus, X, b as _export_sfc } from "./index-
|
|
2
|
+
import { r as resolveBasemapThumbnail, l as layerEventBus, X, b as _export_sfc } from "./index-eb8bed87.mjs";
|
|
3
3
|
import "@element-plus/icons-vue";
|
|
4
4
|
import "ol";
|
|
5
5
|
import "proj4";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, inject, computed, ref, reactive, resolveComponent, openBlock, createBlock, unref, withCtx, createElementVNode, createVNode, createTextVNode } from "vue";
|
|
2
2
|
import { Aim } from "@element-plus/icons-vue";
|
|
3
|
-
import { X, T as TooltipHelper, b as _export_sfc } from "./index-
|
|
3
|
+
import { X, T as TooltipHelper, b as _export_sfc } from "./index-eb8bed87.mjs";
|
|
4
4
|
import "ol";
|
|
5
5
|
import "proj4";
|
|
6
6
|
import "@supermapgis/iclient-ol";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent, inject, computed, ref, watch, resolveComponent, openBlock, createBlock, unref, withCtx, createElementVNode, createVNode, createTextVNode, toDisplayString, createElementBlock, Fragment, renderList, normalizeClass } from "vue";
|
|
2
|
-
import { X, f as formatMeasurementResult, b as _export_sfc } from "./index-
|
|
2
|
+
import { X, f as formatMeasurementResult, b as _export_sfc } from "./index-eb8bed87.mjs";
|
|
3
3
|
import "@element-plus/icons-vue";
|
|
4
4
|
import "ol";
|
|
5
5
|
import "proj4";
|
|
@@ -407,7 +407,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
407
407
|
_: 1
|
|
408
408
|
}, 8, ["modelValue"]),
|
|
409
409
|
createVNode(_component_el_button, {
|
|
410
|
-
|
|
410
|
+
link: "",
|
|
411
411
|
size: "small",
|
|
412
412
|
style: { "color": "var(--el-color-danger)" },
|
|
413
413
|
onClick: clearMeasurement
|
|
@@ -444,7 +444,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
444
444
|
};
|
|
445
445
|
}
|
|
446
446
|
});
|
|
447
|
-
const MeasurementDialog = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
447
|
+
const MeasurementDialog = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-3caa3266"]]);
|
|
448
448
|
export {
|
|
449
449
|
MeasurementDialog as default
|
|
450
450
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent, inject, computed, ref, reactive, onUnmounted, watch, resolveComponent, openBlock, createElementBlock, Fragment, createVNode, unref, withCtx, createElementVNode, normalizeClass, createTextVNode, toDisplayString, renderList, createBlock, withModifiers, mergeProps } from "vue";
|
|
2
2
|
import { Plus, FolderOpened, Download, Delete, Search, LocationFilled, Edit } from "@element-plus/icons-vue";
|
|
3
3
|
import { ElMessageBox } from "element-plus";
|
|
4
|
-
import { X, M as MarkerDrawingAdapter, h as fromLonLat, t as toLonLat } from "./index-
|
|
4
|
+
import { X, M as MarkerDrawingAdapter, h as fromLonLat, t as toLonLat } from "./index-eb8bed87.mjs";
|
|
5
5
|
import "ol";
|
|
6
6
|
import "proj4";
|
|
7
7
|
import "@supermapgis/iclient-ol";
|
|
@@ -13,9 +13,11 @@ const _hoisted_5 = { class: "marker-name" };
|
|
|
13
13
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
14
14
|
__name: "MyMarkersDialog",
|
|
15
15
|
props: {
|
|
16
|
-
modelValue: { type: Boolean }
|
|
16
|
+
modelValue: { type: Boolean },
|
|
17
|
+
config: {},
|
|
18
|
+
bookmarks: {}
|
|
17
19
|
},
|
|
18
|
-
emits: ["update:modelValue", "
|
|
20
|
+
emits: ["update:modelValue", "update:bookmarks", "marker-action", "close", "action", "bookmark-action"],
|
|
19
21
|
setup(__props, { emit: __emit }) {
|
|
20
22
|
const EPlusDialog = X;
|
|
21
23
|
const props = __props;
|
|
@@ -226,6 +228,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
226
228
|
markerAdapter.addMarker(markerData);
|
|
227
229
|
console.log("标记添加成功");
|
|
228
230
|
}
|
|
231
|
+
emit("marker-action", {
|
|
232
|
+
action: editingIndex.value >= 0 ? "update" : "add",
|
|
233
|
+
marker: markerData
|
|
234
|
+
});
|
|
235
|
+
emit("action", {
|
|
236
|
+
action: editingIndex.value >= 0 ? "update" : "add",
|
|
237
|
+
marker: markerData
|
|
238
|
+
});
|
|
229
239
|
cancelAddMarker();
|
|
230
240
|
} catch (error) {
|
|
231
241
|
console.error("保存标记失败: " + error.message);
|
|
@@ -242,6 +252,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
242
252
|
try {
|
|
243
253
|
markerAdapter.removeMarker(marker.id);
|
|
244
254
|
console.log("标记删除成功");
|
|
255
|
+
emit("marker-action", { action: "delete", marker });
|
|
256
|
+
emit("action", { action: "delete", marker });
|
|
245
257
|
} catch (error) {
|
|
246
258
|
console.error("删除标记失败: " + error.message);
|
|
247
259
|
}
|
|
@@ -273,6 +285,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
273
285
|
try {
|
|
274
286
|
markerAdapter.clearAllMarkers();
|
|
275
287
|
console.log("已清空所有标记");
|
|
288
|
+
emit("marker-action", { action: "clear" });
|
|
289
|
+
emit("action", { action: "clear" });
|
|
276
290
|
} catch (error) {
|
|
277
291
|
console.error("清空标记失败: " + error.message);
|
|
278
292
|
}
|
|
@@ -347,6 +361,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
347
361
|
dialogVisible.value = false;
|
|
348
362
|
searchKeyword.value = "";
|
|
349
363
|
filterCategory.value = "";
|
|
364
|
+
emit("close");
|
|
350
365
|
};
|
|
351
366
|
onUnmounted(() => {
|
|
352
367
|
if (markerAdapter) {
|
|
@@ -522,7 +537,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
522
537
|
}, {
|
|
523
538
|
default: withCtx(({ row, $index }) => [
|
|
524
539
|
createVNode(_component_el_button, {
|
|
525
|
-
|
|
540
|
+
link: "",
|
|
526
541
|
size: "small",
|
|
527
542
|
icon: unref(Edit),
|
|
528
543
|
onClick: withModifiers(($event) => editMarker(row, $index), ["stop"])
|
|
@@ -533,7 +548,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
533
548
|
_: 2
|
|
534
549
|
}, 1032, ["icon", "onClick"]),
|
|
535
550
|
createVNode(_component_el_button, {
|
|
536
|
-
|
|
551
|
+
link: "",
|
|
537
552
|
size: "small",
|
|
538
553
|
icon: unref(Delete),
|
|
539
554
|
class: "delete-btn",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent, ref, inject, computed, shallowRef, reactive, watch, nextTick, onMounted, onUnmounted, resolveComponent, openBlock, createElementBlock, createVNode, unref, withCtx, createElementVNode, Fragment, renderList, createBlock, createCommentVNode } from "vue";
|
|
2
|
-
import { k as layerFactory, i as getUid, m as defaults, X, n as TileLayer, I as ImageLayer, V as VectorTileLayer, H as HeatmapLayer, o as VectorLayer, L as LayerGroup, b as _export_sfc } from "./index-
|
|
2
|
+
import { k as layerFactory, i as getUid, m as defaults, X, n as TileLayer, I as ImageLayer, V as VectorTileLayer, H as HeatmapLayer, o as VectorLayer, L as LayerGroup, b as _export_sfc } from "./index-eb8bed87.mjs";
|
|
3
3
|
import { u as useMap } from "./useMap-8e3a2de5.mjs";
|
|
4
4
|
import { View, Map } from "ol";
|
|
5
5
|
import "@element-plus/icons-vue";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent, computed, ref, reactive, resolveComponent, openBlock, createBlock, unref, withCtx, createElementVNode, createVNode, createElementBlock, Fragment, renderList, createTextVNode, toDisplayString, normalizeClass } from "vue";
|
|
2
|
-
import { X } from "./index-
|
|
2
|
+
import { X } from "./index-eb8bed87.mjs";
|
|
3
3
|
import "@element-plus/icons-vue";
|
|
4
4
|
import "ol";
|
|
5
5
|
import "proj4";
|
|
@@ -1153,7 +1153,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1153
1153
|
(openBlock(true), createElementBlock(Fragment, null, renderList(regions.north, (region) => {
|
|
1154
1154
|
return openBlock(), createBlock(_component_el_button, {
|
|
1155
1155
|
key: region.code,
|
|
1156
|
-
|
|
1156
|
+
link: "",
|
|
1157
1157
|
class: "region-btn",
|
|
1158
1158
|
onClick: ($event) => navigateToRegion(region)
|
|
1159
1159
|
}, {
|
|
@@ -1171,7 +1171,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1171
1171
|
(openBlock(true), createElementBlock(Fragment, null, renderList(regions.northeast, (region) => {
|
|
1172
1172
|
return openBlock(), createBlock(_component_el_button, {
|
|
1173
1173
|
key: region.code,
|
|
1174
|
-
|
|
1174
|
+
link: "",
|
|
1175
1175
|
class: "region-btn",
|
|
1176
1176
|
onClick: ($event) => navigateToRegion(region)
|
|
1177
1177
|
}, {
|
|
@@ -1189,7 +1189,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1189
1189
|
(openBlock(true), createElementBlock(Fragment, null, renderList(regions.east, (region) => {
|
|
1190
1190
|
return openBlock(), createBlock(_component_el_button, {
|
|
1191
1191
|
key: region.code,
|
|
1192
|
-
|
|
1192
|
+
link: "",
|
|
1193
1193
|
class: "region-btn",
|
|
1194
1194
|
onClick: ($event) => navigateToRegion(region)
|
|
1195
1195
|
}, {
|
|
@@ -1207,7 +1207,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1207
1207
|
(openBlock(true), createElementBlock(Fragment, null, renderList(regions.central, (region) => {
|
|
1208
1208
|
return openBlock(), createBlock(_component_el_button, {
|
|
1209
1209
|
key: region.code,
|
|
1210
|
-
|
|
1210
|
+
link: "",
|
|
1211
1211
|
class: "region-btn",
|
|
1212
1212
|
onClick: ($event) => navigateToRegion(region)
|
|
1213
1213
|
}, {
|
|
@@ -1225,7 +1225,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1225
1225
|
(openBlock(true), createElementBlock(Fragment, null, renderList(regions.south, (region) => {
|
|
1226
1226
|
return openBlock(), createBlock(_component_el_button, {
|
|
1227
1227
|
key: region.code,
|
|
1228
|
-
|
|
1228
|
+
link: "",
|
|
1229
1229
|
class: "region-btn",
|
|
1230
1230
|
onClick: ($event) => navigateToRegion(region)
|
|
1231
1231
|
}, {
|
|
@@ -1243,7 +1243,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1243
1243
|
(openBlock(true), createElementBlock(Fragment, null, renderList(regions.southwest, (region) => {
|
|
1244
1244
|
return openBlock(), createBlock(_component_el_button, {
|
|
1245
1245
|
key: region.code,
|
|
1246
|
-
|
|
1246
|
+
link: "",
|
|
1247
1247
|
class: "region-btn",
|
|
1248
1248
|
onClick: ($event) => navigateToRegion(region)
|
|
1249
1249
|
}, {
|
|
@@ -1261,7 +1261,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1261
1261
|
(openBlock(true), createElementBlock(Fragment, null, renderList(regions.northwest, (region) => {
|
|
1262
1262
|
return openBlock(), createBlock(_component_el_button, {
|
|
1263
1263
|
key: region.code,
|
|
1264
|
-
|
|
1264
|
+
link: "",
|
|
1265
1265
|
class: "region-btn",
|
|
1266
1266
|
onClick: ($event) => navigateToRegion(region)
|
|
1267
1267
|
}, {
|
|
@@ -1279,7 +1279,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1279
1279
|
(openBlock(true), createElementBlock(Fragment, null, renderList(regions.hmt, (region) => {
|
|
1280
1280
|
return openBlock(), createBlock(_component_el_button, {
|
|
1281
1281
|
key: region.code,
|
|
1282
|
-
|
|
1282
|
+
link: "",
|
|
1283
1283
|
class: "region-btn",
|
|
1284
1284
|
onClick: ($event) => navigateToRegion(region)
|
|
1285
1285
|
}, {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent, ref, inject, computed, shallowRef, watch, nextTick, onMounted, onUnmounted, resolveComponent, openBlock, createElementBlock, createVNode, unref, withCtx, createElementVNode, Fragment, renderList, createBlock, createCommentVNode } from "vue";
|
|
2
|
-
import { k as layerFactory, i as getUid, m as defaults, X, n as TileLayer, I as ImageLayer, V as VectorTileLayer, H as HeatmapLayer, o as VectorLayer, L as LayerGroup, b as _export_sfc } from "./index-
|
|
2
|
+
import { k as layerFactory, i as getUid, m as defaults, X, n as TileLayer, I as ImageLayer, V as VectorTileLayer, H as HeatmapLayer, o as VectorLayer, L as LayerGroup, b as _export_sfc } from "./index-eb8bed87.mjs";
|
|
3
3
|
import { u as useMap } from "./useMap-8e3a2de5.mjs";
|
|
4
4
|
import { View, Map } from "ol";
|
|
5
5
|
import "@element-plus/icons-vue";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent, ref, inject, computed, shallowRef, watch, nextTick, onMounted, onUnmounted, resolveComponent, openBlock, createElementBlock, createVNode, unref, withCtx, createElementVNode, normalizeClass, normalizeStyle, Fragment, renderList, createBlock, createCommentVNode } from "vue";
|
|
2
|
-
import { k as layerFactory, i as getUid, m as defaults, X, n as TileLayer, I as ImageLayer, V as VectorTileLayer, H as HeatmapLayer, o as VectorLayer, L as LayerGroup, b as _export_sfc } from "./index-
|
|
2
|
+
import { k as layerFactory, i as getUid, m as defaults, X, n as TileLayer, I as ImageLayer, V as VectorTileLayer, H as HeatmapLayer, o as VectorLayer, L as LayerGroup, b as _export_sfc } from "./index-eb8bed87.mjs";
|
|
3
3
|
import { u as useMap } from "./useMap-8e3a2de5.mjs";
|
|
4
4
|
import { View, Map } from "ol";
|
|
5
5
|
import { DCaret } from "@element-plus/icons-vue";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent, inject, computed, ref, watch, reactive, resolveComponent, openBlock, createBlock, unref, withCtx, createElementVNode, createVNode, createTextVNode, createElementBlock, Fragment, renderList, withModifiers, toDisplayString, createCommentVNode } from "vue";
|
|
2
|
-
import { Plus,
|
|
2
|
+
import { Plus, Delete, Search, Camera, View, Edit, Location, ZoomIn } from "@element-plus/icons-vue";
|
|
3
3
|
import { ElMessage, ElMessageBox } from "element-plus";
|
|
4
|
-
import { X, t as toLonLat, h as fromLonLat, i as getUid } from "./index-
|
|
4
|
+
import { X, t as toLonLat, h as fromLonLat, i as getUid } from "./index-eb8bed87.mjs";
|
|
5
5
|
import "ol";
|
|
6
6
|
import "proj4";
|
|
7
7
|
import "@supermapgis/iclient-ol";
|
|
@@ -20,21 +20,16 @@ const _hoisted_9 = { class: "bookmark-overlay" };
|
|
|
20
20
|
const _hoisted_10 = { class: "bookmark-info" };
|
|
21
21
|
const _hoisted_11 = { class: "bookmark-title" };
|
|
22
22
|
const _hoisted_12 = { class: "bookmark-meta" };
|
|
23
|
-
const _hoisted_13 = { class: "
|
|
24
|
-
const _hoisted_14 = { class: "bookmark-
|
|
25
|
-
const _hoisted_15 = { class: "
|
|
23
|
+
const _hoisted_13 = { class: "bookmark-description" };
|
|
24
|
+
const _hoisted_14 = { class: "bookmark-details" };
|
|
25
|
+
const _hoisted_15 = { class: "detail-item" };
|
|
26
26
|
const _hoisted_16 = { class: "detail-item" };
|
|
27
|
-
const _hoisted_17 = { class: "
|
|
28
|
-
const _hoisted_18 = {
|
|
29
|
-
const _hoisted_19 = {
|
|
27
|
+
const _hoisted_17 = { class: "bookmark-time" };
|
|
28
|
+
const _hoisted_18 = {
|
|
30
29
|
key: 0,
|
|
31
30
|
class: "empty-state"
|
|
32
31
|
};
|
|
33
|
-
const
|
|
34
|
-
key: 1,
|
|
35
|
-
class: "statistics"
|
|
36
|
-
};
|
|
37
|
-
const _hoisted_21 = { class: "dialog-footer" };
|
|
32
|
+
const _hoisted_19 = { class: "dialog-footer" };
|
|
38
33
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
39
34
|
__name: "ViewBookmarksDialog",
|
|
40
35
|
props: {
|
|
@@ -169,7 +164,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
169
164
|
const mapCanvas = map.value.getViewport().querySelector("canvas");
|
|
170
165
|
if (mapCanvas) {
|
|
171
166
|
const canvas = document.createElement("canvas");
|
|
172
|
-
const ctx = canvas.getContext("2d");
|
|
167
|
+
const ctx = canvas.getContext("2d", { willReadFrequently: true });
|
|
173
168
|
const width = 300;
|
|
174
169
|
const height = width * (mapCanvas.height / mapCanvas.width);
|
|
175
170
|
canvas.width = width;
|
|
@@ -205,8 +200,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
205
200
|
switch (sortBy.value) {
|
|
206
201
|
case "name":
|
|
207
202
|
return a.name.localeCompare(b.name);
|
|
208
|
-
case "useCount":
|
|
209
|
-
return b.useCount - a.useCount;
|
|
210
203
|
case "createTime":
|
|
211
204
|
default:
|
|
212
205
|
return new Date(b.createTime).getTime() - new Date(a.createTime).getTime();
|
|
@@ -214,17 +207,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
214
207
|
});
|
|
215
208
|
return result;
|
|
216
209
|
});
|
|
217
|
-
const todayCount = computed(() => {
|
|
218
|
-
const today = /* @__PURE__ */ new Date();
|
|
219
|
-
today.setHours(0, 0, 0, 0);
|
|
220
|
-
return bookmarks.value.filter((bookmark) => bookmark.createTime >= today).length;
|
|
221
|
-
});
|
|
222
|
-
const totalUseCount = computed(() => {
|
|
223
|
-
return bookmarks.value.reduce(
|
|
224
|
-
(total, bookmark) => total + bookmark.useCount,
|
|
225
|
-
0
|
|
226
|
-
);
|
|
227
|
-
});
|
|
228
210
|
const handleSearch = () => {
|
|
229
211
|
};
|
|
230
212
|
const showAddBookmark = () => {
|
|
@@ -290,7 +272,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
290
272
|
],
|
|
291
273
|
zoom: bookmarkForm.zoom,
|
|
292
274
|
rotation: bookmarkForm.rotation,
|
|
293
|
-
useCount: editingIndex.value >= 0 ? bookmarks.value[editingIndex.value].useCount : 0,
|
|
294
275
|
createTime: editingIndex.value >= 0 ? bookmarks.value[editingIndex.value].createTime : /* @__PURE__ */ new Date(),
|
|
295
276
|
thumbnail: bookmarkForm.thumbnail,
|
|
296
277
|
layerStates
|
|
@@ -310,8 +291,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
310
291
|
showBookmarkForm.value = false;
|
|
311
292
|
};
|
|
312
293
|
const applyBookmark = (bookmark) => {
|
|
313
|
-
bookmark.useCount++;
|
|
314
|
-
emitBookmarksChange();
|
|
315
294
|
if (map.value) {
|
|
316
295
|
const view = map.value.getView();
|
|
317
296
|
const projection = view.getProjection().getCode();
|
|
@@ -368,53 +347,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
368
347
|
}).catch(() => {
|
|
369
348
|
});
|
|
370
349
|
};
|
|
371
|
-
const importBookmarks = () => {
|
|
372
|
-
const input = document.createElement("input");
|
|
373
|
-
input.type = "file";
|
|
374
|
-
input.accept = ".json";
|
|
375
|
-
input.onchange = (e) => {
|
|
376
|
-
var _a;
|
|
377
|
-
const file = (_a = e.target.files) == null ? void 0 : _a[0];
|
|
378
|
-
if (file) {
|
|
379
|
-
const reader = new FileReader();
|
|
380
|
-
reader.onload = (e2) => {
|
|
381
|
-
var _a2;
|
|
382
|
-
try {
|
|
383
|
-
const data = JSON.parse((_a2 = e2.target) == null ? void 0 : _a2.result);
|
|
384
|
-
if (Array.isArray(data)) {
|
|
385
|
-
bookmarks.value = data.map((item) => ({
|
|
386
|
-
...item,
|
|
387
|
-
createTime: new Date(item.createTime)
|
|
388
|
-
}));
|
|
389
|
-
emitBookmarksChange();
|
|
390
|
-
console.log(`成功导入${data.length}个书签`);
|
|
391
|
-
} else {
|
|
392
|
-
console.error("文件格式不正确");
|
|
393
|
-
}
|
|
394
|
-
} catch (error) {
|
|
395
|
-
console.error("文件解析失败");
|
|
396
|
-
}
|
|
397
|
-
};
|
|
398
|
-
reader.readAsText(file);
|
|
399
|
-
}
|
|
400
|
-
};
|
|
401
|
-
input.click();
|
|
402
|
-
};
|
|
403
|
-
const exportBookmarks = () => {
|
|
404
|
-
if (bookmarks.value.length === 0) {
|
|
405
|
-
console.warn("没有书签可以导出");
|
|
406
|
-
return;
|
|
407
|
-
}
|
|
408
|
-
const data = JSON.stringify(bookmarks.value, null, 2);
|
|
409
|
-
const blob = new Blob([data], { type: "application/json" });
|
|
410
|
-
const url = URL.createObjectURL(blob);
|
|
411
|
-
const a = document.createElement("a");
|
|
412
|
-
a.href = url;
|
|
413
|
-
a.download = `view_bookmarks_${(/* @__PURE__ */ new Date()).toISOString().split("T")[0]}.json`;
|
|
414
|
-
a.click();
|
|
415
|
-
URL.revokeObjectURL(url);
|
|
416
|
-
console.log("书签导出成功");
|
|
417
|
-
};
|
|
418
350
|
const formatTime = (time) => {
|
|
419
351
|
return new Date(time).toLocaleDateString();
|
|
420
352
|
};
|
|
@@ -432,10 +364,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
432
364
|
const _component_el_button_group = resolveComponent("el-button-group");
|
|
433
365
|
const _component_el_tag = resolveComponent("el-tag");
|
|
434
366
|
const _component_el_empty = resolveComponent("el-empty");
|
|
435
|
-
const
|
|
367
|
+
const _component_el_form_item = resolveComponent("el-form-item");
|
|
436
368
|
const _component_el_col = resolveComponent("el-col");
|
|
437
369
|
const _component_el_row = resolveComponent("el-row");
|
|
438
|
-
const _component_el_form_item = resolveComponent("el-form-item");
|
|
439
370
|
const _component_el_checkbox = resolveComponent("el-checkbox");
|
|
440
371
|
const _component_el_form = resolveComponent("el-form");
|
|
441
372
|
return openBlock(), createBlock(unref(EPlusDialog), {
|
|
@@ -450,9 +381,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
450
381
|
class: "bookmarks-dialog"
|
|
451
382
|
}, {
|
|
452
383
|
footer: withCtx(() => [
|
|
453
|
-
createElementVNode("div",
|
|
384
|
+
createElementVNode("div", _hoisted_19, [
|
|
454
385
|
createVNode(_component_el_button, { onClick: handleClose }, {
|
|
455
|
-
default: withCtx(() => [..._cache[
|
|
386
|
+
default: withCtx(() => [..._cache[22] || (_cache[22] = [
|
|
456
387
|
createTextVNode("关闭", -1)
|
|
457
388
|
])]),
|
|
458
389
|
_: 1
|
|
@@ -472,30 +403,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
472
403
|
])]),
|
|
473
404
|
_: 1
|
|
474
405
|
}, 8, ["icon"]),
|
|
475
|
-
createVNode(_component_el_button, {
|
|
476
|
-
icon: unref(FolderOpened),
|
|
477
|
-
onClick: importBookmarks
|
|
478
|
-
}, {
|
|
479
|
-
default: withCtx(() => [..._cache[14] || (_cache[14] = [
|
|
480
|
-
createTextVNode(" 导入书签 ", -1)
|
|
481
|
-
])]),
|
|
482
|
-
_: 1
|
|
483
|
-
}, 8, ["icon"]),
|
|
484
|
-
createVNode(_component_el_button, {
|
|
485
|
-
icon: unref(Download),
|
|
486
|
-
onClick: exportBookmarks
|
|
487
|
-
}, {
|
|
488
|
-
default: withCtx(() => [..._cache[15] || (_cache[15] = [
|
|
489
|
-
createTextVNode(" 导出书签 ", -1)
|
|
490
|
-
])]),
|
|
491
|
-
_: 1
|
|
492
|
-
}, 8, ["icon"]),
|
|
493
406
|
createVNode(_component_el_button, {
|
|
494
407
|
icon: unref(Delete),
|
|
495
408
|
disabled: bookmarks.value.length === 0,
|
|
496
409
|
onClick: clearAllBookmarks
|
|
497
410
|
}, {
|
|
498
|
-
default: withCtx(() => [..._cache[
|
|
411
|
+
default: withCtx(() => [..._cache[14] || (_cache[14] = [
|
|
499
412
|
createTextVNode(" 清空全部 ", -1)
|
|
500
413
|
])]),
|
|
501
414
|
_: 1
|
|
@@ -547,10 +460,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
547
460
|
createVNode(_component_el_option, {
|
|
548
461
|
label: "名称",
|
|
549
462
|
value: "name"
|
|
550
|
-
}),
|
|
551
|
-
createVNode(_component_el_option, {
|
|
552
|
-
label: "使用次数",
|
|
553
|
-
value: "useCount"
|
|
554
463
|
})
|
|
555
464
|
]),
|
|
556
465
|
_: 1
|
|
@@ -588,7 +497,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
588
497
|
icon: unref(View),
|
|
589
498
|
onClick: withModifiers(($event) => applyBookmark(bookmark), ["stop"])
|
|
590
499
|
}, {
|
|
591
|
-
default: withCtx(() => [..._cache[
|
|
500
|
+
default: withCtx(() => [..._cache[15] || (_cache[15] = [
|
|
592
501
|
createTextVNode(" 应用 ", -1)
|
|
593
502
|
])]),
|
|
594
503
|
_: 2
|
|
@@ -598,7 +507,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
598
507
|
icon: unref(Edit),
|
|
599
508
|
onClick: withModifiers(($event) => editBookmark(bookmark, index), ["stop"])
|
|
600
509
|
}, {
|
|
601
|
-
default: withCtx(() => [..._cache[
|
|
510
|
+
default: withCtx(() => [..._cache[16] || (_cache[16] = [
|
|
602
511
|
createTextVNode(" 编辑 ", -1)
|
|
603
512
|
])]),
|
|
604
513
|
_: 2
|
|
@@ -609,7 +518,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
609
518
|
class: "delete-btn",
|
|
610
519
|
onClick: withModifiers(($event) => deleteBookmark(index), ["stop"])
|
|
611
520
|
}, {
|
|
612
|
-
default: withCtx(() => [..._cache[
|
|
521
|
+
default: withCtx(() => [..._cache[17] || (_cache[17] = [
|
|
613
522
|
createTextVNode(" 删除 ", -1)
|
|
614
523
|
])]),
|
|
615
524
|
_: 2
|
|
@@ -630,12 +539,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
630
539
|
createTextVNode(toDisplayString(bookmark.category), 1)
|
|
631
540
|
]),
|
|
632
541
|
_: 2
|
|
633
|
-
}, 1024)
|
|
634
|
-
createElementVNode("span", _hoisted_13, "使用 " + toDisplayString(bookmark.useCount) + " 次", 1)
|
|
542
|
+
}, 1024)
|
|
635
543
|
]),
|
|
636
|
-
createElementVNode("div",
|
|
637
|
-
createElementVNode("div",
|
|
638
|
-
createElementVNode("span",
|
|
544
|
+
createElementVNode("div", _hoisted_13, toDisplayString(bookmark.description), 1),
|
|
545
|
+
createElementVNode("div", _hoisted_14, [
|
|
546
|
+
createElementVNode("span", _hoisted_15, [
|
|
639
547
|
createVNode(_component_el_icon, null, {
|
|
640
548
|
default: withCtx(() => [
|
|
641
549
|
createVNode(unref(Location))
|
|
@@ -644,7 +552,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
644
552
|
}),
|
|
645
553
|
createTextVNode(" " + toDisplayString(bookmark.center[0].toFixed(4)) + ", " + toDisplayString(bookmark.center[1].toFixed(4)), 1)
|
|
646
554
|
]),
|
|
647
|
-
createElementVNode("span",
|
|
555
|
+
createElementVNode("span", _hoisted_16, [
|
|
648
556
|
createVNode(_component_el_icon, null, {
|
|
649
557
|
default: withCtx(() => [
|
|
650
558
|
createVNode(unref(ZoomIn))
|
|
@@ -654,19 +562,19 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
654
562
|
createTextVNode(" 缩放: " + toDisplayString(bookmark.zoom), 1)
|
|
655
563
|
])
|
|
656
564
|
]),
|
|
657
|
-
createElementVNode("div",
|
|
565
|
+
createElementVNode("div", _hoisted_17, toDisplayString(formatTime(bookmark.createTime)), 1)
|
|
658
566
|
])
|
|
659
567
|
], 8, _hoisted_5);
|
|
660
568
|
}), 128))
|
|
661
569
|
]),
|
|
662
|
-
filteredBookmarks.value.length === 0 ? (openBlock(), createElementBlock("div",
|
|
570
|
+
filteredBookmarks.value.length === 0 ? (openBlock(), createElementBlock("div", _hoisted_18, [
|
|
663
571
|
createVNode(_component_el_empty, { description: "暂无书签" }, {
|
|
664
572
|
default: withCtx(() => [
|
|
665
573
|
createVNode(_component_el_button, {
|
|
666
574
|
type: "primary",
|
|
667
575
|
onClick: showAddBookmark
|
|
668
576
|
}, {
|
|
669
|
-
default: withCtx(() => [..._cache[
|
|
577
|
+
default: withCtx(() => [..._cache[18] || (_cache[18] = [
|
|
670
578
|
createTextVNode("保存当前视角", -1)
|
|
671
579
|
])]),
|
|
672
580
|
_: 1
|
|
@@ -674,49 +582,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
674
582
|
]),
|
|
675
583
|
_: 1
|
|
676
584
|
})
|
|
677
|
-
])) : createCommentVNode("", true),
|
|
678
|
-
bookmarks.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_20, [
|
|
679
|
-
createVNode(_component_el_row, { gutter: 20 }, {
|
|
680
|
-
default: withCtx(() => [
|
|
681
|
-
createVNode(_component_el_col, { span: 6 }, {
|
|
682
|
-
default: withCtx(() => [
|
|
683
|
-
createVNode(_component_el_statistic, {
|
|
684
|
-
title: "总书签数",
|
|
685
|
-
value: bookmarks.value.length
|
|
686
|
-
}, null, 8, ["value"])
|
|
687
|
-
]),
|
|
688
|
-
_: 1
|
|
689
|
-
}),
|
|
690
|
-
createVNode(_component_el_col, { span: 6 }, {
|
|
691
|
-
default: withCtx(() => [
|
|
692
|
-
createVNode(_component_el_statistic, {
|
|
693
|
-
title: "分类数",
|
|
694
|
-
value: categories.value.length
|
|
695
|
-
}, null, 8, ["value"])
|
|
696
|
-
]),
|
|
697
|
-
_: 1
|
|
698
|
-
}),
|
|
699
|
-
createVNode(_component_el_col, { span: 6 }, {
|
|
700
|
-
default: withCtx(() => [
|
|
701
|
-
createVNode(_component_el_statistic, {
|
|
702
|
-
title: "今日新增",
|
|
703
|
-
value: todayCount.value
|
|
704
|
-
}, null, 8, ["value"])
|
|
705
|
-
]),
|
|
706
|
-
_: 1
|
|
707
|
-
}),
|
|
708
|
-
createVNode(_component_el_col, { span: 6 }, {
|
|
709
|
-
default: withCtx(() => [
|
|
710
|
-
createVNode(_component_el_statistic, {
|
|
711
|
-
title: "总使用次数",
|
|
712
|
-
value: totalUseCount.value
|
|
713
|
-
}, null, 8, ["value"])
|
|
714
|
-
]),
|
|
715
|
-
_: 1
|
|
716
|
-
})
|
|
717
|
-
]),
|
|
718
|
-
_: 1
|
|
719
|
-
})
|
|
720
585
|
])) : createCommentVNode("", true)
|
|
721
586
|
]),
|
|
722
587
|
createVNode(unref(EPlusDialog), {
|
|
@@ -731,7 +596,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
731
596
|
createVNode(_component_el_button, {
|
|
732
597
|
onClick: _cache[10] || (_cache[10] = ($event) => showBookmarkForm.value = false)
|
|
733
598
|
}, {
|
|
734
|
-
default: withCtx(() => [..._cache[
|
|
599
|
+
default: withCtx(() => [..._cache[20] || (_cache[20] = [
|
|
735
600
|
createTextVNode("取消", -1)
|
|
736
601
|
])]),
|
|
737
602
|
_: 1
|
|
@@ -740,7 +605,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
740
605
|
type: "primary",
|
|
741
606
|
onClick: saveBookmark
|
|
742
607
|
}, {
|
|
743
|
-
default: withCtx(() => [..._cache[
|
|
608
|
+
default: withCtx(() => [..._cache[21] || (_cache[21] = [
|
|
744
609
|
createTextVNode("保存", -1)
|
|
745
610
|
])]),
|
|
746
611
|
_: 1
|
|
@@ -858,7 +723,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
858
723
|
modelValue: bookmarkForm.saveLayerState,
|
|
859
724
|
"onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => bookmarkForm.saveLayerState = $event)
|
|
860
725
|
}, {
|
|
861
|
-
default: withCtx(() => [..._cache[
|
|
726
|
+
default: withCtx(() => [..._cache[19] || (_cache[19] = [
|
|
862
727
|
createTextVNode("保存当前图层状态(可见性、透明度)", -1)
|
|
863
728
|
])]),
|
|
864
729
|
_: 1
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { inject, computed, ref, onMounted, resolveComponent, openBlock, createElementBlock, createVNode, withCtx, Fragment, renderList, createElementVNode, normalizeClass, toDisplayString, unref, createTextVNode, createCommentVNode, createBlock } from "vue";
|
|
2
2
|
import { Close } from "@element-plus/icons-vue";
|
|
3
|
-
import { b as _export_sfc, D as DrawingManager, X } from "./index-
|
|
3
|
+
import { b as _export_sfc, D as DrawingManager, X } from "./index-eb8bed87.mjs";
|
|
4
4
|
import "ol";
|
|
5
5
|
import "proj4";
|
|
6
6
|
import "@supermapgis/iclient-ol";
|