fix: 修改应用删除文字

This commit is contained in:
zhengkunwang223 2022-12-02 11:12:37 +08:00 committed by zhengkunwang223
parent e45f5e3369
commit e5da0736a6
2 changed files with 5 additions and 13 deletions

View File

@ -725,7 +725,7 @@ export default {
name: '名称',
description: '描述',
delete: '删除',
deleteWarn: '删除操作会把数据一并删除,此操作不可回滚,是否继续?',
deleteWarn: '删除操作会把所有数据和备份一并删除,此操作不可回滚,是否继续?',
syncSuccess: '同步成功',
canUpdate: '可升级',
backup: '备份',

View File

@ -131,6 +131,7 @@ import { ElMessage, ElMessageBox } from 'element-plus';
import Backups from './backups.vue';
import AppResources from './check/index.vue';
import { App } from '@/api/interface/app';
import { useDeleteData } from '@/hooks/use-delete-data';
let data = ref<any>();
let loading = ref(false);
@ -188,12 +189,12 @@ const openOperate = (row: any, op: string) => {
open.value = true;
});
} else if (op == 'delete') {
AppInstalledDeleteCheck(row.id).then((res) => {
AppInstalledDeleteCheck(row.id).then(async (res) => {
const items = res.data;
if (res.data && res.data.length > 0) {
checkRef.value.acceptParams({ items: items });
} else {
onOperate(op);
await useDeleteData(InstalledOp, operateReq, 'app.deleteWarn');
}
});
} else {
@ -228,16 +229,7 @@ const onOperate = async (operation: string) => {
type: 'info',
},
).then(() => {
open.value = false;
loading.value = true;
InstalledOp(operateReq)
.then(() => {
ElMessage.success(i18n.global.t('commons.msg.operationSuccess'));
search();
})
.finally(() => {
loading.value = false;
});
operate();
});
};