@kq_npm/client3d_webgl_vue 4.5.2 → 4.5.4-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 (63) hide show
  1. package/adddata/index.js +355 -538
  2. package/adddata/style/adddata.css +1 -1
  3. package/aspectanalysis/index.js +172 -239
  4. package/baseterraingallery/index.js +124 -145
  5. package/boxclip/index.js +300 -481
  6. package/clientPrint/index.js +335 -898
  7. package/clientPrint/style/clientPrint.css +1 -1
  8. package/comparemap/index.js +226 -246
  9. package/compass/index.js +96 -84
  10. package/excavatefillanalysis/index.js +193 -263
  11. package/fixedzoomin/index.js +91 -76
  12. package/fixedzoomout/index.js +91 -76
  13. package/flight/index.js +311 -415
  14. package/flight/style/flight.css +1 -1
  15. package/floodanalysis/index.js +255 -393
  16. package/geologicalbodyanalysis/index.js +215 -298
  17. package/gpuspatialquery/index.js +260 -402
  18. package/hawkeye/index.js +141 -103
  19. package/headertemp/index.js +25 -34
  20. package/heatmap3d/index.js +451 -763
  21. package/heatmap3d/style/heatmap3d.css +1 -1
  22. package/index.js +20826 -17774
  23. package/isolineanalysis/index.js +566 -1243
  24. package/light/index.js +353 -488
  25. package/limitheightanalysis/index.js +251 -312
  26. package/measure/index.js +350 -504
  27. package/modelFlat/index.js +214 -234
  28. package/modelexcavate/index.js +206 -262
  29. package/modelfilter/index.js +229 -308
  30. package/modelprofileanalysis/index.js +356 -465
  31. package/modelselect/index.js +192 -184
  32. package/package.json +1 -1
  33. package/particleeffect/index.js +259 -430
  34. package/planeclip/index.js +249 -339
  35. package/resetview/index.js +89 -69
  36. package/roller/index.js +307 -363
  37. package/scaneffect/index.js +285 -582
  38. package/sceneadvancedtoimage/index.js +1055 -0
  39. package/sceneadvancedtoimage/style/index.js +3 -0
  40. package/sceneadvancedtoimage/style/sceneadvancedtoimage.css +1 -0
  41. package/sceneapp/index.js +11149 -0
  42. package/sceneset/index.js +393 -885
  43. package/scenetohdimage/index.js +214 -346
  44. package/scenetohdimage/style/scenetohdimage.css +1 -1
  45. package/sceneview/index.js +22780 -19540
  46. package/sceneview/style/sceneview.css +1 -1
  47. package/screenshot/index.js +275 -312
  48. package/shadowanalysis/index.js +269 -448
  49. package/sightlineanalysis/index.js +231 -312
  50. package/sightlineanalysis/style/divpoint.css +1 -1
  51. package/skylineanalysis/index.js +213 -351
  52. package/slopeanalysis/index.js +282 -444
  53. package/slopeaspectanalysis/index.js +315 -534
  54. package/statusbar/index.js +194 -164
  55. package/style.css +1 -1
  56. package/terrainoperation/index.js +230 -280
  57. package/terrainprofileanalysis/index.js +174 -182
  58. package/underground/index.js +98 -82
  59. package/videofusion/index.js +319 -532
  60. package/videoproject/index.js +325 -534
  61. package/viewshedanalysis/index.js +178 -275
  62. package/weathereffect/index.js +199 -343
  63. package/wireframesketch/index.js +146 -150
@@ -7,101 +7,141 @@
7
7
  var a = typeof exports === 'object' ? factory(require("vue"), require("@kq_npm/client_common_vue/_utils/gis-utils"), require("@kq_npm/client_common_vue/init.js"), require("@kq_npm/client_common_vue/_utils/util")) : factory(root["Vue"], root["@kq_npm/client_common_vue/_utils/gis-utils"], root["@kq_npm/client_common_vue/init.js"], root["@kq_npm/client_common_vue/_utils/util"]);
8
8
  for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
9
9
  }
