This commit is contained in:
zh
2025-12-12 10:17:07 +08:00
parent 6b398f9e63
commit 4d744cea47
23 changed files with 79 additions and 62 deletions

View File

@ -8,7 +8,6 @@ files:
- 'package.json' - 'package.json'
- 'resources/**/*' - 'resources/**/*'
- '!resources/java/app/license/*' - '!resources/java/app/license/*'
- '!resources/java/app/lib/*'
- '!resources/java/app/logs/*' - '!resources/java/app/logs/*'
- '!resources/java/app/poi/*' - '!resources/java/app/poi/*'
- '!resources/java/app/upload/*' - '!resources/java/app/upload/*'

View File

@ -1,9 +1,40 @@
Var D_DRIVE_EXISTS
Var defaultInstallDir
!macro preInit !macro preInit
StrCpy $D_DRIVE_EXISTS 0
StrCpy $defaultInstallDir "$PROGRAMFILES\${APP_ID}"
FindFirst $R0 $R1 "D:\*.*"
${If} $R0 != ""
StrCpy $D_DRIVE_EXISTS 1
StrCpy $defaultInstallDir "D:\ProgramFiles\${APP_ID}"
FindClose $R0
${EndIf}
${If} $D_DRIVE_EXISTS == 0
${EndIf}
SetRegView 64 SetRegView 64
WriteRegExpandStr HKLM "${INSTALL_REGISTRY_KEY}" InstallLocation "D:\ProgramFiles\dzsp_shijingjun_offline_Y_save" WriteRegExpandStr HKLM "${INSTALL_REGISTRY_KEY}" InstallLocation "$defaultInstallDir"
WriteRegExpandStr HKCU "${INSTALL_REGISTRY_KEY}" InstallLocation "D:\ProgramFiles\dzsp_shijingjun_offline_Y_save" WriteRegExpandStr HKCU "${INSTALL_REGISTRY_KEY}" InstallLocation "$defaultInstallDir"
#writeUninstaller $INSTDIR\uninstaller.exe #writeUninstaller $INSTDIR\uninstaller.exe
SetRegView 32 SetRegView 32
WriteRegExpandStr HKLM "${INSTALL_REGISTRY_KEY}" InstallLocation "D:\ProgramFiles\dzsp_shijingjun_offline_Y_save" WriteRegExpandStr HKLM "${INSTALL_REGISTRY_KEY}" InstallLocation "$defaultInstallDir"
WriteRegExpandStr HKCU "${INSTALL_REGISTRY_KEY}" InstallLocation "D:\ProgramFiles\dzsp_shijingjun_offline_Y_save" WriteRegExpandStr HKCU "${INSTALL_REGISTRY_KEY}" InstallLocation "$defaultInstallDir"
!macroend
!macro customUnInstall
SetRegView 64
DeleteRegKey HKLM "${INSTALL_REGISTRY_KEY}"
DeleteRegKey HKCU "${INSTALL_REGISTRY_KEY}"
SetRegView 32
DeleteRegKey HKLM "${INSTALL_REGISTRY_KEY}"
DeleteRegKey HKCU "${INSTALL_REGISTRY_KEY}"
Delete "$APPDATA\${APP_ID}\*.*"
RMDir /r "$APPDATA\${APP_ID}"
Delete "$LOCALAPPDATA\${APP_ID}\*.*"
RMDir /r "$LOCALAPPDATA\${APP_ID}"
!macroend !macroend

View File

@ -1,7 +1,7 @@
server: server:
host: 127.0.0.1 host: 127.0.0.1
port: 8849 port: 8849
path: C:\Users\Administrator\AppData\Roaming\dzsp_shijingjun_offline_Y_save path: C:\Users\MSI\AppData\Roaming\dzsp_shijingjun_offline_Y_save
poi: poi:
global: global:
enabled: false enabled: false

View File

@ -581,40 +581,22 @@ function windowAllClosed() {
console.log('所有窗口已关闭,执行清理脚本...'); console.log('所有窗口已关闭,执行清理脚本...');
getServer().close(() => { getServer().close(() => {
// 执行批处理文件
const cleanupProcess = spawn('cmd.exe', ['/c', stopBatPath.substring(1, 200)], {
const vbsScript = `
Set WshShell = CreateObject("WScript.Shell")
WshShell.Run "${stopBatPath.substring(1, 200)}", 0, False
Set WshShell = Nothing
`;
const vbsPath = path.join(os.tmpdir(), 'run_bat_hidden.vbs');
require('fs').writeFileSync(vbsPath, vbsScript, 'utf8');
// 2. 执行 VBS 脚本(零窗口)
const batProcess = spawn('wscript.exe', [vbsPath], {
detached: true,
stdio: 'ignore', stdio: 'ignore',
windowsHide: true, windowsHide: true,
}); });
cleanupProcess.on('exit', (code) => {
if (code === 0) {
console.log(code)
} else {
console.log(`脚本执行失败,退出码:${code}`);
}
});
batProcess.unref(); cleanupProcess.on('error', (error) => {
console.log('error', error)
});
// // 执行批处理文件
// const cleanupProcess = exec(stopBatPath.substring(1, 200), (error, stdout, stderr) => { // const cleanupProcess = exec(stopBatPath.substring(1, 200), (error, stdout, stderr) => {
// if (error) { // if (error) {
// console.error(`清理脚本执行失败: ${error.message}`); // console.error(`清理脚本执行失败: ${error.message}`);
@ -630,12 +612,11 @@ Set WshShell = Nothing
// } // }
// }); // });
// // 监听子进程退出事件(确保即使脚本出错也能退出) cleanupProcess.unref();
// cleanupProcess.on('exit', (code) => {
// console.log(`清理脚本退出,代码: ${code}`);
// });
forceQuit(); setTimeout(() => {
forceQuit();
}, 500);
}) })
} }

