邵佳豪
4 years ago
22 changed files with 322 additions and 56 deletions
@ -0,0 +1,54 @@ |
|||||||
|
<!-- |
||||||
|
* @Descripttion: |
||||||
|
* @version: |
||||||
|
* @Author: sueRimn |
||||||
|
* @Date: 2021-03-05 15:57:08 |
||||||
|
* @LastEditors: sueRimn |
||||||
|
* @LastEditTime: 2021-03-15 13:52:29 |
||||||
|
--> |
||||||
|
<div class="body"> |
||||||
|
<div class="topbox"> |
||||||
|
<div class="btnbox"> |
||||||
|
<button mat-stroked-button (click)="goBack ()">返回</button> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
<div class="title"> |
||||||
|
<span>{{titlename}}</span> |
||||||
|
</div> |
||||||
|
<div class="tablebox"> |
||||||
|
<table mat-table [dataSource]="tabledataSource" class="mat-elevation-z8"> |
||||||
|
<ng-container matColumnDef="unitname"> |
||||||
|
<th mat-header-cell *matHeaderCellDef style="width: 10%;">名称</th> |
||||||
|
<td mat-cell *matCellDef="let element">{{element.name}}</td> |
||||||
|
</ng-container> |
||||||
|
<ng-container matColumnDef="modifiedTime"> |
||||||
|
<th mat-header-cell *matHeaderCellDef style="width: 10%;">修改时间</th> |
||||||
|
<td mat-cell *matCellDef="let element">{{element.modifiedTime|date:'yyyy-MM-dd'}}</td> |
||||||
|
</ng-container> |
||||||
|
<ng-container matColumnDef="organizationName"> |
||||||
|
<th mat-header-cell *matHeaderCellDef style="width: 10%;">消防救援站</th> |
||||||
|
<td mat-cell *matCellDef="let element">{{element.organizationName}}</td> |
||||||
|
</ng-container> |
||||||
|
<ng-container matColumnDef="buildingTypes"> |
||||||
|
<th mat-header-cell *matHeaderCellDef style="width: 10%;">类型</th> |
||||||
|
<td mat-cell *matCellDef="let element">{{element.buildingTypes.length != 0 ? element.buildingTypes[0].name : ''}}</td> |
||||||
|
</ng-container> |
||||||
|
<ng-container matColumnDef="operation"> |
||||||
|
<th mat-header-cell *matHeaderCellDef style="width: 10%;">操作</th> |
||||||
|
<td mat-cell *matCellDef="let element" style="white-space: nowrap;cursor: pointer;"> |
||||||
|
<span style="color: blue;" >详情</span> |
||||||
|
</td> |
||||||
|
</ng-container> |
||||||
|
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr> |
||||||
|
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr> |
||||||
|
</table> |
||||||
|
<mat-paginator style="width: 50%;margin-left: 25%;" pageEvent [length]="length" |
||||||
|
[pageSize]="pageSize" |
||||||
|
[pageSizeOptions]="pageSizeOptions" |
||||||
|
(page)="changePage($event)"> |
||||||
|
|
||||||
|
</mat-paginator> |
||||||
|
|
||||||
|
</div> |
||||||
|
</div> |
||||||
|
|
@ -0,0 +1,73 @@ |
|||||||
|
.body{ |
||||||
|
display: flex; |
||||||
|
flex-direction: column; |
||||||
|
.topbox{ |
||||||
|
width: 100%; |
||||||
|
height: 80px; |
||||||
|
min-height: 80px; |
||||||
|
border-bottom: 1px gray solid; |
||||||
|
.btnbox{ |
||||||
|
display: flex; |
||||||
|
flex-direction:row-reverse; |
||||||
|
float: right; |
||||||
|
justify-content: center; |
||||||
|
align-items: center; |
||||||
|
height: 100%; |
||||||
|
button{ |
||||||
|
width: 88px; |
||||||
|
height: 36px; |
||||||
|
} |
||||||
|
margin-right:4%; |
||||||
|
|
||||||
|
} |
||||||
|
} |
||||||
|
.title{ |
||||||
|
width: 100%; |
||||||
|
text-align: center; |
||||||
|
margin-top: 2%; |
||||||
|
span{ |
||||||
|
text-align: center; |
||||||
|
font-size: 28px; |
||||||
|
} |
||||||
|
} |
||||||
|
.buttonbox{ |
||||||
|
padding-left: 50px; |
||||||
|
button{ |
||||||
|
margin:0 10px |
||||||
|
} |
||||||
|
} |
||||||
|
.tablebox{ |
||||||
|
width: 100%; |
||||||
|
text-align: center; |
||||||
|
table{ |
||||||
|
width: 50%; |
||||||
|
text-align: center; |
||||||
|
margin-left: 25%; |
||||||
|
margin-top:20px; |
||||||
|
th,td{ |
||||||
|
text-align: center; |
||||||
|
font-size: 15px; |
||||||
|
color: #000000; |
||||||
|
} |
||||||
|
} |
||||||
|
mat-paginator{ |
||||||
|
width: 100%; |
||||||
|
margin-left: 0%; |
||||||
|
} |
||||||
|
.mat-column-unitname{ |
||||||
|
width: 15%; |
||||||
|
} |
||||||
|
.mat-column-integrity{ |
||||||
|
width: 13%; |
||||||
|
} |
||||||
|
.mat-column-operation{ |
||||||
|
width: 5%; |
||||||
|
} |
||||||
|
.mat-column-jurisdictionsquadron{ |
||||||
|
width: 10%; |
||||||
|
} |
||||||
|
span:hover{ |
||||||
|
text-decoration:underline |
||||||
|
} |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,25 @@ |
|||||||
|
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; |
||||||
|
|
||||||
|
import { AllPlanComponent } from './all-plan.component'; |
||||||
|
|
||||||
|
describe('AllPlanComponent', () => { |
||||||
|
let component: AllPlanComponent; |
||||||
|
let fixture: ComponentFixture<AllPlanComponent>; |
||||||
|
|
||||||
|
beforeEach(async(() => { |
||||||
|
TestBed.configureTestingModule({ |
||||||
|
declarations: [ AllPlanComponent ] |
||||||
|
}) |
||||||
|
.compileComponents(); |
||||||
|
})); |
||||||
|
|
||||||
|
beforeEach(() => { |
||||||
|
fixture = TestBed.createComponent(AllPlanComponent); |
||||||
|
component = fixture.componentInstance; |
||||||
|
fixture.detectChanges(); |
||||||
|
}); |
||||||
|
|
||||||
|
it('should create', () => { |
||||||
|
expect(component).toBeTruthy(); |
||||||
|
}); |
||||||
|
}); |
@ -0,0 +1,63 @@ |
|||||||
|
/* |
||||||
|
* @Descripttion:
|
||||||
|
* @version:
|
||||||
|
* @Author: sueRimn |
||||||
|
* @Date: 2021-03-15 11:32:30 |
||||||
|
* @LastEditors: sueRimn |
||||||
|
* @LastEditTime: 2021-03-15 13:51:48 |
||||||
|
*/ |
||||||
|
import { Component, OnInit, ViewChild, Inject } from '@angular/core'; |
||||||
|
import { HttpClient } from '@angular/common/http' |
||||||
|
import { MatTreeFlatDataSource, MatTreeFlattener } from '@angular/material/tree'; |
||||||
|
import { MatPaginator } from '@angular/material/paginator'; |
||||||
|
import { FlatTreeControl } from '@angular/cdk/tree'; |
||||||
|
import { FormControl } from '@angular/forms'; |
||||||
|
import { Router,ActivatedRoute } from '@angular/router' |
||||||
|
import { PageEvent } from '@angular/material/paginator'; |
||||||
|
import { MatDialogRef, MatDialog, MAT_DIALOG_DATA } from '@angular/material/dialog'; |
||||||
|
import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar'; |
||||||
|
import { TreeService } from '../../http-interceptors/tree.service' |
||||||
|
import { MatTableDataSource } from '@angular/material/table'; |
||||||
|
declare var CryptoJS |
||||||
|
|
||||||
|
@Component({ |
||||||
|
selector: 'app-all-plan', |
||||||
|
templateUrl: './all-plan.component.html', |
||||||
|
styleUrls: ['./all-plan.component.scss'] |
||||||
|
}) |
||||||
|
export class AllPlanComponent implements OnInit { |
||||||
|
|
||||||
|
constructor(private http: HttpClient,public snackBar: MatSnackBar,public route: ActivatedRoute,private router: Router) { } |
||||||
|
|
||||||
|
ngOnInit(): void { |
||||||
|
this.route.queryParams.subscribe(params => { |
||||||
|
this.titlename = params['name']; |
||||||
|
this.type = params['type']; |
||||||
|
this.jsId=params['jsid'] |
||||||
|
}); |
||||||
|
} |
||||||
|
displayedColumns: string[] = ['unitname','modifiedTime','organizationName','buildingTypes','operation']; |
||||||
|
tabledataSource |
||||||
|
titlename //上个页面传过来的名称
|
||||||
|
type //上个页面传过来:1重点单位 2预案
|
||||||
|
jsId //组织机构id
|
||||||
|
//分页
|
||||||
|
@ViewChild(MatPaginator, {static: true})
|
||||||
|
pageEvent: PageEvent; |
||||||
|
paginator: MatPaginator; |
||||||
|
length:any; //共多少条数据
|
||||||
|
pageSize:any; //每页条数
|
||||||
|
pageSizeOptions: number[] = [10] //设置每页条数
|
||||||
|
PageNumber:any; //第几页
|
||||||
|
//分页事件
|
||||||
|
changePage(e){ |
||||||
|
this.PageNumber = e.pageIndex+1 |
||||||
|
//this.getAlltabledate()
|
||||||
|
} |
||||||
|
//返回
|
||||||
|
goBack () { |
||||||
|
history.go(-1) |
||||||
|
//this.echartsData.statefulInspectionToggle = true
|
||||||
|
} |
||||||
|
|
||||||
|
} |
Loading…
Reference in new issue