10
- })(this, function(__WEBPACK_EXTERNAL_MODULE__1895__, __WEBPACK_EXTERNAL_MODULE__7135__, __WEBPACK_EXTERNAL_MODULE__7997__, __WEBPACK_EXTERNAL_MODULE__3458__) {
10
+ })(this, function(__WEBPACK_EXTERNAL_MODULE__154__, __WEBPACK_EXTERNAL_MODULE__64__, __WEBPACK_EXTERNAL_MODULE__455__, __WEBPACK_EXTERNAL_MODULE__2975__) {
11
11
  return /******/ (function() { // webpackBootstrap
12
12
  /******/ "use strict";
13
13
  /******/ var __webpack_modules__ = ({
14
14
 
15
- /***/ 3694:
15
+ /***/ 3275:
16
16
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
17
17
 
18
+ /* harmony import */ var element_plus_dist_index_full_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6363);
19
+ /* harmony import */ var element_plus_dist_index_full_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(element_plus_dist_index_full_js__WEBPACK_IMPORTED_MODULE_0__);
20
+ /* harmony import */ var _init__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(455);
21
+ /* harmony import */ var _init__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_init__WEBPACK_IMPORTED_MODULE_1__);
22
+ /*
23
+ * Copyright (C) 2019 KQ GEO Technologies Co., Ltd.
24
+ * All rights reserved.
25
+ */
18
26
 
19
- // EXPORTS
20
- __webpack_require__.d(__webpack_exports__, {
21
- "Z": function() { return /* binding */ message; }
22
- });
23
27
 
24
- ;// CONCATENATED MODULE: external "element-plus/dist/index.full.js"
25
- var index_full_js_namespaceObject = require("element-plus/dist/index.full.js");
26
- // EXTERNAL MODULE: external "@kq_npm/client_common_vue/init.js"
27
- var init_js_ = __webpack_require__(7997);
28
- var init_js_default = /*#__PURE__*/__webpack_require__.n(init_js_);
29
- ;// CONCATENATED MODULE: ./src/common/_ui/message/index.js
28
+ element_plus_dist_index_full_js__WEBPACK_IMPORTED_MODULE_0__.ElMessage.install = (Vue, opts) => {
29
+ _init__WEBPACK_IMPORTED_MODULE_1___default()(Vue, opts);
30
+ Vue.component("KqMessage", element_plus_dist_index_full_js__WEBPACK_IMPORTED_MODULE_0__.ElMessage);
31
+ };
32
+ /* harmony default export */ __webpack_exports__.A = (element_plus_dist_index_full_js__WEBPACK_IMPORTED_MODULE_0__.ElMessage);
30
33
 
34
+ /***/ }),
31
35
 
36
+ /***/ 5698:
37
+ /***/ (function(module) {
32
38
 
33
- index_full_js_namespaceObject.ElMessage.install = (Vue, opts) => {
34
- init_js_default()(Vue, opts);
35
- Vue.component("KqMessage", index_full_js_namespaceObject.ElMessage);
36
- };
39
+ module.exports = require("@kq_npm/client_icons_vue");
37
40
 
38
- /* harmony default export */ var message = (index_full_js_namespaceObject.ElMessage);
41
+ /***/ }),
42
+
43
+ /***/ 2652:
44
+ /***/ (function(module) {
45
+
46
+ module.exports = require("core-js/modules/es.array.push.js");
39
47
 
40
48
  /***/ }),
41
49
 
42
- /***/ 348:
50
+ /***/ 6363:
43
51
  /***/ (function(module) {
44
52
 
45
- module.exports = require("@kq_npm/client_icons_vue");
53
+ module.exports = require("element-plus/dist/index.full.js");
46
54
 
47
55
  /***/ }),
48
56
 
49
- /***/ 7080:
57
+ /***/ 3579:
50
58
  /***/ (function(module) {
51
59
 
52
60
  module.exports = require("vue-i18n/dist/vue-i18n.cjs.js");
53
61
 
54
62
  /***/ }),
55
63
 
56
- /***/ 7135:
64
+ /***/ 64:
57
65
  /***/ (function(module) {
58
66
 
59
- module.exports = __WEBPACK_EXTERNAL_MODULE__7135__;
67
+ module.exports = __WEBPACK_EXTERNAL_MODULE__64__;
60
68
 
61
69
  /***/ }),
62
70
 
63
- /***/ 3458:
71
+ /***/ 2975:
64
72
  /***/ (function(module) {
65
73
 
66
- module.exports = __WEBPACK_EXTERNAL_MODULE__3458__;
74
+ module.exports = __WEBPACK_EXTERNAL_MODULE__2975__;
67
75
 
68
76
  /***/ }),
69
77
 
70
- /***/ 7997:
78
+ /***/ 455:
71
79
  /***/ (function(module) {
72
80
 
73
- module.exports = __WEBPACK_EXTERNAL_MODULE__7997__;
81
+ module.exports = __WEBPACK_EXTERNAL_MODULE__455__;
74
82
 
75
83
  /***/ }),
76
84
 
77
- /***/ 1895:
85
+ /***/ 154:
78
86
  /***/ (function(module) {
79
87
 
80
- module.exports = __WEBPACK_EXTERNAL_MODULE__1895__;
88
+ module.exports = __WEBPACK_EXTERNAL_MODULE__154__;
81
89
 
82
90
  /***/ }),
83
91
 
84
- /***/ 8270:
92
+ /***/ 6913:
85
93
  /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
86
94
 
87
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
88
- /* harmony export */ "Z": function() { return /* binding */ _defineProperty; }
89
- /* harmony export */ });
90
- function _defineProperty(obj, key, value) {
91
- if (key in obj) {
92
- Object.defineProperty(obj, key, {
93
- value: value,
94
- enumerable: true,
95
- configurable: true,
96
- writable: true
97
- });
98
- } else {
99
- obj[key] = value;
95
+
96
+ // EXPORTS
97
+ __webpack_require__.d(__webpack_exports__, {
98
+ A: function() { return /* binding */ _defineProperty; }
99
+ });
100
+
101
+ ;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/typeof.js
102
+ function _typeof(o) {
103
+ "@babel/helpers - typeof";
104
+
105
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
106
+ return typeof o;
107
+ } : function (o) {
108
+ return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
109
+ }, _typeof(o);
110
+ }
111
+
112
+ ;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toPrimitive.js
113
+
114
+ function toPrimitive(t, r) {
115
+ if ("object" != _typeof(t) || !t) return t;
116
+ var e = t[Symbol.toPrimitive];
117
+ if (void 0 !== e) {
118
+ var i = e.call(t, r || "default");
119
+ if ("object" != _typeof(i)) return i;
120
+ throw new TypeError("@@toPrimitive must return a primitive value.");
100
121
  }
122
+ return ("string" === r ? String : Number)(t);
123
+ }
101
124
 
102
- return obj;
125
+ ;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js
126
+
127
+
128
+ function toPropertyKey(t) {
129
+ var i = toPrimitive(t, "string");
130
+ return "symbol" == _typeof(i) ? i : i + "";
131
+ }
132
+
133
+ ;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
134
+
135
+ function _defineProperty(e, r, t) {
136
+ return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
137
+ value: t,
138
+ enumerable: !0,
139
+ configurable: !0,
140
+ writable: !0
141
+ }) : e[r] = t, e;
103
142
  }
