gisviewer-vue3-arcgis 1.0.110 → 1.0.112
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/utils/holo-flow/trace-holo-flow.mjs +105 -78
- package/es/src/gis-map/utils/holo-flow/trace-renderer-external.d.ts +1 -0
- package/es/src/gis-map/utils/holo-flow/trace-renderer-external.mjs +224 -244
- package/es/src/gis-map/utils/holo-flow/vehicle-pool.d.ts +41 -0
- package/es/src/gis-map/utils/holo-flow/vehicle-pool.mjs +180 -0
- package/es/src/types/index.d.ts +10 -0
- package/lib/src/gis-map/utils/holo-flow/trace-holo-flow.js +2 -2
- package/lib/src/gis-map/utils/holo-flow/trace-renderer-external.d.ts +1 -0
- package/lib/src/gis-map/utils/holo-flow/trace-renderer-external.js +1 -1
- package/lib/src/gis-map/utils/holo-flow/vehicle-pool.d.ts +41 -0
- package/lib/src/gis-map/utils/holo-flow/vehicle-pool.js +1 -0
- package/lib/src/types/index.d.ts +10 -0
- package/package.json +1 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import
|
|
1
|
+
import * as m from "@arcgis/core/views/3d/externalRenderers";
|
|
2
|
+
import u from "../../stores/index.mjs";
|
|
3
3
|
import g from "./trace-renderer-external.mjs";
|
|
4
4
|
import T from "./trace-renderer-layer.mjs";
|
|
5
|
-
class
|
|
6
|
-
constructor(
|
|
7
|
-
this.appDataStore =
|
|
5
|
+
class L {
|
|
6
|
+
constructor(t) {
|
|
7
|
+
this.appDataStore = u.useAppDataStore, this.logTable = [
|
|
8
8
|
[
|
|
9
9
|
"uuid",
|
|
10
10
|
"ptcId",
|
|
@@ -27,78 +27,105 @@ class v {
|
|
|
27
27
|
"fixAngle",
|
|
28
28
|
"roadLayer",
|
|
29
29
|
"status",
|
|
30
|
-
"step"
|
|
30
|
+
"step",
|
|
31
|
+
"receiveTimestamp"
|
|
31
32
|
]
|
|
32
|
-
],
|
|
33
|
-
|
|
33
|
+
], t.type === "3d" ? (this.traceRenderer = new g(t), m.add(
|
|
34
|
+
t,
|
|
34
35
|
this.traceRenderer
|
|
35
|
-
)) : this.traceRenderer = new T(
|
|
36
|
+
)) : this.traceRenderer = new T(t);
|
|
36
37
|
}
|
|
37
38
|
async init() {
|
|
38
39
|
await this.traceRenderer.init();
|
|
39
40
|
}
|
|
40
41
|
downloadLog() {
|
|
41
|
-
const
|
|
42
|
-
`).replace(/null/g, ""),
|
|
43
|
-
|
|
42
|
+
const t = this.logTable.map((s) => s.join(",")).join(`
|
|
43
|
+
`).replace(/null/g, ""), r = new Blob([t], { type: "text/csv;charset=utf-8;" }), l = URL.createObjectURL(r), a = document.createElement("a");
|
|
44
|
+
a.setAttribute("href", l), a.setAttribute("download", "trace-log.csv"), a.style.visibility = "hidden", document.body.appendChild(a), a.click(), document.body.removeChild(a);
|
|
44
45
|
}
|
|
45
46
|
/**
|
|
46
47
|
* 处理全息流轨迹数据
|
|
47
48
|
* */
|
|
48
|
-
async handleVehicleTraceData(
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
49
|
+
async handleVehicleTraceData(t) {
|
|
50
|
+
const { newVehList: r, updateVehList: l, deleteVehList: a, jgsj: s } = t, i = t.crossId || "", c = [], n = [], d = Date.now();
|
|
51
|
+
if (r && r.length > 0) {
|
|
52
|
+
for (const e of r) {
|
|
53
|
+
e.localTimestamp || (e.localTimestamp = s || Date.now()), this.appDataStore.saveTrackLog && this.logTable.push([
|
|
54
|
+
e.uuid,
|
|
55
|
+
e.ptcId,
|
|
56
|
+
e.plateno,
|
|
57
|
+
e.timestamp,
|
|
58
|
+
e.localTimestamp,
|
|
59
|
+
e.timestamp_str,
|
|
60
|
+
e.speed,
|
|
61
|
+
e.laneNo,
|
|
62
|
+
e.objHeight,
|
|
63
|
+
e.objLength,
|
|
64
|
+
e.latitude,
|
|
65
|
+
e.longitude,
|
|
66
|
+
e.ptcType,
|
|
67
|
+
e.vehicleType,
|
|
68
|
+
e.vehicleColor,
|
|
69
|
+
e.plateColor,
|
|
70
|
+
e.sbdm,
|
|
71
|
+
e.heading,
|
|
72
|
+
e.fixAngle,
|
|
73
|
+
e.roadLayer,
|
|
74
|
+
e.status,
|
|
75
|
+
e.step,
|
|
76
|
+
d
|
|
77
|
+
]);
|
|
78
|
+
const o = this.buildVehicleTrackData(e, i);
|
|
79
|
+
o && c.push(o);
|
|
79
80
|
}
|
|
80
|
-
await this.traceRenderer.addVehicles(
|
|
81
|
+
await this.traceRenderer.addVehicles(c);
|
|
81
82
|
}
|
|
82
83
|
if (l && l.length > 0) {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
84
|
+
const e = Date.now();
|
|
85
|
+
for (const o of l) {
|
|
86
|
+
this.appDataStore.saveTrackLog && this.logTable.push([
|
|
87
|
+
o.uuid,
|
|
88
|
+
o.ptcId,
|
|
89
|
+
o.plateno,
|
|
90
|
+
o.timestamp,
|
|
91
|
+
o.localTimestamp,
|
|
92
|
+
o.timestamp_str,
|
|
93
|
+
o.speed,
|
|
94
|
+
o.laneNo,
|
|
95
|
+
o.objHeight,
|
|
96
|
+
o.objLength,
|
|
97
|
+
o.latitude,
|
|
98
|
+
o.longitude,
|
|
99
|
+
o.ptcType,
|
|
100
|
+
o.vehicleType,
|
|
101
|
+
o.vehicleColor,
|
|
102
|
+
o.plateColor,
|
|
103
|
+
o.sbdm,
|
|
104
|
+
o.heading,
|
|
105
|
+
o.fixAngle,
|
|
106
|
+
o.roadLayer,
|
|
107
|
+
o.status,
|
|
108
|
+
o.step,
|
|
109
|
+
e
|
|
110
|
+
]);
|
|
111
|
+
const p = this.buildVehicleTrackData(o, i);
|
|
112
|
+
p && n.push(p);
|
|
86
113
|
}
|
|
87
|
-
await this.traceRenderer.updateVehicles(
|
|
114
|
+
await this.traceRenderer.updateVehicles(n);
|
|
88
115
|
}
|
|
89
|
-
if (
|
|
90
|
-
const
|
|
116
|
+
if (a && a.length > 0) {
|
|
117
|
+
const e = a.map(
|
|
91
118
|
(o) => i + "-" + (o.ptcId || o.vehno || o.vehNo)
|
|
92
119
|
);
|
|
93
|
-
this.traceRenderer.deleteVehicles(
|
|
120
|
+
this.traceRenderer.deleteVehicles(e);
|
|
94
121
|
}
|
|
95
122
|
}
|
|
96
123
|
/**
|
|
97
124
|
* 切换交通信息可见性
|
|
98
125
|
* @param params
|
|
99
126
|
*/
|
|
100
|
-
toggleTrafficInfo(
|
|
101
|
-
this.traceRenderer.toggleTrafficInfo(
|
|
127
|
+
toggleTrafficInfo(t) {
|
|
128
|
+
this.traceRenderer.toggleTrafficInfo(t);
|
|
102
129
|
}
|
|
103
130
|
/**
|
|
104
131
|
* 清除轨迹流
|
|
@@ -109,43 +136,43 @@ class v {
|
|
|
109
136
|
/**
|
|
110
137
|
* 切换暂停
|
|
111
138
|
* */
|
|
112
|
-
togglePause(
|
|
113
|
-
this.traceRenderer.togglePause(
|
|
139
|
+
togglePause(t) {
|
|
140
|
+
this.traceRenderer.togglePause(t);
|
|
114
141
|
}
|
|
115
|
-
updatePanelContent(
|
|
116
|
-
this.traceRenderer.updatePanelContent(
|
|
142
|
+
updatePanelContent(t) {
|
|
143
|
+
this.traceRenderer.updatePanelContent(t);
|
|
117
144
|
}
|
|
118
|
-
toggleGroundVehicle(
|
|
119
|
-
this.traceRenderer.toggleGroundVehicle(
|
|
145
|
+
toggleGroundVehicle(t) {
|
|
146
|
+
this.traceRenderer.toggleGroundVehicle(t);
|
|
120
147
|
}
|
|
121
|
-
toggleElevatedVehicle(
|
|
122
|
-
this.traceRenderer.toggleElevatedVehicle(
|
|
148
|
+
toggleElevatedVehicle(t) {
|
|
149
|
+
this.traceRenderer.toggleElevatedVehicle(t);
|
|
123
150
|
}
|
|
124
|
-
setInterpolate(
|
|
125
|
-
this.traceRenderer.setInterpolate(
|
|
151
|
+
setInterpolate(t) {
|
|
152
|
+
this.traceRenderer.setInterpolate(t);
|
|
126
153
|
}
|
|
127
|
-
buildVehicleTrackData(
|
|
128
|
-
const l =
|
|
154
|
+
buildVehicleTrackData(t, r) {
|
|
155
|
+
const l = t.longitude, a = t.latitude, s = t.ptcId, i = Number(t.ptcType), c = t.heading, n = Number(t.vehicleType), d = Number(t.vehicleColor), e = t.plateNo || t.plateno, o = Number(t.plateColor), p = t.timestamp, h = t.roadLayer ? String(t.roadLayer) : "1";
|
|
129
156
|
if (!(i < 0 || i > 8))
|
|
130
157
|
return {
|
|
131
|
-
ptcId:
|
|
132
|
-
crossId:
|
|
133
|
-
vehicleId:
|
|
158
|
+
ptcId: s,
|
|
159
|
+
crossId: r,
|
|
160
|
+
vehicleId: r + "-" + s,
|
|
134
161
|
x: l,
|
|
135
|
-
y:
|
|
162
|
+
y: a,
|
|
136
163
|
ptcType: i,
|
|
137
|
-
vehicleType:
|
|
138
|
-
heading: i === 2 ? -
|
|
139
|
-
vehicleColor:
|
|
140
|
-
showName:
|
|
141
|
-
plateNo:
|
|
142
|
-
plateColor:
|
|
143
|
-
timestamp:
|
|
164
|
+
vehicleType: n,
|
|
165
|
+
heading: i === 2 ? -c : c,
|
|
166
|
+
vehicleColor: d,
|
|
167
|
+
showName: e && e !== "" && e !== "0" && e !== "000000" ? e : "",
|
|
168
|
+
plateNo: e,
|
|
169
|
+
plateColor: o,
|
|
170
|
+
timestamp: p,
|
|
144
171
|
localTimestamp: Date.now(),
|
|
145
|
-
roadLayer:
|
|
172
|
+
roadLayer: h
|
|
146
173
|
};
|
|
147
174
|
}
|
|
148
175
|
}
|
|
149
176
|
export {
|
|
150
|
-
|
|
177
|
+
L as default
|
|
151
178
|
};
|