Browse Source

[完善] 新建计划更新组件

master
陈鹏飞 4 years ago
parent
commit
cd5d09e25a
  1. 1
      src/app/statistic-analysis/scheduled-updates/scheduled-updates.component.html
  2. 0
      src/app/statistic-analysis/scheduled-updates/scheduled-updates.component.scss
  3. 25
      src/app/statistic-analysis/scheduled-updates/scheduled-updates.component.spec.ts
  4. 15
      src/app/statistic-analysis/scheduled-updates/scheduled-updates.component.ts
  5. 16
      src/app/statistic-analysis/state/page-two-time/page-two-time.component.ts
  6. 4
      src/app/statistic-analysis/statistic-analysis-routing.module.ts
  7. 3
      src/app/statistic-analysis/statistic-analysis.module.ts

1
src/app/statistic-analysis/scheduled-updates/scheduled-updates.component.html

@ -0,0 +1 @@
<p>计划更新</p>

0
src/app/statistic-analysis/scheduled-updates/scheduled-updates.component.scss

25
src/app/statistic-analysis/scheduled-updates/scheduled-updates.component.spec.ts

@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ScheduledUpdatesComponent } from './scheduled-updates.component';
describe('ScheduledUpdatesComponent', () => {
let component: ScheduledUpdatesComponent;
let fixture: ComponentFixture<ScheduledUpdatesComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ ScheduledUpdatesComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(ScheduledUpdatesComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

15
src/app/statistic-analysis/scheduled-updates/scheduled-updates.component.ts

@ -0,0 +1,15 @@
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-scheduled-updates',
templateUrl: './scheduled-updates.component.html',
styleUrls: ['./scheduled-updates.component.scss']
})
export class ScheduledUpdatesComponent implements OnInit {
constructor() { }
ngOnInit(): void {
}
}

16
src/app/statistic-analysis/state/page-two-time/page-two-time.component.ts

@ -57,12 +57,24 @@ export class PageTwoTimeComponent implements OnInit {
selectEndMonth:any = (new Date()).getMonth()+1 //结束月份
//按月查询
monthSubmit (e) {
if (e.selectTwoYear >= e.selectOneYear) {
if (e.selectTwoYear > e.selectOneYear) {
let startTime = e.selectOneYear + '-' + e.selectStartMonth + '-' + 1 + ' ' + 0 + ':' + 0 +':'+ 0
let endTime = e.selectTwoYear + '-' + e.selectEndMonth + '-' + 31 + ' ' + 23 + ':' + 59 +':'+ 59
console.log(startTime)
console.log(endTime)
} else {
} else if (e.selectTwoYear === e.selectOneYear) {
if(e.selectEndMonth >= e.selectStartMonth) {
let startTime = e.selectOneYear + '-' + e.selectStartMonth + '-' + 1 + ' ' + 0 + ':' + 0 +':'+ 0
let endTime = e.selectTwoYear + '-' + e.selectEndMonth + '-' + 31 + ' ' + 23 + ':' + 59 +':'+ 59
console.log(startTime)
console.log(endTime)
} else {
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open('请选择正确时间区段','确定',config);
}
}else {
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000

4
src/app/statistic-analysis/statistic-analysis-routing.module.ts

@ -9,6 +9,7 @@ import { DeleteTwoComponent } from './deleteUnit/delete-two/delete-two.component
import { DeleteThereComponent } from './deleteUnit/delete-there/delete-there.component';
import { DeleteFourComponent } from './deleteUnit/delete-four/delete-four.component';
import { BuildingTypeOneComponent } from './buildingType/building-type-one/building-type-one.component';
import {ScheduledUpdatesComponent} from './scheduled-updates/scheduled-updates.component'
const routes: Routes = [
{ path: 'statePageOne', component: PageOneComponent},
@ -17,7 +18,8 @@ const routes: Routes = [
{ path: 'delete_two', component: DeleteTwoComponent},
{ path: 'delete_there', component: DeleteThereComponent},
{ path: 'delete_four', component: DeleteFourComponent},
{ path: 'buildingType_one', component: BuildingTypeOneComponent}
{ path: 'buildingType_one', component: BuildingTypeOneComponent},
{ path: 'scheduledUpdates', component: ScheduledUpdatesComponent}
];
@NgModule({

3
src/app/statistic-analysis/statistic-analysis.module.ts

@ -52,10 +52,11 @@ import { DeleteTwoComponent } from './deleteUnit/delete-two/delete-two.component
import { DeleteThereComponent } from './deleteUnit/delete-there/delete-there.component';
import { DeleteFourComponent } from './deleteUnit/delete-four/delete-four.component';
import { BuildingTypeOneComponent } from './buildingType/building-type-one/building-type-one.component';
import { ScheduledUpdatesComponent } from './scheduled-updates/scheduled-updates.component';
@NgModule({
declarations: [PageOneComponent, PageTwoTimeComponent, PageTwoNameComponent, PageZhongDuiDetailsComponent,echartsComponent, DeleteOneComponent, DeleteTwoComponent, DeleteThereComponent, DeleteFourComponent, BuildingTypeOneComponent],
declarations: [PageOneComponent, PageTwoTimeComponent, PageTwoNameComponent, PageZhongDuiDetailsComponent,echartsComponent, DeleteOneComponent, DeleteTwoComponent, DeleteThereComponent, DeleteFourComponent, BuildingTypeOneComponent, ScheduledUpdatesComponent],
imports: [
CommonModule,
StatisticAnalysisRoutingModule,

Loading…
Cancel
Save