fix bug
This commit is contained in:
@ -20,7 +20,7 @@ module.exports = {
|
||||
// }
|
||||
'//api': {
|
||||
target: {
|
||||
host: 'tms-api-test.eascs.com',
|
||||
host: 'tms-api-dev.eascs.com',
|
||||
protocol: 'https:',
|
||||
port: 443
|
||||
},
|
||||
|
||||
@ -27,7 +27,7 @@ const alainConfig: AlainConfig = {
|
||||
'https://gw.alipayobjects.com/os/lib/antv/g2/4.1.4/dist/g2.min.js',
|
||||
'https://gw.alipayobjects.com/os/lib/antv/data-set/0.11.7/dist/data-set.js'
|
||||
]
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
const alainModules = [AlainThemeModule.forRoot(), DelonACLModule.forRoot()];
|
||||
|
||||
32
src/app/routes/datatable/dataindex/dataindex.component.html
Normal file
32
src/app/routes/datatable/dataindex/dataindex.component.html
Normal file
@ -0,0 +1,32 @@
|
||||
<!-- 页头 -->
|
||||
<page-header-wrapper [title]="'数据报表'"></page-header-wrapper>
|
||||
<div nz-row [nzGutter]="16">
|
||||
<div nz-col class="gutter-row" [nzSpan]="6">
|
||||
<g2-card [title]="'客户预存款总额'" [bordered]="true" [total]="'¥ 126,560.00'" [footer]="footer" contentHeight="46">
|
||||
<ng-template #footer>
|
||||
<g2-mini-area line color="#cceafe" height="45" [data]="visitData" (clickItem)="handleClick($event)"></g2-mini-area>
|
||||
</ng-template>
|
||||
</g2-card>
|
||||
</div>
|
||||
<div nz-col class="gutter-row" [nzSpan]="6">
|
||||
<g2-card [title]="'客户预存款总额'" [bordered]="true" [total]="'¥ 126,560.00'" [footer]="footer" contentHeight="46">
|
||||
<ng-template #footer>
|
||||
<g2-mini-area line color="#cceafe" height="45" [data]="visitData" (clickItem)="handleClick($event)"></g2-mini-area>
|
||||
</ng-template>
|
||||
</g2-card>
|
||||
</div>
|
||||
<div nz-col class="gutter-row" [nzSpan]="6">
|
||||
<g2-card [title]="'客户预存款总额'" [bordered]="true" [total]="'¥ 126,560.00'" [footer]="footer" contentHeight="46">
|
||||
<ng-template #footer>
|
||||
<g2-mini-area line color="#cceafe" height="45" [data]="visitData" (clickItem)="handleClick($event)"></g2-mini-area>
|
||||
</ng-template>
|
||||
</g2-card>
|
||||
</div>
|
||||
<div nz-col class="gutter-row" [nzSpan]="6">
|
||||
<g2-card [title]="'客户预存款总额'" [bordered]="true" [total]="'¥ 126,560.00'" [footer]="footer" contentHeight="46">
|
||||
<ng-template #footer>
|
||||
<g2-mini-area line color="#cceafe" height="45" [data]="visitData" (clickItem)="handleClick($event)"></g2-mini-area>
|
||||
</ng-template>
|
||||
</g2-card>
|
||||
</div>
|
||||
</div>
|
||||
@ -0,0 +1,24 @@
|
||||
import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { DatatableDataindexComponent } from './dataindex.component';
|
||||
|
||||
describe('DatatableDataindexComponent', () => {
|
||||
let component: DatatableDataindexComponent;
|
||||
let fixture: ComponentFixture<DatatableDataindexComponent>;
|
||||
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ DatatableDataindexComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(DatatableDataindexComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
37
src/app/routes/datatable/dataindex/dataindex.component.ts
Normal file
37
src/app/routes/datatable/dataindex/dataindex.component.ts
Normal file
@ -0,0 +1,37 @@
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { ModalHelper, _HttpClient } from '@delon/theme';
|
||||
import { G2MiniAreaClickItem, G2MiniAreaData } from '@delon/chart/mini-area';
|
||||
import { format } from 'date-fns';
|
||||
|
||||
@Component({
|
||||
selector: 'app-datatable-dataindex',
|
||||
templateUrl: './dataindex.component.html',
|
||||
styleUrls: ['./dataindex.component.less']
|
||||
})
|
||||
export class DatatableDataindexComponent implements OnInit {
|
||||
visitData = this.genData();
|
||||
|
||||
constructor(private http: _HttpClient, private modal: ModalHelper) { }
|
||||
|
||||
ngOnInit(): void { }
|
||||
private genData(): G2MiniAreaData[] {
|
||||
const beginDay = new Date().getTime();
|
||||
const res: G2MiniAreaData[] = [];
|
||||
for (let i = 0; i < 20; i += 1) {
|
||||
res.push({
|
||||
x: format(new Date(beginDay + 1000 * 60 * 60 * 24 * i), 'yyyy-MM-dd'),
|
||||
y: Math.floor(Math.random() * 100) + 10,
|
||||
});
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
refresh(): void {
|
||||
this.visitData = this.genData();
|
||||
}
|
||||
|
||||
handleClick(data: G2MiniAreaClickItem): void {
|
||||
//this.msg.info(`${data.item.x} - ${data.item.y}`);
|
||||
}
|
||||
|
||||
}
|
||||
13
src/app/routes/datatable/datatable-routing.module.ts
Normal file
13
src/app/routes/datatable/datatable-routing.module.ts
Normal file
@ -0,0 +1,13 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule, Routes } from '@angular/router';
|
||||
import { DatatableDataindexComponent } from './dataindex/dataindex.component';
|
||||
|
||||
const routes: Routes = [
|
||||
|
||||
{ path: 'dataindex', component: DatatableDataindexComponent }];
|
||||
|
||||
@NgModule({
|
||||
imports: [RouterModule.forChild(routes)],
|
||||
exports: [RouterModule]
|
||||
})
|
||||
export class DatatableRoutingModule { }
|
||||
17
src/app/routes/datatable/datatable.module.ts
Normal file
17
src/app/routes/datatable/datatable.module.ts
Normal file
@ -0,0 +1,17 @@
|
||||
import { NgModule, Type } from '@angular/core';
|
||||
import { SharedModule, SHARED_G2_MODULES } from '@shared';
|
||||
import { DatatableRoutingModule } from './datatable-routing.module';
|
||||
import { DatatableDataindexComponent } from './dataindex/dataindex.component';
|
||||
|
||||
const COMPONENTS: Type<void>[] = [
|
||||
DatatableDataindexComponent];
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
SharedModule,
|
||||
DatatableRoutingModule,
|
||||
SHARED_G2_MODULES
|
||||
],
|
||||
declarations: COMPONENTS,
|
||||
})
|
||||
export class DatatableModule { }
|
||||
@ -74,8 +74,8 @@ const routes: Routes = [
|
||||
{
|
||||
path: 'download',
|
||||
loadChildren: () => import('./download/download.module').then(m => m.DownloadModule)
|
||||
}
|
||||
]
|
||||
},
|
||||
{ path: 'datatable', loadChildren: () => import('./datatable/datatable.module').then((m) => m.DatatableModule) },]
|
||||
},
|
||||
// passport
|
||||
{
|
||||
@ -100,4 +100,4 @@ const routes: Routes = [
|
||||
],
|
||||
exports: [RouterModule]
|
||||
})
|
||||
export class RouteRoutingModule {}
|
||||
export class RouteRoutingModule { }
|
||||
|
||||
@ -49,7 +49,8 @@ export class ShowServiceComponent implements OnInit {
|
||||
return this.service.request(this.service.$api_getStaffList, params).pipe(
|
||||
map((res: any) => {
|
||||
return res.map((i: any) => {
|
||||
return { label: i.name, value: i.appUserId };
|
||||
let name = i.name ? `${i.name} / ` : '';
|
||||
return { label: `${name}${i.telephone}`, value: i.appUserId };
|
||||
});
|
||||
}),
|
||||
);
|
||||
|
||||
@ -2,5 +2,7 @@ import { G2BarModule } from '@delon/chart/bar';
|
||||
import { G2MiniAreaModule } from '@delon/chart/mini-area';
|
||||
import { G2PieModule } from '@delon/chart/pie';
|
||||
import { G2TimelineModule } from '@delon/chart/timeline';
|
||||
import { G2CardModule } from '@delon/chart/card';
|
||||
|
||||
export const SHARED_G2_MODULES = [G2BarModule, G2PieModule, G2TimelineModule, G2MiniAreaModule];
|
||||
|
||||
export const SHARED_G2_MODULES = [G2BarModule, G2PieModule, G2TimelineModule, G2MiniAreaModule, G2CardModule];
|
||||
|
||||
Reference in New Issue
Block a user