zhihao-ui 1.2.11 → 1.2.13

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.
Files changed (48) hide show
  1. package/dist/es/{BaseInfo-Dv-eon6t.js → BaseInfo-7jZU0u6I.js} +1 -1
  2. package/dist/es/{Button-DBbUF88w.js → Button-B9P_SsZw.js} +2 -2
  3. package/dist/es/{DatePicker-CWQoV03Q.js → DatePicker-Cc2HzfbO.js} +22 -21
  4. package/dist/es/{DetailHeader-C_mAB8-2.js → DetailHeader-DWSW65H4.js} +3 -3
  5. package/dist/es/{DetailSubTitle-DD7Yllhf.js → DetailSubTitle-BcmMobfK.js} +2 -2
  6. package/dist/es/{Dialog-DyDSVm-6.js → Dialog-CPGMb7bN.js} +7 -6
  7. package/dist/es/{DiyDataTable-CpkKeWkY.js → DiyDataTable-Dg2-p40F.js} +44 -40
  8. package/dist/es/{EditInfoPair-D0b5jY5Y.js → EditInfoPair-DK6juMvt.js} +3 -3
  9. package/dist/es/{FileWrapper-CMSYWmEz.js → FileWrapper-DJK4gH30.js} +4 -4
  10. package/dist/es/{Grid-B5O9dZNI.js → Grid-ChfF9Fgz.js} +1 -1
  11. package/dist/es/{InfoPair-Do3sSVw-.js → InfoPair-Ba3m95Ys.js} +3 -3
  12. package/dist/es/{Input-DVpd0Yte.js → Input-nPdfvjre.js} +3 -3
  13. package/dist/es/{Loading-DwtfOhMD.js → Loading-5GrMZQAf.js} +2 -2
  14. package/dist/es/{Map-B8_d8utt.js → Map-Q8kvdbDZ.js} +827 -712
  15. package/dist/es/{MessageBox-BowhqMYW.js → MessageBox-SFDDgn41.js} +2 -2
  16. package/dist/es/{MoneyInput-CaTrJLi1.js → MoneyInput-DfIiKsPe.js} +5 -5
  17. package/dist/es/{PageHeadPanel-_mKu2rMQ.js → PageHeadPanel-BnA69dS-.js} +2 -2
  18. package/dist/es/Table-R_03lfSM.js +1111 -0
  19. package/dist/es/{ToolTips-BTCP0N--.js → ToolTips-BHQpNHPT.js} +3 -3
  20. package/dist/es/index.js +50 -47
  21. package/dist/es/{utils-DZ8-2Fg2.js → utils-BbabHGt0.js} +1 -1
  22. package/dist/es/{vendor-BY-fHNA3.js → vendor-CUDSGmu_.js} +14743 -12789
  23. package/dist/index.css +1 -1
  24. package/dist/types/components/DiyDataTable/DiyDataTable.vue.d.ts +12 -1
  25. package/dist/types/components/DiyDataTable/index.d.ts +9 -1
  26. package/dist/types/components/DiyDataTable/type.d.ts +2 -0
  27. package/dist/types/components/Map/Map.vue.d.ts +7 -3
  28. package/dist/types/components/Map/components/toolPanel.vue.d.ts +16 -1
  29. package/dist/types/components/Map/index.d.ts +30 -12
  30. package/dist/types/components/Map/render/canvasRender/renderTrackStyle.d.ts +1 -0
  31. package/dist/types/components/Map/render/drawPolygon.d.ts +2 -2
  32. package/dist/types/components/Map/render/renderTrack.d.ts +2 -2
  33. package/dist/types/components/Table/components/ColSetting.vue.d.ts +41 -0
  34. package/dist/types/components/Table/components/SearchForm.vue.d.ts +57 -0
  35. package/dist/types/components/Table/components/SearchFormItem.vue.d.ts +32 -0
  36. package/dist/types/components/Table/components/TableColumn.vue.d.ts +17 -0
  37. package/dist/types/components/Table/components/tablePagination.vue.d.ts +21 -0
  38. package/dist/types/components/Table/hooks/useSelection.d.ts +17 -0
  39. package/dist/types/components/Table/hooks/useTable.d.ts +50 -0
  40. package/dist/types/components/Table/index.d.ts +2946 -0
  41. package/dist/types/components/Table/index.vue.d.ts +984 -0
  42. package/dist/types/components/Table/types.d.ts +78 -0
  43. package/dist/types/components/Table/utils.d.ts +55 -0
  44. package/dist/types/components/const.d.ts +4 -0
  45. package/dist/types/components/index.d.ts +1 -0
  46. package/dist/umd/index.css +1 -1
  47. package/dist/umd/index.umd.cjs +33 -28
  48. package/package.json +1 -1
@@ -1,10 +1,10 @@
1
1
  var A = Object.defineProperty;
