style: 用户组管理拼写错误修改
This commit is contained in:
parent
146e6996ce
commit
90945440fe
|
@ -12,7 +12,7 @@ import {
|
||||||
addUserToUserGroupUrl,
|
addUserToUserGroupUrl,
|
||||||
} from '@/api/requrls/setting/usergroup';
|
} from '@/api/requrls/setting/usergroup';
|
||||||
import { TableQueryParams, CommonList } from '@/models/common';
|
import { TableQueryParams, CommonList } from '@/models/common';
|
||||||
import { UserGroupItem, UserGroupAuthSeting, SaveGlobalUSettingData, UserTableItem } from '@/models/setting/usergroup';
|
import { UserGroupItem, UserGroupAuthSetting, SaveGlobalUSettingData, UserTableItem } from '@/models/setting/usergroup';
|
||||||
|
|
||||||
export function updateOrAddUserGroup(data: Partial<UserGroupItem>) {
|
export function updateOrAddUserGroup(data: Partial<UserGroupItem>) {
|
||||||
return MSR.post<UserGroupItem>({
|
return MSR.post<UserGroupItem>({
|
||||||
|
@ -41,11 +41,11 @@ export function getUsergroupInfo(id: string) {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getGlobalUSetting(id: string) {
|
export function getGlobalUSetting(id: string) {
|
||||||
return MSR.get<UserGroupAuthSeting[]>({ url: `${getGlobalUSettingUrl}${id}` });
|
return MSR.get<UserGroupAuthSetting[]>({ url: `${getGlobalUSettingUrl}${id}` });
|
||||||
}
|
}
|
||||||
|
|
||||||
export function saveGlobalUSetting(data: SaveGlobalUSettingData) {
|
export function saveGlobalUSetting(data: SaveGlobalUSettingData) {
|
||||||
return MSR.post<UserGroupAuthSeting[]>({ url: editGlobalUSettingUrl, data });
|
return MSR.post<UserGroupAuthSetting[]>({ url: editGlobalUSettingUrl, data });
|
||||||
}
|
}
|
||||||
|
|
||||||
export function postUserByUserGroup(data: TableQueryParams) {
|
export function postUserByUserGroup(data: TableQueryParams) {
|
||||||
|
|
|
@ -12,16 +12,16 @@
|
||||||
import MsIcon from '../ms-icon-font/index.vue';
|
import MsIcon from '../ms-icon-font/index.vue';
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'PageItemElipsis',
|
name: 'PageItemEllipsis',
|
||||||
});
|
});
|
||||||
|
|
||||||
export interface PageItemElipsisProps {
|
export interface PageItemEllipsisProps {
|
||||||
current: number;
|
current: number;
|
||||||
step: number;
|
step: number;
|
||||||
pages: number;
|
pages: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
const props = withDefaults(defineProps<PageItemElipsisProps>(), {
|
const props = withDefaults(defineProps<PageItemEllipsisProps>(), {
|
||||||
step: 5,
|
step: 5,
|
||||||
});
|
});
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
<div class="flex-col">
|
<div class="flex-col">
|
||||||
<div v-for="(item, idx) in nonSortColumn" :key="item.dataIndex" class="column-item">
|
<div v-for="(item, idx) in nonSortColumn" :key="item.dataIndex" class="column-item">
|
||||||
<div>{{ t(item.title as string) }}</div>
|
<div>{{ t(item.title as string) }}</div>
|
||||||
<a-switch size="small" :model-value="item.showInTable" @change="handleFisrtColumnChange(idx)" />
|
<a-switch size="small" :model-value="item.showInTable" @change="handleFirstColumnChange(idx)" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<a-divider orientation="center" class="non-sort">{{ t('msTable.columnSetting.nonSort') }}</a-divider>
|
<a-divider orientation="center" class="non-sort">{{ t('msTable.columnSetting.nonSort') }}</a-divider>
|
||||||
|
@ -109,7 +109,7 @@
|
||||||
loadColumn(props.tableKey);
|
loadColumn(props.tableKey);
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleFisrtColumnChange = (idx: number) => {
|
const handleFirstColumnChange = (idx: number) => {
|
||||||
const item = nonSortColumn.value[idx];
|
const item = nonSortColumn.value[idx];
|
||||||
item.showInTable = !item.showInTable;
|
item.showInTable = !item.showInTable;
|
||||||
hasChange.value = true;
|
hasChange.value = true;
|
||||||
|
|
|
@ -50,7 +50,7 @@ export interface UserGroupPermissionItem {
|
||||||
export type AuthScopeType = 'SYSTEM' | 'PROJECT' | 'ORGANIZATION';
|
export type AuthScopeType = 'SYSTEM' | 'PROJECT' | 'ORGANIZATION';
|
||||||
|
|
||||||
// 用户组对应的权限配置
|
// 用户组对应的权限配置
|
||||||
export interface UserGroupAuthSeting {
|
export interface UserGroupAuthSetting {
|
||||||
// 菜单项ID
|
// 菜单项ID
|
||||||
id: AuthScopeType;
|
id: AuthScopeType;
|
||||||
// 菜单所属类型
|
// 菜单所属类型
|
||||||
|
@ -64,7 +64,7 @@ export interface UserGroupAuthSeting {
|
||||||
// 菜单下的权限列表
|
// 菜单下的权限列表
|
||||||
permissions?: UserGroupPermissionItem[];
|
permissions?: UserGroupPermissionItem[];
|
||||||
// 子菜单
|
// 子菜单
|
||||||
children?: UserGroupAuthSeting[];
|
children?: UserGroupAuthSetting[];
|
||||||
}
|
}
|
||||||
|
|
||||||
// 权限表格DataItem
|
// 权限表格DataItem
|
||||||
|
|
|
@ -55,7 +55,7 @@
|
||||||
import { type TableColumnData, type TableData } from '@arco-design/web-vue';
|
import { type TableColumnData, type TableData } from '@arco-design/web-vue';
|
||||||
import useUserGroupStore from '@/store/modules/setting/usergroup';
|
import useUserGroupStore from '@/store/modules/setting/usergroup';
|
||||||
import { getGlobalUSetting, saveGlobalUSetting } from '@/api/modules/setting/usergroup';
|
import { getGlobalUSetting, saveGlobalUSetting } from '@/api/modules/setting/usergroup';
|
||||||
import { UserGroupAuthSeting, AuthTableItem, type AuthScopeType, SavePermissions } from '@/models/setting/usergroup';
|
import { UserGroupAuthSetting, AuthTableItem, type AuthScopeType, SavePermissions } from '@/models/setting/usergroup';
|
||||||
import MsButton from '@/components/pure/ms-button/index.vue';
|
import MsButton from '@/components/pure/ms-button/index.vue';
|
||||||
|
|
||||||
export declare type OperationName = 'selection-checkbox' | 'selection-radio' | 'expand' | 'drag-handle';
|
export declare type OperationName = 'selection-checkbox' | 'selection-radio' | 'expand' | 'drag-handle';
|
||||||
|
@ -116,7 +116,7 @@
|
||||||
* @param type
|
* @param type
|
||||||
* @param idx
|
* @param idx
|
||||||
*/
|
*/
|
||||||
const makeData = (item: UserGroupAuthSeting, type: AuthScopeType) => {
|
const makeData = (item: UserGroupAuthSetting, type: AuthScopeType) => {
|
||||||
const result: AuthTableItem[] = [];
|
const result: AuthTableItem[] = [];
|
||||||
item.children?.forEach((child, index) => {
|
item.children?.forEach((child, index) => {
|
||||||
const perChecked =
|
const perChecked =
|
||||||
|
@ -143,7 +143,7 @@
|
||||||
return result;
|
return result;
|
||||||
};
|
};
|
||||||
|
|
||||||
const transformData = (data: UserGroupAuthSeting[]) => {
|
const transformData = (data: UserGroupAuthSetting[]) => {
|
||||||
const result: AuthTableItem[] = [];
|
const result: AuthTableItem[] = [];
|
||||||
data.forEach((item) => {
|
data.forEach((item) => {
|
||||||
if (item.type === 'SYSTEM') {
|
if (item.type === 'SYSTEM') {
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
<div class="flex flex-row items-center justify-between">
|
<div class="flex flex-row items-center justify-between">
|
||||||
<div class="title">{{ store.userGroupInfo.currentName }}</div>
|
<div class="title">{{ store.userGroupInfo.currentName }}</div>
|
||||||
<div class="flex items-center">
|
<div class="flex items-center">
|
||||||
<a-input class="w-[240px]" :placeholder="t('system.userGroup.searchPlacehoder')">
|
<a-input class="w-[240px]" :placeholder="t('system.userGroup.searchPlaceholder')">
|
||||||
<template #prefix>
|
<template #prefix>
|
||||||
<icon-search />
|
<icon-search />
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -33,7 +33,7 @@ export default {
|
||||||
userIsNotNone: 'User is not none',
|
userIsNotNone: 'User is not none',
|
||||||
confirm: 'Confirm',
|
confirm: 'Confirm',
|
||||||
global: 'Global',
|
global: 'Global',
|
||||||
searchPlacehoder: 'Search by ID/Name',
|
searchPlaceholder: 'Search by ID/Name',
|
||||||
SYSTEM: '系统',
|
SYSTEM: '系统',
|
||||||
PROJECT: '项目',
|
PROJECT: '项目',
|
||||||
ORGANIZATION: '组织',
|
ORGANIZATION: '组织',
|
||||||
|
|
|
@ -33,7 +33,7 @@ export default {
|
||||||
pleaseInputUserGroupName: '请输入用户组名称,且不与其他用户组名称重复',
|
pleaseInputUserGroupName: '请输入用户组名称,且不与其他用户组名称重复',
|
||||||
userGroupNameIsExist: `用户组{name}已存在`,
|
userGroupNameIsExist: `用户组{name}已存在`,
|
||||||
pleaseSelectAuthScope: '请选择用户组所属的权限范围',
|
pleaseSelectAuthScope: '请选择用户组所属的权限范围',
|
||||||
searchPlacehoder: '通过ID/名称搜索',
|
searchPlaceholder: '通过ID/名称搜索',
|
||||||
SYSTEM: '系统',
|
SYSTEM: '系统',
|
||||||
PROJECT: '项目',
|
PROJECT: '项目',
|
||||||
ORGANIZATION: '组织',
|
ORGANIZATION: '组织',
|
||||||
|
|
Loading…
Reference in New Issue