@kq_npm/client3d_webgl_vue 4.5.4-beta → 4.5.6-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.
package/index.js CHANGED
@@ -11329,9 +11329,9 @@ function delTreeDataByGuid(data, guid) {
11329
11329
 
11330
11330
 
11331
11331
 
11332
- /*
11333
- * Copyright (C) 2019 KQ GEO Technologies Co., Ltd.
11334
- * All rights reserved.
11332
+ /*
11333
+ * Copyright (C) 2019 KQ GEO Technologies Co., Ltd.
11334
+ * All rights reserved.
11335
11335
  */
11336
11336
  //SceneView逻辑类
11337
11337
 
@@ -11395,8 +11395,23 @@ class SceneViewViewModel extends (mitt_default()) {
11395
11395
  this._viewer.bottomContainer.children[0].style.display = "none";
11396
11396
  }
11397
11397
  // this._viewer.scene.globe.depthTestAgainstTerrain = true;
11398
- this.initManagerClass();
11399
11398
 
11399
+ // 模型开挖分析对象
11400
+ let that = this;
11401
+ let kq3dFlattenning = new window.Cesium.Kq3dFlattenning(this._viewer, {});
11402
+ this.g_flattenedPolygonTexture = kq3dFlattenning.createFlattenedPolygonTexture();
11403
+ // 模型开挖设置
11404
+ this._viewer.scene.primitives.primitiveAdded.addEventListener(function (result) {
11405
+ that.g_flattenedPolygonTexture && that.g_flattenedPolygonTexture.detachAllTileset();
11406
+ var models = that._viewer.scene.primitives._primitives;
11407
+ for (let i = 0; i < models.length; i++) {
11408
+ if (models[i] instanceof Cesium.Cesium3DTileset && models[i]._url) {
11409
+ models[i].enableFlattenning = true;
11410
+ that.g_flattenedPolygonTexture.attachTileset(models[i]);
11411
+ }
11412
+ }
11413
+ });
11414
+ this.initManagerClass();
11400
11415
  // 添加模型淹没分析对象, 淹没分析组件使用
11401
11416
  this._floodModelAnalysis = new Cesium.Kq3dFloodModelAnalysis({
11402
11417
  viewer: this._viewer
@@ -12595,6 +12610,7 @@ const _hoisted_27 = {
12595
12610
 
12596
12611
 
12597
12612
 
12613
+
12598
12614
  const ClientPrintvue_type_script_setup_true_lang_js_default_ = {
12599
12615
  name: "Kq3dClientPrint"
12600
12616
  };
@@ -12648,6 +12664,11 @@ const ClientPrintvue_type_script_setup_true_lang_js_default_ = {
12648
12664
  showLogo: {
12649
12665
  type: Boolean,
12650
12666
  default: false
12667
+ },
12668
+ // 是否使用自定义地图数据
12669
+ useCustomData: {
12670
+ type: Boolean,
12671
+ default: false
12651
12672
  }
12652
12673
  },
12653
12674
  setup(__props, {
@@ -12662,7 +12683,7 @@ const ClientPrintvue_type_script_setup_true_lang_js_default_ = {
12662
12683
  (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.watch)(() => locale.value, (newVal, oldVal) => {
12663
12684
  language.value = messages.value[newVal]["webgl"];
12664
12685
  companyName.value = props.companyName || language.value.comapanyname;
12665
- systemTime.value = newVal == 'zh' ? getSystemIime() : getSystemEnTime();
12686
+ systemTime.value = newVal == "zh" ? getSystemIime() : getSystemEnTime();
12666
12687
  printObj.value.popTitle = language.value.print;
12667
12688
  });
12668
12689
  const props = __props;
@@ -12772,7 +12793,7 @@ const ClientPrintvue_type_script_setup_true_lang_js_default_ = {
12772
12793
  // 图例窗口显示与隐藏
12773
12794
  let legendShow = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(false);
12774
12795
  // 比例尺显示与隐藏
12775
- let scalesShow = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(false);
12796
+ let scalesShow = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(true);
12776
12797
  // 指北针的显示与隐藏
12777
12798
  let compassShow = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(false);
12778
12799
  let isActive = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(0);
@@ -12801,14 +12822,34 @@ const ClientPrintvue_type_script_setup_true_lang_js_default_ = {
12801
12822
  printState.value = false;
12802
12823
  }
12803
12824
  });
12825
+ let showMap = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(false);
12826
+ let formItem = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.reactive)({
12827
+ options: props && props.options || {},
12828
+ service: props && props.service,
12829
+ scenceInfo: props && props.scenceInfo,
12830
+ defaultShowLayerNames: props && props.defaultShowLayerNames,
12831
+ showToolButtons: props && props.showToolButtons,
12832
+ toolButtonsPosition: props && props.toolButtonsPosition,
12833
+ showLogo: props && props.showLogo
12834
+ });
12804
12835
  let currentClick = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.reactive)({});
12805
12836
  let scaleFloor = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(1);
12806
12837
  let scaleStep = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(0.2);
12807
12838
  // 查询进度条
12808
12839
  let loadState = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(false);
12809
12840
  // 三维球id
12810
- global_event_default().setDefaultMapInfo("scencePrint", "cesium", null);
12841
+ global_event_default().setWebMap("scencePrint", "cesium", null);
12811
12842
  (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.onMounted)(() => {
12843
+ if (!props.useCustomData) {
12844
+ global_event_default().getWebMapByMapTarget(props.mapTarget, scenceView => {
12845
+ if (scenceView && scenceView._viewer) {
12846
+ formItem = scenceView._props;
12847
+ showMap.value = true;
12848
+ }
12849
+ });
12850
+ } else {
12851
+ showMap.value = true;
12852
+ }
12812
12853
  setTitleDataform.value.data.title = props.printTitle || language.value.oneimage;
12813
12854
  papAnchor.value = "portrait";
12814
12855
  borderStyleValue.value = "printborder1";
@@ -13371,10 +13412,7 @@ const ClientPrintvue_type_script_setup_true_lang_js_default_ = {
13371
13412
  const _component_kq_layer_tree = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.resolveComponent)("kq-layer-tree");
13372
13413
  const _component_kq_input = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.resolveComponent)("kq-input");
13373
13414
  const _component_kq_color_picker = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.resolveComponent)("kq-color-picker");
13374
- const _component_kq3d_status_bar = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.resolveComponent)("kq3d-status-bar");
13375
13415
  const _component_kq_legend = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.resolveComponent)("kq-legend");
13376
- const _component_kq3d_compass = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.resolveComponent)("kq3d-compass");
13377
- const _component_kq_scene_view = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.resolveComponent)("kq-scene-view");
13378
13416
  const _component_kq_scrollbar = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.resolveComponent)("kq-scrollbar");
13379
13417
  return (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.openBlock)(), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementBlock)("div", ClientPrintvue_type_script_setup_true_lang_js_hoisted_1, [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("div", {
13380
13418
  class: "settleLayer",
@@ -13992,20 +14030,21 @@ const ClientPrintvue_type_script_setup_true_lang_js_default_ = {
13992
14030
  ref: printContentDiv
13993
14031
  }, [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("div", _hoisted_21, [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("img", {
13994
14032
  src: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(scenceImageUrl)
13995
- }, null, 8 /* PROPS */, _hoisted_22)]), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_scene_view, {
13996
- target: 'scencePrint',
13997
- options: __props.options,
13998
- service: __props.service,
13999
- scenceInfo: __props.scenceInfo,
14000
- showToolButtons: __props.showToolButtons,
14001
- defaultShowLayerNames: __props.defaultShowLayerNames,
14002
- toolButtonsPosition: __props.toolButtonsPosition,
14003
- showLogo: __props.showLogo,
14033
+ }, null, 8 /* PROPS */, _hoisted_22)]), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(showMap) ? ((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)(SceneView), {
14034
+ key: 0,
14035
+ target: "scencePrint",
14036
+ options: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(formItem).options,
14037
+ service: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(formItem).service,
14038
+ scenceInfo: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(formItem).scenceInfo,
14039
+ showToolButtons: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(formItem).showToolButtons,
14040
+ defaultShowLayerNames: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(formItem).defaultShowLayerNames,
14041
+ toolButtonsPosition: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(formItem).toolButtonsPosition,
14042
+ showLogo: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(formItem).showLogo,
14004
14043
  style: {
14005
14044
  "position": "relative"
14006
14045
  }
14007
14046
  }, {
14008
- default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withCtx)(() => [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(scalesShow) ? ((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.openBlock)(), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createBlock)(_component_kq3d_status_bar, {
14047
+ default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withCtx)(() => [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(scalesShow) && (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(showMap) ? ((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)(StatusBar), {
14009
14048
  key: 0
14010
14049
  })) : (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createCommentVNode)("v-if", true), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createCommentVNode)("图例"), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("div", {
14011
14050
  class: "kq3d-client-print-legendDiv",
@@ -14022,7 +14061,7 @@ const ClientPrintvue_type_script_setup_true_lang_js_default_ = {
14022
14061
  onMouseover: setdragCursor,
14023
14062
  onMousedown: dragTl,
14024
14063
  id: "divcompassDiv"
14025
- }, [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq3d_compass)], 544 /* NEED_HYDRATION, NEED_PATCH */), [[external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.vShow, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(compassShow)]]), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createCommentVNode)(" 文本标注 "), ((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)(setLabelData).value, item => {
14064
+ }, [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(Compass))], 544 /* NEED_HYDRATION, NEED_PATCH */), [[external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.vShow, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(compassShow)]]), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createCommentVNode)(" 文本标注 "), ((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)(setLabelData).value, item => {
14026
14065
  return (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withDirectives)(((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.openBlock)(), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementBlock)("div", {
14027
14066
  id: item.data.dataId,
14028
14067
  key: item.data.dataId,
@@ -14053,7 +14092,7 @@ const ClientPrintvue_type_script_setup_true_lang_js_default_ = {
14053
14092
  }, 8 /* PROPS */, ["title"])], 8 /* PROPS */, _hoisted_24)], 40 /* PROPS, NEED_HYDRATION */, _hoisted_23)), [[external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.vShow, item.data.isShow]]);