104
143
 
144
+
105
145
  /***/ })
106
146
 
107
147
  /******/ });
@@ -173,95 +213,69 @@ function _defineProperty(obj, key, value) {
173
213
  /******/
174
214
  /************************************************************************/
175
215
  var __webpack_exports__ = {};
176
- // This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
177
- !function() {
178
216
  // ESM COMPAT FLAG
179
217
  __webpack_require__.r(__webpack_exports__);
180
218
 
181
219
  // EXPORTS
182
220
  __webpack_require__.d(__webpack_exports__, {
183
- "ModelExcavateViewModel": function() { return /* reexport */ ModelExcavateViewModel; },
221
+ ModelExcavateViewModel: function() { return /* reexport */ ModelExcavateViewModel; },
184
222
  "default": function() { return /* reexport */ ModelExcavate; }
185
223
  });
186
224
 
187
225
  // EXTERNAL MODULE: external {"root":"Vue","commonjs":"vue","commonjs2":"vue","amd":"vue"}
188
- var external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_ = __webpack_require__(1895);
226
+ var external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_ = __webpack_require__(154);
189
227
  // EXTERNAL MODULE: external "@kq_npm/client_common_vue/_utils/gis-utils"
190
- var gis_utils_ = __webpack_require__(7135);
191
- // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
192
- var defineProperty = __webpack_require__(8270);
193
- // EXTERNAL MODULE: ./src/common/_ui/message/index.js + 1 modules
194
- var message = __webpack_require__(3694);
228
+ var gis_utils_ = __webpack_require__(64);
229
+ // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js + 3 modules
230
+ var defineProperty = __webpack_require__(6913);
231
+ // EXTERNAL MODULE: external "core-js/modules/es.array.push.js"
232
+ var es_array_push_js_ = __webpack_require__(2652);
233
+ // EXTERNAL MODULE: ./src/common/_ui/message/index.js
234
+ var message = __webpack_require__(3275);
195
235
  ;// CONCATENATED MODULE: ./src/webgl/modelexcavate/ModelExcavateViewModel.js
196
236
 
237
+
238
+ /*
239
+ * Copyright (C) 2019 KQ GEO Technologies Co., Ltd.
240
+ * All rights reserved.
241
+ */
197
242
  //模型开挖逻辑类
198
243
 
199
244
  class ModelExcavateViewModel {
200
- //三维viewer对象
201
- //Box裁剪存储参数对象
202
- //绘制管理对象
203
- //绘制完成监听事件
204
- //Kq3dWallPrimitive
205
245
  constructor(scenceView, options) {
206
- (0,defineProperty/* default */.Z)(this, "_viewer", null);
207
-
208
- (0,defineProperty/* default */.Z)(this, "_options", {});
209
-
210
- (0,defineProperty/* default */.Z)(this, "_Kq3dTerrainExcavation", null);
211
-
212
- (0,defineProperty/* default */.Z)(this, "_drawManager", null);
213
-
214
- (0,defineProperty/* default */.Z)(this, "_removeEventListener", null);
215
-
216
- (0,defineProperty/* default */.Z)(this, "_wallPrimitive", void 0);
217
-
218
- (0,defineProperty/* default */.Z)(this, "entity0", null);
219
-
220
- (0,defineProperty/* default */.Z)(this, "wall", null);
221
-
222
- (0,defineProperty/* default */.Z)(this, "ratio", 0.01);
223
-
224
- (0,defineProperty/* default */.Z)(this, "ii", 1);
225
-
226
- (0,defineProperty/* default */.Z)(this, "scratchCartesian2", new window.Cesium.Cartesian3());
227
-
228
- (0,defineProperty/* default */.Z)(this, "scratchCartesian3", new window.Cesium.Cartesian3());
229
-
230
- (0,defineProperty/* default */.Z)(this, "scratchCartesian4", new window.Cesium.Cartesian3());
231
-
232
- (0,defineProperty/* default */.Z)(this, "scratchCartesian5", new window.Cesium.Cartesian3());
233
-
234
- (0,defineProperty/* default */.Z)(this, "scratchCartesian6", new window.Cesium.Cartesian3());
235
-
236
- (0,defineProperty/* default */.Z)(this, "scratchCartesian7", new window.Cesium.Cartesian3());
237
-
238
- (0,defineProperty/* default */.Z)(this, "intervalId", null);
239
-
240
- (0,defineProperty/* default */.Z)(this, "tileset1", null);
241
-
242
- (0,defineProperty/* default */.Z)(this, "g_flattenedPolygonTexture", null);
243
-
246
+ (0,defineProperty/* default */.A)(this, "_viewer", null);
247
+ //三维viewer对象
248
+ (0,defineProperty/* default */.A)(this, "_options", {});
249
+ //Box裁剪存储参数对象
250
+ (0,defineProperty/* default */.A)(this, "_Kq3dTerrainExcavation", null);
251
+ (0,defineProperty/* default */.A)(this, "_removeEventListener", null);
252
+ //绘制完成监听事件
253
+ (0,defineProperty/* default */.A)(this, "_measureHandler", null);
254
+ //测量三维对象
255
+ (0,defineProperty/* default */.A)(this, "_measureResult", null);
256
+ //测量结果
257
+ (0,defineProperty/* default */.A)(this, "_wallPrimitive", void 0);
258
+ //Kq3dWallPrimitive
259
+ (0,defineProperty/* default */.A)(this, "entity0", null);
260
+ (0,defineProperty/* default */.A)(this, "wall", null);
261
+ (0,defineProperty/* default */.A)(this, "ratio", 0.01);
262
+ (0,defineProperty/* default */.A)(this, "ii", 1);
263
+ (0,defineProperty/* default */.A)(this, "scratchCartesian2", new window.Cesium.Cartesian3());
264
+ (0,defineProperty/* default */.A)(this, "scratchCartesian3", new window.Cesium.Cartesian3());
265
+ (0,defineProperty/* default */.A)(this, "scratchCartesian4", new window.Cesium.Cartesian3());
266
+ (0,defineProperty/* default */.A)(this, "scratchCartesian5", new window.Cesium.Cartesian3());
267
+ (0,defineProperty/* default */.A)(this, "scratchCartesian6", new window.Cesium.Cartesian3());
268
+ (0,defineProperty/* default */.A)(this, "scratchCartesian7", new window.Cesium.Cartesian3());
269
+ (0,defineProperty/* default */.A)(this, "intervalId", null);
270
+ (0,defineProperty/* default */.A)(this, "g_flattenedPolygonTexture", null);
244
271
  this._viewer = scenceView._viewer;
245
272
  this._options = options;
246
- this._drawManager = scenceView._drawManager;
247
273
  this._viewer.scene.globe.depthTestAgainstTerrain = true; //开启深度检测
248
274
 
249
275
  let kq3dFlattenning = new window.Cesium.Kq3dFlattenning(this._viewer, {});
250
- this.g_flattenedPolygonTexture = kq3dFlattenning.createFlattenedPolygonTexture(); // this.tileset1 = this._viewer.scene.primitives.add(new Cesium.Cesium3DTileset({
251
- // url: "http://support.kqgeo.com:18700/SampleData/3DTiles/Oblique/tileset.json"
252
- // }));
253
- // this.tileset1.readyPromise.then(function (tileset) {
254
- // that._viewer.zoomTo(tileset);
255
- // }).otherwise(function (error) {
256
- // console.log(error);
257
- // });
258
- // this.tileset1.enableFlattenning = true;
259
- // this.tileset1.flattenDiscard = true;
260
- // this.g_flattenedPolygonTexture.attachTileset(this.tileset1);
261
-
276
+ this.g_flattenedPolygonTexture = kq3dFlattenning.createFlattenedPolygonTexture();
262
277
  var that = this;
263
278
  var models = this._viewer.scene.primitives._primitives;
264
-
265
279
  for (let i = 0; i < models.length; i++) {
266
280
  if (models[1] instanceof Cesium.Cesium3DTileset && models[i]._url) {
267
281
  models[i].enableFlattenning = true;
@@ -271,26 +285,23 @@ class ModelExcavateViewModel {
271
285
  });
272
286
  }
273
287
  }
274
-
275
- this._removeEventListener = this._drawManager.drawFinishedEvent.addEventListener(shape => {
276
- if (shape) {
277
- that._options.positions = shape._controlPoints;
278
-
279
- if (shape._controlPoints && shape._controlPoints.length > 3 || shape._controlPoints && shape._controlPoints.length == 3 && shape._controlPoints[2] != shape._controlPoints[0]) {
288
+ this._measureHandler = new Cesium.Kq3dMeasureHandler(this._viewer);
289
+ this._measureHandler.measureEvent.addEventListener(function (result) {
290
+ that._measureResult = result;
291
+ result.measureResult.label.show = false;
292
+ });
293
+ this._measureHandler.activeEvent.addEventListener(function (ret) {
294
+ if (ret == false) {
295
+ if (that._measureResult) {
296
+ that._options.positions = that._measureResult.positions;
280
297
  that.createDynamicExcavationEffect();
281
- } else {
282
- (0,message/* default */.Z)({
283
- message: "请至少绘制3个点!",
284
- type: "warning"
285
- });
298
+ that._measureResult.measureResult.destroy();
286
299
  }
287
-
288
- that._drawManager.clear();
289
300
  }
290
301
  });
291
- } // 创建开挖模型
292
-
302
+ }
293
303
 
304
+ // 创建开挖模型
294
305
  createDynamicExcavationEffect() {
295
306
  this._Kq3dTerrainExcavation && this._Kq3dTerrainExcavation.destroy();
296
307
  this._Kq3dTerrainExcavation = new window.Cesium.Kq3dTerrainExcavation({
@@ -299,35 +310,30 @@ class ModelExcavateViewModel {
299
310
  positions: this._options.positions,
300
311
  hasWall: false
301
312
  });
302
-
303
313
  if (this._wallPrimitive) {
304
314
  this._viewer.scene.primitives.remove(this._wallPrimitive);
305
-
306
315
  this._wallPrimitive = undefined;
307
316
  }
308
-
309
317
  this._wallPrimitive = new window.Cesium.Kq3dWallPrimitive({
310
318
  viewer: this._viewer,
311
319
  height: this._options.height,
312
320
  positions: this._options.positions,
313
321
  elevationOnTerrain: false
314
322
  });
315
-
316
323
  this._viewer.scene.primitives.add(this._wallPrimitive);
317
-
318
324
  let that = this;
319
-
320
325
  this._wallPrimitive._readyEvent.addEventListener(function (eventType) {
321
326
  if (eventType != "Ready") {
322
327
  return;
323
328
  }
324
-
325
329
  that.g_flattenedPolygonTexture && that.g_flattenedPolygonTexture.removeAllFlattenedPolygon();
326
330
  var myPolygon = window.Cesium.PolygonGeometry.fromPositions({
327
331
  positions: that._options.positions,
328
332
  height: window.Cesium.Cartographic.fromCartesian(that._options.positions[0]).height
329
333
  });
330
- that.g_flattenedPolygonTexture && that.g_flattenedPolygonTexture.addFlattenedPolygon(myPolygon); // that.intervalId = setInterval(function () {
334
+ that.g_flattenedPolygonTexture && that.g_flattenedPolygonTexture.addFlattenedPolygon(myPolygon);
335
+
336
+ // that.intervalId = setInterval(function () {
331
337
  // if (that.ii > 100) {
332
338
  // if (that.entity0) {
333
339
  // that._viewer.scene.primitives.remove(that.entity0);
@@ -341,15 +347,20 @@ class ModelExcavateViewModel {
341
347
  // that.ii = 0;
342
348
  // return;
343
349
  // }
350
+
344
351
  // var carto2 = window.Cesium.Cartesian3.lerp(that._options.positions[0], that._options.positions[3], that.ratio * that.ii, that.scratchCartesian2);
345
352
  // var carto3 = window.Cesium.Cartesian3.lerp(that._options.positions[1], that._options.positions[2], that.ratio * that.ii, that.scratchCartesian3);
353
+
346
354
  // if (that.entity0) {
347
355
  // that._viewer.scene.primitives.remove(that.entity0);
348
356
  // that.entity0 = undefined;
349
357
  // }
358
+
350
359
  // that.entity0 = that.createPolyline([carto2, carto3]);
360
+
351
361
  // that.ii++;
352
362
  // that.g_flattenedPolygonTexture.removeAllFlattenedPolygon();
363
+
353
364
  // var myPolygon = window.Cesium.PolygonGeometry.fromPositions({
354
365
  // positions: [that._options.positions[0], that._options.positions[1], carto3, carto2],
355
366
  // height: window.Cesium.Cartographic.fromCartesian(that._options.positions[0]).height
@@ -358,16 +369,12 @@ class ModelExcavateViewModel {
358
369
  // }, 100);
359
370
  });
360
371
  }
361
-
362
372
  createPolyline(positions) {
363
373
  var material = window.Cesium.Material.fromType("Kq3dLightningMaterial", {});
364
-
365
374
  if (this.wall) {
366
375
  this._viewer.scene.primitives.remove(this.wall);
367
-
368
376
  this.wall = undefined;
369
377
  }
370
-
371
378
  var geometryInstances = [];
372
379
  geometryInstances.push(new window.Cesium.GeometryInstance({
373
380
  geometry: new window.Cesium.WallGeometry({
@@ -383,9 +390,7 @@ class ModelExcavateViewModel {
383
390
  material: material
384
391
  })
385
392
  });
386
-
387
393
  this._viewer.scene.primitives.add(this.wall);
388
-
389
394
  var geo = new window.Cesium.GroundPolylineGeometry({
390
395
  positions: positions,
391
396
  width: 40.0,
@@ -403,13 +408,11 @@ class ModelExcavateViewModel {
403
408
  });
404
409
  return this._viewer.scene.primitives.add(primitive);
405
410
  }
406
-
407
411
  start() {
408
412
  // 判断是否添加了模型
409
413
  var flag = false;
410
414
  var that = this;
411
415
  var models = this._viewer.scene.primitives._primitives;
412
-
413
416
  for (let i = 0; i < models.length; i++) {
414
417
  if (models[i] instanceof Cesium.Cesium3DTileset && models[i]._url) {
415
418
  // models[i].enableFlattenning = true;
@@ -420,76 +423,62 @@ class ModelExcavateViewModel {
420
423
  flag = true;
421
424
  }
422
425
  }
423
-
424
426
  if (flag) {
425
427
  this.remove();
426
-
427
- this._drawManager.startDraw("polygon", {
428
- clampToGround: true
429
- });
428
+ this._measureHandler.startMeasure(Cesium.Kq3dMeasureMode.HorizontalArea);
430
429
  } else {
431
- (0,message/* default */.Z)({
430
+ (0,message/* default */.A)({
432
431
  message: "请添加模型后绘制!",
433
432
  type: "warning"
434
433
  });
435
434
  }
436
- } // 切换高度重新计算
437
-
438
-
435
+ }
436
+ // 切换高度重新计算
439
437
  setHeight(val) {
440
438
  this._options.height = Number(val);
441
439
  }
442
-
443
440
  remove() {
444
441
  // 销毁地形开挖
445
442
  if (this.intervalId) {
446
443
  clearInterval(this.intervalId);
447
444
  this.ii = 0;
448
-
449
445
  if (this.entity0) {
450
446
  this._viewer.scene.primitives.remove(this.entity0);
451
-
452
447
  this.entity0 = undefined;
453
448
  }
454
-
455
449
  if (this.wall) {
456
450
  this._viewer.scene.primitives.remove(this.wall);
457
-
458
451
  this.wall = undefined;
459
452
  }
460
453
  }
461
-
462
454
  if (this._wallPrimitive) {
463
455
  this._viewer.scene.primitives.remove(this._wallPrimitive);
464
-
465
456
  this._wallPrimitive = undefined;
466
457
  }
467
-
468
458
  this._Kq3dTerrainExcavation && this._Kq3dTerrainExcavation.destroy();
469
459
  this.g_flattenedPolygonTexture && this.g_flattenedPolygonTexture.removeAllFlattenedPolygon();
470
- } // 清除
471
-
472
-
460
+ }
461
+ // 清除
473
462
  clear() {
474
- this._drawManager.stopDraw();
475
-
463
+ this._measureResult = null;
464
+ this._measureHandler.clear();
476
465
  this.remove();
477
- } //销毁
478
-
479
-
466
+ }
467
+ //销毁
480
468
  destroy() {
481
469
  this.clear();
482
470
  this.g_flattenedPolygonTexture && this.g_flattenedPolygonTexture.detachAllTileset();
483
471
  this.g_flattenedPolygonTexture && this.g_flattenedPolygonTexture.destroy();
472
+ this._measureHandler && this._measureHandler.destroy();
473
+ this._measureHandler = null;
484
474
  }
485
-
486
475
  }
487
476
  // EXTERNAL MODULE: external "@kq_npm/client_icons_vue"
488
- var client_icons_vue_ = __webpack_require__(348);
477
+ var client_icons_vue_ = __webpack_require__(5698);
489
478
  // EXTERNAL MODULE: external "@kq_npm/client_common_vue/_utils/util"
490
- var util_ = __webpack_require__(3458);
479
+ var util_ = __webpack_require__(2975);
491
480
  // EXTERNAL MODULE: external "vue-i18n/dist/vue-i18n.cjs.js"
492
- var vue_i18n_cjs_js_ = __webpack_require__(7080);
481
+ var vue_i18n_cjs_js_ = __webpack_require__(3579);
493
482
  ;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/dist/index.js??ruleSet[0]!./src/webgl/modelexcavate/ModelExcavate.vue?vue&type=script&setup=true&lang=js
494
483
 
495
484
  const _hoisted_1 = {
@@ -507,12 +496,13 @@ const _hoisted_3 = {
507
496
 
508
497
 
509
498
 
510
- //语言
499
+
500
+ //语言
511
501
 
512
502
  const __default__ = {
513
503
  name: "Kq3dModelExcavate"
514
504
  };
515
- /* harmony default export */ var ModelExcavatevue_type_script_setup_true_lang_js = (/*#__PURE__*/Object.assign(__default__, {
505
+ /* harmony default export */ var ModelExcavatevue_type_script_setup_true_lang_js = (/*@__PURE__*/Object.assign(__default__, {
516
506
  props: {
517
507
  //指定组件绑定的viewer对象的div的id
518
508
  mapTarget: String,
@@ -525,7 +515,6 @@ const __default__ = {
525
515
  type: Boolean,
526
516
  default: true
527
517
  },
528
-
529
518
  /**
530
519
  * 例:"center","topLeft","topRight","bottomLeft","bottomRight", "topCenter", "bottomCenter" {top:'16px',left:'16px'}, {top:16,left:16}
531
520
  */
@@ -555,29 +544,31 @@ const __default__ = {
555
544
  default: true
556
545
  }
557
546
  },
558
-
559
547
  setup(__props, {
560
- expose
548
+ expose: __expose
561
549
  }) {
562
- const props = __props;
563
550
  let language = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)({});
564
551
  let viewModel = null;
565
- let currentLang = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(""); // 获取组件传参
552
+ let currentLang = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)("");
566
553
 
554
+ // 获取组件传参
555
+ const props = __props;
567
556
  let formItem = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.reactive)({
568
557
  excavationDepth: props.settingParams && props.settingParams.excavationDepth || 20,
569
558
  // 地形开挖深度
570
559
  minExcavationDepth: props.settingParams && props.settingParams.minExcavationDepth || 0,
571
560
  // 地形开挖深度范围最小值
572
561
  maxExcavationDepth: props.settingParams && props.settingParams.maxExcavationDepth || 100 // 地形开挖深度范围最大值
562
+ });
573
563
 
574
- }); // 组件容器Ref
575
-
576
- let boxRef = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(null); // 生成组件默认header
564
+ // 组件容器Ref
565
+ let boxRef = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(null);
577
566
 
567
+ // 生成组件默认header
578
568
  let headerTemp = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)();
579
- let headerTempRef = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(); // 国际化
569
+ let headerTempRef = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)();
580
570
 
571
+ // 国际化
581
572
  let {
582
573
  locale,
583
574
  messages
@@ -595,8 +586,9 @@ const __default__ = {
595
586
  watchCreateHeaderTemp();
596
587
  (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.watch)(() => props.showHeaderTemp, (newVal, oldVal) => {
597
588
  watchCreateHeaderTemp();
598
- }); //父组件ScenceView初始化完成后执行
589
+ });
599
590
 
591
+ //父组件ScenceView初始化完成后执行
600
592
  gis_utils_.utils.getWebMap(null, scenceView => {
601
593
  if (scenceView) {
602
594
  viewModel = new ModelExcavateViewModel(scenceView, {
@@ -606,50 +598,42 @@ const __default__ = {
606
598
  }
607
599
  });
608
600
  });
601
+
609
602
  /**
610
603
  * @description 监听header生成
611
604
  */
612
-
613
605
  const watchCreateHeaderTemp = () => {
614
606
  if (props.showHeaderTemp) {
615
607
  // 生成headerTemp
616
608
  headerTemp.value = (0,util_.createHeaderTemp)(boxRef.value, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toRefs)(props), headerTempRef, headerTempTitle);
617
609
  }
618
- }; // 调整开挖深度
619
-
620
-
610
+ };
611
+ // 调整开挖深度
621
612
  function changeHeight() {
622
613
  viewModel && viewModel.setHeight(formItem.excavationDepth);
623
- } // 开始分析
624
-
625
-
614
+ }
615
+ // 开始分析
626
616
  function startOperation() {
627
617
  viewModel && viewModel.start();
628
- } // 清除
629
-
630
-
618
+ }
619
+ // 清除
631
620
  function clear() {
632
621
  viewModel && viewModel.clear();
633
- } // 销毁
634
-
622
+ }
635
623
 
624
+ // 销毁
636
625
  (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.onBeforeUnmount)(() => {
637
626
  viewModel && viewModel.destroy();
638
627
  });
639
- expose({
628
+ __expose({
640
629
  clear
641
630
  });
642
631
  return (_ctx, _cache) => {
643
632
  const _component_kq_col = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.resolveComponent)("kq-col");
644
-
645
633
  const _component_kq_slider = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.resolveComponent)("kq-slider");
646
-
647
634
  const _component_kq_input_number = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.resolveComponent)("kq-input-number");
648
-
649
635
  const _component_kq_row = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.resolveComponent)("kq-row");
650
-
651
636
  const _component_kq_button = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.resolveComponent)("kq-button");
652
-
653
637
  return (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.openBlock)(), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementBlock)("section", {
654
638
  class: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.normalizeClass)(["kq3d-model-excavate", {
655
639
  'kq-box-shadow': __props.showShadow
@@ -660,23 +644,15 @@ const __default__ = {
660
644
  key: 0,
661
645
  ref_key: "headerTempRef",
662
646
  ref: headerTempRef
663
- }, null, 512
664
- /* NEED_PATCH */
665
- )) : (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createCommentVNode)("v-if", true), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("div", _hoisted_1, [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_row, {
647
+ }, null, 512 /* NEED_PATCH */)) : (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createCommentVNode)("v-if", true), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("div", _hoisted_1, [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_row, {
666
648
  gutter: 10
667
649
  }, {
668
650
  default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withCtx)(() => [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_col, {
669
651
  span: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(currentLang) === 'zh' ? 7 : 10
670
652
  }, {
671
- default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withCtx)(() => [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("span", _hoisted_2, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toDisplayString)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(language).excavationDepth), 1
672
- /* TEXT */
673
- )]),
674
- _: 1
675
- /* STABLE */
676
-
677
- }, 8
678
- /* PROPS */
679
- , ["span"]), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_col, {
653
+ default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withCtx)(() => [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("span", _hoisted_2, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toDisplayString)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(language).excavationDepth), 1 /* TEXT */)]),
654
+ _: 1 /* STABLE */
655
+ }, 8 /* PROPS */, ["span"]), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_col, {
680
656
  span: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(currentLang) === 'zh' ? 11 : 8
681
657
  }, {
682
658
  default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withCtx)(() => [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_slider, {
@@ -687,15 +663,9 @@ const __default__ = {
687
663
  max: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(formItem).maxExcavationDepth,
688
664
  onChange: _cache[1] || (_cache[1] = $event => changeHeight()),
689
665
  onClick: _cache[2] || (_cache[2] = $event => changeHeight())
690
- }, null, 8
691
- /* PROPS */
692
- , ["modelValue", "min", "max"])]),
693
- _: 1
694
- /* STABLE */
695
-
696
- }, 8
697
- /* PROPS */
698
- , ["span"]), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_col, {
666
+ }, null, 8 /* PROPS */, ["modelValue", "min", "max"])]),
667
+ _: 1 /* STABLE */
668
+ }, 8 /* PROPS */, ["span"]), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_col, {
699
669
  span: 6,
700
670
  style: {
701
671
  "text-align": "end"
@@ -709,58 +679,31 @@ const __default__ = {
709
679
  max: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(formItem).maxExcavationDepth,
710
680
  "controls-position": "right",
711
681
  onInput: _cache[4] || (_cache[4] = $event => changeHeight())
712
- }, null, 8
713
- /* PROPS */
714
- , ["modelValue", "min", "max"])]),
715
- _: 1
716
- /* STABLE */
717
-
682
+ }, null, 8 /* PROPS */, ["modelValue", "min", "max"])]),
683
+ _: 1 /* STABLE */
718
684
  })]),
