zhihao-ui 1.2.30 → 1.2.31

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.
@@ -7,7 +7,7 @@ import { _ as _export_sfc } from "./Button-D-R-2Fix.js";
7
7
  import { g as getForegroundColor, w as withInstall } from "./utils-BbWQLYZL.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 || {}), SWITCH_BTN = /* @__PURE__ */ ((e) => (e.Camera = "camera", e.Mobile = "mobile", e.WaterGauge = "waterGauge", e))(SWITCH_BTN || {}), SHIP_SAIL_STATUS = /* @__PURE__ */ ((e) => (e[e.发动机使用中 = 0] = "发动机使用中", e[e.锚泊 = 1] = "锚泊", e[e.未操作 = 2] = "未操作", e[e.操纵能力受限 = 3] = "操纵能力受限", e[e.吃水受限 = 4] = "吃水受限", e[e.系泊 = 5] = "系泊", e[e.搁浅 = 6] = "搁浅", e[e.从事捕捞 = 7] = "从事捕捞", e[e.航行中 = 8] = "航行中", e[e.留作将来修正导航状态 = 9] = "留作将来修正导航状态", e[e.高速船留用 = 10] = "高速船留用", e[e.机动船尾推作业 = 11] = "机动船尾推作业", e[e.机动船顶推或侧推作业 = 12] = "机动船顶推或侧推作业", e[e.飞翼船留用 = 13] = "飞翼船留用", e[e.现行的 = 14] = "现行的", e[e.未定义 = 15] = "未定义", e))(SHIP_SAIL_STATUS || {});
