@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.
@@ -1,13 +1,13 @@
1
1
  (function webpackUniversalModuleDefinition(root, factory) {
2
2
  if(typeof exports === 'object' && typeof module === 'object')
3
- module.exports = factory(require("vue"), require("@kq_npm/client_common_vue/_utils/gis-utils"), require("@kq_npm/client_common_vue/init.js"), require("html2canvas-pro"), require("@kq_npm/client_common_vue/_utils/mitt"), require("@kq_npm/client_common_vue/_utils/util"), require("@kq_npm/client_common_vue/_types/global-event"), require("@kq_npm/client_common_vue/_utils/const-image"), require("@kq_npm/client_common_vue"), require("@kq_npm/client_common_vue/_utils/webmapservice"), require("papaparse"), require("@kq_npm/client_common_vue/_lang/index.js"), require("@kq_npm/client_common_vue/_mixin/render"), require("@kq_npm/client_common_vue/_utils/dictionaries"), require("@kq_npm/client3d_webgl_vue"));
3
+ module.exports = 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/mitt"), require("@kq_npm/client_common_vue/_utils/util"), require("@kq_npm/client_common_vue/_types/global-event"), require("@kq_npm/client_common_vue/_utils/const-image"), require("@kq_npm/client_common_vue"), require("@kq_npm/client_common_vue/_utils/webmapservice"), require("@kq_npm/client_common_vue/_lang/index.js"), require("@kq_npm/client_common_vue/_mixin/render"), require("@kq_npm/client_common_vue/_utils/dictionaries"), require("@kq_npm/client3d_webgl_vue"));
4
4
  else if(typeof define === 'function' && define.amd)
5
- define("@kq_npm/client3d_webgl_vue", ["vue", "@kq_npm/client_common_vue/_utils/gis-utils", "@kq_npm/client_common_vue/init.js", "html2canvas-pro", "@kq_npm/client_common_vue/_utils/mitt", "@kq_npm/client_common_vue/_utils/util", "@kq_npm/client_common_vue/_types/global-event", "@kq_npm/client_common_vue/_utils/const-image", "@kq_npm/client_common_vue", "@kq_npm/client_common_vue/_utils/webmapservice", "papaparse", "@kq_npm/client_common_vue/_lang/index.js", "@kq_npm/client_common_vue/_mixin/render", "@kq_npm/client_common_vue/_utils/dictionaries", "@kq_npm/client3d_webgl_vue"], factory);
5
+ define("@kq_npm/client3d_webgl_vue", ["vue", "@kq_npm/client_common_vue/_utils/gis-utils", "@kq_npm/client_common_vue/init.js", "@kq_npm/client_common_vue/_utils/mitt", "@kq_npm/client_common_vue/_utils/util", "@kq_npm/client_common_vue/_types/global-event", "@kq_npm/client_common_vue/_utils/const-image", "@kq_npm/client_common_vue", "@kq_npm/client_common_vue/_utils/webmapservice", "@kq_npm/client_common_vue/_lang/index.js", "@kq_npm/client_common_vue/_mixin/render", "@kq_npm/client_common_vue/_utils/dictionaries", "@kq_npm/client3d_webgl_vue"], factory);
6
6
  else if(typeof exports === 'object')
7
- exports["@kq_npm/client3d_webgl_vue"] = factory(require("vue"), require("@kq_npm/client_common_vue/_utils/gis-utils"), require("@kq_npm/client_common_vue/init.js"), require("html2canvas-pro"), require("@kq_npm/client_common_vue/_utils/mitt"), require("@kq_npm/client_common_vue/_utils/util"), require("@kq_npm/client_common_vue/_types/global-event"), require("@kq_npm/client_common_vue/_utils/const-image"), require("@kq_npm/client_common_vue"), require("@kq_npm/client_common_vue/_utils/webmapservice"), require("papaparse"), require("@kq_npm/client_common_vue/_lang/index.js"), require("@kq_npm/client_common_vue/_mixin/render"), require("@kq_npm/client_common_vue/_utils/dictionaries"), require("@kq_npm/client3d_webgl_vue"));
7
+ exports["@kq_npm/client3d_webgl_vue"] = 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/mitt"), require("@kq_npm/client_common_vue/_utils/util"), require("@kq_npm/client_common_vue/_types/global-event"), require("@kq_npm/client_common_vue/_utils/const-image"), require("@kq_npm/client_common_vue"), require("@kq_npm/client_common_vue/_utils/webmapservice"), require("@kq_npm/client_common_vue/_lang/index.js"), require("@kq_npm/client_common_vue/_mixin/render"), require("@kq_npm/client_common_vue/_utils/dictionaries"), require("@kq_npm/client3d_webgl_vue"));
8
8
  else
9
- root["@kq_npm/client3d_webgl_vue"] = factory(root["Vue"], root["@kq_npm/client_common_vue/_utils/gis-utils"], root["@kq_npm/client_common_vue/init.js"], root["_"], root["@kq_npm/client_common_vue/_utils/mitt"], root["@kq_npm/client_common_vue/_utils/util"], root["@kq_npm/client_common_vue/_types/global-event"], root["@kq_npm/client_common_vue/_utils/const-image"], root["@kq_npm/client_common_vue"], root["@kq_npm/client_common_vue/_utils/webmapservice"], root["_"], root["@kq_npm/client_common_vue/_lang/index.js"], root["@kq_npm/client_common_vue/_mixin/render"], root["@kq_npm/client_common_vue/_utils/dictionaries"], root["@kq_npm/client3d_webgl_vue"]);
10
- })(this, function(__WEBPACK_EXTERNAL_MODULE__1895__, __WEBPACK_EXTERNAL_MODULE__7135__, __WEBPACK_EXTERNAL_MODULE__7997__, __WEBPACK_EXTERNAL_MODULE__6838__, __WEBPACK_EXTERNAL_MODULE__8905__, __WEBPACK_EXTERNAL_MODULE__3458__, __WEBPACK_EXTERNAL_MODULE__3536__, __WEBPACK_EXTERNAL_MODULE__6277__, __WEBPACK_EXTERNAL_MODULE__7064__, __WEBPACK_EXTERNAL_MODULE__3217__, __WEBPACK_EXTERNAL_MODULE__7747__, __WEBPACK_EXTERNAL_MODULE__5775__, __WEBPACK_EXTERNAL_MODULE__9678__, __WEBPACK_EXTERNAL_MODULE__3569__, __WEBPACK_EXTERNAL_MODULE__6459__) {
9
+ root["@kq_npm/client3d_webgl_vue"] = 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/mitt"], root["@kq_npm/client_common_vue/_utils/util"], root["@kq_npm/client_common_vue/_types/global-event"], root["@kq_npm/client_common_vue/_utils/const-image"], root["@kq_npm/client_common_vue"], root["@kq_npm/client_common_vue/_utils/webmapservice"], root["@kq_npm/client_common_vue/_lang/index.js"], root["@kq_npm/client_common_vue/_mixin/render"], root["@kq_npm/client_common_vue/_utils/dictionaries"], root["@kq_npm/client3d_webgl_vue"]);
10
+ })(this, function(__WEBPACK_EXTERNAL_MODULE__1895__, __WEBPACK_EXTERNAL_MODULE__7135__, __WEBPACK_EXTERNAL_MODULE__7997__, __WEBPACK_EXTERNAL_MODULE__8905__, __WEBPACK_EXTERNAL_MODULE__3458__, __WEBPACK_EXTERNAL_MODULE__3536__, __WEBPACK_EXTERNAL_MODULE__6277__, __WEBPACK_EXTERNAL_MODULE__7064__, __WEBPACK_EXTERNAL_MODULE__3217__, __WEBPACK_EXTERNAL_MODULE__5775__, __WEBPACK_EXTERNAL_MODULE__9678__, __WEBPACK_EXTERNAL_MODULE__3569__, __WEBPACK_EXTERNAL_MODULE__6459__) {
11
11
  return /******/ (function() { // webpackBootstrap
12
12
  /******/ var __webpack_modules__ = ({
13
13
 
@@ -1157,7 +1157,8 @@ return (_ctx, _cache) => {
1157
1157
  (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("p", _hoisted_4, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toDisplayString)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(language).mode), 1 /* TEXT */),
1158
1158
  (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_select, {
1159
1159
  modelValue: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(mode),
1160
- "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => ((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.isRef)(mode) ? (mode).value = $event : mode = $event))
1160
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => ((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.isRef)(mode) ? (mode).value = $event : mode = $event)),
1161
+ disabled: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(isActive)
1161
1162
  }, {
1162
1163
  default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withCtx)(() => [
1163
1164
  ((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.openBlock)(true), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementBlock)(external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.Fragment, null, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.renderList)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(modeList), (item) => {
@@ -1169,7 +1170,7 @@ return (_ctx, _cache) => {
1169
1170
  }), 128 /* KEYED_FRAGMENT */))
1170
1171
  ]),
1171
1172
  _: 1 /* STABLE */
1172
- }, 8 /* PROPS */, ["modelValue"])
1173
+ }, 8 /* PROPS */, ["modelValue", "disabled"])
1173
1174
  ])
