zhihao-ui 1.2.29 → 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.
Files changed (55) hide show
  1. package/dist/es/{BaseInfo-XETJaruy.js → BaseInfo-CAuR2Id0.js} +1 -1
  2. package/dist/es/BaseItem-CQzBP1WX.js +129 -0
  3. package/dist/es/{Button-CzjgaPIL.js → Button-D-R-2Fix.js} +4 -4
  4. package/dist/es/DatePicker-BDz_yTX2.js +36 -0
  5. package/dist/es/{DetailHeader-C7L01g9Z.js → DetailHeader-CBN9CqAp.js} +3 -3
  6. package/dist/es/{DetailSubTitle-ChWfR3qA.js → DetailSubTitle-DsnSxPKH.js} +2 -2
  7. package/dist/es/{Dialog-Cky8TKRM.js → Dialog-C_hAbDgU.js} +3 -3
  8. package/dist/es/{DiyDataTable-D1s7-cdV.js → DiyDataTable-CXSUoapn.js} +10 -10
  9. package/dist/es/{EditInfoPair-C0EG8kUd.js → EditInfoPair-C0Ielr4q.js} +3 -3
  10. package/dist/es/{FileWrapper-CmvheBNp.js → FileWrapper-DFqY2SD_.js} +4 -4
  11. package/dist/es/Grid-CLg9sn2Y.js +198 -0
  12. package/dist/es/{InfoPair-JA1pAAyP.js → InfoPair-6agPuvqq.js} +3 -3
  13. package/dist/es/{Input-12ajHBoj.js → Input-CzlIXSCf.js} +3 -3
  14. package/dist/es/{Loading-CHji9tKE.js → Loading-ClE8eADM.js} +2 -2
  15. package/dist/es/{Map-Bq9kPMot.js → Map-BJc6GMOA.js} +231 -222
  16. package/dist/es/{MessageBox-1NCCwju7.js → MessageBox-CBMAgp6C.js} +2 -2
  17. package/dist/es/{MoneyInput-PI2K9BeH.js → MoneyInput-EODuzFjO.js} +17 -18
  18. package/dist/es/{PageHeadPanel-CBDItYUC.js → PageHeadPanel-DDnMIqmC.js} +2 -2
  19. package/dist/es/{Table-BBWU5wYF.js → Table-D7YUOcI0.js} +132 -130
  20. package/dist/es/{ToolTips-BBCd543g.js → ToolTips-BpZo8gsa.js} +3 -3
  21. package/dist/es/index.js +67 -60
  22. package/dist/es/utils-BbWQLYZL.js +52 -0
  23. package/dist/es/{vendor-BhAIOWbw.js → vendor-Cq716b5Q.js} +2034 -2019
  24. package/dist/index.css +1 -1
  25. package/dist/types/components/BaseItem/BaseItem.test.d.ts +1 -0
  26. package/dist/types/components/BaseItem/BaseItem.vue.d.ts +50 -0
  27. package/dist/types/components/BaseItem/index.d.ts +209 -0
  28. package/dist/types/components/BaseItem/types.d.ts +39 -0
  29. package/dist/types/components/DatePicker/DatePicker.vue.d.ts +2 -2
  30. package/dist/types/components/DatePicker/index.d.ts +5 -5
  31. package/dist/types/components/Dialog/Dialog.vue.d.ts +29 -29
  32. package/dist/types/components/Dialog/index.d.ts +45 -45
  33. package/dist/types/components/FileWrapper/FileWrapper.vue.d.ts +2 -2
  34. package/dist/types/components/FileWrapper/index.d.ts +6 -6
  35. package/dist/types/components/Grid/Grid.vue.d.ts +7 -9
  36. package/dist/types/components/Grid/components/GridItem.vue.d.ts +71 -0
  37. package/dist/types/components/Grid/components/MultiGrid.vue.d.ts +11 -0
  38. package/dist/types/components/Grid/components/collectGridItems.d.ts +9 -0
  39. package/dist/types/components/Grid/index.d.ts +187 -0
  40. package/dist/types/components/Grid/types.d.ts +14 -1
  41. package/dist/types/components/Map/config.d.ts +1 -0
  42. package/dist/types/components/Map/interface/entity/render.d.ts +2 -0
  43. package/dist/types/components/Map/render/renderPoint.d.ts +1 -2
  44. package/dist/types/components/Table/components/ColSetting.vue.d.ts +2 -2
  45. package/dist/types/components/Table/components/SearchForm.vue.d.ts +2 -2
  46. package/dist/types/components/ToolTips/ToolTips.vue.d.ts +1 -1
  47. package/dist/types/components/ToolTips/index.d.ts +3 -3
  48. package/dist/types/components/index.d.ts +1 -0
  49. package/dist/types/components/utils/color.d.ts +1 -0
  50. package/dist/umd/index.css +1 -1
  51. package/dist/umd/index.umd.cjs +19 -19
  52. package/package.json +1 -1
  53. package/dist/es/DatePicker-DNgii92T.js +0 -58
  54. package/dist/es/Grid-CfJ_U3gi.js +0 -96
  55. package/dist/es/utils-BIGjF-zg.js +0 -14
