|
@@ -152,11 +152,11 @@ export default function PostManagement() {
|
|
|
// 导出岗位
|
|
// 导出岗位
|
|
|
const handleExport = async () => {
|
|
const handleExport = async () => {
|
|
|
Modal.confirm({
|
|
Modal.confirm({
|
|
|
- title: '确认导出',
|
|
|
|
|
|
|
+ title: t('common.exportPostConfirm'),
|
|
|
icon: <ExclamationCircleOutlined />,
|
|
icon: <ExclamationCircleOutlined />,
|
|
|
- content: '确定要导出岗位数据吗?',
|
|
|
|
|
- okText: '确定导出',
|
|
|
|
|
- cancelText: '取消',
|
|
|
|
|
|
|
+ content: t('common.exportPostConfirmText'),
|
|
|
|
|
+ okText: t('common.exportPostConfirmButton'),
|
|
|
|
|
+ cancelText: t('common.cancel'),
|
|
|
onOk: async () => {
|
|
onOk: async () => {
|
|
|
setExportLoading(true);
|
|
setExportLoading(true);
|
|
|
try {
|
|
try {
|
|
@@ -165,14 +165,14 @@ export default function PostManagement() {
|
|
|
const url = window.URL.createObjectURL(blob);
|
|
const url = window.URL.createObjectURL(blob);
|
|
|
const link = document.createElement('a');
|
|
const link = document.createElement('a');
|
|
|
link.href = url;
|
|
link.href = url;
|
|
|
- link.download = '岗位列表.xls';
|
|
|
|
|
|
|
+ link.download = t('common.postDataFileName');
|
|
|
document.body.appendChild(link);
|
|
document.body.appendChild(link);
|
|
|
link.click();
|
|
link.click();
|
|
|
document.body.removeChild(link);
|
|
document.body.removeChild(link);
|
|
|
window.URL.revokeObjectURL(url);
|
|
window.URL.revokeObjectURL(url);
|
|
|
- toast.success('导出成功');
|
|
|
|
|
|
|
+ toast.success(t('common.exportPostSuccess'));
|
|
|
} catch (error: any) {
|
|
} catch (error: any) {
|
|
|
- toast.error(error.message || '导出失败');
|
|
|
|
|
|
|
+ toast.error(error.message || t('common.exportPostFailed'));
|
|
|
} finally {
|
|
} finally {
|
|
|
setExportLoading(false);
|
|
setExportLoading(false);
|
|
|
}
|
|
}
|
|
@@ -287,7 +287,7 @@ export default function PostManagement() {
|
|
|
onClick={handleExport}
|
|
onClick={handleExport}
|
|
|
loading={exportLoading}
|
|
loading={exportLoading}
|
|
|
>
|
|
>
|
|
|
- 导出
|
|
|
|
|
|
|
+ {t('common.export')}
|
|
|
</Button>
|
|
</Button>
|
|
|
</PermissionWrapper>
|
|
</PermissionWrapper>
|
|
|
</Space>
|
|
</Space>
|