9
9
  class ShipMapData {
10
- constructor(t, n, o, r, l, i, s, c, d, m, u, f, p, y, h, g, T, M, b, E, x, v, w, k) {
10
+ constructor(t, n, o, r, l, i, s, c, d, m, u, f, p, y, h, g, T, M, b, E, x, v, k, w) {
11
11
  I(this, "id");
12
12
  // mmsi
13
13
  I(this, "mmsi");
@@ -49,7 +49,7 @@ class ShipMapData {
49
49
  I(this, "existWaterGauge");
50
50
  I(this, "selected");
51
51
  I(this, "blinkColors");
52
- this.id = t, this.mmsi = n, this.fill = o, this.shipType = r, this.name = l, this.length = i, this.breadth = s, this.lon = c, this.lat = d, this.createdAt = m, this.speed = u, this.from = f, this.sailStatus = p, this.hdg = y, this.cog = h, this.posType = g, this.type = T, this.angle = M, this.leftIconColor = b, this.existDevice = E, this.existMobile = x, this.existWaterGauge = v, this.selected = w, this.blinkColors = k;
52
+ this.id = t, this.mmsi = n, this.fill = o, this.shipType = r, this.name = l, this.length = i, this.breadth = s, this.lon = c, this.lat = d, this.createdAt = m, this.speed = u, this.from = f, this.sailStatus = p, this.hdg = y, this.cog = h, this.posType = g, this.type = T, this.angle = M, this.leftIconColor = b, this.existDevice = E, this.existMobile = x, this.existWaterGauge = v, this.selected = k, this.blinkColors = w;
53
53
  }
54
54
  }
55
55
  const formatLength = function(e, t) {
@@ -90,7 +90,7 @@ const formatLength = function(e, t) {
90
90
  // 船舶三角形填充色
91
91
  n.fill || "#04C900",
92
92
  "70",
93
- (n.cnname || n.enname || n.name) + `${n.existName ? n.existName : ""}`,
93
+ (n.cnname || n.enname || n.name || n.id) + `${n.existName ? n.existName : ""}`,
94
94
  n.len || n.length,
95
95
  n.wid || n.breadth,
96
96
  n.lon,
@@ -192,19 +192,25 @@ const formatLength = function(e, t) {
192
192
  style: function() {
193
193
  return b;
194
194
  }
195
- }), (V = o.value) == null || V.addInteraction(M), w(), v();
195
+ }), (V = o.value) == null || V.addInteraction(M), k(), v();
196
196
  let L;
197
197
  M.on("drawstart", function(F) {
198
- var $;
198
+ var N;
199
199
  m = F.feature;
200
- let N;
201
- L = ($ = m.getGeometry()) == null ? void 0 : $.on("change", function(R) {
202
- const P = R.target;
203
- let B = formatUtils.formatLength(P, Number(i.value));
204
- N = P.getLastCoordinate(), p && B && (p.innerHTML = B), y.setPosition(N);
200
+ let $;
201
+ L = (N = m.getGeometry()) == null ? void 0 : N.on("change", function(B) {
202
+ const P = B.target;
203
+ let R = formatUtils.formatLength(P, Number(i.value));
204
+ $ = P.getLastCoordinate(), p && R && (p.innerHTML = R), y.setPosition($);
205
205
  });
206
206
  }), M.on("drawend", function() {
207
- p && (p.className = "ol-tooltip ol-tooltip-static ol-tooltip-measure"), p != null && p.innerHTML && s.value.push(p == null ? void 0 : p.innerHTML), y.setOffset([0, -7]), m = null, p = null, w(), L && unByKey(L);
207
+ var F, $;
208
+ p && (p.className = "ol-tooltip ol-tooltip-static ol-tooltip-measure"), p != null && p.innerHTML && (s.value.push(p == null ? void 0 : p.innerHTML), p.innerHTML = `${p.innerHTML}<div class="ol-tooltip-delete-button" data-index="${((F = s.value) == null ? void 0 : F.length) - 1}"><i class="map-iconfont icon-delete"></i></div>`), ($ = document.querySelector(".ol-tooltip-delete-button:last-child")) == null || $.addEventListener("click", (N) => {
209
+ var P;
210
+ N.preventDefault(), N.stopPropagation();
211
+ const B = (P = N.target) == null ? void 0 : P.getAttribute("data-index");
212
+ B && w(B);
213
+ }), y.setOffset([0, -7]), m = null, p = null, k(), L && unByKey(L);
208
214
  });
209
215
  }
210
216
  function v() {
@@ -215,7 +221,7 @@ const formatLength = function(e, t) {
215
221
  positioning: "center-left"
216
222
  }), (L = o.value) == null || L.addOverlay(f);
217
223
  }
218
- function w() {
224
+ function k() {
219
225
  var L;
220
226
  p != null && p.parentNode && p.parentNode.removeChild(p), p = document.createElement("div"), p.className = "ol-tooltip ol-tooltip-measure", y = new Overlay({
221
227
  element: p,
@@ -225,11 +231,11 @@ const formatLength = function(e, t) {
225
231
  insertFirst: !1
226
232
  }), (L = o.value) == null || L.addOverlay(y);
227
233
  }
228
- const k = (L) => {
229
- var F, N;
234
+ const w = (L) => {
235
+ var F, $;
230
236
  s.value[L] && s.value.splice(L, 1);
231
237
  const S = document.querySelectorAll(".ol-tooltip.ol-tooltip-static.ol-tooltip-measure");
232
- S[L] && ((N = (F = S[L]) == null ? void 0 : F.parentNode) == null || N.removeChild(S[L]));
238
+ S[L] && (($ = (F = S[L]) == null ? void 0 : F.parentNode) == null || $.removeChild(S[L]));
233
239
  const V = d.getFeatures();
234
240
  V[L] && d.removeFeature(V[L]);
235
241
  }, C = () => {
@@ -284,7 +290,7 @@ const formatLength = function(e, t) {
284
290
  ]),
285
291
  createElementVNode("div", {
286
292
  class: "delete-button",
287
- onClick: (N) => k(F)
293
+ onClick: ($) => w(F)
288
294
  }, S[4] || (S[4] = [
289
295
  createElementVNode("i", { class: "map-iconfont icon-delete" }, null, -1)
290
296
  ]), 8, _hoisted_7)
@@ -292,12 +298,14 @@ const formatLength = function(e, t) {
292
298
  ])
293
299
  ])) : createCommentVNode("", !0);
