From 06043e703a29f985f0fd82ff07c1210812513b6e Mon Sep 17 00:00:00 2001 From: Taric Xin Date: Fri, 21 Jan 2022 17:00:05 +0800 Subject: [PATCH] edit --- .../components/api-auth/api-auth.component.ts | 2 +- .../auth-drawer/auth-drawer.component.html | 17 +++++++++-------- .../auth-drawer/auth-drawer.component.less | 6 ++++++ .../auth-drawer/auth-drawer.component.ts | 9 +++++---- src/app/shared/shared-zorro.module.ts | 2 ++ src/styles.less | 5 +++++ 6 files changed, 28 insertions(+), 13 deletions(-) diff --git a/src/app/routes/menu-manager/components/api-auth/api-auth.component.ts b/src/app/routes/menu-manager/components/api-auth/api-auth.component.ts index bac79472..9a7a9fa0 100644 --- a/src/app/routes/menu-manager/components/api-auth/api-auth.component.ts +++ b/src/app/routes/menu-manager/components/api-auth/api-auth.component.ts @@ -67,7 +67,7 @@ export class ApiAuthComponent implements OnInit { nzTitle: '接口权限配置', nzContent: AuthDrawerComponent, nzWidth: 900, - nzContentParams: { id: item.id, appId: this.selectedPlatform.appId } + nzContentParams: { id: item.id, appId: this.selectedPlatform.appId, code: item.keyCode } }); } diff --git a/src/app/routes/menu-manager/components/api-auth/auth-drawer/auth-drawer.component.html b/src/app/routes/menu-manager/components/api-auth/auth-drawer/auth-drawer.component.html index b20a427a..aec07a59 100644 --- a/src/app/routes/menu-manager/components/api-auth/auth-drawer/auth-drawer.component.html +++ b/src/app/routes/menu-manager/components/api-auth/auth-drawer/auth-drawer.component.html @@ -14,21 +14,22 @@ + [req]="{ method: 'POST', allInBody: true, process: beforeReq }" [res]="{ reName: { list: 'data' } }" + [page]="{ show: false}" [loading]="service.http.loading" class="mt-md"> + +

+ {{code}}-{{item.permissionsCode}}

+
- - - - + + - {{functionInfo.permissionsCode || '-'}} + diff --git a/src/app/routes/menu-manager/components/api-auth/auth-drawer/auth-drawer.component.less b/src/app/routes/menu-manager/components/api-auth/auth-drawer/auth-drawer.component.less index e69de29b..40e50505 100644 --- a/src/app/routes/menu-manager/components/api-auth/auth-drawer/auth-drawer.component.less +++ b/src/app/routes/menu-manager/components/api-auth/auth-drawer/auth-drawer.component.less @@ -0,0 +1,6 @@ +:host:ng-deep { + st-td { + word-break: break-all; + word-wrap : break-word; + } +} \ No newline at end of file diff --git a/src/app/routes/menu-manager/components/api-auth/auth-drawer/auth-drawer.component.ts b/src/app/routes/menu-manager/components/api-auth/auth-drawer/auth-drawer.component.ts index 902238b2..e9668879 100644 --- a/src/app/routes/menu-manager/components/api-auth/auth-drawer/auth-drawer.component.ts +++ b/src/app/routes/menu-manager/components/api-auth/auth-drawer/auth-drawer.component.ts @@ -21,6 +21,7 @@ export class AuthDrawerComponent implements OnInit { id = null; appId = ''; + code = ''; functionInfo: any = {}; functions: any[] = []; @@ -52,7 +53,7 @@ export class AuthDrawerComponent implements OnInit { functionAction(item?: any, isDisabled = false) { if (item) { - this.functionInfo = { ...item, buttonId: item.id, id: item.functionButtonId }; + this.functionInfo = { ...item, id: item.functionButtonId }; } else { this.functionInfo = {}; } @@ -126,9 +127,9 @@ export class AuthDrawerComponent implements OnInit { private initST(): STColumn[] { return [ - { title: '权限名称', index: 'name', width: 120 }, - { title: '权限编码', index: 'permissionsCode' }, - { title: '权限路径', index: 'permissionsUrl' }, + { title: '权限名称', index: 'permissionsName', width: 120 }, + { title: '权限编码', render: 'permissionsCode' }, + { title: '权限路径', index: 'permissionsUrl', className: 'break-word-all', width: 200 }, { title: '操作', width: '150px', diff --git a/src/app/shared/shared-zorro.module.ts b/src/app/shared/shared-zorro.module.ts index 5bfa0098..03c39ce3 100644 --- a/src/app/shared/shared-zorro.module.ts +++ b/src/app/shared/shared-zorro.module.ts @@ -44,6 +44,7 @@ import { NzUploadModule } from 'ng-zorro-antd/upload'; import { NzCascaderModule } from 'ng-zorro-antd/cascader'; import { NzAnchorModule } from 'ng-zorro-antd/anchor'; import { NzAffixModule } from 'ng-zorro-antd/affix'; +import { NzTypographyModule } from 'ng-zorro-antd/typography'; export const SHARED_ZORRO_MODULES = [ NzButtonModule, NzGridModule, @@ -82,4 +83,5 @@ export const SHARED_ZORRO_MODULES = [ NzCascaderModule, NzAnchorModule, NzAffixModule, + NzTypographyModule ]; diff --git a/src/styles.less b/src/styles.less index 68960edc..68492e62 100644 --- a/src/styles.less +++ b/src/styles.less @@ -31,4 +31,9 @@ input[type="number"] { .alain-pro__sider-logo{ padding-left: 12px; +} + +.break-word-all{ + word-break: break-all; + word-wrap : break-word; } \ No newline at end of file