edit
This commit is contained in:
@ -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 }
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@ -14,21 +14,22 @@
|
||||
</div>
|
||||
|
||||
<st #st [data]="service.$api_get_functions_by_id" [columns]="columns" bordered size="small"
|
||||
[req]="{ method: 'POST', allInBody: true, process: beforeReq }"
|
||||
[res]="{ reName: { list: 'data' } }" [page]="{ show: false}"
|
||||
[loading]="service.http.loading" class="mt-md">
|
||||
[req]="{ method: 'POST', allInBody: true, process: beforeReq }" [res]="{ reName: { list: 'data' } }"
|
||||
[page]="{ show: false}" [loading]="service.http.loading" class="mt-md">
|
||||
<ng-template st-row="permissionsCode" let-item let-index="index">
|
||||
<p nz-typography nzCopyable [nzCopyText]="item.code+'-'+item.permissionsCode">
|
||||
{{code}}-{{item.permissionsCode}} </p>
|
||||
</ng-template>
|
||||
</st>
|
||||
|
||||
|
||||
<ng-template #configTypeItemModal>
|
||||
<div se-container [labelWidth]="110" [col]="2">
|
||||
<se label="权限名称" required >
|
||||
<nz-select nzShowSearch nzAllowClear [(ngModel)]="functionInfo.buttonId" nzPlaceHolder="请选择权限名称" [disabled]="isDisabled">
|
||||
<nz-option [nzValue]="item.id" [nzLabel]="item.name" *ngFor="let item of functions"></nz-option>
|
||||
</nz-select>
|
||||
<se label="权限名称" required>
|
||||
<input nz-input [(ngModel)]="functionInfo.permissionsName" placeholder="请输入权限名称" [disabled]="isDisabled" />
|
||||
</se>
|
||||
<se label="权限编码" required>
|
||||
{{functionInfo.permissionsCode || '-'}}
|
||||
<input nz-input [(ngModel)]="functionInfo.permissionsCode" placeholder="请输入权限编码" [disabled]="isDisabled" />
|
||||
</se>
|
||||
<se label="api地址" required>
|
||||
<input nz-input [(ngModel)]="functionInfo.permissionsUrl" placeholder="请输入权限路径" [disabled]="isDisabled" />
|
||||
|
||||
@ -0,0 +1,6 @@
|
||||
:host:ng-deep {
|
||||
st-td {
|
||||
word-break: break-all;
|
||||
word-wrap : break-word;
|
||||
}
|
||||
}
|
||||
@ -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',
|
||||
|
||||
@ -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
|
||||
];
|
||||
|
||||
@ -32,3 +32,8 @@ input[type="number"] {
|
||||
.alain-pro__sider-logo{
|
||||
padding-left: 12px;
|
||||
}
|
||||
|
||||
.break-word-all{
|
||||
word-break: break-all;
|
||||
word-wrap : break-word;
|
||||
}
|
||||
Reference in New Issue
Block a user