From 600b6c426cee124479358fa248f965123f0a2eae Mon Sep 17 00:00:00 2001 From: Fuyuu <1805498209@qq.com> Date: Wed, 24 Jan 2024 15:39:52 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81mqtt=E6=A8=A1=E5=9D=97=E4=BD=BF?= =?UTF-8?q?=E7=94=A8import=E6=96=B9=E6=B3=95=E5=BC=95=E5=85=A5=EF=BC=8C?= =?UTF-8?q?=E5=BC=83=E7=94=A8require=E6=96=B9=E6=B3=95=E5=92=8CCDN?= =?UTF-8?q?=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 2、优化船只点击信息窗口,当点击的为雷达船只时,展示不同内容 3、删除部分无用代码 --- build/vite/plugin/index.ts | 2 +- electron/electron.js | 35 +- index.html | 2 +- src/components/earthMap/AISInfoWindow.vue | 80 +- src/components/earthMap/ShowHideControl.vue | 72 - src/components/earthMap/TailAfterWindow.vue | 39 +- src/utils/earthMap/earthObj.ts | 12 +- src/utils/earthMap/listenMouseHandler.ts | 6 + src/utils/earthMap/shipDraw.ts | 125 +- src/utils/mqtt/mqttclient.js | 119 +- src/views/earthMap/edit/EarthComp.vue | 42 +- src/views/earthMap/edit/EarthComp20231225.vue | 2317 +++++++++-------- src/views/earthMap/edit/EarthCompTest.vue | 8 +- 13 files changed, 1411 insertions(+), 1448 deletions(-) diff --git a/build/vite/plugin/index.ts b/build/vite/plugin/index.ts index 58065a5..d3552ce 100644 --- a/build/vite/plugin/index.ts +++ b/build/vite/plugin/index.ts @@ -2,7 +2,7 @@ * @Author: Fuyuu 1805498209@qq.com * @Date: 2023-11-30 10:37:07 * @LastEditors: Fuyuu 1805498209@qq.com - * @LastEditTime: 2024-01-20 10:31:38 + * @LastEditTime: 2024-01-24 15:16:36 * @FilePath: \dt-admin-pc-v2\build\vite\plugin\index.ts * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE */ diff --git a/electron/electron.js b/electron/electron.js index 4c439e7..1aacbc3 100644 --- a/electron/electron.js +++ b/electron/electron.js @@ -105,12 +105,15 @@ function createWindow() { width: 800, height: 600, webPreferences: { - preload: path.join(__dirname, 'preload.js'), + // preload: path.join(__dirname, 'preload.js'), javascript: true, plugins: true, + allowRunningInsecureContent: true, // 允许web端使用node nodeIntegration: true, contextIsolation: false, + // 同源策略关闭 + webSecurity: false, }, }); @@ -147,18 +150,18 @@ app.on('window-all-closed', () => { } }); -// 在主进程中监听 webContents 的 did-create-window 事件 -app.on('web-contents-created', (event, webContents) => { - // 监听新窗口创建事件 - webContents.on('did-create-window', (Window, details) => { - console.log('Window---', Window); - // 在新窗口创建完成后重新加载预加载脚本 - Window.webContents.on('dom-ready', () => { - Window.webContents.executeJavaScript( - ` - console.log('window----',window) - ` - ); - }); - }); -}); +// // 在主进程中监听 webContents 的 did-create-window 事件 +// app.on('web-contents-created', (event, webContents) => { +// // 监听新窗口创建事件 +// webContents.on('did-create-window', (Window, details) => { +// console.log('Window---', Window); +// // 在新窗口创建完成后重新加载预加载脚本 +// Window.webContents.on('dom-ready', () => { +// Window.webContents.executeJavaScript( +// ` +// console.log('window----',window) +// ` +// ); +// }); +// }); +// }); diff --git a/index.html b/index.html index c7d7b73..fc814aa 100644 --- a/index.html +++ b/index.html @@ -11,7 +11,7 @@ - + <%= title %> diff --git a/src/components/earthMap/AISInfoWindow.vue b/src/components/earthMap/AISInfoWindow.vue index 67edf32..7edca67 100644 --- a/src/components/earthMap/AISInfoWindow.vue +++ b/src/components/earthMap/AISInfoWindow.vue @@ -2,12 +2,12 @@ * @Author: Fuyuu 1805498209@qq.com * @Date: 2024-01-05 14:18:33 * @LastEditors: Fuyuu 1805498209@qq.com - * @LastEditTime: 2024-01-20 14:57:59 + * @LastEditTime: 2024-01-24 11:20:17 * @FilePath: \dt-admin-pc-v2\src\components\earthMap\AISInfoWindow.vue * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE -->