Browse Source

表格数据

citygis-lhh 5 months ago
parent
commit
2a4b457151

+ 5 - 2
src/stores/drawPointManage.js

@@ -1,6 +1,6 @@
 import { ref, watch } from 'vue';
 import { defineStore } from 'pinia';
-import { addPoint, addPolyLine } from '@/utils/map/mapOperation.js';
+import { addPoint, addPolyLine, addTrajectory, playTrajectory } from '@/utils/map/mapOperation.js';
 export const useDrawPointStore = defineStore('drawPointStore', () => {
   //当前患者绘制点位列表
   const currentDrawPointList = ref([]);
@@ -48,7 +48,10 @@ export const useDrawPointStore = defineStore('drawPointStore', () => {
         .sort((pre, next) => new Date(pre.date) - new Date(next.date));
       if (pointList?.length > 0) {
         addPoint(pointList, 'drawPoint');
-        addPolyLine(pointList, 'drawLine');
+        addTrajectory(pointList, 'drawLine');
+        setTimeout(() => {
+          playTrajectory('drawLine', 160);
+        }, 1000);
       }
     },
     {

+ 3 - 1
src/stores/mapStore.js

@@ -156,11 +156,13 @@ export const useMapStore = defineStore('mapStore', () => {
     currentToolSelectArray.value = currentToolSelectArray.value.filter((item) => item != value);
     if (value == 'Bidding') {
       startBidding(false);
-      closePoint('drawLine');
+      stopTrajectory('car_layerdrawLine');
+      closePoint('car_layerdrawLine');
       closePoint('drawPoint');
       closePoint('clickView');
       closePoint('hasPointView');
       closePoint('noPointView');
+
       useDrawPointStore().modifyTrail = false;
       closeOutputPoint();
     } else if (value == 'flowCar') {

+ 4 - 4
src/utils/map/mapOperation.js

@@ -272,12 +272,12 @@ export function addTrajectory(data, id) {
 }
 
 //轨迹播放
-export function playTrajectory(id) {
+export function playTrajectory(id, speed = 60) {
   invokeParams('ShowData', {
     name: 'car_layer' + id,
     mode: 'player',
     action: 'play',
-    speed: 60,
+    speed: speed,
     showline: true,
     renderer: {
       type: 'unique-value',
@@ -505,7 +505,7 @@ export function gotoPosition(point, color) {
 }
 
 //区边界
-export function regionZone() {
+export function regionZone(name) {
   invokeParams('goToPosition', {
     name: 'car_layer',
     type: 'layer',
@@ -520,7 +520,7 @@ export function regionZone() {
     },
     data: {
       layers: {
-        name: '区县边界'
+        name: name
       }
     },
     labels: [

+ 1 - 1
src/views/DataCenterGis/components/RightPanel.vue

@@ -262,7 +262,7 @@ const selectPartKey = ref('');
 //选择区
 const handleSelect = (key) => {
   selectPartKey.value = key;
-  regionZone();
+  regionZone(key);
 };
 
 const handleDbView = async (row) => {