zhihao-ui 1.3.42-alpha.3 → 1.3.42-alpha.4
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.
|
@@ -73,22 +73,22 @@ const Kt = { id: "scale-line-container" }, _t = /* @__PURE__ */ je({
|
|
|
73
73
|
var fe = ((e) => (e.vectorTile = `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=${Ve}`, e.vectorTileMark = `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=${Ve}`, e.satelliteImgTile = `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=${Ve}`, e.satelliteImgTileMark = `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=${Ve}`, e.greenTile = `${gt}/map/tile/{z}/{x}/{y}.png`, e))(fe || {}), ke = /* @__PURE__ */ ((e) => (e[e.M = 1] = "M", e[e.KM = 2] = "KM", e[e.NM = 3] = "NM", e))(ke || {});
|
|
74
74
|
function ro() {
|
|
75
75
|
const e = oe(), n = () => e.value, s = () => n().getView(), l = () => {
|
|
76
|
-
var
|
|
77
|
-
return (
|
|
78
|
-
}, i = (
|
|
76
|
+
var y;
|
|
77
|
+
return (y = s()) == null ? void 0 : y.getZoom();
|
|
78
|
+
}, i = (y) => {
|
|
79
79
|
var E;
|
|
80
|
-
(E = s()) == null || E.setZoom(
|
|
81
|
-
}, o = (
|
|
80
|
+
(E = s()) == null || E.setZoom(y);
|
|
81
|
+
}, o = (y, E) => {
|
|
82
82
|
var z;
|
|
83
|
-
(z = s()) == null || z.setCenter(ee([
|
|
83
|
+
(z = s()) == null || z.setCenter(ee([y, E]));
|
|
84
84
|
}, f = () => {
|
|
85
85
|
var E;
|
|
86
|
-
const
|
|
87
|
-
return At(
|
|
86
|
+
const y = (E = s()) == null ? void 0 : E.getCenter();
|
|
87
|
+
return At(y);
|
|
88
88
|
}, v = () => {
|
|
89
|
-
var
|
|
90
|
-
return (
|
|
91
|
-
}, t = new rt(), r = (
|
|
89
|
+
var y;
|
|
90
|
+
return (y = n()) == null ? void 0 : y.getSize();
|
|
91
|
+
}, t = new rt(), r = (y, E) => {
|
|
92
92
|
g(E);
|
|
93
93
|
const z = {
|
|
94
94
|
zoom: E.zoom,
|
|
@@ -100,7 +100,7 @@ function ro() {
|
|
|
100
100
|
multiWorld: !0
|
|
101
101
|
};
|
|
102
102
|
let M = {
|
|
103
|
-
target:
|
|
103
|
+
target: y,
|
|
104
104
|
controls: Dt({
|
|
105
105
|
zoom: !1
|
|
106
106
|
}),
|
|
@@ -114,34 +114,34 @@ function ro() {
|
|
|
114
114
|
};
|
|
115
115
|
const b = new rt(M);
|
|
116
116
|
e.value = b;
|
|
117
|
-
}, g = (
|
|
117
|
+
}, g = (y) => {
|
|
118
118
|
t.set("vectorTile", new we({
|
|
119
119
|
source: new xe({ url: fe.vectorTile }),
|
|
120
|
-
visible:
|
|
120
|
+
visible: y.layerType === "vector",
|
|
121
121
|
zIndex: 0,
|
|
122
122
|
preload: 1,
|
|
123
123
|
className: "vector"
|
|
124
124
|
})), t.set("vectorTileMark", new we({
|
|
125
125
|
source: new xe({ url: fe.vectorTileMark }),
|
|
126
|
-
visible:
|
|
126
|
+
visible: y.layerType === "vector",
|
|
127
127
|
zIndex: 1,
|
|
128
128
|
preload: 1,
|
|
129
129
|
className: "vector"
|
|
130
130
|
})), t.set("satelliteImgTile", new we({
|
|
131
131
|
source: new xe({ url: fe.satelliteImgTile }),
|
|
132
|
-
visible:
|
|
132
|
+
visible: y.layerType === "satellite",
|
|
133
133
|
zIndex: 0,
|
|
134
134
|
preload: 1,
|
|
135
135
|
className: "satellite"
|
|
136
136
|
})), t.set("satelliteImgTileMark", new we({
|
|
137
137
|
source: new xe({ url: fe.satelliteImgTileMark }),
|
|
138
|
-
visible:
|
|
138
|
+
visible: y.layerType === "satellite",
|
|
139
139
|
zIndex: 1,
|
|
140
140
|
preload: 1,
|
|
141
141
|
className: "satellite"
|
|
142
142
|
})), t.set("greenMark", new we({
|
|
143
143
|
source: new xe({ url: fe.greenTile }),
|
|
144
|
-
visible:
|
|
144
|
+
visible: y.showGreenLayer,
|
|
145
145
|
zIndex: 2,
|
|
146
146
|
className: "greenTile"
|
|
147
147
|
}));
|
|
@@ -225,11 +225,11 @@ const st = (e) => {
|
|
|
225
225
|
let s = null;
|
|
226
226
|
const l = async (g) => {
|
|
227
227
|
if (!e || (console.log("vehicleInfo", g), !(g != null && g.lon && (g != null && g.lat)))) return;
|
|
228
|
-
const
|
|
229
|
-
i(g, ee(
|
|
230
|
-
const E = e == null ? void 0 : e.getView(), z = new ce(
|
|
228
|
+
const y = Math.abs(Number(g.lon)) > 180 ? Ue(g.lon, g.lat) : [g.lon, g.lat];
|
|
229
|
+
i(g, ee(y));
|
|
230
|
+
const E = e == null ? void 0 : e.getView(), z = new ce(y);
|
|
231
231
|
E.setCenter(Me(z.getCoordinates(), _.data, _.mercator));
|
|
232
|
-
}, i = (g,
|
|
232
|
+
}, i = (g, y) => {
|
|
233
233
|
const E = `${gt}map/car-icon.gif`;
|
|
234
234
|
s || (s = new de({
|
|
235
235
|
element: document.createElement("div"),
|
|
@@ -240,7 +240,7 @@ const st = (e) => {
|
|
|
240
240
|
const z = s.getElement();
|
|
241
241
|
z.style.backgroundImage = `url(${E})`, z.style.width = "80px", z.style.height = "80px";
|
|
242
242
|
const M = (g == null ? void 0 : g.drc) || "";
|
|
243
|
-
z.style.transform = `rotate(${M}deg)`, z.style.backgroundSize = "cover", s == null || s.setPosition(
|
|
243
|
+
z.style.transform = `rotate(${M}deg)`, z.style.backgroundSize = "cover", s == null || s.setPosition(y);
|
|
244
244
|
};
|
|
245
245
|
return {
|
|
246
246
|
location: l,
|
|
@@ -248,8 +248,8 @@ const st = (e) => {
|
|
|
248
248
|
const g = s == null ? void 0 : s.getElement();
|
|
249
249
|
g && (g.innerHTML = "");
|
|
250
250
|
},
|
|
251
|
-
renderTrack: (g,
|
|
252
|
-
n.render(g,
|
|
251
|
+
renderTrack: (g, y, E) => {
|
|
252
|
+
n.render(g, y, E, "truck", 1e3);
|
|
253
253
|
},
|
|
254
254
|
setCenter: (g) => {
|
|
255
255
|
n.setCenter(g);
|
|
@@ -257,8 +257,8 @@ const st = (e) => {
|
|
|
257
257
|
closeTrack: () => {
|
|
258
258
|
n.close();
|
|
259
259
|
},
|
|
260
|
-
playTrack: (g,
|
|
261
|
-
n.play(g,
|
|
260
|
+
playTrack: (g, y) => {
|
|
261
|
+
n.play(g, y);
|
|
262
262
|
}
|
|
263
263
|
};
|
|
264
264
|
};
|
|
@@ -273,7 +273,7 @@ const ao = (e) => {
|
|
|
273
273
|
positioning: "top-left",
|
|
274
274
|
className: "track-label-popup"
|
|
275
275
|
});
|
|
276
|
-
let t, r, g,
|
|
276
|
+
let t, r, g, y, E, z = !1, M = Date.now(), b, w = 0, k = null, T = 20;
|
|
277
277
|
const L = 8, D = [], W = (c) => {
|
|
278
278
|
var d;
|
|
279
279
|
for (D.unshift(c); D.length > L; ) {
|
|
@@ -303,7 +303,7 @@ const ao = (e) => {
|
|
|
303
303
|
return;
|
|
304
304
|
W(c), l = c, s[c] = d, T = P;
|
|
305
305
|
const S = Object.keys(s).findIndex((Z) => Z === c) || 0;
|
|
306
|
-
A = h || H[S > 10 ? 10 : S], await
|
|
306
|
+
A = h || H[S > 10 ? 10 : S], await m(), await et(l);
|
|
307
307
|
}, $ = (c) => {
|
|
308
308
|
const d = new ge();
|
|
309
309
|
return new ye({
|
|
@@ -320,7 +320,7 @@ const ao = (e) => {
|
|
|
320
320
|
const p = h === c;
|
|
321
321
|
d.getVisible() !== p && (d.setVisible(p), e.getLayers().getArray().includes(d) || e.addLayer(d), p || (P = d.getSource()) == null || P.clear());
|
|
322
322
|
}), l = c;
|
|
323
|
-
},
|
|
323
|
+
}, m = async () => {
|
|
324
324
|
const c = l;
|
|
325
325
|
if (!n.has(c)) {
|
|
326
326
|
const S = $(c);
|
|
@@ -336,13 +336,13 @@ const ao = (e) => {
|
|
|
336
336
|
}, u = (c, d, h) => {
|
|
337
337
|
const p = new ze(d), P = n.get(c).getSource(), S = P.getFeatureById(c);
|
|
338
338
|
if (S)
|
|
339
|
-
S.setGeometry(p), S.setId(c), S.setStyle(
|
|
339
|
+
S.setGeometry(p), S.setId(c), S.setStyle(x(h)), k = S;
|
|
340
340
|
else {
|
|
341
341
|
const Z = new ae({ geometry: p });
|
|
342
|
-
Z.setId(c), Z.set("type", "line"), Z.setStyle(
|
|
342
|
+
Z.setId(c), Z.set("type", "line"), Z.setStyle(x(h)), P.addFeature(Z), k = Z;
|
|
343
343
|
}
|
|
344
344
|
return k;
|
|
345
|
-
},
|
|
345
|
+
}, x = (c) => new Q({
|
|
346
346
|
stroke: new ve({
|
|
347
347
|
color: c,
|
|
348
348
|
width: 2
|
|
@@ -646,26 +646,26 @@ const ao = (e) => {
|
|
|
646
646
|
}), Lt = (c, d) => {
|
|
647
647
|
var N, q;
|
|
648
648
|
const h = Number(50 * d), p = ((N = c.frameState) == null ? void 0 : N.time) ?? Date.now(), P = p - M;
|
|
649
|
-
if (
|
|
649
|
+
if (w = (w + h * P / 1e6) % 2, M = p, w >= 1) {
|
|
650
650
|
Fe();
|
|
651
651
|
return;
|
|
652
652
|
}
|
|
653
653
|
const S = r.getCoordinateAt(
|
|
654
|
-
|
|
654
|
+
w > 1 ? 2 - w : w
|
|
655
655
|
), Z = r.getCoordinateAt(
|
|
656
|
-
|
|
656
|
+
w > 1 ? w - 0.01 : w
|
|
657
657
|
), O = r.getCoordinateAt(
|
|
658
|
-
|
|
658
|
+
w > 1 ? 2 - w : w + 0.01
|
|
659
659
|
), X = tt(
|
|
660
660
|
it(Z, "array"),
|
|
661
661
|
it(O, "array")
|
|
662
662
|
) * Math.PI / 180;
|
|
663
|
-
(q = Ge.getText()) == null || q.setRotation(X),
|
|
663
|
+
(q = Ge.getText()) == null || q.setRotation(X), y.setCoordinates(S);
|
|
664
664
|
const U = Bt(c);
|
|
665
|
-
U.setStyle(Ge), U.drawGeometry(
|
|
665
|
+
U.setStyle(Ge), U.drawGeometry(y), e == null || e.render();
|
|
666
666
|
}, Et = () => {
|
|
667
667
|
var c;
|
|
668
|
-
z = !0, M = Date.now(),
|
|
668
|
+
z = !0, M = Date.now(), w = 0, y = ((c = g.getGeometry()) == null ? void 0 : c.clone()) || new ce([0, 0]), o && (b == null || b.on("postrender", o)), E == null || E.setGeometry(void 0);
|
|
669
669
|
}, Fe = () => {
|
|
670
670
|
z && (z = !1, E == null || E.setGeometry(void 0), o && b && b.un("postrender", o), b && (e == null || e.removeLayer(b)), b = null, E = null);
|
|
671
671
|
}, Tt = (c, d) => {
|
|
@@ -681,10 +681,10 @@ const ao = (e) => {
|
|
|
681
681
|
geometry: new ce(r.getFirstCoordinate())
|
|
682
682
|
});
|
|
683
683
|
const h = g.getGeometry();
|
|
684
|
-
|
|
684
|
+
y = h ? h.clone() : new ce([0, 0]), E = new ae({
|
|
685
685
|
type: "geoMarker",
|
|
686
686
|
style: Ge,
|
|
687
|
-
geometry:
|
|
687
|
+
geometry: y
|
|
688
688
|
}), b = new ye({
|
|
689
689
|
source: new ge({
|
|
690
690
|
features: [E]
|
|
@@ -875,8 +875,8 @@ const go = (e) => {
|
|
|
875
875
|
return n <= re.shipModelMax && n >= re.shipTriggleMin ? "ship" : "triangle";
|
|
876
876
|
}, Ie = (e, n, s) => {
|
|
877
877
|
if (s === "ship") {
|
|
878
|
-
const { len: l, wid: i } = n, o = 97, f = 20, t = 1 / (e == null ? void 0 : e.getView().getResolution()), r = l * t / o, g = i * t / f,
|
|
879
|
-
return
|
|
878
|
+
const { len: l, wid: i } = n, o = 97, f = 20, t = 1 / (e == null ? void 0 : e.getView().getResolution()), r = l * t / o, g = i * t / f, y = Math.min(r, g);
|
|
879
|
+
return y < 0.2 ? 0.2 : y > 2 ? 2 : y;
|
|
880
880
|
}
|
|
881
881
|
return re.scaleNum;
|
|
882
882
|
}, fo = (e, n, s) => {
|
|
@@ -1007,11 +1007,11 @@ function xo(e, n, s = "left-bottom", l = 2) {
|
|
|
1007
1007
|
const o = pe, f = Be;
|
|
1008
1008
|
if (!f) return "";
|
|
1009
1009
|
o.width = 0, o.height = 0;
|
|
1010
|
-
const v = 2, t = 8, r = 16, g = window.devicePixelRatio || 1,
|
|
1011
|
-
f.font =
|
|
1010
|
+
const v = 2, t = 8, r = 16, g = window.devicePixelRatio || 1, y = "500 12px Arial", E = "14px map-iconfont";
|
|
1011
|
+
f.font = y;
|
|
1012
1012
|
const M = f.measureText(e).width;
|
|
1013
1013
|
f.font = E;
|
|
1014
|
-
const b = n.map((
|
|
1014
|
+
const b = n.map((x) => ({ width: f.measureText(he(x)).width, height: 14 })), w = b.reduce((x, V) => x + V.width, 0), k = (n.length - 1) * l, T = t + M + w + k + t, L = v + 14 + v;
|
|
1015
1015
|
let D, W, A = 0, H = 0, j = 0, F = 0, C = 0, $ = 0;
|
|
1016
1016
|
switch (D = r + T, s) {
|
|
1017
1017
|
case "right-top":
|
|
@@ -1033,13 +1033,13 @@ function xo(e, n, s = "left-bottom", l = 2) {
|
|
|
1033
1033
|
W = r + L, A = T, H = L, j = T + r, F = 0, C = 0, $ = r;
|
|
1034
1034
|
break;
|
|
1035
1035
|
}
|
|
1036
|
-
W = W + v, o.width = Math.round(D * g), o.height = Math.round(W * g), f.scale(g, g), f.clearRect(0, 0, D, W), f.beginPath(), f.moveTo(A, H), f.lineTo(j, F), f.strokeStyle = "#FFF", f.lineWidth = 1, f.stroke(), f.fillStyle = "#FFF", f.fillRect(C, $, T, L), f.font =
|
|
1036
|
+
W = W + v, o.width = Math.round(D * g), o.height = Math.round(W * g), f.scale(g, g), f.clearRect(0, 0, D, W), f.beginPath(), f.moveTo(A, H), f.lineTo(j, F), f.strokeStyle = "#FFF", f.lineWidth = 1, f.stroke(), f.fillStyle = "#FFF", f.fillRect(C, $, T, L), f.font = y, f.textBaseline = "middle";
|
|
1037
1037
|
const a = $ + v + L / 2;
|
|
1038
1038
|
f.strokeStyle = "#ffffff", f.lineWidth = 1, f.strokeText(e, C + t, a), f.fillStyle = "#000000", f.fillText(e, C + t, a), f.font = E, f.fillStyle = "#3370ff";
|
|
1039
|
-
let
|
|
1040
|
-
n.length > 0 && n.forEach((
|
|
1039
|
+
let m = C + t + M + l;
|
|
1040
|
+
n.length > 0 && n.forEach((x, V) => {
|
|
1041
1041
|
const G = $ + v + L / 2;
|
|
1042
|
-
f.fillText(he(
|
|
1042
|
+
f.fillText(he(x), m, G), m += b[V].width + l;
|
|
1043
1043
|
});
|
|
1044
1044
|
const u = o.toDataURL("image/png");
|
|
1045
1045
|
return Ye.set(i, u), u;
|
|
@@ -1100,23 +1100,23 @@ const at = (e, n) => {
|
|
|
1100
1100
|
});
|
|
1101
1101
|
e == null || e.addLayer(i), e == null || e.addLayer(f);
|
|
1102
1102
|
let v = null, t = "", r = {}, g = {};
|
|
1103
|
-
const
|
|
1103
|
+
const y = (a) => {
|
|
1104
1104
|
if (!a || !e) return;
|
|
1105
|
-
const
|
|
1105
|
+
const m = (s == null ? void 0 : s.id) || (n == null ? void 0 : n.get("id"));
|
|
1106
1106
|
if (s) {
|
|
1107
|
-
const u = a.filter((
|
|
1107
|
+
const u = a.filter((x) => x.id === m);
|
|
1108
1108
|
u.length === 0 ? a.push(s) : s = u[0];
|
|
1109
1109
|
}
|
|
1110
|
-
|
|
1110
|
+
w(), $(a), z(), D();
|
|
1111
1111
|
}, E = (a) => {
|
|
1112
1112
|
var R;
|
|
1113
|
-
const
|
|
1113
|
+
const m = (s == null ? void 0 : s.id) || (n == null ? void 0 : n.get("id")), u = ee([a == null ? void 0 : a.lon, a == null ? void 0 : a.lat]), x = ((R = g[a.id]) == null ? void 0 : R.blinkColors) || [], G = x[x.length - 1] || a.fill || "#04C900", B = go(a), J = new ae({
|
|
1114
1114
|
geometry: new ce(u),
|
|
1115
1115
|
// 船舶数据
|
|
1116
1116
|
shipData: a,
|
|
1117
1117
|
id: a.id,
|
|
1118
1118
|
name: a.cnname || a.enname || a.name || a.id || "未命名船舶",
|
|
1119
|
-
selected: a.id ===
|
|
1119
|
+
selected: a.id === m,
|
|
1120
1120
|
// 图标
|
|
1121
1121
|
rightIcons: ct(a),
|
|
1122
1122
|
// 船舶颜色
|
|
@@ -1129,56 +1129,56 @@ const at = (e, n) => {
|
|
|
1129
1129
|
return J.set("clickGeometry", new Ht(u)), J;
|
|
1130
1130
|
}, z = async () => {
|
|
1131
1131
|
if (!s || !e) return;
|
|
1132
|
-
let
|
|
1133
|
-
if (
|
|
1132
|
+
let m = e.getOverlays().getArray().find((u) => u.get("class") == "ship-overlay-selected");
|
|
1133
|
+
if (m) {
|
|
1134
1134
|
const u = vt(e, s);
|
|
1135
|
-
await
|
|
1135
|
+
await m.setElement(u), await m.setPosition(ee([s.lon, s.lat]));
|
|
1136
1136
|
} else
|
|
1137
|
-
|
|
1137
|
+
m = ho(e, s), m && e.addOverlay(m);
|
|
1138
1138
|
setTimeout(() => {
|
|
1139
1139
|
var u;
|
|
1140
|
-
|
|
1140
|
+
m && ((u = m.get("element")) != null && u.parentElement) && (m.get("element").parentElement.style.display = "block");
|
|
1141
1141
|
}, 20);
|
|
1142
1142
|
}, M = (a) => {
|
|
1143
1143
|
if (a === "start") {
|
|
1144
|
-
const
|
|
1144
|
+
const m = () => {
|
|
1145
1145
|
l.getFeatures().forEach((u) => {
|
|
1146
1146
|
u.setStyle(me(e, u));
|
|
1147
|
-
}), v = requestAnimationFrame(
|
|
1147
|
+
}), v = requestAnimationFrame(m);
|
|
1148
1148
|
};
|
|
1149
|
-
|
|
1149
|
+
m();
|
|
1150
1150
|
}
|
|
1151
1151
|
a === "end" && v && (cancelAnimationFrame(v), v = null);
|
|
1152
1152
|
}, b = () => {
|
|
1153
|
-
const
|
|
1154
|
-
if (
|
|
1155
|
-
const u =
|
|
1156
|
-
console.log(V), V && (V.style.transform = `scale(${
|
|
1153
|
+
const m = (e == null ? void 0 : e.getOverlays().getArray()).find((u) => u.get("class") == "ship-overlay-selected");
|
|
1154
|
+
if (m) {
|
|
1155
|
+
const u = m.getElement(), x = Ie(e, s, "ship"), V = u.querySelector("svg");
|
|
1156
|
+
console.log(V), V && (V.style.transform = `scale(${x})`);
|
|
1157
1157
|
}
|
|
1158
|
-
},
|
|
1158
|
+
}, w = () => {
|
|
1159
1159
|
e && l && (k(), l.clear(), o.clear(), M("end"));
|
|
1160
1160
|
}, k = (a) => {
|
|
1161
|
-
const
|
|
1162
|
-
if (
|
|
1163
|
-
for (let u = 0; u <
|
|
1164
|
-
if (
|
|
1165
|
-
const
|
|
1166
|
-
console.log("overlay---",
|
|
1161
|
+
const m = e.getOverlays().getArray().filter((u) => u.get("class") == "zh-map-ship-overlay");
|
|
1162
|
+
if (m && m.length > 0) {
|
|
1163
|
+
for (let u = 0; u < m.length; u++)
|
|
1164
|
+
if (m[u].get("class") !== "ship-overlay-selected") {
|
|
1165
|
+
const x = m[u];
|
|
1166
|
+
console.log("overlay---", x), x.setPosition(void 0), e.removeOverlay(x), x.dispose();
|
|
1167
1167
|
}
|
|
1168
1168
|
}
|
|
1169
|
-
}, T = (a,
|
|
1170
|
-
r = a, g =
|
|
1171
|
-
const u = e.getOverlays().getArray(),
|
|
1169
|
+
}, T = (a, m) => {
|
|
1170
|
+
r = a, g = m;
|
|
1171
|
+
const u = e.getOverlays().getArray(), x = l.getFeatures();
|
|
1172
1172
|
for (const V in r) {
|
|
1173
|
-
const G = r[V], B = u.find((R) => R.getId() === "label-" + V), J =
|
|
1173
|
+
const G = r[V], B = u.find((R) => R.getId() === "label-" + V), J = x.find((R) => V === R.get("id"));
|
|
1174
1174
|
if (B && J) {
|
|
1175
|
-
const R =
|
|
1175
|
+
const R = m[V].blinkColors || [], { shipData: ue, name: le, color: se } = J.getProperties();
|
|
1176
1176
|
J.set("blinking", G), R[(R == null ? void 0 : R.length) - 1] && se !== R[(R == null ? void 0 : R.length) - 1] && (J.set("color", R[(R == null ? void 0 : R.length) - 1] || ""), J.setStyle(me(e, J)));
|
|
1177
1177
|
const Ae = {
|
|
1178
1178
|
...ue,
|
|
1179
1179
|
blinking: G,
|
|
1180
1180
|
blinkingColors: R || [],
|
|
1181
|
-
name: le + "(" +
|
|
1181
|
+
name: le + "(" + m[V].shipState + ")"
|
|
1182
1182
|
}, Ee = B.getElement(), Te = yt(Ae);
|
|
1183
1183
|
Ee && Ee !== Te && B.setElement(Te);
|
|
1184
1184
|
}
|
|
@@ -1186,26 +1186,26 @@ const at = (e, n) => {
|
|
|
1186
1186
|
}, L = () => {
|
|
1187
1187
|
const a = e.getOverlays().getArray();
|
|
1188
1188
|
if (r)
|
|
1189
|
-
for (const
|
|
1190
|
-
const u = a.find((
|
|
1189
|
+
for (const m in r) {
|
|
1190
|
+
const u = a.find((x) => x.getId() === "label-" + m);
|
|
1191
1191
|
if (u) {
|
|
1192
|
-
const
|
|
1193
|
-
|
|
1192
|
+
const x = u.getElement();
|
|
1193
|
+
x && (x.style.opacity = 0);
|
|
1194
1194
|
}
|
|
1195
1195
|
}
|
|
1196
1196
|
}, D = () => {
|
|
1197
1197
|
const a = e.getOverlays().getArray();
|
|
1198
1198
|
if (r)
|
|
1199
|
-
for (const
|
|
1200
|
-
const u = a.find((
|
|
1199
|
+
for (const m in r) {
|
|
1200
|
+
const u = a.find((x) => x.getId() === "label-" + m);
|
|
1201
1201
|
if (u) {
|
|
1202
|
-
const
|
|
1203
|
-
|
|
1202
|
+
const x = u.getElement();
|
|
1203
|
+
x && (x.style.opacity = 1);
|
|
1204
1204
|
}
|
|
1205
1205
|
}
|
|
1206
1206
|
}, W = (a) => {
|
|
1207
1207
|
if (!e) return;
|
|
1208
|
-
const
|
|
1208
|
+
const m = l.getFeatures(), u = o.getFeatures(), x = n ? n.get("id") : "", V = m.filter((R) => R.get("id") !== x), G = u == null ? void 0 : u.filter((R) => R.get("id") !== x), B = /* @__PURE__ */ new Map();
|
|
1209
1209
|
a.forEach((R) => {
|
|
1210
1210
|
B.set(R.id, !0);
|
|
1211
1211
|
});
|
|
@@ -1232,36 +1232,36 @@ const at = (e, n) => {
|
|
|
1232
1232
|
}, A = (a) => {
|
|
1233
1233
|
if (a) {
|
|
1234
1234
|
console.log("选中", a);
|
|
1235
|
-
const
|
|
1236
|
-
|
|
1235
|
+
const m = l.getFeatures().find((x) => x.get("id") === a.id), u = o.getFeatures().find((x) => x.get("id") === a.id);
|
|
1236
|
+
m && (n = m), u && u.set("selected", !0), s = a, z();
|
|
1237
1237
|
} else
|
|
1238
1238
|
console.log("取消选中"), s = null, n = null, F();
|
|
1239
|
-
}, H = Re((a,
|
|
1239
|
+
}, H = Re((a, m, u) => {
|
|
1240
1240
|
try {
|
|
1241
1241
|
if (a) {
|
|
1242
|
-
const
|
|
1243
|
-
if (e.getTargetElement().style.cursor = V ? "pointer" : "",
|
|
1242
|
+
const x = a.get("shipData"), V = a.get("id");
|
|
1243
|
+
if (e.getTargetElement().style.cursor = V ? "pointer" : "", m === "click" && (A(x), u && u(V)), m === "hover") {
|
|
1244
1244
|
t && t !== V && j(), t = V;
|
|
1245
1245
|
const G = l.getFeatures().find((B) => B.get("id") === t);
|
|
1246
1246
|
G == null || G.set("isHighlight", !0), G == null || G.setStyle(me(e, G));
|
|
1247
1247
|
}
|
|
1248
1248
|
} else
|
|
1249
1249
|
e.getTargetElement().style.cursor = "", j();
|
|
1250
|
-
} catch (
|
|
1251
|
-
console.log("handleShipMapEvent",
|
|
1250
|
+
} catch (x) {
|
|
1251
|
+
console.log("handleShipMapEvent", x);
|
|
1252
1252
|
}
|
|
1253
1253
|
}, 10), j = () => {
|
|
1254
|
-
const a = t ? l.getFeatures().find((
|
|
1254
|
+
const a = t ? l.getFeatures().find((m) => m.get("id") === t) : null;
|
|
1255
1255
|
t = null, a == null || a.set("isHighlight", !1), a == null || a.setStyle(me(e, a));
|
|
1256
1256
|
}, F = () => {
|
|
1257
1257
|
try {
|
|
1258
|
-
const
|
|
1259
|
-
|
|
1258
|
+
const m = e.getOverlays().getArray().find((u) => u.get("class") == "ship-overlay-selected");
|
|
1259
|
+
m && m.setPosition(void 0);
|
|
1260
1260
|
} catch (a) {
|
|
1261
1261
|
console.log(a);
|
|
1262
1262
|
}
|
|
1263
|
-
}, C = (a,
|
|
1264
|
-
const u = ee([a == null ? void 0 : a.lon, a == null ? void 0 : a.lat]),
|
|
1263
|
+
}, C = (a, m) => {
|
|
1264
|
+
const u = ee([a == null ? void 0 : a.lon, a == null ? void 0 : a.lat]), x = new ae({
|
|
1265
1265
|
geometry: new ce(u),
|
|
1266
1266
|
name: a.cnname || a.enname || a.name || a.id || "未命名船舶",
|
|
1267
1267
|
// 图标
|
|
@@ -1269,14 +1269,14 @@ const at = (e, n) => {
|
|
|
1269
1269
|
selected: (a == null ? void 0 : a.id) === (s == null ? void 0 : s.id),
|
|
1270
1270
|
shipData: a
|
|
1271
1271
|
});
|
|
1272
|
-
|
|
1273
|
-
const V = at(
|
|
1274
|
-
return
|
|
1272
|
+
x.set("id", a.id);
|
|
1273
|
+
const V = at(x, m);
|
|
1274
|
+
return x.setStyle(V), x;
|
|
1275
1275
|
}, $ = (a) => {
|
|
1276
|
-
const
|
|
1276
|
+
const m = e.getView().getZoom();
|
|
1277
1277
|
a.forEach((u) => {
|
|
1278
|
-
const
|
|
1279
|
-
if (
|
|
1278
|
+
const x = E(u);
|
|
1279
|
+
if (x.setStyle(me(e, x)), l.addFeature(x), (s == null ? void 0 : s.id) == u.id || m >= re.shipModelMin)
|
|
1280
1280
|
if (r[u.id]) {
|
|
1281
1281
|
if (u.id && g[u == null ? void 0 : u.id]) {
|
|
1282
1282
|
const V = g[u == null ? void 0 : u.id] || {}, G = (V == null ? void 0 : V.blinkColors) || [], B = (V == null ? void 0 : V.shipState) || "", J = (u.cnname || u.enname || u.name || u.id || "未命名船舶") + "(" + B + ")", R = {
|
|
@@ -1294,11 +1294,11 @@ const at = (e, n) => {
|
|
|
1294
1294
|
});
|
|
1295
1295
|
};
|
|
1296
1296
|
return {
|
|
1297
|
-
render:
|
|
1297
|
+
render: y,
|
|
1298
1298
|
selected: A,
|
|
1299
1299
|
filter: W,
|
|
1300
1300
|
blinking: T,
|
|
1301
|
-
clear:
|
|
1301
|
+
clear: w,
|
|
1302
1302
|
handleShipMapEvent: H,
|
|
1303
1303
|
changeShipScale: M,
|
|
1304
1304
|
changeSelectedScale: b,
|
|
@@ -1320,17 +1320,17 @@ const at = (e, n) => {
|
|
|
1320
1320
|
if (t !== o.value) {
|
|
1321
1321
|
if (t) {
|
|
1322
1322
|
const r = n();
|
|
1323
|
-
if (!r.getArray().find((
|
|
1324
|
-
const
|
|
1323
|
+
if (!r.getArray().find((y) => y.className_ === "greenTile")) {
|
|
1324
|
+
const y = new we({
|
|
1325
1325
|
source: new xe({ url: fe.greenTile }),
|
|
1326
1326
|
visible: t,
|
|
1327
1327
|
zIndex: 2,
|
|
1328
1328
|
className: "greenTile"
|
|
1329
1329
|
});
|
|
1330
|
-
r.push(
|
|
1330
|
+
r.push(y);
|
|
1331
1331
|
}
|
|
1332
1332
|
} else {
|
|
1333
|
-
const r = n(), g = r.getArray().find((
|
|
1333
|
+
const r = n(), g = r.getArray().find((y) => y.className_ === "greenTile");
|
|
1334
1334
|
g && r.remove(g);
|
|
1335
1335
|
}
|
|
1336
1336
|
o.value = t;
|
|
@@ -1353,7 +1353,7 @@ const at = (e, n) => {
|
|
|
1353
1353
|
const f = (M) => {
|
|
1354
1354
|
if (!(!M || M.length === 0)) {
|
|
1355
1355
|
if (l || (l = new ge()), l.clear(), o) {
|
|
1356
|
-
const b = M.find((
|
|
1356
|
+
const b = M.find((w) => w.id === o.id);
|
|
1357
1357
|
b ? o = b : M.push(o);
|
|
1358
1358
|
}
|
|
1359
1359
|
M.forEach((b) => {
|
|
@@ -1365,14 +1365,14 @@ const at = (e, n) => {
|
|
|
1365
1365
|
}), e == null || e.addLayer(s));
|
|
1366
1366
|
}
|
|
1367
1367
|
}, v = (M) => {
|
|
1368
|
-
const b = e == null ? void 0 : e.getView().getZoom(), [
|
|
1369
|
-
geometry: new ce(ee([Number(
|
|
1368
|
+
const b = e == null ? void 0 : e.getView().getZoom(), [w, k] = M.latLon.split(","), T = new ae({
|
|
1369
|
+
geometry: new ce(ee([Number(w), Number(k)]))
|
|
1370
1370
|
});
|
|
1371
1371
|
T.setStyle(t(M, b, M.id === (o == null ? void 0 : o.id))), T.set("loactionData", M), l.addFeature(T);
|
|
1372
|
-
}, t = (M, b,
|
|
1372
|
+
}, t = (M, b, w) => {
|
|
1373
1373
|
const k = {
|
|
1374
1374
|
image: new Ce({
|
|
1375
|
-
src:
|
|
1375
|
+
src: w && M.selectedPath || M.defaultPath,
|
|
1376
1376
|
scale: 0.5 * b / 10
|
|
1377
1377
|
})
|
|
1378
1378
|
};
|
|
@@ -1401,21 +1401,21 @@ const at = (e, n) => {
|
|
|
1401
1401
|
l.getFeatures().forEach((T) => {
|
|
1402
1402
|
T.get("loactionData").id === M.id && (T == null || T.setStyle(t(M, b, !1)));
|
|
1403
1403
|
}), o = null, i = null;
|
|
1404
|
-
},
|
|
1404
|
+
}, y = (M) => {
|
|
1405
1405
|
M ? (E(), z(M)) : clearSelectedPort();
|
|
1406
1406
|
}, E = () => {
|
|
1407
1407
|
var M;
|
|
1408
1408
|
if (i) {
|
|
1409
|
-
const b = i.get("loactionData"),
|
|
1410
|
-
i.setStyle(t(b,
|
|
1409
|
+
const b = i.get("loactionData"), w = (M = e == null ? void 0 : e.getView()) == null ? void 0 : M.getZoom();
|
|
1410
|
+
i.setStyle(t(b, w, !1));
|
|
1411
1411
|
}
|
|
1412
1412
|
}, z = (M) => {
|
|
1413
1413
|
const b = l.getFeatures();
|
|
1414
|
-
o = M, i = b.find((
|
|
1414
|
+
o = M, i = b.find((w) => w.get("loactionData").id === M.id);
|
|
1415
1415
|
};
|
|
1416
1416
|
return {
|
|
1417
1417
|
render: f,
|
|
1418
|
-
selected:
|
|
1418
|
+
selected: y,
|
|
1419
1419
|
clearSelected: g,
|
|
1420
1420
|
clear: r
|
|
1421
1421
|
};
|
|
@@ -1454,12 +1454,12 @@ const at = (e, n) => {
|
|
|
1454
1454
|
}
|
|
1455
1455
|
}), e == null || e.addLayer(r);
|
|
1456
1456
|
};
|
|
1457
|
-
let
|
|
1457
|
+
let y, E;
|
|
1458
1458
|
const z = (F) => {
|
|
1459
1459
|
if (F.dragging)
|
|
1460
1460
|
return;
|
|
1461
1461
|
let C = "点击选择起点";
|
|
1462
|
-
|
|
1462
|
+
y && (C = "单击继续,双击结束"), o && (o.innerHTML = C, E.setPosition(F.coordinate), o.classList.remove("hidden"));
|
|
1463
1463
|
};
|
|
1464
1464
|
let M;
|
|
1465
1465
|
const b = () => {
|
|
@@ -1491,26 +1491,26 @@ const at = (e, n) => {
|
|
|
1491
1491
|
let F;
|
|
1492
1492
|
M.on("drawstart", function(C) {
|
|
1493
1493
|
var a;
|
|
1494
|
-
|
|
1494
|
+
y = C.feature, y.set("randomId", w());
|
|
1495
1495
|
let $;
|
|
1496
|
-
F = (a =
|
|
1497
|
-
const u =
|
|
1498
|
-
$ = u.getLastCoordinate(), k &&
|
|
1496
|
+
F = (a = y.getGeometry()) == null ? void 0 : a.on("change", function(m) {
|
|
1497
|
+
const u = m.target, x = mt(u, l.value);
|
|
1498
|
+
$ = u.getLastCoordinate(), k && x && (k.innerHTML = x), T.setPosition($);
|
|
1499
1499
|
});
|
|
1500
1500
|
}), M.on("drawend", function() {
|
|
1501
1501
|
var C, $, a;
|
|
1502
1502
|
if (k && (k.className = "ol-tooltip ol-tooltip-static ol-tooltip-measure"), k != null && k.innerHTML) {
|
|
1503
|
-
const
|
|
1504
|
-
s.value.push({ id:
|
|
1503
|
+
const m = (y == null ? void 0 : y.get("randomId")) || w();
|
|
1504
|
+
s.value.push({ id: m, value: k == null ? void 0 : k.innerHTML }), k.innerHTML = `${k.innerHTML}<div class="ol-tooltip-delete-button" data-id="${m}"><i class="map-iconfont icon-delete"></i></div>`;
|
|
1505
1505
|
}
|
|
1506
|
-
(C = document.querySelector(".ol-selectable:has(.ol-tooltip-delete-button):last-child .ol-tooltip-delete-button")) == null || C.addEventListener("click", (
|
|
1507
|
-
var
|
|
1508
|
-
|
|
1509
|
-
const u = (
|
|
1506
|
+
(C = document.querySelector(".ol-selectable:has(.ol-tooltip-delete-button):last-child .ol-tooltip-delete-button")) == null || C.addEventListener("click", (m) => {
|
|
1507
|
+
var x;
|
|
1508
|
+
m.preventDefault(), m.stopPropagation();
|
|
1509
|
+
const u = (x = m.target) == null ? void 0 : x.getAttribute("data-id");
|
|
1510
1510
|
u && A(u);
|
|
1511
|
-
}), T.setOffset([0, -7]),
|
|
1511
|
+
}), T.setOffset([0, -7]), y = null, k = null, L(), F && Xe(F), (a = ($ = n.getProps()) == null ? void 0 : $.lineDrawEnd) == null || a.call($, s.value);
|
|
1512
1512
|
});
|
|
1513
|
-
},
|
|
1513
|
+
}, w = () => Math.random().toString(36).substring(2, 9);
|
|
1514
1514
|
let k, T;
|
|
1515
1515
|
const L = () => {
|
|
1516
1516
|
k != null && k.parentNode && k.parentNode.removeChild(k), k = document.createElement("div"), k.className = "ol-tooltip ol-tooltip-measure", T = new de({
|
|
@@ -1528,23 +1528,23 @@ const at = (e, n) => {
|
|
|
1528
1528
|
}), e == null || e.addOverlay(E);
|
|
1529
1529
|
}, W = () => {
|
|
1530
1530
|
s.value.forEach((F, C) => {
|
|
1531
|
-
var
|
|
1531
|
+
var m, u;
|
|
1532
1532
|
const $ = document.querySelectorAll(".ol-tooltip.ol-tooltip-static.ol-tooltip-measure");
|
|
1533
|
-
$[C] && ((u = (
|
|
1533
|
+
$[C] && ((u = (m = $[C]) == null ? void 0 : m.parentNode) == null || u.removeChild($[C]));
|
|
1534
1534
|
const a = t.getFeatures();
|
|
1535
1535
|
a[C] && t.removeFeature(a[C]);
|
|
1536
1536
|
}), H(), Lo(e), f.value = !1, Le(e, "pointer");
|
|
1537
1537
|
}, A = (F) => {
|
|
1538
|
-
var $, a,
|
|
1539
|
-
const C = s.value.findIndex((
|
|
1538
|
+
var $, a, m, u;
|
|
1539
|
+
const C = s.value.findIndex((x) => x.id === F);
|
|
1540
1540
|
if (C !== -1) {
|
|
1541
1541
|
s.value.splice(C, 1);
|
|
1542
|
-
const
|
|
1543
|
-
|
|
1542
|
+
const x = document.querySelectorAll(".ol-tooltip.ol-tooltip-static.ol-tooltip-measure");
|
|
1543
|
+
x[C] && ((a = ($ = x[C]) == null ? void 0 : $.parentNode) == null || a.removeChild(x[C]));
|
|
1544
1544
|
const V = t.getFeatures();
|
|
1545
1545
|
V[C] && t.removeFeature(V[C]);
|
|
1546
1546
|
}
|
|
1547
|
-
(u = (
|
|
1547
|
+
(u = (m = n.getProps()) == null ? void 0 : m.lineDrawEnd) == null || u.call(m, s.value);
|
|
1548
1548
|
}, H = () => {
|
|
1549
1549
|
if (s.value = [], document.querySelectorAll(".ol-tooltip.ol-tooltip-static").forEach((F) => {
|
|
1550
1550
|
var C;
|
|
@@ -1597,12 +1597,12 @@ const at = (e, n) => {
|
|
|
1597
1597
|
}),
|
|
1598
1598
|
zIndex: 1e3
|
|
1599
1599
|
});
|
|
1600
|
-
v = C, t = F, e.on("pointermove",
|
|
1600
|
+
v = C, t = F, e.on("pointermove", y), e.addLayer(C), e.on(["dblclick"], function($) {
|
|
1601
1601
|
E && ($.stopPropagation(), $.preventDefault());
|
|
1602
1602
|
});
|
|
1603
1603
|
};
|
|
1604
1604
|
let g;
|
|
1605
|
-
const
|
|
1605
|
+
const y = (F) => {
|
|
1606
1606
|
if (F.dragging) return;
|
|
1607
1607
|
const C = g ? "单击继续,双击结束" : "点击选择起点";
|
|
1608
1608
|
L && (L.innerHTML = C, D.setPosition(F.coordinate));
|
|
@@ -1614,9 +1614,9 @@ const at = (e, n) => {
|
|
|
1614
1614
|
const F = s.getGeometry();
|
|
1615
1615
|
if (!F) return;
|
|
1616
1616
|
const C = b(F, "nm");
|
|
1617
|
-
|
|
1617
|
+
w && (w.innerHTML = `
|
|
1618
1618
|
<span class="text">面积:${C}${z ? '<span class="error pl-12">超出可以绘画的距离</span>' : ""}</span>
|
|
1619
|
-
`),
|
|
1619
|
+
`), w && (w.innerHTML += '<span class="delete-icon" ><i class="map-iconfont icon-delete" /></div>');
|
|
1620
1620
|
const $ = F.getCoordinates(), a = $[0][$[0].length - 2];
|
|
1621
1621
|
if (k.setPosition(a), v) {
|
|
1622
1622
|
const u = v.getSource();
|
|
@@ -1625,12 +1625,12 @@ const at = (e, n) => {
|
|
|
1625
1625
|
setTimeout(() => {
|
|
1626
1626
|
var u;
|
|
1627
1627
|
(u = document.querySelector(".delete-icon")) == null || u.addEventListener("click", () => {
|
|
1628
|
-
var
|
|
1629
|
-
console.log("delete"), A(), (V = (
|
|
1628
|
+
var x, V;
|
|
1629
|
+
console.log("delete"), A(), (V = (x = n.getProps()) == null ? void 0 : x.areaDrawEnd) == null || V.call(x, []);
|
|
1630
1630
|
});
|
|
1631
1631
|
}, 0);
|
|
1632
|
-
const
|
|
1633
|
-
e == null || e.getView().setCenter(
|
|
1632
|
+
const m = jt(s.getGeometry().getExtent());
|
|
1633
|
+
e == null || e.getView().setCenter(m);
|
|
1634
1634
|
return;
|
|
1635
1635
|
}
|
|
1636
1636
|
E = new Oe({
|
|
@@ -1661,20 +1661,20 @@ const at = (e, n) => {
|
|
|
1661
1661
|
}), e == null || e.addInteraction(E), E.on("drawstart", (F) => {
|
|
1662
1662
|
var C;
|
|
1663
1663
|
g = F.feature, l = (C = g.getGeometry()) == null ? void 0 : C.on("change", ($) => {
|
|
1664
|
-
const a = $.target,
|
|
1665
|
-
if (z = Number(Ke(V) / 1e3) > 150, !
|
|
1664
|
+
const a = $.target, m = b(a, "nm"), x = a.getCoordinates()[0], V = new ze([x[x.length - 2], x[x.length - 1]]), G = mt(V, "nm");
|
|
1665
|
+
if (z = Number(Ke(V) / 1e3) > 150, !m) return;
|
|
1666
1666
|
const B = '<span class="error pl-4">超出可以绘画的距离</span>';
|
|
1667
|
-
|
|
1667
|
+
w && (w.innerHTML = `
|
|
1668
1668
|
<div class="text">
|
|
1669
|
-
面积:${
|
|
1669
|
+
面积:${m}
|
|
1670
1670
|
${z ? B : ""}
|
|
1671
1671
|
</div>
|
|
1672
1672
|
`), L && (L.innerHTML = `
|
|
1673
1673
|
<div class="text">
|
|
1674
|
-
面积:${
|
|
1674
|
+
面积:${m}
|
|
1675
1675
|
</div>
|
|
1676
1676
|
<div class="text ${z ? "error" : ""}">
|
|
1677
|
-
线段 ${
|
|
1677
|
+
线段 ${x.length - 2}: ${G}
|
|
1678
1678
|
${z ? B : ""}
|
|
1679
1679
|
|
|
1680
1680
|
</div>
|
|
@@ -1684,13 +1684,13 @@ const at = (e, n) => {
|
|
|
1684
1684
|
`);
|
|
1685
1685
|
});
|
|
1686
1686
|
}), E.on("drawend", (F) => {
|
|
1687
|
-
var
|
|
1687
|
+
var m, u, x, V;
|
|
1688
1688
|
if (!F.feature.getGeometry()) return;
|
|
1689
|
-
|
|
1689
|
+
w && !s && (w.innerHTML += '<span class="delete-icon"><i class="map-iconfont icon-delete" /></div>'), s = F.feature, k.setOffset([10, 0]);
|
|
1690
1690
|
const $ = F.feature.getGeometry().getCoordinates(), a = $[0][$[0].length - 2];
|
|
1691
|
-
if (k.setPosition(a), L != null && L.parentNode && L.parentNode.removeChild(L), (
|
|
1691
|
+
if (k.setPosition(a), L != null && L.parentNode && L.parentNode.removeChild(L), (m = n.getProps()) != null && m.areaDrawEnd) {
|
|
1692
1692
|
const G = $[0].map((B) => Me(B, _.mercator, _.data));
|
|
1693
|
-
(
|
|
1693
|
+
(x = (u = n.getProps()) == null ? void 0 : u.areaDrawEnd) == null || x.call(u, G);
|
|
1694
1694
|
}
|
|
1695
1695
|
E && (E.setActive(!1), e == null || e.removeInteraction(E), (e == null ? void 0 : e.getInteractions()).forEach((B) => {
|
|
1696
1696
|
B instanceof Oe && (B.setActive(!1), e == null || e.removeInteraction(B));
|
|
@@ -1708,10 +1708,10 @@ const at = (e, n) => {
|
|
|
1708
1708
|
return $ > 1e4 ? Math.round($ / 1e6 / Math.pow(1.852, 2) * 100) / 100 + " nm<sup>2</sup>" : Math.round($ * 100) / 100 + " m<sup>2</sup>";
|
|
1709
1709
|
}
|
|
1710
1710
|
};
|
|
1711
|
-
let
|
|
1711
|
+
let w, k;
|
|
1712
1712
|
const T = () => {
|
|
1713
|
-
|
|
1714
|
-
element:
|
|
1713
|
+
w != null && w.parentNode && w.parentNode.removeChild(w), w = document.createElement("div"), w.style.display = "flex", w.className = "ol-tooltip ol-tooltip-draw-polygon", k = new de({
|
|
1714
|
+
element: w,
|
|
1715
1715
|
offset: [0, -15],
|
|
1716
1716
|
positioning: "bottom-center",
|
|
1717
1717
|
stopEvent: !1,
|
|
@@ -1728,9 +1728,9 @@ const at = (e, n) => {
|
|
|
1728
1728
|
}, A = () => {
|
|
1729
1729
|
s = null, o();
|
|
1730
1730
|
}, H = () => {
|
|
1731
|
-
i = "close", e.un("pointermove",
|
|
1731
|
+
i = "close", e.un("pointermove", y), g = null, E && (E.abortDrawing(), console.log("abortDrawing"), E.setActive(!1), (e == null ? void 0 : e.getInteractions()).forEach((C) => {
|
|
1732
1732
|
C instanceof Oe && (C.setActive(!1), e == null || e.removeInteraction(C));
|
|
1733
|
-
}), E = null), l && Xe(l), l = void 0, t == null || t.clear(), t = null, v && e.getAllLayers().includes(v) && (e.removeLayer(v), v = null), L != null && L.parentElement && (L.innerHTML = "", L.parentElement.removeChild(L), L = null),
|
|
1733
|
+
}), E = null), l && Xe(l), l = void 0, t == null || t.clear(), t = null, v && e.getAllLayers().includes(v) && (e.removeLayer(v), v = null), L != null && L.parentElement && (L.innerHTML = "", L.parentElement.removeChild(L), L = null), w != null && w.parentElement && (w.innerHTML = "", w.parentElement.removeChild(w), w = null), D && e.removeOverlay(D), k && e.removeOverlay(k), Le(e, "pointer");
|
|
1734
1734
|
};
|
|
1735
1735
|
return {
|
|
1736
1736
|
open: o,
|
|
@@ -1748,7 +1748,7 @@ const at = (e, n) => {
|
|
|
1748
1748
|
});
|
|
1749
1749
|
e == null || e.addLayer(s);
|
|
1750
1750
|
let l = null, i = null;
|
|
1751
|
-
const o = (b,
|
|
1751
|
+
const o = (b, w = !0) => {
|
|
1752
1752
|
if (!b || b.length === 0) return;
|
|
1753
1753
|
if (n.clear(), i) {
|
|
1754
1754
|
const T = b.find((L) => L.id === (i == null ? void 0 : i.id));
|
|
@@ -1761,13 +1761,13 @@ const at = (e, n) => {
|
|
|
1761
1761
|
portData: T,
|
|
1762
1762
|
id: T.id,
|
|
1763
1763
|
select: T.id === (i == null ? void 0 : i.id),
|
|
1764
|
-
showTitle: T.id === (i == null ? void 0 : i.id) ||
|
|
1764
|
+
showTitle: T.id === (i == null ? void 0 : i.id) || w
|
|
1765
1765
|
}), A = r(W);
|
|
1766
1766
|
W.setStyle(A), k.push(W);
|
|
1767
1767
|
}), n.addFeatures(k);
|
|
1768
1768
|
};
|
|
1769
1769
|
let f = null, v = null;
|
|
1770
|
-
const t = (b,
|
|
1770
|
+
const t = (b, w) => {
|
|
1771
1771
|
f || (f = document.createElement("canvas"), v = f.getContext("2d", {
|
|
1772
1772
|
willReadFrequently: !0
|
|
1773
1773
|
}));
|
|
@@ -1777,11 +1777,11 @@ const at = (e, n) => {
|
|
|
1777
1777
|
const L = 2, D = 8, W = window.devicePixelRatio || 1, A = "12px sans-serif";
|
|
1778
1778
|
T.font = A;
|
|
1779
1779
|
const j = T.measureText(b).width, F = D + j + D, C = L + 12 + L * 2;
|
|
1780
|
-
k.width = Math.round(F * W), k.height = Math.round(C * W), T.scale(W, W), T.clearRect(0, 0, F, C), T.fillStyle =
|
|
1780
|
+
k.width = Math.round(F * W), k.height = Math.round(C * W), T.scale(W, W), T.clearRect(0, 0, F, C), T.fillStyle = w ? "#FF5733" : "#FFF", T.fillRect(0, 0, F, C), T.font = A, T.textBaseline = "middle";
|
|
1781
1781
|
const $ = C / 2;
|
|
1782
|
-
return T.strokeStyle =
|
|
1782
|
+
return T.strokeStyle = w ? "#000" : "#ffffff", T.lineWidth = 1, T.strokeText(b, D, $), T.fillStyle = w ? "#FFF" : "#000000", T.fillText(b, D, $), k.toDataURL("image/png");
|
|
1783
1783
|
}, r = (b) => {
|
|
1784
|
-
const { select:
|
|
1784
|
+
const { select: w, showTitle: k } = b.getProperties(), T = (F) => `<svg width="46" height="46" viewBox="0 0 46 46" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
1785
1785
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M22.6563 44.9304C22.5453 44.8844 22.4445 44.817 22.3595 44.7321C22.3595 44.7321 9.36986 31.7424 9.32952 31.6913C7.09059 29.0791 5.64794 25.8802 5.17255 22.4736C4.69716 19.0671 5.20896 15.5957 6.64728 12.471C8.08561 9.34625 10.3902 6.69909 13.2878 4.84325C16.1855 2.98741 19.5548 2.00068 22.9965 2C26.4381 1.99932 29.8078 2.98473 32.7062 4.83943C35.6046 6.69414 37.9102 9.34039 39.3498 12.4646C40.7893 15.5888 41.3025 19.0599 40.8284 22.4666C40.3544 25.8734 38.913 29.0729 36.6751 31.686C36.6401 31.737 23.6531 44.7321 23.6531 44.7321C23.5682 44.817 23.4674 44.8844 23.3564 44.9304C23.2454 44.9763 23.1265 45 23.0063 45C22.8862 45 22.7673 44.9763 22.6563 44.9304Z" fill="${F}"/>
|
|
1786
1786
|
<g clip-path="url(#clip0_10059_122082)">
|
|
1787
1787
|
<path d="M34.8624 22.8687L32.5874 25.6313L33.4812 25.7125C33.4812 25.7125 30.5562 28.0687 27.9562 28.2312C25.3562 28.3937 24.1374 24.9 24.1374 24.9V19.1312H27.6312V17.425H24.2999V15.15C25.7624 14.6625 26.7374 13.2812 26.7374 11.6562C26.7374 9.625 25.1124 8 23.0812 8H22.9999C20.9687 8 19.3437 9.625 19.3437 11.6562C19.3437 13.2812 20.3999 14.6625 21.7812 15.15V17.425H18.4499V19.1312H21.9437V24.9C21.9437 24.9 20.6437 28.3125 18.0437 28.2312C15.4437 28.0687 12.5187 25.7125 12.5187 25.7125L13.4124 25.6313L11.0562 22.8687L10.2437 26.2812L11.2187 26.0375C11.2187 26.0375 13.1687 29.5313 16.1749 30.8313C19.1812 32.2125 22.1874 33.9187 22.8374 34C23.4874 33.9187 26.4937 32.2125 29.4187 30.8313C32.3437 29.45 34.3749 26.0375 34.3749 26.0375L35.3499 26.2812L34.8624 22.8687ZM23.0812 13.6875C21.9437 13.6875 21.0499 12.7937 21.0499 11.6562C21.0499 10.6 21.9437 9.70625 22.9999 9.70625H23.0812C24.1374 9.70625 25.0312 10.6 25.0312 11.6562C25.1124 12.7937 24.1374 13.6875 23.0812 13.6875Z" fill="white"/>
|
|
@@ -1792,22 +1792,22 @@ const at = (e, n) => {
|
|
|
1792
1792
|
</clipPath>
|
|
1793
1793
|
</defs>
|
|
1794
1794
|
</svg>
|
|
1795
|
-
`, L = () => `data:image/svg+xml;utf8,${encodeURIComponent(T(
|
|
1795
|
+
`, L = () => `data:image/svg+xml;utf8,${encodeURIComponent(T(w ? "#FF5733" : "#3370FF"))}`, D = e.getView().getZoom(), W = b.get("portData"), A = window.devicePixelRatio || 1, H = new Q({
|
|
1796
1796
|
image: new Ce({
|
|
1797
1797
|
src: L(),
|
|
1798
1798
|
scale: 0.5 * D / 10
|
|
1799
1799
|
}),
|
|
1800
|
-
zIndex:
|
|
1800
|
+
zIndex: w ? 110 : 100
|
|
1801
1801
|
}), j = new Q({
|
|
1802
1802
|
image: new Ce({
|
|
1803
|
-
src: t(W.shortName,
|
|
1803
|
+
src: t(W.shortName, w),
|
|
1804
1804
|
anchor: [0.5, 0.5],
|
|
1805
1805
|
displacement: [0, -26],
|
|
1806
1806
|
scale: 1 / A,
|
|
1807
1807
|
anchorXUnits: "fraction",
|
|
1808
1808
|
anchorYUnits: "fraction"
|
|
1809
1809
|
}),
|
|
1810
|
-
zIndex:
|
|
1810
|
+
zIndex: w ? 110 : 100
|
|
1811
1811
|
// text: new Text({
|
|
1812
1812
|
// text: port.shortName,
|
|
1813
1813
|
// font: '12px sans-serif',
|
|
@@ -1820,18 +1820,18 @@ const at = (e, n) => {
|
|
|
1820
1820
|
// offsetY: 30,
|
|
1821
1821
|
// }),
|
|
1822
1822
|
});
|
|
1823
|
-
return !k && !
|
|
1823
|
+
return !k && !w ? H : [H, j];
|
|
1824
1824
|
}, g = () => {
|
|
1825
1825
|
if (n)
|
|
1826
1826
|
if (l) {
|
|
1827
1827
|
console.log("清除非选中的港口");
|
|
1828
1828
|
const b = l.get("portData").id;
|
|
1829
|
-
n.getFeatures().forEach((
|
|
1830
|
-
|
|
1829
|
+
n.getFeatures().forEach((w) => {
|
|
1830
|
+
w.get("portData").id !== b && n.removeFeature(w);
|
|
1831
1831
|
});
|
|
1832
1832
|
} else
|
|
1833
1833
|
console.log("清除所有港口", n), n == null || n.clear();
|
|
1834
|
-
},
|
|
1834
|
+
}, y = (b) => {
|
|
1835
1835
|
if (n) {
|
|
1836
1836
|
if (!b)
|
|
1837
1837
|
return E();
|
|
@@ -1840,18 +1840,18 @@ const at = (e, n) => {
|
|
|
1840
1840
|
}, E = () => {
|
|
1841
1841
|
var b;
|
|
1842
1842
|
if (l) {
|
|
1843
|
-
const
|
|
1843
|
+
const w = l == null ? void 0 : l.get("portData"), k = (b = n.getFeatures()) == null ? void 0 : b.find((T) => T.get("portData").id === w.id);
|
|
1844
1844
|
k && (k.set("select", !1), k.setStyle(r(k)), l = null, i = null);
|
|
1845
1845
|
}
|
|
1846
1846
|
}, z = (b) => {
|
|
1847
1847
|
if (!n) return;
|
|
1848
|
-
const
|
|
1849
|
-
i = b, l =
|
|
1848
|
+
const w = n.getFeatures();
|
|
1849
|
+
i = b, l = w.find((k) => k.get("portData").id === b.id), l && (l.set("select", !0), l.setStyle(r(l)));
|
|
1850
1850
|
};
|
|
1851
1851
|
return {
|
|
1852
1852
|
render: o,
|
|
1853
1853
|
clear: g,
|
|
1854
|
-
selected:
|
|
1854
|
+
selected: y,
|
|
1855
1855
|
handlePortHover: (b) => {
|
|
1856
1856
|
b && b.get("portData") && (e != null && e.getTargetElement()) && Le(e, "pointer");
|
|
1857
1857
|
}
|
|
@@ -1870,13 +1870,14 @@ const at = (e, n) => {
|
|
|
1870
1870
|
const r = v == null ? void 0 : v.getEventPixel(t.originalEvent);
|
|
1871
1871
|
if (!r || !v) return;
|
|
1872
1872
|
const g = v.getSize();
|
|
1873
|
-
if (r[0] < 0 || r[0] > g[0] || r[1] < 0 || r[1] > g[1])
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1873
|
+
if (!(r[0] < 0 || r[0] > g[0] || r[1] < 0 || r[1] > g[1])) {
|
|
1874
|
+
console.log(v), console.log(v == null ? void 0 : v.forEachFeatureAtPixel), console.log(v == null ? void 0 : v.forEachFeatureAtPixel(r, (y) => (console.log(y), y)));
|
|
1875
|
+
try {
|
|
1876
|
+
const y = v == null ? void 0 : v.forEachFeatureAtPixel(r, (E) => E);
|
|
1877
|
+
s == null || s.handleTrackMapEvent(y, "hover", t), l == null || l.handleShipMapEvent(y, "hover"), y && (i == null || i.handlePortHover(y));
|
|
1878
|
+
} catch (y) {
|
|
1879
|
+
console.log("pointermove---catch", y);
|
|
1880
|
+
}
|
|
1880
1881
|
}
|
|
1881
1882
|
}), v.on("movestart", () => {
|
|
1882
1883
|
try {
|
|
@@ -1886,7 +1887,7 @@ const at = (e, n) => {
|
|
|
1886
1887
|
console.log("movestart---catch", t);
|
|
1887
1888
|
}
|
|
1888
1889
|
}), v.on("click", Re((t) => {
|
|
1889
|
-
var r, g,
|
|
1890
|
+
var r, g, y;
|
|
1890
1891
|
if (f.getState() !== "open")
|
|
1891
1892
|
try {
|
|
1892
1893
|
if (console.log("1", o.getState()), o.getState()) return;
|
|
@@ -1901,7 +1902,7 @@ const at = (e, n) => {
|
|
|
1901
1902
|
l.handleShipMapEvent(z, "click", (r = n.getProps()) == null ? void 0 : r.selectShip);
|
|
1902
1903
|
else if (z != null && z.get("portData")) {
|
|
1903
1904
|
const M = z.get("portData");
|
|
1904
|
-
i.selected(M), (
|
|
1905
|
+
i.selected(M), (y = (g = n.getProps()) == null ? void 0 : g.selectPort) == null || y.call(g, M);
|
|
1905
1906
|
}
|
|
1906
1907
|
t.preventDefault(), t.stopPropagation();
|
|
1907
1908
|
} catch (E) {
|
|
@@ -1919,9 +1920,9 @@ const at = (e, n) => {
|
|
|
1919
1920
|
o.initMap(l, i);
|
|
1920
1921
|
const f = o.getInstall(), v = ko(f), t = po();
|
|
1921
1922
|
t.setProps(i), v.setShowLayerType(i.layerType), v.setGreenTileVisible(i.showGreenLayer);
|
|
1922
|
-
const r = ao(f), g = co(f, r),
|
|
1923
|
-
So(o, t, r,
|
|
1924
|
-
const
|
|
1923
|
+
const r = ao(f), g = co(f, r), y = bo(f), E = Mo(f), z = Eo(f, t), M = To(f, t), b = Po(f);
|
|
1924
|
+
So(o, t, r, y, b, z, M);
|
|
1925
|
+
const w = () => {
|
|
1925
1926
|
const T = f.getView().calculateExtent(o.getSize()), L = Me([T[0], T[1]], _.mercator, _.data), D = Me([T[2], T[3]], _.mercator, _.data);
|
|
1926
1927
|
return [L[0], L[1], D[0], D[1]];
|
|
1927
1928
|
}, k = {
|
|
@@ -1934,7 +1935,7 @@ const at = (e, n) => {
|
|
|
1934
1935
|
methods: {
|
|
1935
1936
|
...o,
|
|
1936
1937
|
layer: v,
|
|
1937
|
-
ship:
|
|
1938
|
+
ship: y,
|
|
1938
1939
|
track: r,
|
|
1939
1940
|
carTrack: g,
|
|
1940
1941
|
port: {
|
|
@@ -1947,7 +1948,7 @@ const at = (e, n) => {
|
|
|
1947
1948
|
drawPolygon: M,
|
|
1948
1949
|
// 子模块
|
|
1949
1950
|
utils: {
|
|
1950
|
-
getCalculateExtent:
|
|
1951
|
+
getCalculateExtent: w,
|
|
1951
1952
|
convertSixHundredThousandToLatLng: Ue,
|
|
1952
1953
|
calculateCirclePoints: no
|
|
1953
1954
|
}
|
package/dist/es/index.js
CHANGED
|
@@ -17,7 +17,7 @@ import { Z as B } from "./BaseInfo-BhnEjLKF.js";
|
|
|
17
17
|
import { Z as g } from "./DetailHeader-DaabNj_4.js";
|
|
18
18
|
import { Z as x } from "./DiyDataTable-D-UZVciZ.js";
|
|
19
19
|
import { D as V } from "./DiyDataTable-D-UZVciZ.js";
|
|
20
|
-
import { Z as G } from "./Map-
|
|
20
|
+
import { Z as G } from "./Map-DL0k6_Vb.js";
|
|
21
21
|
import { Z as M } from "./Table-B_3YA1mb.js";
|
|
22
22
|
import { Z as $ } from "./BaseItem-C4NJy1i4.js";
|
|
23
23
|
const A = [
|
package/dist/umd/index.umd.cjs
CHANGED
|
@@ -231,7 +231,7 @@ fe.version="2.30.1",Z4(Tt),fe.fn=le,fe.min=BV,fe.max=VV,fe.now=$V,fe.utc=mi,fe.u
|
|
|
231
231
|
</clipPath>
|
|
232
232
|
</defs>
|
|
233
233
|
</svg>
|
|
234
|
-
`,C=()=>`data:image/svg+xml;utf8,${encodeURIComponent(w(y?"#FF5733":"#3370FF"))}`,b=t.getView().getZoom(),E=m.get("portData"),S=window.devicePixelRatio||1,v=new Ct({image:new ao({src:C(),scale:.5*b/10}),zIndex:y?110:100}),k=new Ct({image:new ao({src:c(E.shortName,y),anchor:[.5,.5],displacement:[0,-26],scale:1/S,anchorXUnits:"fraction",anchorYUnits:"fraction"}),zIndex:y?110:100});return!_&&!y?v:[v,k]},u=()=>{if(e)if(r){console.log("清除非选中的港口");const m=r.get("portData").id;e.getFeatures().forEach(y=>{y.get("portData").id!==m&&e.removeFeature(y)})}else console.log("清除所有港口",e),e==null||e.clear()},f=m=>{if(e){if(!m)return p();(r==null?void 0:r.get("portData").id)!==m.id&&(p(),g(m))}},p=()=>{var m;if(r){const y=r==null?void 0:r.get("portData"),_=(m=e.getFeatures())==null?void 0:m.find(w=>w.get("portData").id===y.id);_&&(_.set("select",!1),_.setStyle(d(_)),r=null,o=null)}},g=m=>{if(!e)return;const y=e.getFeatures();o=m,r=y.find(_=>_.get("portData").id===m.id),r&&(r.set("select",!0),r.setStyle(d(r)))};return{render:s,clear:u,selected:f,handlePortHover:m=>{m&&m.get("portData")&&(t!=null&&t.getTargetElement())&&Vc(t,"pointer")}}},H7=(t,e,n,r,o,s,a)=>{const l=t.getInstall();l.on("moveend",()=>{var c,d;try{const u=t.getZoom();(d=(c=e.getProps()).mapMoveEnd)==null||d.call(c,u),n.reRenderTrackLine(),r.changeShipScale("end")}catch(u){console.log("moveend---catch",u)}}),l.on("pointermove",c=>{const d=l==null?void 0:l.getEventPixel(c.originalEvent);if(!d||!l)return;const u=l.getSize();if(d[0]<0||d[0]>u[0]||d[1]<0||d[1]>u[1])return;const f=l==null?void 0:l.forEachFeatureAtPixel(d,p=>p);try{n==null||n.handleTrackMapEvent(f,"hover",c),r==null||r.handleShipMapEvent(f,"hover"),f&&(o==null||o.handlePortHover(f))}catch(p){console.log("pointermove---catch",p)}}),l.on("movestart",()=>{try{const c=l==null?void 0:l.getView().getZoom();c&&c<=Mr.shipModelMax&&c>=Mr.shipTriggleMin&&r.changeShipScale("start"),r.hiddenShipBlink()}catch(c){console.log("movestart---catch",c)}}),l.on("click",Nr(c=>{var d,u,f;if(a.getState()!=="open")try{if(console.log("1",s.getState()),s.getState())return;const p=l.getEventPixel(c.originalEvent),g=l.forEachFeatureAtPixel(p,h=>{if(h!=null&&h.get("shipData")||h!=null&&h.get("portData"))return h});if(g!=null&&g.get("shipData"))r.handleShipMapEvent(g,"click",(d=e.getProps())==null?void 0:d.selectShip);else if(g!=null&&g.get("portData")){const h=g.get("portData");o.selected(h),(f=(u=e.getProps())==null?void 0:u.selectPort)==null||f.call(u,h)}c.preventDefault(),c.stopPropagation()}catch(p){console.log("click---catch",p)}},150)),l.getView().on("change:resolution",Nr(()=>{const c=l==null?void 0:l.getView().getZoom();c&&c<=Mr.shipModelMax&&c>=Mr.shipTriggleMin&&r.changeSelectedScale("start")},10))},U7=()=>{const t=i.reactive([]);return{createInstance:(r,o)=>{const s=r7();s.initMap(r,o);const a=s.getInstall(),l=O7(a),c=N7();c.setProps(o),l.setShowLayerType(o.layerType),l.setGreenTileVisible(o.showGreenLayer);const d=w7(a),u=l7(a,d),f=I7(a),p=L7(a),g=Y7(a,c),h=W7(a,c),m=j7(a);H7(s,c,d,f,m,g,h);const y=()=>{const w=a.getView().calculateExtent(s.getSize()),C=Qi([w[0],w[1]],Yn.mercator,Yn.data),b=Qi([w[2],w[3]],Yn.mercator,Yn.data);return[C[0],C[1],b[0],b[1]]},_={id:Symbol("map-instance"),innerMap:null,map:s.getInstall(),destroy:()=>{t.splice(t.indexOf(_),1)},methods:{...s,layer:l,ship:f,track:d,carTrack:u,port:{render:m.render,clear:m.clear,selected:m.selected},position:p,drawLine:g,drawPolygon:h,utils:{getCalculateExtent:y,convertSixHundredThousandToLatLng:b0,calculateCirclePoints:i7}}};return t.push(_),_},destroyInstance:r=>{const o=t.findIndex(s=>s.id===r);o>-1&&(t[o].destroy(),t.splice(o,1))},destroyAll:()=>{t.forEach(r=>r.destroy()),t.splice(0,t.length)},getAllInstances:()=>[...t]}},K7={class:"zh-map-box"},X7=i.defineComponent({__name:"Map",props:{zoom:{default:Mr.default},center:{default:FG},layerType:{default:"vector"},showGreenLayer:{type:Boolean,default:!1},showScale:{type:Boolean,default:!0},scaleLineUnit:{default:"metric"},mapMoveEnd:{type:Function,default:()=>{}},lineDrawEnd:{},areaDrawEnd:{type:Function,default:()=>{}},selectShip:{type:Function,default:()=>{}},selectPort:{type:Function,default:()=>{}}},setup(t,{expose:e}){const n=i.ref(),r=i.ref(),o=U7(),s=i.ref(),a=t,l=i.ref({getInstall(){}});return i.onMounted(()=>{var c;s.value=o.createInstance(n.value,a),l.value=s.value.methods,(c=r.value)==null||c.setScaleLine(s.value.map,a.scaleLineUnit)}),i.onUnmounted(()=>{var c,d;o.destroyInstance((c=s==null?void 0:s.value)==null?void 0:c.id),(d=s.value)==null||d.destroy()}),e({getZoom:()=>{var c;return(c=s.value)==null?void 0:c.methods.getZoom()},setZoom:c=>{var d;return(d=s.value)==null?void 0:d.methods.setZoom(c)},getInstall:()=>{var c;return(c=s.value)==null?void 0:c.methods.getInstall()},getView:()=>{var c;return(c=s.value)==null?void 0:c.methods.getView()},setCenter:(c,d)=>{var u;return(u=s.value)==null?void 0:u.methods.setCenter(c,d)},getSize:()=>{var c;return(c=s.value)==null?void 0:c.methods.getSize()},getCenter:(c,d)=>{var u;return(u=s.value)==null?void 0:u.methods.getCenter()},layer:{setGreenTileVisible:c=>{var d;return(d=s.value)==null?void 0:d.methods.layer.setGreenTileVisible(c)},getGreenTileVisible:()=>{var c;return(c=s.value)==null?void 0:c.methods.layer.getGreenTileVisible()},getShowLayerType:()=>{var c;return(c=s.value)==null?void 0:c.methods.layer.getShowLayerType()},setShowLayerType:c=>{var d;return(d=s.value)==null?void 0:d.methods.layer.setShowLayerType(c)}},ship:{render:(...c)=>{var d;return(d=s.value)==null?void 0:d.methods.ship.render(...c)},selected:(...c)=>{var d;return(d=s.value)==null?void 0:d.methods.ship.selected(...c)},filter:(...c)=>{var d;return(d=s.value)==null?void 0:d.methods.ship.filter(...c)},blinking:(...c)=>{var d;return(d=s.value)==null?void 0:d.methods.ship.blinking(...c)},clear:()=>{var c;return(c=s.value)==null?void 0:c.methods.ship.clear()}},track:{render:(...c)=>{var d;return(d=s.value)==null?void 0:d.methods.track.render(...c)},remove:(...c)=>{var d;return(d=s.value)==null?void 0:d.methods.track.remove(...c)},play:(...c)=>{var d;return(d=s.value)==null?void 0:d.methods.track.play(...c)},setCenter:(...c)=>{var d;return(d=s.value)==null?void 0:d.methods.track.setCenter(...c)},close:(...c)=>{var d;return(d=s.value)==null?void 0:d.methods.track.close(...c)},getLength:(...c)=>{var d;return(d=s.value)==null?void 0:d.methods.track.getLength(...c)}},carTrack:{location:(...c)=>{var d;return(d=s.value)==null?void 0:d.methods.carTrack.location(...c)},remove:(...c)=>{var d;return(d=s.value)==null?void 0:d.methods.carTrack.remove(...c)},renderTrack:(...c)=>{var d;return(d=s.value)==null?void 0:d.methods.carTrack.renderTrack(...c)},setCenter:(...c)=>{var d;return(d=s.value)==null?void 0:d.methods.carTrack.setCenter(...c)},closeTrack:()=>{var c;return(c=s.value)==null?void 0:c.methods.carTrack.closeTrack()},playTrack:(...c)=>{var d;return(d=s.value)==null?void 0:d.methods.carTrack.playTrack(...c)}},port:{render:(c,d)=>{var u;return(u=s.value)==null?void 0:u.methods.port.render(c,d)},clear:()=>{var c;return(c=s.value)==null?void 0:c.methods.port.clear()},selected:c=>{var d;return(d=s.value)==null?void 0:d.methods.port.selected(c)}},position:{render:(...c)=>{var d;return(d=s.value)==null?void 0:d.methods.position.render(...c)},selected:(...c)=>{var d;return(d=s.value)==null?void 0:d.methods.position.selected(...c)},clearSelected:(...c)=>{var d;return(d=s.value)==null?void 0:d.methods.position.clearSelected(...c)},clear:()=>{var c;return(c=s.value)==null?void 0:c.methods.position.clear()}},drawLine:{open:()=>{var c;return(c=s.value)==null?void 0:c.methods.drawLine.open()},close:()=>{var c;return(c=s.value)==null?void 0:c.methods.drawLine.close()},deleteLine:c=>{var d;return(d=s.value)==null?void 0:d.methods.drawLine.deleteLine(c)},setUnit:c=>{var d;return(d=s.value)==null?void 0:d.methods.drawLine.setUnit(c)},getState:()=>{var c;return(c=s.value)==null?void 0:c.methods.drawLine.getState()}},drawPolygon:{open:()=>{var c;return(c=s.value)==null?void 0:c.methods.drawPolygon.open()},close:()=>{var c;return(c=s.value)==null?void 0:c.methods.drawPolygon.close()},reset:()=>{var c;return(c=s.value)==null?void 0:c.methods.drawPolygon.reset()}},utils:{getCalculateExtent:(...c)=>{var d;return(d=s.value)==null?void 0:d.methods.utils.getCalculateExtent(...c)},convertSixHundredThousandToLatLng:(...c)=>{var d;return(d=s.value)==null?void 0:d.methods.utils.convertSixHundredThousandToLatLng(...c)},calculateCirclePoints:(c,d)=>{var u;return(u=s.value)==null?void 0:u.methods.utils.calculateCirclePoints(c,d)}}}),(c,d)=>(i.openBlock(),i.createElementBlock("div",K7,[i.createElementVNode("div",{id:"map",ref_key:"zhMapRef",ref:n,class:"zh-map"},null,512),i.createVNode(uG,{ref_key:"scaleLineRef",ref:r},null,512),i.createVNode(hG,{ref:"zoomControlRef","map-instance":s.value},null,8,["map-instance"])]))}}),H2=Dt(Ft(X7,[["__scopeId","data-v-1fa3c6fd"]]));var Z7={name:"zh-cn",el:{breadcrumb:{label:"面包屑"},colorpicker:{confirm:"确定",clear:"清空",defaultLabel:"颜色选择器",description:"当前颜色 {color},按 Enter 键选择新颜色",alphaLabel:"选择透明度的值"},datepicker:{now:"此刻",today:"今天",cancel:"取消",clear:"清空",confirm:"确定",dateTablePrompt:"使用方向键与 Enter 键可选择日期",monthTablePrompt:"使用方向键与 Enter 键可选择月份",yearTablePrompt:"使用方向键与 Enter 键可选择年份",selectedDate:"已选日期",selectDate:"选择日期",selectTime:"选择时间",startDate:"开始日期",startTime:"开始时间",endDate:"结束日期",endTime:"结束时间",prevYear:"前一年",nextYear:"后一年",prevMonth:"上个月",nextMonth:"下个月",year:"年",month1:"1 月",month2:"2 月",month3:"3 月",month4:"4 月",month5:"5 月",month6:"6 月",month7:"7 月",month8:"8 月",month9:"9 月",month10:"10 月",month11:"11 月",month12:"12 月",weeks:{sun:"日",mon:"一",tue:"二",wed:"三",thu:"四",fri:"五",sat:"六"},weeksFull:{sun:"星期日",mon:"星期一",tue:"星期二",wed:"星期三",thu:"星期四",fri:"星期五",sat:"星期六"},months:{jan:"一月",feb:"二月",mar:"三月",apr:"四月",may:"五月",jun:"六月",jul:"七月",aug:"八月",sep:"九月",oct:"十月",nov:"十一月",dec:"十二月"}},inputNumber:{decrease:"减少数值",increase:"增加数值"},select:{loading:"加载中",noMatch:"无匹配数据",noData:"无数据",placeholder:"请选择"},dropdown:{toggleDropdown:"切换下拉选项"},mention:{loading:"加载中"},cascader:{noMatch:"无匹配数据",loading:"加载中",placeholder:"请选择",noData:"暂无数据"},pagination:{goto:"前往",pagesize:"条/页",total:"共 {total} 条",pageClassifier:"页",page:"页",prev:"上一页",next:"下一页",currentPage:"第 {pager} 页",prevPages:"向前 {pager} 页",nextPages:"向后 {pager} 页",deprecationWarning:"你使用了一些已被废弃的用法,请参考 el-pagination 的官方文档"},dialog:{close:"关闭此对话框"},drawer:{close:"关闭此对话框"},messagebox:{title:"提示",confirm:"确定",cancel:"取消",error:"输入的数据不合法!",close:"关闭此对话框"},upload:{deleteTip:"按 delete 键可删除",delete:"删除",preview:"查看图片",continue:"继续上传"},slider:{defaultLabel:"滑块介于 {min} 至 {max}",defaultRangeStartLabel:"选择起始值",defaultRangeEndLabel:"选择结束值"},table:{emptyText:"暂无数据",confirmFilter:"筛选",resetFilter:"重置",clearFilter:"全部",sumText:"合计"},tour:{next:"下一步",previous:"上一步",finish:"结束导览"},tree:{emptyText:"暂无数据"},transfer:{noMatch:"无匹配数据",noData:"无数据",titles:["列表 1","列表 2"],filterPlaceholder:"请输入搜索内容",noCheckedFormat:"共 {total} 项",hasCheckedFormat:"已选 {checked}/{total} 项"},image:{error:"加载失败"},pageHeader:{title:"返回"},popconfirm:{confirmButtonText:"确定",cancelButtonText:"取消"},carousel:{leftArrow:"上一张幻灯片",rightArrow:"下一张幻灯片",indicator:"幻灯片切换至索引 {index}"}}};/**!
|
|
234
|
+
`,C=()=>`data:image/svg+xml;utf8,${encodeURIComponent(w(y?"#FF5733":"#3370FF"))}`,b=t.getView().getZoom(),E=m.get("portData"),S=window.devicePixelRatio||1,v=new Ct({image:new ao({src:C(),scale:.5*b/10}),zIndex:y?110:100}),k=new Ct({image:new ao({src:c(E.shortName,y),anchor:[.5,.5],displacement:[0,-26],scale:1/S,anchorXUnits:"fraction",anchorYUnits:"fraction"}),zIndex:y?110:100});return!_&&!y?v:[v,k]},u=()=>{if(e)if(r){console.log("清除非选中的港口");const m=r.get("portData").id;e.getFeatures().forEach(y=>{y.get("portData").id!==m&&e.removeFeature(y)})}else console.log("清除所有港口",e),e==null||e.clear()},f=m=>{if(e){if(!m)return p();(r==null?void 0:r.get("portData").id)!==m.id&&(p(),g(m))}},p=()=>{var m;if(r){const y=r==null?void 0:r.get("portData"),_=(m=e.getFeatures())==null?void 0:m.find(w=>w.get("portData").id===y.id);_&&(_.set("select",!1),_.setStyle(d(_)),r=null,o=null)}},g=m=>{if(!e)return;const y=e.getFeatures();o=m,r=y.find(_=>_.get("portData").id===m.id),r&&(r.set("select",!0),r.setStyle(d(r)))};return{render:s,clear:u,selected:f,handlePortHover:m=>{m&&m.get("portData")&&(t!=null&&t.getTargetElement())&&Vc(t,"pointer")}}},H7=(t,e,n,r,o,s,a)=>{const l=t.getInstall();l.on("moveend",()=>{var c,d;try{const u=t.getZoom();(d=(c=e.getProps()).mapMoveEnd)==null||d.call(c,u),n.reRenderTrackLine(),r.changeShipScale("end")}catch(u){console.log("moveend---catch",u)}}),l.on("pointermove",c=>{const d=l==null?void 0:l.getEventPixel(c.originalEvent);if(!d||!l)return;const u=l.getSize();if(!(d[0]<0||d[0]>u[0]||d[1]<0||d[1]>u[1])){console.log(l),console.log(l==null?void 0:l.forEachFeatureAtPixel),console.log(l==null?void 0:l.forEachFeatureAtPixel(d,f=>(console.log(f),f)));try{const f=l==null?void 0:l.forEachFeatureAtPixel(d,p=>p);n==null||n.handleTrackMapEvent(f,"hover",c),r==null||r.handleShipMapEvent(f,"hover"),f&&(o==null||o.handlePortHover(f))}catch(f){console.log("pointermove---catch",f)}}}),l.on("movestart",()=>{try{const c=l==null?void 0:l.getView().getZoom();c&&c<=Mr.shipModelMax&&c>=Mr.shipTriggleMin&&r.changeShipScale("start"),r.hiddenShipBlink()}catch(c){console.log("movestart---catch",c)}}),l.on("click",Nr(c=>{var d,u,f;if(a.getState()!=="open")try{if(console.log("1",s.getState()),s.getState())return;const p=l.getEventPixel(c.originalEvent),g=l.forEachFeatureAtPixel(p,h=>{if(h!=null&&h.get("shipData")||h!=null&&h.get("portData"))return h});if(g!=null&&g.get("shipData"))r.handleShipMapEvent(g,"click",(d=e.getProps())==null?void 0:d.selectShip);else if(g!=null&&g.get("portData")){const h=g.get("portData");o.selected(h),(f=(u=e.getProps())==null?void 0:u.selectPort)==null||f.call(u,h)}c.preventDefault(),c.stopPropagation()}catch(p){console.log("click---catch",p)}},150)),l.getView().on("change:resolution",Nr(()=>{const c=l==null?void 0:l.getView().getZoom();c&&c<=Mr.shipModelMax&&c>=Mr.shipTriggleMin&&r.changeSelectedScale("start")},10))},U7=()=>{const t=i.reactive([]);return{createInstance:(r,o)=>{const s=r7();s.initMap(r,o);const a=s.getInstall(),l=O7(a),c=N7();c.setProps(o),l.setShowLayerType(o.layerType),l.setGreenTileVisible(o.showGreenLayer);const d=w7(a),u=l7(a,d),f=I7(a),p=L7(a),g=Y7(a,c),h=W7(a,c),m=j7(a);H7(s,c,d,f,m,g,h);const y=()=>{const w=a.getView().calculateExtent(s.getSize()),C=Qi([w[0],w[1]],Yn.mercator,Yn.data),b=Qi([w[2],w[3]],Yn.mercator,Yn.data);return[C[0],C[1],b[0],b[1]]},_={id:Symbol("map-instance"),innerMap:null,map:s.getInstall(),destroy:()=>{t.splice(t.indexOf(_),1)},methods:{...s,layer:l,ship:f,track:d,carTrack:u,port:{render:m.render,clear:m.clear,selected:m.selected},position:p,drawLine:g,drawPolygon:h,utils:{getCalculateExtent:y,convertSixHundredThousandToLatLng:b0,calculateCirclePoints:i7}}};return t.push(_),_},destroyInstance:r=>{const o=t.findIndex(s=>s.id===r);o>-1&&(t[o].destroy(),t.splice(o,1))},destroyAll:()=>{t.forEach(r=>r.destroy()),t.splice(0,t.length)},getAllInstances:()=>[...t]}},K7={class:"zh-map-box"},X7=i.defineComponent({__name:"Map",props:{zoom:{default:Mr.default},center:{default:FG},layerType:{default:"vector"},showGreenLayer:{type:Boolean,default:!1},showScale:{type:Boolean,default:!0},scaleLineUnit:{default:"metric"},mapMoveEnd:{type:Function,default:()=>{}},lineDrawEnd:{},areaDrawEnd:{type:Function,default:()=>{}},selectShip:{type:Function,default:()=>{}},selectPort:{type:Function,default:()=>{}}},setup(t,{expose:e}){const n=i.ref(),r=i.ref(),o=U7(),s=i.ref(),a=t,l=i.ref({getInstall(){}});return i.onMounted(()=>{var c;s.value=o.createInstance(n.value,a),l.value=s.value.methods,(c=r.value)==null||c.setScaleLine(s.value.map,a.scaleLineUnit)}),i.onUnmounted(()=>{var c,d;o.destroyInstance((c=s==null?void 0:s.value)==null?void 0:c.id),(d=s.value)==null||d.destroy()}),e({getZoom:()=>{var c;return(c=s.value)==null?void 0:c.methods.getZoom()},setZoom:c=>{var d;return(d=s.value)==null?void 0:d.methods.setZoom(c)},getInstall:()=>{var c;return(c=s.value)==null?void 0:c.methods.getInstall()},getView:()=>{var c;return(c=s.value)==null?void 0:c.methods.getView()},setCenter:(c,d)=>{var u;return(u=s.value)==null?void 0:u.methods.setCenter(c,d)},getSize:()=>{var c;return(c=s.value)==null?void 0:c.methods.getSize()},getCenter:(c,d)=>{var u;return(u=s.value)==null?void 0:u.methods.getCenter()},layer:{setGreenTileVisible:c=>{var d;return(d=s.value)==null?void 0:d.methods.layer.setGreenTileVisible(c)},getGreenTileVisible:()=>{var c;return(c=s.value)==null?void 0:c.methods.layer.getGreenTileVisible()},getShowLayerType:()=>{var c;return(c=s.value)==null?void 0:c.methods.layer.getShowLayerType()},setShowLayerType:c=>{var d;return(d=s.value)==null?void 0:d.methods.layer.setShowLayerType(c)}},ship:{render:(...c)=>{var d;return(d=s.value)==null?void 0:d.methods.ship.render(...c)},selected:(...c)=>{var d;return(d=s.value)==null?void 0:d.methods.ship.selected(...c)},filter:(...c)=>{var d;return(d=s.value)==null?void 0:d.methods.ship.filter(...c)},blinking:(...c)=>{var d;return(d=s.value)==null?void 0:d.methods.ship.blinking(...c)},clear:()=>{var c;return(c=s.value)==null?void 0:c.methods.ship.clear()}},track:{render:(...c)=>{var d;return(d=s.value)==null?void 0:d.methods.track.render(...c)},remove:(...c)=>{var d;return(d=s.value)==null?void 0:d.methods.track.remove(...c)},play:(...c)=>{var d;return(d=s.value)==null?void 0:d.methods.track.play(...c)},setCenter:(...c)=>{var d;return(d=s.value)==null?void 0:d.methods.track.setCenter(...c)},close:(...c)=>{var d;return(d=s.value)==null?void 0:d.methods.track.close(...c)},getLength:(...c)=>{var d;return(d=s.value)==null?void 0:d.methods.track.getLength(...c)}},carTrack:{location:(...c)=>{var d;return(d=s.value)==null?void 0:d.methods.carTrack.location(...c)},remove:(...c)=>{var d;return(d=s.value)==null?void 0:d.methods.carTrack.remove(...c)},renderTrack:(...c)=>{var d;return(d=s.value)==null?void 0:d.methods.carTrack.renderTrack(...c)},setCenter:(...c)=>{var d;return(d=s.value)==null?void 0:d.methods.carTrack.setCenter(...c)},closeTrack:()=>{var c;return(c=s.value)==null?void 0:c.methods.carTrack.closeTrack()},playTrack:(...c)=>{var d;return(d=s.value)==null?void 0:d.methods.carTrack.playTrack(...c)}},port:{render:(c,d)=>{var u;return(u=s.value)==null?void 0:u.methods.port.render(c,d)},clear:()=>{var c;return(c=s.value)==null?void 0:c.methods.port.clear()},selected:c=>{var d;return(d=s.value)==null?void 0:d.methods.port.selected(c)}},position:{render:(...c)=>{var d;return(d=s.value)==null?void 0:d.methods.position.render(...c)},selected:(...c)=>{var d;return(d=s.value)==null?void 0:d.methods.position.selected(...c)},clearSelected:(...c)=>{var d;return(d=s.value)==null?void 0:d.methods.position.clearSelected(...c)},clear:()=>{var c;return(c=s.value)==null?void 0:c.methods.position.clear()}},drawLine:{open:()=>{var c;return(c=s.value)==null?void 0:c.methods.drawLine.open()},close:()=>{var c;return(c=s.value)==null?void 0:c.methods.drawLine.close()},deleteLine:c=>{var d;return(d=s.value)==null?void 0:d.methods.drawLine.deleteLine(c)},setUnit:c=>{var d;return(d=s.value)==null?void 0:d.methods.drawLine.setUnit(c)},getState:()=>{var c;return(c=s.value)==null?void 0:c.methods.drawLine.getState()}},drawPolygon:{open:()=>{var c;return(c=s.value)==null?void 0:c.methods.drawPolygon.open()},close:()=>{var c;return(c=s.value)==null?void 0:c.methods.drawPolygon.close()},reset:()=>{var c;return(c=s.value)==null?void 0:c.methods.drawPolygon.reset()}},utils:{getCalculateExtent:(...c)=>{var d;return(d=s.value)==null?void 0:d.methods.utils.getCalculateExtent(...c)},convertSixHundredThousandToLatLng:(...c)=>{var d;return(d=s.value)==null?void 0:d.methods.utils.convertSixHundredThousandToLatLng(...c)},calculateCirclePoints:(c,d)=>{var u;return(u=s.value)==null?void 0:u.methods.utils.calculateCirclePoints(c,d)}}}),(c,d)=>(i.openBlock(),i.createElementBlock("div",K7,[i.createElementVNode("div",{id:"map",ref_key:"zhMapRef",ref:n,class:"zh-map"},null,512),i.createVNode(uG,{ref_key:"scaleLineRef",ref:r},null,512),i.createVNode(hG,{ref:"zoomControlRef","map-instance":s.value},null,8,["map-instance"])]))}}),H2=Dt(Ft(X7,[["__scopeId","data-v-1fa3c6fd"]]));var Z7={name:"zh-cn",el:{breadcrumb:{label:"面包屑"},colorpicker:{confirm:"确定",clear:"清空",defaultLabel:"颜色选择器",description:"当前颜色 {color},按 Enter 键选择新颜色",alphaLabel:"选择透明度的值"},datepicker:{now:"此刻",today:"今天",cancel:"取消",clear:"清空",confirm:"确定",dateTablePrompt:"使用方向键与 Enter 键可选择日期",monthTablePrompt:"使用方向键与 Enter 键可选择月份",yearTablePrompt:"使用方向键与 Enter 键可选择年份",selectedDate:"已选日期",selectDate:"选择日期",selectTime:"选择时间",startDate:"开始日期",startTime:"开始时间",endDate:"结束日期",endTime:"结束时间",prevYear:"前一年",nextYear:"后一年",prevMonth:"上个月",nextMonth:"下个月",year:"年",month1:"1 月",month2:"2 月",month3:"3 月",month4:"4 月",month5:"5 月",month6:"6 月",month7:"7 月",month8:"8 月",month9:"9 月",month10:"10 月",month11:"11 月",month12:"12 月",weeks:{sun:"日",mon:"一",tue:"二",wed:"三",thu:"四",fri:"五",sat:"六"},weeksFull:{sun:"星期日",mon:"星期一",tue:"星期二",wed:"星期三",thu:"星期四",fri:"星期五",sat:"星期六"},months:{jan:"一月",feb:"二月",mar:"三月",apr:"四月",may:"五月",jun:"六月",jul:"七月",aug:"八月",sep:"九月",oct:"十月",nov:"十一月",dec:"十二月"}},inputNumber:{decrease:"减少数值",increase:"增加数值"},select:{loading:"加载中",noMatch:"无匹配数据",noData:"无数据",placeholder:"请选择"},dropdown:{toggleDropdown:"切换下拉选项"},mention:{loading:"加载中"},cascader:{noMatch:"无匹配数据",loading:"加载中",placeholder:"请选择",noData:"暂无数据"},pagination:{goto:"前往",pagesize:"条/页",total:"共 {total} 条",pageClassifier:"页",page:"页",prev:"上一页",next:"下一页",currentPage:"第 {pager} 页",prevPages:"向前 {pager} 页",nextPages:"向后 {pager} 页",deprecationWarning:"你使用了一些已被废弃的用法,请参考 el-pagination 的官方文档"},dialog:{close:"关闭此对话框"},drawer:{close:"关闭此对话框"},messagebox:{title:"提示",confirm:"确定",cancel:"取消",error:"输入的数据不合法!",close:"关闭此对话框"},upload:{deleteTip:"按 delete 键可删除",delete:"删除",preview:"查看图片",continue:"继续上传"},slider:{defaultLabel:"滑块介于 {min} 至 {max}",defaultRangeStartLabel:"选择起始值",defaultRangeEndLabel:"选择结束值"},table:{emptyText:"暂无数据",confirmFilter:"筛选",resetFilter:"重置",clearFilter:"全部",sumText:"合计"},tour:{next:"下一步",previous:"上一步",finish:"结束导览"},tree:{emptyText:"暂无数据"},transfer:{noMatch:"无匹配数据",noData:"无数据",titles:["列表 1","列表 2"],filterPlaceholder:"请输入搜索内容",noCheckedFormat:"共 {total} 项",hasCheckedFormat:"已选 {checked}/{total} 项"},image:{error:"加载失败"},pageHeader:{title:"返回"},popconfirm:{confirmButtonText:"确定",cancelButtonText:"取消"},carousel:{leftArrow:"上一张幻灯片",rightArrow:"下一张幻灯片",indicator:"幻灯片切换至索引 {index}"}}};/**!
|
|
235
235
|
* Sortable 1.15.6
|
|
236
236
|
* @author RubaXa <trash@rubaxa.org>
|
|
237
237
|
* @author owenm <owen23355@gmail.com>
|