From 2be65f8d159c4f30be6aa8c8befd2907510aad30 Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Tue, 17 Dec 2024 15:29:11 +0800
Subject: [PATCH] 作战图、突发事件模拟更新
---
src/views/pd/components/dynamicPanel.vue | 121 ++++++++++++++++++++--------------------
1 files changed, 60 insertions(+), 61 deletions(-)
diff --git a/src/views/pd/components/dynamicPanel.vue b/src/views/pd/components/dynamicPanel.vue
index a75cbaa..93f6e46 100644
--- a/src/views/pd/components/dynamicPanel.vue
+++ b/src/views/pd/components/dynamicPanel.vue
@@ -2,7 +2,7 @@
* @Author: shuishen 1109946754@qq.com
* @Date: 2024-11-09 15:41:35
* @LastEditors: shuishen 1109946754@qq.com
- * @LastEditTime: 2024-12-02 18:36:34
+ * @LastEditTime: 2024-12-17 15:28:55
* @FilePath: \bigScreen\src\views\pd\components\dynamicPanel.vue
* @Description:
*
@@ -46,13 +46,13 @@
lng: 115.10343807,
lat: 27.27256126
},
- linePosition: '115.10341051,27.27251643,80;115.10357817,27.27278003,80',
+ linePosition: '115.10341051,27.27251643,64;115.10357817,27.27278003,64',
lineTime: 5000,
threeContent: '关闭绿源污水处理厂旁雨水排口,拦截污染水体。',
threePointPosition: {
- lng: 115.10921467,
- lat: 27.27166382
+ lng: 115.10870094,
+ lat: 27.27185349
},
threetime: 15000,
@@ -86,13 +86,13 @@
lng: 115.10627858,
lat: 27.29434439
},
- linePosition: '115.10627726,27.29408853,80;115.10627703,27.29456132,80',
+ linePosition: '115.10627726,27.29408853,64;115.10627703,27.29456132,64',
lineTime: 5000,
twoContent: '园区关闭北区雨水排口,拦截污染水体。',
twoPointPosition: {
- lng: 115.10542509,
- lat: 27.29924475
+ lng: 115.10629605,
+ lat: 27.29785816
},
twotime: 10000,
@@ -112,8 +112,8 @@
fiveContent: '排口下游展开应急监测,确保废水没有进入周边水系。',
fivePointPosition: {
- lng: 115.10921467,
- lat: 27.27166382
+ lng: 115.10542509,
+ lat: 27.29924475
},
fivetime: 25000
},
@@ -127,26 +127,26 @@
oneCentent: '2024年09月16日14时,北片区某公司的危化品运输车辆发生侧翻,大量盐酸流至路面。',
onePointPosition: {
- lng: 115.10639786,
- lat: 27.28116943
+ lng: 115.10639803,
+ lat: 27.27848014
},
- onetime: 8000,
+ onetime: 10000,
- twoContent: '调度金龙水库清水,稀释污染团。',
+ twoContent: '关闭雨水阀闸,调度金龙水库清水,稀释污染团。',
twoPointPosition: {
lng: 115.10488545,
lat: 27.27678110
},
twotime: 13000,
- threeContent: '转输至江西粤鹏环保高新技术开发有限公司事故应急池、初期雨水池。',
+ threeContent: '转输至江西粤鹏环保高新技术开发有限公司事故应急池。',
threePointPosition: {
lng: 115.10545135,
lat: 27.28043872
},
threetime: 18000,
- fourContent: '转输至江西腾龙源环保科技有限公司事故应急池、初期雨水池。',
+ fourContent: '转输至江西腾龙源环保科技有限公司事故应急池。',
fourPointPosition: {
lng: 115.10332118,
lat: 27.27831698
@@ -162,38 +162,29 @@
let modelPosition = [
{
- lng: 115.10601196,
- lat: 27.28378838
- },
- {
- lng: 115.10602432,
- lat: 27.28339800
- },
- {
- lng: 115.10600450,
- lat: 27.28319338,
- },
- {
- lng: 115.10605031,
- lat: 27.28294272,
- },
- {
- lng: 115.10610404,
- lat: 27.28267996
- },
- {
- lng: 115.10614202,
- lat: 27.28248175
- },
- {
- lng: 115.10620011,
- lat: 27.28221311
- },
- {
lng: 115.10640155,
lat: 27.28121605
},
-
+ {
+ lng: 115.10641953,
+ lat: 27.28084006
+ },
+ {
+ lng: 115.10641886,
+ lat: 27.28026147
+ },
+ {
+ lng: 115.10642486,
+ lat: 27.27994712,
+ },
+ {
+ lng: 115.10640964,
+ lat: 27.27928393,
+ },
+ {
+ lng: 115.10639803,
+ lat: 27.27848014
+ }
]
let positions = modelPosition.map(i => [i.lng, i.lat, i.ele || 64].join(',')).join(';')
@@ -211,10 +202,18 @@
const synth = window.speechSynthesis
+
const speak = (msg, continueFun = () => { }) => {
let u = new SpeechSynthesisUtterance()
- u.lang = 'zh-TW'
+ let voices = synth.getVoices()
u.text = msg
+ u.rate = 2
+ let findObj = voices.some(voice => voice.lang == 'zh-CN')
+
+ if (!findObj) {
+ u.lang = 'zh-TW'
+ }
+
u.onend = () => {
continueFun()
}
@@ -347,25 +346,25 @@
}
const createLinePath = (item, cb = () => { }) => {
- lineTime = setTimeout(() => {
- let polyline = new DC.Polyline(item.linePosition)
- polyline.setStyle({
- width: 20,
- material: new DC.PolylineImageTrailMaterialProperty({
- color: DC.Color.RED,
- speed: 20,
- image: VITE_APP_BASE + 'img/mapicon/right.png',
- repeat: { x: 5, y: 1 }
- }),
- clampToGround: false
- })
+ let polyline = new DC.Polyline(item.linePosition)
+ polyline.setStyle({
+ width: 20,
+ material: new DC.PolylineImageTrailMaterialProperty({
+ color: DC.Color.RED,
+ speed: 20,
+ image: VITE_APP_BASE + 'img/mapicon/right.png',
+ repeat: { x: 5, y: 1 }
+ }),
+ clampToGround: false
+ })
- dynamicLineVectorLayer.addOverlay(polyline)
+ dynamicLineVectorLayer.addOverlay(polyline)
- window.$viewer.flyToPosition(new DC.Position(item.lineCenter.lng, item.lineCenter.lat, 400, 0, -90, 0), () => {
+ window.$viewer.flyToPosition(new DC.Position(item.lineCenter.lng, item.lineCenter.lat, 400, 0, -90, 0), () => {
+ lineTime = setTimeout(() => {
cb()
- }, 3)
- }, item.lineTime)
+ }, item.lineTime)
+ }, 3)
}
const schemeStart = (item) => {
--
Gitblit v1.9.3