@kq_npm/client3d_webgl_vue 3.0.7-beta → 3.0.9-beta

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/adddata/index.js +290 -319
  2. package/adddata/style/adddata.css +1 -1
  3. package/aspectanalysis/index.js +47 -179
  4. package/aspectanalysis/style/aspectanalysis.css +1 -1
  5. package/baseterraingallery/index.js +39 -177
  6. package/baseterraingallery/style/baseterraingallery.css +1 -1
  7. package/boxclip/index.js +50 -182
  8. package/boxclip/style/boxclip.css +1 -1
  9. package/excavatefillanalysis/index.js +57 -189
  10. package/excavatefillanalysis/style/excavatefillanalysis.css +1 -1
  11. package/flight/index.js +42 -177
  12. package/floodanalysis/index.js +64 -199
  13. package/floodanalysis/style/floodanalysis.css +1 -1
  14. package/gpuspatialquery/index.js +47 -179
  15. package/gpuspatialquery/style/gpuspatialquery.css +1 -1
  16. package/headertemp/index.js +34 -83
  17. package/index.js +1378 -733
  18. package/isolineanalysis/index.js +75 -207
  19. package/isolineanalysis/style/isolineanalysis.css +1 -1
  20. package/measure/index.js +42 -177
  21. package/modelselect/index.js +49 -182
  22. package/modelselect/style/modelselect.css +1 -1
  23. package/package.json +1 -1
  24. package/particleeffect/index.js +45 -178
  25. package/particleeffect/style/particleeffect.css +1 -1
  26. package/planeclip/index.js +51 -183
  27. package/planeclip/style/planeclip.css +1 -1
  28. package/profileanalysis/index.js +50 -182
  29. package/profileanalysis/style/profileanalysis.css +1 -1
  30. package/roller/index.js +43 -188
  31. package/scenceview/index.js +1477 -851
  32. package/screenshot/index.js +47 -179
  33. package/screenshot/style/screenshot.css +1 -1
  34. package/shadowanalysis/index.js +58 -190
  35. package/shadowanalysis/style/shadowanalysis.css +1 -1
  36. package/sightlineanalysis/index.js +46 -179
  37. package/sightlineanalysis/style/sightlineanalysis.css +1 -1
  38. package/skylineanalysis/index.js +49 -181
  39. package/skylineanalysis/style/skylineanalysis.css +1 -1
  40. package/slopeanalysis/index.js +62 -194
  41. package/slopeanalysis/style/slopeanalysis.css +1 -1
  42. package/style.css +1 -1
  43. package/terrainoperation/index.js +53 -185
  44. package/terrainoperation/style/terrainoperation.css +1 -1
  45. package/underground/index.js +32 -20
  46. package/viewshedanalysis/index.js +45 -178
  47. package/viewshedanalysis/style/viewshedanalysis.css +1 -1
  48. package/weathereffect/index.js +48 -180
  49. package/weathereffect/style/weathereffect.css +1 -1