2
- var R = (e, t, o) => t in e ? A(e, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[t] = o;
3
- var T = (e, t, o) => R(e, typeof t != "symbol" ? t + "" : t, o);
4
- import { ref, defineComponent, useModel, watch, resolveComponent, openBlock, createElementBlock, createElementVNode, createVNode, withCtx, Fragment, renderList, unref, createBlock, toDisplayString, createCommentVNode, mergeModels, normalizeClass, nextTick, onMounted } from "vue";
5
- import { n as getArea, o as getLength, V as VectorSource, p as VectorLayer, S as Style, C as CircleStyle, F as Fill, q as Stroke, D as Draw, O as Overlay, u as unByKey, r as ElOption, s as ScaleLine$1, T as Text, t as Feature, P as Point, v as fromLonLat, e as cloneDeep, G as GeoJSON, W as WebGLPointsLayer, w as transform, h as hooks, L as LineString, I as Icon, x as Translate, y as toLonLat, M as MultiPoint, z as getCenter, A as TileLayer, X as XYZ, B as Map$1, H as View } from "./vendor-BY-fHNA3.js";
6
- import { _ as _export_sfc } from "./Button-DBbUF88w.js";
7
- import { w as withInstall } from "./utils-DZ8-2Fg2.js";
2
+ var B = (e, t, o) => t in e ? A(e, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[t] = o;
3
+ var k = (e, t, o) => B(e, typeof t != "symbol" ? t + "" : t, o);
4
+ import { ref, defineComponent, useModel, watch, resolveComponent, openBlock, createElementBlock, createElementVNode, createVNode, withCtx, Fragment, renderList, unref, createBlock, toDisplayString, createCommentVNode, mergeModels, nextTick, normalizeClass, renderSlot, onMounted } from "vue";
5
+ import { n as getArea, o as getLength, V as VectorSource, p as VectorLayer, S as Style, C as CircleStyle, F as Fill, q as Stroke, D as Draw, O as Overlay, u as unByKey, r as ElOption, T as Text, h as hooks, L as LineString, s as Feature, P as Point, t as fromLonLat, e as cloneDeep, G as GeoJSON, W as WebGLPointsLayer, v as transform, w as ScaleLine$1, I as Icon, x as Translate, y as toLonLat, M as MultiPoint, z as getCenter, A as TileLayer, X as XYZ, B as Map$1, H as View } from "./vendor-CUDSGmu_.js";
6
+ import { _ as _export_sfc } from "./Button-B9P_SsZw.js";
7
+ import { w as withInstall } from "./utils-BbabHGt0.js";
8
8
  var BaseMapType = /* @__PURE__ */ ((e) => (e[e.vector = 0] = "vector", e[e.satellite = 1] = "satellite", e))(BaseMapType || {}), CAR_COLOR = /* @__PURE__ */ ((e) => (e[e.BLUE = 1] = "BLUE", e[e.YELLOW = 2] = "YELLOW", e[e.Y_GREEN = 3] = "Y_GREEN", e))(CAR_COLOR || {}), DEVICE_TYPE = /* @__PURE__ */ ((e) => (e[e.HOST = 1] = "HOST", e[e.TALK = 2] = "TALK", e[e.STORAGE = 3] = "STORAGE", e[e.INTERNET = 4] = "INTERNET", e[e.CAMERA = 5] = "CAMERA", e[e.LOAD = 6] = "LOAD", e))(DEVICE_TYPE || {}), LENGTH_UNIT = /* @__PURE__ */ ((e) => (e[e.M = 1] = "M", e[e.KM = 2] = "KM", e[e.NM = 3] = "NM", e))(LENGTH_UNIT || {});
9
9
  const LENGTH_UNIT_LABEL = {
10
10
  1: "M",
@@ -16,47 +16,47 @@ const LENGTH_UNIT_LABEL = {
16
16
  };
17
17
  var SWITCH_BTN = /* @__PURE__ */ ((e) => (e.Camera = "camera", e.Mobile = "mobile", e.WaterGauge = "waterGauge", e))(SWITCH_BTN || {});
18
18
  class ShipMapData {
19
- constructor(t, o, n, a, r, l, s, i, d, u, p, c, f, v, y, k, L, E, m, g, h, I) {
20
- T(this, "id");
19
+ constructor(t, o, n, a, r, l, i, s, u, c, m, d, f, g, p, T, L, E, b, h, y, v) {
20
+ k(this, "id");
21
21
  // mmsi
22
- T(this, "mmsi");
22
+ k(this, "mmsi");
23
23
  // 船舶三角形填充色
24
- T(this, "fill");
24
+ k(this, "fill");
25
25
  // 船类型 "7": "货船",
26
- T(this, "shipType");
26
+ k(this, "shipType");
27
27
  // 船名
28
- T(this, "name");
28
+ k(this, "name");
29
29
  // 长度
30
- T(this, "length");
30
+ k(this, "length");
31
31
  // 宽度
32
- T(this, "breadth");
32
+ k(this, "breadth");
33
33
  // 经度
34
- T(this, "lon");
34
+ k(this, "lon");
35
35
  // 纬度
36
- T(this, "lat");
36
+ k(this, "lat");
37
37
  // 时间
38
- T(this, "createdAt");
38
+ k(this, "createdAt");
39
39
  // 速度
40
- T(this, "speed");
40
+ k(this, "speed");
41
41
  // 来源
42
- T(this, "from");
42
+ k(this, "from");
43
43
  // 船状态 "stop":"静止","sail":"航行","work":"作业","danger":"危险","other":"其他"
44
- T(this, "sailStatus");
44
+ k(this, "sailStatus");
45
45
  // 船艏向
46
- T(this, "hdg");
46
+ k(this, "hdg");
47
47
  // 航迹向
48
- T(this, "cog");
48
+ k(this, "cog");
49
49
  // 设备定位类型
50
- T(this, "posType");
51
- T(this, "type");
50
+ k(this, "posType");
51
+ k(this, "type");
52
52
  // 航向角度
53
- T(this, "angle");
53
+ k(this, "angle");
54
54
  // 左侧是否显示色块
55
- T(this, "leftIconColor");
56
- T(this, "existDevice");
57
- T(this, "existMobile");
58
- T(this, "existWaterGauge");
59
- this.id = t, this.mmsi = o, this.fill = n, this.shipType = a, this.name = r, this.length = l, this.breadth = s, this.lon = i, this.lat = d, this.createdAt = u, this.speed = p, this.from = c, this.sailStatus = f, this.hdg = v, this.cog = y, this.posType = k, this.type = L, this.angle = E, this.leftIconColor = m, this.existDevice = g, this.existMobile = h, this.existWaterGauge = I;
55
+ k(this, "leftIconColor");
56
+ k(this, "existDevice");
57
+ k(this, "existMobile");
58
+ k(this, "existWaterGauge");
59
+ this.id = t, this.mmsi = o, this.fill = n, this.shipType = a, this.name = r, this.length = l, this.breadth = i, this.lon = s, this.lat = u, this.createdAt = c, this.speed = m, this.from = d, this.sailStatus = f, this.hdg = g, this.cog = p, this.posType = T, this.type = L, this.angle = E, this.leftIconColor = b, this.existDevice = h, this.existMobile = y, this.existWaterGauge = v;
60
60
  }
61
61
  }
62
62
  const formatLength = function(e, t) {
@@ -125,7 +125,7 @@ ref();
125
125
  const labels = ref([]), _hoisted_1$4 = {
126
126
  key: 0,
127
127
  class: "measure-panel"
128
- }, _hoisted_2$2 = { class: "d-flex justify-content-between align-content-start w-100" }, _hoisted_3$1 = { class: "measure-history-list" }, _hoisted_4 = { class: "left-panel" }, _hoisted_5 = { class: "text index" }, _hoisted_6 = { class: "text" }, _hoisted_7 = ["onClick"], _sfc_main$6 = /* @__PURE__ */ defineComponent({
128
+ }, _hoisted_2$2 = { class: "d-flex justify-content-between align-content-start w-100" }, _hoisted_3$2 = { class: "measure-history-list" }, _hoisted_4$1 = { class: "left-panel" }, _hoisted_5 = { class: "text index" }, _hoisted_6 = { class: "text" }, _hoisted_7 = ["onClick"], _sfc_main$6 = /* @__PURE__ */ defineComponent({
129
129
  __name: "measure",
130
130
  props: {
131
131
  visible: { type: Boolean },
@@ -133,10 +133,10 @@ const labels = ref([]), _hoisted_1$4 = {
133
133
  },
134
134
  emits: /* @__PURE__ */ mergeModels(["close"], ["update:visible"]),
135
135
  setup(e, { expose: t, emit: o }) {
136
- const n = o, a = useModel(e, "visible"), r = ref(LENGTH_UNIT.NM), l = ref([]), s = ref(!1), i = new VectorSource();
137
- let d, u, p, c, f;
138
- const v = new VectorLayer({
139
- source: i,
136
+ const n = o, a = useModel(e, "visible"), r = ref(LENGTH_UNIT.NM), l = ref([]), i = ref(!1), s = new VectorSource();
137
+ let u, c, m, d, f;
138
+ const g = new VectorLayer({
139
+ source: s,
140
140
  style: {
141
141
  "fill-color": "rgba(255, 255, 255, 0.2)",
142
142
  "stroke-color": "#ffcc33",
@@ -144,16 +144,16 @@ const labels = ref([]), _hoisted_1$4 = {
144
144
  "circle-radius": 7,
145
145
  "circle-fill-color": "#ffcc33"
146
146
  }
147
- }), y = function(S) {
148
- if (S.dragging)
147
+ }), p = function(w) {
148
+ if (w.dragging)
149
149
  return;
150
- let w = "点击选择起点";
151
- d && (w = "单击继续,双击结束"), u && (u.innerHTML = w, p.setPosition(S.coordinate), u.classList.remove("hidden"));
152
- }, k = () => {
153
- mapInstance.value && (mapInstance.value.on("pointermove", y), mapInstance.value.getViewport().addEventListener("mouseout", function() {
154
- var S;
155
- (S = u == null ? void 0 : u.classList) == null || S.add("hidden");
156
- }), s.value = !0);
150
+ let S = "点击选择起点";
151
+ u && (S = "单击继续,双击结束"), c && (c.innerHTML = S, m.setPosition(w.coordinate), c.classList.remove("hidden"));
152
+ }, T = () => {
153
+ mapInstance.value && (mapInstance.value.on("pointermove", p), mapInstance.value.getViewport().addEventListener("mouseout", function() {
154
+ var w;
155
+ (w = c == null ? void 0 : c.classList) == null || w.add("hidden");
156
+ }), i.value = !0);
157
157
  };
158
158
  let L;
159
159
  const E = new Style({
@@ -175,110 +175,110 @@ const labels = ref([]), _hoisted_1$4 = {
175
175
  })
176
176
  })
177
177
  });
178
- function m() {
179
- var S, w;
180
- l.value = [], document.querySelectorAll(".ol-tooltip.ol-tooltip-static").forEach((_) => {
181
- var M;
182
- (M = _ == null ? void 0 : _.parentNode) == null || M.removeChild(_);
183
- }), i.clear(), (S = mapInstance.value) == null || S.removeInteraction(L), (w = mapInstance.value) == null || w.removeLayer(v), u != null && u.parentNode && u.parentNode.removeChild(u);
178
+ function b() {
179
+ var w, S;
180
+ l.value = [], document.querySelectorAll(".ol-tooltip.ol-tooltip-static").forEach((M) => {
181
+ var I;
182
+ (I = M == null ? void 0 : M.parentNode) == null || I.removeChild(M);
183
+ }), s.clear(), (w = mapInstance.value) == null || w.removeInteraction(L), (S = mapInstance.value) == null || S.removeLayer(g), c != null && c.parentNode && c.parentNode.removeChild(c);
184
184
  }
185
- function g() {
186
- var w, _;
187
- m(), (w = mapInstance.value) == null || w.addLayer(v), L = new Draw({
188
- source: i,
185
+ function h() {
186
+ var S, M;
187
+ b(), (S = mapInstance.value) == null || S.addLayer(g), L = new Draw({
188
+ source: s,
189
189
  type: "LineString",
190
190
  style: function() {
191
191
  return E;
192
192
  }
193
- }), (_ = mapInstance.value) == null || _.addInteraction(L), I(), h();
194
- let S;
195
- L.on("drawstart", function(M) {
196
- var F;
197
- d = M.feature;
198
- let b;
199
- S = (F = d.getGeometry()) == null ? void 0 : F.on("change", function(P) {
200
- const N = P.target;
201
- let x = formatLength(N, r.value);
202
- b = N.getLastCoordinate(), c && x && (c.innerHTML = x), f.setPosition(b);
193
+ }), (M = mapInstance.value) == null || M.addInteraction(L), v(), y();
194
+ let w;
195
+ L.on("drawstart", function(I) {
196
+ var N;
197
+ u = I.feature;
198
+ let _;
199
+ w = (N = u.getGeometry()) == null ? void 0 : N.on("change", function(P) {
200
+ const F = P.target;
201
+ let x = formatLength(F, r.value);
202
+ _ = F.getLastCoordinate(), d && x && (d.innerHTML = x), f.setPosition(_);
203
203
  });
204
204
  }), L.on("drawend", function() {
205
- c && (c.className = "ol-tooltip ol-tooltip-static ol-tooltip-measure"), c != null && c.innerHTML && l.value.push(c == null ? void 0 : c.innerHTML), f.setOffset([0, -7]), d = null, c = null, I(), S && unByKey(S);
205
+ d && (d.className = "ol-tooltip ol-tooltip-static ol-tooltip-measure"), d != null && d.innerHTML && l.value.push(d == null ? void 0 : d.innerHTML), f.setOffset([0, -7]), u = null, d = null, v(), w && unByKey(w);
206
206
  });
207
207
  }
208
- function h() {
209
- var S;
210
- u != null && u.parentNode && u.parentNode.removeChild(u), u = document.createElement("div"), u.className = "ol-tooltip hidden", p = new Overlay({
211
- element: u,
208
+ function y() {
209
+ var w;
210
+ c != null && c.parentNode && c.parentNode.removeChild(c), c = document.createElement("div"), c.className = "ol-tooltip hidden", m = new Overlay({
211
+ element: c,
212
212
  offset: [15, 0],
213
213
  positioning: "center-left"
214
- }), (S = mapInstance.value) == null || S.addOverlay(p);
214
+ }), (w = mapInstance.value) == null || w.addOverlay(m);
215
215
  }
216
- function I() {
217
- var S;
218
- c != null && c.parentNode && c.parentNode.removeChild(c), c = document.createElement("div"), c.className = "ol-tooltip ol-tooltip-measure", f = new Overlay({
219
- element: c,
216
+ function v() {
217
+ var w;
218
+ d != null && d.parentNode && d.parentNode.removeChild(d), d = document.createElement("div"), d.className = "ol-tooltip ol-tooltip-measure", f = new Overlay({
219
+ element: d,
220
220
  offset: [0, -15],
221
221
  positioning: "bottom-center",
222
222
  stopEvent: !1,
223
223
  insertFirst: !1
224
- }), (S = mapInstance.value) == null || S.addOverlay(f);
224
+ }), (w = mapInstance.value) == null || w.addOverlay(f);
225
225
  }
226
- const C = (S) => {
227
- var M, b;
228
- l.value[S] && l.value.splice(S, 1);
229
- const w = document.querySelectorAll(".ol-tooltip.ol-tooltip-static.ol-tooltip-measure");
230
- w[S] && ((b = (M = w[S]) == null ? void 0 : M.parentNode) == null || b.removeChild(w[S]));
231
- const _ = i.getFeatures();
232
- _[S] && i.removeFeature(_[S]);
226
+ const C = (w) => {
227
+ var I, _;
228
+ l.value[w] && l.value.splice(w, 1);
229
+ const S = document.querySelectorAll(".ol-tooltip.ol-tooltip-static.ol-tooltip-measure");
230
+ S[w] && ((_ = (I = S[w]) == null ? void 0 : I.parentNode) == null || _.removeChild(S[w]));
231
+ const M = s.getFeatures();
232
+ M[w] && s.removeFeature(M[w]);
233
233
  }, V = () => {
234
234
  n("close");
235
235
  };
236
236
  return watch(() => a, () => {
237
- a && !s.value && (k(), g());
237
+ a && !i.value && (T(), h());
238
238
  }, { deep: !0, immediate: !0 }), t({
239
- addInteraction: g,
240
- removeInteraction: m
241
- }), (S, w) => {
242
- const _ = resolveComponent("el-select");
239
+ addInteraction: h,
240
+ removeInteraction: b
241
+ }), (w, S) => {
242
+ const M = resolveComponent("el-select");
243
243
  return a.value ? (openBlock(), createElementBlock("div", _hoisted_1$4, [
244
244
  createElementVNode("div", { class: "header" }, [
245
- w[1] || (w[1] = createElementVNode("div", { class: "title" }, "测量", -1)),
245
+ S[1] || (S[1] = createElementVNode("div", { class: "title" }, "测量", -1)),
246
246
  createElementVNode("i", {
247
247
  onClick: V,
248
248
  class: "map-iconfont icon-close"
249
249
  })
250
250
  ]),
251
251
  createElementVNode("div", _hoisted_2$2, [
252
- w[2] || (w[2] = createElementVNode("div", { class: "tips" }, "在地图上点击多个点测量距离,距离单位", -1)),
253
- createVNode(_, {
252
+ S[2] || (S[2] = createElementVNode("div", { class: "tips" }, "在地图上点击多个点测量距离,距离单位", -1)),
253
+ createVNode(M, {
254
254
  class: "select-length-unit",
255
255
  modelValue: r.value,
256
- "onUpdate:modelValue": w[0] || (w[0] = (M) => r.value = M)
256
+ "onUpdate:modelValue": S[0] || (S[0] = (I) => r.value = I)
257
257
  }, {
258
258
  default: withCtx(() => [
259
- (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(LENGTH_UNIT_LABEL), (M) => (openBlock(), createBlock(unref(ElOption), {
260
- key: unref(LENGTH_UNIT)[M],
261
- label: M,
262
- value: unref(LENGTH_UNIT)[M]
259
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(LENGTH_UNIT_LABEL), (I) => (openBlock(), createBlock(unref(ElOption), {
260
+ key: unref(LENGTH_UNIT)[I],
261
+ label: I,
262
+ value: unref(LENGTH_UNIT)[I]
263
263
  }, null, 8, ["label", "value"]))), 128))
264
264
  ]),
265
265
  _: 1
266
266
  }, 8, ["modelValue"])
267
267
  ]),
268
- createElementVNode("div", _hoisted_3$1, [
269
- (openBlock(!0), createElementBlock(Fragment, null, renderList(l.value, (M, b) => (openBlock(), createElementBlock("div", {
268
+ createElementVNode("div", _hoisted_3$2, [
269
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(l.value, (I, _) => (openBlock(), createElementBlock("div", {
270
270
  class: "measure-history-item",
271
- key: b
271
+ key: _
272
272
  }, [
273
- createElementVNode("div", _hoisted_4, [
274
- w[3] || (w[3] = createElementVNode("i", { class: "map-iconfont icon-a-Frame-11" }, null, -1)),
275
- createElementVNode("span", _hoisted_5, "线段" + toDisplayString(b + 1), 1),
276
- createElementVNode("span", _hoisted_6, toDisplayString(M), 1)
273
+ createElementVNode("div", _hoisted_4$1, [
274
+ S[3] || (S[3] = createElementVNode("i", { class: "map-iconfont icon-a-Frame-11" }, null, -1)),
275
+ createElementVNode("span", _hoisted_5, "线段" + toDisplayString(_ + 1), 1),
276
+ createElementVNode("span", _hoisted_6, toDisplayString(I), 1)
277
277
  ]),
278
278
  createElementVNode("div", {
279
279
  class: "delete-button",
280
- onClick: (F) => C(b)
281
- }, w[4] || (w[4] = [
280
+ onClick: (N) => C(_)
281
+ }, S[4] || (S[4] = [
282
282
  createElementVNode("i", { class: "map-iconfont icon-a-delete1" }, null, -1)
283
283
  ]), 8, _hoisted_7)
284
284
  ]))), 128))
@@ -286,103 +286,7 @@ const labels = ref([]), _hoisted_1$4 = {
286
286
  ])) : createCommentVNode("", !0);
287
287
  };
288
288
  }
289
- }), Measure = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-650abf6f"]]), _hoisted_1$3 = { class: "tool-panel" }, _hoisted_2$1 = { class: "tool-components" }, _sfc_main$5 = /* @__PURE__ */ defineComponent({
290
- __name: "toolPanel",
291
- props: {
292
- vehicleMode: {}
293
- },
294
- emits: ["switchGreenDot", "switchMapTile"],
295
- setup(e, { emit: t }) {
296
- const o = t, n = ref(!1), a = ref(null), r = ref(!0), l = () => {
297
- r.value = !r.value, o("switchGreenDot", r.value);
298
- }, s = ref(BaseMapType.vector), i = () => {
299
- s.value = s.value === BaseMapType.vector ? BaseMapType.satellite : BaseMapType.vector, o("switchMapTile", s.value);
300
- }, d = () => {
301
- var p, c;
302
- n.value ? (p = a.value) == null || p.removeInteraction() : (c = a.value) == null || c.addInteraction(), n.value = !n.value;
303
- }, u = () => {
304
- var p;
305
- (p = a.value) == null || p.removeInteraction(), n.value = !1;
306
- };
307
- return (p, c) => (openBlock(), createElementBlock(Fragment, null, [
308
- createElementVNode("div", _hoisted_1$3, [
309
- p.vehicleMode === "ship" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
310
- createElementVNode("div", {
311
- class: normalizeClass(["switch-btn", `${n.value && "active"}`]),
312
- onClick: d
313
- }, c[1] || (c[1] = [
314
- createElementVNode("i", { class: "map-iconfont icon-measure" }, null, -1),
315
- createElementVNode("div", { class: "button-text" }, "测距", -1)
316
- ]), 2),
317
- createElementVNode("div", {
318
- class: normalizeClass(["switch-btn", { active: r.value }]),
319
- onClick: l
320
- }, c[2] || (c[2] = [
321
- createElementVNode("i", { class: "map-iconfont icon-ship" }, null, -1),
322
- createElementVNode("div", { class: "button-text" }, "绿点", -1)
323
- ]), 2)
324
- ], 64)) : createCommentVNode("", !0),
325
- createElementVNode("div", {
326
- class: normalizeClass(["switch-btn", { active: s.value === unref(BaseMapType).satellite }]),
327
- onClick: i
328
- }, c[3] || (c[3] = [
329
- createElementVNode("i", { class: "map-iconfont icon-space" }, null, -1),
330
- createElementVNode("div", { class: "button-text" }, "卫星", -1)
331
- ]), 2)
332
- ]),
333
- createElementVNode("div", _hoisted_2$1, [
334
- n.value ? (openBlock(), createBlock(Measure, {
335
- key: 0,
336
- ref_key: "measureRef",
337
- ref: a,
338
- visible: n.value,
339
- "onUpdate:visible": c[0] || (c[0] = (f) => n.value = f),
340
- onClose: u
341
- }, null, 8, ["visible"])) : createCommentVNode("", !0)
342
- ])
343
- ], 64));
344
- }
345
- }), ToolPanel = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-9c83c550"]]), _hoisted_1$2 = { id: "scale-line-container" }, _sfc_main$4 = /* @__PURE__ */ defineComponent({
346
- __name: "scaleLine",
347
- setup(e, { expose: t }) {
348
- const o = new ScaleLine$1({
349
- units: "nautical"
350
- });
351
- return t({
352
- setScaleLine: () => {
353
- o.setTarget(document.getElementById("scale-line-container")), mapInstance.value.addControl(o);
354
- }
355
- }), (a, r) => (openBlock(), createElementBlock("div", _hoisted_1$2));
356
- }
357
- }), ScaleLine = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-e51b19b1"]]), _hoisted_1$1 = { class: "zoom" }, _sfc_main$3 = /* @__PURE__ */ defineComponent({
358
- __name: "zoomControl",
359
- props: {
360
- map: {
361
- type: Object
362
- }
363
- },
364
- setup(e) {
365
- const t = () => {
366
- if (!mapInstance.value) return;
367
- const n = mapInstance.value.getView(), a = n.getZoom();
368
- a && n.setZoom(a + 1);
369
- }, o = () => {
370
- if (!mapInstance.value) return;
371
- const n = mapInstance.value.getView(), a = n.getZoom();
372
- a && n.setZoom(a - 1);
373
- };
374
- return (n, a) => (openBlock(), createElementBlock("div", _hoisted_1$1, [
375
- createElementVNode("div", {
376
- onClick: t,
377
- class: "button big-button"
378
- }, "+"),
379
- createElementVNode("div", {
380
- onClick: o,
381
- class: "button small-button"
382
- }, "-")
383
- ]));
384
- }
385
- }), ZoomControl = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-f2b62b21"]]), CDN_URL = "https://static.zhihaoscm.cn/", tiandituKey = "a6e8f78974f2581f2ca00485b40c948f", baseMap = {
289
+ }), Measure = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-650abf6f"]]), CDN_URL = "https://static.zhihaoscm.cn/", tiandituKey = "a6e8f78974f2581f2ca00485b40c948f", baseMap = {
386
290
  // 矢量底图
387
291
  tiandituTile: `http://t0.tianditu.gov.cn/vec_w/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=vec&TILEMATRIXSET=w&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}&tk=${tiandituKey}`,
388
292
  // 矢量注记
@@ -402,10 +306,14 @@ const labels = ref([]), _hoisted_1$4 = {
402
306
  max: 18,
403
307
  // 查看船舶详情时地图缩放层级
404
308
  findShip: 13,
309
+ // 查看车辆详情时地图缩放层级
310
+ findTruck: 14,
405
311
  // 船舶绿点图最大显示层级
406
312
  shipGreenDotMax: 11,
407
313
  // 查车图标显示层级
408
314
  truckDefault: 14,
315
+ // 统计图标显示层级
316
+ truckStatistics: 8,
409
317
  // 船形图标最小渲染层级
410
318
  shipModelMin: 16,
411
319
  // 船形图标最大渲染层级
@@ -415,49 +323,7 @@ const labels = ref([]), _hoisted_1$4 = {
415
323
  data: "EPSG:4326",
416
324
  // 墨卡托投影坐标 渲染坐标
417
325
  mercator: "EPSG:3857"
418
- }, _hoisted_1 = { class: "copyright" }, _hoisted_2 = { class: "tdt-control-copyright tdt-control" }, _hoisted_3 = ["src"], _sfc_main$2 = /* @__PURE__ */ defineComponent({
419
- __name: "copyright",
420
- setup(e) {
421
- return (t, o) => (openBlock(), createElementBlock("div", _hoisted_1, [
422
- createElementVNode("div", _hoisted_2, [
423
- createElementVNode("img", {
424
- src: unref(CDN_URL) + "map/tdt-logo.png",
425
- width: "53px",
426
- height: "22px",
427
- class: "logo",
428
- alt: ""
429
- }, null, 8, _hoisted_3),
430
- o[0] || (o[0] = createElementVNode("div", { class: "copyright-text" }, "GS(2024)0568号 - 甲测资字1100471", -1))
431
- ]),
432
- o[1] || (o[1] = createElementVNode("div", {
433
- id: "dataSource",
434
- class: "tdt-control data-source"
435
- }, "数据来源:自然资源部 & NavInfo", -1))
436
- ]));
437
- }
438
- }), Copyright = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-9c5c2f7b"]]), _sfc_main$1 = /* @__PURE__ */ defineComponent({
439
- __name: "fullscreen",
440
- props: {
441
- pageRef: {
442
- type: Object,
443
- default: () => ({})
444
- }
445
- },
446
- setup(e) {
447
- const t = e, o = ref(!1), n = () => {
448
- var a;
449
- o.value ? document.exitFullscreen() : (console.log(t.pageRef), (a = t.pageRef) == null || a.requestFullscreen()), o.value = !o.value;
450
- };
451
- return (a, r) => (openBlock(), createElementBlock("div", {
452
- class: "fullscreen-btn",
453
- onClick: n
454
- }, [
455
- createElementVNode("i", {
456
- class: normalizeClass(`map-iconfont ${o.value ? "icon-quxiaoquanping" : "icon-quanping"} `)
457
- }, null, 2)
458
- ]));
459
- }
460
- }), Fullscreen = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-ed59d7cb"]]), equatorialCircumference = 2003750834e-2;
326
+ }, equatorialCircumference = 2003750834e-2;
461
327
  function lonLatToMercator(e) {
462
328
  const t = e[0] * equatorialCircumference / 180;
463
329
  let o = Math.log(Math.tan((90 + e[1]) * Math.PI / 360)) / (Math.PI / 180);
@@ -504,8 +370,8 @@ function createPoint(e, t, o) {
504
370
  }, t, o);
505
371
  }
506
372
  function calculateAngle(e, t, o) {
507
- const n = convertToRadians(e), a = convertToRadians(t), r = n[0] % 360 * (Math.PI / 180), l = a[0] % 360 * (Math.PI / 180), s = n[1] % 360 * (Math.PI / 180), i = a[1] % 360 * (Math.PI / 180), d = Math.sin(l - r) * Math.cos(i), u = Math.cos(s) * Math.sin(i) - Math.sin(s) * Math.cos(i) * Math.cos(l - r);
508
- return 180 * Math.atan2(d, u) % (2 * Math.PI) / Math.PI;
373
+ const n = convertToRadians(e), a = convertToRadians(t), r = n[0] % 360 * (Math.PI / 180), l = a[0] % 360 * (Math.PI / 180), i = n[1] % 360 * (Math.PI / 180), s = a[1] % 360 * (Math.PI / 180), u = Math.sin(l - r) * Math.cos(s), c = Math.cos(i) * Math.sin(s) - Math.sin(i) * Math.cos(s) * Math.cos(l - r);
374
+ return 180 * Math.atan2(u, c) % (2 * Math.PI) / Math.PI;
509
375
  }
510
376
  const getAngle = (e, t) => {
511
377
  let o = calculateAngle(createPoint(e), createPoint(t));
@@ -524,9 +390,9 @@ const getAngle = (e, t) => {
524
390
  throw new Error("A polygon must have at least 3 coordinates.");
525
391
  let t = 0, o = 0, n = 0;
526
392
  const a = e.length;
527
- for (let s = 0; s < a - 1; s++) {
528
- const [i, d] = e[s], [u, p] = e[s + 1], c = i * p - u * d;
529
- n += c, t += (i + u) * c, o += (d + p) * c;
393
+ for (let i = 0; i < a - 1; i++) {
394
+ const [s, u] = e[i], [c, m] = e[i + 1], d = s * m - c * u;
395
+ n += d, t += (s + c) * d, o += (u + m) * d;
530
396
  }
531
397
  if (n *= 0.5, n === 0)
532
398
  throw new Error("多边形面积为零");
@@ -534,40 +400,40 @@ const getAngle = (e, t) => {
534
400
  return [r, l];
535
401
  }, rotateShapeModel = (e, t) => {
536
402
  const [o, n] = calculatePolygonCentroid(e), a = t * Math.PI / 180, r = Math.cos(a), l = Math.sin(a);
537
- return e.map(([s, i]) => {
538
- const d = s - o, u = i - n, p = d * r - u * l + o, c = d * l + u * r + n;
539
- return [p, c];
403
+ return e.map(([i, s]) => {
404
+ const u = i - o, c = s - n, m = u * r - c * l + o, d = u * l + c * r + n;
405
+ return [m, d];
540
406
  });
541
407
  }, getTopLeftPoint = (e) => [e[0], e[3]], getBottomLeftPoint = (e) => [e[2], e[3]], getBottomRightPoint = (e) => [e[2], e[1]], getTopRighttPoint = (e) => [e[0], e[1]];
542
408
  function calculateBounds(e, t, o, n, a) {
543
- let r, l, s, i, d = e[0], u = e[1];
409
+ let r, l, i, s, u = e[0], c = e[1];
544
410
  switch (t) {
545
411
  case 0:
546
- r = d + a, l = r + o, i = u - a, s = i - n;
412
+ r = u + a, l = r + o, s = c - a, i = s - n;
547
413
  break;
548
414
  case 1:
549
- r = d + a, l = r + o, i = u + n / 2, s = i - n;
415
+ r = u + a, l = r + o, s = c + n / 2, i = s - n;
550
416
  break;
551
417
  case 2:
552
- r = d + a, l = r + o, i = u + a + n, s = i - n;
418
+ r = u + a, l = r + o, s = c + a + n, i = s - n;
553
419
  break;
554
420
  case 3:
555
- r = d - o / 2, l = r + o, i = u + a + n, s = i - n;
421
+ r = u - o / 2, l = r + o, s = c + a + n, i = s - n;
556
422
  break;
557
423
  case 4:
558
- l = d, r = l - o, i = u + a + n, s = i - n;
424
+ l = u, r = l - o, s = c + a + n, i = s - n;
559
425
  break;
560
426
  case 5:
561
- l = d - a, r = l - o, i = u + n / 2, s = i - n;
427
+ l = u - a, r = l - o, s = c + n / 2, i = s - n;
562
428
  break;
563
429
  case 6:
564
- l = d, r = l - o, i = u - a, s = i - n;
430
+ l = u, r = l - o, s = c - a, i = s - n;
565
431
  break;
566
432
  case 7:
567
- r = d - o / 2, l = r + o, i = u - a, s = i - n;
433
+ r = u - o / 2, l = r + o, s = c - a, i = s - n;
568
434
  }
569
- if (!(!r || !s || !l || !i))
570
- return [Math.min(r, l), Math.min(s, i), Math.max(r, l), Math.max(s, i) + 1];
435
+ if (!(!r || !i || !l || !s))
436
+ return [Math.min(r, l), Math.min(i, s), Math.max(r, l), Math.max(i, s) + 1];
571
437
  }
572
438
  function calculateAnchorPoint(e, t, o = 70, n = 20, a = 20) {
573
439
  let r = [0, 0];
@@ -605,23 +471,23 @@ function drawLabelBody(e, t, o) {
605
471
  labelOutSize: a = 2,
606
472
  labelHeight: r,
607
473
  center: l,
608
- text: s,
609
- leftIcon: i,
610
- shipColor: d,
611
- lineLength: u = 20
474
+ text: i,
475
+ leftIcon: s,
476
+ shipColor: u,
477
+ lineLength: c = 20
612
478
  } = o;
613
479
  e.save(), n && (e.font = n);
614
- let p = e.measureText(s).width + 2 * a;
615
- (i || d) && (p += r + 4 * a), e.restore();
616
- let c, f = -1, v = r + 3 * a;
617
- if (f = 0, c = calculateBounds(l, f, p, v, u), c && f > -1) {
618
- let y = getBottomLeftPoint(c), k = getTopRighttPoint(c);
480
+ let m = e.measureText(i).width + 2 * a;
481
+ (s || u) && (m += r + 4 * a), e.restore();
482
+ let d, f = -1, g = r + 3 * a;
483
+ if (f = 0, d = calculateBounds(l, f, m, g, c), d && f > -1) {
484
+ let p = getBottomLeftPoint(d), T = getTopRighttPoint(d);
619
485
  return {
620
486
  center: l,
621
- x: calculateAnchorPoint(l, f, p, v, u),
622
- l: k,
623
- r: y,
624
- bounds: c,
487
+ x: calculateAnchorPoint(l, f, m, g, c),
488
+ l: T,
489
+ r: p,
490
+ bounds: d,
625
491
  position: f
626
492
  };
627
493
  }
@@ -629,23 +495,23 @@ function drawLabelBody(e, t, o) {
629
495
  }
630
496
  const drawText = (e, t) => {
631
497
  if (!e) return;
632
- const { center: o, text: n, textColor: a, leftIcon: r, rightIcons: l, font: s } = t;
498
+ const { center: o, text: n, textColor: a, leftIcon: r, rightIcons: l, font: i } = t;
633
499
  e.save();
634
- let [i, d] = o;
500
+ let [s, u] = o;
635
501
  if (r) {
636
502
  e.font = "21px map-iconfont";
637
- let u = getIconFont(r.icon);
638
- e.fillStyle = r.color, e.fillText(u, i + labelOutSize - 4, d + 3), i += 22;
503
+ let c = getIconFont(r.icon);
504
+ e.fillStyle = r.color, e.fillText(c, s + labelOutSize - 4, u + 3), s += 22;
639
505
  }
640
506
  if (l != null && l.length) {
641
507
  e.font = "12px map-iconfont", e.fillStyle = "#3370ff";
642
- let u = e.measureText(n).width + 6;
643
- l.forEach((p, c) => {
644
- let f = getIconFont(p), v = 20 * c;
645
- e.fillText(f, i + u + v, d);
508
+ let c = e.measureText(n).width + 6;
509
+ l.forEach((m, d) => {
510
+ let f = getIconFont(m), g = 20 * d;
511
+ e.fillText(f, s + c + g, u);
646
512
  });
647
513
  }
648
- e.font = s || labelFont, e.fillStyle = a, e.fillText(n, i, d), e.restore();
514
+ e.font = i || labelFont, e.fillStyle = a, e.fillText(n, s, u), e.restore();
649
515
  }, drawPolygon = (e, t) => {
650
516
  let {
651
517
  points: o,
@@ -653,33 +519,33 @@ const drawText = (e, t) => {
653
519
  fillColor: a,
654
520
  shouldClosePath: r,
655
521
  translation: l,
656
- rotation: s,
657
- rotationCenter: i,
658
- scale: d,
659
- globalAlpha: u
522
+ rotation: i,
523
+ rotationCenter: s,
524
+ scale: u,
525
+ globalAlpha: c
660
526
  } = t;
661
- if (u || (u = 1), o && e) {
662
- e.save(), e.beginPath(), s && s !== 0 && i == null && e.rotate(s), l && e.translate(l[0], l[1]), s && (i != null && i.length) && e.rotate(s), d && e.scale(d, d), e.moveTo(o[0][0], o[0][1]);
663
- for (let p = 1; p < o.length; p++)
664
- e.lineTo(o[p][0], o[p][1]);
665
- r && e.closePath(), n && (e.strokeStyle = n, e.stroke()), a && r && (u && (e.globalAlpha = u), e.fillStyle = a, e.fill()), e.restore();
527
+ if (c || (c = 1), o && e) {
528
+ e.save(), e.beginPath(), i && i !== 0 && s == null && e.rotate(i), l && e.translate(l[0], l[1]), i && (s != null && s.length) && e.rotate(i), u && e.scale(u, u), e.moveTo(o[0][0], o[0][1]);
529
+ for (let m = 1; m < o.length; m++)
530
+ e.lineTo(o[m][0], o[m][1]);
531
+ r && e.closePath(), n && (e.strokeStyle = n, e.stroke()), a && r && (c && (e.globalAlpha = c), e.fillStyle = a, e.fill()), e.restore();
666
532
  }
667
533
  }, drawLabel = (e, t) => {
668
- const { center: o, text: n, color: a, textColor: r, bgColor: l, leftIcon: s, rightIcons: i } = t;
534
+ const { center: o, text: n, color: a, textColor: r, bgColor: l, leftIcon: i, rightIcons: s } = t;
669
535
  if (o && n) {
670
- let d = {
536
+ let u = {
671
537
  font: labelFont,
672
538
  labelOutSize,
673
539
  labelHeight,
674
540
  center: o,
675
541
  text: n,
676
- leftIcon: s
677
- }, u = drawLabelBody(e, labels.value, d);
678
- if (u) {
679
- const { x: p, bounds: c, l: f } = u;
680
- let v = [getTopLeftPoint(c), getBottomLeftPoint(c), getBottomRightPoint(c), getTopRighttPoint(c)];
681
- labels.value.push(u), drawPolygon(e, {
682
- points: [o, p],
542
+ leftIcon: i
543
+ }, c = drawLabelBody(e, labels.value, u);
544
+ if (c) {
545
+ const { x: m, bounds: d, l: f } = c;
546
+ let g = [getTopLeftPoint(d), getBottomLeftPoint(d), getBottomRightPoint(d), getTopRighttPoint(d)];
547
+ labels.value.push(c), drawPolygon(e, {
548
+ points: [o, m],
683
549
  strokeColor: a,
684
550
  fillColor: "#000",
685
551
  shouldClosePath: !0,
@@ -688,89 +554,213 @@ const drawText = (e, t) => {
688
554
  rotationCenter: void 0,
689
555
  scale: void 0,
690
556
  globalAlpha: labelAlpha
691
- }), i != null && i.length && i.forEach(() => {
692
- v[1][0] += 20, v[2][0] += 20;
557
+ }), s != null && s.length && s.forEach(() => {
558
+ g[1][0] += 20, g[2][0] += 20;
693
559
  }), drawPolygon(e, {
694
- points: v,
560
+ points: g,
695
561
  strokeColor: a,
696
562
  fillColor: l,
697
563
  shouldClosePath: !0
698
564
  });
699
- const [L, E] = f, m = {
565
+ const [L, E] = f, b = {
700
566
  center: [L, E + labelOutSize + labelHeight + 1],
701
567
  text: n,
702
568
  textColor: r,
703
- leftIcon: s,
704
- rightIcons: i
569
+ leftIcon: i,
570
+ rightIcons: s
705
571
  };
706
- drawText(e, m);
572
+ drawText(e, b);
707
573
  }
708
574
  }
709
575
  return null;
710
- }, dotImage = new Image();
711
- dotImage.src = `${CDN_URL}/map/truck-dot.svg`;
712
- dotImage.crossOrigin = "anonymous";
713
- const dotActiveImage = new Image();
714
- dotActiveImage.src = `${CDN_URL}/map/truck-dot-active.svg`;
715
- dotActiveImage.crossOrigin = "anonymous";
716
- const cameraImage = new Image();
717
- cameraImage.src = `${CDN_URL}/map/map-camera.svg`;
718
- cameraImage.crossOrigin = "anonymous";
719
- const loadImage = new Image();
720
- loadImage.src = `${CDN_URL}/map/map-load.svg`;
721
- loadImage.crossOrigin = "anonymous";
722
- const setTruckStyle = (e, t, o, n) => new Style({
723
- renderer: (a, r) => {
724
- const l = r.context;
725
- l.save();
726
- let s = 1;
727
- l.scale(s, s);
728
- let [i, d] = a;
729
- i = i / s - 20, d = d / s;
730
- const u = i - 70, p = d - 68;
731
- let c = 180;
732
- const f = 56, v = "#FFFFFF";
733
- let y = 176;
734
- const k = 52;
735
- let L = "#164AFF", E = "#FFFFFF";
736
- o === CAR_COLOR.YELLOW ? (y = 176, L = "#FFC81E", E = "rgba(0,0,0,0.88)") : o === CAR_COLOR.Y_GREEN && (c = 200, y = 196, L = "#8FED7C", E = "rgba(0,0,0,0.88)"), n != null && n.length && (c += n.length * 56), fillRectRadius(l, u, p, c, f, v), fillRectRadius(l, u + 2, p + 2, y, k, L), o === CAR_COLOR.Y_GREEN && fillRectRadius(l, u + 2, p + 2, 68, k, "#FFC81E"), l.save(), l.restore(), l.fillStyle = E, l.font = "bold 28px Arial", l.textAlign = "left", l.textBaseline = "middle";
737
- const m = `${t.slice(0, 2) + " · " + t.slice(2)}`;
738
- if (l.fillText(m, u + 12, p + 32), l.save(), l.restore(), n != null && n.length) {
739
- const h = l.measureText(m).width + 12;
740
- let I = 0;
741
- n.forEach((C) => {
742
- C === DEVICE_TYPE.CAMERA && (l.drawImage(cameraImage, i - 54 + h + I * 56, d - 64, 50, 50), ++I), C === DEVICE_TYPE.LOAD && (l.drawImage(loadImage, i - 54 + h + I * 56, d - 64, 50, 50), ++I);
743
- });
576
+ }, stopIcon = "&#xe6e2;", stopColor = "#E31818", slowIcon = "&#xe703;", slowColor = "#1890FF", dropletsIcon = "&#xe6d2", trackList$1 = ref([]);
577
+ let animationFeature, animationId;
578
+ const renderTrackLine = (e, t, o) => {
579
+ var r, l;
580
+ const n = e[t];
581
+ if (!n) return;
582
+ (r = trackLineVectorSource.value) == null || r.clear(), trackList$1.value = [], trackList$1.value = n.reverse().map((i, s) => (i.center = [i.lon, i.lat], i.centerPoint = lonLatToMercator(i.center), i.id = t, i.index = s, i.time = hooks(i.createdAt).format("YYYY-MM-DD HH:mm:ss"), i));
583
+ let a = trackList$1.value.map((i) => i.centerPoint);
584
+ if (a.length >= 2) {
585
+ let i = new LineString(a);
586
+ const s = new Feature({ geometry: i });
587
+ s.setStyle(
588
+ new Style({
589
+ stroke: new Stroke({
590
+ color: o,
591
+ width: 2
592
+ })
593
+ })
594
+ ), s.setId(t), s.set("type", "line");
595
+ const u = shipTrackLineFeatures.value.findIndex((m) => m.getId() === t);
596
+ u >= 0 ? shipTrackLineFeatures.value[u] = s : shipTrackLineFeatures.value.push(s);
597
+ const c = createAnimatedIconFeature(o, a);
598
+ trackLineVectorSource.value = new VectorSource({
599
+ features: [...shipTrackLineFeatures.value, c]
600
+ }), animationFeature = c, shipTrackVectorLayer.value = new VectorLayer({
601
+ source: trackLineVectorSource.value
602
+ }), setTimeout(() => {
603
+ renderPoint(o);
604
+ }, 500), (l = mapInstance.value) == null || l.addLayer(shipTrackVectorLayer.value);
605
+ }
606
+ }, handlePlay = (e) => {
607
+ const t = trackLineVectorSource.value.getFeatures().filter((o) => {
608
+ var n;
609
+ return !!((n = o.get("data")) != null && n.lon);
610
+ }).map((o) => lonLatToMercator([o.get("data").lon, o.get("data").lat]));
611
+ startAnimation(t);
612
+ }, createAnimatedIconFeature = (e, t) => {
613
+ const o = new Feature({
614
+ geometry: new Point(fromLonLat([t[0][0], t[0][1]]))
615
+ // 初始位置
616
+ }), n = new Style({
617
+ text: new Text({
618
+ font: "700 14px map-iconfont",
619
+ text: getIconFont("&#xe6bc;"),
620
+ fill: new Fill({ color: e })
621
+ })
622
+ });
623
+ return o.setStyle(n), o;
624
+ }, startAnimation = (e) => {
625
+ if (!animationFeature || !(e != null && e.length)) return;
626
+ let t = 0;
627
+ const o = e.length;
628
+ function n() {
629
+ if (t < o) {
630
+ const [a, r] = e[t];
631
+ animationFeature.getGeometry().setCoordinates(fromLonLat([a, r])), t++, animationId = requestAnimationFrame(n);
632
+ } else
633
+ cancelAnimationFrame(animationId), t = 0, startAnimation();
634
+ }
635
+ n();
636
+ }, renderPoint = (e) => {
637
+ if (!mapInstance.value) return;
638
+ let t = trackList$1.value || [];
639
+ if (!(t && t.length > 2)) return [];
640
+ let o = { 16: 24, 17: 15, default: 4 }, n = [], a = t.length;
641
+ for (let i = 0; i < a; i++) {
642
+ t[i].index = i;
643
+ let s = mapInstance.value.getPixelFromCoordinate(t[i].centerPoint);
644
+ if (s) {
645
+ let u = s.concat(s);
646
+ u = adjustBounds(u, [20, 20]);
647
+ let c = mapInstance.value.getView().getZoom();
648
+ if (!c) return;
649
+ if (c > 15) {
650
+ let d = o[c] || o.default;
651
+ u = adjustBounds(u, [d, d]);
652
+ }
653
+ let m = !0;
654
+ if (t[i].state !== "0") {
655
+ for (let d = 0; d < n.length; d++)
656
+ if (isOverlapping(u, n[d].bounds)) {
657
+ m = !1;
658
+ break;
659
+ }
660
+ }
661
+ m && (t[i].bounds = u, n.push(t[i]));
744
662
  }
745
- const g = dotImage;
746
- l.drawImage(g, i + c / 2 - 90, d, 50 / s, 50 / s), l.restore();
747
663
  }
748
- });
749
- ref([]);
750
- let truckMarkerList = [], trucksVectorSource;
751
- const renderTrucksMarker = (e) => {
752
- if (deleteAllTruckMarkers(), !!mapInstance.value)
753
- return e.forEach((t) => {
754
- const o = convertSixHundredThousandToLatLng(t.lon, t.lat), n = new Feature({
755
- geometry: new Point(fromLonLat(o))
664
+ const r = getIconStyle(stopIcon), l = getIconStyle(slowIcon);
665
+ n.forEach((i) => {
666
+ var c, m;
667
+ let s = new Feature({
668
+ geometry: new Point(i.centerPoint)
669
+ });
670
+ s.set("type", "track_point"), s.set("data", i), s.setStyle(
671
+ new Style({
672
+ image: new CircleStyle({
673
+ fill: new Fill({ color: e }),
674
+ stroke: new Stroke({ color: "#fff", width: 2 }),
675
+ radius: 3
676
+ })
677
+ })
678
+ ), trackLineVectorSource.value.addFeature(s);
679
+ const u = new Feature({
680
+ geometry: new Point(fromLonLat(i.center))
681
+ });
682
+ if (u.set("type", "track_label"), u.setStyle(
683
+ setTrackLabelStyle(i, e)
684
+ ), console.log("trackLabelFeature"), trackLineVectorSource.value.addFeature(u), typeof i == "object" && i.hasOwnProperty("state")) {
685
+ let d = new Feature({
686
+ geometry: new Point(i.centerPoint)
756
687
  });
757
- n.set("data", t), n.setStyle(
758
- setTruckStyle(!1, t.vno, t == null ? void 0 : t.vclColor, t == null ? void 0 : t.icons)
759
- ), truckMarkerList.push({
760
- name: t.vno,
761
- lonlat: o,
762
- feature: n
688
+ d.set("type", "track_icon");
689
+ let f = new Style({
690
+ text: new Text({
691
+ font: "Normal 22px map-iconfont",
692
+ text: getIconFont(dropletsIcon),
693
+ offsetY: -10
694
+ }),
695
+ zIndex: 99
696
+ }), g = [];
697
+ i.state === "0" ? ((c = f.getText()) == null || c.setFill(new Fill({ color: stopColor })), g.push(r)) : ((m = f.getText()) == null || m.setFill(new Fill({ color: slowColor })), g.push(l)), g.push(f), d.setStyle(g), trackLineVectorSource.value.addFeature(d);
698
+ }
699
+ }), renderArrow(n, e), renderIconPoint();
700
+ }, renderArrow = (e, t) => {
701
+ const o = e.length;
702
+ o || (e.push(trackList$1.value[0]), e.push(trackList$1.value[trackList$1.value.length - 1]));
703
+ for (let n = 0; n < o - 1; n++) {
704
+ let a, r = e[n], l = (e[n + 1].index + r.index) / 2;
705
+ if (l % 2 === 0)
706
+ a = trackList$1.value[l].centerPoint;
707
+ else {
708
+ let i = trackList$1.value[Math.floor(l)], s = trackList$1.value[Math.ceil(l)];
709
+ if (i && s) {
710
+ let [u, c] = i.centerPoint, [m, d] = s.centerPoint;
711
+ a = [(u + m) / 2, (c + d) / 2];
712
+ }
713
+ }
714
+ if (a) {
715
+ let i = new Feature({
716
+ geometry: new Point(a)
763
717
  });
764
- }), trucksVectorSource = new VectorSource({
765
- features: truckMarkerList.map((t) => t.feature)
766
- }), trucksLayer.value = new VectorLayer({
767
- source: trucksVectorSource
768
- }), mapInstance.value.addLayer(trucksLayer.value), trucksLayer.value;
769
- }, deleteAllTruckMarkers = () => {
770
- truckMarkerList.forEach((e) => {
771
- e.feature && (trucksVectorSource == null || trucksVectorSource.removeFeature(e.feature));
772
- }), truckMarkerList = [];
773
- }, triangleModel = multiplyPixelRatio([
718
+ i.set("type", "track_arrow"), i.setStyle(
719
+ new Style({
720
+ text: new Text({
721
+ font: "700 14px map-iconfont",
722
+ text: getIconFont("&#xe6bc;"),
723
+ fill: new Fill({ color: t }),
724
+ rotation: getAngle(
725
+ e[n].center,
726
+ e[n + 1].center
727
+ )
728
+ })
729
+ })
730
+ ), trackLineVectorSource.value.addFeature(i);
731
+ }
732
+ }
733
+ }, renderIconPoint = () => {
734
+ const e = "&#xe69b;", t = "#fcdc3f", o = "#ff0000";
735
+ (trackList$1.value.length < 2 ? [trackList$1.value[0]] : [trackList$1.value[0], trackList$1.value[trackList$1.value.length - 1]]).forEach((a) => {
736
+ let r = new Feature({
737
+ geometry: new Point(a.centerPoint)
738
+ });
739
+ r.set("type", "track_begin"), r.set("data", a);
740
+ const l = a.index === 0 && trackList$1.value.length >= 2 ? t : o;
741
+ r.setStyle(
742
+ new Style({
743
+ text: new Text({
744
+ font: "Normal 14px map-iconfont",
745
+ text: getIconFont(e),
746
+ fill: new Fill({ color: l })
747
+ }),
748
+ zIndex: 101
749
+ })
750
+ ), trackLineVectorSource.value.addFeature(r);
751
+ });
752
+ }, setTrackLabelStyle = (e, t) => new Style({
753
+ renderer: (o, n) => {
754
+ const a = n.context, i = {
755
+ center: o,
756
+ text: e.time,
757
+ color: t,
758
+ textColor: "#000",
759
+ bgColor: "rgba(255,255,255,.8)"
760
+ };
761
+ drawLabel(a, i);
762
+ }
763
+ }), triangleModel = multiplyPixelRatio([
774
764
  [0, -8],
775
765
  [5, 8],
776
766
  [-5, 8]
@@ -849,40 +839,40 @@ const renderTrucksMarker = (e) => {
849
839
  const n = mapInstance.value.getView().getZoom();
850
840
  if (!n) return;
851
841
  let a = [];
852
- const [r, l] = drawShipModelByZoom[n] || [0, 0], [s, i] = o;
842
+ const [r, l] = drawShipModelByZoom[n] || [0, 0], [i, s] = o;
853
843
  if (n <= mapZoom.shipModelMax && n > mapZoom.shipModelMin && t.length >= r && t.breadth >= l)
854
- a = rotateShapeModel(drawCurrentShipShapeModel(t, n), t.angle).map((u) => {
855
- const [p, c] = u;
856
- return [s + p, i + c];
844
+ a = rotateShapeModel(drawCurrentShipShapeModel(t, n), t.angle).map((c) => {
845
+ const [m, d] = c;
846
+ return [i + m, s + d];
857
847
  });
858
848
  else {
859
- const d = rotateShapeModel(triangleModel, t.angle);
860
- o.length === 2 && (a = d.map((u) => {
861
- const [p, c] = u;
862
- return [s + p, i + c];
849
+ const u = rotateShapeModel(triangleModel, t.angle);
850
+ o.length === 2 && (a = u.map((c) => {
851
+ const [m, d] = c;
852
+ return [i + m, s + d];
863
853
  }));
864
854
  }
865
855
  if (!(a.length > 2)) return !1;
866
856
  e.save(), e.beginPath(), e.moveTo(a[0][0], a[0][1]);
867
- for (let d = 1; d < a.length; d++)
868
- e.lineTo(a[d][0], a[d][1]);
857
+ for (let u = 1; u < a.length; u++)
858
+ e.lineTo(a[u][0], a[u][1]);
869
859
  return e.closePath(), e.strokeStyle = "#000", e.lineWidth = 1, e.stroke(), e.fillStyle = t.fill, e.fill(), e.restore(), a;
870
860
  }, drawHeading = (e, t, o) => {
871
861
  const [n, a] = o[0], r = getShipDirectPath(t);
872
862
  if (r) {
873
- let l = r.map(function(s) {
874
- let [i, d] = s;
875
- return [i + n, d + a];
863
+ let l = r.map(function(i) {
864
+ let [s, u] = i;
865
+ return [s + n, u + a];
876
866
  });
877
867
  if (e.save(), e.beginPath(), t.angle > 0) {
878
868
  e.translate(n, a);
879
- const s = t.angle * Math.PI / 180;
880
- e.rotate(s), e.translate(-n, -a);
869
+ const i = t.angle * Math.PI / 180;
870
+ e.rotate(i), e.translate(-n, -a);
881
871
  }
882
872
  e.moveTo(n, a);
883
- for (let s = 1; s < l.length; s++) {
884
- let [i, d] = l[s];
885
- e.lineTo(i, d);
873
+ for (let i = 1; i < l.length; i++) {
874
+ let [s, u] = l[i];
875
+ e.lineTo(s, u);
886
876
  }
887
877
  e.strokeStyle = "#000", e.lineWidth = 1, e.stroke(), e.restore();
888
878
  }
@@ -890,34 +880,34 @@ const renderTrucksMarker = (e) => {
890
880
  let [o, n, a, r] = getPixelFromCoordinate(t);
891
881
  const l = 4;
892
882
  o -= l, n -= l, a += l, r += l, e.save(), e.strokeStyle = "#ff0000", e.lineWidth = 4;
893
- const s = 8;
894
- e.beginPath(), e.moveTo(o + s, r), e.lineTo(o, r), e.lineTo(o, r - s), e.moveTo(o, n + s), e.lineTo(o, n), e.lineTo(o + s, n), e.moveTo(a - s, n), e.lineTo(a, n), e.lineTo(a, n + s), e.moveTo(a, r - s), e.lineTo(a, r), e.lineTo(a - s, r), e.stroke(), e.restore();
883
+ const i = 8;
884
+ e.beginPath(), e.moveTo(o + i, r), e.lineTo(o, r), e.lineTo(o, r - i), e.moveTo(o, n + i), e.lineTo(o, n), e.lineTo(o + i, n), e.moveTo(a - i, n), e.lineTo(a, n), e.lineTo(a, n + i), e.moveTo(a, r - i), e.lineTo(a, r), e.lineTo(a - i, r), e.stroke(), e.restore();
895
885
  }, drawShipLabel = (e, t, o) => {
896
- const [n, a] = o, r = n - 0, l = a - 0, s = t.name;
897
- let i;
898
- t.leftIconColor && (i = { color: t.leftIconColor, icon: "&#xe599;" });
899
- let d = getShipCustomIcon(t);
886
+ const [n, a] = o, r = n - 0, l = a - 0, i = t.name;
887
+ let s;
888
+ t.leftIconColor && (s = { color: t.leftIconColor, icon: "&#xe599;" });
889
+ let u = getShipCustomIcon(t);
900
890
  drawLabel(e, {
901
891
  center: [r, l],
902
- text: s,
892
+ text: i,
903
893
  color: "#fff",
904
894
  textColor: "#000",
905
895
  bgColor: "#fff",
906
- leftIcon: i,
907
- rightIcons: d
896
+ leftIcon: s,
897
+ rightIcons: u
908
898
  });
909
899
  }, drawCurrentShipShapeModel = (e, t) => {
910
900
  let o = 0;
911
901
  t === 17 ? o = 0.425 : t === 18 && (o = 0.857);
912
902
  const n = e.length / 4 * o, a = e.breadth * o;
913
903
  let r = cloneDeep(shipShapeModel);
914
- return r = r.map(([l, s]) => [l * a, s * n]), r;
904
+ return r = r.map(([l, i]) => [l * a, i * n]), r;
915
905
  }, getShipDirectPath = (e) => {
916
906
  let { speed: t, hdg: o, cog: n } = e, a = "", r = null;
917
907
  if (t && t > 1 && (o !== null && o != 511 && n !== null ? n - o >= 3 ? a = "left" : n - o <= -3 ? a = "right" : a = "front" : a = "front", a && t))
918
908
  for (let l in speedCondition) {
919
- let s = speedCondition[l];
920
- if (t >= s[0] && t < s[1]) {
909
+ let i = speedCondition[l];
910
+ if (t >= i[0] && t < i[1]) {
921
911
  r = shipDirectPath[a][l];
922
912
  break;
923
913
  }
@@ -997,7 +987,7 @@ const renderShips = (e) => {
997
987
  let t = cloneDeep(e);
998
988
  return t = t.filter((o) => {
999
989
  var a, r, l;
1000
- let n = getFilterItem(o).every(({ btnShow: s, value: i }) => s ? !!i : !0);
990
+ let n = getFilterItem(o).every(({ btnShow: i, value: s }) => i ? !!s : !0);
1001
991
  return switchBtnShow.value.camera || switchBtnShow.value.mobile || switchBtnShow.value.waterGauge ? ((a = selectedShipData.value) == null ? void 0 : a.id) === o.id && clearSelectFeature() : (r = selectedShipData.value) != null && r.id && findShip((l = selectedShipData.value) == null ? void 0 : l.id, selectedShipData.value, !1), n;
1002
992
  }), t;
1003
993
  }, getFilterItem = (e) => [
@@ -1025,11 +1015,11 @@ const renderShips = (e) => {
1025
1015
  source: selectShipsVectorSource
1026
1016
  }), mapInstance.value.addLayer(selectShipsLayer.value), selectShipsLayer.value.setVisible(!0), selectShipsLayer.value;
1027
1017
  }, findShip = (e, t, o = !0) => {
1028
- var a, r, l, s, i;
1018
+ var a, r, l, i, s;
1029
1019
  if (!e || !mapInstance.value) return;
1030
- const n = (l = (r = (a = shipsLayer.value) == null ? void 0 : a.getSource()) == null ? void 0 : r.getFeatures()) == null ? void 0 : l.find((d) => {
1031
- var u;
1032
- return ((u = d.get("data")) == null ? void 0 : u.id) === e;
1020
+ const n = (l = (r = (a = shipsLayer.value) == null ? void 0 : a.getSource()) == null ? void 0 : r.getFeatures()) == null ? void 0 : l.find((u) => {
1021
+ var c;
1022
+ return ((c = u.get("data")) == null ? void 0 : c.id) === e;
1033
1023
  });
1034
1024
  if (n)
1035
1025
  selectedShipData.value = n;
@@ -1039,11 +1029,11 @@ const renderShips = (e) => {
1039
1029
  console.error("找不到船舶");
1040
1030
  return;
1041
1031
  }
1042
- if (selectSingleShipMarker(t), o && ((s = selectedShipData.value) != null && s.lon) && ((i = selectedShipData.value) != null && i.lat)) {
1043
- const d = mapInstance.value.getView(), u = new Point([selectedShipData.value.lon, selectedShipData.value.lat]);
1044
- d.setCenter(transform(u.getCoordinates(), projection.data, projection.mercator));
1045
- const p = d.getZoom(), c = p < mapZoom.findShip ? mapZoom.findShip : p;
1046
- d.setZoom(c);
1032
+ if (selectSingleShipMarker(t), o && ((i = selectedShipData.value) != null && i.lon) && ((s = selectedShipData.value) != null && s.lat)) {
1033
+ const u = mapInstance.value.getView(), c = new Point([selectedShipData.value.lon, selectedShipData.value.lat]);
1034
+ u.setCenter(transform(c.getCoordinates(), projection.data, projection.mercator));
1035
+ const m = u.getZoom(), d = m < mapZoom.findShip ? mapZoom.findShip : m;
1036
+ u.setZoom(d);
1047
1037
  }
1048
1038
  return n;
1049
1039
  }, clearSelectFeature = () => {
@@ -1064,199 +1054,313 @@ const renderShips = (e) => {
1064
1054
  switchBtnShow.value[e] = t, renderShips(allShips.value);
1065
1055
  }, rerenderShip = () => {
1066
1056
  renderShips(allShips.value);
1067
- }, stopIcon = "&#xe6e2;", stopColor = "#E31818", slowIcon = "&#xe703;", slowColor = "#1890FF", dropletsIcon = "&#xe6d2", trackList$1 = ref([]), renderTrackLine = (e, t, o) => {
1068
- var r, l;
1069
- const n = e[t];
1070
- if (!n) return;
1071
- (r = trackLineVectorSource.value) == null || r.clear(), trackList$1.value = [], trackList$1.value = n.reverse().map((s, i) => (s.center = [s.lon, s.lat], s.centerPoint = lonLatToMercator(s.center), s.id = t, s.index = i, s.time = hooks(s.createdAt).format("YYYY-MM-DD HH:mm:ss"), s));
1072
- let a = trackList$1.value.map((s) => s.centerPoint);
1073
- if (a.length >= 2) {
1074
- let s = new LineString(a);
1075
- const i = new Feature({ geometry: s });
1076
- i.setStyle(
1077
- new Style({
1078
- stroke: new Stroke({
1079
- color: o,
1080
- width: 2
1081
- })
1082
- })
1083
- ), i.setId(t), i.set("type", "line");
1084
- const d = shipTrackLineFeatures.value.findIndex((u) => u.getId() === t);
1085
- d >= 0 ? shipTrackLineFeatures.value[d] = i : shipTrackLineFeatures.value.push(i), trackLineVectorSource.value = new VectorSource({
1086
- features: shipTrackLineFeatures.value
1087
- }), shipTrackVectorLayer.value = new VectorLayer({
1088
- source: trackLineVectorSource.value
1089
- }), setTimeout(() => {
1090
- renderPoint(o);
1091
- }, 500), (l = mapInstance.value) == null || l.addLayer(shipTrackVectorLayer.value);
1092
- }
1093
- }, renderPoint = (e) => {
1094
- if (!mapInstance.value) return;
1095
- let t = trackList$1.value || [];
1096
- if (!(t && t.length > 2)) return [];
1097
- let o = { 16: 24, 17: 15, default: 4 }, n = [], a = t.length;
1098
- for (let s = 0; s < a; s++) {
1099
- t[s].index = s;
1100
- let i = mapInstance.value.getPixelFromCoordinate(t[s].centerPoint);
1101
- if (i) {
1102
- let d = i.concat(i);
1103
- d = adjustBounds(d, [20, 20]);
1104
- let u = mapInstance.value.getView().getZoom();
1105
- if (!u) return;
1106
- if (u > 15) {
1107
- let c = o[u] || o.default;
1108
- d = adjustBounds(d, [c, c]);
1109
- }
1110
- let p = !0;
1111
- if (t[s].state !== "0") {
1112
- for (let c = 0; c < n.length; c++)
1113
- if (isOverlapping(d, n[c].bounds)) {
1114
- p = !1;
1115
- break;
1116
- }
1117
- }
1118
- p && (t[s].bounds = d, n.push(t[s]));
1119
- }
1120
- }
1121
- const r = getIconStyle(stopIcon), l = getIconStyle(slowIcon);
1122
- n.forEach((s) => {
1123
- var u, p;
1124
- let i = new Feature({
1125
- geometry: new Point(s.centerPoint)
1126
- });
1127
- i.set("type", "track_point"), i.set("data", s), i.setStyle(
1128
- new Style({
1129
- image: new CircleStyle({
1130
- fill: new Fill({ color: e }),
1131
- stroke: new Stroke({ color: "#fff", width: 2 }),
1132
- radius: 3
1133
- })
1134
- })
1135
- ), trackLineVectorSource.value.addFeature(i);
1136
- const d = new Feature({
1137
- geometry: new Point(fromLonLat(s.center))
1138
- });
1139
- if (d.set("type", "track_label"), d.setStyle(
1140
- setTrackLabelStyle(s, e)
1141
- ), console.log("trackLabelFeature"), trackLineVectorSource.value.addFeature(d), typeof s == "object" && s.hasOwnProperty("state")) {
1142
- let c = new Feature({
1143
- geometry: new Point(s.centerPoint)
1144
- });
1145
- c.set("type", "track_icon");
1146
- let f = new Style({
1147
- text: new Text({
1148
- font: "Normal 22px map-iconfont",
1149
- text: getIconFont(dropletsIcon),
1150
- offsetY: -10
1151
- }),
1152
- zIndex: 99
1153
- }), v = [];
1154
- s.state === "0" ? ((u = f.getText()) == null || u.setFill(new Fill({ color: stopColor })), v.push(r)) : ((p = f.getText()) == null || p.setFill(new Fill({ color: slowColor })), v.push(l)), v.push(f), c.setStyle(v), trackLineVectorSource.value.addFeature(c);
1155
- }
1156
- }), renderArrow(n, e), renderIconPoint();
1157
- }, renderArrow = (e, t) => {
1158
- const o = e.length;
1159
- o || (e.push(trackList$1.value[0]), e.push(trackList$1.value[trackList$1.value.length - 1]));
1160
- for (let n = 0; n < o - 1; n++) {
1161
- let a, r = e[n], l = (e[n + 1].index + r.index) / 2;
1162
- if (l % 2 === 0)
1163
- a = trackList$1.value[l].centerPoint;
1164
- else {
1165
- let s = trackList$1.value[Math.floor(l)], i = trackList$1.value[Math.ceil(l)];
1166
- if (s && i) {
1167
- let [d, u] = s.centerPoint, [p, c] = i.centerPoint;
1168
- a = [(d + p) / 2, (u + c) / 2];
1169
- }
1170
- }
1171
- if (a) {
1172
- let s = new Feature({
1173
- geometry: new Point(a)
1174
- });
1175
- s.set("type", "track_arrow"), s.setStyle(
1176
- new Style({
1177
- text: new Text({
1178
- font: "700 14px map-iconfont",
1179
- text: getIconFont("&#xe6bc;"),
1180
- fill: new Fill({ color: t }),
1181
- rotation: getAngle(
1182
- e[n].center,
1183
- e[n + 1].center
1184
- )
1185
- })
1186
- })
1187
- ), trackLineVectorSource.value.addFeature(s);
1188
- }
1189
- }
1190
- }, renderIconPoint = () => {
1191
- const e = "&#xe69b;", t = "#fcdc3f", o = "#ff0000";
1192
- (trackList$1.value.length < 2 ? [trackList$1.value[0]] : [trackList$1.value[0], trackList$1.value[trackList$1.value.length - 1]]).forEach((a) => {
1193
- let r = new Feature({
1194
- geometry: new Point(a.centerPoint)
1195
- });
1196
- r.set("type", "track_begin"), r.set("data", a);
1197
- const l = a.index === 0 && trackList$1.value.length >= 2 ? t : o;
1198
- r.setStyle(
1199
- new Style({
1200
- text: new Text({
1201
- font: "Normal 14px map-iconfont",
1202
- text: getIconFont(e),
1203
- fill: new Fill({ color: l })
1204
- }),
1205
- zIndex: 101
1206
- })
1207
- ), trackLineVectorSource.value.addFeature(r);
1208
- });
1209
- }, setTrackLabelStyle = (e, t) => new Style({
1210
- renderer: (o, n) => {
1211
- const a = n.context, s = {
1212
- center: o,
1213
- text: e.time,
1214
- color: t,
1215
- textColor: "#000",
1216
- bgColor: "rgba(255,255,255,.8)"
1217
- };
1218
- drawLabel(a, s);
1219
- }
1220
- }), showTracks = ref([]), trackList = ref([]);
1057
+ }, showTracks = ref([]), trackList = ref([]);
1221
1058
  ref(null);
1222
1059
  const trackId = ref(""), cursor = ref(0), renderTrack = (e, t, o, n, a = "ship") => {
1223
- var u;
1060
+ var c;
1224
1061
  if (nextTick(() => {
1225
1062
  hiddenAllShips();
1226
- }).then((p) => {
1063
+ }).then((m) => {
1227
1064
  }), (t == null ? void 0 : t.length) < 2) {
1228
- ((u = showTracks.value) == null ? void 0 : u.findIndex((p) => p.id === e)) < 0 && showTracks.value.push({ id: e, length: "" });
1065
+ ((c = showTracks.value) == null ? void 0 : c.findIndex((m) => m.id === e)) < 0 && showTracks.value.push({ id: e, length: "" });
1229
1066
  return;
1230
1067
  }
1231
1068
  let r = {};
1232
- t.forEach((p) => {
1233
- p.state ? p.state = Number(p.state) : delete p.state;
1069
+ t.forEach((m) => {
1070
+ m.state ? m.state = Number(m.state) : delete m.state;
1234
1071
  }), trackId.value = e, r[e] = t, trackList.value = t;
1235
- const l = ["#ff0000", "#00ff00", "#0079ff", "#ffa500", "#800080", "#008080", "#ffc0cb", "#800000", "#000080", "#808000"], s = r[e].map(
1236
- (p) => transform([p.lon, p.lat], projection.data, projection.mercator)
1237
- ), i = new LineString(s), d = formatLength(i, n) || "--";
1072
+ const l = ["#ff0000", "#00ff00", "#0079ff", "#ffa500", "#800080", "#008080", "#ffc0cb", "#800000", "#000080", "#808000"], i = r[e].map(
1073
+ (m) => transform([m.lon, m.lat], projection.data, projection.mercator)
1074
+ ), s = new LineString(i), u = formatLength(s, n) || "--";
1238
1075
  nextTick(() => {
1239
- var c;
1240
- const p = (c = showTracks.value) == null ? void 0 : c.findIndex((f) => f.id === e);
1241
- p < 0 ? showTracks.value.push({ id: e, length: d }) : showTracks.value[p].length = d, renderTrackLine(r, e, o), ++cursor.value, cursor.value > l.length && (cursor.value = 0), resetTrackView(e);
1076
+ var d;
1077
+ const m = (d = showTracks.value) == null ? void 0 : d.findIndex((f) => f.id === e);
1078
+ m < 0 ? showTracks.value.push({ id: e, length: u }) : showTracks.value[m].length = u, renderTrackLine(r, e, o), ++cursor.value, cursor.value > l.length && (cursor.value = 0), resetTrackView(e);
1242
1079
  }).then(() => {
1243
1080
  });
1244
1081
  }, removeAllTrackLayer = () => {
1245
1082
  var e;
1246
1083
  showTracks.value = [], (e = trackLineVectorSource.value) == null || e.clear();
1084
+ }, playTrack = (e, t) => {
1085
+ handlePlay();
1247
1086
  }, resetTrackView = (e) => {
1248
- var n, a;
1249
- const t = mapInstance.value.getView(), o = (a = (n = shipTrackLineFeatures.value.find((r) => r.getId() === e)) == null ? void 0 : n.getGeometry()) == null ? void 0 : a.getExtent();
1250
- if (o != null && o.length)
1087
+ var a;
1088
+ const t = mapInstance.value.getView(), o = e ? shipTrackLineFeatures.value.find((r) => r.getId() === e) : shipTrackLineFeatures.value[0];
1089
+ if (!o) return;
1090
+ const n = (a = o == null ? void 0 : o.getGeometry()) == null ? void 0 : a.getExtent();
1091
+ if (n != null && n.length)
1251
1092
  try {
1252
- t.fit(o);
1093
+ t.fit(n);
1253
1094
  } catch (r) {
1254
1095
  console.log(r);
1255
1096
  }
1097
+ }, _hoisted_1$3 = { class: "tool-panel" }, _hoisted_2$1 = {
1098
+ key: 0,
1099
+ class: "more-tool-panel"
1100
+ }, _hoisted_3$1 = { class: "switch-buttons" }, _hoisted_4 = { class: "tool-components" }, _sfc_main$5 = /* @__PURE__ */ defineComponent({
1101
+ __name: "toolPanel",
1102
+ props: {
1103
+ vehicleMode: {},
1104
+ viewMode: {},
1105
+ disableGreenDot: { type: Boolean },
1106
+ showTrackLayer: { type: Boolean }
1107
+ },
1108
+ emits: ["switchGreenDot", "switchMapTile"],
1109
+ setup(e, { emit: t }) {
1110
+ var d, f;
1111
+ const o = t, n = ref(((f = (d = mapInstance.value) == null ? void 0 : d.getView()) == null ? void 0 : f.getZoom()) || mapZoom.default), a = ref(!1), r = ref(null), l = ref(!0), i = () => {
1112
+ l.value = !l.value, o("switchGreenDot", l.value);
1113
+ }, s = ref(BaseMapType.vector), u = () => {
1114
+ s.value = s.value === BaseMapType.vector ? BaseMapType.satellite : BaseMapType.vector, o("switchMapTile", s.value);
1115
+ }, c = () => {
1116
+ var g, p;
1117
+ a.value ? (g = r.value) == null || g.removeInteraction() : (p = r.value) == null || p.addInteraction(), a.value = !a.value;
1118
+ }, m = () => {
1119
+ var g;
1120
+ (g = r.value) == null || g.removeInteraction(), a.value = !1;
1121
+ };
1122
+ return (g, p) => (openBlock(), createElementBlock(Fragment, null, [
1123
+ createElementVNode("div", _hoisted_1$3, [
1124
+ g.viewMode === "WxMiniprogram" ? (openBlock(), createElementBlock("div", _hoisted_2$1, [
1125
+ createElementVNode("div", _hoisted_3$1, [
1126
+ g.vehicleMode === "ship" ? (openBlock(), createElementBlock("div", {
1127
+ key: 0,
1128
+ class: normalizeClass(["switch-btn", `${a.value && "active"}`]),
1129
+ onClick: c
1130
+ }, p[5] || (p[5] = [
1131
+ createElementVNode("i", { class: "map-iconfont icon-measure" }, null, -1),
1132
+ createElementVNode("div", { class: "button-text" }, "测距", -1)
1133
+ ]), 2)) : createCommentVNode("", !0),
1134
+ g.vehicleMode === "ship" ? (openBlock(), createElementBlock("div", {
1135
+ key: 1,
1136
+ "<div": "",
1137
+ class: normalizeClass(`switch-btn ${l.value && "active"} ${(g.disableGreenDot || n.value >= unref(mapZoom).shipGreenDotMax) && "disabled"}`),
1138
+ onClick: i
1139
+ }, p[6] || (p[6] = [
1140
+ createElementVNode("i", { class: "map-iconfont icon-ship" }, null, -1),
1141
+ createElementVNode("div", { class: "button-text" }, "绿点", -1)
1142
+ ]), 2)) : createCommentVNode("", !0),
1143
+ g.vehicleMode === "ship" ? (openBlock(), createElementBlock("div", {
1144
+ key: 2,
1145
+ class: normalizeClass(`switch-btn ${s.value === unref(BaseMapType).vector && "active"}`),
1146
+ onClick: p[0] || (p[0] = (T) => u())
1147
+ }, p[7] || (p[7] = [
1148
+ createElementVNode("i", { class: "map-iconfont icon-space" }, null, -1),
1149
+ createElementVNode("div", { class: "button-text" }, "图层", -1)
1150
+ ]), 2)) : createCommentVNode("", !0),
1151
+ g.vehicleMode === "truck" ? (openBlock(), createElementBlock("div", {
1152
+ key: 3,
1153
+ class: normalizeClass(`switch-btn ${s.value === unref(BaseMapType).satellite && "active"}`),
1154
+ onClick: p[1] || (p[1] = (T) => u())
1155
+ }, p[8] || (p[8] = [
1156
+ createElementVNode("i", { class: "map-iconfont icon-space" }, null, -1),
1157
+ createElementVNode("div", { class: "button-text" }, "卫星", -1)
1158
+ ]), 2)) : createCommentVNode("", !0),
1159
+ g.showTrackLayer ? (openBlock(), createElementBlock(Fragment, { key: 4 }, [
1160
+ createElementVNode("div", {
1161
+ class: "switch-btn multiple",
1162
+ onClick: p[2] || (p[2] = (T) => unref(playTrack)(0, 1))
1163
+ }, p[9] || (p[9] = [
1164
+ createElementVNode("i", { class: "iconfont icon-play" }, null, -1),
1165
+ createElementVNode("div", { class: "button-text" }, "播放轨迹", -1)
1166
+ ])),
1167
+ createElementVNode("div", {
1168
+ class: "switch-btn multiple",
1169
+ onClick: p[3] || (p[3] = (T) => unref(resetTrackView)())
1170
+ }, p[10] || (p[10] = [
1171
+ createElementVNode("i", { class: "iconfont icon-center" }, null, -1),
1172
+ createElementVNode("div", { class: "button-text" }, "轨迹居中", -1)
1173
+ ]))
1174
+ ], 64)) : createCommentVNode("", !0),
1175
+ renderSlot(g.$slots, "toolPanel", {}, void 0, !0)
1176
+ ])
1177
+ ])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
1178
+ g.vehicleMode === "ship" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
1179
+ createElementVNode("div", {
1180
+ class: normalizeClass(["switch-btn", `${a.value && "active"}`]),
1181
+ onClick: c
1182
+ }, p[11] || (p[11] = [
1183
+ createElementVNode("i", { class: "map-iconfont icon-measure" }, null, -1),
1184
+ createElementVNode("div", { class: "button-text" }, "测距", -1)
1185
+ ]), 2),
1186
+ createElementVNode("div", {
1187
+ class: normalizeClass(["switch-btn", { active: l.value }]),
1188
+ onClick: i
1189
+ }, p[12] || (p[12] = [
1190
+ createElementVNode("i", { class: "map-iconfont icon-ship" }, null, -1),
1191
+ createElementVNode("div", { class: "button-text" }, "绿点", -1)
1192
+ ]), 2)
1193
+ ], 64)) : createCommentVNode("", !0),
1194
+ createElementVNode("div", {
1195
+ class: normalizeClass(["switch-btn", { active: s.value === unref(BaseMapType).satellite }]),
1196
+ onClick: u
1197
+ }, p[13] || (p[13] = [
1198
+ createElementVNode("i", { class: "map-iconfont icon-space" }, null, -1),
1199
+ createElementVNode("div", { class: "button-text" }, "卫星", -1)
1200
+ ]), 2)
1201
+ ], 64))
1202
+ ]),
1203
+ createElementVNode("div", _hoisted_4, [
1204
+ a.value ? (openBlock(), createBlock(Measure, {
1205
+ key: 0,
1206
+ ref_key: "measureRef",
1207
+ ref: r,
1208
+ visible: a.value,
1209
+ "onUpdate:visible": p[4] || (p[4] = (T) => a.value = T),
1210
+ onClose: m
1211
+ }, null, 8, ["visible"])) : createCommentVNode("", !0)
1212
+ ])
1213
+ ], 64));
1214
+ }
1215
+ }), ToolPanel = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-ddfa6649"]]), _hoisted_1$2 = { id: "scale-line-container" }, _sfc_main$4 = /* @__PURE__ */ defineComponent({
1216
+ __name: "scaleLine",
1217
+ setup(e, { expose: t }) {
1218
+ const o = new ScaleLine$1({
1219
+ units: "nautical"
1220
+ });
1221
+ return t({
1222
+ setScaleLine: () => {
1223
+ o.setTarget(document.getElementById("scale-line-container")), mapInstance.value.addControl(o);
1224
+ }
1225
+ }), (a, r) => (openBlock(), createElementBlock("div", _hoisted_1$2));
1226
+ }
1227
+ }), ScaleLine = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-e51b19b1"]]), _hoisted_1$1 = { class: "zoom" }, _sfc_main$3 = /* @__PURE__ */ defineComponent({
1228
+ __name: "zoomControl",
1229
+ props: {
1230
+ map: {
1231
+ type: Object
1232
+ }
1233
+ },
1234
+ setup(e) {
1235
+ const t = () => {
1236
+ if (!mapInstance.value) return;
1237
+ const n = mapInstance.value.getView(), a = n.getZoom();
1238
+ a && n.setZoom(a + 1);
1239
+ }, o = () => {
1240
+ if (!mapInstance.value) return;
1241
+ const n = mapInstance.value.getView(), a = n.getZoom();
1242
+ a && n.setZoom(a - 1);
1243
+ };
1244
+ return (n, a) => (openBlock(), createElementBlock("div", _hoisted_1$1, [
1245
+ createElementVNode("div", {
1246
+ onClick: t,
1247
+ class: "button big-button"
1248
+ }, "+"),
1249
+ createElementVNode("div", {
1250
+ onClick: o,
1251
+ class: "button small-button"
1252
+ }, "-")
1253
+ ]));
1254
+ }
1255
+ }), ZoomControl = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-f2b62b21"]]), _hoisted_1 = { class: "copyright" }, _hoisted_2 = { class: "tdt-control-copyright tdt-control" }, _hoisted_3 = ["src"], _sfc_main$2 = /* @__PURE__ */ defineComponent({
1256
+ __name: "copyright",
1257
+ setup(e) {
1258
+ return (t, o) => (openBlock(), createElementBlock("div", _hoisted_1, [
1259
+ createElementVNode("div", _hoisted_2, [
1260
+ createElementVNode("img", {
1261
+ src: unref(CDN_URL) + "map/tdt-logo.png",
1262
+ width: "53px",
1263
+ height: "22px",
1264
+ class: "logo",
1265
+ alt: ""
1266
+ }, null, 8, _hoisted_3),
1267
+ o[0] || (o[0] = createElementVNode("div", { class: "copyright-text" }, "GS(2024)0568号 - 甲测资字1100471", -1))
1268
+ ]),
1269
+ o[1] || (o[1] = createElementVNode("div", {
1270
+ id: "dataSource",
1271
+ class: "tdt-control data-source"
1272
+ }, "数据来源:自然资源部 & NavInfo", -1))
1273
+ ]));
1274
+ }
1275
+ }), Copyright = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-9c5c2f7b"]]), _sfc_main$1 = /* @__PURE__ */ defineComponent({
1276
+ __name: "fullscreen",
1277
+ props: {
1278
+ pageRef: {
1279
+ type: Object,
1280
+ default: () => ({})
1281
+ }
1282
+ },
1283
+ setup(e) {
1284
+ const t = e, o = ref(!1), n = () => {
1285
+ var a;
1286
+ o.value ? document.exitFullscreen() : (console.log(t.pageRef), (a = t.pageRef) == null || a.requestFullscreen()), o.value = !o.value;
1287
+ };
1288
+ return (a, r) => (openBlock(), createElementBlock("div", {
1289
+ class: "fullscreen-btn",
1290
+ onClick: n
1291
+ }, [
1292
+ createElementVNode("i", {
1293
+ class: normalizeClass(`map-iconfont ${o.value ? "icon-quxiaoquanping" : "icon-quanping"} `)
1294
+ }, null, 2)
1295
+ ]));
1296
+ }
1297
+ }), Fullscreen = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-ed59d7cb"]]), dotImage = new Image();
1298
+ dotImage.src = `${CDN_URL}/map/truck-dot.svg`;
1299
+ dotImage.crossOrigin = "anonymous";
1300
+ const dotActiveImage = new Image();
1301
+ dotActiveImage.src = `${CDN_URL}/map/truck-dot-active.svg`;
1302
+ dotActiveImage.crossOrigin = "anonymous";
1303
+ const cameraImage = new Image();
1304
+ cameraImage.src = `${CDN_URL}/map/map-camera.svg`;
1305
+ cameraImage.crossOrigin = "anonymous";
1306
+ const loadImage = new Image();
1307
+ loadImage.src = `${CDN_URL}/map/map-load.svg`;
1308
+ loadImage.crossOrigin = "anonymous";
1309
+ const setTruckStyle = (e, t, o, n) => new Style({
1310
+ renderer: (a, r) => {
1311
+ const l = r.context;
1312
+ l.save();
1313
+ let i = 1;
1314
+ l.scale(i, i);
1315
+ let [s, u] = a;
1316
+ s = s / i - 20, u = u / i;
1317
+ const c = s - 70, m = u - 68;
1318
+ let d = 180;
1319
+ const f = 56, g = "#FFFFFF";
1320
+ let p = 176;
1321
+ const T = 52;
1322
+ let L = "#164AFF", E = "#FFFFFF";
1323
+ o === CAR_COLOR.YELLOW ? (p = 176, L = "#FFC81E", E = "rgba(0,0,0,0.88)") : o === CAR_COLOR.Y_GREEN && (d = 200, p = 196, L = "#8FED7C", E = "rgba(0,0,0,0.88)"), n != null && n.length && (d += n.length * 56), fillRectRadius(l, c, m, d, f, g), fillRectRadius(l, c + 2, m + 2, p, T, L), o === CAR_COLOR.Y_GREEN && fillRectRadius(l, c + 2, m + 2, 68, T, "#FFC81E"), l.save(), l.restore(), l.fillStyle = E, l.font = "bold 28px Arial", l.textAlign = "left", l.textBaseline = "middle";
1324
+ const b = `${t.slice(0, 2) + " · " + t.slice(2)}`;
1325
+ if (l.fillText(b, c + 12, m + 32), l.save(), l.restore(), n != null && n.length) {
1326
+ const y = l.measureText(b).width + 12;
1327
+ let v = 0;
1328
+ n.forEach((C) => {
1329
+ C === DEVICE_TYPE.CAMERA && (l.drawImage(cameraImage, s - 54 + y + v * 56, u - 64, 50, 50), ++v), C === DEVICE_TYPE.LOAD && (l.drawImage(loadImage, s - 54 + y + v * 56, u - 64, 50, 50), ++v);
1330
+ });
1331
+ }
1332
+ const h = dotImage;
1333
+ l.drawImage(h, s + d / 2 - 90, u, 50 / i, 50 / i), l.restore();
1334
+ }
1335
+ });
1336
+ ref([]);
1337
+ let truckMarkerList = [], trucksVectorSource;
1338
+ const renderTrucksMarker = (e) => {
1339
+ if (deleteAllTruckMarkers(), !!mapInstance.value)
1340
+ return e.forEach((t) => {
1341
+ const o = convertSixHundredThousandToLatLng(t.lon, t.lat), n = new Feature({
1342
+ geometry: new Point(fromLonLat(o))
1343
+ });
1344
+ n.set("data", t), n.setStyle(
1345
+ setTruckStyle(!1, t.vno, t == null ? void 0 : t.vclColor, t == null ? void 0 : t.icons)
1346
+ ), truckMarkerList.push({
1347
+ name: t.vno,
1348
+ lonlat: o,
1349
+ feature: n
1350
+ });
1351
+ }), trucksVectorSource = new VectorSource({
1352
+ features: truckMarkerList.map((t) => t.feature)
1353
+ }), trucksLayer.value = new VectorLayer({
1354
+ source: trucksVectorSource
1355
+ }), mapInstance.value.addLayer(trucksLayer.value), trucksLayer.value;
1356
+ }, deleteAllTruckMarkers = () => {
1357
+ truckMarkerList.forEach((e) => {
1358
+ e.feature && (trucksVectorSource == null || trucksVectorSource.removeFeature(e.feature));
1359
+ }), truckMarkerList = [];
1256
1360
  }, drawCustomContent = (e, t, o, n = "top-left", a = !1) => {
1257
- var u, p;
1361
+ var c, m;
1258
1362
  if (!t || !mapInstance.value) return;
1259
- document.querySelectorAll(".truck-custom-content").forEach((c) => c.parentNode.removeChild(c));
1363
+ document.querySelectorAll(".truck-custom-content").forEach((d) => d.parentNode.removeChild(d));
1260
1364
  const r = document.createElement("div");
1261
1365
  r.innerHTML = o;
1262
1366
  const l = new Overlay({
@@ -1268,32 +1372,32 @@ const trackId = ref(""), cursor = ref(0), renderTrack = (e, t, o, n, a = "ship")
1268
1372
  // 设置不阻拦事件
1269
1373
  });
1270
1374
  if (a) {
1271
- let c = !1, f = [0, 0], v = [0, 0];
1272
- r.addEventListener("mousedown", function(y) {
1273
- var k;
1274
- c = !0, y.clientX, y.clientY, f = (k = mapInstance.value) == null ? void 0 : k.getCoordinateFromPixel([y.clientX - 200, y.clientY - 200]), v = [
1275
- y.clientX - r.getBoundingClientRect().left + 160,
1276
- y.clientY - r.getBoundingClientRect().top + 84
1277
- ], y.preventDefault();
1278
- }), document.addEventListener("mousemove", function(y) {
1279
- var k;
1280
- if (c) {
1281
- let L = (k = mapInstance.value) == null ? void 0 : k.getCoordinateFromPixel([y.clientX - v[0], y.clientY - v[1]]), E = L[0] - f[0], m = L[1] - f[1];
1282
- l.setPosition([f[0] + E, f[1] + m]);
1375
+ let d = !1, f = [0, 0], g = [0, 0];
1376
+ r.addEventListener("mousedown", function(p) {
1377
+ var T;
1378
+ d = !0, p.clientX, p.clientY, f = (T = mapInstance.value) == null ? void 0 : T.getCoordinateFromPixel([p.clientX - 200, p.clientY - 200]), g = [
1379
+ p.clientX - r.getBoundingClientRect().left + 160,
1380
+ p.clientY - r.getBoundingClientRect().top + 84
1381
+ ], p.preventDefault();
1382
+ }), document.addEventListener("mousemove", function(p) {
1383
+ var T;
1384
+ if (d) {
1385
+ let L = (T = mapInstance.value) == null ? void 0 : T.getCoordinateFromPixel([p.clientX - g[0], p.clientY - g[1]]), E = L[0] - f[0], b = L[1] - f[1];
1386
+ l.setPosition([f[0] + E, f[1] + b]);
1283
1387
  }
1284
1388
  }), document.addEventListener("mouseup", function() {
1285
- c = !1;
1389
+ d = !1;
1286
1390
  });
1287
1391
  }
1288
- (u = mapInstance.value) == null || u.addOverlay(l);
1289
- const s = r.querySelector(".close-button");
1290
- s && s.addEventListener("click", () => {
1291
- var c, f;
1292
- (c = mapInstance.value) == null || c.removeOverlay(l), (f = r.parentNode) == null || f.removeChild(r);
1392
+ (c = mapInstance.value) == null || c.addOverlay(l);
1393
+ const i = r.querySelector(".close-button");
1394
+ i && i.addEventListener("click", () => {
1395
+ var d, f;
1396
+ (d = mapInstance.value) == null || d.removeOverlay(l), (f = r.parentNode) == null || f.removeChild(r);
1293
1397
  });
1294
- let i = JSON.parse(JSON.stringify(t));
1295
- const d = (p = mapInstance.value) == null ? void 0 : p.getCoordinateFromPixel(i);
1296
- return l.setPosition(d), l;
1398
+ let s = JSON.parse(JSON.stringify(t));
1399
+ const u = (m = mapInstance.value) == null ? void 0 : m.getCoordinateFromPixel(s);
1400
+ return l.setPosition(u), l;
1297
1401
  }, vehicle = ref(null), focusShipData = ref(), currentTruckOverlay = ref(null), findTruck = async (e) => {
1298
1402
  if (!mapInstance.value) return;
1299
1403
  focusShipData.value = e;
@@ -1353,31 +1457,31 @@ const trackId = ref(""), cursor = ref(0), renderTrack = (e, t, o, n, a = "ship")
1353
1457
  // 设置文本背景的内边距
1354
1458
  })
1355
1459
  }), renderMarker = (e, t = !0, o = !0) => {
1356
- var u;
1460
+ var c;
1357
1461
  if (!mapInstance.value || !e || e.split(",").length !== 2) return;
1358
1462
  const [n, a] = e.split(",").map(Number);
1359
1463
  marker.value = new Feature({
1360
1464
  geometry: new Point(fromLonLat([n, a]))
1361
1465
  });
1362
1466
  const r = o ? `${n}, ${a}` : "";
1363
- (u = marker.value) == null || u.setStyle(createIconStyle(r));
1467
+ (c = marker.value) == null || c.setStyle(createIconStyle(r));
1364
1468
  const l = new VectorSource({
1365
1469
  features: [marker.value]
1366
- }), s = new VectorLayer({
1470
+ }), i = new VectorLayer({
1367
1471
  source: l
1368
- }), i = mapInstance.value.getView();
1369
- if (mapInstance.value.addLayer(s), t) {
1370
- const p = new Translate({
1371
- layers: [s]
1472
+ }), s = mapInstance.value.getView();
1473
+ if (mapInstance.value.addLayer(i), t) {
1474
+ const m = new Translate({
1475
+ layers: [i]
1372
1476
  });
1373
- p.on("translating", function(c) {
1374
- var y;
1375
- const f = c.features.item(0).getGeometry().getCoordinates(), v = toLonLat(f);
1376
- markerPosition.value = `${v[0].toFixed(6)}, ${v[1].toFixed(6)}`, (y = marker.value) == null || y.setStyle(createIconStyle(markerPosition.value));
1377
- }), mapInstance.value.addInteraction(p);
1477
+ m.on("translating", function(d) {
1478
+ var p;
1479
+ const f = d.features.item(0).getGeometry().getCoordinates(), g = toLonLat(f);
1480
+ markerPosition.value = `${g[0].toFixed(6)}, ${g[1].toFixed(6)}`, (p = marker.value) == null || p.setStyle(createIconStyle(markerPosition.value));
1481
+ }), mapInstance.value.addInteraction(m);
1378
1482
  }
1379
- const d = new Point([n, a]);
1380
- i.setCenter(transform(d.getCoordinates(), projection.data, projection.mercator)), i.setZoom(mapZoom.findShip);
1483
+ const u = new Point([n, a]);
1484
+ s.setCenter(transform(u.getCoordinates(), projection.data, projection.mercator)), s.setZoom(mapZoom.findShip);
1381
1485
  }, setMarkerPosition = (e) => {
1382
1486
  var a, r;
1383
1487
  if (!mapInstance.value) return;
@@ -1423,12 +1527,12 @@ function createHelpTooltip() {
1423
1527
  let squareLimitError = !1, lineLimitError = !1;
1424
1528
  const validateSquareLimit = (e) => {
1425
1529
  let o = 1 / 0, n = -1 / 0, a = 1 / 0, r = -1 / 0;
1426
- e == null || e.forEach((i) => {
1427
- const d = transform(i, projection.mercator, projection.data), u = d[0], p = d[1];
1428
- o = Math.min(o, p), n = Math.max(n, p), a = Math.min(a, u), r = Math.max(r, u);
1530
+ e == null || e.forEach((s) => {
1531
+ const u = transform(s, projection.mercator, projection.data), c = u[0], m = u[1];
1532
+ o = Math.min(o, m), n = Math.max(n, m), a = Math.min(a, c), r = Math.max(r, c);
1429
1533
  });
1430
- const l = (n - o) * 111, s = (r - a) * 111;
1431
- squareLimitError = l > 150 || s > 150;
1534
+ const l = (n - o) * 111, i = (r - a) * 111;
1535
+ squareLimitError = l > 150 || i > 150;
1432
1536
  };
1433
1537
  let storeFeature;
1434
1538
  function addInteraction(e) {
@@ -1454,17 +1558,17 @@ function addInteraction(e) {
1454
1558
  draw.on("drawstart", function(a) {
1455
1559
  var r;
1456
1560
  layerState = "drawn", sketch = a.feature, t = (r = sketch.getGeometry()) == null ? void 0 : r.on("change", function(l) {
1457
- const s = l.target;
1458
- let i = formatArea(s, LENGTH_UNIT.NM);
1459
- const u = s.getCoordinates()[0], p = new LineString([u[u.length - 2], u[u.length - 1]]);
1460
- let c = formatLength(p, LENGTH_UNIT.NM);
1461
- if (lineLimitError = Number(getLength(p) / 1e3) > 150, validateSquareLimit(u), measureTooltipElement && i && (measureTooltipElement.innerHTML = `
1462
- <span class="text">面积:${i}${lineLimitError || squareLimitError ? '<span class="error pl-12">超出可以绘画的距离</span>' : ""}</span>
1463
- `), helpTooltipElement && i) {
1561
+ const i = l.target;
1562
+ let s = formatArea(i, LENGTH_UNIT.NM);
1563
+ const c = i.getCoordinates()[0], m = new LineString([c[c.length - 2], c[c.length - 1]]);
1564
+ let d = formatLength(m, LENGTH_UNIT.NM);
1565
+ if (lineLimitError = Number(getLength(m) / 1e3) > 150, validateSquareLimit(c), measureTooltipElement && s && (measureTooltipElement.innerHTML = `
1566
+ <span class="text">面积:${s}${lineLimitError || squareLimitError ? '<span class="error pl-12">超出可以绘画的距离</span>' : ""}</span>
1567
+ `), helpTooltipElement && s) {
1464
1568
  let f = "";
1465
- parseFloat(i) > 0 && (f = `
1466
- <div class="text ${squareLimitError ? "error" : ""}">面积:${i}${squareLimitError ? '<span class="error pl-12">超出可以绘画的距离</span>' : ""}</div>`), helpTooltipElement.innerHTML = `${f}
1467
- <span class="text ${lineLimitError ? "error" : ""}">线段${u.length - 2}:${c}${lineLimitError ? '<span class="error pl-4">超出可以绘画的距离</span>' : ""}</span>
1569
+ parseFloat(s) > 0 && (f = `
1570
+ <div class="text ${squareLimitError ? "error" : ""}">面积:${s}${squareLimitError ? '<span class="error pl-12">超出可以绘画的距离</span>' : ""}</div>`), helpTooltipElement.innerHTML = `${f}
1571
+ <span class="text ${lineLimitError ? "error" : ""}">线段${c.length - 2}:${d}${lineLimitError ? '<span class="error pl-4">超出可以绘画的距离</span>' : ""}</span>
1468
1572
  <div><span class="text">单击继续,双击结束</span></div>
1469
1573
  `;
1470
1574
  }
@@ -1489,11 +1593,11 @@ const endFn = (e) => {
1489
1593
  var t, o, n;
1490
1594
  if (e.getGeometry()) {
1491
1595
  const a = [], l = e.getGeometry().getCoordinates();
1492
- (t = l[0]) == null || t.forEach((i) => {
1493
- a.push(transform(i, projection.mercator, projection.data));
1596
+ (t = l[0]) == null || t.forEach((s) => {
1597
+ a.push(transform(s, projection.mercator, projection.data));
1494
1598
  });
1495
- const s = l[0][l[0].length - 2];
1496
- if (s && measureTooltip.setPosition(s), measureTooltip.setOffset([10, 0]), measureTooltipElement && (measureTooltipElement.innerHTML += '<span class="delete-icon"><i class="iconfont icon-delete" /></div>'), (o = document.querySelector(".delete-icon")) == null || o.addEventListener("click", () => {
1599
+ const i = l[0][l[0].length - 2];
1600
+ if (i && measureTooltip.setPosition(i), measureTooltip.setOffset([10, 0]), measureTooltipElement && (measureTooltipElement.innerHTML += '<span class="delete-icon"><i class="iconfont icon-delete" /></div>'), (o = document.querySelector(".delete-icon")) == null || o.addEventListener("click", () => {
1497
1601
  reset();
1498
1602
  }), !lineLimitError && !squareLimitError)
1499
1603
  return a;
@@ -1522,14 +1626,15 @@ const endFn = (e) => {
1522
1626
  }, init = () => {
1523
1627
  mapInstance.value && (drawVector = new VectorLayer({
1524
1628
  source,
1525
- style: [
1526
- {
1527
- "stroke-color": "rgba(255, 255, 255, 1)",
1528
- "stroke-width": 2,
1529
- "fill-color": "rgba(255, 255, 255, 0.3)"
1530
- },
1531
- new Style(circleStyle)
1532
- ]
1629
+ style: new Style({
1630
+ stroke: new Stroke({
1631
+ color: "rgba(255, 255, 255, 1)",
1632
+ width: 2
1633
+ }),
1634
+ fill: new Fill({
1635
+ color: "rgba(255, 255, 255, 0.3)"
1636
+ })
1637
+ })
1533
1638
  }), mapInstance.value.on("pointermove", pointerMoveHandler), mapInstance.value.getViewport().addEventListener("mouseout", function() {
1534
1639
  var e;
1535
1640
  (e = helpTooltipElement == null ? void 0 : helpTooltipElement.classList) == null || e.add("hidden");
@@ -1548,27 +1653,28 @@ const endFn = (e) => {
1548
1653
  props: {
1549
1654
  zoom: {},
1550
1655
  center: {},
1551
- vehicleMode: {}
1656
+ vehicleMode: {},
1657
+ viewMode: {}
1552
1658
  },
1553
1659
  emits: ["zoomChanged", "extentChanged"],
1554
1660
  setup(e, { expose: t, emit: o }) {
1555
- const n = ref(null), a = ref(null), r = ref(null), l = o, s = e, i = ref(s.zoom || mapZoom.default), d = ref(!1), u = ref(!0), p = ref(!0);
1556
- let c;
1557
- ((m) => {
1558
- m[m.tiandituTile = new TileLayer({ source: new XYZ({ url: baseMap.tiandituTile }) })] = "tiandituTile", m[m.tiandituTileMark = new TileLayer({ source: new XYZ({ url: baseMap.tiandituTileMark }) })] = "tiandituTileMark", m[m.tiandituImgTile = new TileLayer({ source: new XYZ({ url: baseMap.tiandituImgTile }), visible: !1 })] = "tiandituImgTile", m[m.tiandituImgTileMark = new TileLayer({ source: new XYZ({ url: baseMap.tiandituImgTileMark }), visible: !1 })] = "tiandituImgTileMark", m[m.greenMark = new TileLayer({ source: new XYZ({ url: baseMap.greenTile }) })] = "greenMark";
1559
- })(c || (c = {}));
1560
- const f = () => {
1561
- var g, h;
1562
- const m = {
1661
+ const n = ref(null), a = ref(null), r = ref(null), l = o, i = e, s = ref(i.zoom || mapZoom.default), u = ref(!1), c = ref(!0), m = ref(!0), d = ref(!1);
1662
+ let f;
1663
+ ((h) => {
1664
+ h[h.tiandituTile = new TileLayer({ source: new XYZ({ url: baseMap.tiandituTile }) })] = "tiandituTile", h[h.tiandituTileMark = new TileLayer({ source: new XYZ({ url: baseMap.tiandituTileMark }) })] = "tiandituTileMark", h[h.tiandituImgTile = new TileLayer({ source: new XYZ({ url: baseMap.tiandituImgTile }), visible: !1 })] = "tiandituImgTile", h[h.tiandituImgTileMark = new TileLayer({ source: new XYZ({ url: baseMap.tiandituImgTileMark }), visible: !1 })] = "tiandituImgTileMark", h[h.greenMark = new TileLayer({ source: new XYZ({ url: baseMap.greenTile }) })] = "greenMark";
1665
+ })(f || (f = {}));
1666
+ const g = () => {
1667
+ var y, v;
1668
+ const h = {
1563
1669
  projection: projection.mercator,
1564
1670
  // 地图投影坐标系
1565
- zoom: s.zoom || (s.vehicleMode === "ship" ? mapZoom.default : mapZoom.truckDefault),
1671
+ zoom: i.zoom || (i.vehicleMode === "ship" ? mapZoom.default : mapZoom.truckDefault),
1566
1672
  // 地图缩放级别(打开页面时默认级别)
1567
1673
  minZoom: mapZoom.min,
1568
1674
  // 地图缩放最小级别
1569
1675
  maxZoom: mapZoom.max,
1570
1676
  // 地图缩放最大级别
1571
- center: lonLatToMercator(s.center || mapDefaultCenter),
1677
+ center: lonLatToMercator(i.center || mapDefaultCenter),
1572
1678
  // 深圳坐标
1573
1679
  constrainResolution: !0,
1574
1680
  multiWorld: !0
@@ -1578,104 +1684,113 @@ const endFn = (e) => {
1578
1684
  // 对应页面里 id 为 map 的元素
1579
1685
  layers: [
1580
1686
  // 图层
1581
- c.tiandituTile,
1582
- c.tiandituTileMark,
1583
- c.tiandituImgTile,
1584
- c.tiandituImgTileMark,
1585
- c.greenMark
1687
+ f.tiandituTile,
1688
+ f.tiandituTileMark,
1689
+ f.tiandituImgTile,
1690
+ f.tiandituImgTileMark,
1691
+ f.greenMark
1586
1692
  ],
1587
- view: new View(m)
1588
- }), (g = a.value) == null || g.setScaleLine(), (h = mapInstance.value) == null || h.on("moveend", k), v(s.vehicleMode === "ship"), y(s.vehicleMode === "ship" ? BaseMapType.satellite : BaseMapType.vector);
1693
+ view: new View(h)
1694
+ }), (y = a.value) == null || y.setScaleLine(), (v = mapInstance.value) == null || v.on("moveend", L), p(i.vehicleMode === "ship"), T(i.vehicleMode === "ship" ? BaseMapType.satellite : BaseMapType.vector);
1589
1695
  };
1590
1696
  onMounted(() => {
1591
- f();
1697
+ g();
1592
1698
  });
1593
- const v = (m) => {
1594
- var g;
1595
- (g = mapInstance.value) == null || g.getLayers().forEach((h) => {
1596
- h.ol_uid === c.greenMark.ol_uid && (h.setVisible(m), u.value = m);
1699
+ const p = (h) => {
1700
+ var y;
1701
+ (y = mapInstance.value) == null || y.getLayers().forEach((v) => {
1702
+ v.ol_uid === f.greenMark.ol_uid && (v.setVisible(h), c.value = h);
1597
1703
  });
1598
- }, y = (m) => {
1599
- var g;
1600
- console.log("mode", m), (g = mapInstance.value) == null || g.getLayers().forEach((h) => {
1601
- (h.ol_uid === c.tiandituTile.ol_uid || h.ol_uid === c.tiandituTileMark.ol_uid || h.ol_uid === c.tiandituImgTile.ol_uid || h.ol_uid === c.tiandituImgTileMark.ol_uid) && h.setVisible(!1), (m === BaseMapType.vector && h.ol_uid === c.tiandituTile.ol_uid || h.ol_uid === c.tiandituTileMark.ol_uid || m === BaseMapType.satellite && h.ol_uid === c.tiandituImgTile.ol_uid || h.ol_uid === c.tiandituImgTileMark.ol_uid) && (console.log(m, h.ol_uid), h.setVisible(!0));
1704
+ }, T = (h) => {
1705
+ var y;
1706
+ console.log("mode", h), (y = mapInstance.value) == null || y.getLayers().forEach((v) => {
1707
+ (v.ol_uid === f.tiandituTile.ol_uid || v.ol_uid === f.tiandituTileMark.ol_uid || v.ol_uid === f.tiandituImgTile.ol_uid || v.ol_uid === f.tiandituImgTileMark.ol_uid) && v.setVisible(!1), (h === BaseMapType.vector && v.ol_uid === f.tiandituTile.ol_uid || v.ol_uid === f.tiandituTileMark.ol_uid || h === BaseMapType.satellite && v.ol_uid === f.tiandituImgTile.ol_uid || v.ol_uid === f.tiandituImgTileMark.ol_uid) && (console.log(h, v.ol_uid), v.setVisible(!0));
1602
1708
  });
1603
- }, k = () => {
1604
- const m = mapInstance.value.getView(), g = m.getZoom();
1605
- g && L(g);
1606
- const h = m.calculateExtent(mapInstance.value.getSize());
1607
- h && g && E(h, g);
1608
- }, L = (m) => {
1609
- var I, C, V, S;
1610
- i.value = m;
1611
- const g = (I = mapInstance.value) == null ? void 0 : I.getLayers(), h = s.vehicleMode === "ship" ? g == null ? void 0 : g.getArray().find((w) => w.ol_uid === c.greenMark.ol_uid) : void 0;
1612
- !d.value && u.value && m < mapZoom.shipGreenDotMax ? (p.value = !0, h == null || h.setVisible(!0), (C = shipsLayer.value) == null || C.setVisible(!1), (V = largeAmountShipsLayer.value) == null || V.setVisible(!1)) : (p.value = !1, h == null || h.setVisible(!1), (S = largeAmountShipsLayer.value) == null || S.setVisible(!0)), l("zoomChanged", m);
1613
- }, E = (m, g) => {
1614
- const h = transform([m[0], m[1]], projection.mercator, projection.data), I = transform([m[2], m[3]], projection.mercator, projection.data);
1615
- l("extentChanged", { extent: [h, I], zoom: g });
1709
+ }, L = () => {
1710
+ const h = mapInstance.value.getView(), y = h.getZoom();
1711
+ y && E(y);
1712
+ const v = h.calculateExtent(mapInstance.value.getSize());
1713
+ v && y && b(v, y);
1714
+ }, E = (h) => {
1715
+ var C, V, w, S;
1716
+ s.value = h;
1717
+ const y = (C = mapInstance.value) == null ? void 0 : C.getLayers(), v = i.vehicleMode === "ship" ? y == null ? void 0 : y.getArray().find((M) => M.ol_uid === f.greenMark.ol_uid) : void 0;
1718
+ !u.value && c.value && h < mapZoom.shipGreenDotMax ? (m.value = !0, v == null || v.setVisible(!0), (V = shipsLayer.value) == null || V.setVisible(!1), (w = largeAmountShipsLayer.value) == null || w.setVisible(!1)) : (m.value = !1, v == null || v.setVisible(!1), (S = largeAmountShipsLayer.value) == null || S.setVisible(!0)), l("zoomChanged", h);
1719
+ }, b = (h, y) => {
1720
+ const v = transform([h[0], h[1]], projection.mercator, projection.data), C = transform([h[2], h[3]], projection.mercator, projection.data);
1721
+ l("extentChanged", { extent: [v, C], zoom: y });
1616
1722
  };
1617
1723
  return t({
1618
1724
  mapInstance,
1619
- initMap: f,
1725
+ initMap: g,
1620
1726
  renderTrucksMarker,
1621
1727
  renderShip: renderShips,
1622
- renderTrack,
1728
+ renderTrack: (h, y, v) => {
1729
+ d.value = !0, u.value = !0, renderTrack(h, y, v, LENGTH_UNIT.NM);
1730
+ },
1623
1731
  findTruck,
1624
1732
  removeTruckIcon,
1625
1733
  clearAllTruck,
1626
1734
  closeTrack: () => {
1627
- var m;
1628
- (m = shipTrackVectorLayer.value) == null || m.setVisible(!1);
1735
+ var h;
1736
+ d.value = !1, (h = shipTrackVectorLayer.value) == null || h.setVisible(!1);
1629
1737
  },
1630
1738
  closeTruckTrack: () => {
1631
- var m;
1632
- (m = shipTrackVectorLayer.value) == null || m.setVisible(!1);
1739
+ var h;
1740
+ d.value = !1, (h = shipTrackVectorLayer.value) == null || h.setVisible(!1);
1633
1741
  },
1742
+ resetTrackView,
1743
+ playTrack,
1634
1744
  clearSelectFeature,
1635
1745
  findShip,
1636
- focusShip: (m, g) => {
1637
- var h, I;
1638
- (h = shipsLayer.value) == null || h.setVisible(!1), (I = largeAmountShipsLayer.value) == null || I.setVisible(!1), findShip(m, g);
1746
+ focusShip: (h, y) => {
1747
+ var v, C;
1748
+ (v = shipsLayer.value) == null || v.setVisible(!1), (C = largeAmountShipsLayer.value) == null || C.setVisible(!1), findShip(h, y);
1639
1749
  },
1640
1750
  showTracks,
1641
1751
  removeAllTrackLayer,
1642
1752
  switchFilterItem,
1643
1753
  rerenderShip,
1644
- switchGreenDot: () => v(!1),
1754
+ switchGreenDot: () => p(!1),
1645
1755
  zoomTruckIcon,
1646
- renderTruckTrack: (m, g, h) => {
1647
- renderTrack(m, g, h, LENGTH_UNIT.KM, "truck");
1756
+ renderTruckTrack: (h, y, v) => {
1757
+ d.value = !0, renderTrack(h, y, v, LENGTH_UNIT.KM, "truck");
1648
1758
  },
1649
1759
  renderMarker,
1650
1760
  setMarkerPosition,
1651
1761
  drawPolygonTool
1652
- }), (m, g) => (openBlock(), createElementBlock("div", {
1762
+ }), (h, y) => (openBlock(), createElementBlock("div", {
1653
1763
  class: "map-page map-container",
1654
1764
  ref_key: "pageRef",
1655
1765
  ref: n
1656
1766
  }, [
1657
- g[0] || (g[0] = createElementVNode("div", {
1767
+ y[0] || (y[0] = createElementVNode("div", {
1658
1768
  id: "map",
1659
1769
  class: "map"
1660
1770
  }, null, -1)),
1661
1771
  createVNode(ToolPanel, {
1662
- "vehicle-mode": m.vehicleMode,
1663
- onSwitchGreenDot: v,
1664
- onSwitchMapTile: y
1665
- }, null, 8, ["vehicle-mode"]),
1666
- createVNode(ScaleLine, {
1667
- ref_key: "scaleLineControl",
1668
- ref: a
1669
- }, null, 512),
1670
- createVNode(ZoomControl, {
1671
- ref_key: "zoomControl",
1672
- ref: r
1673
- }, null, 512),
1674
- createVNode(Copyright),
1675
- createVNode(Fullscreen, { page: n.value }, null, 8, ["page"])
1772
+ "vehicle-mode": h.vehicleMode,
1773
+ "view-mode": h.viewMode,
1774
+ "disable-green-dot": u.value,
1775
+ "show-track-layer": d.value,
1776
+ onSwitchGreenDot: p,
1777
+ onSwitchMapTile: T
1778
+ }, null, 8, ["vehicle-mode", "view-mode", "disable-green-dot", "show-track-layer"]),
1779
+ h.viewMode !== "WxMiniprogram" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
1780
+ createVNode(ScaleLine, {
1781
+ ref_key: "scaleLineControl",
1782
+ ref: a
1783
+ }, null, 512),
1784
+ createVNode(ZoomControl, {
1785
+ ref_key: "zoomControl",
1786
+ ref: r
1787
+ }, null, 512),
1788
+ createVNode(Fullscreen, { page: n.value }, null, 8, ["page"])
1789
+ ], 64)) : createCommentVNode("", !0),
1790
+ createVNode(Copyright)
1676
1791
  ], 512));
1677
1792
  }
1678
- }), Map = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-08679314"]]), ZhMap = withInstall(Map);
1793
+ }), Map = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-51c9ddf4"]]), ZhMap = withInstall(Map);
1679
1794
  export {
1680
1795
  ZhMap as Z
1681
1796
  };