feat(系统设置): 组织-成员国际化按钮功能补充

This commit is contained in:
xinxin.wu 2023-07-10 09:58:59 +08:00 committed by f2c-ci-robot[bot]
parent 3a9ef7bef1
commit bd19642df8
3 changed files with 35 additions and 2 deletions

View File

@ -51,10 +51,12 @@
import { useI18n } from '@/hooks/useI18n';
import MsBaseTable from '@/components/pure/ms-table/base-table.vue';
import MsButton from '@/components/pure/ms-button/index.vue';
import { Message } from '@arco-design/web-vue';
import useTable from '@/components/pure/ms-table/useTable';
import addMemberModal from './components/addMemberModal.vue';
import { getMemberList } from '@/api/modules/system/member';
import type { MsTableColumn } from '@/components/pure/ms-table/type';
import useModal from '@/hooks/useModal';
const columns: MsTableColumn = [
{
@ -124,9 +126,29 @@
});
const { t } = useI18n();
const { openModal } = useModal();
function deleteMember(record: any) {
console.log(record, 1);
openModal({
type: 'warning',
title: t('organization.member.deleteMemberTip', { name: record.name }),
content: '',
okText: t('organization.member.deleteMemberConfirm'),
cancelText: t('organization.member.deleteMemberCancel'),
okButtonProps: {
status: 'danger',
},
onBeforeOk: async () => {
try {
Message.success(t('organization.member.deleteMemberSuccess'));
return true;
} catch (error) {
console.log(error);
return false;
}
},
hideCancel: false,
});
}
const tableSelected = ref<(string | number)[]>([]);
function handleTableSelect(selectArr: (string | number)[]) {

View File

@ -2,7 +2,7 @@ export default {
'organization.member.addMember': 'Add Member',
'organization.member.searchMember': 'Search by name or email address',
'organization.member.remove': 'Remove',
'organization.member.batchActionAddProject': 'dd to project',
'organization.member.batchActionAddProject': 'Add to project',
'organization.member.batchActionAddUsergroup': 'Add to usergroup',
'organization.member.tableEnable': 'Enabled',
'organization.member.tableDisable': 'Disabled',
@ -17,4 +17,10 @@ export default {
'organization.member.selectMemberScope': 'Select the member you want to add. Multiple selection is supported',
'organization.member.pleaseSelectMember': 'Please select user',
'organization.member.Save': 'Save',
'organization.member.deleteMemberTip': 'Are you sure to delete the user `{name}` ?',
'system.user.deleteUserTip': 'Are you sure to delete the user `{name}` ?',
'organization.member.deleteMemberConfirm': 'Delete',
'organization.member.deleteMemberCancel': 'Cancel',
'organization.member.deleteMemberSuccess': 'Delete successful',
'organization.member.batchModalSuccess': 'Successfully added',
};

View File

@ -17,4 +17,9 @@ export default {
'organization.member.selectMemberScope': '请选择需要添加的成员支持多选',
'organization.member.pleaseSelectMember': '请选择成员',
'organization.member.Save': '保存',
'organization.member.deleteMemberTip': '确认删除 `{name}` 这个成员吗?',
'organization.member.deleteMemberConfirm': '确认删除',
'organization.member.deleteMemberCancel': '取消',
'organization.member.deleteMemberSuccess': '删除成功',
'organization.member.batchModalSuccess': '添加成功',
};