@vtx/cs-map-layer 1.0.14 → 1.0.15

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 (49) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +40 -40
  3. package/lib/ConfluenceLineLayer/index.js +12 -1
  4. package/lib/ConfluenceManholeLayer/index.js +12 -1
  5. package/lib/ConfluencePointLayer/index.js +12 -1
  6. package/lib/DeviceLayer/index.d.ts +1 -1
  7. package/lib/DeviceLayer/index.js +15 -2
  8. package/lib/FacilityLayer/index.js +14 -1
  9. package/lib/Layer/index.js +2 -2
  10. package/lib/Layer/layerConfig.d.ts +9 -2
  11. package/lib/Layer/layerConfig.js +4 -1
  12. package/lib/RainLineLayer/index.js +12 -1
  13. package/lib/RainManholeLayer/index.js +12 -1
  14. package/lib/RainPointLayer/index.js +12 -1
  15. package/lib/RawWaterLineLayer/index.js +12 -1
  16. package/lib/RawWaterPointLayer/index.js +12 -1
  17. package/lib/SewageLineLayer/index.js +12 -1
  18. package/lib/SewageManholeLayer/index.js +12 -1
  19. package/lib/SewagePointLayer/index.js +12 -1
  20. package/lib/WaterDrainLineLayer/index.js +12 -1
  21. package/lib/WaterDrainManholeLayer/index.js +12 -1
  22. package/lib/WaterDrainPointLayer/index.js +12 -1
  23. package/lib/WaterSupplyLineLayer/index.js +13 -1
  24. package/lib/WaterSupplyPointLayer/index.js +13 -1
  25. package/lib/_components/Template/CloseBtnV2.d.ts +8 -0
  26. package/lib/_components/Template/CloseBtnV2.js +21 -0
  27. package/lib/_components/Template/DeviceCustomContent.d.ts +21 -0
  28. package/lib/_components/Template/DeviceCustomContent.js +76 -0
  29. package/lib/_components/Template/DeviceTemplate.d.ts +1 -0
  30. package/lib/_components/Template/DeviceTemplate.js +4 -1
  31. package/lib/_components/Template/DeviceTemplateV2.d.ts +7 -0
  32. package/lib/_components/Template/DeviceTemplateV2.js +146 -0
  33. package/lib/_components/Template/FacilityCustomContent.d.ts +20 -0
  34. package/lib/_components/Template/FacilityCustomContent.js +142 -0
  35. package/lib/_components/Template/FacilityTemplate.d.ts +2 -1
  36. package/lib/_components/Template/FacilityTemplate.js +4 -2
  37. package/lib/_components/Template/FacilityTemplateV2.d.ts +12 -0
  38. package/lib/_components/Template/FacilityTemplateV2.js +104 -0
  39. package/lib/_components/Template/index.less +4 -0
  40. package/lib/_components/Template/indexV2.less +574 -0
  41. package/lib/_util/http.js +18 -18
  42. package/lib/_util/interface.d.ts +7 -0
  43. package/lib/_util/layerConfig.d.ts +2 -1
  44. package/lib/_util/layerConfig.js +475 -1
  45. package/lib/assets/address-dark.png +0 -0
  46. package/lib/assets/address.png +0 -0
  47. package/lib/index.d.ts +2 -0
  48. package/lib/index.js +3 -1
  49. package/package.json +1 -1
