zhihao-ui 1.3.4 → 1.3.5

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 (29) hide show
  1. package/dist/es/{BaseInfo-CB5pi10k.js → BaseInfo-C-n-23wy.js} +1 -1
  2. package/dist/es/{BaseItem-DbPihwWe.js → BaseItem-BmbN3hxP.js} +3 -3
  3. package/dist/es/{Button-CJChwHqo.js → Button-DnAj6C7o.js} +2 -2
  4. package/dist/es/{DatePicker-Bi2YRkEQ.js → DatePicker-CLuXvVZx.js} +3 -3
  5. package/dist/es/{DetailHeader-Cg9d2H5f.js → DetailHeader-CJ49WOPF.js} +3 -3
  6. package/dist/es/{DetailSubTitle-B9uSbcqf.js → DetailSubTitle-BTe5k4Tv.js} +2 -2
  7. package/dist/es/{Dialog-ChaUWYYq.js → Dialog-Bv42gNoY.js} +3 -3
  8. package/dist/es/{DiyDataTable-efSdnkmN.js → DiyDataTable-DDIkdXF3.js} +4 -4
  9. package/dist/es/{EditInfoPair-aOPlWuK8.js → EditInfoPair-B_1jHWIS.js} +3 -3
  10. package/dist/es/{FileWrapper-COcVCdaZ.js → FileWrapper-Cyfnbvfq.js} +4 -4
  11. package/dist/es/{Grid-C3UnYvww.js → Grid-BziKC4j6.js} +2 -2
  12. package/dist/es/{InfoPair-IXHMv1Kk.js → InfoPair-ggIW5r8A.js} +3 -3
  13. package/dist/es/{Input-B7Evxgt1.js → Input-BEYAS5WB.js} +3 -3
  14. package/dist/es/{Loading-BakBqvVD.js → Loading-Dw6qV2j-.js} +2 -2
  15. package/dist/es/{Map-jdOYsS3c.js → Map-CVB8icRh.js} +97 -58
  16. package/dist/es/{MessageBox-PjdMGQ7t.js → MessageBox-BqcS3SpW.js} +2 -2
  17. package/dist/es/{MoneyInput-BNU6fyAq.js → MoneyInput-BEZxWEKT.js} +5 -5
  18. package/dist/es/{PageHeadPanel-CMbeIqJT.js → PageHeadPanel-DVd4kJnd.js} +2 -2
  19. package/dist/es/{Table-NPgbmzKK.js → Table-CyPkm0mk.js} +5 -5
  20. package/dist/es/{ToolTips-CvmvEbTS.js → ToolTips-ev7cPDVQ.js} +3 -3
  21. package/dist/es/index.js +22 -22
  22. package/dist/es/{utils-BoEvcCS_.js → utils-B9UlcPnQ.js} +1 -1
  23. package/dist/es/{vendor-Tp_GZLnZ.js → vendor-C-yFzCvN.js} +2 -2
  24. package/dist/index.css +1 -1
  25. package/dist/types/components/Map/Map.vue.d.ts +8 -1
  26. package/dist/types/components/Map/index.d.ts +24 -3
  27. package/dist/umd/index.css +1 -1
  28. package/dist/umd/index.umd.cjs +3 -3
  29. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as h, ref as o, provide as n, watch as i, resolveComponent as p, openBlock as m, createBlock as W, withCtx as v, renderSlot as b } from "vue";
