fix: 解决 app 升级,container_name 改变的BUG

This commit is contained in:
zhengkunwang223
2023-02-22 15:09:40 +08:00
committed by zhengkunwang223
parent 0e11b18cd6
commit 37bcd12c8d
3 changed files with 30 additions and 14 deletions
+1 -1
View File
@@ -857,7 +857,7 @@ export default {
deleteWarn:
'The delete operation will delete all data and backups together. This operation cannot be rolled back. Do you want to continue? ',
syncSuccess: 'Sync successfully',
canUpdate: 'Upgraded',
canUpdate: 'Upgrade',
backup: 'Backup',
backupName: 'File Name',
backupPath: 'File Path',
@@ -10,7 +10,7 @@
<Header :header="$t('app.install')" :back="handleClose" />
</template>
<el-row>
<el-row v-loading="loading">
<el-col :span="22" :offset="1">
<el-form
ref="paramForm"
@@ -64,7 +64,7 @@ let form = ref<{ [key: string]: any }>({});
let rules = ref<FormRules>({
NAME: [Rules.linuxName],
});
let loading = false;
let loading = ref(false);
const paramForm = ref<FormInstance>();
const req = reactive({
appDetailId: 0,
@@ -99,10 +99,15 @@ const submit = async (formEl: FormInstance | undefined) => {
req.appDetailId = installData.value.appDetailId;
req.params = form.value;
req.name = form.value['NAME'];
InstallApp(req).then(() => {
handleClose();
router.push({ path: '/apps/installed' });
});
loading.value = true;
InstallApp(req)
.then(() => {
handleClose();
router.push({ path: '/apps/installed' });
})
.finally(() => {
loading.value = false;
});
});
};