gisviewer-vue3-arcgis 1.0.166 → 1.0.168

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 (40) hide show
  1. package/es/src/gis-map/gis-map.vue.d.ts +24 -4
  2. package/es/src/gis-map/gis-map.vue.mjs +144 -138
  3. package/es/src/gis-map/index.d.ts +24 -4
  4. package/es/src/gis-map/utils/common-utils.mjs +9 -9
  5. package/es/src/gis-map/utils/holo-flow/index.mjs +37 -36
  6. package/es/src/gis-map/utils/holo-flow/signal-countdown-panel.vue.d.ts +17 -1
  7. package/es/src/gis-map/utils/holo-flow/signal-countdown-panel.vue.mjs +2 -2
  8. package/es/src/gis-map/utils/holo-flow/signal-countdown-panel.vue2.mjs +41 -39
  9. package/es/src/gis-map/utils/holo-flow/signal-holo-flow-lsr.d.ts +3 -0
  10. package/es/src/gis-map/utils/holo-flow/signal-holo-flow-lsr.mjs +117 -71
  11. package/es/src/gis-map/utils/holo-flow/signal-holo-flow.mjs +6 -5
  12. package/es/src/gis-map/utils/holo-flow/trace-renderer-external.d.ts +2 -1
  13. package/es/src/gis-map/utils/holo-flow/trace-renderer-external.mjs +10 -9
  14. package/es/src/gis-map/utils/holo-flow/trace-renderer-layer.mjs +6 -5
  15. package/es/src/gis-map/utils/map-initializer.d.ts +1 -0
  16. package/es/src/gis-map/utils/map-initializer.mjs +121 -122
  17. package/es/src/gis-map/utils/signal-control-area-controller/index.d.ts +3 -1
  18. package/es/src/gis-map/utils/signal-control-area-controller/index.mjs +169 -67
  19. package/es/src/types/index.d.ts +2 -0
  20. package/es/style.css +1 -1
  21. package/lib/src/gis-map/gis-map.vue.d.ts +24 -4
  22. package/lib/src/gis-map/gis-map.vue.js +1 -1
  23. package/lib/src/gis-map/index.d.ts +24 -4
  24. package/lib/src/gis-map/utils/common-utils.js +1 -1
  25. package/lib/src/gis-map/utils/holo-flow/index.js +1 -1
  26. package/lib/src/gis-map/utils/holo-flow/signal-countdown-panel.vue.d.ts +17 -1
  27. package/lib/src/gis-map/utils/holo-flow/signal-countdown-panel.vue.js +1 -1
  28. package/lib/src/gis-map/utils/holo-flow/signal-countdown-panel.vue2.js +1 -1
  29. package/lib/src/gis-map/utils/holo-flow/signal-holo-flow-lsr.d.ts +3 -0
  30. package/lib/src/gis-map/utils/holo-flow/signal-holo-flow-lsr.js +1 -1
  31. package/lib/src/gis-map/utils/holo-flow/signal-holo-flow.js +1 -1
  32. package/lib/src/gis-map/utils/holo-flow/trace-renderer-external.d.ts +2 -1
  33. package/lib/src/gis-map/utils/holo-flow/trace-renderer-external.js +1 -1
  34. package/lib/src/gis-map/utils/holo-flow/trace-renderer-layer.js +1 -1
  35. package/lib/src/gis-map/utils/map-initializer.d.ts +1 -0
  36. package/lib/src/gis-map/utils/map-initializer.js +1 -1
  37. package/lib/src/gis-map/utils/signal-control-area-controller/index.d.ts +3 -1
  38. package/lib/src/gis-map/utils/signal-control-area-controller/index.js +1 -1
  39. package/lib/src/types/index.d.ts +2 -0
  40. package/package.json +1 -1
@@ -1,28 +1,29 @@
1
+ import { toRaw as i } from "vue";
1
2
  import { EVehiclePlateState as a } from "../../../types/index.mjs";