14054
14093
  }), 128 /* KEYED_FRAGMENT */))]),
14055
14094
  _: 1 /* STABLE */
14056
- }, 8 /* PROPS */, ["options", "service", "scenceInfo", "showToolButtons", "defaultShowLayerNames", "toolButtonsPosition", "showLogo"])], 512 /* NEED_PATCH */), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("div", _hoisted_25, [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("div", _hoisted_26, [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("span", null, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toDisplayString)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(language).printcompany) + ":" + (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toDisplayString)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(companyName)), 1 /* TEXT */)]), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("div", _hoisted_27, [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("span", null, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toDisplayString)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(language).printdate) + ":" + (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toDisplayString)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(systemTime)), 1 /* TEXT */)])])], 512 /* NEED_PATCH */)]),
14095
+ }, 8 /* PROPS */, ["options", "service", "scenceInfo", "showToolButtons", "defaultShowLayerNames", "toolButtonsPosition", "showLogo"])) : (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createCommentVNode)("v-if", true)], 512 /* NEED_PATCH */), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("div", _hoisted_25, [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("div", _hoisted_26, [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("span", null, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toDisplayString)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(language).printcompany) + ":" + (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toDisplayString)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(companyName)), 1 /* TEXT */)]), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("div", _hoisted_27, [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("span", null, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toDisplayString)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(language).printdate) + ":" + (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toDisplayString)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(systemTime)), 1 /* TEXT */)])])], 512 /* NEED_PATCH */)]),
14057
14096
  _: 1 /* STABLE */
14058
14097
  })], 512 /* NEED_PATCH */)], 512 /* NEED_PATCH */);
14059
14098
  };
