12-12
This commit is contained in:
@ -581,40 +581,22 @@ function windowAllClosed() {
|
||||
|
||||
console.log('所有窗口已关闭,执行清理脚本...');
|
||||
getServer().close(() => {
|
||||
|
||||
|
||||
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,
|
||||
// 执行批处理文件
|
||||
const cleanupProcess = spawn('cmd.exe', ['/c', stopBatPath.substring(1, 200)], {
|
||||
stdio: 'ignore',
|
||||
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) => {
|
||||
// if (error) {
|
||||
// console.error(`清理脚本执行失败: ${error.message}`);
|
||||
@ -630,12 +612,11 @@ Set WshShell = Nothing
|
||||
// }
|
||||
// });
|
||||
|
||||
// // 监听子进程退出事件(确保即使脚本出错也能退出)
|
||||
// cleanupProcess.on('exit', (code) => {
|
||||
// console.log(`清理脚本退出,代码: ${code}`);
|
||||
// });
|
||||
cleanupProcess.unref();
|
||||
|
||||
forceQuit();
|
||||
setTimeout(() => {
|
||||
forceQuit();
|
||||
}, 500);
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
4
src/renderer/public/sdk/YJEarth.min.js
vendored
4
src/renderer/public/sdk/YJEarth.min.js
vendored
File diff suppressed because one or more lines are too long
@ -102,6 +102,7 @@ setupStore(setApp)
|
||||
setupSvgIcon(setApp)
|
||||
setApp.use(EventBusPlugin)
|
||||
setApp.use(router)
|
||||
// @ts-ignore
|
||||
setApp.use(elTableInfiniteScroll)
|
||||
setApp.use(ElementPlus, {
|
||||
locale: zhCn
|
||||
|
||||
@ -310,7 +310,7 @@ const closeCallback = () => {
|
||||
entityOptions.value.originalOptions = structuredClone(originalOptions)
|
||||
that.positionEditing = false
|
||||
entityOptions.value.closeNodeEdit()
|
||||
entityOptions.value.reset()
|
||||
that.reset()
|
||||
eventBus.emit("destroyComponent")
|
||||
}
|
||||
|
||||
|
||||
@ -472,7 +472,7 @@ const closeCallback = () => {
|
||||
entityOptions.value.originalOptions = structuredClone(originalOptions)
|
||||
that.positionEditing = false
|
||||
entityOptions.value.closeNodeEdit()
|
||||
entityOptions.value.reset()
|
||||
that.reset()
|
||||
eventBus.emit('destroyComponent')
|
||||
}
|
||||
const confirm = () => {
|
||||
|
||||
@ -654,10 +654,10 @@ const toggleGroup = (type: string) => {
|
||||
|
||||
var backButShow: any = ref(false)
|
||||
//根据角色权限控制后台管理按钮显隐
|
||||
let option = JSON.parse(localStorage.getItem('frontFunctionArr'))
|
||||
let option = JSON.parse(localStorage.getItem('frontFunctionArr') || '{}')
|
||||
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) {
|
||||
//管理员
|
||||
backButShow.value = true
|
||||
|
||||
@ -311,7 +311,7 @@ const closeCallback = () => {
|
||||
entityOptions.value.originalOptions = structuredClone(originalOptions)
|
||||
that.positionEditing = false
|
||||
entityOptions.value.closeNodeEdit()
|
||||
entityOptions.value.reset()
|
||||
that.reset()
|
||||
eventBus.emit("destroyComponent")
|
||||
}
|
||||
|
||||
|
||||
@ -327,7 +327,7 @@ const closeCallback = () => {
|
||||
entityOptions.value.originalOptions = structuredClone(originalOptions)
|
||||
that.positionEditing = false
|
||||
entityOptions.value.closeNodeEdit()
|
||||
entityOptions.value.reset()
|
||||
that.reset()
|
||||
eventBus.emit("destroyComponent")
|
||||
}
|
||||
|
||||
|
||||
@ -461,7 +461,7 @@ const closeCallback = () => {
|
||||
entityOptions.value.originalOptions = structuredClone(originalOptions)
|
||||
that.positionEditing = false
|
||||
entityOptions.value.closeNodeEdit()
|
||||
entityOptions.value.reset()
|
||||
that.reset()
|
||||
eventBus.emit('destroyComponent')
|
||||
}
|
||||
const confirm = () => {
|
||||
|
||||
@ -81,7 +81,7 @@ let that: any
|
||||
const closeCallback = () => {
|
||||
entityOptions.value.originalOptions = structuredClone(originalOptions)
|
||||
that.positionEditing = false
|
||||
entityOptions.value.reset()
|
||||
that.reset()
|
||||
eventBus.emit("destroyComponent")
|
||||
}
|
||||
const open = async (id: any) => {
|
||||
|
||||
@ -102,7 +102,7 @@ let that: any
|
||||
const closeCallback = () => {
|
||||
entityOptions.value.originalOptions = structuredClone(originalOptions)
|
||||
that.positionEditing = false
|
||||
entityOptions.value.reset()
|
||||
that.reset()
|
||||
eventBus.emit("destroyComponent")
|
||||
}
|
||||
const open = async (id: any) => {
|
||||
|
||||
@ -345,7 +345,7 @@ const closeCallback = () => {
|
||||
entityOptions.value.originalOptions = structuredClone(originalOptions)
|
||||
that.positionEditing = false
|
||||
// entityOptions.value.closeNodeEdit()
|
||||
entityOptions.value.reset()
|
||||
that.reset()
|
||||
eventBus.emit('destroyComponent')
|
||||
}
|
||||
|
||||
|
||||
@ -722,7 +722,7 @@ const closeCallback = () => {
|
||||
entityOptions.value.originalOptions = structuredClone(originalOptions)
|
||||
that.positionEditing = false
|
||||
// entityOptions.value.closeNodeEdit()
|
||||
entityOptions.value.reset()
|
||||
that.reset()
|
||||
eventBus.emit('destroyComponent')
|
||||
}
|
||||
|
||||
|
||||
@ -308,7 +308,7 @@ const closeCallback = () => {
|
||||
entityOptions.value.originalOptions = structuredClone(originalOptions)
|
||||
that.positionEditing = false
|
||||
entityOptions.value.closeNodeEdit()
|
||||
entityOptions.value.reset()
|
||||
that.reset()
|
||||
eventBus.emit("destroyComponent")
|
||||
}
|
||||
|
||||
|
||||
@ -160,7 +160,7 @@ const closeCallback = () => {
|
||||
entityOptions.value.originalOptions = structuredClone(originalOptions)
|
||||
that.positionEditing = false
|
||||
entityOptions.value.closeNodeEdit()
|
||||
entityOptions.value.reset()
|
||||
that.reset()
|
||||
eventBus.emit("destroyComponent")
|
||||
}
|
||||
|
||||
|
||||
@ -469,7 +469,7 @@ const closeCallback = () => {
|
||||
entityOptions.value.originalOptions = structuredClone(originalOptions)
|
||||
that.positionEditing = false
|
||||
entityOptions.value.closeNodeEdit()
|
||||
entityOptions.value.reset()
|
||||
that.reset()
|
||||
eventBus.emit('destroyComponent')
|
||||
}
|
||||
const confirm = () => {
|
||||
|
||||
@ -78,7 +78,7 @@ let that: any
|
||||
const closeCallback = () => {
|
||||
entityOptions.value.oldData = structuredClone(originalOptions)
|
||||
that.positionEditing = false
|
||||
entityOptions.value.reset()
|
||||
that.reset()
|
||||
eventBus.emit("destroyComponent")
|
||||
}
|
||||
const open = async (id: any) => {
|
||||
|
||||
@ -266,7 +266,7 @@ let that: any
|
||||
const closeCallback = () => {
|
||||
entityOptions.value.originalOptions = structuredClone(originalOptions)
|
||||
that.positionEditing = false
|
||||
entityOptions.value.reset()
|
||||
that.reset()
|
||||
eventBus.emit("destroyComponent")
|
||||
}
|
||||
const open = async (id: any) => {
|
||||
|
||||
@ -818,8 +818,13 @@ const validatePortRange = (rule, value, callback) => {
|
||||
.settings:hover svg g {
|
||||
filter: url(#filter_2442_1327);
|
||||
}
|
||||
.exit:hover svg g {
|
||||
filter: url(#filter_2442_480);
|
||||
.exit:hover svg {
|
||||
g {
|
||||
filter: url(#filter_2442_480);
|
||||
path {
|
||||
fill: rgba(241, 108, 85, 1) !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.el-button {
|
||||
|
||||
@ -81,7 +81,7 @@ export const useLogin = () => {
|
||||
})
|
||||
localStorage.setItem('frontFunctionArr', JSON.stringify(obj))
|
||||
//数据权限
|
||||
let dataArr = []
|
||||
let dataArr:any = []
|
||||
res.data.roleOperates.forEach(item => {
|
||||
dataArr.push(item.operate)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user