package/adddata/index.js CHANGED
@@ -27,169 +27,6 @@ es_namespaceObject.ElMessage.install = (Vue, opts) => {
27
27
 
28
28
  /* harmony default export */ var message = (es_namespaceObject.ElMessage);
29
29
 
30
- /***/ }),
31
-
32
- /***/ 519:
33
- /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
34
-
35
-
36
- // EXPORTS
37
- __webpack_require__.d(__webpack_exports__, {
38
- "default": function() { return /* reexport */ HeaderTemp; }
39
- });
40
-
41
- // EXTERNAL MODULE: external {"root":"Vue","commonjs":"vue","commonjs2":"vue","amd":"vue"}
42
- var external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_ = __webpack_require__(637);
43
- // EXTERNAL MODULE: external "@kq_npm/client_common_vue/_utils/util"
44
- var util_ = __webpack_require__(9519);
45
- ;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/dist/index.js??ruleSet[0]!./src/webgl/headertemp/HeaderTemp.vue?vue&type=script&setup=true&lang=js
46
-
47
- const _hoisted_1 = {
48
- class: "kq-control-header-temp"
49
- };
50
- const _hoisted_2 = {
51
- class: "_title"
52
- };
53
-
54
-
55
- const __default__ = {
56
- name: "Kq3dHeaderTemp"
57
- };
58
- /* harmony default export */ var HeaderTempvue_type_script_setup_true_lang_js = (/*#__PURE__*/Object.assign(__default__, {
59
- props: {
60
- // 是否显示阴影效果
61
- showShadow: {
62
- type: Boolean,
63
- default: true
64
- },
65
- // HeaderTemp标题
66
- headerTempTitle: {
67
- type: String,
68
- default: ""
69
- },
70
- // HeaderTemp图标
71
- headerTempIcon: {
72
- type: Object
73
- },
74
- // HeaderTemp是否折叠
75
- isCollapse: {
76
- type: Boolean,
77
- default: false
78
- },
79
- // HeaderTemp Title&Icon的位置
80
- isRight: {
81
- type: Boolean,
82
- default: true
83
- }
84
- },
85
-
86
- setup(__props, {
87
- expose
88
- }) {
89
- const props = __props;
90
- const proxy = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.getCurrentInstance)(); // 获取组件传参
91
- // 图标组件
92
-
93
- let iconBtn = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(null);
94
- let isCollapse = props.isCollapse;
95
- (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.onMounted)(() => {
96
- iconBtn.value = props.headerTempIcon;
97
- let dom = proxy.parent.vnode.el;
98
-
99
- if (!props.isRight) {
100
- (0,util_.addClass)(dom, ["kq-is-show", "kq-is-left"]);
101
- }
102
-
103
- if (isCollapse) {
104
- if (props.showShadow) {
105
- (0,util_.addClass)(dom, ["kq-is-hide", "kq-light-shadow"]);
106
- (0,util_.removeClass)(dom, ["kq-is-show", "kq-box-shadow"]);
107
- } else {
108
- (0,util_.addClass)(dom, "kq-is-hide");
109
- (0,util_.removeClass)(dom, "kq-is-show");
110
- }
111
- } else {
112
- if (props.showShadow) {
113
- (0,util_.removeClass)(dom, ["kq-is-hide", "kq-light-shadow"]);
114
- (0,util_.addClass)(dom, ["kq-is-show", "kq-box-shadow"]);
115
- } else {
116
- (0,util_.removeClass)(dom, "kq-is-hide");
117
- (0,util_.addClass)(dom, "kq-is-show");
118
- }
119
- }
120
- }); // 图标按钮点击事件
121
-
122
- function btnClick() {
123
- isCollapse = !isCollapse;
124
- let dom = proxy.parent.vnode.el;
125
-
126
- if (isCollapse) {
127
- // 折叠
128
- if (props.showShadow) {
129
- (0,util_.addClass)(dom, ["kq-is-hide", "kq-light-shadow"]);
130
- (0,util_.removeClass)(dom, ["kq-is-show", "kq-box-shadow"]);
131
- } else {
132
- (0,util_.addClass)(dom, "kq-is-hide");
133
- (0,util_.removeClass)(dom, "kq-is-show");
134
- }
135
- } else {
136
- // 展开
137
- if (props.showShadow) {
138
- (0,util_.addClass)(dom, ["kq-is-show", "kq-box-shadow"]);
139
- (0,util_.removeClass)(dom, ["kq-is-hide", "kq-light-shadow"]);
140
- } else {
141
- (0,util_.addClass)(dom, "kq-is-show");
142
- (0,util_.removeClass)(dom, "kq-is-hide");
143
- }
144
- }
145
- }
146
-
147
- expose({
148
- btnClick
149
- });
150
- return (_ctx, _cache) => {
151
- const _component_kq_icon = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.resolveComponent)("kq-icon");
152
-
153
- return (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.openBlock)(), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementBlock)("div", _hoisted_1, [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("h4", _hoisted_2, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toDisplayString)(__props.headerTempTitle), 1
154
- /* TEXT */
155
- ), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("div", {
156
- class: "_btn kq-control-header-temp_btn",
157
- onClick: btnClick
158
- }, [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_icon, {
159
- size: 16
160
- }, {
161
- default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withCtx)(() => [((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.openBlock)(), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createBlock)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.resolveDynamicComponent)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(iconBtn))))]),
162
- _: 1
163
- /* STABLE */
164
-
165
- })])]);
166
- };
167
- }
168
-
169
- }));
170
- ;// CONCATENATED MODULE: ./src/webgl/headertemp/HeaderTemp.vue?vue&type=script&setup=true&lang=js
171
-
172
- ;// CONCATENATED MODULE: ./src/webgl/headertemp/HeaderTemp.vue
173
-
174
-
175
-
176
- const __exports__ = HeaderTempvue_type_script_setup_true_lang_js;
177
-
178
- /* harmony default export */ var HeaderTemp = (__exports__);
179
- // EXTERNAL MODULE: external "@kq_npm/client_common_vue/init.js"
180
- var init_js_ = __webpack_require__(5406);
181
- var init_js_default = /*#__PURE__*/__webpack_require__.n(init_js_);
182
- ;// CONCATENATED MODULE: ./src/webgl/headertemp/index.js
183
-
184
-
185
-
186
- HeaderTemp.install = (Vue, opts) => {
187
- init_js_default()(Vue, opts);
188
- Vue.component(HeaderTemp.name, HeaderTemp);
189
- };
190
-
191
-
192
-
193
30
  /***/ }),
