sctj-components 1.1.32 → 1.1.34

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.
@@ -10198,8 +10198,8 @@ const _sfc_main$5 = {
10198
10198
  }
10199
10199
  };
10200
10200
  const SCTJTrackPlayback = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-87a3abe5"]]);
10201
- const index_vue_vue_type_style_index_0_scoped_f4c816be_lang = "";
10202
- const _withScopeId$3 = (n) => (pushScopeId("data-v-f4c816be"), n = n(), popScopeId(), n);
10201
+ const index_vue_vue_type_style_index_0_scoped_eff1c241_lang = "";
10202
+ const _withScopeId$3 = (n) => (pushScopeId("data-v-eff1c241"), n = n(), popScopeId(), n);
10203
10203
  const _hoisted_1$3 = {
10204
10204
  key: 0,
10205
10205
  class: "btn-container"
@@ -10516,7 +10516,10 @@ const _sfc_main$4 = {
10516
10516
  const searchLngLat = ref$1("");
10517
10517
  const mapContainer = ref$1(null);
10518
10518
  watch(() => props.center, () => {
10519
- props.center && map.value.setCenter(parsePosition(props.center));
10519
+ var _a;
10520
+ if (props.center && map.value && !allOverlays.value.length) {
10521
+ (_a = map.value) == null ? void 0 : _a.setCenter(parsePosition(props.center));
10522
+ }
10520
10523
  });
10521
10524
  const markerDefaultConfig = reactive({
10522
10525
  icon: "https://a.amap.com/jsapi_demos/static/demo-center/icons/poi-marker-default.png",
@@ -10670,6 +10673,7 @@ const _sfc_main$4 = {
10670
10673
  updatePolygonData(instance);
10671
10674
  if (type === "bezierCurve")
10672
10675
  updateBezierCurveData(instance);
10676
+ props.immediateComplete && handleConfirm();
10673
10677
  });
10674
10678
  }
10675
10679
  instance.on("rightclick", () => {
@@ -10684,6 +10688,13 @@ const _sfc_main$4 = {
10684
10688
  });
10685
10689
  }
10686
10690
  };
10691
+ const allOverlays = computed$1(() => [
10692
+ ...localMarkers.value.map((item) => item.obj).filter((item) => item),
10693
+ ...localPolylines.value.map((item) => item.obj).filter((item) => item),
10694
+ ...localPolygons.value.map((item) => item.obj).filter((item) => item),
10695
+ ...localBezierCurves.value.map((item) => item.obj).filter((item) => item),
10696
+ ...localCircles.value.map((item) => item.obj).filter((item) => item)
10697
+ ]);
10687
10698
  const renderInitialData = () => {
10688
10699
  if (!map.value)
10689
10700
  return;
@@ -10768,15 +10779,8 @@ const _sfc_main$4 = {
10768
10779
  setInstanceEvent("circle", circleObj);
10769
10780
  localCircles.value.push({ obj: circleObj, center, radius, type: "circle" });
10770
10781
  });
10771
- const allOverlays = [
10772
- ...localMarkers.value.map((item) => item.obj),
10773
- ...localPolylines.value.map((item) => item.obj),
10774
- ...localPolygons.value.map((item) => item.obj),
10775
- ...localBezierCurves.value.map((item) => item.obj),
10776
- ...localCircles.value.map((item) => item.obj)
10777
- ];
10778
- if (allOverlays.length > 0) {
10779
- map.value.setFitView(allOverlays);
10782
+ if (allOverlays.value.length > 0) {
10783
+ map.value.setFitView(allOverlays.value);
10780
10784
  }
10781
10785
  };
10782
10786
  const drawTypClick = (type) => {
@@ -10998,7 +11002,11 @@ const _sfc_main$4 = {
10998
11002
  } else if (target instanceof AMap.Circle) {
10999
11003
  deleteCircle(target);
11000
11004
  } else {
11001
- closeEditor();
11005
+ if (props.immediateComplete) {
11006
+ handleConfirm();
11007
+ } else {
11008
+ closeEditor();
11009
+ }
11002
11010
  if (drawingType.value) {
11003
11011
  startDrawing(drawingType.value);
11004
11012
  }
@@ -11012,7 +11020,8 @@ const _sfc_main$4 = {
11012
11020
  return;
11013
11021
  }
11014
11022
  if (currentEditingObj.value) {
11015
- closeEditor();
11023
+ !props.immediateComplete && closeEditor();
11024
+ props.immediateComplete && handleConfirm();
11016
11025
  }
11017
11026
  if (target instanceof AMap.Polyline) {
11018
11027
  enablePolylineEditor(target);
@@ -11108,21 +11117,21 @@ const _sfc_main$4 = {
11108
11117
  return;
11109
11118
  if (polyEditor.value && currentEditingObj.value instanceof AMap.Polyline) {
11110
11119
  updatePolylineData();
11111
- !props.immediateComplete && polyEditor.value.close();
11120
+ polyEditor.value.close();
11112
11121
  }
11113
11122
  if (polygonEditor.value && currentEditingObj.value instanceof AMap.Polygon) {
11114
11123
  updatePolygonData();
11115
- !props.immediateComplete && polygonEditor.value.close();
11124
+ polygonEditor.value.close();
11116
11125
  }
11117
11126
  if (bezierCurveEditor.value && currentEditingObj.value instanceof AMap.BezierCurve) {
11118
11127
  updateBezierCurveData();
11119
- !props.immediateComplete && bezierCurveEditor.value.close();
11128
+ bezierCurveEditor.value.close();
11120
11129
  }
11121
11130
  if (circleEditor.value && currentEditingObj.value instanceof AMap.Circle) {
11122
11131
  updateCircleData();
11123
- !props.immediateComplete && circleEditor.value.close();
11132
+ circleEditor.value.close();
11124
11133
  }
11125
- !props.immediateComplete && (currentEditingObj.value = null);
11134
+ currentEditingObj.value = null;
11126
11135
  };
11127
11136
  const updatePolylineData = (instance = null) => {
11128
11137
  const polyline = instance != null ? instance : polyEditor.value.getTarget();
@@ -11576,7 +11585,8 @@ const _sfc_main$4 = {
11576
11585
  type: "primary",
11577
11586
  icon: unref(QuestionFilled),
11578
11587
  onClick: _cache[0] || (_cache[0] = ($event) => showHelpDialog.value = true),
11579
- class: "help-button"
11588
+ class: "help-button",
11589
+ size: "small"
11580
11590
  }, {
11581
11591
  default: withCtx(() => [
11582
11592
  createTextVNode(" \u64CD\u4F5C\u8BF4\u660E ")
@@ -11658,14 +11668,14 @@ const _sfc_main$4 = {
11658
11668
  return openBlock(), createBlock(_component_el_radio, {
11659
11669
  key: type,
11660
11670
  onClick: withModifiers(($event) => drawTypClick(type), ["prevent"]),
11661
- label: type,
11671
+ value: type,
11662
11672
  border: ""
11663
11673
  }, {
11664
11674
  default: withCtx(() => [
11665
11675
  createTextVNode(toDisplayString(getButtonLabel(type)), 1)
11666
11676
  ]),
11667
11677
  _: 2
11668
- }, 1032, ["onClick", "label"]);
11678
+ }, 1032, ["onClick", "value"]);
11669
11679
  }), 128))
11670
11680
  ]),
11671
11681
  _: 1
@@ -11740,7 +11750,8 @@ const _sfc_main$4 = {
11740
11750
  title: "\u64CD\u4F5C\u8BF4\u660E",
11741
11751
  modelValue: showHelpDialog.value,
11742
11752
  "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => showHelpDialog.value = $event),
11743
- width: "600px",
11753
+ width: unref(isMobile) ? "90%" : "600px",
11754
+ fullscreen: unref(isMobile),
11744
11755
  "append-to-body": ""
11745
11756
  }, {
11746
11757
  footer: withCtx(() => [
@@ -11760,12 +11771,12 @@ const _sfc_main$4 = {
11760
11771
  _hoisted_13
11761
11772
  ]),
11762
11773
  _: 1
11763
- }, 8, ["modelValue"])
11774
+ }, 8, ["modelValue", "width", "fullscreen"])
11764
11775
  ], 4);
11765
11776
  };
11766
11777
  }
11767
11778
  };
11768
- const SCTJMapDrawing = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-f4c816be"]]);
11779
+ const SCTJMapDrawing = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-eff1c241"]]);
11769
11780
  const BimViewer_vue_vue_type_style_index_0_scoped_5d1b1a03_lang = "";
11770
11781
  const _withScopeId$2 = (n) => (pushScopeId("data-v-5d1b1a03"), n = n(), popScopeId(), n);
11771
11782
  const _hoisted_1$2 = {