2
- import i from "../../stores/index.mjs";
3
- import r from "./signal-holo-flow.mjs";
4
- import s from "./signal-holo-flow-lsr.mjs";
5
- import n from "./trace-holo-flow.mjs";
6
- class p {
7
- constructor(e) {
8
- this.view = e;
3
+ import r from "../../stores/index.mjs";
4
+ import s from "./signal-holo-flow.mjs";
5
+ import n from "./signal-holo-flow-lsr.mjs";
6
+ import c from "./trace-holo-flow.mjs";
7
+ class m {
8
+ constructor(o) {
9
+ this.view = o;
9
10
  }
10
11
  async init() {
11
- this.traceHoloFlow = new n(this.view), await this.traceHoloFlow.init();
12
+ this.traceHoloFlow = new c(this.view), await this.traceHoloFlow.init();
12
13
  }
13
14
  /**
14
15
  * 处理全息流轨迹数据
15
16
  * */
16
- handleVehicleTraceData(e) {
17
- this.traceHoloFlow.handleVehicleTraceData(e);
17
+ handleVehicleTraceData(o) {
18
+ this.traceHoloFlow.handleVehicleTraceData(o);
18
19
  }
19
- toggleTrafficObject(e) {
20
- switch (e.name.toLowerCase()) {
20
+ toggleTrafficObject(o) {
21
+ switch (o.name.toLowerCase()) {
21
22
  case "groundVehicle".toLowerCase():
22
- this.traceHoloFlow.toggleGroundVehicle(e.visible);
23
+ this.traceHoloFlow.toggleGroundVehicle(o.visible);
23
24
  break;
24
25
  case "elevatedVehicle".toLowerCase():
25
- this.traceHoloFlow.toggleElevatedVehicle(e.visible);
26
+ this.traceHoloFlow.toggleElevatedVehicle(o.visible);
26
27
  break;
27
28
  }
28
29
  }
@@ -32,49 +33,49 @@ class p {
32
33
  // public toggleVehiclePlate(visible: boolean): void {
33
34
  // this.traceHoloFlow?.togglePlateLayer(visible);
34
35
  // }
35
- toggleTrafficInfo(e) {
36
- this.traceHoloFlow.toggleTrafficInfo(e);
36
+ toggleTrafficInfo(o) {
37
+ this.traceHoloFlow.toggleTrafficInfo(o);
37
38
  }
38
- togglePause(e) {
39
- this.traceHoloFlow.togglePause(e);
39
+ togglePause(o) {
40
+ this.traceHoloFlow.togglePause(o);
40
41
  }
41
- updatePanelContent(e) {
42
- let o = a.None;
43
- switch (e) {
42
+ updatePanelContent(o) {
43
+ let e = a.None;
44
+ switch (o) {
44
45
  case "none":
45
- o = a.None;
46
+ e = a.None;
46
47
  break;
47
48
  case "plateNumber":
48
- o = a.PlateNumber;
49
+ e = a.PlateNumber;
49
50
  break;
50
51
  case "vehicleId":
51
- o = a.Id;
52
+ e = a.Id;
52
53
  break;
53
54
  case "mix":
54
- o = a.Mix;
55
+ e = a.Mix;
55
56
  break;
56
57
  }
57
- this.traceHoloFlow.updatePanelContent(o);
58
+ this.traceHoloFlow.updatePanelContent(e);
58
59
  }
59
- async handleSignalData(e) {
60
- var o, l;
60
+ async handleSignalData(o) {
61
+ var e, l;
61
62
  if (!this.signalHoloFlow) {
62
- const t = i.useAppDataStore;
63
- ((l = (o = JSON.parse(JSON.stringify(t.mapConfig)).holoFlow) == null ? void 0 : o.signal) == null ? void 0 : l.style) === "LSR" ? this.signalHoloFlow = new s(this.view) : this.signalHoloFlow = new r(this.view), await this.signalHoloFlow.initializeLayer();
63
+ const t = r.useAppDataStore;
64
+ ((l = (e = i(t.mapConfig).holoFlow) == null ? void 0 : e.signal) == null ? void 0 : l.style) === "LSR" ? this.signalHoloFlow = new n(this.view) : this.signalHoloFlow = new s(this.view), await this.signalHoloFlow.initializeLayer();
64
65
  }
65
- await this.signalHoloFlow.handleSignalData(e);
66
+ await this.signalHoloFlow.handleSignalData(o);
66
67
  }
67
68
  clearHoloSignal() {
68
- var e;
69
- (e = this.signalHoloFlow) == null || e.clearSignal();
69
+ var o;
70
+ (o = this.signalHoloFlow) == null || o.clearSignal();
70
71
  }
71
- setInterpolate(e) {
72
- this.traceHoloFlow.setInterpolate(e);
72
+ setInterpolate(o) {
73
+ this.traceHoloFlow.setInterpolate(o);
73
74
  }
74
75
  downloadTrackLog() {
75
76
  this.traceHoloFlow.downloadLog();
76
77
  }
77
78
  }
78
79
  export {
79
- p as default
80
+ m as default
80
81
  };
@@ -1,4 +1,8 @@
1
1
  declare const _sfc_main: import("vue").DefineComponent<{
2
+ displayMode: {
3
+ type: StringConstructor;
4
+ required: true;
5
+ };
2
6
  crossId: {
3
7
  type: StringConstructor;
4
8
  required: true;
@@ -15,6 +19,10 @@ declare const _sfc_main: import("vue").DefineComponent<{
15
19
  type: ArrayConstructor;
16
20
  required: true;
17
21
  };
22
+ scale: {
23
+ type: NumberConstructor;
24
+ required: true;
25
+ };
18
26
  position: {
19
27
  type: ObjectConstructor;
20
28
  required: true;
@@ -51,8 +59,12 @@ declare const _sfc_main: import("vue").DefineComponent<{
51
59
  rNumberStyle: import("vue").ComputedRef<{
52
60
  color: string;
53
61
  }>;
54
- getColorString: (color: string | undefined) => "red" | "yellow" | "lime" | "white";
62
+ getColorString: (color: string | undefined) => "red" | "rgb(255, 192, 2)" | "lime" | "white";
55
63
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
64
+ displayMode: {
65
+ type: StringConstructor;
66
+ required: true;
67
+ };
56
68
  crossId: {
57
69
  type: StringConstructor;
58
70
  required: true;
@@ -69,6 +81,10 @@ declare const _sfc_main: import("vue").DefineComponent<{
69
81
  type: ArrayConstructor;
70
82
  required: true;
71
83
  };
84
+ scale: {
85
+ type: NumberConstructor;
86
+ required: true;
87
+ };
72
88
  position: {
73
89
  type: ObjectConstructor;
74
90
  required: true;
@@ -1,7 +1,7 @@
1
1
  import o from "./signal-countdown-panel.vue2.mjs";
2
2
  import "./signal-countdown-panel.vue3.mjs";
3
3
  import t from "../../../../_virtual/_plugin-vue_export-helper.mjs";
4
- const n = /* @__PURE__ */ t(o, [["__scopeId", "data-v-93496d9c"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-f1172941"]]);
5
5
  export {
6
- n as default
6
+ m as default
7
7
  };
@@ -1,8 +1,8 @@
1
- import { defineComponent as C, computed as o, openBlock as l, createElementBlock as n, normalizeStyle as a, createElementVNode as t, toDisplayString as i, createCommentVNode as u } from "vue";
2
- const _ = {
1
+ import { defineComponent as C, computed as o, openBlock as l, createElementBlock as a, normalizeStyle as n, createElementVNode as s, toDisplayString as i, createCommentVNode as u } from "vue";
2
+ const b = {
3
3
  key: 0,
4
4
  class: "signal-countdown-container"
5
- }, b = ["src"], I = {
5
+ }, _ = ["src"], I = {
6
6
  key: 1,
7
7
  class: "signal-countdown-container"
8
8
  }, N = ["src"], f = {
@@ -14,98 +14,100 @@ const _ = {
14
14
  }, V = ["src"], A = /* @__PURE__ */ C({
15
15
  __name: "signal-countdown-panel",
16
16
  props: {
17
+ displayMode: {},
17
18
  crossId: {},
18
19
  roadId: {},
19
20
  mapPoint: {},
20
21
  stopLine: {},
22
+ scale: {},
21
23
  position: {},
22
24
  rotation: {},
23
25
  lampStatus: {}
24
26
  },
25
27
  setup(c) {
26
- const s = c, m = o(() => ({
27
- top: `${s.position.top}px`,
28
- left: `${s.position.left}px`,
28
+ const t = c, m = o(() => ({
29
+ top: `${t.position.top}px`,
30
+ left: `${t.position.left}px`,
29
31
  "transform-origin": "bottom center",
30
- transform: `translateX(-50%) translateY(-100%) rotate(${s.rotation}deg)`
32
+ transform: `translateX(-50%) translateY(-100%) rotate(${t.rotation}deg) scale(${t.scale})`
31
33
  })), p = o(
32
- () => `/GisViewerAssets/Images/SignalLamp/u-${s.lampStatus.uColor}.png`
34
+ () => `/GisViewerAssets/Images/SignalLamp/u-${t.lampStatus.uColor}.png`
33
35
  ), d = o(() => ({
34
- color: r(s.lampStatus.uColor)
36
+ color: r(t.lampStatus.uColor)
35
37
  })), g = o(
36
- () => `/GisViewerAssets/Images/SignalLamp/l-${s.lampStatus.lColor}.png`
38
+ () => `/GisViewerAssets/Images/SignalLamp/l-${t.lampStatus.lColor}.png`
37
39
  ), S = o(() => ({
38
- color: r(s.lampStatus.lColor)
40
+ color: r(t.lampStatus.lColor)
39
41
  })), h = o(
40
- () => `/GisViewerAssets/Images/SignalLamp/s-${s.lampStatus.sColor}.png`
42
+ () => `/GisViewerAssets/Images/SignalLamp/s-${t.lampStatus.sColor}.png`
41
43
  ), v = o(() => ({
42
- color: r(s.lampStatus.sColor)
44
+ color: r(t.lampStatus.sColor)
43
45
  })), w = o(
44
- () => `/GisViewerAssets/Images/SignalLamp/r-${s.lampStatus.rColor}.png`
46
+ () => `/GisViewerAssets/Images/SignalLamp/r-${t.lampStatus.rColor}.png`
45
47
  ), y = o(() => ({
46
- color: r(s.lampStatus.rColor)
48
+ color: r(t.lampStatus.rColor)
47
49
  })), r = (e) => {
48
50
  switch (e) {
49
51
  case "red":
50
52
  return "red";
51
53
  case "yellow":
52
- return "yellow";
54
+ return "rgb(255, 192, 2)";
53
55
  case "green":
54
56
  return "lime";
55
57
  default:
56
58
  return "white";
57
59
  }
58
60
  };
59
- return (e, L) => (l(), n("div", {
61
+ return (e, L) => (l(), a("div", {
60
62
  class: "signal-countdown-panel",
61
- style: a(m.value)
63
+ style: n(m.value)
62
64
  }, [
63
- e.lampStatus.uColor ? (l(), n("div", _, [
64
- t("div", {
65
+ e.lampStatus.uColor ? (l(), a("div", b, [
66
+ s("div", {
65
67
  class: "signal-countdown-number",
66
- style: a(d.value)
68
+ style: n(d.value)
67
69
  }, i(e.lampStatus.uNumber), 5),
68
- t("div", null, [
69
- t("img", {
70
+ s("div", null, [
71
+ s("img", {
70
72
  src: p.value,
71
73
  width: "20px",
72
74
  height: "20px"
73
- }, null, 8, b)
75
+ }, null, 8, _)
74
76
  ])
75
77
  ])) : u("", !0),
76
- e.lampStatus.lColor ? (l(), n("div", I, [
77
- t("div", {
78
+ e.lampStatus.lColor ? (l(), a("div", I, [
79
+ s("div", {
78
80
  class: "signal-countdown-number",
79
- style: a(S.value)
81
+ style: n(S.value)
80
82
  }, i(e.lampStatus.lNumber), 5),
81
- t("div", null, [
82
- t("img", {
83
+ s("div", null, [
84
+ s("img", {
83
85
  src: g.value,
84
86
  width: "20px",
85
87
  height: "20px"
86
88
  }, null, 8, N)
87
89
  ])
88
90
  ])) : u("", !0),
89
- e.lampStatus.sColor ? (l(), n("div", f, [
90
- t("div", {
91
+ e.lampStatus.sColor ? (l(), a("div", f, [
92
+ s("div", {
91
93
  class: "signal-countdown-number",
92
- style: a(v.value)
94
+ style: n(v.value)
93
95
  }, i(e.lampStatus.sNumber), 5),
94
- t("div", null, [
95
- t("img", {
96
+ s("div", null, [
97
+ s("img", {
96
98
  src: h.value,
97
99
  width: "20px",
98
100
  height: "20px"
99
101
  }, null, 8, $)
100
102
  ])
101
103
  ])) : u("", !0),
102
- e.lampStatus.rColor !== void 0 ? (l(), n("div", k, [
103
- t("div", {
104
+ e.lampStatus.rColor !== void 0 ? (l(), a("div", k, [
105
+ s("div", {
104
106
  class: "signal-countdown-number",
105
- style: a(y.value)
107
+ style: n(y.value)
106
108
  }, i(e.lampStatus.rNumber), 5),
107
- t("div", null, [
108
- t("img", {
109
+ s("div", null, [
110
+ s("img", {
109
111
  src: w.value,
110
112
  width: "20px",
111
113
  height: "20px"
@@ -2,9 +2,12 @@ import SignalHoloFlow from './signal-holo-flow';
2
2
  export default class LSRSignalHoloFlow extends SignalHoloFlow {
3
3
  private stopLineLayer;
4
4
  private store;
5
+ private watchHandle;
5
6
  constructor(view: __esri.MapView | __esri.SceneView);
6
7
  private stopLineMap;
7
8
  initializeLayer(): Promise<void>;
9
+ private currentPanelScale;
10
+ private getPanelScale;
8
11
  handleSignalData(data: any): Promise<void>;
9
12
  clearSignal(): void;
10
13
  /**
@@ -1,87 +1,133 @@
1
- import * as m from "@arcgis/core/core/reactiveUtils";
2
- import { Point as h } from "@arcgis/core/geometry";
3
- import f from "@arcgis/core/layers/GraphicsLayer";
4
- import P from "@turf/bearing";
5
- import g from "@turf/destination";
6
- import * as c from "@turf/helpers";
7
- import d from "../../stores/index.mjs";
1
+ import * as d from "@arcgis/core/core/reactiveUtils";
2
+ import { Point as m } from "@arcgis/core/geometry";
3
+ import P from "@arcgis/core/layers/GraphicsLayer";
4
+ import w from "@turf/bearing";
5
+ import u from "@turf/destination";
6
+ import * as h from "@turf/helpers";
7
+ import g from "../../stores/index.mjs";
8
8
  import y from "../common-utils.mjs";
9
- import w from "./signal-holo-flow.mjs";
10
- class F extends w {
11
- constructor(o) {
12
- super(o), this.stopLineLayer = new f(), this.store = d.useAppDataStore, this.stopLineMap = /* @__PURE__ */ new Map(), this.view.map.add(this.stopLineLayer);
9
+ import L from "./signal-holo-flow.mjs";
10
+ class b extends L {
11
+ constructor(e) {
12
+ super(e), this.stopLineLayer = new P(), this.store = g.useAppDataStore, this.watchHandle = null, this.stopLineMap = /* @__PURE__ */ new Map(), this.view.map.add(this.stopLineLayer);
13
13
  }
14
14
  async initializeLayer() {
15
- var i, r;
15
+ var c, r;
16
16
  console.time("初始化停止线图层");
17
- let o = (r = (i = this.mapConfig.holoFlow) == null ? void 0 : i.signal) == null ? void 0 : r.stopLineLayer;
18
- if (!o)
17
+ let e = (r = (c = this.mapConfig.holoFlow) == null ? void 0 : c.signal) == null ? void 0 : r.stopLineLayer;
18
+ if (!e)
19
19
  return;
20
- o = this.mapConfig.assetsRoot + "/" + o, (await (await fetch(o)).json()).features.forEach((t) => {
21
- const { roadId: n, nodeId: e } = t.properties, { coordinates: s } = t.geometry, l = this.stopLineMap.get(e);
22
- l ? l.set(n, s) : this.stopLineMap.set(e, /* @__PURE__ */ new Map([[n, s]]));
23
- }), console.timeEnd("初始化停止线图层"), m.watch(
20
+ e = this.mapConfig.assetsRoot + "/" + e, (await (await fetch(e)).json()).features.forEach((t) => {
21
+ const { roadId: n, nodeId: o, angle: s, destinationPoint: a } = t.properties, { coordinates: l } = t.geometry, f = this.stopLineMap.get(o);
22
+ f ? f.set(n, {
23
+ coord: l,
24
+ panelPoint: a,
25
+ angle: s
26
+ }) : this.stopLineMap.set(
27
+ o,
28
+ /* @__PURE__ */ new Map([
29
+ [
30
+ n,
31
+ { coord: l, panelPoint: a, angle: s }
32
+ ]
33
+ ])
34
+ );
35
+ }), console.timeEnd("初始化停止线图层");
36
+ }
37
+ getPanelScale() {
38
+ const e = this.view.scale;
39
+ let i = 1;
40
+ return e < 1e3 ? i = 1 : e < 2e3 ? i = 0.8 : i = 0.4, i;
41
+ }
42
+ async handleSignalData(e) {
43
+ this.watchHandle || (this.watchHandle = d.watch(
24
44
  () => this.view.extent,
25
45
  () => {
26
- for (const t of this.store.countdownPanels) {
27
- const { mapPoint: n, stopLine: e } = t, s = this.view.toScreen({
46
+ const t = this.getPanelScale();
47
+ for (const n of this.store.countdownPanels) {
48
+ t !== this.currentPanelScale && (n.scale = t);
49
+ const { mapPoint: o } = n, s = this.view.toScreen({
28
50
  type: "point",
29
- x: n[0],
30
- y: n[1]
51
+ x: o[0],
52
+ y: o[1]
31
53
  });
32
- t.position.left = s.x, t.position.top = s.y;
33
- const l = this.getPanelRotation(e);
34
- t.rotation = l;
54
+ n.position.left = s.x, n.position.top = s.y;
35
55
  }
56
+ this.currentPanelScale = t;
36
57
  }
37
- );
38
- }
39
- async handleSignalData(o) {
40
- const { crossId: a, roadId: p, lampStatus: i } = o, r = this.stopLineMap.get(a);
41
- if (!r)
58
+ ));
59
+ const i = e.crossId, p = this.stopLineMap.get(i);
60
+ if (!p) {
61
+ console.log(`没有找到路口${i}`);
42
62
  return;
43
- const t = r.get(p);
44
- if (!t)
45
- return;
46
- const n = this.store.countdownPanels.find(
47
- (e) => e.crossId === a && e.roadId === p
48
- );
49
- if (n)
50
- n.lampStatus = i;
51
- else {
52
- const e = this.getPanelPoint(t), s = this.view.toScreen({
53
- type: "point",
54
- x: e[0],
55
- y: e[1]
56
- }), l = this.getPanelRotation(t);
57
- this.store.countdownPanels.push({
58
- crossId: a,
59
- roadId: p,
60
- mapPoint: e,
61
- // 定位点地理坐标
62
- stopLine: t,
63
- // 关联的停止线坐标
64
- position: { left: s.x, top: s.y },
65
- // 定位点屏幕坐标
66
- rotation: l,
67
- // 面板旋转角度
68
- lampStatus: i
69
- // 灯组状态
70
- });
71
63
  }
64
+ const c = e.phaseCountDownList, r = /* @__PURE__ */ new Map();
65
+ for (const t of c) {
66
+ let n = "";
67
+ for (let l of t.roadIdList)
68
+ if (l.startsWith("-") && (l = l.slice(1)), p.has(l)) {
69
+ n = l;
70
+ break;
71
+ }
72
+ if (!n) {
73
+ console.log(`没有找到对应的进口道${i}--${n}`);
74
+ continue;
75
+ }
76
+ let o = r.get(n);
77
+ if (o || (o = {}, r.set(n, o)), !t.direction) {
78
+ console.log(`没有找到对应的方向${i}--${JSON.stringify(t)}`);
79
+ continue;
80
+ }
81
+ const s = t.direction.toLowerCase(), a = t.color === 1 ? "red" : t.color === 2 ? "yellow" : "green";
82
+ s === "u" ? (o.uNumber = t.leftTime, o.uColor = a) : s === "l" ? (o.lNumber = t.leftTime, o.lColor = a) : s === "s" ? (o.sNumber = t.leftTime, o.sColor = a) : s === "r" && (o.rNumber = t.leftTime, o.rColor = a);
83
+ }
84
+ r.forEach((t, n) => {
85
+ const o = p.get(n);
86
+ if (!o)
87
+ return;
88
+ const s = this.store.countdownPanels.find(
89
+ (a) => a.crossId === i && a.roadId === n
90
+ );
91
+ if (s)
92
+ s.lampStatus = t;
93
+ else {
94
+ const a = o.panelPoint, l = this.view.toScreen({
95
+ type: "point",
96
+ x: a[0],
97
+ y: a[1]
98
+ }), f = this.getPanelRotation(o.coord);
99
+ this.store.countdownPanels.push({
100
+ displayMode: "complex",
101
+ crossId: i,
102
+ roadId: n,
103
+ mapPoint: a,
104
+ // 定位点地理坐标
105
+ stopLine: o.coord,
106
+ // 关联的停止线坐标
107
+ position: { left: l.x, top: l.y },
108
+ // 定位点屏幕坐标
109
+ rotation: f,
110
+ // 面板旋转角度
111
+ scale: this.getPanelScale(),
112
+ lampStatus: t
113
+ // 灯组状态
114
+ });
115
+ }
116
+ });
72
117
  }
73
118
  clearSignal() {
74
- this.stopLineLayer.removeAll();
119
+ var e;
120
+ this.stopLineLayer.removeAll(), this.store.countdownPanels = [], (e = this.watchHandle) == null || e.remove(), this.watchHandle = null;
75
121
  }
76
122
  /**
77
123
  * 从停止线坐标计算面板位置
78
124
  * @param coordinates
79
125
  * @returns
80
126
  */
81
- getPanelPoint(o) {
82
- const a = y.getCenterPointInLine(o), p = o[0], i = o[o.length - 1];
83
- let t = P(c.point(p), c.point(i)) - 90;
84
- return t < -180 && (t += 360), g(c.point(a), 1, t, {
127
+ getPanelPoint(e) {
128
+ const i = y.getCenterPointInLine(e), p = e[0], c = e[e.length - 1];
129
+ let t = w(h.point(p), h.point(c)) - 90;
130
+ return t < -180 && (t += 360), u(h.point(i), 1, t, {
85
131
  units: "meters"
86
132
  }).geometry.coordinates;
87
133
  }
@@ -90,19 +136,19 @@ class F extends w {
90
136
  * @param coordinates
91
137
  * @returns
92
138
  */
93
- getPanelRotation(o) {
94
- const a = o[0], p = new h({
95
- x: a[0],
96
- y: a[1],
139
+ getPanelRotation(e) {
140
+ const i = e[0], p = new m({
141
+ x: i[0],
142
+ y: i[1],
97
143
  spatialReference: this.view.spatialReference
98
- }), i = this.view.toScreen(p), r = o[o.length - 1], t = new h({
144
+ }), c = this.view.toScreen(p), r = e[e.length - 1], t = new m({
99
145
  x: r[0],
100
146
  y: r[1],
101
147
  spatialReference: this.view.spatialReference
102
- }), n = this.view.toScreen(t), e = n.x - i.x, s = n.y - i.y;
103
- return Math.atan2(s, e) * (180 / Math.PI);
148
+ }), n = this.view.toScreen(t), o = n.x - c.x, s = n.y - c.y;
149
+ return Math.atan2(s, o) * (180 / Math.PI);
104
150
  }
105
151
  }
106
152
  export {
107
- F as default
153
+ b as default
108
154
  };
@@ -1,12 +1,13 @@
1
1
  import * as d from "@arcgis/core/core/reactiveUtils";
2
2
  import { Point as c } from "@arcgis/core/geometry";
3
3
  import p from "@arcgis/core/layers/FeatureLayer";
4
- import u from "../../stores/index.mjs";
5
- class f {
4
+ import { toRaw as u } from "vue";
5
+ import g from "../../stores/index.mjs";
6
+ class v {
6
7
  constructor(e) {
7
8
  this.currentPhaseMap = /* @__PURE__ */ new Map(), this.countdownCanvasMap = /* @__PURE__ */ new Map(), this.lastDataTime = 0, this.isDeletingCanvas = !1, this.canvasWidth = 80, this.canvasHeight = 40, this.view = (e.type === "2d", e);
8
- const t = u.useAppDataStore;
9
- this.mapConfig = JSON.parse(JSON.stringify(t.mapConfig));
9
+ const t = g.useAppDataStore;
10
+ this.mapConfig = u(t.mapConfig);
10
11
  }
11
12
  /**
12
13
  * 初始化相位线图层
@@ -247,5 +248,5 @@ class f {
247
248
  }
248
249
  }
249
250
  export {
250
- f as default
251
+ v as default
251
252
  };
@@ -16,7 +16,7 @@ export default class TraceRendererExternal implements ITraceRendererInterface {
16
16
  /** 车身颜色材质 */
17
17
  private materialMap;
18
18
  private readonly view;
19
- private readonly assetsRoot;
19
+ private assetsRoot;
20
20
  private carModel;
21
21
  private vanModel;
22
22
  private truckModel;
@@ -39,6 +39,7 @@ export default class TraceRendererExternal implements ITraceRendererInterface {
39
39
  private needInterpolate;
40
40
  private updateModel;
41
41
  private appDataStore;
42
+ private mapConfig;
42
43
  /** 轨迹日志 */
43
44
  private logTable;
44
45
  constructor(view: __esri.SceneView);
@@ -4,9 +4,10 @@ import v from "@arcgis/core/geometry/SpatialReference";
4
4
  import * as u from "@arcgis/core/views/3d/externalRenderers";
5
5
  import * as a from "three";
6
6
  import { GLTFLoader as y } from "three/examples/jsm/loaders/GLTFLoader";
7
+ import { toRaw as T } from "vue";
7
8
  import { EVehiclePlateState as m } from "../../../types/index.mjs";
8
- import T from "../../stores/index.mjs";
9
- class R {
9
+ import C from "../../stores/index.mjs";
10
+ class V {
10
11
  constructor(s) {
11
12
  this.cameraHeightThreshold = 1e3, this.roughness = 0.2, this.metalness = 0.8, this.defaultMaterial = new a.MeshPhongMaterial({
12
13
  color: 16777215
@@ -22,7 +23,7 @@ class R {
22
23
  [9, this.createCarMaterial(2105376)],
23
24
  [10, this.createCarMaterial(9662683)],
24
25
  [99, this.createCarMaterial(6908265)]
25
- ]), this.isInitialized = !1, this.showGroundVehicle = !0, this.showElevatedVehicle = !0, this.isPaused = !1, this.currentSpriteContent = m.None, this.historyPositionMap = /* @__PURE__ */ new Map(), this.vehicleObjectMap = /* @__PURE__ */ new Map(), this.needInterpolate = !0, this.updateModel = !1, this.appDataStore = T.useAppDataStore, this.logTable = [
26
+ ]), this.isInitialized = !1, this.showGroundVehicle = !0, this.showElevatedVehicle = !0, this.isPaused = !1, this.currentSpriteContent = m.None, this.historyPositionMap = /* @__PURE__ */ new Map(), this.vehicleObjectMap = /* @__PURE__ */ new Map(), this.needInterpolate = !0, this.updateModel = !1, this.appDataStore = C.useAppDataStore, this.logTable = [
26
27
  [
27
28
  "ptcId",
28
29
  "plateno",
@@ -43,12 +44,12 @@ class R {
43
44
  "queueLength",
44
45
  "status"
45
46
  ]
46
- ], this.assetsRoot = JSON.parse(
47
- JSON.stringify(this.appDataStore.mapConfig)
48
- ).assetsRoot, this.view = s, P.watch(
47
+ ], this.view = s;
48
+ const e = T(this.appDataStore.mapConfig);
49
+ this.assetsRoot = e.assetsRoot, P.watch(
49
50
  () => this.view.camera.position.z,
50
- (e, t) => {
51
- (t <= this.cameraHeightThreshold && e > this.cameraHeightThreshold || t > this.cameraHeightThreshold && e <= this.cameraHeightThreshold) && (this.updateModel = !0);
51
+ (t, i) => {
52
+ (i <= this.cameraHeightThreshold && t > this.cameraHeightThreshold || i > this.cameraHeightThreshold && t <= this.cameraHeightThreshold) && (this.updateModel = !0);
52
53
  }
53
54
  );
54
55
  }
@@ -544,5 +545,5 @@ class R {
544
545
  }
545
546
  }
546
547
  export {
547
- R as default
548
+ V as default
548
549
  };