gisviewer-vue3-arcgis 1.0.269 → 1.0.272

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.
@@ -1,19 +1,22 @@
1
1
  import { Point as u } from "@arcgis/core/geometry";
2
2
  import y from "@arcgis/core/Graphic";
3
- import d from "@arcgis/core/layers/GraphicsLayer";
3
+ import p from "@arcgis/core/layers/GraphicsLayer";
4
4
  class C {
5
5
  constructor(e) {
6
- this.symbolScale = 6e3, this.oldScale = 0, this.showName = "signalId", this.showStyle = "scatter", this.clusterRadius = 120, this.minClusterPoints = 2, this.maxClusterSymbolSize = 50, this.minClusterSymbolSize = 25, this.clusteredLocations = [], this.locations = [], this.view = e, this.crossLayer = new d({
6
+ this.iconSymbolScale = 1e4, this.largeMarkerScale = 4e4, this.oldScale = 0, this.showName = "detail", this.showStyle = "scatter", this.clusterRadius = 120, this.minClusterPoints = 2, this.maxClusterSymbolSize = 50, this.minClusterSymbolSize = 25, this.clusteredLocations = [], this.locations = [], this.view = e, this.crossLayer = new p({
7
7
  id: "signal-control-cross-layer",
8
8
  title: "信控路口图层"
9
9
  }), this.view.map.add(this.crossLayer);
10
10
  }
11
+ didCrossScaleThreshold(e, s, t) {
12
+ return e < t && s >= t || e >= t && s < t;
13
+ }
11
14
  locationToScreen() {
12
15
  this.clusteredLocations = [], this.locations.forEach((e) => {
13
- const t = this.view.toScreen(
16
+ const s = this.view.toScreen(
14
17
  new u({ x: e.x, y: e.y })
15
18
  );
16
- t.x > 0 && t.y > 0 && (e.properties.screenX = t.x, e.properties.screenY = t.y, e.visited = !1, e.clusterId = void 0, this.clusteredLocations.push(e));
19
+ s.x > 0 && s.y > 0 && (e.properties.screenX = s.x, e.properties.screenY = s.y, e.visited = !1, e.clusterId = void 0, this.clusteredLocations.push(e));
17
20
  });
18
21
  }
19
22
  /**
@@ -22,50 +25,57 @@ class C {
22
25
  * @returns
23
26
  */
24
27
  showSignalCross(e) {
25
- if (this.crossLayer.removeAll(), this.showName = e.showName || "signalId", this.showStyle = e.style || "scatter", this.scaleWatchHandle || (this.scaleWatchHandle = this.view.watch("stationary", () => {
26
- if (this.showStyle === "scatter")
27
- (this.oldScale < this.symbolScale && this.view.scale >= this.symbolScale || this.oldScale >= this.symbolScale && this.view.scale < this.symbolScale) && this.crossLayer.graphics.forEach((t) => {
28
- t.symbol = this.getCrossSymbol(t.attributes);
29
- }), this.oldScale = this.view.scale;
30
- else {
28
+ if (this.crossLayer.removeAll(), this.showName = e.showName || "detail", this.showStyle = e.style || "scatter", this.oldScale = this.view.scale, this.scaleWatchHandle || (this.scaleWatchHandle = this.view.watch("stationary", () => {
29
+ if (this.showStyle === "scatter") {
30
+ const s = this.view.scale, t = this.didCrossScaleThreshold(
31
+ this.oldScale,
32
+ s,
33
+ this.iconSymbolScale
34
+ ), i = this.didCrossScaleThreshold(
35
+ this.oldScale,
36
+ s,
37
+ this.largeMarkerScale
38
+ );
39
+ (t || i) && this.updateScatterSymbol(), this.oldScale = s;
40
+ } else {
31
41
  this.locationToScreen();
32
- const t = this.doPixelCluster(this.clusterRadius);
33
- this.showClusterResult(t);
42
+ const s = this.doPixelCluster(this.clusterRadius);
43
+ this.showClusterResult(s);
34
44
  }
35
45
  })), this.showStyle === "scatter") {
36
- const t = e.points.map((i) => {
37
- const s = this.getCrossSymbol(i), r = this.getBrandLabel(i.brand), o = this.getOnlineLabel(i.isOnline), n = this.getMalfunctionLabel(
38
- i.isMalfunction
46
+ const s = e.points.map((t) => {
47
+ const i = this.getCrossSymbol(t), r = this.getBrandLabel(t.brand), o = this.getOnlineLabel(t.isOnline), a = this.getMalfunctionLabel(
48
+ t.isMalfunction
39
49
  );
40
50
  return new y({
41
51
  geometry: {
42
52
  type: "point",
43
- longitude: i.x,
44
- latitude: i.y
53
+ longitude: t.x,
54
+ latitude: t.y
45
55
  },
46
- symbol: s,
56
+ symbol: i,
47
57
  attributes: {
48
58
  type: "signal-cross",
49
- id: i.crossId,
59
+ id: t.crossId,
50
60
  brandLabel: r,
51
61
  isOnlineLabel: o,
52
- isMalfunctionLabel: n,
53
- ...i
62
+ isMalfunctionLabel: a,
63
+ ...t
54
64
  }
55
65
  });
56
66
  });
57
- this.crossLayer.addMany(t);
67
+ this.crossLayer.addMany(s);
58
68
  } else {
59
- this.locations = e.points.map((i) => ({
60
- id: i.crossId,
61
- x: i.x,
62
- y: i.y,
69
+ this.locations = e.points.map((t) => ({
70
+ id: t.crossId,
71
+ x: t.x,
72
+ y: t.y,
63
73
  visited: !1,
64
74
  clusterId: void 0,
65
- properties: i
75
+ properties: t
66
76
  })), this.locationToScreen();
67
- const t = this.doPixelCluster(this.clusterRadius);
68
- this.showClusterResult(t);
77
+ const s = this.doPixelCluster(this.clusterRadius);
78
+ this.showClusterResult(s);
69
79
  }
70
80
  return { status: 0, message: "ok" };
71
81
  }
@@ -73,6 +83,21 @@ class C {
73
83
  var e;
74
84
  this.crossLayer.removeAll(), (e = this.scaleWatchHandle) == null || e.remove(), this.scaleWatchHandle = null;
75
85
  }
86
+ /**
87
+ * 更改路口显示名称内容
88
+ * @param showName
89
+ */
90
+ changeShowName(e) {
91
+ this.showName = e, this.showStyle === "scatter" && this.updateScatterSymbol();
92
+ }
93
+ /**
94
+ * 更新散点符号
95
+ */
96
+ updateScatterSymbol() {
97
+ this.crossLayer.graphics.forEach((e) => {
98
+ e.symbol = this.getCrossSymbol(e.attributes);
99
+ });
100
+ }
76
101
  /**
77
102
  * 按照像素距离聚类
78
103
  * @param locations
@@ -81,16 +106,16 @@ class C {
81
106
  * @returns
82
107
  */
83
108
  doPixelCluster(e) {
84
- let t = 0;
85
- for (let i = 0; i < this.clusteredLocations.length; i++) {
86
- const s = this.clusteredLocations[i];
87
- if (s.visited)
109
+ let s = 0;
110
+ for (let t = 0; t < this.clusteredLocations.length; t++) {
111
+ const i = this.clusteredLocations[t];
112
+ if (i.visited)
88
113
  continue;
89
- s.visited = !0;
90
- const r = this.getNeighbors(s, e);
91
- r.length < this.minClusterPoints ? s.clusterId = -1 : (r.forEach((o) => {
92
- o.visited = !0, o.clusterId = t;
93
- }), s.clusterId = t, t++);
114
+ i.visited = !0;
115
+ const r = this.getNeighbors(i, e);
116
+ r.length < this.minClusterPoints ? i.clusterId = -1 : (r.forEach((o) => {
117
+ o.visited = !0, o.clusterId = s;
118
+ }), i.clusterId = s, s++);
94
119
  }
95
120
  return this.createClusters();
96
121
  }
@@ -101,8 +126,8 @@ class C {
101
126
  * @param eps
102
127
  * @returns
103
128
  */
104
- getNeighbors(e, t) {
105
- return this.clusteredLocations.filter((i) => i.id === e.id || i.visited ? !1 : this.getDistance(e, i) <= t);
129
+ getNeighbors(e, s) {
130
+ return this.clusteredLocations.filter((t) => t.id === e.id || t.visited ? !1 : this.getDistance(e, t) <= s);
106
131
  }
107
132
  /**
108
133
  * 两点间的像素距离
@@ -110,9 +135,9 @@ class C {
110
135
  * @param point2
111
136
  * @returns
112
137
  */
113
- getDistance(e, t) {
138
+ getDistance(e, s) {
114
139
  return Math.sqrt(
115
- Math.pow(e.properties.screenX - t.properties.screenX, 2) + Math.pow(e.properties.screenY - t.properties.screenY, 2)
140
+ Math.pow(e.properties.screenX - s.properties.screenX, 2) + Math.pow(e.properties.screenY - s.properties.screenY, 2)
116
141
  );
117
142
  }
118
143
  /**
@@ -121,41 +146,41 @@ class C {
121
146
  * @returns
122
147
  */
123
148
  createClusters() {
124
- const e = {}, t = [];
125
- for (const s of this.clusteredLocations)
126
- s.clusterId === void 0 || s.clusterId === -1 ? t.push(s) : (e[s.clusterId] || (e[s.clusterId] = []), e[s.clusterId].push(s));
127
- const i = Object.keys(e).map((s, r) => {
128
- const o = e[Number(s)], n = o.length, l = o.reduce((c, h) => c + h.x, 0), a = o.reduce((c, h) => c + h.y, 0), m = l / n, p = a / n;
149
+ const e = {}, s = [];
150
+ for (const i of this.clusteredLocations)
151
+ i.clusterId === void 0 || i.clusterId === -1 ? s.push(i) : (e[i.clusterId] || (e[i.clusterId] = []), e[i.clusterId].push(i));
152
+ const t = Object.keys(e).map((i, r) => {
153
+ const o = e[Number(i)], a = o.length, l = o.reduce((c, h) => c + h.x, 0), n = o.reduce((c, h) => c + h.y, 0), m = l / a, d = n / a;
129
154
  return {
130
- id: Number(s),
155
+ id: Number(i),
131
156
  items: o,
132
- count: n,
157
+ count: a,
133
158
  center: {
134
159
  x: m,
135
- y: p
160
+ y: d
136
161
  }
137
162
  };
138
163
  });
139
- return t.length > 0 && i.push({
164
+ return s.length > 0 && t.push({
140
165
  id: -1,
141
- items: t,
142
- count: t.length,
166
+ items: s,
167
+ count: s.length,
143
168
  center: null
144
- }), i;
169
+ }), t;
145
170
  }
146
171
  showClusterResult(e) {
147
172
  this.crossLayer.removeAll();
148
- let t = Number.MIN_VALUE, i = Number.MAX_VALUE;
149
- e.forEach((s) => {
150
- s.count > 1 && (i = Math.min(i, s.count), t = Math.max(t, s.count));
151
- }), e.forEach((s) => {
152
- if (s.id !== -1) {
153
- let r = i === t ? (this.maxClusterSymbolSize + this.minClusterSymbolSize) / 2 : this.minClusterSymbolSize + (s.count - i) / (t - i) * (this.maxClusterSymbolSize - this.minClusterSymbolSize);
173
+ let s = Number.MIN_VALUE, t = Number.MAX_VALUE;
174
+ e.forEach((i) => {
175
+ i.count > 1 && (t = Math.min(t, i.count), s = Math.max(s, i.count));
176
+ }), e.forEach((i) => {
177
+ if (i.id !== -1) {
178
+ let r = t === s ? (this.maxClusterSymbolSize + this.minClusterSymbolSize) / 2 : this.minClusterSymbolSize + (i.count - t) / (s - t) * (this.maxClusterSymbolSize - this.minClusterSymbolSize);
154
179
  r *= 0.75;
155
- const l = (s.count.toString().length * 8 + 6) / 2, a = new y({
156
- geometry: new u({ x: s.center.x, y: s.center.y }),
180
+ const l = (i.count.toString().length * 8 + 6) / 2, n = new y({
181
+ geometry: new u({ x: i.center.x, y: i.center.y }),
157
182
  attributes: {
158
- count: s.count
183
+ count: i.count
159
184
  },
160
185
  symbol: {
161
186
  type: "cim",
@@ -265,9 +290,9 @@ class C {
265
290
  }
266
291
  }
267
292
  });
268
- this.crossLayer.add(a);
293
+ this.crossLayer.add(n);
269
294
  } else
270
- s.items.forEach((r) => {
295
+ i.items.forEach((r) => {
271
296
  const o = new y({
272
297
  geometry: new u({ x: r.x, y: r.y }),
273
298
  attributes: {
@@ -283,8 +308,8 @@ class C {
283
308
  });
284
309
  }
285
310
  getBrandLabel(e) {
286
- const t = (e ?? "").toLowerCase();
287
- return t === "scats" ? "SCATS" : t === "gc" ? "国产" : e ?? "";
311
+ const s = (e ?? "").toLowerCase();
312
+ return s === "scats" ? "SCATS" : s === "gc" ? "国产" : e ?? "";
288
313
  }
289
314
  getOnlineLabel(e) {
290
315
  return e ? "在线" : "离线";
@@ -293,7 +318,8 @@ class C {
293
318
  return e ? "故障" : "正常";
294
319
  }
295
320
  getCrossSymbol(e) {
296
- if (this.view.scale <= this.symbolScale) {
321
+ var s;
322
+ if (this.view.scale <= this.iconSymbolScale) {
297
323
  let t = "/GisViewerAssets/Images/cross/ic_";
298
324
  return t += e.brand === "scats" ? "scats_" : "gc_", t += e.isOnline ? "online_" : "offline_", t += e.isMalfunction ? "malfunction.png" : "normal.png", {
299
325
  type: "cim",
@@ -308,7 +334,7 @@ class C {
308
334
  valueExpressionInfo: {
309
335
  type: "CIMExpressionInfo",
310
336
  title: "Custom",
311
- expression: this.showName === "signalId" ? 'Replace($feature.name, "与", "/") + " " + $feature.signalId' : 'Replace($feature.name, "与", "/") + " " + $feature.crossId',
337
+ expression: this.showName === "crossName" ? 'Replace($feature.name, "与", "/")' : this.showName === "signalId" ? "$feature.signalId" : 'Replace($feature.name, "与", "/") + " " + $feature.signalId',
312
338
  returnType: "Default"
313
339
  }
314
340
  }
@@ -385,10 +411,10 @@ class C {
385
411
  const t = {
386
412
  type: "simple-marker",
387
413
  style: "circle",
388
- size: 6,
389
- outline: { width: 0 }
414
+ size: this.view.scale > this.largeMarkerScale ? 3 : 6,
415
+ outline: { width: 1 }
390
416
  };
391
- return e.brand.toLowerCase() === "scats" ? (e.isOnline ? t.color = [23, 169, 100] : t.color = [202, 202, 202], t.outline.color = [23, 169, 100]) : e.isOnline ? t.color = [33, 240, 142] : t.color = [202, 202, 202], t;
417
+ return ((s = e.brand) == null ? void 0 : s.toLowerCase()) === "scats" ? (e.isOnline ? t.color = [68, 203, 188] : t.color = [200, 200, 200], t.outline.color = [32, 97, 90]) : (e.isOnline ? t.color = [129, 226, 73] : t.color = [200, 200, 200], t.outline.color = [65, 115, 37]), t;
392
418
  }
393
419
  }
394
420
  }
@@ -1,13 +1,13 @@
1
1
  import m from "@arcgis/core/Graphic";
2
- import v from "@arcgis/core/layers/FeatureLayer";
2
+ import w from "@arcgis/core/layers/FeatureLayer";
3
3
  import D from "../common-utils.mjs";
4
- import { subDistrictPointLayerOptions as I, subDistrictLineLayerOptions as z } from "./layer-symbol.mjs";
5
- class C {
4
+ import { subDistrictPointLayerOptions as I, subDistrictLineLayerOptions as P } from "./layer-symbol.mjs";
5
+ class R {
6
6
  constructor(i) {
7
- this.roadConnections = [], this.view = i, this.subDistrictPointLayer = new v(
7
+ this.roadConnections = [], this.view = i, this.subDistrictPointLayer = new w(
8
8
  I
9
- ), this.subDistrictPointLayer.spatialReference = i.spatialReference, this.subDistrictPointLayer.popupEnabled = !0, this.subDistrictLineLayer = new v(
10
- z
9
+ ), this.subDistrictPointLayer.spatialReference = i.spatialReference, this.subDistrictPointLayer.popupEnabled = !0, this.subDistrictLineLayer = new w(
10
+ P
11
11
  ), this.subDistrictLineLayer.spatialReference = i.spatialReference, this.subDistrictLineLayer.popupEnabled = !0, this.view.map.addMany([
12
12
  this.subDistrictLineLayer,
13
13
  this.subDistrictPointLayer
@@ -17,22 +17,22 @@ class C {
17
17
  var a;
18
18
  await this.clearSubDistricts(), (a = this.clickHandler) == null || a.remove(), this.clickHandler = this.view.on("click", this.viewHitTest.bind(this));
19
19
  let s = 0;
20
- const e = [], r = [];
21
- i.forEach((t) => {
22
- t.roadConnections.length > 0 && this.roadConnections.push(...t.roadConnections), r.push({
23
- value: t.id,
24
- label: t.name,
20
+ const t = [], r = [];
21
+ i.forEach((e) => {
22
+ e.roadConnections.length > 0 && this.roadConnections.push(...e.roadConnections), r.push({
23
+ value: e.id,
24
+ label: e.name,
25
25
  symbol: {
26
26
  type: "simple-marker",
27
27
  style: "circle",
28
- color: [...t.areaColor, 0.8],
28
+ color: [...e.areaColor, 0.8],
29
29
  size: "8px",
30
30
  outline: {
31
- color: [...t.areaColor],
31
+ color: [...e.areaColor],
32
32
  width: 4
33
33
  }
34
34
  }
35
- }), t.signals.forEach((n) => {
35
+ }), e.signals.forEach((n) => {
36
36
  const d = new m({
37
37
  geometry: {
38
38
  type: "point",
@@ -43,16 +43,16 @@ class C {
43
43
  ObjectID: s++,
44
44
  id: n.nodeId,
45
45
  name: n.name,
46
- subDistrictId: t.id,
47
- subDistrictName: t.name,
48
- districtId: t.parentId,
49
- districtName: t.parentName,
50
- signalCount: t.signalCount,
51
- color: t.areaColor.join(","),
46
+ subDistrictId: e.id,
47
+ subDistrictName: e.name,
48
+ districtId: e.parentId,
49
+ districtName: e.parentName,
50
+ signalCount: e.signalCount,
51
+ color: e.areaColor.join(","),
52
52
  type: "subDistrict"
53
53
  }
54
54
  });
55
- e.push(d);
55
+ t.push(d);
56
56
  });
57
57
  }), this.subDistrictPointLayer.renderer = {
58
58
  type: "unique-value",
@@ -97,118 +97,124 @@ class C {
97
97
  }
98
98
  ]
99
99
  }, this.currentPointRenderer = this.subDistrictPointLayer.renderer.clone(), await this.subDistrictPointLayer.applyEdits({
100
- addFeatures: e
101
- }), await D.viewGoto(this.view, e);
100
+ addFeatures: t
101
+ }), await D.viewGoto(this.view, t);
102
102
  }
103
103
  /**
104
104
  * 显示区控下的所有子区,用道路线表示
105
105
  * @param id 区控ID
106
106
  */
107
107
  async showRoads(i) {
108
- const { type: s, id: e } = i, r = this.subDistrictPointLayer.createQuery(), a = s === "district" ? "districtId" : "subDistrictId";
109
- e !== "" ? r.where = `${a} = '${e}'` : r.where = "1=1";
110
- const t = await this.subDistrictPointLayer.queryFeatures(
108
+ const { type: s, id: t } = i, r = this.subDistrictPointLayer.createQuery(), a = s === "district" ? "districtId" : "subDistrictId";
109
+ t !== "" ? r.where = `${a} = '${t}'` : r.where = "1=1";
110
+ const e = await this.subDistrictPointLayer.queryFeatures(
111
111
  r
112
112
  ), n = /* @__PURE__ */ new Map();
113
- t.features.forEach((u) => {
113
+ e.features.forEach((o) => {
114
114
  var b;
115
115
  const {
116
- subDistrictId: o,
116
+ subDistrictId: u,
117
117
  color: c,
118
- id: p,
119
- districtName: h,
120
- subDistrictName: L,
118
+ id: h,
119
+ districtName: p,
120
+ subDistrictName: f,
121
121
  signalCount: y
122
- } = u.attributes;
123
- n.has(o) || n.set(o, {
122
+ } = o.attributes;
123
+ n.has(u) || n.set(u, {
124
124
  color: c,
125
125
  signalIds: [],
126
- districtName: h,
127
- subDistrictName: L,
126
+ districtName: p,
127
+ subDistrictName: f,
128
128
  signalCount: y
129
- }), (b = n.get(o)) == null || b.signalIds.push(p);
129
+ }), (b = n.get(u)) == null || b.signalIds.push(h);
130
130
  });
131
- const d = [], f = [];
132
- for (const u of n) {
133
- let o = 0;
134
- const c = u[0];
131
+ const d = [], L = [];
132
+ for (const o of n) {
133
+ let u = 0;
134
+ const c = o[0];
135
135
  d.push({
136
136
  value: c,
137
137
  symbol: {
138
138
  type: "simple-line",
139
- color: u[1].color.split(",").map(Number),
139
+ color: o[1].color.split(",").map(Number),
140
140
  width: 2,
141
141
  style: "solid"
142
142
  }
143
143
  });
144
- const { districtName: p, subDistrictName: h, signalIds: L, signalCount: y } = u[1];
144
+ const { districtName: h, subDistrictName: p, signalIds: f, signalCount: y } = o[1];
145
145
  this.roadConnections.filter(
146
146
  (l) => l.subDistrictId === c
147
147
  ).forEach((l) => {
148
- const w = new m({
148
+ const v = new m({
149
149
  geometry: {
150
150
  type: "polyline",
151
151
  paths: l.coordinates
152
152
  },
153
153
  attributes: {
154
- ObjectID: o++,
154
+ ObjectID: u++,
155
155
  id: l.id,
156
156
  districtId: l.districtId,
157
157
  subDistrictId: c,
158
- subDistrictName: h,
159
- districtName: p,
158
+ subDistrictName: p,
159
+ districtName: h,
160
160
  signalCount: y,
161
- color: u[1].color
161
+ color: o[1].color
162
162
  }
163
163
  });
164
- f.push(w);
164
+ L.push(v);
165
165
  });
166
166
  }
167
167
  this.subDistrictLineLayer.renderer = {
168
- type: "unique-value",
169
- field: "subDistrictId",
170
- defaultSymbol: {
168
+ type: "simple",
169
+ symbol: {
171
170
  type: "simple-line",
172
- color: [180, 180, 180, 0.5],
173
- width: 2,
174
- style: "solid"
175
- },
176
- defaultLabel: "其他子区",
177
- uniqueValueInfos: d,
178
- visualVariables: [
179
- {
180
- type: "size",
181
- valueExpression: "$view.scale",
182
- stops: [
183
- {
184
- size: 6,
185
- value: 2500
186
- },
187
- {
188
- size: 5,
189
- value: 5e3
190
- },
191
- {
192
- size: 4,
193
- value: 18055.954822000003
194
- },
195
- {
196
- size: 3,
197
- value: 144447.638572
198
- },
199
- {
200
- size: 2,
201
- value: 1155581108577e-6
202
- }
203
- ]
204
- }
205
- ]
171
+ color: [23, 151, 255],
172
+ width: 2
173
+ }
174
+ // type: 'unique-value',
175
+ // field: 'subDistrictId',
176
+ // defaultSymbol: {
177
+ // type: 'simple-line',
178
+ // color: [180, 180, 180, 0.5],
179
+ // width: 2,
180
+ // style: 'solid'
181
+ // },
182
+ // defaultLabel: '其他子区',
183
+ // uniqueValueInfos,
184
+ // visualVariables: [
185
+ // {
186
+ // type: 'size',
187
+ // valueExpression: '$view.scale',
188
+ // stops: [
189
+ // {
190
+ // size: 6,
191
+ // value: 2500
192
+ // },
193
+ // {
194
+ // size: 5,
195
+ // value: 5000
196
+ // },
197
+ // {
198
+ // size: 4,
199
+ // value: 18055.954822000003
200
+ // },
201
+ // {
202
+ // size: 3,
203
+ // value: 144447.638572
204
+ // },
205
+ // {
206
+ // size: 2,
207
+ // value: 1155581.108577
208
+ // }
209
+ // ]
210
+ // }
211
+ // ]
206
212
  }, this.currentLineRenderer = this.subDistrictLineLayer.renderer.clone(), await this.subDistrictLineLayer.applyEdits({
207
- addFeatures: f
213
+ addFeatures: L
208
214
  });
209
215
  }
210
216
  async clearSubDistricts() {
211
- var e;
217
+ var t;
212
218
  const i = await this.subDistrictPointLayer.queryFeatures();
213
219
  i.features.length > 0 && await this.subDistrictPointLayer.applyEdits({
214
220
  deleteFeatures: i.features
@@ -216,7 +222,7 @@ class C {
216
222
  const s = await this.subDistrictLineLayer.queryFeatures();
217
223
  s.features.length > 0 && await this.subDistrictLineLayer.applyEdits({
218
224
  deleteFeatures: s.features
219
- }), this.subDistrictLineLayer.definitionExpression = "1=1", this.roadConnections = [], (e = this.clickHandler) == null || e.remove();
225
+ }), this.subDistrictLineLayer.definitionExpression = "1=1", this.roadConnections = [], (t = this.clickHandler) == null || t.remove();
220
226
  }
221
227
  setVisible(i) {
222
228
  this.showRoads({ type: "district", id: "" }), this.subDistrictPointLayer.visible = i, this.subDistrictLineLayer.visible = i;
@@ -228,8 +234,8 @@ class C {
228
234
  async locateSubDistrict(i) {
229
235
  const s = this.subDistrictPointLayer.createQuery();
230
236
  s.where = `subDistrictId = '${i}'`, s.returnGeometry = !0;
231
- const e = await this.subDistrictPointLayer.queryFeatures(s);
232
- return e.features.length > 0 ? (await D.viewGoto(this.view, e.features, !1), { status: 0, message: "ok" }) : { status: 1, message: "未找到子区" };
237
+ const t = await this.subDistrictPointLayer.queryFeatures(s);
238
+ return t.features.length > 0 ? (await D.viewGoto(this.view, t.features, !1), { status: 0, message: "ok" }) : { status: 1, message: "未找到子区" };
233
239
  }
234
240
  /**
235
241
  * 高亮子区, 其他子区隐藏
@@ -238,14 +244,14 @@ class C {
238
244
  */
239
245
  async highlightSubDistrict(i) {
240
246
  let s = "";
241
- const e = this.subDistrictPointLayer.definitionExpression;
247
+ const t = this.subDistrictPointLayer.definitionExpression;
242
248
  this.subDistrictPointLayer.definitionExpression = `subDistrictId = '${i.id}'`;
243
249
  const r = await this.subDistrictPointLayer.queryFeatures(), a = r.features.length;
244
250
  return a > 0 ? (this.subDistrictLineLayer.definitionExpression = `subDistrictId = '${i.id}'`, s = r.features[0].attributes.districtId, await D.viewGoto(
245
251
  this.view,
246
252
  r.features,
247
253
  i.needZoom !== !1
248
- )) : this.subDistrictPointLayer.definitionExpression = e, { count: a, parentId: s };
254
+ )) : this.subDistrictPointLayer.definitionExpression = t, { count: a, parentId: s };
249
255
  }
250
256
  /**
251
257
  * 按照区控、子区id显示子区
@@ -253,7 +259,7 @@ class C {
253
259
  * @param id
254
260
  */
255
261
  filter(i) {
256
- const { type: s, id: e } = i, r = `${s === "district" ? "districtId" : "subDistrictId"} = '${e}'`;
262
+ const { type: s, id: t } = i, r = `${s === "district" ? "districtId" : "subDistrictId"} = '${t}'`;
257
263
  this.subDistrictPointLayer.definitionExpression = r, this.subDistrictLineLayer.definitionExpression = r;
258
264
  }
259
265
  /**
@@ -268,15 +274,15 @@ class C {
268
274
  */
269
275
  async viewHitTest(i) {
270
276
  var r;
271
- const e = (r = (await this.view.hitTest(i, {
277
+ const t = (r = (await this.view.hitTest(i, {
272
278
  include: [this.subDistrictPointLayer, this.subDistrictLineLayer]
273
279
  })).results) == null ? void 0 : r.filter(
274
280
  (a) => a.type === "graphic"
275
281
  );
276
- if (e.length === 0)
282
+ if (t.length === 0)
277
283
  console.time("resetRenderer"), this.subDistrictPointLayer.renderer = this.currentPointRenderer, this.subDistrictLineLayer.renderer = this.currentLineRenderer;
278
284
  else {
279
- const a = e[0].graphic, t = a.attributes.color.split(",").map(Number);
285
+ const a = t[0].graphic, e = a.attributes.color.split(",").map(Number);
280
286
  this.subDistrictPointLayer.renderer = {
281
287
  type: "unique-value",
282
288
  field: "subDistrictId",
@@ -297,10 +303,10 @@ class C {
297
303
  symbol: {
298
304
  type: "simple-marker",
299
305
  style: "circle",
300
- color: [...t, 0.8],
306
+ color: [...e, 0.8],
301
307
  size: "8px",
302
308
  outline: {
303
- color: t,
309
+ color: e,
304
310
  width: 4
305
311
  }
306
312
  }
@@ -388,5 +394,5 @@ class C {
388
394
  }
389
395
  }
390
396
  export {
391
- C as default
397
+ R as default
392
398
  };
@@ -193,6 +193,10 @@ declare const _sfc_main: import("vue").DefineComponent<{
193
193
  status: number;
194
194
  message: string;
195
195
  };
196
+ changeSignalCrossShowName: (nameType: string) => void | {
197
+ status: number;
198
+ message: string;
199
+ };
196
200
  addGreenWaveBand: (params: IEditSignalControlAreaParams) => void;
197
201
  stopAddGreenWaveBand: () => {
198
202
  status: number;