gisviewer-vue3-arcgis 1.0.108 → 1.0.110

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 (33) hide show
  1. package/es/src/gis-map/gis-map.vue.d.ts +3 -0
  2. package/es/src/gis-map/gis-map.vue.mjs +117 -98
  3. package/es/src/gis-map/index.d.ts +3 -0
  4. package/es/src/gis-map/stores/appData.d.ts +1 -0
  5. package/es/src/gis-map/stores/appData.mjs +5 -4
  6. package/es/src/gis-map/utils/holo-flow/index.d.ts +2 -0
  7. package/es/src/gis-map/utils/holo-flow/index.mjs +26 -27
  8. package/es/src/gis-map/utils/holo-flow/signal-holo-flow.d.ts +2 -0
  9. package/es/src/gis-map/utils/holo-flow/signal-holo-flow.mjs +69 -57
  10. package/es/src/gis-map/utils/holo-flow/trace-holo-flow.d.ts +4 -3
  11. package/es/src/gis-map/utils/holo-flow/trace-holo-flow.mjs +92 -37
  12. package/es/src/gis-map/utils/holo-flow/trace-renderer-external.d.ts +9 -5
  13. package/es/src/gis-map/utils/holo-flow/trace-renderer-external.mjs +168 -121
  14. package/es/src/gis-map/utils/holo-flow/trace-renderer-layer.d.ts +1 -0
  15. package/es/src/gis-map/utils/holo-flow/trace-renderer-layer.mjs +3 -0
  16. package/es/src/types/index.d.ts +1 -0
  17. package/lib/src/gis-map/gis-map.vue.d.ts +3 -0
  18. package/lib/src/gis-map/gis-map.vue.js +1 -1
  19. package/lib/src/gis-map/index.d.ts +3 -0
  20. package/lib/src/gis-map/stores/appData.d.ts +1 -0
  21. package/lib/src/gis-map/stores/appData.js +1 -1
  22. package/lib/src/gis-map/utils/holo-flow/index.d.ts +2 -0
  23. package/lib/src/gis-map/utils/holo-flow/index.js +1 -1
  24. package/lib/src/gis-map/utils/holo-flow/signal-holo-flow.d.ts +2 -0
  25. package/lib/src/gis-map/utils/holo-flow/signal-holo-flow.js +1 -1
  26. package/lib/src/gis-map/utils/holo-flow/trace-holo-flow.d.ts +4 -3
  27. package/lib/src/gis-map/utils/holo-flow/trace-holo-flow.js +2 -1
  28. package/lib/src/gis-map/utils/holo-flow/trace-renderer-external.d.ts +9 -5
  29. package/lib/src/gis-map/utils/holo-flow/trace-renderer-external.js +1 -1
  30. package/lib/src/gis-map/utils/holo-flow/trace-renderer-layer.d.ts +1 -0
  31. package/lib/src/gis-map/utils/holo-flow/trace-renderer-layer.js +1 -1
  32. package/lib/src/types/index.d.ts +1 -0
  33. package/package.json +1 -1
@@ -1,39 +1,94 @@
1
- import * as g from "@arcgis/core/views/3d/externalRenderers";
2
- import u from "../../stores/index.mjs";
3
- import f from "./trace-renderer-external.mjs";
1
+ import * as u from "@arcgis/core/views/3d/externalRenderers";
2
+ import m from "../../stores/index.mjs";
3
+ import g from "./trace-renderer-external.mjs";
4
4
  import T from "./trace-renderer-layer.mjs";