@@ -1,55 +1,55 @@
1
- var R = Object.defineProperty;
2
- var A = (e, t, n) => t in e ? R(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
- var S = (e, t, n) => A(e, typeof t != "symbol" ? t + "" : t, n);
4
- 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 ElSelect, s as ElOption, T as Text, t as fromLonLat, v as transformExtent, h as hooks, L as LineString, w as Feature, P as Point, x as Polyline, y as getVectorContext, e as cloneDeep, G as GeoJSON, W as WebGLPointsLayer, z as Circle, A as transform, B as buffer, H as ScaleLine$1, I as Icon, J as Translate, K as toLonLat, M as MultiPoint, N as getCenter, Q as TileLayer, X as XYZ, R as Map$1, U as View } from "./vendor-BhAIOWbw.js";
1
+ var D = Object.defineProperty;
2
+ var A = (e, t, n) => t in e ? D(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
+ var I = (e, t, n) => A(e, typeof t != "symbol" ? t + "" : t, n);
4
+ import { o as getArea, p as getLength, V as VectorSource, q as VectorLayer, S as Style, C as CircleStyle, F as Fill, r as Stroke, D as Draw, O as Overlay, u as unByKey, s as ElSelect, t as ElOption, T as Text, v as fromLonLat, w as transformExtent, x as hooks, L as LineString, y as Feature, P as Point, z as Polyline, A as getVectorContext, h as cloneDeep, G as GeoJSON, W as WebGLPointsLayer, B as Circle, H as transform, I as buffer, J as ScaleLine$1, K as Icon, M as Translate, N as toLonLat, Q as MultiPoint, R as getCenter, U as TileLayer, X as XYZ, Y as Map$1, Z as View } from "./vendor-Cq716b5Q.js";
5
5
  import { defineComponent, inject, useModel, ref, watch, openBlock, createElementBlock, createElementVNode, createVNode, unref, withCtx, Fragment, renderList, toDisplayString, createCommentVNode, mergeModels, nextTick, onMounted, normalizeClass, renderSlot, createBlock, provide } from "vue";
6
- import { _ as _export_sfc } from "./Button-CzjgaPIL.js";
7
- import { w as withInstall } from "./utils-BIGjF-zg.js";
6
+ import { _ as _export_sfc } from "./Button-D-R-2Fix.js";
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, M, T, b, C, x, v, w, k) {
11
- S(this, "id");
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
+ I(this, "id");
12
12
  // mmsi
13
- S(this, "mmsi");
13
+ I(this, "mmsi");
14
14
  // 船舶三角形填充色
15
- S(this, "fill");
15
+ I(this, "fill");
16
16
  // 船类型 "7": "货船",
17
- S(this, "shipType");
17
+ I(this, "shipType");
18
18
  // 船名
19
- S(this, "name");
19
+ I(this, "name");
20
20
  // 长度
21
- S(this, "length");
21
+ I(this, "length");
22
22
  // 宽度
23
- S(this, "breadth");
23
+ I(this, "breadth");
24
24
  // 经度
25
- S(this, "lon");
25
+ I(this, "lon");
26
26
  // 纬度
27
- S(this, "lat");
27
+ I(this, "lat");
28
28
  // 时间
29
- S(this, "createdAt");
29
+ I(this, "createdAt");
30
30
  // 速度
31
- S(this, "speed");
31
+ I(this, "speed");
32
32
  // 来源
33
- S(this, "from");
33
+ I(this, "from");
34
34
  // 船状态 "stop":"静止","sail":"航行","work":"作业","danger":"危险","other":"其他"
35
- S(this, "sailStatus");
35
+ I(this, "sailStatus");
36
36
  // 船艏向
37
- S(this, "hdg");
37
+ I(this, "hdg");
38
38
  // 航迹向
39
- S(this, "cog");
39
+ I(this, "cog");
40
40
  // 设备定位类型
41
- S(this, "posType");
42
- S(this, "type");
41
+ I(this, "posType");
42
+ I(this, "type");
43
43
  // 航向角度
44
- S(this, "angle");
44
+ I(this, "angle");
45
45
  // 左侧是否显示色块
46
- S(this, "leftIconColor");
47
- S(this, "existDevice");
48
- S(this, "existMobile");
49
- S(this, "existWaterGauge");
50
- S(this, "selected");
51
- S(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 = M, this.angle = T, this.leftIconColor = b, this.existDevice = C, this.existMobile = x, this.existWaterGauge = v, this.selected = w, this.blinkColors = k;
46
+ I(this, "leftIconColor");
47
+ I(this, "existDevice");
48
+ I(this, "existMobile");
49
+ I(this, "existWaterGauge");
50
+ I(this, "selected");
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 = 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,
@@ -143,15 +143,15 @@ const formatLength = function(e, t) {
143
143
  }), g = function(L) {
144
144
  if (L.dragging)
145
145
  return;
146
- let I = "点击选择起点";
147
- m && (I = "单击继续,双击结束"), u && (u.innerHTML = I, f.setPosition(L.coordinate), u.classList.remove("hidden"));
148
- }, M = () => {
146
+ let S = "点击选择起点";
147
+ m && (S = "单击继续,双击结束"), u && (u.innerHTML = S, f.setPosition(L.coordinate), u.classList.remove("hidden"));
148
+ }, T = () => {
149
149
  o.value && (o.value.on("pointermove", g), o.value.getViewport().addEventListener("mouseout", function() {
150
150
  var L;
151
151
  (L = u == null ? void 0 : u.classList) == null || L.add("hidden");
152
152
  }), c.value = !0);
153
153
  };
154
- let T;
154
+ let M;
155
155
  const b = new Style({
156
156
  fill: new Fill({
157
157
  color: "rgba(255, 255, 255, 0.2)"
@@ -171,40 +171,46 @@ const formatLength = function(e, t) {
171
171
  })
172
172
  })
173
173
  });
