sctj-components 1.1.9 → 1.1.11
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 +25 -49
- package/lib/sctj-components.umd.js +1 -1
- package/lib/style.css +1 -1
- package/package.json +1 -1
|
@@ -5,7 +5,7 @@ import VueOfficeExcel from "@vue-office/excel";
|
|
|
5
5
|
import { View, Download, Delete, Plus, Picture, Search, Loading, UploadFilled, QuestionFilled, VideoPlay, VideoPause, RefreshRight } from "@element-plus/icons-vue";
|
|
6
6
|
import { ElMessage, ElLoading, ElMessageBox, ElButton, ElIcon } from "element-plus";
|
|
7
7
|
import * as echarts from "echarts";
|
|
8
|
-
import { throttle,
|
|
8
|
+
import { throttle, debounce } from "lodash";
|
|
9
9
|
import flvjs from "flv.js";
|
|
10
10
|
import AMapLoader from "@amap/amap-jsapi-loader";
|
|
11
11
|
if (typeof window !== "undefined") {
|
|
@@ -3301,7 +3301,7 @@ const _sfc_main$h = {
|
|
|
3301
3301
|
const getTableData = () => {
|
|
3302
3302
|
emit("query");
|
|
3303
3303
|
};
|
|
3304
|
-
const
|
|
3304
|
+
const debounce2 = (func, wait) => {
|
|
3305
3305
|
let timeout;
|
|
3306
3306
|
return function executedFunction(...args) {
|
|
3307
3307
|
const later = () => {
|
|
@@ -3417,7 +3417,7 @@ const _sfc_main$h = {
|
|
|
3417
3417
|
animationFrameId.value = null;
|
|
3418
3418
|
}
|
|
3419
3419
|
};
|
|
3420
|
-
const debouncedDataUpdate =
|
|
3420
|
+
const debouncedDataUpdate = debounce2(() => {
|
|
3421
3421
|
tableBodyWrapper.value = null;
|
|
3422
3422
|
if (checkScrollable() && props.autoScroll && !props.loading) {
|
|
3423
3423
|
startAutoScroll();
|
|
@@ -5399,7 +5399,7 @@ const _sfc_main$8 = {
|
|
|
5399
5399
|
};
|
|
5400
5400
|
}
|
|
5401
5401
|
};
|
|
5402
|
-
const
|
|
5402
|
+
const index_vue_vue_type_style_index_0_scoped_98da9a15_lang = "";
|
|
5403
5403
|
const _hoisted_1$6 = {
|
|
5404
5404
|
key: 0,
|
|
5405
5405
|
class: "action-container"
|
|
@@ -5491,8 +5491,8 @@ const _sfc_main$7 = {
|
|
|
5491
5491
|
setup(__props, { expose, emit }) {
|
|
5492
5492
|
const props = __props;
|
|
5493
5493
|
useCssVars((_ctx) => ({
|
|
5494
|
-
"
|
|
5495
|
-
"
|
|
5494
|
+
"84970d70": __props.width,
|
|
5495
|
+
"41e89436": __props.height
|
|
5496
5496
|
}));
|
|
5497
5497
|
const controlsPositionVars = computed$1(() => {
|
|
5498
5498
|
const position = props.controlsPosition || {};
|
|
@@ -5610,74 +5610,56 @@ const _sfc_main$7 = {
|
|
|
5610
5610
|
watch(() => props.circles, (newCircles, oldCircles) => {
|
|
5611
5611
|
if (!map.value)
|
|
5612
5612
|
return;
|
|
5613
|
-
if (isEqual(newCircles, oldCircles))
|
|
5614
|
-
return;
|
|
5615
|
-
console.log("circles changed");
|
|
5616
5613
|
clearCircles();
|
|
5617
5614
|
if (newCircles && newCircles.length) {
|
|
5618
5615
|
addCircles(newCircles);
|
|
5619
5616
|
}
|
|
5620
|
-
props.autoFitView &&
|
|
5617
|
+
props.autoFitView && debouncedFitView();
|
|
5621
5618
|
}, { deep: true });
|
|
5622
5619
|
watch(() => props.staticMarkers, (newMarkers, oldMarkers) => {
|
|
5623
5620
|
if (!map.value)
|
|
5624
5621
|
return;
|
|
5625
|
-
if (isEqual(newMarkers, oldMarkers))
|
|
5626
|
-
return;
|
|
5627
|
-
console.log("staticMarkers changed");
|
|
5628
5622
|
clearStaticMarkers();
|
|
5629
5623
|
if (newMarkers && newMarkers.length) {
|
|
5630
5624
|
drawStaticMarkers(newMarkers);
|
|
5631
5625
|
}
|
|
5632
|
-
props.autoFitView &&
|
|
5626
|
+
props.autoFitView && debouncedFitView();
|
|
5633
5627
|
}, { deep: true });
|
|
5634
5628
|
watch(() => props.dynamicMarkers, (newMarkers, oldMarkers) => {
|
|
5635
5629
|
if (!map.value)
|
|
5636
5630
|
return;
|
|
5637
|
-
if (isEqual(newMarkers, oldMarkers))
|
|
5638
|
-
return;
|
|
5639
|
-
console.log("dynamicMarkers changed");
|
|
5640
5631
|
clearDynamicMarkers();
|
|
5641
5632
|
if (newMarkers && newMarkers.length) {
|
|
5642
5633
|
drawDynamicMarkers(newMarkers);
|
|
5643
5634
|
}
|
|
5644
|
-
props.autoFitView &&
|
|
5635
|
+
props.autoFitView && debouncedFitView();
|
|
5645
5636
|
}, { deep: true });
|
|
5646
5637
|
watch(() => props.polylines, (newPolylines, oldPolylines) => {
|
|
5647
5638
|
if (!map.value)
|
|
5648
5639
|
return;
|
|
5649
|
-
if (isEqual(newPolylines, oldPolylines))
|
|
5650
|
-
return;
|
|
5651
|
-
console.log("Polylines changed");
|
|
5652
5640
|
clearPolylines();
|
|
5653
5641
|
if (newPolylines && newPolylines.length) {
|
|
5654
5642
|
addPolylines(newPolylines);
|
|
5655
5643
|
}
|
|
5656
|
-
props.autoFitView &&
|
|
5644
|
+
props.autoFitView && debouncedFitView();
|
|
5657
5645
|
}, { deep: true });
|
|
5658
5646
|
watch(() => props.polygons, (newPolygons, oldPolygons) => {
|
|
5659
5647
|
if (!map.value)
|
|
5660
5648
|
return;
|
|
5661
|
-
if (isEqual(newPolygons, oldPolygons))
|
|
5662
|
-
return;
|
|
5663
|
-
console.log("polygons changed");
|
|
5664
5649
|
clearPolygons();
|
|
5665
5650
|
if (newPolygons && newPolygons.length) {
|
|
5666
5651
|
addPolygons(newPolygons);
|
|
5667
5652
|
}
|
|
5668
|
-
props.autoFitView &&
|
|
5653
|
+
props.autoFitView && debouncedFitView();
|
|
5669
5654
|
}, { deep: true });
|
|
5670
5655
|
watch(() => props.bezierCurves, (newCurves, oldCurves) => {
|
|
5671
5656
|
if (!map.value)
|
|
5672
5657
|
return;
|
|
5673
|
-
if (isEqual(newCurves, oldCurves))
|
|
5674
|
-
return;
|
|
5675
|
-
console.log("bezierCurves changed");
|
|
5676
5658
|
clearBezierCurves();
|
|
5677
5659
|
if (newCurves && newCurves.length) {
|
|
5678
5660
|
addBezierCurves(newCurves);
|
|
5679
5661
|
}
|
|
5680
|
-
props.autoFitView &&
|
|
5662
|
+
props.autoFitView && debouncedFitView();
|
|
5681
5663
|
}, { deep: true });
|
|
5682
5664
|
const handleMapEvents = () => {
|
|
5683
5665
|
if (!map.value)
|
|
@@ -5876,6 +5858,10 @@ const _sfc_main$7 = {
|
|
|
5876
5858
|
map.value.setZoomAndCenter(zoom, parsePosition(newCenter));
|
|
5877
5859
|
}
|
|
5878
5860
|
};
|
|
5861
|
+
const debouncedFitView = debounce(() => {
|
|
5862
|
+
if (map.value)
|
|
5863
|
+
fitView();
|
|
5864
|
+
}, 300);
|
|
5879
5865
|
const fitView = (padding = null) => {
|
|
5880
5866
|
if (map.value) {
|
|
5881
5867
|
const allFeatures = [
|
|
@@ -5888,10 +5874,8 @@ const _sfc_main$7 = {
|
|
|
5888
5874
|
];
|
|
5889
5875
|
if (allFeatures.length > 0) {
|
|
5890
5876
|
if (padding) {
|
|
5891
|
-
console.log("\u4F7F\u7528\u65B9\u6CD5\u4F20\u5165\u7684padding", padding);
|
|
5892
5877
|
map.value.setFitView(allFeatures, false, padding);
|
|
5893
5878
|
} else {
|
|
5894
|
-
console.log("\u4E0D\u4F7F\u7528padding");
|
|
5895
5879
|
map.value.setFitView(allFeatures);
|
|
5896
5880
|
}
|
|
5897
5881
|
}
|
|
@@ -5953,14 +5937,12 @@ const _sfc_main$7 = {
|
|
|
5953
5937
|
checkedTypes.forEach((type) => {
|
|
5954
5938
|
typeVisibility.value.set(type, true);
|
|
5955
5939
|
});
|
|
5956
|
-
console.log("checkedTypes------", checkedTypes);
|
|
5957
5940
|
props.legendConfig.map((item) => item.value).forEach((type) => {
|
|
5958
5941
|
const isVisible = checkedTypes.includes(type);
|
|
5959
5942
|
toggleOverlayGroupVisibility(type, isVisible);
|
|
5960
5943
|
});
|
|
5961
5944
|
};
|
|
5962
5945
|
const drawStaticMarkers = (markers) => {
|
|
5963
|
-
console.log("123213", markers);
|
|
5964
5946
|
markers.forEach((marker) => {
|
|
5965
5947
|
const { position, icon, size, blink, label, title, textLabelDefaultStyle, type } = marker;
|
|
5966
5948
|
if (position) {
|
|
@@ -5973,15 +5955,14 @@ const _sfc_main$7 = {
|
|
|
5973
5955
|
size: size ? new AMap.Size(size.width, size.height) : new AMap.Size(state.markerDefaultConfig.size.width, state.markerDefaultConfig.size.height),
|
|
5974
5956
|
offset: size ? new AMap.Pixel(-(size.width / 2), -size.height) : new AMap.Pixel(-(state.markerDefaultConfig.size.width / 2), -state.markerDefaultConfig.size.height),
|
|
5975
5957
|
map: map.value,
|
|
5976
|
-
title
|
|
5977
|
-
zooms: [16, 25]
|
|
5958
|
+
title
|
|
5978
5959
|
});
|
|
5979
5960
|
blink && markerInstance.dom && markerInstance.dom.querySelector(".amap-icon").classList.add("blinking-marker");
|
|
5980
5961
|
label && markerInstance.setLabel({
|
|
5981
5962
|
direction: "top",
|
|
5982
5963
|
offset: new AMap.Pixel(0, -5),
|
|
5983
5964
|
content: `<div title="${label}" style="${objectToStyleString({ ...state.textLabelDefaultStyle, ...textLabelDefaultStyle })}" class='info'>${label}</div>`,
|
|
5984
|
-
zooms: [
|
|
5965
|
+
zooms: [17, 25]
|
|
5985
5966
|
});
|
|
5986
5967
|
markerInstance.on("click", () => {
|
|
5987
5968
|
emit("overlay-click", { type: "staticMarker", data: marker });
|
|
@@ -6007,15 +5988,14 @@ const _sfc_main$7 = {
|
|
|
6007
5988
|
offset: size ? new AMap.Pixel(-(size.width / 2), -size.height) : new AMap.Pixel(-(state.markerDefaultConfig.size.width / 2), -state.markerDefaultConfig.size.height),
|
|
6008
5989
|
size: size ? new AMap.Size(size.width, size.height) : new AMap.Size(state.markerDefaultConfig.size.width, state.markerDefaultConfig.size.height),
|
|
6009
5990
|
map: map.value,
|
|
6010
|
-
title
|
|
6011
|
-
zooms: [16, 25]
|
|
5991
|
+
title
|
|
6012
5992
|
});
|
|
6013
|
-
console.log("markerInstance", markerInstance);
|
|
6014
5993
|
blink && markerInstance.dom && markerInstance.dom.querySelector(".amap-icon").classList.add("blinking-marker");
|
|
6015
5994
|
label && markerInstance.setLabel({
|
|
6016
5995
|
direction: "top",
|
|
6017
5996
|
offset: new AMap.Pixel(0, -5),
|
|
6018
|
-
content: `<div title="${label}" style="${objectToStyleString({ ...state.textLabelDefaultStyle, ...textLabelDefaultStyle })}" class='info'>${label}</div
|
|
5997
|
+
content: `<div title="${label}" style="${objectToStyleString({ ...state.textLabelDefaultStyle, ...textLabelDefaultStyle })}" class='info'>${label}</div>`,
|
|
5998
|
+
zooms: [17, 25]
|
|
6019
5999
|
});
|
|
6020
6000
|
markerInstance.on("click", () => {
|
|
6021
6001
|
emit("overlay-click", { type: "marker", data: marker });
|
|
@@ -6050,7 +6030,7 @@ const _sfc_main$7 = {
|
|
|
6050
6030
|
},
|
|
6051
6031
|
offset: new AMap.Pixel(0, 0),
|
|
6052
6032
|
anchor: "center",
|
|
6053
|
-
zooms: [
|
|
6033
|
+
zooms: [17, 25]
|
|
6054
6034
|
});
|
|
6055
6035
|
map.value.add(textInstance);
|
|
6056
6036
|
circleTextInstances.value.push({
|
|
@@ -6108,7 +6088,7 @@ const _sfc_main$7 = {
|
|
|
6108
6088
|
},
|
|
6109
6089
|
offset: new AMap.Pixel(0, 0),
|
|
6110
6090
|
anchor: "center",
|
|
6111
|
-
zooms: [
|
|
6091
|
+
zooms: [17, 25]
|
|
6112
6092
|
});
|
|
6113
6093
|
map.value.add(textInstance);
|
|
6114
6094
|
polylineTextInstances.value.push({
|
|
@@ -6144,9 +6124,7 @@ const _sfc_main$7 = {
|
|
|
6144
6124
|
});
|
|
6145
6125
|
};
|
|
6146
6126
|
const addPolygons = (polygons) => {
|
|
6147
|
-
console.log("polygons---------", polygons);
|
|
6148
6127
|
polygons.forEach((polygon) => {
|
|
6149
|
-
console.log("polygon", polygon.path);
|
|
6150
6128
|
if (polygon.path && polygon.path.length) {
|
|
6151
6129
|
const polygonInstance = new AMap.Polygon({
|
|
6152
6130
|
...state.polygonDefaultConfig,
|
|
@@ -6167,7 +6145,7 @@ const _sfc_main$7 = {
|
|
|
6167
6145
|
},
|
|
6168
6146
|
offset: new AMap.Pixel(0, 0),
|
|
6169
6147
|
anchor: "center",
|
|
6170
|
-
zooms: [
|
|
6148
|
+
zooms: [17, 25]
|
|
6171
6149
|
});
|
|
6172
6150
|
map.value.add(textInstance);
|
|
6173
6151
|
polygonTextInstances.value.push({
|
|
@@ -6205,7 +6183,6 @@ const _sfc_main$7 = {
|
|
|
6205
6183
|
};
|
|
6206
6184
|
const addBezierCurves = (curves) => {
|
|
6207
6185
|
curves.forEach((curve) => {
|
|
6208
|
-
console.log("this.parseCurve(curve.path)", parseCurve(curve.path));
|
|
6209
6186
|
if (curve.path && curve.path.length) {
|
|
6210
6187
|
const bezierCurveInstance = new AMap.BezierCurve({
|
|
6211
6188
|
...state.bezierCurveDefaultConfig,
|
|
@@ -6268,7 +6245,6 @@ const _sfc_main$7 = {
|
|
|
6268
6245
|
marker.off("click");
|
|
6269
6246
|
if (marker._clusterLabel) {
|
|
6270
6247
|
if (marker._clusterLabel.off) {
|
|
6271
|
-
console.log("\u79FB\u9664\u805A\u5408\u6807\u7B7E");
|
|
6272
6248
|
marker._clusterLabel.off("click");
|
|
6273
6249
|
}
|
|
6274
6250
|
marker._clusterLabel.setMap(null);
|
|
@@ -6408,7 +6384,7 @@ const _sfc_main$7 = {
|
|
|
6408
6384
|
};
|
|
6409
6385
|
}
|
|
6410
6386
|
};
|
|
6411
|
-
const SCTJMapViewer = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-
|
|
6387
|
+
const SCTJMapViewer = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-98da9a15"]]);
|
|
6412
6388
|
const index_vue_vue_type_style_index_0_scoped_761d2ab4_lang = "";
|
|
6413
6389
|
const _withScopeId$4 = (n) => (pushScopeId("data-v-761d2ab4"), n = n(), popScopeId(), n);
|
|
6414
6390
|
const _hoisted_1$5 = {
|