5
- class N {
5
+ class v {
6
6
  constructor(e) {
7
- this.lastDataTime = 0, this.view = e;
8
- const o = u.useAppDataStore;
9
- this.mapConfig = JSON.parse(JSON.stringify(o.mapConfig)), e.type === "3d" ? (this.traceRenderer = new f(e), g.add(
7
+ this.appDataStore = m.useAppDataStore, this.logTable = [
8
+ [
9
+ "uuid",
10
+ "ptcId",
11
+ "plateno",
12
+ "timestamp",
13
+ "localTimestamp",
14
+ "timestamp_str",
15
+ "speed",
16
+ "laneNo",
17
+ "objHeight",
18
+ "objLength",
19
+ "latitude",
20
+ "longitude",
21
+ "ptcType",
22
+ "vehicleType",
23
+ "vehicleColor",
24
+ "plateColor",
25
+ "sbdm",
26
+ "heading",
27
+ "fixAngle",
28
+ "roadLayer",
29
+ "status",
30
+ "step"
31
+ ]
32
+ ], e.type === "3d" ? (this.traceRenderer = new g(e), u.add(
10
33
  e,
11
34
  this.traceRenderer
12
35
  )) : this.traceRenderer = new T(e);
13
36
  }
37
+ async init() {
38
+ await this.traceRenderer.init();
39
+ }
40
+ downloadLog() {
41
+ const e = this.logTable.map((c) => c.join(",")).join(`
42
+ `).replace(/null/g, ""), a = new Blob([e], { type: "text/csv;charset=utf-8;" }), l = URL.createObjectURL(a), r = document.createElement("a");
43
+ r.setAttribute("href", l), r.setAttribute("download", "trace-log.csv"), r.style.visibility = "hidden", document.body.appendChild(r), r.click(), document.body.removeChild(r);
44
+ }
14
45
  /**
15
46
  * 处理全息流轨迹数据
16
47
  * */
17
48
  async handleVehicleTraceData(e) {
18
- const o = new Date().getTime(), { newVehList: s, updateVehList: a, deleteVehList: c, jgsj: i } = e, n = e.crossId || "", l = [], h = [];
19
- if (s && s.length > 0) {
20
- for (const t of s) {
21
- t.localTimestamp || (t.localTimestamp = i || o);
22
- const r = this.buildVehicleTrackData(t, n);
23
- r && l.push(r);
24
- }
25
- await this.traceRenderer.addVehicles(l);
26
- }
49
+ console.log(this.appDataStore.saveTrackLog);
50
+ const { newVehList: a, updateVehList: l, deleteVehList: r, jgsj: c } = e, i = e.crossId || "", n = [], s = [];
27
51
  if (a && a.length > 0) {
28
52
  for (const t of a) {
29
- const r = this.buildVehicleTrackData(t, n);
30
- r && h.push(r);
53
+ t.localTimestamp || (t.localTimestamp = c || Date.now());
54
+ const o = this.buildVehicleTrackData(t, i);
55
+ this.logTable.push([
56
+ t.uuid,
57
+ t.ptcId,
58
+ t.plateno,
59
+ t.timestamp,
60
+ t.localTimestamp,
61
+ t.timestamp_str,
62
+ t.speed,
63
+ t.laneNo,
64
+ t.objHeight,
65
+ t.objLength,
66
+ t.latitude,
67
+ t.longitude,
68
+ t.ptcType,
69
+ t.vehicleType,
70
+ t.vehicleColor,
71
+ t.plateColor,
72
+ t.sbdm,
73
+ t.heading,
74
+ t.fixAngle,
75
+ t.roadLayer,
76
+ t.status,
77
+ t.step
78
+ ]), o && n.push(o);
79
+ }
80
+ await this.traceRenderer.addVehicles(n);
81
+ }
82
+ if (l && l.length > 0) {
83
+ for (const t of l) {
84
+ const o = this.buildVehicleTrackData(t, i);
85
+ o && s.push(o);
31
86
  }
32
- await this.traceRenderer.updateVehicles(h);
87
+ await this.traceRenderer.updateVehicles(s);
33
88
  }
34
- if (c && c.length > 0) {
35
- const t = c.map(
36
- (r) => n + "-" + (r.ptcId || r.vehno || r.vehNo)
89
+ if (r && r.length > 0) {
90
+ const t = r.map(
91
+ (o) => i + "-" + (o.ptcId || o.vehno || o.vehNo)
37
92
  );
38
93
  this.traceRenderer.deleteVehicles(t);
39
94
  }
@@ -69,28 +124,28 @@ class N {
69
124
  setInterpolate(e) {
70
125
  this.traceRenderer.setInterpolate(e);
71
126
  }
72
- buildVehicleTrackData(e, o) {
73
- const s = e.longitude, a = e.latitude, c = e.ptcId, i = Number(e.ptcType), n = e.heading, l = Number(e.vehicleType), h = Number(e.vehicleColor), t = e.plateNo || e.plateno, r = Number(e.plateColor), p = e.timestamp, d = e.localTimestamp, m = e.roadLayer ? String(e.roadLayer) : "1";
127
+ buildVehicleTrackData(e, a) {
128
+ const l = e.longitude, r = e.latitude, c = e.ptcId, i = Number(e.ptcType), n = e.heading, s = Number(e.vehicleType), t = Number(e.vehicleColor), o = e.plateNo || e.plateno, d = Number(e.plateColor), h = e.timestamp, p = e.roadLayer ? String(e.roadLayer) : "1";
74
129
  if (!(i < 0 || i > 8))
75
130
  return {
76
131
  ptcId: c,
77
- crossId: o,
78
- vehicleId: o + "-" + c,
79
- x: s,
80
- y: a,
132
+ crossId: a,
133
+ vehicleId: a + "-" + c,
134
+ x: l,
135
+ y: r,
81
136
  ptcType: i,
82
- vehicleType: l,
137
+ vehicleType: s,
83
138
  heading: i === 2 ? -n : n,
84
- vehicleColor: h,
85
- showName: t && t !== "" && t !== "0" && t !== "000000" ? t : "",
86
- plateNo: t,
87
- plateColor: r,
88
- timestamp: p,
89
- localTimestamp: d,
90
- roadLayer: m
139
+ vehicleColor: t,
140
+ showName: o && o !== "" && o !== "0" && o !== "000000" ? o : "",
141
+ plateNo: o,
142
+ plateColor: d,
143
+ timestamp: h,
144
+ localTimestamp: Date.now(),
145
+ roadLayer: p
91
146
  };
92
147
  }
93
148
  }
94
149
  export {
95
- N as default
150
+ v as default
96
151
  };
@@ -18,15 +18,18 @@ export default class TraceRendererExternal implements ITraceRendererInterface {
18
18
  private readonly view;
19
19
  private readonly assetsRoot;
20
20
  private carModel;
21
- private carModelReady;
22
21
  private vanModel;
23
- private vanModelReady;
24
22
  private truckModel;
25
- private truckModelReady;
26
23
  private busModel;
27
- private busModelReady;
28
24
  private bicycleModel;
29
- private bicycleModelReady;
25
+ private bluePlateBG;
26
+ private yellowPlateBG;
27
+ private whitePlateBG;
28
+ private blackPlateBG;
29
+ private neoYellowPlateBG;
30
+ private neoGreenPlateBG;
31
+ private greyPlateBG;
32
+ private isInitialized;
30
33
  private showGroundVehicle;
31
34
  private showElevatedVehicle;
32
35
  private isPaused;
@@ -36,6 +39,7 @@ export default class TraceRendererExternal implements ITraceRendererInterface {
36
39
  private needInterpolate;
37
40
  private updateModel;
38
41
  constructor(view: __esri.SceneView);
42
+ init(): Promise<void>;
39
43
  setInterpolate(needInterpolate: boolean): void;
40
44
  private context;
41
45
  setup(context: any): Promise<void>;