Compare commits
35 Commits
Author | SHA1 | Date |
---|---|---|
|
311da85ea1 | 3 months ago |
|
3799207fad | 4 months ago |
|
cca7eb69cb | 4 months ago |
|
f549bdddee | 4 months ago |
|
5477317eb3 | 6 months ago |
|
39832ce94f | 11 months ago |
|
ed1f680b76 | 11 months ago |
|
1d34e328e3 | 11 months ago |
|
0980d84ca3 | 1 year ago |
|
8e24430c91 | 1 year ago |
|
de4f21a50e | 1 year ago |
|
3b3d841de0 | 1 year ago |
|
0e576e149f | 1 year ago |
|
0b0405af2c | 1 year ago |
|
c5bdcd5fa7 | 1 year ago |
|
56bb98000e | 1 year ago |
|
c897c18244 | 1 year ago |
|
a9706d32e3 | 1 year ago |
|
8fe4e0a875 | 1 year ago |
|
892a11cbe9 | 1 year ago |
|
c4ebd842cd | 1 year ago |
|
b1c382b51d | 1 year ago |
|
e4b418048d | 1 year ago |
|
326b7dc782 | 2 years ago |
|
4fa2f38f51 | 2 years ago |
|
5b6f55359e | 2 years ago |
|
d48ab61752 | 2 years ago |
|
b4d4c892a6 | 2 years ago |
|
34a45a0c3a | 2 years ago |
|
af5da5c315 | 2 years ago |
|
de0f601460 | 2 years ago |
|
53387b0c59 | 2 years ago |
|
39e6672992 | 2 years ago |
|
748e932959 | 2 years ago |
|
627a19c13f | 2 years ago |
86 changed files with 32490 additions and 9705 deletions
@ -1,63 +1,69 @@ |
|||||||
import { BrowserModule } from '@angular/platform-browser'; |
import { BrowserModule } from "@angular/platform-browser"; |
||||||
import { NgModule } from '@angular/core'; |
import { NgModule } from "@angular/core"; |
||||||
import { AppRoutingModule } from './app-routing.module'; |
import { AppRoutingModule } from "./app-routing.module"; |
||||||
import { AppComponent } from './app.component'; |
import { AppComponent } from "./app.component"; |
||||||
import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; |
import { BrowserAnimationsModule } from "@angular/platform-browser/animations"; |
||||||
import { MatButtonModule } from '@angular/material/button'; |
import { MatButtonModule } from "@angular/material/button"; |
||||||
import { MatCheckboxModule } from '@angular/material/checkbox'; |
import { MatCheckboxModule } from "@angular/material/checkbox"; |
||||||
import { MatIconModule } from '@angular/material/icon'; |
import { MatIconModule } from "@angular/material/icon"; |
||||||
import { MatSidenavModule } from '@angular/material/sidenav'; |
import { MatSidenavModule } from "@angular/material/sidenav"; |
||||||
import { NavigationModule } from './navigation/navigation.module'; |
import { NavigationModule } from "./navigation/navigation.module"; |
||||||
import { HomeComponent } from './home/home.component'; |
import { HomeComponent } from "./home/home.component"; |
||||||
import { TabbarComponent } from './tabbar/tabbar.component'; |
import { TabbarComponent } from "./tabbar/tabbar.component"; |
||||||
import { PagesModule } from './pages/pages.module'; |
import { PagesModule } from "./pages/pages.module"; |
||||||
import { FormsModule } from '@angular/forms'; |
import { FormsModule } from "@angular/forms"; |
||||||
import { UiModule } from './ui/ui.module'; |
import { UiModule } from "./ui/ui.module"; |
||||||
import { HttpClientModule } from '@angular/common/http'; |
import { HttpClientModule } from "@angular/common/http"; |
||||||
import { httpInterceptorProviders } from './http-interceptors/index' |
import { httpInterceptorProviders } from "./http-interceptors/index"; |
||||||
import { CacheTokenService } from './http-interceptors/cache-token.service' |
import { CacheTokenService } from "./http-interceptors/cache-token.service"; |
||||||
import { TreeService } from './http-interceptors/tree.service'; |
import { TreeService } from "./http-interceptors/tree.service"; |
||||||
import { MTokenK1Component } from './m-token-k1/m-token-k1.component' //K1秘钥
|
import { MTokenK1Component } from "./m-token-k1/m-token-k1.component"; //K1秘钥
|
||||||
import { CountdownModule } from 'ngx-countdown'; //倒计时插件
|
import { CountdownModule } from "ngx-countdown"; //倒计时插件
|
||||||
import { GISManagementModule } from './gis-management/gis-management.module'; |
import { GISManagementModule } from "./gis-management/gis-management.module"; |
||||||
import { DataCollectionModule } from './data-collection/data-collection.module'; |
import { DataCollectionModule } from "./data-collection/data-collection.module"; |
||||||
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; |
import { MatProgressSpinnerModule } from "@angular/material/progress-spinner"; |
||||||
import { TestComponent } from './test/test.component'; |
import { TestComponent } from "./test/test.component"; |
||||||
import { ExternalLinksPlanComponent } from './external-links-plan/external-links-plan.component'; |
import { ExternalLinksPlanComponent } from "./external-links-plan/external-links-plan.component"; |
||||||
import { SearchDownList } from '../modules/map/declare/component/SearchDownListPlugins/SearchDownList'; |
import { SearchDownList } from "../modules/map/declare/component/SearchDownListPlugins/SearchDownList"; |
||||||
import { ExportExcelComponent } from './export-excel/export-excel.component'; |
import { ExportExcelComponent } from "./export-excel/export-excel.component"; |
||||||
import { registerLocaleData } from '@angular/common'; |
import { registerLocaleData } from "@angular/common"; |
||||||
import zh from '@angular/common/locales/zh'; |
import zh from "@angular/common/locales/zh"; |
||||||
|
import { KeyUnitModule } from "./key-unit/key-unit.module"; |
||||||
|
import { MatTabsModule } from "@angular/material/tabs"; |
||||||
|
import { PlanManagementModule } from "./plan-management/plan-management.module"; |
||||||
registerLocaleData(zh); |
registerLocaleData(zh); |
||||||
@NgModule({ |
@NgModule({ |
||||||
declarations: [ |
declarations: [ |
||||||
AppComponent, |
AppComponent, |
||||||
HomeComponent, |
HomeComponent, |
||||||
MTokenK1Component, |
MTokenK1Component, |
||||||
TestComponent, |
TestComponent, |
||||||
ExternalLinksPlanComponent, |
ExternalLinksPlanComponent, |
||||||
SearchDownList, |
SearchDownList, |
||||||
ExportExcelComponent |
ExportExcelComponent, |
||||||
], |
], |
||||||
imports: [ |
imports: [ |
||||||
BrowserModule, |
BrowserModule, |
||||||
AppRoutingModule, |
AppRoutingModule, |
||||||
BrowserAnimationsModule, |
BrowserAnimationsModule, |
||||||
MatButtonModule, |
MatButtonModule, |
||||||
MatCheckboxModule, |
MatCheckboxModule, |
||||||
MatSidenavModule, |
MatSidenavModule, |
||||||
NavigationModule, |
NavigationModule, |
||||||
MatIconModule, |
MatIconModule, |
||||||
PagesModule, |
PagesModule, |
||||||
FormsModule, |
FormsModule, |
||||||
HttpClientModule, |
HttpClientModule, |
||||||
CountdownModule, |
CountdownModule, |
||||||
GISManagementModule, |
GISManagementModule, |
||||||
DataCollectionModule, |
DataCollectionModule, |
||||||
MatProgressSpinnerModule, |
MatProgressSpinnerModule, |
||||||
UiModule |
UiModule, |
||||||
], |
KeyUnitModule, |
||||||
providers: [httpInterceptorProviders, CacheTokenService, TreeService], |
MatTabsModule, |
||||||
bootstrap: [AppComponent] |
PlanManagementModule, |
||||||
|
], |
||||||
|
providers: [httpInterceptorProviders, CacheTokenService, TreeService], |
||||||
|
bootstrap: [AppComponent], |
||||||
}) |
}) |
||||||
export class AppModule { } |
export class AppModule {} |
||||||
|
@ -1,31 +1,70 @@ |
|||||||
import { Injectable } from '@angular/core'; |
import { HttpClient } from "@angular/common/http"; |
||||||
import { CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot, Router } from '@angular/router'; |
import { Injectable } from "@angular/core"; |
||||||
|
import { |
||||||
|
CanActivate, |
||||||
|
ActivatedRouteSnapshot, |
||||||
|
RouterStateSnapshot, |
||||||
|
Router, |
||||||
|
} from "@angular/router"; |
||||||
|
|
||||||
@Injectable({ |
@Injectable({ |
||||||
providedIn: 'root' |
providedIn: "root", |
||||||
}) |
}) |
||||||
export class AuthGuard implements CanActivate { |
export class AuthGuard implements CanActivate { |
||||||
|
constructor(private http: HttpClient, private router: Router) {} |
||||||
|
|
||||||
constructor(private router: Router) { |
// 路由守卫
|
||||||
|
async canActivate( |
||||||
|
next: ActivatedRouteSnapshot, |
||||||
|
state: RouterStateSnapshot |
||||||
|
): Promise<boolean> { |
||||||
|
console.log("next", next); |
||||||
|
console.log("state", state); |
||||||
|
|
||||||
|
if ( |
||||||
|
next.queryParams.singleSignOn && |
||||||
|
next.queryParams.singleSignOn === "true" |
||||||
|
) { |
||||||
|
//执行自动登录逻辑
|
||||||
|
await this.onSubmit(); |
||||||
} |
} |
||||||
|
return this.checkLogin(); |
||||||
|
} |
||||||
|
|
||||||
// 路由守卫
|
checkLogin(): boolean { |
||||||
canActivate(next: ActivatedRouteSnapshot, state: RouterStateSnapshot): boolean { |
// 判断本地有没有token
|
||||||
|
const token = sessionStorage.getItem("token"); |
||||||
|
|
||||||
return this.checkLogin(); |
// 如果有token,允许访问
|
||||||
|
if (token) { |
||||||
|
return true; |
||||||
} |
} |
||||||
|
|
||||||
checkLogin(): boolean { |
//如果没有token,跳转登录页
|
||||||
|
this.router.navigate(["/login"]); |
||||||
|
return false; |
||||||
|
} |
||||||
|
|
||||||
// 判断本地有没有token
|
onSubmit() { |
||||||
const token = sessionStorage.getItem('token'); |
return new Promise<void>((resolve, reject) => { |
||||||
|
this.http |
||||||
// 如果有token,允许访问
|
.post("/api/Account/SignIn", { |
||||||
if (token) { return true; } |
name: "superadmin", |
||||||
|
password: "SHya119!@", |
||||||
//如果没有token,跳转登录页
|
}) |
||||||
this.router.navigate(['/login']); |
.subscribe( |
||||||
return false; |
(data: any) => { |
||||||
} |
sessionStorage.setItem("level", data.level); |
||||||
|
sessionStorage.setItem("token", data.token); |
||||||
|
sessionStorage.setItem("refreshToken", data.refreshToken); |
||||||
|
sessionStorage.setItem("isDefaultPassword", data.isDefaultPassword); //是否需要修改默认密码
|
||||||
|
sessionStorage.setItem("singleSignOn", "true"); //是否需要修改默认密码
|
||||||
|
resolve(); |
||||||
|
}, |
||||||
|
(err) => { |
||||||
|
reject(); |
||||||
|
} |
||||||
|
); |
||||||
|
}); |
||||||
|
} |
||||||
} |
} |
||||||
|
@ -1,11 +1,73 @@ |
|||||||
<!-- 株洲项目:传入预案id显示相应预案 --> |
<mat-tab-group *ngIf="planId" selectedIndex="10" style="height: 99%;"> |
||||||
<div *ngIf="showType == 0"> |
<mat-tab label="1.基本信息"> |
||||||
<iframe id="inneriframe" [src]='iframeSrc' frameborder="0" style="width: 100%;height: 100%;"></iframe> |
<ng-template matTabContent> |
||||||
</div> |
<app-basicinfo-look></app-basicinfo-look> |
||||||
<div *ngIf="showType == 1" id="viewer"></div> |
</ng-template> |
||||||
<div *ngIf="showType == 2"> |
</mat-tab> |
||||||
<iframe id="inneriframe2" [src]='threedUrl' frameborder="0" style="width: 100%;height: 100%;"></iframe> |
<mat-tab label="2.四周毗邻"> |
||||||
</div> |
<ng-template matTabContent> |
||||||
<div *ngIf="showType == 3"> |
<app-allaround></app-allaround> |
||||||
<app-collection-tools></app-collection-tools> |
</ng-template> |
||||||
</div> |
</mat-tab> |
||||||
|
<mat-tab label="3.消防设施"> |
||||||
|
<ng-template matTabContent> |
||||||
|
<app-fire-fighting-device-look></app-fire-fighting-device-look> |
||||||
|
</ng-template> |
||||||
|
</mat-tab> |
||||||
|
<mat-tab label="4.重点部位"> |
||||||
|
<ng-template matTabContent> |
||||||
|
<app-key-site-look></app-key-site-look> |
||||||
|
</ng-template> |
||||||
|
</mat-tab> |
||||||
|
<mat-tab label="5.功能分区"> |
||||||
|
<ng-template matTabContent> |
||||||
|
<app-function-division-look></app-function-division-look> |
||||||
|
</ng-template> |
||||||
|
</mat-tab> |
||||||
|
<mat-tab label="6.行车路线"> |
||||||
|
<ng-template matTabContent> |
||||||
|
<app-router-gis></app-router-gis> |
||||||
|
</ng-template> |
||||||
|
</mat-tab> |
||||||
|
<mat-tab label="7.周边水源及力量"> |
||||||
|
<ng-template matTabContent> |
||||||
|
<app-water-road></app-water-road> |
||||||
|
</ng-template> |
||||||
|
</mat-tab> |
||||||
|
<mat-tab label="8.实景图"> |
||||||
|
<ng-template matTabContent> |
||||||
|
<app-realistic-picture-look></app-realistic-picture-look> |
||||||
|
</ng-template> |
||||||
|
</mat-tab> |
||||||
|
<mat-tab label="9.上传CAD"> |
||||||
|
<ng-template matTabContent> |
||||||
|
<app-uploading-cad-look></app-uploading-cad-look> |
||||||
|
</ng-template> |
||||||
|
</mat-tab> |
||||||
|
<mat-tab label="10.特别警示"> |
||||||
|
<ng-template matTabContent> |
||||||
|
<app-special-warning></app-special-warning> |
||||||
|
</ng-template> |
||||||
|
</mat-tab> |
||||||
|
<mat-tab label="11.作战部署"> |
||||||
|
<ng-template matTabContent> |
||||||
|
<div *ngIf="showType == 0"> |
||||||
|
<iframe id="inneriframe" [src]='iframeSrc' frameborder="0" style="width: 100%;height: 100%;"></iframe> |
||||||
|
</div> |
||||||
|
<div *ngIf="showType == 1" id="viewer"></div> |
||||||
|
<div *ngIf="showType == 3"> |
||||||
|
<app-collection-tools></app-collection-tools> |
||||||
|
</div> |
||||||
|
|
||||||
|
<!-- 在线编制预案 --> |
||||||
|
<div *ngIf="showType == 2"> |
||||||
|
<app-create-plan-online-five></app-create-plan-online-five> |
||||||
|
</div> |
||||||
|
</ng-template> |
||||||
|
</mat-tab> |
||||||
|
|
||||||
|
</mat-tab-group> |
||||||
|
|
||||||
|
<div *ngIf="unitId"> |
||||||
|
<app-basicinfo-look></app-basicinfo-look> |
||||||
|
</div> |
@ -1,93 +1,102 @@ |
|||||||
/* |
/* |
||||||
* @Descripttion:
|
* @Descripttion: |
||||||
* @version:
|
* @version: |
||||||
* @Author: sueRimn |
* @Author: sueRimn |
||||||
* @Date: 2020-12-24 10:59:48 |
* @Date: 2020-12-24 10:59:48 |
||||||
* @LastEditors: sueRimn |
* @LastEditors: sueRimn |
||||||
* @LastEditTime: 2021-04-09 17:12:59 |
* @LastEditTime: 2021-04-09 17:12:59 |
||||||
*/ |
*/ |
||||||
export interface Data { |
export interface Data { |
||||||
token:string, |
token: string; |
||||||
refreshToken:string, |
refreshToken: string; |
||||||
expires: number, |
expires: number; |
||||||
realName:string, |
realName: string; |
||||||
level:any, |
level: any; |
||||||
isDefaultPassword:string |
isDefaultPassword: string; |
||||||
} |
} |
||||||
|
|
||||||
export interface windows { |
export interface windows { |
||||||
token:string |
token: string; |
||||||
} |
} |
||||||
export enum isno { |
export enum isno { |
||||||
"是", |
"是", |
||||||
"否" |
"否", |
||||||
} |
} |
||||||
|
|
||||||
export enum PlanTypeEnum { |
export enum PlanTypeEnum { |
||||||
"zero", |
"zero", |
||||||
"二维预案", |
"二维预案", |
||||||
"三维预案", |
"三维预案", |
||||||
"three", |
"three", |
||||||
"其他预案", |
"其他预案", |
||||||
"five", |
"five", |
||||||
"six", |
"six", |
||||||
"seven", |
"seven", |
||||||
"卡片预案", |
"卡片预案", |
||||||
"none", |
"none", |
||||||
"teen", |
"teen", |
||||||
"shiyi", |
"shiyi", |
||||||
"shier", |
"shier", |
||||||
"shisan", |
"shisan", |
||||||
"shisi", |
"shisi", |
||||||
"shiwu", |
"shiwu", |
||||||
"文本预案" |
"文本预案", |
||||||
} |
} |
||||||
|
|
||||||
export enum AuditStatusEnum { |
export enum AuditStatusEnum { |
||||||
"zero", |
"zero", |
||||||
"审核中", |
"审核中", |
||||||
"审核通过", |
"审核通过", |
||||||
"two", |
"two", |
||||||
"终审退回", |
"终审退回", |
||||||
"five", |
"five", |
||||||
"six", |
"six", |
||||||
"seven", |
"seven", |
||||||
"未提交审核", |
"未提交审核", |
||||||
"nine", |
"nine", |
||||||
"ten", |
"ten", |
||||||
"eleven", |
"eleven", |
||||||
"twelve", |
"twelve", |
||||||
"thieteen", |
"thieteen", |
||||||
"fourteen", |
"fourteen", |
||||||
"fifteen", |
"fifteen", |
||||||
"待终审", |
"待终审", |
||||||
"shiqi", |
"shiqi", |
||||||
"shiba", |
"shiba", |
||||||
"shijiu", |
"shijiu", |
||||||
"ershi", |
"ershi", |
||||||
"ershiyi", |
"ershiyi", |
||||||
"ershier", |
"ershier", |
||||||
"ershis", |
"ershis", |
||||||
"t1", |
"t1", |
||||||
"t2", |
"t2", |
||||||
"t3", |
"t3", |
||||||
"t4", |
"t4", |
||||||
"t5", |
"t5", |
||||||
"t6", |
"t6", |
||||||
"t7", |
"t7", |
||||||
"t8", |
"t8", |
||||||
"初审退回", |
"初审退回", |
||||||
} |
} |
||||||
|
|
||||||
export enum PlanLevelEnum { |
export enum PlanLevelEnum { |
||||||
"编制级别0", |
"编制级别0", |
||||||
"总队", |
"总队", |
||||||
"支队", |
"支队", |
||||||
"编制级别3", |
"编制级别3", |
||||||
"大队", |
"大队", |
||||||
"编制级别5", |
"编制级别5", |
||||||
"编制级别6", |
"编制级别6", |
||||||
"编制级别7", |
"编制级别7", |
||||||
"中队" |
"中队", |
||||||
} |
} |
||||||
|
|
||||||
|
export enum PlanAuditStatusEnum { |
||||||
|
"非审核状态" = 0, |
||||||
|
"未提交审核" = 8, |
||||||
|
"待审核" = 1, |
||||||
|
"初审通过" = 16, |
||||||
|
"初审退回" = 32, |
||||||
|
"终审通过" = 2, |
||||||
|
"终审退回" = 4, |
||||||
|
} |
||||||
|
@ -1,83 +1,95 @@ |
|||||||
import { Pipe, PipeTransform } from '@angular/core'; |
import { Pipe, PipeTransform } from "@angular/core"; |
||||||
import { isno, PlanTypeEnum, AuditStatusEnum, PlanLevelEnum } from '../interface' |
import { |
||||||
@Pipe({ name: 'isno' }) |
isno, |
||||||
|
PlanTypeEnum, |
||||||
|
AuditStatusEnum, |
||||||
|
PlanLevelEnum, |
||||||
|
PlanAuditStatusEnum, |
||||||
|
} from "../interface"; |
||||||
|
@Pipe({ name: "isno" }) |
||||||
export class IsnoPipe implements PipeTransform { |
export class IsnoPipe implements PipeTransform { |
||||||
transform(value: boolean): string { |
transform(value: boolean): string { |
||||||
if (value) { |
if (value) { |
||||||
var x = 0 |
var x = 0; |
||||||
} else { |
} else { |
||||||
x = 1 |
x = 1; |
||||||
} |
|
||||||
return isno[x] |
|
||||||
} |
} |
||||||
|
return isno[x]; |
||||||
|
} |
||||||
} |
} |
||||||
@Pipe({ name: 'plantype' }) |
@Pipe({ name: "plantype" }) |
||||||
export class PlanType implements PipeTransform { |
export class PlanType implements PipeTransform { |
||||||
transform(value: number): string { |
transform(value: number): string { |
||||||
return PlanTypeEnum[value] |
return PlanTypeEnum[value]; |
||||||
} |
} |
||||||
} |
} |
||||||
|
|
||||||
@Pipe({ name: 'auditsatus' }) |
@Pipe({ name: "auditsatus" }) |
||||||
export class AuditSatus implements PipeTransform { |
export class AuditSatus implements PipeTransform { |
||||||
transform(value: number): string { |
transform(value: number): string { |
||||||
return AuditStatusEnum[value] |
return AuditStatusEnum[value]; |
||||||
} |
} |
||||||
} |
} |
||||||
@Pipe({ name: 'planlevel' }) |
@Pipe({ name: "planlevel" }) |
||||||
export class PlanLevel implements PipeTransform { |
export class PlanLevel implements PipeTransform { |
||||||
transform(value: number): string { |
transform(value: number): string { |
||||||
return PlanLevelEnum[value] |
return PlanLevelEnum[value]; |
||||||
} |
} |
||||||
} |
} |
||||||
|
|
||||||
@Pipe({ name: 'state' }) |
@Pipe({ name: "state" }) |
||||||
export class state implements PipeTransform { |
export class state implements PipeTransform { |
||||||
transform(value: number): string { |
transform(value: number): string { |
||||||
if (value == 3) { |
if (value == 3) { |
||||||
return '维护中' |
return "维护中"; |
||||||
} else if (value == 4) { |
} else if (value == 4) { |
||||||
return '维护通过审核' |
return "维护通过审核"; |
||||||
} else if (value == 5) { |
} else if (value == 5) { |
||||||
return '维护驳回审核' |
return "维护驳回审核"; |
||||||
} else { |
} else { |
||||||
return '未维护' |
return "未维护"; |
||||||
} |
|
||||||
} |
} |
||||||
|
} |
||||||
} |
} |
||||||
|
|
||||||
@Pipe({ name: 'differentContentTitle' }) |
@Pipe({ name: "auditState" }) |
||||||
export class differentContentTitle implements PipeTransform { |
export class auditState implements PipeTransform { |
||||||
transform(value: string): string { |
transform(value: number): string { |
||||||
if (typeof (value) == 'boolean' && value) { |
return PlanAuditStatusEnum[value]; |
||||||
return '是' |
} |
||||||
} else if (typeof (value) == 'boolean' && !value) { |
} |
||||||
return '否' |
|
||||||
} else if (JSON.stringify(value) == "{}") { |
|
||||||
return '空' |
|
||||||
} else if (!value) { |
|
||||||
return '空' |
|
||||||
} else { |
|
||||||
return value |
|
||||||
} |
|
||||||
|
|
||||||
|
@Pipe({ name: "differentContentTitle" }) |
||||||
|
export class differentContentTitle implements PipeTransform { |
||||||
|
transform(value: string): string { |
||||||
|
if (typeof value == "boolean" && value) { |
||||||
|
return "是"; |
||||||
|
} else if (typeof value == "boolean" && !value) { |
||||||
|
return "否"; |
||||||
|
} else if (JSON.stringify(value) == "{}") { |
||||||
|
return "空"; |
||||||
|
} else if (!value) { |
||||||
|
return "空"; |
||||||
|
} else { |
||||||
|
return value; |
||||||
} |
} |
||||||
|
} |
||||||
} |
} |
||||||
@Pipe({ name: 'yuan' }) |
@Pipe({ name: "yuan" }) |
||||||
export class yuan implements PipeTransform { |
export class yuan implements PipeTransform { |
||||||
transform(value: string): string { |
transform(value: string): string { |
||||||
if (value == 'LevelOne') { |
if (value == "LevelOne") { |
||||||
return '一级预案' |
return "一级预案"; |
||||||
} else if (value == 'LevelTwo') { |
} else if (value == "LevelTwo") { |
||||||
return '二级预案' |
return "二级预案"; |
||||||
} else if (value == 'LevelThree') { |
} else if (value == "LevelThree") { |
||||||
return '三级预案' |
return "三级预案"; |
||||||
}else if (value == 'LevelFour') { |
} else if (value == "LevelFour") { |
||||||
return '四级预案' |
return "四级预案"; |
||||||
}else if (value == 'LevelFive') { |
} else if (value == "LevelFive") { |
||||||
return '五级预案' |
return "五级预案"; |
||||||
}else if (value == 'PlanText') { |
} else if (value == "PlanText") { |
||||||
return '文本预案' |
return "文本预案"; |
||||||
} |
|
||||||
} |
} |
||||||
|
} |
||||||
} |
} |
||||||
|
@ -1,190 +1,201 @@ |
|||||||
<div style="height: 100%;overflow-y: auto;"> |
<div style="height: 100%;overflow-y: auto;"> |
||||||
<div class="header" > |
<div class="header"> |
||||||
<form (ngSubmit)="onSubmit(form.value)" #form="ngForm"> |
<form (ngSubmit)="onSubmit(form.value)" #form="ngForm"> |
||||||
<div class="queryBox"> |
<div class="queryBox"> |
||||||
|
|
||||||
<div class="queryField"> |
<div class="queryField"> |
||||||
<label style="margin-right: 10px;">预案名称:</label> |
<label style="margin-right: 10px;">预案名称:</label> |
||||||
<mat-form-field class="example-full-width"> |
<mat-form-field class="example-full-width"> |
||||||
<input matInput placeholder="请输入预案名称" name="companyName" autocomplete="off" [(ngModel)]="unitname"> |
<input matInput placeholder="请输入预案名称" name="companyName" autocomplete="off" [(ngModel)]="unitname"> |
||||||
</mat-form-field> |
</mat-form-field> |
||||||
</div> |
</div> |
||||||
<div class="queryField" > |
<div class="queryField"> |
||||||
<label style="margin-right: 10px;">编制级别:</label> |
<label style="margin-right: 10px;">编制级别:</label> |
||||||
<mat-form-field> |
<mat-form-field> |
||||||
<mat-select name="preparelevel" placeholder='请选择编制级别' [(ngModel)]="projectlevel"> |
<mat-select name="preparelevel" placeholder='请选择编制级别' [(ngModel)]="projectlevel"> |
||||||
<!-- <mat-option value="1">总队</mat-option> |
<!-- <mat-option value="1">总队</mat-option> |
||||||
<mat-option value="2">支队</mat-option> |
<mat-option value="2">支队</mat-option> |
||||||
<mat-option value="4">大队</mat-option> |
<mat-option value="4">大队</mat-option> |
||||||
<mat-option value="8">中队</mat-option> --> |
<mat-option value="8">中队</mat-option> --> |
||||||
<mat-option *ngFor="let item of preparelevels" [value]="item.value">{{item.name}}</mat-option> |
<mat-option *ngFor="let item of preparelevels" [value]="item.value">{{item.name}}</mat-option> |
||||||
</mat-select> |
</mat-select> |
||||||
</mat-form-field> |
</mat-form-field> |
||||||
<mat-checkbox style="margin-left: 6px;" [(ngModel)]="plcheck" name="plcheck">包含下级</mat-checkbox> |
<mat-checkbox style="margin-left: 6px;" [(ngModel)]="plcheck" name="plcheck">包含下级</mat-checkbox> |
||||||
<span *ngIf="padMore" style="margin-left: 20px; color: #0080FF;" (click)='padInfo()'>更多筛选条件<img [src]='imgsrcopen'style="width: 10px;height: 6px;margin:0 0 3px 2px;"> </span> |
<span *ngIf="padMore" style="margin-left: 20px; color: #0080FF;" (click)='padInfo()'>更多筛选条件<img |
||||||
<span *ngIf="padput" style="margin-left: 10px; color: #0080FF;" (click)='padInfo()'>收起<img [src]='imgsrcdown'style="width: 10px;height: 6px;margin:0 0 3px 2px;"> </span> |
[src]='imgsrcopen' style="width: 10px;height: 6px;margin:0 0 3px 2px;"> </span> |
||||||
</div> |
<span *ngIf="padput" style="margin-left: 10px; color: #0080FF;" (click)='padInfo()'>收起<img [src]='imgsrcdown' |
||||||
|
style="width: 10px;height: 6px;margin:0 0 3px 2px;"> </span> |
||||||
|
|
||||||
<div class="queryField" *ngIf="!pcfind"> |
|
||||||
<button mat-raised-button color="primary">查询</button> |
|
||||||
<button mat-raised-button style="margin-left: 25px;" type="button" (click)="reset()">重置</button> |
|
||||||
</div> |
|
||||||
<div class="queryField" *ngIf="!padMore"> |
|
||||||
<label style="margin-right: 10px;">预案级别:</label> |
|
||||||
<mat-form-field> |
|
||||||
<mat-select placeholder='请选择预案级别' name="level" [(ngModel)]="level"> |
|
||||||
<mat-option value="6">国家级</mat-option> |
|
||||||
<mat-option value="7">市级</mat-option> |
|
||||||
</mat-select> |
|
||||||
</mat-form-field> |
|
||||||
|
|
||||||
</div> |
|
||||||
<div class="queryField" *ngIf="!padMore"> |
|
||||||
<label style="margin-right: 10px;">添加人:</label> |
|
||||||
<mat-form-field class="example-full-width"> |
|
||||||
<input matInput placeholder="请输入添加人" name="addname" autocomplete="off" [(ngModel)]="addname"> |
|
||||||
</mat-form-field> |
|
||||||
<span *ngIf="pcMore" style="margin-left: 15px; color: #0080FF; cursor: pointer;" (click)='pcInfo()'>更多筛选条件<img [src]='imgsrcopen'style="width: 10px;height: 6px;margin:0 0 3px 2px;"> </span> |
|
||||||
<span *ngIf="pcput" style="margin-left: 10px; color: #0080FF; cursor: pointer;" (click)='pcInfo()'>收起<img [src]='imgsrcdown'style="width: 10px;height: 6px;margin:0 0 3px 2px;"> </span> |
|
||||||
</div> |
|
||||||
<div class="queryField" *ngIf="pcfind" > |
|
||||||
<button mat-raised-button color="primary">查询</button> |
|
||||||
<button mat-raised-button style="margin-left: 25px;" type="button" (click)="reset()">重置</button> |
|
||||||
</div> |
</div> |
||||||
<div class="queryField" *ngIf="!padMore&&!pcMore"> |
|
||||||
<label style="margin-right: 10px;">添加时间:</label> |
|
||||||
<mat-form-field class="example-full-width"> |
|
||||||
<input type="date" matInput name="addtime" autocomplete="off" [(ngModel)]="addtime"> |
|
||||||
</mat-form-field> |
|
||||||
<!-- <mat-icon aria-hidden="false" style="position: relative;right: 120px;top: 5px;">arrow forward</mat-icon> --> |
|
||||||
<mat-icon *ngIf="padjt" aria-hidden="false" style="position: relative;right: 120px;top: 5px;" id="padshow">arrow forward</mat-icon> |
|
||||||
<span style="margin-left: 15px;" id="pcshow" *ngIf="!padMore&&!padjt">🠊</span> |
|
||||||
<mat-form-field class="example-full-width" style="margin-left: 10px;"> |
|
||||||
<input type="date" matInput name="endtime" autocomplete="off" [(ngModel)]="endtime"> |
|
||||||
</mat-form-field> |
|
||||||
|
|
||||||
</div> |
|
||||||
|
|
||||||
|
|
||||||
<div class="queryField" *ngIf="!padMore&&!pcMore"> |
<div class="queryField" *ngIf="!pcfind"> |
||||||
<label style="margin-right: 10px;">预案类型:</label> |
<button mat-raised-button color="primary">查询</button> |
||||||
<mat-form-field> |
<button mat-raised-button style="margin-left: 25px;" type="button" (click)="reset()">重置</button> |
||||||
<input matInput placeholder="请输入预案类型" name="reservePlanType" autocomplete="off" [(ngModel)]="typePlan"> |
</div> |
||||||
</mat-form-field> |
<div class="queryField" *ngIf="!padMore"> |
||||||
</div> |
<label style="margin-right: 10px;">预案级别:</label> |
||||||
<div class="queryField" *ngIf="!padMore&&!pcMore"> |
<mat-form-field> |
||||||
<label style="margin-right: 10px;">审核状态:</label> |
<mat-select placeholder='请选择预案级别' name="level" [(ngModel)]="level"> |
||||||
<mat-form-field> |
<mat-option value="6">国家级</mat-option> |
||||||
<mat-select name="toExamine" placeholder='请选择审核状态' [(ngModel)]="unitstate"> |
<mat-option value="7">市级</mat-option> |
||||||
<mat-option value="8">未提交审核</mat-option> |
</mat-select> |
||||||
<mat-option value="1">审核中</mat-option> |
</mat-form-field> |
||||||
<mat-option value="2">审核通过</mat-option> |
|
||||||
<mat-option value="4">审核退回</mat-option> |
</div> |
||||||
</mat-select> |
<div class="queryField" *ngIf="!padMore"> |
||||||
</mat-form-field> |
<label style="margin-right: 10px;">添加人:</label> |
||||||
</div> |
<mat-form-field class="example-full-width"> |
||||||
<div class="queryField" *ngIf="!padMore&&!pcMore"> |
<input matInput placeholder="请输入添加人" name="addname" autocomplete="off" [(ngModel)]="addname"> |
||||||
<input type="radio" style="height: 16px;width: 16px;position: relative;top: 2px;" name="whgx" [value]='true' [(ngModel)]="IsNewData"> |
</mat-form-field> |
||||||
<label style="margin-right: 10px;margin-left: 2px;">新增</label> |
<span *ngIf="pcMore" style="margin-left: 15px; color: #0080FF; cursor: pointer;" (click)='pcInfo()'>更多筛选条件<img |
||||||
<input type="radio" style="height: 16px;width: 16px;position: relative;top: 2px;" name="whgx" [value]='false' [(ngModel)]="IsNewData"> |
[src]='imgsrcopen' style="width: 10px;height: 6px;margin:0 0 3px 2px;"> </span> |
||||||
<label style="margin-right: 10px;margin-left: 2px;">维护更新</label> |
<span *ngIf="pcput" style="margin-left: 10px; color: #0080FF; cursor: pointer;" (click)='pcInfo()'>收起<img |
||||||
</div> |
[src]='imgsrcdown' style="width: 10px;height: 6px;margin:0 0 3px 2px;"> </span> |
||||||
|
</div> |
||||||
</div> |
<div class="queryField" *ngIf="pcfind"> |
||||||
<!-- <div class="butclass" style="width: 100%;text-align: center;"> |
<button mat-raised-button color="primary">查询</button> |
||||||
|
<button mat-raised-button style="margin-left: 25px;" type="button" (click)="reset()">重置</button> |
||||||
|
</div> |
||||||
|
<div class="queryField" *ngIf="!padMore&&!pcMore"> |
||||||
|
<label style="margin-right: 10px;">添加时间:</label> |
||||||
|
<mat-form-field class="example-full-width"> |
||||||
|
<input type="date" matInput name="addtime" autocomplete="off" [(ngModel)]="addtime"> |
||||||
|
</mat-form-field> |
||||||
|
<!-- <mat-icon aria-hidden="false" style="position: relative;right: 120px;top: 5px;">arrow forward</mat-icon> --> |
||||||
|
<mat-icon *ngIf="padjt" aria-hidden="false" style="position: relative;right: 120px;top: 5px;" |
||||||
|
id="padshow">arrow forward</mat-icon> |
||||||
|
<span style="margin-left: 15px;" id="pcshow" *ngIf="!padMore&&!padjt">🠊</span> |
||||||
|
<mat-form-field class="example-full-width" style="margin-left: 10px;"> |
||||||
|
<input type="date" matInput name="endtime" autocomplete="off" [(ngModel)]="endtime"> |
||||||
|
</mat-form-field> |
||||||
|
|
||||||
|
</div> |
||||||
|
|
||||||
|
|
||||||
|
<div class="queryField" *ngIf="!padMore&&!pcMore"> |
||||||
|
<label style="margin-right: 10px;">预案类型:</label> |
||||||
|
<mat-form-field> |
||||||
|
<input matInput placeholder="请输入预案类型" name="reservePlanType" autocomplete="off" [(ngModel)]="typePlan"> |
||||||
|
</mat-form-field> |
||||||
|
</div> |
||||||
|
<div class="queryField" *ngIf="!padMore&&!pcMore"> |
||||||
|
<label style="margin-right: 10px;">审核状态:</label> |
||||||
|
<mat-form-field> |
||||||
|
<mat-select name="toExamine" placeholder='请选择审核状态' [(ngModel)]="unitstate"> |
||||||
|
<mat-option value="8">未提交审核</mat-option> |
||||||
|
<mat-option value="1">审核中</mat-option> |
||||||
|
<mat-option value="2">审核通过</mat-option> |
||||||
|
<mat-option value="4">审核退回</mat-option> |
||||||
|
</mat-select> |
||||||
|
</mat-form-field> |
||||||
|
</div> |
||||||
|
<div class="queryField" *ngIf="!padMore&&!pcMore"> |
||||||
|
<input type="radio" style="height: 16px;width: 16px;position: relative;top: 2px;" name="whgx" [value]='true' |
||||||
|
[(ngModel)]="IsNewData"> |
||||||
|
<label style="margin-right: 10px;margin-left: 2px;">新增</label> |
||||||
|
<input type="radio" style="height: 16px;width: 16px;position: relative;top: 2px;" name="whgx" [value]='false' |
||||||
|
[(ngModel)]="IsNewData"> |
||||||
|
<label style="margin-right: 10px;margin-left: 2px;">维护更新</label> |
||||||
|
</div> |
||||||
|
|
||||||
|
</div> |
||||||
|
<!-- <div class="butclass" style="width: 100%;text-align: center;"> |
||||||
<button mat-raised-button color="primary" type="submit">查询</button> |
<button mat-raised-button color="primary" type="submit">查询</button> |
||||||
<button mat-raised-button style="margin-left: 25px;" type="button" (click)="reset()">重置</button> |
<button mat-raised-button style="margin-left: 25px;" type="button" (click)="reset()">重置</button> |
||||||
</div> --> |
</div> --> |
||||||
</form> |
</form> |
||||||
|
</div> |
||||||
|
<!-- <mat-divider></mat-divider> --> |
||||||
|
<div class="newadd"> |
||||||
|
<div> |
||||||
|
<button *ngIf="levels=='0'" mat-raised-button color="primary" (click)='addunit()'><img style="margin-bottom: 3px;" |
||||||
|
src="../../../assets/images/newadd.png"> 新增</button> |
||||||
|
<!-- <button mat-raised-button color="primary" (click)='word("table","ceshi.doc")'></button> --> |
||||||
</div> |
</div> |
||||||
<!-- <mat-divider></mat-divider> --> |
|
||||||
<div class="newadd"> |
<div class="progressBox" style="margin-left: 100px;" *ngIf="downloadisLoading"> |
||||||
<div> |
|
||||||
<button *ngIf="levels=='0'" mat-raised-button color="primary" (click)='addunit()'><img style="margin-bottom: 3px;" src="../../../assets/images/newadd.png"> 新增</button> |
<!-- <button mat-raised-button style="margin-right: 5px;" (click)="cancelDowload()">取消下载</button> --> |
||||||
<!-- <button mat-raised-button color="primary" (click)='word("table","ceshi.doc")'></button> --> |
<span title="{{downloadFileName}}" style="font-size: 12px;" class="filename">{{downloadFileName}}</span> |
||||||
</div> |
<span style="font-size: 12px;position: absolute;margin-left: 8px;">下载中...</span> |
||||||
|
<mat-progress-bar mode="determinate" [value]="downloadProgress" class="progress"></mat-progress-bar> |
||||||
<div class="progressBox" style="margin-left: 100px;" *ngIf="downloadisLoading"> |
|
||||||
|
|
||||||
<!-- <button mat-raised-button style="margin-right: 5px;" (click)="cancelDowload()">取消下载</button> --> |
|
||||||
<span title="{{downloadFileName}}" style="font-size: 12px;" class="filename">{{downloadFileName}}</span> |
|
||||||
<span style="font-size: 12px;position: absolute;margin-left: 8px;">下载中...</span> |
|
||||||
<mat-progress-bar mode="determinate" [value]="downloadProgress" class="progress"></mat-progress-bar> |
|
||||||
</div> |
|
||||||
</div> |
</div> |
||||||
<div class="body"> |
</div> |
||||||
<div class="tablebox" id="table"> |
<div class="body"> |
||||||
<table mat-table [dataSource]="tabledataSource" class="mat-elevation-z8"> |
<div class="tablebox" id="table"> |
||||||
<ng-container matColumnDef="state"> |
<table mat-table [dataSource]="tabledataSource" class="mat-elevation-z8"> |
||||||
<th mat-header-cell *matHeaderCellDef style="width: 8%;">预案状态</th> |
<ng-container matColumnDef="state"> |
||||||
<td mat-cell *matCellDef="let element"> |
<th mat-header-cell *matHeaderCellDef style="width: 8%;">预案状态</th> |
||||||
<span class="add" *ngIf="element.isNewData">新增</span> |
<td mat-cell *matCellDef="let element"> |
||||||
<span class="weihu" *ngIf="!element.isNewData">维护更新</span> |
<span class="add" *ngIf="element.isNewData">新增</span> |
||||||
</td> |
<span class="weihu" *ngIf="!element.isNewData">维护更新</span> |
||||||
</ng-container> |
</td> |
||||||
<ng-container matColumnDef="unitname"> |
</ng-container> |
||||||
<th mat-header-cell *matHeaderCellDef style="width: 8%;">预案名称</th> |
<ng-container matColumnDef="unitname"> |
||||||
<td mat-cell *matCellDef="let element">{{element.name}}</td> |
<th mat-header-cell *matHeaderCellDef style="width: 8%;">预案名称</th> |
||||||
</ng-container> |
<td mat-cell *matCellDef="let element">{{element.name}}</td> |
||||||
<ng-container matColumnDef="level"> |
</ng-container> |
||||||
<th mat-header-cell *matHeaderCellDef style="width: 8%;">预案级别</th> |
<ng-container matColumnDef="level"> |
||||||
<td mat-cell *matCellDef="let element">{{element.planCategory=='6'?'国家级':'市级'}}</td> |
<th mat-header-cell *matHeaderCellDef style="width: 8%;">预案级别</th> |
||||||
</ng-container> |
<td mat-cell *matCellDef="let element">{{element.planCategory=='6'?'国家级':'市级'}}</td> |
||||||
<ng-container matColumnDef="addname"> |
</ng-container> |
||||||
<th mat-header-cell *matHeaderCellDef style="width: 8%;">添加人</th> |
<ng-container matColumnDef="addname"> |
||||||
<td mat-cell *matCellDef="let element">{{element.creatorName}}</td> |
<th mat-header-cell *matHeaderCellDef style="width: 8%;">添加人</th> |
||||||
</ng-container> |
<td mat-cell *matCellDef="let element">{{element.creatorName}}</td> |
||||||
|
</ng-container> |
||||||
<ng-container matColumnDef="addtime"> |
|
||||||
<th mat-header-cell *matHeaderCellDef style="width: 8%;">添加时间</th> |
<ng-container matColumnDef="addtime"> |
||||||
<td mat-cell *matCellDef="let element">{{element.creationTime|date:'yyyy-MM-dd'}}</td> |
<th mat-header-cell *matHeaderCellDef style="width: 8%;">添加时间</th> |
||||||
</ng-container> |
<td mat-cell *matCellDef="let element">{{element.creationTime|date:'yyyy-MM-dd'}}</td> |
||||||
<ng-container matColumnDef="plantype"> |
</ng-container> |
||||||
<th mat-header-cell *matHeaderCellDef style="width: 8%;">预案类型</th> |
<ng-container matColumnDef="plantype"> |
||||||
<td mat-cell *matCellDef="let element">{{element.disasterType}}</td> |
<th mat-header-cell *matHeaderCellDef style="width: 8%;">预案类型</th> |
||||||
</ng-container> |
<td mat-cell *matCellDef="let element">{{element.disasterType}}</td> |
||||||
<ng-container matColumnDef="passstate"> |
</ng-container> |
||||||
<th mat-header-cell *matHeaderCellDef style="width: 8%;">新增审核</th> |
<ng-container matColumnDef="passstate"> |
||||||
<td mat-cell *matCellDef="let element"> |
<th mat-header-cell *matHeaderCellDef style="width: 8%;">新增审核</th> |
||||||
{{element.newVerifyState}} |
<td mat-cell *matCellDef="let element"> |
||||||
<!-- {{element.auditStatus=='8'?'未提交审核':element.auditStatus=='1'?'审核中':element.auditStatus=='2'?'审核通过':element.auditStatus=='4'? |
{{element.newVerifyState}} |
||||||
|
<!-- {{element.auditStatus=='8'?'未提交审核':element.auditStatus=='1'?'审核中':element.auditStatus=='2'?'审核通过':element.auditStatus=='4'? |
||||||
'审核退回':element.auditStatus=='16'?'初审通过':'初审驳回'}} --> |
'审核退回':element.auditStatus=='16'?'初审通过':'初审驳回'}} --> |
||||||
</td> |
</td> |
||||||
</ng-container> |
</ng-container> |
||||||
<ng-container matColumnDef="isopen"> |
<ng-container matColumnDef="isopen"> |
||||||
<th mat-header-cell *matHeaderCellDef style="width: 8%;">是否公开</th> |
<th mat-header-cell *matHeaderCellDef style="width: 8%;">是否公开</th> |
||||||
<td mat-cell *matCellDef="let element">{{element.openRange}}</td> |
<td mat-cell *matCellDef="let element">{{element.openRange}}</td> |
||||||
</ng-container> |
</ng-container> |
||||||
<ng-container matColumnDef="projectlevel"> |
<ng-container matColumnDef="projectlevel"> |
||||||
<th mat-header-cell *matHeaderCellDef style="width: 8%;">编制级别</th> |
<th mat-header-cell *matHeaderCellDef style="width: 8%;">编制级别</th> |
||||||
<td mat-cell *matCellDef="let element">{{element.planLevel=='1'?'总队':element.planLevel=='2'?'支队':element.planLevel=='4'?'大队':'中队'}}</td> |
<td mat-cell *matCellDef="let element"> |
||||||
</ng-container> |
{{element.planLevel=='1'?'总队':element.planLevel=='2'?'支队':element.planLevel=='4'?'大队':'中队'}}</td> |
||||||
<ng-container matColumnDef="weihustate"> |
</ng-container> |
||||||
<th mat-header-cell *matHeaderCellDef style="width: 8%;">维护审核</th> |
<ng-container matColumnDef="auditstate"> |
||||||
<td mat-cell *matCellDef="let element">{{element.maintenanceVerifyState}}</td> |
<th mat-header-cell *matHeaderCellDef style="width: 8%;">审核状态</th> |
||||||
</ng-container> |
<td mat-cell *matCellDef="let element"> |
||||||
<ng-container matColumnDef="operation"> |
{{element.auditStatus | auditState}} |
||||||
<th mat-header-cell *matHeaderCellDef style="width: 20%;">操作</th> |
</td> |
||||||
<td mat-cell *matCellDef="let element" style="white-space: nowrap;cursor: pointer;"> |
</ng-container> |
||||||
<span style="color: blue;" (click)='openPlan(element)'>查看预案</span> |
<ng-container matColumnDef="operation"> |
||||||
<span style="color: blue;margin-left: 4px;" (click)="submitAudit(element)" *ngIf="(element.isNewData && element.newVerifyState=='未提交审核')||(!element.isNewData&&(element.maintenanceVerifyState=='审核通过'||element.maintenanceVerifyState=='未提交审核'))">提交审核</span> |
<th mat-header-cell *matHeaderCellDef style="width: 20%;">操作</th> |
||||||
<span style="color: blue;margin-left: 4px;" (click)="cancelAudit(element)" *ngIf="element.auditStatus == 1||element.auditStatus == 16">撤销审核</span> |
<td mat-cell *matCellDef="let element" style="white-space: nowrap;cursor: pointer;"> |
||||||
<span style="color: blue;margin-left: 4px;" (click)="auditResult(element)">审批结果</span> |
<span style="color: blue;" (click)='openPlan(element)'>查看预案</span> |
||||||
<span style="color: blue;margin-left: 4px;" (click)='readFile(element)'>下载</span> |
<span style="color: blue;margin-left: 4px;" (click)="submitAudit(element)" |
||||||
<span style="color: red;margin-left: 4px" (click)='deletePlan(element.id)' *ngIf="element.auditStatus == 8"> 删除</span> |
*ngIf="(element.isNewData && element.newVerifyState=='未提交审核')||(!element.isNewData&&(element.maintenanceVerifyState=='审核通过'||element.maintenanceVerifyState=='未提交审核'))">提交审核</span> |
||||||
</td> |
<span style="color: blue;margin-left: 4px;" (click)="cancelAudit(element)" |
||||||
</ng-container> |
*ngIf="element.auditStatus == 1||element.auditStatus == 16">撤销审核</span> |
||||||
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr> |
<span style="color: blue;margin-left: 4px;" (click)="auditResult(element)">审批结果</span> |
||||||
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr> |
<span style="color: blue;margin-left: 4px;" (click)='readFile(element)'>下载</span> |
||||||
</table> |
<span style="color: red;margin-left: 4px" (click)='deletePlan(element.id)'> 删除</span> |
||||||
<mat-paginator pageEvent [length]="length" |
</td> |
||||||
[pageSize]="pageSize" |
</ng-container> |
||||||
[pageSizeOptions]="pageSizeOptions" |
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr> |
||||||
(page)="changePage($event)"> |
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr> |
||||||
|
</table> |
||||||
</mat-paginator> |
<mat-paginator pageEvent [length]="length" [pageSize]="pageSize" [pageSizeOptions]="pageSizeOptions" |
||||||
|
(page)="changePage($event)"> |
||||||
</div> |
|
||||||
|
</mat-paginator> |
||||||
|
|
||||||
</div> |
</div> |
||||||
</div> |
</div> |
||||||
|
</div> |
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,10 @@ |
|||||||
|
<h3 mat-dialog-title>选择要公开的消防救援站</h3> |
||||||
|
<div class="box"> |
||||||
|
<nz-tree #nzTreeComponent [nzData]="nodes" nzCheckable nzCheckStrictly [nzCheckedKeys]="defaultCheckedKeys" |
||||||
|
[nzExpandedKeys]="defaultExpandedKeys"> |
||||||
|
</nz-tree> |
||||||
|
</div> |
||||||
|
<mat-dialog-actions align="end"> |
||||||
|
<button mat-button mat-dialog-close [disabled]="isLoading">取消</button> |
||||||
|
<button mat-button cdkFocusInitial (click)="save()" [disabled]="isLoading">确定</button> |
||||||
|
</mat-dialog-actions> |
@ -0,0 +1,4 @@ |
|||||||
|
.box{ |
||||||
|
max-height: 400px; |
||||||
|
overflow-y: auto; |
||||||
|
} |
@ -0,0 +1,25 @@ |
|||||||
|
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; |
||||||
|
|
||||||
|
import { OpenOrComponent } from './open-or.component'; |
||||||
|
|
||||||
|
describe('OpenOrComponent', () => { |
||||||
|
let component: OpenOrComponent; |
||||||
|
let fixture: ComponentFixture<OpenOrComponent>; |
||||||
|
|
||||||
|
beforeEach(async(() => { |
||||||
|
TestBed.configureTestingModule({ |
||||||
|
declarations: [ OpenOrComponent ] |
||||||
|
}) |
||||||
|
.compileComponents(); |
||||||
|
})); |
||||||
|
|
||||||
|
beforeEach(() => { |
||||||
|
fixture = TestBed.createComponent(OpenOrComponent); |
||||||
|
component = fixture.componentInstance; |
||||||
|
fixture.detectChanges(); |
||||||
|
}); |
||||||
|
|
||||||
|
it('should create', () => { |
||||||
|
expect(component).toBeTruthy(); |
||||||
|
}); |
||||||
|
}); |
@ -0,0 +1,126 @@ |
|||||||
|
import { HttpClient } from "@angular/common/http"; |
||||||
|
import { |
||||||
|
Component, |
||||||
|
OnInit, |
||||||
|
AfterViewInit, |
||||||
|
ViewChild, |
||||||
|
Inject, |
||||||
|
} from "@angular/core"; |
||||||
|
import { MatSnackBar } from "@angular/material/snack-bar"; |
||||||
|
import { MatDialogRef, MAT_DIALOG_DATA } from "@angular/material/dialog"; |
||||||
|
import { |
||||||
|
NzFormatEmitEvent, |
||||||
|
NzTreeComponent, |
||||||
|
NzTreeNodeOptions, |
||||||
|
} from "ng-zorro-antd/tree"; |
||||||
|
|
||||||
|
@Component({ |
||||||
|
selector: "app-open-or", |
||||||
|
templateUrl: "./open-or.component.html", |
||||||
|
styleUrls: ["./open-or.component.scss"], |
||||||
|
}) |
||||||
|
export class OpenOrComponent implements OnInit { |
||||||
|
constructor( |
||||||
|
private http: HttpClient, |
||||||
|
public snackBar: MatSnackBar, |
||||||
|
@Inject(MAT_DIALOG_DATA) public data: any, |
||||||
|
public dialogRef: MatDialogRef<OpenOrComponent> |
||||||
|
) {} |
||||||
|
@ViewChild("nzTreeComponent", { static: false }) |
||||||
|
nzTreeComponent!: NzTreeComponent; |
||||||
|
defaultCheckedKeys = []; |
||||||
|
defaultExpandedKeys = []; |
||||||
|
isLoading = false; |
||||||
|
nodes: NzTreeNodeOptions[] = []; |
||||||
|
ngOnInit(): void { |
||||||
|
this.getOrganizations(); |
||||||
|
} |
||||||
|
|
||||||
|
//获得所有组织机构
|
||||||
|
allorganizations = []; |
||||||
|
getOrganizations() { |
||||||
|
this.http.get("/api/Organizations").subscribe((data: any) => { |
||||||
|
this.allorganizations = data; |
||||||
|
this.getpresentOrganization(); |
||||||
|
}); |
||||||
|
} |
||||||
|
//得到当前单位所在组织机构的tree型数据
|
||||||
|
organizationName; |
||||||
|
getpresentOrganization() { |
||||||
|
let orData = JSON.parse(JSON.stringify(this.allorganizations)); |
||||||
|
orData.forEach((item) => { |
||||||
|
item.children = []; |
||||||
|
orData.forEach((element) => { |
||||||
|
if (element.parentId == item.id) { |
||||||
|
item.children.push(element); |
||||||
|
} |
||||||
|
}); |
||||||
|
}); |
||||||
|
orData.forEach((item) => { |
||||||
|
item.title = item.name; |
||||||
|
item.key = item.id; |
||||||
|
item.selectable = false; |
||||||
|
if (item.children.length === 0) { |
||||||
|
item.isLeaf = true; |
||||||
|
} |
||||||
|
}); |
||||||
|
this.http.get("/api/Account/Profiles").subscribe((data: any) => { |
||||||
|
this.organizationName = data.organizationName; |
||||||
|
if (this.organizationName) { |
||||||
|
orData.forEach((item) => { |
||||||
|
if (item.name == this.organizationName) { |
||||||
|
function lookForAllId(data = [], arr = []) { |
||||||
|
for (let item of data) { |
||||||
|
arr.push(item.id); |
||||||
|
if (item.children && item.children.length) |
||||||
|
lookForAllId(item.children, arr); |
||||||
|
} |
||||||
|
return arr; |
||||||
|
} |
||||||
|
|
||||||
|
function lookForNode(data, id, node = []) { |
||||||
|
for (let item of data) { |
||||||
|
if (item.id === id) { |
||||||
|
node.push(item); |
||||||
|
} else { |
||||||
|
if (item.children && item.children.length) { |
||||||
|
lookForNode(item.children, id, node); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
return node; |
||||||
|
} |
||||||
|
if (this.data.plan.publicOrganizationIds.length === 0) { |
||||||
|
this.defaultCheckedKeys = [...lookForAllId([item])]; |
||||||
|
} else { |
||||||
|
this.defaultCheckedKeys = this.data.plan.publicOrganizationIds; |
||||||
|
} |
||||||
|
|
||||||
|
this.nodes = [...[item]]; |
||||||
|
} |
||||||
|
}); |
||||||
|
} |
||||||
|
}); |
||||||
|
} |
||||||
|
save() { |
||||||
|
let ids = |
||||||
|
this.nzTreeComponent.getCheckedNodeList().map((item) => { |
||||||
|
return item.key; |
||||||
|
}) || []; |
||||||
|
if (ids.length === 0) { |
||||||
|
this.snackBar.open("至少选择一个队站公开", "确定", { |
||||||
|
verticalPosition: "top", |
||||||
|
duration: 3000, |
||||||
|
}); |
||||||
|
} |
||||||
|
this.http |
||||||
|
.put(`/api/PlanAudits/${this.data.plan.id}/Public`, ids) |
||||||
|
.subscribe((data) => { |
||||||
|
this.snackBar.open("预案已公开", "确定", { |
||||||
|
verticalPosition: "top", |
||||||
|
duration: 3000, |
||||||
|
}); |
||||||
|
this.dialogRef.close("公开成功"); |
||||||
|
}); |
||||||
|
} |
||||||
|
} |
@ -1,251 +1,296 @@ |
|||||||
import { Component, OnInit, ViewChild, Inject } from '@angular/core'; |
import { Component, OnInit, ViewChild, Inject } from "@angular/core"; |
||||||
import { HttpClient } from '@angular/common/http' |
import { HttpClient } from "@angular/common/http"; |
||||||
import { MatTreeFlatDataSource, MatTreeFlattener } from '@angular/material/tree'; |
import { |
||||||
import { MatPaginator } from '@angular/material/paginator'; |
MatTreeFlatDataSource, |
||||||
import { FlatTreeControl } from '@angular/cdk/tree'; |
MatTreeFlattener, |
||||||
import { FormControl } from '@angular/forms'; |
} from "@angular/material/tree"; |
||||||
import { Router,ActivatedRoute } from '@angular/router' |
import { MatPaginator } from "@angular/material/paginator"; |
||||||
import { PageEvent } from '@angular/material/paginator'; |
import { FlatTreeControl } from "@angular/cdk/tree"; |
||||||
import { MatDialogRef, MatDialog, MAT_DIALOG_DATA } from '@angular/material/dialog'; |
import { FormControl } from "@angular/forms"; |
||||||
import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar'; |
import { Router, ActivatedRoute } from "@angular/router"; |
||||||
import { TreeService } from '../../http-interceptors/tree.service' |
import { PageEvent } from "@angular/material/paginator"; |
||||||
import { Viewer } from 'photo-sphere-viewer'; |
import { |
||||||
declare var CryptoJS |
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 { Viewer } from "photo-sphere-viewer"; |
||||||
|
declare var CryptoJS; |
||||||
@Component({ |
@Component({ |
||||||
selector: 'app-reinforce-plan', |
selector: "app-reinforce-plan", |
||||||
templateUrl: './reinforce-plan.component.html', |
templateUrl: "./reinforce-plan.component.html", |
||||||
styleUrls: ['./reinforce-plan.component.scss'] |
styleUrls: ["./reinforce-plan.component.scss"], |
||||||
}) |
}) |
||||||
export class ReinforcePlanComponent implements OnInit { |
export class ReinforcePlanComponent implements OnInit { |
||||||
|
constructor( |
||||||
|
private http: HttpClient, |
||||||
|
private router: Router, |
||||||
|
private route: ActivatedRoute, |
||||||
|
private tree: TreeService, |
||||||
|
public dialog: MatDialog, |
||||||
|
public snackBar: MatSnackBar |
||||||
|
) {} |
||||||
|
|
||||||
constructor(private http:HttpClient,private router:Router,private route:ActivatedRoute,private tree: TreeService,public dialog: MatDialog,public snackBar: MatSnackBar) { } |
private _transformer = (node, level: number) => { |
||||||
|
//初始化tree
|
||||||
private _transformer = (node, level: number) => { //初始化tree
|
|
||||||
return { |
return { |
||||||
expandable: !!node.children && node.children.length > 0, |
expandable: !!node.children && node.children.length > 0, |
||||||
name: node.name, |
name: node.name, |
||||||
level: level, |
level: level, |
||||||
id: node.id, |
id: node.id, |
||||||
parentId: node.parentId, |
parentId: node.parentId, |
||||||
children: node.children |
children: node.children, |
||||||
}; |
}; |
||||||
} |
}; |
||||||
treeControl = new FlatTreeControl<any>(node => node.level, node => node.expandable); |
treeControl = new FlatTreeControl<any>( |
||||||
treeFlattener = new MatTreeFlattener(this._transformer, node => node.level, node => node.expandable, node => node.children); |
(node) => node.level, |
||||||
|
(node) => node.expandable |
||||||
|
); |
||||||
|
treeFlattener = new MatTreeFlattener( |
||||||
|
this._transformer, |
||||||
|
(node) => node.level, |
||||||
|
(node) => node.expandable, |
||||||
|
(node) => node.children |
||||||
|
); |
||||||
dataSource = new MatTreeFlatDataSource(this.treeControl, this.treeFlattener); |
dataSource = new MatTreeFlatDataSource(this.treeControl, this.treeFlattener); |
||||||
myControl = new FormControl(); |
myControl = new FormControl(); |
||||||
hasChild = (_: number, node: any) => node.expandable; |
hasChild = (_: number, node: any) => node.expandable; |
||||||
//分页
|
//分页
|
||||||
@ViewChild(MatPaginator, {static: true})
|
@ViewChild(MatPaginator, { static: true }) |
||||||
pageEvent: PageEvent; |
pageEvent: PageEvent; |
||||||
paginator: MatPaginator; |
paginator: MatPaginator; |
||||||
length:any; //共多少条数据
|
length: any; //共多少条数据
|
||||||
pageSize:any; //每页条数
|
pageSize: any; //每页条数
|
||||||
pageSizeOptions: number[] = [10] //设置每页条数
|
pageSizeOptions: number[] = [10]; //设置每页条数
|
||||||
PageNumber:any; //第几页
|
PageNumber: any; //第几页
|
||||||
|
|
||||||
displayedColumns: string[] = ['state','unitname','planname', 'addpeople','level','addtime','plantype','auditStatus','weihuStatus','openRange','projectlevel','operation']; |
displayedColumns: string[] = [ |
||||||
allorganizations:any //所有组织机构
|
"state", |
||||||
allunittype:any //所有单位类型
|
"unitname", |
||||||
tabledataSource:any //表格数据
|
"planname", |
||||||
IsNewData='' //维护更新活新增
|
"addpeople", |
||||||
|
"level", |
||||||
|
"addtime", |
||||||
|
"plantype", |
||||||
|
"auditstate", |
||||||
|
"openRange", |
||||||
|
"projectlevel", |
||||||
|
"operation", |
||||||
|
]; |
||||||
|
allorganizations: any; //所有组织机构
|
||||||
|
allunittype: any; //所有单位类型
|
||||||
|
tabledataSource: any; //表格数据
|
||||||
|
IsNewData = ""; //维护更新活新增
|
||||||
|
|
||||||
preparelevels:any |
preparelevels: any; |
||||||
ngOnInit(): void { |
async ngOnInit(): Promise<void> { |
||||||
if(window.matchMedia("(max-width: 1400px)").matches){ |
if (window.matchMedia("(max-width: 1400px)").matches) { |
||||||
this.pcMore=false |
this.pcMore = false; |
||||||
this.padMore=true |
this.padMore = true; |
||||||
this.pcfind=false |
this.pcfind = false; |
||||||
this.padjt=true |
this.padjt = true; |
||||||
}else{ |
} else { |
||||||
this.pcfind=true |
this.pcfind = true; |
||||||
this.pcMore=true |
this.pcMore = true; |
||||||
this.padMore=false |
this.padMore = false; |
||||||
this.padjt=false |
this.padjt = false; |
||||||
} |
} |
||||||
this.getunitdata(); |
this.getunitdata(); |
||||||
this.getOrganizations(); |
await this.getOrganizations(); |
||||||
|
this.jsId = this.dataSource.data[0].id; |
||||||
this.getUnittype(); |
this.getUnittype(); |
||||||
this.getAllPlanInfo(); |
this.getAllPlanInfo(); |
||||||
let level = sessionStorage.getItem("level"); |
let level = sessionStorage.getItem("level"); |
||||||
if(level == "0"){//如果是总队
|
if (level == "0") { |
||||||
|
//如果是总队
|
||||||
this.preparelevels = [ |
this.preparelevels = [ |
||||||
{name:"总队",value:"1"}, |
{ name: "总队", value: "1" }, |
||||||
{name:"支队",value:"2"}, |
{ name: "支队", value: "2" }, |
||||||
{name:"大队",value:"4"}, |
{ name: "大队", value: "4" }, |
||||||
{name:"中队",value:"8"} |
{ name: "中队", value: "8" }, |
||||||
] |
]; |
||||||
} |
} |
||||||
if(level == "1"){//如果是支队
|
if (level == "1") { |
||||||
|
//如果是支队
|
||||||
this.preparelevels = [ |
this.preparelevels = [ |
||||||
{name:"支队",value:"2"}, |
{ name: "支队", value: "2" }, |
||||||
{name:"大队",value:"4"}, |
{ name: "大队", value: "4" }, |
||||||
{name:"中队",value:"8"} |
{ name: "中队", value: "8" }, |
||||||
] |
]; |
||||||
} |
} |
||||||
if(level == "2"){//如果是大队
|
if (level == "2") { |
||||||
|
//如果是大队
|
||||||
this.preparelevels = [ |
this.preparelevels = [ |
||||||
{name:"大队",value:"4"}, |
{ name: "大队", value: "4" }, |
||||||
{name:"中队",value:"8"} |
{ name: "中队", value: "8" }, |
||||||
] |
]; |
||||||
} |
} |
||||||
if(level == "3"){//如果是中队
|
if (level == "3") { |
||||||
this.preparelevels = [ |
//如果是中队
|
||||||
{name:"中队",value:"8"} |
this.preparelevels = [{ name: "中队", value: "8" }]; |
||||||
] |
|
||||||
} |
} |
||||||
} |
} |
||||||
pcMore//pc更多
|
pcMore; //pc更多
|
||||||
pcput=false//pc收起
|
pcput = false; //pc收起
|
||||||
pcfind//pc查询
|
pcfind; //pc查询
|
||||||
padjt=false |
padjt = false; |
||||||
padMore=true//pad收缩控制
|
padMore = true; //pad收缩控制
|
||||||
padput=false//pad收起按钮
|
padput = false; //pad收起按钮
|
||||||
imgsrcopen="../../../assets/images/routdown2.png" |
imgsrcopen = "../../../assets/images/routdown2.png"; |
||||||
imgsrcdown="../../../assets/images/routup2.png" |
imgsrcdown = "../../../assets/images/routup2.png"; |
||||||
pcInfo(){ |
pcInfo() { |
||||||
this.pcMore=!this.pcMore |
this.pcMore = !this.pcMore; |
||||||
this.pcput=!this.pcput |
this.pcput = !this.pcput; |
||||||
} |
} |
||||||
padInfo(){ |
padInfo() { |
||||||
this.padMore=!this.padMore |
this.padMore = !this.padMore; |
||||||
this.padput=!this.padput |
this.padput = !this.padput; |
||||||
} |
} |
||||||
|
|
||||||
allPlanInfo:any //存储所有预案信息
|
allPlanInfo: any; //存储所有预案信息
|
||||||
//获得所有预案信息
|
//获得所有预案信息
|
||||||
IsNewCompanyData=''//单位维护更新或者新增
|
IsNewCompanyData = ""; //单位维护更新或者新增
|
||||||
getAllPlanInfo(){ |
getAllPlanInfo() { |
||||||
let paramsdata:any = { |
let paramsdata: any = { |
||||||
CompanyName: this.companyName || '', |
CompanyName: this.companyName || "", |
||||||
OrganizationId: this.jsId || '', |
OrganizationId: this.jsId || "", |
||||||
HasChildrenOrganization:this.jscheck || '', |
HasChildrenOrganization: this.jscheck || "", |
||||||
BuildingTypeId: this.unittype || '', |
BuildingTypeId: this.unittype || "", |
||||||
PlanType: this.reservePlanType || '', |
PlanType: this.reservePlanType || "", |
||||||
AuditStatus:'', //审核状态
|
AuditStatus: "", //审核状态
|
||||||
PlanLevel: this.preparelevel || '', |
PlanLevel: this.preparelevel || "", |
||||||
HasChildrenPlanLevel: this.plcheck || '', |
HasChildrenPlanLevel: this.plcheck || "", |
||||||
CreationTimeRangeStart:this.addtime||'', |
CreationTimeRangeStart: this.addtime || "", |
||||||
CreationTimeRangeEnd:this.endtime||'', |
CreationTimeRangeEnd: this.endtime || "", |
||||||
PageNumber: this.PageNumber || '1', |
PageNumber: this.PageNumber || "1", |
||||||
PageSize: this.pageSizeOptions[0], |
PageSize: this.pageSizeOptions[0], |
||||||
Sort: '', |
Sort: "", |
||||||
IsNewData:this.IsNewData, |
IsNewData: this.IsNewData, |
||||||
IsNewCompanyData:this.IsNewCompanyData |
IsNewCompanyData: this.IsNewCompanyData, |
||||||
} |
}; |
||||||
this.http.get("/api/ApprovedPlans/GetReinforcementPlanComponents",{params:paramsdata}).subscribe((data:any)=>{ |
this.http |
||||||
// console.log('增援预案列表',data)
|
.get("/api/ApprovedPlans/GetReinforcementPlanComponents", { |
||||||
this.length = data.totalCount |
params: paramsdata, |
||||||
this.allPlanInfo = data |
}) |
||||||
this.tabledataSource = data.items
|
.subscribe((data: any) => { |
||||||
}) |
// console.log('增援预案列表',data)
|
||||||
|
this.length = data.totalCount; |
||||||
|
this.allPlanInfo = data; |
||||||
|
this.tabledataSource = data.items; |
||||||
|
}); |
||||||
} |
} |
||||||
|
|
||||||
//得到当前单位信息
|
//得到当前单位信息
|
||||||
getunitdata(){ |
getunitdata() { |
||||||
this.http.get("/api/Account/Profiles").subscribe( |
this.http.get("/api/Account/Profiles").subscribe((data: any) => { |
||||||
(data:any)=>{ |
this.organizationName = data.organizationName; |
||||||
this.organizationName = data.organizationName |
}); |
||||||
} |
|
||||||
) |
|
||||||
} |
} |
||||||
addtime//开始时间
|
addtime; //开始时间
|
||||||
endtime//结束时间
|
endtime; //结束时间
|
||||||
integrityScoreMin//完整度最小值
|
integrityScoreMin; //完整度最小值
|
||||||
integrityScoreMax//完整度最大值
|
integrityScoreMax; //完整度最大值
|
||||||
organizationName:any //当前单位组织机构名称
|
organizationName: any; //当前单位组织机构名称
|
||||||
treedata:any //组织机构树型数据
|
treedata: any; //组织机构树型数据
|
||||||
newArr:any = [] |
newArr: any = []; |
||||||
newallorganizations:any //用于存储在原始数据基础上的每个机构增加children字段
|
newallorganizations: any; //用于存储在原始数据基础上的每个机构增加children字段
|
||||||
//获得所有组织机构
|
//获得所有组织机构
|
||||||
getOrganizations(){ |
getOrganizations() { |
||||||
this.http.get('/api/Organizations').subscribe( |
return new Promise<void>((resolve, reject) => { |
||||||
(data:any)=>{ |
this.http |
||||||
this.allorganizations = data |
.get("/api/Organizations", { |
||||||
this.dataSource.data = this.tree.toTree(data); |
params: { |
||||||
} |
strict: "true", |
||||||
) |
}, |
||||||
|
}) |
||||||
|
.subscribe((data: any) => { |
||||||
|
this.allorganizations = data; |
||||||
|
this.dataSource.data = this.tree.toTree(data); |
||||||
|
resolve(); |
||||||
|
}); |
||||||
|
}); |
||||||
} |
} |
||||||
|
|
||||||
//获得所有单位类型
|
//获得所有单位类型
|
||||||
getUnittype(){ |
getUnittype() { |
||||||
this.http.get('/api/BuildingTypes/Simple').subscribe( |
this.http.get("/api/BuildingTypes/Simple").subscribe((data) => { |
||||||
data=>{ |
this.allunittype = data; |
||||||
this.allunittype = data |
}); |
||||||
} |
|
||||||
) |
|
||||||
} |
} |
||||||
//分页事件
|
//分页事件
|
||||||
chagePage(e){ |
chagePage(e) { |
||||||
this.PageNumber = e.pageIndex+1 |
this.PageNumber = e.pageIndex + 1; |
||||||
this.getAllPlanInfo(); |
this.getAllPlanInfo(); |
||||||
} |
} |
||||||
|
|
||||||
//辖区中队div是否显示
|
//辖区中队div是否显示
|
||||||
isorganizationbox:boolean = false |
isorganizationbox: boolean = false; |
||||||
//点击辖区中队树,将选择的辖区中队添加到变量
|
//点击辖区中队树,将选择的辖区中队添加到变量
|
||||||
add(node) { |
add(node) { |
||||||
this.isorganizationbox = false |
this.isorganizationbox = false; |
||||||
this.js = node.name |
this.js = node.name; |
||||||
this.jsId = node.id |
this.jsId = node.id; |
||||||
} |
} |
||||||
//关闭辖区中队隐藏框
|
//关闭辖区中队隐藏框
|
||||||
closeorganizationbox() { |
closeorganizationbox() { |
||||||
this.isorganizationbox = false |
this.isorganizationbox = false; |
||||||
} |
} |
||||||
//打开辖区中队隐藏框
|
//打开辖区中队隐藏框
|
||||||
openorganizationbox() { |
openorganizationbox() { |
||||||
this.isorganizationbox = true |
this.isorganizationbox = true; |
||||||
} |
} |
||||||
//关闭出现的组织机构div
|
//关闭出现的组织机构div
|
||||||
closediv(){ |
closediv() { |
||||||
this.isorganizationbox = false |
this.isorganizationbox = false; |
||||||
} |
} |
||||||
//查询
|
//查询
|
||||||
onSubmit (e) { |
onSubmit(e) { |
||||||
this.PageNumber = 1 |
this.PageNumber = 1; |
||||||
this.pageEvent.pageIndex = 0 |
this.pageEvent.pageIndex = 0; |
||||||
this.getAllPlanInfo() |
this.getAllPlanInfo(); |
||||||
} |
} |
||||||
companyName:any //单位名称
|
companyName: any; //单位名称
|
||||||
js:any //所选组织机构
|
js: any; //所选组织机构
|
||||||
jsId:any //所选组织机构的id
|
jsId: any; //所选组织机构的id
|
||||||
jscheck:boolean //所选组织机构勾选框
|
jscheck: boolean; //所选组织机构勾选框
|
||||||
unittype:any //单位类型
|
unittype: any; //单位类型
|
||||||
reservePlanType:any //预案类型
|
reservePlanType: any; //预案类型
|
||||||
preparelevel:any //编制级别
|
preparelevel: any; //编制级别
|
||||||
plcheck:boolean //编制级别勾选框
|
plcheck: boolean; //编制级别勾选框
|
||||||
//重置
|
//重置
|
||||||
reset(){ |
reset() { |
||||||
this.IsNewData='' |
this.IsNewData = ""; |
||||||
this.IsNewCompanyData='' |
this.IsNewCompanyData = ""; |
||||||
this.companyName = '' |
this.companyName = ""; |
||||||
this.js = '' |
this.js = ""; |
||||||
this.jsId = '' |
this.jsId = ""; |
||||||
this.jscheck = false |
this.jscheck = false; |
||||||
this.unittype = '' |
this.unittype = ""; |
||||||
this.reservePlanType = '' |
this.reservePlanType = ""; |
||||||
this.preparelevel = '' |
this.preparelevel = ""; |
||||||
this.addtime='' |
this.addtime = ""; |
||||||
this.endtime='' |
this.endtime = ""; |
||||||
this.plcheck = false |
this.plcheck = false; |
||||||
//重新获取初始化列表
|
//重新获取初始化列表
|
||||||
this.pageEvent.pageIndex = 0 |
this.pageEvent.pageIndex = 0; |
||||||
this.PageNumber = 1 |
this.PageNumber = 1; |
||||||
this.getAllPlanInfo(); |
this.getAllPlanInfo(); |
||||||
|
|
||||||
} |
} |
||||||
|
|
||||||
//查看预案
|
//查看预案
|
||||||
openPlan(e){ |
openPlan(e) { |
||||||
// console.log(e)
|
// console.log(e)
|
||||||
let id = e.id
|
let id = e.id; |
||||||
sessionStorage.setItem("planId",id) |
sessionStorage.setItem("planId", id); |
||||||
sessionStorage.setItem("companyId",e.companyId) |
sessionStorage.setItem("companyId", e.companyId); |
||||||
//sessionStorage.setItem("buildingTypeId",this.unittypeId)
|
//sessionStorage.setItem("buildingTypeId",this.unittypeId)
|
||||||
sessionStorage.setItem("editable","0") |
sessionStorage.setItem("editable", "0"); |
||||||
sessionStorage.setItem("planName",e.name) |
sessionStorage.setItem("planName", e.name); |
||||||
let companyId = sessionStorage.getItem("companyId") |
let companyId = sessionStorage.getItem("companyId"); |
||||||
window.open(`/keyUnit/viewunitinfoplan?id=${companyId}&orName=${e.company.organizationName}&orId=${e.company.organizationId}`); |
window.open( |
||||||
|
`/keyUnit/viewunitinfoplan?id=${companyId}&orName=${e.company.organizationName}&orId=${e.company.organizationId}` |
||||||
|
); |
||||||
} |
} |
||||||
} |
} |
||||||
|
@ -1,164 +1,177 @@ |
|||||||
<div style="height: 100%;overflow-y: auto;"> |
<div style="height: 100%;overflow-y: auto;"> |
||||||
<div class="header" > |
<div class="header"> |
||||||
<form (ngSubmit)="onSubmit(form.value)" #form="ngForm"> |
<form (ngSubmit)="onSubmit(form.value)" #form="ngForm"> |
||||||
<div class="queryBox"> |
<div class="queryBox"> |
||||||
|
|
||||||
<div class="queryField"> |
<div class="queryField"> |
||||||
<label style="margin-right: 10px;">预案名称:</label> |
<label style="margin-right: 10px;">预案名称:</label> |
||||||
<mat-form-field class="example-full-width"> |
<mat-form-field class="example-full-width"> |
||||||
<input matInput placeholder="请输入预案名称" name="companyName" autocomplete="off" [(ngModel)]="unitname"> |
<input matInput placeholder="请输入预案名称" name="companyName" autocomplete="off" [(ngModel)]="unitname"> |
||||||
</mat-form-field> |
</mat-form-field> |
||||||
</div> |
</div> |
||||||
<div class="queryField" > |
<div class="queryField"> |
||||||
<label style="margin-right: 10px;">编制级别:</label> |
<label style="margin-right: 10px;">编制级别:</label> |
||||||
<mat-form-field> |
<mat-form-field> |
||||||
<mat-select name="preparelevel" placeholder='请选择编制级别' [(ngModel)]="projectlevel"> |
<mat-select name="preparelevel" placeholder='请选择编制级别' [(ngModel)]="projectlevel"> |
||||||
<!-- <mat-option value="1">总队</mat-option> |
<!-- <mat-option value="1">总队</mat-option> |
||||||
<mat-option value="2">支队</mat-option> |
<mat-option value="2">支队</mat-option> |
||||||
<mat-option value="4">大队</mat-option> |
<mat-option value="4">大队</mat-option> |
||||||
<mat-option value="8">中队</mat-option> --> |
<mat-option value="8">中队</mat-option> --> |
||||||
<mat-option *ngFor="let item of preparelevels" [value]="item.value">{{item.name}}</mat-option> |
<mat-option *ngFor="let item of preparelevels" [value]="item.value">{{item.name}}</mat-option> |
||||||
</mat-select> |
</mat-select> |
||||||
</mat-form-field> |
</mat-form-field> |
||||||
<mat-checkbox style="margin-left: 6px;" [(ngModel)]="plcheck" name="plcheck">包含下级</mat-checkbox> |
<mat-checkbox style="margin-left: 6px;" [(ngModel)]="plcheck" name="plcheck">包含下级</mat-checkbox> |
||||||
<span *ngIf="padMore" style="margin-left: 20px; color: #0080FF;" (click)='padInfo()'>更多筛选条件<img [src]='imgsrcopen'style="width: 10px;height: 6px;margin:0 0 3px 2px;"> </span> |
<span *ngIf="padMore" style="margin-left: 20px; color: #0080FF;" (click)='padInfo()'>更多筛选条件<img |
||||||
<span *ngIf="padput" style="margin-left: 10px; color: #0080FF;" (click)='padInfo()'>收起<img [src]='imgsrcdown'style="width: 10px;height: 6px;margin:0 0 3px 2px;"> </span> |
[src]='imgsrcopen' style="width: 10px;height: 6px;margin:0 0 3px 2px;"> </span> |
||||||
</div> |
<span *ngIf="padput" style="margin-left: 10px; color: #0080FF;" (click)='padInfo()'>收起<img [src]='imgsrcdown' |
||||||
|
style="width: 10px;height: 6px;margin:0 0 3px 2px;"> </span> |
||||||
<div class="queryField" *ngIf="!pcfind"> |
</div> |
||||||
<button mat-raised-button color="primary">查询</button> |
|
||||||
<button mat-raised-button style="margin-left: 25px;" type="button" (click)="reset()">重置</button> |
<div class="queryField" *ngIf="!pcfind"> |
||||||
</div> |
<button mat-raised-button color="primary">查询</button> |
||||||
<div class="queryField" *ngIf="!padMore"> |
<button mat-raised-button style="margin-left: 25px;" type="button" (click)="reset()">重置</button> |
||||||
<label style="margin-right: 10px;">添加人:</label> |
</div> |
||||||
<mat-form-field class="example-full-width"> |
<div class="queryField" *ngIf="!padMore"> |
||||||
<input matInput placeholder="请输入添加人" name="addname" autocomplete="off" [(ngModel)]="addname"> |
<label style="margin-right: 10px;">添加人:</label> |
||||||
</mat-form-field> |
<mat-form-field class="example-full-width"> |
||||||
|
<input matInput placeholder="请输入添加人" name="addname" autocomplete="off" [(ngModel)]="addname"> |
||||||
</div> |
</mat-form-field> |
||||||
|
|
||||||
<div class="queryField" *ngIf="!padMore"> |
</div> |
||||||
<label style="margin-right: 10px;">审核状态:</label> |
|
||||||
<mat-form-field> |
<div class="queryField" *ngIf="!padMore"> |
||||||
<mat-select name="toExamine" placeholder='请选择审核状态' [(ngModel)]="unitstate"> |
<label style="margin-right: 10px;">审核状态:</label> |
||||||
<mat-option value="8">未提交审核</mat-option> |
<mat-form-field> |
||||||
<mat-option value="1">审核中</mat-option> |
<mat-select name="toExamine" placeholder='请选择审核状态' [(ngModel)]="unitstate"> |
||||||
<mat-option value="2">审核通过</mat-option> |
<mat-option value="8">未提交审核</mat-option> |
||||||
<mat-option value="4">审核退回</mat-option> |
<mat-option value="1">审核中</mat-option> |
||||||
</mat-select> |
<mat-option value="2">审核通过</mat-option> |
||||||
</mat-form-field> |
<mat-option value="4">审核退回</mat-option> |
||||||
<span *ngIf="pcMore" style="margin-left: 15px; color: #0080FF; cursor: pointer;" (click)='pcInfo()'>更多筛选条件<img [src]='imgsrcopen'style="width: 10px;height: 6px;margin:0 0 3px 2px;"> </span> |
</mat-select> |
||||||
<span *ngIf="pcput" style="margin-left: 10px; color: #0080FF; cursor: pointer;" (click)='pcInfo()'>收起<img [src]='imgsrcdown'style="width: 10px;height: 6px;margin:0 0 3px 2px;"> </span> |
</mat-form-field> |
||||||
</div> |
<span *ngIf="pcMore" style="margin-left: 15px; color: #0080FF; cursor: pointer;" (click)='pcInfo()'>更多筛选条件<img |
||||||
<div class="queryField" *ngIf="pcfind" > |
[src]='imgsrcopen' style="width: 10px;height: 6px;margin:0 0 3px 2px;"> </span> |
||||||
<button mat-raised-button color="primary">查询</button> |
<span *ngIf="pcput" style="margin-left: 10px; color: #0080FF; cursor: pointer;" (click)='pcInfo()'>收起<img |
||||||
<button mat-raised-button style="margin-left: 25px;" type="button" (click)="reset()">重置</button> |
[src]='imgsrcdown' style="width: 10px;height: 6px;margin:0 0 3px 2px;"> </span> |
||||||
</div> |
</div> |
||||||
<div class="queryField" *ngIf="!padMore&&!pcMore"> |
<div class="queryField" *ngIf="pcfind"> |
||||||
<label style="margin-right: 10px;">添加时间:</label> |
<button mat-raised-button color="primary">查询</button> |
||||||
<mat-form-field class="example-full-width"> |
<button mat-raised-button style="margin-left: 25px;" type="button" (click)="reset()">重置</button> |
||||||
<input type="date" matInput name="addtime" autocomplete="off" [(ngModel)]="addtime"> |
</div> |
||||||
</mat-form-field> |
<div class="queryField" *ngIf="!padMore&&!pcMore"> |
||||||
<!-- <mat-icon aria-hidden="false" style="position: relative;right: 120px;top: 5px;">arrow forward</mat-icon> --> |
<label style="margin-right: 10px;">添加时间:</label> |
||||||
<mat-icon *ngIf="padjt" aria-hidden="false" style="position: relative;right: 120px;top: 5px;" id="padshow">arrow forward</mat-icon> |
<mat-form-field class="example-full-width"> |
||||||
<span style="margin-left: 15px;" id="pcshow" *ngIf="!padMore&&!padjt">🠊</span> |
<input type="date" matInput name="addtime" autocomplete="off" [(ngModel)]="addtime"> |
||||||
<mat-form-field class="example-full-width" style="margin-left: 10px;"> |
</mat-form-field> |
||||||
<input type="date" matInput autocomplete="off" name="endtime" [(ngModel)]="endtime"> |
<!-- <mat-icon aria-hidden="false" style="position: relative;right: 120px;top: 5px;">arrow forward</mat-icon> --> |
||||||
</mat-form-field> |
<mat-icon *ngIf="padjt" aria-hidden="false" style="position: relative;right: 120px;top: 5px;" |
||||||
</div> |
id="padshow">arrow forward</mat-icon> |
||||||
<div class="queryField" *ngIf="!padMore&&!pcMore"> |
<span style="margin-left: 15px;" id="pcshow" *ngIf="!padMore&&!padjt">🠊</span> |
||||||
<input type="radio" style="height: 16px;width: 16px;position: relative;top: 2px;" name="whgx" [value]='true' [(ngModel)]="IsNewData"> |
<mat-form-field class="example-full-width" style="margin-left: 10px;"> |
||||||
<label style="margin-right: 10px;margin-left: 2px;">新增</label> |
<input type="date" matInput autocomplete="off" name="endtime" [(ngModel)]="endtime"> |
||||||
<input type="radio" style="height: 16px;width: 16px;position: relative;top: 2px;" name="whgx" [value]='false' [(ngModel)]="IsNewData"> |
</mat-form-field> |
||||||
<label style="margin-right: 10px;margin-left: 2px;">维护更新</label> |
</div> |
||||||
</div> |
<div class="queryField" *ngIf="!padMore&&!pcMore"> |
||||||
|
<input type="radio" style="height: 16px;width: 16px;position: relative;top: 2px;" name="whgx" [value]='true' |
||||||
</div> |
[(ngModel)]="IsNewData"> |
||||||
</form> |
<label style="margin-right: 10px;margin-left: 2px;">新增</label> |
||||||
</div> |
<input type="radio" style="height: 16px;width: 16px;position: relative;top: 2px;" name="whgx" [value]='false' |
||||||
<!-- <mat-divider></mat-divider> --> |
[(ngModel)]="IsNewData"> |
||||||
<div class="newadd"> |
<label style="margin-right: 10px;margin-left: 2px;">维护更新</label> |
||||||
<div> |
</div> |
||||||
<button mat-raised-button color="primary" (click)='addunit()' *ngIf="levels=='0'"><img style="margin-bottom: 3px;" src="../../../assets/images/newadd.png"> 新增</button> |
|
||||||
</div> |
|
||||||
|
|
||||||
<div class="progressBox" style="margin-left: 100px;" *ngIf="downloadisLoading"> |
|
||||||
|
|
||||||
<!-- <button mat-raised-button style="margin-right: 5px;" (click)="cancelDowload()">取消下载</button> --> |
|
||||||
<span title="{{downloadFileName}}" style="font-size: 12px;" class="filename">{{downloadFileName}}</span> |
|
||||||
<span style="font-size: 12px;position: absolute;margin-left: 8px;">下载中...</span> |
|
||||||
<mat-progress-bar mode="determinate" [value]="downloadProgress" class="progress"></mat-progress-bar> |
|
||||||
</div> |
</div> |
||||||
|
</form> |
||||||
|
</div> |
||||||
|
<!-- <mat-divider></mat-divider> --> |
||||||
|
<div class="newadd"> |
||||||
|
<div> |
||||||
|
<button mat-raised-button color="primary" (click)='addunit()' *ngIf="levels=='0'"><img style="margin-bottom: 3px;" |
||||||
|
src="../../../assets/images/newadd.png"> 新增</button> |
||||||
</div> |
</div> |
||||||
|
|
||||||
<div class="body"> |
<div class="progressBox" style="margin-left: 100px;" *ngIf="downloadisLoading"> |
||||||
<div class="tablebox"> |
|
||||||
<table mat-table [dataSource]="tabledataSource" class="mat-elevation-z8"> |
<!-- <button mat-raised-button style="margin-right: 5px;" (click)="cancelDowload()">取消下载</button> --> |
||||||
<ng-container matColumnDef="state"> |
<span title="{{downloadFileName}}" style="font-size: 12px;" class="filename">{{downloadFileName}}</span> |
||||||
<th mat-header-cell *matHeaderCellDef style="width: 10%;">预案状态</th> |
<span style="font-size: 12px;position: absolute;margin-left: 8px;">下载中...</span> |
||||||
<td mat-cell *matCellDef="let element"> |
<mat-progress-bar mode="determinate" [value]="downloadProgress" class="progress"></mat-progress-bar> |
||||||
<span class="add" *ngIf="element.isNewData">新增</span> |
</div> |
||||||
<span class="weihu" *ngIf="!element.isNewData">维护更新</span> |
</div> |
||||||
</td> |
|
||||||
</ng-container> |
<div class="body"> |
||||||
<ng-container matColumnDef="unitname"> |
<div class="tablebox"> |
||||||
<th mat-header-cell *matHeaderCellDef style="width: 20%;">预案名称</th> |
<table mat-table [dataSource]="tabledataSource" class="mat-elevation-z8"> |
||||||
<td mat-cell *matCellDef="let element">{{element.name}}</td> |
<ng-container matColumnDef="state"> |
||||||
</ng-container> |
<th mat-header-cell *matHeaderCellDef style="width: 10%;">预案状态</th> |
||||||
|
<td mat-cell *matCellDef="let element"> |
||||||
<ng-container matColumnDef="addname"> |
<span class="add" *ngIf="element.isNewData">新增</span> |
||||||
<th mat-header-cell *matHeaderCellDef style="width: 10%;">添加人</th> |
<span class="weihu" *ngIf="!element.isNewData">维护更新</span> |
||||||
<td mat-cell *matCellDef="let element">{{element.creatorName}}</td> |
</td> |
||||||
</ng-container> |
</ng-container> |
||||||
|
<ng-container matColumnDef="unitname"> |
||||||
<ng-container matColumnDef="addtime"> |
<th mat-header-cell *matHeaderCellDef style="width: 20%;">预案名称</th> |
||||||
<th mat-header-cell *matHeaderCellDef style="width: 10%;">添加时间</th> |
<td mat-cell *matCellDef="let element">{{element.name}}</td> |
||||||
<td mat-cell *matCellDef="let element">{{element.creationTime|date:'yyyy-MM-dd'}}</td> |
</ng-container> |
||||||
</ng-container> |
|
||||||
<ng-container matColumnDef="plantype"> |
<ng-container matColumnDef="addname"> |
||||||
<th mat-header-cell *matHeaderCellDef style="width: 10%;">预案类型</th> |
<th mat-header-cell *matHeaderCellDef style="width: 10%;">添加人</th> |
||||||
<td mat-cell *matCellDef="let element">类型预案</td> |
<td mat-cell *matCellDef="let element">{{element.creatorName}}</td> |
||||||
</ng-container> |
</ng-container> |
||||||
<ng-container matColumnDef="passstate"> |
|
||||||
<th mat-header-cell *matHeaderCellDef style="width: 10%;">新增审核</th> |
<ng-container matColumnDef="addtime"> |
||||||
<td mat-cell *matCellDef="let element"> |
<th mat-header-cell *matHeaderCellDef style="width: 10%;">添加时间</th> |
||||||
{{element.newVerifyState}} |
<td mat-cell *matCellDef="let element">{{element.creationTime|date:'yyyy-MM-dd'}}</td> |
||||||
</td> |
</ng-container> |
||||||
</ng-container> |
<ng-container matColumnDef="plantype"> |
||||||
<ng-container matColumnDef="isopen"> |
<th mat-header-cell *matHeaderCellDef style="width: 10%;">预案类型</th> |
||||||
<th mat-header-cell *matHeaderCellDef style="width: 10%;">是否公开</th> |
<td mat-cell *matCellDef="let element">类型预案</td> |
||||||
<td mat-cell *matCellDef="let element">{{element.openRange}}</td> |
</ng-container> |
||||||
</ng-container> |
<ng-container matColumnDef="passstate"> |
||||||
<ng-container matColumnDef="projectlevel"> |
<th mat-header-cell *matHeaderCellDef style="width: 10%;">新增审核</th> |
||||||
<th mat-header-cell *matHeaderCellDef style="width: 10%;">编制级别</th> |
<td mat-cell *matCellDef="let element"> |
||||||
<td mat-cell *matCellDef="let element">{{element.planLevel=='1'?'总队':element.planLevel=='2'?'支队':element.planLevel=='4'?'大队':'中队'}}</td> |
{{element.newVerifyState}} |
||||||
</ng-container> |
</td> |
||||||
<ng-container matColumnDef="weihustate"> |
</ng-container> |
||||||
<th mat-header-cell *matHeaderCellDef style="width: 10%;">维护审核</th> |
<ng-container matColumnDef="isopen"> |
||||||
<td mat-cell *matCellDef="let element">{{element.maintenanceVerifyState}}</td> |
<th mat-header-cell *matHeaderCellDef style="width: 10%;">是否公开</th> |
||||||
</ng-container> |
<td mat-cell *matCellDef="let element">{{element.openRange}}</td> |
||||||
<ng-container matColumnDef="operation"> |
</ng-container> |
||||||
<th mat-header-cell *matHeaderCellDef style="width: 20%;">操作</th> |
<ng-container matColumnDef="projectlevel"> |
||||||
<td mat-cell *matCellDef="let element" style="white-space: nowrap;cursor: pointer;"> |
<th mat-header-cell *matHeaderCellDef style="width: 10%;">编制级别</th> |
||||||
<span style="color: blue;" (click)='openPlan(element)'>查看预案</span> |
<td mat-cell *matCellDef="let element"> |
||||||
<span style="color: blue;margin-left: 4px;" (click)="submitAudit(element)" *ngIf="(element.isNewData && element.newVerifyState=='未提交审核')||(!element.isNewData&&(element.maintenanceVerifyState=='审核通过'||element.maintenanceVerifyState=='未提交审核'))">提交审核</span> |
{{element.planLevel=='1'?'总队':element.planLevel=='2'?'支队':element.planLevel=='4'?'大队':'中队'}}</td> |
||||||
<span style="color: blue;margin-left: 4px;" (click)="cancelAudit(element)" *ngIf="element.auditStatus == 1||element.auditStatus == 16">撤销审核</span> |
</ng-container> |
||||||
<span style="color: blue;margin-left: 4px;" (click)="auditResult(element)">审批结果</span> |
|
||||||
<span style="color: blue;margin-left: 4px;" (click)='readFile(element)'>下载</span> |
<ng-container matColumnDef="auditstate"> |
||||||
<span style="color: red;margin-left: 4px" (click)='deletePlan(element.id)' *ngIf="element.auditStatus == 8"> 删除</span> |
<th mat-header-cell *matHeaderCellDef style="width: 10%;">审核状态</th> |
||||||
</td> |
<td mat-cell *matCellDef="let element"> |
||||||
</ng-container> |
{{element.auditStatus | auditState}} |
||||||
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr> |
</td> |
||||||
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr> |
</ng-container> |
||||||
</table> |
<ng-container matColumnDef="operation"> |
||||||
<mat-paginator pageEvent [length]="length" |
<th mat-header-cell *matHeaderCellDef style="width: 20%;">操作</th> |
||||||
[pageSize]="pageSize" |
<td mat-cell *matCellDef="let element" style="white-space: nowrap;cursor: pointer;"> |
||||||
[pageSizeOptions]="pageSizeOptions" |
<span style="color: blue;" (click)='openPlan(element)'>查看预案</span> |
||||||
(page)="changePage($event)"> |
<span style="color: blue;margin-left: 4px;" (click)="submitAudit(element)" |
||||||
|
*ngIf="(element.isNewData && element.newVerifyState=='未提交审核')||(!element.isNewData&&(element.maintenanceVerifyState=='审核通过'||element.maintenanceVerifyState=='未提交审核'))">提交审核</span> |
||||||
</mat-paginator> |
<span style="color: blue;margin-left: 4px;" (click)="cancelAudit(element)" |
||||||
|
*ngIf="element.auditStatus == 1||element.auditStatus == 16">撤销审核</span> |
||||||
</div> |
<span style="color: blue;margin-left: 4px;" (click)="auditResult(element)">审批结果</span> |
||||||
|
<span style="color: blue;margin-left: 4px;" (click)='readFile(element)'>下载</span> |
||||||
|
<span style="color: red;margin-left: 4px" (click)='deletePlan(element.id)'> |
||||||
|
删除</span> |
||||||
|
</td> |
||||||
|
</ng-container> |
||||||
|
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr> |
||||||
|
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr> |
||||||
|
</table> |
||||||
|
<mat-paginator pageEvent [length]="length" [pageSize]="pageSize" [pageSizeOptions]="pageSizeOptions" |
||||||
|
(page)="changePage($event)"> |
||||||
|
|
||||||
|
</mat-paginator> |
||||||
|
|
||||||
</div> |
</div> |
||||||
|
</div> |
||||||
</div> |
</div> |
||||||
<p>type-plan works!</p> |
<p>type-plan works!</p> |
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,187 +1,230 @@ |
|||||||
import { Component, OnInit } from '@angular/core'; |
import { Component, OnInit } from "@angular/core"; |
||||||
import { Router } from '@angular/router'; |
import { Router } from "@angular/router"; |
||||||
import { HttpClient } from '@angular/common/http' |
import { HttpClient } from "@angular/common/http"; |
||||||
import {EchartsDataService,} from '../../echarts-data.service' |
import { EchartsDataService } from "../../echarts-data.service"; |
||||||
import { map } from 'rxjs/operators'; |
import { map } from "rxjs/operators"; |
||||||
declare var echarts: any; |
declare var echarts: any; |
||||||
@Component({ |
@Component({ |
||||||
selector: 'app-building-type-one', |
selector: "app-building-type-one", |
||||||
templateUrl: './building-type-one.component.html', |
templateUrl: "./building-type-one.component.html", |
||||||
styleUrls: ['./building-type-one.component.scss'] |
styleUrls: ["./building-type-one.component.scss"], |
||||||
}) |
}) |
||||||
export class BuildingTypeOneComponent implements OnInit { |
export class BuildingTypeOneComponent implements OnInit { |
||||||
|
constructor( |
||||||
constructor(private http:HttpClient,private router: Router,public echartsData:EchartsDataService) { } |
private http: HttpClient, |
||||||
|
private router: Router, |
||||||
|
public echartsData: EchartsDataService |
||||||
|
) {} |
||||||
|
|
||||||
ngOnInit(): void { |
ngOnInit(): void { |
||||||
if(window.matchMedia("(max-width: 1400px)").matches){ |
if (window.matchMedia("(max-width: 1400px)").matches) { |
||||||
this.padHw=true |
this.padHw = true; |
||||||
//this.padjt=
|
//this.padjt=
|
||||||
}else{ |
} else { |
||||||
this.padHw=false |
this.padHw = false; |
||||||
} |
} |
||||||
|
|
||||||
window.setTimeout(()=>{ |
window.setTimeout(() => { |
||||||
this.getechartsdata() |
this.getechartsdata(); |
||||||
}) |
}); |
||||||
} |
} |
||||||
ngOnDestroy(): void { |
ngOnDestroy(): void { |
||||||
this.indexBzt.clear() |
if (!this.indexBzt) { |
||||||
this.indexBzt.dispose() |
return; |
||||||
|
} |
||||||
|
this.indexBzt.clear(); |
||||||
|
this.indexBzt.dispose(); |
||||||
} |
} |
||||||
async getechartsdata(){ |
async getechartsdata() { |
||||||
await this.echartsData.getData(null,`/api/StatisticsAnalysis/BuildingTypes`) |
await this.echartsData.getData( |
||||||
this.initCharts() |
null, |
||||||
|
`/api/StatisticsAnalysis/BuildingTypes` |
||||||
|
); |
||||||
|
this.initCharts(); |
||||||
} |
} |
||||||
/* 首页饼状图 */ |
/* 首页饼状图 */ |
||||||
indexBzt |
indexBzt; |
||||||
padHw |
padHw; |
||||||
lengthdata=[]//提示数据
|
lengthdata = []; //提示数据
|
||||||
count=0//总数
|
count = 0; //总数
|
||||||
indexData=[]//所有数据
|
indexData = []; //所有数据
|
||||||
tabledata |
tabledata; |
||||||
initCharts(){ |
initCharts() { |
||||||
if(sessionStorage.getItem('refresh') === 'true') { |
if (sessionStorage.getItem("refresh") === "true") { |
||||||
sessionStorage.removeItem('refresh'); |
sessionStorage.removeItem("refresh"); |
||||||
location.reload(); |
location.reload(); |
||||||
} |
} |
||||||
this.tabledata=JSON.parse(JSON.stringify(this.echartsData.allDate)) |
this.tabledata = JSON.parse(JSON.stringify(this.echartsData.allDate)); |
||||||
// console.log(this.tabledata)
|
// console.log(this.tabledata)
|
||||||
//console.log(this.echartsData.orid)
|
//console.log(this.echartsData.orid)
|
||||||
for(var i=0;i<this.tabledata[0].buildingTypes.length;i++){ |
for (var i = 0; i < this.tabledata[0].buildingTypes.length; i++) { |
||||||
this.lengthdata.push(this.tabledata[0].buildingTypes[i].buildingTypeName) |
this.lengthdata.push(this.tabledata[0].buildingTypes[i].buildingTypeName); |
||||||
this.count=this.count+this.tabledata[0].buildingTypes[i].count |
this.count = this.count + this.tabledata[0].buildingTypes[i].count; |
||||||
this.indexData.push(this.tabledata[0].buildingTypes[i]) |
this.indexData.push(this.tabledata[0].buildingTypes[i]); |
||||||
} |
} |
||||||
//JSON.parse(JSON.stringify(this.indexData).replace(/buildingTypeName/g, 'name'))
|
//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}}) |
this.indexData = this.indexData.map((v) => { |
||||||
//console.log(this.indexData)
|
return { name: v.buildingTypeName, value: v.count, id: v.buildingTypeId }; |
||||||
this.indexBzt = echarts.init(document.getElementById('indexBzt'),'walden'); |
}); |
||||||
let options={ |
//console.log(this.indexData)
|
||||||
|
this.indexBzt = echarts.init(document.getElementById("indexBzt"), "walden"); |
||||||
|
let options = { |
||||||
title: { |
title: { |
||||||
text: `建筑类型统计(${this.count}家)`, |
text: `建筑类型统计(${this.count}家)`, |
||||||
left: 'center', |
left: "center", |
||||||
top: "7%", |
top: "7%", |
||||||
textStyle: { |
textStyle: { |
||||||
fontSize:31 |
fontSize: 31, |
||||||
} |
}, |
||||||
}, |
}, |
||||||
tooltip: { |
tooltip: { |
||||||
trigger: 'item', |
trigger: "item", |
||||||
position: this.echartsData.tableTooltipNoShow2, |
position: this.echartsData.tableTooltipNoShow2, |
||||||
formatter: (params)=>{ |
formatter: (params) => { |
||||||
this.echartsData.biaogeTishiZhi(params.data) |
this.echartsData.biaogeTishiZhi(params.data); |
||||||
return this.echartsData.res |
return this.echartsData.res; |
||||||
} |
}, |
||||||
}, |
}, |
||||||
legend: { |
legend: { |
||||||
orient: 'vertical', |
orient: "vertical", |
||||||
//left:this.padHw?50:0,
|
//left:this.padHw?50:0,
|
||||||
right:this.padHw?20:250, |
right: this.padHw ? 20 : 250, |
||||||
top:60, |
top: 60, |
||||||
textStyle:{ |
textStyle: { |
||||||
fontSize:18, |
fontSize: 18, |
||||||
color:"#000000" |
color: "#000000", |
||||||
},
|
}, |
||||||
data: this.lengthdata |
data: this.lengthdata, |
||||||
}, |
}, |
||||||
series: [ |
series: [ |
||||||
{ |
{ |
||||||
top:this.padHw?'15%':'0', |
top: this.padHw ? "15%" : "0", |
||||||
name: '访问来源', |
name: "访问来源", |
||||||
type: 'pie', |
type: "pie", |
||||||
radius: '60%', |
radius: "60%", |
||||||
center: ['50%', '53%'], |
center: ["50%", "53%"], |
||||||
label:{ |
label: { |
||||||
show:true, |
show: true, |
||||||
fontSize:18, |
fontSize: 18, |
||||||
formatter:'{b}{c}家\n{d|({d}%)}', |
formatter: "{b}{c}家\n{d|({d}%)}", |
||||||
rich: { |
rich: { |
||||||
d: { |
d: { |
||||||
align: 'center', |
align: "center", |
||||||
fontSize:18 |
fontSize: 18, |
||||||
} |
}, |
||||||
}, |
}, |
||||||
}, |
}, |
||||||
data:this.indexData, |
data: this.indexData, |
||||||
emphasis: { |
emphasis: { |
||||||
itemStyle: { |
itemStyle: { |
||||||
shadowBlur: 10, |
shadowBlur: 10, |
||||||
shadowOffsetX: 0, |
shadowOffsetX: 0, |
||||||
shadowColor: 'rgba(0, 0, 0, 0.5)' |
shadowColor: "rgba(0, 0, 0, 0.5)", |
||||||
} |
}, |
||||||
} |
}, |
||||||
} |
}, |
||||||
] |
], |
||||||
}; |
}; |
||||||
this.indexBzt.on('click', (params) => { |
this.indexBzt.on("click", (params) => { |
||||||
var index=0 |
var index = 0; |
||||||
for(var i=0;i<this.tabledata[0].buildingTypes.length;i++){ |
for (var i = 0; i < this.tabledata[0].buildingTypes.length; i++) { |
||||||
if(this.tabledata[0].buildingTypes[i].buildingTypeName==params.name){ |
if ( |
||||||
if((this.echartsData.level=='0'||this.echartsData.level=='1'||this.echartsData.level=='2')&&this.tabledata[0].buildingTypes[i].organizations.length>0){ |
this.tabledata[0].buildingTypes[i].buildingTypeName == params.name |
||||||
|
) { |
||||||
|
if ( |
||||||
|
(this.echartsData.level == "0" || |
||||||
|
this.echartsData.level == "1" || |
||||||
|
this.echartsData.level == "2") && |
||||||
|
this.tabledata[0].buildingTypes[i].organizations.length > 0 |
||||||
|
) { |
||||||
//总队,支队,大队跳转
|
//总队,支队,大队跳转
|
||||||
this.tabledata[0].buildingTypes[i].organizations.forEach((value,index,array) => { |
this.tabledata[0].buildingTypes[i].organizations.forEach( |
||||||
if(array[index].organizationId==this.echartsData.orid){ |
(value, index, array) => { |
||||||
array.splice(index,1) |
if (array[index].organizationId == this.echartsData.orid) { |
||||||
|
array.splice(index, 1); |
||||||
|
} |
||||||
|
if (array.length > 0) { |
||||||
|
this.router.navigate( |
||||||
|
[ |
||||||
|
"/statisticanalysis/buildingType_one/buildingType_two_reverse", |
||||||
|
], |
||||||
|
{ queryParams: { level: params.name, id: params.data.id } } |
||||||
|
); |
||||||
|
} else { |
||||||
|
this.router.navigate(["/statisticanalysis/CompangInfo"], { |
||||||
|
queryParams: { |
||||||
|
name: params.name, |
||||||
|
type: 1, |
||||||
|
buildid: params.data.id, |
||||||
|
}, |
||||||
|
}); |
||||||
|
} |
||||||
} |
} |
||||||
if(array.length>0){ |
); |
||||||
this.router.navigate(['/statisticanalysis/buildingType_one/buildingType_two_reverse'],{queryParams:{'level':params.name,'id':params.data.id}}); |
} else { |
||||||
}else{ |
|
||||||
this.router.navigate(['/statisticanalysis/CompangInfo'],{queryParams:{'name':params.name,'type':1,'buildid':params.data.id}}); |
|
||||||
} |
|
||||||
}); |
|
||||||
|
|
||||||
}else { |
|
||||||
//中队跳转
|
//中队跳转
|
||||||
this.router.navigate(['/statisticanalysis/CompangInfo'],{queryParams:{'name':params.name,'type':1,'buildid':params.data.id}}); |
this.router.navigate(["/statisticanalysis/CompangInfo"], { |
||||||
|
queryParams: { |
||||||
|
name: params.name, |
||||||
|
type: 1, |
||||||
|
buildid: params.data.id, |
||||||
|
}, |
||||||
|
}); |
||||||
} |
} |
||||||
} |
} |
||||||
} |
} |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}); |
}); |
||||||
this.indexBzt.setOption(options); |
this.indexBzt.setOption(options); |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} |
} |
||||||
tishiData |
tishiData; |
||||||
res:string |
res: string; |
||||||
biaogeTishiZhi(datas){ |
biaogeTishiZhi(datas) { |
||||||
for(var a in this.tabledata.buildingTypes){ |
for (var a in this.tabledata.buildingTypes) { |
||||||
if(this.tabledata.buildingTypes[a].buildingTypeId==datas.id){ |
if (this.tabledata.buildingTypes[a].buildingTypeId == datas.id) { |
||||||
this.tishiData=this.tabledata.buildingTypes[a].organizations |
this.tishiData = this.tabledata.buildingTypes[a].organizations; |
||||||
} |
} |
||||||
} |
} |
||||||
var countall=0//总计
|
var countall = 0; //总计
|
||||||
var countbi=0//站比
|
var countbi = 0; //站比
|
||||||
var allCountbi=0//总站比
|
var allCountbi = 0; //总站比
|
||||||
for(var i=0;i<this.tishiData.length;i++){ |
for (var i = 0; i < this.tishiData.length; i++) { |
||||||
countall+=this.tishiData[i].count |
countall += this.tishiData[i].count; |
||||||
} |
} |
||||||
this.res= '<div class="tishi" style=" backgroundColor:rgba(255,255,255,1);width:100%;height:100%;"><div style="padding:10px 0 5px 0"><span style="color:#FFFFFF;font-size:27px;text-align: center;display:block;">'+datas.name+'</span></div>' |
this.res = |
||||||
this.res+='</br><div style="width:300px;height:100%;padding:0 20px 15px 20px"><table style="width:300px;font-size:16px; color:#FFFFFF;border-collapse:collapse;"cellspacing="0"; >'; |
'<div class="tishi" style=" backgroundColor:rgba(255,255,255,1);width:100%;height:100%;"><div style="padding:10px 0 5px 0"><span style="color:#FFFFFF;font-size:27px;text-align: center;display:block;">' + |
||||||
this.res+='<thead style="font-size:18px;"><tr>'; |
datas.name + |
||||||
this.res+='<td style="text-align:center;width:30%;">名称</td>'; |
"</span></div>"; |
||||||
this.res+='<td style="text-align:center;width:30%;">数量</td>' |
this.res += |
||||||
this.res+='<td style="text-align:center;width:30%;">总占比</td>' |
'</br><div style="width:300px;height:100%;padding:0 20px 15px 20px"><table style="width:300px;font-size:16px; color:#FFFFFF;border-collapse:collapse;"cellspacing="0"; >'; |
||||||
this.res+='</tr></thead>' |
this.res += '<thead style="font-size:18px;"><tr>'; |
||||||
this.res+='<tbody>'; |
this.res += '<td style="text-align:center;width:30%;">名称</td>'; |
||||||
//var res='<div class="tishi" style=" width:100%;height:100%;"><div style="padding:10px 0 5px 0"><span >'+biaotou+'</span></div>'
|
this.res += '<td style="text-align:center;width:30%;">数量</td>'; |
||||||
for(var i=0;i<this.tishiData.length;i++){ |
this.res += '<td style="text-align:center;width:30%;">总占比</td>'; |
||||||
countbi=Math.round(this.tishiData[i].count/countall* 10000)/ 100.00 |
this.res += "</tr></thead>"; |
||||||
allCountbi=allCountbi+countbi |
this.res += "<tbody>"; |
||||||
this.res+='<tr>' |
//var res='<div class="tishi" style=" width:100%;height:100%;"><div style="padding:10px 0 5px 0"><span >'+biaotou+'</span></div>'
|
||||||
this.res+='<td style="text-align:center;">'+this.tishiData[i].organizationName+'</td>' |
for (var i = 0; i < this.tishiData.length; i++) { |
||||||
this.res+='<td style="text-align:center;">'+this.tishiData[i].count+'</td>' |
countbi = |
||||||
this.res+='<td style="text-align:center;">'+countbi+'%</td></tr>' |
Math.round((this.tishiData[i].count / countall) * 10000) / 100.0; |
||||||
} |
allCountbi = allCountbi + countbi; |
||||||
|
this.res += "<tr>"; |
||||||
this.res+='</tbody>' |
this.res += |
||||||
this.res+='<tfoot style="font-size:18px;"><td style="text-align:center;">总计</td><td style="text-align:center;">'+countall+'</td><td style="text-align:center;">'+allCountbi.toFixed(2)+'%</td></tfoot>' |
'<td style="text-align:center;">' + |
||||||
this.res+='</table></div></div>' |
this.tishiData[i].organizationName + |
||||||
return this.res |
"</td>"; |
||||||
|
this.res += |
||||||
} |
'<td style="text-align:center;">' + this.tishiData[i].count + "</td>"; |
||||||
|
this.res += '<td style="text-align:center;">' + countbi + "%</td></tr>"; |
||||||
|
} |
||||||
|
|
||||||
|
this.res += "</tbody>"; |
||||||
|
this.res += |
||||||
|
'<tfoot style="font-size:18px;"><td style="text-align:center;">总计</td><td style="text-align:center;">' + |
||||||
|
countall + |
||||||
|
'</td><td style="text-align:center;">' + |
||||||
|
allCountbi.toFixed(2) + |
||||||
|
"%</td></tfoot>"; |
||||||
|
this.res += "</table></div></div>"; |
||||||
|
return this.res; |
||||||
|
} |
||||||
} |
} |
||||||
|
@ -1,239 +1,316 @@ |
|||||||
import { Component, OnInit } from '@angular/core'; |
import { Component, OnInit } from "@angular/core"; |
||||||
import { Router } from '@angular/router'; |
import { Router } from "@angular/router"; |
||||||
import { ActivatedRoute } from '@angular/router'; |
import { ActivatedRoute } from "@angular/router"; |
||||||
import { Local } from 'protractor/built/driverProviders'; |
import { Local } from "protractor/built/driverProviders"; |
||||||
import {EchartsDataService} from '../../echarts-data.service'; |
import { EchartsDataService } from "../../echarts-data.service"; |
||||||
declare var echarts: any; |
declare var echarts: any; |
||||||
@Component({ |
@Component({ |
||||||
selector: 'app-building-type-three-details', |
selector: "app-building-type-three-details", |
||||||
templateUrl: './building-type-three-details.component.html', |
templateUrl: "./building-type-three-details.component.html", |
||||||
styleUrls: ['./building-type-three-details.component.scss'] |
styleUrls: ["./building-type-three-details.component.scss"], |
||||||
}) |
}) |
||||||
export class BuildingTypeThreeDetailsComponent implements OnInit { |
export class BuildingTypeThreeDetailsComponent implements OnInit { |
||||||
|
constructor( |
||||||
constructor(public route: ActivatedRoute,private router: Router,public echartsData:EchartsDataService) { } |
public route: ActivatedRoute, |
||||||
forward(){ |
private router: Router, |
||||||
this.router.navigate(['/statisticanalysis/buildingType_one/buildingType_two_forward']) |
public echartsData: EchartsDataService |
||||||
|
) {} |
||||||
|
forward() { |
||||||
|
this.router.navigate([ |
||||||
|
"/statisticanalysis/buildingType_one/buildingType_two_forward", |
||||||
|
]); |
||||||
} |
} |
||||||
reverse(){ |
reverse() { |
||||||
this.router.navigate(['/statisticanalysis/buildingType_one/buildingType_two_reverse']) |
this.router.navigate([ |
||||||
|
"/statisticanalysis/buildingType_one/buildingType_two_reverse", |
||||||
|
]); |
||||||
} |
} |
||||||
//返回
|
//返回
|
||||||
goBack () { |
goBack() { |
||||||
sessionStorage.setItem('refresh', 'true'); |
sessionStorage.setItem("refresh", "true"); |
||||||
history.go(-1); |
history.go(-1); |
||||||
this.echartsData.statefulInspectionToggle = true |
this.echartsData.statefulInspectionToggle = true; |
||||||
} |
} |
||||||
|
|
||||||
organizationName:String |
organizationName: String; |
||||||
listorganizationId//上个页面传过来的组织id
|
listorganizationId; //上个页面传过来的组织id
|
||||||
buildingTypeName:String |
buildingTypeName: String; |
||||||
buildingTypeId |
buildingTypeId; |
||||||
organizationId=[]//本层id
|
organizationId = []; //本层id
|
||||||
padHw |
padHw; |
||||||
|
|
||||||
ngOnInit(): void { |
ngOnInit(): void { |
||||||
if(window.matchMedia("(max-width: 1300px)").matches){ |
if (window.matchMedia("(max-width: 1300px)").matches) { |
||||||
this.padHw=true |
this.padHw = true; |
||||||
//this.padjt=
|
//this.padjt=
|
||||||
}else{ |
} else { |
||||||
this.padHw=false |
this.padHw = false; |
||||||
} |
} |
||||||
if(sessionStorage.getItem('refresh') === 'true') { |
if (sessionStorage.getItem("refresh") === "true") { |
||||||
sessionStorage.removeItem('refresh'); |
sessionStorage.removeItem("refresh"); |
||||||
location.reload(); |
location.reload(); |
||||||
} |
} |
||||||
this.route.queryParams.subscribe(params => { |
this.route.queryParams.subscribe((params) => { |
||||||
this.organizationName = params['organizationName']; |
this.organizationName = params["organizationName"]; |
||||||
this.buildingTypeName = params['buildingTypeName']; |
this.buildingTypeName = params["buildingTypeName"]; |
||||||
this.listorganizationId=params['organizationId']; |
this.listorganizationId = params["organizationId"]; |
||||||
this.buildingTypeId=params['buildId']; |
this.buildingTypeId = params["buildId"]; |
||||||
|
}); |
||||||
|
|
||||||
|
window.setTimeout(() => { |
||||||
|
this.getechartsdata(); |
||||||
}); |
}); |
||||||
|
|
||||||
|
|
||||||
window.setTimeout(()=>{ |
|
||||||
this.getechartsdata() |
|
||||||
}) |
|
||||||
} |
} |
||||||
|
|
||||||
ngOnDestroy(): void { |
ngOnDestroy(): void { |
||||||
this.detailPlanEchart.clear() |
if (!this.detailPlanEchart) { |
||||||
this.detailPlanEchart.dispose() |
return; |
||||||
|
} |
||||||
|
this.detailPlanEchart.clear(); |
||||||
|
this.detailPlanEchart.dispose(); |
||||||
} |
} |
||||||
async getechartsdata(){ |
async getechartsdata() { |
||||||
let paramsdata={ |
let paramsdata = { |
||||||
//id:this.buildingTypeId,
|
//id:this.buildingTypeId,
|
||||||
organizationId:this.listorganizationId |
organizationId: this.listorganizationId, |
||||||
|
}; |
||||||
|
await this.echartsData.getData( |
||||||
|
paramsdata, |
||||||
|
`/api/StatisticsAnalysis/Companies/BuildingTypes/${this.buildingTypeId}` |
||||||
|
); |
||||||
|
this.tabledata = JSON.parse(JSON.stringify(this.echartsData.allDate)); |
||||||
|
//console.log(this.tabledata)
|
||||||
|
for (var i = 0; i < this.tabledata[0].organizations.length; i++) { |
||||||
|
this.zhongNameData.push( |
||||||
|
this.tabledata[0].organizations[i].organizationName |
||||||
|
); |
||||||
|
this.zhongNumData.push(this.tabledata[0].organizations[i].count); |
||||||
|
this.organizationId.push( |
||||||
|
this.tabledata[0].organizations[i].organizationId |
||||||
|
); |
||||||
} |
} |
||||||
await this.echartsData.getData(paramsdata,`/api/StatisticsAnalysis/Companies/BuildingTypes/${this.buildingTypeId}`) |
this.tiaoshiPao = this.echartsData.qipao( |
||||||
this.tabledata=JSON.parse(JSON.stringify(this.echartsData.allDate)) |
this.tiaoshiPao, |
||||||
//console.log(this.tabledata)
|
this.zhongNumData, |
||||||
for(var i=0;i<this.tabledata[0].organizations.length;i++){ |
this.zhongNameData |
||||||
this.zhongNameData.push(this.tabledata[0].organizations[i].organizationName) |
); |
||||||
this.zhongNumData.push(this.tabledata[0].organizations[i].count) |
this.detailEcharts(); |
||||||
this.organizationId.push(this.tabledata[0].organizations[i].organizationId) |
|
||||||
} |
|
||||||
this.tiaoshiPao=this.echartsData.qipao(this.tiaoshiPao,this.zhongNumData,this.zhongNameData) |
|
||||||
this.detailEcharts() |
|
||||||
} |
} |
||||||
topTextlabel = { |
topTextlabel = { |
||||||
show: true, // 开启显示
|
show: true, // 开启显示
|
||||||
position: 'top', // 在上方显示
|
position: "top", // 在上方显示
|
||||||
distance: 10, // 距离图形元素的距离。当 position 为字符描述值(如 'top'、'insideRight')时候有效。
|
distance: 10, // 距离图形元素的距离。当 position 为字符描述值(如 'top'、'insideRight')时候有效。
|
||||||
verticalAlign: 'middle', |
verticalAlign: "middle", |
||||||
textStyle: { // 数值样式
|
textStyle: { |
||||||
color: 'black', |
// 数值样式
|
||||||
fontSize: 12 |
color: "black", |
||||||
} |
fontSize: 12, |
||||||
}//柱状图数值顶部显示
|
}, |
||||||
zhongNameData = [] |
}; //柱状图数值顶部显示
|
||||||
zhongNumData = [] |
zhongNameData = []; |
||||||
tiaoshiPao:any |
zhongNumData = []; |
||||||
detailPlanEchart |
tiaoshiPao: any; |
||||||
tabledata |
detailPlanEchart; |
||||||
detailEcharts(){ |
tabledata; |
||||||
this.detailPlanEchart = echarts.init(document.getElementById('barEchart'),'walden');
|
detailEcharts() { |
||||||
|
this.detailPlanEchart = echarts.init( |
||||||
|
document.getElementById("barEchart"), |
||||||
|
"walden" |
||||||
|
); |
||||||
var option = { |
var option = { |
||||||
title: { |
title: { |
||||||
top:this.padHw?10:0, |
top: this.padHw ? 10 : 0, |
||||||
text: this.buildingTypeName + '(' +this.organizationName + ')'+`:总数(${this.tabledata[0].totalCount})`, |
text: |
||||||
|
this.buildingTypeName + |
||||||
|
"(" + |
||||||
|
this.organizationName + |
||||||
|
")" + |
||||||
|
`:总数(${this.tabledata[0].totalCount})`, |
||||||
left: "center", |
left: "center", |
||||||
textStyle: { |
textStyle: { |
||||||
fontSize: 30 |
fontSize: 30, |
||||||
} |
}, |
||||||
}, |
}, |
||||||
grid: { |
grid: { |
||||||
top:this.padHw?120:110, |
top: this.padHw ? 120 : 110, |
||||||
//bottom: 10
|
//bottom: 10
|
||||||
}, |
}, |
||||||
xAxis: { |
xAxis: { |
||||||
id:this.organizationId, |
id: this.organizationId, |
||||||
type: 'category', |
type: "category", |
||||||
data: this.zhongNameData, |
data: this.zhongNameData, |
||||||
// axisLabel: this.axisLabel
|
// axisLabel: this.axisLabel
|
||||||
axisLabel:{ |
axisLabel: { |
||||||
//this.axisLabel,
|
//this.axisLabel,
|
||||||
textStyle:{ |
textStyle: { |
||||||
fontSize :18, |
fontSize: 18, |
||||||
color:'#000000' |
color: "#000000", |
||||||
} |
}, |
||||||
|
}, |
||||||
} |
|
||||||
}, |
}, |
||||||
yAxis: { |
yAxis: { |
||||||
type: 'value', |
type: "value", |
||||||
axisLabel:{ |
axisLabel: { |
||||||
//this.axisLabel,
|
//this.axisLabel,
|
||||||
textStyle:{ |
textStyle: { |
||||||
fontSize :18, |
fontSize: 18, |
||||||
color:'#000000' |
color: "#000000", |
||||||
} |
}, |
||||||
|
}, |
||||||
} |
|
||||||
}, |
}, |
||||||
tooltip: { |
tooltip: { |
||||||
trigger: 'item', |
trigger: "item", |
||||||
formatter: (params)=>{ |
formatter: (params) => { |
||||||
return this.tableTooltip(params) |
return this.tableTooltip(params); |
||||||
} |
}, |
||||||
}, |
}, |
||||||
series: [{ |
series: [ |
||||||
id:this.organizationId, |
{ |
||||||
|
id: this.organizationId, |
||||||
data: this.zhongNumData, |
data: this.zhongNumData, |
||||||
type: 'bar', |
type: "bar", |
||||||
barWidth :'38', |
barWidth: "38", |
||||||
markPoint: { |
markPoint: { |
||||||
symbolSize:[65, 65], |
symbolSize: [65, 65], |
||||||
data: this.tiaoshiPao |
data: this.tiaoshiPao, |
||||||
}, |
}, |
||||||
backgroundStyle: { |
backgroundStyle: { |
||||||
color: 'rgba(220, 220, 220, 0.8)' |
color: "rgba(220, 220, 220, 0.8)", |
||||||
}, |
}, |
||||||
//label: this.topTextlabel
|
//label: this.topTextlabel
|
||||||
}] |
}, |
||||||
|
], |
||||||
}; |
}; |
||||||
this.detailPlanEchart.setOption(option); |
this.detailPlanEchart.setOption(option); |
||||||
this.detailPlanEchart.getZr().on('click', (params) => { |
this.detailPlanEchart.getZr().on("click", (params) => { |
||||||
const pointInPixel= [params.offsetX, params.offsetY]; |
const pointInPixel = [params.offsetX, params.offsetY]; |
||||||
if (this.detailPlanEchart.containPixel('grid',pointInPixel)) { |
if (this.detailPlanEchart.containPixel("grid", pointInPixel)) { |
||||||
let xIndex=this.detailPlanEchart.convertFromPixel({seriesIndex:0},[params.offsetX, params.offsetY])[0]; |
let xIndex = this.detailPlanEchart.convertFromPixel( |
||||||
|
{ seriesIndex: 0 }, |
||||||
|
[params.offsetX, params.offsetY] |
||||||
|
)[0]; |
||||||
/*事件处理代码书写位置*/ |
/*事件处理代码书写位置*/ |
||||||
if(this.echartsData.level=="0"&&this.tiao==false&&this.tabledata[0].organizations[xIndex].subOrganizations.length>=1){ |
if ( |
||||||
|
this.echartsData.level == "0" && |
||||||
|
this.tiao == false && |
||||||
|
this.tabledata[0].organizations[xIndex].subOrganizations.length >= 1 |
||||||
|
) { |
||||||
//总队不跳转
|
//总队不跳转
|
||||||
this.zhongNameData=[] |
this.zhongNameData = []; |
||||||
this.zhongNumData=[] |
this.zhongNumData = []; |
||||||
this.organizationId=[] |
this.organizationId = []; |
||||||
this.tiaoshiPao='' |
this.tiaoshiPao = ""; |
||||||
let paramsdatee={ |
let paramsdatee = { |
||||||
id:this.buildingTypeId, |
id: this.buildingTypeId, |
||||||
organizationId:option.xAxis.id[xIndex] |
organizationId: option.xAxis.id[xIndex], |
||||||
} |
}; |
||||||
this.echartsData.getData(paramsdatee,`/api/StatisticsAnalysis/Companies/BuildingTypes/${this.buildingTypeId}`) |
this.echartsData.getData( |
||||||
window.setTimeout(()=>{ |
paramsdatee, |
||||||
this.tabledata=JSON.parse(JSON.stringify(this.echartsData.allDate)) |
`/api/StatisticsAnalysis/Companies/BuildingTypes/${this.buildingTypeId}` |
||||||
|
); |
||||||
|
window.setTimeout(() => { |
||||||
|
this.tabledata = JSON.parse( |
||||||
|
JSON.stringify(this.echartsData.allDate) |
||||||
|
); |
||||||
//console.log(this.tabledata)
|
//console.log(this.tabledata)
|
||||||
for(var i=0;i<this.tabledata[0].organizations.length;i++){ |
for (var i = 0; i < this.tabledata[0].organizations.length; i++) { |
||||||
this.zhongNameData.push(this.tabledata[0].organizations[i].organizationName) |
this.zhongNameData.push( |
||||||
this.zhongNumData.push(this.tabledata[0].organizations[i].count) |
this.tabledata[0].organizations[i].organizationName |
||||||
this.organizationId.push(this.tabledata[0].organizations[i].organizationId) |
); |
||||||
|
this.zhongNumData.push(this.tabledata[0].organizations[i].count); |
||||||
|
this.organizationId.push( |
||||||
|
this.tabledata[0].organizations[i].organizationId |
||||||
|
); |
||||||
} |
} |
||||||
option.title.text = this.buildingTypeName + '(' +option.xAxis.data[xIndex]+ ')'+`:总数(${this.tabledata[0].totalCount})` |
option.title.text = |
||||||
option.xAxis.data = this.zhongNameData |
this.buildingTypeName + |
||||||
option.series[0].data = this.zhongNumData |
"(" + |
||||||
this.tiaoshiPao=this.echartsData.qipao(this.tiaoshiPao,this.zhongNumData,this.zhongNameData) |
option.xAxis.data[xIndex] + |
||||||
option.series[0].markPoint.data=this.tiaoshiPao |
")" + |
||||||
|
`:总数(${this.tabledata[0].totalCount})`; |
||||||
|
option.xAxis.data = this.zhongNameData; |
||||||
|
option.series[0].data = this.zhongNumData; |
||||||
|
this.tiaoshiPao = this.echartsData.qipao( |
||||||
|
this.tiaoshiPao, |
||||||
|
this.zhongNumData, |
||||||
|
this.zhongNameData |
||||||
|
); |
||||||
|
option.series[0].markPoint.data = this.tiaoshiPao; |
||||||
//option.series[0].id=this.organizationId
|
//option.series[0].id=this.organizationId
|
||||||
option.xAxis.id=this.organizationId |
option.xAxis.id = this.organizationId; |
||||||
this.detailPlanEchart.clear() |
this.detailPlanEchart.clear(); |
||||||
this.detailPlanEchart.setOption(option) |
this.detailPlanEchart.setOption(option); |
||||||
|
|
||||||
//this.detailEcharts()
|
//this.detailEcharts()
|
||||||
},1000) |
}, 1000); |
||||||
this.tiao=true |
this.tiao = true; |
||||||
|
} else { |
||||||
|
this.router.navigate(["/statisticanalysis/CompangInfo"], { |
||||||
|
queryParams: { |
||||||
|
name: option.xAxis.data[xIndex], |
||||||
|
type: 1, |
||||||
|
jsid: option.xAxis.id[xIndex], |
||||||
|
buildid: this.buildingTypeId, |
||||||
|
}, |
||||||
|
}); |
||||||
} |
} |
||||||
else{ |
|
||||||
this.router.navigate(['/statisticanalysis/CompangInfo'],{queryParams:{'name':option.xAxis.data[xIndex],'type':1,'jsid':option.xAxis.id[xIndex],'buildid':this.buildingTypeId}}); |
|
||||||
} |
|
||||||
|
|
||||||
} |
} |
||||||
}); |
}); |
||||||
} |
} |
||||||
|
|
||||||
tiao=false |
tiao = false; |
||||||
tishiData |
tishiData; |
||||||
res |
res; |
||||||
tableTooltip(datas:any){ |
tableTooltip(datas: any) { |
||||||
for(var a in this.echartsData.obdata[0].organizations){ |
for (var a in this.echartsData.obdata[0].organizations) { |
||||||
if(this.echartsData.obdata[0].organizations[a].organizationName==datas.name){ |
if ( |
||||||
this.tishiData=this.echartsData.obdata[0].organizations[a].subOrganizations |
this.echartsData.obdata[0].organizations[a].organizationName == |
||||||
|
datas.name |
||||||
|
) { |
||||||
|
this.tishiData = |
||||||
|
this.echartsData.obdata[0].organizations[a].subOrganizations; |
||||||
} |
} |
||||||
} |
} |
||||||
var countall=0//总计
|
var countall = 0; //总计
|
||||||
var countbi=0//站比
|
var countbi = 0; //站比
|
||||||
var allCountbi=0//总站比
|
var allCountbi = 0; //总站比
|
||||||
for(var i=0;i<this.tishiData.length;i++){ |
for (var i = 0; i < this.tishiData.length; i++) { |
||||||
countall+=this.tishiData[i].count |
countall += this.tishiData[i].count; |
||||||
} |
} |
||||||
this.res= '<div class="tishi" style=" backgroundColor:rgba(255,255,255,1);width:100%;height:100%;"><div style="padding:10px 0 5px 0"><span style="color:#FFFFFF;font-size:27px;text-align: center;display:block;">'+datas.name+'</span></div>' |
this.res = |
||||||
this.res+='</br><div style="width:300px;height:100%;padding:0 20px 15px 20px"><table style="width:300px;font-size:16px; color:#FFFFFF;border-collapse:collapse;"cellspacing="0"; >'; |
'<div class="tishi" style=" backgroundColor:rgba(255,255,255,1);width:100%;height:100%;"><div style="padding:10px 0 5px 0"><span style="color:#FFFFFF;font-size:27px;text-align: center;display:block;">' + |
||||||
this.res+='<thead style="font-size:18px;"><tr>'; |
datas.name + |
||||||
this.res+='<td style="text-align:center;width:30%;">名称</td>'; |
"</span></div>"; |
||||||
this.res+='<td style="text-align:center;width:30%;">数量</td>' |
this.res += |
||||||
this.res+='<td style="text-align:center;width:30%;">总占比</td>' |
'</br><div style="width:300px;height:100%;padding:0 20px 15px 20px"><table style="width:300px;font-size:16px; color:#FFFFFF;border-collapse:collapse;"cellspacing="0"; >'; |
||||||
this.res+='</tr></thead>' |
this.res += '<thead style="font-size:18px;"><tr>'; |
||||||
this.res+='<tbody>'; |
this.res += '<td style="text-align:center;width:30%;">名称</td>'; |
||||||
for(var i=0;i<this.tishiData.length;i++){ |
this.res += '<td style="text-align:center;width:30%;">数量</td>'; |
||||||
countbi=Math.round(this.tishiData[i].count/countall* 10000)/ 100.00 |
this.res += '<td style="text-align:center;width:30%;">总占比</td>'; |
||||||
allCountbi=allCountbi+countbi |
this.res += "</tr></thead>"; |
||||||
this.res+='<tr>' |
this.res += "<tbody>"; |
||||||
this.res+='<td style="text-align:center;">'+this.tishiData[i].organizationName+'</td>' |
for (var i = 0; i < this.tishiData.length; i++) { |
||||||
this.res+='<td style="text-align:center;">'+this.tishiData[i].count+'</td>' |
countbi = |
||||||
this.res+='<td style="text-align:center;">'+countbi+'%</td></tr>' |
Math.round((this.tishiData[i].count / countall) * 10000) / 100.0; |
||||||
} |
allCountbi = allCountbi + countbi; |
||||||
|
this.res += "<tr>"; |
||||||
this.res+='</tbody>' |
this.res += |
||||||
this.res+='<tfoot style="font-size:18px;"><td style="text-align:center;">总计</td><td style="text-align:center;">'+countall+'</td><td style="text-align:center;">'+allCountbi.toFixed(2)+'%</td></tfoot>' |
'<td style="text-align:center;">' + |
||||||
this.res+='</table></div></div>' |
this.tishiData[i].organizationName + |
||||||
return this.res |
"</td>"; |
||||||
|
this.res += |
||||||
|
'<td style="text-align:center;">' + this.tishiData[i].count + "</td>"; |
||||||
|
this.res += '<td style="text-align:center;">' + countbi + "%</td></tr>"; |
||||||
|
} |
||||||
|
|
||||||
|
this.res += "</tbody>"; |
||||||
|
this.res += |
||||||
|
'<tfoot style="font-size:18px;"><td style="text-align:center;">总计</td><td style="text-align:center;">' + |
||||||
|
countall + |
||||||
|
'</td><td style="text-align:center;">' + |
||||||
|
allCountbi.toFixed(2) + |
||||||
|
"%</td></tfoot>"; |
||||||
|
this.res += "</table></div></div>"; |
||||||
|
return this.res; |
||||||
} |
} |
||||||
} |
} |
||||||
|
@ -1,393 +1,478 @@ |
|||||||
import { Component, OnInit } from '@angular/core'; |
import { Component, OnInit } from "@angular/core"; |
||||||
import { ActivatedRoute, Router } from '@angular/router'; |
import { ActivatedRoute, Router } from "@angular/router"; |
||||||
import {EchartsDataService} from '../../echarts-data.service'; |
import { EchartsDataService } from "../../echarts-data.service"; |
||||||
import { HttpClient } from '@angular/common/http' |
import { HttpClient } from "@angular/common/http"; |
||||||
declare var echarts: any; |
declare var echarts: any; |
||||||
@Component({ |
@Component({ |
||||||
selector: 'app-building-type-two-reverse', |
selector: "app-building-type-two-reverse", |
||||||
templateUrl: './building-type-two-reverse.component.html', |
templateUrl: "./building-type-two-reverse.component.html", |
||||||
styleUrls: ['./building-type-two-reverse.component.scss'] |
styleUrls: ["./building-type-two-reverse.component.scss"], |
||||||
}) |
}) |
||||||
export class BuildingTypeTwoReverseComponent implements OnInit { |
export class BuildingTypeTwoReverseComponent implements OnInit { |
||||||
|
constructor( |
||||||
|
private http: HttpClient, |
||||||
|
private router: Router, |
||||||
|
public data: EchartsDataService, |
||||||
|
private route: ActivatedRoute |
||||||
|
) {} |
||||||
|
|
||||||
constructor(private http:HttpClient,private router: Router,public data:EchartsDataService,private route:ActivatedRoute) { } |
forward() { |
||||||
|
this.router.navigate([ |
||||||
forward(){ |
"/statisticanalysis/buildingType_one/buildingType_two_forward", |
||||||
this.router.navigate(['/statisticanalysis/buildingType_one/buildingType_two_forward']) |
]); |
||||||
} |
} |
||||||
reverse(){ |
reverse() { |
||||||
this.router.navigate(['/statisticanalysis/buildingType_one/buildingType_two_reverse']) |
this.router.navigate([ |
||||||
|
"/statisticanalysis/buildingType_one/buildingType_two_reverse", |
||||||
|
]); |
||||||
} |
} |
||||||
headname//标题
|
headname; //标题
|
||||||
buildId//建筑id
|
buildId; //建筑id
|
||||||
padHw//是否是华为pad
|
padHw; //是否是华为pad
|
||||||
ngOnInit(): void { |
ngOnInit(): void { |
||||||
if(window.matchMedia("(max-width: 1300px)").matches&&window.matchMedia("(max-height: 700px)").matches){ |
if ( |
||||||
this.padHw=true |
window.matchMedia("(max-width: 1300px)").matches && |
||||||
|
window.matchMedia("(max-height: 700px)").matches |
||||||
|
) { |
||||||
|
this.padHw = true; |
||||||
//this.padjt=
|
//this.padjt=
|
||||||
}else{ |
} else { |
||||||
this.padHw=false |
this.padHw = false; |
||||||
} |
} |
||||||
if(sessionStorage.getItem('refresh') === 'true') { |
if (sessionStorage.getItem("refresh") === "true") { |
||||||
sessionStorage.removeItem('refresh'); |
sessionStorage.removeItem("refresh"); |
||||||
location.reload(); |
location.reload(); |
||||||
} |
} |
||||||
this.route.queryParams.subscribe(param=>{ |
this.route.queryParams.subscribe((param) => { |
||||||
this.headname=param.level |
this.headname = param.level; |
||||||
this.buildId=param.id |
this.buildId = param.id; |
||||||
}); |
}); |
||||||
let paramsdata:any = { |
let paramsdata: any = { |
||||||
id:this.buildId, |
id: this.buildId, |
||||||
//organizationId:'1'
|
//organizationId:'1'
|
||||||
} |
}; |
||||||
|
|
||||||
window.setTimeout(()=>{ |
window.setTimeout(() => { |
||||||
this.getechartsdata() |
this.getechartsdata(); |
||||||
}); |
}); |
||||||
|
|
||||||
} |
} |
||||||
ngOnDestroy(): void { |
ngOnDestroy(): void { |
||||||
/* this.indexBzt.clear() |
if (this.forArr && this.forArr.length !== 0) { |
||||||
this.indexBzt.dispose() */ |
this.forArr.forEach((item) => { |
||||||
this.forArr.forEach(item => { |
item.echart.clear(); |
||||||
item.echart.clear() |
item.echart.dispose(); |
||||||
item.echart.dispose() |
}); |
||||||
}) |
} |
||||||
} |
} |
||||||
async getechartsdata(){ |
async getechartsdata() { |
||||||
await this.data.getData(null,`/api/StatisticsAnalysis/Companies/BuildingTypes/${this.buildId}`) |
await this.data.getData( |
||||||
this.tabledata=JSON.parse(JSON.stringify(this.data.allDate)) |
null, |
||||||
for(var i=0;i<this.tabledata[0].organizations.length;i++){ |
`/api/StatisticsAnalysis/Companies/BuildingTypes/${this.buildId}` |
||||||
this.zhiNameData.push(this.tabledata[0].organizations[i].organizationName) |
); |
||||||
this.zhiNumData.push(this.tabledata[0].organizations[i].count) |
this.tabledata = JSON.parse(JSON.stringify(this.data.allDate)); |
||||||
this.organizationId.push(this.tabledata[0].organizations[i].organizationId) |
for (var i = 0; i < this.tabledata[0].organizations.length; i++) { |
||||||
} |
this.zhiNameData.push( |
||||||
this.tiaoshiPao=this.data.qipao(this.tiaoshiPao,this.zhiNumData,this.zhiNameData) |
this.tabledata[0].organizations[i].organizationName |
||||||
this.barEcharts() |
); |
||||||
|
this.zhiNumData.push(this.tabledata[0].organizations[i].count); |
||||||
|
this.organizationId.push( |
||||||
|
this.tabledata[0].organizations[i].organizationId |
||||||
|
); |
||||||
|
} |
||||||
|
this.tiaoshiPao = this.data.qipao( |
||||||
|
this.tiaoshiPao, |
||||||
|
this.zhiNumData, |
||||||
|
this.zhiNameData |
||||||
|
); |
||||||
|
this.barEcharts(); |
||||||
} |
} |
||||||
axisLabel = { |
axisLabel = { |
||||||
interval: 0, |
interval: 0, |
||||||
rotate:38, |
rotate: 38, |
||||||
textStyle:{ |
textStyle: { |
||||||
fontSize :16, |
fontSize: 16, |
||||||
color:'#000000' |
color: "#000000", |
||||||
},
|
}, |
||||||
formatter:function(value)
|
formatter: function (value) { |
||||||
{
|
var ret = ""; //拼接加\n返回的类目项
|
||||||
var ret = "";//拼接加\n返回的类目项
|
var maxLength = 2; //每项显示文字个数
|
||||||
var maxLength = 2;//每项显示文字个数
|
var valLength = value.length; //X轴类目项的文字个数
|
||||||
var valLength = value.length;//X轴类目项的文字个数
|
var rowN = Math.ceil(valLength / maxLength); //类目项需要换行的行数
|
||||||
var rowN = Math.ceil(valLength / maxLength); //类目项需要换行的行数
|
if (rowN > 1) { |
||||||
if (rowN > 1)//如果类目项的文字大于3,
|
//如果类目项的文字大于3,
|
||||||
{
|
for (var i = 0; i < rowN; i++) { |
||||||
for (var i = 0; i < rowN; i++) {
|
var temp = ""; //每次截取的字符串
|
||||||
var temp = "";//每次截取的字符串
|
var start = i * maxLength; //开始截取的位置
|
||||||
var start = i * maxLength;//开始截取的位置
|
var end = start + maxLength; //结束截取的位置
|
||||||
var end = start + maxLength;//结束截取的位置
|
//这里也可以加一个是否是最后一行的判断,但是不加也没有影响,那就不加吧
|
||||||
//这里也可以加一个是否是最后一行的判断,但是不加也没有影响,那就不加吧
|
temp = value.substring(start, end) + "\n"; |
||||||
temp = value.substring(start, end) + "\n";
|
ret += temp; //凭借最终的字符串
|
||||||
ret += temp; //凭借最终的字符串
|
} |
||||||
}
|
return ret; |
||||||
return ret;
|
} else { |
||||||
}
|
return value; |
||||||
else {
|
} |
||||||
return value;
|
}, |
||||||
}
|
}; //echarts两个字换行
|
||||||
}
|
|
||||||
}//echarts两个字换行
|
|
||||||
|
|
||||||
topTextlabel = { |
topTextlabel = { |
||||||
show: true, // 开启显示
|
show: true, // 开启显示
|
||||||
position: 'top', // 在上方显示
|
position: "top", // 在上方显示
|
||||||
distance: 10, // 距离图形元素的距离。当 position 为字符描述值(如 'top'、'insideRight')时候有效。
|
distance: 10, // 距离图形元素的距离。当 position 为字符描述值(如 'top'、'insideRight')时候有效。
|
||||||
verticalAlign: 'middle', |
verticalAlign: "middle", |
||||||
textStyle: { // 数值样式
|
textStyle: { |
||||||
color: 'black', |
// 数值样式
|
||||||
fontSize: 12 |
color: "black", |
||||||
} |
fontSize: 12, |
||||||
}//柱状图数值顶部显示
|
}, |
||||||
|
}; //柱状图数值顶部显示
|
||||||
|
|
||||||
tableDataZhi = [ {name:"浦东支队",number:"156",zhanbi:"3%"}, |
tableDataZhi = [ |
||||||
{name:"黄浦支队",number:"144",zhanbi:"2.8%"}, |
{ name: "浦东支队", number: "156", zhanbi: "3%" }, |
||||||
{name:"徐汇支队",number:"133",zhanbi:"2.1%"}, |
{ name: "黄浦支队", number: "144", zhanbi: "2.8%" }, |
||||||
{name:"长宁支队",number:"122",zhanbi:"1.6%"}, |
{ name: "徐汇支队", number: "133", zhanbi: "2.1%" }, |
||||||
{name:"静安支队",number:"120",zhanbi:"1.3%"}, |
{ name: "长宁支队", number: "122", zhanbi: "1.6%" }, |
||||||
{name:"普陀支队",number:"100",zhanbi:"1.1%"}, |
{ name: "静安支队", number: "120", zhanbi: "1.3%" }, |
||||||
{name:"虹口支队",number:"95",zhanbi:"1%"}, |
{ name: "普陀支队", number: "100", zhanbi: "1.1%" }, |
||||||
{name:"杨浦支队",number:"90",zhanbi:"0.9%"}, |
{ name: "虹口支队", number: "95", zhanbi: "1%" }, |
||||||
{name:"闵行支队",number:"88",zhanbi:"0.8%"}, |
{ name: "杨浦支队", number: "90", zhanbi: "0.9%" }, |
||||||
{name:"宝山支队",number:"83",zhanbi:"0.7%"}, |
{ name: "闵行支队", number: "88", zhanbi: "0.8%" }, |
||||||
{name:"徐汇支队",number:"133",zhanbi:"2.1%"}, |
{ name: "宝山支队", number: "83", zhanbi: "0.7%" }, |
||||||
{name:"长宁支队",number:"122",zhanbi:"1.6%"}, |
{ name: "徐汇支队", number: "133", zhanbi: "2.1%" }, |
||||||
{name:"嘉定支队",number:"78",zhanbi:"0.6%"}, |
{ name: "长宁支队", number: "122", zhanbi: "1.6%" }, |
||||||
{name:"松江支队",number:"75",zhanbi:"0.5%"}, |
{ name: "嘉定支队", number: "78", zhanbi: "0.6%" }, |
||||||
{name:"金山支队",number:"65",zhanbi:"0.4%"}, |
{ name: "松江支队", number: "75", zhanbi: "0.5%" }, |
||||||
{name:"崇明支队",number:"55",zhanbi:"0.3%"} ] |
{ name: "金山支队", number: "65", zhanbi: "0.4%" }, |
||||||
tableDataZhong = [ {name:"浦东中队",number:"156",zhanbi:"3%"}, |
{ name: "崇明支队", number: "55", zhanbi: "0.3%" }, |
||||||
{name:"黄浦中队",number:"144",zhanbi:"2.8%"}, |
]; |
||||||
{name:"徐汇中队",number:"133",zhanbi:"2.1%"}, |
tableDataZhong = [ |
||||||
{name:"长宁中队",number:"122",zhanbi:"1.6%"}, |
{ name: "浦东中队", number: "156", zhanbi: "3%" }, |
||||||
{name:"静安中队",number:"120",zhanbi:"1.3%"}, |
{ name: "黄浦中队", number: "144", zhanbi: "2.8%" }, |
||||||
{name:"普陀中队",number:"100",zhanbi:"1.1%"}, |
{ name: "徐汇中队", number: "133", zhanbi: "2.1%" }, |
||||||
{name:"虹口中队",number:"95",zhanbi:"1%"}, |
{ name: "长宁中队", number: "122", zhanbi: "1.6%" }, |
||||||
{name:"杨浦中队",number:"90",zhanbi:"0.9%"}, |
{ name: "静安中队", number: "120", zhanbi: "1.3%" }, |
||||||
{name:"闵行中队",number:"88",zhanbi:"0.8%"}, |
{ name: "普陀中队", number: "100", zhanbi: "1.1%" }, |
||||||
{name:"宝山中队",number:"83",zhanbi:"0.7%"}, |
{ name: "虹口中队", number: "95", zhanbi: "1%" }, |
||||||
{name:"徐汇中队",number:"133",zhanbi:"2.1%"}, |
{ name: "杨浦中队", number: "90", zhanbi: "0.9%" }, |
||||||
{name:"长宁中队",number:"122",zhanbi:"1.6%"}, |
{ name: "闵行中队", number: "88", zhanbi: "0.8%" }, |
||||||
{name:"嘉定中队",number:"78",zhanbi:"0.6%"}, |
{ name: "宝山中队", number: "83", zhanbi: "0.7%" }, |
||||||
{name:"松江中队",number:"75",zhanbi:"0.5%"}, |
{ name: "徐汇中队", number: "133", zhanbi: "2.1%" }, |
||||||
{name:"金山中队",number:"65",zhanbi:"0.4%"}, |
{ name: "长宁中队", number: "122", zhanbi: "1.6%" }, |
||||||
{name:"崇明中队",number:"55",zhanbi:"0.3%"} ] |
{ name: "嘉定中队", number: "78", zhanbi: "0.6%" }, |
||||||
zhiNameData = [] |
{ name: "松江中队", number: "75", zhanbi: "0.5%" }, |
||||||
zhiNumData = [] |
{ name: "金山中队", number: "65", zhanbi: "0.4%" }, |
||||||
tiaoshiPao:any |
{ name: "崇明中队", number: "55", zhanbi: "0.3%" }, |
||||||
|
]; |
||||||
|
zhiNameData = []; |
||||||
|
zhiNumData = []; |
||||||
|
tiaoshiPao: any; |
||||||
//气泡提示数据获取
|
//气泡提示数据获取
|
||||||
bianli(){ |
bianli() { |
||||||
if(this.zhiNumData.length>=1){ |
if (this.zhiNumData.length >= 1) { |
||||||
var arrshuzu='['; |
var arrshuzu = "["; |
||||||
for(var i=0;i<this.zhiNumData.length;i++){ |
for (var i = 0; i < this.zhiNumData.length; i++) { |
||||||
arrshuzu+='{"value":'+this.zhiNumData[i]+',"coord":['+i+','+this.zhiNumData[i]+'],"name":'+'"'+this.zhiNameData[i]+'"'+'},' |
arrshuzu += |
||||||
} |
'{"value":' + |
||||||
arrshuzu=arrshuzu.substring(0,arrshuzu.length-1) |
this.zhiNumData[i] + |
||||||
arrshuzu+=']' |
',"coord":[' + |
||||||
this.tiaoshiPao=JSON.parse(arrshuzu) |
i + |
||||||
|
"," + |
||||||
|
this.zhiNumData[i] + |
||||||
|
'],"name":' + |
||||||
|
'"' + |
||||||
|
this.zhiNameData[i] + |
||||||
|
'"' + |
||||||
|
"},"; |
||||||
|
} |
||||||
|
arrshuzu = arrshuzu.substring(0, arrshuzu.length - 1); |
||||||
|
arrshuzu += "]"; |
||||||
|
this.tiaoshiPao = JSON.parse(arrshuzu); |
||||||
} |
} |
||||||
|
|
||||||
} |
} |
||||||
forArr = [{id:'gaoceng',name:'高层',echart:null}, |
forArr = [ |
||||||
{id:'dixia',name:'地下',echart:null}, |
{ id: "gaoceng", name: "高层", echart: null }, |
||||||
{id:'guidao',name:'轨道交通',echart:null}, |
{ id: "dixia", name: "地下", echart: null }, |
||||||
{id:'huagong',name:'化工生产',echart:null}, |
{ id: "guidao", name: "轨道交通", echart: null }, |
||||||
{id:'chuguan',name:'储罐类',echart:null}, |
{ id: "huagong", name: "化工生产", echart: null }, |
||||||
{id:'changfang',name:'厂房',echart:null}, |
{ id: "chuguan", name: "储罐类", echart: null }, |
||||||
{id:'gujianzhu',name:'古建筑',echart:null}, |
{ id: "changfang", name: "厂房", echart: null }, |
||||||
{id:'shichang',name:'商市场',echart:null}, |
{ id: "gujianzhu", name: "古建筑", echart: null }, |
||||||
{id:'yiyuan',name:'医院',echart:null}, |
{ id: "shichang", name: "商市场", echart: null }, |
||||||
{id:'xuexiao',name:'学校',echart:null}, |
{ id: "yiyuan", name: "医院", echart: null }, |
||||||
{id:'binguan',name:'宾馆',echart:null}, |
{ id: "xuexiao", name: "学校", echart: null }, |
||||||
{id:'yule',name:'娱乐场所',echart:null}, |
{ id: "binguan", name: "宾馆", echart: null }, |
||||||
{id:'canyin',name:'餐饮业',echart:null}, |
{ id: "yule", name: "娱乐场所", echart: null }, |
||||||
{id:'yingyuan',name:'影剧院',echart:null}, |
{ id: "canyin", name: "餐饮业", echart: null }, |
||||||
{id:'zhanlan',name:'展览建筑',echart:null}, |
{ id: "yingyuan", name: "影剧院", echart: null }, |
||||||
{id:'suidao',name:'隧道',echart:null}] |
{ id: "zhanlan", name: "展览建筑", echart: null }, |
||||||
|
{ id: "suidao", name: "隧道", echart: null }, |
||||||
|
]; |
||||||
|
|
||||||
//返回
|
//返回
|
||||||
goback(){ |
goback() { |
||||||
sessionStorage.setItem('refresh', 'true'); |
sessionStorage.setItem("refresh", "true"); |
||||||
history.go(-1); |
history.go(-1); |
||||||
} |
} |
||||||
/* 顶部饼状图 */ |
/* 顶部饼状图 */ |
||||||
indexBzt |
indexBzt; |
||||||
initCharts(){ |
initCharts() { |
||||||
|
this.indexBzt = echarts.init(document.getElementById("pie"), "walden"); |
||||||
this.indexBzt = echarts.init(document.getElementById('pie'),'walden'); |
let options = { |
||||||
let options={ |
|
||||||
title: { |
title: { |
||||||
text: '建筑类型统计(8900家)', |
text: "建筑类型统计(8900家)", |
||||||
left: 'center', |
left: "center", |
||||||
top: "7%", |
top: "7%", |
||||||
textStyle: { |
textStyle: { |
||||||
fontSize:26 |
fontSize: 26, |
||||||
} |
}, |
||||||
}, |
}, |
||||||
tooltip: { |
tooltip: { |
||||||
trigger: 'item', |
trigger: "item", |
||||||
formatter: (params)=>{ |
formatter: (params) => { |
||||||
return this.data.tableTooltip(this.tableDataZhi,params.name) |
return this.data.tableTooltip(this.tableDataZhi, params.name); |
||||||
}, |
}, |
||||||
position: this.data.tableTooltipNoShow2 |
position: this.data.tableTooltipNoShow2, |
||||||
}, |
}, |
||||||
legend: { |
legend: { |
||||||
orient: 'vertical', |
orient: "vertical", |
||||||
right: 150, |
right: 150, |
||||||
top:80, |
top: 80, |
||||||
textStyle:{ |
textStyle: { |
||||||
fontSize:18, |
fontSize: 18, |
||||||
color:"#000000" |
color: "#000000", |
||||||
}, |
}, |
||||||
data: ['高层', '地下', '轨道交通', '化工生产', '储罐类' , '厂房','古建筑', '商市场', '医院', '学校', '宾馆' , '娱乐场所','餐饮业', '影剧院', '展览建筑' , '隧道'] |
data: [ |
||||||
|
"高层", |
||||||
|
"地下", |
||||||
|
"轨道交通", |
||||||
|
"化工生产", |
||||||
|
"储罐类", |
||||||
|
"厂房", |
||||||
|
"古建筑", |
||||||
|
"商市场", |
||||||
|
"医院", |
||||||
|
"学校", |
||||||
|
"宾馆", |
||||||
|
"娱乐场所", |
||||||
|
"餐饮业", |
||||||
|
"影剧院", |
||||||
|
"展览建筑", |
||||||
|
"隧道", |
||||||
|
], |
||||||
}, |
}, |
||||||
series: [ |
series: [ |
||||||
{ |
{ |
||||||
name: '访问来源', |
name: "访问来源", |
||||||
type: 'pie', |
type: "pie", |
||||||
radius: '70%', |
radius: "70%", |
||||||
center: ['50%', '60%'], |
center: ["50%", "60%"], |
||||||
label:{ |
label: { |
||||||
show:true, |
show: true, |
||||||
fontSize:16, |
fontSize: 16, |
||||||
formatter:'{b}{c}家\n{d|({d}%)}', |
formatter: "{b}{c}家\n{d|({d}%)}", |
||||||
rich: { |
rich: { |
||||||
d: { |
d: { |
||||||
align: 'center', |
align: "center", |
||||||
fontSize:16 |
fontSize: 16, |
||||||
} |
}, |
||||||
}, |
}, |
||||||
}, |
}, |
||||||
data: [ |
data: [ |
||||||
{value: 500, name: '高层'}, |
{ value: 500, name: "高层" }, |
||||||
{value: 800, name: '地下'}, |
{ value: 800, name: "地下" }, |
||||||
{value: 900, name: '轨道交通'}, |
{ value: 900, name: "轨道交通" }, |
||||||
{value: 800, name: '化工生产'}, |
{ value: 800, name: "化工生产" }, |
||||||
{value: 1200, name: '储罐类'}, |
{ value: 1200, name: "储罐类" }, |
||||||
{value: 1500, name: '厂房'}, |
{ value: 1500, name: "厂房" }, |
||||||
{value: 1400, name: '古建筑'}, |
{ value: 1400, name: "古建筑" }, |
||||||
{value: 600, name: '商市场'}, |
{ value: 600, name: "商市场" }, |
||||||
{value: 568, name: '医院'}, |
{ value: 568, name: "医院" }, |
||||||
{value: 888, name: '学校'}, |
{ value: 888, name: "学校" }, |
||||||
{value: 485, name: '宾馆'}, |
{ value: 485, name: "宾馆" }, |
||||||
{value: 966, name: '娱乐场所'}, |
{ value: 966, name: "娱乐场所" }, |
||||||
{value: 789, name: '餐饮业'}, |
{ value: 789, name: "餐饮业" }, |
||||||
{value: 500, name: '影剧院'}, |
{ value: 500, name: "影剧院" }, |
||||||
{value: 1025, name: '展览建筑'}, |
{ value: 1025, name: "展览建筑" }, |
||||||
{value: 600, name: '隧道'} |
{ value: 600, name: "隧道" }, |
||||||
], |
], |
||||||
emphasis: { |
emphasis: { |
||||||
itemStyle: { |
itemStyle: { |
||||||
shadowBlur: 10, |
shadowBlur: 10, |
||||||
shadowOffsetX: 0, |
shadowOffsetX: 0, |
||||||
shadowColor: 'rgba(0, 0, 0, 0.5)' |
shadowColor: "rgba(0, 0, 0, 0.5)", |
||||||
} |
}, |
||||||
} |
}, |
||||||
} |
}, |
||||||
] |
], |
||||||
}; |
}; |
||||||
this.indexBzt.on('click', (params) => { |
this.indexBzt.on("click", (params) => { |
||||||
// this.router.navigateByUrl('/statisticanalysis/buildingType_two_forward');
|
// this.router.navigateByUrl('/statisticanalysis/buildingType_two_forward');
|
||||||
}); |
}); |
||||||
this.indexBzt.setOption(options); |
this.indexBzt.setOption(options); |
||||||
} |
} |
||||||
//柱状图
|
//柱状图
|
||||||
lengthdata=[]//提示数据
|
lengthdata = []; //提示数据
|
||||||
count=0//总数
|
count = 0; //总数
|
||||||
indexData=[]//所有数据
|
indexData = []; //所有数据
|
||||||
organizationId=[] |
organizationId = []; |
||||||
tabledata |
tabledata; |
||||||
barEcharts(){ |
barEcharts() { |
||||||
this.forArr.forEach(item=>{ |
this.forArr.forEach((item) => { |
||||||
let _this = this |
let _this = this; |
||||||
item.echart = echarts.init(document.getElementById('gaoceng'),'walden'); |
item.echart = echarts.init(document.getElementById("gaoceng"), "walden"); |
||||||
let option = { |
let option = { |
||||||
title: { |
title: { |
||||||
text: this.headname+this.tabledata[0].totalCount, |
text: this.headname + this.tabledata[0].totalCount, |
||||||
left: "center", |
left: "center", |
||||||
top:this.padHw?"18":"0", |
top: this.padHw ? "18" : "0", |
||||||
bottom:this.padHw?"0":'510', |
bottom: this.padHw ? "0" : "510", |
||||||
|
textStyle: { |
||||||
|
fontSize: 30, |
||||||
|
}, |
||||||
|
}, |
||||||
|
grid: { |
||||||
|
//top: 90,
|
||||||
|
bottom: "18%", |
||||||
|
}, |
||||||
|
xAxis: { |
||||||
|
id: this.organizationId, |
||||||
|
type: "category", |
||||||
|
data: this.zhiNameData, |
||||||
|
axisLabel: { |
||||||
|
//this.axisLabel,
|
||||||
|
interval: 0, |
||||||
|
rotate: 28, |
||||||
textStyle: { |
textStyle: { |
||||||
fontSize: 30 |
fontSize: 16, |
||||||
} |
color: "#000000", |
||||||
|
}, |
||||||
}, |
}, |
||||||
grid: { |
|
||||||
//top: 90,
|
|
||||||
bottom: '18%', |
|
||||||
}, |
}, |
||||||
xAxis: { |
yAxis: { |
||||||
id:this.organizationId, |
type: "value", |
||||||
type: 'category', |
axisLabel: { |
||||||
data: this.zhiNameData, |
//this.axisLabel,
|
||||||
axisLabel:{ |
textStyle: { |
||||||
//this.axisLabel,
|
fontSize: 16, |
||||||
interval: 0, |
color: "#000000", |
||||||
rotate:28, |
}, |
||||||
textStyle:{ |
|
||||||
fontSize :16, |
|
||||||
color:'#000000' |
|
||||||
} |
|
||||||
|
|
||||||
} |
|
||||||
}, |
}, |
||||||
yAxis: { |
}, |
||||||
type: 'value', |
tooltip: { |
||||||
axisLabel:{ |
trigger: "item", |
||||||
//this.axisLabel,
|
formatter: (params) => { |
||||||
textStyle:{ |
return this.tableTooltip(params); |
||||||
fontSize :16, |
|
||||||
color:'#000000' |
|
||||||
} |
|
||||||
|
|
||||||
} |
|
||||||
}, |
}, |
||||||
tooltip: { |
position: this.data.tableTooltipNoShow2, |
||||||
trigger: 'item', |
}, |
||||||
formatter: (params)=>{ |
series: [ |
||||||
return this.tableTooltip(params) |
{ |
||||||
|
data: this.zhiNumData, |
||||||
|
type: "bar", |
||||||
|
markPoint: { |
||||||
|
data: this.tiaoshiPao, |
||||||
}, |
}, |
||||||
position: this.data.tableTooltipNoShow2 |
//showBackground: true,
|
||||||
}, |
backgroundStyle: { |
||||||
series: [{ |
color: "rgba(220, 220, 220, 0.8)", |
||||||
data: this.zhiNumData, |
|
||||||
type: 'bar', |
|
||||||
markPoint: { |
|
||||||
data:this.tiaoshiPao |
|
||||||
}, |
}, |
||||||
//showBackground: true,
|
barWidth: "38", |
||||||
backgroundStyle: { |
//label: this.topTextlabel
|
||||||
color: 'rgba(220, 220, 220, 0.8)' |
}, |
||||||
|
], |
||||||
|
}; |
||||||
|
item.echart.setOption(option); |
||||||
|
item.echart.getZr().on("click", (params) => { |
||||||
|
const pointInPixel = [params.offsetX, params.offsetY]; |
||||||
|
if (item.echart.containPixel("grid", pointInPixel)) { |
||||||
|
let xIndex = item.echart.convertFromPixel({ seriesIndex: 0 }, [ |
||||||
|
params.offsetX, |
||||||
|
params.offsetY, |
||||||
|
])[0]; |
||||||
|
/*事件处理代码书写位置*/ |
||||||
|
if ( |
||||||
|
(this.data.level == "0" || this.data.level == "1") && |
||||||
|
this.tabledata[0].organizations[xIndex].subOrganizations.length >= 1 |
||||||
|
) { |
||||||
|
//总队,支队跳转
|
||||||
|
this.router.navigate( |
||||||
|
[ |
||||||
|
"/statisticanalysis/buildingType_one/buildingType_three_details", |
||||||
|
], |
||||||
|
{ |
||||||
|
queryParams: { |
||||||
|
organizationName: option.xAxis.data[xIndex], |
||||||
|
buildingTypeName: this.headname, |
||||||
|
buildId: this.buildId, |
||||||
|
organizationId: option.xAxis.id[xIndex], |
||||||
|
}, |
||||||
|
} |
||||||
|
); |
||||||
|
} else { |
||||||
|
this.router.navigate(["/statisticanalysis/CompangInfo"], { |
||||||
|
queryParams: { |
||||||
|
name: option.xAxis.data[xIndex], |
||||||
|
type: 1, |
||||||
|
jsid: option.xAxis.id[xIndex], |
||||||
|
buildid: this.buildId, |
||||||
}, |
}, |
||||||
barWidth :'38', |
}); |
||||||
//label: this.topTextlabel
|
} |
||||||
}] |
//this.router.navigate(['/statisticanalysis/delete_one/delete_four'],{queryParams:{'level':this.option.xAxis.data[xIndex]+headName}});
|
||||||
}; |
|
||||||
item.echart.setOption(option); |
|
||||||
item.echart.getZr().on('click', (params) => { |
|
||||||
const pointInPixel= [params.offsetX, params.offsetY]; |
|
||||||
if (item.echart.containPixel('grid',pointInPixel)) { |
|
||||||
let xIndex=item.echart.convertFromPixel({seriesIndex:0},[params.offsetX, params.offsetY])[0]; |
|
||||||
/*事件处理代码书写位置*/ |
|
||||||
if((this.data.level=='0'||this.data.level=='1')&&this.tabledata[0].organizations[xIndex].subOrganizations.length>=1){ |
|
||||||
//总队,支队跳转
|
|
||||||
this.router.navigate(['/statisticanalysis/buildingType_one/buildingType_three_details'],{queryParams:{'organizationName':option.xAxis.data[xIndex],'buildingTypeName':this.headname,'buildId':this.buildId,'organizationId':option.xAxis.id[xIndex]}}) |
|
||||||
} |
|
||||||
else{ |
|
||||||
this.router.navigate(['/statisticanalysis/CompangInfo'],{queryParams:{'name':option.xAxis.data[xIndex],'type':1,'jsid':option.xAxis.id[xIndex],'buildid':this.buildId}}); |
|
||||||
} |
} |
||||||
//this.router.navigate(['/statisticanalysis/delete_one/delete_four'],{queryParams:{'level':this.option.xAxis.data[xIndex]+headName}});
|
}); |
||||||
} |
}); |
||||||
|
|
||||||
}); |
|
||||||
}) |
|
||||||
|
|
||||||
|
|
||||||
} |
} |
||||||
|
|
||||||
//提示框表格
|
//提示框表格
|
||||||
res |
res; |
||||||
tishiData |
tishiData; |
||||||
tableTooltip(datas){ |
tableTooltip(datas) { |
||||||
for(var a in this.data.obdata[0].organizations){ |
for (var a in this.data.obdata[0].organizations) { |
||||||
if(this.data.obdata[0].organizations[a].organizationName==datas.name){ |
if (this.data.obdata[0].organizations[a].organizationName == datas.name) { |
||||||
this.tishiData=this.data.obdata[0].organizations[a].subOrganizations |
this.tishiData = this.data.obdata[0].organizations[a].subOrganizations; |
||||||
} |
} |
||||||
} |
} |
||||||
var countall=0//总计
|
var countall = 0; //总计
|
||||||
var countbi=0//站比
|
var countbi = 0; //站比
|
||||||
var allCountbi=0//总站比
|
var allCountbi = 0; //总站比
|
||||||
for(var i=0;i<this.tishiData.length;i++){ |
for (var i = 0; i < this.tishiData.length; i++) { |
||||||
countall+=this.tishiData[i].count |
countall += this.tishiData[i].count; |
||||||
} |
} |
||||||
this.res= '<div class="tishi" style=" backgroundColor:rgba(255,255,255,1);width:100%;height:100%;"><div style="padding:10px 0 5px 0"><span style="color:#FFFFFF;font-size:27px;text-align: center;display:block;">'+datas.name+'</span></div>' |
this.res = |
||||||
this.res+='</br><div style="width:300px;height:100%;padding:0 20px 15px 20px"><table style="width:300px;font-size:16px; color:#FFFFFF;border-collapse:collapse;"cellspacing="0"; >'; |
'<div class="tishi" style=" backgroundColor:rgba(255,255,255,1);width:100%;height:100%;"><div style="padding:10px 0 5px 0"><span style="color:#FFFFFF;font-size:27px;text-align: center;display:block;">' + |
||||||
this.res+='<thead style="font-size:18px;"><tr>'; |
datas.name + |
||||||
this.res+='<td style="text-align:center;width:30%;">名称</td>'; |
"</span></div>"; |
||||||
this.res+='<td style="text-align:center;width:30%;">数量</td>' |
this.res += |
||||||
this.res+='<td style="text-align:center;width:30%;">总占比</td>' |
'</br><div style="width:300px;height:100%;padding:0 20px 15px 20px"><table style="width:300px;font-size:16px; color:#FFFFFF;border-collapse:collapse;"cellspacing="0"; >'; |
||||||
this.res+='</tr></thead>' |
this.res += '<thead style="font-size:18px;"><tr>'; |
||||||
this.res+='<tbody>'; |
this.res += '<td style="text-align:center;width:30%;">名称</td>'; |
||||||
for(var i=0;i<this.tishiData.length;i++){ |
this.res += '<td style="text-align:center;width:30%;">数量</td>'; |
||||||
countbi=Math.round(this.tishiData[i].count/countall* 10000)/ 100.00 |
this.res += '<td style="text-align:center;width:30%;">总占比</td>'; |
||||||
allCountbi=allCountbi+countbi |
this.res += "</tr></thead>"; |
||||||
this.res+='<tr>' |
this.res += "<tbody>"; |
||||||
this.res+='<td style="text-align:center;">'+this.tishiData[i].organizationName+'</td>' |
for (var i = 0; i < this.tishiData.length; i++) { |
||||||
this.res+='<td style="text-align:center;">'+this.tishiData[i].count+'</td>' |
countbi = |
||||||
this.res+='<td style="text-align:center;">'+countbi+'%</td></tr>' |
Math.round((this.tishiData[i].count / countall) * 10000) / 100.0; |
||||||
} |
allCountbi = allCountbi + countbi; |
||||||
|
this.res += "<tr>"; |
||||||
this.res+='</tbody>' |
this.res += |
||||||
this.res+='<tfoot style="font-size:18px;"><td style="text-align:center;">总计</td><td style="text-align:center;">'+countall+'</td><td style="text-align:center;">'+allCountbi.toFixed(2)+'%</td></tfoot>' |
'<td style="text-align:center;">' + |
||||||
this.res+='</table></div></div>' |
this.tishiData[i].organizationName + |
||||||
return this.res |
"</td>"; |
||||||
|
this.res += |
||||||
|
'<td style="text-align:center;">' + this.tishiData[i].count + "</td>"; |
||||||
|
this.res += '<td style="text-align:center;">' + countbi + "%</td></tr>"; |
||||||
|
} |
||||||
|
|
||||||
|
this.res += "</tbody>"; |
||||||
|
this.res += |
||||||
|
'<tfoot style="font-size:18px;"><td style="text-align:center;">总计</td><td style="text-align:center;">' + |
||||||
|
countall + |
||||||
|
'</td><td style="text-align:center;">' + |
||||||
|
allCountbi.toFixed(2) + |
||||||
|
"%</td></tfoot>"; |
||||||
|
this.res += "</table></div></div>"; |
||||||
|
return this.res; |
||||||
} |
} |
||||||
} |
} |
||||||
|
@ -1,153 +1,195 @@ |
|||||||
import { Component, OnInit } from '@angular/core'; |
import { Component, OnInit } from "@angular/core"; |
||||||
import { Router } from '@angular/router'; |
import { Router } from "@angular/router"; |
||||||
import {EchartsDataService,} from '../../echarts-data.service' |
import { EchartsDataService } from "../../echarts-data.service"; |
||||||
declare var echarts: any; |
declare var echarts: any; |
||||||
|
|
||||||
@Component({ |
@Component({ |
||||||
selector: 'app-delete-one', |
selector: "app-delete-one", |
||||||
templateUrl: './delete-one.component.html', |
templateUrl: "./delete-one.component.html", |
||||||
styleUrls: ['./delete-one.component.scss'] |
styleUrls: ["./delete-one.component.scss"], |
||||||
}) |
}) |
||||||
export class DeleteOneComponent implements OnInit { |
export class DeleteOneComponent implements OnInit { |
||||||
options:any; |
options: any; |
||||||
|
|
||||||
indexBzt//echarts实例
|
indexBzt; //echarts实例
|
||||||
|
|
||||||
constructor(private router: Router,public echartsData:EchartsDataService) { } |
constructor(private router: Router, public echartsData: EchartsDataService) {} |
||||||
|
|
||||||
ngOnInit() { |
ngOnInit() { |
||||||
window.setTimeout(()=>{ |
window.setTimeout(() => { |
||||||
this.initCharts() |
this.initCharts(); |
||||||
},0) |
}, 0); |
||||||
} |
} |
||||||
ngOnDestroy():void{ |
ngOnDestroy(): void { |
||||||
this.indexBzt.clear() |
if (this.indexBzt) { |
||||||
this.indexBzt.dispose() |
this.indexBzt.clear(); |
||||||
|
this.indexBzt.dispose(); |
||||||
|
} |
||||||
} |
} |
||||||
|
|
||||||
/* 首页饼状图 */ |
/* 首页饼状图 */ |
||||||
initCharts(){ |
initCharts() { |
||||||
//console.log(document.getElementById('indexBzt'))
|
//console.log(document.getElementById('indexBzt'))
|
||||||
|
|
||||||
var ec = echarts as any; |
var ec = echarts as any; |
||||||
this.indexBzt = ec.init(document.getElementById('indexBzt'),'walden'); |
this.indexBzt = ec.init(document.getElementById("indexBzt"), "walden"); |
||||||
var options={ |
var options = { |
||||||
title: { |
title: { |
||||||
text: '删除单位统计(8900家)', |
text: "删除单位统计(8900家)", |
||||||
left: 'center', |
left: "center", |
||||||
top: "7%", |
top: "7%", |
||||||
textStyle:{ |
textStyle: { |
||||||
fontSize:31 |
fontSize: 31, |
||||||
} |
}, |
||||||
}, |
}, |
||||||
tooltip: { |
tooltip: { |
||||||
trigger: 'item', |
trigger: "item", |
||||||
//position: this.echartsData.tableTooltipNoShow2,
|
//position: this.echartsData.tableTooltipNoShow2,
|
||||||
formatter: (params)=>{ |
formatter: (params) => { |
||||||
//return this.biaogeTishi(params.name)
|
//return this.biaogeTishi(params.name)
|
||||||
return this.echartsData.biaogeTishiZhi(params.name) |
return this.echartsData.biaogeTishiZhi(params.name); |
||||||
}
|
}, |
||||||
}, |
}, |
||||||
legend: { |
legend: { |
||||||
orient: 'vertical', |
orient: "vertical", |
||||||
right: 150, |
right: 150, |
||||||
top:80, |
top: 80, |
||||||
//padding:20,
|
//padding:20,
|
||||||
// itemWidth:60,
|
// itemWidth:60,
|
||||||
// itemHeight:25,
|
// itemHeight:25,
|
||||||
textStyle:{ |
textStyle: { |
||||||
fontSize:18, |
fontSize: 18, |
||||||
color:"#000000" |
color: "#000000", |
||||||
},
|
}, |
||||||
data: ['高层', '地下', '轨道交通', '化工生产', '储罐类', '厂房', '古建筑', '商市场', '医院', '学校', '宾馆', '娱乐场所', '餐饮业', '影剧院', '展览建筑', '隧道'] |
data: [ |
||||||
|
"高层", |
||||||
|
"地下", |
||||||
|
"轨道交通", |
||||||
|
"化工生产", |
||||||
|
"储罐类", |
||||||
|
"厂房", |
||||||
|
"古建筑", |
||||||
|
"商市场", |
||||||
|
"医院", |
||||||
|
"学校", |
||||||
|
"宾馆", |
||||||
|
"娱乐场所", |
||||||
|
"餐饮业", |
||||||
|
"影剧院", |
||||||
|
"展览建筑", |
||||||
|
"隧道", |
||||||
|
], |
||||||
}, |
}, |
||||||
series: [ |
series: [ |
||||||
{ |
{ |
||||||
name: '访问来源', |
name: "访问来源", |
||||||
type: 'pie', |
type: "pie", |
||||||
radius: '65%', |
radius: "65%", |
||||||
center: ['50%', '60%'], |
center: ["50%", "60%"], |
||||||
label:{ |
label: { |
||||||
show:true, |
show: true, |
||||||
fontSize:18, |
fontSize: 18, |
||||||
formatter:'{b}{c}家\n{d|({d}%)}', |
formatter: "{b}{c}家\n{d|({d}%)}", |
||||||
rich: { |
rich: { |
||||||
d: { |
d: { |
||||||
align: 'center', |
align: "center", |
||||||
fontSize:18 |
fontSize: 18, |
||||||
} |
|
||||||
}, |
|
||||||
|
|
||||||
}, |
}, |
||||||
data: [ |
}, |
||||||
{value: 500, name: '高层'}, |
}, |
||||||
{value: 1300, name: '地下',itemStyle:{color:'#02A7F0'}}, |
data: [ |
||||||
{value: 1500, name: '轨道交通'}, |
{ value: 500, name: "高层" }, |
||||||
{value: 1500, name: '化工生产'}, |
{ value: 1300, name: "地下", itemStyle: { color: "#02A7F0" } }, |
||||||
{value: 1700, name: '储罐类'}, |
{ value: 1500, name: "轨道交通" }, |
||||||
{value: 800, name: '厂房'}, |
{ value: 1500, name: "化工生产" }, |
||||||
{value: 1500, name: '古建筑'}, |
{ value: 1700, name: "储罐类" }, |
||||||
{value: 1500, name: '商市场'}, |
{ value: 800, name: "厂房" }, |
||||||
{value: 1700, name: '医院'}, |
{ value: 1500, name: "古建筑" }, |
||||||
{value: 1700, name: '学校'}, |
{ value: 1500, name: "商市场" }, |
||||||
{value: 1700, name: '宾馆'}, |
{ value: 1700, name: "医院" }, |
||||||
{value: 1700, name: '娱乐场所'}, |
{ value: 1700, name: "学校" }, |
||||||
{value: 1700, name: '餐饮业'}, |
{ value: 1700, name: "宾馆" }, |
||||||
{value: 1700, name: '影剧院'}, |
{ value: 1700, name: "娱乐场所" }, |
||||||
{value: 1700, name: '展览建筑'}, |
{ value: 1700, name: "餐饮业" }, |
||||||
{value: 1700, name: '隧道'} |
{ value: 1700, name: "影剧院" }, |
||||||
], |
{ value: 1700, name: "展览建筑" }, |
||||||
emphasis: { |
{ value: 1700, name: "隧道" }, |
||||||
itemStyle: { |
], |
||||||
shadowBlur: 10, |
emphasis: { |
||||||
shadowOffsetX: 0, |
itemStyle: { |
||||||
shadowColor: 'rgba(0, 0, 0, 0.5)' |
shadowBlur: 10, |
||||||
} |
shadowOffsetX: 0, |
||||||
} |
shadowColor: "rgba(0, 0, 0, 0.5)", |
||||||
} |
}, |
||||||
] |
}, |
||||||
|
}, |
||||||
|
], |
||||||
}; |
}; |
||||||
this.indexBzt.on('click', (params) => { |
this.indexBzt.on("click", (params) => { |
||||||
this.router.navigateByUrl('/statisticanalysis/delete_one/delete_two'); |
this.router.navigateByUrl("/statisticanalysis/delete_one/delete_two"); |
||||||
}); |
}); |
||||||
this.indexBzt.setOption(options); |
this.indexBzt.setOption(options); |
||||||
} |
} |
||||||
/** |
/** |
||||||
* @name: 表格提示框封装 |
* @name: 表格提示框封装 |
||||||
* @test: test font |
* @test: test font |
||||||
* @msg:
|
* @msg: |
||||||
* @param {string(表头)} |
* @param {string(表头)} |
||||||
* @return {type}
|
* @return {type} |
||||||
*/ |
*/ |
||||||
biaogeTishi(biaotou:string){ |
biaogeTishi(biaotou: string) { |
||||||
var shuju='[{"name":"浦东支队","number":"156","zhanbi":"3%"},{"name":"黄浦支队","number":"144","zhanbi":"2.8%"},' |
var shuju = |
||||||
shuju+='{"name":"徐汇支队","number":"133","zhanbi":"2.1%"},{"name":"长宁支队","number":"122","zhanbi":"1.6%"},' |
'[{"name":"浦东支队","number":"156","zhanbi":"3%"},{"name":"黄浦支队","number":"144","zhanbi":"2.8%"},'; |
||||||
shuju+='{"name":"静安支队","number":"120","zhanbi":"1.3%"},{"name":"普陀支队","number":"100","zhanbi":"1.1%"},' |
shuju += |
||||||
shuju+='{"name":"虹口支队","number":"95","zhanbi":"1%"},{"name":"杨浦支队","number":"90","zhanbi":"0.9%"},' |
'{"name":"徐汇支队","number":"133","zhanbi":"2.1%"},{"name":"长宁支队","number":"122","zhanbi":"1.6%"},'; |
||||||
shuju+='{"name":"闵行支队","number":"88","zhanbi":"0.8%"},{"name":"宝山支队","number":"83","zhanbi":"0.7%"},' |
shuju += |
||||||
shuju+='{"name":"徐汇支队","number":"133","zhanbi":"2.1%"},{"name":"长宁支队","number":"122","zhanbi":"1.6%"},' |
'{"name":"静安支队","number":"120","zhanbi":"1.3%"},{"name":"普陀支队","number":"100","zhanbi":"1.1%"},'; |
||||||
shuju+='{"name":"嘉定支队","number":"78","zhanbi":"0.6%"},{"name":"松江支队","number":"75","zhanbi":"0.5%"},' |
shuju += |
||||||
shuju+='{"name":"金山支队","number":"65","zhanbi":"0.4%"},{"name":"崇明支队","number":"55","zhanbi":"0.3%"}]' |
'{"name":"虹口支队","number":"95","zhanbi":"1%"},{"name":"杨浦支队","number":"90","zhanbi":"0.9%"},'; |
||||||
var jsonObj = JSON.parse(shuju); |
shuju += |
||||||
var res = '<div class="tishi" style=" backgroundColor:rgba(255,255,255,1);width:100%;height:100%;"><div style="padding:10px 0 5px 0"><span style="color:#000000;font-size:30px;text-align: center;display:block;">'+biaotou+'</span></div>' |
'{"name":"闵行支队","number":"88","zhanbi":"0.8%"},{"name":"宝山支队","number":"83","zhanbi":"0.7%"},'; |
||||||
res+='</br><div style="width:300px;height:100%;padding:0 20px 15px 20px"><table style="width:300px; background:#FFFFFF; color:#000000;border-collapse:collapse;"cellspacing="0"; >'; |
shuju += |
||||||
res+='<thead><tr>'; |
'{"name":"徐汇支队","number":"133","zhanbi":"2.1%"},{"name":"长宁支队","number":"122","zhanbi":"1.6%"},'; |
||||||
res+='<td style="text-align:center;width:30%;border:1px solid #000000">名称</td>'; |
shuju += |
||||||
res+='<td style="text-align:center;width:30%;border:1px solid #000000">数量</td>' |
'{"name":"嘉定支队","number":"78","zhanbi":"0.6%"},{"name":"松江支队","number":"75","zhanbi":"0.5%"},'; |
||||||
res+='<td style="text-align:center;width:30%;border:1px solid #000000">总占比</td>' |
shuju += |
||||||
res+='</tr></thead>' |
'{"name":"金山支队","number":"65","zhanbi":"0.4%"},{"name":"崇明支队","number":"55","zhanbi":"0.3%"}]'; |
||||||
res+='<tbody>'; |
var jsonObj = JSON.parse(shuju); |
||||||
for(var i=0;i<jsonObj.length;i++){ |
var res = |
||||||
res+='<tr>' |
'<div class="tishi" style=" backgroundColor:rgba(255,255,255,1);width:100%;height:100%;"><div style="padding:10px 0 5px 0"><span style="color:#000000;font-size:30px;text-align: center;display:block;">' + |
||||||
res+='<td style="text-align:center;border:1px solid #000000">'+jsonObj[i].name+'</td>' |
biaotou + |
||||||
res+='<td style="text-align:center;border:1px solid #000000">'+jsonObj[i].number+'</td>' |
"</span></div>"; |
||||||
res+='<td style="text-align:center;border:1px solid #000000">'+jsonObj[i].zhanbi+'</td></tr>' |
res += |
||||||
} |
'</br><div style="width:300px;height:100%;padding:0 20px 15px 20px"><table style="width:300px; background:#FFFFFF; color:#000000;border-collapse:collapse;"cellspacing="0"; >'; |
||||||
|
res += "<thead><tr>"; |
||||||
res+='</tbody>' |
res += |
||||||
res+='<tfoot><td style="text-align:center;border:1px solid #000000">总计</td><td style="text-align:center;border:1px solid #000000">1356</td><td style="text-align:center;border:1px solid #000000">19%</td></tfoot>' |
'<td style="text-align:center;width:30%;border:1px solid #000000">名称</td>'; |
||||||
res+='</table></div></div>' |
res += |
||||||
return res |
'<td style="text-align:center;width:30%;border:1px solid #000000">数量</td>'; |
||||||
} |
res += |
||||||
|
'<td style="text-align:center;width:30%;border:1px solid #000000">总占比</td>'; |
||||||
|
res += "</tr></thead>"; |
||||||
|
res += "<tbody>"; |
||||||
|
for (var i = 0; i < jsonObj.length; i++) { |
||||||
|
res += "<tr>"; |
||||||
|
res += |
||||||
|
'<td style="text-align:center;border:1px solid #000000">' + |
||||||
|
jsonObj[i].name + |
||||||
|
"</td>"; |
||||||
|
res += |
||||||
|
'<td style="text-align:center;border:1px solid #000000">' + |
||||||
|
jsonObj[i].number + |
||||||
|
"</td>"; |
||||||
|
res += |
||||||
|
'<td style="text-align:center;border:1px solid #000000">' + |
||||||
|
jsonObj[i].zhanbi + |
||||||
|
"</td></tr>"; |
||||||
|
} |
||||||
|
|
||||||
|
res += "</tbody>"; |
||||||
|
res += |
||||||
|
'<tfoot><td style="text-align:center;border:1px solid #000000">总计</td><td style="text-align:center;border:1px solid #000000">1356</td><td style="text-align:center;border:1px solid #000000">19%</td></tfoot>'; |
||||||
|
res += "</table></div></div>"; |
||||||
|
return res; |
||||||
|
} |
||||||
} |
} |
||||||
|
@ -1,227 +1,311 @@ |
|||||||
import { Component, OnInit } from '@angular/core'; |
import { Component, OnInit } from "@angular/core"; |
||||||
import { Router } from '@angular/router'; |
import { Router } from "@angular/router"; |
||||||
import {MatDialog, MatDialogRef, MAT_DIALOG_DATA} from '@angular/material/dialog'; |
import { |
||||||
import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar'; |
MatDialog, |
||||||
import { ActivatedRoute } from '@angular/router'; |
MatDialogRef, |
||||||
import { EchartsDataService } from '../../echarts-data.service'; |
MAT_DIALOG_DATA, |
||||||
|
} from "@angular/material/dialog"; |
||||||
|
import { MatSnackBar, MatSnackBarConfig } from "@angular/material/snack-bar"; |
||||||
|
import { ActivatedRoute } from "@angular/router"; |
||||||
|
import { EchartsDataService } from "../../echarts-data.service"; |
||||||
declare var echarts: any; |
declare var echarts: any; |
||||||
@Component({ |
@Component({ |
||||||
selector: 'app-delete-two-newadd', |
selector: "app-delete-two-newadd", |
||||||
templateUrl: './delete-two-newadd.component.html', |
templateUrl: "./delete-two-newadd.component.html", |
||||||
styleUrls: ['./delete-two-newadd.component.scss'] |
styleUrls: ["./delete-two-newadd.component.scss"], |
||||||
}) |
}) |
||||||
export class DeleteTwoNewaddComponent implements OnInit { |
export class DeleteTwoNewaddComponent implements OnInit { |
||||||
|
constructor( |
||||||
|
private router: Router, |
||||||
|
public dialog: MatDialog, |
||||||
|
public snackBar: MatSnackBar, |
||||||
|
private serviceData: EchartsDataService, |
||||||
|
public route: ActivatedRoute |
||||||
|
) {} |
||||||
|
|
||||||
constructor(private router: Router,public dialog: MatDialog,public snackBar: MatSnackBar,private serviceData: EchartsDataService,public route: ActivatedRoute) { } |
year: String; |
||||||
|
buildingTypeName: String; |
||||||
year:String |
level: String; |
||||||
buildingTypeName:String |
setTimeoutObj; //延时器需要清除
|
||||||
level:String |
|
||||||
setTimeoutObj//延时器需要清除
|
|
||||||
ngOnInit(): void { |
ngOnInit(): void { |
||||||
this.dateInit () |
this.dateInit(); |
||||||
this.bianli() |
this.bianli(); |
||||||
this.route.queryParams.subscribe(params => { |
this.route.queryParams.subscribe((params) => { |
||||||
this.year = params['level']; |
this.year = params["level"]; |
||||||
this.buildingTypeName = params['headtext']; |
this.buildingTypeName = params["headtext"]; |
||||||
|
}); |
||||||
|
this.setTimeoutObj = window.setTimeout(() => { |
||||||
|
this.detailEcharts(); |
||||||
}); |
}); |
||||||
this.setTimeoutObj = window.setTimeout(()=>{ |
|
||||||
this.detailEcharts() |
|
||||||
}) |
|
||||||
} |
} |
||||||
ngOnDestroy(){ |
ngOnDestroy() { |
||||||
window.clearTimeout(this.setTimeoutObj); |
window.clearTimeout(this.setTimeoutObj); |
||||||
this.detailPlanEchart.clear() |
if (this.detailPlanEchart) { |
||||||
this.detailPlanEchart.dispose() |
this.detailPlanEchart.clear(); |
||||||
|
this.detailPlanEchart.dispose(); |
||||||
|
} |
||||||
} |
} |
||||||
|
|
||||||
selectType:string = 'month'; //选择当前的 查询类型 按月/年
|
selectType: string = "month"; //选择当前的 查询类型 按月/年
|
||||||
|
|
||||||
//查询数据
|
//查询数据
|
||||||
years:any = [] |
years: any = []; |
||||||
selectMonth:any = [1,2,3,4,5,6,7,8,9,10,11,12] |
selectMonth: any = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]; |
||||||
|
|
||||||
//日期初始化
|
//日期初始化
|
||||||
dateInit () { |
dateInit() { |
||||||
let date = (new Date()).getFullYear() |
let date = new Date().getFullYear(); |
||||||
for (let i=date; i>=date-10;i--) { |
for (let i = date; i >= date - 10; i--) { |
||||||
this.years.unshift(i) |
this.years.unshift(i); |
||||||
} |
} |
||||||
} |
} |
||||||
selectOneYear:any = (new Date()).getFullYear() //开始年份
|
selectOneYear: any = new Date().getFullYear(); //开始年份
|
||||||
selectStartMonth:any = 1 //开始月份
|
selectStartMonth: any = 1; //开始月份
|
||||||
Submit (e) { |
Submit(e) {} |
||||||
|
selectStartYear: any = new Date().getFullYear(); //开始年份
|
||||||
} |
|
||||||
selectStartYear:any = (new Date()).getFullYear() //开始年份
|
|
||||||
|
|
||||||
topTextlabel = { |
topTextlabel = { |
||||||
show: true, // 开启显示
|
show: true, // 开启显示
|
||||||
position: 'top', // 在上方显示
|
position: "top", // 在上方显示
|
||||||
distance: 10, // 距离图形元素的距离。当 position 为字符描述值(如 'top'、'insideRight')时候有效。
|
distance: 10, // 距离图形元素的距离。当 position 为字符描述值(如 'top'、'insideRight')时候有效。
|
||||||
verticalAlign: 'middle', |
verticalAlign: "middle", |
||||||
textStyle: { // 数值样式
|
textStyle: { |
||||||
color: 'black', |
// 数值样式
|
||||||
fontSize: 12 |
color: "black", |
||||||
} |
fontSize: 12, |
||||||
}//柱状图数值顶部显示
|
}, |
||||||
zhongNameData = ["浦东中队","黄浦中队","徐汇中队","长宁中队","静安中队","普陀中队","虹口中队","杨浦中队","闵行中队","宝山中队","嘉定中队"] |
}; //柱状图数值顶部显示
|
||||||
zhongNumData = [0,0,0,0,0,0,0,0,0,0,0] |
zhongNameData = [ |
||||||
|
"浦东中队", |
||||||
|
"黄浦中队", |
||||||
|
"徐汇中队", |
||||||
|
"长宁中队", |
||||||
|
"静安中队", |
||||||
|
"普陀中队", |
||||||
|
"虹口中队", |
||||||
|
"杨浦中队", |
||||||
|
"闵行中队", |
||||||
|
"宝山中队", |
||||||
|
"嘉定中队", |
||||||
|
]; |
||||||
|
zhongNumData = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; |
||||||
|
|
||||||
zhiNameData = ["浦东支队","黄浦支队","徐汇支队","长宁支队","静安支队","普陀支队","虹口支队","杨浦支队","闵行支队","宝山支队","嘉定支队"] |
zhiNameData = [ |
||||||
zhiNumData = [0,0,0,0,0,0,0,0,0,0,0] |
"浦东支队", |
||||||
tiaoshiPao:any |
"黄浦支队", |
||||||
|
"徐汇支队", |
||||||
|
"长宁支队", |
||||||
|
"静安支队", |
||||||
|
"普陀支队", |
||||||
|
"虹口支队", |
||||||
|
"杨浦支队", |
||||||
|
"闵行支队", |
||||||
|
"宝山支队", |
||||||
|
"嘉定支队", |
||||||
|
]; |
||||||
|
zhiNumData = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; |
||||||
|
tiaoshiPao: any; |
||||||
//气泡提示数据获取
|
//气泡提示数据获取
|
||||||
bianli(){ |
bianli() { |
||||||
var arrshuzu='['; |
var arrshuzu = "["; |
||||||
for(var i=0;i<this.dateNum.length;i++){ |
for (var i = 0; i < this.dateNum.length; i++) { |
||||||
arrshuzu+='{"value":'+this.dateNum[i]+',"coord":['+i+','+this.dateNum[i]+'],"name":'+'"'+this.date[i]+'"'+'},' |
arrshuzu += |
||||||
|
'{"value":' + |
||||||
|
this.dateNum[i] + |
||||||
|
',"coord":[' + |
||||||
|
i + |
||||||
|
"," + |
||||||
|
this.dateNum[i] + |
||||||
|
'],"name":' + |
||||||
|
'"' + |
||||||
|
this.date[i] + |
||||||
|
'"' + |
||||||
|
"},"; |
||||||
} |
} |
||||||
arrshuzu=arrshuzu.substring(0,arrshuzu.length-1) |
arrshuzu = arrshuzu.substring(0, arrshuzu.length - 1); |
||||||
arrshuzu+=']' |
arrshuzu += "]"; |
||||||
this.tiaoshiPao=JSON.parse(arrshuzu) |
this.tiaoshiPao = JSON.parse(arrshuzu); |
||||||
//return tishiPao
|
//return tishiPao
|
||||||
} |
} |
||||||
//返回
|
//返回
|
||||||
goBack () { |
goBack() { |
||||||
history.go(-1) |
history.go(-1); |
||||||
//this.echartsData.statefulInspectionToggle = true
|
//this.echartsData.statefulInspectionToggle = true
|
||||||
} |
} |
||||||
|
|
||||||
detailPlanEchart |
detailPlanEchart; |
||||||
option |
option; |
||||||
date = ['高层', '轨道交通', '储罐类', '古建筑', '地下', '化工生产', '厂房', '商市场'] |
date = [ |
||||||
dateNum = [0, 0, 0, 0, 0, 0, 0, 0] |
"高层", |
||||||
|
"轨道交通", |
||||||
|
"储罐类", |
||||||
|
"古建筑", |
||||||
|
"地下", |
||||||
|
"化工生产", |
||||||
|
"厂房", |
||||||
|
"商市场", |
||||||
|
]; |
||||||
|
dateNum = [0, 0, 0, 0, 0, 0, 0, 0]; |
||||||
|
|
||||||
detailEcharts(){ |
detailEcharts() { |
||||||
this.detailPlanEchart = echarts.init(document.getElementById('barEchart'), 'skinUpp');
|
this.detailPlanEchart = echarts.init( |
||||||
|
document.getElementById("barEchart"), |
||||||
|
"skinUpp" |
||||||
|
); |
||||||
this.option = { |
this.option = { |
||||||
grid: { |
grid: { |
||||||
top: 90, |
top: 90, |
||||||
left:40, |
left: 40, |
||||||
right: 20, |
right: 20, |
||||||
//bottom: 20,
|
//bottom: 20,
|
||||||
}, |
}, |
||||||
// 标题
|
// 标题
|
||||||
title: { |
title: { |
||||||
text: this.buildingTypeName + '(' + this.year + ')', |
text: this.buildingTypeName + "(" + this.year + ")", |
||||||
top: -4, |
top: -4, |
||||||
left: 'center', |
left: "center", |
||||||
textStyle:{ |
textStyle: { |
||||||
//文字颜色
|
//文字颜色
|
||||||
color:'#000', |
color: "#000", |
||||||
fontSize: 30 |
fontSize: 30, |
||||||
} |
}, |
||||||
}, |
}, |
||||||
//提示框
|
//提示框
|
||||||
tooltip: { |
tooltip: { |
||||||
trigger: 'axis', |
trigger: "axis", |
||||||
formatter: (params)=>{ |
formatter: (params) => { |
||||||
if(params[0].seriesName == "year"){ |
if (params[0].seriesName == "year") { |
||||||
return this.serviceData.tableTooltip(this.serviceData.monthTooltip,params[0].name) |
return this.serviceData.tableTooltip( |
||||||
}else{ |
this.serviceData.monthTooltip, |
||||||
return this.serviceData.tableTooltip(this.serviceData.tableDataZhi,params[0].name) |
params[0].name |
||||||
|
); |
||||||
|
} else { |
||||||
|
return this.serviceData.tableTooltip( |
||||||
|
this.serviceData.tableDataZhi, |
||||||
|
params[0].name |
||||||
|
); |
||||||
} |
} |
||||||
}, |
}, |
||||||
position:this.serviceData.tableTooltipNoShow2 |
position: this.serviceData.tableTooltipNoShow2, |
||||||
}, |
}, |
||||||
// x轴
|
// x轴
|
||||||
xAxis: { |
xAxis: { |
||||||
type: 'category', |
type: "category", |
||||||
data: this.date, |
data: this.date, |
||||||
axisLabel: { |
axisLabel: { |
||||||
color: "#000", //刻度线标签颜色
|
color: "#000", //刻度线标签颜色
|
||||||
textStyle:{ |
textStyle: { |
||||||
fontSize :18, |
fontSize: 18, |
||||||
color:'#000000' |
color: "#000000", |
||||||
} |
}, |
||||||
}, |
}, |
||||||
//设置坐标轴字体颜色和宽度
|
//设置坐标轴字体颜色和宽度
|
||||||
axisLine: {
|
axisLine: { |
||||||
lineStyle: { |
lineStyle: { |
||||||
color: "#000", |
color: "#000", |
||||||
}, |
}, |
||||||
}, |
}, |
||||||
splitLine: {//分割线配置
|
splitLine: { |
||||||
show:true, |
//分割线配置
|
||||||
|
show: true, |
||||||
lineStyle: { |
lineStyle: { |
||||||
color: '#999', |
color: "#999", |
||||||
} |
}, |
||||||
} |
}, |
||||||
}, |
}, |
||||||
// y轴
|
// y轴
|
||||||
yAxis: { |
yAxis: { |
||||||
type: 'value', |
type: "value", |
||||||
name: '个', |
name: "个", |
||||||
axisLabel: { |
axisLabel: { |
||||||
//color: "#000", //刻度线标签颜色
|
//color: "#000", //刻度线标签颜色
|
||||||
textStyle:{ |
textStyle: { |
||||||
fontSize :18, |
fontSize: 18, |
||||||
color:'#000000' |
color: "#000000", |
||||||
} |
}, |
||||||
}, |
}, |
||||||
//设置坐标轴字体颜色和宽度
|
//设置坐标轴字体颜色和宽度
|
||||||
axisLine: { |
axisLine: { |
||||||
lineStyle: { |
lineStyle: { |
||||||
color: "#000", |
color: "#000", |
||||||
} |
}, |
||||||
} |
}, |
||||||
}, |
}, |
||||||
// 数据
|
// 数据
|
||||||
series: [{ |
series: [ |
||||||
name: 'xxx', |
{ |
||||||
type: 'line', |
name: "xxx", |
||||||
|
type: "line", |
||||||
markPoint: { |
markPoint: { |
||||||
symbolSize:[65, 65], |
symbolSize: [65, 65], |
||||||
data: this.tiaoshiPao |
data: this.tiaoshiPao, |
||||||
}, |
}, |
||||||
data: this.dateNum, |
data: this.dateNum, |
||||||
} |
}, |
||||||
], |
], |
||||||
}; |
}; |
||||||
this.detailPlanEchart.setOption(this.option); |
this.detailPlanEchart.setOption(this.option); |
||||||
this.detailPlanEchart.getZr().on('click',params=>{ |
this.detailPlanEchart.getZr().on("click", (params) => { |
||||||
const pointInPixel= [params.offsetX, params.offsetY]; |
const pointInPixel = [params.offsetX, params.offsetY]; |
||||||
if (this.detailPlanEchart.containPixel('grid',pointInPixel)) { |
if (this.detailPlanEchart.containPixel("grid", pointInPixel)) { |
||||||
let xIndex=this.detailPlanEchart.convertFromPixel({seriesIndex:0},[params.offsetX, params.offsetY])[0]; |
let xIndex = this.detailPlanEchart.convertFromPixel( |
||||||
|
{ seriesIndex: 0 }, |
||||||
|
[params.offsetX, params.offsetY] |
||||||
|
)[0]; |
||||||
/*事件处理代码书写位置*/ |
/*事件处理代码书写位置*/ |
||||||
if(this.serviceData.level=='0'){ |
if (this.serviceData.level == "0") { |
||||||
this.router.navigate(['/statisticanalysis/delete_one/delete_there'],{queryParams:{'level':this.option.xAxis.data[xIndex],'headtext':this.buildingTypeName,'zhong':'1'}}); |
this.router.navigate(["/statisticanalysis/delete_one/delete_there"], { |
||||||
}else if(this.serviceData.level=='1'){ |
queryParams: { |
||||||
this.router.navigate(['/statisticanalysis/delete_one/delete_four'],{queryParams:{'level':this.option.xAxis.data[xIndex]+this.buildingTypeName}}); |
level: this.option.xAxis.data[xIndex], |
||||||
|
headtext: this.buildingTypeName, |
||||||
|
zhong: "1", |
||||||
|
}, |
||||||
|
}); |
||||||
|
} else if (this.serviceData.level == "1") { |
||||||
|
this.router.navigate(["/statisticanalysis/delete_one/delete_four"], { |
||||||
|
queryParams: { |
||||||
|
level: this.option.xAxis.data[xIndex] + this.buildingTypeName, |
||||||
|
}, |
||||||
|
}); |
||||||
} |
} |
||||||
|
|
||||||
} |
} |
||||||
}); |
}); |
||||||
} |
} |
||||||
//返回按钮
|
//返回按钮
|
||||||
backBtn(){ |
backBtn() { |
||||||
window.history.go(-1) |
window.history.go(-1); |
||||||
}
|
|
||||||
|
|
||||||
tableTooltip(params:any){ |
|
||||||
var data = [ |
|
||||||
{name:params.name,number:params.value,zhanbi:(params.value/1340 * 100).toFixed(2) + "%"} |
|
||||||
] |
|
||||||
var res = '<div class="tishi" style=" backgroundColor:rgba(255,255,255,1);width:100%;height:100%;"><div style="padding:10px 0 5px 0"><span style="color:#FFFFFF;font-size:27px;text-align: center;display:block;">'+params.name+'</span></div>' |
|
||||||
res+='</br><div style="width:300px;height:100%;padding:0 20px 15px 20px"><table style="width:300px;font-size:16px; color:#FFFFFF;border-collapse:collapse;"cellspacing="0"; >'; |
|
||||||
res+='<thead style="font-size:18px;"><tr>'; |
|
||||||
res+='<td style="text-align:center;width:30%;">名称</td>'; |
|
||||||
res+='<td style="text-align:center;width:30%;">数量</td>' |
|
||||||
res+='<td style="text-align:center;width:30%;">总占比</td>' |
|
||||||
res+='</tr></thead>' |
|
||||||
res+='<tbody>'; |
|
||||||
for(var i=0;i<data.length;i++){ |
|
||||||
res+='<tr>' |
|
||||||
res+='<td style="text-align:center;">'+data[i].name+'</td>' |
|
||||||
res+='<td style="text-align:center;">'+data[i].number+'</td>' |
|
||||||
res+='<td style="text-align:center;">'+data[i].zhanbi+'</td></tr>' |
|
||||||
} |
|
||||||
|
|
||||||
res+='</tbody>' |
|
||||||
// res+='<tfoot><td style="text-align:center;border:1px solid #000000">总计</td><td style="text-align:center;border:1px solid #000000">1356</td><td style="text-align:center;border:1px solid #000000">19%</td></tfoot>'
|
|
||||||
res+='</table></div></div>' |
|
||||||
return res |
|
||||||
} |
} |
||||||
|
|
||||||
|
tableTooltip(params: any) { |
||||||
|
var data = [ |
||||||
|
{ |
||||||
|
name: params.name, |
||||||
|
number: params.value, |
||||||
|
zhanbi: ((params.value / 1340) * 100).toFixed(2) + "%", |
||||||
|
}, |
||||||
|
]; |
||||||
|
var res = |
||||||
|
'<div class="tishi" style=" backgroundColor:rgba(255,255,255,1);width:100%;height:100%;"><div style="padding:10px 0 5px 0"><span style="color:#FFFFFF;font-size:27px;text-align: center;display:block;">' + |
||||||
|
params.name + |
||||||
|
"</span></div>"; |
||||||
|
res += |
||||||
|
'</br><div style="width:300px;height:100%;padding:0 20px 15px 20px"><table style="width:300px;font-size:16px; color:#FFFFFF;border-collapse:collapse;"cellspacing="0"; >'; |
||||||
|
res += '<thead style="font-size:18px;"><tr>'; |
||||||
|
res += '<td style="text-align:center;width:30%;">名称</td>'; |
||||||
|
res += '<td style="text-align:center;width:30%;">数量</td>'; |
||||||
|
res += '<td style="text-align:center;width:30%;">总占比</td>'; |
||||||
|
res += "</tr></thead>"; |
||||||
|
res += "<tbody>"; |
||||||
|
for (var i = 0; i < data.length; i++) { |
||||||
|
res += "<tr>"; |
||||||
|
res += '<td style="text-align:center;">' + data[i].name + "</td>"; |
||||||
|
res += '<td style="text-align:center;">' + data[i].number + "</td>"; |
||||||
|
res += '<td style="text-align:center;">' + data[i].zhanbi + "</td></tr>"; |
||||||
|
} |
||||||
|
|
||||||
|
res += "</tbody>"; |
||||||
|
// res+='<tfoot><td style="text-align:center;border:1px solid #000000">总计</td><td style="text-align:center;border:1px solid #000000">1356</td><td style="text-align:center;border:1px solid #000000">19%</td></tfoot>'
|
||||||
|
res += "</table></div></div>"; |
||||||
|
return res; |
||||||
|
} |
||||||
} |
} |
||||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,310 +1,543 @@ |
|||||||
/* |
/* |
||||||
* @Descripttion:
|
* @Descripttion: |
||||||
* @version:
|
* @version: |
||||||
* @Author: sueRimn |
* @Author: sueRimn |
||||||
* @Date: 2020-09-01 15:24:39 |
* @Date: 2020-09-01 15:24:39 |
||||||
* @LastEditors: sueRimn |
* @LastEditors: sueRimn |
||||||
* @LastEditTime: 2021-07-21 08:54:04 |
* @LastEditTime: 2021-07-21 08:54:04 |
||||||
*/ |
*/ |
||||||
import { Component, OnInit } from '@angular/core'; |
import { Component, OnInit } from "@angular/core"; |
||||||
import { Router } from '@angular/router'; |
import { Router } from "@angular/router"; |
||||||
import {EchartsDataService,} from '../../echarts-data.service' |
import { EchartsDataService } from "../../echarts-data.service"; |
||||||
declare var echarts: any; |
declare var echarts: any; |
||||||
declare var CryptoJS |
declare var CryptoJS; |
||||||
|
|
||||||
@Component({ |
@Component({ |
||||||
selector: 'app-page-one', |
selector: "app-page-one", |
||||||
templateUrl: './page-one.component.html', |
templateUrl: "./page-one.component.html", |
||||||
styleUrls: ['./page-one.component.scss'] |
styleUrls: ["./page-one.component.scss"], |
||||||
}) |
}) |
||||||
export class PageOneComponent implements OnInit { |
export class PageOneComponent implements OnInit { |
||||||
options:any; |
options: any; |
||||||
|
|
||||||
constructor(private router: Router,public echartsData:EchartsDataService) { } |
|
||||||
|
|
||||||
padHw |
constructor(private router: Router, public echartsData: EchartsDataService) {} |
||||||
orid |
|
||||||
|
padHw; |
||||||
|
orid; |
||||||
ngOnInit() { |
ngOnInit() { |
||||||
if(window.matchMedia("(max-width: 1400px)").matches){ |
if (window.matchMedia("(max-width: 1400px)").matches) { |
||||||
this.padHw=true |
this.padHw = true; |
||||||
//this.padjt=
|
//this.padjt=
|
||||||
}else{ |
} else { |
||||||
this.padHw=false |
this.padHw = false; |
||||||
} |
} |
||||||
if(sessionStorage.getItem('refresh') === 'true') { |
if (sessionStorage.getItem("refresh") === "true") { |
||||||
sessionStorage.removeItem('refresh'); |
sessionStorage.removeItem("refresh"); |
||||||
location.reload(); |
location.reload(); |
||||||
} |
} |
||||||
|
|
||||||
window.setTimeout(()=>{ |
window.setTimeout(() => { |
||||||
this.getechartsdata() |
this.getechartsdata(); |
||||||
}) |
}); |
||||||
let jwt = sessionStorage.getItem("token"); |
let jwt = sessionStorage.getItem("token"); |
||||||
let rawJwt = CryptoJS.enc.Base64.parse(jwt.split('.')[1]); |
let rawJwt = CryptoJS.enc.Base64.parse(jwt.split(".")[1]); |
||||||
let identityJson = CryptoJS.enc.Utf8.stringify(rawJwt); |
let identityJson = CryptoJS.enc.Utf8.stringify(rawJwt); |
||||||
let identityJsonparse=JSON.parse(identityJson) |
let identityJsonparse = JSON.parse(identityJson); |
||||||
this.orid=identityJsonparse.oid |
this.orid = identityJsonparse.oid; |
||||||
//console.log(identityJsonparse)
|
//console.log(identityJsonparse)
|
||||||
} |
} |
||||||
ngOnDestroy(): void { |
ngOnDestroy(): void { |
||||||
this.indexBzt.clear() |
if (!this.indexBzt) { |
||||||
this.indexBzt.dispose() |
return; |
||||||
|
} |
||||||
|
this.indexBzt.clear(); |
||||||
|
this.indexBzt.dispose(); |
||||||
} |
} |
||||||
async getechartsdata(){ |
async getechartsdata() { |
||||||
await this.echartsData.getData(null,`/api/StatisticsAnalysis/Plans`) |
await this.echartsData.getData(null, `/api/StatisticsAnalysis/Plans`); |
||||||
this.initCharts("pieone") |
this.initCharts("pieone"); |
||||||
this.initCharts("pietwo") |
this.initCharts("pietwo"); |
||||||
} |
} |
||||||
//级别和类型转换
|
//级别和类型转换
|
||||||
pieonetype=true//级别
|
pieonetype = true; //级别
|
||||||
clickhuan(){ |
clickhuan() { |
||||||
this.pieonetype=!this.pieonetype |
this.pieonetype = !this.pieonetype; |
||||||
this.initCharts("pieone") |
this.initCharts("pieone"); |
||||||
} |
} |
||||||
|
|
||||||
/* 首页饼状图 */ |
/* 首页饼状图 */ |
||||||
indexBzt |
indexBzt; |
||||||
tabledata |
tabledata; |
||||||
count |
count; |
||||||
indexData |
indexData; |
||||||
planCategoriesData=[]//预案级别
|
planCategoriesData = []; //预案级别
|
||||||
planStatusesData=[]//预案状态
|
planStatusesData = []; //预案状态
|
||||||
planTypeStatisticsdata=[]//预案类型
|
planTypeStatisticsdata = []; //预案类型
|
||||||
initCharts(tid){ |
initCharts(tid) { |
||||||
this.planTypeStatisticsdata=[] |
this.planTypeStatisticsdata = []; |
||||||
this.planCategoriesData=[] |
this.planCategoriesData = []; |
||||||
this.tabledata=JSON.parse(JSON.stringify(this.echartsData.allDate)) |
this.tabledata = JSON.parse(JSON.stringify(this.echartsData.allDate)); |
||||||
if(tid=='pieone') |
if (tid == "pieone") { |
||||||
{ |
if (this.pieonetype) { |
||||||
if(this.pieonetype){ |
this.tabledata[0].planCategoryStatistics.planCategories.forEach( |
||||||
this.tabledata[0].planCategoryStatistics.planCategories.forEach((value,index,array) => { |
(value, index, array) => { |
||||||
if(array[index].planCategoryName=='LevelOne'){ |
if (array[index].planCategoryName == "LevelOne") { |
||||||
this.planCategoriesData.push({name:'Ⅰ级预案',value:array[index].count,planStatusName:array[index].planCategoryName,type:1}) |
this.planCategoriesData.push({ |
||||||
}else if(array[index].planCategoryName=='LevelTwo'){ |
name: "Ⅰ级预案", |
||||||
this.planCategoriesData.push({name:'Ⅱ级预案',value:array[index].count,planStatusName:array[index].planCategoryName,type:2}) |
value: array[index].count, |
||||||
}else if(array[index].planCategoryName=='LevelThree'){ |
planStatusName: array[index].planCategoryName, |
||||||
this.planCategoriesData.push({name:'Ⅲ级预案',value:array[index].count,planStatusName:array[index].planCategoryName,type:3}) |
type: 1, |
||||||
}else if(array[index].planCategoryName=='LevelFour'){ |
}); |
||||||
this.planCategoriesData.push({name:'Ⅳ级预案',value:array[index].count,planStatusName:array[index].planCategoryName,type:4}) |
} else if (array[index].planCategoryName == "LevelTwo") { |
||||||
}else if(array[index].planCategoryName=='LevelFive'){ |
this.planCategoriesData.push({ |
||||||
this.planCategoriesData.push({name:'Ⅴ级预案',value:array[index].count,planStatusName:array[index].planCategoryName,type:5}) |
name: "Ⅱ级预案", |
||||||
|
value: array[index].count, |
||||||
|
planStatusName: array[index].planCategoryName, |
||||||
|
type: 2, |
||||||
|
}); |
||||||
|
} else if (array[index].planCategoryName == "LevelThree") { |
||||||
|
this.planCategoriesData.push({ |
||||||
|
name: "Ⅲ级预案", |
||||||
|
value: array[index].count, |
||||||
|
planStatusName: array[index].planCategoryName, |
||||||
|
type: 3, |
||||||
|
}); |
||||||
|
} else if (array[index].planCategoryName == "LevelFour") { |
||||||
|
this.planCategoriesData.push({ |
||||||
|
name: "Ⅳ级预案", |
||||||
|
value: array[index].count, |
||||||
|
planStatusName: array[index].planCategoryName, |
||||||
|
type: 4, |
||||||
|
}); |
||||||
|
} else if (array[index].planCategoryName == "LevelFive") { |
||||||
|
this.planCategoriesData.push({ |
||||||
|
name: "Ⅴ级预案", |
||||||
|
value: array[index].count, |
||||||
|
planStatusName: array[index].planCategoryName, |
||||||
|
type: 5, |
||||||
|
}); |
||||||
|
} |
||||||
} |
} |
||||||
}); |
); |
||||||
}else{ |
} else { |
||||||
this.tabledata[0].planTypeStatistics.planTypes.forEach((value,index,array) => { |
this.tabledata[0].planTypeStatistics.planTypes.forEach( |
||||||
if(array[index].planTypeName=='Plan2D'){ |
(value, index, array) => { |
||||||
this.planTypeStatisticsdata.push({name:'二维预案',value:array[index].count,planStatusName:array[index].planTypeName,type:1}) |
if (array[index].planTypeName == "Plan2D") { |
||||||
}else if(array[index].planTypeName=='Plan3D'){ |
this.planTypeStatisticsdata.push({ |
||||||
this.planTypeStatisticsdata.push({name:'三维预案',value:array[index].count,planStatusName:array[index].planTypeName,type:2}) |
name: "二维预案", |
||||||
}else if(array[index].planTypeName=='Other'){ |
value: array[index].count, |
||||||
this.planTypeStatisticsdata.push({name:'其它预案',value:array[index].count,planStatusName:array[index].planTypeName,type:3}) |
planStatusName: array[index].planTypeName, |
||||||
}else if(array[index].planTypeName=='PlanText'){ |
type: 1, |
||||||
this.planTypeStatisticsdata.push({name:'文本预案',value:array[index].count,planStatusName:array[index].planTypeName,type:4}) |
}); |
||||||
|
} else if (array[index].planTypeName == "Plan3D") { |
||||||
|
this.planTypeStatisticsdata.push({ |
||||||
|
name: "三维预案", |
||||||
|
value: array[index].count, |
||||||
|
planStatusName: array[index].planTypeName, |
||||||
|
type: 2, |
||||||
|
}); |
||||||
|
} else if (array[index].planTypeName == "Other") { |
||||||
|
this.planTypeStatisticsdata.push({ |
||||||
|
name: "其它预案", |
||||||
|
value: array[index].count, |
||||||
|
planStatusName: array[index].planTypeName, |
||||||
|
type: 3, |
||||||
|
}); |
||||||
|
} else if (array[index].planTypeName == "PlanText") { |
||||||
|
this.planTypeStatisticsdata.push({ |
||||||
|
name: "文本预案", |
||||||
|
value: array[index].count, |
||||||
|
planStatusName: array[index].planTypeName, |
||||||
|
type: 4, |
||||||
|
}); |
||||||
|
} |
||||||
} |
} |
||||||
}); |
); |
||||||
} |
} |
||||||
|
} else { |
||||||
}else{ |
this.tabledata[0].planStatusStatistics.planStatuses.forEach( |
||||||
this.tabledata[0].planStatusStatistics.planStatuses.forEach((value,index,array) => { |
(value, index, array) => { |
||||||
if(array[index].planStatusName=='New'){ |
if (array[index].planStatusName == "New") { |
||||||
this.planStatusesData.push({name:'预案新增',value:array[index].count,type:1,planStatusName:array[index].planStatusName}) |
this.planStatusesData.push({ |
||||||
}else if(array[index].planStatusName=='Auditing'){ |
name: "预案新增", |
||||||
this.planStatusesData.push({name:'预案审核中',value:array[index].count,type:2,planStatusName:array[index].planStatusName}) |
value: array[index].count, |
||||||
}else if(array[index].planStatusName=='Approved'){ |
type: 1, |
||||||
this.planStatusesData.push({name:'预案审核通过',value:array[index].count,type:3,planStatusName:array[index].planStatusName}) |
planStatusName: array[index].planStatusName, |
||||||
}else if(array[index].planStatusName=='Rejected'){ |
}); |
||||||
this.planStatusesData.push({name:'预案审核退回',value:array[index].count,type:4,planStatusName:array[index].planStatusName}) |
} else if (array[index].planStatusName == "Auditing") { |
||||||
}else if(array[index].planStatusName=='Editing'){ |
this.planStatusesData.push({ |
||||||
this.planStatusesData.push({name:'预案编制',value:array[index].count,type:5,planStatusName:array[index].planStatusName}) |
name: "预案审核中", |
||||||
|
value: array[index].count, |
||||||
|
type: 2, |
||||||
|
planStatusName: array[index].planStatusName, |
||||||
|
}); |
||||||
|
} else if (array[index].planStatusName == "Approved") { |
||||||
|
this.planStatusesData.push({ |
||||||
|
name: "预案审核通过", |
||||||
|
value: array[index].count, |
||||||
|
type: 3, |
||||||
|
planStatusName: array[index].planStatusName, |
||||||
|
}); |
||||||
|
} else if (array[index].planStatusName == "Rejected") { |
||||||
|
this.planStatusesData.push({ |
||||||
|
name: "预案审核退回", |
||||||
|
value: array[index].count, |
||||||
|
type: 4, |
||||||
|
planStatusName: array[index].planStatusName, |
||||||
|
}); |
||||||
|
} else if (array[index].planStatusName == "Editing") { |
||||||
|
this.planStatusesData.push({ |
||||||
|
name: "预案编制", |
||||||
|
value: array[index].count, |
||||||
|
type: 5, |
||||||
|
planStatusName: array[index].planStatusName, |
||||||
|
}); |
||||||
|
} |
||||||
} |
} |
||||||
}); |
); |
||||||
} |
} |
||||||
|
|
||||||
|
|
||||||
var ec = echarts as any; |
var ec = echarts as any; |
||||||
this.indexBzt = ec.init(document.getElementById(tid),'walden'); |
this.indexBzt = ec.init(document.getElementById(tid), "walden"); |
||||||
var options={ |
var options = { |
||||||
title: { |
title: { |
||||||
text:tid=='pieone'&&this.pieonetype?`预案级别统计(${this.tabledata[0].planCategoryStatistics.totalCount}份)` :tid=='pieone'&&!this.pieonetype?`预案类型统计(${this.tabledata[0].planTypeStatistics.totalCount}份)`:`预案状态统计(${this.tabledata[0].planStatusStatistics.totalCount}份)`, |
text: |
||||||
top: "7%", |
tid == "pieone" && this.pieonetype |
||||||
left: 'center', |
? `预案级别统计(${this.tabledata[0].planCategoryStatistics.totalCount}份)` |
||||||
textStyle:{ |
: tid == "pieone" && !this.pieonetype |
||||||
fontSize:this.padHw?25: 31 |
? `预案类型统计(${this.tabledata[0].planTypeStatistics.totalCount}份)` |
||||||
} |
: `预案状态统计(${this.tabledata[0].planStatusStatistics.totalCount}份)`, |
||||||
|
top: "7%", |
||||||
|
left: "center", |
||||||
|
textStyle: { |
||||||
|
fontSize: this.padHw ? 25 : 31, |
||||||
|
}, |
||||||
}, |
}, |
||||||
tooltip: { |
tooltip: { |
||||||
trigger: 'item', |
trigger: "item", |
||||||
formatter: (params)=>{ |
formatter: (params) => { |
||||||
this.echartsData.biaogeTishiyuan(params.data,tid,this.pieonetype) |
this.echartsData.biaogeTishiyuan(params.data, tid, this.pieonetype); |
||||||
return this.echartsData.res |
return this.echartsData.res; |
||||||
} |
}, |
||||||
}, |
}, |
||||||
legend: { |
legend: { |
||||||
bottom: 50, |
bottom: 50, |
||||||
left: 'center', |
left: "center", |
||||||
//padding:20,
|
//padding:20,
|
||||||
// itemWidth:60,
|
// itemWidth:60,
|
||||||
// itemHeight:25,
|
// itemHeight:25,
|
||||||
textStyle:{ |
textStyle: { |
||||||
fontSize:this.padHw?15: 18, |
fontSize: this.padHw ? 15 : 18, |
||||||
color:"#000000" |
color: "#000000", |
||||||
}, |
}, |
||||||
data:tid=='pieone'&&this.pieonetype?['Ⅰ级预案', 'Ⅱ级预案', 'Ⅲ级预案', 'Ⅳ级预案', 'Ⅴ级预案']:tid=='pieone'&&!this.pieonetype?['二维预案', '三维预案', '其它预案', '文本预案'] :['预案新增', '预案审核通过', '预案编制', '预案审核退回', '预案审核中'] |
data: |
||||||
|
tid == "pieone" && this.pieonetype |
||||||
|
? ["Ⅰ级预案", "Ⅱ级预案", "Ⅲ级预案", "Ⅳ级预案", "Ⅴ级预案"] |
||||||
|
: tid == "pieone" && !this.pieonetype |
||||||
|
? ["二维预案", "三维预案", "其它预案", "文本预案"] |
||||||
|
: [ |
||||||
|
"预案新增", |
||||||
|
"预案审核通过", |
||||||
|
"预案编制", |
||||||
|
"预案审核退回", |
||||||
|
"预案审核中", |
||||||
|
], |
||||||
}, |
}, |
||||||
series: [ |
series: [ |
||||||
{ |
{ |
||||||
name: '访问来源', |
name: "访问来源", |
||||||
type: 'pie', |
type: "pie", |
||||||
radius: '50%', |
radius: "50%", |
||||||
center: ['50%', '45%'], |
center: ["50%", "45%"], |
||||||
label:{ |
label: { |
||||||
normal:{ |
normal: { |
||||||
show:true, |
show: true, |
||||||
// position: 'inner',
|
// position: 'inner',
|
||||||
fontSize:this.padHw?14: 18, |
fontSize: this.padHw ? 14 : 18, |
||||||
formatter:this.padHw?'{b} \n{c}份({d}%)' :'{b} {c}份\n({d}%)', |
formatter: this.padHw ? "{b} \n{c}份({d}%)" : "{b} {c}份\n({d}%)", |
||||||
}, |
}, |
||||||
rich: { |
rich: { |
||||||
d: { |
d: { |
||||||
align: 'center', |
align: "center", |
||||||
} |
|
||||||
}, |
|
||||||
|
|
||||||
}, |
}, |
||||||
data:tid=='pieone'&&this.pieonetype?this.planCategoriesData:tid=='pieone'&&!this.pieonetype?this.planTypeStatisticsdata:this.planStatusesData, |
}, |
||||||
emphasis: { |
}, |
||||||
itemStyle: { |
data: |
||||||
shadowBlur: 10, |
tid == "pieone" && this.pieonetype |
||||||
shadowOffsetX: 0, |
? this.planCategoriesData |
||||||
shadowColor: 'rgba(0, 0, 0, 0.5)' |
: tid == "pieone" && !this.pieonetype |
||||||
} |
? this.planTypeStatisticsdata |
||||||
} |
: this.planStatusesData, |
||||||
} |
emphasis: { |
||||||
] |
itemStyle: { |
||||||
|
shadowBlur: 10, |
||||||
|
shadowOffsetX: 0, |
||||||
|
shadowColor: "rgba(0, 0, 0, 0.5)", |
||||||
|
}, |
||||||
|
}, |
||||||
|
}, |
||||||
|
], |
||||||
}; |
}; |
||||||
this.indexBzt.on('click', (params) => { |
this.indexBzt.on("click", (params) => { |
||||||
// console.log(params)
|
// console.log(params)
|
||||||
if(tid=='pieone'){ |
if (tid == "pieone") { |
||||||
if(this.pieonetype){ |
if (this.pieonetype) { |
||||||
for(var i=0;i<this.tabledata[0].planCategoryStatistics.planCategories.length;i++){ |
for ( |
||||||
if(this.tabledata[0].planCategoryStatistics.planCategories[i].planCategoryName==params.data.planStatusName){ |
var i = 0; |
||||||
if((this.echartsData.level=='0'||this.echartsData.level=='1'||this.echartsData.level=='2')&&this.tabledata[0].planCategoryStatistics.planCategories[i].organizations.length>0){ |
i < this.tabledata[0].planCategoryStatistics.planCategories.length; |
||||||
this.tabledata[0].planCategoryStatistics.planCategories[i].organizations.forEach((element,index,array) => { |
i++ |
||||||
if(array[index].organizationId==this.orid){ |
) { |
||||||
array.splice(index,1) |
if ( |
||||||
|
this.tabledata[0].planCategoryStatistics.planCategories[i] |
||||||
|
.planCategoryName == params.data.planStatusName |
||||||
|
) { |
||||||
|
if ( |
||||||
|
(this.echartsData.level == "0" || |
||||||
|
this.echartsData.level == "1" || |
||||||
|
this.echartsData.level == "2") && |
||||||
|
this.tabledata[0].planCategoryStatistics.planCategories[i] |
||||||
|
.organizations.length > 0 |
||||||
|
) { |
||||||
|
this.tabledata[0].planCategoryStatistics.planCategories[ |
||||||
|
i |
||||||
|
].organizations.forEach((element, index, array) => { |
||||||
|
if (array[index].organizationId == this.orid) { |
||||||
|
array.splice(index, 1); |
||||||
} |
} |
||||||
window.setTimeout(()=>{ |
window.setTimeout(() => { |
||||||
if(array.length>0){ |
if (array.length > 0) { |
||||||
this.router.navigate(['/statisticanalysis/statePageOne/time'],{queryParams:{'level':params.name,'type':params.data.type,'tid':'pieone','pieonetype':this.pieonetype}}); |
this.router.navigate( |
||||||
} |
["/statisticanalysis/statePageOne/time"], |
||||||
else{ |
{ |
||||||
this.router.navigate(['/statisticanalysis/AllPlan'],{queryParams:{'xname':params.name,'name':params.name,'id':null,'type':params.data.type,'tid':'pieone','pieonetype':this.pieonetype}}); |
queryParams: { |
||||||
|
level: params.name, |
||||||
|
type: params.data.type, |
||||||
|
tid: "pieone", |
||||||
|
pieonetype: this.pieonetype, |
||||||
|
}, |
||||||
|
} |
||||||
|
); |
||||||
|
} else { |
||||||
|
this.router.navigate(["/statisticanalysis/AllPlan"], { |
||||||
|
queryParams: { |
||||||
|
xname: params.name, |
||||||
|
name: params.name, |
||||||
|
id: null, |
||||||
|
type: params.data.type, |
||||||
|
tid: "pieone", |
||||||
|
pieonetype: this.pieonetype, |
||||||
|
}, |
||||||
|
}); |
||||||
} |
} |
||||||
}) |
}); |
||||||
}); |
}); |
||||||
|
} else if (this.echartsData.level == "3") { |
||||||
} |
|
||||||
else if(this.echartsData.level=='3'){ |
|
||||||
//中队跳转
|
//中队跳转
|
||||||
this.router.navigate(['/statisticanalysis/AllPlan'],{queryParams:{'xname':params.name,'name':params.name,'id':null,'type':params.data.type,'tid':'pieone','pieonetype':this.pieonetype}}); |
this.router.navigate(["/statisticanalysis/AllPlan"], { |
||||||
|
queryParams: { |
||||||
|
xname: params.name, |
||||||
|
name: params.name, |
||||||
|
id: null, |
||||||
|
type: params.data.type, |
||||||
|
tid: "pieone", |
||||||
|
pieonetype: this.pieonetype, |
||||||
|
}, |
||||||
|
}); |
||||||
} |
} |
||||||
} |
} |
||||||
} |
} |
||||||
}else{ |
} else { |
||||||
for(var i=0;i<this.tabledata[0].planTypeStatistics.planTypes.length;i++){ |
for ( |
||||||
if(this.tabledata[0].planTypeStatistics.planTypes[i].planTypeName==params.data.planStatusName){ |
var i = 0; |
||||||
if((this.echartsData.level=='0'||this.echartsData.level=='1'||this.echartsData.level=='2')&&this.tabledata[0].planCategoryStatistics.planCategories[i].organizations.length>0){ |
i < this.tabledata[0].planTypeStatistics.planTypes.length; |
||||||
this.tabledata[0].planTypeStatistics.planTypes[i].organizations.forEach((element,index,array) => { |
i++ |
||||||
if(array[index].organizationId==this.orid){ |
) { |
||||||
array.splice(index,1) |
if ( |
||||||
|
this.tabledata[0].planTypeStatistics.planTypes[i].planTypeName == |
||||||
|
params.data.planStatusName |
||||||
|
) { |
||||||
|
if ( |
||||||
|
(this.echartsData.level == "0" || |
||||||
|
this.echartsData.level == "1" || |
||||||
|
this.echartsData.level == "2") && |
||||||
|
this.tabledata[0].planCategoryStatistics.planCategories[i] |
||||||
|
.organizations.length > 0 |
||||||
|
) { |
||||||
|
this.tabledata[0].planTypeStatistics.planTypes[ |
||||||
|
i |
||||||
|
].organizations.forEach((element, index, array) => { |
||||||
|
if (array[index].organizationId == this.orid) { |
||||||
|
array.splice(index, 1); |
||||||
} |
} |
||||||
window.setTimeout(()=>{ |
window.setTimeout(() => { |
||||||
if(array.length>0){ |
if (array.length > 0) { |
||||||
this.router.navigate(['/statisticanalysis/statePageOne/time'],{queryParams:{'level':params.name,'type':params.data.type,'tid':'pieone','pieonetype':this.pieonetype}}); |
this.router.navigate( |
||||||
} |
["/statisticanalysis/statePageOne/time"], |
||||||
else{ |
{ |
||||||
this.router.navigate(['/statisticanalysis/AllPlan'],{queryParams:{'xname':params.name,'name':params.name,'id':null,'type':params.data.type,'tid':'pieone','pieonetype':this.pieonetype}}); |
queryParams: { |
||||||
|
level: params.name, |
||||||
|
type: params.data.type, |
||||||
|
tid: "pieone", |
||||||
|
pieonetype: this.pieonetype, |
||||||
|
}, |
||||||
|
} |
||||||
|
); |
||||||
|
} else { |
||||||
|
this.router.navigate(["/statisticanalysis/AllPlan"], { |
||||||
|
queryParams: { |
||||||
|
xname: params.name, |
||||||
|
name: params.name, |
||||||
|
id: null, |
||||||
|
type: params.data.type, |
||||||
|
tid: "pieone", |
||||||
|
pieonetype: this.pieonetype, |
||||||
|
}, |
||||||
|
}); |
||||||
} |
} |
||||||
}) |
}); |
||||||
}); |
}); |
||||||
|
} else if (this.echartsData.level == "3") { |
||||||
} |
|
||||||
else if(this.echartsData.level=='3'){ |
|
||||||
//中队跳转
|
//中队跳转
|
||||||
this.router.navigate(['/statisticanalysis/AllPlan'],{queryParams:{'xname':params.name,'name':params.name,'id':null,'type':params.data.type,'tid':'pieone','pieonetype':this.pieonetype}}); |
this.router.navigate(["/statisticanalysis/AllPlan"], { |
||||||
|
queryParams: { |
||||||
|
xname: params.name, |
||||||
|
name: params.name, |
||||||
|
id: null, |
||||||
|
type: params.data.type, |
||||||
|
tid: "pieone", |
||||||
|
pieonetype: this.pieonetype, |
||||||
|
}, |
||||||
|
}); |
||||||
} |
} |
||||||
} |
} |
||||||
} |
} |
||||||
} |
} |
||||||
|
} else { |
||||||
}else{ |
for ( |
||||||
for(var i=0;i<this.tabledata[0].planStatusStatistics.planStatuses.length;i++){ |
var i = 0; |
||||||
if(this.tabledata[0].planStatusStatistics.planStatuses[i].planStatusName==params.data.planStatusName){ |
i < this.tabledata[0].planStatusStatistics.planStatuses.length; |
||||||
if((this.echartsData.level=='0'||this.echartsData.level=='1'||this.echartsData.level=='2')&&this.tabledata[0].planStatusStatistics.planStatuses[i].organizations.length>0){ |
i++ |
||||||
this.tabledata[0].planStatusStatistics.planStatuses[i].organizations.forEach((element,index,array) => { |
) { |
||||||
if(array[index].organizationId==this.orid){ |
if ( |
||||||
array.splice(index,1) |
this.tabledata[0].planStatusStatistics.planStatuses[i] |
||||||
|
.planStatusName == params.data.planStatusName |
||||||
|
) { |
||||||
|
if ( |
||||||
|
(this.echartsData.level == "0" || |
||||||
|
this.echartsData.level == "1" || |
||||||
|
this.echartsData.level == "2") && |
||||||
|
this.tabledata[0].planStatusStatistics.planStatuses[i] |
||||||
|
.organizations.length > 0 |
||||||
|
) { |
||||||
|
this.tabledata[0].planStatusStatistics.planStatuses[ |
||||||
|
i |
||||||
|
].organizations.forEach((element, index, array) => { |
||||||
|
if (array[index].organizationId == this.orid) { |
||||||
|
array.splice(index, 1); |
||||||
} |
} |
||||||
window.setTimeout(()=>{ |
window.setTimeout(() => { |
||||||
if(array.length>0){ |
if (array.length > 0) { |
||||||
this.router.navigate(['/statisticanalysis/statePageOne/time'],{queryParams:{'level':params.name,'type':params.data.type,'tid':'pietwo'}}); |
this.router.navigate( |
||||||
} |
["/statisticanalysis/statePageOne/time"], |
||||||
else{ |
{ |
||||||
this.router.navigate(['/statisticanalysis/AllPlan'],{queryParams:{'xname':params.name,'name':params.name,'id':null,'type':params.data.type,'tid':'pietwo'}}); |
queryParams: { |
||||||
|
level: params.name, |
||||||
|
type: params.data.type, |
||||||
|
tid: "pietwo", |
||||||
|
}, |
||||||
|
} |
||||||
|
); |
||||||
|
} else { |
||||||
|
this.router.navigate(["/statisticanalysis/AllPlan"], { |
||||||
|
queryParams: { |
||||||
|
xname: params.name, |
||||||
|
name: params.name, |
||||||
|
id: null, |
||||||
|
type: params.data.type, |
||||||
|
tid: "pietwo", |
||||||
|
}, |
||||||
|
}); |
||||||
} |
} |
||||||
}) |
}); |
||||||
}); |
}); |
||||||
|
} else if (this.echartsData.level == "3") { |
||||||
} |
|
||||||
else if(this.echartsData.level=='3'){ |
|
||||||
//中队跳转
|
//中队跳转
|
||||||
this.router.navigate(['/statisticanalysis/AllPlan'],{queryParams:{'xname':params.name,'name':params.name,'id':null,'type':params.data.type,'tid':'pietwo'}}); |
this.router.navigate(["/statisticanalysis/AllPlan"], { |
||||||
|
queryParams: { |
||||||
|
xname: params.name, |
||||||
|
name: params.name, |
||||||
|
id: null, |
||||||
|
type: params.data.type, |
||||||
|
tid: "pietwo", |
||||||
|
}, |
||||||
|
}); |
||||||
} |
} |
||||||
} |
} |
||||||
} |
} |
||||||
} |
} |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}); |
}); |
||||||
this.indexBzt.setOption(options); |
this.indexBzt.setOption(options); |
||||||
} |
} |
||||||
/** |
/** |
||||||
* @name: 表格提示框封装 |
* @name: 表格提示框封装 |
||||||
* @test: test font |
* @test: test font |
||||||
* @msg:
|
* @msg: |
||||||
* @param {string(表头)} |
* @param {string(表头)} |
||||||
* @return {type}
|
* @return {type} |
||||||
*/ |
*/ |
||||||
biaogeTishi(biaotou:string){ |
biaogeTishi(biaotou: string) { |
||||||
var shuju='[{"name":"浦东支队","number":"156","zhanbi":"3%"},{"name":"黄浦支队","number":"144","zhanbi":"2.8%"},' |
var shuju = |
||||||
shuju+='{"name":"徐汇支队","number":"133","zhanbi":"2.1%"},{"name":"长宁支队","number":"122","zhanbi":"1.6%"},' |
'[{"name":"浦东支队","number":"156","zhanbi":"3%"},{"name":"黄浦支队","number":"144","zhanbi":"2.8%"},'; |
||||||
shuju+='{"name":"静安支队","number":"120","zhanbi":"1.3%"},{"name":"普陀支队","number":"100","zhanbi":"1.1%"},' |
shuju += |
||||||
shuju+='{"name":"虹口支队","number":"95","zhanbi":"1%"},{"name":"杨浦支队","number":"90","zhanbi":"0.9%"},' |
'{"name":"徐汇支队","number":"133","zhanbi":"2.1%"},{"name":"长宁支队","number":"122","zhanbi":"1.6%"},'; |
||||||
shuju+='{"name":"闵行支队","number":"88","zhanbi":"0.8%"},{"name":"宝山支队","number":"83","zhanbi":"0.7%"},' |
shuju += |
||||||
shuju+='{"name":"徐汇支队","number":"133","zhanbi":"2.1%"},{"name":"长宁支队","number":"122","zhanbi":"1.6%"},' |
'{"name":"静安支队","number":"120","zhanbi":"1.3%"},{"name":"普陀支队","number":"100","zhanbi":"1.1%"},'; |
||||||
shuju+='{"name":"嘉定支队","number":"78","zhanbi":"0.6%"},{"name":"松江支队","number":"75","zhanbi":"0.5%"},' |
shuju += |
||||||
shuju+='{"name":"金山支队","number":"65","zhanbi":"0.4%"},{"name":"崇明支队","number":"55","zhanbi":"0.3%"}]' |
'{"name":"虹口支队","number":"95","zhanbi":"1%"},{"name":"杨浦支队","number":"90","zhanbi":"0.9%"},'; |
||||||
var jsonObj = JSON.parse(shuju); |
shuju += |
||||||
var res = '<div class="tishi" style=" backgroundColor:rgba(255,255,255,1);width:100%;height:100%;"><div style="padding:10px 0 5px 0"><span style="color:#000000;font-size:30px;text-align: center;display:block;">'+biaotou+'</span></div>' |
'{"name":"闵行支队","number":"88","zhanbi":"0.8%"},{"name":"宝山支队","number":"83","zhanbi":"0.7%"},'; |
||||||
res+='</br><div style="width:300px;height:100%;padding:0 20px 15px 20px"><table style="width:300px; background:#FFFFFF; color:#000000;border-collapse:collapse;"cellspacing="0"; >'; |
shuju += |
||||||
res+='<thead><tr>'; |
'{"name":"徐汇支队","number":"133","zhanbi":"2.1%"},{"name":"长宁支队","number":"122","zhanbi":"1.6%"},'; |
||||||
res+='<td style="text-align:center;width:30%;border:1px solid #000000">名称</td>'; |
shuju += |
||||||
res+='<td style="text-align:center;width:30%;border:1px solid #000000">数量</td>' |
'{"name":"嘉定支队","number":"78","zhanbi":"0.6%"},{"name":"松江支队","number":"75","zhanbi":"0.5%"},'; |
||||||
res+='<td style="text-align:center;width:30%;border:1px solid #000000">总占比</td>' |
shuju += |
||||||
res+='</tr></thead>' |
'{"name":"金山支队","number":"65","zhanbi":"0.4%"},{"name":"崇明支队","number":"55","zhanbi":"0.3%"}]'; |
||||||
res+='<tbody>'; |
var jsonObj = JSON.parse(shuju); |
||||||
for(var i=0;i<jsonObj.length;i++){ |
var res = |
||||||
res+='<tr>' |
'<div class="tishi" style=" backgroundColor:rgba(255,255,255,1);width:100%;height:100%;"><div style="padding:10px 0 5px 0"><span style="color:#000000;font-size:30px;text-align: center;display:block;">' + |
||||||
res+='<td style="text-align:center;border:1px solid #000000">'+jsonObj[i].name+'</td>' |
biaotou + |
||||||
res+='<td style="text-align:center;border:1px solid #000000">'+jsonObj[i].number+'</td>' |
"</span></div>"; |
||||||
res+='<td style="text-align:center;border:1px solid #000000">'+jsonObj[i].zhanbi+'</td></tr>' |
res += |
||||||
} |
'</br><div style="width:300px;height:100%;padding:0 20px 15px 20px"><table style="width:300px; background:#FFFFFF; color:#000000;border-collapse:collapse;"cellspacing="0"; >'; |
||||||
|
res += "<thead><tr>"; |
||||||
res+='</tbody>' |
res += |
||||||
res+='<tfoot><td style="text-align:center;border:1px solid #000000">总计</td><td style="text-align:center;border:1px solid #000000">1356</td><td style="text-align:center;border:1px solid #000000">19%</td></tfoot>' |
'<td style="text-align:center;width:30%;border:1px solid #000000">名称</td>'; |
||||||
res+='</table></div></div>' |
res += |
||||||
return res |
'<td style="text-align:center;width:30%;border:1px solid #000000">数量</td>'; |
||||||
} |
res += |
||||||
|
'<td style="text-align:center;width:30%;border:1px solid #000000">总占比</td>'; |
||||||
|
res += "</tr></thead>"; |
||||||
|
res += "<tbody>"; |
||||||
|
for (var i = 0; i < jsonObj.length; i++) { |
||||||
|
res += "<tr>"; |
||||||
|
res += |
||||||
|
'<td style="text-align:center;border:1px solid #000000">' + |
||||||
|
jsonObj[i].name + |
||||||
|
"</td>"; |
||||||
|
res += |
||||||
|
'<td style="text-align:center;border:1px solid #000000">' + |
||||||
|
jsonObj[i].number + |
||||||
|
"</td>"; |
||||||
|
res += |
||||||
|
'<td style="text-align:center;border:1px solid #000000">' + |
||||||
|
jsonObj[i].zhanbi + |
||||||
|
"</td></tr>"; |
||||||
|
} |
||||||
|
|
||||||
|
res += "</tbody>"; |
||||||
|
res += |
||||||
|
'<tfoot><td style="text-align:center;border:1px solid #000000">总计</td><td style="text-align:center;border:1px solid #000000">1356</td><td style="text-align:center;border:1px solid #000000">19%</td></tfoot>'; |
||||||
|
res += "</table></div></div>"; |
||||||
|
return res; |
||||||
|
} |
||||||
} |
} |
||||||
|
@ -0,0 +1,15 @@ |
|||||||
|
<h1 mat-dialog-title>新增App-Key</h1> |
||||||
|
<div mat-dialog-content> |
||||||
|
<mat-form-field style="width: 100%;"> |
||||||
|
<mat-label>app名称</mat-label> |
||||||
|
<input matInput [(ngModel)]="nameData.applicationName"> |
||||||
|
</mat-form-field> |
||||||
|
<mat-form-field style="width: 100%;"> |
||||||
|
<mat-label>厂商名称</mat-label> |
||||||
|
<input matInput [(ngModel)]="nameData.companyName"> |
||||||
|
</mat-form-field> |
||||||
|
</div> |
||||||
|
<div mat-dialog-actions> |
||||||
|
<button mat-button (click)="onNoClick()">取消</button> |
||||||
|
<button mat-button (click)="onClick()" cdkFocusInitial>确定</button> |
||||||
|
</div> |
@ -0,0 +1,39 @@ |
|||||||
|
<div class="app_key_box"> |
||||||
|
<button mat-flat-button color="primary" (click)="openDialog()">新增appKey</button> |
||||||
|
<mat-table [dataSource]="dataSource" class="mat-elevation-z8"> |
||||||
|
<ng-container matColumnDef="num"> |
||||||
|
<mat-header-cell *matHeaderCellDef> 序号 </mat-header-cell> |
||||||
|
<mat-cell *matCellDef="let element;let i =index"> |
||||||
|
{{i+1}} |
||||||
|
</mat-cell> |
||||||
|
</ng-container> |
||||||
|
<ng-container matColumnDef="id"> |
||||||
|
<mat-header-cell *matHeaderCellDef> appKey </mat-header-cell> |
||||||
|
<mat-cell *matCellDef="let element"> {{element.id}} </mat-cell> |
||||||
|
</ng-container> |
||||||
|
<ng-container matColumnDef="applicationName"> |
||||||
|
<mat-header-cell *matHeaderCellDef> app名称 </mat-header-cell> |
||||||
|
<mat-cell *matCellDef="let element"> {{element.applicationName}} </mat-cell> |
||||||
|
</ng-container> |
||||||
|
<ng-container matColumnDef="companyName"> |
||||||
|
<mat-header-cell *matHeaderCellDef> 厂商 </mat-header-cell> |
||||||
|
<mat-cell *matCellDef="let element"> {{element.companyName}} </mat-cell> |
||||||
|
</ng-container> |
||||||
|
<ng-container matColumnDef="appSecret"> |
||||||
|
<mat-header-cell *matHeaderCellDef> appSecret </mat-header-cell> |
||||||
|
<mat-cell *matCellDef="let element"> {{element.appSecret}} </mat-cell> |
||||||
|
</ng-container> |
||||||
|
<ng-container matColumnDef="creationTime"> |
||||||
|
<mat-header-cell *matHeaderCellDef> 创建时间 </mat-header-cell> |
||||||
|
<mat-cell *matCellDef="let element"> {{element.creationTime | date:'yyyy-MM-dd HH:mm:ss' }} </mat-cell> |
||||||
|
</ng-container> |
||||||
|
<ng-container matColumnDef="operate"> |
||||||
|
<mat-header-cell *matHeaderCellDef> 操作 </mat-header-cell> |
||||||
|
<mat-cell *matCellDef="let element;let i =index"> |
||||||
|
<span class="delete" (click)="delete(element,i)">删除</span> |
||||||
|
</mat-cell> |
||||||
|
</ng-container> |
||||||
|
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row> |
||||||
|
<mat-row *matRowDef="let row; columns: displayedColumns;"></mat-row> |
||||||
|
</mat-table> |
||||||
|
</div> |
@ -0,0 +1,18 @@ |
|||||||
|
.app_key_box { |
||||||
|
box-sizing: border-box; |
||||||
|
padding: 10px 20px; |
||||||
|
} |
||||||
|
button { |
||||||
|
margin-bottom: 10px; |
||||||
|
} |
||||||
|
|
||||||
|
table { |
||||||
|
width: 100%; |
||||||
|
} |
||||||
|
.mat-column-num { |
||||||
|
flex: 0.3; |
||||||
|
} |
||||||
|
.delete { |
||||||
|
cursor: pointer; |
||||||
|
color: #f44336; |
||||||
|
} |
@ -0,0 +1,25 @@ |
|||||||
|
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; |
||||||
|
|
||||||
|
import { AppKeyComponent } from './app-key.component'; |
||||||
|
|
||||||
|
describe('AppKeyComponent', () => { |
||||||
|
let component: AppKeyComponent; |
||||||
|
let fixture: ComponentFixture<AppKeyComponent>; |
||||||
|
|
||||||
|
beforeEach(async(() => { |
||||||
|
TestBed.configureTestingModule({ |
||||||
|
declarations: [ AppKeyComponent ] |
||||||
|
}) |
||||||
|
.compileComponents(); |
||||||
|
})); |
||||||
|
|
||||||
|
beforeEach(() => { |
||||||
|
fixture = TestBed.createComponent(AppKeyComponent); |
||||||
|
component = fixture.componentInstance; |
||||||
|
fixture.detectChanges(); |
||||||
|
}); |
||||||
|
|
||||||
|
it('should create', () => { |
||||||
|
expect(component).toBeTruthy(); |
||||||
|
}); |
||||||
|
}); |
@ -0,0 +1,99 @@ |
|||||||
|
import { HttpClient } from "@angular/common/http"; |
||||||
|
import { Component, Inject, OnInit } from "@angular/core"; |
||||||
|
import { |
||||||
|
MatDialog, |
||||||
|
MatDialogRef, |
||||||
|
MAT_DIALOG_DATA, |
||||||
|
} from "@angular/material/dialog"; |
||||||
|
import { MatSnackBar } from "@angular/material/snack-bar"; |
||||||
|
|
||||||
|
@Component({ |
||||||
|
selector: "app-app-key", |
||||||
|
templateUrl: "./app-key.component.html", |
||||||
|
styleUrls: ["./app-key.component.scss"], |
||||||
|
}) |
||||||
|
export class AppKeyComponent implements OnInit { |
||||||
|
constructor(public dialog: MatDialog, private http: HttpClient) {} |
||||||
|
displayedColumns: string[] = [ |
||||||
|
"num", |
||||||
|
"id", |
||||||
|
"applicationName", |
||||||
|
"companyName", |
||||||
|
"appSecret", |
||||||
|
"creationTime", |
||||||
|
"operate", |
||||||
|
]; |
||||||
|
dataSource: any; |
||||||
|
ngOnInit(): void { |
||||||
|
this.getList(); |
||||||
|
} |
||||||
|
|
||||||
|
getList() { |
||||||
|
this.http.get("/api/ExternalApplications").subscribe((res) => { |
||||||
|
this.dataSource = res; |
||||||
|
}); |
||||||
|
} |
||||||
|
openDialog(): void { |
||||||
|
const dialogRef = this.dialog.open(AddKeyDialog, { |
||||||
|
width: "300px", |
||||||
|
data: {}, |
||||||
|
}); |
||||||
|
dialogRef.afterClosed().subscribe((result) => { |
||||||
|
console.log("uuu", result); |
||||||
|
if (result) { |
||||||
|
console.log("uuu", this.dataSource); |
||||||
|
this.dataSource.push(result); |
||||||
|
this.dataSource = [...this.dataSource]; |
||||||
|
} |
||||||
|
}); |
||||||
|
} |
||||||
|
delete(element, index) { |
||||||
|
const isTrue = confirm("你确定要删除这个AppKey吗?"); |
||||||
|
if (isTrue) { |
||||||
|
this.http |
||||||
|
.delete(`/api/ExternalApplications/${element.id}`) |
||||||
|
.subscribe((res) => { |
||||||
|
console.log("删除成功"); |
||||||
|
this.dataSource.splice(index, 1); |
||||||
|
this.dataSource = [...this.dataSource]; |
||||||
|
}); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
@Component({ |
||||||
|
selector: "add-key", |
||||||
|
templateUrl: "./add-key.html", |
||||||
|
}) |
||||||
|
export class AddKeyDialog { |
||||||
|
constructor( |
||||||
|
private http: HttpClient, |
||||||
|
public dialogRef: MatDialogRef<AddKeyDialog>, |
||||||
|
@Inject(MAT_DIALOG_DATA) public data: any, |
||||||
|
private _snackBar: MatSnackBar |
||||||
|
) {} |
||||||
|
|
||||||
|
nameData = { |
||||||
|
applicationName: "", |
||||||
|
companyName: "", |
||||||
|
}; |
||||||
|
|
||||||
|
onNoClick(): void { |
||||||
|
this.dialogRef.close(); |
||||||
|
} |
||||||
|
|
||||||
|
onClick() { |
||||||
|
if (!this.nameData.applicationName || !this.nameData.companyName) { |
||||||
|
return; |
||||||
|
} |
||||||
|
let body = this.nameData; |
||||||
|
this.http.post("/api/ExternalApplications", body).subscribe((res) => { |
||||||
|
this.dialogRef.close(res); |
||||||
|
this._snackBar.open("新建成功", "确定", { |
||||||
|
duration: 500, |
||||||
|
horizontalPosition: "center", |
||||||
|
verticalPosition: "top", |
||||||
|
}); |
||||||
|
}); |
||||||
|
} |
||||||
|
} |
@ -1,109 +1,126 @@ |
|||||||
mat-tree{ |
mat-tree { |
||||||
width:800px; |
width: 800px; |
||||||
button{ |
button { |
||||||
display: block; |
display: block; |
||||||
float: right; |
float: right; |
||||||
} |
} |
||||||
mat-tree-node{ |
mat-tree-node { |
||||||
position: relative; |
position: relative; |
||||||
|
|
||||||
.deleted{ |
.deleted { |
||||||
position: absolute; |
position: absolute; |
||||||
right: 0px; |
right: 0px; |
||||||
} |
} |
||||||
|
|
||||||
.disabled{ |
.disabled { |
||||||
position: absolute; |
position: absolute; |
||||||
right: 40px; |
right: 40px; |
||||||
} |
} |
||||||
|
|
||||||
.edit{ |
.edit { |
||||||
position: absolute; |
position: absolute; |
||||||
right:160px; |
right: 160px; |
||||||
} |
|
||||||
.create{ |
|
||||||
position: absolute; |
|
||||||
right: 200px; |
|
||||||
} |
|
||||||
.up{ |
|
||||||
position: absolute; |
|
||||||
right: 120px; |
|
||||||
} |
|
||||||
.down{ |
|
||||||
position: absolute; |
|
||||||
right: 80px; |
|
||||||
} |
|
||||||
} |
} |
||||||
} |
.create { |
||||||
form{ |
position: absolute; |
||||||
text-align: center; |
right: 200px; |
||||||
button{ |
|
||||||
margin: 0 8px; |
|
||||||
margin-top: 8px; |
|
||||||
} |
} |
||||||
|
.up { |
||||||
|
position: absolute; |
||||||
|
right: 120px; |
||||||
|
} |
||||||
|
.down { |
||||||
|
position: absolute; |
||||||
|
right: 80px; |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
form { |
||||||
|
text-align: center; |
||||||
|
button { |
||||||
|
margin: 0 8px; |
||||||
|
margin-top: 8px; |
||||||
|
} |
||||||
} |
} |
||||||
|
|
||||||
.leftbox{ |
.leftbox { |
||||||
width: 300px; |
width: 300px; |
||||||
float: left; |
float: left; |
||||||
} |
} |
||||||
.treebox{ |
.treebox { |
||||||
float: right; |
float: right; |
||||||
height: 250px; |
height: 250px; |
||||||
width: 300px; |
width: 300px; |
||||||
/* overflow: auto; */ |
/* overflow: auto; */ |
||||||
overflow-x: hidden; |
overflow-x: hidden; |
||||||
overflow-y: auto; |
overflow-y: auto; |
||||||
} |
} |
||||||
.smalltreebox{ |
.smalltreebox { |
||||||
|
width: 300px; |
||||||
|
mat-tree-node { |
||||||
width: 300px; |
width: 300px; |
||||||
mat-tree-node{ |
} |
||||||
width: 300px; |
|
||||||
} |
|
||||||
} |
} |
||||||
.orilist{ |
.orilist { |
||||||
list-style: none; |
list-style: none; |
||||||
|
|
||||||
} |
} |
||||||
.orilist:hover{ |
.orilist:hover { |
||||||
cursor: pointer; |
cursor: pointer; |
||||||
background-color: rgba(225, 225, 225, 0.8); |
background-color: rgba(225, 225, 225, 0.8); |
||||||
} |
} |
||||||
|
|
||||||
.box{ |
.box { |
||||||
div{ |
box-sizing: border-box; |
||||||
float: left; |
padding: 12px; |
||||||
|
height: 100%; |
||||||
|
overflow-y: auto; |
||||||
|
position: relative; |
||||||
|
div { |
||||||
|
float: left; |
||||||
|
} |
||||||
|
.rightDiv { |
||||||
|
display: flex; |
||||||
|
flex-direction: column; |
||||||
|
border: 1px solid gray; |
||||||
|
border-radius: 6px; |
||||||
|
box-sizing: border-box; |
||||||
|
padding: 20px; |
||||||
|
|
||||||
|
.topbox { |
||||||
|
display: flex; |
||||||
|
height: 40px; |
||||||
|
line-height: 40px; |
||||||
} |
} |
||||||
.rightDiv{ |
.listBox { |
||||||
|
width: 100%; |
||||||
|
text-align: center; |
||||||
|
li { |
||||||
display: flex; |
display: flex; |
||||||
flex-direction: column; |
justify-content: space-between; |
||||||
border: 1px solid gray; |
|
||||||
border-radius: 6px; |
|
||||||
box-sizing: border-box; |
box-sizing: border-box; |
||||||
padding: 20px; |
padding: 3px 6px; |
||||||
|
align-items: center; |
||||||
.topbox{ |
.btnbox { |
||||||
display: flex; |
display: flex; |
||||||
height: 40px; |
align-items: center; |
||||||
line-height: 40px; |
button { |
||||||
} |
margin: 0 2px; |
||||||
.listBox{ |
} |
||||||
width: 100%; |
|
||||||
text-align: center; |
|
||||||
li{ |
|
||||||
display: flex; |
|
||||||
justify-content: space-between; |
|
||||||
box-sizing: border-box; |
|
||||||
padding: 3px 6px; |
|
||||||
align-items: center; |
|
||||||
.btnbox{ |
|
||||||
display: flex; |
|
||||||
align-items: center; |
|
||||||
button{ |
|
||||||
margin: 0 2px; |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
} |
} |
||||||
|
} |
||||||
} |
} |
||||||
} |
} |
||||||
|
} |
||||||
|
|
||||||
|
.spinner { |
||||||
|
position: absolute; |
||||||
|
width: 100%; |
||||||
|
height: 100%; |
||||||
|
background-color: rgba(125, 125, 125, 0.3); |
||||||
|
z-index: 999; |
||||||
|
left: 0; |
||||||
|
top: 0; |
||||||
|
display: flex; |
||||||
|
align-items: center; |
||||||
|
justify-content: center; |
||||||
|
} |
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1,53 +1,59 @@ |
|||||||
/* |
/* |
||||||
* @Descripttion:
|
* @Descripttion: |
||||||
* @version:
|
* @version: |
||||||
* @Author: sueRimn |
* @Author: sueRimn |
||||||
* @Date: 2021-01-29 15:54:45 |
* @Date: 2021-01-29 15:54:45 |
||||||
* @LastEditors: sueRimn |
* @LastEditors: sueRimn |
||||||
* @LastEditTime: 2021-05-20 10:14:47 |
* @LastEditTime: 2021-05-20 10:14:47 |
||||||
*/ |
*/ |
||||||
import { Routes, RouterModule } from '@angular/router'; |
import { Routes, RouterModule } from "@angular/router"; |
||||||
import { NgModule } from '@angular/core'; |
import { NgModule } from "@angular/core"; |
||||||
import { UiComponent } from './ui.component'; |
import { UiComponent } from "./ui.component"; |
||||||
import { PaginatorComponent } from './paginator/paginator.component'; |
import { PaginatorComponent } from "./paginator/paginator.component"; |
||||||
import { UserdataComponent } from './userdata/userdata.component'; |
import { UserdataComponent } from "./userdata/userdata.component"; |
||||||
import { OrganizationComponent } from './organization/organization.component'; |
import { OrganizationComponent } from "./organization/organization.component"; |
||||||
import { UnittypeComponent } from './unittype/unittype.component'; |
import { UnittypeComponent } from "./unittype/unittype.component"; |
||||||
import { AuthorityComponent } from './authority/authority.component'; |
import { AuthorityComponent } from "./authority/authority.component"; |
||||||
import { RoleComponent } from './role/role.component'; |
import { RoleComponent } from "./role/role.component"; |
||||||
import { UsermanagementComponent } from './usermanagement/usermanagement.component'; |
import { UsermanagementComponent } from "./usermanagement/usermanagement.component"; |
||||||
import { NavmenusComponent } from './navmenus/navmenus.component'; |
import { NavmenusComponent } from "./navmenus/navmenus.component"; |
||||||
import { FireProtectionElementsComponent } from './fire-protection-elements/fire-protection-elements.component'; |
import { FireProtectionElementsComponent } from "./fire-protection-elements/fire-protection-elements.component"; |
||||||
import {MaterialBankComponent} from './material-bank/material-bank.component' |
import { MaterialBankComponent } from "./material-bank/material-bank.component"; |
||||||
import {UnitInformationComponent} from './unit-information/unit-information.component' |
import { UnitInformationComponent } from "./unit-information/unit-information.component"; |
||||||
import { EnterpriseuserComponent } from './enterpriseuser/enterpriseuser.component'; |
import { EnterpriseuserComponent } from "./enterpriseuser/enterpriseuser.component"; |
||||||
import { FireFightingFacilitiesFormworkComponent } from './fire-fighting-facilities-formwork/fire-fighting-facilities-formwork.component' |
import { FireFightingFacilitiesFormworkComponent } from "./fire-fighting-facilities-formwork/fire-fighting-facilities-formwork.component"; |
||||||
import { CollectionToolsComponent } from './collection-tools/collection-tools.component'; |
import { CollectionToolsComponent } from "./collection-tools/collection-tools.component"; |
||||||
import { PlanTemplateComponent } from './plan-template/plan-template.component' |
import { PlanTemplateComponent } from "./plan-template/plan-template.component"; |
||||||
|
import { AppKeyComponent } from "./app-key/app-key.component"; |
||||||
|
|
||||||
|
|
||||||
const routes: Routes = [ |
const routes: Routes = [ |
||||||
{ path: '', component: UiComponent}, |
{ path: "", component: UiComponent }, |
||||||
{ path: 'paginator', component:PaginatorComponent }, |
{ path: "paginator", component: PaginatorComponent }, |
||||||
{ path: 'userdata', component:UserdataComponent }, |
{ path: "userdata", component: UserdataComponent }, |
||||||
{ path: 'organization', component:OrganizationComponent }, |
{ path: "organization", component: OrganizationComponent }, |
||||||
{ path: 'unittype', component:UnittypeComponent }, |
{ path: "unittype", component: UnittypeComponent }, |
||||||
{ path: 'authority', component:AuthorityComponent }, |
{ path: "authority", component: AuthorityComponent }, |
||||||
{ path: 'role', component:RoleComponent }, |
{ path: "role", component: RoleComponent }, |
||||||
{ path: 'usermanagement', component:UsermanagementComponent }, |
{ path: "usermanagement", component: UsermanagementComponent }, |
||||||
{ path: 'navmenus', component:NavmenusComponent }, |
{ path: "navmenus", component: NavmenusComponent }, |
||||||
{ path: 'fireProtectionElements', component:FireProtectionElementsComponent }, |
{ |
||||||
{ path: 'materialBank', component:MaterialBankComponent }, |
path: "fireProtectionElements", |
||||||
{ path: 'unitInformation', component:UnitInformationComponent }, |
component: FireProtectionElementsComponent, |
||||||
{ path: 'enterpriseuser', component:EnterpriseuserComponent }, |
}, |
||||||
{ path: 'fireFightingFacilitiesFormwork', component:FireFightingFacilitiesFormworkComponent }, |
{ path: "materialBank", component: MaterialBankComponent }, |
||||||
{ path: 'collectionTools', component:CollectionToolsComponent }, |
{ path: "unitInformation", component: UnitInformationComponent }, |
||||||
{ path: 'PlanTemplate', component:PlanTemplateComponent }, |
{ path: "enterpriseuser", component: EnterpriseuserComponent }, |
||||||
|
{ |
||||||
|
path: "fireFightingFacilitiesFormwork", |
||||||
|
component: FireFightingFacilitiesFormworkComponent, |
||||||
|
}, |
||||||
|
{ path: "collectionTools", component: CollectionToolsComponent }, |
||||||
|
{ path: "PlanTemplate", component: PlanTemplateComponent }, |
||||||
|
{ path: "appkey", component: AppKeyComponent }, |
||||||
]; |
]; |
||||||
|
|
||||||
@NgModule({ |
@NgModule({ |
||||||
imports: [RouterModule.forChild(routes)], |
imports: [RouterModule.forChild(routes)], |
||||||
exports: [RouterModule] |
exports: [RouterModule], |
||||||
}) |
}) |
||||||
export class UiRoutingModule {} |
export class UiRoutingModule {} |
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in new issue