@@ -15059,7 +15098,7 @@ const Measurevue_type_script_setup_true_lang_js_default_ = {
15059
15098
  if (mode.value === "ground") {
15060
15099
  if (!viewModel.checkTerrainAdded()) {
15061
15100
  message({
15062
- message: "请先加载地形!",
15101
+ message: language.value["measuretAddTerrainTips"],
15063
15102
  type: "warning"
15064
15103
  });
15065
15104
  return;
@@ -15068,7 +15107,7 @@ const Measurevue_type_script_setup_true_lang_js_default_ = {
15068
15107
  if (mode.value === "model") {
15069
15108
  if (!viewModel.checkModelAdded()) {
15070
15109
  message({
15071
- message: "请先加载模型!",
15110
+ message: language.value["measuretAddModelTips"],
15072
15111
  type: "warning"
15073
15112
  });
15074
15113
  return;
@@ -15794,7 +15833,7 @@ const Flightvue_type_script_setup_true_lang_js_default_ = {
15794
15833
  function save() {
15795
15834
  if (pathName.value === "") {
15796
15835
  message({
15797
- message: "请输入路径名称!",
15836
+ message: language.value["enterPathName"] + "!",
15798
15837
  type: "warning"
15799
15838
  });
15800
15839
  } else {
@@ -16220,15 +16259,13 @@ var external_xe_utils_default = /*#__PURE__*/__webpack_require__.n(external_xe_u
16220
16259
  ;// CONCATENATED MODULE: ./src/webgl/gpuspatialquery/GPUSpatialQueryViewModel.js
16221
16260
 
16222
16261
 
16223
- /*
16224
- * Copyright (C) 2019 KQ GEO Technologies Co., Ltd.
16225
- * All rights reserved.
16262
+ /*
16263
+ * Copyright (C) 2019 KQ GEO Technologies Co., Ltd.
16264
+ * All rights reserved.
16226
16265
  */
16227
16266
  //GPU空间查询逻辑类
16228
16267
 
16229
16268
  class GPUSpatialQueryViewModel {
16230
- //绘制完成监听事件
16231
-
16232
16269
  constructor(scenceView, options) {
16233
16270
  _defineProperty(this, "_gpuSpatialQuery", null);
16234
16271
  //GPU查询三维对象
@@ -16243,6 +16280,9 @@ class GPUSpatialQueryViewModel {
16243
16280
  _defineProperty(this, "finishedQuery", null);
16244
16281
  //绘制后的查询事件
16245
16282
  _defineProperty(this, "_removeEventListener", null);
16283
+ //绘制完成监听事件
16284
+ _defineProperty(this, "_language", {});
16285
+ this._language = scenceView._language;
16246
16286
  options.viewer = scenceView._viewer;
16247
16287
  options.viewer.scene.globe.depthTestAgainstTerrain = true;
16248
16288
  options.viewer.scene.logarithmicDepthBuffer = true;
@@ -16321,7 +16361,7 @@ class GPUSpatialQueryViewModel {
16321
16361
  });
16322
16362
  } else {
16323
16363
  message({
16324
- message: "请添加模型后分析!",
16364
+ message: this._language["addModelAnalysisTips"],
16325
16365
  type: "warning"
16326
16366
  });
16327
16367
  }
@@ -16996,15 +17036,13 @@ GPUSpatialQuery.install = (Vue, opts) => {
16996
17036
 
16997
17037
 
16998
17038
 
16999
- /*
17000
- * Copyright (C) 2019 KQ GEO Technologies Co., Ltd.
17001
- * All rights reserved.
17039
+ /*
17040
+ * Copyright (C) 2019 KQ GEO Technologies Co., Ltd.
17041
+ * All rights reserved.
17002
17042
  */
17003
17043
  //模型拾取逻辑类
17004
17044
 
17005
17045
  class ModelSelectViewModel {
17006
- // 模型属性匹配字段
17007
-
17008
17046
  constructor(scenceView, pickCallFunc) {
17009
17047
  _defineProperty(this, "_viewer", null);
17010
17048
  //三维viewer对象
@@ -17019,6 +17057,9 @@ class ModelSelectViewModel {
17019
17057
  _defineProperty(this, "_modeFiledArray", null);
17020
17058
  // 模型属性唯一值字段集合
17021
17059
  _defineProperty(this, "_modeFiled", "id");
17060
+ // 模型属性匹配字段
17061
+ _defineProperty(this, "_language", {});
17062
+ this._language = scenceView._language;
17022
17063
  this._viewer = scenceView._viewer;
17023
17064
  this._drawManager = scenceView._drawManager;
17024
17065
  this._handler = new Cesium.ScreenSpaceEventHandler(this._viewer.scene.canvas);
@@ -17083,7 +17124,7 @@ class ModelSelectViewModel {
17083
17124
  this._isPick = true;
17084
17125
  } else {
17085
17126
  message({
17086
- message: "请添加模型后拾取!",
17127
+ message: this._language["addModelAnalysisTips"],
17087
17128
  type: "warning"
17088
17129
  });
17089
17130
  }
@@ -18702,9 +18743,9 @@ LimitHeightAnalysis.install = (Vue, opts) => {
18702
18743
  ;// CONCATENATED MODULE: ./src/webgl/terrainprofileanalysis/TerrainProfileAnalysisViewModel.js
18703
18744
 
18704
18745
 
18705
- /*
18706
- * Copyright (C) 2019 KQ GEO Technologies Co., Ltd.
18707
- * All rights reserved.
18746
+ /*
18747
+ * Copyright (C) 2019 KQ GEO Technologies Co., Ltd.
18748
+ * All rights reserved.
18708
18749
  */
18709
18750
 
18710
18751
  class TerrainProfileAnalysisViewModel {
@@ -18723,7 +18764,9 @@ class TerrainProfileAnalysisViewModel {
18723
18764
  _defineProperty(this, "distance", null);
18724
18765
  _defineProperty(this, "divPointArr", []);
18725
18766
  _defineProperty(this, "languageDta", {});
18767
+ _defineProperty(this, "_language", {});
18726
18768
  _defineProperty(this, "coordDivpoint", null);
18769
+ this._language = scenceView._language;
18727
18770
  this._viewer = scenceView._viewer;
18728
18771
  this._drawManager = scenceView._drawManager;
18729
18772
  this._analyseHeight = option.analyseHeight;
@@ -18839,13 +18882,13 @@ class TerrainProfileAnalysisViewModel {
18839
18882
  });
18840
18883
  } else {
18841
18884
  message({
18842
- message: "只支持STK类型的地形分析!",
18885
+ message: this._language["stkTerrainAnalysisTips"],
18843
18886
  type: "warning"
18844
18887
  });
18845
18888
  }
18846
18889
  } else {
18847
18890
  message({
18848
- message: "请加载地形后分析!",
18891
+ message: this._language["terrainAnalysisTips"],
18849
18892
  type: "warning"
18850
18893
  });
18851
18894
  }
@@ -19727,6 +19770,8 @@ class SceneAdvancedToImageViewModel {
19727
19770
  _defineProperty(this, "_removeEventListener", null);
19728
19771
  //绘制完成监听事件
19729
19772
  _defineProperty(this, "_satellitePyramidPrimitive", null);
19773
+ _defineProperty(this, "_language", {});
19774
+ this._language = scenceView._language;
19730
19775
  this._viewer = scenceView._viewer;
19731
19776
  this._options = options;
19732
19777
  this._drawManager = scenceView._drawManager;
@@ -19775,13 +19820,13 @@ class SceneAdvancedToImageViewModel {
19775
19820
  }, 1000);
19776
19821
  } catch (error) {
19777
19822
  message({
19778
- message: "出图异常!",
19823
+ message: this._language["toImageErrorTips"],
19779
19824
  type: "error"
19780
19825
  });
19781
19826
  }
19782
19827
  } else {
19783
19828
  message({
19784
- message: "请先绘制视椎体!",
19829
+ message: this._language["toImageCentrumOpticusTips"],
19785
19830
  type: "warning"
19786
19831
  });
19787
19832
  }
@@ -20500,9 +20545,9 @@ SceneAdvancedToImage.install = (Vue, opts) => {
20500
20545
  ;// CONCATENATED MODULE: ./src/webgl/scaneffect/ScanEffectViewModel.js
20501
20546
 
20502
20547
 
20503
- /*
20504
- * Copyright (C) 2019 KQ GEO Technologies Co., Ltd.
20505
- * All rights reserved.
20548
+ /*
20549
+ * Copyright (C) 2019 KQ GEO Technologies Co., Ltd.
20550
+ * All rights reserved.
20506
20551
  */
20507
20552
 
20508
20553
 
@@ -20916,7 +20961,7 @@ class ScanEffectViewModel {
20916
20961
  }
20917
20962
  } else {
20918
20963
  message({
20919
- message: "请添加模型后提取!",
20964
+ message: this._language["addModelExtractionTips"],
20920
20965
  type: "warning"
20921
20966
  });
20922
20967
  }
@@ -21696,9 +21741,9 @@ var web_url_search_params_has_js_ = __webpack_require__(168);
21696
21741
  var web_url_search_params_size_js_ = __webpack_require__(217);
21697
21742
  ;// CONCATENATED MODULE: ./src/webgl/heatmap3d/Heatmap3dViewModel.js
21698
21743
 
21699
- /*
21700
- * Copyright (C) 2019 KQ GEO Technologies Co., Ltd.
21701
- * All rights reserved.
21744
+ /*
21745
+ * Copyright (C) 2019 KQ GEO Technologies Co., Ltd.
21746
+ * All rights reserved.
21702
21747
  */
21703
21748
  //热力图
21704
21749
 
@@ -21758,7 +21803,7 @@ class Heatmap3dViewModel {
21758
21803
  lat: lat
21759
21804
  }));
21760
21805
  }
21761
- (0,util_.setInnerHtml)(document.getElementById('mouse_lonlat'), `<p>${that.language['longitude'] || "经度"}:${lon.toFixed(5)}</p><p>${that.language['latitude'] || "纬度"}:${lat.toFixed(5)}</p><p>${that.language['heatValue'] || "热力值"}:${val}</p>`);
21806
+ (0,util_.setInnerHtml)(document.getElementById('mouse_lonlat'), `<p>${that.language['longitude'] || "longitude"}:${lon.toFixed(5)}</p><p>${that.language['latitude'] || "latitude"}:${lat.toFixed(5)}</p><p>${that.language['heatValue'] || "value"}:${val}</p>`);
21762
21807
  that._mouseLabel.setVisible(true);
21763
21808
  } else {
21764
21809
  that._mouseLabel.setVisible(false);
@@ -23179,6 +23224,7 @@ class ModelExcavateViewModel {
23179
23224
  _defineProperty(this, "_wallPrimitive", void 0);
23180
23225
  //Kq3dWallPrimitive
23181
23226
  _defineProperty(this, "entity0", null);
23227
+ _defineProperty(this, "_language", {});
23182
23228
  _defineProperty(this, "wall", null);
23183
23229
  _defineProperty(this, "ratio", 0.01);
23184
23230
  _defineProperty(this, "ii", 1);
@@ -23190,21 +23236,25 @@ class ModelExcavateViewModel {
23190
23236
  _defineProperty(this, "scratchCartesian7", new window.Cesium.Cartesian3());
23191
23237
  _defineProperty(this, "intervalId", null);
23192
23238
  _defineProperty(this, "g_flattenedPolygonTexture", null);
23239
+ this._language = scenceView._language;
23193
23240
  this._viewer = scenceView._viewer;
23194
23241
  this._options = options;
23195
23242
  this._viewer.scene.globe.depthTestAgainstTerrain = true; //开启深度检测
23196
-
23197
- let kq3dFlattenning = new window.Cesium.Kq3dFlattenning(this._viewer, {});
23198
- this.g_flattenedPolygonTexture = kq3dFlattenning.createFlattenedPolygonTexture();
23199
23243
  var that = this;
23200
- var models = this._viewer.scene.primitives._primitives;
23201
- for (let i = 0; i < models.length; i++) {
23202
- if (models[1] instanceof Cesium.Cesium3DTileset && models[i]._url) {
23203
- models[i].enableFlattenning = true;
23204
- models[i].flattenDiscard = true;
23205
- models[i].readyPromise.then(function (tileset) {
23206
- that.g_flattenedPolygonTexture.attachTileset(tileset);
23207
- });
23244
+ if (scenceView.g_flattenedPolygonTexture) {
23245
+ this.g_flattenedPolygonTexture = scenceView.g_flattenedPolygonTexture;
23246
+ } else {
23247
+ let kq3dFlattenning = new window.Cesium.Kq3dFlattenning(this._viewer, {});
23248
+ this.g_flattenedPolygonTexture = kq3dFlattenning.createFlattenedPolygonTexture();
23249
+ var models = this._viewer.scene.primitives._primitives;
23250
+ for (let i = 0; i < models.length; i++) {
23251
+ if (models[i] instanceof Cesium.Cesium3DTileset && models[i]._url) {
23252
+ models[i].enableFlattenning = true;
23253
+ models[i].flattenDiscard = true;
23254
+ models[i].readyPromise.then(function (tileset) {
23255
+ that.g_flattenedPolygonTexture.attachTileset(tileset);
23256
+ });
23257
+ }
23208
23258
  }
23209
23259
  }
23210
23260
  this._measureHandler = new Cesium.Kq3dMeasureHandler(this._viewer);
@@ -23337,8 +23387,8 @@ class ModelExcavateViewModel {
23337
23387
  var models = this._viewer.scene.primitives._primitives;
23338
23388
  for (let i = 0; i < models.length; i++) {
23339
23389
  if (models[i] instanceof Cesium.Cesium3DTileset && models[i]._url) {
23340
- // models[i].enableFlattenning = true;
23341
- // models[i].flattenDiscard = true;
23390
+ models[i].enableFlattenning = true;
23391
+ models[i].flattenDiscard = true;
23342
23392
  // models[i].readyPromise.then(function (tileset) {
23343
23393
  // that.g_flattenedPolygonTexture.attachTileset(tileset);
23344
23394
  // });
@@ -23350,7 +23400,7 @@ class ModelExcavateViewModel {
23350
23400
  this._measureHandler.startMeasure(Cesium.Kq3dMeasureMode.HorizontalArea);
23351
23401
  } else {
23352
23402
  message({
23353
- message: "请添加模型后绘制!",
23403
+ message: this._language["addModelTips"],
23354
23404
  type: "warning"
23355
23405
  });
23356
23406
  }
@@ -23389,8 +23439,8 @@ class ModelExcavateViewModel {
23389
23439
  //销毁
23390
23440
  destroy() {
23391
23441
  this.clear();
23392
- this.g_flattenedPolygonTexture && this.g_flattenedPolygonTexture.detachAllTileset();
23393
- this.g_flattenedPolygonTexture && this.g_flattenedPolygonTexture.destroy();
23442
+ // this.g_flattenedPolygonTexture && this.g_flattenedPolygonTexture.detachAllTileset();
23443
+ // this.g_flattenedPolygonTexture && this.g_flattenedPolygonTexture.destroy();
23394
23444
  this._measureHandler && this._measureHandler.destroy();
23395
23445
  this._measureHandler = null;
23396
23446
  }
@@ -23602,7 +23652,7 @@ const ModelExcavatevue_type_script_setup_true_lang_js_default_ = {
23602
23652
  }), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_row, {
23603
23653
  class: "kq3d-model-excavate-tip"
23604
23654
  }, {
23605
- 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 */)]),
23655
+ 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), 1 /* TEXT */)]),
23606
23656
  _: 1 /* STABLE */
23607
23657
  }), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("div", ModelExcavatevue_type_script_setup_true_lang_js_hoisted_3, [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_button, {
23608
23658
  onClick: _cache[5] || (_cache[5] = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withModifiers)($event => startOperation(), ["stop"])),
@@ -23648,9 +23698,9 @@ ModelExcavate.install = (Vue, opts) => {
23648
23698
 
23649
23699
 
23650
23700
 
23651
- /*
23652
- * Copyright (C) 2019 KQ GEO Technologies Co., Ltd.
23653
- * All rights reserved.
23701
+ /*
23702
+ * Copyright (C) 2019 KQ GEO Technologies Co., Ltd.
23703
+ * All rights reserved.
23654
23704
  */
23655
23705
  //模型拾取逻辑类
23656
23706
 
@@ -23664,32 +23714,54 @@ class ModelFlatViewModel {
23664
23714
  //全局参数
23665
23715
  _defineProperty(this, "_removeEventListener", null);
23666
23716
  //绘制完成监听事件
23717
+ _defineProperty(this, "_measureHandler", null);
23718
+ //测量三维对象
23719
+ _defineProperty(this, "_measureResult", null);
23720
+ //测量结果
23667
23721
  _defineProperty(this, "_flatteningPolygonTex", null);
23668
23722
  // 平整对象
23669
23723
  _defineProperty(this, "_assistPolygons", []);
23670
23724
  //平整辅助面数组
23671
23725
  _defineProperty(this, "currentFlatPolygonIndex", -1);
23726
+ _defineProperty(this, "_language", {});
23672
23727
  this._viewer = scenceView._viewer;
23673
23728
  this._options = viewModel;
23674
23729
  this._viewer.scene.globe.depthTestAgainstTerrain = true;
23730
+ this._language = scenceView._language;
23675
23731
  this._drawManager = scenceView._drawManager;
23676
23732
  //Create flattenning controller
23677
- let kq3dFlattening = new window.Cesium.Kq3dFlattenning(this._viewer, {});
23678
- //Create flattenedPolygonTexture
23679
- this._flatteningPolygonTex = kq3dFlattening.createFlattenedPolygonTexture();
23680
- var models = this._viewer.scene.primitives._primitives;
23681
- for (let i = 0; i < models.length; i++) {
23682
- if (models[i]._url) {
23683
- //Attach 3dTiles
23684
- this._flatteningPolygonTex.attachTileset(models[i]);
23733
+ var that = this;
23734
+ if (scenceView.g_flattenedPolygonTexture) {
23735
+ this._flatteningPolygonTex = scenceView.g_flattenedPolygonTexture;
23736
+ } else {
23737
+ let kq3dFlattenning = new window.Cesium.Kq3dFlattenning(this._viewer, {});
23738
+ this._flatteningPolygonTex = kq3dFlattenning.createFlattenedPolygonTexture();
23739
+ var models = this._viewer.scene.primitives._primitives;
23740
+ for (let i = 0; i < models.length; i++) {
23741
+ if (models[i] instanceof Cesium.Cesium3DTileset && models[i]._url) {
23742
+ that._flatteningPolygonTex.attachTileset(models[i]);
23743
+ }
23685
23744
  }
23686
23745
  }
23687
- let that = this;
23688
- this._removeEventListener = this._drawManager.drawFinishedEvent.addEventListener(shape => {
23689
- if (shape) {
23690
- that._options.positions = shape._controlPoints;
23691
- that.createFlat();
23692
- that._drawManager.clear();
23746
+ // this._removeEventListener = this._drawManager.drawFinishedEvent.addEventListener(shape => {
23747
+ // if (shape) {
23748
+ // that._options.positions = shape._controlPoints;
23749
+ // that.createFlat();
23750
+ // that._drawManager.clear();
23751
+ // }
23752
+ // });
23753
+ this._measureHandler = new Cesium.Kq3dMeasureHandler(this._viewer);
23754
+ this._measureHandler.measureEvent.addEventListener(function (result) {
23755
+ that._measureResult = result;
23756
+ result.measureResult.label.show = false;
23757
+ });
23758
+ this._measureHandler.activeEvent.addEventListener(function (ret) {
23759
+ if (ret == false) {
23760
+ if (that._measureResult) {
23761
+ that._options.positions = that._measureResult.positions;
23762
+ that.createFlat();
23763
+ that._measureResult.measureResult.destroy();
23764
+ }
23693
23765
  }
23694
23766
  });
23695
23767
  }
@@ -23708,7 +23780,7 @@ class ModelFlatViewModel {
23708
23780
  positions: this._options.positions,
23709
23781
  height: this._options.flatHeight
23710
23782
  });
23711
- this._flatteningPolygonTex.addFlattenedPolygon(myPolygon);
23783
+ this._flatteningPolygonTex && this._flatteningPolygonTex.addFlattenedPolygon(myPolygon);
23712
23784
  }
23713
23785
  // 获取平整数量
23714
23786
  getFlatCount() {
@@ -23720,18 +23792,18 @@ class ModelFlatViewModel {
23720
23792
  var flag = false;
23721
23793
  var models = this._viewer.scene.primitives._primitives;
23722
23794
  for (let i = 0; i < models.length; i++) {
23723
- if (models[i]._url) {
23795
+ if (models[i] instanceof Cesium.Cesium3DTileset && models[i]._url) {
23796
+ models[i].flattenDiscard = false;
23724
23797
  flag = true;
23725
23798
  }
23726
23799
  }
23727
23800
  if (flag) {
23728
- this.remove();
23729
- this._drawManager.startDraw("polygon", {
23730
- clampToGround: true
23731
- });
23801
+ this.remove(!this._options.showFlattenedPolygons);
23802
+ this._measureHandler.startMeasure(Cesium.Kq3dMeasureMode.HorizontalArea);
23803
+ // this._drawManager.startDraw("polygon", { clampToGround: true });
23732
23804
  } else {
23733
23805
  message({
23734
- message: "请添加模型后绘制!",
23806
+ message: this._language["addModelTips"],
23735
23807
  type: "warning"
23736
23808
  });
23737
23809
  }
@@ -23739,7 +23811,7 @@ class ModelFlatViewModel {
23739
23811
  // 切换高度重新计算
23740
23812
  setHeight(val) {
23741
23813
  this._options.flatHeight = Number(val);
23742
- if (this.currentFlatPolygonIndex === -1) {
23814
+ if (this.currentFlatPolygonIndex == -1) {
23743
23815
  this._flatteningPolygonTex.setFlattenedPolygonHeight(-1, Number(val));
23744
23816
  } else {
23745
23817
  this._flatteningPolygonTex.setFlattenedPolygonHeight(this.currentFlatPolygonIndex, Number(val));
@@ -23763,21 +23835,27 @@ class ModelFlatViewModel {
23763
23835
  this.currentFlatPolygonIndex = val;
23764
23836
  }
23765
23837
  // 清除绘制
23766
- remove() {
23838
+ remove(bool) {
23767
23839
  this._drawManager.stopDraw();
23840
+ if (bool) {
23841
+ this._flatteningPolygonTex && this._flatteningPolygonTex.removeAllFlattenedPolygon();
23842
+ for (var i = 0; i < this._assistPolygons.length; i++) {
23843
+ this._viewer.entities.remove(this._assistPolygons[i]);
23844
+ }
23845
+ this._assistPolygons = [];
23846
+ }
23768
23847
  }
23769
23848
  // 清除
23770
23849
  clear() {
23771
- this.remove();
23772
- this._flatteningPolygonTex.removeAllFlattenedPolygon();
23773
- for (var i = 0; i < this._assistPolygons.length; i++) {
23774
- this._viewer.entities.remove(this._assistPolygons[i]);
23775
- }
23776
- this._assistPolygons = [];
23850
+ this.remove(true);
23851
+ this._measureResult = null;
23852
+ this._measureHandler.clear();
23777
23853
  }
23778
23854
  //销毁
23779
23855
  destroy() {
23780
23856
  this.clear();
23857
+ this._measureHandler && this._measureHandler.destroy();
23858
+ this._measureHandler = null;
23781
23859
  }
23782
23860
  }
23783
23861
  ;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/dist/index.js??ruleSet[0]!./src/webgl/modelFlat/ModelFlat.vue?vue&type=script&setup=true&lang=js
@@ -23862,7 +23940,9 @@ const ModelFlatvue_type_script_setup_true_lang_js_default_ = {
23862
23940
  // 模型平整深度范围最小值
23863
23941
  maxFlatDepth: props.settingParams && props.settingParams.maxExcavationDepth || 100,
23864
23942
  // 模型平整深度范围最大值
23865
- flatteningShow: props.settingParams && props.settingParams.maxExcavationDepth || true // 压平面是否显示
23943
+ flatteningShow: props.settingParams && props.settingParams.maxExcavationDepth || true,
23944
+ // 压平面是否显示
23945
+ showFlattenedPolygons: props.settingParams && props.settingParams.showFlattenedPolygons || false // 是否显示多个压平面分析结果
23866
23946
  });
23867
23947
 
23868
23948
  // 组件容器Ref
@@ -23895,14 +23975,7 @@ const ModelFlatvue_type_script_setup_true_lang_js_default_ = {
23895
23975
  //父组件ScenceView初始化完成后执行
23896
23976
  gis_utils_.utils.getWebMap(null, scenceView => {
23897
23977
  if (scenceView) {
23898
- viewModel = new ModelFlatViewModel(scenceView, {
23899
- flatHeight: formItem.flatHeight,
23900
- flatteningShow: formItem.flatteningShow
23901
- });
23902
- setTimeout(() => {
23903
- setCurrentFlatPolygonIndex(0);
23904
- console.log(getFlatCount());
23905
- }, 1500);
23978
+ viewModel = new ModelFlatViewModel(scenceView, formItem);
23906
23979
  }
23907
23980
  });
23908
23981
  });
@@ -25194,9 +25267,9 @@ var esnext_iterator_map_js_ = __webpack_require__(224);
25194
25267
  ;// CONCATENATED MODULE: ./src/webgl/shadowanalysis/ShadowAnalysisViewModel.js
25195
25268
 
25196
25269
 
25197
- /*
25198
- * Copyright (C) 2019 KQ GEO Technologies Co., Ltd.
25199
- * All rights reserved.
25270
+ /*
25271
+ * Copyright (C) 2019 KQ GEO Technologies Co., Ltd.
25272
+ * All rights reserved.
25200
25273
  */
25201
25274
  // 分析逻辑类
25202
25275
 
@@ -25209,6 +25282,8 @@ class ShadowAnalysisViewModel {
25209
25282
  viewer: null,
25210
25283
  _drawManager: null
25211
25284
  });
25285
+ _defineProperty(this, "_language", {});
25286
+ this._language = scenceView._language;
25212
25287
  this._globaOptions.viewer = scenceView._viewer;
25213
25288
  this._globaOptions.viewModel = {
25214
25289
  viewer: this._globaOptions.viewer,
@@ -25276,7 +25351,7 @@ class ShadowAnalysisViewModel {
25276
25351
  });
25277
25352
  } else {
25278
25353
  message({
25279
- message: "请添加模型后分析!",
25354
+ message: this._language["addModelAnalysisTips"],
25280
25355
  type: "warning"
25281
25356
  });
25282
25357
  }
@@ -26778,9 +26853,9 @@ ModelProfileAnalysis.install = (Vue, opts) => {
26778
26853
 
26779
26854
  ;// CONCATENATED MODULE: ./src/webgl/skylineanalysis/SkylineAnalysisViewModel.js
26780
26855
 
26781
- /*
26782
- * Copyright (C) 2019 KQ GEO Technologies Co., Ltd.
26783
- * All rights reserved.
26856
+ /*
26857
+ * Copyright (C) 2019 KQ GEO Technologies Co., Ltd.
26858
+ * All rights reserved.
26784
26859
  */
26785
26860
  //天际线分析逻辑类
26786
26861
 
@@ -26805,6 +26880,8 @@ class SkylineAnalysisViewModel {
26805
26880
  _defineProperty(this, "_options", null);
26806
26881
  _defineProperty(this, "_showLimitHeightBody", null);
26807
26882
  _defineProperty(this, "_chartStyle", null);
26883
+ _defineProperty(this, "_language", {});
26884
+ this._language = scenceView._language;
26808
26885
  this._chartStyle = chartStyle;
26809
26886
  viewer.scene.globe.depthTestAgainstTerrain = true; //开启深度检测
26810
26887
  viewer.scene.postProcessStages._fxaa.enabled = true;
@@ -26850,7 +26927,7 @@ class SkylineAnalysisViewModel {
26850
26927
  this.setSkyline2D();
26851
26928
  } else {
26852
26929
  message({
26853
- message: "请添加模型后提取!",
26930
+ message: this._language["addModelExtractionTips"],
26854
26931
  type: "warning"
26855
26932
  });
26856
26933
  }
@@ -26878,7 +26955,7 @@ class SkylineAnalysisViewModel {
26878
26955
  this._skylineAnalysis.viewer.camera.moveBackward(1);
26879
26956
  } else {
26880
26957
  message({
26881
- message: "请添加模型后提取!",
26958
+ message: this._language["addModelExtractionTips"],
26882
26959
  type: "warning"
26883
26960
  });
26884
26961
  }
@@ -27508,15 +27585,14 @@ SkylineAnalysis.install = (Vue, opts) => {
27508
27585
 
27509
27586
 
27510
27587
 
27511
- /*
27512
- * Copyright (C) 2019 KQ GEO Technologies Co., Ltd.
27513
- * All rights reserved.
27588
+ /*
27589
+ * Copyright (C) 2019 KQ GEO Technologies Co., Ltd.
27590
+ * All rights reserved.
27514
27591
  */
27515
27592
 
27516
27593
  //地形淹没分析逻辑类
27517
27594
 
27518
27595
  class TerrainOperationViewModel {
27519
- //绘制完成监听事件
27520
27596
  constructor(scenceView, viewModel) {
27521
27597
  _defineProperty(this, "_terrainexcavationext", null);
27522
27598
  //地形开挖三维对象
@@ -27535,6 +27611,9 @@ class TerrainOperationViewModel {
27535
27611
  _defineProperty(this, "_smoothHeight", 2000);
27536
27612
  //平整高度
27537
27613
  _defineProperty(this, "_removeEventListener", null);
27614
+ //绘制完成监听事件
27615
+ _defineProperty(this, "_language", {});
27616
+ this._language = scenceView._language;
27538
27617
  this._globaOptions.viewer = scenceView._viewer;
27539
27618
  this._globaOptions.viewer.scene.logarithmicDepthBuffer = false;
27540
27619
  this._globaOptions.viewer.scene.globe.depthTestAgainstTerrain = true;
@@ -27640,13 +27719,13 @@ class TerrainOperationViewModel {
27640
27719
  });
27641
27720
  } else {
27642
27721
  message({
27643
- message: "只支持STK类型的地形分析!",
27722
+ message: this._language["stkTerrainAnalysisTips"],
27644
27723
  type: "warning"
27645
27724
  });
27646
27725
  }
27647
27726
  } else {
27648
27727
  message({
27649
- message: "请加载地形后分析!",
27728
+ message: this._language["terrainAnalysisTips"],
27650
27729
  type: "warning"
27651
27730
  });
27652
27731
  }
@@ -28047,15 +28126,13 @@ TerrainOperation.install = (Vue, opts) => {
28047
28126
  ;// CONCATENATED MODULE: ./src/webgl/excavatefillanalysis/ExcavateFillAnalysisViewModel.js
28048
28127
 
28049
28128
 
28050
- /*
28051
- * Copyright (C) 2019 KQ GEO Technologies Co., Ltd.
28052
- * All rights reserved.
28129
+ /*
28130
+ * Copyright (C) 2019 KQ GEO Technologies Co., Ltd.
28131
+ * All rights reserved.
28053
28132
  */
28054
28133
  //填挖方分析逻辑类
28055
28134
 
28056
28135
  class ExcavateFillAnalysisViewModel {
28057
- //绘制完成监听事件
28058
-
28059
28136
  constructor(scenceView, options, callback) {
28060
28137
  _defineProperty(this, "_excavateFillAnalysis", null);
28061
28138
  //填挖方分析三维对象
@@ -28064,6 +28141,9 @@ class ExcavateFillAnalysisViewModel {
28064
28141
  _defineProperty(this, "_options", null);
28065
28142
  //填挖方分析存储参数对象
28066
28143
  _defineProperty(this, "_removeEventListener", null);
28144
+ //绘制完成监听事件
28145
+ _defineProperty(this, "_language", {});
28146
+ this._language = scenceView._language;
28067
28147
  options.viewer = scenceView._viewer;
28068
28148
  options.viewer.scene.globe.depthTestAgainstTerrain = true;
28069
28149
  if (options.cutColor) {
@@ -28112,13 +28192,13 @@ class ExcavateFillAnalysisViewModel {
28112
28192
  });
28113
28193
  } else {
28114
28194
  message({
28115
- message: "只支持STK类型的地形分析!",
28195
+ message: this._language["stkTerrainAnalysisTips"],
28116
28196
  type: "warning"
28117
28197
  });
28118
28198
  }
28119
28199
  } else {
28120
28200
  message({
28121
- message: "请加载地形后分析!",
28201
+ message: this._language["terrainAnalysisTips"],
28122
28202
  type: "warning"
28123
28203
  });
28124
28204
  }
@@ -28564,9 +28644,9 @@ ExcavateFillAnalysis.install = (Vue, opts) => {
28564
28644
 
28565
28645
 
28566
28646
 
28567
- /*
28568
- * Copyright (C) 2019 KQ GEO Technologies Co., Ltd.
28569
- * All rights reserved.
28647
+ /*
28648
+ * Copyright (C) 2019 KQ GEO Technologies Co., Ltd.
28649
+ * All rights reserved.
28570
28650
  */
28571
28651
 
28572
28652
  //地形淹没分析逻辑类
@@ -28584,6 +28664,7 @@ class FloodAnalysisViewModel {
28584
28664
  //测量结果
28585
28665
  _defineProperty(this, "_mode", 0);
28586
28666
  //淹没模式
28667
+ _defineProperty(this, "_language", {});
28587
28668
  _defineProperty(this, "_colorImages", [
28588
28669
  //淹没纹理图片集合
28589
28670
  {
@@ -28596,6 +28677,7 @@ class FloodAnalysisViewModel {
28596
28677
  value: "2",
28597
28678
  src: const_image_.GREEN_TO_BLUE_URL
28598
28679
  }]);
28680
+ this._language = scenceView._language;
28599
28681
  this._mode = options.mode;
28600
28682
  options.viewer = scenceView._viewer;
28601
28683
  options.viewer.scene.globe.depthTestAgainstTerrain = true;
@@ -28662,13 +28744,13 @@ class FloodAnalysisViewModel {
28662
28744
  this._measureHandler.startMeasure(Cesium.Kq3dMeasureMode.HorizontalArea);
28663
28745
  } else {
28664
28746
  message({
28665
- message: "只支持STK类型的地形分析!",
28747
+ message: this._language["stkTerrainAnalysisTips"],
28666
28748
  type: "warning"
28667
28749
  });
28668
28750
  }
28669
28751
  } else {
28670
28752
  message({
28671
- message: "请加载地形后分析!",
28753
+ message: this._language["terrainAnalysisTips"],
28672
28754
  type: "warning"
28673
28755
  });
28674
28756
  }
@@ -28686,7 +28768,7 @@ class FloodAnalysisViewModel {
28686
28768
  this._measureHandler.startMeasure(Cesium.Kq3dMeasureMode.HorizontalArea);
28687
28769
  } else {
28688
28770
  message({
28689
- message: "请添加模型后分析!",
28771
+ message: this._language["addModelAnalysisTips"],
28690
28772
  type: "warning"
28691
28773
  });
28692
28774
  }
@@ -29323,9 +29405,9 @@ FloodAnalysis.install = (Vue, opts) => {
29323
29405
 
29324
29406
 
29325
29407
 
29326
- /*
29327
- * Copyright (C) 2019 KQ GEO Technologies Co., Ltd.
29328
- * All rights reserved.
29408
+ /*
29409
+ * Copyright (C) 2019 KQ GEO Technologies Co., Ltd.
29410
+ * All rights reserved.
29329
29411
  */
29330
29412
 
29331
29413
  // 分析逻辑类
@@ -29351,6 +29433,8 @@ class SlopeAnalysisViewModel {
29351
29433
  value: "2",
29352
29434
  src: const_image_.GREEN_TO_BLUE_URL
29353
29435
  }]);
29436
+ _defineProperty(this, "_language", {});
29437
+ this._language = scenceView._language;
29354
29438
  this._globaOptions.viewer = scenceView._viewer;
29355
29439
  this._globaOptions.viewModel = {
29356
29440
  fillStyle: viewModel.fillStyle,
@@ -29464,13 +29548,13 @@ class SlopeAnalysisViewModel {
29464
29548
  }
29465
29549
  } else {
29466
29550
  message({
29467
- message: "只支持STK类型的地形分析!",
29551
+ message: this._language["stkTerrainAnalysisTips"],
29468
29552
  type: "warning"
29469
29553
  });
29470
29554
  }
29471
29555
  } else {
29472
29556
  message({
29473
- message: "请加载地形后分析!",
29557
+ message: this._language["terrainAnalysisTips"],
29474
29558
  type: "warning"
29475
29559
  });
29476
29560
  }
@@ -30197,9 +30281,9 @@ SlopeAnalysis.install = (Vue, opts) => {
30197
30281
 
30198
30282
  ;// CONCATENATED MODULE: ./src/webgl/aspectanalysis/AspectAnalysisViewModel.js
30199
30283
 
30200
- /*
30201
- * Copyright (C) 2019 KQ GEO Technologies Co., Ltd.
30202
- * All rights reserved.
30284
+ /*
30285
+ * Copyright (C) 2019 KQ GEO Technologies Co., Ltd.
30286
+ * All rights reserved.
30203
30287
  */
30204
30288
  /**
30205
30289
  * 坡向逻辑类
@@ -30214,6 +30298,8 @@ class AspectAnalysisViewModel {
30214
30298
  viewer: null,
30215
30299
  _drawManager: null
30216
30300
  });
30301
+ _defineProperty(this, "_language", {});
30302
+ this._language = scenceView._language;
30217
30303
  this._globaOptions.viewer = scenceView._viewer;
30218
30304
  let options = {
30219
30305
  interval: aspect.interval || 500,
@@ -30249,13 +30335,13 @@ class AspectAnalysisViewModel {
30249
30335
  }
30250
30336
  } else {
30251
30337
  message({
30252
- message: "只支持STK类型的地形分析!",
30338
+ message: this._language["stkTerrainAnalysisTips"],
30253
30339
  type: "warning"
30254
30340
  });
30255
30341
  }
30256
30342
  } else {
30257
30343
  message({
30258
- message: "请加载地形后分析!",
30344
+ message: this._language["terrainAnalysisTips"],
30259
30345
  type: "warning"
30260
30346
  });
30261
30347
  }
@@ -30637,9 +30723,9 @@ AspectAnalysis.install = (Vue, opts) => {
30637
30723
 
30638
30724
 
30639
30725
 
30640
- /*
30641
- * Copyright (C) 2019 KQ GEO Technologies Co., Ltd.
30642
- * All rights reserved.
30726
+ /*
30727
+ * Copyright (C) 2019 KQ GEO Technologies Co., Ltd.
30728
+ * All rights reserved.
30643
30729
  */
30644
30730
 
30645
30731
  // 分析逻辑类
@@ -30655,6 +30741,7 @@ class SlopeAspectAnalysisViewModel {
30655
30741
  viewer: null,
30656
30742
  _drawManager: null
30657
30743
  });
30744
+ _defineProperty(this, "_language", {});
30658
30745
  _defineProperty(this, "_colorImages", [
30659
30746
  //渐变图片集合
30660
30747
  {
@@ -30667,6 +30754,7 @@ class SlopeAspectAnalysisViewModel {
30667
30754
  value: "2",
30668
30755
  src: const_image_.GREEN_TO_BLUE_URL
30669
30756
  }]);
30757
+ this._language = scenceView._language;
30670
30758
  this._globaOptions.viewer = scenceView._viewer;
30671
30759
  this._globaOptions.viewModel = {
30672
30760
  fillStyle: viewModel.fillStyle,
@@ -30774,17 +30862,18 @@ class SlopeAspectAnalysisViewModel {
30774
30862
  }
30775
30863
  } else {
30776
30864
  message({
30777
- message: "只支持STK类型的地形分析!",
30865
+ message: this._language["stkTerrainAnalysisTips"],
30778
30866
  type: "warning"
30779
30867
  });
30780
30868
  }
30781
30869
  } else {
30782
30870
  message({
30783
- message: "请加载地形后分析!",
30871
+ message: this._language["terrainAnalysisTips"],
30784
30872
  type: "warning"
30785
30873
  });
30786
30874
  }
30787
30875
  }
30876
+
30788
30877
  //修改填充样式
30789
30878
  changeFilltyle(key) {
30790
30879
  this._globaOptions.viewModel.fillStyle = key;
@@ -31657,16 +31746,14 @@ SlopeAspectAnalysis.install = (Vue, opts) => {
31657
31746
 
31658
31747
 
31659
31748
 
31660
- /*
31661
- * Copyright (C) 2019 KQ GEO Technologies Co., Ltd.
31662
- * All rights reserved.
31749
+ /*
31750
+ * Copyright (C) 2019 KQ GEO Technologies Co., Ltd.
31751
+ * All rights reserved.
31663
31752
  */
31664
31753
 
31665
31754
  //等值线分析逻辑类
31666
31755
 
31667
31756
  class IsolineAnalysisViewModel {
31668
- //等值线分析存储参数对象
31669
-
31670
31757
  constructor(scenceView, options) {
31671
31758
  _defineProperty(this, "_elevation", null);
31672
31759
  //等值线分析三维对象
@@ -31693,6 +31780,9 @@ class IsolineAnalysisViewModel {
31693
31780
  src: const_image_.GREEN_TO_BLUE_URL
31694
31781
  }]);
31695
31782
  _defineProperty(this, "_options", null);
31783
+ //等值线分析存储参数对象
31784
+ _defineProperty(this, "_language", {});
31785
+ this._language = scenceView._language;
31696
31786
  this._options = options;
31697
31787
  this._options.viewer = scenceView._viewer;
31698
31788
  this._options.viewer.scene.globe.depthTestAgainstTerrain = true;
@@ -31846,7 +31936,7 @@ class IsolineAnalysisViewModel {
31846
31936
  });
31847
31937
  } else {
31848
31938
  message({
31849
- message: "请添加地形后分析!",
31939
+ message: this._language["terrainAnalysisTips"],
31850
31940
  type: "warning"
31851
31941
  });
31852
31942
  }
@@ -33672,15 +33762,13 @@ IsolineAnalysis.install = (Vue, opts) => {
33672
33762
 
33673
33763
 
33674
33764
 
33675
- /*
33676
- * Copyright (C) 2019 KQ GEO Technologies Co., Ltd.
33677
- * All rights reserved.
33765
+ /*
33766
+ * Copyright (C) 2019 KQ GEO Technologies Co., Ltd.
33767
+ * All rights reserved.
33678
33768
  */
33679
33769
  //Box裁剪逻辑类
33680
33770
 
33681
33771
  class BoxClipViewModel {
33682
- //绘制完成监听事件
33683
-
33684
33772
  constructor(scenceView, options) {
33685
33773
  _defineProperty(this, "_viewer", null);
33686
33774
  //三维viewer对象
@@ -33711,6 +33799,9 @@ class BoxClipViewModel {
33711
33799
  _defineProperty(this, "_drawManager", null);
33712
33800
  //绘制管理对象
33713
33801
  _defineProperty(this, "_removeEventListener", null);
33802
+ //绘制完成监听事件
33803
+ _defineProperty(this, "_language", {});
33804
+ this._language = scenceView._language;
33714
33805
  this._options = Object.assign({}, options, this._defaultOptions);
33715
33806
  this._viewer = scenceView._viewer;
33716
33807
  // this._viewer.enabledFXAA = true;
@@ -33768,7 +33859,7 @@ class BoxClipViewModel {
33768
33859
  });
33769
33860
  } else {
33770
33861
  message({
33771
- message: "请添加模型后裁剪!",
33862
+ message: this._language["addModelClipTips"],
33772
33863
  type: "warning"
33773
33864
  });
33774
33865
  }
@@ -34542,15 +34633,13 @@ BoxClip.install = (Vue, opts) => {
34542
34633
 
34543
34634
 
34544
34635
 
34545
- /*
34546
- * Copyright (C) 2019 KQ GEO Technologies Co., Ltd.
34547
- * All rights reserved.
34636
+ /*
34637
+ * Copyright (C) 2019 KQ GEO Technologies Co., Ltd.
34638
+ * All rights reserved.
34548
34639
  */
34549
34640
  //平面裁剪逻辑类
34550
34641
 
34551
34642
  class PlaneClipViewModel {
34552
- //绘制完成事件监听
34553
-
34554
34643
  constructor(scenceView, options) {
34555
34644
  _defineProperty(this, "_viewer", null);
34556
34645
  //三维viewer对象
@@ -34585,10 +34674,13 @@ class PlaneClipViewModel {
34585
34674
  _defineProperty(this, "_drawManager", null);
34586
34675
  //绘制管理对象
34587
34676
  _defineProperty(this, "_removeEventListener", null);
34677
+ //绘制完成事件监听
34678
+ _defineProperty(this, "_language", {});
34588
34679
  this._options = Object.assign({}, options, this._defaultOptions);
34589
34680
  this._viewer = scenceView._viewer;
34590
34681
  // this._viewer.enabledFXAA = true;
34591
34682
  this._options.viewer = this._viewer;
34683
+ this._language = scenceView._language;
34592
34684
  this._drawManager = scenceView._drawManager;
34593
34685
  let that = this;
34594
34686
  this._removeEventListener = this._drawManager.drawFinishedEvent.addEventListener(shape => {
@@ -34641,7 +34733,7 @@ class PlaneClipViewModel {
34641
34733
  });
34642
34734
  } else {
34643
34735
  message({
34644
- message: "请添加模型后裁剪!",
34736
+ message: this._language["addModelAnalysisTips"],
34645
34737
  type: "warning"
34646
34738
  });
34647
34739
  }
@@ -44750,9 +44842,9 @@ Light.install = (Vue, opts) => {
44750
44842
 
44751
44843
 
44752
44844
 
44753
- /*
44754
- * Copyright (C) 2019 KQ GEO Technologies Co., Ltd.
44755
- * All rights reserved.
44845
+ /*
44846
+ * Copyright (C) 2019 KQ GEO Technologies Co., Ltd.
44847
+ * All rights reserved.
44756
44848
  */
44757
44849
  //地质体分析逻辑类
44758
44850
 
@@ -44765,6 +44857,8 @@ class GeologicalBodyAnalysisViewModel {
44765
44857
  _defineProperty(this, "_geologyBody", null);
44766
44858
  //地质体分析三维对象
44767
44859
  _defineProperty(this, "_measureHandler", null);
44860
+ _defineProperty(this, "_language", {});
44861
+ this._language = scenceView._language;
44768
44862
  this._options = options;
44769
44863
  this._viewer = scenceView._viewer;
44770
44864
  this._measureHandler = new Cesium.Kq3dMeasureHandler(scenceView._viewer);
@@ -44864,7 +44958,7 @@ class GeologicalBodyAnalysisViewModel {
44864
44958
  }
44865
44959
  } else {
44866
44960
  message({
44867
- message: "请添加地质体后分析!",
44961
+ message: this._language["addGeologyBodyTips"],
44868
44962
  type: "warning"
44869
44963
  });
44870
44964
  }
@@ -46567,9 +46661,9 @@ var _3rd_libs_shp = __webpack_require__(825);
46567
46661
  ;// CONCATENATED MODULE: external "dompurify"
46568
46662
  var external_dompurify_namespaceObject = require("dompurify");
46569
46663
  ;// CONCATENATED MODULE: ./src/common/_utils/util.js
46570
- /*
46571
- * Copyright (C) 2019 KQ GEO Technologies Co., Ltd.
46572
- * All rights reserved.
46664
+ /*
46665
+ * Copyright (C) 2019 KQ GEO Technologies Co., Ltd.
46666
+ * All rights reserved.
46573
46667
  */// 获取当前时间返回置顶格式
46574
46668
  /**
46575
46669
  * 安全地设置html元素的innerHTML
@@ -46642,7 +46736,7 @@ return;}let params=new KqGIS.GeometryAnalysis.ShpParserParams({file:file});let d
46642
46736
  * 解析json 文件
46643
46737
  * @file 上传file文件流
46644
46738
  * @callbackFun 回调方法 传入解析后的features数组
46645
- */function readJSON(file,callbackFun){try{let readEncoding="utf-8";let reader=new FileReader();reader.readAsText(file,readEncoding);reader.onload=function(){try{callbackFun(JSON.parse(this.result));}catch(err){callbackFun(this.result);}};reader.onerror=function(error){callbackFun(null);};}catch(error){callbackFun(null);}}/**
46739
+ */function readJSON(file,callbackFun){try{let readEncoding="utf-8";let reader=new FileReader();reader.readAsText(file,readEncoding);reader.onload=function(){try{callbackFun(JSON.parse(this.result));}catch(err){callbackFun(this.result);}};reader.onerror=function(error){callbackFun(null,error);};}catch(error){callbackFun(null,error);}}/**
46646
46740
  * 解析txt文件
46647
46741
  * @file 上传file文件流
46648
46742
  * @callbackFun 回调方法 传入解析后的features数组
@@ -46663,7 +46757,7 @@ if(rows[nextIndex].indexOf("@")!==-1){// 结束上个地块
46663
46757
  getCoor(geoType,pointArr,objarr);dataArr.push({type:geoType,coordinates:objarr});}else{let nextRow=rows[nextIndex].split(",");if(nextRow.length>0){if(nextRow[1]!==arr_row[1]){// 一行的第二个值是代表圈号,圈号不同表示不同的多边形
46664
46758
  getCoor(geoType,pointArr,objarr);pointArr=[];}}}}else{// 最后的行需要加上多边形
46665
46759
  getCoor(geoType,pointArr,objarr);dataArr.push({type:geoType,coordinates:objarr});}}// 地图和服务默认投影都是经纬度的,传入定位的坐标也必须是经纬度的,需要转换
46666
- if(dataArr.length===0){KqMessage({message:language.exporttxterror+"!",type:"error",duration:2000});callbackFun(null);return;}let features=[];for(let d in dataArr){let f=dataArr[d];let feature={type:"Feature",geometry:f};features.push(feature);}let data={type:"FeatureCollection",features:features};if(checkLatLng(dataArr[0])){if(callbackFun){callbackFun(data);}}else{let projectfeatures=[];for(let d in dataArr){let f=dataArr[d];let feature={type:"Feature",geometry:f};projectfeatures.push(feature);}projectTransform(dataUrl,inPrj,"4326",projectfeatures,function(datafeature){let data={type:"FeatureCollection",features:datafeature};if(callbackFun){callbackFun(data);}});}};reader.readAsText(file,"utf-8");function getCoor(type,pointArr,objarr){if(type==="Point"){objarr.push(pointArr[0][0]);objarr.push(pointArr[0][1]);}else if(type==="LineString"){for(let i=0;i<pointArr.length;i++){objarr.push(pointArr[i]);}}else if(type==="Polygon"){objarr.push(pointArr);}}}/**
46760
+ if(dataArr.length===0){KqMessage({message:language.exporttxterror+"!",type:"error",duration:2000});callbackFun(null);return;}let features=[];for(let d in dataArr){let f=dataArr[d];let feature={type:"Feature",geometry:f};features.push(feature);}let data={type:"FeatureCollection",features:features};if(checkLatLng(dataArr[0])){if(callbackFun){callbackFun(data);}}else{let projectfeatures=[];for(let d in dataArr){let f=dataArr[d];projToAssign(f,"4326",inPrj);let feature={type:"Feature",geometry:f};projectfeatures.push(feature);}let data={type:"FeatureCollection",features:projectfeatures};if(callbackFun){callbackFun(data);}}};reader.readAsText(file,"utf-8");function getCoor(type,pointArr,objarr){if(type==="Point"){objarr.push(pointArr[0][0]);objarr.push(pointArr[0][1]);}else if(type==="LineString"){for(let i=0;i<pointArr.length;i++){objarr.push(pointArr[i]);}}else if(type==="Polygon"){objarr.push(pointArr);}}}/**
46667
46761
  * 解析文件
46668
46762
  * @file 上传file文件流
46669
46763
  * @callbackFun 回调方法 传入解析后的features数组
@@ -46717,7 +46811,11 @@ return;}coor=transform.inverse(coor);}// 根据geometry对象 获取图形的空
46717
46811
  function getGeoEPSGByFeture(geometry){let _x=0;if(geometry.type.toUpperCase()==="POLYGON"){_x=geometry.coordinates[0][0][0]||geometry.coordinates[0][0];}else if(geometry.type.toUpperCase()==="MULTIPOLYGON"){_x=geometry.coordinates[0][0][0][0]||geometry.coordinates[0][0][0];}else if(geometry.type.toUpperCase()==="POINT"){_x=geometry.coordinates[0][0]||geometry.coordinates[0];}else if(geometry.type.toUpperCase()==="LINESTRING"){_x=geometry.coordinates[0][0]||geometry.coordinates[0];}else{return"+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=33500000 +y_0=0 +ellps=GRS80 +units=m +no_defs ";}if(_x>-999&&_x<999){return"+proj=longlat +ellps=GRS80 +no_defs +type=crs";}let dh=_x.toString().substr(0,2);const _dh=33;// 以33度带为计算点
46718
46812
  let lon=99;// 以33度带为计算点
46719
46813
  let x=33500000;// 以33度带为计算点
46720
- lon=lon+(Number(dh)-_dh)*3;x=x+(Number(dh)-_dh)*1000000;let a=`+proj=tmerc +lat_0=0 +lon_0=${lon} +k=1 +x_0=${x} +y_0=0 +ellps=GRS80 +units=m +no_defs `;return a;}}/**
46814
+ lon=lon+(Number(dh)-_dh)*3;x=x+(Number(dh)-_dh)*1000000;let a=`+proj=tmerc +lat_0=0 +lon_0=${lon} +k=1 +x_0=${x} +y_0=0 +ellps=GRS80 +units=m +no_defs `;return a;}}function projToAssign(geometry,outPrj,inPrj){inPrj="EPSG:"+inPrj;outPrj="EPSG:"+outPrj;// 转换的投影
46815
+ let transform=proj4(outPrj,inPrj);let type=geometry.type;let coor=geometry.coordinates;let d,c,p,newPoint;if(type==="Polygon"){for(d in coor){c=coor[d];for(p in c){newPoint=transform.inverse([Number(c[p][0]),Number(c[p][1])]);c[p]=newPoint;}}}else if(type==="MultiPolygon"){for(let r=0;r<coor.length;r++){let _coor=coor[r];for(d in _coor){c=_coor[d];// if (!$.isArray(c)) {
46816
+ // continue;
46817
+ // }
46818
+ for(p in c){newPoint=transform.inverse([Number(c[p][0]),Number(c[p][1])]);c[p]=newPoint;}}}}else if(type==="LineString"){for(d in coor){newPoint=transform.inverse(coor[d]);coor[d]=newPoint;}}else if(type==="Point"){coor=transform.inverse(coor);}}/**
46721
46819
  * 导出 Excel
46722
46820
  * @tableData 表格数据 数组对象
46723
46821
  * @fields 表格数据中的属性名称
@@ -46745,8 +46843,8 @@ elink.href=_url;elink.setAttribute("download","shapefile.zip");elink.style.displ
46745
46843
  * @param {string} outPrj //导出的坐标系
46746
46844
  * @param {object} features //要导出的坐标
46747
46845
  */function exportTXT(dataUrl,outPrj,features){if(dataUrl){if(dataUrl.indexOf("?")>=0){let url=dataUrl.split("?")[0];if(url===""||url==="undefined"||url===null){KqMessage({message:"导出Txt失败,没有找到服务地址!",type:"error",duration:2000});return;}}}if(["4490","4326","4610"].includes(outPrj)){let txtBodys=createTxtBody(features);let drawTTitle="[属性描述] \r\n格式版本号=1.0 \r\n数据生产单位=国土资源部 \r\n数据产生日期=[datatime] \r\n坐标系=墨卡托 \r\n投影类型=高斯克吕格 \r\n计量单位=米 \r\n[地块坐标] \r\n";let date=new Date();let time=date.getFullYear()+"-"+(date.getMonth()+1)+"-"+date.getDate();drawTTitle=drawTTitle.replace("[datatime]",time);// 设置生成日期
46748
- let evalue=drawTTitle+txtBodys;saveTXT(evalue,"","地块坐标信息.txt");}else{projectTransform(dataUrl,"4326",outPrj,features,function(dataFeatures){let txtBodys=createTxtBody(dataFeatures);let drawTTitle="[属性描述] \r\n格式版本号=1.0 \r\n数据生产单位=国土资源部 \r\n数据产生日期=[datatime] \r\n坐标系=墨卡托 \r\n投影类型=高斯克吕格 \r\n计量单位=米 \r\n[地块坐标] \r\n";let date=new Date();let time=date.getFullYear()+"-"+(date.getMonth()+1)+"-"+date.getDate();drawTTitle=drawTTitle.replace("[datatime]",time);// 设置生成日期
46749
- let evalue=drawTTitle+txtBodys;saveTXT(evalue,"","地块坐标信息.txt");});}}// 导出txt方法--总方法
46846
+ let evalue=drawTTitle+txtBodys;saveTXT(evalue,"","地块坐标信息.txt");}else{let dataFeatures=[];for(let d=0;d<features.length;d++){let f=features[d].geometry;projToAssign(f,outPrj,"4326");let feature={type:"Feature",geometry:f};dataFeatures.push(feature);}let txtBodys=createTxtBody(dataFeatures);let drawTTitle="[属性描述] \r\n格式版本号=1.0 \r\n数据生产单位=国土资源部 \r\n数据产生日期=[datatime] \r\n坐标系=墨卡托 \r\n投影类型=高斯克吕格 \r\n计量单位=米 \r\n[地块坐标] \r\n";let date=new Date();let time=date.getFullYear()+"-"+(date.getMonth()+1)+"-"+date.getDate();drawTTitle=drawTTitle.replace("[datatime]",time);// 设置生成日期
46847
+ let evalue=drawTTitle+txtBodys;saveTXT(evalue,"","地块坐标信息.txt");}}// 导出txt方法--总方法
46750
46848
  function createTxtBody(features){let txtBodys="";for(let k in features){let geometry=features[k]["geometry"];let geoType=geometry["type"];let coordinates=geometry["coordinates"];// let RKZQBM = features[k]['properties']['XZQDM'] === undefined ? '' : features[k]['properties']['XZQDM'];
46751
46849
  // let ZQMC = features[k]['properties']['XZQMC'] === undefined ? '' : features[k]['properties']['XZQDM'];
46752
46850
  switch(geoType){case"Point":txtBodys+=createBodyBycoord([[coordinates]],"","","点");break;case"LineString":// this.removeCPointFromCoordinates(coordinates);