sctj-components 1.0.71 → 1.0.73
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/lib/sctj-components.es.js +21 -5
- package/lib/sctj-components.umd.js +1 -1
- package/lib/style.css +1 -1
- package/package.json +1 -1
|
@@ -9610,7 +9610,7 @@ const _sfc_main$4 = {
|
|
|
9610
9610
|
}
|
|
9611
9611
|
};
|
|
9612
9612
|
const SCTJBusinessMapDrawingDialog = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-d0bea808"]]);
|
|
9613
|
-
const
|
|
9613
|
+
const index_vue_vue_type_style_index_0_scoped_87a3abe5_lang = "";
|
|
9614
9614
|
const _hoisted_1$2 = { class: "controls" };
|
|
9615
9615
|
const _sfc_main$3 = {
|
|
9616
9616
|
__name: "index",
|
|
@@ -9653,8 +9653,8 @@ const _sfc_main$3 = {
|
|
|
9653
9653
|
required: true
|
|
9654
9654
|
}
|
|
9655
9655
|
},
|
|
9656
|
-
emits: ["moving"],
|
|
9657
|
-
setup(__props, { emit }) {
|
|
9656
|
+
emits: ["moving", "reset"],
|
|
9657
|
+
setup(__props, { expose, emit }) {
|
|
9658
9658
|
const props = __props;
|
|
9659
9659
|
const mapContainerRef = ref$1(null);
|
|
9660
9660
|
const map = shallowRef(null);
|
|
@@ -9695,7 +9695,7 @@ const _sfc_main$3 = {
|
|
|
9695
9695
|
AMapInstance = await AMapLoader.load({
|
|
9696
9696
|
key: props.amapKey,
|
|
9697
9697
|
version: "2.0",
|
|
9698
|
-
plugins: ["AMap.Marker", "AMap.Polyline", "AMap.MoveAnimation"]
|
|
9698
|
+
plugins: ["AMap.Marker", "AMap.Polyline", "AMap.MoveAnimation", "AMap.GeometryUtil"]
|
|
9699
9699
|
});
|
|
9700
9700
|
map.value = new AMapInstance.Map(mapContainerRef.value, {
|
|
9701
9701
|
zoom: props.zoom,
|
|
@@ -9722,6 +9722,15 @@ const _sfc_main$3 = {
|
|
|
9722
9722
|
return point;
|
|
9723
9723
|
});
|
|
9724
9724
|
};
|
|
9725
|
+
const getMileage = (points) => {
|
|
9726
|
+
if (!(points == null ? void 0 : points.length))
|
|
9727
|
+
return 0;
|
|
9728
|
+
if (!(AMapInstance == null ? void 0 : AMapInstance.GeometryUtil))
|
|
9729
|
+
return 0;
|
|
9730
|
+
const path = formatPath(points);
|
|
9731
|
+
const lngLatArr = path.map((p) => new AMapInstance.LngLat(p[0], p[1]));
|
|
9732
|
+
return AMapInstance.GeometryUtil.distanceOfLine(lngLatArr);
|
|
9733
|
+
};
|
|
9725
9734
|
const drawTrack = () => {
|
|
9726
9735
|
if (map.value) {
|
|
9727
9736
|
map.value.clearMap();
|
|
@@ -9772,6 +9781,9 @@ const _sfc_main$3 = {
|
|
|
9772
9781
|
map.value.setFitView();
|
|
9773
9782
|
moveMarker.value.on("moving", (e) => {
|
|
9774
9783
|
emit("moving", e);
|
|
9784
|
+
if (!isPlayed.value) {
|
|
9785
|
+
isPlayed.value = true;
|
|
9786
|
+
}
|
|
9775
9787
|
});
|
|
9776
9788
|
};
|
|
9777
9789
|
const startPlay = () => {
|
|
@@ -9811,6 +9823,7 @@ const _sfc_main$3 = {
|
|
|
9811
9823
|
isPlayed.value = false;
|
|
9812
9824
|
const initialPoint = formatPath(props.pathPoints)[0];
|
|
9813
9825
|
passedPolyline.value.setPath([initialPoint]);
|
|
9826
|
+
emit("reset");
|
|
9814
9827
|
};
|
|
9815
9828
|
const handleSpeedChange = (value) => {
|
|
9816
9829
|
if (isPlaying.value) {
|
|
@@ -9847,6 +9860,9 @@ const _sfc_main$3 = {
|
|
|
9847
9860
|
map.value.destroy();
|
|
9848
9861
|
}
|
|
9849
9862
|
});
|
|
9863
|
+
expose({
|
|
9864
|
+
getMileage
|
|
9865
|
+
});
|
|
9850
9866
|
return (_ctx, _cache) => {
|
|
9851
9867
|
const _component_el_icon = resolveComponent("el-icon");
|
|
9852
9868
|
const _component_el_button = resolveComponent("el-button");
|
|
@@ -9927,7 +9943,7 @@ const _sfc_main$3 = {
|
|
|
9927
9943
|
};
|
|
9928
9944
|
}
|
|
9929
9945
|
};
|
|
9930
|
-
const SCTJTrackPlayback = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-
|
|
9946
|
+
const SCTJTrackPlayback = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-87a3abe5"]]);
|
|
9931
9947
|
const BimViewer_vue_vue_type_style_index_0_scoped_89f55b38_lang = "";
|
|
9932
9948
|
const _withScopeId$1 = (n) => (pushScopeId("data-v-89f55b38"), n = n(), popScopeId(), n);
|
|
9933
9949
|
const _hoisted_1$1 = {
|