719
- _: 1
720
- /* STABLE */
721
-
685
+ _: 1 /* STABLE */
722
686
  }), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_row, {
723
687
  class: "kq3d-model-excavate-tip"
724
688
  }, {
725
- default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withCtx)(() => [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("p", null, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toDisplayString)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(language).skylineTips + '(' + (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(language).reverseDrawPolygon + ')'), 1
726
- /* TEXT */
727
- )]),
728
- _: 1
729
- /* STABLE */
730
-
689
+ default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withCtx)(() => [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("p", null, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toDisplayString)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(language).skylineTips + '(' + (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(language).reverseDrawPolygon + ')'), 1 /* TEXT */)]),
690
+ _: 1 /* STABLE */
731
691
  }), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("div", _hoisted_3, [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_button, {
732
692
  onClick: _cache[5] || (_cache[5] = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withModifiers)($event => startOperation(), ["stop"])),
733
693
  title: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(language).startOperation,
734
694
  type: "primary"
735
695
  }, {
736
- 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).startOperation), 1
737
- /* TEXT */
738
- )]),
739
- _: 1
740
- /* STABLE */
741
-
742
- }, 8
743
- /* PROPS */
744
- , ["title"]), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_button, {
696
+ 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).startOperation), 1 /* TEXT */)]),
697
+ _: 1 /* STABLE */
698
+ }, 8 /* PROPS */, ["title"]), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_button, {
745
699
  onClick: _cache[6] || (_cache[6] = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withModifiers)($event => clear(), ["stop"])),
