perf: 删除没有必要的 message key
parent
60bd4a13b1
commit
4741819826
|
@ -80,10 +80,7 @@ async function handleSubmit(values: Recordable<any>) {
|
||||||
await updateUserProfile(values as SystemUserProfileApi.UpdateProfileReqVO);
|
await updateUserProfile(values as SystemUserProfileApi.UpdateProfileReqVO);
|
||||||
// 关闭并提示
|
// 关闭并提示
|
||||||
emit('success');
|
emit('success');
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
} finally {
|
} finally {
|
||||||
|
|
|
@ -78,10 +78,7 @@ async function handleSubmit(values: Recordable<any>) {
|
||||||
oldPassword: values.oldPassword,
|
oldPassword: values.oldPassword,
|
||||||
newPassword: values.newPassword,
|
newPassword: values.newPassword,
|
||||||
});
|
});
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
} finally {
|
} finally {
|
||||||
|
|
|
@ -90,10 +90,7 @@ async function onDelete(row: BpmCategoryApi.CategoryVO) {
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
await deleteCategory(row.id as number);
|
await deleteCategory(row.id as number);
|
||||||
message.success({
|
message.success($t('ui.actionMessage.deleteSuccess', [row.code]));
|
||||||
content: $t('ui.actionMessage.deleteSuccess', [row.code]),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
onRefresh();
|
onRefresh();
|
||||||
} catch {
|
} catch {
|
||||||
hideLoading();
|
hideLoading();
|
||||||
|
|
|
@ -45,10 +45,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
// 关闭并提示
|
// 关闭并提示
|
||||||
await modalApi.close();
|
await modalApi.close();
|
||||||
emit('success');
|
emit('success');
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} finally {
|
} finally {
|
||||||
modalApi.unlock();
|
modalApi.unlock();
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,10 +45,7 @@ async function onDelete(row: CrmBusinessStatusApi.BusinessStatus) {
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
await deleteBusinessStatus(row.id as number);
|
await deleteBusinessStatus(row.id as number);
|
||||||
message.success({
|
message.success($t('ui.actionMessage.deleteSuccess', [row.name]));
|
||||||
content: $t('ui.actionMessage.deleteSuccess', [row.name]),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
onRefresh();
|
onRefresh();
|
||||||
} catch {
|
} catch {
|
||||||
hideLoading();
|
hideLoading();
|
||||||
|
|
|
@ -55,10 +55,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
// 关闭并提示
|
// 关闭并提示
|
||||||
await modalApi.close();
|
await modalApi.close();
|
||||||
emit('success');
|
emit('success');
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} finally {
|
} finally {
|
||||||
modalApi.unlock();
|
modalApi.unlock();
|
||||||
}
|
}
|
||||||
|
|
|
@ -74,10 +74,7 @@ const submitForm = async () => {
|
||||||
columns,
|
columns,
|
||||||
});
|
});
|
||||||
// 关闭并提示
|
// 关闭并提示
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
close();
|
close();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('保存失败', error);
|
console.error('保存失败', error);
|
||||||
|
|
|
@ -80,10 +80,7 @@ async function onDelete(row: InfraCodegenApi.CodegenTable) {
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
await deleteCodegenTable(row.id);
|
await deleteCodegenTable(row.id);
|
||||||
message.success({
|
message.success($t('ui.actionMessage.deleteSuccess', [row.tableName]));
|
||||||
content: $t('ui.actionMessage.deleteSuccess', [row.tableName]),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
onRefresh();
|
onRefresh();
|
||||||
} finally {
|
} finally {
|
||||||
hideLoading();
|
hideLoading();
|
||||||
|
@ -99,10 +96,7 @@ async function onSync(row: InfraCodegenApi.CodegenTable) {
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
await syncCodegenFromDB(row.id);
|
await syncCodegenFromDB(row.id);
|
||||||
message.success({
|
message.success($t('ui.actionMessage.updateSuccess', [row.tableName]));
|
||||||
content: $t('ui.actionMessage.updateSuccess', [row.tableName]),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
onRefresh();
|
onRefresh();
|
||||||
} finally {
|
} finally {
|
||||||
hideLoading();
|
hideLoading();
|
||||||
|
@ -125,10 +119,7 @@ async function onGenerate(row: InfraCodegenApi.CodegenTable) {
|
||||||
link.download = `codegen-${row.className}.zip`;
|
link.download = `codegen-${row.className}.zip`;
|
||||||
link.click();
|
link.click();
|
||||||
window.URL.revokeObjectURL(url);
|
window.URL.revokeObjectURL(url);
|
||||||
message.success({
|
message.success('代码生成成功');
|
||||||
content: '代码生成成功',
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} finally {
|
} finally {
|
||||||
hideLoading();
|
hideLoading();
|
||||||
}
|
}
|
||||||
|
|
|
@ -104,10 +104,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
// 关闭并提示
|
// 关闭并提示
|
||||||
await modalApi.close();
|
await modalApi.close();
|
||||||
emit('success');
|
emit('success');
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} finally {
|
} finally {
|
||||||
hideLoading();
|
hideLoading();
|
||||||
modalApi.unlock();
|
modalApi.unlock();
|
||||||
|
|
|
@ -53,10 +53,7 @@ async function onDelete(row: InfraConfigApi.Config) {
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
await deleteConfig(row.id as number);
|
await deleteConfig(row.id as number);
|
||||||
message.success({
|
message.success($t('ui.actionMessage.deleteSuccess', [row.name]));
|
||||||
content: $t('ui.actionMessage.deleteSuccess', [row.name]),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
onRefresh();
|
onRefresh();
|
||||||
} catch {
|
} catch {
|
||||||
hideLoading();
|
hideLoading();
|
||||||
|
|
|
@ -48,10 +48,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
// 关闭并提示
|
// 关闭并提示
|
||||||
await modalApi.close();
|
await modalApi.close();
|
||||||
emit('success');
|
emit('success');
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} finally {
|
} finally {
|
||||||
modalApi.unlock();
|
modalApi.unlock();
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,10 +46,7 @@ async function onDelete(row: InfraDataSourceConfigApi.DataSourceConfig) {
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
await deleteDataSourceConfig(row.id as number);
|
await deleteDataSourceConfig(row.id as number);
|
||||||
message.success({
|
message.success($t('ui.actionMessage.deleteSuccess', [row.name]));
|
||||||
content: $t('ui.actionMessage.deleteSuccess', [row.name]),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
await handleLoadData();
|
await handleLoadData();
|
||||||
} catch {
|
} catch {
|
||||||
hideLoading();
|
hideLoading();
|
||||||
|
|
|
@ -55,10 +55,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
// 关闭并提示
|
// 关闭并提示
|
||||||
await modalApi.close();
|
await modalApi.close();
|
||||||
emit('success');
|
emit('success');
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} finally {
|
} finally {
|
||||||
modalApi.unlock();
|
modalApi.unlock();
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,10 +53,7 @@ async function onDelete(row: Demo01ContactApi.Demo01Contact) {
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
await deleteDemo01Contact(row.id as number);
|
await deleteDemo01Contact(row.id as number);
|
||||||
message.success({
|
message.success($t('ui.actionMessage.deleteSuccess', [row.id]));
|
||||||
content: $t('ui.actionMessage.deleteSuccess', [row.id]),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
onRefresh();
|
onRefresh();
|
||||||
} catch {
|
} catch {
|
||||||
hideLoading();
|
hideLoading();
|
||||||
|
|
|
@ -54,10 +54,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
// 关闭并提示
|
// 关闭并提示
|
||||||
await modalApi.close();
|
await modalApi.close();
|
||||||
emit('success');
|
emit('success');
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} finally {
|
} finally {
|
||||||
modalApi.unlock();
|
modalApi.unlock();
|
||||||
}
|
}
|
||||||
|
|
|
@ -71,10 +71,7 @@ async function onDelete(row: Demo02CategoryApi.Demo02Category) {
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
await deleteDemo02Category(row.id as number);
|
await deleteDemo02Category(row.id as number);
|
||||||
message.success({
|
message.success($t('ui.actionMessage.deleteSuccess', [row.id]));
|
||||||
content: $t('ui.actionMessage.deleteSuccess', [row.id]),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
onRefresh();
|
onRefresh();
|
||||||
} catch {
|
} catch {
|
||||||
hideLoading();
|
hideLoading();
|
||||||
|
|
|
@ -60,10 +60,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
// 关闭并提示
|
// 关闭并提示
|
||||||
await modalApi.close();
|
await modalApi.close();
|
||||||
emit('success');
|
emit('success');
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} finally {
|
} finally {
|
||||||
modalApi.unlock();
|
modalApi.unlock();
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,10 +59,7 @@ async function onDelete(row: Demo03StudentApi.Demo03Student) {
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
await deleteDemo03Student(row.id as number);
|
await deleteDemo03Student(row.id as number);
|
||||||
message.success({
|
message.success($t('ui.actionMessage.deleteSuccess', [row.id]));
|
||||||
content: $t('ui.actionMessage.deleteSuccess', [row.id]),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
onRefresh();
|
onRefresh();
|
||||||
} catch {
|
} catch {
|
||||||
hideLoading();
|
hideLoading();
|
||||||
|
|
|
@ -56,10 +56,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
// 关闭并提示
|
// 关闭并提示
|
||||||
await modalApi.close();
|
await modalApi.close();
|
||||||
emit('success');
|
emit('success');
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} finally {
|
} finally {
|
||||||
modalApi.unlock();
|
modalApi.unlock();
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,10 +57,7 @@ async function onDelete(row: Demo03StudentApi.Demo03Course) {
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
await deleteDemo03Course(row.id as number);
|
await deleteDemo03Course(row.id as number);
|
||||||
message.success({
|
message.success($t('ui.actionMessage.deleteSuccess', [row.id]));
|
||||||
content: $t('ui.actionMessage.deleteSuccess', [row.id]),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
onRefresh();
|
onRefresh();
|
||||||
} catch {
|
} catch {
|
||||||
hideLoading();
|
hideLoading();
|
||||||
|
|
|
@ -56,10 +56,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
// 关闭并提示
|
// 关闭并提示
|
||||||
await modalApi.close();
|
await modalApi.close();
|
||||||
emit('success');
|
emit('success');
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} finally {
|
} finally {
|
||||||
modalApi.unlock();
|
modalApi.unlock();
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,10 +57,7 @@ async function onDelete(row: Demo03StudentApi.Demo03Grade) {
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
await deleteDemo03Grade(row.id as number);
|
await deleteDemo03Grade(row.id as number);
|
||||||
message.success({
|
message.success($t('ui.actionMessage.deleteSuccess', [row.id]));
|
||||||
content: $t('ui.actionMessage.deleteSuccess', [row.id]),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
onRefresh();
|
onRefresh();
|
||||||
} catch {
|
} catch {
|
||||||
hideLoading();
|
hideLoading();
|
||||||
|
|
|
@ -54,10 +54,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
// 关闭并提示
|
// 关闭并提示
|
||||||
await modalApi.close();
|
await modalApi.close();
|
||||||
emit('success');
|
emit('success');
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} finally {
|
} finally {
|
||||||
modalApi.unlock();
|
modalApi.unlock();
|
||||||
}
|
}
|
||||||
|
|
|
@ -58,10 +58,7 @@ async function onDelete(row: Demo03StudentApi.Demo03Student) {
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
await deleteDemo03Student(row.id as number);
|
await deleteDemo03Student(row.id as number);
|
||||||
message.success({
|
message.success($t('ui.actionMessage.deleteSuccess', [row.id]));
|
||||||
content: $t('ui.actionMessage.deleteSuccess', [row.id]),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
onRefresh();
|
onRefresh();
|
||||||
} catch {
|
} catch {
|
||||||
hideLoading();
|
hideLoading();
|
||||||
|
|
|
@ -70,10 +70,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
// 关闭并提示
|
// 关闭并提示
|
||||||
await modalApi.close();
|
await modalApi.close();
|
||||||
emit('success');
|
emit('success');
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} finally {
|
} finally {
|
||||||
modalApi.unlock();
|
modalApi.unlock();
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,10 +53,7 @@ async function onDelete(row: Demo03StudentApi.Demo03Student) {
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
await deleteDemo03Student(row.id as number);
|
await deleteDemo03Student(row.id as number);
|
||||||
message.success({
|
message.success($t('ui.actionMessage.deleteSuccess', [row.id]));
|
||||||
content: $t('ui.actionMessage.deleteSuccess', [row.id]),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
onRefresh();
|
onRefresh();
|
||||||
} catch {
|
} catch {
|
||||||
hideLoading();
|
hideLoading();
|
||||||
|
|
|
@ -70,10 +70,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
// 关闭并提示
|
// 关闭并提示
|
||||||
await modalApi.close();
|
await modalApi.close();
|
||||||
emit('success');
|
emit('success');
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} finally {
|
} finally {
|
||||||
modalApi.unlock();
|
modalApi.unlock();
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,12 @@ import { h, nextTick, onMounted, reactive, ref } from 'vue';
|
||||||
|
|
||||||
import { Page, useVbenModal } from '@vben/common-ui';
|
import { Page, useVbenModal } from '@vben/common-ui';
|
||||||
import { Download, Plus } from '@vben/icons';
|
import { Download, Plus } from '@vben/icons';
|
||||||
import { cloneDeep, formatDateTime } from '@vben/utils';
|
import {
|
||||||
|
cloneDeep,
|
||||||
|
downloadFileFromBlobPart,
|
||||||
|
formatDateTime,
|
||||||
|
getRangePickerDefaultProps,
|
||||||
|
} from '@vben/utils';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
Button,
|
Button,
|
||||||
|
@ -29,9 +34,7 @@ import { ContentWrap } from '#/components/content-wrap';
|
||||||
import { DictTag } from '#/components/dict-tag';
|
import { DictTag } from '#/components/dict-tag';
|
||||||
import { TableToolbar } from '#/components/table-toolbar';
|
import { TableToolbar } from '#/components/table-toolbar';
|
||||||
import { $t } from '#/locales';
|
import { $t } from '#/locales';
|
||||||
import { getRangePickerDefaultProps } from '#/utils/date';
|
|
||||||
import { DICT_TYPE, getDictOptions } from '#/utils/dict';
|
import { DICT_TYPE, getDictOptions } from '#/utils/dict';
|
||||||
import { downloadByData } from '#/utils/download';
|
|
||||||
|
|
||||||
import Demo01ContactForm from './modules/form.vue';
|
import Demo01ContactForm from './modules/form.vue';
|
||||||
|
|
||||||
|
@ -100,10 +103,7 @@ async function onDelete(row: Demo01ContactApi.Demo01Contact) {
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
await deleteDemo01Contact(row.id as number);
|
await deleteDemo01Contact(row.id as number);
|
||||||
message.success({
|
message.success($t('ui.actionMessage.deleteSuccess', [row.id]));
|
||||||
content: $t('ui.actionMessage.deleteSuccess', [row.id]),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
await getList();
|
await getList();
|
||||||
} catch {
|
} catch {
|
||||||
hideLoading();
|
hideLoading();
|
||||||
|
@ -115,7 +115,7 @@ async function onExport() {
|
||||||
try {
|
try {
|
||||||
exportLoading.value = true;
|
exportLoading.value = true;
|
||||||
const data = await exportDemo01Contact(queryParams);
|
const data = await exportDemo01Contact(queryParams);
|
||||||
downloadByData(data, '示例联系人.xls');
|
downloadFileFromBlobPart({ fileName: '示例联系人.xls', source: data });
|
||||||
} finally {
|
} finally {
|
||||||
exportLoading.value = false;
|
exportLoading.value = false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -75,10 +75,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
// 关闭并提示
|
// 关闭并提示
|
||||||
await modalApi.close();
|
await modalApi.close();
|
||||||
emit('success');
|
emit('success');
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} finally {
|
} finally {
|
||||||
modalApi.unlock();
|
modalApi.unlock();
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,13 @@ import { h, nextTick, onMounted, reactive, ref } from 'vue';
|
||||||
|
|
||||||
import { Page, useVbenModal } from '@vben/common-ui';
|
import { Page, useVbenModal } from '@vben/common-ui';
|
||||||
import { Download, Plus } from '@vben/icons';
|
import { Download, Plus } from '@vben/icons';
|
||||||
import { cloneDeep, formatDateTime, isEmpty } from '@vben/utils';
|
import {
|
||||||
|
cloneDeep,
|
||||||
|
downloadFileFromBlobPart,
|
||||||
|
formatDateTime,
|
||||||
|
getRangePickerDefaultProps,
|
||||||
|
isEmpty,
|
||||||
|
} from '@vben/utils';
|
||||||
|
|
||||||
import { Button, Form, Input, message, RangePicker } from 'ant-design-vue';
|
import { Button, Form, Input, message, RangePicker } from 'ant-design-vue';
|
||||||
import { VxeColumn, VxeTable } from 'vxe-table';
|
import { VxeColumn, VxeTable } from 'vxe-table';
|
||||||
|
@ -20,8 +26,6 @@ import {
|
||||||
import { ContentWrap } from '#/components/content-wrap';
|
import { ContentWrap } from '#/components/content-wrap';
|
||||||
import { TableToolbar } from '#/components/table-toolbar';
|
import { TableToolbar } from '#/components/table-toolbar';
|
||||||
import { $t } from '#/locales';
|
import { $t } from '#/locales';
|
||||||
import { getRangePickerDefaultProps } from '#/utils/date';
|
|
||||||
import { downloadByData } from '#/utils/download';
|
|
||||||
|
|
||||||
import Demo02CategoryForm from './modules/form.vue';
|
import Demo02CategoryForm from './modules/form.vue';
|
||||||
|
|
||||||
|
@ -90,10 +94,7 @@ async function onDelete(row: Demo02CategoryApi.Demo02Category) {
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
await deleteDemo02Category(row.id as number);
|
await deleteDemo02Category(row.id as number);
|
||||||
message.success({
|
message.success($t('ui.actionMessage.deleteSuccess', [row.id]));
|
||||||
content: $t('ui.actionMessage.deleteSuccess', [row.id]),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
await getList();
|
await getList();
|
||||||
} catch {
|
} catch {
|
||||||
hideLoading();
|
hideLoading();
|
||||||
|
@ -105,7 +106,7 @@ async function onExport() {
|
||||||
try {
|
try {
|
||||||
exportLoading.value = true;
|
exportLoading.value = true;
|
||||||
const data = await exportDemo02Category(queryParams);
|
const data = await exportDemo02Category(queryParams);
|
||||||
downloadByData(data, '示例分类.xls');
|
downloadFileFromBlobPart({ fileName: '示例分类.xls', source: data });
|
||||||
} finally {
|
} finally {
|
||||||
exportLoading.value = false;
|
exportLoading.value = false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -71,10 +71,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
// 关闭并提示
|
// 关闭并提示
|
||||||
await modalApi.close();
|
await modalApi.close();
|
||||||
emit('success');
|
emit('success');
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} finally {
|
} finally {
|
||||||
modalApi.unlock();
|
modalApi.unlock();
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,12 @@ import { h, nextTick, onMounted, reactive, ref } from 'vue';
|
||||||
|
|
||||||
import { Page, useVbenModal } from '@vben/common-ui';
|
import { Page, useVbenModal } from '@vben/common-ui';
|
||||||
import { Download, Plus } from '@vben/icons';
|
import { Download, Plus } from '@vben/icons';
|
||||||
import { cloneDeep, formatDateTime } from '@vben/utils';
|
import {
|
||||||
|
cloneDeep,
|
||||||
|
downloadFileFromBlobPart,
|
||||||
|
formatDateTime,
|
||||||
|
getRangePickerDefaultProps,
|
||||||
|
} from '@vben/utils';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
Button,
|
Button,
|
||||||
|
@ -31,9 +36,7 @@ import { ContentWrap } from '#/components/content-wrap';
|
||||||
import { DictTag } from '#/components/dict-tag';
|
import { DictTag } from '#/components/dict-tag';
|
||||||
import { TableToolbar } from '#/components/table-toolbar';
|
import { TableToolbar } from '#/components/table-toolbar';
|
||||||
import { $t } from '#/locales';
|
import { $t } from '#/locales';
|
||||||
import { getRangePickerDefaultProps } from '#/utils/date';
|
|
||||||
import { DICT_TYPE, getDictOptions } from '#/utils/dict';
|
import { DICT_TYPE, getDictOptions } from '#/utils/dict';
|
||||||
import { downloadByData } from '#/utils/download';
|
|
||||||
|
|
||||||
import Demo03CourseList from './modules/demo03-course-list.vue';
|
import Demo03CourseList from './modules/demo03-course-list.vue';
|
||||||
import Demo03GradeList from './modules/demo03-grade-list.vue';
|
import Demo03GradeList from './modules/demo03-grade-list.vue';
|
||||||
|
@ -117,10 +120,7 @@ async function onDelete(row: Demo03StudentApi.Demo03Student) {
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
await deleteDemo03Student(row.id as number);
|
await deleteDemo03Student(row.id as number);
|
||||||
message.success({
|
message.success($t('ui.actionMessage.deleteSuccess', [row.id]));
|
||||||
content: $t('ui.actionMessage.deleteSuccess', [row.id]),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
await getList();
|
await getList();
|
||||||
} catch {
|
} catch {
|
||||||
hideLoading();
|
hideLoading();
|
||||||
|
@ -132,7 +132,7 @@ async function onExport() {
|
||||||
try {
|
try {
|
||||||
exportLoading.value = true;
|
exportLoading.value = true;
|
||||||
const data = await exportDemo03Student(queryParams);
|
const data = await exportDemo03Student(queryParams);
|
||||||
downloadByData(data, '学生.xls');
|
downloadFileFromBlobPart({ fileName: '学生.xls', source: data });
|
||||||
} finally {
|
} finally {
|
||||||
exportLoading.value = false;
|
exportLoading.value = false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,10 +50,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
// 关闭并提示
|
// 关闭并提示
|
||||||
await modalApi.close();
|
await modalApi.close();
|
||||||
emit('success');
|
emit('success');
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} finally {
|
} finally {
|
||||||
modalApi.unlock();
|
modalApi.unlock();
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,11 @@ import { h, nextTick, onMounted, reactive, ref, watch } from 'vue';
|
||||||
|
|
||||||
import { useVbenModal } from '@vben/common-ui';
|
import { useVbenModal } from '@vben/common-ui';
|
||||||
import { Plus } from '@vben/icons';
|
import { Plus } from '@vben/icons';
|
||||||
import { cloneDeep, formatDateTime } from '@vben/utils';
|
import {
|
||||||
|
cloneDeep,
|
||||||
|
formatDateTime,
|
||||||
|
getRangePickerDefaultProps,
|
||||||
|
} from '@vben/utils';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
Button,
|
Button,
|
||||||
|
@ -26,7 +30,6 @@ import {
|
||||||
import { ContentWrap } from '#/components/content-wrap';
|
import { ContentWrap } from '#/components/content-wrap';
|
||||||
import { TableToolbar } from '#/components/table-toolbar';
|
import { TableToolbar } from '#/components/table-toolbar';
|
||||||
import { $t } from '#/locales';
|
import { $t } from '#/locales';
|
||||||
import { getRangePickerDefaultProps } from '#/utils/date';
|
|
||||||
|
|
||||||
import Demo03CourseForm from './demo03-course-form.vue';
|
import Demo03CourseForm from './demo03-course-form.vue';
|
||||||
|
|
||||||
|
@ -62,10 +65,7 @@ async function onDelete(row: Demo03StudentApi.Demo03Course) {
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
await deleteDemo03Course(row.id as number);
|
await deleteDemo03Course(row.id as number);
|
||||||
message.success({
|
message.success($t('ui.actionMessage.deleteSuccess', [row.id]));
|
||||||
content: $t('ui.actionMessage.deleteSuccess', [row.id]),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
getList();
|
getList();
|
||||||
} catch {
|
} catch {
|
||||||
hideLoading();
|
hideLoading();
|
||||||
|
|
|
@ -50,10 +50,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
// 关闭并提示
|
// 关闭并提示
|
||||||
await modalApi.close();
|
await modalApi.close();
|
||||||
emit('success');
|
emit('success');
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} finally {
|
} finally {
|
||||||
modalApi.unlock();
|
modalApi.unlock();
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,11 @@ import { h, nextTick, onMounted, reactive, ref, watch } from 'vue';
|
||||||
|
|
||||||
import { useVbenModal } from '@vben/common-ui';
|
import { useVbenModal } from '@vben/common-ui';
|
||||||
import { Plus } from '@vben/icons';
|
import { Plus } from '@vben/icons';
|
||||||
import { cloneDeep, formatDateTime } from '@vben/utils';
|
import {
|
||||||
|
cloneDeep,
|
||||||
|
formatDateTime,
|
||||||
|
getRangePickerDefaultProps,
|
||||||
|
} from '@vben/utils';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
Button,
|
Button,
|
||||||
|
@ -26,7 +30,6 @@ import {
|
||||||
import { ContentWrap } from '#/components/content-wrap';
|
import { ContentWrap } from '#/components/content-wrap';
|
||||||
import { TableToolbar } from '#/components/table-toolbar';
|
import { TableToolbar } from '#/components/table-toolbar';
|
||||||
import { $t } from '#/locales';
|
import { $t } from '#/locales';
|
||||||
import { getRangePickerDefaultProps } from '#/utils/date';
|
|
||||||
|
|
||||||
import Demo03GradeForm from './demo03-grade-form.vue';
|
import Demo03GradeForm from './demo03-grade-form.vue';
|
||||||
|
|
||||||
|
@ -62,10 +65,7 @@ async function onDelete(row: Demo03StudentApi.Demo03Grade) {
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
await deleteDemo03Grade(row.id as number);
|
await deleteDemo03Grade(row.id as number);
|
||||||
message.success({
|
message.success($t('ui.actionMessage.deleteSuccess', [row.id]));
|
||||||
content: $t('ui.actionMessage.deleteSuccess', [row.id]),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
getList();
|
getList();
|
||||||
} catch {
|
} catch {
|
||||||
hideLoading();
|
hideLoading();
|
||||||
|
|
|
@ -72,10 +72,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
// 关闭并提示
|
// 关闭并提示
|
||||||
await modalApi.close();
|
await modalApi.close();
|
||||||
emit('success');
|
emit('success');
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} finally {
|
} finally {
|
||||||
modalApi.unlock();
|
modalApi.unlock();
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,12 @@ import { h, nextTick, onMounted, reactive, ref } from 'vue';
|
||||||
|
|
||||||
import { Page, useVbenModal } from '@vben/common-ui';
|
import { Page, useVbenModal } from '@vben/common-ui';
|
||||||
import { Download, Plus } from '@vben/icons';
|
import { Download, Plus } from '@vben/icons';
|
||||||
import { cloneDeep, formatDateTime } from '@vben/utils';
|
import {
|
||||||
|
cloneDeep,
|
||||||
|
downloadFileFromBlobPart,
|
||||||
|
formatDateTime,
|
||||||
|
getRangePickerDefaultProps,
|
||||||
|
} from '@vben/utils';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
Button,
|
Button,
|
||||||
|
@ -31,9 +36,7 @@ import { ContentWrap } from '#/components/content-wrap';
|
||||||
import { DictTag } from '#/components/dict-tag';
|
import { DictTag } from '#/components/dict-tag';
|
||||||
import { TableToolbar } from '#/components/table-toolbar';
|
import { TableToolbar } from '#/components/table-toolbar';
|
||||||
import { $t } from '#/locales';
|
import { $t } from '#/locales';
|
||||||
import { getRangePickerDefaultProps } from '#/utils/date';
|
|
||||||
import { DICT_TYPE, getDictOptions } from '#/utils/dict';
|
import { DICT_TYPE, getDictOptions } from '#/utils/dict';
|
||||||
import { downloadByData } from '#/utils/download';
|
|
||||||
|
|
||||||
import Demo03CourseList from './modules/demo03-course-list.vue';
|
import Demo03CourseList from './modules/demo03-course-list.vue';
|
||||||
import Demo03GradeList from './modules/demo03-grade-list.vue';
|
import Demo03GradeList from './modules/demo03-grade-list.vue';
|
||||||
|
@ -113,10 +116,7 @@ async function onDelete(row: Demo03StudentApi.Demo03Student) {
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
await deleteDemo03Student(row.id as number);
|
await deleteDemo03Student(row.id as number);
|
||||||
message.success({
|
message.success($t('ui.actionMessage.deleteSuccess', [row.id]));
|
||||||
content: $t('ui.actionMessage.deleteSuccess', [row.id]),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
await getList();
|
await getList();
|
||||||
} catch {
|
} catch {
|
||||||
hideLoading();
|
hideLoading();
|
||||||
|
@ -128,7 +128,7 @@ async function onExport() {
|
||||||
try {
|
try {
|
||||||
exportLoading.value = true;
|
exportLoading.value = true;
|
||||||
const data = await exportDemo03Student(queryParams);
|
const data = await exportDemo03Student(queryParams);
|
||||||
downloadByData(data, '学生.xls');
|
downloadFileFromBlobPart({ fileName: '学生.xls', source: data });
|
||||||
} finally {
|
} finally {
|
||||||
exportLoading.value = false;
|
exportLoading.value = false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -82,8 +82,9 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
// 提交表单
|
// 提交表单
|
||||||
const data = formData.value as Demo03StudentApi.Demo03Student;
|
const data = formData.value as Demo03StudentApi.Demo03Student;
|
||||||
// 拼接子表的数据
|
// 拼接子表的数据
|
||||||
data.demo03Courses = demo03CourseFormRef.value?.getData();
|
data.demo03courses = demo03CourseFormRef.value?.getData();
|
||||||
data.demo03Grade = demo03GradeFormRef.value?.getValues();
|
data.demo03grade =
|
||||||
|
demo03GradeFormRef.value?.getValues() as Demo03StudentApi.Demo03Grade;
|
||||||
try {
|
try {
|
||||||
await (formData.value?.id
|
await (formData.value?.id
|
||||||
? updateDemo03Student(data)
|
? updateDemo03Student(data)
|
||||||
|
@ -91,10 +92,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
// 关闭并提示
|
// 关闭并提示
|
||||||
await modalApi.close();
|
await modalApi.close();
|
||||||
emit('success');
|
emit('success');
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} finally {
|
} finally {
|
||||||
modalApi.unlock();
|
modalApi.unlock();
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,12 @@ import { h, nextTick, onMounted, reactive, ref } from 'vue';
|
||||||
|
|
||||||
import { Page, useVbenModal } from '@vben/common-ui';
|
import { Page, useVbenModal } from '@vben/common-ui';
|
||||||
import { Download, Plus } from '@vben/icons';
|
import { Download, Plus } from '@vben/icons';
|
||||||
import { cloneDeep, formatDateTime } from '@vben/utils';
|
import {
|
||||||
|
cloneDeep,
|
||||||
|
downloadFileFromBlobPart,
|
||||||
|
formatDateTime,
|
||||||
|
getRangePickerDefaultProps,
|
||||||
|
} from '@vben/utils';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
Button,
|
Button,
|
||||||
|
@ -30,9 +35,7 @@ import { ContentWrap } from '#/components/content-wrap';
|
||||||
import { DictTag } from '#/components/dict-tag';
|
import { DictTag } from '#/components/dict-tag';
|
||||||
import { TableToolbar } from '#/components/table-toolbar';
|
import { TableToolbar } from '#/components/table-toolbar';
|
||||||
import { $t } from '#/locales';
|
import { $t } from '#/locales';
|
||||||
import { getRangePickerDefaultProps } from '#/utils/date';
|
|
||||||
import { DICT_TYPE, getDictOptions } from '#/utils/dict';
|
import { DICT_TYPE, getDictOptions } from '#/utils/dict';
|
||||||
import { downloadByData } from '#/utils/download';
|
|
||||||
|
|
||||||
import Demo03StudentForm from './modules/form.vue';
|
import Demo03StudentForm from './modules/form.vue';
|
||||||
|
|
||||||
|
@ -107,10 +110,7 @@ async function onDelete(row: Demo03StudentApi.Demo03Student) {
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
await deleteDemo03Student(row.id as number);
|
await deleteDemo03Student(row.id as number);
|
||||||
message.success({
|
message.success($t('ui.actionMessage.deleteSuccess', [row.id]));
|
||||||
content: $t('ui.actionMessage.deleteSuccess', [row.id]),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
await getList();
|
await getList();
|
||||||
} catch {
|
} catch {
|
||||||
hideLoading();
|
hideLoading();
|
||||||
|
@ -122,7 +122,7 @@ async function onExport() {
|
||||||
try {
|
try {
|
||||||
exportLoading.value = true;
|
exportLoading.value = true;
|
||||||
const data = await exportDemo03Student(queryParams);
|
const data = await exportDemo03Student(queryParams);
|
||||||
downloadByData(data, '学生.xls');
|
downloadFileFromBlobPart({ fileName: '学生.xls', source: data });
|
||||||
} finally {
|
} finally {
|
||||||
exportLoading.value = false;
|
exportLoading.value = false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -91,10 +91,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
// 关闭并提示
|
// 关闭并提示
|
||||||
await modalApi.close();
|
await modalApi.close();
|
||||||
emit('success');
|
emit('success');
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} finally {
|
} finally {
|
||||||
modalApi.unlock();
|
modalApi.unlock();
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,10 +66,7 @@ async function onDelete(row: InfraFileApi.File) {
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
await deleteFile(row.id as number);
|
await deleteFile(row.id as number);
|
||||||
message.success({
|
message.success($t('ui.actionMessage.deleteSuccess', [row.name || row.path]));
|
||||||
content: $t('ui.actionMessage.deleteSuccess', [row.name || row.path]),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
onRefresh();
|
onRefresh();
|
||||||
} catch {
|
} catch {
|
||||||
hideLoading();
|
hideLoading();
|
||||||
|
|
|
@ -41,10 +41,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
// 关闭并提示
|
// 关闭并提示
|
||||||
await modalApi.close();
|
await modalApi.close();
|
||||||
emit('success');
|
emit('success');
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} finally {
|
} finally {
|
||||||
modalApi.unlock();
|
modalApi.unlock();
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,10 +52,7 @@ async function onMaster(row: InfraFileConfigApi.FileConfig) {
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
await updateFileConfigMaster(row.id as number);
|
await updateFileConfigMaster(row.id as number);
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
onRefresh();
|
onRefresh();
|
||||||
} catch {
|
} catch {
|
||||||
hideLoading();
|
hideLoading();
|
||||||
|
@ -95,10 +92,7 @@ async function onDelete(row: InfraFileConfigApi.FileConfig) {
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
await deleteFileConfig(row.id as number);
|
await deleteFileConfig(row.id as number);
|
||||||
message.success({
|
message.success($t('ui.actionMessage.deleteSuccess', [row.name]));
|
||||||
content: $t('ui.actionMessage.deleteSuccess', [row.name]),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
onRefresh();
|
onRefresh();
|
||||||
} catch {
|
} catch {
|
||||||
hideLoading();
|
hideLoading();
|
||||||
|
|
|
@ -54,10 +54,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
// 关闭并提示
|
// 关闭并提示
|
||||||
await modalApi.close();
|
await modalApi.close();
|
||||||
emit('success');
|
emit('success');
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} finally {
|
} finally {
|
||||||
modalApi.unlock();
|
modalApi.unlock();
|
||||||
}
|
}
|
||||||
|
|
|
@ -112,10 +112,7 @@ async function onDelete(row: InfraJobApi.Job) {
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
await deleteJob(row.id as number);
|
await deleteJob(row.id as number);
|
||||||
message.success({
|
message.success($t('ui.actionMessage.deleteSuccess', [row.name]));
|
||||||
content: $t('ui.actionMessage.deleteSuccess', [row.name]),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
onRefresh();
|
onRefresh();
|
||||||
} finally {
|
} finally {
|
||||||
hideLoading();
|
hideLoading();
|
||||||
|
|
|
@ -48,10 +48,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
// 关闭并提示
|
// 关闭并提示
|
||||||
await modalApi.close();
|
await modalApi.close();
|
||||||
emit('success');
|
emit('success');
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} finally {
|
} finally {
|
||||||
modalApi.unlock();
|
modalApi.unlock();
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,10 +35,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
const result = await getAreaByIp(data.ip);
|
const result = await getAreaByIp(data.ip);
|
||||||
// 设置结果
|
// 设置结果
|
||||||
await setFieldValue('result', result);
|
await setFieldValue('result', result);
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} finally {
|
} finally {
|
||||||
modalApi.unlock();
|
modalApi.unlock();
|
||||||
}
|
}
|
||||||
|
|
|
@ -69,10 +69,7 @@ async function onDelete(row: SystemDeptApi.Dept) {
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
await deleteDept(row.id as number);
|
await deleteDept(row.id as number);
|
||||||
message.success({
|
message.success($t('ui.actionMessage.deleteSuccess', [row.name]));
|
||||||
content: $t('ui.actionMessage.deleteSuccess', [row.name]),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
onRefresh();
|
onRefresh();
|
||||||
} catch {
|
} catch {
|
||||||
hideLoading();
|
hideLoading();
|
||||||
|
|
|
@ -48,10 +48,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
// 关闭并提示
|
// 关闭并提示
|
||||||
await modalApi.close();
|
await modalApi.close();
|
||||||
emit('success');
|
emit('success');
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} finally {
|
} finally {
|
||||||
modalApi.unlock();
|
modalApi.unlock();
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,10 +54,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
// 关闭并提示
|
// 关闭并提示
|
||||||
await modalApi.close();
|
await modalApi.close();
|
||||||
emit('success');
|
emit('success');
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} finally {
|
} finally {
|
||||||
modalApi.unlock();
|
modalApi.unlock();
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,10 +52,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
// 关闭并提示
|
// 关闭并提示
|
||||||
await modalApi.close();
|
await modalApi.close();
|
||||||
emit('success');
|
emit('success');
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} finally {
|
} finally {
|
||||||
modalApi.unlock();
|
modalApi.unlock();
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,10 +50,7 @@ async function onDelete(row: SystemMailAccountApi.MailAccount) {
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
await deleteMailAccount(row.id as number);
|
await deleteMailAccount(row.id as number);
|
||||||
message.success({
|
message.success($t('ui.actionMessage.deleteSuccess', [row.mail]));
|
||||||
content: $t('ui.actionMessage.deleteSuccess', [row.mail]),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
onRefresh();
|
onRefresh();
|
||||||
} finally {
|
} finally {
|
||||||
hideLoading();
|
hideLoading();
|
||||||
|
|
|
@ -55,10 +55,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
// 关闭并提示
|
// 关闭并提示
|
||||||
await modalApi.close();
|
await modalApi.close();
|
||||||
emit('success');
|
emit('success');
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} finally {
|
} finally {
|
||||||
modalApi.unlock();
|
modalApi.unlock();
|
||||||
}
|
}
|
||||||
|
|
|
@ -72,10 +72,7 @@ async function onDelete(row: SystemMailTemplateApi.MailTemplate) {
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
await deleteMailTemplate(row.id as number);
|
await deleteMailTemplate(row.id as number);
|
||||||
message.success({
|
message.success($t('ui.actionMessage.deleteSuccess', [row.name]));
|
||||||
content: $t('ui.actionMessage.deleteSuccess', [row.name]),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
onRefresh();
|
onRefresh();
|
||||||
} finally {
|
} finally {
|
||||||
hideLoading();
|
hideLoading();
|
||||||
|
|
|
@ -55,10 +55,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
// 关闭并提示
|
// 关闭并提示
|
||||||
await modalApi.close();
|
await modalApi.close();
|
||||||
emit('success');
|
emit('success');
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} finally {
|
} finally {
|
||||||
modalApi.unlock();
|
modalApi.unlock();
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,10 +54,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
// 关闭并提示
|
// 关闭并提示
|
||||||
await modalApi.close();
|
await modalApi.close();
|
||||||
emit('success');
|
emit('success');
|
||||||
message.success({
|
message.success('邮件发送成功');
|
||||||
content: '邮件发送成功',
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('发送邮件失败', error);
|
console.error('发送邮件失败', error);
|
||||||
} finally {
|
} finally {
|
||||||
|
|
|
@ -55,10 +55,7 @@ async function onDelete(row: SystemMenuApi.Menu) {
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
await deleteMenu(row.id as number);
|
await deleteMenu(row.id as number);
|
||||||
message.success({
|
message.success($t('ui.actionMessage.deleteSuccess', [row.name]));
|
||||||
content: $t('ui.actionMessage.deleteSuccess', [row.name]),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
onRefresh();
|
onRefresh();
|
||||||
} catch {
|
} catch {
|
||||||
hideLoading();
|
hideLoading();
|
||||||
|
|
|
@ -48,10 +48,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
// 关闭并提示
|
// 关闭并提示
|
||||||
await modalApi.close();
|
await modalApi.close();
|
||||||
emit('success');
|
emit('success');
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} finally {
|
} finally {
|
||||||
modalApi.unlock();
|
modalApi.unlock();
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,10 +46,7 @@ async function onDelete(row: SystemNoticeApi.Notice) {
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
await deleteNotice(row.id as number);
|
await deleteNotice(row.id as number);
|
||||||
message.success({
|
message.success($t('ui.actionMessage.deleteSuccess', [row.title]));
|
||||||
content: $t('ui.actionMessage.deleteSuccess', [row.title]),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
onRefresh();
|
onRefresh();
|
||||||
} catch {
|
} catch {
|
||||||
hideLoading();
|
hideLoading();
|
||||||
|
@ -65,10 +62,7 @@ async function onPush(row: SystemNoticeApi.Notice) {
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
await pushNotice(row.id as number);
|
await pushNotice(row.id as number);
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} catch {
|
} catch {
|
||||||
hideLoading();
|
hideLoading();
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,10 +48,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
// 关闭并提示
|
// 关闭并提示
|
||||||
await modalApi.close();
|
await modalApi.close();
|
||||||
emit('success');
|
emit('success');
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} finally {
|
} finally {
|
||||||
modalApi.unlock();
|
modalApi.unlock();
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,10 +46,7 @@ async function onRead(row: SystemNotifyMessageApi.NotifyMessage) {
|
||||||
// 执行标记已读操作
|
// 执行标记已读操作
|
||||||
await updateNotifyMessageRead([row.id]);
|
await updateNotifyMessageRead([row.id]);
|
||||||
// 提示成功
|
// 提示成功
|
||||||
message.success({
|
message.success('标记已读成功');
|
||||||
content: '标记已读成功',
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
onRefresh();
|
onRefresh();
|
||||||
|
|
||||||
// 打开详情
|
// 打开详情
|
||||||
|
@ -60,10 +57,7 @@ async function onRead(row: SystemNotifyMessageApi.NotifyMessage) {
|
||||||
async function onMarkRead() {
|
async function onMarkRead() {
|
||||||
const rows = gridApi.grid.getCheckboxRecords();
|
const rows = gridApi.grid.getCheckboxRecords();
|
||||||
if (!rows || rows.length === 0) {
|
if (!rows || rows.length === 0) {
|
||||||
message.warning({
|
message.warning('请选择需要标记的站内信');
|
||||||
content: '请选择需要标记的站内信',
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -76,10 +70,7 @@ async function onMarkRead() {
|
||||||
// 执行标记已读操作
|
// 执行标记已读操作
|
||||||
await updateNotifyMessageRead(ids);
|
await updateNotifyMessageRead(ids);
|
||||||
// 提示成功
|
// 提示成功
|
||||||
message.success({
|
message.success('标记已读成功');
|
||||||
content: '标记已读成功',
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
await gridApi.grid.setAllCheckboxRow(false);
|
await gridApi.grid.setAllCheckboxRow(false);
|
||||||
onRefresh();
|
onRefresh();
|
||||||
}
|
}
|
||||||
|
@ -94,10 +85,7 @@ async function onMarkAllRead() {
|
||||||
// 执行标记已读操作
|
// 执行标记已读操作
|
||||||
await updateAllNotifyMessageRead();
|
await updateAllNotifyMessageRead();
|
||||||
// 提示成功
|
// 提示成功
|
||||||
message.success({
|
message.success('全部标记已读成功');
|
||||||
content: '全部标记已读成功',
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
await gridApi.grid.setAllCheckboxRow(false);
|
await gridApi.grid.setAllCheckboxRow(false);
|
||||||
onRefresh();
|
onRefresh();
|
||||||
}
|
}
|
||||||
|
|
|
@ -69,10 +69,7 @@ async function onDelete(row: SystemNotifyTemplateApi.NotifyTemplate) {
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
await deleteNotifyTemplate(row.id as number);
|
await deleteNotifyTemplate(row.id as number);
|
||||||
message.success({
|
message.success($t('ui.actionMessage.deleteSuccess', [row.name]));
|
||||||
content: $t('ui.actionMessage.deleteSuccess', [row.name]),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
onRefresh();
|
onRefresh();
|
||||||
} finally {
|
} finally {
|
||||||
hideLoading();
|
hideLoading();
|
||||||
|
|
|
@ -55,10 +55,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
// 关闭并提示
|
// 关闭并提示
|
||||||
await modalApi.close();
|
await modalApi.close();
|
||||||
emit('success');
|
emit('success');
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} finally {
|
} finally {
|
||||||
modalApi.unlock();
|
modalApi.unlock();
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,10 +56,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
// 关闭并提示
|
// 关闭并提示
|
||||||
await modalApi.close();
|
await modalApi.close();
|
||||||
emit('success');
|
emit('success');
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('发送站内信失败', error);
|
console.error('发送站内信失败', error);
|
||||||
} finally {
|
} finally {
|
||||||
|
|
|
@ -50,10 +50,7 @@ async function onDelete(row: SystemOAuth2ClientApi.OAuth2Client) {
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
await deleteOAuth2Client(row.id as number);
|
await deleteOAuth2Client(row.id as number);
|
||||||
message.success({
|
message.success($t('ui.actionMessage.deleteSuccess', [row.name]));
|
||||||
content: $t('ui.actionMessage.deleteSuccess', [row.name]),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
onRefresh();
|
onRefresh();
|
||||||
} catch {
|
} catch {
|
||||||
hideLoading();
|
hideLoading();
|
||||||
|
|
|
@ -55,10 +55,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
// 关闭并提示
|
// 关闭并提示
|
||||||
await modalApi.close();
|
await modalApi.close();
|
||||||
emit('success');
|
emit('success');
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} finally {
|
} finally {
|
||||||
modalApi.unlock();
|
modalApi.unlock();
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,10 +33,7 @@ async function onDelete(row: SystemOAuth2TokenApi.OAuth2Token) {
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
await deleteOAuth2Token(row.accessToken);
|
await deleteOAuth2Token(row.accessToken);
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
onRefresh();
|
onRefresh();
|
||||||
} catch {
|
} catch {
|
||||||
hideLoading();
|
hideLoading();
|
||||||
|
|
|
@ -53,10 +53,7 @@ async function onDelete(row: SystemPostApi.Post) {
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
await deletePost(row.id as number);
|
await deletePost(row.id as number);
|
||||||
message.success({
|
message.success($t('ui.actionMessage.deleteSuccess', [row.name]));
|
||||||
content: $t('ui.actionMessage.deleteSuccess', [row.name]),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
onRefresh();
|
onRefresh();
|
||||||
} catch {
|
} catch {
|
||||||
hideLoading();
|
hideLoading();
|
||||||
|
|
|
@ -48,10 +48,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
// 关闭并提示
|
// 关闭并提示
|
||||||
await modalApi.close();
|
await modalApi.close();
|
||||||
emit('success');
|
emit('success');
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} finally {
|
} finally {
|
||||||
modalApi.unlock();
|
modalApi.unlock();
|
||||||
}
|
}
|
||||||
|
|
|
@ -67,10 +67,7 @@ async function onDelete(row: SystemRoleApi.Role) {
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
await deleteRole(row.id as number);
|
await deleteRole(row.id as number);
|
||||||
message.success({
|
message.success($t('ui.actionMessage.deleteSuccess', [row.name]));
|
||||||
content: $t('ui.actionMessage.deleteSuccess', [row.name]),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
onRefresh();
|
onRefresh();
|
||||||
} catch {
|
} catch {
|
||||||
hideLoading();
|
hideLoading();
|
||||||
|
|
|
@ -59,10 +59,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
});
|
});
|
||||||
await modalApi.close();
|
await modalApi.close();
|
||||||
emit('success');
|
emit('success');
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} finally {
|
} finally {
|
||||||
modalApi.unlock();
|
modalApi.unlock();
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,10 +54,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
// 关闭并提示
|
// 关闭并提示
|
||||||
await modalApi.close();
|
await modalApi.close();
|
||||||
emit('success');
|
emit('success');
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} finally {
|
} finally {
|
||||||
modalApi.unlock();
|
modalApi.unlock();
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,10 +48,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
// 关闭并提示
|
// 关闭并提示
|
||||||
await modalApi.close();
|
await modalApi.close();
|
||||||
emit('success');
|
emit('success');
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} finally {
|
} finally {
|
||||||
modalApi.unlock();
|
modalApi.unlock();
|
||||||
}
|
}
|
||||||
|
|
|
@ -58,10 +58,7 @@ async function onDelete(row: SystemSmsChannelApi.SmsChannel) {
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
await deleteSmsChannel(row.id as number);
|
await deleteSmsChannel(row.id as number);
|
||||||
message.success({
|
message.success($t('ui.actionMessage.deleteSuccess', [row.signature]));
|
||||||
content: $t('ui.actionMessage.deleteSuccess', [row.signature]),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
onRefresh();
|
onRefresh();
|
||||||
} catch {
|
} catch {
|
||||||
hideLoading();
|
hideLoading();
|
||||||
|
|
|
@ -54,10 +54,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
// 关闭并提示
|
// 关闭并提示
|
||||||
await modalApi.close();
|
await modalApi.close();
|
||||||
emit('success');
|
emit('success');
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} finally {
|
} finally {
|
||||||
modalApi.unlock();
|
modalApi.unlock();
|
||||||
}
|
}
|
||||||
|
|
|
@ -69,10 +69,7 @@ async function onDelete(row: SystemSmsTemplateApi.SmsTemplate) {
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
await deleteSmsTemplate(row.id as number);
|
await deleteSmsTemplate(row.id as number);
|
||||||
message.success({
|
message.success($t('ui.actionMessage.deleteSuccess', [row.name]));
|
||||||
content: $t('ui.actionMessage.deleteSuccess', [row.name]),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
onRefresh();
|
onRefresh();
|
||||||
} finally {
|
} finally {
|
||||||
hideLoading();
|
hideLoading();
|
||||||
|
|
|
@ -55,10 +55,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
// 关闭并提示
|
// 关闭并提示
|
||||||
await modalApi.close();
|
await modalApi.close();
|
||||||
emit('success');
|
emit('success');
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} finally {
|
} finally {
|
||||||
modalApi.unlock();
|
modalApi.unlock();
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,10 +54,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
// 关闭并提示
|
// 关闭并提示
|
||||||
await modalApi.close();
|
await modalApi.close();
|
||||||
emit('success');
|
emit('success');
|
||||||
message.success({
|
message.success('短信发送成功');
|
||||||
content: '短信发送成功',
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('发送短信失败', error);
|
console.error('发送短信失败', error);
|
||||||
} finally {
|
} finally {
|
||||||
|
|
|
@ -50,10 +50,7 @@ async function onDelete(row: SystemSocialClientApi.SocialClient) {
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
await deleteSocialClient(row.id as number);
|
await deleteSocialClient(row.id as number);
|
||||||
message.success({
|
message.success($t('ui.actionMessage.deleteSuccess', [row.name]));
|
||||||
content: $t('ui.actionMessage.deleteSuccess', [row.name]),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
onRefresh();
|
onRefresh();
|
||||||
} catch {
|
} catch {
|
||||||
hideLoading();
|
hideLoading();
|
||||||
|
|
|
@ -55,10 +55,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
// 关闭并提示
|
// 关闭并提示
|
||||||
await modalApi.close();
|
await modalApi.close();
|
||||||
emit('success');
|
emit('success');
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} finally {
|
} finally {
|
||||||
modalApi.unlock();
|
modalApi.unlock();
|
||||||
}
|
}
|
||||||
|
|
|
@ -68,10 +68,7 @@ async function onDelete(row: SystemTenantApi.Tenant) {
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
await deleteTenant(row.id as number);
|
await deleteTenant(row.id as number);
|
||||||
message.success({
|
message.success($t('ui.actionMessage.deleteSuccess', [row.name]));
|
||||||
content: $t('ui.actionMessage.deleteSuccess', [row.name]),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
onRefresh();
|
onRefresh();
|
||||||
} catch {
|
} catch {
|
||||||
hideLoading();
|
hideLoading();
|
||||||
|
|
|
@ -48,10 +48,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
// 关闭并提示
|
// 关闭并提示
|
||||||
await modalApi.close();
|
await modalApi.close();
|
||||||
emit('success');
|
emit('success');
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} finally {
|
} finally {
|
||||||
modalApi.unlock();
|
modalApi.unlock();
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,10 +50,7 @@ async function onDelete(row: SystemTenantPackageApi.TenantPackage) {
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
await deleteTenantPackage(row.id as number);
|
await deleteTenantPackage(row.id as number);
|
||||||
message.success({
|
message.success($t('ui.actionMessage.deleteSuccess', [row.name]));
|
||||||
content: $t('ui.actionMessage.deleteSuccess', [row.name]),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
onRefresh();
|
onRefresh();
|
||||||
} catch {
|
} catch {
|
||||||
hideLoading();
|
hideLoading();
|
||||||
|
|
|
@ -63,10 +63,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
// 关闭并提示
|
// 关闭并提示
|
||||||
await modalApi.close();
|
await modalApi.close();
|
||||||
emit('success');
|
emit('success');
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} finally {
|
} finally {
|
||||||
modalApi.unlock();
|
modalApi.unlock();
|
||||||
}
|
}
|
||||||
|
|
|
@ -94,10 +94,7 @@ async function onDelete(row: SystemUserApi.User) {
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
await deleteUser(row.id as number);
|
await deleteUser(row.id as number);
|
||||||
message.success({
|
message.success($t('ui.actionMessage.deleteSuccess', [row.username]));
|
||||||
content: $t('ui.actionMessage.deleteSuccess', [row.username]),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
onRefresh();
|
onRefresh();
|
||||||
} catch {
|
} catch {
|
||||||
hideLoading();
|
hideLoading();
|
||||||
|
|
|
@ -42,10 +42,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
// 关闭并提示
|
// 关闭并提示
|
||||||
await modalApi.close();
|
await modalApi.close();
|
||||||
emit('success');
|
emit('success');
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} finally {
|
} finally {
|
||||||
modalApi.unlock();
|
modalApi.unlock();
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,10 +48,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
// 关闭并提示
|
// 关闭并提示
|
||||||
await modalApi.close();
|
await modalApi.close();
|
||||||
emit('success');
|
emit('success');
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} finally {
|
} finally {
|
||||||
modalApi.unlock();
|
modalApi.unlock();
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,10 +41,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
// 关闭并提示
|
// 关闭并提示
|
||||||
await modalApi.close();
|
await modalApi.close();
|
||||||
emit('success');
|
emit('success');
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} finally {
|
} finally {
|
||||||
modalApi.unlock();
|
modalApi.unlock();
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,10 +39,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
// 关闭并提示
|
// 关闭并提示
|
||||||
await modalApi.close();
|
await modalApi.close();
|
||||||
emit('success');
|
emit('success');
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} finally {
|
} finally {
|
||||||
modalApi.unlock();
|
modalApi.unlock();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue