|
|
@ -123,8 +123,6 @@ |
|
|
|
import { useI18n } from '/@/hooks/web/useI18n'; |
|
|
|
import { useI18n } from '/@/hooks/web/useI18n'; |
|
|
|
import { useDebounceFn } from '@vueuse/core'; |
|
|
|
import { useDebounceFn } from '@vueuse/core'; |
|
|
|
|
|
|
|
|
|
|
|
var source = new EventSource('http://localhost:8080/sse/subscribe?id=yihuihui'); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 类型规范统一声明定义区域 */ |
|
|
|
/** 类型规范统一声明定义区域 */ |
|
|
|
interface MapState { |
|
|
|
interface MapState { |
|
|
|
first: boolean; |
|
|
|
first: boolean; |
|
|
@ -170,7 +168,6 @@ |
|
|
|
let courierUserMarkerCluster; |
|
|
|
let courierUserMarkerCluster; |
|
|
|
let scanCourierUserCircleRange; |
|
|
|
let scanCourierUserCircleRange; |
|
|
|
let driving; |
|
|
|
let driving; |
|
|
|
|
|
|
|
|
|
|
|
const { t } = useI18n(); |
|
|
|
const { t } = useI18n(); |
|
|
|
const emit = defineEmits(['success']); |
|
|
|
const emit = defineEmits(['success']); |
|
|
|
const userStore = useUserStore(); |
|
|
|
const userStore = useUserStore(); |
|
|
@ -466,6 +463,31 @@ |
|
|
|
})); |
|
|
|
})); |
|
|
|
orgMarkerCluster?.setData(orgPoints); |
|
|
|
orgMarkerCluster?.setData(orgPoints); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// sse长轮询连接获取收样员gps位置 |
|
|
|
|
|
|
|
if (!!window.EventSource) { |
|
|
|
|
|
|
|
// 建立连接 |
|
|
|
|
|
|
|
const source = new EventSource(mapDesigner.sseUrl); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
source.addEventListener('open', function (e) { |
|
|
|
|
|
|
|
console.info(e,'建立连接。。。'); |
|
|
|
|
|
|
|
}, false); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
source.addEventListener('message', function (e) { |
|
|
|
|
|
|
|
source.close(); |
|
|
|
|
|
|
|
console.info(e); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
source.addEventListener('error', function (e) { |
|
|
|
|
|
|
|
console.info(e); |
|
|
|
|
|
|
|
}, false); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
notification.error({ |
|
|
|
|
|
|
|
message: '你的浏览器不支持SSE', |
|
|
|
|
|
|
|
description: '请更换浏览器,在尝试使用此功能!', |
|
|
|
|
|
|
|
duration: 2 |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
// 加载完毕 |
|
|
|
// 加载完毕 |
|
|
|
complete(); |
|
|
|
complete(); |
|
|
|
}).catch(error => { |
|
|
|
}).catch(error => { |
|
|
|