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.
- package/es/src/gis-map/gis-map.vue.d.ts +3 -0
- package/es/src/gis-map/gis-map.vue.mjs +117 -98
- package/es/src/gis-map/index.d.ts +3 -0
- package/es/src/gis-map/stores/appData.d.ts +1 -0
- package/es/src/gis-map/stores/appData.mjs +5 -4
- package/es/src/gis-map/utils/holo-flow/index.d.ts +2 -0
- package/es/src/gis-map/utils/holo-flow/index.mjs +26 -27
- package/es/src/gis-map/utils/holo-flow/signal-holo-flow.d.ts +2 -0
- package/es/src/gis-map/utils/holo-flow/signal-holo-flow.mjs +69 -57
- package/es/src/gis-map/utils/holo-flow/trace-holo-flow.d.ts +4 -3
- package/es/src/gis-map/utils/holo-flow/trace-holo-flow.mjs +92 -37
- package/es/src/gis-map/utils/holo-flow/trace-renderer-external.d.ts +9 -5
- package/es/src/gis-map/utils/holo-flow/trace-renderer-external.mjs +168 -121
- package/es/src/gis-map/utils/holo-flow/trace-renderer-layer.d.ts +1 -0
- package/es/src/gis-map/utils/holo-flow/trace-renderer-layer.mjs +3 -0
- package/es/src/types/index.d.ts +1 -0
- package/lib/src/gis-map/gis-map.vue.d.ts +3 -0
- package/lib/src/gis-map/gis-map.vue.js +1 -1
- package/lib/src/gis-map/index.d.ts +3 -0
- package/lib/src/gis-map/stores/appData.d.ts +1 -0
- package/lib/src/gis-map/stores/appData.js +1 -1
- package/lib/src/gis-map/utils/holo-flow/index.d.ts +2 -0
- package/lib/src/gis-map/utils/holo-flow/index.js +1 -1
- package/lib/src/gis-map/utils/holo-flow/signal-holo-flow.d.ts +2 -0
- package/lib/src/gis-map/utils/holo-flow/signal-holo-flow.js +1 -1
- package/lib/src/gis-map/utils/holo-flow/trace-holo-flow.d.ts +4 -3
- package/lib/src/gis-map/utils/holo-flow/trace-holo-flow.js +2 -1
- package/lib/src/gis-map/utils/holo-flow/trace-renderer-external.d.ts +9 -5
- package/lib/src/gis-map/utils/holo-flow/trace-renderer-external.js +1 -1
- package/lib/src/gis-map/utils/holo-flow/trace-renderer-layer.d.ts +1 -0
- package/lib/src/gis-map/utils/holo-flow/trace-renderer-layer.js +1 -1
- package/lib/src/types/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,39 +1,94 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
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
|
|
5
|
+
class v {
|
|
6
6
|
constructor(e) {
|
|
7
|
-
this.
|
|
8
|
-
|
|
9
|
-
|
|
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
|
-
|
|
19
|
-
|
|
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
|
-
|
|
30
|
-
|
|
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(
|
|
87
|
+
await this.traceRenderer.updateVehicles(s);
|
|
33
88
|
}
|
|
34
|
-
if (
|
|
35
|
-
const t =
|
|
36
|
-
(
|
|
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,
|
|
73
|
-
const
|
|
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:
|
|
78
|
-
vehicleId:
|
|
79
|
-
x:
|
|
80
|
-
y:
|
|
132
|
+
crossId: a,
|
|
133
|
+
vehicleId: a + "-" + c,
|
|
134
|
+
x: l,
|
|
135
|
+
y: r,
|
|
81
136
|
ptcType: i,
|
|
82
|
-
vehicleType:
|
|
137
|
+
vehicleType: s,
|
|
83
138
|
heading: i === 2 ? -n : n,
|
|
84
|
-
vehicleColor:
|
|
85
|
-
showName:
|
|
86
|
-
plateNo:
|
|
87
|
-
plateColor:
|
|
88
|
-
timestamp:
|
|
89
|
-
localTimestamp:
|
|
90
|
-
roadLayer:
|
|
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
|
-
|
|
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
|
|
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>;
|