邵佳豪 4 years ago
parent
commit
2a8b31392b
  1. 24
      src/app/key-unit/key-unit-management/key-unit-management.component.ts
  2. 8
      src/app/plan-audit/plan-record/plan-record.component.html
  3. 6
      src/app/plan-audit/wait-examineer/wait-examineer.component.html
  4. 4
      src/app/plan-management/entry-plan-look/auditresult.html
  5. 22
      src/app/plan-management/entry-plan-look/entry-plan-look.component.ts
  6. 13
      src/app/plan-management/meet-plan/meet-plan.component.ts
  7. 4
      src/app/plan-management/meet-plan/resultmeetPlan.html
  8. 13
      src/app/plan-management/onetwo-entry-plan/onetwo-entry-plan.component.ts
  9. 4
      src/app/plan-management/onetwo-entry-plan/resultPlanonetwo.html
  10. 4
      src/app/plan-management/type-plan/resulttypePlan.html
  11. 16
      src/app/plan-management/type-plan/type-plan.component.ts
  12. 5
      src/app/statistic-analysis/addUnit/add-unit-three-bar-details/add-unit-three-bar-details.component.ts
  13. 10
      src/app/statistic-analysis/addUnit/add-unit-two-type-details/add-unit-two-type-details.component.ts
  14. 10
      src/app/statistic-analysis/buildingType/building-type-one/building-type-one.component.ts
  15. 3
      src/app/statistic-analysis/buildingType/building-type-three-details/building-type-three-details.component.ts
  16. 53
      src/app/statistic-analysis/compang-info/compang-info.component.html
  17. 73
      src/app/statistic-analysis/compang-info/compang-info.component.scss
  18. 25
      src/app/statistic-analysis/compang-info/compang-info.component.spec.ts
  19. 92
      src/app/statistic-analysis/compang-info/compang-info.component.ts
  20. 6
      src/app/statistic-analysis/statistic-analysis-routing.module.ts
  21. 3
      src/app/statistic-analysis/statistic-analysis.module.ts

24
src/app/key-unit/key-unit-management/key-unit-management.component.ts

