gisviewer-vue3-arcgis 1.0.173 → 1.0.175

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 (27) hide show
  1. package/es/src/gis-map/gis-map.vue.d.ts +12 -15
  2. package/es/src/gis-map/gis-map.vue.mjs +131 -119
  3. package/es/src/gis-map/index.d.ts +12 -15
  4. package/es/src/gis-map/style/index.css +2 -2
  5. package/es/src/gis-map/utils/holo-flow/signal-countdown-panel.vue.d.ts +4 -12
  6. package/es/src/gis-map/utils/holo-flow/signal-countdown-panel.vue.mjs +67 -55
  7. package/es/src/gis-map/utils/holo-flow/signal-holo-flow-lsr.mjs +35 -36
  8. package/es/src/gis-map/utils/holo-flow/signal-holo-flow.mjs +1 -1
  9. package/es/src/gis-map/utils/holo-flow/trace-holo-flow.d.ts +1 -0
  10. package/es/src/gis-map/utils/holo-flow/trace-holo-flow.mjs +33 -28
  11. package/es/src/gis-map/utils/open-drive-renderer/index.mjs +20 -23
  12. package/es/src/gis-map/utils/signal-control-area-controller/index.d.ts +21 -3
  13. package/es/src/gis-map/utils/signal-control-area-controller/index.mjs +165 -88
  14. package/lib/src/gis-map/gis-map.vue.d.ts +12 -15
  15. package/lib/src/gis-map/gis-map.vue.js +1 -1
  16. package/lib/src/gis-map/index.d.ts +12 -15
  17. package/lib/src/gis-map/style/index.css +2 -2
  18. package/lib/src/gis-map/utils/holo-flow/signal-countdown-panel.vue.d.ts +4 -12
  19. package/lib/src/gis-map/utils/holo-flow/signal-countdown-panel.vue.js +1 -1
  20. package/lib/src/gis-map/utils/holo-flow/signal-holo-flow-lsr.js +1 -1
  21. package/lib/src/gis-map/utils/holo-flow/signal-holo-flow.js +1 -1
  22. package/lib/src/gis-map/utils/holo-flow/trace-holo-flow.d.ts +1 -0
  23. package/lib/src/gis-map/utils/holo-flow/trace-holo-flow.js +2 -2
  24. package/lib/src/gis-map/utils/open-drive-renderer/index.js +1 -1
  25. package/lib/src/gis-map/utils/signal-control-area-controller/index.d.ts +21 -3
  26. package/lib/src/gis-map/utils/signal-control-area-controller/index.js +1 -1
  27. package/package.json +1 -1
@@ -1,26 +1,31 @@
1
1
  import * as g from "@arcgis/core/core/reactiveUtils.js";
2
- import y from "@arcgis/core/Graphic";
3
- import h from "@arcgis/core/layers/GraphicsLayer";
2
+ import c from "@arcgis/core/Graphic";
3
+ import y from "@arcgis/core/layers/GraphicsLayer";
4
4
  import u from "@turf/buffer";