@@ -0,0 +1,574 @@
1
+ .cs-map-container .cesium-popup{
2
+ max-width: 360px;
3
+
4
+ .cesium-popup-close{
5
+ z-index: 99;
6
+ }
7
+
8
+ .cesium-popup-v2{
9
+ position: relative;
10
+ max-width: 360px;
11
+ width: 360px;
12
+ margin: -52px -12px -10px;
13
+ }
14
+ }
15
+
16
+ .close-btn {
17
+ position: absolute;
18
+ top: 12px;
19
+ right: 30px;
20
+ cursor: pointer;
21
+ }
22
+
23
+ .facility-layer-close-btn {
24
+ position: absolute;
25
+ top: 12px;
26
+ color: #0a4ff8;
27
+ right: 30px;
28
+ cursor: pointer;
29
+ }
30
+
31
+ .facility-layer-custom-btn {
32
+ position: absolute;
33
+ line-height: 1;
34
+ top: 12px;
35
+ right: 50px;
36
+ cursor: pointer;
37
+ }
38
+
39
+ .map-empty {
40
+ display: flex;
41
+ flex-direction: column;
42
+ justify-content: center;
43
+ align-items: center;
44
+ }
45
+
46
+ .map-empty-img {
47
+ width: 120px;
48
+ height: auto;
49
+ }
50
+
51
+ .facility-layer-custom-content {
52
+ top: 0;
53
+ bottom: 0;
54
+ left: 0;
55
+ right: 0;
56
+ cursor: pointer;
57
+ z-index: 10;
58
+
59
+ &-title {
60
+ height: 35px;
61
+ background: rgba(24, 144, 255, 0.1);
62
+ border-radius: 8px 8px 0 0;
63
+ display: flex;
64
+ align-items: center;
65
+ font-weight: 500;
66
+ padding-left: 8px;
67
+ padding-right: 50px;
68
+
69
+ &-left {
70
+ flex: 1;
71
+ white-space: nowrap;
72
+ overflow: hidden;
73
+ text-overflow: ellipsis;
74
+ font-size: 16px;
75
+ color: #000;
76
+ margin-left: -1px;
77
+ margin-right: 9px;
78
+ }
79
+
80
+ &-right {
81
+ padding: 2px 4px;
82
+ background: rgba(24, 144, 255, 0.2);
83
+ border-radius: 2px;
84
+ border: 1px solid #1890ff;
85
+ font-size: 12px;
86
+ color: #1890ff;
87
+ display: flex;
88
+ justify-content: center;
89
+ align-items: center;
90
+ }
91
+ }
92
+
93
+ &-keyParam {
94
+ width: 339px;
95
+ margin-left: 9px;
96
+ padding-top: 7px;
97
+
98
+ &-deviceDetail {
99
+ display: flex;
100
+ align-items: center;
101
+
102
+ img {
103
+ width: 14px;
104
+ height: 14px;
105
+ margin-right: 3px;
106
+ }
107
+
108
+ &-address {
109
+ flex: 1;
110
+ white-space: nowrap;
111
+ overflow: hidden;
112
+ text-overflow: ellipsis;
113
+ }
114
+ }
115
+
116
+ &-line {
117
+ width: 100%;
118
+ height: 1px;
119
+ background-color: #e8e8e8;
120
+ }
121
+
122
+ &-item {
123
+ display: flex;
124
+ align-items: center;
125
+ margin-bottom: 6px;
126
+ font-weight: 500;
127
+ font-size: 14px;
128
+ color: rgba(0, 0, 0, 0.85);
129
+
130
+ &-address {
131
+ margin-left: 8px;
132
+ width: 311px;
133
+ white-space: nowrap;
134
+ overflow: hidden;
135
+ text-overflow: ellipsis;
136
+ }
137
+ }
138
+ }
139
+
140
+ &-keyIndicators {
141
+ padding: 7px 9px 0;
142
+
143
+ &-item {
144
+ display: flex;
145
+ justify-content: space-between;
146
+ align-items: center;
147
+ font-weight: 400;
148
+ font-size: 14px;
149
+ color: #595959;
150
+ margin-bottom: 6px;
151
+
152
+ &:last-child {
153
+ margin-bottom: 0;
154
+ }
155
+
156
+ &-left {
157
+ display: flex;
158
+ align-items: center;
159
+
160
+ &-value {
161
+ margin-left: 8px;
162
+ }
163
+ }
164
+
165
+ &-round {
166
+ width: 5px;
167
+ height: 5px;
168
+ background-color: rgba(89, 89, 89, 1);
169
+ border-radius: 50%;
170
+ margin-right: 2px;
171
+ }
172
+
173
+ &-updateTime {
174
+ font-size: 12px;
175
+ color: #8c8c8c;
176
+ }
177
+ }
178
+ }
179
+
180
+ &-dark {
181
+ background: #162d56;
182
+ box-shadow: inset 0 4px 16px 0 #1d7ad0;
183
+ border-radius: 8px;
184
+ color: #fff;
185
+
186
+ &-title {
187
+ height: 35px;
188
+ background: #135694;
189
+ border-radius: 8px 8px 0px 0px;
190
+ display: flex;
191
+ align-items: center;
192
+ font-weight: 500;
193
+ padding-left: 8px;
194
+ // padding-right: 33px;
195
+ padding-right: 50px;
196
+
197
+ &-left {
198
+ flex: 1;
199
+ white-space: nowrap;
200
+ overflow: hidden;
201
+ text-overflow: ellipsis;
202
+ font-size: 16px;
203
+ // color: #000000;
204
+ margin-left: -1px;
205
+ margin-right: 9px;
206
+ color: #fff;
207
+ }
208
+
209
+ &-right {
210
+ padding: 2px 4px;
211
+ background: rgba(24, 144, 255, .2);
212
+ border-radius: 2px;
213
+ border: 1px solid #1890ff;
214
+ font-size: 12px;
215
+ color: #1890ff;
216
+ display: flex;
217
+ justify-content: center;
218
+ align-items: center;
219
+ }
220
+ }
221
+
222
+ &-keyParam {
223
+ width: 339px;
224
+ margin-left: 9px;
225
+ padding-top: 7px;
226
+
227
+ &-deviceDetail {
228
+ display: flex;
229
+ align-items: center;
230
+
231
+ img {
232
+ width: 14px;
233
+ height: 14px;
234
+ margin-right: 3px;
235
+ }
236
+
237
+ &-address {
238
+ flex: 1;
239
+ white-space: nowrap;
240
+ overflow: hidden;
241
+ text-overflow: ellipsis;
242
+ }
243
+ }
244
+
245
+ &-line {
246
+ width: 100%;
247
+ height: 1px;
248
+ background-color: rgba(232, 232, 232, .2);
249
+ }
250
+
251
+ &-item {
252
+ display: flex;
253
+ align-items: center;
254
+ margin-bottom: 6px;
255
+ font-weight: 500;
256
+ font-size: 14px;
257
+ // color: rgba(0, 0, 0, 0.85);
258
+ color: #fff;
259
+
260
+ &-address {
261
+ margin-left: 8px;
262
+ width: 311px;
263
+ white-space: nowrap;
264
+ overflow: hidden;
265
+ text-overflow: ellipsis;
266
+ }
267
+ }
268
+ }
269
+
270
+ &-keyIndicators {
271
+ padding: 7px 9px 0;
272
+
273
+ &-item {
274
+ display: flex;
275
+ justify-content: space-between;
276
+ align-items: center;
277
+ font-weight: 400;
278
+ font-size: 14px;
279
+ // color: #595959;
280
+ margin-bottom: 6px;
281
+
282
+ &:last-child {
283
+ margin-bottom: 0;
284
+ }
285
+
286
+ &-left {
287
+ display: flex;
288
+ align-items: center;
289
+
290
+ &-value {
291
+ margin-left: 8px;
292
+ }
293
+ }
294
+
295
+ &-round {
296
+ width: 5px;
297
+ height: 5px;
298
+ background-color: #fff;
299
+ border-radius: 50%;
300
+ margin-right: 2px;
301
+ }
302
+
303
+ &-updateTime {
304
+ font-size: 12px;
305
+ color: rgba(255, 255, 255, .6);
306
+ }
307
+ }
308
+ }
309
+ }
310
+ }
311
+
312
+ .device-layer-custom-content {
313
+ top: 0;
314
+ bottom: 0;
315
+ left: 0;
316
+ right: 0;
317
+ cursor: pointer;
318
+ z-index: 10;
319
+
320
+ &-title {
321
+ height: 35px;
322
+ background: rgba(24, 144, 255, .1);
323
+ border-radius: 8px 8px 0 0;
324
+ display: flex;
325
+ align-items: center;
326
+ font-weight: 500;
327
+ padding-left: 8px;
328
+ padding-right: 50px;
329
+
330
+ &-left {
331
+ flex: 1;
332
+ white-space: nowrap;
333
+ overflow: hidden;
334
+ text-overflow: ellipsis;
335
+ font-size: 16px;
336
+ color: #000;
337
+ margin-left: -1px;
338
+ margin-right: 9px;
339
+ }
340
+
341
+ &-right {
342
+ padding: 2px 4px;
343
+ background: rgba(24, 144, 255, .2);
344
+ border-radius: 2px;
345
+ border: 1px solid #1890ff;
346
+ font-size: 12px;
347
+ color: #1890ff;
348
+ display: flex;
349
+ justify-content: center;
350
+ align-items: center;
351
+ }
352
+ }
353
+
354
+ &-contentBox {}
355
+
356
+ &-keyParam {
357
+ width: 339px;
358
+ margin-left: 9px;
359
+ padding-top: 7px;
360
+
361
+ &-deviceDetail {
362
+ display: flex;
363
+ align-items: center;
364
+
365
+ img {
366
+ width: 14px;
367
+ height: 14px;
368
+ margin-right: 3px;
369
+ }
370
+
371
+ &-address {
372
+ flex: 1;
373
+ white-space: nowrap;
374
+ overflow: hidden;
375
+ text-overflow: ellipsis;
376
+ }
377
+ }
378
+
379
+ &-line {
380
+ width: 100%;
381
+ height: 1px;
382
+ background-color: #e8e8e8;
383
+ }
384
+
385
+ &-item {
386
+ display: flex;
387
+ align-items: center;
388
+ margin-bottom: 6px;
389
+ font-weight: 500;
390
+ font-size: 14px;
391
+ color: rgba(0, 0, 0, .85);
392
+
393
+ &-address {
394
+ margin-left: 8px;
395
+ width: 311px;
396
+ white-space: nowrap;
397
+ overflow: hidden;
398
+ text-overflow: ellipsis;
399
+ }
400
+ }
401
+ }
402
+
403
+ &-keyIndicators {
404
+ padding: 7px 9px 0;
405
+
406
+ &-item {
407
+ display: flex;
408
+ justify-content: space-between;
409
+ align-items: center;
410
+ font-weight: 400;
411
+ font-size: 14px;
412
+ color: #595959;
413
+ margin-bottom: 6px;
414
+
415
+ &:last-child {
416
+ margin-bottom: 0;
417
+ }
418
+
419
+ &-left {
420
+ display: flex;
421
+ align-items: center;
422
+
423
+ &-value {
424
+ margin-left: 8px;
425
+ }
426
+ }
427
+
428
+ &-round {
429
+ width: 5px;
430
+ height: 5px;
431
+ background-color: rgba(89, 89, 89, 1);
432
+ border-radius: 50%;
433
+ margin-right: 2px;
434
+ }
435
+
436
+ &-updateTime {
437
+ font-size: 12px;
438
+ color: #8c8c8c;
439
+ }
440
+ }
441
+ }
442
+
443
+ &-dark {
444
+ background: #162d56;
445
+ box-shadow: inset 0 4px 16px 0 #1d7ad0;
446
+ border-radius: 8px;
447
+ color: #fff;
448
+
449
+ &-title {
450
+ height: 35px;
451
+ background: #135694;
452
+ border-radius: 8px 8px 0px 0px;
453
+ display: flex;
454
+ align-items: center;
455
+ font-weight: 500;
456
+ padding-left: 8px;
457
+ // padding-right: 33px;
458
+ padding-right: 50px;
459
+
460
+ &-left {
461
+ flex: 1;
462
+ white-space: nowrap;
463
+ overflow: hidden;
464
+ text-overflow: ellipsis;
465
+ font-size: 16px;
466
+ margin-left: -1px;
467
+ margin-right: 9px;
468
+ color: #fff;
469
+ }
470
+
471
+ &-right {
472
+ padding: 2px 4px;
473
+ background: rgba(24, 144, 255, .2);
474
+ border-radius: 2px;
475
+ border: 1px solid #1890ff;
476
+ font-size: 12px;
477
+ color: #1890ff;
478
+ display: flex;
479
+ justify-content: center;
480
+ align-items: center;
481
+ }
482
+ }
483
+
484
+ &-contentBox {
485
+ // background-color: red;
486
+ }
487
+
488
+ &-keyParam {
489
+ width: 339px;
490
+ margin-left: 9px;
491
+ padding-top: 7px;
492
+
493
+ &-deviceDetail {
494
+ display: flex;
495
+ align-items: center;
496
+
497
+ img {
498
+ width: 14px;
499
+ height: 14px;
500
+ margin-right: 3px;
501
+ }
502
+
503
+ &-address {
504
+ flex: 1;
505
+ white-space: nowrap;
506
+ overflow: hidden;
507
+ text-overflow: ellipsis;
508
+ }
509
+ }
510
+
511
+ &-line {
512
+ width: 100%;
513
+ height: 1px;
514
+ background-color: rgba(232, 232, 232, .2);
515
+ }
516
+
517
+ &-item {
518
+ display: flex;
519
+ align-items: center;
520
+ margin-bottom: 6px;
521
+ font-weight: 500;
522
+ font-size: 14px;
523
+ color: #fff;
524
+
525
+ &-address {
526
+ margin-left: 8px;
527
+ width: 311px;
528
+ white-space: nowrap;
529
+ overflow: hidden;
530
+ text-overflow: ellipsis;
531
+ }
532
+ }
533
+ }
534
+
535
+ &-keyIndicators {
536
+ padding: 7px 9px 0;
537
+
538
+ &-item {
539
+ display: flex;
540
+ justify-content: space-between;
541
+ align-items: center;
542
+ font-weight: 400;
543
+ font-size: 14px;
544
+ margin-bottom: 6px;
545
+
546
+ &:last-child {
547
+ margin-bottom: 0;
548
+ }
549
+
550
+ &-left {
551
+ display: flex;
552
+ align-items: center;
553
+
554
+ &-value {
555
+ margin-left: 8px;
556
+ }
557
+ }
558
+
559
+ &-round {
560
+ width: 5px;
561
+ height: 5px;
562
+ background-color: #fff;
563
+ border-radius: 50%;
564
+ margin-right: 2px;
565
+ }
566
+
567
+ &-updateTime {
568
+ font-size: 12px;
569
+ color: rgba(255, 255, 255, .6);
570
+ }
571
+ }
572
+ }
573
+ }
574
+ }
package/lib/_util/http.js CHANGED
@@ -19,10 +19,10 @@ import { getVtxToken } from "@vtx/utils";
19
19
  // 默认30秒超时
