@kq_npm/client3d_webgl_vue 3.7.7-beta → 3.9.1-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.
@@ -165,6 +165,13 @@ module.exports = require("@kq_npm/client_icons_vue");
165
165
 
166
166
  /***/ }),
167
167
 
168
+ /***/ 7080:
169
+ /***/ (function(module) {
170
+
171
+ module.exports = require("vue-i18n/dist/vue-i18n.cjs.js");
172
+
173
+ /***/ }),
174
+
168
175
  /***/ 826:
169
176
  /***/ (function(module) {
170
177
 
@@ -306,6 +313,8 @@ var gis_utils_ = __webpack_require__(826);
306
313
  var ScreenshotViewModel = __webpack_require__(1248);
307
314
  // EXTERNAL MODULE: external "@kq_npm/client_common_vue/_utils/util"
308
315
  var util_ = __webpack_require__(9519);
316
+ // EXTERNAL MODULE: external "vue-i18n/dist/vue-i18n.cjs.js"
317
+ var vue_i18n_cjs_js_ = __webpack_require__(7080);
309
318
  ;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/dist/index.js??ruleSet[0]!./src/webgl/screenshot/Screenshot.vue?vue&type=script&setup=true&lang=js
310
319
 
311
320
  const _hoisted_1 = {
@@ -318,6 +327,7 @@ const _hoisted_2 = {
318
327
 
319
328
 
320
329
 
330
+
321
331
  // 场景宽度
322
332
 
323
333
  const __default__ = {
@@ -399,7 +409,17 @@ const __default__ = {
399
409
  let boxRef = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(null); // 生成组件默认header
400
410
 
401
411
  let headerTemp = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)();
402
- let headerTempRef = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)();
412
+ let headerTempRef = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(); // 国际化
413
+
414
+ let {
415
+ locale,
416
+ messages
417
+ } = (0,vue_i18n_cjs_js_.useI18n)();
418
+ let headerTempTitle = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(null);
419
+ (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.watch)(() => locale.value, (newVal, oldVal) => {
420
+ language.value = messages.value[newVal]["webgl"];
421
+ headerTempTitle.value = language.value.screenshot;
422
+ });
403
423
  (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.onMounted)(() => {
404
424
  (0,util_.updatePosition)(boxRef.value, props);
405
425
  (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.watch)(() => props.position, (newVal, oldVal) => {
@@ -411,7 +431,6 @@ const __default__ = {
411
431
  });
412
432
  gis_utils_.utils.getWebMap(null, scenceView => {
413
433
  if (scenceView) {
414
- language.value = scenceView._language;
415
434
  var canvas = scenceView._viewer.scene.canvas;
416
435
  imgWidthMax.value = canvas.width;
417
436
  imgHeightMax.value = canvas.height;
@@ -428,7 +447,7 @@ const __default__ = {
428
447
  const watchCreateHeaderTemp = () => {
429
448
  if (props.showHeaderTemp) {
430
449
  // 生成headerTemp
431
- headerTemp.value = (0,util_.createHeaderTemp)(boxRef.value, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toRefs)(props), headerTempRef);
450
+ headerTemp.value = (0,util_.createHeaderTemp)(boxRef.value, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toRefs)(props), headerTempRef, headerTempTitle);
432
451
  }
433
452
  }; // 场景出图
434
453
 
@@ -36,6 +36,13 @@ module.exports = require("@kq_npm/client_icons_vue");
36
36
 
37
37
  /***/ }),
38
38
 
39
+ /***/ 7080:
40
+ /***/ (function(module) {
41
+
42
+ module.exports = require("vue-i18n/dist/vue-i18n.cjs.js");
43
+
44
+ /***/ }),
45
+
39
46
  /***/ 9702:
40
47
  /***/ (function(module) {
41
48
 
@@ -421,6 +428,8 @@ var const_image_ = __webpack_require__(9702);
421
428
  var client_icons_vue_ = __webpack_require__(348);
422
429
  // EXTERNAL MODULE: external "@kq_npm/client_common_vue/_utils/util"
423
430
  var util_ = __webpack_require__(9519);
431
+ // EXTERNAL MODULE: external "vue-i18n/dist/vue-i18n.cjs.js"
432
+ var vue_i18n_cjs_js_ = __webpack_require__(7080);
424
433
  ;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/dist/index.js??ruleSet[0]!./src/webgl/shadowanalysis/ShadowAnalysis.vue?vue&type=script&setup=true&lang=js
425
434
 
426
435
  const _hoisted_1 = {
@@ -452,6 +461,7 @@ const _hoisted_7 = {
452
461
 
453
462
 
454
463
 
464
+
455
465
  const __default__ = {
456
466
  name: "Kq3dShadowAnalysis"
457
467
  };
@@ -589,7 +599,18 @@ const __default__ = {
589
599
  let boxRef = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(null); // 生成组件默认header
590
600
 
591
601
  let headerTemp = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)();
592
- let headerTempRef = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)();
602
+ let headerTempRef = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(); // 国际化
603
+
604
+ let {
605
+ locale,
606
+ messages
607
+ } = (0,vue_i18n_cjs_js_.useI18n)();
608
+ let headerTempTitle = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(null);
609
+ (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.watch)(() => locale.value, (newVal, oldVal) => {
610
+ language.value = messages.value[newVal]["webgl"];
611
+ headerTempTitle.value = language.value.shadowAnalysis;
612
+ currentLang.value = newVal;
613
+ });
593
614
  (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.onMounted)(() => {
594
615
  (0,util_.updatePosition)(boxRef.value, props);
595
616
  (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.watch)(() => props.position, (newVal, oldVal) => {
@@ -600,11 +621,8 @@ const __default__ = {
600
621
  watchCreateHeaderTemp();
601
622
  });
602
623
  time.value = [formItem.startTime, formItem.endTime];
603
- currentLang.value = proxy.$i18n.locale; // 获取当前语言类型
604
-
605
624
  gis_utils_.utils.getWebMap(null, scenceView => {
606
625
  if (scenceView) {
607
- language.value = scenceView._language;
608
626
  viewModel = new ShadowAnalysisViewModel(scenceView, {
609
627
  showVoxel: formItem.showBuilding,
610
628
  // 显示体素
@@ -638,7 +656,7 @@ const __default__ = {
638
656
  const watchCreateHeaderTemp = () => {
639
657
  if (props.showHeaderTemp) {
640
658
  // 生成headerTemp
641
- headerTemp.value = (0,util_.createHeaderTemp)(boxRef.value, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toRefs)(props), headerTempRef);
659
+ headerTemp.value = (0,util_.createHeaderTemp)(boxRef.value, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toRefs)(props), headerTempRef, headerTempTitle);
642
660
  }
643
661
  }; // 获取当前日期
644
662
 
@@ -379,6 +379,13 @@ module.exports = require("core-js/modules/es.array.includes.js");
379
379
 
380
380
  /***/ }),
381
381
 
382
+ /***/ 7080:
383
+ /***/ (function(module) {
384
+
385
+ module.exports = require("vue-i18n/dist/vue-i18n.cjs.js");
386
+
387
+ /***/ }),
388
+
382
389
  /***/ 9702:
383
390
  /***/ (function(module) {
384
391
 
@@ -846,6 +853,8 @@ class SightlineAnalysisViewModel {
846
853
  var client_icons_vue_ = __webpack_require__(348);
847
854
  // EXTERNAL MODULE: external "@kq_npm/client_common_vue/_utils/util"
848
855
  var util_ = __webpack_require__(9519);
856
+ // EXTERNAL MODULE: external "vue-i18n/dist/vue-i18n.cjs.js"
857
+ var vue_i18n_cjs_js_ = __webpack_require__(7080);
849
858
  ;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/dist/index.js??ruleSet[0]!./src/webgl/sightlineanalysis/SightlineAnalysis.vue?vue&type=script&setup=true&lang=js
850
859
 
851
860
  const _hoisted_1 = {
@@ -859,6 +868,7 @@ const _hoisted_2 = {
859
868
 
860
869
 
861
870
 
871
+
862
872
  const __default__ = {
863
873
  name: "Kq3dSightlineAnalysis"
864
874
  };
@@ -925,7 +935,17 @@ const __default__ = {
925
935
  let boxRef = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(null); // 生成组件默认header
926
936
 
927
937
  let headerTemp = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)();
928
- let headerTempRef = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)();
938
+ let headerTempRef = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(); // 国际化
939
+
940
+ let {
941
+ locale,
942
+ messages
943
+ } = (0,vue_i18n_cjs_js_.useI18n)();
944
+ let headerTempTitle = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(null);
945
+ (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.watch)(() => locale.value, (newVal, oldVal) => {
946
+ language.value = messages.value[newVal]["webgl"];
947
+ headerTempTitle.value = language.value.sightlineAnalysis;
948
+ });
929
949
  (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.onMounted)(() => {
930
950
  (0,util_.updatePosition)(boxRef.value, props);
931
951
  (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.watch)(() => props.position, (newVal, oldVal) => {
@@ -938,7 +958,6 @@ const __default__ = {
938
958
 
939
959
  gis_utils_.utils.getWebMap(null, scenceView => {
940
960
  if (scenceView) {
941
- language.value = scenceView._language;
942
961
  let options = {
943
962
  lineWidth: formItem.lineWidth,
944
963
  visibleColor: formItem.visibleColor,
@@ -957,7 +976,7 @@ const __default__ = {
957
976
  const watchCreateHeaderTemp = () => {
958
977
  if (props.showHeaderTemp) {
959
978
  // 生成headerTemp
960
- headerTemp.value = (0,util_.createHeaderTemp)(boxRef.value, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toRefs)(props), headerTempRef);
979
+ headerTemp.value = (0,util_.createHeaderTemp)(boxRef.value, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toRefs)(props), headerTempRef, headerTempTitle);
961
980
  }
962
981
  };
963
982
 
@@ -36,6 +36,13 @@ module.exports = require("@kq_npm/client_icons_vue");
36
36
 
37
37
  /***/ }),
38
38
 
39
+ /***/ 7080:
40
+ /***/ (function(module) {
41
+
42
+ module.exports = require("vue-i18n/dist/vue-i18n.cjs.js");
43
+
44
+ /***/ }),
45
+
39
46
  /***/ 826:
40
47
  /***/ (function(module) {
41
48
 
@@ -194,7 +201,7 @@ class SkylineAnalysisViewModel {
194
201
  * @param {*} viewer 三维对象
195
202
  * @param {*} option 天际线分析参数对象
196
203
  */
197
- constructor(viewer, option) {
204
+ constructor(viewer, option, chartStyle) {
198
205
  (0,defineProperty/* default */.Z)(this, "_skylineAnalysis", null);
199
206
 
200
207
  (0,defineProperty/* default */.Z)(this, "_skylineAnalysisChart", null);
@@ -205,6 +212,9 @@ class SkylineAnalysisViewModel {
205
212
 
206
213
  (0,defineProperty/* default */.Z)(this, "_showLimitHeightBody", null);
207
214
 
215
+ (0,defineProperty/* default */.Z)(this, "_chartStyle", null);
216
+
217
+ this._chartStyle = chartStyle;
208
218
  viewer.scene.globe.depthTestAgainstTerrain = true; //开启深度检测
209
219
 
210
220
  viewer.scene.postProcessStages._fxaa.enabled = true; // 创建分析参数对象
@@ -304,16 +314,25 @@ class SkylineAnalysisViewModel {
304
314
 
305
315
 
306
316
  setSkyline2D() {
317
+ let chartStyle = this._chartStyle;
307
318
  if (!this._skylineAnalysis) return;
308
319
 
309
320
  var data = this._skylineAnalysis.updateBuffer();
310
321
 
311
322
  var option = {
312
323
  title: {
313
- text: this._skylineAnalysisChartTitle
324
+ text: this._skylineAnalysisChartTitle,
325
+ textStyle: {
326
+ color: chartStyle.textColor
327
+ }
314
328
  },
315
329
  tooltip: {
316
- trigger: "axis"
330
+ trigger: "axis",
331
+ backgroundColor: chartStyle.backgroundColor,
332
+ borderWidth: 0,
333
+ textStyle: {
334
+ color: chartStyle.textColor
335
+ }
317
336
  },
318
337
  grid: {
319
338
  containLabel: true,
@@ -332,7 +351,10 @@ class SkylineAnalysisViewModel {
332
351
  yAxis: [{
333
352
  type: "value",
334
353
  min: 0,
335
- max: 1
354
+ max: 1,
355
+ axisLabel: {
356
+ color: chartStyle.textColor
357
+ }
336
358
  }],
337
359
  series: [{
338
360
  name: "",
@@ -342,6 +364,37 @@ class SkylineAnalysisViewModel {
342
364
  };
343
365
  this._skylineAnalysisChart && this._skylineAnalysisChart.setOption(option);
344
366
  }
367
+ /**
368
+ * 设置echarts图表样式
369
+ */
370
+
371
+
372
+ setChartStyle(style) {
373
+ this._chartStyle = style;
374
+
375
+ if (this._skylineAnalysisChart) {
376
+ let option = this._skylineAnalysisChart.getOption();
377
+
378
+ option.title[0].textStyle.color = style.textColor;
379
+ option.tooltip[0].backgroundColor = style.backgroundColor;
380
+ option.tooltip[0].textStyle.color = style.textColor;
381
+ option.yAxis[0].axisLabel.color = style.textColor;
382
+
383
+ this._skylineAnalysisChart.setOption(option);
384
+ }
385
+ }
386
+
387
+ setChartTitle(title) {
388
+ this._skylineAnalysisChartTitle = title;
389
+
390
+ if (this._skylineAnalysisChart) {
391
+ let option = this._skylineAnalysisChart.getOption();
392
+
393
+ option.title[0].text = title;
394
+
395
+ this._skylineAnalysisChart.setOption(option);
396
+ }
397
+ }
345
398
  /**
346
399
  * 清除限高体
347
400
  */
@@ -353,9 +406,8 @@ class SkylineAnalysisViewModel {
353
406
  if (this._skylineAnalysis && !this._skylineAnalysis.isDestroyed()) {
354
407
  this._skylineAnalysis.removeAlllimitHeights();
355
408
 
356
- this._skylineAnalysis.removeAllFaces();
409
+ this._skylineAnalysis.removeAllFaces(); // this._skylineAnalysis.removeGeoJsonDataSource();
357
410
 
358
- this._skylineAnalysis.removeGeoJsonDataSource();
359
411
 
360
412
  this._skylineAnalysis.removeCzmlJsonDataSource();
361
413
  }
@@ -436,7 +488,7 @@ class SkylineAnalysisViewModel {
436
488
  }
437
489
  }
438
490
  /**
439
- * 注销
491
+ * 销毁
440
492
  */
441
493
 
442
494
 
@@ -455,6 +507,8 @@ class SkylineAnalysisViewModel {
455
507
  var client_icons_vue_ = __webpack_require__(348);
456
508
  // EXTERNAL MODULE: external "@kq_npm/client_common_vue/_utils/util"
457
509
  var util_ = __webpack_require__(9519);
510
+ // EXTERNAL MODULE: external "vue-i18n/dist/vue-i18n.cjs.js"
511
+ var vue_i18n_cjs_js_ = __webpack_require__(7080);
458
512
  ;// CONCATENATED MODULE: external "echarts"
459
513
  var external_echarts_namespaceObject = require("echarts");
460
514
  ;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/dist/index.js??ruleSet[0]!./src/webgl/skylineanalysis/SkylineAnalysis.vue?vue&type=script&setup=true&lang=js
@@ -478,6 +532,7 @@ const _hoisted_4 = {
478
532
 
479
533
 
480
534
 
535
+
481
536
  // 语言
482
537
 
483
538
  const __default__ = {
@@ -561,7 +616,18 @@ const __default__ = {
561
616
  let boxRef = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(null); // 生成组件默认header
562
617
 
563
618
  let headerTemp = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)();
564
- let headerTempRef = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)();
619
+ let headerTempRef = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(); // 国际化
620
+
621
+ let {
622
+ locale,
623
+ messages
624
+ } = (0,vue_i18n_cjs_js_.useI18n)();
625
+ let headerTempTitle = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(null);
626
+ (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.watch)(() => locale.value, (newVal, oldVal) => {
627
+ language.value = messages.value[newVal]["webgl"];
628
+ headerTempTitle.value = language.value.skylineAnalysis;
629
+ viewModel && viewModel.setChartTitle(language.value["skylineAnalysisChartTitle"]);
630
+ });
565
631
  (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.onMounted)(() => {
566
632
  (0,util_.updatePosition)(boxRef.value, props);
567
633
  (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.watch)(() => props.position, (newVal, oldVal) => {
@@ -573,26 +639,56 @@ const __default__ = {
573
639
  });
574
640
  gis_utils_.utils.getWebMap(null, scenceView => {
575
641
  if (scenceView) {
576
- language.value = scenceView._language;
577
642
  viewModel = new SkylineAnalysisViewModel(scenceView._viewer, {
578
643
  skylineColor: formItem.skylineColor || "#E6A23C",
579
- skylineRadius: formItem.skylineRadius || 1000,
644
+ skylineRadius: formItem.skylineRadius || 2000,
580
645
  limitHeightBodyColor: formItem.limitHeightBodyColor || "#67C23A",
581
646
  limitHeightBodyAlpha: formItem.limitHeightBodyAlpha || 0.7,
582
647
  skylineWidth: formItem.skylineWidth || 2
583
- }, resultEcahrtVis);
584
- viewModel._skylineAnalysisChartTitle = language.value["skylineAnalysisChartTitle"];
648
+ }, setEchartsColor());
649
+ viewModel._skylineAnalysisChartTitle = scenceView._language["skylineAnalysisChartTitle"];
585
650
  }
586
651
  });
587
- });
652
+ }); // 监听主题变化,重置Echarts
653
+
654
+ const observer = new MutationObserver(mutationsList => {
655
+ for (let mutation of mutationsList) {
656
+ if (mutation.type === "attributes" && mutation.attributeName === "class") {
657
+ let style = setEchartsColor();
658
+ viewModel.setChartStyle(style);
659
+ }
660
+ }
661
+ }); // 配置要观察的目标节点及其属性
662
+
663
+ const targetNode = document.querySelector("html");
664
+ const config = {
665
+ attributes: true
666
+ };
667
+ observer.observe(targetNode, config);
668
+
669
+ const setEchartsColor = () => {
670
+ let style = {};
671
+ let themeStyle = window.getComputedStyle(document.documentElement).getPropertyValue("color-scheme");
672
+
673
+ if (themeStyle === "dark") {
674
+ style.textColor = "#fff";
675
+ style.backgroundColor = "#2A2A2A";
676
+ } else {
677
+ style.textColor = "#333";
678
+ style.backgroundColor = "#ffffff";
679
+ }
680
+
681
+ return style;
682
+ };
588
683
  /**
589
684
  * @description 监听header生成
590
685
  */
591
686
 
687
+
592
688
  const watchCreateHeaderTemp = () => {
593
689
  if (props.showHeaderTemp) {
594
690
  // 生成headerTemp
595
- headerTemp.value = (0,util_.createHeaderTemp)(boxRef.value, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toRefs)(props), headerTempRef);
691
+ headerTemp.value = (0,util_.createHeaderTemp)(boxRef.value, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toRefs)(props), headerTempRef, headerTempTitle);
596
692
  }
597
693
  }; // 提取天际线
598
694
 
@@ -36,6 +36,13 @@ module.exports = require("@kq_npm/client_icons_vue");
36
36
 
37
37
  /***/ }),
38
38
 
39
+ /***/ 7080:
40
+ /***/ (function(module) {
41
+
42
+ module.exports = require("vue-i18n/dist/vue-i18n.cjs.js");
43
+
44
+ /***/ }),
45
+
39
46
  /***/ 9702:
40
47
  /***/ (function(module) {
41
48
 
@@ -453,6 +460,8 @@ class SlopeAnalysisViewModel {
453
460
  var client_icons_vue_ = __webpack_require__(348);
454
461
  // EXTERNAL MODULE: external "@kq_npm/client_common_vue/_utils/util"
455
462
  var util_ = __webpack_require__(9519);
463
+ // EXTERNAL MODULE: external "vue-i18n/dist/vue-i18n.cjs.js"
464
+ var vue_i18n_cjs_js_ = __webpack_require__(7080);
456
465
  ;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/dist/index.js??ruleSet[0]!./src/webgl/slopeanalysis/SlopeAnalysis.vue?vue&type=script&setup=true&lang=js
457
466
 
458
467
  const _hoisted_1 = {
@@ -495,6 +504,7 @@ const _hoisted_10 = {
495
504
 
496
505
 
497
506
 
507
+
498
508
  const __default__ = {
499
509
  name: "Kq3dSlopeAnalysis"
500
510
  };
@@ -598,7 +608,17 @@ const __default__ = {
598
608
  let boxRef = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(null); // 生成组件默认header
599
609
 
600
610
  let headerTemp = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)();
601
- let headerTempRef = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)();
611
+ let headerTempRef = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(); // 国际化
612
+
613
+ let {
614
+ locale,
615
+ messages
616
+ } = (0,vue_i18n_cjs_js_.useI18n)();
617
+ let headerTempTitle = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(null);
618
+ (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.watch)(() => locale.value, (newVal, oldVal) => {
619
+ language.value = messages.value[newVal]["webgl"];
620
+ headerTempTitle.value = language.value.slopeAnalysis;
621
+ });
602
622
  (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.onMounted)(() => {
603
623
  (0,util_.updatePosition)(boxRef.value, props);
604
624
  (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.watch)(() => props.position, (newVal, oldVal) => {
@@ -612,7 +632,6 @@ const __default__ = {
612
632
 
613
633
  gis_utils_.utils.getWebMap(null, scenceView => {
614
634
  if (scenceView) {
615
- language.value = scenceView._language;
616
635
  refactorArr();
617
636
  viewModel = new SlopeAnalysisViewModel(scenceView, formItem); // var imageUrl = getImagePath(formItem.colorImage);
618
637
  // viewModel.setColorImage(imageUrl);
@@ -626,7 +645,7 @@ const __default__ = {
626
645
  const watchCreateHeaderTemp = () => {
627
646
  if (props.showHeaderTemp) {
628
647
  // 生成headerTemp
629
- headerTemp.value = (0,util_.createHeaderTemp)(boxRef.value, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toRefs)(props), headerTempRef);
648
+ headerTemp.value = (0,util_.createHeaderTemp)(boxRef.value, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toRefs)(props), headerTempRef, headerTempTitle);
630
649
  }
631
650
  }; // 刷新自定义样式数组
632
651
 
@@ -80,9 +80,13 @@ module.exports = function (cssWithMappingToString) {
80
80
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
81
81
  /* harmony export */ "Z": function() { return /* binding */ StatusBarViewModel; }
82
82
  /* harmony export */ });
83
+ /* harmony import */ var _Users_zpc_Documents_KQGEOSpace_KQGISClientForVue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8270);
84
+
83
85
  // 地图状态栏逻辑类
84
86
  class StatusBarViewModel {
85
87
  constructor(viewer, options) {
88
+ (0,_Users_zpc_Documents_KQGEOSpace_KQGISClientForVue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_viewer", null);
89
+
86
90
  viewer.statusBar.show = true;
87
91
  viewer.statusBar.readyPromise.then(() => {
88
92
  // viewer.statusBar.container.style.bottom = "16px";
@@ -112,13 +116,63 @@ class StatusBarViewModel {
112
116
  viewer.statusBar.setCopyrightText(options.copyrightText);
113
117
  }
114
118
  });
119
+ this._viewer = viewer;
120
+ }
121
+
122
+ changeLanguage(lang) {
123
+ var that = this;
124
+
125
+ if (that._viewer.statusBar._ready) {
126
+ var originLanguage = that._viewer.statusBar._curLanguage;
127
+ var language = new Cesium.Languages({
128
+ languageStyle: lang == 'zh' ? 'zh-cn' : 'en'
129
+ });
130
+ language.readyPromise.then(function () {
131
+ //loaded success
132
+ that._viewer._language = language;
133
+ var langContent = language.content;
134
+
135
+ if (langContent) {
136
+ that._viewer.statusBar._curLanguage = {
137
+ mUnit: langContent.mUnit,
138
+ kmUnit: langContent.kmUnit,
139
+ sqkmUnit: langContent.sqkmUnit,
140
+ sqmUnit: langContent.sqmUnit,
141
+ N: langContent.N,
142
+ S: langContent.S,
143
+ E: langContent.E,
144
+ W: langContent.W,
145
+ du: langContent.du,
146
+ fen: langContent.fen,
147
+ miao: langContent.miao,
148
+ elevation: langContent.elevation,
149
+ eyeAltitude: langContent.eyeAltitude,
150
+ copyright: langContent.copyright,
151
+ scale: langContent.scale
152
+ };
153
+ var id = that._viewer.statusBar._id; // 比例尺控件
154
+
155
+ html = document.getElementById(id + '_ScaleBarTxt').innerHTML;
156
+ document.getElementById(id + '_ScaleBarTxt').innerHTML = html.replace(originLanguage.scale, langContent.scale); // 比例尺
157
+
158
+ html = document.getElementById(id + '_ScaleTxt').innerHTML;
159
+ document.getElementById(id + '_ScaleTxt').innerHTMLhtml = html.replace(originLanguage.kmUnit, langContent.kmUnit).replace(originLanguage.mUnit, langContent.mUnit); // 视点高
160
+
161
+ html = document.getElementById(id + '_CoordEyeAlt').innerHTML;
162
+ document.getElementById(id + '_CoordEyeAlt').innerHTML = html.replace(originLanguage.eyeAltitude, langContent.eyeAltitude).replace(originLanguage.kmUnit, langContent.kmUnit).replace(originLanguage.mUnit, langContent.mUnit); // 高度
163
+
164
+ var html = document.getElementById(id + '_CoordHeight').innerHTML;
165
+ document.getElementById(id + '_CoordHeight').innerHTML = html.replace(originLanguage.kmUnit, langContent.kmUnit).replace(originLanguage.mUnit, langContent.mUnit);
166
+ }
167
+ });
168
+ }
115
169
  }
116
170
 
117
171
  }
118
172
 
119
173
  /***/ }),
120
174
 
121
- /***/ 1407:
175
+ /***/ 6854:
122
176
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
123
177
 
124
178
  /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7705);
@@ -409,6 +463,13 @@ module.exports = function (list, options) {
409
463
 
410
464
  /***/ }),
411
465
 
466
+ /***/ 7080:
467
+ /***/ (function(module) {
468
+
469
+ module.exports = require("vue-i18n/dist/vue-i18n.cjs.js");
470
+
471
+ /***/ }),
472
+
412
473
  /***/ 826:
413
474
  /***/ (function(module) {
414
475
 
@@ -428,6 +489,29 @@ module.exports = require("@kq_npm/client_common_vue/init.js");
428
489
 
429
490
  module.exports = require("vue");
430
491
 
492
+ /***/ }),
493
+
494
+ /***/ 8270:
495
+ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
496
+
497
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
498
+ /* harmony export */ "Z": function() { return /* binding */ _defineProperty; }
499
+ /* harmony export */ });
500
+ function _defineProperty(obj, key, value) {
501
+ if (key in obj) {
502
+ Object.defineProperty(obj, key, {
503
+ value: value,
504
+ enumerable: true,
505
+ configurable: true,
506
+ writable: true
507
+ });
508
+ } else {
509
+ obj[key] = value;
510
+ }
511
+
512
+ return obj;
513
+ }
514
+
431
515
  /***/ })
432
516
 
433
517
  /******/ });
@@ -521,10 +605,13 @@ var external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_ = __webpack_require__(
521
605
  var gis_utils_ = __webpack_require__(826);
522
606
  // EXTERNAL MODULE: ./src/webgl/statusbar/StatusBarViewModel.js
523
607
  var StatusBarViewModel = __webpack_require__(6311);
608
+ // EXTERNAL MODULE: external "vue-i18n/dist/vue-i18n.cjs.js"
609
+ var vue_i18n_cjs_js_ = __webpack_require__(7080);
524
610
  ;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/dist/index.js??ruleSet[0]!./src/webgl/statusbar/StatusBar.vue?vue&type=script&setup=true&lang=js
525
611
 
526
612
 
527
613
 
614
+
528
615
  /**
529
616
  * 支持传入属性:
530
617
  * hideResolution - 隐藏分辨率
@@ -559,7 +646,14 @@ const __default__ = {
559
646
 
560
647
  setup(__props) {
561
648
  const props = __props;
562
- let viewModel = null;
649
+ let viewModel = null; // 国际化
650
+
651
+ let {
652
+ locale
653
+ } = (0,vue_i18n_cjs_js_.useI18n)();
654
+ (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.watch)(() => locale.value, (newVal, oldVal) => {
655
+ viewModel && viewModel.changeLanguage(newVal);
656
+ });
563
657
  (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.onMounted)(() => {
564
658
  gis_utils_.utils.getWebMap(null, scenceView => {
565
659
  if (scenceView) {
@@ -578,9 +672,9 @@ const __default__ = {
578
672
  // EXTERNAL MODULE: ./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js
579
673
  var injectStylesIntoStyleTag = __webpack_require__(3379);
580
674
  var injectStylesIntoStyleTag_default = /*#__PURE__*/__webpack_require__.n(injectStylesIntoStyleTag);
581
- // EXTERNAL MODULE: ./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/sass-loader/dist/cjs.js!./node_modules/vue-loader/dist/index.js??ruleSet[0]!./src/webgl/statusbar/StatusBar.vue?vue&type=style&index=0&id=0f45d5c6&lang=scss
582
- var StatusBarvue_type_style_index_0_id_0f45d5c6_lang_scss = __webpack_require__(1407);
583
- ;// CONCATENATED MODULE: ./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/sass-loader/dist/cjs.js!./node_modules/vue-loader/dist/index.js??ruleSet[0]!./src/webgl/statusbar/StatusBar.vue?vue&type=style&index=0&id=0f45d5c6&lang=scss
675
+ // EXTERNAL MODULE: ./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/sass-loader/dist/cjs.js!./node_modules/vue-loader/dist/index.js??ruleSet[0]!./src/webgl/statusbar/StatusBar.vue?vue&type=style&index=0&id=f2dabb7e&lang=scss
676
+ var StatusBarvue_type_style_index_0_id_f2dabb7e_lang_scss = __webpack_require__(6854);
677
+ ;// CONCATENATED MODULE: ./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/sass-loader/dist/cjs.js!./node_modules/vue-loader/dist/index.js??ruleSet[0]!./src/webgl/statusbar/StatusBar.vue?vue&type=style&index=0&id=f2dabb7e&lang=scss
584
678
 
585
679
 
586
680
 
@@ -589,12 +683,12 @@ var options = {};
589
683
  options.insert = "head";
590
684
  options.singleton = false;
591
685
 
592
- var update = injectStylesIntoStyleTag_default()(StatusBarvue_type_style_index_0_id_0f45d5c6_lang_scss/* default */.Z, options);
686
+ var update = injectStylesIntoStyleTag_default()(StatusBarvue_type_style_index_0_id_f2dabb7e_lang_scss/* default */.Z, options);
593
687
 
594
688
 
595
689
 
596
- /* harmony default export */ var statusbar_StatusBarvue_type_style_index_0_id_0f45d5c6_lang_scss = (StatusBarvue_type_style_index_0_id_0f45d5c6_lang_scss/* default.locals */.Z.locals || {});
597
- ;// CONCATENATED MODULE: ./src/webgl/statusbar/StatusBar.vue?vue&type=style&index=0&id=0f45d5c6&lang=scss
690
+ /* harmony default export */ var statusbar_StatusBarvue_type_style_index_0_id_f2dabb7e_lang_scss = (StatusBarvue_type_style_index_0_id_f2dabb7e_lang_scss/* default.locals */.Z.locals || {});
691
+ ;// CONCATENATED MODULE: ./src/webgl/statusbar/StatusBar.vue?vue&type=style&index=0&id=f2dabb7e&lang=scss
598
692
 
599
693
  ;// CONCATENATED MODULE: ./src/webgl/statusbar/StatusBar.vue
600
694