5
- import b from "@turf/convex";
6
- import * as l from "@turf/helpers";
7
- import d from "concaveman";
8
- import f from "./district-controller.mjs";
9
- class x {
5
+ import d from "@turf/convex";
6
+ import * as n from "@turf/helpers";
7
+ import b from "axios";
8
+ import f from "concaveman";
9
+ import C from "../../stores/index.mjs";
10
+ import v from "./district-controller.mjs";
11
+ class N {
10
12
  constructor(e) {
11
- this.crossScale = 5e3, this.view = e, this.districtControllerLayer = new h({
13
+ var s;
14
+ this.crossScale = 5e3, this.view = e;
15
+ const r = C.useAppDataStore.mapConfig;
16
+ this.openDriveServer = (s = r.openDriveServer) == null ? void 0 : s.url, this.districtControllerLayer = new y({
12
17
  id: "districtControllerLayer"
13
- }), this.subDistrictControllerLayer = new h({
18
+ }), this.subDistrictControllerLayer = new y({
14
19
  id: "subDistrictControllerLayer",
15
20
  visible: !1
16
21
  // maxScale: 0,
17
22
  // minScale: 144447
18
- }), this.crossLayer = new h({
23
+ }), this.crossLayer = new y({
19
24
  id: "crossLayer",
20
25
  visible: !1
21
26
  // maxScale: 0,
22
27
  // minScale: 36112
23
- }), this.highlightLayer = new h({
28
+ }), this.highlightLayer = new y({
24
29
  id: "highlightLayer"
25
30
  }), this.view.map.addMany([
26
31
  this.districtControllerLayer,
@@ -32,13 +37,13 @@ class x {
32
37
  showSignalControlArea(e) {
33
38
  this.districtControllerLayer.removeAll(), this.subDistrictControllerLayer.removeAll(), this.crossLayer.removeAll(), this.highlightLayer.removeAll(), this.subDistrictControllerLayer.visible = !1, this.crossLayer.visible = !1, this.districtControllerLayer.visible = !0;
34
39
  for (const t of e) {
35
- const i = new f(t);
36
- this.drawArea(i, !0);
40
+ const r = new v(t);
41
+ this.drawArea(r, !0);
37
42
  }
38
- return this.watchHandle = g.watch(
43
+ return this.scaleWatcher = g.watch(
39
44
  () => this.view.scale,
40
- (t, i) => {
41
- t > this.crossScale && i <= this.crossScale ? (this.crossLayer.graphics.forEach((s) => {
45
+ (t, r) => {
46
+ t > this.crossScale && r <= this.crossScale ? (this.crossLayer.graphics.forEach((s) => {
42
47
  s.symbol = this.getCrossGraphicSymbol(
43
48
  s.attributes,
44
49
  "marker"
@@ -48,7 +53,7 @@ class x {
48
53
  s.attributes,
49
54
  "marker"
50
55
  ));
51
- })) : t <= this.crossScale && i > this.crossScale && (this.crossLayer.graphics.forEach((s) => {
56
+ })) : t <= this.crossScale && r > this.crossScale && (this.crossLayer.graphics.forEach((s) => {
52
57
  s.symbol = this.getCrossGraphicSymbol(
53
58
  s.attributes,
54
59
  "picture"
@@ -63,8 +68,8 @@ class x {
63
68
  ), { status: 0, message: "ok" };
64
69
  }
65
70
  clearSignalControlArea() {
66
- var e;
67
- return this.districtControllerLayer.removeAll(), this.subDistrictControllerLayer.removeAll(), this.crossLayer.removeAll(), this.highlightLayer.removeAll(), (e = this.watchHandle) == null || e.remove(), this.view.closePopup(), { status: 0, message: "ok" };
71
+ var e, t;
72
+ return this.districtControllerLayer.removeAll(), this.subDistrictControllerLayer.removeAll(), this.crossLayer.removeAll(), this.highlightLayer.removeAll(), (e = this.scaleWatcher) == null || e.remove(), this.scaleWatcher = void 0, (t = this.clickWatcher) == null || t.remove(), this.clickWatcher = void 0, this.view.closePopup(), { status: 0, message: "ok" };
68
73
  }
69
74
  async locateSignalControlArea(e) {
70
75
  const t = this.findAreaGraphic(e.id);
@@ -77,22 +82,22 @@ class x {
77
82
  if (!e.id || e.id === "")
78
83
  return { status: 1, message: "请输入id" };
79
84
  this.highlightLayer.removeAll(), this.districtControllerLayer.visible = !1;
80
- const t = this.districtControllerLayer.graphics.filter((r) => r.getAttribute("id") === e.id).toArray().map((r) => {
81
- const a = r.clone();
85
+ const t = this.districtControllerLayer.graphics.filter((i) => i.getAttribute("id") === e.id).toArray().map((i) => {
86
+ const a = i.clone();
82
87
  return a.symbol.style = "none", a;
83
- }), i = this.subDistrictControllerLayer.graphics.filter(
84
- (r) => r.getAttribute("id") === e.id || r.getAttribute("parentId") === e.id
85
- ).toArray().map((r) => r.clone()), s = this.crossLayer.graphics.filter(
86
- (r) => r.getAttribute("id") === e.id || r.getAttribute("districtId") === e.id || r.getAttribute("subDistrictId") === e.id
87
- ).toArray().map((r) => r.clone());
88
- if (t.length > 0 && this.highlightLayer.addMany(t), i.length > 0 && this.highlightLayer.addMany(i), s.length > 0 && this.highlightLayer.addMany(s), this.highlightLayer.graphics.length === 0)
88
+ }), r = this.subDistrictControllerLayer.graphics.filter(
89
+ (i) => i.getAttribute("id") === e.id || i.getAttribute("parentId") === e.id
90
+ ).toArray().map((i) => i.clone()), s = this.crossLayer.graphics.filter(
91
+ (i) => i.getAttribute("id") === e.id || i.getAttribute("districtId") === e.id || i.getAttribute("subDistrictId") === e.id
92
+ ).toArray().map((i) => i.clone());
93
+ if (t.length > 0 && this.highlightLayer.addMany(t), r.length > 0 && this.highlightLayer.addMany(r), s.length > 0 && this.highlightLayer.addMany(s), this.highlightLayer.graphics.length === 0)
89
94
  return { status: 1, message: "未找到" };
90
95
  if (t.length > 0)
91
96
  await this.view.goTo(t);
92
- else if (i.length > 0) {
93
- const r = i[0].geometry.centroid;
97
+ else if (r.length > 0) {
98
+ const i = r[0].geometry.centroid;
94
99
  await this.view.goTo({
95
- target: r,
100
+ target: i,
96
101
  scale: this.crossScale - 500
97
102
  });
98
103
  } else
@@ -107,23 +112,87 @@ class x {
107
112
  }
108
113
  showSubSignalControlArea(e) {
109
114
  this.crossLayer.removeAll(), this.crossLayer.visible = !0;
110
- const i = e.children.map((s) => new y({
111
- geometry: {
112
- type: "point",
113
- x: s.longitude,
114
- y: s.latitude
115
- },
116
- symbol: this.getCrossGraphicInSubDistrict(),
117
- attributes: {
118
- id: s.id,
119
- name: s.name,
120
- signalId: s.signalId
121
- }
122
- }));
123
- return this.crossLayer.addMany(i), this.view.goTo(i), { status: 0, message: "ok" };
115
+ const r = e.children.map((s) => {
116
+ const i = { ...s, selected: !0 };
117
+ return new c({
118
+ geometry: {
119
+ type: "point",
120
+ x: s.longitude,
121
+ y: s.latitude
122
+ },
123
+ symbol: this.getCrossSymbolInSubDistrict(i),
124
+ attributes: i
125
+ });
126
+ });
127
+ return this.crossLayer.addMany(r), this.view.goTo(r), { status: 0, message: "ok" };
124
128
  }
125
- editSubSignalArea() {
126
- return { status: 0, message: "ok" };
129
+ /**
130
+ * 点击路口时
131
+ * @param event
132
+ * @returns
133
+ */
134
+ async handleViewClick(e) {
135
+ var i;
136
+ const r = (i = (await this.view.hitTest(e, {
137
+ include: [this.crossLayer]
138
+ })).results) == null ? void 0 : i.filter(
139
+ (a) => a.type === "graphic"
140
+ );
141
+ if (r.length === 0)
142
+ return;
143
+ const s = r[0].graphic;
144
+ s.getAttribute("selected") || await this.showNearbyCrosses(s.getAttribute("id"));
145
+ }
146
+ async showNearbyCrosses(e) {
147
+ const t = await b.get(
148
+ `http://${this.openDriveServer}/api/computable/getRelatedJunctionsForJunction`,
149
+ { params: { junctionIds: e } }
150
+ );
151
+ if (t.status === 200)
152
+ if (t.data.status === 0) {
153
+ const r = t.data.result, s = [];
154
+ return r.forEach(
155
+ (i) => {
156
+ const { junctionId: a } = i;
157
+ if (!this.crossLayer.graphics.some(
158
+ (l) => l.getAttribute("id") === a
159
+ )) {
160
+ const l = new c({
161
+ geometry: {
162
+ type: "point",
163
+ x: i.lon,
164
+ y: i.lat
165
+ },
166
+ symbol: this.getCrossSymbolInSubDistrict(i),
167
+ attributes: {
168
+ id: i.junctionId,
169
+ name: i.name,
170
+ signalId: i.signalId,
171
+ selected: !1
172
+ }
173
+ });
174
+ s.push(l);
175
+ }
176
+ }
177
+ ), this.crossLayer.addMany(s), { status: 0, message: "ok" };
178
+ } else
179
+ return { status: -1, message: t.data.message };
180
+ else
181
+ return { status: -1, message: "请求失败" };
182
+ }
183
+ /**
184
+ * 编辑子区的路口
185
+ * @returns
186
+ */
187
+ async editSubSignalArea() {
188
+ if (this.openDriveServer) {
189
+ this.clickWatcher || (this.clickWatcher = this.view.on("click", async (t) => {
190
+ await this.handleViewClick(t);
191
+ }));
192
+ const e = this.crossLayer.graphics.toArray().map((t) => t.getAttribute("id")).join(",");
193
+ return await this.showNearbyCrosses(e);
194
+ } else
195
+ return { status: 1, message: "未配置OpenDriveServer" };
127
196
  }
128
197
  /**
129
198
  * 在区控\子区\路口图层中查找对应的graphic
@@ -132,11 +201,11 @@ class x {
132
201
  */
133
202
  findAreaGraphic(e) {
134
203
  let t = this.districtControllerLayer.graphics.find(
135
- (i) => i.attributes.id === e
204
+ (r) => r.attributes.id === e
136
205
  );
137
206
  return t || (t = this.subDistrictControllerLayer.graphics.find(
138
- (i) => i.attributes.id === e
139
- )), t || (t = this.crossLayer.graphics.find((i) => i.attributes.id === e)), t;
207
+ (r) => r.attributes.id === e
208
+ )), t || (t = this.crossLayer.graphics.find((r) => r.attributes.id === e)), t;
140
209
  }
141
210
  /**
142
211
  * 绘制区控与子区
@@ -145,25 +214,25 @@ class x {
145
214
  * @returns
146
215
  */
147
216
  drawArea(e, t) {
148
- const i = e.getAllCrossCoordinates();
149
- if (i.length >= 2) {
150
- let r = null;
151
- if (i.length === 2)
152
- r = l.lineString(i);
217
+ const r = e.getAllCrossCoordinates();
218
+ if (r.length >= 2) {
219
+ let i = null;
220
+ if (r.length === 2)
221
+ i = n.lineString(r);
153
222
  else {
154
223
  if (t) {
155
- const n = l.featureCollection(
156
- i.map((p) => l.point(p))
224
+ const h = n.featureCollection(
225
+ r.map((p) => n.point(p))
157
226
  );
158
- r = b(n);
227
+ i = d(h);
159
228
  } else {
160
- const n = d(i, 0.5);
161
- n.length >= 4 && (r = l.polygon([n]));
229
+ const h = f(r, 0.5);
230
+ h.length >= 4 && (i = n.polygon([h]));
162
231
  }
163
- r || (r = l.lineString(i));
232
+ i || (i = n.lineString(r));
164
233
  }
165
234
  const a = u(
166
- r.geometry,
235
+ i.geometry,
167
236
  // 区控面积更大,需要更大的缓冲半径
168
237
  t ? 200 : 30,
169
238
  {
@@ -194,7 +263,7 @@ class x {
194
263
  label: "路口数量"
195
264
  }
196
265
  ];
197
- const m = {
266
+ const l = {
198
267
  type: "signalControlArea",
199
268
  id: e.id,
200
269
  name: e.name,
@@ -202,7 +271,7 @@ class x {
202
271
  parentName: e.parentName,
203
272
  crossCount: e.crossCount,
204
273
  subDistrictCount: e.subDistrictCount
205
- }, c = new y({
274
+ }, m = new c({
206
275
  geometry: {
207
276
  type: "polygon",
208
277
  rings: a.geometry.coordinates
@@ -216,7 +285,7 @@ class x {
216
285
  style: t ? "solid" : "long-dash"
217
286
  }
218
287
  },
219
- attributes: m,
288
+ attributes: l,
220
289
  popupTemplate: {
221
290
  title: `${t ? "区控" : "子区"} ${e.name}`,
222
291
  content: [
@@ -227,33 +296,33 @@ class x {
227
296
  ]
228
297
  }
229
298
  });
230
- t ? this.districtControllerLayer.add(c) : this.subDistrictControllerLayer.add(c);
299
+ t ? this.districtControllerLayer.add(m) : this.subDistrictControllerLayer.add(m);
231
300
  }
232
- for (const r of e.subDistricts)
233
- this.drawArea(r, !1);
301
+ for (const i of e.subDistricts)
302
+ this.drawArea(i, !1);
234
303
  const s = [];
235
- e.crosses.forEach((r) => {
304
+ e.crosses.forEach((i) => {
236
305
  const a = {
237
306
  type: "cross",
238
- id: r.id,
239
- name: r.name,
307
+ id: i.id,
308
+ name: i.name,
240
309
  color: e.areaColor,
241
- signalId: r.signalId,
310
+ signalId: i.signalId,
242
311
  districtId: t ? e.id : e.parentId,
243
312
  districtName: t ? e.name : e.parentName,
244
313
  subDistrictId: t ? "" : e.id,
245
314
  subDistrictName: t ? "" : e.name,
246
- isKey: r.isKey
247
- }, o = new y({
315
+ isKey: i.isKey
316
+ }, o = new c({
248
317
  geometry: {
249
318
  type: "point",
250
- x: r.longitude,
251
- y: r.latitude
319
+ x: i.longitude,
320
+ y: i.latitude
252
321
  },
253
322
  symbol: this.getCrossGraphicSymbol(a, "marker"),
254
323
  attributes: a,
255
324
  popupTemplate: {
256
- title: r.name,
325
+ title: i.name,
257
326
  content: [
258
327
  {
259
328
  type: "fields",
@@ -282,14 +351,18 @@ class x {
282
351
  s.push(o);
283
352
  }), this.crossLayer.addMany(s);
284
353
  }
285
- getCrossGraphicInSubDistrict() {
286
- return {
354
+ /**
355
+ * 显示子区时路口的样式
356
+ * @param attributes
357
+ * @returns
358
+ */
359
+ getCrossSymbolInSubDistrict(e) {
360
+ return e.signalId && e.signalId !== "" ? {
287
361
  type: "cim",
288
362
  data: {
289
363
  type: "CIMSymbolReference",
290
364
  primitiveOverrides: [
291
365
  {
292
- // 将textGraphic的TextString替换为graphic.attributes.name
293
366
  type: "CIMPrimitiveOverride",
294
367
  primitiveName: "textGraphic",
295
368
  propertyName: "TextString",
@@ -360,14 +433,19 @@ class x {
360
433
  y: 0
361
434
  },
362
435
  anchorPointUnits: "Relative",
363
- size: 20,
436
+ size: 30,
364
437
  rotateClockwise: !0,
365
438
  textureFilter: "Picture",
366
- url: "/GisViewerAssets/Images/gis_lkcz_xz.png"
439
+ url: `/GisViewerAssets/Images/cross/${e.selected ? "gis_xhj_blue" : "gis_xhj_gray"}.png`
367
440
  }
368
441
  ]
369
442
  }
370
443
  }
444
+ } : {
445
+ type: "picture-marker",
446
+ url: "/GisViewerAssets/Images/cross/gis_lkcz.png",
447
+ width: "20px",
448
+ height: "20px"
371
449
  };
372
450
  }
373
451
  /**
@@ -377,9 +455,9 @@ class x {
377
455
  * @returns
378
456
  */
379
457
  getCrossGraphicSymbol(e, t) {
380
- const { isKey: i, color: s } = e;
458
+ const { isKey: r, color: s } = e;
381
459
  if (t === "marker")
382
- return i ? {
460
+ return r ? {
383
461
  type: "picture-marker",
384
462
  url: "/GisViewerAssets/Images/icon_star.png",
385
463
  width: "30px",
@@ -433,7 +511,7 @@ class x {
433
511
  height: 12,
434
512
  horizontalAlignment: "Center",
435
513
  offsetX: 0,
436
- offsetY: i ? 50 : 40,
514
+ offsetY: r ? 30 : 15,
437
515
  haloSize: 1,
438
516
  haloSymbol: {
439
517
  type: "CIMPolygonSymbol",
@@ -472,11 +550,10 @@ class x {
472
550
  y: 0
473
551
  },
474
552
  anchorPointUnits: "Relative",
475
- size: i ? 45 : 30,
553
+ size: r ? 40 : 20,
476
554
  rotateClockwise: !0,
477
555
  textureFilter: "Picture",
478
- url: `/GisViewerAssets/Images/xhj_${i ? 4 : 1}.png`,
479
- offsetY: i ? 22 : 15
556
+ url: `/GisViewerAssets/Images/cross/${r ? "gis_gjxk_blue" : "gis_xhj_blue"}.png`
480
557
  }
481
558
  ]
482
559
  }
@@ -485,5 +562,5 @@ class x {
485
562
  }
486
563
  }
487
564
  export {
488
- x as default
565
+ N as default
489
566
  };
@@ -60,8 +60,10 @@ declare const _sfc_main: import("vue").DefineComponent<{
60
60
  };
61
61
  }[];
62
62
  mapViewer: import("vue").ComputedRef<MapView | SceneView>;
63
- startSaveTrackLog: () => void;
64
- downloadTrackLog: () => void;
63
+ handleStartSaveTrackLog: () => void;
64
+ handleDownloadTrackLog: () => void;
65
+ handleShowVehicleId: () => void;
66
+ handleShowPlateNumber: () => void;
65
67
  setMapCenter: (params: ISetMapCenterParams) => Promise<import("../types").IResult>;
66
68
  setMapCamera: (params: ISetMapCameraParams) => Promise<import("../types").IResult>;
67
69
  lookAt: (params: ILookAtParams) => Promise<void>;
@@ -123,7 +125,10 @@ declare const _sfc_main: import("vue").DefineComponent<{
123
125
  }) => Promise<import("../types").IResult>;
124
126
  resetHighlightSignalControlArea: () => import("../types").IResult;
125
127
  showSubSignalControlArea: (params: any) => import("../types").IResult;
126
- editSubSignalControlArea: () => import("../types").IResult;
128
+ editSubSignalControlArea: () => Promise<import("../types").IResult> | {
129
+ status: number;
130
+ message: string;
131
+ };
127
132
  props: any;
128
133
  emit: (event: "mapLoaded" | "markerClick" | "mapClick", ...args: any[]) => void;
129
134
  SignalCountdownPanel: import("vue").DefineComponent<{
@@ -172,21 +177,13 @@ declare const _sfc_main: import("vue").DefineComponent<{
172
177
  transform: string;
173
178
  }>;
174
179
  uImage: import("vue").ComputedRef<string>;
175
- uNumberStyle: import("vue").ComputedRef<{
176
- color: string;
177
- }>;
180
+ uNumberStyle: import("vue").ComputedRef<any>;
178
181
  lImage: import("vue").ComputedRef<string>;
179
- lNumberStyle: import("vue").ComputedRef<{
180
- color: string;
181
- }>;
182
+ lNumberStyle: import("vue").ComputedRef<any>;
182
183
  sImage: import("vue").ComputedRef<string>;
183
- sNumberStyle: import("vue").ComputedRef<{
184
- color: string;
185
- }>;
184
+ sNumberStyle: import("vue").ComputedRef<any>;
186
185
  rImage: import("vue").ComputedRef<string>;
187
- rNumberStyle: import("vue").ComputedRef<{
188
- color: string;
189
- }>;
186
+ rNumberStyle: import("vue").ComputedRef<any>;
190
187
  getColorString: (color: string | undefined) => "red" | "rgb(255, 192, 2)" | "lime" | "white";
191
188
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
192
189
  displayMode: {
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("vue"),S=require("./stores/index.js");require("./style/index.css");const _e=require("./utils/holo-flow/index.js"),qe=require("./utils/holo-flow/signal-countdown-panel.vue.js"),Ie=require("./utils/map-initializer.js"),O=require("./utils/open-drive-renderer/index.js"),k=require("./utils/overlay.js"),Me=require("./utils/queue-length.js"),A=require("./utils/road-config-tool/index.js"),L=require("./utils/signal-control-area-controller/index.js"),xe=require("./utils/traffic-flow.js"),Be={class:"gis-viewer"},He={style:{position:"absolute",bottom:"10px",left:"10px"}},Ve=n.defineComponent({__name:"gis-map",props:{config:{},assetsRoot:{}},emits:["mapLoaded","markerClick","mapClick"],setup(T,{expose:b,emit:D}){const p=n.ref(null);let i,u,l,o,a,r,g,t,s;const f=n.ref(!1);S.registerStore();const _=S.default.useAppDataStore,h=n.reactive([]);n.onMounted(async()=>{if(!p.value)return;document.addEventListener("keydown",d=>{d.ctrlKey&&d.key==="i"&&(f.value=!f.value)});const e=n.getCurrentInstance(),{$gisviewerAssetsRoot:m}=e.appContext.config.globalProperties,c=await(await fetch(C.config)).json();c.assetsRoot=C.assetsRoot||m,_.mapConfig=c,u=new Ie.default,i=await u.initialize({container:p.value,mapConfig:c,markerClickCallback:(d,v,w,De)=>{y("markerClick",d,v,w,De)},mapClickCallback:(d,v,w)=>{y("mapClick",d,v,w)}}),a=new _e.default(i,h),await a.init(),y("mapLoaded")}),n.onUnmounted(()=>{s==null||s.clearSignalControlArea(),t==null||t.clearOpenDrive(),a.clearHoloTrace(),a.clearHoloSignal(),o==null||o.disconnectTrafficFlow()});const q=n.computed(()=>i),I=()=>{const e=S.default.useAppDataStore;e.saveTrackLog=!0},M=()=>{a.downloadTrackLog()},x=async e=>await u.setMapCenter(e),B=async e=>await u.setMapCamera(e),H=async e=>await u.lookAt(e),V=e=>u.setLayerVisibility(e),P=(e,m)=>u.requestCoordinateTransform(e,m),N=e=>{u.cancelCoordinateTransform(e)},E=e=>{u.setMapZoomRange(e)},j=e=>(l||(l=new A.default(i)),l.showLaneNumber(e)),z=()=>{l==null||l.clearLaneNumber()},Q=async e=>(l||(l=new A.default(i)),await l.initializeSearch(e)),Z=async()=>l==null?void 0:l.calCrossIndicatorArea(),K=async()=>{},U=async(e,m)=>{o||(o=new xe.default(i)),o.connectTrafficFlow(e,m)},G=()=>{o==null||o.disconnectTrafficFlow()},J=async e=>{a.handleVehicleTraceData(e)},W=()=>{a.clearHoloTrace()},X=e=>{a.setInterpolate(e)},Y=async e=>{await a.handleSignalData(e)},F=()=>{a.clearHoloSignal()},R=e=>{o==null||o.toggleTrafficInfo(e),a==null||a.toggleTrafficInfo(e)},$=e=>{a==null||a.togglePause(e)},ee=e=>{o==null||o.toggleTrafficObject(e),a==null||a.toggleTrafficObject(e)},te=e=>{a==null||a.updatePanelContent(e)},ae=async e=>(r||(r=new k.default(i)),r.addOverlays(e)),ne=e=>(r||(r=new k.default(i)),r.addMask(e)),re=()=>{r==null||r.removeMask()},se=e=>r==null?void 0:r.removeOverlaysByType(e),oe=e=>r==null?void 0:r.removeOverlaysById(e),ie=()=>r==null?void 0:r.removeAllOverlays(),ce=()=>{r==null||r.showAllOverlays()},le=e=>{g||(g=new Me.default(i)),g.updateQueueLength(e)},ue=()=>{g==null||g.removeQueueLength()},me=async(e,m)=>(t||(t=new O.default(i)),await t.showOpenDriveFromServer(e,m)),de=async e=>(t||(t=new O.default(i)),await t.clearOpenDrive(),await t.showOpenDriveFromFile(e)),ge=async()=>await(t==null?void 0:t.clearOpenDrive()),pe=async e=>t?await(t==null?void 0:t.findSumo(e)):{status:-1,message:"未加载OpenDrive地图"},fe=async e=>t?t.selectSumo(e):{status:-1,message:"未加载OpenDrive地图"},ye=async e=>t?t.unselectSumo(e):{status:-1,message:"未加载OpenDrive地图"},ve=async e=>t?await t.geometrySearch(e):{status:-1,message:"未加载OpenDrive地图"},we=async e=>t?await t.getSumoInfo(e):{status:-1,message:"未加载OpenDrive地图"},Se=async e=>t?await(t==null?void 0:t.splitLane(e)):{status:-1,message:"未加载OpenDrive地图"},he=async()=>t?t==null?void 0:t.clearSplitLane():{status:-1,message:"未加载OpenDrive地图"},Ce=e=>(s||(s=new L.default(i)),s.showSignalControlArea(e)),Oe=()=>{s==null||s.clearSignalControlArea()},ke=async e=>s?await s.locateSignalControlArea(e):{status:-1,message:"未加载信号控制区"},Ae=async e=>s?await s.highlightSignalControlArea(e):{status:-1,message:"未加载信号控制区"},Le=()=>s?s.resetHighlight():{status:-1,message:"未加载信号控制区"},Te=e=>(s||(s=new L.default(i)),s.showSubSignalControlArea(e)),be=()=>s?s.editSubSignalArea():{status:-1,message:"未加载信号控制区"},C=T,y=D;return b({mapViewer:q,setLayerVisibility:V,setMapCenter:x,lookAt:H,setMapCamera:B,setMapZoomRange:E,requestCoordinateTransform:P,cancelCoordinateTransform:N,addOverlays:ae,addMask:ne,removeMask:re,showAllOverlays:ce,removeOverlaysByType:se,removeOverlaysById:oe,removeAllOverlays:ie,showLaneNumber:j,clearLaneNumber:z,initializeAreaTool:Q,calCrossIndicatorArea:Z,calRoadIndicatorArea:K,connectCarFlow:U,disconnectCarFlow:G,handleHoloVehicleTraceData:J,clearHoloTrace:W,handleHoloSignalData:Y,clearHoloSignal:F,setInterpolate:X,toggleTrafficInfo:R,toggleTrafficObject:ee,toggleVehicleInfo:te,togglePause:$,updateQueueLength:le,removeQueueLength:ue,showOpenDriveFromServer:me,showOpenDriveFromFile:de,clearOpenDrive:ge,geometrySearchInOpenDrive:ve,findSumoInOpenDrive:pe,selectSumoInOpenDrive:fe,unselectSumoInOpenDrive:ye,getSumoInfo:we,splitOpenDriveLane:Se,clearSplitOpenDriveLane:he,showSignalControlArea:Ce,clearSignalControlArea:Oe,locateSignalControlArea:ke,highlightSignalControlArea:Ae,resetHighlightSignalControlArea:Le,showSubSignalControlArea:Te,editSubSignalControlArea:be}),(e,m)=>(n.openBlock(),n.createElementBlock("div",Be,[n.createElementVNode("div",{class:"gis-viewer-main",ref_key:"mapContainer",ref:p},[n.withDirectives(n.createElementVNode("div",He,[n.createElementVNode("button",{style:{"margin-right":"10px"},onClick:I}," 开始记录 "),n.createElementVNode("button",{onClick:M},"下载日志")],512),[[n.vShow,f.value]])],512),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(h,(c,d)=>(n.openBlock(),n.createBlock(qe.default,{key:d,"display-mode":c.displayMode,"road-id":c.crossId,"cross-id":c.roadId,"map-point":c.mapPoint,"stop-line":c.stopLine,position:c.position,rotation:c.rotation,scale:c.scale,"lamp-status":c.lampStatus},null,8,["display-mode","road-id","cross-id","map-point","stop-line","position","rotation","scale","lamp-status"]))),128))]))}});exports.default=Ve;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("vue"),h=require("./stores/index.js");require("./style/index.css");const qe=require("./utils/holo-flow/index.js"),xe=require("./utils/holo-flow/signal-countdown-panel.vue.js"),Me=require("./utils/map-initializer.js"),O=require("./utils/open-drive-renderer/index.js"),b=require("./utils/overlay.js"),Ve=require("./utils/queue-length.js"),A=require("./utils/road-config-tool/index.js"),L=require("./utils/signal-control-area-controller/index.js"),Ne=require("./utils/traffic-flow.js"),Be={class:"gis-viewer"},He={style:{position:"absolute",bottom:"10px",left:"10px"}},Pe=a.defineComponent({__name:"gis-map",props:{config:{},assetsRoot:{}},emits:["mapLoaded","markerClick","mapClick"],setup(D,{expose:T,emit:_}){const p=a.ref(null);let i,u,l,o,n,r,g,t,s;const f=a.ref(!1);h.registerStore();const I=h.default.useAppDataStore,C=a.reactive([]);a.onMounted(async()=>{if(!p.value)return;document.addEventListener("keydown",m=>{m.ctrlKey&&m.key==="i"&&(f.value=!f.value)});const e=a.getCurrentInstance(),{$gisviewerAssetsRoot:d}=e.appContext.config.globalProperties,c=await(await fetch(k.config)).json();c.assetsRoot=k.assetsRoot||d,I.mapConfig=c,u=new Me.default,i=await u.initialize({container:p.value,mapConfig:c,markerClickCallback:(m,v,w,Ie)=>{S("markerClick",m,v,w,Ie)},mapClickCallback:(m,v,w)=>{S("mapClick",m,v,w)}}),n=new qe.default(i,C),await n.init(),S("mapLoaded")}),a.onUnmounted(()=>{s==null||s.clearSignalControlArea(),t==null||t.clearOpenDrive(),n.clearHoloTrace(),n.clearHoloSignal(),o==null||o.disconnectTrafficFlow()});const q=a.computed(()=>i),x=()=>{const e=h.default.useAppDataStore;e.saveTrackLog=!0},M=()=>{n.downloadTrackLog()},V=()=>{y("vehicleId")},N=()=>{y("plateNumber")},B=async e=>await u.setMapCenter(e),H=async e=>await u.setMapCamera(e),P=async e=>await u.lookAt(e),E=e=>u.setLayerVisibility(e),j=(e,d)=>u.requestCoordinateTransform(e,d),z=e=>{u.cancelCoordinateTransform(e)},Q=e=>{u.setMapZoomRange(e)},Z=e=>(l||(l=new A.default(i)),l.showLaneNumber(e)),K=()=>{l==null||l.clearLaneNumber()},U=async e=>(l||(l=new A.default(i)),await l.initializeSearch(e)),G=async()=>l==null?void 0:l.calCrossIndicatorArea(),J=async()=>{},W=async(e,d)=>{o||(o=new Ne.default(i)),o.connectTrafficFlow(e,d)},X=()=>{o==null||o.disconnectTrafficFlow()},Y=async e=>{n.handleVehicleTraceData(e)},F=()=>{n.clearHoloTrace()},R=e=>{n.setInterpolate(e)},$=async e=>{await n.handleSignalData(e)},ee=()=>{n.clearHoloSignal()},te=e=>{o==null||o.toggleTrafficInfo(e),n==null||n.toggleTrafficInfo(e)},ae=e=>{n==null||n.togglePause(e)},ne=e=>{o==null||o.toggleTrafficObject(e),n==null||n.toggleTrafficObject(e)},y=e=>{n==null||n.updatePanelContent(e)},re=async e=>(r||(r=new b.default(i)),r.addOverlays(e)),se=e=>(r||(r=new b.default(i)),r.addMask(e)),oe=()=>{r==null||r.removeMask()},ie=e=>r==null?void 0:r.removeOverlaysByType(e),ce=e=>r==null?void 0:r.removeOverlaysById(e),le=()=>r==null?void 0:r.removeAllOverlays(),ue=()=>{r==null||r.showAllOverlays()},de=e=>{g||(g=new Ve.default(i)),g.updateQueueLength(e)},me=()=>{g==null||g.removeQueueLength()},ge=async(e,d)=>(t||(t=new O.default(i)),await t.showOpenDriveFromServer(e,d)),pe=async e=>(t||(t=new O.default(i)),await t.clearOpenDrive(),await t.showOpenDriveFromFile(e)),fe=async()=>await(t==null?void 0:t.clearOpenDrive()),ye=async e=>t?await(t==null?void 0:t.findSumo(e)):{status:-1,message:"未加载OpenDrive地图"},Se=async e=>t?t.selectSumo(e):{status:-1,message:"未加载OpenDrive地图"},ve=async e=>t?t.unselectSumo(e):{status:-1,message:"未加载OpenDrive地图"},we=async e=>t?await t.geometrySearch(e):{status:-1,message:"未加载OpenDrive地图"},he=async e=>t?await t.getSumoInfo(e):{status:-1,message:"未加载OpenDrive地图"},Ce=async e=>t?await(t==null?void 0:t.splitLane(e)):{status:-1,message:"未加载OpenDrive地图"},ke=async()=>t?t==null?void 0:t.clearSplitLane():{status:-1,message:"未加载OpenDrive地图"},Oe=e=>(s||(s=new L.default(i)),s.showSignalControlArea(e)),be=()=>{s==null||s.clearSignalControlArea()},Ae=async e=>s?await s.locateSignalControlArea(e):{status:-1,message:"未加载信号控制区"},Le=async e=>s?await s.highlightSignalControlArea(e):{status:-1,message:"未加载信号控制区"},De=()=>s?s.resetHighlight():{status:-1,message:"未加载信号控制区"},Te=e=>(s||(s=new L.default(i)),s.showSubSignalControlArea(e)),_e=()=>s?s.editSubSignalArea():{status:-1,message:"未加载信号控制区"},k=D,S=_;return T({mapViewer:q,setLayerVisibility:E,setMapCenter:B,lookAt:P,setMapCamera:H,setMapZoomRange:Q,requestCoordinateTransform:j,cancelCoordinateTransform:z,addOverlays:re,addMask:se,removeMask:oe,showAllOverlays:ue,removeOverlaysByType:ie,removeOverlaysById:ce,removeAllOverlays:le,showLaneNumber:Z,clearLaneNumber:K,initializeAreaTool:U,calCrossIndicatorArea:G,calRoadIndicatorArea:J,connectCarFlow:W,disconnectCarFlow:X,handleHoloVehicleTraceData:Y,clearHoloTrace:F,handleHoloSignalData:$,clearHoloSignal:ee,setInterpolate:R,toggleTrafficInfo:te,toggleTrafficObject:ne,toggleVehicleInfo:y,togglePause:ae,updateQueueLength:de,removeQueueLength:me,showOpenDriveFromServer:ge,showOpenDriveFromFile:pe,clearOpenDrive:fe,geometrySearchInOpenDrive:we,findSumoInOpenDrive:ye,selectSumoInOpenDrive:Se,unselectSumoInOpenDrive:ve,getSumoInfo:he,splitOpenDriveLane:Ce,clearSplitOpenDriveLane:ke,showSignalControlArea:Oe,clearSignalControlArea:be,locateSignalControlArea:Ae,highlightSignalControlArea:Le,resetHighlightSignalControlArea:De,showSubSignalControlArea:Te,editSubSignalControlArea:_e}),(e,d)=>(a.openBlock(),a.createElementBlock("div",Be,[a.createElementVNode("div",{class:"gis-viewer-main",ref_key:"mapContainer",ref:p},[a.withDirectives(a.createElementVNode("div",He,[a.createElementVNode("button",{style:{"margin-right":"10px"},onClick:x}," 开始记录 "),a.createElementVNode("button",{style:{"margin-right":"10px"},onClick:M}," 下载日志 "),a.createElementVNode("button",{style:{"margin-right":"10px"},onClick:V}," 显示车辆id "),a.createElementVNode("button",{onClick:N},"显示车辆号牌")],512),[[a.vShow,f.value]])],512),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(C,(c,m)=>(a.openBlock(),a.createBlock(xe.default,{key:m,"display-mode":c.displayMode,"road-id":c.crossId,"cross-id":c.roadId,"map-point":c.mapPoint,"stop-line":c.stopLine,position:c.position,rotation:c.rotation,scale:c.scale,"lamp-status":c.lampStatus},null,8,["display-mode","road-id","cross-id","map-point","stop-line","position","rotation","scale","lamp-status"]))),128))]))}});exports.default=Pe;
@@ -49,8 +49,10 @@ export declare const GisMap: import("@easyest/utils/dist/lib/withinstall").SFCWi
49
49
  };
50
50
  }[];
51
51
  mapViewer: import("vue").ComputedRef<__esri.MapView | __esri.SceneView>;
52
- startSaveTrackLog: () => void;
53
- downloadTrackLog: () => void;
52
+ handleStartSaveTrackLog: () => void;
53
+ handleDownloadTrackLog: () => void;
54
+ handleShowVehicleId: () => void;
55
+ handleShowPlateNumber: () => void;
54
56
  setMapCenter: (params: import("../types").ISetMapCenterParams) => Promise<import("../types").IResult>;
55
57
  setMapCamera: (params: import("../types").ISetMapCameraParams) => Promise<import("../types").IResult>;
56
58
  lookAt: (params: import("../types").ILookAtParams) => Promise<void>;
@@ -112,7 +114,10 @@ export declare const GisMap: import("@easyest/utils/dist/lib/withinstall").SFCWi
112
114
  }) => Promise<import("../types").IResult>;
113
115
  resetHighlightSignalControlArea: () => import("../types").IResult;
114
116
  showSubSignalControlArea: (params: any) => import("../types").IResult;
115
- editSubSignalControlArea: () => import("../types").IResult;
117
+ editSubSignalControlArea: () => Promise<import("../types").IResult> | {
118
+ status: number;
119
+ message: string;
120
+ };
116
121
  props: any;
117
122
  emit: (event: "mapLoaded" | "markerClick" | "mapClick", ...args: any[]) => void;
118
123
  SignalCountdownPanel: import("vue").DefineComponent<{
@@ -161,21 +166,13 @@ export declare const GisMap: import("@easyest/utils/dist/lib/withinstall").SFCWi
161
166
  transform: string;
162
167
  }>;
163
168
  uImage: import("vue").ComputedRef<string>;
164
- uNumberStyle: import("vue").ComputedRef<{
165
- color: string;
166
- }>;
169
+ uNumberStyle: import("vue").ComputedRef<any>;
167
170
  lImage: import("vue").ComputedRef<string>;
168
- lNumberStyle: import("vue").ComputedRef<{
169
- color: string;
170
- }>;
171
+ lNumberStyle: import("vue").ComputedRef<any>;
171
172
  sImage: import("vue").ComputedRef<string>;
172
- sNumberStyle: import("vue").ComputedRef<{
173
- color: string;
174
- }>;
173
+ sNumberStyle: import("vue").ComputedRef<any>;
175
174
  rImage: import("vue").ComputedRef<string>;
176
- rNumberStyle: import("vue").ComputedRef<{
177
- color: string;
178
- }>;
175
+ rNumberStyle: import("vue").ComputedRef<any>;
179
176
  getColorString: (color: string | undefined) => "red" | "rgb(255, 192, 2)" | "lime" | "white";
180
177
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
181
178
  displayMode: {
@@ -28,12 +28,12 @@
28
28
  border-radius: 5px;
29
29
  color: white;
30
30
  width: 40px;
31
- height: 70px;
31
+ height: 60px;
32
32
  justify-content: center;
33
33
  align-items: center;
34
34
  display: flex;
35
35
  flex-direction: column;
36
36
  }
37
37
  .signal-countdown-number {
38
- font: 30px bold;
38
+ font: 28px Digital;
39
39
  }
@@ -44,21 +44,13 @@ declare const _sfc_main: import("vue").DefineComponent<{
44
44
  transform: string;
45
45
  }>;
46
46
  uImage: import("vue").ComputedRef<string>;
47
- uNumberStyle: import("vue").ComputedRef<{
48
- color: string;
49
- }>;
47
+ uNumberStyle: import("vue").ComputedRef<any>;
50
48
  lImage: import("vue").ComputedRef<string>;
51
- lNumberStyle: import("vue").ComputedRef<{
52
- color: string;
53
- }>;
49
+ lNumberStyle: import("vue").ComputedRef<any>;
54
50
  sImage: import("vue").ComputedRef<string>;
55
- sNumberStyle: import("vue").ComputedRef<{
56
- color: string;
57
- }>;
51
+ sNumberStyle: import("vue").ComputedRef<any>;
58
52
  rImage: import("vue").ComputedRef<string>;
59
- rNumberStyle: import("vue").ComputedRef<{
60
- color: string;
61
- }>;
53
+ rNumberStyle: import("vue").ComputedRef<any>;
62
54
  getColorString: (color: string | undefined) => "red" | "rgb(255, 192, 2)" | "lime" | "white";
63
55
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
64
56
  displayMode: {
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),g={key:0,class:"signal-countdown-container"},S=["src"],v={key:1,class:"signal-countdown-container"},y=["src"],N={key:2,class:"signal-countdown-container"},h=["src"],w={key:3,class:"signal-countdown-container"},V=["src"],C=e.defineComponent({__name:"signal-countdown-panel",props:{displayMode:{},crossId:{},roadId:{},mapPoint:{},stopLine:{},scale:{},position:{},rotation:{},lampStatus:{}},setup(n){const t=n,s=e.computed(()=>({top:`${t.position.top}px`,left:`${t.position.left}px`,"transform-origin":"bottom center",transform:`translateX(-50%) translateY(-100%) rotate(${t.rotation}deg) scale(${t.scale})`})),a=e.computed(()=>`/GisViewerAssets/Images/SignalLamp/u-${t.lampStatus.uColor}.png`),r=e.computed(()=>({color:l(t.lampStatus.uColor)})),c=e.computed(()=>`/GisViewerAssets/Images/SignalLamp/l-${t.lampStatus.lColor}.png`),i=e.computed(()=>({color:l(t.lampStatus.lColor)})),m=e.computed(()=>`/GisViewerAssets/Images/SignalLamp/s-${t.lampStatus.sColor}.png`),u=e.computed(()=>({color:l(t.lampStatus.sColor)})),d=e.computed(()=>`/GisViewerAssets/Images/SignalLamp/r-${t.lampStatus.rColor}.png`),p=e.computed(()=>({color:l(t.lampStatus.rColor)})),l=o=>{switch(o){case"red":return"red";case"yellow":return"rgb(255, 192, 2)";case"green":return"lime";default:return"white"}};return(o,E)=>(e.openBlock(),e.createElementBlock("div",{class:"signal-countdown-panel",style:e.normalizeStyle(s.value)},[o.lampStatus.uColor?(e.openBlock(),e.createElementBlock("div",g,[e.createElementVNode("div",{class:"signal-countdown-number",style:e.normalizeStyle(r.value)},e.toDisplayString(o.lampStatus.uNumber),5),e.createElementVNode("div",null,[e.createElementVNode("img",{src:a.value,width:"20px",height:"20px"},null,8,S)])])):e.createCommentVNode("",!0),o.lampStatus.lColor?(e.openBlock(),e.createElementBlock("div",v,[e.createElementVNode("div",{class:"signal-countdown-number",style:e.normalizeStyle(i.value)},e.toDisplayString(o.lampStatus.lNumber),5),e.createElementVNode("div",null,[e.createElementVNode("img",{src:c.value,width:"20px",height:"20px"},null,8,y)])])):e.createCommentVNode("",!0),o.lampStatus.sColor?(e.openBlock(),e.createElementBlock("div",N,[e.createElementVNode("div",{class:"signal-countdown-number",style:e.normalizeStyle(u.value)},e.toDisplayString(o.lampStatus.sNumber),5),e.createElementVNode("div",null,[e.createElementVNode("img",{src:m.value,width:"20px",height:"20px"},null,8,h)])])):e.createCommentVNode("",!0),o.lampStatus.rColor!==void 0?(e.openBlock(),e.createElementBlock("div",w,[e.createElementVNode("div",{class:"signal-countdown-number",style:e.normalizeStyle(p.value)},e.toDisplayString(o.lampStatus.rNumber),5),e.createElementVNode("div",null,[e.createElementVNode("img",{src:d.value,width:"20px",height:"20px"},null,8,V)])])):e.createCommentVNode("",!0)],4))}});exports.default=C;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),S={key:0,class:"signal-countdown-container"},y=["src"],v={key:1,class:"signal-countdown-container"},N=["src"],h={key:2,class:"signal-countdown-container"},w=["src"],V={key:3,class:"signal-countdown-container"},C=["src"],f=e.defineComponent({__name:"signal-countdown-panel",props:{displayMode:{},crossId:{},roadId:{},mapPoint:{},stopLine:{},scale:{},position:{},rotation:{},lampStatus:{}},setup(l){const t=l,r=e.computed(()=>({top:`${t.position.top}px`,left:`${t.position.left}px`,"transform-origin":"bottom center",transform:`translateX(-50%) translateY(-100%) rotate(${t.rotation}deg) scale(${t.scale})`})),s=e.computed(()=>`/GisViewerAssets/Images/SignalLamp/u-${t.lampStatus.uColor}.png`),i=e.computed(()=>{const o={color:a(t.lampStatus.uColor)},n=t.rotation<0?t.rotation+360:t.rotation;return n>135&&n<315&&(o.transform="rotate(180deg)"),o}),c=e.computed(()=>`/GisViewerAssets/Images/SignalLamp/l-${t.lampStatus.lColor}.png`),m=e.computed(()=>{const o={color:a(t.lampStatus.lColor)},n=t.rotation<0?t.rotation+360:t.rotation;return n>135&&n<315&&(o.transform="rotate(180deg)"),o}),u=e.computed(()=>`/GisViewerAssets/Images/SignalLamp/s-${t.lampStatus.sColor}.png`),d=e.computed(()=>{const o={color:a(t.lampStatus.sColor)},n=t.rotation<0?t.rotation+360:t.rotation;return n>135&&n<315&&(o.transform="rotate(180deg)"),o}),p=e.computed(()=>`/GisViewerAssets/Images/SignalLamp/r-${t.lampStatus.rColor}.png`),g=e.computed(()=>{const o={color:a(t.lampStatus.rColor)},n=t.rotation<0?t.rotation+360:t.rotation;return n>135&&n<315&&(o.transform="rotate(180deg)"),o}),a=o=>{switch(o){case"red":return"red";case"yellow":return"rgb(255, 192, 2)";case"green":return"lime";default:return"white"}};return(o,n)=>(e.openBlock(),e.createElementBlock("div",{class:"signal-countdown-panel",style:e.normalizeStyle(r.value)},[o.lampStatus.uColor?(e.openBlock(),e.createElementBlock("div",S,[e.createElementVNode("div",{class:"signal-countdown-number",style:e.normalizeStyle(i.value)},e.toDisplayString(o.lampStatus.uNumber),5),e.createElementVNode("div",null,[e.createElementVNode("img",{src:s.value,width:"20px",height:"20px"},null,8,y)])])):e.createCommentVNode("",!0),o.lampStatus.lColor?(e.openBlock(),e.createElementBlock("div",v,[e.createElementVNode("div",{class:"signal-countdown-number",style:e.normalizeStyle(m.value)},e.toDisplayString(o.lampStatus.lNumber),5),e.createElementVNode("div",null,[e.createElementVNode("img",{src:c.value,width:"20px",height:"20px"},null,8,N)])])):e.createCommentVNode("",!0),o.lampStatus.sColor?(e.openBlock(),e.createElementBlock("div",h,[e.createElementVNode("div",{class:"signal-countdown-number",style:e.normalizeStyle(d.value)},e.toDisplayString(o.lampStatus.sNumber),5),e.createElementVNode("div",null,[e.createElementVNode("img",{src:u.value,width:"20px",height:"20px"},null,8,w)])])):e.createCommentVNode("",!0),o.lampStatus.rColor!==void 0?(e.openBlock(),e.createElementBlock("div",V,[e.createElementVNode("div",{class:"signal-countdown-number",style:e.normalizeStyle(g.value)},e.toDisplayString(o.lampStatus.rNumber),5),e.createElementVNode("div",null,[e.createElementVNode("img",{src:p.value,width:"20px",height:"20px"},null,8,C)])])):e.createCommentVNode("",!0)],4))}});exports.default=f;