2
- import { w as g } from "./utils-BoEvcCS_.js";
2
+ import { w as g } from "./utils-B9UlcPnQ.js";
3
3
  const C = /* @__PURE__ */ h({
4
4
  name: "ZhBaseInfo",
5
5
  __name: "BaseInfo",
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as z, useSlots as R, inject as T, computed as n, ref as M, watchEffect as A, openBlock as t, createBlock as u, unref as s, withCtx as d, createElementVNode as h, normalizeClass as m, normalizeStyle as W, resolveDynamicComponent as k, createElementBlock as i, toDisplayString as o, renderSlot as S, Fragment as v, withModifiers as V, createTextVNode as f, createVNode as p, createCommentVNode as O } from "vue";
2
- import { E as D, a as Z, d as g } from "./vendor-Tp_GZLnZ.js";
3
- import { Z as G } from "./Grid-C3UnYvww.js";
4
- import { w as U } from "./utils-BoEvcCS_.js";
2
+ import { E as D, a as Z, d as g } from "./vendor-C-yFzCvN.js";
3
+ import { Z as G } from "./Grid-BziKC4j6.js";
4
+ import { w as U } from "./utils-B9UlcPnQ.js";
5
5
  const b = "--", X = "YYYY-MM-DDTHH:mm:ss", x = "YYYY-MM-DDT23:59:59", ee = "YYYY-MM-DD", le = "https://static.zhihaoscm.cn/", _ = { key: 1 }, H = {
6
6
  key: 1,
7
7
  class: "zh-base-item--value--file"
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as r, openBlock as a, createBlock as p, unref as u, mergeProps as c, withCtx as l, renderSlot as i } from "vue";
2
- import { b as m, c as d } from "./vendor-Tp_GZLnZ.js";
3
- import { w as _ } from "./utils-BoEvcCS_.js";
2
+ import { b as m, c as d } from "./vendor-C-yFzCvN.js";
3
+ import { w as _ } from "./utils-B9UlcPnQ.js";
4
4
  const h = /* @__PURE__ */ r({
5
5
  name: "ZhButton",
6
6
  inheritAttrs: !1,
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as d, openBlock as u, createElementBlock as f, normalizeClass as h, createVNode as _, unref as g, mergeProps as A } from "vue";
2
- import { h as D, e as E } from "./vendor-Tp_GZLnZ.js";
3
- import { D as p, a as M, L as m, b as k } from "./BaseItem-DbPihwWe.js";
4
- import { w as y } from "./utils-BoEvcCS_.js";
2
+ import { h as D, e as E } from "./vendor-C-yFzCvN.js";
3
+ import { D as p, a as M, L as m, b as k } from "./BaseItem-BmbN3hxP.js";
4
+ import { w as y } from "./utils-B9UlcPnQ.js";
5
5
  const i = (e, l = M) => e ? D(e).format(l).replace("Invalid date", p) : p, O = (e) => typeof e == "number" ? !0 : typeof e == "string" ? !isNaN(parseFloat(e)) : !1;
6
6
  function P(e) {
7
7
  const l = ["角", "分"], c = ["零", "壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖"], s = [
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as p, useSlots as _, openBlock as a, createElementBlock as o, createElementVNode as t, renderSlot as l, toDisplayString as i, Fragment as m, renderList as u, unref as n, normalizeClass as D, createCommentVNode as g } from "vue";
2
- import { D as v } from "./BaseItem-DbPihwWe.js";
3
- import { _ as k } from "./Button-CJChwHqo.js";
4
- import { w as y } from "./utils-BoEvcCS_.js";
2
+ import { D as v } from "./BaseItem-BmbN3hxP.js";
3
+ import { _ as k } from "./Button-DnAj6C7o.js";
4
+ import { w as y } from "./utils-B9UlcPnQ.js";
5
5
  const I = { class: "common-card" }, b = { class: "detail-header" }, E = { class: "detail-header--left" }, H = { class: "title common-title" }, M = { class: "info-pair--label" }, $ = { class: "info-pair--value" }, C = {
6
6
  key: 1,
7
7
  class: "detail-header--right"
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as r, openBlock as o, createElementBlock as s, createElementVNode as l, createTextVNode as a, toDisplayString as t, createCommentVNode as p, normalizeClass as c, renderSlot as m, unref as d } from "vue";
2
- import { D as u } from "./BaseItem-DbPihwWe.js";
3
- import { w as f } from "./utils-BoEvcCS_.js";
2
+ import { D as u } from "./BaseItem-BmbN3hxP.js";
3
+ import { w as f } from "./utils-B9UlcPnQ.js";
4
4
  const _ = { class: "info-pair" }, v = { class: "info-pair--title" }, h = {
5
5
  key: 0,
6
6
  class: "info-pair--title--tip"
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as k, useModel as w, computed as T, openBlock as r, createBlock as v, unref as D, mergeProps as M, withCtx as o, renderSlot as s, createElementVNode as c, createVNode as u, createTextVNode as m, toDisplayString as l, createElementBlock as Z, createCommentVNode as z, mergeModels as p } from "vue";
2
- import { Z as f } from "./Button-CJChwHqo.js";
3
- import { f as E } from "./vendor-Tp_GZLnZ.js";
4
- import { w as I } from "./utils-BoEvcCS_.js";
2
+ import { Z as f } from "./Button-DnAj6C7o.js";
3
+ import { f as E } from "./vendor-C-yFzCvN.js";
4
+ import { w as I } from "./utils-B9UlcPnQ.js";
5
5
  const N = { class: "title" }, O = {
6
6
  key: 0,
7
7
  class: "sub-title"
@@ -1,8 +1,8 @@
1
1
  import { defineComponent as Z, useModel as P, ref as V, openBlock as i, createBlock as v, unref as n, withCtx as p, createVNode as c, mergeProps as z, createElementBlock as u, Fragment as b, renderList as X, normalizeClass as _, toDisplayString as m, renderSlot as E, createTextVNode as x, createCommentVNode as w, createElementVNode as k, mergeModels as j } from "vue";
2
- import { D as $ } from "./BaseItem-DbPihwWe.js";
3
- import { g as C, i as F, j as K, k as G, l as D, m as M, n as J, o as L, b as S } from "./vendor-Tp_GZLnZ.js";
4
- import { _ as Q } from "./Button-CJChwHqo.js";
5
- import { w as Y } from "./utils-BoEvcCS_.js";
2
+ import { D as $ } from "./BaseItem-BmbN3hxP.js";
3
+ import { g as C, i as F, j as K, k as G, l as D, m as M, n as J, o as L, b as S } from "./vendor-C-yFzCvN.js";
4
+ import { _ as Q } from "./Button-DnAj6C7o.js";
5
+ import { w as Y } from "./utils-B9UlcPnQ.js";
6
6
  var g = /* @__PURE__ */ ((f) => (f.AUTOCOMPLETE = "autocomplete", f.FORMAT = "format", f.TEXT = "text", f))(g || {});
7
7
  const ee = { key: 0 }, te = {
8
8
  key: 1,
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as l, openBlock as o, createElementBlock as s, createElementVNode as a, createTextVNode as r, toDisplayString as t, createCommentVNode as p, normalizeClass as c, renderSlot as d, unref as m } from "vue";
2
- import { D as f } from "./BaseItem-DbPihwWe.js";
3
- import { _ } from "./Button-CJChwHqo.js";
4
- import { w as u } from "./utils-BoEvcCS_.js";
2
+ import { D as f } from "./BaseItem-BmbN3hxP.js";
3
+ import { _ } from "./Button-DnAj6C7o.js";
4
+ import { w as u } from "./utils-B9UlcPnQ.js";
5
5
  const v = { class: "info-pair" }, h = { class: "info-pair--title" }, E = {
6
6
  key: 0,
7
7
  class: "info-pair--title--tip"
@@ -1,8 +1,8 @@
1
1
  import { defineComponent as f, openBlock as i, createElementBlock as o, toDisplayString as n, createCommentVNode as s, createElementVNode as t, createVNode as p, unref as m, withCtx as _, createTextVNode as u } from "vue";
2
- import { D as w } from "./BaseItem-DbPihwWe.js";
3
- import { E as y } from "./vendor-Tp_GZLnZ.js";
4
- import { _ as h } from "./Button-CJChwHqo.js";
5
- import { w as v } from "./utils-BoEvcCS_.js";
2
+ import { D as w } from "./BaseItem-BmbN3hxP.js";
3
+ import { E as y } from "./vendor-C-yFzCvN.js";
4
+ import { _ as h } from "./Button-DnAj6C7o.js";
5
+ import { w as v } from "./utils-B9UlcPnQ.js";
6
6
  const k = { class: "file_wrapper" }, x = {
7
7
  key: 0,
8
8
  class: "header"
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as L, onBeforeMount as H, useSlots as U, ref as d, computed as D, onMounted as P, onActivated as N, onUnmounted as T, onDeactivated as O, provide as p, watch as C, inject as m, onBeforeUpdate as q, onUpdated as F, openBlock as k, createElementBlock as M, normalizeStyle as Z, renderSlot as E, useAttrs as J, reactive as W, watchEffect as K, withDirectives as Q, vShow as V } from "vue";
2
- import { g as X } from "./Table-NPgbmzKK.js";
3
- import { w as A } from "./utils-BoEvcCS_.js";
2
+ import { g as X } from "./Table-CyPkm0mk.js";
3
+ import { w as A } from "./utils-B9UlcPnQ.js";
4
4
  const Y = /* @__PURE__ */ L({
5
5
  name: "Grid",
6
6
  __name: "Grid",
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as l, openBlock as i, createElementBlock as s, createElementVNode as a, createTextVNode as r, toDisplayString as t, createCommentVNode as p, normalizeClass as c, renderSlot as m, unref as f } from "vue";
2
- import { D as d } from "./BaseItem-DbPihwWe.js";
3
- import { _ } from "./Button-CJChwHqo.js";
4
- import { w as u } from "./utils-BoEvcCS_.js";
2
+ import { D as d } from "./BaseItem-BmbN3hxP.js";
3
+ import { _ } from "./Button-DnAj6C7o.js";
4
+ import { w as u } from "./utils-B9UlcPnQ.js";
5
5
  const v = { class: "info-pair" }, h = { class: "info-pair--title" }, I = {
6
6
  key: 0,
7
7
  class: "info-pair--title--tip"
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as b, useAttrs as v, useModel as k, openBlock as h, createElementBlock as I, normalizeClass as z, createVNode as S, unref as $, mergeProps as N, createSlots as x, renderList as _, withCtx as y, renderSlot as B, normalizeProps as M, guardReactiveProps as C, mergeModels as E, normalizeStyle as j } from "vue";
2
- import { o as P } from "./vendor-Tp_GZLnZ.js";
3
- import { _ as U } from "./Button-CJChwHqo.js";
4
- import { w as Z } from "./utils-BoEvcCS_.js";
2
+ import { o as P } from "./vendor-C-yFzCvN.js";
3
+ import { _ as U } from "./Button-DnAj6C7o.js";
4
+ import { w as Z } from "./utils-B9UlcPnQ.js";
5
5
  const A = /* @__PURE__ */ b({
6
6
  name: "zh-input",
7
7
  __name: "Input",
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as t, openBlock as s, createElementBlock as a, createElementVNode as o } from "vue";
2
- import { _ as e } from "./Button-CJChwHqo.js";
3
- import { w as i } from "./utils-BoEvcCS_.js";
2
+ import { _ as e } from "./Button-DnAj6C7o.js";
3
+ import { w as i } from "./utils-B9UlcPnQ.js";
4
4
  const d = { class: "loading-box" }, r = /* @__PURE__ */ t({
5
5
  name: "zh-loading",
6
6
  __name: "Loading",
@@ -1,7 +1,7 @@
1
- import { T as Text, F as Fill, S as Style, p as fromLonLat, t as transformExtent, q as getLength, R as RBush$1, O as Overlay, I as Icon, V as VectorSource, r as VectorLayer, s as debounce, i as cloneDeep, u as Feature, P as Point, h as hooks, L as LineString, v as Stroke, C as CircleStyle, w as transform, x as buffer, y as Polyline, z as getVectorContext, D as DoubleClickZoom, A as Draw, B as unByKey, G as getUid, M as Map$2, H as TileLayer, X as XYZ, J as View, K as defaults, N as toLonLat, Q as ScaleLine$1, U as getArea, W as getCenter$1, Y as MultiPoint } from "./vendor-Tp_GZLnZ.js";
2
1
  import { ref, computed, watch, onMounted, onBeforeUnmount, h, nextTick, createVNode, render, defineComponent, openBlock, createElementBlock, inject, createElementVNode, Fragment } from "vue";
3
- import { _ as _export_sfc } from "./Button-CJChwHqo.js";
4
- import { w as withInstall } from "./utils-BoEvcCS_.js";
2
+ import { T as Text, F as Fill, S as Style, p as fromLonLat, t as transformExtent, q as getLength, R as RBush$1, O as Overlay, I as Icon, V as VectorSource, r as VectorLayer, s as debounce, i as cloneDeep, u as Feature, P as Point, h as hooks, L as LineString, v as Stroke, C as CircleStyle, w as Polyline, x as buffer, y as transform, z as getVectorContext, D as DoubleClickZoom, A as Draw, B as unByKey, G as getUid, M as Map$2, H as TileLayer, X as XYZ, J as View, K as defaults, N as toLonLat, Q as ScaleLine$1, U as getArea, W as getCenter$1, Y as MultiPoint } from "./vendor-C-yFzCvN.js";
3
+ import { _ as _export_sfc } from "./Button-DnAj6C7o.js";
4
+ import { w as withInstall } from "./utils-B9UlcPnQ.js";
5
5
  const TIAN_DI_TU_KEY = "a6e8f78974f2581f2ca00485b40c948f", MAP_ZOOM = {
6
6
  // 地图默认层级
7
7
  default: 13,
@@ -131,13 +131,13 @@ function useShipOverlay(e) {
131
131
  }, 1e3);
132
132
  }, d = () => {
133
133
  s && (clearInterval(s), s = null);
134
- }, p = () => {
134
+ }, u = () => {
135
135
  n.value && n.value.setPosition(fromLonLat(e.position));
136
136
  };
137
137
  return watch(() => e.selected, (i) => {
138
138
  i ? c() : d();
139
139
  }, { immediate: !0 }), watch(() => e.position, () => {
140
- p();
140
+ u();
141
141
  }, { deep: !0 }), onMounted(() => {
142
142
  }), onBeforeUnmount(() => {
143
143
  d();
@@ -273,8 +273,8 @@ function setLinePath(e) {
273
273
  n && o === "top-right" && (n.style.right = "-20px"), n && o === "top-left" && (n.style.left = "-20px");
274
274
  const l = POSITION_PRIORITY.filter((s) => s.positioning === o && s.offset === r), a = t == null ? void 0 : t.querySelector(".ship-overlay-line line");
275
275
  if (l.length > 0) {
276
- const { x1: s, y1: c, x2: d, y2: p } = l[0].line;
277
- a && (a.setAttribute("x1", s), a.setAttribute("y1", c), a.setAttribute("x2", d), a.setAttribute("y2", p));
276
+ const { x1: s, y1: c, x2: d, y2: u } = l[0].line;
277
+ a && (a.setAttribute("x1", s), a.setAttribute("y1", c), a.setAttribute("x2", d), a.setAttribute("y2", u));
278
278
  }
279
279
  }
280
280
  function removeLabelOverlay(e) {
@@ -391,17 +391,19 @@ const renderShipList = (e) => {
391
391
  console.log("renderShipList", e);
392
392
  const t = getInstall();
393
393
  if (!t) return;
394
- t.getLayers().getArray().includes(shipsLayer) || t.addLayer(shipsLayer);
394
+ removeSelectedOverlay(), t.getLayers().getArray().includes(shipsLayer) || t.addLayer(shipsLayer);
395
395
  const n = (selectedShip == null ? void 0 : selectedShip.id) || (selectedShipFeature == null ? void 0 : selectedShipFeature.get("id"));
396
- removeLabelOverlay(t), removeSelectedOverlay(), shipsSource && shipsSource.clear();
396
+ removeLabelOverlay(t), shipsSource && shipsSource.clear();
397
397
  const o = [];
398
398
  if (selectedShip) {
399
399
  const r = e.filter((l) => l.id === n);
400
400
  r.length === 0 ? e.push(selectedShip) : selectedShip = r[0];
401
401
  }
402
402
  e.forEach((r) => {
403
- const l = createShipFetature(r);
404
- o.push(l), createLabelStyle(l);
403
+ if (r.lon && r.lat) {
404
+ const l = createShipFetature(r);
405
+ o.push(l), createLabelStyle(l);
406
+ }
405
407
  }), shipsSource.addFeatures(o), handleChangeSelected();
406
408
  }, createShipFetature = (e) => {
407
409
  const t = (selectedShip == null ? void 0 : selectedShip.id) || (selectedShipFeature == null ? void 0 : selectedShipFeature.get("id")), n = fromLonLat([e.lon, e.lat]), o = new Feature({
@@ -430,12 +432,10 @@ const renderShipList = (e) => {
430
432
  if (!selectedShip) return;
431
433
  const e = getInstall();
432
434
  if (!e) return;
433
- const n = cloneDeep(e.getOverlays().getArray()).find((l) => l.get("class") == "ship-overlay-selected");
434
- console.log("selectedOverlay-----------", n);
435
- let o = n;
435
+ let o = cloneDeep(e.getOverlays().getArray()).find((l) => l.get("class") == "ship-overlay-selected");
436
436
  if (o) {
437
437
  const l = selectedShipElement(selectedShip);
438
- o.setElement(l), o.setPosition(fromLonLat([selectedShip.lon, selectedShip.lat])), o.get("element").style.visibility = "visible";
438
+ o.setElement(l), o.setPosition(fromLonLat([selectedShip.lon, selectedShip.lat]));
439
439
  } else
440
440
  o = selectedShipStyle(selectedShip), e.addOverlay(o);
441
441
  o && ((r = o.get("element")) != null && r.parentElement) && (o.get("element").parentElement.style.display = "block");
@@ -458,8 +458,8 @@ const renderShipList = (e) => {
458
458
  const a = attentionShips[l], s = o.find((d) => d.getId() === "label-" + l), c = r.find((d) => l === d.get("id"));
459
459
  if (s && c) {
460
460
  c.set("blinking", a), c.set("blinkingColor", attentionShipsColor[l] || "");
461
- const d = s.getElement(), p = createLabelElement(c), i = p.querySelector(".ship-overlay-line"), u = d == null ? void 0 : d.querySelector(".ship-overlay-line");
462
- d && d !== p && (u && i && i.replaceWith(u), s.setElement(p));
461
+ const d = s.getElement(), u = createLabelElement(c), i = u.querySelector(".ship-overlay-line"), p = d == null ? void 0 : d.querySelector(".ship-overlay-line");
462
+ d && d !== u && (p && i && i.replaceWith(p), s.setElement(u));
463
463
  }
464
464
  }
465
465
  }, filterShipShow = (e) => {
@@ -471,27 +471,26 @@ const renderShipList = (e) => {
471
471
  });
472
472
  const a = cloneDeep(t.getOverlays().getArray());
473
473
  r.forEach((s) => {
474
- const c = s.get("id"), d = a.find((p) => p.getId() === "label-" + c);
474
+ const c = s.get("id"), d = a.find((u) => u.getId() === "label-" + c);
475
475
  if (!l.has(c))
476
476
  s.setStyle([]), d && (d.get("element").style.visibility = "hidden");
477
477
  else {
478
478
  d && (d.get("element").style.visibility = "visible");
479
- const p = s.getStyle();
480
- (p == null ? void 0 : p.length) == 0 && s.setStyle(createShipStyle(s));
479
+ const u = s.getStyle();
480
+ (u == null ? void 0 : u.length) == 0 && s.setStyle(createShipStyle(s));
481
481
  }
482
482
  });
483
483
  }, renderShipSelected = (e) => {
484
484
  if (e) {
485
485
  console.log("选中", e);
486
486
  const t = shipsSource.getFeatures().find((n) => n.get("id") === e.id);
487
- t && (selectedShipFeature = t), selectedShip = e;
487
+ t && (selectedShipFeature = t), selectedShip = e, handleChangeSelected();
488
488
  } else
489
- console.log("取消选中"), selectedShip = null, removeSelectedOverlay();
489
+ console.log("取消选中"), selectedShip = null, selectedShipFeature = null, removeSelectedOverlay();
490
490
  }, renderShipSelectedChange = () => {
491
- console.log("selectedShip------------------", selectedShip);
492
491
  const e = shipsSource.getFeatures().find((t) => t.get("id") === (selectedShip == null ? void 0 : selectedShip.id));
493
- if (console.log("hasShipFetature------------------", e), e)
494
- e == null || e.setStyle(createShipStyle(e)), createLabelStyle(e);
492
+ if (e)
493
+ e == null || e.setStyle(createShipStyle(e));
495
494
  else {
496
495
  const t = createShipFetature(selectedShip);
497
496
  shipsSource.addFeature(t), createLabelStyle(t);
@@ -514,7 +513,7 @@ const renderShipList = (e) => {
514
513
  }, removeSelectedOverlay = () => {
515
514
  try {
516
515
  const e = getInstall(), n = cloneDeep(e.getOverlays().getArray()).find((o) => o.get("class") == "ship-overlay-selected");
517
- n && n.get("element") && (n.get("element").style.visibility = "hidden");
516
+ n && n.setPosition(void 0);
518
517
  } catch (e) {
519
518
  console.log(e);
520
519
  }
@@ -536,15 +535,16 @@ let routeFeatures = [], allTracks = {}, trackId = "", trackColor = "", trackList
536
535
  const reRenderTrackLine = () => {
537
536
  mapInstance$1 = getInstall(), isClosing || handlerRenderLine();
538
537
  }, renderTrackLine = async (e, t, n, o = "ship", r = 200) => {
539
- mapInstance$1 = getInstall(), mapInstance$1 && (routeLayer == null || routeLayer.setVisible(!0), t = t == null ? void 0 : t.reverse(), popupOverlay && o === "ship" && (mapInstance$1 != null && mapInstance$1.getOverlays().getArray().includes(popupOverlay) || mapInstance$1.addOverlay(popupOverlay)), renderShipSelectedChange(), isClosing = !1, !((t == null ? void 0 : t.length) < 2) && (t.forEach((l) => {
538
+ mapInstance$1 = getInstall(), mapInstance$1 && (routeLayer == null || routeLayer.setVisible(!0), t = t == null ? void 0 : t.reverse(), popupOverlay && o === "ship" && (mapInstance$1 != null && mapInstance$1.getOverlays().getArray().includes(popupOverlay) || mapInstance$1.addOverlay(popupOverlay)), isClosing = !1, !((t == null ? void 0 : t.length) < 2) && (t.forEach((l) => {
540
539
  l.state ? l.state = Number(l.state) : delete l.state;
541
540
  }), trackId = e, trackList = t, allTracks[e] = t, trackList = [], trackColor = n, thresholdNum = r, await handlerRenderLine(), await setTrackViewCenter(trackId)));
542
541
  }, handlerRenderLine = async () => {
542
+ renderShipSelectedChange();
543
543
  const e = trackColor || "", t = trackId, n = allTracks[trackId] || [], o = thresholdNum || 200, r = Math.max(1, Math.floor(n.length / o));
544
544
  trackList = n.filter((s, c) => c % r === 0).map((s, c) => {
545
545
  if (Number(s.lon) > 180 || Number(s.lat) > 180) {
546
- const [d, p] = convertSixHundredThousandToLatLng(s.lon, s.lat);
547
- s.lon = d, s.lat = p;
546
+ const [d, u] = convertSixHundredThousandToLatLng(s.lon, s.lat);
547
+ s.lon = d, s.lat = u;
548
548
  }
549
549
  return s.center = [s.lon, s.lat], s.centerPoint = lonLatToMercator(s.center), s.id = t, s.index = c, s.time = hooks(s.createdAt).format("YYYY-MM-DD HH:mm:ss"), s;
550
550
  });
@@ -629,15 +629,15 @@ const reRenderTrackLine = () => {
629
629
  const i = n[d] || n.default;
630
630
  c = adjustBounds(c, [i, i]);
631
631
  }
632
- let p = !0;
632
+ let u = !0;
633
633
  if (t[a].state !== "0") {
634
634
  for (let i = 0; i < o.length; i++)
635
635
  if (isOverlapping$1(c, o[i].bounds)) {
636
- p = !1;
636
+ u = !1;
637
637
  break;
638
638
  }
639
639
  }
640
- p && (t[a].bounds = c, o.push(t[a]));
640
+ u && (t[a].bounds = c, o.push(t[a]));
641
641
  }
642
642
  }
643
643
  const l = [];
@@ -726,8 +726,8 @@ const reRenderTrackLine = () => {
726
726
  else {
727
727
  const c = trackList[Math.floor(s)], d = trackList[Math.ceil(s)];
728
728
  if (c && d) {
729
- const [p, i] = c.centerPoint, [u, m] = d.centerPoint;
730
- l = [(p + u) / 2, (i + m) / 2];
729
+ const [u, i] = c.centerPoint, [p, m] = d.centerPoint;
730
+ l = [(u + p) / 2, (i + m) / 2];
731
731
  }
732
732
  }
733
733
  if (l) {
@@ -811,7 +811,7 @@ const reRenderTrackLine = () => {
811
811
  const n = allTracks[String(e)], o = n == null ? void 0 : n.map((r) => [r.lon, r.lat]);
812
812
  o && playAnimation(o, t);
813
813
  }, moveFeature = (e, t) => {
814
- var i, u;
814
+ var i, p;
815
815
  const n = Number(50 * t), o = ((i = e.frameState) == null ? void 0 : i.time) ?? Date.now(), r = o - lastTime;
816
816
  if (distance = (distance + n * r / 1e6) % 2, lastTime = o, distance >= 1) {
817
817
  stopAnimation();
@@ -827,9 +827,9 @@ const reRenderTrackLine = () => {
827
827
  mercatorToLonLat(a, "array"),
828
828
  mercatorToLonLat(s, "array")
829
829
  ) * Math.PI / 180;
830
- (u = geoMarkerStyle.getText()) == null || u.setRotation(d), position.setCoordinates(l);
831
- const p = getVectorContext(e);
832
- p.setStyle(geoMarkerStyle), p.drawGeometry(position), mapInstance$1 == null || mapInstance$1.render();
830
+ (p = geoMarkerStyle.getText()) == null || p.setRotation(d), position.setCoordinates(l);
831
+ const u = getVectorContext(e);
832
+ u.setStyle(geoMarkerStyle), u.drawGeometry(position), mapInstance$1 == null || mapInstance$1.render();
833
833
  }, startAnimation = () => {
834
834
  var e;
835
835
  trackAnimating = !0, lastTime = Date.now(), distance = 0, position = ((e = startMarker.getGeometry()) == null ? void 0 : e.clone()) || new Point([0, 0]), moveFeatureHandler && (vectorLayer$3 == null || vectorLayer$3.on("postrender", moveFeatureHandler)), geoMarker == null || geoMarker.setGeometry(void 0);
@@ -865,10 +865,10 @@ const reRenderTrackLine = () => {
865
865
  return i % 360 * Math.PI / 180;
866
866
  }
867
867
  function l(i) {
868
- var u;
868
+ var p;
869
869
  if (!i) throw new Error("Coordinate is required");
870
870
  if (!Array.isArray(i)) {
871
- if ((i == null ? void 0 : i.type) === "Feature" && (i == null ? void 0 : i.geometry) !== null && ((u = i == null ? void 0 : i.geometry) == null ? void 0 : u.type) === "Point")
871
+ if ((i == null ? void 0 : i.type) === "Feature" && (i == null ? void 0 : i.geometry) !== null && ((p = i == null ? void 0 : i.geometry) == null ? void 0 : p.type) === "Point")
872
872
  return i == null ? void 0 : i.geometry.coordinates;
873
873
  if (i.type === "Point") return (i == null ? void 0 : i.coordinates) || [];
874
874
  }
@@ -878,21 +878,21 @@ const reRenderTrackLine = () => {
878
878
  "Coordinate must be GeoJSON Point or an Array of numbers"
879
879
  );
880
880
  }
881
- function a(i, u, m = {}) {
881
+ function a(i, p, m = {}) {
882
882
  if (m.final)
883
- return function(S, I) {
884
- return (a(I, S) + 180) % 360;
885
- }(i, u);
886
- const g = l(i), y = l(u), v = r(g[0]), L = r(y[0]), w = r(g[1]), f = r(y[1]), E = Math.sin(L - v) * Math.cos(f), T = Math.cos(w) * Math.sin(f) - Math.sin(w) * Math.cos(f) * Math.cos(L - v);
887
- return o(Math.atan2(E, T));
883
+ return function(k, S) {
884
+ return (a(S, k) + 180) % 360;
885
+ }(i, p);
886
+ const g = l(i), y = l(p), v = r(g[0]), L = r(y[0]), w = r(g[1]), f = r(y[1]), T = Math.sin(L - v) * Math.cos(f), E = Math.cos(w) * Math.sin(f) - Math.sin(w) * Math.cos(f) * Math.cos(L - v);
887
+ return o(Math.atan2(T, E));
888
888
  }
889
889
  function s(i) {
890
890
  return !isNaN(i) && i !== null && !Array.isArray(i);
891
891
  }
892
- function c(i, u = {}, m = {}) {
893
- return i || console.log("Coordinates are required"), Array.isArray(i) || console.log("Coordinates must be an Array"), i.length < 2 && console.log("Coordinates must be at least 2 numbers long"), (!s(i[0]) || !s(i[1])) && console.log("Coordinates must contain numbers"), d({ type: "Point", coordinates: i }, u, m);
892
+ function c(i, p = {}, m = {}) {
893
+ return i || console.log("Coordinates are required"), Array.isArray(i) || console.log("Coordinates must be an Array"), i.length < 2 && console.log("Coordinates must be at least 2 numbers long"), (!s(i[0]) || !s(i[1])) && console.log("Coordinates must contain numbers"), d({ type: "Point", coordinates: i }, p, m);
894
894
  }
895
- function d(i, u = {}, m = {}) {
895
+ function d(i, p = {}, m = {}) {
896
896
  const g = {
897
897
  type: "Feature",
898
898
  id: "",
@@ -900,10 +900,10 @@ const reRenderTrackLine = () => {
900
900
  bbox: {},
901
901
  geometry: {}
902
902
  };
903
- return m.id !== void 0 && (g.id = m.id), m.bbox && (g.bbox = m.bbox), g.properties = u, g.geometry = i, g;
903
+ return m.id !== void 0 && (g.id = m.id), m.bbox && (g.bbox = m.bbox), g.properties = p, g.geometry = i, g;
904
904
  }
905
- const p = a(c(e), c(t), n);
906
- return p < 0 ? 360 + p : p;
905
+ const u = a(c(e), c(t), n);
906
+ return u < 0 ? 360 + u : u;
907
907
  }, PORT_LAYER_CLASS_NAME = "zh-map-port-layer";
908
908
  let vectorLayer$2, vectorSource$2;
909
909
  const renderPortList = (e) => {
@@ -1225,7 +1225,7 @@ const createMeasureTooltip$1 = () => {
1225
1225
  const o = e.getEventPixel(n.originalEvent), r = e.forEachFeatureAtPixel(o, (l) => l);
1226
1226
  handleShipMapEvent(r, "hover"), handleTrackMapEvent(r, "hover", n), r && handlePortHover(o);
1227
1227
  }), e.on("movestart", () => {
1228
- removeSelectedOverlay();
1228
+ console.log("movestart-----------------------"), removeSelectedOverlay();
1229
1229
  }), e.on("click", debounce((n) => {
1230
1230
  if (console.log("1", drawLine.getState()), drawLine.getState()) return;
1231
1231
  const o = e.getEventPixel(n.originalEvent), r = e.forEachFeatureAtPixel(
@@ -1401,11 +1401,11 @@ const initDraw = () => {
1401
1401
  sketch = t.feature, e = (n = sketch.getGeometry()) == null ? void 0 : n.on("change", (o) => {
1402
1402
  const r = o.target, l = computedArea(r, "nm"), s = r.getCoordinates()[0], c = new LineString([s[s.length - 2], s[s.length - 1]]), d = computedDistance(c, "nm");
1403
1403
  if (lineLimitError = Number(getLength(c) / 1e3) > 150, !l) return;
1404
- const p = '<span class="error pl-4">超出可以绘画的距离</span>';
1404
+ const u = '<span class="error pl-4">超出可以绘画的距离</span>';
1405
1405
  measureTooltipElement && (measureTooltipElement.innerHTML = `
1406
1406
  <div class="text">
1407
1407
  面积:${l}
1408
- ${lineLimitError ? p : ""}
1408
+ ${lineLimitError ? u : ""}
1409
1409
  </div>
1410
1410
  `), helpTooltipElement && (helpTooltipElement.innerHTML = `
1411
1411
  <div class="text">
@@ -1413,7 +1413,7 @@ const initDraw = () => {
1413
1413
  </div>
1414
1414
  <div class="text ${lineLimitError ? "error" : ""}">
1415
1415
  线段 ${s.length - 2}: ${d}
1416
- ${lineLimitError ? p : ""}
1416
+ ${lineLimitError ? u : ""}
1417
1417
 
1418
1418
  </div>
1419
1419
  <div>
@@ -1475,6 +1475,38 @@ const createHelpTooltip = () => {
1475
1475
  open,
1476
1476
  close,
1477
1477
  reset
1478
+ };
1479
+ let currentTruckOverlay = null;
1480
+ const locationTruck = async (e) => {
1481
+ const t = getInstall();
1482
+ if (!t || (console.log("vehicleInfo", e), !(e != null && e.lon && (e != null && e.lat)))) return;
1483
+ const n = Math.abs(Number(e.lon)) > 180 ? convertSixHundredThousandToLatLng(e.lon, e.lat) : [e.lon, e.lat];
1484
+ drawTruckIcon(e, fromLonLat(n));
1485
+ const o = t.getView(), r = new Point(n);
1486
+ o.setCenter(transform(r.getCoordinates(), projection.data, projection.mercator));
1487
+ }, drawTruckIcon = (e, t) => {
1488
+ const n = getInstall(), o = `${CDN_URL}map/car-icon.gif`;
1489
+ currentTruckOverlay || (currentTruckOverlay = new Overlay({
1490
+ element: document.createElement("div"),
1491
+ positioning: "center-center",
1492
+ stopEvent: !1
1493
+ // 允许交互事件穿透
1494
+ }), n.addOverlay(currentTruckOverlay));
1495
+ const r = currentTruckOverlay.getElement();
1496
+ r.style.backgroundImage = `url(${o})`, r.style.width = "80px", r.style.height = "80px";
1497
+ const l = (e == null ? void 0 : e.drc) || "";
1498
+ r.style.transform = `rotate(${l}deg)`, r.style.backgroundSize = "cover", currentTruckOverlay == null || currentTruckOverlay.setPosition(t);
1499
+ }, renderTruckTrack = (e, t, n, o = 1e3) => {
1500
+ renderTrackLine(e, t, n, LENGTH_UNIT.KM, "truck");
1501
+ }, closeTruckTrack = () => {
1502
+ closeTrack();
1503
+ }, removeTruckIcon = () => {
1504
+ const e = currentTruckOverlay == null ? void 0 : currentTruckOverlay.getElement();
1505
+ e && (e.innerHTML = "");
1506
+ }, resetTrackView = (e) => {
1507
+ setTrackViewCenter(e);
1508
+ }, playTrack = (e, t) => {
1509
+ playShipTrack(e, t);
1478
1510
  }, _sfc_main = /* @__PURE__ */ defineComponent({
1479
1511
  __name: "Map",
1480
1512
  props: {
@@ -1535,7 +1567,14 @@ const createHelpTooltip = () => {
1535
1567
  drawLine,
1536
1568
  // 绘制矩形
1537
1569
  drawPolygon,
1538
- carTrack: {},
1570
+ carTrack: {
1571
+ location: locationTruck,
1572
+ remove: removeTruckIcon,
1573
+ renderTrack: renderTruckTrack,
1574
+ setCenter: resetTrackView,
1575
+ closeTrack: closeTruckTrack,
1576
+ playTrack
1577
+ },
1539
1578
  utils: {
1540
1579
  getCalculateExtent: () => {
1541
1580
  const a = getView().calculateExtent(getSize()), s = transform([a[0], a[1]], projection.mercator, projection.data), c = transform([a[2], a[3]], projection.mercator, projection.data);
@@ -1558,7 +1597,7 @@ const createHelpTooltip = () => {
1558
1597
  createVNode(ZoomControl, { ref: "zoomControlRef" }, null, 512)
1559
1598
  ], 64));
1560
1599
  }
1561
- }), Map$1 = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-ba6106d4"]]), ZhMap = withInstall(Map$1);
1600
+ }), Map$1 = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-16d189cd"]]), ZhMap = withInstall(Map$1);
1562
1601
  export {
1563
1602
  ZhMap as Z
1564
1603
  };
@@ -1,5 +1,5 @@
1
- import { Z as a } from "./vendor-Tp_GZLnZ.js";
2
- import { w as n } from "./utils-BoEvcCS_.js";
1
+ import { Z as a } from "./vendor-C-yFzCvN.js";
2
+ import { w as n } from "./utils-B9UlcPnQ.js";
3
3
  const r = {
4
4
  type: "",
5
5
  showCancelButton: !0,
@@ -1,9 +1,9 @@
1
1
  import { defineComponent as p, useModel as d, computed as i, ref as f, openBlock as v, createBlock as c, unref as y, withCtx as n, createVNode as V, mergeProps as b, createSlots as I, renderList as M, renderSlot as w, normalizeProps as B, guardReactiveProps as N, mergeModels as g } from "vue";
2
- import { v as k, d as P } from "./DatePicker-Bi2YRkEQ.js";
3
- import { _ as T } from "./vendor-Tp_GZLnZ.js";
4
- import { I as $ } from "./Input-B7Evxgt1.js";
5
- import { _ as z } from "./Button-CJChwHqo.js";
6
- import { w as C } from "./utils-BoEvcCS_.js";
2
+ import { v as k, d as P } from "./DatePicker-CLuXvVZx.js";
3
+ import { _ as T } from "./vendor-C-yFzCvN.js";
4
+ import { I as $ } from "./Input-BEYAS5WB.js";
5
+ import { _ as z } from "./Button-DnAj6C7o.js";
6
+ import { w as C } from "./utils-B9UlcPnQ.js";
7
7
  const S = /* @__PURE__ */ p({
8
8
  name: "zh-money-input",
9
9
  __name: "MoneyInput",
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as i, toRefs as m, openBlock as h, createElementBlock as u, createElementVNode as e, toDisplayString as s, unref as a, renderSlot as f } from "vue";
2
- import { _ as g } from "./Button-CJChwHqo.js";
3
- import { w as v } from "./utils-BoEvcCS_.js";
2
+ import { _ as g } from "./Button-DnAj6C7o.js";
3
+ import { w as v } from "./utils-B9UlcPnQ.js";
4
4
  const P = { class: "page-head" }, x = { class: "left-wrap" }, S = { class: "page-name" }, b = { class: "value" }, w = { class: "other-inform" }, H = { class: "label" }, k = { class: "value mg-r-24" }, B = { class: "status" }, E = /* @__PURE__ */ i({
5
5
  name: "zh-page-head-panel",
6
6
  __name: "PageHeadPanel",
@@ -1,9 +1,9 @@
1
1
  import { reactive as X, computed as F, toRefs as Ae, ref as M, defineComponent as ne, useCssVars as dt, inject as Ke, openBlock as w, createElementBlock as L, createBlock as R, resolveDynamicComponent as de, mergeProps as J, withKeys as pt, unref as p, createSlots as pe, withCtx as C, Fragment as H, renderList as he, renderSlot as A, createElementVNode as B, toDisplayString as Q, createVNode as S, withModifiers as ht, normalizeClass as Ue, createCommentVNode as I, createTextVNode as Z, useSlots as xe, isVNode as ft, normalizeProps as je, guardReactiveProps as Ne, nextTick as fe, onMounted as mt, onActivated as gt, onDeactivated as vt, onUnmounted as bt, watch as yt, provide as Ct, resolveDirective as St, withDirectives as Ce, vShow as wt, toHandlers as _t } from "vue";
2
- import { $ as We, a0 as kt, a1 as Pt, a2 as qe, a3 as Tt, j as $t, a4 as Et, m as Bt, a5 as zt, _ as me, b as ke, a as ge, a6 as It, a7 as Mt, l as oe, a8 as Lt, a9 as Dt, aa as Rt, ab as He, ac as Ze, i as q, k as Ge, ad as De, ae as Ft, af as Je, ag as Ot, ah as Vt, ai as At, aj as Kt, E as Se, ak as Ut, g as xt, al as jt, am as Re, an as Fe } from "./vendor-Tp_GZLnZ.js";
3
- import { D as ee, C as Nt } from "./BaseItem-DbPihwWe.js";
4
- import { _ as le, Z as we } from "./Button-CJChwHqo.js";
5
- import { _ as Wt } from "./Dialog-ChaUWYYq.js";
6
- import { w as qt } from "./utils-BoEvcCS_.js";
2
+ import { $ as We, a0 as kt, a1 as Pt, a2 as qe, a3 as Tt, j as $t, a4 as Et, m as Bt, a5 as zt, _ as me, b as ke, a as ge, a6 as It, a7 as Mt, l as oe, a8 as Lt, a9 as Dt, aa as Rt, ab as He, ac as Ze, i as q, k as Ge, ad as De, ae as Ft, af as Je, ag as Ot, ah as Vt, ai as At, aj as Kt, E as Se, ak as Ut, g as xt, al as jt, am as Re, an as Fe } from "./vendor-C-yFzCvN.js";
3
+ import { D as ee, C as Nt } from "./BaseItem-BmbN3hxP.js";
4
+ import { _ as le, Z as we } from "./Button-DnAj6C7o.js";
5
+ import { _ as Wt } from "./Dialog-Bv42gNoY.js";
6
+ import { w as qt } from "./utils-B9UlcPnQ.js";
7
7
  const Ht = 12;
8
8
  function Pe(m, c, a, f) {
9
9
  return m.reduce((g, y) => {
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as s, openBlock as a, createBlock as l, unref as p, withCtx as r, renderSlot as c, createElementVNode as m } from "vue";
2
- import { _ as i } from "./vendor-Tp_GZLnZ.js";
3
- import { _ as f } from "./Button-CJChwHqo.js";
4
- import { w as _ } from "./utils-BoEvcCS_.js";
2
+ import { _ as i } from "./vendor-C-yFzCvN.js";
3
+ import { _ as f } from "./Button-DnAj6C7o.js";
4
+ import { w as _ } from "./utils-B9UlcPnQ.js";
5
5
  const d = /* @__PURE__ */ s({
6
6
  name: "zh-tool-tips",
7
7
  __name: "ToolTips",