Merge branch 'feature/partner' of https://gitlab.eascs.com/tms-ui/tms-obc-web into feature/partner
This commit is contained in:
@ -158,12 +158,12 @@ export class ParterArticleManagementListComponent implements OnInit {
|
||||
}
|
||||
// 新增
|
||||
add() {
|
||||
this.router.navigate(['/partner/article-management/add'], { queryParams: {} });
|
||||
this.router.navigate(['/partner/knowledge/article-management-add'], { queryParams: {} });
|
||||
}
|
||||
|
||||
// 编辑
|
||||
edit(record: STData) {
|
||||
this.router.navigate(['/partner/article-management/edit'], { queryParams: {} });
|
||||
this.router.navigate(['/partner/knowledge/article-management-edit'], { queryParams: {} });
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -0,0 +1,9 @@
|
||||
<page-header [action]="phActionTpl">
|
||||
<ng-template #phActionTpl>
|
||||
<button (click)="add()" nz-button nzType="primary">新建</button>
|
||||
</ng-template>
|
||||
</page-header>
|
||||
<nz-card>
|
||||
<sf mode="search" [schema]="searchSchema" (formSubmit)="st.reset($event)" (formReset)="st.reset($event)"></sf>
|
||||
<st #st [data]="url" [columns]="columns"></st>
|
||||
</nz-card>
|
||||
@ -0,0 +1,24 @@
|
||||
import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { PartnerListComponent } from './list.component';
|
||||
|
||||
describe('PartnerListComponent', () => {
|
||||
let component: PartnerListComponent;
|
||||
let fixture: ComponentFixture<PartnerListComponent>;
|
||||
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ PartnerListComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(PartnerListComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,45 @@
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { STColumn, STComponent } from '@delon/abc/st';
|
||||
import { SFSchema } from '@delon/form';
|
||||
import { ModalHelper, _HttpClient } from '@delon/theme';
|
||||
|
||||
@Component({
|
||||
selector: 'app-partner-list',
|
||||
templateUrl: './list.component.html',
|
||||
})
|
||||
export class PartnerKnowledgeClassificationListComponent implements OnInit {
|
||||
url = `/user`;
|
||||
searchSchema: SFSchema = {
|
||||
properties: {
|
||||
no: {
|
||||
type: 'string',
|
||||
title: '编号'
|
||||
}
|
||||
}
|
||||
};
|
||||
@ViewChild('st') private readonly st!: STComponent;
|
||||
columns: STColumn[] = [
|
||||
{ title: '编号', index: 'no' },
|
||||
{ title: '调用次数', type: 'number', index: 'callNo' },
|
||||
{ title: '头像', type: 'img', width: '50px', index: 'avatar' },
|
||||
{ title: '时间', type: 'date', index: 'updatedAt' },
|
||||
{
|
||||
title: '',
|
||||
buttons: [
|
||||
// { text: '查看', click: (item: any) => `/form/${item.id}` },
|
||||
// { text: '编辑', type: 'static', component: FormEditComponent, click: 'reload' },
|
||||
]
|
||||
}
|
||||
];
|
||||
|
||||
constructor(private http: _HttpClient, private modal: ModalHelper) { }
|
||||
|
||||
ngOnInit(): void { }
|
||||
|
||||
add(): void {
|
||||
// this.modal
|
||||
// .createStatic(FormEditComponent, { i: { id: 0 } })
|
||||
// .subscribe(() => this.st.reload());
|
||||
}
|
||||
|
||||
}
|
||||
@ -40,6 +40,7 @@ import { PartnerListComponent } from './partner-list/components/index/partner-li
|
||||
import { ParterRebateManageMentAddComponent } from './rebate-management/components/rebate-setting/add/add.component';
|
||||
import { ParterArticleManagementListComponent } from './article-management/components/list/list.component';
|
||||
import { ParterArticleManagementEditComponent } from './article-management/components/edit/edit.component';
|
||||
import { PartnerKnowledgeClassificationListComponent } from './knowledge/classification/components/list/list.component';
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
@ -128,15 +129,14 @@ const routes: Routes = [
|
||||
]
|
||||
},
|
||||
{
|
||||
path: 'article-management',
|
||||
path: 'knowledge',
|
||||
children: [
|
||||
{ path: '', component: ParterArticleManagementListComponent },
|
||||
{ path: 'list', component: ParterArticleManagementListComponent},
|
||||
{ path: 'add', component: ParterArticleManagementEditComponent},
|
||||
{ path: 'edit', component: ParterArticleManagementEditComponent},
|
||||
{ path: 'classification', component: PartnerKnowledgeClassificationListComponent },
|
||||
{ path: 'article-management-list', component: ParterArticleManagementListComponent},
|
||||
{ path: 'article-management-add', component: ParterArticleManagementEditComponent},
|
||||
{ path: 'article-management-edit', component: ParterArticleManagementEditComponent},
|
||||
]
|
||||
},
|
||||
|
||||
];
|
||||
@NgModule({
|
||||
imports: [RouterModule.forChild(routes)],
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
*/
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { rebateTableModule, SharedModule } from '@shared';
|
||||
import { SharedModule } from '@shared';
|
||||
import { PartnerAccountManagementAccountDetailComponent } from './account-management/components/account-detail/account-detail.component';
|
||||
import { PartnerAccountManagementListComponent } from './account-management/components/list/list.component';
|
||||
import { PartnerAccountManagementRecordedDetailComponent } from './account-management/components/recorded-detail/recorded-detail.component';
|
||||
@ -52,6 +52,7 @@ import { PartnerRecordedRecordComponent } from './recorded/components/record/rec
|
||||
import { ParterRebateManageMentAddComponent } from './rebate-management/components/rebate-setting/add/add.component';
|
||||
import { ParterArticleManagementEditComponent } from './article-management/components/edit/edit.component';
|
||||
import { ParterArticleManagementListComponent } from './article-management/components/list/list.component';
|
||||
import { PartnerKnowledgeClassificationListComponent } from './knowledge/classification/components/list/list.component';
|
||||
|
||||
const COMPONENTS: any[] = [
|
||||
PartnerBusinessStatisticsIndexComponent,
|
||||
@ -93,12 +94,13 @@ const COMPONENTS: any[] = [
|
||||
AddEtpPartnerComponent,
|
||||
AddPersonalPartnerComponent,
|
||||
ParterArticleManagementEditComponent,
|
||||
ParterArticleManagementListComponent
|
||||
ParterArticleManagementListComponent,
|
||||
PartnerKnowledgeClassificationListComponent
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
declarations: [...COMPONENTS],
|
||||
imports: [CommonModule, PartnerRoutingModule, SharedModule,rebateTableModule],
|
||||
imports: [CommonModule, PartnerRoutingModule, SharedModule],
|
||||
providers: [PartnerListService]
|
||||
})
|
||||
export class PartnerModule { }
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* @Description :
|
||||
* @Description :
|
||||
* @Version : 1.0
|
||||
* @Author : Shiming
|
||||
* @Date : 2022-01-13 15:10:17
|
||||
@ -37,6 +37,7 @@ import { ImageListModule } from './components/imagelist';
|
||||
import { DictSelectComponent } from './components/dict-select';
|
||||
import { PipeModule } from './pipes';
|
||||
import { AccountDetailComponent } from './components/account-detail/account-detail.component';
|
||||
import { rebateTableModule } from './components/rebate-table';
|
||||
|
||||
const MODULES = [
|
||||
AddressModule,
|
||||
@ -51,6 +52,7 @@ const MODULES = [
|
||||
AmapModule,
|
||||
ImageListModule,
|
||||
PipeModule,
|
||||
rebateTableModule,
|
||||
...PRO_SHARED_MODULES
|
||||
];
|
||||
// #endregion
|
||||
@ -88,4 +90,4 @@ const SHAREDCOMPONENTS = [LogisticsTimeLineComponent, DictSelectComponent, Accou
|
||||
],
|
||||
declarations: SHAREDCOMPONENTS
|
||||
})
|
||||
export class SharedModule {}
|
||||
export class SharedModule { }
|
||||
|
||||
Reference in New Issue
Block a user