20
20
  var SECOND = 30;
21
21
  var MILL_SECOND = 1000;
22
- /**
23
- * 基于 axios 封装的请求封装
24
- * axios文档 http://www.axios-js.com/zh-cn/docs/
25
- * 支持 Get 和 Post 请求
22
+ /**
23
+ * 基于 axios 封装的请求封装
24
+ * axios文档 http://www.axios-js.com/zh-cn/docs/
25
+ * 支持 Get 和 Post 请求
26
26
  */
27
27
  var Http = /*#__PURE__*/function () {
28
28
  function Http(options) {
@@ -57,10 +57,10 @@ var Http = /*#__PURE__*/function () {
57
57
  return instance;
58
58
  }
59
59
 
60
- /**
61
- * get 请求
62
- * @param {*} url
63
- * @param {*} options {body}
60
+ /**
61
+ * get 请求
62
+ * @param {*} url
63
+ * @param {*} options {body}
64
64
  */
65
65
  }, {
66
66
  key: "get",
@@ -78,10 +78,10 @@ var Http = /*#__PURE__*/function () {
78
78
  });
79
79
  }
80
80
 
81
- /**
82
- * post 请求
83
- * @param {*} url
84
- * @param {*} options
81
+ /**
82
+ * post 请求
83
+ * @param {*} url
84
+ * @param {*} options
85
85
  */
