菜单
This commit is contained in:
@ -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 { OrderCarorderlistComponent } from './carorderlist.component';
|
||||||
|
|
||||||
|
describe('OrderCarorderlistComponent', () => {
|
||||||
|
let component: OrderCarorderlistComponent;
|
||||||
|
let fixture: ComponentFixture<OrderCarorderlistComponent>;
|
||||||
|
|
||||||
|
beforeEach(waitForAsync(() => {
|
||||||
|
TestBed.configureTestingModule({
|
||||||
|
declarations: [ OrderCarorderlistComponent ]
|
||||||
|
})
|
||||||
|
.compileComponents();
|
||||||
|
}));
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
fixture = TestBed.createComponent(OrderCarorderlistComponent);
|
||||||
|
component = fixture.componentInstance;
|
||||||
|
fixture.detectChanges();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should create', () => {
|
||||||
|
expect(component).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
||||||
45
src/app/routes/order/carorderlist/carorderlist.component.ts
Normal file
45
src/app/routes/order/carorderlist/carorderlist.component.ts
Normal file
@ -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-order-carorderlist',
|
||||||
|
templateUrl: './carorderlist.component.html',
|
||||||
|
})
|
||||||
|
export class OrderCarorderlistComponent 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());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
13
src/app/routes/order/order-routing.module.ts
Normal file
13
src/app/routes/order/order-routing.module.ts
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
import { NgModule } from '@angular/core';
|
||||||
|
import { RouterModule, Routes } from '@angular/router';
|
||||||
|
import { OrderCarorderlistComponent } from './carorderlist/carorderlist.component';
|
||||||
|
|
||||||
|
const routes: Routes = [
|
||||||
|
|
||||||
|
{ path: 'carorderlist', component: OrderCarorderlistComponent }];
|
||||||
|
|
||||||
|
@NgModule({
|
||||||
|
imports: [RouterModule.forChild(routes)],
|
||||||
|
exports: [RouterModule]
|
||||||
|
})
|
||||||
|
export class OrderRoutingModule { }
|
||||||
16
src/app/routes/order/order.module.ts
Normal file
16
src/app/routes/order/order.module.ts
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
import { NgModule, Type } from '@angular/core';
|
||||||
|
import { SharedModule } from '@shared';
|
||||||
|
import { OrderRoutingModule } from './order-routing.module';
|
||||||
|
import { OrderCarorderlistComponent } from './carorderlist/carorderlist.component';
|
||||||
|
|
||||||
|
const COMPONENTS: Type<void>[] = [
|
||||||
|
OrderCarorderlistComponent];
|
||||||
|
|
||||||
|
@NgModule({
|
||||||
|
imports: [
|
||||||
|
SharedModule,
|
||||||
|
OrderRoutingModule
|
||||||
|
],
|
||||||
|
declarations: COMPONENTS,
|
||||||
|
})
|
||||||
|
export class OrderModule { }
|
||||||
@ -13,7 +13,7 @@ const routes: Routes = [
|
|||||||
children: [
|
children: [
|
||||||
{ path: '', redirectTo: 'dashboard', pathMatch: 'full' },
|
{ path: '', redirectTo: 'dashboard', pathMatch: 'full' },
|
||||||
{ path: 'dashboard', component: DashboardComponent },
|
{ path: 'dashboard', component: DashboardComponent },
|
||||||
],
|
{ path: 'order', loadChildren: () => import('./order/order.module').then((m) => m.OrderModule) },],
|
||||||
},
|
},
|
||||||
// passport
|
// passport
|
||||||
{ path: '', loadChildren: () => import('./passport/passport.module').then((m) => m.PassportModule) },
|
{ path: '', loadChildren: () => import('./passport/passport.module').then((m) => m.PassportModule) },
|
||||||
|
|||||||
@ -15,6 +15,22 @@
|
|||||||
"icon": "anticon anticon-rocket",
|
"icon": "anticon anticon-rocket",
|
||||||
"shortcutRoot": true,
|
"shortcutRoot": true,
|
||||||
"children": []
|
"children": []
|
||||||
|
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"text": "订单管理",
|
||||||
|
"icon": "anticon anticon-rocket",
|
||||||
|
"shortcutRoot": true,
|
||||||
|
"children": [
|
||||||
|
{
|
||||||
|
"text": "整车订单",
|
||||||
|
"link": "/order/carorderlist"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"text": "大宗订单",
|
||||||
|
"link": "/ctc/order/bigcarorderlist"
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user