194
31
 
195
32
  /***/ 8422:
@@ -423,183 +260,271 @@ class AddDataViewModel {
423
260
  this._layerManager = scenceView._layerManager;
424
261
  this._geojsonStyle.billboard.image = options.billboardImage;
425
262
  this._language = scenceView._language;
263
+ this._geometryServerUrl = options.geometryServerUrl;
264
+ this._geometryServerToken = options.geometryServerToken;
426
265
  } //解析文件
427
266
 
428
267
 
429
- parseFile(file, removeFile, cb) {
430
- var reader = new FileReader();
431
- reader.readAsText(file); //文本
432
- //readAsDataURL(file); //base64 图片
433
- //readAsArrayBuffer(file); //原始二进制数据
434
- //readAsBinaryString(file);//二进制字符串
435
- //reader.readAsBinaryString(file);
436
-
268
+ parseFile(file, cb) {
437
269
  var that = this;
438
-
439
- reader.onload = function (event) {
440
- var ret = event.target.result;
270
+ return new Promise((resolve, reject) => {
441
271
  var ext = file.name.replace(/.+\./, "").toLowerCase(); //文件扩展名
442
272
 
443
273
  var name = file.name.replace(/(.*\/)*([^.]+).*/gi, "$2"); //文件名
444
274
 
445
- switch (ext) {
446
- case "json":
447
- case "geojson":
448
- case "topojson":
449
- ret = ret.replace(/(^\s*)|(\s*$)/, "");
450
- ret = ret.substring(ret.indexOf("{"));
275
+ if (ext === "zip") {
276
+ (0,util_.uploadSHP)(that._geometryServerUrl, file, that._geometryServerToken, null, function (res) {
277
+ if (res) {
278
+ if (res.srs) {
279
+ //返回的geojson数据已经做了处理,返回数据坐标系为4326
280
+ delete res.srs;
281
+ }
451
282
 
452
- try {
453
- var data = JSON.parse(ret);
283
+ var ds = new Cesium.Kq3dGeoJsonDataSource(name);
284
+ ds.load(res, that._geojsonStyle).then(ds => {
285
+ ds.entities.values.forEach(entity => {
286
+ if (entity.polygon) {
287
+ entity.polyline = {
288
+ positions: entity.polygon.hierarchy._value.positions,
289
+ width: that._geojsonStyle.polygon.outlineWidth,
290
+ material: that._geojsonStyle.polygon.outlineColor
291
+ };
292
+ }
293
+ });
454
294
 
455
- if (typeof data == "object" && data) {
456
- ret = data;
457
- }
458
- } catch (e) {}
295
+ that._viewer.dataSources.add(ds);
459
296
 
460
- var ds = new Cesium.Kq3dGeoJsonDataSource(name);
461
- ds.load(ret, that._geojsonStyle).then(ds => {
462
- ds.entities.values.forEach(entity => {
463
- if (entity.polygon) {
464
- entity.polyline = {
465
- positions: entity.polygon.hierarchy._value.positions,
466
- width: that._geojsonStyle.polygon.outlineWidth,
467
- material: that._geojsonStyle.polygon.outlineColor
468
- };
469
- }
297
+ ds.autoAvoid(that._viewer);
298
+
299
+ that._viewer.flyTo(ds);
300
+
301
+ resolve("success");
302
+ var layer = {
303
+ guid: ds.guid,
304
+ name: name,
305
+ visible: true,
306
+ serverType: "datasource",
307
+ lsType: "ls"
308
+ };
309
+
310
+ that._layerManager.addTempLayerNode(layer);
311
+
312
+ cb && cb(layer);
470
313
  });
314
+ } else {
315
+ reject(file.name + " service parse error.");
316
+ cb && cb("error");
317
+ }
318
+ });
319
+ } else if (ext === "txt") {
320
+ let dataUrl = that._geometryServerUrl + (that._geometryServerToken ? "?ua_token=" + that._geometryServerToken : "");
321
+ (0,util_.readTxT)(file, dataUrl, "4326", res => {
322
+ if (res) {
323
+ var ds = new Cesium.Kq3dGeoJsonDataSource(name);
324
+ ds.load(res, that._geojsonStyle).then(ds => {
325
+ ds.entities.values.forEach(entity => {
326
+ if (entity.polygon) {
327
+ entity.polyline = {
328
+ positions: entity.polygon.hierarchy._value.positions,
329
+ width: that._geojsonStyle.polygon.outlineWidth,
330
+ material: that._geojsonStyle.polygon.outlineColor
331
+ };
332
+ }
333
+ });
471
334
 
472
- that._viewer.dataSources.add(ds);
335
+ that._viewer.dataSources.add(ds);
473
336
 
474
- ds.autoAvoid(that._viewer);
337
+ ds.autoAvoid(that._viewer);
475
338
 
476
- that._viewer.flyTo(ds);
339
+ that._viewer.flyTo(ds);
477
340
 
478
- var layer = {
479
- guid: ds.guid,
480
- name: name,
481
- visible: true,
482
- serverType: "datasource",
483
- lsType: "ls"
484
- };
341
+ resolve("success");
342
+ var layer = {
343
+ guid: ds.guid,
344
+ name: name,
345
+ visible: true,
346
+ serverType: "datasource",
347
+ lsType: "ls"
348
+ };
485
349
 
486
- that._layerManager.addTempLayerNode(layer);
350
+ that._layerManager.addTempLayerNode(layer);
487
351
 
488
- cb && cb(layer);
489
- });
490
- break;
352
+ cb && cb(layer);
353
+ });
354
+ } else {
355
+ reject(file.name + " service parse error.");
356
+ }
357
+ });
358
+ } else {
359
+ var reader = new FileReader();
360
+ reader.readAsText(file); //文本
361
+ //readAsDataURL(file); //base64 图片
362
+ //readAsArrayBuffer(file); //原始二进制数据
363
+ //readAsBinaryString(file);//二进制字符串
364
+ //reader.readAsBinaryString(file);
365
+
366
+ reader.onload = function (event) {
367
+ var ret = event.target.result;
368
+
369
+ switch (ext) {
370
+ case "json":
371
+ case "geojson":
372
+ case "topojson":
373
+ ret = ret.replace(/(^\s*)|(\s*$)/, "");
374
+ ret = ret.substring(ret.indexOf("{"));
375
+
376
+ try {
377
+ var data = JSON.parse(ret);
378
+
379
+ if (typeof data == "object" && data) {
380
+ ret = data;
381
+ }
382
+ } catch (e) {}
383
+
384
+ var ds = new Cesium.Kq3dGeoJsonDataSource(name);
385
+ ds.load(ret, that._geojsonStyle).then(ds => {
386
+ ds.entities.values.forEach(entity => {
387
+ if (entity.polygon) {
388
+ entity.polyline = {
389
+ positions: entity.polygon.hierarchy._value.positions,
390
+ width: that._geojsonStyle.polygon.outlineWidth,
391
+ material: that._geojsonStyle.polygon.outlineColor
392
+ };
393
+ }
394
+ });
491
395
 
492
- case "kml":
493
- ret = ret.replace(/(^\s*)|(\s*$)/, "");
494
- var options = {
495
- name: name,
496
- camera: that._viewer.scene.camera,
497
- canvas: that._viewer.scene.canvas
498
- };
499
- var ds = new Cesium.KmlDataSource(options);
500
- var data = new Blob([ret], {
501
- type: "text/xml"
502
- });
503
- ds.load(data).then(ds => {
504
- that._viewer.dataSources.add(ds);
396
+ that._viewer.dataSources.add(ds);
505
397
 
506
- that._viewer.flyTo(ds);
398
+ ds.autoAvoid(that._viewer);
507
399
 
508
- var layer = {
509
- guid: ds.guid,
510
- name: name,
511
- visible: true,
512
- serverType: "datasource",
513
- lsType: "ls"
514
- };
400
+ that._viewer.flyTo(ds);
515
401
 
516
- that._layerManager.addTempLayerNode(layer);
402
+ resolve("success");
403
+ var layer = {
404
+ guid: ds.guid,
405
+ name: name,
406
+ visible: true,
407
+ serverType: "datasource",
408
+ lsType: "ls"
409
+ };
517
410
 
518
- cb && cb(layer);
519
- });
520
- break;
411
+ that._layerManager.addTempLayerNode(layer);
521
412
 
522
- case "kmz":
523
- var options = {
524
- name: name,
525
- camera: that._viewer.scene.camera,
526
- canvas: that._viewer.scene.canvas
527
- };
528
- var ds = new Cesium.KmlDataSource(options);
529
- ds.load(file).then(ds => {
530
- that._viewer.dataSources.add(ds);
413
+ cb && cb(layer);
414
+ });
415
+ break;
531
416
 
532
- that._viewer.flyTo(ds);
417
+ case "kml":
418
+ ret = ret.replace(/(^\s*)|(\s*$)/, "");
419
+ var options = {
420
+ name: name,
421
+ camera: that._viewer.scene.camera,
422
+ canvas: that._viewer.scene.canvas
423
+ };
424
+ var ds = new Cesium.KmlDataSource(options);
425
+ var data = new Blob([ret], {
426
+ type: "text/xml"
427
+ });
428
+ ds.load(data).then(ds => {
429
+ that._viewer.dataSources.add(ds);
533
430
 
534
- var layer = {
535
- guid: ds.guid,
536
- name: name,
537
- visible: true,
538
- serverType: "datasource",
539
- lsType: "ls"
540
- };
431
+ that._viewer.flyTo(ds);
541
432
 
542
- that._layerManager.addTempLayerNode(layer);
433
+ resolve("success");
434
+ var layer = {
435
+ guid: ds.guid,
436
+ name: name,
437
+ visible: true,
438
+ serverType: "datasource",
439
+ lsType: "ls"
440
+ };
543
441
 
544
- cb && cb(layer);
545
- });
546
- break;
442
+ that._layerManager.addTempLayerNode(layer);
547
443
 
548
- case "czml":
549
- ret = ret.replace(/(^\s*)|(\s*$)/, "");
444
+ cb && cb(layer);
445
+ });
446
+ break;
550
447
 
551
- try {
552
- var data = JSON.parse(ret);
448
+ case "kmz":
449
+ var options = {
450
+ name: name,
451
+ camera: that._viewer.scene.camera,
452
+ canvas: that._viewer.scene.canvas
453
+ };
454
+ var ds = new Cesium.KmlDataSource(options);
455
+ ds.load(file).then(ds => {
456
+ that._viewer.dataSources.add(ds);
553
457
 
554
- if (typeof data == "object" && data) {
555
- ret = data;
556
- }
557
- } catch (e) {}
458
+ that._viewer.flyTo(ds);
558
459
 
559
- that._viewer.dataSources.add(Cesium.CzmlDataSource.load(ret, {
560
- name: name
561
- })).then(ds => {
562
- that._viewer.flyTo(ds);
460
+ resolve("success");
461
+ var layer = {
462
+ guid: ds.guid,
463
+ name: name,
464
+ visible: true,
465
+ serverType: "datasource",
466
+ lsType: "ls"
467
+ };
563
468
 
564
- var layer = {
565
- guid: ds.guid,
566
- name: name,
567
- visible: true,
568
- serverType: "datasource",
569
- lsType: "ls"
570
- };
469
+ that._layerManager.addTempLayerNode(layer);
571
470
 
572
- that._layerManager.addTempLayerNode(layer);
471
+ cb && cb(layer);
472
+ });
473
+ break;
573
474
 
574
- cb && cb(layer);
575
- });
475
+ case "czml":
476
+ ret = ret.replace(/(^\s*)|(\s*$)/, "");
576
477
 
577
- break;
478
+ try {
479
+ var data = JSON.parse(ret);
578
480
 
579
- case "zip":
580
- break;
481
+ if (typeof data == "object" && data) {
482
+ ret = data;
483
+ }
484
+ } catch (e) {}
581
485
 
582
- case "txt":
583
- break;
486
+ that._viewer.dataSources.add(Cesium.CzmlDataSource.load(ret, {
487
+ name: name
488
+ })).then(ds => {
489
+ that._viewer.flyTo(ds);
584
490
 
585
- case "csv":
586
- break;
491
+ resolve("success");
492
+ var layer = {
493
+ guid: ds.guid,
494
+ name: name,
495
+ visible: true,
496
+ serverType: "datasource",
497
+ lsType: "ls"
498
+ };
587
499
 
588
- case "xls":
589
- case "xlsx":
590
- break;
500
+ that._layerManager.addTempLayerNode(layer);
591
501
 
592
- default:
593
- break;
594
- }
502
+ cb && cb(layer);
503
+ });
595
504
 
596
- removeFile && removeFile(file);
597
- };
505
+ break;
598
506
 
599
- reader.onerror = function () {
600
- console.log(file.name + "read error.");
601
- removeFile && removeFile(file);
602
- };
507
+ case "txt":
508
+ break;
509
+
510
+ case "csv":
511
+ break;
512
+
513
+ case "xls":
514
+ case "xlsx":
515
+ break;
516
+
517
+ default:
518
+ break;
519
+ }
520
+ };
521
+
522
+ reader.onerror = function () {
523
+ console.log(file.name + " read error.");
524
+ reject(file.name + " read error.");
525
+ };
526
+ }
527
+ });
603
528
  } //解析数据源
604
529
 
605
530
 
@@ -1144,8 +1069,6 @@ class AddDataViewModel {
1144
1069
  }
1145
1070
 
1146
1071
  }
1147
- // EXTERNAL MODULE: ./src/webgl/headertemp/index.js + 3 modules
1148
- var headertemp = __webpack_require__(519);
1149
1072
  ;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/dist/index.js??ruleSet[0]!./src/webgl/adddata/AddData.vue?vue&type=script&setup=true&lang=js
1150
1073
 
1151
1074
  const _hoisted_1 = {
@@ -1200,6 +1123,21 @@ const __default__ = {
1200
1123
  type: Boolean,
1201
1124
  default: true
1202
1125
  },
1126
+
1127
+ /**
1128
+ * 例:"center","topLeft","topRight","bottomLeft","bottomRight", "topCenter", "bottomCenter" {top:'16px',left:'16px'}, {top:16,left:16}
1129
+ */
1130
+ position: [String, Object],
1131
+ // 几何服务地址前缀,例:http://support.kqgeo.com:29800/geometry-proxy/kqgis/rest/services/geometry
1132
+ geometryServerUrl: {
1133
+ type: String,
1134
+ required: true
1135
+ },
1136
+ // 几何服务token,例:eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJob3N0IiwiY3JlYXRlZCI6MTY1NTk2MzU1NzUyMywiZXhwIjoxNzY3MTEwNDAwfQ.BiNOr6vL6liHzlMK89XSvqmFY9fuWiYqDEwYmWxk-6vFKBgLeMC8FloBXyKcxOCl9Rd28y_pX4PhVRYP5cZTwA
1137
+ geometryServerToken: {
1138
+ type: String,
1139
+ required: true
1140
+ },
1203
1141
  // 当前展示的tab标签页
1204
1142
  activeName: {
1205
1143
  type: String,
@@ -1252,7 +1190,8 @@ const __default__ = {
1252
1190
  });
1253
1191
  let upload_ref = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(null);
1254
1192
  let upload_btn_ref = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(null);
1255
- let fileList = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)([]); // 获取组件传参
1193
+ let fileList = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)([]);
1194
+ let loadingFile = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(false); // 获取组件传参
1256
1195
 
1257
1196
  let operatorArray = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.computed)(() => {
1258
1197
  let array = [];
@@ -1273,9 +1212,22 @@ const __default__ = {
1273
1212
  }
1274
1213
 
1275
1214
  return flag;
1276
- });
1215
+ }); // 组件容器Ref
1216
+
1217
+ let boxRef = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(null); // 生成组件默认header
1218
+
1219
+ let headerTemp = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)();
1220
+ let headerTempRef = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)();
1277
1221
  let viewModel = null;