294
300
  }
295
- }), Measure = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-d566fd81"]]), CDN_URL = "https://static.zhihaoscm.cn/", tiandituKey = "a6e8f78974f2581f2ca00485b40c948f", baseMap = {
301
+ }), Measure = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-955a605e"]]), CDN_URL = "https://static.zhihaoscm.cn/", tiandituKey = "a6e8f78974f2581f2ca00485b40c948f", zhongkeKey = "15c81cc0a191a232e0a0ca1a51c3ca81", baseMap = {
296
302
  // 矢量底图
303
+ // zhongkeTile: `https://api.open.geovisearth.com/map/v1/vec/{z}/{x}/{y}?token=${zhongkeKey}&format=png&tmsIds=w`,
297
304
  tiandituTile: `https://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}`,
298
305
  // 矢量注记
299
306
  tiandituTileMark: `https://t0.tianditu.gov.cn/cva_w/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=cva&TILEMATRIXSET=w&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}&tk=${tiandituKey}`,
300
307
  // 影像底图
308
+ // zhongkeImgTile: `https://api.open.geovisearth.com/map/v1/img/{z}/{x}/{y}?token=${zhongkeKey}&format=webp&tmsIds=w`,
301
309
  tiandituImgTile: `https://t0.tianditu.gov.cn/img_w/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=img&TILEMATRIXSET=w&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}&tk=${tiandituKey}`,
302
310
  // 影像注记
303
311
  tiandituImgTileMark: `https://t0.tianditu.gov.cn/cia_w/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=cia&TILEMATRIXSET=w&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}&tk=${tiandituKey}`,
@@ -374,8 +382,8 @@ const multiplyPixelRatio = (e) => {
374
382
  }