86
86
  }, {
87
87
  key: "post",
@@ -99,9 +99,9 @@ var Http = /*#__PURE__*/function () {
99
99
  });
100
100
  }
101
101
 
102
- /**
103
- * 响应数据的处理
104
- * @param {*} response
102
+ /**
103
+ * 响应数据的处理
104
+ * @param {*} response
105
105
  */
106
106
  }, {
107
107
  key: "_responseHandler",
@@ -122,9 +122,9 @@ var Http = /*#__PURE__*/function () {
122
122
  throw error;
123
123
  }
124
124
 
125
- /**
126
- * 请求错误处理
127
- * @param {*} error
125
+ /**
126
+ * 请求错误处理
127
+ * @param {*} error
128
128
  */
129
129
  }, {
130
130
  key: "_errorHandler",
@@ -373,4 +373,11 @@ export interface CommonPropsI {
373
373
  params?: object;
374
374
  showModal?: (feature: any) => any;
375
375
  customKeys?: any;
376
+ popup?: {
377
+ version: string;
378
+ fields?: {
379
+ label: string;
380
+ key: string;
381
+ }[];
382
+ };
376
383
  }
@@ -35,4 +35,5 @@ export declare const getDeviceStyle: (f: any, icon: string, styleOption?: {}) =>
35
35
  status: any;
36
36
  };
37
37
  };
38
- export { deviceCodeMap, facilityCodeMap };
38
+ declare const facilityPopup: any;
39
+ export { deviceCodeMap, facilityCodeMap, facilityPopup };