746
700
  title: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(language).clear
747
701
  }, {
748
- 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).clear), 1
749
- /* TEXT */
750
- )]),
751
- _: 1
752
- /* STABLE */
753
-
754
- }, 8
755
- /* PROPS */
756
- , ["title"])])], 512
757
- /* NEED_PATCH */
758
- )], 2
759
- /* CLASS */
760
- );
702
+ 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).clear), 1 /* TEXT */)]),
703
+ _: 1 /* STABLE */
704
+ }, 8 /* PROPS */, ["title"])])], 512 /* NEED_PATCH */)], 2 /* CLASS */);
761
705
  };
762
706
  }
763
-
764
707
  }));
765
708
  ;// CONCATENATED MODULE: ./src/webgl/modelexcavate/ModelExcavate.vue?vue&type=script&setup=true&lang=js
766
709
 
@@ -772,10 +715,13 @@ const __exports__ = ModelExcavatevue_type_script_setup_true_lang_js;
772
715
 
773
716
  /* harmony default export */ var ModelExcavate = (__exports__);
774
717
  // EXTERNAL MODULE: external "@kq_npm/client_common_vue/init.js"
775
- var init_js_ = __webpack_require__(7997);
718
+ var init_js_ = __webpack_require__(455);
776
719
  var init_js_default = /*#__PURE__*/__webpack_require__.n(init_js_);
777
720
  ;// CONCATENATED MODULE: ./src/webgl/modelexcavate/index.js
778
-
721
+ /*
722
+ * Copyright (C) 2019 KQ GEO Technologies Co., Ltd.
723
+ * All rights reserved.
724
+ */
779
725
 
780
726
 
781
727
 
@@ -784,8 +730,6 @@ ModelExcavate.install = (Vue, opts) => {
784
730
  Vue.component(ModelExcavate.name, ModelExcavate);
785
731
  };
786
732
 
787
-
788
- }();
789
733
  /******/ return __webpack_exports__;
790
734
  /******/ })()
791
735
  ;