1278
1222
  (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.onMounted)(() => {
1223
+ (0,util_.updatePosition)(boxRef.value, props);
1224
+ (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.watch)(() => props.position, (newVal, oldVal) => {
1225
+ (0,util_.updatePosition)(boxRef.value, props);
1226
+ });
1227
+ watchCreateHeaderTemp();
1228
+ (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.watch)(() => props.showHeaderTemp, (newVal, oldVal) => {
1229
+ watchCreateHeaderTemp();
1230
+ });
1279
1231
  gis_utils_.utils.getWebMap(null, scenceView => {
1280
1232
  if (scenceView) {
1281
1233
  language.value = scenceView._language;
@@ -1387,12 +1339,25 @@ const __default__ = {
1387
1339
  ];
1388
1340
  dataSourceType.value = dataSourceTypeList.value[0];
1389
1341
  let options = {
1390
- billboardImage: const_image_.BILLBOARD_IMAGE_URL
1342
+ billboardImage: const_image_.BILLBOARD_IMAGE_URL,
1343
+ geometryServerUrl: props.geometryServerUrl,
1344
+ geometryServerToken: props.geometryServerToken
1391
1345
  };
1392
1346
  viewModel = new AddDataViewModel(scenceView, options);
1393
1347
  }
1394
1348
  });
1395
- }); // 切换tab页
1349
+ });
1350
+ /**
1351
+ * @description 监听header生成
1352
+ */
1353
+
1354
+ const watchCreateHeaderTemp = () => {
1355
+ if (props.showHeaderTemp) {
1356
+ // 生成headerTemp
1357
+ headerTemp.value = (0,util_.createHeaderTemp)(boxRef.value, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toRefs)(props), headerTempRef);
1358
+ }
1359
+ }; // 切换tab页
1360
+
1396
1361
 