@ -361,7 +361,7 @@ export class KeyUnitManagementComponent implements OnInit {
data.items.forEach( (item,index) => {
item.integrity = this.wanzhengduArr[index]
})
console.log(789,data.items)
//console.log(789,data.items)
this.tabledataSource = new MatTableDataSource(data.items);
})
}
@ -670,7 +670,7 @@ export class KeyUnitManagementComponent implements OnInit {
}
//提交审核
submitAudit(element){
console.log(element)
//console.log(element)
let body:any = {
title:element.name,
Operation:0,
@ -680,21 +680,24 @@ export class KeyUnitManagementComponent implements OnInit {
}
this.http.post(`/api/ContentVerifies`,body).subscribe(data=>{
this.getAllKeyUnit()
},err=>{
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open(err,'确定',config);
})
}
//撤销审核
cancelAudit(element){
let body:any = {
//title:element.name,
//Operation:0,
id:element.contentVerify.id,
itemId:element.id,
verifyState:-1,
contentType:11
}
this.http.delete(`/api/ContentVerifies/${element.contentVerify.id}`).subscribe(data=>{
this.getAllKeyUnit()
},
err=>{
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open(err,'确定',config);
})
}
//审核结果
@ -749,7 +752,6 @@ export class CreateUnit {
this.jsId = node.id
}
onSubmit(value){
// console.log(value)
let myDate = new Date();
let body = {
id: "",

8
src/app/plan-audit/plan-record/plan-record.component.html

@ -4,7 +4,7 @@
* @Author: sueRimn
* @Date: 2020-12-25 10:19:31
* @LastEditors: sueRimn
* @LastEditTime: 2021-03-03 13:54:44
* @LastEditTime: 2021-03-05 14:49:01
-->
<div class="box">
<div class="boxleft">
@ -88,7 +88,8 @@
<table cellspacing="0" cellpadding="0" style="margin-top: 10px;">
<thead>
<th style="width: 15%;">类型</th>
<th style="width: 15%;">操作</th>
<th style="width: 15%;">名称</th>
<th style="width: 10%;">操作</th>
<th style="width: 15%;">所属组织</th>
<th style="width: 15%;">审核状态</th>
<th style="width: 15%;">提交人</th>
@ -102,7 +103,8 @@
<!-- <input type="radio" name="yuan" value={{item.id}} [(ngModel)]="checked" (click)='radioClick(item)'> -->
{{item.contentType=='1'?'Ⅰ级预案':item.contentType=='2'?'Ⅱ级预案':item.contentType=='3'?'Ⅲ级预案':item.contentType=='4'?'Ⅳ级预案':item.contentType=='5'?
'Ⅴ级预案':item.contentType=='6'?'应急预案(国家级)':item.contentType=='7'?'应急预案(市级)':item.contentType=='8'?'类型预案':item.contentType=='11'?'重点单位':'消防车辆'}}</td>
<td style="width: 15%;" [ngClass]="{'green': item.operation == '1','red':item.operation == '2','blue':item.operation == '0'}">{{item.operation=='0'?'新增':item.operation=='1'?'更新':'删除'}}</td>
<td style="width: 15%;">{{item.title}}</td>
<td style="width: 10%;" [ngClass]="{'green': item.operation == '1','red':item.operation == '2','blue':item.operation == '0'}">{{item.operation=='0'?'新增':item.operation=='1'?'更新':'删除'}}</td>
<td style="width: 15%;">{{item.verifyOrganizationName}}</td>
<td style="width: 15%;" [ngClass]="{'green': item.verifyState == '1'||item.verifyState == '4','red':item.verifyState == '2'||item.verifyState == '5'}">{{item.verifyState=='0'?'待初审':item.verifyState=='1'?
'初审通过':item.verifyState=='2'?'初审驳回':item.verifyState=='3'?'待终审':item.verifyState=='4'?'终审通过':'终审驳回'}}</td>

6
src/app/plan-audit/wait-examineer/wait-examineer.component.html

@ -45,7 +45,8 @@
<table cellspacing="0" cellpadding="0" style="margin-top: 10px;">
<thead>
<th style="width: 15%;">类型</th>
<th style="width: 15%;">操作</th>
<th style="width: 15%;">名称</th>
<th style="width: 10%;">操作</th>
<th style="width: 15%;">所属组织</th>
<th style="width: 15%;">审核状态</th>
<th style="width: 15%;">提交人</th>
@ -59,7 +60,8 @@
<mat-checkbox color="primary" (change)='radioClick($event,item)'></mat-checkbox>
{{item.contentType=='1'?'Ⅰ级预案':item.contentType=='2'?'Ⅱ级预案':item.contentType=='3'?'Ⅲ级预案':item.contentType=='4'?'Ⅳ级预案':item.contentType=='5'?
'Ⅴ级预案':item.contentType=='6'?'应急预案(国家级)':item.contentType=='7'?'应急预案(市级)':item.contentType=='8'?'类型预案':item.contentType=='11'?'重点单位':item.contentType=='12'?'水源':item.contentType=='13'?'消防力量':item.contentType=='14'?'联动力量':'未知'}}</td>
<td style="width: 15%;" [ngClass]="{'green': item.operation == '1','red':item.operation == '2','blue':item.operation == '0'}">{{item.operation=='0'?'新增':item.operation=='1'?'更新':'删除'}}</td>
<td style="width: 15%;">{{item.title}}</td>
<td style="width: 10%;" [ngClass]="{'green': item.operation == '1','red':item.operation == '2','blue':item.operation == '0'}">{{item.operation=='0'?'新增':item.operation=='1'?'更新':'删除'}}</td>
<td style="width: 15%;">{{item.verifyOrganizationName}}</td>
<td style="width: 15%;" [ngClass]="{'green': item.verifyState == '1'||item.verifyState == '4','red':item.verifyState == '2'||item.verifyState == '5'}">{{item.verifyState=='0'?'待初审':item.verifyState=='1'?
'初审通过':item.verifyState=='2'?'初审驳回':item.verifyState=='3'?'待终审':item.verifyState=='4'?'终审通过':'终审驳回'}}</td>

4
src/app/plan-management/entry-plan-look/auditresult.html

@ -4,7 +4,7 @@
* @Author: sueRimn
* @Date: 2020-12-24 10:59:48
* @LastEditors: sueRimn
* @LastEditTime: 2021-02-07 13:58:53
* @LastEditTime: 2021-03-06 09:14:55
-->
<div style="text-align: center;">
<span mat-dialog-title>审批结果</span>
@ -18,7 +18,7 @@
<p>初审时间:{{data.element.firstAudittedTime| date:'yyyy-MM-dd HH:mm:ss'}}</p>
<p>初审机构:{{data.element.firstAuditorOrganizationName}}</p>
<p>初审意见:{{data.element.firstAuditOpinion}}</p>
<p>初审结果:{{data.element.auditStatus==16?'待终审':data.element.auditStatus==32?'初审退回':''}}</p>
<p>初审结果:{{data.element.auditStatus==16?'待终审':data.element.auditStatus==32?'初审退回':data.element.auditStatus==2||4?'初审通过':''}}</p>
<mat-divider></mat-divider>
<p>终审时间:{{data.element.audittedTime| date:'yyyy-MM-dd HH:mm:ss'}}</p>
<p>终审机构:{{data.element.auditorOrganizationName}}</p>

22
src/app/plan-management/entry-plan-look/entry-plan-look.component.ts

@ -244,16 +244,17 @@ export class EntryPlanLookComponent implements OnInit {
}
//删除预案
deletePlan(plandata){
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
let isTrue = confirm('您确定要删除吗')
if (isTrue) {
if(plandata.planType == 1){//如果删除的是二维预案
this.http.delete(`/api/PlanComponents2D/${plandata.id}`).subscribe(data=>{
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open('删除成功!','确定',config);
this.getAllPlanComponents()
},err => {
this.snackBar.open(err,'确定',config);
})
}else{
this.http.delete(`/api/PlanComponents/${plandata.id}`).subscribe(data=>{
@ -262,6 +263,8 @@ export class EntryPlanLookComponent implements OnInit {
config.duration = 3000
this.snackBar.open('删除成功!','确定',config);
this.getAllPlanComponents()
},err => {
this.snackBar.open(err,'确定',config);
})
}
}
@ -269,20 +272,23 @@ export class EntryPlanLookComponent implements OnInit {
}
//提交审核
submitAudit(element){
// console.log(element)
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
if(element.auditStatus == 4){
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open('审核退回的预案需要修改后方可再次提交审核!','确定',config);
}else{
if(element.planType == 1){//如果提交审核的是二维预案
this.http.put(`/api/PlanComponents2D/${element.id}/Commit`,"").subscribe(data=>{
this.getAllPlanComponents()
},err => {
this.snackBar.open(err,'确定',config);
})
}else{
this.http.put(`/api/PlanComponents/${element.id}/Commit`,"").subscribe(data=>{
this.getAllPlanComponents()
},err => {
this.snackBar.open(err,'确定',config);
})
}
}

13
src/app/plan-management/meet-plan/meet-plan.component.ts

@ -143,22 +143,29 @@ export class MeetPlanComponent implements OnInit {
//提交审核
submitAudit(element){
// console.log(element)
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
if(element.auditStatus == 4){
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open('审核退回的预案需要修改后方可再次提交审核!','确定',config);
}else{
this.http.put(`/api/PlanComponentsMajor/${element.id}/Commit`,"").subscribe(data=>{
this.getAlltabledate()
},err => {
this.snackBar.open(err,'确定',config);
})
}
}
//撤销审核
cancelAudit(element){
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.http.put(`/api/PlanComponentsMajor/${element.id}/Cancel`,"").subscribe(data=>{
this.getAlltabledate()
},err => {
this.snackBar.open(err,'确定',config);
})
}

4
src/app/plan-management/meet-plan/resultmeetPlan.html

@ -4,7 +4,7 @@
* @Author: sueRimn
* @Date: 2021-01-20 09:31:24
* @LastEditors: sueRimn
* @LastEditTime: 2021-02-07 13:58:01
* @LastEditTime: 2021-03-06 09:03:34
-->
<div style="text-align: center;">
<span mat-dialog-title>审批结果</span>
@ -18,7 +18,7 @@
<p>初审时间:{{data.element.firstAudittedTime| date:'yyyy-MM-dd HH:mm:ss'}}</p>
<p>初审机构:{{data.element.firstAuditorOrganizationName}}</p>
<p>初审意见:{{data.element.firstAuditOpinion}}</p>
<p>初审结果:{{data.element.auditStatus==16?'待终审':data.element.auditStatus==32?'初审退回':''}}</p>
<p>初审结果:{{data.element.auditStatus==16?'待终审':data.element.auditStatus==32?'初审退回':data.element.auditStatus==2||4?'初审通过':''}}</p>
<mat-divider></mat-divider>
<p>终审时间:{{data.element.audittedTime| date:'yyyy-MM-dd HH:mm:ss'}}</p>
<p>终审机构:{{data.element.auditorOrganizationName}}</p>

13
src/app/plan-management/onetwo-entry-plan/onetwo-entry-plan.component.ts

@ -4,7 +4,7 @@
* @Author: sueRimn
* @Date: 2020-12-24 14:15:10
* @LastEditors: sueRimn
* @LastEditTime: 2021-02-20 16:34:35
* @LastEditTime: 2021-03-06 09:14:22
*/
import { Component, OnInit, ViewChild, Inject } from '@angular/core';
import { HttpClient } from '@angular/common/http'
@ -170,7 +170,9 @@ export class OnetwoEntryPlanComponent implements OnInit {
//提交审核
submitAudit(element){
// console.log(element)
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
if(element.auditStatus == 4){
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
@ -179,14 +181,21 @@ export class OnetwoEntryPlanComponent implements OnInit {
}else{
this.http.put(`/api/PlanComponentsMajor/${element.id}/Commit`,"").subscribe(data=>{
this.getAlltabledate()
},err => {
this.snackBar.open(err,'确定',config);
})
}
}
//撤销审核
cancelAudit(element){
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.http.put(`/api/PlanComponentsMajor/${element.id}/Cancel`,"").subscribe(data=>{
this.getAlltabledate()
},err => {
this.snackBar.open(err,'确定',config);
})
}
//查看预案

4
src/app/plan-management/onetwo-entry-plan/resultPlanonetwo.html

@ -4,7 +4,7 @@
* @Author: sueRimn
* @Date: 2021-01-20 09:31:24
* @LastEditors: sueRimn
* @LastEditTime: 2021-02-07 13:58:29
* @LastEditTime: 2021-03-06 09:13:25
-->
<div style="text-align: center;">
<span mat-dialog-title>审批结果</span>
@ -18,7 +18,7 @@
<p>初审时间:{{data.element.firstAudittedTime| date:'yyyy-MM-dd HH:mm:ss'}}</p>
<p>初审机构:{{data.element.firstAuditorOrganizationName}}</p>
<p>初审意见:{{data.element.firstAuditOpinion}}</p>
<p>初审结果:{{data.element.auditStatus==16?'待终审':data.element.auditStatus==32?'初审退回':''}}</p>
<p>初审结果:{{data.element.auditStatus==16?'待终审':data.element.auditStatus==32?'初审退回':data.element.auditStatus==2||4?'初审通过':''}}</p>
<mat-divider></mat-divider>
<p>终审时间:{{data.element.audittedTime| date:'yyyy-MM-dd HH:mm:ss'}}</p>
<p>终审机构:{{data.element.auditorOrganizationName}}</p>

4
src/app/plan-management/type-plan/resulttypePlan.html

@ -4,7 +4,7 @@
* @Author: sueRimn
* @Date: 2021-01-20 09:31:24
* @LastEditors: sueRimn
* @LastEditTime: 2021-02-07 13:58:16
* @LastEditTime: 2021-03-06 09:11:10
-->
<div style="text-align: center;">
<span mat-dialog-title>审批结果</span>
@ -18,7 +18,7 @@
<p>初审时间:{{data.element.firstAudittedTime| date:'yyyy-MM-dd HH:mm:ss'}}</p>
<p>初审机构:{{data.element.firstAuditorOrganizationName}}</p>
<p>初审意见:{{data.element.firstAuditOpinion}}</p>
<p>初审结果:{{data.element.auditStatus==16?'待终审':data.element.auditStatus==32?'初审退回':''}}</p>
<p>初审结果:{{data.element.auditStatus==16?'待终审':data.element.auditStatus==32?'初审退回':data.element.auditStatus==2||4?'初审通过':''}}</p>
<mat-divider></mat-divider>
<p>终审时间:{{data.element.audittedTime| date:'yyyy-MM-dd HH:mm:ss'}}</p>
<p>终审机构:{{data.element.auditorOrganizationName}}</p>

16
src/app/plan-management/type-plan/type-plan.component.ts

@ -4,7 +4,7 @@
* @Author: sueRimn
* @Date: 2021-01-06 09:47:43
* @LastEditors: sueRimn
* @LastEditTime: 2021-02-07 16:13:27
* @LastEditTime: 2021-03-06 09:12:59
*/
import { Component, OnInit, ViewChild, Inject } from '@angular/core';
import { HttpClient } from '@angular/common/http'
@ -154,23 +154,29 @@ export class TypePlanComponent implements OnInit {
//提交审核
submitAudit(element){
// console.log(element)
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
if(element.auditStatus == 4){
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open('审核退回的预案需要修改后方可再次提交审核!','确定',config);
}else{
this.http.put(`/api/PlanComponentsMajor/${element.id}/Commit`,"").subscribe(data=>{
this.getAlltabledate()
},err => {
this.snackBar.open(err,'确定',config);
})
}
}
//撤销审核
cancelAudit(element){
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.http.put(`/api/PlanComponentsMajor/${element.id}/Cancel`,"").subscribe(data=>{
this.getAlltabledate()
},err => {
this.snackBar.open(err,'确定',config);
})
}
//查看预案

5
src/app/statistic-analysis/addUnit/add-unit-three-bar-details/add-unit-three-bar-details.component.ts

@ -163,10 +163,7 @@ export class AddUnitThreeBarDetailsComponent implements OnInit {
this.option.series[0].data = this.zhongNumData
this.detailPlanEchart.setOption(this.option)
}else{
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open('已到达最底层','确定',config);
this.router.navigate(['/statisticanalysis/CompangInfo'],{queryParams:{'name':params.name,'type':1}});
}
})
}

10
src/app/statistic-analysis/addUnit/add-unit-two-type-details/add-unit-two-type-details.component.ts

@ -2,6 +2,8 @@ import { Component, OnInit } from '@angular/core';
import { Router } from '@angular/router';
import { ActivatedRoute } from '@angular/router';
import {EchartsDataService} from '../../echarts-data.service';
import { MatDialogRef, MatDialog, MAT_DIALOG_DATA } from '@angular/material/dialog';
import { CompangInfoComponent } from '../../compang-info/compang-info.component'
declare var echarts: any;
@Component({
selector: 'app-add-unit-two-type-details',
@ -10,7 +12,7 @@ declare var echarts: any;
})
export class AddUnitTwoTypeDetailsComponent implements OnInit {
constructor(public route: ActivatedRoute,private router: Router,public echartsData:EchartsDataService) { }
constructor(public route: ActivatedRoute,private router: Router,public dialog: MatDialog,public echartsData:EchartsDataService) { }
forward(){
this.router.navigate(['/statisticanalysis/addUnit_one/addUnit_two_type'])
}
@ -122,6 +124,12 @@ export class AddUnitTwoTypeDetailsComponent implements OnInit {
}]
};
this.detailPlanEchart.setOption(option);
this.detailPlanEchart.on('click', (params) => {
this.router.navigate(['/statisticanalysis/CompangInfo'],{queryParams:{'name':params.name,'type':1}});
/* const dialogRef = this.dialog.open(CompangInfoComponent, {
width:"400px",
}); */
});
}

10
src/app/statistic-analysis/buildingType/building-type-one/building-type-one.component.ts

@ -30,12 +30,12 @@ export class BuildingTypeOneComponent implements OnInit {
initCharts(){
this.echartsData.getData(null)
console.log(this.echartsData.allDate)
this.http.get("/api/StatisticsAnalysis/BuildingTypes").subscribe((data:any)=>{
this.http.get("/api/StatisticsAnalysis").subscribe((data:any)=>{
console.log(data)
for(var i=0;i<data.buildingTypeStatistics.buildingTypes.length;i++){
this.lengthdata.push(data.buildingTypeStatistics.buildingTypes[i].buildingTypeName)
this.count=this.count+data.buildingTypeStatistics.buildingTypes[i].count
this.indexData.push(data.buildingTypeStatistics.buildingTypes[i])
for(var i=0;i<data.companyStatistics.buildingTypeStatistics.buildingTypes.length;i++){
this.lengthdata.push(data.companyStatistics.buildingTypeStatistics.buildingTypes[i].buildingTypeName)
this.count=this.count+data.companyStatistics.buildingTypeStatistics.buildingTypes[i].count
this.indexData.push(data.companyStatistics.buildingTypeStatistics.buildingTypes[i])
}
//JSON.parse(JSON.stringify(this.indexData).replace(/buildingTypeName/g, 'name'))
this.indexData=this.indexData.map(v=>{return {name: v.buildingTypeName,value:v.count,id:v.buildingTypeId}})

3
src/app/statistic-analysis/buildingType/building-type-three-details/building-type-three-details.component.ts

@ -109,6 +109,9 @@ export class BuildingTypeThreeDetailsComponent implements OnInit {
}]
};
this.detailPlanEchart.setOption(option);
this.detailPlanEchart.on('click', (params) => {
this.router.navigate(['/statisticanalysis/CompangInfo'],{queryParams:{'name':params.name,'type':1}});
});
}

53
src/app/statistic-analysis/compang-info/compang-info.component.html

@ -0,0 +1,53 @@
<!--
* @Descripttion:
* @version:
* @Author: sueRimn
* @Date: 2021-03-05 15:57:08
* @LastEditors: sueRimn
* @LastEditTime: 2021-03-06 11:35:12
-->
<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;" (click)="unitdetails(element)">详情</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>

73
src/app/statistic-analysis/compang-info/compang-info.component.scss

@ -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
}
}
}

25
src/app/statistic-analysis/compang-info/compang-info.component.spec.ts

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

92
src/app/statistic-analysis/compang-info/compang-info.component.ts

@ -0,0 +1,92 @@
/*
* @Descripttion:
* @version:
* @Author: sueRimn
* @Date: 2021-03-05 15:57:08
* @LastEditors: sueRimn
* @LastEditTime: 2021-03-06 11:35:04
*/
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-compang-info',
templateUrl: './compang-info.component.html',
styleUrls: ['./compang-info.component.scss']
})
export class CompangInfoComponent 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.getAlltabledate()
}
displayedColumns: string[] = ['unitname','modifiedTime','organizationName','buildingTypes','operation'];
tabledataSource
titlename //上个页面传过来的名称
type //上个页面传过来:1重点单位 2预案
jsId=1 //组织机构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
}
//获取表格数据
getAlltabledate(){
if(this.type==1){
//重点单位
let paramsdata:any = {
OrganizationId: this.jsId || '',
PageNumber: this.PageNumber || '1',
PageSize: this.pageSizeOptions[0],
IntegrityScoreMin:0,
IntegrityScoreMax:1
}
this.http.get("/api/Companies",{params:paramsdata}).subscribe((data:any)=>{
this.length = data.totalCount
//console.log(789,data.items)
this.tabledataSource = new MatTableDataSource(data.items);
})
}
}
//跳转查看基本信息页面
unitdetails(element){
if(this.type==1){
sessionStorage.setItem("editable","0")
sessionStorage.setItem("companyName",element.name)
sessionStorage.setItem("companyId",element.id)
sessionStorage.setItem(element.id,JSON.stringify(element.companyIntegrityScore))
window.open(`/keyUnit/viewunitinfo?id=${element.id}&usci=${element.usci}`,'_blank');
}
}
}

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

@ -4,7 +4,7 @@
* @Author: sueRimn
* @Date: 2020-09-02 16:57:00
* @LastEditors: sueRimn
* @LastEditTime: 2020-11-05 11:07:16
* @LastEditTime: 2021-03-06 09:50:16
*/
import { Component, NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
@ -33,6 +33,7 @@ import { AddUnitThreeLineDetailsComponent } from './addUnit/add-unit-three-line-
import { AddUnitThreeBarDetailsComponent } from './addUnit/add-unit-three-bar-details/add-unit-three-bar-details.component';
import { HomeComponent } from './home/home.component';
import { yueDateComponent }from './scheduled-updates/scheduled-updates.component'
import { CompangInfoComponent }from './compang-info/compang-info.component'
import { from } from 'rxjs';
@ -65,7 +66,8 @@ const routes: Routes = [
{ path: 'scheduledUpdates', component: ScheduledUpdatesComponent},
{ path: 'scheduledUpdates/yueDate', component: yueDateComponent},
{ path: 'scheduledUpdates/PublicEcharts', component: publicEchartsComponent},
{ path: 'home', component: HomeComponent}
{ path: 'home', component: HomeComponent},
{ path: 'CompangInfo',component:CompangInfoComponent}
];
@NgModule({

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

@ -68,11 +68,12 @@ import { DeleteThereLineDetailsComponent } from './deleteUnit/delete-there-line-
import { PageThereComponent } from './state/page-there/page-there.component';
import { PageThereYearComponent } from './state/page-there-year/page-there-year.component';
import { DeleteTwoNewaddComponent } from './deleteUnit/delete-two-newadd/delete-two-newadd.component';
import { CompangInfoComponent } from './compang-info/compang-info.component';
@NgModule({
declarations: [PageOneComponent, PageTwoTimeComponent, PageTwoNameComponent, PageZhongDuiDetailsComponent,echartsComponent, DeleteOneComponent, DeleteTwoComponent, DeleteThereComponent, DeleteFourComponent, BuildingTypeOneComponent, ScheduledUpdatesComponent,publicEchartsComponent,verifiedComponent,notVerifiedComponent,detailedInformationComponent,moreTableComponent,yueDateComponent,yuebuildingDateComponent,indexConditionComponent, BuildingTypeTwoForwardComponent, BuildingTypeTwoReverseComponent, BuildingTypeThreeDetailsComponent, AddUnitOneComponent, AddUnitTwoTypeStatisticsComponent, AddUnitTwoTypeDetailsComponent, AddUnitTwoTimeComponent,AddUnitThreeLineDetailsComponent,AddUnitThreeBarDetailsComponent, HomeComponent, DeleteThereLineDetailsComponent, PageThereComponent, PageThereYearComponent, DeleteTwoNewaddComponent],
declarations: [PageOneComponent, PageTwoTimeComponent, PageTwoNameComponent, PageZhongDuiDetailsComponent,echartsComponent, DeleteOneComponent, DeleteTwoComponent, DeleteThereComponent, DeleteFourComponent, BuildingTypeOneComponent, ScheduledUpdatesComponent,publicEchartsComponent,verifiedComponent,notVerifiedComponent,detailedInformationComponent,moreTableComponent,yueDateComponent,yuebuildingDateComponent,indexConditionComponent, BuildingTypeTwoForwardComponent, BuildingTypeTwoReverseComponent, BuildingTypeThreeDetailsComponent, AddUnitOneComponent, AddUnitTwoTypeStatisticsComponent, AddUnitTwoTypeDetailsComponent, AddUnitTwoTimeComponent,AddUnitThreeLineDetailsComponent,AddUnitThreeBarDetailsComponent, HomeComponent, DeleteThereLineDetailsComponent, PageThereComponent, PageThereYearComponent, DeleteTwoNewaddComponent, CompangInfoComponent],
imports: [
CommonModule,
StatisticAnalysisRoutingModule,

Loading…
Cancel
Save