sctj-components 1.1.33 → 1.1.36

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