|
@@ -9,7 +9,12 @@ import {
|
|
|
startBidding
|
|
|
} from '@/utils/map/mapOperation.js';
|
|
|
import { useDrawPointStore } from './drawPointManage';
|
|
|
-import { getTrajectorPointOnPeople } from '@/service/api/mapRequest.js';
|
|
|
+import {
|
|
|
+ getTrajectorPointOnPeople,
|
|
|
+ getTrajectorPointOnCar,
|
|
|
+ getTrajectorPointOnCarById
|
|
|
+} from '@/service/api/mapRequest.js';
|
|
|
+import { color } from 'echarts';
|
|
|
export const useMapStore = defineStore('mapStore', () => {
|
|
|
//当前图例高亮图标列表
|
|
|
const currentToolSelectArray = ref(['newAdress', 'touch']);
|
|
@@ -28,16 +33,26 @@ export const useMapStore = defineStore('mapStore', () => {
|
|
|
}
|
|
|
case 'touch': {
|
|
|
//密接图标
|
|
|
- addImagePoint(value, {
|
|
|
- imageUrl: new URL(`@/assets/image/mapTools/2.png`, import.meta.url).href
|
|
|
- });
|
|
|
+ const res = await getTrajectorPointOnPeople({ type: 1 });
|
|
|
+ if (res?.code == 200) {
|
|
|
+ addJuHePoint(value, res?.data || []);
|
|
|
+ } else {
|
|
|
+ console.log('获取传染病数据错误');
|
|
|
+ }
|
|
|
+ // addImagePoint(value, {
|
|
|
+ // imageUrl: new URL(`@/assets/image/mapTools/2.png`, import.meta.url).href
|
|
|
+ // });
|
|
|
break;
|
|
|
}
|
|
|
case 'infectious': {
|
|
|
//传染病图标
|
|
|
const res = await getTrajectorPointOnPeople({ type: 1 });
|
|
|
if (res?.code == 200) {
|
|
|
- addJuHePoint(value, res?.data || []);
|
|
|
+ addJuHePoint(value, res?.data || [], {
|
|
|
+ label: '传染病',
|
|
|
+ color: 'rgba(230, 162, 60, 0.5)',
|
|
|
+ borderColor: 'rgba(230, 162, 60, 1)'
|
|
|
+ });
|
|
|
} else {
|
|
|
console.log('获取传染病数据错误');
|
|
|
}
|
|
@@ -48,7 +63,11 @@ export const useMapStore = defineStore('mapStore', () => {
|
|
|
//发热门诊图标
|
|
|
const res = await getTrajectorPointOnPeople({ type: 2 });
|
|
|
if (res?.code == 200) {
|
|
|
- addJuHePoint(value, res?.data || []);
|
|
|
+ addJuHePoint(value, res?.data || [], {
|
|
|
+ label: '发热门诊',
|
|
|
+ color: 'rgba(245, 108, 108, 0.5)',
|
|
|
+ borderColor: 'rgba(245, 108, 108, 1)'
|
|
|
+ });
|
|
|
} else {
|
|
|
console.log('获取发热数据错误');
|
|
|
}
|
|
@@ -56,15 +75,30 @@ export const useMapStore = defineStore('mapStore', () => {
|
|
|
}
|
|
|
case 'breathe': {
|
|
|
//呼吸图标
|
|
|
- addJuHePoint(value);
|
|
|
+ const res = await getTrajectorPointOnPeople({ type: 3 });
|
|
|
+ if (res?.code == 200) {
|
|
|
+ addJuHePoint(value, res?.data || [], {
|
|
|
+ label: '呼吸数据',
|
|
|
+ color: 'rgba(148, 0, 211, 0.5)',
|
|
|
+ borderColor: 'rgba(148, 0, 211, 1)'
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ console.log('获取呼吸数据错误');
|
|
|
+ }
|
|
|
break;
|
|
|
}
|
|
|
case 'flowCar': {
|
|
|
+ const res = await getTrajectorPointOnCar();
|
|
|
+ if (res?.code == 200) {
|
|
|
+ addImagePoint(value, res?.data || [], {
|
|
|
+ imageUrl: new URL(`@/assets/image/mapTools/6.png`, import.meta.url).href
|
|
|
+ });
|
|
|
+ }
|
|
|
//流调会商车图标
|
|
|
- addTrajectory();
|
|
|
- setTimeout(() => {
|
|
|
- playTrajectory();
|
|
|
- }, 2000);
|
|
|
+ // addTrajectory();
|
|
|
+ // setTimeout(() => {
|
|
|
+ // playTrajectory();
|
|
|
+ // }, 2000);
|
|
|
break;
|
|
|
}
|
|
|
case 'Bidding': {
|