@shjjs/visual-ui 3.0.2 → 3.0.3
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.
- package/es/commons/plugins/datasource/index.mjs +14 -14
- package/es/commons/plugins/datasource/sources/api.mjs +23 -23
- package/es/components/Scene/components/Map3d/index.vue.mjs +2 -2
- package/es/components/Scene/components/Map3d/index.vue2.mjs +88 -82
- package/es/packages/components/Scene/components/Map3d/index.vue.d.ts +1 -0
- package/es/widgets.css +1 -1
- package/package.json +1 -1
- package/umd/index.js +182 -182
- package/umd/widgets.css +1 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
var y = Object.defineProperty;
|
|
2
|
-
var w = (
|
|
3
|
-
var h = (
|
|
2
|
+
var w = (u, t, e) => t in u ? y(u, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : u[t] = e;
|
|
3
|
+
var h = (u, t, e) => w(u, typeof t != "symbol" ? t + "" : t, e);
|
|
4
4
|
import { cloneDeep as x, isString as k } from "lodash";
|
|
5
5
|
import { parseStaticData as C } from "./sources/static.mjs";
|
|
6
6
|
import { parseUrlData as M } from "./sources/url.mjs";
|
|
7
7
|
import { parseVariableData as v } from "./sources/variable.mjs";
|
|
8
8
|
import { parseAPIPort as A } from "./sources/api.mjs";
|
|
9
|
-
import { DataSourceUtils as
|
|
10
|
-
import { parseStorage as
|
|
11
|
-
import { parseMqttData as
|
|
9
|
+
import { DataSourceUtils as E } from "./utils/utils.mjs";
|
|
10
|
+
import { parseStorage as U } from "./sources/storage.mjs";
|
|
11
|
+
import { parseMqttData as B } from "./sources/mqtt.mjs";
|
|
12
12
|
import { parseWebSocketData as T } from "./sources/websocket.mjs";
|
|
13
13
|
import { MqttConnectionPoolManager as m } from "./utils/mqttConnectionPool.mjs";
|
|
14
14
|
import { WebSocketConnectionPoolManager as S } from "./utils/websocketConnectionPool.mjs";
|
|
@@ -195,7 +195,7 @@ const c = class c {
|
|
|
195
195
|
});
|
|
196
196
|
return;
|
|
197
197
|
}
|
|
198
|
-
this.setupInterval(t, r, a, i, e), this.executeTask(t, a, i, (o) => {
|
|
198
|
+
this.markDataSourceExecuting(t.id), this.setupInterval(t, r, a, i, e), this.executeTask(t, a, i, (o) => {
|
|
199
199
|
e(o), this.markDataSourceCompleted(t.id);
|
|
200
200
|
});
|
|
201
201
|
}
|
|
@@ -242,7 +242,7 @@ const c = class c {
|
|
|
242
242
|
const P = e;
|
|
243
243
|
c.filterData(i, e).then(
|
|
244
244
|
(l) => {
|
|
245
|
-
const
|
|
245
|
+
const p = {
|
|
246
246
|
id: a,
|
|
247
247
|
finalKeyData: { id: a, data: null },
|
|
248
248
|
finalUserData: { id: a, data: null },
|
|
@@ -257,10 +257,10 @@ const c = class c {
|
|
|
257
257
|
n,
|
|
258
258
|
s
|
|
259
259
|
);
|
|
260
|
-
|
|
260
|
+
p.finalKeyData.data = d.length ? q(d, o) : l, p.finalUserData.data = d.length ? d : l;
|
|
261
261
|
} else
|
|
262
|
-
|
|
263
|
-
f(
|
|
262
|
+
p.finalUserData.data = l, p.noMappingData = l;
|
|
263
|
+
f(p);
|
|
264
264
|
}
|
|
265
265
|
);
|
|
266
266
|
});
|
|
@@ -276,7 +276,7 @@ const c = class c {
|
|
|
276
276
|
return e;
|
|
277
277
|
try {
|
|
278
278
|
let a = t.replace(/\/\*[\s\S]*?\*\/|\/\/.*/g, "");
|
|
279
|
-
a =
|
|
279
|
+
a = E.replaceStringVariables(a);
|
|
280
280
|
const r = `
|
|
281
281
|
${a}
|
|
282
282
|
if (typeof filter !== 'function') {
|
|
@@ -321,12 +321,12 @@ h(c, "parsers", /* @__PURE__ */ new Set([
|
|
|
321
321
|
{ type: "static", parser: C },
|
|
322
322
|
{ type: "variable", parser: v },
|
|
323
323
|
{ type: "api", parser: A },
|
|
324
|
-
{ type: "storage", parser:
|
|
325
|
-
{ type: "mqtt", parser:
|
|
324
|
+
{ type: "storage", parser: U },
|
|
325
|
+
{ type: "mqtt", parser: B },
|
|
326
326
|
{ type: "ws", parser: T }
|
|
327
327
|
]));
|
|
328
328
|
let D = c;
|
|
329
329
|
export {
|
|
330
|
-
|
|
330
|
+
E as DataSourceUtils,
|
|
331
331
|
D as SHJDatasourceV2
|
|
332
332
|
};
|
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
import { SHJDatasourceV2 as
|
|
1
|
+
import { SHJDatasourceV2 as l } from "../index.mjs";
|
|
2
2
|
import { httpRequest as f } from "../utils/request.mjs";
|
|
3
3
|
import { DataSourceUtils as t } from "../utils/utils.mjs";
|
|
4
|
-
const
|
|
5
|
-
const { api:
|
|
4
|
+
const v = (e, h, n) => {
|
|
5
|
+
const { api: i } = e.source;
|
|
6
6
|
try {
|
|
7
|
-
if (
|
|
8
|
-
let { isHeaders: y, isBody: c, headers: r, contentType: d, url: a, postParam:
|
|
9
|
-
const
|
|
10
|
-
|
|
7
|
+
if (i) {
|
|
8
|
+
let { isHeaders: y, isBody: c, headers: r, contentType: d, url: a, postParam: s } = i;
|
|
9
|
+
const E = t.getEnvironments(), o = (U) => {
|
|
10
|
+
U.then((m) => {
|
|
11
11
|
if (m.status === 200) {
|
|
12
|
-
|
|
12
|
+
l.processData(
|
|
13
13
|
e.source,
|
|
14
14
|
m.data,
|
|
15
15
|
e.id,
|
|
16
16
|
h
|
|
17
17
|
).then((D) => {
|
|
18
|
-
D &&
|
|
19
|
-
}).catch(() =>
|
|
18
|
+
D && n(D);
|
|
19
|
+
}).catch(() => n(t.noneData(e.id)));
|
|
20
20
|
return;
|
|
21
21
|
}
|
|
22
|
-
|
|
22
|
+
n(t.noneData(e.id));
|
|
23
23
|
}).catch(() => {
|
|
24
|
-
|
|
24
|
+
n(t.noneData(e.id));
|
|
25
25
|
});
|
|
26
|
-
},
|
|
27
|
-
a = t.replaceURLVariables(a), a = t.replaceStringVariables(a), c && (
|
|
26
|
+
}, p = i.isUseEnv ? E.envBaseUrl : "";
|
|
27
|
+
a = t.replaceURLVariables(a), a = t.replaceStringVariables(a), c && (s = t.replaceObjectVariables(s)), y && (r = t.replaceObjectVariables(r)), i.type === "GET" && o(f.get(p + a, { headers: r })), i.type === "POST" && o(
|
|
28
28
|
f.post(
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
p + a,
|
|
30
|
+
s,
|
|
31
31
|
{ headers: r },
|
|
32
32
|
d
|
|
33
33
|
)
|
|
34
|
-
),
|
|
34
|
+
), i.type === "PUT" && o(
|
|
35
35
|
f.put(
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
p + a,
|
|
37
|
+
s,
|
|
38
38
|
{ headers: r },
|
|
39
39
|
d
|
|
40
40
|
)
|
|
41
|
-
),
|
|
41
|
+
), i.type === "DELETE" && o(f.delete(p + a, { headers: r }));
|
|
42
42
|
} else
|
|
43
|
-
|
|
43
|
+
n(t.noneData(e.id));
|
|
44
44
|
} catch {
|
|
45
|
-
|
|
45
|
+
n(t.noneData(e.id));
|
|
46
46
|
}
|
|
47
47
|
};
|
|
48
48
|
export {
|
|
49
49
|
f as httpRequest,
|
|
50
|
-
|
|
50
|
+
v as parseAPIPort
|
|
51
51
|
};
|
|
@@ -2,7 +2,7 @@ import o from "./index.vue2.mjs";
|
|
|
2
2
|
/* empty css */
|
|
3
3
|
/* empty css */
|
|
4
4
|
import t from "../../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
5
|
-
const
|
|
5
|
+
const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-673277b1"]]);
|
|
6
6
|
export {
|
|
7
|
-
|
|
7
|
+
a as default
|
|
8
8
|
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { defineComponent as P, computed as
|
|
2
|
-
import { cloneDeep as v, isEqual as
|
|
1
|
+
import { defineComponent as P, computed as O, ref as f, onMounted as X, nextTick as Y, onBeforeUnmount as Z, watch as E, createElementBlock as u, openBlock as d, createElementVNode as B, normalizeClass as W, createCommentVNode as L, normalizeStyle as h, Fragment as z, renderList as T, toDisplayString as x, unref as _ } from "vue";
|
|
2
|
+
import { cloneDeep as v, isEqual as w } from "lodash";
|
|
3
3
|
import $ from "gsap";
|
|
4
|
-
import { useFps as
|
|
5
|
-
import { World as
|
|
6
|
-
import { initWatch as
|
|
4
|
+
import { useFps as ee } from "@vueuse/core";
|
|
5
|
+
import { World as te } from "./utils/map.mjs";
|
|
6
|
+
import { initWatch as oe } from "./watch.mjs";
|
|
7
7
|
import "three";
|
|
8
8
|
import "d3-geo";
|
|
9
9
|
import "three/examples/jsm/controls/OrbitControls";
|
|
10
10
|
import "three/examples/jsm/loaders/GLTFLoader";
|
|
11
11
|
import "three/examples/jsm/loaders/DRACOLoader.js";
|
|
12
|
-
import { createHistory as
|
|
12
|
+
import { createHistory as re } from "./utils/mini3d/utils/CreateHistory.mjs";
|
|
13
13
|
import "three/examples/jsm/libs/lil-gui.module.min";
|
|
14
14
|
import "three/examples/jsm/utils/BufferGeometryUtils";
|
|
15
15
|
import "three/examples/jsm/renderers/CSS3DRenderer";
|
|
@@ -168,15 +168,15 @@ import "../UnityIframe/index.mjs";
|
|
|
168
168
|
import "../UnityWebgl/index.mjs";
|
|
169
169
|
import "../Vr/index.mjs";
|
|
170
170
|
import "../Earth/index.mjs";
|
|
171
|
-
import { SHJDatasourceV2 as
|
|
171
|
+
import { SHJDatasourceV2 as ae } from "../../../../commons/plugins/datasource/index.mjs";
|
|
172
172
|
import { SHJParseEvent as s } from "../../../../commons/plugins/event/index.mjs";
|
|
173
|
-
import { upgradeMap3d as
|
|
174
|
-
import { Utils as
|
|
175
|
-
const
|
|
173
|
+
import { upgradeMap3d as le } from "./version.mjs";
|
|
174
|
+
import { Utils as k } from "../../../../commons/utils/utils.mjs";
|
|
175
|
+
const ie = { style: { width: "100%", height: "100%" } }, ne = { class: "value" }, ce = ["onClick"], pe = {
|
|
176
176
|
key: 3,
|
|
177
177
|
class: "fps"
|
|
178
|
-
},
|
|
179
|
-
...
|
|
178
|
+
}, se = P({ name: "ShjMap3d" }), Cr = /* @__PURE__ */ P({
|
|
179
|
+
...se,
|
|
180
180
|
props: {
|
|
181
181
|
option: {},
|
|
182
182
|
sources: {},
|
|
@@ -195,10 +195,10 @@ const ae = { style: { width: "100%", height: "100%" } }, le = { class: "value" }
|
|
|
195
195
|
"on-return",
|
|
196
196
|
"on-data-change"
|
|
197
197
|
],
|
|
198
|
-
setup(l, { expose:
|
|
199
|
-
const a =
|
|
198
|
+
setup(l, { expose: V, emit: N }) {
|
|
199
|
+
const a = O(() => le(l.option)), p = N, r = f(), H = f(!1), j = f(!1), C = "zerov-map3d-scene", y = f(), i = new re(), g = f(!1), b = (e = !0) => {
|
|
200
200
|
r.value.cleanAllBar(), r.value.cleanAllScatter(), r.value.cleanAllFlyLine(), r.value.createAllRegionalLevel(), l.sources && l.sources.length > 0 && a.value.widgets.forEach((o, t) => {
|
|
201
|
-
|
|
201
|
+
ae.parse({
|
|
202
202
|
sources: [l.sources[t]],
|
|
203
203
|
callback: (n) => {
|
|
204
204
|
try {
|
|
@@ -224,15 +224,15 @@ const ae = { style: { width: "100%", height: "100%" } }, le = { class: "value" }
|
|
|
224
224
|
}
|
|
225
225
|
});
|
|
226
226
|
});
|
|
227
|
-
},
|
|
227
|
+
}, U = () => {
|
|
228
228
|
try {
|
|
229
|
-
|
|
229
|
+
y.value && document.getElementById(C) && y.value.removeChild(document.getElementById(C));
|
|
230
230
|
const e = document.createElement("canvas");
|
|
231
|
-
e.id =
|
|
231
|
+
e.id = C, e.className = "zerov-map-3d", e.style.width = "100%", e.style.height = "100%", y.value.appendChild(e);
|
|
232
232
|
} catch {
|
|
233
233
|
}
|
|
234
|
-
},
|
|
235
|
-
document.getElementById(
|
|
234
|
+
}, S = (e) => (H.value = !1, j.value = !1, r.value && (r.value.destroy(), r.value = null), U(), new te(
|
|
235
|
+
document.getElementById(C),
|
|
236
236
|
{ geoProjectionCenter: [108.55, 36.32] },
|
|
237
237
|
e,
|
|
238
238
|
{
|
|
@@ -246,14 +246,14 @@ const ae = { style: { width: "100%", height: "100%" } }, le = { class: "value" }
|
|
|
246
246
|
if (p("on-area-click", t), s.parseEvents(l.useEvents, "on-area-click", t), t.adcode !== i.present && e.scene.isDrilling && e.scene.defaultMapAdcode !== 1) {
|
|
247
247
|
p("on-drill-down", t), s.parseEvents(l.useEvents, "on-drill-down", t);
|
|
248
248
|
const n = v(e);
|
|
249
|
-
n.scene.defaultMapAdcode = t.adcode, r.value =
|
|
249
|
+
n.scene.defaultMapAdcode = t.adcode, r.value = S(n), i.push(t.adcode), i.past.length <= 0 ? g.value = !1 : g.value = !0;
|
|
250
250
|
}
|
|
251
251
|
},
|
|
252
252
|
onMapSuccess: () => {
|
|
253
|
-
|
|
253
|
+
H.value = !0, p("on-loaded"), s.parseEvents(l.useEvents, "on-loaded", null);
|
|
254
254
|
},
|
|
255
255
|
onMapAnimationSuccess: () => {
|
|
256
|
-
|
|
256
|
+
b(), j.value = !0, p("on-animated"), s.parseEvents(l.useEvents, "on-animated", null);
|
|
257
257
|
},
|
|
258
258
|
onClickBar: (t) => {
|
|
259
259
|
p("on-bar-click", t), s.parseEvents(l.useEvents, "on-bar-click", t);
|
|
@@ -265,18 +265,24 @@ const ae = { style: { width: "100%", height: "100%" } }, le = { class: "value" }
|
|
|
265
265
|
p("on-flyline-click", t), s.parseEvents(l.useEvents, "on-flyline-click", t);
|
|
266
266
|
}
|
|
267
267
|
}
|
|
268
|
-
))
|
|
269
|
-
|
|
270
|
-
|
|
268
|
+
)), A = () => {
|
|
269
|
+
if (!y.value) return;
|
|
270
|
+
const { clientWidth: e, clientHeight: o } = y.value;
|
|
271
|
+
!e || !o || (r.value = S(a.value), i.push(a.value.scene.defaultMapAdcode), oe(
|
|
271
272
|
{ option: a.value, sources: l.sources, useEvents: l.useEvents },
|
|
272
273
|
r,
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
)
|
|
277
|
-
|
|
274
|
+
S,
|
|
275
|
+
b,
|
|
276
|
+
D
|
|
277
|
+
));
|
|
278
|
+
};
|
|
279
|
+
X(() => {
|
|
280
|
+
Y(() => {
|
|
281
|
+
A();
|
|
282
|
+
}), window.addEventListener("resize", () => {
|
|
283
|
+
A();
|
|
278
284
|
});
|
|
279
|
-
}),
|
|
285
|
+
}), Z(() => {
|
|
280
286
|
r.value && r.value.destroy();
|
|
281
287
|
});
|
|
282
288
|
const I = () => {
|
|
@@ -288,10 +294,10 @@ const ae = { style: { width: "100%", height: "100%" } }, le = { class: "value" }
|
|
|
288
294
|
adcode: i.present
|
|
289
295
|
}), i.undo();
|
|
290
296
|
const e = v(a.value);
|
|
291
|
-
e.scene.defaultMapAdcode = i.present, r.value =
|
|
292
|
-
},
|
|
293
|
-
i.empty(), i.push(a.value.scene.defaultMapAdcode), r.value =
|
|
294
|
-
},
|
|
297
|
+
e.scene.defaultMapAdcode = i.present, r.value = S(e), i.past.length <= 0 ? g.value = !1 : g.value = !0;
|
|
298
|
+
}, D = () => {
|
|
299
|
+
i.empty(), i.push(a.value.scene.defaultMapAdcode), r.value = S(a.value), i.past.length <= 0 ? g.value = !1 : g.value = !0;
|
|
300
|
+
}, J = (e, o, t) => {
|
|
295
301
|
$.timeline().add(
|
|
296
302
|
$.to(r.value.camera.instance.position, {
|
|
297
303
|
duration: 2,
|
|
@@ -303,29 +309,29 @@ const ae = { style: { width: "100%", height: "100%" } }, le = { class: "value" }
|
|
|
303
309
|
})
|
|
304
310
|
);
|
|
305
311
|
};
|
|
306
|
-
|
|
307
|
-
refresh: () =>
|
|
308
|
-
refreshView: () =>
|
|
309
|
-
refreshData: () =>
|
|
312
|
+
V({
|
|
313
|
+
refresh: () => b(),
|
|
314
|
+
refreshView: () => b(),
|
|
315
|
+
refreshData: () => b(),
|
|
310
316
|
// 返回上一级
|
|
311
317
|
goBack: () => I(),
|
|
312
318
|
// 更新相机位置
|
|
313
|
-
setCameraPosition: (e, o, t) =>
|
|
319
|
+
setCameraPosition: (e, o, t) => J(e, o, t)
|
|
314
320
|
});
|
|
315
|
-
const
|
|
321
|
+
const q = ee(), M = f(), G = (e) => {
|
|
316
322
|
if (M.value && e) {
|
|
317
323
|
const o = `url(${e.backgroundImage})`;
|
|
318
324
|
return {
|
|
319
|
-
...
|
|
320
|
-
...
|
|
321
|
-
...
|
|
325
|
+
...k.json2cssObject(e.background),
|
|
326
|
+
...k.json2cssObject(e.border),
|
|
327
|
+
...k.json2cssObject(e.text),
|
|
322
328
|
left: a.value.backButton.left + "%",
|
|
323
329
|
bottom: a.value.backButton.bottom + "%",
|
|
324
330
|
"background-image": o
|
|
325
331
|
};
|
|
326
332
|
}
|
|
327
333
|
return {};
|
|
328
|
-
}, m = f(v(a.value.widgets)), c =
|
|
334
|
+
}, m = f(v(a.value.widgets)), c = O(() => {
|
|
329
335
|
try {
|
|
330
336
|
const e = m.value.filter(
|
|
331
337
|
(o) => o.type === "regionalLevel"
|
|
@@ -335,22 +341,22 @@ const ae = { style: { width: "100%", height: "100%" } }, le = { class: "value" }
|
|
|
335
341
|
return null;
|
|
336
342
|
}
|
|
337
343
|
});
|
|
338
|
-
|
|
344
|
+
E(
|
|
339
345
|
() => v(a.value.widgets),
|
|
340
346
|
(e, o) => {
|
|
341
347
|
try {
|
|
342
|
-
!
|
|
348
|
+
!w(e, o) && r.value && (m.value = v(a.value.widgets));
|
|
343
349
|
} catch {
|
|
344
350
|
}
|
|
345
351
|
},
|
|
346
352
|
{
|
|
347
353
|
deep: !0
|
|
348
354
|
}
|
|
349
|
-
),
|
|
355
|
+
), E(
|
|
350
356
|
() => v(m.value.filter((e) => e.type === "bar")),
|
|
351
357
|
(e, o) => {
|
|
352
358
|
try {
|
|
353
|
-
!
|
|
359
|
+
!w(e, o) && r.value && e.length === o.length && e.forEach((t) => {
|
|
354
360
|
r.value.createBar(t, void 0, !1);
|
|
355
361
|
});
|
|
356
362
|
} catch {
|
|
@@ -359,11 +365,11 @@ const ae = { style: { width: "100%", height: "100%" } }, le = { class: "value" }
|
|
|
359
365
|
{
|
|
360
366
|
deep: !0
|
|
361
367
|
}
|
|
362
|
-
),
|
|
368
|
+
), E(
|
|
363
369
|
() => v(m.value.filter((e) => e.type === "scatter")),
|
|
364
370
|
(e, o) => {
|
|
365
371
|
try {
|
|
366
|
-
!
|
|
372
|
+
!w(e, o) && r.value && e.length === o.length && e.forEach((t) => {
|
|
367
373
|
r.value.createScatter(t, void 0, !1);
|
|
368
374
|
});
|
|
369
375
|
} catch {
|
|
@@ -372,11 +378,11 @@ const ae = { style: { width: "100%", height: "100%" } }, le = { class: "value" }
|
|
|
372
378
|
{
|
|
373
379
|
deep: !0
|
|
374
380
|
}
|
|
375
|
-
),
|
|
381
|
+
), E(
|
|
376
382
|
() => v(m.value.filter((e) => e.type === "flyline")),
|
|
377
383
|
(e, o) => {
|
|
378
384
|
try {
|
|
379
|
-
!
|
|
385
|
+
!w(e, o) && r.value && e.length === o.length && e.forEach((t) => {
|
|
380
386
|
r.value.createFlyLine(t, void 0, !1);
|
|
381
387
|
});
|
|
382
388
|
} catch {
|
|
@@ -385,11 +391,11 @@ const ae = { style: { width: "100%", height: "100%" } }, le = { class: "value" }
|
|
|
385
391
|
{
|
|
386
392
|
deep: !0
|
|
387
393
|
}
|
|
388
|
-
),
|
|
394
|
+
), E(
|
|
389
395
|
() => v(m.value.filter((e) => e.type === "regionalLevel")),
|
|
390
396
|
(e, o) => {
|
|
391
397
|
try {
|
|
392
|
-
!
|
|
398
|
+
!w(e, o) && r.value && e.length === o.length && e.forEach((t) => {
|
|
393
399
|
r.value.createRegionalLevel(t, void 0, !1);
|
|
394
400
|
});
|
|
395
401
|
} catch {
|
|
@@ -399,40 +405,40 @@ const ae = { style: { width: "100%", height: "100%" } }, le = { class: "value" }
|
|
|
399
405
|
deep: !0
|
|
400
406
|
}
|
|
401
407
|
);
|
|
402
|
-
const
|
|
408
|
+
const K = (e) => {
|
|
403
409
|
try {
|
|
404
410
|
e.isHide === void 0 ? e.isHide = !0 : e.isHide = !e.isHide;
|
|
405
411
|
} catch {
|
|
406
412
|
}
|
|
407
|
-
},
|
|
413
|
+
}, Q = () => {
|
|
408
414
|
try {
|
|
409
415
|
const e = m.value.every((o) => !o.isHide);
|
|
410
416
|
m.value.forEach((o) => o.isHide = e);
|
|
411
417
|
} catch {
|
|
412
418
|
}
|
|
413
|
-
},
|
|
414
|
-
const o = `url(${e.backgroundImage})`, t = `url(${
|
|
419
|
+
}, R = (e) => {
|
|
420
|
+
const o = `url(${e.backgroundImage})`, t = `url(${F(e.hover.backgroundImage)})`, n = `url(${F(e.active.backgroundImage)})`;
|
|
415
421
|
return {
|
|
416
|
-
...
|
|
417
|
-
...
|
|
418
|
-
...
|
|
422
|
+
...k.json2cssObject(e),
|
|
423
|
+
...k.json2cssObject(e.hover, "hover"),
|
|
424
|
+
...k.json2cssObject(e.active, "active"),
|
|
419
425
|
"background-image": o,
|
|
420
426
|
"--hover-background-image": t,
|
|
421
427
|
"--active-background-image": n
|
|
422
428
|
};
|
|
423
|
-
},
|
|
424
|
-
return (e, o) => (d(), u("div",
|
|
429
|
+
}, F = (e) => !e.startsWith("http") && !e.startsWith("//") ? "../" + e : e;
|
|
430
|
+
return (e, o) => (d(), u("div", ie, [
|
|
425
431
|
B("div", {
|
|
426
432
|
ref_key: "map3dWrapRef",
|
|
427
|
-
ref:
|
|
428
|
-
class:
|
|
433
|
+
ref: y,
|
|
434
|
+
class: W(["map-3d-wrap", { show: H.value }])
|
|
429
435
|
}, [
|
|
430
|
-
|
|
436
|
+
j.value && g.value && a.value.backButton.show ? (d(), u("div", {
|
|
431
437
|
key: 0,
|
|
432
438
|
ref_key: "buttonRef",
|
|
433
439
|
ref: M,
|
|
434
440
|
class: "return-btn",
|
|
435
|
-
style: h(
|
|
441
|
+
style: h(G(a.value.backButton)),
|
|
436
442
|
onClick: I
|
|
437
443
|
}, " 返回上一级 ", 4)) : L("", !0),
|
|
438
444
|
c.value ? (d(), u("div", {
|
|
@@ -452,7 +458,7 @@ const ae = { style: { width: "100%", height: "100%" } }, le = { class: "value" }
|
|
|
452
458
|
"--color-borderRadius": c.value.labelStyle.colorStyle.borderRadius + "px"
|
|
453
459
|
})
|
|
454
460
|
}, [
|
|
455
|
-
(d(!0), u(
|
|
461
|
+
(d(!0), u(z, null, T(c.value.rules, (t, n) => (d(), u("div", {
|
|
456
462
|
key: n,
|
|
457
463
|
class: "item"
|
|
458
464
|
}, [
|
|
@@ -460,7 +466,7 @@ const ae = { style: { width: "100%", height: "100%" } }, le = { class: "value" }
|
|
|
460
466
|
class: "color",
|
|
461
467
|
style: h({ backgroundColor: t.color })
|
|
462
468
|
}, null, 4),
|
|
463
|
-
B("span",
|
|
469
|
+
B("span", ne, x(t.label), 1)
|
|
464
470
|
]))), 128))
|
|
465
471
|
], 4)) : L("", !0),
|
|
466
472
|
a.value.widgets.length > 0 && a.value.widgetControlStyle && a.value.widgetControlStyle.show ? (d(), u("div", {
|
|
@@ -476,26 +482,26 @@ const ae = { style: { width: "100%", height: "100%" } }, le = { class: "value" }
|
|
|
476
482
|
})
|
|
477
483
|
}, [
|
|
478
484
|
B("div", {
|
|
479
|
-
class:
|
|
485
|
+
class: W(["control-button", {
|
|
480
486
|
active: m.value.every((t) => !t.isHide)
|
|
481
487
|
}]),
|
|
482
|
-
style: h(
|
|
483
|
-
onClick:
|
|
484
|
-
},
|
|
485
|
-
(d(!0), u(
|
|
488
|
+
style: h(R(a.value.widgetControlStyle)),
|
|
489
|
+
onClick: Q
|
|
490
|
+
}, x(m.value.every((t) => !t.isHide) ? "隐藏" : "显示") + "/全部 ", 7),
|
|
491
|
+
(d(!0), u(z, null, T(m.value, (t) => (d(), u("div", {
|
|
486
492
|
key: t.id,
|
|
487
|
-
class:
|
|
493
|
+
class: W(["control-button", {
|
|
488
494
|
active: !t.isHide
|
|
489
495
|
}]),
|
|
490
|
-
style: h(
|
|
491
|
-
onClick: (n) =>
|
|
492
|
-
},
|
|
496
|
+
style: h(R(a.value.widgetControlStyle)),
|
|
497
|
+
onClick: (n) => K(t)
|
|
498
|
+
}, x(t.name || "-"), 15, ce))), 128))
|
|
493
499
|
], 4)) : L("", !0),
|
|
494
|
-
a.value.debugger ? (d(), u("div",
|
|
500
|
+
a.value.debugger ? (d(), u("div", pe, "fps:" + x(_(q)), 1)) : L("", !0)
|
|
495
501
|
], 2)
|
|
496
502
|
]));
|
|
497
503
|
}
|
|
498
504
|
});
|
|
499
505
|
export {
|
|
500
|
-
|
|
506
|
+
Cr as default
|
|
501
507
|
};
|
|
@@ -26,6 +26,7 @@ declare const _sfc_main: import("vue").DefineComponent<import("vue").ExtractProp
|
|
|
26
26
|
initData: (isAnimation?: boolean) => void;
|
|
27
27
|
initDom: () => void;
|
|
28
28
|
createWorld: (option: any) => World;
|
|
29
|
+
safeCreateWorld: () => void;
|
|
29
30
|
goBack: () => void;
|
|
30
31
|
cleanAndCreateWorld: () => void;
|
|
31
32
|
setCameraPosition: (x: number, y: number, z: number) => void;
|