1397
1362
  function handleChange(pane) {} // 切换类型
1398
1363
 
@@ -1426,8 +1391,14 @@ const __default__ = {
1426
1391
 
1427
1392
 
1428
1393
  function loadFiles() {
1394
+ loadingFile.value = true;
1395
+ let promiseList = [];
1429
1396
  fileList.value.forEach(file => {
1430
- viewModel.parseFile(file.raw, removeFile, props.loadCallback);
1397
+ promiseList.push(viewModel.parseFile(file.raw, props.loadCallback));
1398
+ });
1399
+ Promise.all(promiseList).then(() => {
1400
+ removeFiles();
1401
+ loadingFile.value = false;
1431
1402
  });
1432
1403
  } //加载URL
1433
1404
 
@@ -1477,17 +1448,16 @@ const __default__ = {
1477
1448
  return (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.openBlock)(), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementBlock)("section", {
1478
1449
  class: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.normalizeClass)(["kq3d-add-data", {
1479
1450
  'kq-box-shadow': __props.showShadow
1480
- }])
1481
- }, [__props.showHeaderTemp ? ((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.openBlock)(), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createBlock)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(headertemp["default"]), {
1451
+ }]),
1452
+ ref_key: "boxRef",
1453
+ ref: boxRef
1454
+ }, [__props.showHeaderTemp ? ((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.openBlock)(), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createBlock)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.resolveDynamicComponent)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(headerTemp)), {
1482
1455
  key: 0,
1483
- showShadow: __props.showShadow,
1484
- headerTempTitle: __props.headerTempTitle || (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(language).addData,
1485
- headerTempIcon: __props.headerTempIcon,
1486
- isCollapse: __props.isCollapseHeaderTemp,
1487
- isRight: __props.isRight
1488
- }, null, 8
1489
- /* PROPS */
1490
- , ["showShadow", "headerTempTitle", "headerTempIcon", "isCollapse", "isRight"])) : (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createCommentVNode)("v-if", true), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_tabs, {
1456
+ ref_key: "headerTempRef",
1457
+ ref: headerTempRef
1458
+ }, null, 512
1459
+ /* NEED_PATCH */
1460
+ )) : (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createCommentVNode)("v-if", true), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_tabs, {
1491
1461
  modelValue: props.activeName,
1492
1462
  "onUpdate:modelValue": _cache[8] || (_cache[8] = $event => props.activeName = $event),
1493
1463
  onTabChange: handleChange
@@ -1497,7 +1467,7 @@ const __default__ = {
1497
1467
  name: "upload"
1498
1468
  }, {
1499
1469
  default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withCtx)(() => [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("div", _hoisted_2, [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_row, {
1500
- class: ""
1470
+ class: "kq3d-add-data-title"
1501
1471
  }, {
1502
1472
  default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withCtx)(() => [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createTextVNode)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toDisplayString)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(language).fileFormatDescription), 1
1503
1473
  /* TEXT */
@@ -1521,7 +1491,7 @@ const __default__ = {
1521
1491
  "auto-upload": false,
1522
1492
  "file-list": (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(fileList),
1523
1493
  "onUpdate:file-list": _cache[0] || (_cache[0] = $event => (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.isRef)(fileList) ? fileList.value = $event : fileList = $event),
1524
- accept: ".geojson,.topojson,.json,.kml,.kmz,.czml",
1494
+ accept: ".zip,.geojson,.topojson,.json,.kml,.kmz,.czml,.txt",
1525
1495
  "on-change": changeFile,
1526
1496
  ref_key: "upload_ref",
1527
1497
  ref: upload_ref
@@ -1589,7 +1559,7 @@ const __default__ = {
1589
1559
  action: "",
1590
1560
  "show-file-list": false,
1591
1561
  "auto-upload": false,
1592
- accept: ".geojson,.topojson,.json,.kml,.kmz,.czml",
1562
+ accept: ".zip,.geojson,.topojson,.json,.kml,.kmz,.czml,.txt",
1593
1563
  ref_key: "upload_btn_ref",
1594
1564
  ref: upload_btn_ref,
1595
1565
  class: "kq3d-add-data-footer-upload",
@@ -1630,7 +1600,8 @@ const __default__ = {
1630
1600
  onClick: _cache[2] || (_cache[2] = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withModifiers)($event => loadFiles(), ["stop"])),
1631
1601
  title: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(language).loadFiles,
1632
1602
  type: "primary",
1633
- disabled: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(disabled)
1603
+ disabled: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(disabled),
1604
+ loading: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(loadingFile)
1634
1605
  }, {
1635
1606
  default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withCtx)(() => [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createTextVNode)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toDisplayString)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(language).loadFiles), 1
1636
1607
  /* TEXT */
@@ -1640,7 +1611,7 @@ const __default__ = {
1640
1611
 
1641
1612
  }, 8
1642
1613
  /* PROPS */
1643
- , ["title", "disabled"])])])]),
1614
+ , ["title", "disabled", "loading"])])])]),
1644
1615
  _: 3
1645
1616
  /* FORWARDED */
1646
1617