mirror of
https://gitee.com/wonderful-code/buildadmin
synced 2024-11-21 14:41:29 +00:00
fix:修复模块安装过程中可能提示网络请求超时的问题
This commit is contained in:
parent
ac3e2c87b9
commit
606cdde2f0
@ -267,6 +267,7 @@ export const execInstall = (uid: string, id: number, extend: anyObj = {}) => {
|
|||||||
state.common.dialogTitle = i18n.global.t('module.Installation complete')
|
state.common.dialogTitle = i18n.global.t('module.Installation complete')
|
||||||
state.common.moduleState = moduleInstallState.INSTALLED
|
state.common.moduleState = moduleInstallState.INSTALLED
|
||||||
state.common.type = 'done'
|
state.common.type = 'done'
|
||||||
|
onRefreshTableData()
|
||||||
})
|
})
|
||||||
.catch((res) => {
|
.catch((res) => {
|
||||||
if (loginExpired(res)) return
|
if (loginExpired(res)) return
|
||||||
@ -306,11 +307,11 @@ export const execInstall = (uid: string, id: number, extend: anyObj = {}) => {
|
|||||||
zIndex: 9999,
|
zIndex: 9999,
|
||||||
})
|
})
|
||||||
state.dialog.common = false
|
state.dialog.common = false
|
||||||
|
onRefreshTableData()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
state.loading.common = false
|
state.loading.common = false
|
||||||
onRefreshTableData()
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -321,15 +322,25 @@ const terminalTaskExecComplete = (res: number, type: string) => {
|
|||||||
})
|
})
|
||||||
if (state.common.waitInstallDepend.length == 0) {
|
if (state.common.waitInstallDepend.length == 0) {
|
||||||
state.common.dependInstallState = 'success'
|
state.common.dependInstallState = 'success'
|
||||||
|
|
||||||
|
// 仅在命令全部执行完毕才刷新数据
|
||||||
|
if (router.currentRoute.value.name === 'moduleStore/moduleStore') {
|
||||||
|
onRefreshTableData()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
const terminal = useTerminal()
|
const terminal = useTerminal()
|
||||||
terminal.toggle(true)
|
terminal.toggle(true)
|
||||||
state.common.dependInstallState = 'fail'
|
state.common.dependInstallState = 'fail'
|
||||||
|
|
||||||
|
// 有命令执行失败了,刷新一次数据
|
||||||
|
if (router.currentRoute.value.name === 'moduleStore/moduleStore') {
|
||||||
|
onRefreshTableData()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 连续安装模块的情况中,首个模块的命令执行完毕时,自动启动了热更新
|
||||||
if (router.currentRoute.value.name === 'moduleStore/moduleStore') {
|
if (router.currentRoute.value.name === 'moduleStore/moduleStore') {
|
||||||
onRefreshTableData()
|
|
||||||
closeHotUpdate('modules')
|
closeHotUpdate('modules')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -386,7 +397,6 @@ export const onDisable = (confirmConflict = false) => {
|
|||||||
}
|
}
|
||||||
state.common.uid = state.goodsInfo.uid
|
state.common.uid = state.goodsInfo.uid
|
||||||
execCommand(commandsData)
|
execCommand(commandsData)
|
||||||
onRefreshTableData()
|
|
||||||
} else if (res.code == -3) {
|
} else if (res.code == -3) {
|
||||||
// 更新
|
// 更新
|
||||||
onInstall(state.goodsInfo.uid, state.goodsInfo.purchased)
|
onInstall(state.goodsInfo.uid, state.goodsInfo.purchased)
|
||||||
@ -396,6 +406,7 @@ export const onDisable = (confirmConflict = false) => {
|
|||||||
message: res.msg,
|
message: res.msg,
|
||||||
zIndex: 9999,
|
zIndex: 9999,
|
||||||
})
|
})
|
||||||
|
onRefreshTableData()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
|
Loading…
Reference in New Issue
Block a user