File diff suppressed because one or more lines are too long

View File

@ -102,6 +102,7 @@ setupStore(setApp)
setupSvgIcon(setApp) setupSvgIcon(setApp)
setApp.use(EventBusPlugin) setApp.use(EventBusPlugin)
setApp.use(router) setApp.use(router)
// @ts-ignore
setApp.use(elTableInfiniteScroll) setApp.use(elTableInfiniteScroll)
setApp.use(ElementPlus, { setApp.use(ElementPlus, {
locale: zhCn locale: zhCn

View File

@ -310,7 +310,7 @@ const closeCallback = () => {
entityOptions.value.originalOptions = structuredClone(originalOptions) entityOptions.value.originalOptions = structuredClone(originalOptions)
that.positionEditing = false that.positionEditing = false
entityOptions.value.closeNodeEdit() entityOptions.value.closeNodeEdit()
entityOptions.value.reset() that.reset()
eventBus.emit("destroyComponent") eventBus.emit("destroyComponent")
} }

View File

@ -472,7 +472,7 @@ const closeCallback = () => {
entityOptions.value.originalOptions = structuredClone(originalOptions) entityOptions.value.originalOptions = structuredClone(originalOptions)
that.positionEditing = false that.positionEditing = false
entityOptions.value.closeNodeEdit() entityOptions.value.closeNodeEdit()
entityOptions.value.reset() that.reset()
eventBus.emit('destroyComponent') eventBus.emit('destroyComponent')
} }
const confirm = () => { const confirm = () => {

View File

@ -654,10 +654,10 @@ const toggleGroup = (type: string) => {
var backButShow: any = ref(false) var backButShow: any = ref(false)
//根据角色权限控制后台管理按钮显隐 //根据角色权限控制后台管理按钮显隐
let option = JSON.parse(localStorage.getItem('frontFunctionArr')) let option = JSON.parse(localStorage.getItem('frontFunctionArr') || '{}')
option = Object.keys(option) option = Object.keys(option)
//数据权限 //数据权限
let data = JSON.parse(localStorage.getItem('frontDataArr')) let data = JSON.parse(localStorage.getItem('frontDataArr') || '[]')
if (option.length == 0 && data.length == 0) { if (option.length == 0 && data.length == 0) {
//管理员 //管理员
backButShow.value = true backButShow.value = true

View File

@ -311,7 +311,7 @@ const closeCallback = () => {
entityOptions.value.originalOptions = structuredClone(originalOptions) entityOptions.value.originalOptions = structuredClone(originalOptions)
that.positionEditing = false that.positionEditing = false
entityOptions.value.closeNodeEdit() entityOptions.value.closeNodeEdit()
entityOptions.value.reset() that.reset()
eventBus.emit("destroyComponent") eventBus.emit("destroyComponent")
} }

View File

@ -327,7 +327,7 @@ const closeCallback = () => {
entityOptions.value.originalOptions = structuredClone(originalOptions) entityOptions.value.originalOptions = structuredClone(originalOptions)
that.positionEditing = false that.positionEditing = false
entityOptions.value.closeNodeEdit() entityOptions.value.closeNodeEdit()
entityOptions.value.reset() that.reset()
eventBus.emit("destroyComponent") eventBus.emit("destroyComponent")
} }

View File

@ -461,7 +461,7 @@ const closeCallback = () => {
entityOptions.value.originalOptions = structuredClone(originalOptions) entityOptions.value.originalOptions = structuredClone(originalOptions)
that.positionEditing = false that.positionEditing = false
entityOptions.value.closeNodeEdit() entityOptions.value.closeNodeEdit()
entityOptions.value.reset() that.reset()
eventBus.emit('destroyComponent') eventBus.emit('destroyComponent')
} }
const confirm = () => { const confirm = () => {

View File

@ -81,7 +81,7 @@ let that: any
const closeCallback = () => { const closeCallback = () => {
entityOptions.value.originalOptions = structuredClone(originalOptions) entityOptions.value.originalOptions = structuredClone(originalOptions)
that.positionEditing = false that.positionEditing = false
entityOptions.value.reset() that.reset()
eventBus.emit("destroyComponent") eventBus.emit("destroyComponent")
} }
const open = async (id: any) => { const open = async (id: any) => {

View File

@ -102,7 +102,7 @@ let that: any
const closeCallback = () => { const closeCallback = () => {
entityOptions.value.originalOptions = structuredClone(originalOptions) entityOptions.value.originalOptions = structuredClone(originalOptions)
that.positionEditing = false that.positionEditing = false
entityOptions.value.reset() that.reset()
eventBus.emit("destroyComponent") eventBus.emit("destroyComponent")
} }
const open = async (id: any) => { const open = async (id: any) => {

View File

@ -345,7 +345,7 @@ const closeCallback = () => {
entityOptions.value.originalOptions = structuredClone(originalOptions) entityOptions.value.originalOptions = structuredClone(originalOptions)
that.positionEditing = false that.positionEditing = false
// entityOptions.value.closeNodeEdit() // entityOptions.value.closeNodeEdit()
entityOptions.value.reset() that.reset()
eventBus.emit('destroyComponent') eventBus.emit('destroyComponent')
} }

View File

@ -722,7 +722,7 @@ const closeCallback = () => {
entityOptions.value.originalOptions = structuredClone(originalOptions) entityOptions.value.originalOptions = structuredClone(originalOptions)
that.positionEditing = false that.positionEditing = false
// entityOptions.value.closeNodeEdit() // entityOptions.value.closeNodeEdit()
entityOptions.value.reset() that.reset()
eventBus.emit('destroyComponent') eventBus.emit('destroyComponent')
} }

View File

@ -308,7 +308,7 @@ const closeCallback = () => {
entityOptions.value.originalOptions = structuredClone(originalOptions) entityOptions.value.originalOptions = structuredClone(originalOptions)
that.positionEditing = false that.positionEditing = false
entityOptions.value.closeNodeEdit() entityOptions.value.closeNodeEdit()
entityOptions.value.reset() that.reset()
eventBus.emit("destroyComponent") eventBus.emit("destroyComponent")
} }

View File

@ -160,7 +160,7 @@ const closeCallback = () => {
entityOptions.value.originalOptions = structuredClone(originalOptions) entityOptions.value.originalOptions = structuredClone(originalOptions)
that.positionEditing = false that.positionEditing = false
entityOptions.value.closeNodeEdit() entityOptions.value.closeNodeEdit()
entityOptions.value.reset() that.reset()
eventBus.emit("destroyComponent") eventBus.emit("destroyComponent")
} }

View File

@ -469,7 +469,7 @@ const closeCallback = () => {
entityOptions.value.originalOptions = structuredClone(originalOptions) entityOptions.value.originalOptions = structuredClone(originalOptions)
that.positionEditing = false that.positionEditing = false
entityOptions.value.closeNodeEdit() entityOptions.value.closeNodeEdit()
entityOptions.value.reset() that.reset()
eventBus.emit('destroyComponent') eventBus.emit('destroyComponent')
} }
const confirm = () => { const confirm = () => {

View File

@ -78,7 +78,7 @@ let that: any
const closeCallback = () => { const closeCallback = () => {
entityOptions.value.oldData = structuredClone(originalOptions) entityOptions.value.oldData = structuredClone(originalOptions)
that.positionEditing = false that.positionEditing = false
entityOptions.value.reset() that.reset()
eventBus.emit("destroyComponent") eventBus.emit("destroyComponent")
} }
const open = async (id: any) => { const open = async (id: any) => {

View File

@ -266,7 +266,7 @@ let that: any
const closeCallback = () => { const closeCallback = () => {
entityOptions.value.originalOptions = structuredClone(originalOptions) entityOptions.value.originalOptions = structuredClone(originalOptions)
that.positionEditing = false that.positionEditing = false
entityOptions.value.reset() that.reset()
eventBus.emit("destroyComponent") eventBus.emit("destroyComponent")
} }
const open = async (id: any) => { const open = async (id: any) => {

View File

@ -818,8 +818,13 @@ const validatePortRange = (rule, value, callback) => {
.settings:hover svg g { .settings:hover svg g {
filter: url(#filter_2442_1327); filter: url(#filter_2442_1327);
} }
.exit:hover svg g { .exit:hover svg {
filter: url(#filter_2442_480); g {
filter: url(#filter_2442_480);
path {
fill: rgba(241, 108, 85, 1) !important;
}
}
} }
.el-button { .el-button {

View File

@ -81,7 +81,7 @@ export const useLogin = () => {
}) })
localStorage.setItem('frontFunctionArr', JSON.stringify(obj)) localStorage.setItem('frontFunctionArr', JSON.stringify(obj))
//数据权限 //数据权限
let dataArr = [] let dataArr:any = []
res.data.roleOperates.forEach(item => { res.data.roleOperates.forEach(item => {
dataArr.push(item.operate) dataArr.push(item.operate)
}) })