174
- function C() {
175
- var L, I;
174
+ function E() {
175
+ var L, S;
176
176
  if (o.value) {
177
- if (s.value = [], document.querySelectorAll(".ol-tooltip.ol-tooltip-static").forEach((E) => {
177
+ if (s.value = [], document.querySelectorAll(".ol-tooltip.ol-tooltip-static").forEach((V) => {
178
178
  var F;
179
- (F = E == null ? void 0 : E.parentNode) == null || F.removeChild(E);
180
- }), d.clear(), T) {
181
- const E = o.value.getInteractions().getArray().find((F) => F.ol_uid === T.ol_uid);
182
- E && ((L = o.value) == null || L.removeInteraction(E));
179
+ (F = V == null ? void 0 : V.parentNode) == null || F.removeChild(V);
180
+ }), d.clear(), M) {
181
+ const V = o.value.getInteractions().getArray().find((F) => F.ol_uid === M.ol_uid);
182
+ V && ((L = o.value) == null || L.removeInteraction(V));
183
183
  }
184
- (I = o.value) == null || I.removeLayer(h), u != null && u.parentNode && u.parentNode.removeChild(u), p != null && p.parentNode && p.parentNode.removeChild(p);
184
+ (S = o.value) == null || S.removeLayer(h), u != null && u.parentNode && u.parentNode.removeChild(u), p != null && p.parentNode && p.parentNode.removeChild(p);
185
185
  }
186
186
  }
187
187
  function x() {
188
- var I, E;
189
- C(), (I = o.value) == null || I.addLayer(h), T = new Draw({
188
+ var S, V;
189
+ E(), (S = o.value) == null || S.addLayer(h), M = new Draw({
190
190
  source: d,
191
191
  type: "LineString",
192
192
  style: function() {
193
193
  return b;
194
194
  }
195
- }), (E = o.value) == null || E.addInteraction(T), w(), v();
195
+ }), (V = o.value) == null || V.addInteraction(M), k(), v();
196
196
  let L;
197
- T.on("drawstart", function(F) {
198
- var $;
197
+ M.on("drawstart", function(F) {
198
+ var N;
199
199
  m = F.feature;
200
- let N;
201
- L = ($ = m.getGeometry()) == null ? void 0 : $.on("change", function(D) {
202
- const P = D.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
- }), T.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);
206
+ }), M.on("drawend", function() {
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,35 +231,35 @@ 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
- const I = document.querySelectorAll(".ol-tooltip.ol-tooltip-static.ol-tooltip-measure");
232
- I[L] && ((N = (F = I[L]) == null ? void 0 : F.parentNode) == null || N.removeChild(I[L]));
233
- const E = d.getFeatures();
234
- E[L] && d.removeFeature(E[L]);
235
- }, V = () => {
237
+ const S = document.querySelectorAll(".ol-tooltip.ol-tooltip-static.ol-tooltip-measure");
238
+ S[L] && (($ = (F = S[L]) == null ? void 0 : F.parentNode) == null || $.removeChild(S[L]));
239
+ const V = d.getFeatures();
240
+ V[L] && d.removeFeature(V[L]);
241
+ }, C = () => {
236
242
  r("close");
237
243
  };
238
244
  return watch(() => l, () => {
239
- l && !c.value && (M(), x());
245
+ l && !c.value && (T(), x());
240
246
  }, { deep: !0, immediate: !0 }), t({
241
247
  addInteraction: x,
242
- removeInteraction: C
243
- }), (L, I) => l.value && L.viewMode !== "WxMiniprogram" ? (openBlock(), createElementBlock("div", _hoisted_1$4, [
248
+ removeInteraction: E
249
+ }), (L, S) => l.value && L.viewMode !== "WxMiniprogram" ? (openBlock(), createElementBlock("div", _hoisted_1$4, [
244
250
  createElementVNode("div", { class: "header" }, [
245
- I[1] || (I[1] = createElementVNode("div", { class: "title" }, "测量", -1)),
251
+ S[1] || (S[1] = createElementVNode("div", { class: "title" }, "测量", -1)),
246
252
  createElementVNode("i", {
247
- onClick: V,
253
+ onClick: C,
248
254
  class: "map-iconfont icon-close"
249
255
  })
250
256
  ]),
251
257
  createElementVNode("div", _hoisted_2$2, [
252
- I[2] || (I[2] = createElementVNode("div", { class: "tips" }, "在地图上点击多个点测量距离,距离单位", -1)),
258
+ S[2] || (S[2] = createElementVNode("div", { class: "tips" }, "在地图上点击多个点测量距离,距离单位", -1)),
253
259
  createVNode(unref(ElSelect), {
254
260
  class: "select-length-unit",
255
261
  modelValue: i.value,
256
- "onUpdate:modelValue": I[0] || (I[0] = (E) => i.value = E)
262
+ "onUpdate:modelValue": S[0] || (S[0] = (V) => i.value = V)
257
263
  }, {
258
264
  default: withCtx(() => [
259
265
  createVNode(unref(ElOption), {
@@ -273,31 +279,33 @@ const formatLength = function(e, t) {
273
279
  }, 8, ["modelValue"])
274
280
  ]),
275
281
  createElementVNode("div", _hoisted_3$2, [
276
- (openBlock(!0), createElementBlock(Fragment, null, renderList(s.value, (E, F) => (openBlock(), createElementBlock("div", {
282
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(s.value, (V, F) => (openBlock(), createElementBlock("div", {
277
283
  class: "measure-history-item",
278
284
  key: F
279
285
  }, [
280
286
  createElementVNode("div", _hoisted_4, [
281
- I[3] || (I[3] = createElementVNode("i", { class: "map-iconfont icon-line" }, null, -1)),
287
+ S[3] || (S[3] = createElementVNode("i", { class: "map-iconfont icon-line" }, null, -1)),
282
288
  createElementVNode("span", _hoisted_5, "线段" + toDisplayString(F + 1), 1),
283
- createElementVNode("span", _hoisted_6, toDisplayString(E), 1)
289
+ createElementVNode("span", _hoisted_6, toDisplayString(V), 1)
284
290
  ]),
285
291
  createElementVNode("div", {
286
292
  class: "delete-button",
287
- onClick: (N) => k(F)
288
- }, I[4] || (I[4] = [
293
+ onClick: ($) => w(F)
294
+ }, S[4] || (S[4] = [
289
295
  createElementVNode("i", { class: "map-iconfont icon-delete" }, null, -1)
290
296
  ]), 8, _hoisted_7)
291
297
  ]))), 128))
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,11 +382,11 @@ 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
- const y = l(u), h = l(f), g = r(y[0]), M = r(h[0]), T = r(y[1]), b = r(h[1]), C = Math.sin(M - g) * Math.cos(b), x = Math.cos(T) * Math.sin(b) - Math.sin(T) * Math.cos(b) * Math.cos(M - g);
381
- return o(Math.atan2(C, x));
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);
389
+ return o(Math.atan2(E, x));
382
390
  }
383
391
  function s(u) {
384
392
  return !isNaN(u) && u !== null && !Array.isArray(u);
@@ -498,35 +506,35 @@ function drawLabelBody(e, t, n) {
498
506
  (c || d) && (f += l + 4 * r), e.restore();
499
507
  let p, y = 20, h = -1, g = l + 3 * r;
500
508
  if (m)
501
- for (let M = 0; M < 8; M++) {
502
- p = calculateBounds(i, M, f, g, m);
503
- let T = !1;
509
+ for (let T = 0; T < 8; T++) {
510
+ p = calculateBounds(i, T, f, g, m);
511
+ let M = !1;
504
512
  for (let b = 0; b < t.length; ++b) {
505
- let C = t[b].bounds, x = [
506
- C[0] - y,
507
- C[1] - y,
508
- C[2] + y,
509
- C[3] + y
513
+ let E = t[b].bounds, x = [
514
+ E[0] - y,
515
+ E[1] - y,
516
+ E[2] + y,
517
+ E[3] + y
510
518
  ];
511
519
  if (p && isOverlapping(p, x)) {
512
- T = !0;
520
+ M = !0;
513
521
  break;
514
522
  }
515
523
  }
516
- if (!T) {
517
- h = M;
524
+ if (!M) {
525
+ h = T;
518
526
  break;
519
527
  }
520
528
  }
521
529
  else
522
530
  h = 0, p = calculateBounds(i, h, f, g, m);
523
531
  if (u && h === -1 && (h = 0), p && h > -1) {
524
- let M = getBottomLeftPoint(p), T = getTopRighttPoint(p);
532
+ let T = getBottomLeftPoint(p), M = getTopRighttPoint(p);
525
533
  return {
526
534
  center: i,
527
535
  x: calculateAnchorPoint(i, h, f, g, m),
528
- l: T,
529
- r: M,
536
+ l: M,
537
+ r: T,
530
538
  bounds: p,
531
539
  position: h,
532
540
  name: s
@@ -534,32 +542,15 @@ function drawLabelBody(e, t, n) {
534
542
  } else
535
543
  return null;
536
544
  }
537
- let intervalId;
538
545
  const drawText = (e, t) => {
539
546
  if (!e) return;
540
547
  const { center: n, text: o, textColor: r, leftIcon: l, rightIcons: i, font: s } = t;
541
548
  e.save(), e.setTransform(1, 0, 0, 1, 0, 0);
542
549
  let [c, d] = n;
543
550
  if (l) {
544
- if (t.blinkColors && t.blinkColors.length > 0) {
545
- let m = Date.now(), u = 0;
546
- const f = [];
547
- t.blinkColors.forEach((p) => {
548
- f.push(p), f.push("white");
549
- }), intervalId && clearInterval(intervalId), intervalId = setInterval(() => {
550
- const p = Date.now();
551
- if (p - m >= 500) {
552
- u = (u + 1) % f.length, m = p, e.font = "22px map-iconfont";
553
- let y = getIconFont(l.icon);
554
- e.fillStyle = f[u], e.fillText(y, c - 22 + labelOutSize - 4, d + 4);
555
- }
556
- }, 10);
557
- } else {
558
- e.font = "22px map-iconfont";
559
- let m = getIconFont(l.icon);
560
- e.fillStyle = l.color, e.fillText(m, c + labelOutSize - 4, d + 4);
561
- }
562
- c += 22;
551
+ e.font = "22px map-iconfont";
552
+ let m = getIconFont(l.icon);
553
+ e.fillStyle = l.color, e.fillText(m, c + labelOutSize - 4, d + 4), c += 22;
563
554
  }
564
555
  if (i != null && i.length) {
565
556
  e.font = "12px map-iconfont", e.fillStyle = "#3370ff";
@@ -588,10 +579,13 @@ const drawText = (e, t) => {
588
579
  e.lineTo(n[u][0], n[u][1]);
589
580
  l && e.closePath(), o && (e.strokeStyle = o, e.stroke()), r && l && (m && (e.globalAlpha = m), e.fillStyle = r, e.fill()), e.restore();
590
581
  }
591
- }, drawLabel = (e, t, n) => {
592
- const { center: o, text: r, color: l, textColor: i, bgColor: s, leftIcon: c, rightIcons: d, type: m } = t;
582
+ };
583
+ let intervalId = [];
584
+ const drawLabel = (e, t, n) => {
585
+ var u, f;
586
+ let { center: o, text: r, color: l, textColor: i, bgColor: s, leftIcon: c, rightIcons: d, type: m } = t;
593
587
  if (o && r) {
594
- let u = {
588
+ let p = {
595
589
  font: labelFont,
596
590
  labelOutSize,
597
591
  labelHeight,
@@ -599,12 +593,14 @@ const drawText = (e, t) => {
599
593
  text: r,
600
594
  leftIcon: c,
601
595
  selected: t.selected
602
- }, f = drawLabelBody(e, n, u);
603
- if (f) {
604
- const { x: p, bounds: y, l: h } = f;
605
- let g = [getTopLeftPoint(y), getBottomLeftPoint(y), getBottomRightPoint(y), getTopRighttPoint(y)];
606
- n.find((v) => v.name === r) || n.push(f), drawPolygon(e, {
607
- points: [o, p],
596
+ };
597
+ (u = t.blinkColors) != null && u.length && (s = t.fill, i = getForegroundColor(t.fill));
598
+ let y = drawLabelBody(e, n, p);
599
+ if (y) {
600
+ const { x: h, bounds: g, l: T } = y;
601
+ let M = [getTopLeftPoint(g), getBottomLeftPoint(g), getBottomRightPoint(g), getTopRighttPoint(g)];
602
+ n.find((w) => w.name === r) || n.push(y), drawPolygon(e, {
603
+ points: [o, h],
608
604
  strokeColor: l,
609
605
  fillColor: "#000",
610
606
  shouldClosePath: !0,
@@ -614,22 +610,31 @@ const drawText = (e, t) => {
614
610
  scale: void 0,
615
611
  globalAlpha: labelAlpha
616
612
  }), d != null && d.length && d.forEach(() => {
617
- g[1][0] += 20, g[2][0] += 20;
618
- }), drawPolygon(e, {
619
- points: g,
613
+ M[1][0] += 20, M[2][0] += 20;
614
+ });
615
+ const E = {
616
+ points: M,
620
617
  strokeColor: l,
621
618
  fillColor: s,
622
619
  shouldClosePath: !0
623
- });
624
- const [b, C] = h, x = {
625
- center: [b, C + labelOutSize + labelHeight + 1],
620
+ }, [x, v] = T, k = {
621
+ center: [x, v + labelOutSize + labelHeight + 1],
626
622
  text: r,
627
623
  textColor: i,
628
624
  leftIcon: c,
629
625
  rightIcons: d,
630
626
  blinkColors: t.blinkColors
631
627
  };
632
- drawText(e, x);
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;
630
+ const L = [];
631
+ t.blinkColors.forEach((S) => {
632
+ L.push(S), L.push("white");
633
+ }), intervalId[t.text] && clearInterval(intervalId[t.text]), intervalId[t.text] = setInterval(() => {
634
+ const S = Date.now();
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));
636
+ }, 10);
637
+ }
633
638
  }
634
639
  }
635
640
  return null;
@@ -685,8 +690,8 @@ function mercatorToLonLat(e, t = "lonlat") {
685
690
  function calculateBoundingBox(e) {
686
691
  let t = 1 / 0, n = -1 / 0, o = 1 / 0, r = -1 / 0;
687
692
  e.forEach((h) => {
688
- const [g, M] = h;
689
- t = Math.min(t, M), n = Math.max(n, M), o = Math.min(o, g), r = Math.max(r, g);
693
+ const [g, T] = h;
694
+ t = Math.min(t, T), n = Math.max(n, T), o = Math.min(o, g), r = Math.max(r, g);
690
695
  });
691
696
  const l = r - o, i = n - t, s = Math.max(l, i), c = (o + r) / 2, d = (t + n) / 2, m = s / 2, u = c - m, f = c + m, p = d - m, y = d + m;
692
697
  return [f, p, u, y];
@@ -996,11 +1001,17 @@ const moveFeature = (e, t) => {
996
1001
  })
997
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({
998
1003
  renderer: (t, n) => {
999
- const o = n.context, r = n.feature.get("data");
1000
- 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 = []);
1001
1012
  try {
1002
- const i = drawShipBody(o, r, t);
1003
- 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);
1004
1015
  } catch {
1005
1016
  return !1;
1006
1017
  }
@@ -1054,6 +1065,7 @@ const moveFeature = (e, t) => {
1054
1065
  const s = 8;
1055
1066
  e.beginPath(), e.moveTo(n + s, l), e.lineTo(n, l), e.lineTo(n, l - s), e.moveTo(n, o + s), e.lineTo(n, o), e.lineTo(n + s, o), e.moveTo(r - s, o), e.lineTo(r, o), e.lineTo(r, o + s), e.moveTo(r, l - s), e.lineTo(r, l), e.lineTo(r - s, l), e.stroke(), e.restore();
1056
1067
  }, drawShipLabel = (e, t, n) => {
1068
+ if (!t.selected && shipLabels.value.find((u) => u.name === t.name)) return;
1057
1069
  const [o, r] = n, l = o - 0, i = r - 0, s = t.name;
1058
1070
  let c;
1059
1071
  t.leftIconColor && (c = { color: t.leftIconColor, icon: "&#xe599;" });
@@ -1061,6 +1073,7 @@ const moveFeature = (e, t) => {
1061
1073
  const m = {
1062
1074
  center: [l, i],
1063
1075
  text: s,
1076
+ fill: t.fill,
1064
1077
  color: "#fff",
1065
1078
  textColor: "#000",
1066
1079
  bgColor: "#fff",
@@ -1282,8 +1295,8 @@ const renderShips = (e) => {
1282
1295
  }), document.addEventListener("mousemove", function(h) {
1283
1296
  var g;
1284
1297
  if (f) {
1285
- let M = (g = mapInstance$5.value) == null ? void 0 : g.getCoordinateFromPixel([h.clientX - y[0], h.clientY - y[1]]), T = M[0] - p[0], b = M[1] - p[1];
1286
- i.setPosition([p[0] + T, p[1] + b]);
1298
+ let T = (g = mapInstance$5.value) == null ? void 0 : g.getCoordinateFromPixel([h.clientX - y[0], h.clientY - y[1]]), M = T[0] - p[0], b = T[1] - p[1];
1299
+ i.setPosition([p[0] + M, p[1] + b]);
1287
1300
  }
1288
1301
  }), document.addEventListener("mouseup", function() {
1289
1302
  f = !1;
@@ -1427,8 +1440,8 @@ const trackId = ref(""), cursor = ref(0), renderTrack = (e, t, n, o, r = "ship")
1427
1440
  nextTick(() => {
1428
1441
  var h;
1429
1442
  (h = n.value) == null || h.on("moveend", () => {
1430
- var M, T;
1431
- const g = (T = (M = n.value) == null ? void 0 : M.getView()) == null ? void 0 : T.getZoom();
1443
+ var T, M;
1444
+ const g = (M = (T = n.value) == null ? void 0 : T.getView()) == null ? void 0 : M.getZoom();
1432
1445
  g && (l.value = g);
1433
1446
  });
1434
1447
  });
@@ -1457,7 +1470,7 @@ const trackId = ref(""), cursor = ref(0), renderTrack = (e, t, n, o, r = "ship")
1457
1470
  h.vehicleMode === "ship" ? (openBlock(), createElementBlock("div", {
1458
1471
  key: 2,
1459
1472
  class: normalizeClass(`switch-btn ${h.mapTileMode === unref(BaseMapType).satellite && "active"}`),
1460
- onClick: g[0] || (g[0] = (M) => m())
1473
+ onClick: g[0] || (g[0] = (T) => m())
1461
1474
  }, g[7] || (g[7] = [
1462
1475
  createElementVNode("i", { class: "map-iconfont icon-space" }, null, -1),
1463
1476
  createElementVNode("div", { class: "button-text" }, "图层", -1)
@@ -1465,7 +1478,7 @@ const trackId = ref(""), cursor = ref(0), renderTrack = (e, t, n, o, r = "ship")
1465
1478
  h.vehicleMode === "truck" ? (openBlock(), createElementBlock("div", {
1466
1479
  key: 3,
1467
1480
  class: normalizeClass(`switch-btn ${h.mapTileMode === unref(BaseMapType).satellite && "active"}`),
1468
- onClick: g[1] || (g[1] = (M) => m())
1481
+ onClick: g[1] || (g[1] = (T) => m())
1469
1482
  }, g[8] || (g[8] = [
1470
1483
  createElementVNode("i", { class: "map-iconfont icon-space" }, null, -1),
1471
1484
  createElementVNode("div", { class: "button-text" }, "卫星", -1)
@@ -1473,14 +1486,14 @@ const trackId = ref(""), cursor = ref(0), renderTrack = (e, t, n, o, r = "ship")
1473
1486
  h.showTrackLayer ? (openBlock(), createElementBlock(Fragment, { key: 4 }, [
1474
1487
  createElementVNode("div", {
1475
1488
  class: "switch-btn multiple",
1476
- onClick: g[2] || (g[2] = (M) => unref(playTrack)(unref(currentTrackId), 1))
1489
+ onClick: g[2] || (g[2] = (T) => unref(playTrack)(unref(currentTrackId), 1))
1477
1490
  }, g[9] || (g[9] = [
1478
1491
  createElementVNode("i", { class: "map-iconfont icon-play" }, null, -1),
1479
1492
  createElementVNode("div", { class: "button-text" }, "播放轨迹", -1)
1480
1493
  ])),
1481
1494
  createElementVNode("div", {
1482
1495
  class: "switch-btn multiple",
1483
- onClick: g[3] || (g[3] = (M) => unref(resetTrackView)())
1496
+ onClick: g[3] || (g[3] = (T) => unref(resetTrackView)())
1484
1497
  }, g[10] || (g[10] = [
1485
1498
  createElementVNode("i", { class: "map-iconfont icon-center" }, null, -1),
1486
1499
  createElementVNode("div", { class: "button-text" }, "轨迹居中", -1)
@@ -1521,7 +1534,7 @@ const trackId = ref(""), cursor = ref(0), renderTrack = (e, t, n, o, r = "ship")
1521
1534
  ref_key: "measureRef",
1522
1535
  ref: s,
1523
1536
  visible: i.value,
1524
- "onUpdate:visible": g[4] || (g[4] = (M) => i.value = M),
1537
+ "onUpdate:visible": g[4] || (g[4] = (T) => i.value = T),
1525
1538
  onClose: f,
1526
1539
  "view-mode": h.viewMode
1527
1540
  }, null, 8, ["visible", "view-mode"])) : createCommentVNode("", !0)
@@ -1615,18 +1628,18 @@ const setTruckStyle = (e, t, n, o) => new Style({
1615
1628
  const p = 56, y = "#FFFFFF";
1616
1629
  let h = 176;
1617
1630
  const g = 52;
1618
- let M = "#164AFF", T = "#FFFFFF";
1619
- n === CAR_COLOR.YELLOW ? (h = 176, M = "#FFC81E", T = "rgba(0,0,0,0.88)") : n === CAR_COLOR.Y_GREEN && (f = 200, h = 196, M = "#8FED7C", T = "rgba(0,0,0,0.88)"), o != null && o.length && (f += o.length * 56), fillRectRadius(i, m, u, f, p, y), fillRectRadius(i, m + 2, u + 2, h, g, M), n === CAR_COLOR.Y_GREEN && fillRectRadius(i, m + 2, u + 2, 68, g, "#FFC81E"), i.save(), i.restore(), i.fillStyle = T, i.font = "bold 28px Arial", i.textAlign = "left", i.textBaseline = "middle";
1631
+ let T = "#164AFF", M = "#FFFFFF";
1632
+ n === CAR_COLOR.YELLOW ? (h = 176, T = "#FFC81E", M = "rgba(0,0,0,0.88)") : n === CAR_COLOR.Y_GREEN && (f = 200, h = 196, T = "#8FED7C", M = "rgba(0,0,0,0.88)"), o != null && o.length && (f += o.length * 56), fillRectRadius(i, m, u, f, p, y), fillRectRadius(i, m + 2, u + 2, h, g, T), n === CAR_COLOR.Y_GREEN && fillRectRadius(i, m + 2, u + 2, 68, g, "#FFC81E"), i.save(), i.restore(), i.fillStyle = M, i.font = "bold 28px Arial", i.textAlign = "left", i.textBaseline = "middle";
1620
1633
  const b = `${t.slice(0, 2) + " · " + t.slice(2)}`;
1621
1634
  if (i.fillText(b, m + 12, u + 32), i.save(), i.restore(), o != null && o.length) {
1622
1635
  const x = i.measureText(b).width + 12;
1623
1636
  let v = 0;
1624
- o.forEach((w) => {
1625
- 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);
1626
1639
  });
1627
1640
  }
1628
- const C = dotImage$1;
1629
- i.drawImage(C, c + f / 2 - 90, d, 50 / s, 50 / s), i.restore();
1641
+ const E = dotImage$1;
1642
+ i.drawImage(E, c + f / 2 - 90, d, 50 / s, 50 / s), i.restore();
1630
1643
  }
1631
1644
  }), mapInstance$3 = ref(), renderDashboardSetInstance = (e) => mapInstance$3.value = e;
1632
1645
  ref([]);
@@ -1929,7 +1942,7 @@ const addInteraction = (e) => {
1929
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";
1930
1943
  })(p || (p = {}));
1931
1944
  const y = () => {
1932
- var w, k;
1945
+ var k, w;
1933
1946
  const v = {
1934
1947
  projection: projection.mercator,
1935
1948
  // 地图投影坐标系
@@ -1959,7 +1972,7 @@ const addInteraction = (e) => {
1959
1972
  p.greenMark
1960
1973
  ],
1961
1974
  view: new View(v)
1962
- }), h(), (w = l.value) == null || w.setScaleLine(c.vehicleMode === "ship" && "nautical"), (k = o.value) == null || k.on("moveend", b), g(v.zoom < mapZoom.shipGreenDotMax), T(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(() => {
1963
1976
  findShip(String(c.mmsi), c.shipData);
1964
1977
  });
1965
1978
  };
@@ -1969,56 +1982,56 @@ const addInteraction = (e) => {
1969
1982
  const h = () => {
1970
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));
1971
1984
  }, g = (v) => {
1972
- var w;
1973
- c.vehicleMode !== "ship" && (v = !1), (w = o.value) == null || w.getLayers().forEach((k) => {
1974
- 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);
1975
1988
  });
1976
- }, M = ref(BaseMapType.satellite), T = (v) => {
1977
- var w;
1978
- M.value = v, (w = o.value) == null || w.getLayers().forEach((k) => {
1979
- (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);
1989
+ }, T = ref(BaseMapType.satellite), M = (v) => {
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);
1980
1993
  });
1981
1994
  }, b = () => {
1982
- const v = o.value.getView(), w = v.getZoom();
1983
- w && C(w);
1984
- const k = v.calculateExtent(o.value.getSize());
1985
- k && w && x(k, w);
1986
- }, C = (v) => {
1987
- var V, L, I, E, F;
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);
1999
+ }, E = (v) => {
2000
+ var C, L, S, V, F;
1988
2001
  d.value = v, g(v < mapZoom.shipGreenDotMax);
1989
- const w = (V = o.value) == null ? void 0 : V.getLayers(), k = c.vehicleMode === "ship" ? w == null ? void 0 : w.getArray().find((N) => N.ol_uid === p.greenMark.ol_uid) : void 0;
1990
- showTrackLayer.value ? (f.value = !1, k == null || k.setVisible(!1), (L = shipsLayer.value) == null || L.setVisible(!1), (I = largeAmountShipsLayer.value) == null || I.setVisible(!1)) : !m.value && u.value && v <= mapZoom.shipGreenDotMax ? (f.value = !0, k == null || k.setVisible(!0), (E = shipsLayer.value) == null || E.setVisible(!1), (F = largeAmountShipsLayer.value) == null || F.setVisible(!1)) : (f.value = !1, k == null || k.setVisible(!1)), s("zoomChanged", v);
1991
- }, x = (v, w) => {
1992
- const k = transform([v[0], v[1]], projection.mercator, projection.data), V = transform([v[2], v[3]], projection.mercator, projection.data);
1993
- s("extentChanged", { extent: [k, V], 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 });
1994
2007
  };
1995
2008
  return t({
1996
2009
  mapInstance: o,
1997
2010
  initMap: y,
1998
2011
  renderTrucksMarker,
1999
2012
  renderShip: renderShips,
2000
- renderTrack: (v, w, k) => {
2001
- var V, L;
2002
- currentTrackId.value = v, showTrackLayer.value = !0, m.value = !0, hiddenAllShips(), (L = (V = largeAmountShipsLayer.value) == null ? void 0 : V.getSource()) == null || L.clear(), renderTrack(v, w, k, LENGTH_UNIT.NM);
2013
+ renderTrack: (v, k, w) => {
2014
+ var C, L;
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);
2003
2016
  },
2004
2017
  findTruck,
2005
2018
  removeTruckIcon,
2006
2019
  clearAllTruck,
2007
2020
  closeTrack: () => {
2008
- var v, w;
2009
- 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();
2010
2023
  },
2011
2024
  closeTruckTrack: () => {
2012
- var v, w;
2013
- 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();
2014
2027
  },
2015
2028
  resetTrackView,
2016
2029
  playTrack,
2017
2030
  clearSelectFeature,
2018
2031
  findShip,
2019
- focusShip: (v, w, k = !0) => {
2020
- var V, L;
2021
- hiddenOrther.value = k, (V = shipsLayer.value) == null || V.setVisible(!k), (L = largeAmountShipsLayer.value) == null || L.setVisible(!1), findShip(v, w);
2032
+ focusShip: (v, k, w = !0) => {
2033
+ var C, L;
2034
+ hiddenOrther.value = w, (C = shipsLayer.value) == null || C.setVisible(!w), (L = largeAmountShipsLayer.value) == null || L.setVisible(!1), findShip(v, k);
2022
2035
  },
2023
2036
  showTracks,
2024
2037
  removeAllTrackLayer,
@@ -2026,8 +2039,8 @@ const addInteraction = (e) => {
2026
2039
  rerenderShip,
2027
2040
  switchGreenDot: () => g(!1),
2028
2041
  zoomTruckIcon,
2029
- renderTruckTrack: (v, w, k) => {
2030
- 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");
2031
2044
  },
2032
2045
  removerLayer: removeShipTrackLineFeatureByIndex,
2033
2046
  renderMarker,
@@ -2036,15 +2049,15 @@ const addInteraction = (e) => {
2036
2049
  var L;
2037
2050
  const v = (L = o.value) == null ? void 0 : L.getView();
2038
2051
  if (!v) return null;
2039
- const w = Math.round(Number(v.getZoom())), { lon: k, lat: V } = transformUtils.mercatorToLonLat(v.getCenter());
2040
- return { zoom: w, center: [k, V] };
2052
+ const k = Math.round(Number(v.getZoom())), { lon: w, lat: C } = transformUtils.mercatorToLonLat(v.getCenter());
2053
+ return { zoom: k, center: [w, C] };
2041
2054
  },
2042
2055
  setCenter: (v) => {
2043
- var V;
2044
- const w = (V = o.value) == null ? void 0 : V.getView();
2045
- if (!w) return null;
2046
- const k = new Point(v);
2047
- w.setCenter(transform(k.getCoordinates(), projection.data, projection.mercator));
2056
+ var C;
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));
2048
2061
  },
2049
2062
  drawPolygonTool,
2050
2063
  setMapInstance: h,
@@ -2056,12 +2069,12 @@ const addInteraction = (e) => {
2056
2069
  transform: transformUtils,
2057
2070
  format: formatUtils
2058
2071
  }
2059
- }), (v, w) => (openBlock(), createElementBlock("div", {
2072
+ }), (v, k) => (openBlock(), createElementBlock("div", {
2060
2073
  class: "map-page map-container",
2061
2074
  ref_key: "pageRef",
2062
2075
  ref: r
2063
2076
  }, [
2064
- w[0] || (w[0] = createElementVNode("div", {
2077
+ k[0] || (k[0] = createElementVNode("div", {
2065
2078
  id: "map",
2066
2079
  class: "map"
2067
2080
  }, null, -1)),
@@ -2070,9 +2083,9 @@ const addInteraction = (e) => {
2070
2083
  "view-mode": v.viewMode,
2071
2084
  "disable-green-dot": m.value,
2072
2085
  "show-track-layer": unref(showTrackLayer),
2073
- "map-tile-mode": M.value,
2086
+ "map-tile-mode": T.value,
2074
2087
  onSwitchGreenDot: g,
2075
- onSwitchMapTile: T
2088
+ onSwitchMapTile: M
2076
2089
  }, {
2077
2090
  toolPanel: withCtx(() => [
2078
2091
  renderSlot(v.$slots, "toolPanel", {}, void 0, !0)
@@ -2106,8 +2119,8 @@ const setPointStyle = (e, t, n) => {
2106
2119
  d.scale(m, m);
2107
2120
  let [u, f] = s;
2108
2121
  u = u / m, f = f / m, d.font = "12px Arial";
2109
- const p = d.measureText(t).width, y = u - p / 2, h = f - 10, g = p + 4, M = 20, T = e && i || o;
2110
- if (fillRectRadius(d, y, h + 30, g, M, T), d.save(), d.restore(), d.fillStyle = e ? "#FFFFFF" : "#000000", d.textAlign = "center", d.textBaseline = "middle", d.fillText(t, y + (p + 4) / 2, h + 41), d.save(), d.restore(), r || l) {
2122
+ const p = d.measureText(t).width, y = u - p / 2, h = f - 10, g = p + 4, T = 20, M = e && i || o;
2123
+ if (fillRectRadius(d, y, h + 30, g, T, M), d.save(), d.restore(), d.fillStyle = e ? "#FFFFFF" : "#000000", d.textAlign = "center", d.textBaseline = "middle", d.fillText(t, y + (p + 4) / 2, h + 41), d.save(), d.restore(), r || l) {
2111
2124
  const b = e ? dotActiveImage : dotImage;
2112
2125
  d.drawImage(b, u - b.width / 2, f - b.height / 2, 40 / m, 40 / m);
2113
2126
  }
@@ -2123,16 +2136,16 @@ class PointMarkerClass {
2123
2136
  * @param options
2124
2137
  */
2125
2138
  constructor(t, n) {
2126
- S(this, "mapInstance");
2139
+ I(this, "mapInstance");
2127
2140
  // 渲染的数据
2128
- S(this, "pointMarkerList", []);
2141
+ I(this, "pointMarkerList", []);
2129
2142
  // 绘制点渲染层数据
2130
- S(this, "pointsVectorSource");
2143
+ I(this, "pointsVectorSource");
2131
2144
  // 当前高亮的数据
2132
- S(this, "highlightPoint");
2133
- S(this, "pointLayer");
2145
+ I(this, "highlightPoint");
2146
+ I(this, "pointLayer");
2134
2147
  // 颜色等其他设置
2135
- S(this, "options");
2148
+ I(this, "options");
2136
2149
  this.mapInstance = t, this.options = n;
2137
2150
  }
2138
2151
  /**
@@ -2179,22 +2192,23 @@ class PointMarkerClass {
2179
2192
  source: this.pointsVectorSource
2180
2193
  }), this.mapInstance.addLayer(this.pointLayer), console.log(this.pointLayer);
2181
2194
  }
2182
- // 删除所有已渲染的点
2183
- deleteAllPointMarkers() {
2184
- this.pointMarkerList.forEach((t) => {
2185
- var n;
2186
- t.feature && ((n = this.pointsVectorSource) == null || n.removeFeature(t.feature));
2187
- }), this.pointMarkerList = [];
2195
+ // 删除 未选中的渲染点
2196
+ deleteAllPointMarkers(t) {
2197
+ this.pointMarkerList.forEach((n) => {
2198
+ var o;
2199
+ n.feature && t !== n.id && ((o = this.pointsVectorSource) == null || o.removeFeature(n.feature));
2200
+ });
2188
2201
  }
2189
2202
  // 取消高亮
2190
2203
  cancelHighlightTruckMarker() {
2191
- var r;
2192
2204
  if (!this.highlightPoint)
2193
2205
  return;
2194
- const { id: t, name: n } = this.highlightPoint, o = this.pointMarkerList.find((l) => l.id === t);
2195
- t && o && o.feature && ((r = this.pointsVectorSource) == null || r.removeFeature(o.feature), o.feature.setStyle(
2196
- setPointStyle(!1, n, this.options)
2197
- ));
2206
+ const { id: t, name: n } = this.highlightPoint;
2207
+ this.highlightPoint = void 0, this.pointMarkerList.find((o) => {
2208
+ o.id === t && o.feature.setStyle(
2209
+ setPointStyle(!1, n, this.options)
2210
+ );
2211
+ });
2198
2212
  }
2199
2213
  /**
2200
2214
  * 设置选中
@@ -2223,12 +2237,6 @@ class PointMarkerClass {
2223
2237
  pointType: s
2224
2238
  }, this.setPointCenter(c);
2225
2239
  }
2226
- //隐藏其他点
2227
- hiddenPointMarker(t) {
2228
- this.pointMarkerList.forEach((n) => {
2229
- n.id !== t && n.feature && n.feature.setStyle(void 0);
2230
- });
2231
- }
2232
2240
  // 获取feature
2233
2241
  getFeature(t, n) {
2234
2242
  var r;
@@ -2267,5 +2275,6 @@ export {
2267
2275
  mapZoom as m,
2268
2276
  projection as p,
2269
2277
  renderShipsLimit as r,
2270
- tiandituKey as t
2278
+ tiandituKey as t,
2279
+ zhongkeKey as z
2271
2280
  };