Skip to content

Commit

Permalink
(ng-alain):添加模块包Pack列表展示
Browse files Browse the repository at this point in the history
  • Loading branch information
gmf520 committed Mar 30, 2019
1 parent 7823388 commit 2ca147f
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
<p>
pack works!
</p>
<nz-card>
<div>
<button nz-button (click)="st.reload()"><i nz-icon nzType="reload" nzTheme="outline"></i>刷新</button>
</div>
<st #st [data]="readUrl" [columns]="columns" [req]="req" [res]="res" [(pi)]="request.PageCondition.PageIndex" [(ps)]="request.PageCondition.PageSize" [page]="page" size="small" [scroll]="{x:'1200px'}" multiSort
(change)="change($event)" (error)="error($event)"></st>
</nz-card>
Original file line number Diff line number Diff line change
@@ -1,15 +1,30 @@
import { Component, OnInit } from '@angular/core';
import { Component, OnInit, Injector } from '@angular/core';
import { STComponentBase, AlainService } from '@shared/osharp/services/ng-alain.service';
import { OsharpSTColumn } from '@shared/osharp/services/ng-alain.types';

@Component({
selector: 'app-pack',
templateUrl: './pack.component.html',
styles: []
})
export class PackComponent implements OnInit {
export class PackComponent extends STComponentBase implements OnInit {

constructor() { }
constructor(injector: Injector, private alain: AlainService) {
super(injector);
this.moduleName = 'pack';
}

ngOnInit() {
super.InitBase();
}

protected GetSTColumns(): OsharpSTColumn[] {
return [
{ title: '名称', index: 'Display' },
{ title: '类型', index: 'Class' },
{ title: '级别', index: 'Level', type: 'tag', tag: this.alain.PackLevelTags },
{ title: '启动顺序', index: 'Order' },
{ title: '是否启用', index: 'IsEnabled' },
];
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -340,4 +340,11 @@ export class AlainService {
2: { text: '更新', color: 'blue' },
3: { text: '删除', color: 'orange' },
};
PackLevelTags: STColumnTag = {
1: { text: 'Core', color: 'red' },
10: { text: 'Framework', color: 'orange' },
20: { text: 'Application', color: 'blue' },
30: { text: 'Business', color: 'green' }

};
}

0 comments on commit 2ca147f

Please sign in to comment.