sctj-components 1.1.10 → 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.
@@ -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, isEqual } from "lodash";
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 debounce = (func, wait) => {
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 = debounce(() => {
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 index_vue_vue_type_style_index_0_scoped_81e99229_lang = "";
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
- "2c2353e3": __props.width,
5495
- "3e782eaa": __props.height
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 && fitView();
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 && fitView();
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 && fitView();
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 && fitView();
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 && fitView();
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 && fitView();
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) {
@@ -5980,7 +5962,7 @@ const _sfc_main$7 = {
5980
5962
  direction: "top",
5981
5963
  offset: new AMap.Pixel(0, -5),
5982
5964
  content: `<div title="${label}" style="${objectToStyleString({ ...state.textLabelDefaultStyle, ...textLabelDefaultStyle })}" class='info'>${label}</div>`,
5983
- zooms: [16, 25]
5965
+ zooms: [17, 25]
5984
5966
  });
5985
5967
  markerInstance.on("click", () => {
5986
5968
  emit("overlay-click", { type: "staticMarker", data: marker });
@@ -6008,13 +5990,12 @@ const _sfc_main$7 = {
6008
5990
  map: map.value,
6009
5991
  title
6010
5992
  });
6011
- console.log("markerInstance", markerInstance);
6012
5993
  blink && markerInstance.dom && markerInstance.dom.querySelector(".amap-icon").classList.add("blinking-marker");
6013
5994
  label && markerInstance.setLabel({
6014
5995
  direction: "top",
6015
5996
  offset: new AMap.Pixel(0, -5),
6016
5997
  content: `<div title="${label}" style="${objectToStyleString({ ...state.textLabelDefaultStyle, ...textLabelDefaultStyle })}" class='info'>${label}</div>`,
6017
- zooms: [16, 25]
5998
+ zooms: [17, 25]
6018
5999
  });
6019
6000
  markerInstance.on("click", () => {
6020
6001
  emit("overlay-click", { type: "marker", data: marker });
@@ -6049,7 +6030,7 @@ const _sfc_main$7 = {
6049
6030
  },
6050
6031
  offset: new AMap.Pixel(0, 0),
6051
6032
  anchor: "center",
6052
- zooms: [16, 25]
6033
+ zooms: [17, 25]
6053
6034
  });
6054
6035
  map.value.add(textInstance);
6055
6036
  circleTextInstances.value.push({
@@ -6107,7 +6088,7 @@ const _sfc_main$7 = {
6107
6088
  },
6108
6089
  offset: new AMap.Pixel(0, 0),
6109
6090
  anchor: "center",
6110
- zooms: [16, 25]
6091
+ zooms: [17, 25]
6111
6092
  });
6112
6093
  map.value.add(textInstance);
6113
6094
  polylineTextInstances.value.push({
@@ -6143,9 +6124,7 @@ const _sfc_main$7 = {
6143
6124
  });
6144
6125
  };
6145
6126
  const addPolygons = (polygons) => {
6146
- console.log("polygons---------", polygons);
6147
6127
  polygons.forEach((polygon) => {
6148
- console.log("polygon", polygon.path);
6149
6128
  if (polygon.path && polygon.path.length) {
6150
6129
  const polygonInstance = new AMap.Polygon({
6151
6130
  ...state.polygonDefaultConfig,
@@ -6166,7 +6145,7 @@ const _sfc_main$7 = {
6166
6145
  },
6167
6146
  offset: new AMap.Pixel(0, 0),
6168
6147
  anchor: "center",
6169
- zooms: [16, 25]
6148
+ zooms: [17, 25]
6170
6149
  });
6171
6150
  map.value.add(textInstance);
6172
6151
  polygonTextInstances.value.push({
@@ -6204,7 +6183,6 @@ const _sfc_main$7 = {
6204
6183
  };
6205
6184
  const addBezierCurves = (curves) => {
6206
6185
  curves.forEach((curve) => {
6207
- console.log("this.parseCurve(curve.path)", parseCurve(curve.path));
6208
6186
  if (curve.path && curve.path.length) {
6209
6187
  const bezierCurveInstance = new AMap.BezierCurve({
6210
6188
  ...state.bezierCurveDefaultConfig,
@@ -6267,7 +6245,6 @@ const _sfc_main$7 = {
6267
6245
  marker.off("click");
6268
6246
  if (marker._clusterLabel) {
6269
6247
  if (marker._clusterLabel.off) {
6270
- console.log("\u79FB\u9664\u805A\u5408\u6807\u7B7E");
6271
6248
  marker._clusterLabel.off("click");
6272
6249
  }
6273
6250
  marker._clusterLabel.setMap(null);
@@ -6407,7 +6384,7 @@ const _sfc_main$7 = {
6407
6384
  };
6408
6385
  }
6409
6386
  };
6410
- const SCTJMapViewer = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-81e99229"]]);
6387
+ const SCTJMapViewer = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-98da9a15"]]);
6411
6388
  const index_vue_vue_type_style_index_0_scoped_761d2ab4_lang = "";
6412
6389
  const _withScopeId$4 = (n) => (pushScopeId("data-v-761d2ab4"), n = n(), popScopeId(), n);
6413
6390
  const _hoisted_1$5 = {