1174
1175
  ]),
1175
1176
  (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("div", _hoisted_5, [
@@ -1810,7 +1811,7 @@ element_plus_dist_index_full_js__WEBPACK_IMPORTED_MODULE_0__.ElMessage.install =
1810
1811
 
1811
1812
  /***/ }),
1812
1813
 
1813
- /***/ 6651:
1814
+ /***/ 1358:
1814
1815
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
1815
1816
 
1816
1817
  "use strict";
@@ -1839,9 +1840,9 @@ var util_ = __webpack_require__(3458);
1839
1840
  var message = __webpack_require__(1705);
1840
1841
  // EXTERNAL MODULE: external "@kq_npm/client_common_vue/_utils/const-image"
1841
1842
  var const_image_ = __webpack_require__(6277);
1842
- // EXTERNAL MODULE: external {"root":"_","commonjs":"papaparse","commonjs2":"papaparse","amd":"papaparse"}
1843
- var external_root_commonjs_papaparse_commonjs2_papaparse_amd_papaparse_ = __webpack_require__(7747);
1844
- var external_root_commonjs_papaparse_commonjs2_papaparse_amd_papaparse_default = /*#__PURE__*/__webpack_require__.n(external_root_commonjs_papaparse_commonjs2_papaparse_amd_papaparse_);
1843
+ ;// CONCATENATED MODULE: external "papaparse"
1844
+ var external_papaparse_namespaceObject = require("papaparse");
1845
+ var external_papaparse_default = /*#__PURE__*/__webpack_require__.n(external_papaparse_namespaceObject);
1845
1846
  ;// CONCATENATED MODULE: ./src/webgl/adddata/AddDataViewModel.js
1846
1847
  /*
1847
1848
  * Copyright (C) 2019 KQ GEO Technologies Co., Ltd.
@@ -1989,7 +1990,7 @@ class AddDataViewModel {
1989
1990
  });
1990
1991
  } else if (ext === "csv") {
1991
1992
  (0,util_.readFile)(file, res => {
1992
- var features = external_root_commonjs_papaparse_commonjs2_papaparse_amd_papaparse_default().parse(res, {
1993
+ var features = external_papaparse_default().parse(res, {
1993
1994
  skipEmptyLines: true,
1994
1995
  header: true
1995
1996
  }).data;
@@ -4924,6 +4925,7 @@ var message = __webpack_require__(1705);
4924
4925
  */
4925
4926
  //Box裁剪逻辑类
4926
4927
 
4928
+
4927
4929
  class BoxClipViewModel {
4928
4930
  _viewer = null; //三维viewer对象
4929
4931
  _options = {}; //Box裁剪存储参数对象
@@ -4950,13 +4952,14 @@ class BoxClipViewModel {
4950
4952
  _drawManager = null; //绘制管理对象
4951
4953
  _removeEventListener = null; //绘制完成监听事件
4952
4954
  _language = {};
4953
- constructor(scenceView, options) {
4955
+ callbackParams = null;
4956
+ constructor(scenceView, options, callbackParams) {
4954
4957
  this._language = scenceView._language;
4955
4958
  this._options = Object.assign({}, options, this._defaultOptions);
4956
4959
  this._viewer = scenceView._viewer;
4960
+ this.callbackParams = callbackParams;
4957
4961
  // this._viewer.enabledFXAA = true;
4958
4962
  this._options.viewer = this._viewer;
4959
-
4960
4963
  this._drawManager = scenceView._drawManager;
4961
4964
  let that = this;
4962
4965
  this._removeEventListener = this._drawManager.drawFinishedEvent.addEventListener(shape => {
@@ -4967,14 +4970,25 @@ class BoxClipViewModel {
4967
4970
  that._drawManager.clear();
4968
4971
  }
4969
4972
  });
4973
+ // 事件绑定this
4974
+ this._resetListData = this._resetListData.bind(this);
4975
+ // 添加图层数据源变化监听
4976
+ gis_utils_.mapViewUtils.bindViewEvents("resetLayerDatas", this._resetListData, scenceView._viewerId);
4977
+ }
4978
+ _resetListData(e) {
4979
+ // 如果图层变化事件是自己触发的 则不继续执行 避免死循环
4980
+ if (e.eventTarget && e.eventTarget === this) {
4981
+ return;
4982
+ }
4983
+ this.callbackParams && this.callbackParams("setData")
4970
4984
  }
4971
-
4972
4985
  // 查找所有3dtiles模型对象
4973
4986
  findLayers() {
4974
4987
  let tilesets = [];
4975
4988
  const primitives = this._options.viewer.scene.primitives._primitives;
4976
4989
  for (let m = 0; m < primitives.length; m++) {
4977
4990
  if (primitives[m] instanceof Cesium.Cesium3DTileset) {
4991
+ if(!primitives[m].show) continue;
4978
4992
  tilesets.push({
4979
4993
  guid: primitives[m].guid,
4980
4994
  name: primitives[m].name ? primitives[m].name : primitives[m].guid
@@ -4999,7 +5013,7 @@ class BoxClipViewModel {
4999
5013
  var flag = false;
5000
5014
  var models = this._options.viewer.scene.primitives._primitives;
5001
5015
  for (let i = 0; i < models.length; i++) {
5002
- if (models[i]._url) {
5016
+ if (models[i]._url && models[i].show) {
5003
5017
  flag = true;
5004
5018
  }
5005
5019
  }
@@ -5030,6 +5044,7 @@ class BoxClipViewModel {
5030
5044
  //移除监听事件
5031
5045
  this._removeEventListener && this._removeEventListener();
5032
5046
  this._removeEventListener = null;
5047
+ gis_utils_.mapViewUtils.offViewEvents("resetLayerDatas", this._resetListData, this._viewer._container.id);
5033
5048
  }
5034
5049
 
5035
5050
  // 设置裁剪对象
@@ -5243,20 +5258,23 @@ headerTempTitle.value = language.value.boxClip;
5243
5258
  axisZ: formItem.clipHeight,
5244
5259
  angle: formItem.clipRotation
5245
5260
  };
5246
- viewModel = new BoxClipViewModel(scenceView, options);
5261
+ viewModel = new BoxClipViewModel(scenceView, options, callbackParams);
5247
5262
  }
5248
5263
  });
5249
5264
  setTimeout(() => {
5250
- if (viewModel) {
5251
- tiles.value = viewModel.findLayers(); // 获取所有tileset对象
5252
- if (tiles.value.length > 0) {
5253
- formItem.tileset = tiles.value[0].guid;
5254
- paramsChanged("tileset");
5255
- }
5256
- }
5265
+ callbackParams();
5257
5266
  }, 1000);
5258
5267
  });
5259
-
5268
+ function callbackParams (key, val) {
5269
+ if (viewModel) {
5270
+ tiles.value = viewModel.findLayers(); // 获取所有tileset对象
5271
+ formItem.tileset = "";
5272
+ if (tiles.value.length > 0) {
5273
+ formItem.tileset = tiles.value[0].guid;
5274
+ }
5275
+ paramsChanged("tileset");
5276
+ }
5277
+ }
5260
5278
  /**
5261
5279
  * @description 监听header生成
5262
5280
  */
@@ -5875,7 +5893,7 @@ BoxClip.install = (Vue, opts) => {
5875
5893
 
5876
5894
  /***/ }),
5877
5895
 
5878
- /***/ 8613:
5896
+ /***/ 5603:
5879
5897
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
5880
5898
 
5881
5899
  "use strict";
@@ -5887,9 +5905,9 @@ __webpack_require__.d(__webpack_exports__, {
5887
5905
 
5888
5906
  // EXTERNAL MODULE: external {"root":"Vue","commonjs":"vue","commonjs2":"vue","amd":"vue"}
5889
5907
  var external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_ = __webpack_require__(1895);
5890
- // EXTERNAL MODULE: external {"root":"_","commonjs":"html2canvas-pro","commonjs2":"html2canvas-pro","amd":"html2canvas-pro"}
5891
- var external_root_commonjs_html2canvas_pro_commonjs2_html2canvas_pro_amd_html2canvas_pro_ = __webpack_require__(6838);
5892
- var external_root_commonjs_html2canvas_pro_commonjs2_html2canvas_pro_amd_html2canvas_pro_default = /*#__PURE__*/__webpack_require__.n(external_root_commonjs_html2canvas_pro_commonjs2_html2canvas_pro_amd_html2canvas_pro_);
5908
+ ;// CONCATENATED MODULE: external "html2canvas-pro"
5909
+ var external_html2canvas_pro_namespaceObject = require("html2canvas-pro");
5910
+ var external_html2canvas_pro_default = /*#__PURE__*/__webpack_require__.n(external_html2canvas_pro_namespaceObject);
5893
5911
  // EXTERNAL MODULE: ./src/common/_ui/message/index.js
5894
5912
  var message = __webpack_require__(1705);
5895
5913
  // EXTERNAL MODULE: external "@element-plus/icons-vue"
@@ -6878,7 +6896,7 @@ function getPic() {
6878
6896
  loadState.value = true;
6879
6897
  // 延时1000ms,等待图片读入到blob文件对象,然后使用URL.createObjectURL转换成src可用的地址
6880
6898
  setTimeout(() => {
6881
- external_root_commonjs_html2canvas_pro_commonjs2_html2canvas_pro_amd_html2canvas_pro_default()(printMap.value, {
6899
+ external_html2canvas_pro_default()(printMap.value, {
6882
6900
  taintTest: true, // 检测每张图片都已经加载完成
6883
6901
  logging: true, // 启用日志记录以进行调试 (发现加上对去白边有帮助)
6884
6902
  allowTaint: true, // 否允许跨源图像污染画布
@@ -9625,7 +9643,7 @@ Compass.install = (Vue, opts) => {
9625
9643
  /* harmony import */ var _webgl_fixedzoomin__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7671);
9626
9644
  /* harmony import */ var _webgl_resetview__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(1364);
9627
9645
  /* harmony import */ var _webgl_compass__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(1899);
9628
- /* harmony import */ var _webgl_clientPrint__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(8613);
9646
+ /* harmony import */ var _webgl_clientPrint__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(5603);
9629
9647
  /* harmony import */ var _webgl_baseterraingallery__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(8180);
9630
9648
  /* harmony import */ var _webgl_measure__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(9870);
9631
9649
  /* harmony import */ var _webgl_flight__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(9395);
@@ -9657,7 +9675,7 @@ Compass.install = (Vue, opts) => {
9657
9675
  /* harmony import */ var _webgl_isolineanalysis__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(6209);
9658
9676
  /* harmony import */ var _webgl_boxclip__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(5066);
9659
9677
  /* harmony import */ var _webgl_planeclip__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(6597);
9660
- /* harmony import */ var _webgl_adddata__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(6651);
9678
+ /* harmony import */ var _webgl_adddata__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(1358);
9661
9679
  /* harmony import */ var _webgl_particleeffect__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(4545);
9662
9680
  /* harmony import */ var _webgl_weathereffect__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(8498);
9663
9681
  /* harmony import */ var _webgl_comparemap__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(8752);
@@ -12903,16 +12921,19 @@ var message = __webpack_require__(1705);
12903
12921
  */
12904
12922
  //地质体分析逻辑类
12905
12923
 
12924
+
12906
12925
  class GeologicalBodyAnalysisViewModel {
12907
12926
  _viewer = null; //三维viewer对象
12908
12927
  _options = {}; //地质体分析存储参数对象
12909
12928
  _geologyBody = null; //地质体分析三维对象
12910
12929
  _measureHandler = null;
12911
12930
  _language = {};
12912
- constructor(scenceView, options) {
12931
+ callbackParams = null;
12932
+ constructor(scenceView, options, callbackParams) {
12913
12933
  this._language = scenceView._language;
12914
12934
  this._options = options;
12915
12935
  this._viewer = scenceView._viewer;
12936
+ this.callbackParams = callbackParams;
12916
12937
  this._measureHandler = new Cesium.Kq3dMeasureHandler(scenceView._viewer);
12917
12938
  this._measureHandler.measureEvent.addEventListener(function (result) {
12918
12939
  if(result.measureResult.labels) result.measureResult.labels.show = false;
@@ -12958,8 +12979,18 @@ class GeologicalBodyAnalysisViewModel {
12958
12979
  }
12959
12980
  }
12960
12981
  });
12982
+ // 事件绑定this
12983
+ this._resetListData = this._resetListData.bind(this);
12984
+ // 添加图层数据源变化监听
12985
+ gis_utils_.mapViewUtils.bindViewEvents("resetLayerDatas", this._resetListData, scenceView._viewerId);
12986
+ }
12987
+ _resetListData(e) {
12988
+ // 如果图层变化事件是自己触发的 则不继续执行 避免死循环
12989
+ if (e.eventTarget && e.eventTarget === this) {
12990
+ return;
12991
+ }
12992
+ this.callbackParams && this.callbackParams("setData")
12961
12993
  }
12962
-
12963
12994
  // 查找所有地质体对象
12964
12995
  findLayers() {
12965
12996
  let geologys = [];
@@ -12967,6 +12998,7 @@ class GeologicalBodyAnalysisViewModel {
12967
12998
  for (let i = 0; i < geologyBodyCollection.length; i++) {
12968
12999
  if(geologyBodyCollection[i].geologyPrimitiveCollection) {
12969
13000
  if(!geologyBodyCollection[i].guid) geologyBodyCollection[i].guid = Cesium.createGuid();
13001
+ if(geologyBodyCollection[i]?.show == false) continue;
12970
13002
  geologys.push({
12971
13003
  guid: geologyBodyCollection[i].guid,
12972
13004
  name: geologyBodyCollection[i].name ? geologyBodyCollection[i].name : geologyBodyCollection[i].guid
@@ -13029,6 +13061,7 @@ class GeologicalBodyAnalysisViewModel {
13029
13061
  this.clear();
13030
13062
  this._measureHandler && this._measureHandler.destroy();
13031
13063
  this._measureHandler = null;
13064
+ gis_utils_.mapViewUtils.offViewEvents("resetLayerDatas", this._resetListData, this._viewer._container.id);
13032
13065
  }
13033
13066
  }
13034
13067
 
@@ -13162,7 +13195,7 @@ headerTempTitle.value = language.value.geologyBodyAnalysis;
13162
13195
  //父组 件ScenceView初始化完成后执行
13163
13196
  gis_utils_.utils.getWebMap(null, scenceView => {
13164
13197
  if (scenceView) {
13165
- viewModel = new GeologicalBodyAnalysisViewModel(scenceView, formItem);
13198
+ viewModel = new GeologicalBodyAnalysisViewModel(scenceView, formItem, callbackParams);
13166
13199
  }
13167
13200
  });
13168
13201
  setTimeout(() => {
@@ -13175,7 +13208,13 @@ headerTempTitle.value = language.value.geologyBodyAnalysis;
13175
13208
  }
13176
13209
  }, 1000);
13177
13210
  });
13178
-
13211
+ function callbackParams (key, val) {
13212
+ if (viewModel) {
13213
+ tiles.value = viewModel.findLayers(); // 获取所有tileset对象
13214
+ formItem.geology = null;
13215
+ paramsChanged("geology");
13216
+ }
13217
+ }
13179
13218
  /**
13180
13219
  * @description 监听header生成
13181
13220
  */
@@ -21215,12 +21254,13 @@ var gis_utils_ = __webpack_require__(7135);
21215
21254
  // EXTERNAL MODULE: ./src/common/_ui/message/index.js
21216
21255
  var message = __webpack_require__(1705);
21217
21256
  ;// CONCATENATED MODULE: ./src/webgl/modelfilter/ModelFilterViewModel.js
21218
- /*
21219
- * Copyright (C) 2019 KQ GEO Technologies Co., Ltd.
21220
- * All rights reserved.
21221
- */
21257
+ /*
21258
+ * Copyright (C) 2019 KQ GEO Technologies Co., Ltd.
21259
+ * All rights reserved.
21260
+ */
21222
21261
  //模型滤镜逻辑类
21223
21262
 
21263
+
21224
21264
  class ModelFilterViewModel {
21225
21265
  _viewer = null; //三维viewer对象
21226
21266
  _options = {}; //Box裁剪存储参数对象
@@ -21231,19 +21271,31 @@ class ModelFilterViewModel {
21231
21271
  saturation:1,
21232
21272
  gamma: 1
21233
21273
  }
21234
-
21235
- constructor(scenceView, options) {
21274
+ callbackParams = null;
21275
+ constructor(scenceView, options, callbackParams) {
21236
21276
  this._options = Object.assign({}, options, this._defaultOptions);
21237
21277
  this._viewer = scenceView._viewer;
21238
21278
  this._options.viewer = this._viewer;
21279
+ this.callbackParams = callbackParams;
21280
+ // 事件绑定this
21281
+ this._resetListData = this._resetListData.bind(this);
21282
+ // 添加图层数据源变化监听
21283
+ gis_utils_.mapViewUtils.bindViewEvents("resetLayerDatas", this._resetListData, scenceView._viewerId);
21284
+ }
21285
+ _resetListData(e) {
21286
+ // 如果图层变化事件是自己触发的 则不继续执行 避免死循环
21287
+ if (e.eventTarget && e.eventTarget === this) {
21288
+ return;
21289
+ }
21290
+ this.callbackParams && this.callbackParams("setData")
21239
21291
  }
21240
-
21241
21292
  // 查找所有3dtiles模型对象
21242
21293
  findLayers() {
21243
21294
  let tilesets = [];
21244
21295
  const primitives = this._viewer.scene.primitives._primitives;
21245
21296
  for (let m = 0; m < primitives.length; m++) {
21246
21297
  if (primitives[m] instanceof Cesium.Cesium3DTileset) {
21298
+ if(!primitives[m].show) continue;
21247
21299
  tilesets.push({
21248
21300
  guid: primitives[m].guid,
21249
21301
  name: primitives[m].name ? primitives[m].name : primitives[m].guid
@@ -21304,6 +21356,7 @@ class ModelFilterViewModel {
21304
21356
 
21305
21357
  //销毁
21306
21358
  destroy() {
21359
+ gis_utils_.mapViewUtils.offViewEvents("resetLayerDatas", this._resetListData, this._viewer._container.id);
21307
21360
  this.clear();
21308
21361
  }
21309
21362
  }
@@ -21447,7 +21500,7 @@ headerTempTitle.value = language.value.modelFilterPick;
21447
21500
  saturation: formItem.saturation,
21448
21501
  gamma: formItem.gamma
21449
21502
  };
21450
- viewModel = new ModelFilterViewModel(scenceView, options);
21503
+ viewModel = new ModelFilterViewModel(scenceView, options, callbackParams);
21451
21504
  }
21452
21505
  });
21453
21506
  setTimeout(() => {
@@ -21456,7 +21509,13 @@ headerTempTitle.value = language.value.modelFilterPick;
21456
21509
  }
21457
21510
  }, 1000);
21458
21511
  });
21459
-
21512
+ function callbackParams (key, val) {
21513
+ if (viewModel) {
21514
+ tiles.value = viewModel.findLayers(); // 获取所有tileset对象
21515
+ formItem.tileset = "";
21516
+ paramsChanged("tileset");
21517
+ }
21518
+ }
21460
21519
  /**
21461
21520
  * @description 监听header生成
21462
21521
  */
@@ -22658,6 +22717,9 @@ class ModelSelectViewModel {
22658
22717
  _modeFiledArray = null; // 模型属性唯一值字段集合
22659
22718
  _modeFiled = "id"; // 模型属性匹配字段
22660
22719
  _language = {};
22720
+ selectedKey = null;
22721
+ oldColor = null;
22722
+ selectedFeature = null;
22661
22723
  constructor(scenceView, pickCallFunc) {
22662
22724
  this._language = scenceView._language;
22663
22725
  this._viewer = scenceView._viewer;
@@ -22686,15 +22748,30 @@ class ModelSelectViewModel {
22686
22748
  })
22687
22749
  }
22688
22750
  if (properties.indexOf(that._modeFiled) > -1) {
22689
- let id = pickedObject.getProperty(that._modeFiled);
22751
+ // let id = pickedObject.getProperty(that._modeFiled);
22752
+ var newKey = pickedObject ? pickedObject.getProperty(that._modeFiled) : null;
22753
+ if (newKey != that.selectedKey) {
22754
+ if (that.selectedFeature) {
22755
+ that.selectedFeature.color = that.oldColor;
22756
+ that.selectedFeature = null;
22757
+ that.selectedKey = null;
22758
+ }
22759
+
22760
+ if (newKey != null) {
22761
+ that.selectedKey = newKey;
22762
+ that.selectedFeature = pickedObject;
22763
+ that.oldColor = that.selectedFeature.color;
22764
+ that.selectedFeature.color = Cesium.Color.fromCssColorString(that._highlightColor);
22765
+ }
22766
+ }
22690
22767
  // that.clear();
22691
- that._highlight = new Cesium.Kq3dHighlight({
22692
- viewer: that._viewer,
22693
- tileset: pickedObject.tileset,
22694
- attrName: that._modeFiled,
22695
- attrValue: [id],
22696
- color: [Cesium.Color.fromCssColorString(that._highlightColor)]
22697
- });
22768
+ // that._highlight = new Cesium.Kq3dHighlight({
22769
+ // viewer: that._viewer,
22770
+ // tileset: pickedObject.tileset,
22771
+ // attrName: that._modeFiled,
22772
+ // attrValue: [id],
22773
+ // color: [Cesium.Color.fromCssColorString(that._highlightColor)]
22774
+ // });
22698
22775
  let attrs = {};
22699
22776
  properties.forEach(prop => {
22700
22777
  attrs[prop] = pickedObject.getProperty(prop);
@@ -22747,6 +22824,11 @@ class ModelSelectViewModel {
22747
22824
  this._highlight = null;
22748
22825
  this.setCursor("default");
22749
22826
  this._isPick = false;
22827
+ if (this.selectedFeature) {
22828
+ this.selectedFeature.color = this.oldColor;
22829
+ this.selectedFeature = null;
22830
+ this.selectedKey = null;
22831
+ }
22750
22832
  }
22751
22833
 
22752
22834
  //销毁
@@ -24067,6 +24149,7 @@ var message = __webpack_require__(1705);
24067
24149
  */
24068
24150
  //平面裁剪逻辑类
24069
24151
 
24152
+
24070
24153
  class PlaneClipViewModel {
24071
24154
  _viewer = null; //三维viewer对象
24072
24155
  _options = {}; //平面裁剪存储参数对象
@@ -24097,13 +24180,15 @@ class PlaneClipViewModel {
24097
24180
  _drawManager = null; //绘制管理对象
24098
24181
  _removeEventListener = null; //绘制完成事件监听
24099
24182
  _language = {};
24100
- constructor(scenceView, options) {
24183
+ callbackParams = null;
24184
+ constructor(scenceView, options, callbackParams) {
24101
24185
  this._options = Object.assign({}, options, this._defaultOptions);
24102
24186
  this._viewer = scenceView._viewer;
24103
24187
  // this._viewer.enabledFXAA = true;
24104
24188
  this._options.viewer = this._viewer;
24105
24189
  this._language = scenceView._language;
24106
24190
  this._drawManager = scenceView._drawManager;
24191
+ this.callbackParams = callbackParams;
24107
24192
  let that = this;
24108
24193
  this._removeEventListener = this._drawManager.drawFinishedEvent.addEventListener(shape => {
24109
24194
  if (shape) {
@@ -24113,14 +24198,25 @@ class PlaneClipViewModel {
24113
24198
  that._drawManager.clear();
24114
24199
  }
24115
24200
  });
24201
+ // 事件绑定this
24202
+ this._resetListData = this._resetListData.bind(this);
24203
+ // 添加图层数据源变化监听
24204
+ gis_utils_.mapViewUtils.bindViewEvents("resetLayerDatas", this._resetListData, scenceView._viewerId);
24205
+ }
24206
+ _resetListData(e) {
24207
+ // 如果图层变化事件是自己触发的 则不继续执行 避免死循环
24208
+ if (e.eventTarget && e.eventTarget === this) {
24209
+ return;
24210
+ }
24211
+ this.callbackParams && this.callbackParams("setData")
24116
24212
  }
24117
-
24118
24213
  // 查找所有3dtiles模型对象
24119
24214
  findLayers() {
24120
24215
  let tilesets = [];
24121
24216
  const primitives = this._options.viewer.scene.primitives._primitives;
24122
24217
  for (let m = 0; m < primitives.length; m++) {
24123
24218
  if (primitives[m] instanceof Cesium.Cesium3DTileset) {
24219
+ if(!primitives[m].show) continue;
24124
24220
  tilesets.push({
24125
24221
  guid: primitives[m].guid,
24126
24222
  name: primitives[m].name ? primitives[m].name : primitives[m].guid
@@ -24145,7 +24241,7 @@ class PlaneClipViewModel {
24145
24241
  var flag = false;
24146
24242
  var models = this._options.viewer.scene.primitives._primitives;
24147
24243
  for (let i = 0; i < models.length; i++) {
24148
- if (models[i]._url) {
24244
+ if (models[i]._url && models[i].show) {
24149
24245
  flag = true;
24150
24246
  }
24151
24247
  }
@@ -24175,6 +24271,7 @@ class PlaneClipViewModel {
24175
24271
  //移除监听事件
24176
24272
  this._removeEventListener && this._removeEventListener();
24177
24273
  this._removeEventListener = null;
24274
+ gis_utils_.mapViewUtils.offViewEvents("resetLayerDatas", this._resetListData, this._viewer._container.id);
24178
24275
  }
24179
24276
 
24180
24277
  // 设置裁剪对象
@@ -24361,20 +24458,23 @@ headerTempTitle.value = language.value.planeClip;
24361
24458
  boxEnable: formItem.boxEnable,
24362
24459
  distance: formItem.clipDistance
24363
24460
  };
24364
- viewModel = new PlaneClipViewModel(scenceView, options);
24461
+ viewModel = new PlaneClipViewModel(scenceView, options, callbackParams);
24365
24462
  }
24366
24463
  });
24367
24464
  setTimeout(() => {
24368
- if (viewModel) {
24369
- tiles.value = viewModel.findLayers(); // 获取所有tileset对象
24370
- if (tiles.value.length > 0) {
24371
- formItem.tileset = tiles.value[0].guid;
24372
- paramsChanged("tileset");
24373
- }
24374
- }
24465
+ callbackParams();
24375
24466
  }, 1000);
24376
24467
  });
24377
-
24468
+ function callbackParams (key, val) {
24469
+ if (viewModel) {
24470
+ tiles.value = viewModel.findLayers(); // 获取所有tileset对象
24471
+ formItem.tileset = "";
24472
+ if (tiles.value.length > 0) {
24473
+ formItem.tileset = tiles.value[0].guid;
24474
+ }
24475
+ paramsChanged("tileset");
24476
+ }
24477
+ }
24378
24478
  /**
24379
24479
  * @description 监听header生成
24380
24480
  */
@@ -29069,6 +29169,8 @@ function resetWebMapInfo(webMapInfo, cb, defaultShowLayerNames, isShowAllLayers)
29069
29169
  return { ..._layerSources[i], ...layerData };
29070
29170
  }
29071
29171
  }
29172
+ } else {
29173
+ layerData.visible = getLayerDefaultState(layerData);
29072
29174
  }
29073
29175
  }
29074
29176
  } else {
@@ -31069,10 +31171,7 @@ const updatePosition = (boxElem, props) => {
31069
31171
  if (!boxElem) {
31070
31172
  return false;
31071
31173
  }
31072
- boxElem.style.top = "auto";
31073
- boxElem.style.left = "auto";
31074
- boxElem.style.bottom = "auto";
31075
- boxElem.style.right = "auto";
31174
+
31076
31175
  const { position } = props;
31077
31176
  let _fixed = "static";
31078
31177
  if (position) {
@@ -31080,6 +31179,11 @@ const updatePosition = (boxElem, props) => {
31080
31179
  } else {
31081
31180
  return false;
31082
31181
  }
31182
+ boxElem.style.top = "auto";
31183
+ boxElem.style.left = "auto";
31184
+ boxElem.style.bottom = "auto";
31185
+ boxElem.style.right = "auto";
31186
+
31083
31187
  addClass(boxElem, "kq-is-absolute");
31084
31188
  const clientVisibleWidth =
31085
31189
  _fixed === "fixed" ? document.documentElement.clientWidth || document.body.clientWidth : "auto";
@@ -31540,15 +31644,6 @@ function specialSymbols(name) {
31540
31644
  '"/></DecorateStyle>' +
31541
31645
  "</PolygonSymbol>" +
31542
31646
  "</StyleItem>";
31543
- } else if (name === "圆点") {
31544
- xml =
31545
- '<StyleItem TypeID="109">' +
31546
- '<CirclePoint Name="' +
31547
- name +
31548
- '" AliasName="' +
31549
- name +
31550
- '" Color="4278190080" Units="1" Mask="-5" EnableReallyMeter="0" Light="0" EnableXRay="0" XRayColor="4294967295" OffsetX="0" OffsetY="0" Degree="0" Width="3" Height="3" PivotX="0.5" PivotY="0.5" PivotZ="0" m="Y" md="1" mot_h="1" mov_rel_h="0" mov_abs_h="0" mot_v="1" mov_rel_v="0" mov_abs_v="0" vectortype="1" vectorpath="" vectoruuid="" StrokeColor="4294901760" StrokeWidth="0.5" Cap="512" Join="8192" PenStyle="1" FillColor="4294901760" FillStyle="1" GradientType="0" StartGradientColor="4278190080" EndGradientColor="4294967295" GradientDegree="0" GradientRatio="0" scaleWithStyle="N" SourceStyleLocked="N"/>' +
31551
- "</StyleItem>";
31552
31647
  }
31553
31648
  let x2js = new X2JS();
31554
31649
  let styleItem = x2js.xml2js(xml).StyleItem;
@@ -31758,8 +31853,7 @@ function getStyleItem(symbolInfo) {
31758
31853
  symbolInfo.ITEM_NAME === "运载火箭航天发射" ||
31759
31854
  symbolInfo.ITEM_NAME === "地空导弹营火力范围" ||
31760
31855
  symbolInfo.ITEM_NAME === "近程常规导弹火力发射圈箭头线" ||
31761
- symbolInfo.ITEM_NAME === "直瞄打击炮队展开地区" ||
31762
- symbolInfo[j].ITEM_NAME === "圆点"
31856
+ symbolInfo.ITEM_NAME === "直瞄打击炮队展开地区"
31763
31857
  ) {
31764
31858
  styleItem = specialSymbols(symbolInfo);
31765
31859
  } else {
@@ -53261,6 +53355,31 @@ function openelement(ChildList, thirdName) {
53261
53355
  thirdName.children.push(element);
53262
53356
  }
53263
53357
  }
53358
+
53359
+ function getPlotColor(colorValue) {
53360
+ if (colorValue.toString().indexOf("rgba") >= 0) {
53361
+ let value = colorValue.substring(colorValue.indexOf("(") + 1, colorValue.indexOf(")"));
53362
+ let values = value.split(",");
53363
+ let r = Number(values[0]);
53364
+ let g = Number(values[1]);
53365
+ let b = Number(values[2]);
53366
+ let a = Math.round((Number(values[3]) / 255) * 100) / 100;
53367
+ return "rgba(" + r + "," + g + "," + b + "," + a + ")";
53368
+ }
53369
+ if (colorValue === undefined) {
53370
+ return "rgba(0,0,0,1)";
53371
+ }
53372
+ colorValue = Number(colorValue);
53373
+ if (colorValue === 0) {
53374
+ return "rgba(255,0,0,1)";
53375
+ }
53376
+ // colorValue = colorValue >>> 0;
53377
+ let r = (colorValue >> 16) & 0xff;
53378
+ let g = (colorValue >> 8) & 0xff;
53379
+ let b = colorValue & 0xff;
53380
+ let a = Math.round(((colorValue >>> 24) / 255) * 100) / 100;
53381
+ return "rgba(" + r + "," + g + "," + b + "," + a + ")";
53382
+ }
53264
53383
 
53265
53384
  ;// CONCATENATED MODULE: ./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/webgl/sceneapp/components/AppPlotting.vue?vue&type=script&setup=true&lang=js
53266
53385
 
@@ -58192,7 +58311,7 @@ class DrawManager {
58192
58311
  }
58193
58312
 
58194
58313
  //开始绘制
58195
- startDraw(type, style, callback, groupName, isMulti=false) {
58314
+ startDraw(type, style, callback, groupName, isMulti = false) {
58196
58315
  // 开始绘制之前停止编辑和关闭样式设置框
58197
58316
  if (this._drawHandler.editHandler.shapeObject) {
58198
58317
  this._drawHandler.startEdit(null);
@@ -58214,7 +58333,7 @@ class DrawManager {
58214
58333
  this._viewer.scene.globe.depthTestAgainstTerrain = true;
58215
58334
  }
58216
58335
  var unionOptions = { ...this._drawStyle[type] };
58217
- if(type === "CatmullRomSpline") unionOptions = { ...this._drawStyle["polyline"] };
58336
+ if (type === "CatmullRomSpline") unionOptions = { ...this._drawStyle["polyline"] };
58218
58337
  for (const key in unionOptions) {
58219
58338
  if (Object.hasOwnProperty.call(options, key)) {
58220
58339
  unionOptions[key] = options[key];
@@ -58260,16 +58379,16 @@ class DrawManager {
58260
58379
  var feature = that.shapeToGeoFeature(shape);
58261
58380
  callback(feature.geometry, { layer: shape.guid });
58262
58381
  }
58263
- if(that.removeEventListener)that.removeEventListener();
58382
+ if (that.removeEventListener) that.removeEventListener();
58264
58383
  that.removeEventListener = null;
58265
- if(isMulti) {
58384
+ if (isMulti) {
58266
58385
  that.startDraw(type, style, callback, groupName, isMulti);
58267
58386
  }
58268
58387
  });
58269
58388
  }
58270
58389
 
58271
58390
  stopDraw() {
58272
- if(this.removeEventListener) {
58391
+ if (this.removeEventListener) {
58273
58392
  this.removeEventListener();
58274
58393
  this.removeEventListener = null;
58275
58394
  }
@@ -58392,7 +58511,7 @@ class DrawManager {
58392
58511
  }
58393
58512
 
58394
58513
  //通过geojson进行绘制,支持定位和闪烁
58395
- drawFromGeojson(geojsonData, idCustom = "result", callFun, geojsonStyle, isLocation, flashing=false) {
58514
+ drawFromGeojson(geojsonData, idCustom = "result", callFun, geojsonStyle, isLocation, flashing = false) {
58396
58515
  if (!geojsonStyle) geojsonStyle = {};
58397
58516
  let style = JSON.parse(JSON.stringify(this._geojsonStyle));
58398
58517
  for (var type in geojsonStyle) {
@@ -58432,6 +58551,7 @@ class DrawManager {
58432
58551
  style.point.color = style.point.material;
58433
58552
  delete style.billboard;
58434
58553
  }
58554
+
58435
58555
  this._viewer.scene.globe.depthTestAgainstTerrain = false;
58436
58556
  let geojsonDs = this._viewer.dataSources.getByName(idCustom);
58437
58557
  if (geojsonDs.length === 0) {
@@ -58467,11 +58587,11 @@ class DrawManager {
58467
58587
  let offset = new Cesium.HeadingPitchRange(0, Cesium.Math.toRadians(-90), 0);
58468
58588
  that._viewer.flyTo(ds, { duration: 1.5, offset });
58469
58589
  }
58470
- if(flashing) {
58590
+ if (flashing) {
58471
58591
  // 闪烁效果
58472
58592
  let count = 0;
58473
58593
  let interval = setInterval(() => {
58474
- if(ds._destroyed) {
58594
+ if (ds._destroyed) {
58475
58595
  clearInterval(interval);
58476
58596
  return;
58477
58597
  }
@@ -58493,12 +58613,10 @@ class DrawManager {
58493
58613
 
58494
58614
  //删除指定绘图分组的所有图形
58495
58615
  removeGeojsonByIdCustom(idCustom) {
58616
+ if (idCustom === "draw") this.clear();
58496
58617
  let dsList = this._viewer.dataSources.getByName(idCustom);
58497
58618
 
58498
- if (dsList.length <= 0) {
58499
- this.clear();
58500
- return;
58501
- }
58619
+ if (dsList.length <= 0) return;
58502
58620
  for (let i = 0; i < dsList.length; i++) {
58503
58621
  this._viewer.dataSources.remove(dsList[i], true);
58504
58622
  }
@@ -58506,7 +58624,6 @@ class DrawManager {
58506
58624
  if (index > -1) {
58507
58625
  this._layerGroup.splice(index, 1);
58508
58626
  }
58509
- if(idCustom === 'draw') this.clear();
58510
58627
  }
58511
58628
 
58512
58629
  getGeometry(idCustom) {
@@ -58734,8 +58851,8 @@ class DrawManager {
58734
58851
  const layer = layerList[i];
58735
58852
  const name = layer.name || "";
58736
58853
  const info = this.getShapeInfo(layer.guid);
58737
-
58738
- items.push({ name: name, info: info, shape: layer.shape });
58854
+ // edited by ly
58855
+ items.push({ name: name, info: info, shape: layer.shape, guid: layer.guid });
58739
58856
  }
58740
58857
 
58741
58858
  return JSON.stringify(items);
@@ -58919,7 +59036,7 @@ class DrawManager {
58919
59036
  let shape = this._drawLayer.getById(id);
58920
59037
  if (shape) {
58921
59038
  let offset = new Cesium.HeadingPitchRange(0, Cesium.Math.toRadians(-90), 0);
58922
- if(shape.type === 'marker' || shape.type === 'text') {
59039
+ if (shape.type === "marker" || shape.type === "text") {
58923
59040
  let boundingSphere = new Cesium.BoundingSphere(shape.position, 50000);
58924
59041
  this._viewer.camera.flyToBoundingSphere(boundingSphere, { duration: 1.5, offset });
58925
59042
  } else {
@@ -59063,29 +59180,55 @@ class DrawManager {
59063
59180
  }
59064
59181
  }
59065
59182
  }
59183
+ setLabelList(v, g) {
59184
+ this._labelInfo = {
59185
+ labelList: v,
59186
+ groupName: g
59187
+ };
59188
+ }
59066
59189
 
59067
59190
  /********** 地理编码通用组件使用 start ************/
59068
59191
  // 绘制点图标自带点击弹出气泡, 地理编码通用组件使用
59069
- drawPointWithPoup(data, idCustom = "geocode") {
59070
- if (!this._handler) {
59071
- // 注册点击事件
59072
- let scene = this._viewer.scene;
59073
- this._handler = new Cesium.ScreenSpaceEventHandler(scene.canvas);
59074
- let that = this;
59075
- this._handler.setInputAction(function (movement) {
59076
- var pickedObject = scene.pick(movement.position);
59077
- if (pickedObject && pickedObject.id && pickedObject.id instanceof Cesium.Entity) {
59078
- let entity = pickedObject.id;
59079
- that.createPointPoup(entity);
59080
- }
59081
- }, Cesium.ScreenSpaceEventType.LEFT_CLICK);
59082
- this._handler.setInputAction(function (movement) {
59083
- // that.closePointPoup();
59084
- that.openPointPoup("1002", "AAA");
59085
- // that.removePointAll();
59086
- //that.clearPointByIdCustom();
59087
- }, Cesium.ScreenSpaceEventType.RIGHT_CLICK);
59192
+ drawPointWithPoup(data, showPoup = false, idCustom = "geocode", isLocation = true) {
59193
+ const that = this;
59194
+ let scene = this._viewer.scene;
59195
+ if (showPoup) {
59196
+ if (!this.geocodeSelected) {
59197
+ this.geocodeSelected = [];
59198
+ }
59199
+
59200
+ if (!this._handler) {
59201
+ // 注册点击事件
59202
+ let scene = this._viewer.scene;
59203
+ this._handler = new Cesium.ScreenSpaceEventHandler(scene.canvas);
59204
+ // let that = this;
59205
+ this._handler.setInputAction(function (movement) {
59206
+ var pickedObject = scene.pick(movement.position);
59207
+ if (pickedObject && pickedObject.id && pickedObject.id instanceof Cesium.Entity) {
59208
+ let entity = pickedObject.id;
59209
+ that.createPointPoup(entity);
59210
+ }
59211
+ }, Cesium.ScreenSpaceEventType.LEFT_CLICK);
59212
+ this._handler.setInputAction(function (movement) {
59213
+ // that.closePointPoup();
59214
+ that.openPointPoup("1002", "AAA");
59215
+ // that.removePointAll();
59216
+ //that.clearPointByIdCustom();
59217
+ }, Cesium.ScreenSpaceEventType.RIGHT_CLICK);
59218
+ this._handler.setInputAction(function (movement) {
59219
+ const pickedObject = scene.pick(movement.endPosition);
59220
+ if (Cesium.defined(pickedObject) && pickedObject.id && pickedObject.id instanceof Cesium.Entity) {
59221
+ that.geocodeSelected = [pickedObject.id];
59222
+ pickedObject.id.billboard.image = pickedObject.id.properties.image1;
59223
+ } else {
59224
+ if (that.geocodeSelected && that.geocodeSelected.length > 0) {
59225
+ that.geocodeSelected[0].billboard.image = that.geocodeSelected[0].properties.image;
59226
+ }
59227
+ }
59228
+ }, Cesium.ScreenSpaceEventType.MOUSE_MOVE);
59229
+ }
59088
59230
  }
59231
+
59089
59232
  let pointDs = this._viewer.dataSources.getByName(idCustom);
59090
59233
  if (pointDs.length === 0) {
59091
59234
  pointDs = new Cesium.CustomDataSource(idCustom);
@@ -59094,28 +59237,52 @@ class DrawManager {
59094
59237
  } else {
59095
59238
  pointDs = pointDs[0];
59096
59239
  }
59097
- let position = Cesium.Cartesian3.fromDegrees(data.lat, data.lon);
59240
+ let position = Cesium.Cartesian3.fromDegrees(data.lon, data.lat);
59098
59241
  pointDs.entities.add({
59099
59242
  position: position,
59100
59243
  billboard: {
59101
59244
  image: data.image,
59245
+ image1: data.image1,
59102
59246
  width: data.width,
59103
59247
  height: data.height,
59104
59248
  verticalOrigin: Cesium.VerticalOrigin.BOTTOM
59105
- }
59106
- // properties: data
59249
+ },
59250
+ properties: data
59107
59251
  });
59252
+ // 是否定位
59253
+ if (isLocation) {
59254
+ let offset = new Cesium.HeadingPitchRange(0, Cesium.Math.toRadians(-90), 0);
59255
+ that._viewer.flyTo(pointDs, { duration: 1.5, offset });
59256
+ }
59108
59257
  }
59109
59258
 
59110
59259
  // 通过entity创建关联气泡
59111
59260
  createPointPoup(entity) {
59112
59261
  if (this._htmlTag) this._htmlTag.destroy();
59262
+ const id = entity.properties.id._value;
59263
+ const comp = id.component;
59264
+
59265
+ let popHtml = `<div class='kq-label-popup' style='background-color:var(--kq-bg-color); border-radius: 8px; padding: 10px;'>
59266
+ <div id='tag_vue_${id.id}'></div>
59267
+ <span class='triangle' ></span>
59268
+ <a class='close' style='color: #757575' href="javascript:void(0)" onclick="document.getElementsByClassName('kq-label-popup')[0].style.display='none';"><span>×</span></a>
59269
+ </div>`;
59113
59270
  this._htmlTag = new Cesium.Kq3dHtmlTag(this._viewer, {
59114
- html: "<div>" + entity.properties.id._value + "</div>",
59271
+ // html: "<div>" + entity.properties.id._value + "</div>",
59272
+ html: popHtml,
59115
59273
  position: entity.position,
59116
- anchor: [0, -entity.properties.height._value],
59117
- alignmentMode: 7
59274
+ anchor: [0, -entity.properties.height._value - 4],
59275
+ alignmentMode: 7,
59276
+ noEvent: false
59118
59277
  });
59278
+ if (comp) {
59279
+ const pop = id.createVNode(id.component, id.componentProps);
59280
+ // 传入外部vue的appContext到createVNode创建的vue组件对象中
59281
+ if (id.appContext) pop.appContext = id.appContext;
59282
+ setTimeout(() => {
59283
+ id.render(pop, document.getElementById("tag_vue_" + id.id));
59284
+ }, 0);
59285
+ }
59119
59286
  }
59120
59287
 
59121
59288
  // 通过id打开地理编码图标气泡
@@ -60851,7 +61018,8 @@ class LayerManager {
60851
61018
  let that = this;
60852
61019
  this._layerListData.forEach(layer => {
60853
61020
  if (layer.visible) {
60854
- layers_checked.push(layer);
61021
+ // layers_checked.push(layer);
61022
+ layers_checked.unshift(layer);
60855
61023
  }
60856
61024
  }, this);
60857
61025
  const layers_old = this._layerListData_old;
@@ -73806,7 +73974,8 @@ class WindySlicingViewModel {
73806
73974
  attrRange: [ranges[0], ranges[ranges.length - 1]],
73807
73975
  varName: this._windySlicingLayerconfig?.params?.varNames,
73808
73976
  };
73809
- return new Cesium.Kq3dGridVolumeProvider(Object.assign({}, this._currentVolumeOption, params || {}));
73977
+ Object.assign(this._currentVolumeOption, params || {})
73978
+ return new Cesium.Kq3dGridVolumeProvider(this._currentVolumeOption);
73810
73979
  }
73811
73980
  /**
73812
73981
  * 创建线剖切
@@ -74367,6 +74536,7 @@ function formatTooltip(val) {
74367
74536
  }
74368
74537
  // 销毁
74369
74538
  (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.onBeforeUnmount)(() => {
74539
+ global_event_default().off("windyTypeChange", handleWindyTypeChange);
74370
74540
  viewModel && viewModel.destroy();
74371
74541
  });
74372
74542
 
@@ -75648,22 +75818,6 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__7997__;
75648
75818
  "use strict";
75649
75819
  module.exports = __WEBPACK_EXTERNAL_MODULE__1895__;
75650
75820
 
75651
- /***/ }),
75652
-
75653
- /***/ 6838:
75654
- /***/ (function(module) {
75655
-
75656
- "use strict";
75657
- module.exports = __WEBPACK_EXTERNAL_MODULE__6838__;
75658
-
75659
- /***/ }),
75660
-
75661
- /***/ 7747:
75662
- /***/ (function(module) {
75663
-
75664
- "use strict";
75665
- module.exports = __WEBPACK_EXTERNAL_MODULE__7747__;
75666
-
75667
75821
  /***/ })
75668
75822
 
75669
75823
  /******/ });