375
383
  function i(u, f, p = {}) {
376
384
  if (p.final)
377
- return function(v, w) {
378
- return (i(w, v) + 180) % 360;
385
+ return function(v, k) {
386
+ return (i(k, v) + 180) % 360;
379
387
  }(u, f);
380
388
  const y = l(u), h = l(f), g = r(y[0]), T = r(h[0]), M = r(y[1]), b = r(h[1]), E = Math.sin(T - g) * Math.cos(b), x = Math.cos(M) * Math.sin(b) - Math.sin(M) * Math.cos(b) * Math.cos(T - g);
381
389
  return o(Math.atan2(E, x));
@@ -591,7 +599,7 @@ const drawLabel = (e, t, n) => {
591
599
  if (y) {
592
600
  const { x: h, bounds: g, l: T } = y;
593
601
  let M = [getTopLeftPoint(g), getBottomLeftPoint(g), getBottomRightPoint(g), getTopRighttPoint(g)];
594
- n.find((k) => k.name === r) || n.push(y), drawPolygon(e, {
602
+ n.find((w) => w.name === r) || n.push(y), drawPolygon(e, {
595
603
  points: [o, h],
596
604
  strokeColor: l,
597
605
  fillColor: "#000",
@@ -609,7 +617,7 @@ const drawLabel = (e, t, n) => {
609
617
  strokeColor: l,
610
618
  fillColor: s,
611
619
  shouldClosePath: !0
612
- }, [x, v] = T, w = {
620
+ }, [x, v] = T, k = {
613
621
  center: [x, v + labelOutSize + labelHeight + 1],
614
622
  text: r,
615
623
  textColor: i,
@@ -617,14 +625,14 @@ const drawLabel = (e, t, n) => {
617
625
  rightIcons: d,
618
626
  blinkColors: t.blinkColors
619
627
  };
620
- if (drawPolygon(e, E), drawText(e, w), ((f = t == null ? void 0 : t.blinkColors) == null ? void 0 : f.length) > 0) {
621
- let k = Date.now(), C = 0;
628
+ if (drawPolygon(e, E), drawText(e, k), ((f = t == null ? void 0 : t.blinkColors) == null ? void 0 : f.length) > 0) {
629
+ let w = Date.now(), C = 0;
622
630
  const L = [];
623
631
  t.blinkColors.forEach((S) => {
624
632
  L.push(S), L.push("white");
625
633
  }), intervalId[t.text] && clearInterval(intervalId[t.text]), intervalId[t.text] = setInterval(() => {
626
634
  const S = Date.now();
627
- S - k >= 500 && (C = (C + 1) % L.length, k = S, E.fillColor = L[C], drawPolygon(e, E), w.textColor = getForegroundColor(E.fillColor), drawText(e, w));
635
+ S - w >= 500 && (C = (C + 1) % L.length, w = S, E.fillColor = L[C], drawPolygon(e, E), k.textColor = getForegroundColor(E.fillColor), drawText(e, k));
628
636
  }, 10);
629
637
  }
630
638
  }
@@ -993,11 +1001,17 @@ const moveFeature = (e, t) => {
993
1001
  })
994
1002
  }), mapInstance$7 = ref(), renderShipStyleSetInstance = (e) => mapInstance$7.value = e, speedCondition = [[1, 10], [10, 20], [20, 1 / 0]], drawShipModelByZoom = { 14: [200, 30], 15: [115, 15], 16: [55, 8], 17: [25, 5], 18: [1, 1] }, setShipStyle = (e) => new Style({
995
1003
  renderer: (t, n) => {
996
- const o = n.context, r = n.feature.get("data");
997
- n.feature.get("index") === 0 && (shipLabels.value = []);
1004
+ const o = n.context, r = n.feature.get("data"), l = r.length / 2;
1005
+ o.beginPath(), o.arc(
1006
+ t[0],
1007
+ t[1],
1008
+ l,
1009
+ 0,
1010
+ 2 * Math.PI
1011
+ ), o.fillStyle = "rgba(0, 0, 0, 0.01)", o.fill(), n.feature.get("index") === 0 && (shipLabels.value = []);
998
1012
  try {
999
- const i = drawShipBody(o, r, t);
1000
- i && (drawHeading(o, r, i), e && (drawSelectBounds(o, i), r.selected = !0)), drawShipLabel(o, r, t);
1013
+ const s = drawShipBody(o, r, t);
1014
+ s && (drawHeading(o, r, s), e && (drawSelectBounds(o, s), r.selected = !0)), drawShipLabel(o, r, t);
1001
1015
  } catch {
1002
1016
  return !1;
1003
1017
  }
@@ -1620,8 +1634,8 @@ const setTruckStyle = (e, t, n, o) => new Style({
1620
1634
  if (i.fillText(b, m + 12, u + 32), i.save(), i.restore(), o != null && o.length) {
1621
1635
  const x = i.measureText(b).width + 12;
1622
1636
  let v = 0;
1623
- o.forEach((w) => {
1624
- w === DEVICE_TYPE.CAMERA && (i.drawImage(cameraImage, c - 54 + x + v * 56, d - 64, 50, 50), ++v), w === DEVICE_TYPE.LOAD && (i.drawImage(loadImage, c - 54 + x + v * 56, d - 64, 50, 50), ++v);
1637
+ o.forEach((k) => {
1638
+ k === DEVICE_TYPE.CAMERA && (i.drawImage(cameraImage, c - 54 + x + v * 56, d - 64, 50, 50), ++v), k === DEVICE_TYPE.LOAD && (i.drawImage(loadImage, c - 54 + x + v * 56, d - 64, 50, 50), ++v);
1625
1639
  });
1626
1640
  }
1627
1641
  const E = dotImage$1;
@@ -1928,7 +1942,7 @@ const addInteraction = (e) => {
1928
1942
  v[v.tiandituTile = new TileLayer({ source: new XYZ({ url: baseMap.tiandituTile }) })] = "tiandituTile", v[v.tiandituTileMark = new TileLayer({ source: new XYZ({ url: baseMap.tiandituTileMark }) })] = "tiandituTileMark", v[v.tiandituImgTile = new TileLayer({ source: new XYZ({ url: baseMap.tiandituImgTile }), visible: !1 })] = "tiandituImgTile", v[v.tiandituImgTileMark = new TileLayer({ source: new XYZ({ url: baseMap.tiandituImgTileMark }), visible: !1 })] = "tiandituImgTileMark", v[v.greenMark = new TileLayer({ source: new XYZ({ url: baseMap.greenTile }) })] = "greenMark";
1929
1943
  })(p || (p = {}));
1930
1944
  const y = () => {
1931
- var w, k;
1945
+ var k, w;
1932
1946
  const v = {
1933
1947
  projection: projection.mercator,
1934
1948
  // 地图投影坐标系
@@ -1958,7 +1972,7 @@ const addInteraction = (e) => {
1958
1972
  p.greenMark
1959
1973
  ],
1960
1974
  view: new View(v)
1961
- }), h(), (w = l.value) == null || w.setScaleLine(c.vehicleMode === "ship" && "nautical"), (k = o.value) == null || k.on("moveend", b), g(v.zoom < mapZoom.shipGreenDotMax), M(c.vehicleMode === "ship" || c.viewMode === "findShip" ? BaseMapType.satellite : BaseMapType.vector), c.viewMode === "findShip" && c.mmsi && c.shipData && nextTick(() => {
1975
+ }), h(), (k = l.value) == null || k.setScaleLine(c.vehicleMode === "ship" && "nautical"), (w = o.value) == null || w.on("moveend", b), g(v.zoom < mapZoom.shipGreenDotMax), M(c.vehicleMode === "ship" || c.viewMode === "findShip" ? BaseMapType.satellite : BaseMapType.vector), c.viewMode === "findShip" && c.mmsi && c.shipData && nextTick(() => {
1962
1976
  findShip(String(c.mmsi), c.shipData);
1963
1977
  });
1964
1978
  };
@@ -1968,56 +1982,56 @@ const addInteraction = (e) => {
1968
1982
  const h = () => {
1969
1983
  o.value && (renderCustomOverlaySetInstance(o.value), renderTruckSetInstance(o.value), drawPolygonSetInstance(o.value), renderShipStyleSetInstance(o.value), renderTrackStyleSetInstance(o.value), renderDashboardSetInstance(o.value), renderMarkerSetInstance(o.value), renderShipSetInstance(o.value), renderTrackSetInstance(o.value));
1970
1984
  }, g = (v) => {
1971
- var w;
1972
- c.vehicleMode !== "ship" && (v = !1), (w = o.value) == null || w.getLayers().forEach((k) => {
1973
- k.ol_uid === p.greenMark.ol_uid && (k.setVisible(v), u.value = v);
1985
+ var k;
1986
+ c.vehicleMode !== "ship" && (v = !1), (k = o.value) == null || k.getLayers().forEach((w) => {
1987
+ w.ol_uid === p.greenMark.ol_uid && (w.setVisible(v), u.value = v);
1974
1988
  });
1975
1989
  }, T = ref(BaseMapType.satellite), M = (v) => {
1976
- var w;
1977
- T.value = v, (w = o.value) == null || w.getLayers().forEach((k) => {
1978
- (k.ol_uid === p.tiandituTile.ol_uid || k.ol_uid === p.tiandituTileMark.ol_uid || k.ol_uid === p.tiandituImgTile.ol_uid || k.ol_uid === p.tiandituImgTileMark.ol_uid) && k.setVisible(!1), (v === BaseMapType.vector && (k.ol_uid === p.tiandituTile.ol_uid || k.ol_uid === p.tiandituTileMark.ol_uid) || v === BaseMapType.satellite && (k.ol_uid === p.tiandituImgTile.ol_uid || k.ol_uid === p.tiandituImgTileMark.ol_uid)) && k.setVisible(!0);
1990
+ var k;
1991
+ T.value = v, (k = o.value) == null || k.getLayers().forEach((w) => {
1992
+ (w.ol_uid === p.tiandituTile.ol_uid || w.ol_uid === p.tiandituTileMark.ol_uid || w.ol_uid === p.tiandituImgTile.ol_uid || w.ol_uid === p.tiandituImgTileMark.ol_uid) && w.setVisible(!1), (v === BaseMapType.vector && (w.ol_uid === p.tiandituTile.ol_uid || w.ol_uid === p.tiandituTileMark.ol_uid) || v === BaseMapType.satellite && (w.ol_uid === p.tiandituImgTile.ol_uid || w.ol_uid === p.tiandituImgTileMark.ol_uid)) && w.setVisible(!0);
1979
1993
  });
1980
1994
  }, b = () => {
1981
- const v = o.value.getView(), w = v.getZoom();
1982
- w && E(w);
1983
- const k = v.calculateExtent(o.value.getSize());
1984
- k && w && x(k, w);
1995
+ const v = o.value.getView(), k = v.getZoom();
1996
+ k && E(k);
1997
+ const w = v.calculateExtent(o.value.getSize());
1998
+ w && k && x(w, k);
1985
1999
  }, E = (v) => {
1986
2000
  var C, L, S, V, F;
1987
2001
  d.value = v, g(v < mapZoom.shipGreenDotMax);
1988
- const w = (C = o.value) == null ? void 0 : C.getLayers(), k = c.vehicleMode === "ship" ? w == null ? void 0 : w.getArray().find((N) => N.ol_uid === p.greenMark.ol_uid) : void 0;
1989
- showTrackLayer.value ? (f.value = !1, k == null || k.setVisible(!1), (L = shipsLayer.value) == null || L.setVisible(!1), (S = largeAmountShipsLayer.value) == null || S.setVisible(!1)) : !m.value && u.value && v <= mapZoom.shipGreenDotMax ? (f.value = !0, k == null || k.setVisible(!0), (V = shipsLayer.value) == null || V.setVisible(!1), (F = largeAmountShipsLayer.value) == null || F.setVisible(!1)) : (f.value = !1, k == null || k.setVisible(!1)), s("zoomChanged", v);
1990
- }, x = (v, w) => {
1991
- const k = transform([v[0], v[1]], projection.mercator, projection.data), C = transform([v[2], v[3]], projection.mercator, projection.data);
1992
- s("extentChanged", { extent: [k, C], zoom: w });
2002
+ const k = (C = o.value) == null ? void 0 : C.getLayers(), w = c.vehicleMode === "ship" ? k == null ? void 0 : k.getArray().find(($) => $.ol_uid === p.greenMark.ol_uid) : void 0;
2003
+ showTrackLayer.value ? (f.value = !1, w == null || w.setVisible(!1), (L = shipsLayer.value) == null || L.setVisible(!1), (S = largeAmountShipsLayer.value) == null || S.setVisible(!1)) : !m.value && u.value && v <= mapZoom.shipGreenDotMax ? (f.value = !0, w == null || w.setVisible(!0), (V = shipsLayer.value) == null || V.setVisible(!1), (F = largeAmountShipsLayer.value) == null || F.setVisible(!1)) : (f.value = !1, w == null || w.setVisible(!1)), s("zoomChanged", v);
2004
+ }, x = (v, k) => {
2005
+ const w = transform([v[0], v[1]], projection.mercator, projection.data), C = transform([v[2], v[3]], projection.mercator, projection.data);
2006
+ s("extentChanged", { extent: [w, C], zoom: k });
1993
2007
  };
1994
2008
  return t({
1995
2009
  mapInstance: o,
1996
2010
  initMap: y,
1997
2011
  renderTrucksMarker,
1998
2012
  renderShip: renderShips,
1999
- renderTrack: (v, w, k) => {
2013
+ renderTrack: (v, k, w) => {
2000
2014
  var C, L;
2001
- currentTrackId.value = v, showTrackLayer.value = !0, m.value = !0, hiddenAllShips(), (L = (C = largeAmountShipsLayer.value) == null ? void 0 : C.getSource()) == null || L.clear(), renderTrack(v, w, k, LENGTH_UNIT.NM);
2015
+ currentTrackId.value = v, showTrackLayer.value = !0, m.value = !0, hiddenAllShips(), (L = (C = largeAmountShipsLayer.value) == null ? void 0 : C.getSource()) == null || L.clear(), renderTrack(v, k, w, LENGTH_UNIT.NM);
2002
2016
  },
2003
2017
  findTruck,
2004
2018
  removeTruckIcon,
2005
2019
  clearAllTruck,
2006
2020
  closeTrack: () => {
2007
- var v, w;
2008
- showTrackLayer.value = !1, (v = shipTrackVectorLayer.value) == null || v.setVisible(!1), (w = selectShipsLayer.value) == null || w.setVisible(!0), m.value = !1, g(d.value < mapZoom.shipGreenDotMax), allTracks.value = [], stopAnimation();
2021
+ var v, k;
2022
+ showTrackLayer.value = !1, (v = shipTrackVectorLayer.value) == null || v.setVisible(!1), (k = selectShipsLayer.value) == null || k.setVisible(!0), m.value = !1, g(d.value < mapZoom.shipGreenDotMax), allTracks.value = [], stopAnimation();
2009
2023
  },
2010
2024
  closeTruckTrack: () => {
2011
- var v, w;
2012
- showTrackLayer.value = !1, (v = shipTrackVectorLayer.value) == null || v.setVisible(!1), (w = selectShipsLayer.value) == null || w.setVisible(!0), stopAnimation();
2025
+ var v, k;
2026
+ showTrackLayer.value = !1, (v = shipTrackVectorLayer.value) == null || v.setVisible(!1), (k = selectShipsLayer.value) == null || k.setVisible(!0), stopAnimation();
2013
2027
  },
2014
2028
  resetTrackView,
2015
2029
  playTrack,
2016
2030
  clearSelectFeature,
2017
2031
  findShip,
2018
- focusShip: (v, w, k = !0) => {
2032
+ focusShip: (v, k, w = !0) => {
2019
2033
  var C, L;
2020
- hiddenOrther.value = k, (C = shipsLayer.value) == null || C.setVisible(!k), (L = largeAmountShipsLayer.value) == null || L.setVisible(!1), findShip(v, w);
2034
+ hiddenOrther.value = w, (C = shipsLayer.value) == null || C.setVisible(!w), (L = largeAmountShipsLayer.value) == null || L.setVisible(!1), findShip(v, k);
2021
2035
  },
2022
2036
  showTracks,
2023
2037
  removeAllTrackLayer,
@@ -2025,8 +2039,8 @@ const addInteraction = (e) => {
2025
2039
  rerenderShip,
2026
2040
  switchGreenDot: () => g(!1),
2027
2041
  zoomTruckIcon,
2028
- renderTruckTrack: (v, w, k) => {
2029
- showTrackLayer.value = !0, renderTrack(v, w, k, LENGTH_UNIT.KM, "truck");
2042
+ renderTruckTrack: (v, k, w) => {
2043
+ showTrackLayer.value = !0, renderTrack(v, k, w, LENGTH_UNIT.KM, "truck");
2030
2044
  },
2031
2045
  removerLayer: removeShipTrackLineFeatureByIndex,
2032
2046
  renderMarker,
@@ -2035,15 +2049,15 @@ const addInteraction = (e) => {
2035
2049
  var L;
2036
2050
  const v = (L = o.value) == null ? void 0 : L.getView();
2037
2051
  if (!v) return null;
2038
- const w = Math.round(Number(v.getZoom())), { lon: k, lat: C } = transformUtils.mercatorToLonLat(v.getCenter());
2039
- return { zoom: w, center: [k, C] };
2052
+ const k = Math.round(Number(v.getZoom())), { lon: w, lat: C } = transformUtils.mercatorToLonLat(v.getCenter());
2053
+ return { zoom: k, center: [w, C] };
2040
2054
  },
2041
2055
  setCenter: (v) => {
2042
2056
  var C;
2043
- const w = (C = o.value) == null ? void 0 : C.getView();
2044
- if (!w) return null;
2045
- const k = new Point(v);
2046
- w.setCenter(transform(k.getCoordinates(), projection.data, projection.mercator));
2057
+ const k = (C = o.value) == null ? void 0 : C.getView();
2058
+ if (!k) return null;
2059
+ const w = new Point(v);
2060
+ k.setCenter(transform(w.getCoordinates(), projection.data, projection.mercator));
2047
2061
  },
2048
2062
  drawPolygonTool,
2049
2063
  setMapInstance: h,
@@ -2055,12 +2069,12 @@ const addInteraction = (e) => {
2055
2069
  transform: transformUtils,
2056
2070
  format: formatUtils
2057
2071
  }
2058
- }), (v, w) => (openBlock(), createElementBlock("div", {
2072
+ }), (v, k) => (openBlock(), createElementBlock("div", {
2059
2073
  class: "map-page map-container",
2060
2074
  ref_key: "pageRef",
2061
2075
  ref: r
2062
2076
  }, [
2063
- w[0] || (w[0] = createElementVNode("div", {
2077
+ k[0] || (k[0] = createElementVNode("div", {
2064
2078
  id: "map",
2065
2079
  class: "map"
2066
2080
  }, null, -1)),
@@ -2261,5 +2275,6 @@ export {
2261
2275
  mapZoom as m,
2262
2276
  projection as p,
2263
2277
  renderShipsLimit as r,
2264
- tiandituKey as t
2278
+ tiandituKey as t,
2279
+ zhongkeKey as z
2265
2280
  };
package/dist/es/index.js CHANGED
@@ -17,11 +17,11 @@ import { Z as L } from "./BaseInfo-CAuR2Id0.js";
17
17
  import { Z as M } from "./DetailHeader-CBN9CqAp.js";
18
18
  import { Z as c } from "./DiyDataTable-CXSUoapn.js";
19
19
  import { D as Q } from "./DiyDataTable-CXSUoapn.js";
20
- import { Z as _ } from "./Map-Ch7K-0xC.js";
21
- import { C as $, D as aa, L as oa, P as ra, b as ma, a as ta, m as sa, p as Za, r as ia, t as ea } from "./Map-Ch7K-0xC.js";
22
- import { Z as x } from "./Table-D7YUOcI0.js";
23
- import { Z as fa } from "./BaseItem-CQzBP1WX.js";
24
- const B = [
20
+ import { Z as _ } from "./Map-BJc6GMOA.js";
21
+ import { C as $, D as aa, L as oa, P as ra, b as ma, a as ta, m as sa, p as Za, r as ia, t as ea, z as pa } from "./Map-BJc6GMOA.js";
22
+ import { Z as g } from "./Table-D7YUOcI0.js";
23
+ import { Z as ha } from "./BaseItem-CQzBP1WX.js";
24
+ const x = [
25
25
  L,
26
26
  o,
27
27
  m,
@@ -47,8 +47,8 @@ const B = [
47
47
  A,
48
48
  _,
49
49
  r,
50
- x
51
- ], w = a(B);
50
+ g
51
+ ], v = a(x);
52
52
  export {
53
53
  $ as CDN_URL,
54
54
  aa as DEFAULT_VALUE,
@@ -57,7 +57,7 @@ export {
57
57
  ra as PointMarkerClass,
58
58
  I as ZhAlert,
59
59
  L as ZhBaseInfo,
60
- fa as ZhBaseItem,
60
+ ha as ZhBaseItem,
61
61
  o as ZhButton,
62
62
  r as ZhButtonGroup,
63
63
  d as ZhConfirm,
@@ -80,13 +80,14 @@ export {
80
80
  f as ZhMultiGrid,
81
81
  P as ZhPageHeadPanel,
82
82
  T as ZhPrompt,
83
- x as ZhTable,
83
+ g as ZhTable,
84
84
  A as ZhToolTips,
85
85
  ma as baseMap,
86
- w as default,
86
+ v as default,
87
87
  ta as mapDefaultCenter,
88
88
  sa as mapZoom,
89
89
  Za as projection,
90
90
  ia as renderShipsLimit,
91
- ea as tiandituKey
91
+ ea as tiandituKey,
92
+ pa as zhongkeKey
92
93
  };