用户组优化

pull/50/head
smallbun 2023-09-16 23:19:46 +08:00
parent 9e27007f8e
commit d2107ca215
6 changed files with 19 additions and 20 deletions

View File

@ -27,7 +27,7 @@ import { UserGroupDetailTabs } from './constant';
import queryString from 'query-string'; import queryString from 'query-string';
import { useIntl, useLocation } from '@umijs/max'; import { useIntl, useLocation } from '@umijs/max';
import useStyles from './style'; import useStyles from './style';
import AccessStrategy from '@/pages/account/UserGroupDetail/components/AccessStrategy'; import AppAccess from './components/AppAccess';
/** /**
* *
@ -106,7 +106,7 @@ export default () => {
<ProDescriptions.Item <ProDescriptions.Item
dataIndex="name" dataIndex="name"
label={intl.formatMessage({ label={intl.formatMessage({
id: 'pages.account.user_group_detail.pro_descriptions.name', id: 'pages.account.user_group_detail.descriptions.name',
})} })}
fieldProps={{ fieldProps={{
maxLength: 8, maxLength: 8,
@ -116,14 +116,14 @@ export default () => {
<ProDescriptions.Item <ProDescriptions.Item
dataIndex="code" dataIndex="code"
label={intl.formatMessage({ label={intl.formatMessage({
id: 'pages.account.user_group_detail.pro_descriptions.code', id: 'pages.account.user_group_detail.descriptions.code',
})} })}
copyable copyable
editable={false} editable={false}
/> />
<ProDescriptions.Item <ProDescriptions.Item
label={intl.formatMessage({ label={intl.formatMessage({
id: 'pages.account.user_group_detail.pro_descriptions.remark', id: 'pages.account.user_group_detail.descriptions.remark',
})} })}
className={styles.descriptionRemark} className={styles.descriptionRemark}
dataIndex="remark" dataIndex="remark"
@ -151,9 +151,9 @@ export default () => {
tab: intl.formatMessage({ id: 'pages.account.user_group_detail.tab_list.member' }), tab: intl.formatMessage({ id: 'pages.account.user_group_detail.tab_list.member' }),
}, },
{ {
key: UserGroupDetailTabs.access_policy, key: UserGroupDetailTabs.app_access,
tab: intl.formatMessage({ tab: intl.formatMessage({
id: 'pages.account.user_group_detail.tab_list.access_policy', id: 'pages.account.user_group_detail.tab_list.app_access',
}), }),
}, },
]} ]}
@ -169,7 +169,7 @@ export default () => {
{/*成员信息*/} {/*成员信息*/}
{type === UserGroupDetailTabs.member && <MemberList id={id} />} {type === UserGroupDetailTabs.member && <MemberList id={id} />}
{/*授权应用*/} {/*授权应用*/}
{type === UserGroupDetailTabs.access_policy && <AccessStrategy userGroupId={id} />} {type === UserGroupDetailTabs.app_access && <AppAccess userGroupId={id} />}
</PageContainer> </PageContainer>
); );
}; };

View File

@ -52,7 +52,7 @@ export default (props: { userGroupId: string }) => {
xxl: 5, xxl: 5,
}} }}
headerTitle={intl.formatMessage({ headerTitle={intl.formatMessage({
id: 'pages.account.user_group_detail.access_strategy', id: 'pages.account.user_group_detail.app_access_title',
})} })}
request={getAppAccessPolicyList} request={getAppAccessPolicyList}
params={{ subjectId: userGroupId, subjectType: AccessPolicyType.USER_GROUP }} params={{ subjectId: userGroupId, subjectType: AccessPolicyType.USER_GROUP }}

View File

@ -15,6 +15,6 @@
* You should have received a copy of the GNU Affero General Public License * You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
import AccessStrategy from './AccessStrategy'; import AppAccess from './AppAccess';
export default AccessStrategy; export default AppAccess;

View File

@ -19,8 +19,8 @@
* UserGroupDetailTabs * UserGroupDetailTabs
*/ */
export enum UserGroupDetailTabs { export enum UserGroupDetailTabs {
//access_policy //app_access
access_policy = 'access-policy', app_access = 'app-access',
//权限 //权限
permission_info = 'permission-info', permission_info = 'permission-info',
//member //member

View File

@ -20,17 +20,16 @@ export default {
'pages.account.user_group_detail.common.phone': '手机号', 'pages.account.user_group_detail.common.phone': '手机号',
'pages.account.user_group_detail.common.org_display_path': '所属组织', 'pages.account.user_group_detail.common.org_display_path': '所属组织',
'pages.account.user_group_detail.use_mount.message': '未选择用户组', 'pages.account.user_group_detail.use_mount.message': '未选择用户组',
'pages.account.user_group_detail.pro_descriptions.name': '名称', 'pages.account.user_group_detail.descriptions.name': '名称',
'pages.account.user_group_detail.pro_descriptions.code': '编码', 'pages.account.user_group_detail.descriptions.code': '编码',
'pages.account.user_group_detail.pro_descriptions.remark': '备注', 'pages.account.user_group_detail.descriptions.remark': '备注',
'pages.account.user_group_detail.tab_list.rule': '规则配置', 'pages.account.user_group_detail.tab_list.rule': '规则配置',
'pages.account.user_group_detail.tab_list.member': '成员信息', 'pages.account.user_group_detail.tab_list.member': '成员信息',
'pages.account.user_group_detail.tab_list.access_policy': '授权应用', 'pages.account.user_group_detail.tab_list.app_access': '应用权限',
'pages.account.user_group_detail.tab_list.permission_info': '权限管理', 'pages.account.user_group_detail.tab_list.permission_info': '权限管理',
'pages.account.user_group_detail.access_strategy': '已授权应用', 'pages.account.user_group_detail.app_access_title': '已授权应用',
'pages.account.user_group_detail.access_strategy.metas.popconfirm.title': 'pages.account.user_group_detail.app_access.remove.popconfirm.title': '您确定要取消应用授权?',
'您确定要取消应用授权?', 'pages.account.user_group_detail.app_access.remove.popconfirm.remove': '取消授权',
'pages.account.user_group_detail.access_strategy.metas.popconfirm.remove': '取消授权',
'pages.account.user_group_detail.add_member.columns.username': '用户名称', 'pages.account.user_group_detail.add_member.columns.username': '用户名称',
'pages.account.user_group_detail.add_member.columns.full_name': '用户姓名', 'pages.account.user_group_detail.add_member.columns.full_name': '用户姓名',
'pages.account.user_group_detail.add_member.drawer_form.title': '添加成员', 'pages.account.user_group_detail.add_member.drawer_form.title': '添加成员',