sctj-components 1.0.72 → 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 +16 -4
- 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",
|
|
@@ -9654,7 +9654,7 @@ const _sfc_main$3 = {
|
|
|
9654
9654
|
}
|
|
9655
9655
|
},
|
|
9656
9656
|
emits: ["moving", "reset"],
|
|
9657
|
-
setup(__props, { emit }) {
|
|
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();
|
|
@@ -9851,6 +9860,9 @@ const _sfc_main$3 = {
|
|
|
9851
9860
|
map.value.destroy();
|
|
9852
9861
|
}
|
|
9853
9862
|
});
|
|
9863
|
+
expose({
|
|
9864
|
+
getMileage
|
|
9865
|
+
});
|
|
9854
9866
|
return (_ctx, _cache) => {
|
|
9855
9867
|
const _component_el_icon = resolveComponent("el-icon");
|
|
9856
9868
|
const _component_el_button = resolveComponent("el-button");
|
|
@@ -9931,7 +9943,7 @@ const _sfc_main$3 = {
|
|
|
9931
9943
|
};
|
|
9932
9944
|
}
|
|
9933
9945
|
};
|
|
9934
|
-
const SCTJTrackPlayback = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-
|
|
9946
|
+
const SCTJTrackPlayback = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-87a3abe5"]]);
|
|
9935
9947
|
const BimViewer_vue_vue_type_style_index_0_scoped_89f55b38_lang = "";
|
|
9936
9948
|
const _withScopeId$1 = (n) => (pushScopeId("data-v-89f55b38"), n = n(), popScopeId(), n);
|
|
9937
9949
|
const _hoisted_1$1 = {
|