| | |
| | | * @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-02 21:53:13 |
| | | * @FilePath: \bigScreen\src\views\pd\components\dynamicPanel.vue |
| | | * @Description: |
| | | * |
| | |
| | | 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: '关闭绿源污水处理厂旁雨水排口,拦截污染水体。', |
| | |
| | | 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: '园区关闭北区雨水排口,拦截污染水体。', |
| | |
| | | |
| | | 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() |
| | | } |
| | |
| | | } |
| | | |
| | | 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) => { |