From d6fb3b57e22a4dbf33aad48cdfd81814c36afe08 Mon Sep 17 00:00:00 2001 From: zh <972939975@qq.com> Date: Wed, 5 Nov 2025 18:24:35 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- src/main/index.ts | 155 ++++---- src/renderer/components.d.ts | 7 +- src/renderer/public/startUp/startUp.html | 13 +- src/renderer/public/tree/jquery.ztree.core.js | 2 +- src/renderer/src/I18n/zh-CN.ts | 9 +- src/renderer/src/I18n/zh-EN.ts | 7 + src/renderer/src/I18n/zh-TW.ts | 9 +- src/renderer/src/assets/styles/global.css | 155 +++++++- .../src/components/dialog/directory.vue | 4 +- src/renderer/src/views/TS/components/grid.vue | 1 + .../src/views/TS/components/rightMenuTs.vue | 1 + src/renderer/src/views/TS/deduction.vue | 8 +- src/renderer/src/views/TS/edit.vue | 10 +- src/renderer/src/views/TS/element.vue | 1 + src/renderer/src/views/TS/list.vue | 10 +- src/renderer/src/views/TS/newEvent.vue | 1 + src/renderer/src/views/TS/newPlan.vue | 1 + .../components/bottomSide/bottomSide.vue | 23 +- .../headers/components/setTool/setTool.vue | 32 +- .../components/leftSide/leftSideFirst.vue | 6 +- .../components/leftSide/leftSideSecond.vue | 32 +- .../views/components/propertyBox/FlyRoam.vue | 4 +- .../propertyBox/GoodsSearchCircle.vue | 4 +- .../components/propertyBox/addGroundText.vue | 4 +- .../components/propertyBox/addStandText.vue | 3 + .../propertyBox/trajectoryMotion.vue | 3 +- .../views/components/tree/hooks/treeNode.ts | 65 ++-- .../src/views/components/tree/index.vue | 6 +- src/renderer/src/views/login/index.vue | 342 +++++++++++------- 30 files changed, 580 insertions(+), 340 deletions(-) diff --git a/package.json b/package.json index 4f4087f..af4dff4 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "dzsp_shijingjun_offline_Y_save", "version": "v4.0.0", - "description": "An Electron application with Vue and TypeScript", + "description": "", "main": "./out/main/index.js", "author": "example.com", "homepage": "https://electron-vite.org", diff --git a/src/main/index.ts b/src/main/index.ts index 21412b1..1fcc74d 100644 --- a/src/main/index.ts +++ b/src/main/index.ts @@ -72,6 +72,7 @@ stopBatPath = process.platform === 'win32' ? stopBatPath.replace(/^(\w:)/, '/$1' // ? `${join(app.getAppPath(), 'src/renderer/public/startUp/startUp.html')}` // : `file://${join(app.getAppPath(), 'resources/app.asar/out/renderer/startUp/startUp.html')}` let isRestart = false +let mainWindow; function createWindow(): void { // Create the browser window. @@ -98,10 +99,10 @@ function createWindow(): void { splashWindow.loadURL(splashURL) splashWindow.show() // 创建主窗口(保持原有配置,但先不显示) - const mainWindow = new BrowserWindow({ - // minWidth: 1780, // 添加最小宽度限制 - // minHeight: 920, // 添加最小高度限制 - // fullscreen: true, + mainWindow = new BrowserWindow({ + minWidth: 1280, // 添加最小宽度限制 + minHeight: 768, // 添加最小高度限制 + fullscreen: true, show: false, frame: true, autoHideMenuBar: true, @@ -429,77 +430,9 @@ function createWindow(): void { } } -// This method will be called when Electron has finished -// initialization and is ready to create browser windows. -// Some APIs can only be used after this event occurs. -app.whenReady().then(() => { - // alert(devSplashURL) - // alert(prodSplashURL) - // dialog.showMessageBox({ - // type: 'info', - // title: '信息1', - // message: devSplashURL, - // buttons: ['确定'] - // }) - // 执行批处理文件 - exec(startBatPath.substring(1, 200), (error, stdout, stderr) => { - if (error) { - console.error(`执行错误: ${error.message}`); - return; - } - if (stderr) { - console.error(`错误输出: ${stderr}`); - return; - } - console.log(`批处理输出: ${stdout}`); - }); - // Set app user model id for windows - electronApp.setAppUserModelId('com.electron') - - // Default open or close DevTools by F12 in development - // and ignore CommandOrControl + R in production. - // see https://github.com/alex8088/electron-toolkit/tree/master/packages/utils - app.on('browser-window-created', (_, window) => { - optimizer.watchWindowShortcuts(window) - }) - - // IPC test - ipcMain.on('ping', () => console.log('pong')) - - createWindow() - - app.on('activate', function () { - // On macOS it's common to re-create a window in the app when the - // dock icon is clicked and there are no other windows open. - if (BrowserWindow.getAllWindows().length === 0) createWindow() - }) -}) - -// Quit when all windows are closed, except on macOS. There, it's common -// for applications and their menu bar to stay active until the user quits -// explicitly with Cmd + Q. -// app.on('window-all-closed', () => { -// if (process.platform !== 'darwin') { -// getServer().close(() => { -// // 关闭后台服务 -// exec(stopBatPath.substring(1, 200), () => { -// app.quit() -// }); -// }) -// } -// }) -// 退出时注销所有快捷键 -app.on('will-quit', () => { - globalShortcut.unregisterAll() -}) - // 用于跟踪是否正在执行退出流程 let isQuitting = false; -app.on('window-all-closed', () => { - windowAllClosed() -}); - function windowAllClosed() { // 防止重复触发退出流程 if (isQuitting) return; @@ -581,10 +514,80 @@ function closeAllWindows() { }); } -console.log('=================================================') -global.sharedObject = { - hasService: false, -}; +const gotTheLock = app.requestSingleInstanceLock(); + +if (!gotTheLock) { + app.quit(); +} else { + if (app.isReady()) { + } + + app.whenReady().then(() => { + // alert(devSplashURL) + // alert(prodSplashURL) + // dialog.showMessageBox({ + // type: 'info', + // title: '信息1', + // message: devSplashURL, + // buttons: ['确定'] + // }) + // 执行批处理文件 + exec(startBatPath.substring(1, 200), (error, stdout, stderr) => { + if (error) { + console.error(`执行错误: ${error.message}`); + return; + } + if (stderr) { + console.error(`错误输出: ${stderr}`); + return; + } + console.log(`批处理输出: ${stdout}`); + }); + // Set app user model id for windows + electronApp.setAppUserModelId('com.electron') + + // Default open or close DevTools by F12 in development + // and ignore CommandOrControl + R in production. + // see https://github.com/alex8088/electron-toolkit/tree/master/packages/utils + app.on('browser-window-created', (_, window) => { + optimizer.watchWindowShortcuts(window) + }) + + // IPC test + ipcMain.on('ping', () => console.log('pong')) + + createWindow() + + app.on('activate', function () { + // On macOS it's common to re-create a window in the app when the + // dock icon is clicked and there are no other windows open. + if (BrowserWindow.getAllWindows().length === 0) createWindow() + }) + }) + + // 退出时注销所有快捷键 + app.on('will-quit', () => { + globalShortcut.unregisterAll() + }) + + app.on('window-all-closed', () => { + windowAllClosed() + }); + + app.on("second-instance", () => { + // 当运行第二个实例时,将会聚焦到myWindow这个窗口 + if (mainWindow) { + if (mainWindow.isMinimized()) mainWindow.restore(); + mainWindow.focus(); + } + }); + + + // testNapi() + global.sharedObject = { + hasService: false, + }; +} // In this file you can include the rest of your app's specific main process // code. You can also put them in separate files and require them here. diff --git a/src/renderer/components.d.ts b/src/renderer/components.d.ts index c553028..37cb211 100644 --- a/src/renderer/components.d.ts +++ b/src/renderer/components.d.ts @@ -11,8 +11,6 @@ declare module 'vue' { BaseDialog: typeof import('./src/components/dialog/baseDialog.vue')['default'] Directory: typeof import('./src/components/dialog/directory.vue')['default'] DirectoryEdit: typeof import('./src/components/dialog/directoryEdit.vue')['default'] - ElAutoResizer: typeof import('element-plus/es')['ElAutoResizer'] - ElBotton: typeof import('element-plus/es')['ElBotton'] ElButton: typeof import('element-plus/es')['ElButton'] ElCard: typeof import('element-plus/es')['ElCard'] ElCheckbox: typeof import('element-plus/es')['ElCheckbox'] @@ -28,18 +26,15 @@ declare module 'vue' { ElOption: typeof import('element-plus/es')['ElOption'] ElPagination: typeof import('element-plus/es')['ElPagination'] ElPopconfirm: typeof import('element-plus/es')['ElPopconfirm'] - ElRadio: typeof import('element-plus/es')['ElRadio'] - ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup'] ElRow: typeof import('element-plus/es')['ElRow'] ElSelect: typeof import('element-plus/es')['ElSelect'] ElSlider: typeof import('element-plus/es')['ElSlider'] ElSwitch: typeof import('element-plus/es')['ElSwitch'] ElTable: typeof import('element-plus/es')['ElTable'] ElTableColumn: typeof import('element-plus/es')['ElTableColumn'] - ElTableV2: typeof import('element-plus/es')['ElTableV2'] ElTabPane: typeof import('element-plus/es')['ElTabPane'] ElTabs: typeof import('element-plus/es')['ElTabs'] - ElTimePicker: typeof import('element-plus/es')['ElTimePicker'] + ElTooltip: typeof import('element-plus/es')['ElTooltip'] ElTree: typeof import('element-plus/es')['ElTree'] ElUpload: typeof import('element-plus/es')['ElUpload'] Index_b: typeof import('./src/components/SvgIcon/index_b.vue')['default'] diff --git a/src/renderer/public/startUp/startUp.html b/src/renderer/public/startUp/startUp.html index 98e6e60..fa24297 100644 --- a/src/renderer/public/startUp/startUp.html +++ b/src/renderer/public/startUp/startUp.html @@ -28,7 +28,7 @@ } .progress-container { - width: 400px; + width: 334px; text-align: center; } @@ -52,7 +52,7 @@ } .progress-bar-container { - height: 16px; + height: 12px; /* background-color: #222; */ border-radius: 14px 0px 14px 0px; overflow: hidden; @@ -136,12 +136,11 @@ .box_middle_content { width: 400px; - color: #ADF1FF; + color: #e6f7ff; font-size: 20px; font-weight: 400; letter-spacing: 0px; line-height: 27px; - color: rgba(var(--color-text2), 1); text-align: justify; vertical-align: top; font-family: 'Alibaba'; @@ -161,13 +160,13 @@
- 实景三维数字孪生系统 + 实景三维电子沙盘系统
- 欢迎进入 - 实景三维数字孪生系统 + 欢迎使用 + 实景三维电子沙盘系统
diff --git a/src/renderer/public/tree/jquery.ztree.core.js b/src/renderer/public/tree/jquery.ztree.core.js index 440becc..2937bdc 100644 --- a/src/renderer/public/tree/jquery.ztree.core.js +++ b/src/renderer/public/tree/jquery.ztree.core.js @@ -1567,7 +1567,7 @@ : node.iconClose : node[setting.data.key.icon] if (icon || node.svg) - icoStyle.push('background:url(', node.svg ? '' : icon, ') 0 0 no-repeat;') + icoStyle.push("background:url(", (node.svg ? '':icon), ") 0 0 no-repeat;"); if ( setting.view.showIcon == false || !tools.apply(setting.view.showIcon, [setting.treeId, node], true) diff --git a/src/renderer/src/I18n/zh-CN.ts b/src/renderer/src/I18n/zh-CN.ts index 3b36710..b40f152 100644 --- a/src/renderer/src/I18n/zh-CN.ts +++ b/src/renderer/src/I18n/zh-CN.ts @@ -134,7 +134,7 @@ export default { panel: '面', ellipse: '椭圆', sector: '扇形', - circle: '圆', + circle: '正圆', attackArrow: '箭头', pincerArrow: '双箭头', rendezvous: '集结地', @@ -142,6 +142,13 @@ export default { unLock: '解锁', Lock: '锁定' }, + default: { + point: '点标注', + line: '线标注', + curve: '曲线标注', + panel: '面标注', + roam: '漫游路径', + }, system: { systemTitle: '系统面板', authorize: '授权信息', diff --git a/src/renderer/src/I18n/zh-EN.ts b/src/renderer/src/I18n/zh-EN.ts index 741089d..15ef468 100644 --- a/src/renderer/src/I18n/zh-EN.ts +++ b/src/renderer/src/I18n/zh-EN.ts @@ -141,6 +141,13 @@ export default { unLock: 'UnLock', Lock: 'Lock' }, + default: { + point: 'Point', + line: 'Line', + curve: 'Curve', + panel: 'Panel', + roam: 'roam', + }, system: { systemTitle: 'Settings', authorize: 'Authorization Information', diff --git a/src/renderer/src/I18n/zh-TW.ts b/src/renderer/src/I18n/zh-TW.ts index 58ab7c3..25d3afc 100644 --- a/src/renderer/src/I18n/zh-TW.ts +++ b/src/renderer/src/I18n/zh-TW.ts @@ -133,7 +133,7 @@ export default { panel: '面', ellipse: '橢圓', sector: '扇形', - circle: '圓', + circle: '正圓', attackArrow: '箭頭', pincerArrow: '雙箭頭', rendezvous: '集結地', @@ -141,6 +141,13 @@ export default { unLock: '解鎖', Lock: '鎖定' }, + default: { + point: '點標注', + line: '線標注', + curve: '曲線標注', + panel: '面標注', + roam: '漫遊路徑', + }, system: { systemTitle: '系統面板', authorize: '授權信息', diff --git a/src/renderer/src/assets/styles/global.css b/src/renderer/src/assets/styles/global.css index 62efca4..4d28040 100644 --- a/src/renderer/src/assets/styles/global.css +++ b/src/renderer/src/assets/styles/global.css @@ -361,6 +361,24 @@ img { border: none !important; } +.login-select-popper { + border: 1px solid var(--el-border-color-light) !important; + box-shadow: var(--el-box-shadow-light) !important; + + .el-select-dropdown { + background: #fff !important; + } + .el-select-dropdown__item { + color: rgba(51, 51, 51, 1) !important; + font-size: 14px !important; + } + .el-select-dropdown__item.is-selected, .el-select-dropdown__item.is-hovering { + background-color: #f5f7fa !important; + color: rgba(0, 66, 66, 1) !important; + } +} + + /* 树 */ .ztree li span.button.ico_docu { background: url(../images/tree/folder-empty.png) 0 0 no-repeat; @@ -388,11 +406,13 @@ img { #app { .ztree * { + font-size: 14px; font-family: SourceHanSans; } .ztree li a { color: #ffffff; + margin-bottom: 6px; } .ztree li a.curSelectedNode { @@ -400,6 +420,7 @@ img { border: none; color: rgba(var(--color-base1), 1); opacity: 1; + .svg-icon { color: rgba(var(--color-base1), 1) !important; } @@ -438,8 +459,10 @@ img { background: linear-gradient(180deg, rgba(var(--color-base1), 0.2) 0%, rgba(var(--color-base1), 0) 100%), rgba(0, 0, 0, 0.6); backdrop-filter: blur(10px); } + .compass-gyro { fill: rgba(var(--color-base1), 1); + .cesium-svgPath-svg { scale: 0.8; } @@ -468,6 +491,133 @@ img { } } +.el-popper.is-customized { + padding: 2px 6px; + background: rgba(0, 0, 0, 0.6); + pointer-events: none; +} + +.el-popper.is-customized::before { + content: " "; + width: 100%; + height: 100%; + position: absolute; + top: 0; + left: 0; + border-radius: var(--el-popper-border-radius); + background: rgba(var(--color-base1), 0.2); + z-index: -1; +} + +.el-popper.is-customized>.el-popper__arrow::before { + background: #ff000000 !important; + margin: 0; + right: 0; + width: 0; + height: 0; + border: 5px solid rgba(var(--color-base1), 0.2) !important; + border-bottom-color: transparent !important; + border-right-color: transparent !important; +} + +.el-popper.is-customized>.el-popper__arrow::after { + box-sizing: border-box; + content: " "; + height: 10px; + position: absolute; + transform: rotate(45deg); + z-index: -2; + background: #ff000000; + margin: 0; + right: 0; + width: 0; + height: 0; + border: 5px solid rgba(0, 0, 0, 0.6); + border-bottom-color: transparent !important; + border-right-color: transparent !important; +} + +#app { + .distance-legend { + background-color: rgba(0, 0, 0, 0); + border: none; + bottom: 70px; + .distance-legend-label { + color: rgba(var(--color-base1), 1); + -webkit-text-stroke-width: 0.3px; + -webkit-text-stroke-color: #000; + font-size: 18px; + font-weight: 700; + } + .distance-legend-scale-bar { + border-left: 1px solid rgba(var(--color-base1), 1); + border-right: 1px solid rgba(var(--color-base1), 1); + border-bottom: 1px solid rgba(var(--color-base1), 1); + top: 18px !important; + /* border: none; + background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHkAAAAPCAYAAADAgWCVAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAABvSURBVFiF7dExEcAgEETRhUigQUaEHCquTYcI5ERB6jigQE1UMDeT3afgz/wDvd8o5cRaD+RfzAZauzLca3SLbORec3SD7KfJBDSZgCYT0GQCmkxAkwloMgFNJqDJBDSZQMKcb3SE7JVgNqIjZK8PafgL7TYPzBoAAAAASUVORK5CYII=") no-repeat; + background-size: 100% 100%; + height: 14px; */ + } + } + .cesium-performanceDisplay-defaultContainer { + bottom: 71px !important; + right: 15px !important; + .cesium-performanceDisplay { + background: linear-gradient(0deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), linear-gradient(180deg, rgba(var(--color-base1), 0.2) 0%, rgba(var(--color-base1), 0) 100%); + border-color: rgba(var(--color-base1), 1); + } + } + .cesium-info { + right: 245px !important; + bottom: 72px !important; + font-size: 12px !important; + flex-direction: column !important; + padding-bottom: 10px !important; + border-radius: 0 !important; + border: 1px solid rgba(var(--color-base1), 0.5); + background: linear-gradient(180deg, rgba(var(--color-base1), 0.2) 0%, rgba(var(--color-base1), 0) 100%), rgba(0, 0, 0, 0.6) !important; + } + .cesium-info>div:nth-child(1)::before { + content: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAABkSURBVDiN7dBBCoAwDETRjxczN8vR6s3GTZFKm1jElXSgmxIeycDKCgCSTJJ/gRT18Wk8QUqFRrhFyAhSu00yc+EbsANW3yjt/5EcaNW6bepJb1EV1p0d9OlBb/PIA/4eWPlZToLnA8jkPBbrAAAAAElFTkSuQmCC"); + margin-right: 8px; + position: relative; + top: 6px; + } + .cesium-info>div:nth-child(2)::before { + content: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAACkSURBVDiNrZNRDsMgDEPJ1HstN0M7Gd3JvA/CSlsWDMw/larwZJsQAiEACiAys5QAJABgZh+DYF0GGqSAniMGfgETDqXevBDAU3ci4p5xI7c66912r8P/rUoIOa4p1l3OwvR6EQaGF9uLXFZkr/6pfd+zLr/rUrmbi2zAiLvcXRx6eqbXpL+shkNdBUY2LgvUEXfdDkVkX3Z1VXkpzOxGMulF/gCoY8eTaDSlggAAAABJRU5ErkJggg=="); + margin-right: 8px; + position: relative; + top: 6px; + } + .cesium-info>div:nth-child(3)::before { + content: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAECSURBVDiN1ZQxTsQwEEWfCRUlQuIQNNwgOQANh9hDbAUNHIEWcQQK6hUSNZRLgfYENEiIDj0KHOQNdjZe0fArO+N8/ZkXB/5YAUA9+FUI4XVrV3Wmvqj36p16Mqh36lmt6bV6VKgtVKf47CTrQ2CmzquSjBgCrIBl5lwHMKXt3WT9BjwCz2oTQviMJt22CfeAC+BmcKYdJp2kEpQeSK+ahPtEKGpTSpWOIDeOUSiF+bVJbTEElUL5IELJmOQ0Tly9TW5KE5+tzS9Rt3GuOSgjhk+D/U/aTTelKzR0XOq0CKXygz5fM4y/r/6mPMR9m321oD5AT/mU7zYugXfgqsbsf+kLw8LzMSWqfwIAAAAASUVORK5CYII="); + margin-right: 8px; + position: relative; + top: 6px; + } + + #mapxDiv { + bottom: 126px !important; + right: 16px !important; + } +} + +@media (max-height: 850px) { + #distanceLegendDiv { + .compass { + scale: 0.8; + left: 25px; + } + + .navigation-controls { + scale: 0.8; + top: 225px; + left: 22px; + } + } +} + /* 提示 */ /* .el-message--info { @@ -644,6 +794,7 @@ img { .el-message--error svg { color: rgba(241, 108, 85, 1) !important; } -.el-popup-parent--hidden{ + +.el-popup-parent--hidden { width: 100% !important; -} +} \ No newline at end of file diff --git a/src/renderer/src/components/dialog/directory.vue b/src/renderer/src/components/dialog/directory.vue index e53e620..90285d1 100644 --- a/src/renderer/src/components/dialog/directory.vue +++ b/src/renderer/src/components/dialog/directory.vue @@ -145,8 +145,8 @@ const cancel = () => { right: 0; .box { - width: 20vw; - height: 10vw; + width: 380px; + height: 192px; display: flex; flex-direction: column; position: absolute; diff --git a/src/renderer/src/views/TS/components/grid.vue b/src/renderer/src/views/TS/components/grid.vue index 4a92c18..4296376 100644 --- a/src/renderer/src/views/TS/components/grid.vue +++ b/src/renderer/src/views/TS/components/grid.vue @@ -18,6 +18,7 @@