diff --git a/src/components/map/fssm-map.vue b/src/components/map/fssm-map.vue index bcf40d3..2160b93 100644 --- a/src/components/map/fssm-map.vue +++ b/src/components/map/fssm-map.vue @@ -2,7 +2,7 @@ * @Author: SunTao 328867980@qq.com * @Date: 2024-10-14 10:46:23 * @LastEditors: SunTao 328867980@qq.com - * @LastEditTime: 2024-12-26 10:02:28 + * @LastEditTime: 2025-01-02 10:33:02 * @FilePath: \znxjxt-ui\src\components\map\fssm-map.vue * @Description: 公共地图 --> @@ -335,7 +335,9 @@ export default { }), visible: true, }); - map.addLayer(tianditu_cva_c, tianditu_vec_c, tianditu_img_c); + map.addLayer(tianditu_cva_c); + map.addLayer(tianditu_vec_c); + map.addLayer(tianditu_img_c); } else { // 外网 tianditu_cva_c = new TileLayer({ @@ -348,7 +350,8 @@ export default { }), visible: true, }); - map.addLayer(tianditu_cva_c, tianditu_img_c); + map.addLayer(tianditu_cva_c); + map.addLayer(tianditu_img_c); } // 图层点击事件 map.on("singleclick", (e) => { diff --git a/src/views/big-screen/index.vue b/src/views/big-screen/index.vue index f68e692..d644e03 100644 --- a/src/views/big-screen/index.vue +++ b/src/views/big-screen/index.vue @@ -2,7 +2,7 @@ * @Author: SunTao 328867980@qq.com * @Date: 2024-10-17 11:34:00 * @LastEditors: SunTao 328867980@qq.com - * @LastEditTime: 2024-12-31 11:35:20 + * @LastEditTime: 2025-01-02 10:37:46 * @FilePath: \znxjxt-ui\src\views\big-screen\index.vue * @Description: 大屏首页 --> @@ -1594,14 +1594,14 @@ export default { const currentLocation = item.getGeometry().getCoordinates(); const targetLocation = itemMessage.data.location; // 计算两点之间的差值 - const dx = (targetLocation[0] * 1 - currentLocation[0] * 1) / 100; - const dy = (targetLocation[1] * 1 - currentLocation[1] * 1) / 100; + const dx = (targetLocation[0] * 1 - currentLocation[0] * 1) / 20; + const dy = (targetLocation[1] * 1 - currentLocation[1] * 1) / 20; // 设置计数器 let count = 0; - // 创建定时器,每10ms移动一次,总共移动100次,约1秒完成 + // 创建定时器,每50ms移动一次,总共移动20次,约1秒完成 const timer = setInterval(() => { count++; - if (count >= 100) { + if (count >= 20) { clearInterval(timer); return; } @@ -1626,7 +1626,7 @@ export default { }), }), ]); - }, 10); + }, 50); } }); } else { diff --git a/src/views/big-screen/overview-components/components/inspection-follow.vue b/src/views/big-screen/overview-components/components/inspection-follow.vue index e7768f1..90f4962 100644 --- a/src/views/big-screen/overview-components/components/inspection-follow.vue +++ b/src/views/big-screen/overview-components/components/inspection-follow.vue @@ -67,15 +67,15 @@ export default { const targetLocation = itemMessage.data.location; // 计算两点之间的差值 const dx = - (targetLocation[0] * 1 - currentLocation[0] * 1) / 100; + (targetLocation[0] * 1 - currentLocation[0] * 1) / 20; const dy = - (targetLocation[1] * 1 - currentLocation[1] * 1) / 100; + (targetLocation[1] * 1 - currentLocation[1] * 1) / 20; // 设置计数器 let count = 0; - // 创建定时器,每10ms移动一次,总共移动100次,约1秒完成 + // 创建定时器,每50ms移动一次,总共移动20次,约1秒完成 const timer = setInterval(() => { count++; - if (count >= 100) { + if (count >= 20) { clearInterval(timer); return; } @@ -100,7 +100,7 @@ export default { }), }), ]); - }, 10); + }, 50); } }); } else {