@kq_npm/client3d_webgl_vue 4.5.37 → 4.5.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/adddata/index.js +9 -16
- package/boxclip/index.js +30 -13
- package/clientPrint/index.js +294 -140
- package/geologicalbodyanalysis/index.js +25 -4
- package/index.js +289 -135
- package/measure/index.js +3 -2
- package/modelfilter/index.js +29 -9
- package/modelselect/index.js +31 -8
- package/package.json +1 -1
- package/planeclip/index.js +30 -12
- package/sceneapp/index.js +293 -139
- package/sceneview/index.js +293 -139
- package/windyslicing/index.js +3 -1
|
@@ -179,16 +179,19 @@ var message = __webpack_require__(1705);
|
|
|
179
179
|
*/
|
|
180
180
|
//地质体分析逻辑类
|
|
181
181
|
|
|
182
|
+
|
|
182
183
|
class GeologicalBodyAnalysisViewModel {
|
|
183
184
|
_viewer = null; //三维viewer对象
|
|
184
185
|
_options = {}; //地质体分析存储参数对象
|
|
185
186
|
_geologyBody = null; //地质体分析三维对象
|
|
186
187
|
_measureHandler = null;
|
|
187
188
|
_language = {};
|
|
188
|
-
|
|
189
|
+
callbackParams = null;
|
|
190
|
+
constructor(scenceView, options, callbackParams) {
|
|
189
191
|
this._language = scenceView._language;
|
|
190
192
|
this._options = options;
|
|
191
193
|
this._viewer = scenceView._viewer;
|
|
194
|
+
this.callbackParams = callbackParams;
|
|
192
195
|
this._measureHandler = new Cesium.Kq3dMeasureHandler(scenceView._viewer);
|
|
193
196
|
this._measureHandler.measureEvent.addEventListener(function (result) {
|
|
194
197
|
if(result.measureResult.labels) result.measureResult.labels.show = false;
|
|
@@ -234,8 +237,18 @@ class GeologicalBodyAnalysisViewModel {
|
|
|
234
237
|
}
|
|
235
238
|
}
|
|
236
239
|
});
|
|
240
|
+
// 事件绑定this
|
|
241
|
+
this._resetListData = this._resetListData.bind(this);
|
|
242
|
+
// 添加图层数据源变化监听
|
|
243
|
+
gis_utils_.mapViewUtils.bindViewEvents("resetLayerDatas", this._resetListData, scenceView._viewerId);
|
|
244
|
+
}
|
|
245
|
+
_resetListData(e) {
|
|
246
|
+
// 如果图层变化事件是自己触发的 则不继续执行 避免死循环
|
|
247
|
+
if (e.eventTarget && e.eventTarget === this) {
|
|
248
|
+
return;
|
|
249
|
+
}
|
|
250
|
+
this.callbackParams && this.callbackParams("setData")
|
|
237
251
|
}
|
|
238
|
-
|
|
239
252
|
// 查找所有地质体对象
|
|
240
253
|
findLayers() {
|
|
241
254
|
let geologys = [];
|
|
@@ -243,6 +256,7 @@ class GeologicalBodyAnalysisViewModel {
|
|
|
243
256
|
for (let i = 0; i < geologyBodyCollection.length; i++) {
|
|
244
257
|
if(geologyBodyCollection[i].geologyPrimitiveCollection) {
|
|
245
258
|
if(!geologyBodyCollection[i].guid) geologyBodyCollection[i].guid = Cesium.createGuid();
|
|
259
|
+
if(geologyBodyCollection[i]?.show == false) continue;
|
|
246
260
|
geologys.push({
|
|
247
261
|
guid: geologyBodyCollection[i].guid,
|
|
248
262
|
name: geologyBodyCollection[i].name ? geologyBodyCollection[i].name : geologyBodyCollection[i].guid
|
|
@@ -305,6 +319,7 @@ class GeologicalBodyAnalysisViewModel {
|
|
|
305
319
|
this.clear();
|
|
306
320
|
this._measureHandler && this._measureHandler.destroy();
|
|
307
321
|
this._measureHandler = null;
|
|
322
|
+
gis_utils_.mapViewUtils.offViewEvents("resetLayerDatas", this._resetListData, this._viewer._container.id);
|
|
308
323
|
}
|
|
309
324
|
}
|
|
310
325
|
|
|
@@ -438,7 +453,7 @@ headerTempTitle.value = language.value.geologyBodyAnalysis;
|
|
|
438
453
|
//父组 件ScenceView初始化完成后执行
|
|
439
454
|
gis_utils_.utils.getWebMap(null, scenceView => {
|
|
440
455
|
if (scenceView) {
|
|
441
|
-
viewModel = new GeologicalBodyAnalysisViewModel(scenceView, formItem);
|
|
456
|
+
viewModel = new GeologicalBodyAnalysisViewModel(scenceView, formItem, callbackParams);
|
|
442
457
|
}
|
|
443
458
|
});
|
|
444
459
|
setTimeout(() => {
|
|
@@ -451,7 +466,13 @@ headerTempTitle.value = language.value.geologyBodyAnalysis;
|
|
|
451
466
|
}
|
|
452
467
|
}, 1000);
|
|
453
468
|
});
|
|
454
|
-
|
|
469
|
+
function callbackParams (key, val) {
|
|
470
|
+
if (viewModel) {
|
|
471
|
+
tiles.value = viewModel.findLayers(); // 获取所有tileset对象
|
|
472
|
+
formItem.geology = null;
|
|
473
|
+
paramsChanged("geology");
|
|
474
|
+
}
|
|
475
|
+
}
|
|
455
476
|
/**
|
|
456
477
|
* @description 监听header生成
|
|
457
478
|
*/
|