Compare commits

...

13 Commits

  1. 2
      angular.json
  2. 19467
      package-lock.json
  3. 2
      package.json
  4. 5
      proxy.config.json
  5. 127
      src/app/app-routing.module.ts
  6. 3
      src/app/app.module.ts
  7. 4
      src/app/key-unit/basicinfo-look/basicinfo.component.html
  8. 8
      src/app/key-unit/basicinfo/basicinfo.component.html
  9. 2
      src/app/key-unit/basicinfo/basicinfo.component.ts
  10. 27
      src/app/key-unit/edit-plan-info/edit-plan-info.component.html
  11. 24
      src/app/key-unit/edit-unit-info/edit-unit-info.component.html
  12. 7
      src/app/key-unit/edit-unit-info/edit-unit-info.component.ts
  13. 1292
      src/app/key-unit/fire-fighting-device/fire-fighting-device.component.ts
  14. 8
      src/app/key-unit/key-unit-management/createunit.component.html
  15. 271
      src/app/key-unit/key-unit-management/key-unit-management.component.html
  16. 2
      src/app/key-unit/key-unit-management/key-unit-management.component.scss
  17. 100
      src/app/key-unit/key-unit-management/key-unit-management.component.ts
  18. 29
      src/app/key-unit/view-unit-details-plan/view-unit-details-plan.component.html
  19. 16
      src/app/key-unit/view-unit-details/view-unit-details.component.html
  20. 352
      src/app/pages/login/login.component.ts
  21. 4
      src/app/plan-audit/detachment-level/detachment-level.component.html
  22. 4
      src/app/plan-audit/plan-audit/plan-audit.component.html
  23. 2
      src/app/plan-audit/plan-pass/plan-pass.component.html
  24. 21
      src/app/plan-audit/plan-record/plan-record.component.html
  25. 15
      src/app/plan-audit/plan-record/plan-record.component.scss
  26. 174
      src/app/plan-audit/plan-record/plan-record.component.ts
  27. 19
      src/app/plan-audit/wait-examineer/wait-examineer.component.html
  28. 26
      src/app/plan-audit/wait-examineer/wait-examineer.component.scss
  29. 219
      src/app/plan-audit/wait-examineer/wait-examineer.component.ts
  30. 4
      src/app/plan-management/entry-plan-look/AddPlanone.html
  31. 10
      src/app/plan-management/entry-plan-look/entry-plan-look.component.html
  32. 244
      src/app/plan-management/entry-plan/entry-plan.component.html
  33. 3
      src/app/plan-management/entry-plan/entry-plan.component.ts
  34. 6
      src/app/plan-management/maintain-up/maintain-up.component.html
  35. 4
      src/app/plan-management/open-plan/open-plan.component.html
  36. 12
      src/app/plan-management/pass-plan/pass-plan.component.html
  37. 2
      src/app/plan-management/plan-deduction/plan-deduction.component.html
  38. 4
      src/app/plan-management/reinforce-plan/reinforce-plan.component.html
  39. 18
      src/app/statistic-analysis/addUnit/add-unit-one/add-unit-one.component.ts
  40. 805
      src/app/statistic-analysis/addUnit/add-unit-two-time/add-unit-two-time.component.ts
  41. 24
      src/app/statistic-analysis/addUnit/add-unit-two-type-statistics/add-unit-two-type-statistics.component.html
  42. 959
      src/app/statistic-analysis/addUnit/add-unit-two-type-statistics/add-unit-two-type-statistics.component.ts
  43. 325
      src/app/statistic-analysis/buildingType/building-type-one/building-type-one.component.ts
  44. 22
      src/app/statistic-analysis/buildingType/building-type-two-reverse/building-type-two-reverse.component.html
  45. 720
      src/app/statistic-analysis/buildingType/building-type-two-reverse/building-type-two-reverse.component.ts
  46. 6
      src/app/statistic-analysis/combined-query/combined-query.component.html
  47. 8
      src/app/statistic-analysis/combined-query/combined-query.component.ts
  48. 2
      src/app/statistic-analysis/compang-info/compang-info.component.html
  49. 90
      src/app/statistic-analysis/home/home.component.html
  50. 67
      src/app/statistic-analysis/home/home.component.scss
  51. 1237
      src/app/statistic-analysis/home/home.component.ts
  52. 2
      src/app/statistic-analysis/plan-analysis-by-synthesis/plan-analysis-by-synthesis.component.html
  53. 530
      src/app/statistic-analysis/plan-analysis-by-synthesis/plan-analysis-by-synthesis.component.ts
  54. 244
      src/app/tabbar/tabbar.component.html
  55. 8
      src/app/test/test.component.html
  56. 17
      src/app/test/test.component.scss
  57. 25
      src/app/test/test.component.spec.ts
  58. 56
      src/app/test/test.component.ts
  59. 30
      src/app/ui/organization/organization.component.html
  60. 1025
      src/app/ui/organization/organization.component.ts
  61. 2
      src/app/ui/unit-information/addunitinfo.component.html
  62. 2
      src/assets/css/newStyle.css
  63. 19
      src/assets/echarts/tianjin.js
  64. 1
      src/assets/echarts/tianjin.json
  65. 20
      src/index.html
  66. 23
      tsconfig.json
  67. 943
      yarn.lock

2
angular.json

@ -34,8 +34,6 @@
],
"scripts": [
"node_modules/echarts/dist/echarts.js",
"src/assets/mTokenK1/mToken_K1.js",
"src/assets/kmap/kmap-service-main-kd.js",
"./node_modules/swiper/js/swiper.min.js",
"src/assets/chartstheme/westeros.js",
"src/assets/chartstheme/walden.js",

19467
package-lock.json generated

File diff suppressed because it is too large Load Diff

2
package.json

@ -32,7 +32,7 @@
"cesium": "^1.64.0",
"crypto-js": "^4.0.0",
"e-ngx-cesium": "^6.3.2",
"echarts": "^4.6.0",
"echarts": "^4.1.0",
"firebase": "^7.6.2",
"ng-zorro-antd": "^9.3.0",
"ng2-file-upload": "^1.4.0",

5
proxy.config.json

@ -1,9 +1,6 @@
{
"/api": {
"target": "http://10.81.73.39:8000/",
"生产": "http://10.81.73.39:8000/",
"测试": "http://121.36.37.70:8201/",
"生产2": "http://183.194.244.232:8088/",
"target": "http://111.33.20.154:8201/",
"secure": false,
"changeOrigin": true
}

127
src/app/app-routing.module.ts

@ -1,54 +1,107 @@
/*
* @Descripttion:
* @version:
* @Descripttion:
* @version:
* @Author: sueRimn
* @Date: 2021-01-11 14:48:03
* @LastEditors: sueRimn
* @LastEditTime: 2021-07-29 10:26:58
*/
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { LoginComponent } from './pages/login/login.component';
import { NavigationComponent } from './navigation/navigation.component';
import {HomeComponent} from './home/home.component'
import { PlanPassComponent } from '../app/plan-audit/plan-pass/plan-pass.component';
import { NgModule } from "@angular/core";
import { Routes, RouterModule } from "@angular/router";
import { LoginComponent } from "./pages/login/login.component";
import { NavigationComponent } from "./navigation/navigation.component";
import { HomeComponent } from "./home/home.component";
import { PlanPassComponent } from "../app/plan-audit/plan-pass/plan-pass.component";
//路由守卫
import {AuthGuard} from './auth.guard'
import {MTokenK1Component} from './m-token-k1/m-token-k1.component' //K1秘钥
import {ViewUnitDetailsPlanComponent} from './key-unit/view-unit-details-plan/view-unit-details-plan.component'
import { TestComponent } from './test/test.component';
import { ExternalLinksPlanComponent } from './external-links-plan/external-links-plan.component';
import { CreatePlanOnlineFiveComponent } from './plan-management/create-plan-online-five/create-plan-online-five.component'
import { ExportExcelComponent } from './export-excel/export-excel.component'
import { AuthGuard } from "./auth.guard";
import { MTokenK1Component } from "./m-token-k1/m-token-k1.component"; //K1秘钥
import { ViewUnitDetailsPlanComponent } from "./key-unit/view-unit-details-plan/view-unit-details-plan.component";
import { ExternalLinksPlanComponent } from "./external-links-plan/external-links-plan.component";
import { CreatePlanOnlineFiveComponent } from "./plan-management/create-plan-online-five/create-plan-online-five.component";
import { ExportExcelComponent } from "./export-excel/export-excel.component";
const routes: Routes = [
{path:'',redirectTo:'login',pathMatch:'full'},
{ path: "", redirectTo: "login", pathMatch: "full" },
{
path:'',component:NavigationComponent,canActivate: [AuthGuard],//守卫验证
children:[
{path:'ui',loadChildren:() => import('./ui/ui.module').then(m => m.UiModule)},
{path:'keyUnit',loadChildren:() => import('./key-unit/key-unit.module').then(m => m.KeyUnitModule)},
{path:'planManagement',loadChildren:() => import('./plan-management/plan-management.module').then(m => m.PlanManagementModule)},
{path:'planAudit',loadChildren:() => import('./plan-audit/plan-audit.module').then(m => m.PlanAuditModule)},
{path:'visualization',component: HomeComponent},
{path:'gis',loadChildren:() => import('./gis-management/gis-management.module').then(m => m.GISManagementModule)},
{path:'statisticanalysis',loadChildren:() => import('./statistic-analysis/statistic-analysis.module').then(m => m.StatisticAnalysisModule)},
{path:'dataCollection',loadChildren:() => import('./data-collection/data-collection.module').then(m => m.DataCollectionModule)},
]
path: "",
component: NavigationComponent,
canActivate: [AuthGuard], //守卫验证
children: [
{
path: "ui",
loadChildren: () => import("./ui/ui.module").then((m) => m.UiModule),
},
{
path: "keyUnit",
loadChildren: () =>
import("./key-unit/key-unit.module").then((m) => m.KeyUnitModule),
},
{
path: "planManagement",
loadChildren: () =>
import("./plan-management/plan-management.module").then(
(m) => m.PlanManagementModule
),
},
{
path: "planAudit",
loadChildren: () =>
import("./plan-audit/plan-audit.module").then(
(m) => m.PlanAuditModule
),
},
{ path: "visualization", component: HomeComponent },
{
path: "gis",
loadChildren: () =>
import("./gis-management/gis-management.module").then(
(m) => m.GISManagementModule
),
},
{
path: "statisticanalysis",
loadChildren: () =>
import("./statistic-analysis/statistic-analysis.module").then(
(m) => m.StatisticAnalysisModule
),
},
{
path: "dataCollection",
loadChildren: () =>
import("./data-collection/data-collection.module").then(
(m) => m.DataCollectionModule
),
},
],
},
{ path: "login", component: LoginComponent },
{
path: "keyUnit/viewunitinfoplans",
component: ViewUnitDetailsPlanComponent,
canActivate: [AuthGuard],
},
{
path: "getNoMToken",
component: MTokenK1Component,
canActivate: [AuthGuard],
}, //K1秘钥验证失败是跳转页面
{
path: "planAudit/planpass",
component: PlanPassComponent,
canActivate: [AuthGuard],
},
{ path: "linksPlan", component: ExternalLinksPlanComponent },
{ path: "CreatePlanOnlineFive", component: CreatePlanOnlineFiveComponent },
{
path: "exportExcel",
component: ExportExcelComponent,
canActivate: [AuthGuard],
},
{path:'login',component:LoginComponent},
{path:'keyUnit/viewunitinfoplans', component:ViewUnitDetailsPlanComponent,canActivate: [AuthGuard],},
{path:'getNoMToken',component:MTokenK1Component, canActivate: [AuthGuard],}, //K1秘钥验证失败是跳转页面
{path:'planAudit/planpass', component: PlanPassComponent , canActivate: [AuthGuard]},
{path:'test', component: TestComponent },
{path:'linksPlan', component: ExternalLinksPlanComponent },
{path:'CreatePlanOnlineFive',component:CreatePlanOnlineFiveComponent},
{path:'exportExcel',component:ExportExcelComponent, canActivate: [AuthGuard]},
];
@NgModule({
imports: [RouterModule.forRoot(routes)],
exports: [RouterModule]
exports: [RouterModule],
})
export class AppRoutingModule { }
export class AppRoutingModule {}

3
src/app/app.module.ts

@ -9,7 +9,6 @@ import { MatIconModule } from '@angular/material/icon';
import { MatSidenavModule } from '@angular/material/sidenav';
import { NavigationModule } from './navigation/navigation.module';
import { HomeComponent } from './home/home.component';
import { TabbarComponent } from './tabbar/tabbar.component';
import { PagesModule } from './pages/pages.module';
import { FormsModule } from '@angular/forms';
import { UiModule } from './ui/ui.module';
@ -22,7 +21,6 @@ import { CountdownModule } from 'ngx-countdown'; //倒计时插件
import { GISManagementModule } from './gis-management/gis-management.module';
import { DataCollectionModule } from './data-collection/data-collection.module';
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
import { TestComponent } from './test/test.component';
import { ExternalLinksPlanComponent } from './external-links-plan/external-links-plan.component';
import { SearchDownList } from '../modules/map/declare/component/SearchDownListPlugins/SearchDownList';
import { ExportExcelComponent } from './export-excel/export-excel.component';
@ -34,7 +32,6 @@ registerLocaleData(zh);
AppComponent,
HomeComponent,
MTokenK1Component,
TestComponent,
ExternalLinksPlanComponent,
SearchDownList,
ExportExcelComponent

4
src/app/key-unit/basicinfo-look/basicinfo.component.html

@ -12,7 +12,7 @@
<form (ngSubmit)="onSubmit(form.value,form.invalid,form)" #form="ngForm" class="example-container">
<div class="mainbox" >
<div class="mainleft">
<div class="inputbox" >
<!-- <div class="inputbox" >
<span style="color: red;">*</span>
<span>统一社会信用代码:</span>
<mat-form-field>
@ -27,7 +27,7 @@
统一社会信用代码格式不正确
</div>
</div>
</div>
</div> -->
<div class="inputbox">
<span style="color: red;">*</span>
<span>单位类型:</span>

8
src/app/key-unit/basicinfo/basicinfo.component.html

@ -13,7 +13,7 @@
<form (ngSubmit)="onSubmit(form.value,form.invalid,form)" #form="ngForm" class="example-container">
<div class="mainbox">
<div class="mainleft">
<div class="inputbox">
<!-- <div class="inputbox">
<span style="color: red;">*</span>
<span>统一社会信用代码:</span>
<mat-form-field>
@ -27,7 +27,7 @@
统一社会信用代码格式不正确
</div>
</div>
</div>
</div> -->
<div class="inputbox">
<span style="color: red;">*</span>
<span>单位类型:</span>
@ -117,7 +117,7 @@
</div>
</div>
<div class="mainright" id="setUnitPosition">
<div style="width: 100%;height: 100%;" id="container">
<!-- <div style="width: 100%;height: 100%;" id="container">
</div>
@ -151,7 +151,7 @@
<div class="setPosition" (click)="search()">
搜索
</div>
</div>
</div> -->
</div>
</div>
</form>

2
src/app/key-unit/basicinfo/basicinfo.component.ts

@ -413,7 +413,7 @@ export class BasicinfoComponent implements OnInit {
} else {//未标注
_this.isMapLabel = false
}
this.labelGis()
// this.labelGis()
})
}
)

27
src/app/key-unit/edit-plan-info/edit-plan-info.component.html

@ -1,4 +1,4 @@
<div class="fixedPrompt">
<!-- <div class="fixedPrompt">
<label class="scorePrompt" *ngIf="selected.value == 0">*单位信息,建筑信息填写完整可得满分</label>
<label class="scorePrompt" *ngIf="selected.value == 1">*单位毗邻模块标注完整可得满分</label>
<label class="scorePrompt" *ngIf="selected.value == 2">*消防设施,重点部位模块标注完整可得满分</label>
@ -7,7 +7,7 @@
<label class="scorePrompt" *ngIf="selected.value == 6">*填写2条以上可得满分</label>
<label class="scorePrompt" *ngIf="selected.value == 9">*重点部位、安全出口、外观各自不低于两张图片方可满分</label>
<label class="scorePrompt" *ngIf="selected.value == 10">*保证至少有一个文件可得满分</label>
</div>
</div> -->
<mat-tab-group style="height: 100%;" [selectedIndex]="selected.value" (selectedIndexChange)="selected.setValue($event)">
<mat-tab label="1.基本信息">
@ -45,34 +45,19 @@
<app-function-division></app-function-division>
</ng-template>
</mat-tab>
<mat-tab label="8.行车路线">
<ng-template matTabContent>
<app-router-gis></app-router-gis>
</ng-template>
</mat-tab>
<mat-tab label="9.周边水源及力量">
<ng-template matTabContent>
<app-water-road></app-water-road>
</ng-template>
</mat-tab>
<mat-tab label="10.实景图">
<mat-tab label="8.实景图">
<ng-template matTabContent>
<app-realistic-picture></app-realistic-picture>
</ng-template>
</mat-tab>
<mat-tab label="11.上传CAD">
<mat-tab label="9.上传CAD">
<ng-template matTabContent>
<app-uploading-cad></app-uploading-cad>
</ng-template>
</mat-tab>
<mat-tab label="12.特别警示">
<!-- <mat-tab label="10.特别警示">
<ng-template matTabContent>
<app-special-warning></app-special-warning>
</ng-template>
</mat-tab>
<!-- <mat-tab label="12.unity平面图">
<ng-template matTabContent>
<iframe id="main" src="/unityApp2Basic/index.html" name="unityApp" frameborder="0" width="96%" height="100%" style="margin-left: 2%;"></iframe>
</ng-template>
</mat-tab> -->
</mat-tab> -->
</mat-tab-group>

24
src/app/key-unit/edit-unit-info/edit-unit-info.component.html

@ -1,10 +1,3 @@
<!-- K1密钥拔出时倒计时显示 -->
<div style="width: 100%;height: 0;position: relative; z-index: 999;" *ngIf="mToken.isShow">
<div style="position: absolute;color: red;width: 100%;text-align: center;margin-top: 5%;font-size: 18px;">
<countdown [config]="{leftTime: 10,format: '密钥已拔出,本页面将于s秒后关闭,请及时保存'}"></countdown>
</div>
</div>
<mat-tab-group selectedIndex="10" style="height: 100%;">
<mat-tab label="1.基本信息">
<ng-template matTabContent>
@ -31,7 +24,7 @@
<app-function-division></app-function-division>
</ng-template>
</mat-tab>
<mat-tab label="6.行车路线">
<!-- <mat-tab label="6.行车路线">
<ng-template matTabContent>
<app-router-gis></app-router-gis>
</ng-template>
@ -40,30 +33,25 @@
<ng-template matTabContent>
<app-water-road></app-water-road>
</ng-template>
</mat-tab>
<mat-tab label="8.实景图">
</mat-tab> -->
<mat-tab label="6.实景图">
<ng-template matTabContent>
<app-realistic-picture></app-realistic-picture>
</ng-template>
</mat-tab>
<mat-tab label="9.上传CAD">
<mat-tab label="7.上传CAD">
<ng-template matTabContent>
<app-uploading-cad></app-uploading-cad>
</ng-template>
</mat-tab>
<mat-tab label="10.特别警示">
<mat-tab label="8.特别警示">
<ng-template matTabContent>
<app-special-warning></app-special-warning>
</ng-template>
</mat-tab>
<mat-tab label="11.作战部署">
<mat-tab label="9.作战部署">
<ng-template matTabContent>
<app-collection-tools></app-collection-tools>
</ng-template>
</mat-tab>
<!-- <mat-tab label="11.unity作战部署">
<ng-template matTabContent>
<iframe id="main" src="/unityApp2/index.html" name="unityApp" frameborder="0" width="100%" height="98%"></iframe>
</ng-template>
</mat-tab> -->
</mat-tab-group>

7
src/app/key-unit/edit-unit-info/edit-unit-info.component.ts

@ -1,9 +1,4 @@
import { Component, OnInit } from '@angular/core';
// import { BasicinfoComponent } from '../basicinfo/basicinfo.component'
import { Router,ActivatedRoute } from '@angular/router'
import {MTokenK1Service} from '../../m-token-k1/m-token-k1.service' //引入服务
import { CollectionToolsComponent } from '../../../app/ui/collection-tools/collection-tools.component'
@Component({
selector: 'app-edit-unit-info',
@ -12,7 +7,7 @@ import { CollectionToolsComponent } from '../../../app/ui/collection-tools/colle
})
export class EditUnitInfoComponent implements OnInit {
constructor(private router:Router,private route:ActivatedRoute,public mToken: MTokenK1Service) { }
constructor() { }
ngOnInit(): void {

1292
src/app/key-unit/fire-fighting-device/fire-fighting-device.component.ts

File diff suppressed because it is too large Load Diff

8
src/app/key-unit/key-unit-management/createunit.component.html

@ -8,11 +8,11 @@
ngModel #name="ngModel" placeholder="请输入单位名称">
</mat-form-field>
<mat-form-field>
<!-- <mat-form-field>
<input matInput id="usci" name="usci" type='text'
ngModel #usci="ngModel" placeholder="请输入统一社会信用代码" pattern="^[0-9A-HJ-NP-RTUW-Y]{2}\d{6}[0-9A-HJ-NP-RTUW-Y]{10}$">
</mat-form-field>
-->
<mat-form-field>
<mat-select placeholder='请选择单位类型' ngModel name="unittype" required>
@ -24,7 +24,7 @@
<mat-form-field>
<input matInput name="js" type='text' required
[(ngModel)]="js" placeholder="消防救援站" readonly>
[(ngModel)]="js" placeholder="所属消防救援支队" readonly>
</mat-form-field>
@ -38,7 +38,7 @@
</div>
<div class="treebox">
<span>请选择所属消防救援</span>
<span>请选择所属消防救援支队</span>
<mat-tree [dataSource]="dataSource" [treeControl]="treeControl">
<mat-tree-node *matTreeNodeDef="let node" matTreeNodePadding (click)='add(node)' class="organizationlist">
<button mat-icon-button disabled ></button>

271
src/app/key-unit/key-unit-management/key-unit-management.component.html

@ -10,31 +10,6 @@
</mat-form-field>
</div>
<div class="queryField">
<label style="margin-right: 10px;">统一社会信用代码:</label>
<mat-form-field class="example-full-width">
<input matInput placeholder="请输入统一社会信用代码" name="shehui" [(ngModel)]="shehui" autocomplete="off">
</mat-form-field>
<span *ngIf="padMore" style="margin-left: 10px; color: #0080FF;" (click)='padInfo()'>更多筛选条件<img
[src]='imgsrcopen'> </span>
<span *ngIf="padput" style="margin-left: 10px; color: #0080FF;width: 10px;height: 6px;"
(click)='padInfo()'>收起<img [src]='imgsrcdown'> </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 class="queryField" *ngIf="!padMore">
<label style="margin-right: 10px;">重点单位:</label>
<mat-form-field>
<mat-select placeholder='请选择单位是否为重点' [(ngModel)]="follow" name="follow">
<mat-option value="0">一般单位</mat-option>
<mat-option value="1">重点单位</mat-option>
</mat-select>
</mat-form-field>
</div>
<div class="queryField" *ngIf="!padMore">
<label style="margin-right: 10px;">单位类型:</label>
<mat-form-field>
<mat-select placeholder='请选择单位类型' [(ngModel)]="unittype" name="unittype">
@ -43,23 +18,12 @@
</mat-option>
</mat-select>
</mat-form-field>
<span *ngIf="pcMore" style="margin-left: 10px; 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 class="queryField ordiv" *ngIf="!padMore&&!pcMore">
<label style="margin-right: 10px;">消防救援站:</label>
<div class="queryField ordiv">
<label style="margin-right: 10px;">所属消防救援支队:</label>
<mat-form-field class="example-full-width">
<input (click)="stopclose($event)" readonly matInput placeholder="请选择消防救援站" autocomplete="off"
[(ngModel)]="js" name="js" (focus)="openorganizationbox()">
<input (click)="stopclose($event)" readonly matInput placeholder="请选择所属消防救援支队"
autocomplete="off" [(ngModel)]="js" name="js" (focus)="openorganizationbox()">
</mat-form-field>
<mat-checkbox color="primary" style="margin-left: 6px;" [(ngModel)]="jscheck" name="jscheck">包含下级
</mat-checkbox>
@ -88,38 +52,9 @@
</div>
</div>
<div class="queryField" *ngIf="!padMore&&!pcMore">
<label style="margin-right: 10px;">信息完整度排序:</label>
<mat-form-field>
<mat-select placeholder='请选择排序方式' [(ngModel)]="integritySort" name="integritySort">
<mat-option value="desc">从高到低</mat-option>
<mat-option value="asc">从低到高</mat-option>
</mat-select>
</mat-form-field>
</div>
<div class="queryField" *ngIf="!padMore&&!pcMore">
<label style="margin-right: 10px;">完整度查询:</label>
<mat-form-field class="example-full-width">
<input type="number" oninput="if(value>100)value=100;if(value<0)value=0" matInput
placeholder="请输入完整度最小值" name="integrityScoreMin" [(ngModel)]="integrityScoreMin"
autocomplete="off">
</mat-form-field>
<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: 5px;">
<input type="number" oninput="if(value>100)value=100;if(value<0)value=0" matInput
placeholder="请输入完整度最大值" name="integrityScoreMax" [(ngModel)]="integrityScoreMax"
autocomplete="off">
</mat-form-field>
</div>
<div class="queryField" *ngIf="!padMore&&!pcMore">
<input type="radio" [(ngModel)]="IsNewData"
style="height: 16px;width: 16px;position: relative;top: 2px;" name="whgx" [value]='true'>
<label style="margin-right: 10px;margin-left: 2px;">新增</label>
<input type="radio" [(ngModel)]="IsNewData"
style="height: 16px;width: 16px;position: relative;top: 2px;" name="whgx" [value]='false'>
<label style="margin-right: 10px;margin-left: 2px;">维护更新</label>
<div class="queryField">
<button mat-raised-button color="primary">查询</button>
<button mat-raised-button style="margin-left: 25px;" type="button" (click)="reset()">重置</button>
</div>
</div>
@ -149,20 +84,18 @@
<th mat-header-cell *matHeaderCellDef>
</th>
<td mat-cell *matCellDef="let element">
<span title="重点单位" *ngIf="element.isFollowed">
<mat-icon style="margin-top: 6px;color: red;">star</mat-icon>
</span>
</td>
</ng-container>
<ng-container matColumnDef="state">
<!-- <ng-container matColumnDef="state">
<th mat-header-cell *matHeaderCellDef style="width: 10%;">单位状态</th>
<td mat-cell *matCellDef="let element">
<span class="add" *ngIf="element.isNewData">新增</span>
<span class="weihu" *ngIf="!element.isNewData">维护更新</span>
</td>
</ng-container>
</ng-container> -->
<ng-container matColumnDef="unitname">
<th mat-header-cell *matHeaderCellDef>单位名称</th>
<td mat-cell *matCellDef="let element">
@ -170,154 +103,12 @@
<mat-icon class="editUnitName" (click)="editUnitName(element)">create</mat-icon>
</td>
</ng-container>
<ng-container matColumnDef="integrity">
<th mat-header-cell *matHeaderCellDef style="text-align: center;">信息完整度</th>
<td mat-cell *matCellDef="let element;let i = index">
<div class="integrityDiv">
<span class="integrityNum">
{{(element.companyIntegrityScore.totalScore.toFixed(2) * 100).toFixed()}}%
</span>
<div class="integrityColorDiv"
[style]="integrity((element.companyIntegrityScore.totalScore.toFixed(2) * 100).toFixed())">
</div>
<div class="integrityDetails" [ngClass]="{'bottomposition': i <= 5,'topposition': i > 5}">
<div class="integrityDetailsTop">
<span class="span1">分类名称</span>
<span class="span2">占比</span>
<span class="span3">总占比</span>
</div>
<div class="integrityDetailsBody">
<ul>
<li>
<div class="name">单位信息</div>
<div class="colorDiv">
<div class="colorDivBac">
<div class="colorDivCon"
[style]="integrityDetails((element.companyIntegrityScore.basicInfoScore * 5).toFixed(1),5)">
</div>
</div>
<span>{{(element.companyIntegrityScore.basicInfoScore *
5).toFixed(1)}}%</span>
</div>
<div class="number">5%</div>
</li>
<li>
<div class="name">建筑信息</div>
<div class="colorDiv">
<div class="colorDivBac">
<div class="colorDivCon"
[style]="integrityDetails((element.companyIntegrityScore.buildingInfoScore * 10).toFixed(1),10)">
</div>
</div>
<span>{{(element.companyIntegrityScore.buildingInfoScore *
10).toFixed(1)}}%</span>
</div>
<div class="number">10%</div>
</li>
<li>
<div class="name">平面图</div>
<div class="colorDiv">
<div class="colorDivBac">
<div class="colorDivCon"
[style]="integrityDetails((element.companyIntegrityScore.planImageScore * 10).toFixed(1),10)">
</div>
</div>
<span>{{(element.companyIntegrityScore.planImageScore *
10).toFixed(1)}}%</span>
</div>
<div class="number">10%</div>
</li>
<li>
<div class="name">四周毗邻</div>
<div class="colorDiv">
<div class="colorDivBac">
<div class="colorDivCon"
[style]="integrityDetails((element.companyIntegrityScore.adjoinScore * 10).toFixed(1),10)">
</div>
</div>
<span>{{(element.companyIntegrityScore.adjoinScore *
10).toFixed(1)}}%</span>
</div>
<div class="number">10%</div>
</li>
<li>
<div class="name">消防设施</div>
<div class="colorDiv">
<div class="colorDivBac">
<div class="colorDivCon"
[style]="integrityDetails((element.companyIntegrityScore.facilityScore * 25).toFixed(1),25)">
</div>
</div>
<span>{{(element.companyIntegrityScore.facilityScore *
25).toFixed(1)}}%</span>
</div>
<div class="number">25%</div>
</li>
<li>
<div class="name">重点部位</div>
<div class="colorDiv">
<div class="colorDivBac">
<div class="colorDivCon"
[style]="integrityDetails((element.companyIntegrityScore.importantLocationScore * 10).toFixed(1),10)">
</div>
</div>
<span>{{(element.companyIntegrityScore.importantLocationScore *
10).toFixed(1)}}%</span>
</div>
<div class="number">10%</div>
</li>
<li>
<div class="name">功能分区</div>
<div class="colorDiv">
<div class="colorDivBac">
<div class="colorDivCon"
[style]="integrityDetails((element.companyIntegrityScore.functionalDivisionScore * 10).toFixed(1),10)">
</div>
</div>
<span>{{(element.companyIntegrityScore.functionalDivisionScore *
10).toFixed(1)}}%</span>
</div>
<div class="number">10%</div>
</li>
<li>
<div class="name">实景图</div>
<div class="colorDiv">
<div class="colorDivBac">
<div class="colorDivCon"
[style]="integrityDetails((element.companyIntegrityScore.realityImageScore * 10).toFixed(1),10)">
</div>
</div>
<span>{{(element.companyIntegrityScore.realityImageScore *
10).toFixed(1)}}%</span>
</div>
<div class="number">10%</div>
</li>
<li>
<div class="name">CAD上传</div>
<div class="colorDiv">
<div class="colorDivBac">
<div class="colorDivCon"
[style]="integrityDetails((element.companyIntegrityScore.cadScore * 10).toFixed(1),10)">
</div>
</div>
<span>{{(element.companyIntegrityScore.cadScore *
10).toFixed(1)}}%</span>
</div>
<div class="number">10%</div>
</li>
</ul>
</div>
<div style="width: 100%;text-align: center;font-size: 13px;">
仅供参考
</div>
</div>
</div>
</td>
<ng-container matColumnDef="address">
<th mat-header-cell *matHeaderCellDef>单位地址</th>
<td mat-cell *matCellDef="let element" [title]="element.address">{{element.address}}</td>
</ng-container>
<ng-container matColumnDef="jurisdictionsquadron">
<th mat-header-cell *matHeaderCellDef>消防救援站</th>
<th mat-header-cell *matHeaderCellDef>所属消防救援支队</th>
<td mat-cell *matCellDef="let element">{{element.organizationName}}</td>
</ng-container>
@ -326,44 +117,14 @@
<td mat-cell *matCellDef="let element">{{element.buildingTypes.length != 0 ?
element.buildingTypes[0].name : ''}}</td>
</ng-container>
<ng-container matColumnDef="scc">
<th mat-header-cell *matHeaderCellDef>统一社会信用代码</th>
<td mat-cell *matCellDef="let element">{{element.usci}}</td>
</ng-container>
<ng-container matColumnDef="time">
<th mat-header-cell *matHeaderCellDef>修改时间</th>
<td mat-cell *matCellDef="let element">
{{element.modifiedTime|date:'yyyy-MM-dd'}}
</td>
</ng-container>
<ng-container matColumnDef="addstate">
<th mat-header-cell *matHeaderCellDef>新增审核</th>
<td mat-cell *matCellDef="let element">
{{element.newVerifyState}}
<!-- {{element.contentVerify==4?'审核通过':element.contentVerify==5?'审核退回':''}} -->
</td>
</ng-container>
<ng-container matColumnDef="weihustate">
<th mat-header-cell *matHeaderCellDef>维护审核</th>
<td mat-cell *matCellDef="let element">
{{element.maintenanceVerifyState}}
</td>
<ng-container matColumnDef="phone">
<th mat-header-cell *matHeaderCellDef>联系电话</th>
<td mat-cell *matCellDef="let element" [title]="element.phone">{{element.phone}}</td>
</ng-container>
<ng-container matColumnDef="operation">
<th mat-header-cell *matHeaderCellDef>操作</th>
<td mat-cell *matCellDef="let element" class="operation">
<span (click)="drill(element)">演练</span>
<span (click)="unitdetails(element)">查看详情</span>
<span style="color: blue;margin-left: 4px;"
*ngIf="(element.isNewData && (element.newVerifyState=='未提交审核'||element.newVerifyState=='审核通过'
||element.newVerifyState=='审核退回'))||(!element.isNewData&&(element.maintenanceVerifyState=='审核通过'||element.maintenanceVerifyState=='未提交审核'||element.maintenanceVerifyState=='审核退回'))"
(click)='submitAudit(element)'>提交审核</span>
<span style="color: blue;margin-left: 4px;"
*ngIf="element.contentVerify!=null&&(element.contentVerify.verifyState==0||element.contentVerify.verifyState==3) "
(click)="cancelAudit(element)">撤销审核</span>
<span style="color: blue;margin-left: 4px;" (click)="auditResult(element)">审批结果</span>
<span (click)="Follow(element)" *ngIf="!element.isFollowed">重点单位</span>
<span (click)="unFollow(element)" *ngIf="element.isFollowed">一般单位</span>
</td>
</ng-container>
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>

2
src/app/key-unit/key-unit-management/key-unit-management.component.scss

@ -150,7 +150,7 @@
.treebox{
float: left;
width: 325px;
height: 350px;
height: 310px;
overflow: auto;
.organizationlist{
list-style: none

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

@ -93,15 +93,11 @@ export class KeyUnitManagementComponent implements OnInit {
displayedColumns: string[] = [
"checked",
"Follow",
"state",
"unitname",
"integrity",
"address",
"jurisdictionsquadron",
"unittype",
"scc",
"time",
"addstate",
"weihustate",
"phone",
"operation",
];
tabledataSource: any;
@ -476,14 +472,10 @@ export class KeyUnitManagementComponent implements OnInit {
console.log(data);
this.length = data.totalCount;
this.allKeyUnitInfo = data;
// data.items.sort( (a,b) => {
// return a.usci - b.usci
// })
data.items.forEach((item, index) => {
item.integrity = this.wanzhengduArr[index];
});
//console.log(789,data.items)
this.tabledataSource = data.items;
this.tabledataSource = [...data.items];
});
}
//得到当前单位信息
@ -647,14 +639,12 @@ export class KeyUnitManagementComponent implements OnInit {
//删除单位信息
deleteAudia = []; //批量删除提交数组
deleteunit() {
this.deleteAudia = [];
const config = new MatSnackBarConfig();
config.verticalPosition = "top";
config.duration = 3000;
//console.log(this.deleteAll)
if (this.verifyState == 0 || this.verifyState == 3) {
this.snackBar.open("审核中,不能删除", "确定", config);
} else {
var result = confirm("确认要执删除选中单位吗?");
if (result) {
this.deleteAudia = [];
const config = new MatSnackBarConfig();
config.verticalPosition = "top";
config.duration = 3000;
let selectedunitArr = [];
this.allKeyUnitInfo.items.forEach((item) => {
if (item.checked) {
@ -664,61 +654,20 @@ export class KeyUnitManagementComponent implements OnInit {
if (selectedunitArr.length == 0) {
this.snackBar.open("请先选择要删除的单位", "确定", config);
return;
}
/* if(selectedunitArr.length != 1 && selectedunitArr.length != 0){
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open('只能选择一个单位删除','确定',config);
} */
if (this.deleteAll.length == 1) {
//带着id跳到删除页面
let isTrue = confirm("重点单位删除需审核员审核,审核通过方可删除");
if (isTrue) {
let body: any = {
title: this.deleteAll[0].name,
Operation: 2,
itemId: this.deleteAll[0].id,
verifyState: 3,
contentType: 11,
};
this.http.post(`/api/ContentVerifies`, body).subscribe(
(data) => {
this.snackBar.open("操作成功", "确定", config);
this.getAllKeyUnit();
},
(err) => {
this.snackBar.open(err, "确定", config);
}
);
}
} else if (this.deleteAll.length > 1) {
let isTrue = confirm("重点单位删除需审核员审核,审核通过方可删除");
if (isTrue) {
for (var i = 0; i < this.deleteAll.length; i++) {
let body: any = {
title: this.deleteAll[i].name,
Operation: 2,
itemId: this.deleteAll[i].id,
verifyState: 3,
contentType: 11,
};
this.deleteAudia.push(body);
}
console.log("删除的单位列表", selectedunitArr);
this.http
.post(`/api/ContentVerifies/Batch`, this.deleteAudia)
.subscribe(
(data) => {
this.snackBar.open("操作成功", "确定", config);
this.getAllKeyUnit();
this.deleteAll = [];
},
(err) => {
this.snackBar.open(err, "确定", config);
}
);
}
let num = 0;
for (let index = 0; index < selectedunitArr.length; index++) {
const element = selectedunitArr[index];
this.http.delete(`/api/Companies/${element}`).subscribe((data) => {
num++;
if (num === selectedunitArr.length) {
this.snackBar.open("删除成功", "确定", config);
this.getAllKeyUnit();
}
});
}
}
}
@ -760,7 +709,9 @@ export class KeyUnitManagementComponent implements OnInit {
});
dialogRef.afterClosed().subscribe((result) => {
//console.log(result);
element.name = result;
if (element) {
element.name = result;
}
});
}
@ -1033,12 +984,13 @@ export class upname {
.subscribe(
(data: any) => {
this.snackBar.open("修改名字成功", "确定", config);
this.dialogRef.close(this.unitname);
},
(err) => {
this.snackBar.open(err, "确定", config);
this.dialogRef.close();
}
);
this.dialogRef.close(this.unitname);
}
}
}

29
src/app/key-unit/view-unit-details-plan/view-unit-details-plan.component.html

@ -1,4 +1,4 @@
<mat-tab-group selectedIndex="10" style="height: 99%;" >
<mat-tab-group selectedIndex="8" style="height: 99%;">
<mat-tab label="1.基本信息">
<ng-template matTabContent>
<app-basicinfo-look></app-basicinfo-look>
@ -24,7 +24,7 @@
<app-function-division-look></app-function-division-look>
</ng-template>
</mat-tab>
<mat-tab label="6.行车路线">
<!-- <mat-tab label="6.行车路线">
<ng-template matTabContent>
<app-router-gis></app-router-gis>
</ng-template>
@ -33,32 +33,25 @@
<ng-template matTabContent>
<app-water-road></app-water-road>
</ng-template>
</mat-tab>
<mat-tab label="8.实景图">
</mat-tab> -->
<mat-tab label="6.实景图">
<ng-template matTabContent>
<app-realistic-picture-look></app-realistic-picture-look>
</ng-template>
</mat-tab>
<mat-tab label="9.上传CAD">
<mat-tab label="7.上传CAD">
<ng-template matTabContent>
<app-uploading-cad-look></app-uploading-cad-look>
</ng-template>
</mat-tab>
<mat-tab label="10.特别警示">
<!-- <mat-tab label="8.特别警示">
<ng-template matTabContent>
<app-special-warning></app-special-warning>
<app-special-warning></app-special-warning>
</ng-template>
</mat-tab>
<mat-tab label="11.作战部署">
</mat-tab> -->
<mat-tab label="8.作战部署">
<ng-template matTabContent>
<app-collection-tools></app-collection-tools>
<app-collection-tools></app-collection-tools>
</ng-template>
</mat-tab>
<!-- <mat-tab label="11.unity作战部署">
<ng-template matTabContent>
<app-collection-tools></app-collection-tools>
<iframe id="main" src="/unityApp2/index.html" name="unityApp" frameborder="0" width="100%" height="98%"></iframe>
</ng-template>
</mat-tab> -->
</mat-tab-group>
</mat-tab-group>

16
src/app/key-unit/view-unit-details/view-unit-details.component.html

@ -1,4 +1,4 @@
<div class="fixedPrompt">
<!-- <div class="fixedPrompt">
<label class="scorePrompt" *ngIf="selected.value == 0">*单位信息,建筑信息填写完整可得满分</label>
<label class="scorePrompt" *ngIf="selected.value == 1">*单位毗邻模块标注完整可得满分</label>
<label class="scorePrompt" *ngIf="selected.value == 2">*消防设施,重点部位模块标注完整可得满分</label>
@ -7,7 +7,7 @@
<label class="scorePrompt" *ngIf="selected.value == 6">*填写2条以上可得满分</label>
<label class="scorePrompt" *ngIf="selected.value == 9">*重点部位、安全出口、外观各自不低于两张图片方可满分</label>
<label class="scorePrompt" *ngIf="selected.value == 10">*保证至少有一个文件可得满分</label>
</div>
</div> -->
<mat-tab-group style="height:100%;" [selectedIndex]="selected.value" (selectedIndexChange)="selected.setValue($event)">
<mat-tab label="1.基本信息">
<ng-template matTabContent>
@ -44,7 +44,7 @@
<app-function-division-look></app-function-division-look>
</ng-template>
</mat-tab>
<mat-tab label="8.行车路线">
<!-- <mat-tab label="8.行车路线">
<ng-template matTabContent>
<app-router-gis></app-router-gis>
</ng-template>
@ -53,22 +53,22 @@
<ng-template matTabContent>
<app-water-road></app-water-road>
</ng-template>
</mat-tab>
<mat-tab label="10.实景图">
</mat-tab> -->
<mat-tab label="8.实景图">
<ng-template matTabContent>
<app-realistic-picture-look></app-realistic-picture-look>
</ng-template>
</mat-tab>
<mat-tab label="11.上传CAD">
<mat-tab label="9.上传CAD">
<ng-template matTabContent>
<app-uploading-cad-look></app-uploading-cad-look>
</ng-template>
</mat-tab>
<mat-tab label="12.特别警示">
<!-- <mat-tab label="10.特别警示">
<ng-template matTabContent>
<app-special-warning></app-special-warning>
</ng-template>
</mat-tab>
</mat-tab> -->
<!-- <mat-tab label="12.unity平面图">
<ng-template matTabContent>
<iframe id="main" src="/unityApp2Basic/index.html" name="unityApp" frameborder="0" width="96%" height="100%" style="margin-left:2%;"></iframe>

352
src/app/pages/login/login.component.ts

@ -1,188 +1,204 @@
import { ApplicationRef, Component, ComponentFactoryResolver, Injector, OnInit } from '@angular/core';
import { HttpClient } from '@angular/common/http'
import { Data } from '../../interface'
import { Router, ActivatedRoute } from '@angular/router'
import { CacheTokenService } from '../../http-interceptors/cache-token.service'//引入服务
import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar';
import { MatDialog, MatDialogRef } from '@angular/material/dialog';
import {
ApplicationRef,
Component,
ComponentFactoryResolver,
Injector,
OnInit,
} from "@angular/core";
import { HttpClient } from "@angular/common/http";
import { Data } from "../../interface";
import { Router, ActivatedRoute } from "@angular/router";
import { CacheTokenService } from "../../http-interceptors/cache-token.service"; //引入服务
import { MatSnackBar, MatSnackBarConfig } from "@angular/material/snack-bar";
import { MatDialog, MatDialogRef } from "@angular/material/dialog";
@Component({
selector: 'app-login',
templateUrl: './login.component.html',
styleUrls: ['./login.component.scss'],
selector: "app-login",
templateUrl: "./login.component.html",
styleUrls: ["./login.component.scss"],
})
export class LoginComponent implements OnInit {
constructor(
private http: HttpClient,
private router: Router,
private route: ActivatedRoute,
public token: CacheTokenService,
public snackBar: MatSnackBar,
public dialog: MatDialog
) {}
ngOnInit() {
this.automaticLogin();
}
errmsg: string = "";
onSubmit(e) {
this.http
.post("/api/Account/SignIn", {
name: e.name,
password: e.password,
})
.subscribe(
(data: Data) => {
sessionStorage.setItem("level", data.level);
sessionStorage.setItem("token", data.token);
sessionStorage.setItem("refreshToken", data.refreshToken);
sessionStorage.setItem("isDefaultPassword", data.isDefaultPassword); //是否需要修改默认密码
this.http.get("/api/Account/NavMenus").subscribe((data: any) => {
console.log("菜单数据", data);
let isHave = data.find((item) => {
return item.url == "/statisticanalysis/home";
});
let isHaveGis = data.find((item) => {
return item.url == "/gis";
});
let isKeyUnit = data.find((item) => {
return item.url == "/keyUnit";
});
constructor(private http: HttpClient, private router: Router, private route: ActivatedRoute, public token: CacheTokenService, public snackBar: MatSnackBar, public dialog: MatDialog) {
}
ngOnInit() {
this.automaticLogin()
}
errmsg: string = ''
onSubmit(e) {
this.http.post('/api/Account/SignIn', {
name: e.name,
password: e.password
}).subscribe((data: Data) => {
sessionStorage.setItem("level", data.level);
sessionStorage.setItem("token", data.token);
sessionStorage.setItem("refreshToken", data.refreshToken);
sessionStorage.setItem("isDefaultPassword", data.isDefaultPassword);//是否需要修改默认密码
this.http.get('/api/Account/NavMenus').subscribe((data: any) => {
let isHave = data.find(item => { return item.url == "/statisticanalysis/home" })
let isHaveGis = data.find(item => { return item.url == "/gis" })
if (isHave) {
this.router.navigate([`/statisticanalysis/home`])
this.dialogChangePassword()
return
} else if (isHaveGis) {
this.router.navigate([`/gis`])
this.dialogChangePassword()
return
} else if (data.length != 0) {
this.router.navigate([`/keyUnit`])
this.dialogChangePassword()
return
} else {
this.snackBar.open('该用户角色未分配任何菜单', '确定', {
duration: 3000
});
}
})
if (e.notlogin) { //7天免登录时
localStorage.setItem("isnologin", "true")
localStorage.setItem("token", data.token)
localStorage.setItem("refreshToken", data.refreshToken)
let URL = data.find((item) => {
return item.url;
});
console.log(URL);
if (isHave) {
this.router.navigate([`/statisticanalysis/home`]);
this.dialogChangePassword();
return;
} else if (isHaveGis) {
this.router.navigate([`/gis`]);
this.dialogChangePassword();
return;
} else if (isKeyUnit) {
this.router.navigate([`/keyUnit`]);
this.dialogChangePassword();
return;
} else if (data.length != 0) {
this.router.navigate([URL.url]);
this.dialogChangePassword();
return;
} else {
this.snackBar.open("该用户角色未分配任何菜单", "确定", {
duration: 3000,
});
}
//调用服务中的function刷新token
this.token.startUp()
});
if (e.notlogin) {
//7天免登录时
localStorage.setItem("isnologin", "true");
localStorage.setItem("token", data.token);
localStorage.setItem("refreshToken", data.refreshToken);
}
//调用服务中的function刷新token
this.token.startUp();
},
(err) => { this.errmsg = err }
)
}
dialogChangePassword() {
if (sessionStorage.getItem('isDefaultPassword') == 'true') {
let dialogRef = this.dialog.open(ChangepasswordComponent2,
{ width: '348px' });
dialogRef.afterClosed().subscribe((data) => {
sessionStorage.setItem('isDefaultPassword', 'false')
// this.lookUpdateData()
});
} else {
// this.lookUpdateData()
(err) => {
this.errmsg = err;
}
);
}
dialogChangePassword() {
if (sessionStorage.getItem("isDefaultPassword") == "true") {
let dialogRef = this.dialog.open(ChangepasswordComponent2, {
width: "348px",
});
dialogRef.afterClosed().subscribe((data) => {
sessionStorage.setItem("isDefaultPassword", "false");
});
}
//查看更新内容
lookUpdateData() {
let dialogRef = this.dialog.open(lookUpdateDataComponent,
{ width: '668px' });
dialogRef.afterClosed().subscribe((data) => {
});
}
//7天免登录自动登录
automaticLogin() {
let isNoLogin = localStorage.getItem("isnologin")
if (isNoLogin) { //7天免登录时
let token = localStorage.getItem("token");
let refreshToken = localStorage.getItem("refreshToken");
this.http.post('/api/Account/RefreshToken', {
token: token,
refreshToken: refreshToken
}).subscribe((data: any) => {
sessionStorage.setItem("level", data.level);
sessionStorage.setItem("token", data.token);
sessionStorage.setItem("refreshToken", data.refreshToken);
this.token.startUp()
this.router.navigate(['/keyUnit'])
this.snackBar.open('已自动登录', '确定', { duration: 3000 });
})
} //if
}
//打开弹窗
open() {
this.snackBar.open('请联系管理员', '确定', {
duration: 3000
}
//查看更新内容
lookUpdateData() {
let dialogRef = this.dialog.open(lookUpdateDataComponent, {
width: "668px",
});
dialogRef.afterClosed().subscribe((data) => {});
}
//7天免登录自动登录
automaticLogin() {
let isNoLogin = localStorage.getItem("isnologin");
if (isNoLogin) {
//7天免登录时
let token = localStorage.getItem("token");
let refreshToken = localStorage.getItem("refreshToken");
this.http
.post("/api/Account/RefreshToken", {
token: token,
refreshToken: refreshToken,
})
.subscribe((data: any) => {
sessionStorage.setItem("level", data.level);
sessionStorage.setItem("token", data.token);
sessionStorage.setItem("refreshToken", data.refreshToken);
this.token.startUp();
this.router.navigate(["/keyUnit"]);
this.snackBar.open("已自动登录", "确定", { duration: 3000 });
});
}
} //if
}
//打开弹窗
open() {
this.snackBar.open("请联系管理员", "确定", {
duration: 3000,
});
}
}
@Component({
selector: 'app-changepassword',
templateUrl: './changePassword.html',
styleUrls: ['./changepassword.scss']
selector: "app-changepassword",
templateUrl: "./changePassword.html",
styleUrls: ["./changepassword.scss"],
})
export class ChangepasswordComponent2 implements OnInit {
constructor(private http: HttpClient, public snackBar: MatSnackBar,
public dialogRef: MatDialogRef<ChangepasswordComponent2>) { }
ngOnInit() {
}
errmsg: string = ''
onSubmit(e) {
this.http.put(
'/api/Account/Password',
{
newPassword: e.newPassword,
password: 'SHya119!@'
}
).subscribe(data => {
this.dialogRef.close(data);
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open('密码修改成功', '确定', config);
}, (err) => { this.errmsg = err }
)
}
constructor(
private http: HttpClient,
public snackBar: MatSnackBar,
public dialogRef: MatDialogRef<ChangepasswordComponent2>
) {}
ngOnInit() {}
errmsg: string = "";
onSubmit(e) {
this.http
.put("/api/Account/Password", {
newPassword: e.newPassword,
password: "SHya119!@",
})
.subscribe(
(data) => {
this.dialogRef.close(data);
const config = new MatSnackBarConfig();
config.verticalPosition = "top";
config.duration = 3000;
this.snackBar.open("密码修改成功", "确定", config);
},
(err) => {
this.errmsg = err;
}
);
}
}
@Component({
selector: 'app-lookUpdateData',
templateUrl: './lookUpdateData.html',
styleUrls: ['./lookUpdateData.scss']
selector: "app-lookUpdateData",
templateUrl: "./lookUpdateData.html",
styleUrls: ["./lookUpdateData.scss"],
})
export class lookUpdateDataComponent implements OnInit {
constructor(private http: HttpClient, public snackBar: MatSnackBar,
public dialogRef: MatDialogRef<lookUpdateDataComponent>) { }
ngOnInit() {
}
onSubmit(e) {
}
}
constructor(
private http: HttpClient,
public snackBar: MatSnackBar,
public dialogRef: MatDialogRef<lookUpdateDataComponent>
) {}
ngOnInit() {}
onSubmit(e) {}
}

4
src/app/plan-audit/detachment-level/detachment-level.component.html

@ -10,9 +10,9 @@
</div>
<div class="queryField ordiv">
<label style="margin-right: 10px;">消防救援站:</label>
<label style="margin-right: 10px;">所属消防救援支队:</label>
<mat-form-field>
<input readonly matInput placeholder="请选择消防救援站" [(ngModel)]="selectOrganizationIName" name="selectOrganizationIName" (focus)="openorganizationbox()">
<input readonly matInput placeholder="请选择所属消防救援支队" [(ngModel)]="selectOrganizationIName" name="selectOrganizationIName" (focus)="openorganizationbox()">
</mat-form-field>
<mat-checkbox style="margin-left: 5px;" [(ngModel)]="HasChildrenOrganization" name="HasChildrenOrganization">包含下级</mat-checkbox>

4
src/app/plan-audit/plan-audit/plan-audit.component.html

@ -10,9 +10,9 @@
</div>
<div class="queryField ordiv">
<label style="margin-right: 10px;">消防救援站:</label>
<label style="margin-right: 10px;">所属消防救援支队:</label>
<mat-form-field>
<input readonly matInput placeholder="请选择消防救援站" [(ngModel)]="selectOrganizationIName"
<input readonly matInput placeholder="请选择所属消防救援支队" [(ngModel)]="selectOrganizationIName"
name="selectOrganizationIName" (focus)="openorganizationbox()">
</mat-form-field>
<mat-checkbox style="margin-left: 5px;" [(ngModel)]="HasChildrenOrganization"

2
src/app/plan-audit/plan-pass/plan-pass.component.html

@ -18,7 +18,7 @@
<span>{{compantData.name?compantData.name : '暂无数据'}}</span>
</div>
<div class="planBox">
<span>消防救援站: </span>
<span>所属消防救援支队: </span>
<span>{{organizationName}}</span>
</div>
<div class="planBox">

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

@ -24,18 +24,18 @@
<span>类型:</span>
<mat-form-field>
<mat-select placeholder='请选择单位类型' name="unittype" [(ngModel)]="projectlevel">
<mat-option value="1">Ⅰ级预案</mat-option>
<mat-option value="2">Ⅱ级预案</mat-option>
<!-- <mat-option value="1">Ⅰ级预案</mat-option>
<mat-option value="2">Ⅱ级预案</mat-option> -->
<mat-option value="3">Ⅲ级预案</mat-option>
<mat-option value="4">Ⅳ级预案</mat-option>
<mat-option value="5">Ⅴ级预案</mat-option>
<mat-option value="6">应急预案(国家级)</mat-option>
<!-- <mat-option value="6">应急预案(国家级)</mat-option>
<mat-option value="7">应急预案(市级)</mat-option>
<mat-option value="8">类型预案</mat-option>
<mat-option value="8">类型预案</mat-option> -->
<mat-option value="11">重点单位</mat-option>
<mat-option value="12">消防水源</mat-option>
<!-- <mat-option value="12">消防水源</mat-option>
<mat-option value="13">消防力量</mat-option>
<mat-option value="14">联动力量</mat-option>
<mat-option value="14">联动力量</mat-option> -->
</mat-select>
</mat-form-field>
<span>状态:</span>
@ -196,7 +196,7 @@
<span>{{compantData.name?compantData.name : '暂无数据'}}</span>
</div>
<div class="planBox">
<span>消防救援站: </span>
<span>所属消防救援支队: </span>
<span>{{organizationName}}</span>
</div>
<div class="planBox">
@ -208,7 +208,12 @@
<span>{{compantData.address?compantData.address : '暂无数据'}}</span>
</div>
<div class="planBox">
<span style="color: #2196F3;cursor:pointer;" (click)='oopen3Dshow()'>查看详情</span>
<span style="color: #2196F3;cursor:pointer;" (click)='open3Dshow()'>查看详情</span>
</div>
<div class="mask" *ngIf="downloadisLoading">
<span style="font-size: 13px;">下载中...</span>
<mat-progress-bar mode="determinate" [value]="downloadProgress" class="progress"></mat-progress-bar>
</div>
</div>
<!-- 水源审核 -->

15
src/app/plan-audit/plan-record/plan-record.component.scss

@ -315,6 +315,21 @@
margin-left: 10px;
display: flex;
flex-direction: column;
position: relative;
.mask {
position: absolute;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.2);
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
mat-progress-bar{
width: 70%;
}
}
@media screen and (max-device-width:1300px) {
overflow-y: auto;

174
src/app/plan-audit/plan-record/plan-record.component.ts

@ -8,9 +8,8 @@ import {
} from "@angular/material/dialog";
import { HttpClient } from "@angular/common/http";
import { DomSanitizer } from "@angular/platform-browser";
import { Viewer } from "photo-sphere-viewer";
declare var CryptoJS;
import { photoViewer } from "photo-sphere-viewer";
import Viewer from "viewerjs";
@Component({
selector: "app-plan-record",
templateUrl: "./plan-record.component.html",
@ -152,9 +151,9 @@ export class PlanRecordComponent implements OnInit {
postlevel: any;
bianzhi = false;
tableClick(e, item) {
console.log(item);
this.showtype = -1;
//e.target.parentElement.bgColor='#2196F3'
// console.log(item)
this.organizationName = "";
this.itemid = item.itemId;
this.id = item.id;
@ -206,9 +205,9 @@ export class PlanRecordComponent implements OnInit {
this.http
.get(`/api/PlanComponents/${item.itemId}`)
.subscribe((data: any) => {
console.log("预案详情", data);
this.companyId = data.companyId;
this.companyName = data.companyName;
//this.bianzhi = false
if (data.planType != 2 && data.planType != 1) {
if (data.planMode == 2) {
this.showtype = 0;
@ -217,11 +216,17 @@ export class PlanRecordComponent implements OnInit {
this.iframeSrc = this.sanitizer.bypassSecurityTrustResourceUrl(
this.src
);
//this.src=`/keyUnit/viewunitinfoplan?id=${data.companyId}&orName=${data.company.organizationId}&orId=${data.company.organizationName}`
} else {
this.bianzhi = false;
this.fetchUrl = data.attachmentUrls[0];
var index = this.fetchUrl.indexOf("/");
let isImg;
if (
this.fetchUrl.indexOf("png") !== -1 ||
this.fetchUrl.indexOf("jpg") !== -1
) {
isImg = true;
}
if (this.fetchUrl.substr(0, index) == "psw") {
this.showtype = 1;
var obj = document.getElementById("viewer");
@ -229,11 +234,28 @@ export class PlanRecordComponent implements OnInit {
obj.innerHTML = "";
}
window.setTimeout(() => {
this.viewer = new Viewer({
this.viewer = new photoViewer({
container: document.querySelector("#viewer"),
panorama: "/api/Objects/PlanPlatform/" + this.fetchUrl,
});
});
} else if (isImg) {
let dom = document.getElementById(`viewerjs`);
let pObjs = dom.childNodes;
let node = document.createElement("img");
node.style.display = "none";
node.src = "/api/Objects/PlanPlatform/" + this.fetchUrl;
node.id = "img";
dom.appendChild(node);
setTimeout(() => {
let viewer = new Viewer(document.getElementById(`viewerjs`), {
hidden: () => {
dom.removeChild(pObjs[0]);
viewer.destroy();
},
});
node.click();
}, 0);
} else {
this.lookWord();
}
@ -243,10 +265,6 @@ export class PlanRecordComponent implements OnInit {
this.planData = data;
this.handleData();
return;
//this.src=`/planAudit/planpass?id=${data.companyId}&companyName=${data.companyName}&auditPlanId=${data.id}&auditStatus=${data.auditStatus}&planType=1`
//this.iframeSrc=this.sanitizer.bypassSecurityTrustResourceUrl(this.src);
//window.open(`/planAudit/planpass?id=${data.companyId}&companyName=${data.companyName}&auditPlanId=${data.id}&auditStatus=${data.auditStatus}&planType=1`)
}
});
}
@ -261,8 +279,6 @@ export class PlanRecordComponent implements OnInit {
}
}
this.radioid = item.itemId;
/* this.chuorzhong=item.verifyState
this.radioid=item.itemId */
}
//毕升
@ -337,13 +353,131 @@ export class PlanRecordComponent implements OnInit {
}
//打开三维预案弹窗
oopen3Dshow() {
this.dialog.open(recordshow3D, {
width: "1650px",
height: "850px",
data: { url: this.thirdPartyURL, twoOrthree: this.twoOrthree },
});
selectedFileData;
open3Dshow() {
// console.log("三维预案1", this.thirdPartyURL);
// console.log("三维预案2", this.twoOrthree);
// return
if (this.twoOrthree === 2) {
this.dialog.open(recordshow3D, {
width: "1650px",
height: "850px",
data: { url: this.thirdPartyURL, twoOrthree: this.twoOrthree },
});
} else if (this.twoOrthree === 3) {
console.log(this.planData);
if (this.planData.attachmentUrls.length !== 0) {
this.downloadisLoading = true;
this.http
.get(
"/api/ObjectMetadata/PlanPlatform/" +
this.planData.attachmentUrls[0]
)
.subscribe((data: any) => {
console.log("源文件", data);
this.selectedFileData = data;
this.downloadFile();
});
}
}
}
//初始化下载
downloadProgress = 0;
downloadisLoading = false;
downloadFile() {
this.downloadProgress = 0;
let file = this.selectedFileData;
let fileSize = file.fileLength; //下载文件的总大小
let shardSize = 10 * 1024 * 1024; //文件大小是否大于10MB
console.log(file);
if (file && fileSize <= shardSize) {
//<=10MB时直接下载
this.http
.get(`/api/Objects/PlanPlatform/${file.objectName}`, {
responseType: "blob",
})
.subscribe((data) => {
console.log(data);
let url = window.URL.createObjectURL(new Blob([data])); //createObjectURL创建一个下载Blob的url地址
let link = document.createElement("a");
link.style.display = "none";
link.href = url;
let suffix = file.objectName.substring(
file.objectName.lastIndexOf(".") + 1,
file.objectName.length
);
link.setAttribute(
"download",
file.fileName
? file.fileName
: file.objectName.split("/")[
file.objectName.split("/").length - 1
]
);
document.body.appendChild(link);
link.click();
this.downloadisLoading = false;
});
} else if (file && fileSize > shardSize) {
//>10MB时分块下载
this.blockingDownload(); //分段下载
this.downloadisLoading = true;
// this.setFileLoading()
}
}
// //分段下载并合并
async blockingDownload() {
let file = this.selectedFileData;
let fileSize = file.fileLength; //下载文件的总大小
let shardSize = 3 * 1024 * 1024; //3MB一个分片
let allSlice = Math.ceil(fileSize / shardSize); //总文件/3MB===共分多少段
let allFile: any = []; //所有的file分段
for (let i = 0; i < allSlice; i++) {
let start = i * shardSize; //每次下载文件开始位置
let end = Math.min(fileSize, start + shardSize - 1); //每次下载文件结束为止
let result = await new Promise((result, reject) => {
this.http
.get(`/api/Objects/PlanPlatform/${file.objectName}`, {
headers: { range: `bytes= ${start}-${end}` },
responseType: "blob",
})
.subscribe((data) => {
result(data);
});
});
allFile.push(result);
this.downloadProgress = Number((i / allSlice).toFixed(2)) * 100;
if (allFile.length === allSlice) {
//合并文件输出给浏览器
let url = window.URL.createObjectURL(new Blob(allFile)); //createObjectURL创建一个下载Blob的url地址
let link = document.createElement("a");
link.style.display = "none";
link.href = url;
let suffix = file.objectName.substring(
file.objectName.lastIndexOf(".") + 1,
file.objectName.length
);
link.setAttribute(
"download",
file.fileName
? file.fileName
: file.objectName.split("/")[file.objectName.split("/").length - 1]
);
document.body.appendChild(link);
link.click();
// this.downloadProgress = 0
this.downloadisLoading = false;
// this.setFileLoading()
}
} //for循环
}
//判断iframe是否加载完成
iftrue = true;
ifranmeLoad() {

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

@ -17,18 +17,18 @@
<span>类型:</span>
<mat-form-field>
<mat-select placeholder='请选择单位类型' name="unittype" [(ngModel)]="projectlevel">
<mat-option value="1">Ⅰ级预案</mat-option>
<mat-option value="2">Ⅱ级预案</mat-option>
<!-- <mat-option value="1">Ⅰ级预案</mat-option>
<mat-option value="2">Ⅱ级预案</mat-option> -->
<mat-option value="3">Ⅲ级预案</mat-option>
<mat-option value="4">Ⅳ级预案</mat-option>
<mat-option value="5">Ⅴ级预案</mat-option>
<mat-option value="6">应急预案(国家级)</mat-option>
<!-- <mat-option value="6">应急预案(国家级)</mat-option>
<mat-option value="7">应急预案(市级)</mat-option>
<mat-option value="8">类型预案</mat-option>
<mat-option value="8">类型预案</mat-option> -->
<mat-option value="11">重点单位</mat-option>
<mat-option value="12">消防水源</mat-option>
<!-- <mat-option value="12">消防水源</mat-option>
<mat-option value="13">消防力量</mat-option>
<mat-option value="14">联动力量</mat-option>
<mat-option value="14">联动力量</mat-option> -->
</mat-select>
</mat-form-field>
<span class="bzjb">编制级别:</span>
@ -347,7 +347,7 @@
<span>{{compantData.name?compantData.name : '暂无数据'}}</span>
</div>
<div class="planBox">
<span>消防救援站: </span>
<span>所属消防救援支队: </span>
<span>{{organizationName}}</span>
</div>
<div class="planBox">
@ -361,6 +361,11 @@
<div class="planBox">
<span style="color: #2196F3;cursor:pointer;" (click)='oopen3Dshow()'>查看详情</span>
</div>
<div class="mask" *ngIf="downloadisLoading">
<span style="font-size: 13px;">下载中...</span>
<mat-progress-bar mode="determinate" [value]="downloadProgress" class="progress"></mat-progress-bar>
</div>
</div>
<!-- 重点单位 -->
<div id="company" *ngIf="showtype == 3">

26
src/app/plan-audit/wait-examineer/wait-examineer.component.scss

@ -20,9 +20,11 @@
display: flex;
flex-direction: column;
align-items: center;
form{
form {
width: 100%;
}
.headdiv {
@media screen and (min-device-width: 1400px) {
margin: 0 0 0 28px;
@ -163,11 +165,13 @@
}
}
}
.btnbox{
.btnbox {
display: flex;
justify-content: center;
align-items: center;
button{
button {
margin: 0 6px;
}
}
@ -250,6 +254,22 @@
.boxright {
height: 100%;
width: 53%;
position: relative;
.mask {
position: absolute;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.2);
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
mat-progress-bar {
width: 70%;
}
}
@media screen and (max-device-width: 1400px) {
overflow-y: auto;

219
src/app/plan-audit/wait-examineer/wait-examineer.component.ts

@ -17,10 +17,9 @@ import {
import { HttpClient } from "@angular/common/http";
declare var CryptoJS;
import { DomSanitizer } from "@angular/platform-browser";
import { Viewer as photoViewer } from "photo-sphere-viewer";
import Viewer from "viewerjs";
import { photoViewer } from "photo-sphere-viewer";
declare var echarts: any;
import Viewer from "viewerjs";
@Component({
selector: "app-wait-examineer",
templateUrl: "./wait-examineer.component.html",
@ -111,7 +110,7 @@ export class WaitExamineerComponent implements OnInit {
fetchUrl;
companyName;
plantypes;
IsNewData:any = [true, false];
IsNewData: any = [true, false];
//获取表格数据
PageNumber = 1;
@ -157,30 +156,7 @@ export class WaitExamineerComponent implements OnInit {
this.PageNumber = e.pageIndex + 1;
this.getAlltabledate();
}
lookImg(imgUrl, type?: boolean) {
// console.log(imgUrl)
let dom = document.getElementById(`viewerjs`);
let pObjs = dom.childNodes;
let node = document.createElement("img");
node.style.display = "none";
if (type) {
let src = imgUrl.split("?")[0];
node.src = src;
} else {
node.src = "/api/Objects/PlanPlatform/" + imgUrl;
}
node.id = "imgxxx";
dom.appendChild(node);
setTimeout(() => {
let viewer = new Viewer(document.getElementById(`viewerjs`), {
hidden: () => {
dom.removeChild(pObjs[0]);
viewer.destroy();
},
});
node.click();
}, 0);
}
//radio点击事件
viewer; //全景图对象
waterData: any; //需要传递给子组件的水源信息
@ -197,8 +173,6 @@ export class WaitExamineerComponent implements OnInit {
bianzhi = false;
radioClick(e, item) {
this.selectedItem = item;
// console.log('当前选择的信息',JSON.parse(this.selectedItem.differentContent) )
if (item.contentType == 11 && this.selectedItem.differentContent) {
let differentContent = JSON.parse(this.selectedItem.differentContent);
@ -272,9 +246,6 @@ export class WaitExamineerComponent implements OnInit {
});
}
}
// console.log('功能分区', this.differentContentOfFunction)
this.showtype = -1;
this.organizationName = "";
this.itemid = item.itemId;
@ -349,6 +320,13 @@ export class WaitExamineerComponent implements OnInit {
this.bianzhi = false;
this.fetchUrl = data.attachmentUrls[0];
var index = this.fetchUrl.indexOf("/");
let isImg;
if (
this.fetchUrl.indexOf("png") !== -1 ||
this.fetchUrl.indexOf("jpg") !== -1
) {
isImg = true;
}
if (this.fetchUrl.substr(0, index) == "psw") {
this.showtype = 1;
var obj = document.getElementById("viewer");
@ -361,6 +339,23 @@ export class WaitExamineerComponent implements OnInit {
panorama: "/api/Objects/PlanPlatform/" + this.fetchUrl,
});
});
} else if (isImg) {
let dom = document.getElementById(`viewerjs`);
let pObjs = dom.childNodes;
let node = document.createElement("img");
node.style.display = "none";
node.src = "/api/Objects/PlanPlatform/" + this.fetchUrl;
node.id = "img";
dom.appendChild(node);
setTimeout(() => {
let viewer = new Viewer(document.getElementById(`viewerjs`), {
hidden: () => {
dom.removeChild(pObjs[0]);
viewer.destroy();
},
});
node.click();
}, 0);
} else {
this.lookWord();
}
@ -385,7 +380,30 @@ export class WaitExamineerComponent implements OnInit {
}
this.radioid = item.itemId;
}
lookImg(imgUrl, type?: boolean) {
// console.log(imgUrl)
let dom = document.getElementById(`viewerjs`);
let pObjs = dom.childNodes;
let node = document.createElement("img");
node.style.display = "none";
if (type) {
let src = imgUrl.split("?")[0];
node.src = src;
} else {
node.src = "/api/Objects/PlanPlatform/" + imgUrl;
}
node.id = "imgxxx";
dom.appendChild(node);
setTimeout(() => {
let viewer = new Viewer(document.getElementById(`viewerjs`), {
hidden: () => {
dom.removeChild(pObjs[0]);
viewer.destroy();
},
});
node.click();
}, 0);
}
//毕升
lookWord() {
console.log("lookWord");
@ -459,16 +477,131 @@ export class WaitExamineerComponent implements OnInit {
}
//打开三维预案弹窗
selectedFileData: any;
oopen3Dshow() {
this.dialog.open(show3D, {
width: "1650px",
height: "850px",
data: {
url: this.thirdPartyURL,
twoOrthree: this.twoOrthree,
radioid: this.radioid,
},
});
if (this.twoOrthree === 2) {
this.dialog.open(show3D, {
width: "1650px",
height: "850px",
data: {
url: this.thirdPartyURL,
twoOrthree: this.twoOrthree,
radioid: this.radioid,
},
});
} else if (this.twoOrthree === 3) {
console.log(this.planData);
if (this.planData.attachmentUrls.length !== 0) {
this.downloadisLoading = true;
this.http
.get(
"/api/ObjectMetadata/PlanPlatform/" +
this.planData.attachmentUrls[0]
)
.subscribe((data: any) => {
console.log("源文件", data);
this.selectedFileData = data;
this.downloadFile();
});
}
}
}
//初始化下载
downloadProgress = 0;
downloadisLoading = false;
downloadFile() {
this.downloadProgress = 0;
let file = this.selectedFileData;
let fileSize = file.fileLength; //下载文件的总大小
let shardSize = 10 * 1024 * 1024; //文件大小是否大于10MB
console.log(file);
if (file && fileSize <= shardSize) {
//<=10MB时直接下载
this.http
.get(`/api/Objects/PlanPlatform/${file.objectName}`, {
responseType: "blob",
})
.subscribe((data) => {
console.log(data);
let url = window.URL.createObjectURL(new Blob([data])); //createObjectURL创建一个下载Blob的url地址
let link = document.createElement("a");
link.style.display = "none";
link.href = url;
let suffix = file.objectName.substring(
file.objectName.lastIndexOf(".") + 1,
file.objectName.length
);
link.setAttribute(
"download",
file.fileName
? file.fileName
: file.objectName.split("/")[
file.objectName.split("/").length - 1
]
);
document.body.appendChild(link);
link.click();
this.downloadisLoading = false;
});
} else if (file && fileSize > shardSize) {
//>10MB时分块下载
this.blockingDownload(); //分段下载
this.downloadisLoading = true;
// this.setFileLoading()
}
}
// //分段下载并合并
async blockingDownload() {
let file = this.selectedFileData;
let fileSize = file.fileLength; //下载文件的总大小
let shardSize = 3 * 1024 * 1024; //3MB一个分片
let allSlice = Math.ceil(fileSize / shardSize); //总文件/3MB===共分多少段
let allFile: any = []; //所有的file分段
for (let i = 0; i < allSlice; i++) {
let start = i * shardSize; //每次下载文件开始位置
let end = Math.min(fileSize, start + shardSize - 1); //每次下载文件结束为止
let result = await new Promise((result, reject) => {
this.http
.get(`/api/Objects/PlanPlatform/${file.objectName}`, {
headers: { range: `bytes= ${start}-${end}` },
responseType: "blob",
})
.subscribe((data) => {
result(data);
});
});
allFile.push(result);
this.downloadProgress = Number((i / allSlice).toFixed(2)) * 100;
if (allFile.length === allSlice) {
//合并文件输出给浏览器
let url = window.URL.createObjectURL(new Blob(allFile)); //createObjectURL创建一个下载Blob的url地址
let link = document.createElement("a");
link.style.display = "none";
link.href = url;
let suffix = file.objectName.substring(
file.objectName.lastIndexOf(".") + 1,
file.objectName.length
);
link.setAttribute(
"download",
file.fileName
? file.fileName
: file.objectName.split("/")[file.objectName.split("/").length - 1]
);
document.body.appendChild(link);
link.click();
// this.downloadProgress = 0
this.downloadisLoading = false;
// this.setFileLoading()
}
} //for循环
}
//变更数据和全部数据切换按钮

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

@ -61,12 +61,12 @@
<input style="width: 175px;" type="file" name="" id="uploadFile" *ngIf="isup" (change)="filechange($event)">
<span *ngIf="uploadover" style="font-size: 13px;">(已上传)</span>
</div>
<div *ngIf="inputword">
<!-- <div *ngIf="inputword">
<mat-radio-button value="2" style="margin-right: 10px;">模板在线编制</mat-radio-button>
</div>
<div *ngIf="inputNew">
<mat-radio-button value="4" style="margin-right: 10px;">自定义在线编制</mat-radio-button>
</div>
</div> -->
<!-- <div *ngIf="inputword">
<mat-radio-button value="1" style="margin-right: 10px;">导入word文档</mat-radio-button>

10
src/app/plan-management/entry-plan-look/entry-plan-look.component.html

@ -16,7 +16,7 @@
<span>单位名称:{{unitdata.unitname == "null" ? "无" : unitdata.unitname}}</span>
</div>
<div>
<span>消防救援站:{{unitdata.organizationName == "null" ? "无" : unitdata.organizationName}}</span>
<span>所属消防救援支队:{{unitdata.organizationName == "null" ? "无" : unitdata.organizationName}}</span>
</div>
<div>
<span>单位类型:{{unitdata.unittype == "null" ? "无" : unitdata.unittype}}</span>
@ -112,8 +112,8 @@
<td mat-cell *matCellDef="let element">
<span (click)="changeName(element)"
*ngIf="element.auditStatus==8 || element.maintenanceVerifyState=='未提交审核'">改名</span>
<span (click)="upzhuanMb(element)"
*ngIf="element.planMode==1&&element.planType==16&&element.planCategory==5">转在线导入</span>
<!-- <span (click)="upzhuanMb(element)"
*ngIf="element.planMode==1&&element.planType==16&&element.planCategory==5">转在线导入</span> -->
<span (click)="editPlan(element)"
[ngClass]="{'grey': !(element.auditStatus!='16' && element.auditStatus != '1' )}">编辑</span>
<span (click)="lookPlan(element)"
@ -131,10 +131,10 @@
<ng-container *ngIf="isoperation == 'false'" matColumnDef="operation">
<th mat-header-cell *matHeaderCellDef>操作</th>
<td mat-cell *matCellDef="let element">
<span (click)="sixFamiliarize(element)">六熟悉</span>
<!-- <span (click)="sixFamiliarize(element)">六熟悉</span> -->
<span (click)="lookPlan(element)">查看</span>
<span (click)="readFile(element)"
[ngClass]="{'grey': element.planMode == '1' || element.planMode == '2' || element.planMode == '3'}">下载</span>
[ngClass]="{'grey': element.planMode == '2' || element.planMode == '3'}">下载</span>
</td>
</ng-container>
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>

244
src/app/plan-management/entry-plan/entry-plan.component.html

@ -27,10 +27,10 @@
<button mat-raised-button color="primary">查询</button>
<button mat-raised-button style="margin-left: 25px;" type="button" (click)="reset()">重置</button>
</div>
<div class="queryField ordiv" *ngIf="!padMore">
<label style="margin-right: 10px;">消防救援站:</label>
<div class="queryField ordiv">
<label style="margin-right: 10px;">所属消防救援支队:</label>
<mat-form-field class="example-full-width">
<input readonly matInput placeholder="请选择消防救援站" autocomplete="off" [(ngModel)]="js" name="js"
<input readonly matInput placeholder="请选择所属消防救援支队" autocomplete="off" [(ngModel)]="js" name="js"
(focus)="openorganizationbox()">
</mat-form-field>
<mat-checkbox style="margin-left: 6px;" [(ngModel)]="jscheck" name="jscheck">包含下级</mat-checkbox>
@ -58,7 +58,7 @@
</mat-tree>
</div>
</div>
<div class="queryField" *ngIf="!padMore">
<div class="queryField">
<label style="margin-right: 10px;">预案类型:</label>
<mat-form-field>
<mat-select name="reservePlanType" [(ngModel)]="reservePlanType" placeholder='请选择预案类型'
@ -69,18 +69,9 @@
<mat-option value=4>其他预案</mat-option>
</mat-select>
</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 class="queryField" *ngIf="!padMore&&!pcMore">
<div class="queryField">
<label style="margin-right: 10px;">预案级别:</label>
<mat-form-field>
<mat-select placeholder='请选择预案级别' [(ngModel)]="planCategory" name="planCategory"
@ -92,26 +83,7 @@
</mat-form-field>
</div>
<div class="queryField" *ngIf="!padMore&&!pcMore">
<label style="margin-right: 10px;">重点单位:</label>
<mat-form-field>
<mat-select placeholder='是否为重点单位' [(ngModel)]="isFollowed" name="isFollowed">
<mat-option value=0>一般单位</mat-option>
<mat-option value=1>重点单位</mat-option>
</mat-select>
</mat-form-field>
</div>
<!-- <div class="queryField" *ngIf="!padMore&&!pcMore">
<label style="margin-right: 10px;">编制级别:</label>
<mat-form-field>
<mat-select name="preparelevel" [(ngModel)]="preparelevel" placeholder='请选择编制级别'>
<mat-option *ngFor="let item of preparelevels" [value]="item.value">{{item.name}}
</mat-option>
</mat-select>
</mat-form-field>
<mat-checkbox style="margin-left: 6px;" [(ngModel)]="plcheck" name="plcheck">包含下级</mat-checkbox>
</div> -->
<div class="queryField" *ngIf="!padMore&&!pcMore">
<div class="queryField">
<label style="margin-right: 10px;">审核状态:</label>
<mat-form-field>
<mat-select name="toExamine" [(ngModel)]="toExamine" placeholder='请选择审核状态'>
@ -122,16 +94,7 @@
</mat-select>
</mat-form-field>
</div>
<div class="queryField" *ngIf="!padMore&&!pcMore">
<label style="margin-right: 10px;">信息完整度排序:</label>
<mat-form-field>
<mat-select placeholder='请选择排序方式' [(ngModel)]="integritySort" name="integritySort">
<mat-option value="desc">从高到低</mat-option>
<mat-option value="asc">从低到高</mat-option>
</mat-select>
</mat-form-field>
</div>
<div class="queryField" *ngIf="!padMore&&!pcMore">
<div class="queryField">
<label style="margin-right: 10px;">制作情况:</label>
<mat-form-field>
<mat-select placeholder='请选择预案制作情况' [(ngModel)]="haveyuan" name="haveyuan">
@ -140,31 +103,10 @@
</mat-select>
</mat-form-field>
</div>
<div class="queryField" *ngIf="!padMore&&!pcMore">
<label style="margin-right: 10px;">单位状态:</label>
<mat-form-field>
<mat-select placeholder='请选择单位状态' [(ngModel)]="IsNewCompanyData" name="IsNewCompanyData">
<mat-option value='true'>新增</mat-option>
<mat-option value="false">维护更新</mat-option>
</mat-select>
</mat-form-field>
</div>
<div class="queryField" *ngIf="!padMore&&!pcMore">
<label style="margin-right: 10px;">预案状态:</label>
<mat-form-field>
<mat-select placeholder='请选择预案状态' [(ngModel)]="IsNewData" name="IsNewData">
<mat-option value='true'>新增</mat-option>
<mat-option value="false">维护更新</mat-option>
</mat-select>
</mat-form-field>
</div>
<div class="queryField" *ngIf="!padMore&&!pcMore">
<mat-checkbox (ngModelChange)="templatePlanChange($event,1)" [(ngModel)]="templatePlan"
name="templatePlan">模板录入预案</mat-checkbox>
</div>
<div class="queryField" *ngIf="!padMore&&!pcMore">
<mat-checkbox (ngModelChange)="templatePlanChange($event,2)" [(ngModel)]="customPlan"
name="customPlan">自定义预案</mat-checkbox>
<div class="queryField">
<button mat-raised-button color="primary">查询</button>
<button mat-raised-button style="margin-left: 25px;" type="button" (click)="reset()">重置</button>
</div>
</div>
</form>
@ -174,177 +116,17 @@
<div class="tablebox">
<table mat-table [dataSource]="tabledataSource" class="mat-elevation-z8">
<ng-container matColumnDef="state">
<th mat-header-cell *matHeaderCellDef style="width: 10%;">单位状态</th>
<td mat-cell *matCellDef="let element">
<span class="add" *ngIf="element.company.isNewData">新增</span>
<span class="weihu" *ngIf="!element.company.isNewData">维护更新</span>
</td>
</ng-container>
<ng-container matColumnDef="isFollowed">
<th mat-header-cell *matHeaderCellDef style="width: 3%;">重点单位</th>
<td mat-cell *matCellDef="let element">
<span title="重点单位" *ngIf="element.company.isFollowed">
<mat-icon style="margin-top: 6px;color: red;">star</mat-icon>
</span>
</td>
</ng-container>
<ng-container matColumnDef="unitname">
<th mat-header-cell *matHeaderCellDef>单位名称</th>
<td mat-cell *matCellDef="let element">{{element.company.name}}</td>
</ng-container>
<ng-container matColumnDef="integrity">
<th mat-header-cell *matHeaderCellDef style="text-align: center;">信息完整度</th>
<td mat-cell *matCellDef="let element;let i = index">
<div class="integrityDiv">
<span class="integrityNum">
{{(element.company.companyIntegrityScore.totalScore.toFixed(2) * 100).toFixed()}}%
</span>
<div class="integrityColorDiv"
[style]="integrity((element.company.companyIntegrityScore.totalScore.toFixed(2) * 100).toFixed())">
</div>
<div class="integrityDetails" [ngClass]="{'bottomposition': i <= 5,'topposition': i > 5}">
<div class="integrityDetailsTop">
<span class="span1">分类名称</span>
<span class="span2">占比</span>
<span class="span3">总占比</span>
</div>
<div class="integrityDetailsBody">
<ul>
<li>
<div class="name">单位信息</div>
<div class="colorDiv">
<div class="colorDivBac">
<div class="colorDivCon"
[style]="integrityDetails((element.company.companyIntegrityScore.basicInfoScore * 5).toFixed(1),5)">
</div>
</div>
<span>{{(element.company.companyIntegrityScore.basicInfoScore *
5).toFixed(1)}}%</span>
</div>
<div class="number">5%</div>
</li>
<li>
<div class="name">建筑信息</div>
<div class="colorDiv">
<div class="colorDivBac">
<div class="colorDivCon"
[style]="integrityDetails((element.company.companyIntegrityScore.buildingInfoScore * 10).toFixed(1),10)">
</div>
</div>
<span>{{(element.company.companyIntegrityScore.buildingInfoScore *
10).toFixed(1)}}%</span>
</div>
<div class="number">10%</div>
</li>
<li>
<div class="name">平面图</div>
<div class="colorDiv">
<div class="colorDivBac">
<div class="colorDivCon"
[style]="integrityDetails((element.company.companyIntegrityScore.planImageScore * 10).toFixed(1),10)">
</div>
</div>
<span>{{(element.company.companyIntegrityScore.planImageScore *
10).toFixed(1)}}%</span>
</div>
<div class="number">10%</div>
</li>
<li>
<div class="name">四周毗邻</div>
<div class="colorDiv">
<div class="colorDivBac">
<div class="colorDivCon"
[style]="integrityDetails((element.company.companyIntegrityScore.adjoinScore * 10).toFixed(1),10)">
</div>
</div>
<span>{{(element.company.companyIntegrityScore.adjoinScore *
10).toFixed(1)}}%</span>
</div>
<div class="number">10%</div>
</li>
<li>
<div class="name">消防设施</div>
<div class="colorDiv">
<div class="colorDivBac">
<div class="colorDivCon"
[style]="integrityDetails((element.company.companyIntegrityScore.facilityScore * 25).toFixed(1),25)">
</div>
</div>
<span>{{(element.company.companyIntegrityScore.facilityScore *
25).toFixed(1)}}%</span>
</div>
<div class="number">25%</div>
</li>
<li>
<div class="name">重点部位</div>
<div class="colorDiv">
<div class="colorDivBac">
<div class="colorDivCon"
[style]="integrityDetails((element.company.companyIntegrityScore.importantLocationScore * 10).toFixed(1),10)">
</div>
</div>
<span>{{(element.company.companyIntegrityScore.importantLocationScore *
10).toFixed(1)}}%</span>
</div>
<div class="number">10%</div>
</li>
<li>
<div class="name">功能分区</div>
<div class="colorDiv">
<div class="colorDivBac">
<div class="colorDivCon"
[style]="integrityDetails((element.company.companyIntegrityScore.functionalDivisionScore * 10).toFixed(1),10)">
</div>
</div>
<span>{{(element.company.companyIntegrityScore.functionalDivisionScore *
10).toFixed(1)}}%</span>
</div>
<div class="number">10%</div>
</li>
<li>
<div class="name">实景图</div>
<div class="colorDiv">
<div class="colorDivBac">
<div class="colorDivCon"
[style]="integrityDetails((element.company.companyIntegrityScore.realityImageScore * 10).toFixed(1),10)">
</div>
</div>
<span>{{(element.company.companyIntegrityScore.realityImageScore *
10).toFixed(1)}}%</span>
</div>
<div class="number">10%</div>
</li>
<li>
<div class="name">CAD上传</div>
<div class="colorDiv">
<div class="colorDivBac">
<div class="colorDivCon"
[style]="integrityDetails((element.company.companyIntegrityScore.cadScore * 10).toFixed(1),10)">
</div>
</div>
<span>{{(element.company.companyIntegrityScore.cadScore *
10).toFixed(1)}}%</span>
</div>
<div class="number">10%</div>
</li>
</ul>
</div>
<div style="width: 100%;text-align: center;font-size: 13px;">
仅供参考
</div>
</div>
</div>
</td>
</ng-container>
<ng-container matColumnDef="level">
<th mat-header-cell *matHeaderCellDef>预案级别</th>
<td mat-cell *matCellDef="let element">{{element.planCategory}}</td>
</ng-container>
<ng-container matColumnDef="jurisdictionsquadron">
<th mat-header-cell *matHeaderCellDef>消防救援站</th>
<th mat-header-cell *matHeaderCellDef>所属消防救援支队</th>
<td mat-cell *matCellDef="let element">{{element.company.organizationName}}</td>
</ng-container>

3
src/app/plan-management/entry-plan/entry-plan.component.ts

@ -68,10 +68,7 @@ export class EntryPlanComponent implements OnInit {
IsNewCompanyData = ""; //单位维护更新或者新增
displayedColumns: string[] = [
"state",
"isFollowed",
"unitname",
"integrity",
"level",
"jurisdictionsquadron",
"unittype",

6
src/app/plan-management/maintain-up/maintain-up.component.html

@ -11,9 +11,9 @@
</div>
<div class="queryField ordiv">
<label style="margin-right: 10px;">消防救援站:</label>
<label style="margin-right: 10px;">所属消防救援支队:</label>
<mat-form-field class="example-full-width">
<input (click)="stopclose($event)" readonly matInput placeholder="请选择消防救援站" autocomplete="off"
<input (click)="stopclose($event)" readonly matInput placeholder="请选择所属消防救援支队" autocomplete="off"
[(ngModel)]="js" name="js" (focus)="openorganizationbox()">
</mat-form-field>
<mat-checkbox color="primary" style="margin-left: 6px;" [(ngModel)]="jscheck" name="jscheck">包含下级
@ -296,7 +296,7 @@
</ng-container>
<ng-container matColumnDef="jurisdictionsquadron">
<th mat-header-cell *matHeaderCellDef>消防救援站</th>
<th mat-header-cell *matHeaderCellDef>所属消防救援支队</th>
<td mat-cell *matCellDef="let element">{{element.organizationName}}</td>
</ng-container>

4
src/app/plan-management/open-plan/open-plan.component.html

@ -66,14 +66,14 @@
</mat-select>
</mat-form-field>
</div>
<div class="queryField" *ngIf="!padMore">
<!-- <div class="queryField" *ngIf="!padMore">
<mat-checkbox (ngModelChange)="templatePlanChange($event,1)" [(ngModel)]="templatePlan" name="templatePlan">
模板录入预案</mat-checkbox>
</div>
<div class="queryField" *ngIf="!padMore">
<mat-checkbox (ngModelChange)="templatePlanChange($event,2)" [(ngModel)]="customPlan" name="customPlan">自定义预案
</mat-checkbox>
</div>
</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>

12
src/app/plan-management/pass-plan/pass-plan.component.html

@ -11,9 +11,9 @@
</div>
<div class="queryField ordiv">
<label style="margin-right: 10px;">消防救援站:</label>
<label style="margin-right: 10px;">所属消防救援支队:</label>
<mat-form-field class="example-full-width">
<input readonly matInput placeholder="请选择消防救援站" autocomplete="off" [(ngModel)]="js" name="js"
<input readonly matInput placeholder="请选择所属消防救援支队" autocomplete="off" [(ngModel)]="js" name="js"
(focus)="openorganizationbox()">
</mat-form-field>
<mat-checkbox style="margin-left: 6px;" [(ngModel)]="jscheck" name="jscheck">包含下级</mat-checkbox>
@ -90,11 +90,11 @@
<label style="margin-right: 10px;">预案级别:</label>
<mat-form-field>
<mat-select placeholder='请选择预案级别' [(ngModel)]="planCategory" name="planCategory" [multiple]="true">
<mat-option value=6>应急预案(国家级)</mat-option>
<!-- <mat-option value=6>应急预案(国家级)</mat-option>
<mat-option value=7>应急预案(市级)</mat-option>
<mat-option value=8>类型预案</mat-option>
<mat-option value=1>Ⅰ级预案</mat-option>
<mat-option value=2>Ⅱ级预案</mat-option>
<mat-option value=2>Ⅱ级预案</mat-option> -->
<mat-option value=3>Ⅲ级预案</mat-option>
<mat-option value=4>Ⅳ级预案</mat-option>
<mat-option value=5>Ⅴ级预案</mat-option>
@ -131,14 +131,14 @@
</mat-select>
</mat-form-field>
</div>
<div class="queryField" *ngIf="!padMore&&!pcMore">
<!-- <div class="queryField" *ngIf="!padMore&&!pcMore">
<mat-checkbox (ngModelChange)="templatePlanChange($event,1)" [(ngModel)]="templatePlan" name="templatePlan">
模板录入预案</mat-checkbox>
</div>
<div class="queryField" *ngIf="!padMore&&!pcMore">
<mat-checkbox (ngModelChange)="templatePlanChange($event,2)" [(ngModel)]="customPlan" name="customPlan">自定义预案
</mat-checkbox>
</div>
</div> -->
</div>
</form>

2
src/app/plan-management/plan-deduction/plan-deduction.component.html

@ -11,7 +11,7 @@
<input name="companyname" nz-input placeholder="请输入单位名称" [(ngModel)]="companyname" />
</div>
<div class="queryField" style="margin-right: 35px;">
<span style="width: 153px;">创建人(消防救援站):</span>
<span style="width: 153px;">创建人(所属消防救援支队):</span>
<nz-tree-select [nzDropdownClassName]="'maxHeightTreeSelect'" style="width: 250px"
[nzExpandedKeys]="expandKeys" [nzNodes]="nodes" nzShowSearch nzPlaceHolder="请选择组织机构" name="orId"
[(ngModel)]="orId">

4
src/app/plan-management/reinforce-plan/reinforce-plan.component.html

@ -11,9 +11,9 @@
</div>
<div class="queryField ordiv">
<label style="margin-right: 10px;">消防救援站:</label>
<label style="margin-right: 10px;">所属消防救援支队:</label>
<mat-form-field class="example-full-width">
<input readonly matInput placeholder="请选择消防救援站" autocomplete="off" [(ngModel)]="js" name="js" (focus)="openorganizationbox()">
<input readonly matInput placeholder="请选择所属消防救援支队" autocomplete="off" [(ngModel)]="js" name="js" (focus)="openorganizationbox()">
</mat-form-field>
<mat-checkbox style="margin-left: 6px;" [(ngModel)]="jscheck" name="jscheck">包含下级</mat-checkbox>
<span *ngIf="padMore" style="margin-left: 10px; color: #0080FF;" (click)='padInfo()'>更多筛选条件<img [src]='imgsrcopen'> </span>

18
src/app/statistic-analysis/addUnit/add-unit-one/add-unit-one.component.ts

@ -107,27 +107,13 @@ export class AddUnitOneComponent implements OnInit {
},
position:this.echartsData.tableTooltipNoShow2
},
legend: {
//type: tid=="pieone"?'scroll':'',
//orient: 'vertical',
//left: tid=="pieone"?0:650,
//right:30,
//top:100,
//bottom:tid=="pieone"?600:500,
bottom: 90,
left: 'center',
textStyle:{
fontSize:14,
color:"#000000"
},
data: tid=="pieone"?this.lengthOrData:this.lengthBuildData
},
series: [
{
name: '访问来源',
type: 'pie',
radius:this.padHw?'42%':'50%',
center: ['48%', '53%'],
center: ['48%', '60%'],
bottom:130,
left:30,
label:{

805
src/app/statistic-analysis/addUnit/add-unit-two-time/add-unit-two-time.component.ts

@ -1,474 +1,609 @@
import { Component, OnInit } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import {MatDialog, MatDialogRef, MAT_DIALOG_DATA} from '@angular/material/dialog';
import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar';
import { EchartsDataService } from '../../echarts-data.service';
import { Component, OnInit } from "@angular/core";
import { ActivatedRoute, Router } from "@angular/router";
import {
MatDialog,
MatDialogRef,
MAT_DIALOG_DATA,
} from "@angular/material/dialog";
import { MatSnackBar, MatSnackBarConfig } from "@angular/material/snack-bar";
import { EchartsDataService } from "../../echarts-data.service";
declare var echarts: any;
@Component({
selector: 'app-add-unit-two-time',
templateUrl: './add-unit-two-time.component.html',
styleUrls: ['./add-unit-two-time.component.scss']
selector: "app-add-unit-two-time",
templateUrl: "./add-unit-two-time.component.html",
styleUrls: ["./add-unit-two-time.component.scss"],
})
export class AddUnitTwoTimeComponent implements OnInit {
constructor(private router: Router,public dialog: MatDialog,public snackBar: MatSnackBar,private serviceData: EchartsDataService,private route:ActivatedRoute) { }
setTimeoutObj//延时器需要清除
headname
type=1
lastId
tabledata
zongcount=0
zhiorbuild
constructor(
private router: Router,
public dialog: MatDialog,
public snackBar: MatSnackBar,
private serviceData: EchartsDataService,
private route: ActivatedRoute
) {}
setTimeoutObj; //延时器需要清除
headname;
type = 1;
lastId;
tabledata;
zongcount = 0;
zhiorbuild;
ngOnInit(): void {
this.serviceData.selectType=0
this.dateInit ()
this.route.queryParams.subscribe(param=>{
this.headname=param.level
this.zhiorbuild=param.type
this.lastId=param.id
this.serviceData.selectType = 0;
this.dateInit();
this.route.queryParams.subscribe((param) => {
this.headname = param.level;
this.zhiorbuild = param.type;
this.lastId = param.id;
});
this.getdata()
this.getdata();
}
ngOnDestroy(){
ngOnDestroy() {
window.clearTimeout(this.setTimeoutObj);
this.forArr.forEach(item => {
item.echart.clear()
item.echart.dispose()
})
// this.forArr.forEach((item) => {
// item.echart.clear();
// item.echart.dispose();
// });
this.xxx.echart.clear();
this.xxx.echart.dispose();
}
//获取数据
yeardatee=new Date().getFullYear()
async getdata(){
this.date=[]
this.dateNum=[]
this.zongcount=0
let parzhi={
objectType:0,
BuildingTypeId:this.lastId,
TrendType:this.serviceData.selectType,
TrendYear:this.yeardatee||''
}
let parbuild={
objectType:0,
OrganizationId:this.lastId,
TrendType:this.serviceData.selectType,
TrendYear:this.yeardatee||''
}
await this.serviceData.getData(this.zhiorbuild=="zhi"?parbuild:parzhi,`/api/StatisticsAnalysis/Trends`)
yeardatee = new Date().getFullYear();
async getdata() {
this.date = [];
this.dateNum = [];
this.zongcount = 0;
let parzhi = {
objectType: 0,
BuildingTypeId: this.lastId,
TrendType: this.serviceData.selectType,
TrendYear: this.yeardatee || "",
};
let parbuild = {
objectType: 0,
OrganizationId: this.lastId,
TrendType: this.serviceData.selectType,
TrendYear: this.yeardatee || "",
};
await this.serviceData.getData(
this.zhiorbuild == "zhi" ? parbuild : parzhi,
`/api/StatisticsAnalysis/Trends`
);
this.setTimeoutObj = window.setTimeout(() => {
this.tabledata=JSON.parse(JSON.stringify(this.serviceData.allDate))
this.tabledata = JSON.parse(JSON.stringify(this.serviceData.allDate));
//console.log(this.tabledata[0])
for(var i=0;i<this.tabledata[0].length;i++){
if(this.tabledata[0][i].month>=this.serviceData.selectStartMonth||this.tabledata[0][i].month<=this.serviceData.selectEndMonth){
this.date.push(this.tabledata[0][i].month)
this.dateNum.push(this.tabledata[0][i].count)
this.zongcount=this.zongcount+this.tabledata[0][i].count
}
for (var i = 0; i < this.tabledata[0].length; i++) {
if (
this.tabledata[0][i].month >= this.serviceData.selectStartMonth ||
this.tabledata[0][i].month <= this.serviceData.selectEndMonth
) {
this.date.push(this.tabledata[0][i].month);
this.dateNum.push(this.tabledata[0][i].count);
this.zongcount = this.zongcount + this.tabledata[0][i].count;
}
this.date.forEach((value,index,array)=>{
this.date[index]=this.date[index]+'月'
})
}
this.date.forEach((value, index, array) => {
this.date[index] = this.date[index] + "月";
});
//this.oneInit (this.date,this.dateNum)
this.tiaoshiPao=this.serviceData.qipao(this.tiaoshiPao,this.dateNum,this.date)
this.twoInit (this.date,this.dateNum,'month')
this.tiaoshiPao = this.serviceData.qipao(
this.tiaoshiPao,
this.dateNum,
this.date
);
this.twoInit(this.date, this.dateNum, "month");
});
}
forward(){
this.router.navigate(['/statisticanalysis/addUnit_one/addUnit_two_type'],{queryParams:{'level':this.headname,'id':this.lastId,'type':this.zhiorbuild=='zhi'?'zhi':'build'}})
forward() {
this.router.navigate(["/statisticanalysis/addUnit_one/addUnit_two_type"], {
queryParams: {
level: this.headname,
id: this.lastId,
type: this.zhiorbuild == "zhi" ? "zhi" : "build",
},
});
}
reverse(){
this.router.navigate(['/statisticanalysis/addUnit_one/addUnit_two_time'],{queryParams:{'level':this.headname,'id':this.lastId,'type':this.zhiorbuild=='zhi'?'zhi':'build'}})
reverse() {
this.router.navigate(["/statisticanalysis/addUnit_one/addUnit_two_time"], {
queryParams: {
level: this.headname,
id: this.lastId,
type: this.zhiorbuild == "zhi" ? "zhi" : "build",
},
});
}
selectType:string = 'month'; //选择当前的 查询类型 按月/年
selectType: string = "month"; //选择当前的 查询类型 按月/年
//查询数据
years= []
selectMonth:any = [1,2,3,4,5,6,7,8,9,10,11,12]
years = [];
selectMonth: any = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12];
//日期初始化
dateInit () {
let date = (new Date()).getFullYear()
for (let i=date; i>=date-10;i--) {
dateInit() {
let date = new Date().getFullYear();
for (let i = date; i >= date - 10; i--) {
//this.years.unshift(i)
}
}
selectOneYear:any = (new Date()).getFullYear() //开始年份
selectTwoYear:any = (new Date()).getFullYear() //结束年份
selectStartMonth:any = 1 //开始月份
selectEndMonth:any = (new Date()).getMonth()+1 //结束月份
selectOneYear: any = new Date().getFullYear(); //开始年份
selectTwoYear: any = new Date().getFullYear(); //结束年份
selectStartMonth: any = 1; //开始月份
selectEndMonth: any = new Date().getMonth() + 1; //结束月份
//按月查询
monthSubmit (e) {
this.serviceData.selectStartMonth=this.selectStartMonth
this.serviceData.selectEndMonth=this.selectEndMonth
monthSubmit(e) {
this.serviceData.selectStartMonth = this.selectStartMonth;
this.serviceData.selectEndMonth = this.selectEndMonth;
//console.log(this.selectStartMonth,this.selectEndMonth)
this.date=[]
this.dateNum=[]
this.zongcount=0
if (e.selectEndMonth>=e.selectStartMonth) {
let startTime = e.selectOneYear + '-' + e.selectStartMonth + '-' + 1 + ' ' + 0 + ':' + 0 +':'+ 0
let endTime = e.selectTwoYear + '-' + e.selectEndMonth + '-' + 31 + ' ' + 23 + ':' + 59 +':'+ 59
for(var i=0;i<this.tabledata[0].length;i++){
if(this.tabledata[0][i].month>=this.serviceData.selectStartMonth&&this.tabledata[0][i].month<=this.serviceData.selectEndMonth){
this.date.push(this.tabledata[0][i].month)
this.dateNum.push(this.tabledata[0][i].count)
this.zongcount=this.zongcount+this.tabledata[0][i].count
this.date = [];
this.dateNum = [];
this.zongcount = 0;
if (e.selectEndMonth >= e.selectStartMonth) {
let startTime =
e.selectOneYear +
"-" +
e.selectStartMonth +
"-" +
1 +
" " +
0 +
":" +
0 +
":" +
0;
let endTime =
e.selectTwoYear +
"-" +
e.selectEndMonth +
"-" +
31 +
" " +
23 +
":" +
59 +
":" +
59;
for (var i = 0; i < this.tabledata[0].length; i++) {
if (
this.tabledata[0][i].month >= this.serviceData.selectStartMonth &&
this.tabledata[0][i].month <= this.serviceData.selectEndMonth
) {
this.date.push(this.tabledata[0][i].month);
this.dateNum.push(this.tabledata[0][i].count);
this.zongcount = this.zongcount + this.tabledata[0][i].count;
}
}
//this.oneInit (this.date,this.dateNum)
this.tiaoshiPao=this.serviceData.qipao(this.tiaoshiPao,this.dateNum,this.date)
this.twoInit (this.date,this.dateNum,'month')
this.tiaoshiPao = this.serviceData.qipao(
this.tiaoshiPao,
this.dateNum,
this.date
);
this.twoInit(this.date, this.dateNum, "month");
} else {
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open('请选择正确时间区段','确定',config);
config.verticalPosition = "top";
config.duration = 3000;
this.snackBar.open("请选择正确时间区段", "确定", config);
}
}
selectStartYear:any = (new Date()).getFullYear()-1 //开始年份
selectEndYear:any = (new Date()).getFullYear() //结束年份
selectStartYear: any = new Date().getFullYear() - 1; //开始年份
selectEndYear: any = new Date().getFullYear(); //结束年份
//按年查询
yearSubmit (e) {
this.zongcount=0
this.date2=[]
this.dateNum2=[]
yearSubmit(e) {
this.zongcount = 0;
this.date2 = [];
this.dateNum2 = [];
if (e.selectEndYear >= e.selectStartYear) {
let startTime = e.selectStartYear + '-' + 1 + '-' + 1 + ' ' + 0 + ':' + 0 +':'+ 0
let endTime = e.selectEndYear + '-' + 12 + '-' + 31 + ' ' + 23 + ':' + 59 +':'+ 59
for(var i=0;i<this.tabledata[0].length;i++){
if(this.tabledata[0][i].year>=e.selectStartYear&&this.tabledata[0][i].year<=e.selectEndYear){
this.date2.push(this.tabledata[0][i].year)
this.dateNum2.push(this.tabledata[0][i].count)
this.zongcount=this.zongcount+this.tabledata[0][i].count
let startTime =
e.selectStartYear + "-" + 1 + "-" + 1 + " " + 0 + ":" + 0 + ":" + 0;
let endTime =
e.selectEndYear + "-" + 12 + "-" + 31 + " " + 23 + ":" + 59 + ":" + 59;
for (var i = 0; i < this.tabledata[0].length; i++) {
if (
this.tabledata[0][i].year >= e.selectStartYear &&
this.tabledata[0][i].year <= e.selectEndYear
) {
this.date2.push(this.tabledata[0][i].year);
this.dateNum2.push(this.tabledata[0][i].count);
this.zongcount = this.zongcount + this.tabledata[0][i].count;
}
}
//this.oneInit (this.date,this.dateNum)
this.tiaoshiPao=this.serviceData.qipao(this.tiaoshiPao,this.dateNum2,this.date2)
this.twoInit (this.date2,this.dateNum2,'year')
this.tiaoshiPao = this.serviceData.qipao(
this.tiaoshiPao,
this.dateNum2,
this.date2
);
this.twoInit(this.date2, this.dateNum2, "year");
} else {
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open('结束年份必须大于开始年份','确定',config);
config.verticalPosition = "top";
config.duration = 3000;
this.snackBar.open("结束年份必须大于开始年份", "确定", config);
}
}
//年或月点击
async dateChange(){
this.tiaoshiPao=null
this.forArr.forEach(item => {
item.echart.dispose()
})
if(this.selectType == "year"){
this.zongcount=0
this.date2=[]
this.dateNum2=[]
this.years=[]
this.serviceData.selectType=2
let parzhi={
objectType:0,
BuildingTypeId:this.lastId,
TrendType:this.serviceData.selectType,
}
let parbuild={
objectType:0,
OrganizationId:this.lastId,
TrendType:this.serviceData.selectType,
async dateChange() {
this.tiaoshiPao = null;
this.forArr.forEach((item) => {
if (item.echart) {
item.echart.dispose();
}
});
if (this.selectType == "year") {
this.zongcount = 0;
this.date2 = [];
this.dateNum2 = [];
this.years = [];
this.serviceData.selectType = 2;
let parzhi = {
objectType: 0,
BuildingTypeId: this.lastId,
TrendType: this.serviceData.selectType,
};
let parbuild = {
objectType: 0,
OrganizationId: this.lastId,
TrendType: this.serviceData.selectType,
};
/* let paramdata={
BuildingTypeId:this.lastId,
TrendType:this.serviceData.selectType
} */
await this.serviceData.getData(this.zhiorbuild=="zhi"?parbuild:parzhi,`/api/StatisticsAnalysis/Trends`)
await this.serviceData.getData(
this.zhiorbuild == "zhi" ? parbuild : parzhi,
`/api/StatisticsAnalysis/Trends`
);
this.setTimeoutObj = window.setTimeout(() => {
this.tabledata=JSON.parse(JSON.stringify(this.serviceData.allDate))
console.log(this.tabledata)
for(var i=0;i<this.tabledata[0].length;i++){
this.date2.push(this.tabledata[0][i].year)
this.dateNum2.push(this.tabledata[0][i].count)
this.zongcount=this.zongcount+this.tabledata[0][i].count
this.tabledata = JSON.parse(JSON.stringify(this.serviceData.allDate));
console.log(this.tabledata);
for (var i = 0; i < this.tabledata[0].length; i++) {
this.date2.push(this.tabledata[0][i].year);
this.dateNum2.push(this.tabledata[0][i].count);
this.zongcount = this.zongcount + this.tabledata[0][i].count;
//this.years.push(this.tabledata[0][i].year)
this.years=['2020','2021','2022']
this.years = ["2020", "2021", "2022", "2023", "2024"];
}
//this.tiaoshiPao=this.serviceData.qipao(this.tiaoshiPao,this.dateNum,this.date)
this.tiaoshiPao=this.serviceData.qipao(this.tiaoshiPao,this.dateNum2,this.date2)
this.twoInit (this.date2,this.dateNum2,'year')
this.tiaoshiPao = this.serviceData.qipao(
this.tiaoshiPao,
this.dateNum2,
this.date2
);
this.twoInit(this.date2, this.dateNum2, "year");
});
/* this.tiaoshiPao=this.serviceData.qipao(this.tiaoshiPao,this.dateNum2,this.date2)
this.twoInit(this.date2,this.dateNum2,'year') */
}
if(this.selectType == "month"){
this.serviceData.selectType=0
this.getdata()
this.tiaoshiPao=this.serviceData.qipao(this.tiaoshiPao,this.dateNum,this.date)
if (this.selectType == "month") {
this.serviceData.selectType = 0;
this.getdata();
this.tiaoshiPao = this.serviceData.qipao(
this.tiaoshiPao,
this.dateNum,
this.date
);
//this.oneInit(this.date,this.dateNum)
this.twoInit(this.date,this.dateNum,'month')
this.twoInit(this.date, this.dateNum, "month");
}
}
chartQusj; //顶部大图实例
forArr =
this.serviceData.zuzhiorBuilding == "zhi"
? [
{ id: "gaoceng", name: "浦东支队", echart: null },
{ id: "dixia", name: "黄浦支队", echart: null },
{ id: "guidao", name: "徐汇支队", echart: null },
{ id: "huagong", name: "长宁支队", echart: null },
{ id: "chuguan", name: "静安支队", echart: null },
{ id: "changfang", name: "普陀支队", echart: null },
{ id: "gujianzhu", name: "虹口支队", echart: null },
{ id: "shichang", name: "杨浦支队", echart: null },
{ id: "yiyuan", name: "闵行支队", echart: null },
{ id: "xuexiao", name: "宝山支队", echart: null },
{ id: "binguan", name: "嘉定支队", echart: null },
{ id: "yule", name: "松江支队", echart: null },
{ id: "canyin", name: "金山支队", echart: null },
{ id: "yingyuan", name: "崇明支队", echart: null },
]
: [
{ id: "gaoceng", name: "高层", echart: null },
{ id: "dixia", name: "地下", echart: null },
{ id: "guidao", name: "轨道交通", echart: null },
{ id: "huagong", name: "化工生产", echart: null },
{ id: "chuguan", name: "储罐类", echart: null },
{ id: "changfang", name: "厂房", echart: null },
{ id: "gujianzhu", name: "古建筑", echart: null },
{ id: "shichang", name: "商市场", echart: null },
{ id: "yiyuan", name: "医院", echart: null },
{ id: "xuexiao", name: "学校", echart: null },
{ id: "binguan", name: "宾馆", echart: null },
{ id: "yule", name: "娱乐场所", echart: null },
{ id: "canyin", name: "餐饮业", echart: null },
{ id: "yingyuan", name: "影剧院", echart: null },
{ id: "zhanlan", name: "展览建筑", echart: null },
{ id: "suidao", name: "隧道", echart: null },
];
chartQusj//顶部大图实例
forArr =this.serviceData.zuzhiorBuilding=="zhi"? [{id:'gaoceng',name:'浦东支队',echart:null},
{id:'dixia',name:'黄浦支队',echart:null},
{id:'guidao',name:'徐汇支队',echart:null},
{id:'huagong',name:'长宁支队',echart:null},
{id:'chuguan',name:'静安支队',echart:null},
{id:'changfang',name:'普陀支队',echart:null},
{id:'gujianzhu',name:'虹口支队',echart:null},
{id:'shichang',name:'杨浦支队',echart:null},
{id:'yiyuan',name:'闵行支队',echart:null},
{id:'xuexiao',name:'宝山支队',echart:null},
{id:'binguan',name:'嘉定支队',echart:null},
{id:'yule',name:'松江支队',echart:null},
{id:'canyin',name:'金山支队',echart:null},
{id:'yingyuan',name:'崇明支队',echart:null}]:
[{id:'gaoceng',name:'高层',echart:null},
{id:'dixia',name:'地下',echart:null},
{id:'guidao',name:'轨道交通',echart:null},
{id:'huagong',name:'化工生产',echart:null},
{id:'chuguan',name:'储罐类',echart:null},
{id:'changfang',name:'厂房',echart:null},
{id:'gujianzhu',name:'古建筑',echart:null},
{id:'shichang',name:'商市场',echart:null},
{id:'yiyuan',name:'医院',echart:null},
{id:'xuexiao',name:'学校',echart:null},
{id:'binguan',name:'宾馆',echart:null},
{id:'yule',name:'娱乐场所',echart:null},
{id:'canyin',name:'餐饮业',echart:null},
{id:'yingyuan',name:'影剧院',echart:null},
{id:'zhanlan',name:'展览建筑',echart:null},
{id:'suidao',name:'隧道',echart:null}]
date = []
dateNum = []
tiaoshiPao:any
date = [];
dateNum = [];
tiaoshiPao: any;
//气泡提示数据获取
bianli(){
var arrshuzu='[';
for(var i=0;i<this.dateNum.length;i++){
arrshuzu+='{"value":'+this.dateNum[i]+',"coord":['+i+','+this.dateNum[i]+'],"name":'+'"'+this.date[i]+'"'+'},'
bianli() {
var arrshuzu = "[";
for (var i = 0; i < this.dateNum.length; i++) {
arrshuzu +=
'{"value":' +
this.dateNum[i] +
',"coord":[' +
i +
"," +
this.dateNum[i] +
'],"name":' +
'"' +
this.date[i] +
'"' +
"},";
}
arrshuzu=arrshuzu.substring(0,arrshuzu.length-1)
arrshuzu+=']'
this.tiaoshiPao=JSON.parse(arrshuzu)
arrshuzu = arrshuzu.substring(0, arrshuzu.length - 1);
arrshuzu += "]";
this.tiaoshiPao = JSON.parse(arrshuzu);
//console.log(this.tiaoshiPao)
//return tishiPao
}
thisYear=new Date().getFullYear()
date2 = ['2020', '2021','2022']
dateNum2 = []
thisYear = new Date().getFullYear();
date2 = ["2020", "2021", "2022", "2023", "2024"];
dateNum2 = [];
//新增数量统计
oneInit (date,dateNum) {
this.chartQusj = echarts.init(document.getElementById('Line'), 'skinUpp');
oneInit(date, dateNum) {
this.chartQusj = echarts.init(document.getElementById("Line"), "skinUpp");
var option = {
grid: {
top: 70,
left:40,
left: 40,
right: 20,
bottom: 20,
},
// 标题
title: {
text: '新增数量统计:总数(1012)',
text: "新增数量统计:总数(1012)",
top: -4,
left: 'center',
textStyle:{
left: "center",
textStyle: {
//文字颜色
color:'#000',
color: "#000",
fontSize: 30,
}
},
},
//提示框
tooltip: {
trigger: 'axis',
formatter: (params)=>{
return this.serviceData.tableTooltip(this.serviceData.zuzhiorBuilding=="zhi"?this.serviceData.tableDataZhi :this.serviceData.buildingType,params[0].name)
trigger: "axis",
formatter: (params) => {
return this.serviceData.tableTooltip(
this.serviceData.zuzhiorBuilding == "zhi"
? this.serviceData.tableDataZhi
: this.serviceData.buildingType,
params[0].name
);
},
position:this.serviceData.tableTooltipNoShowt
position: this.serviceData.tableTooltipNoShowt,
},
// x轴
xAxis: {
type: 'category',
type: "category",
data: date,
axisLabel: {
textStyle:{
fontSize :15,
color:'#000000'
textStyle: {
fontSize: 15,
color: "#000000",
},
color: "#000", //刻度线标签颜色
},
//设置坐标轴字体颜色和宽度
axisLine: {
axisLine: {
lineStyle: {
color: "#000",
},
},
splitLine: {//分割线配置
show:true,
splitLine: {
//分割线配置
show: true,
lineStyle: {
color: '#999',
}
}
color: "#999",
},
},
},
// y轴
yAxis: {
type: 'value',
name: '个',
type: "value",
name: "个",
axisLabel: {
textStyle:{
fontSize :15,
color:'#000000'
textStyle: {
fontSize: 15,
color: "#000000",
},
color: "#000" //刻度线标签颜色
color: "#000", //刻度线标签颜色
},
//设置坐标轴字体颜色和宽度
axisLine: {
//设置坐标轴字体颜色和宽度
axisLine: {
lineStyle: {
color: "#000",
}
}
},
},
},
// 数据
series: [{
name: '新增数量',
type: 'line',
series: [
{
name: "新增数量",
type: "line",
markPoint: {
symbolSize:[65, 65],
data: this.tiaoshiPao
},
symbolSize: [65, 65],
data: this.tiaoshiPao,
},
data: dateNum,
}
},
],
}
};
this.chartQusj.setOption(option);
}
//剩余折线图
twoInit (date,dateNum,typeName) {
this.forArr.forEach((item,key) => {
let that = this
item.echart = echarts.init(document.getElementById('gaoceng'), 'skinUpp');
var option = {
grid: {
top: 90,
},
// 标题
title: {
text: this.headname+`:总数(${this.zongcount}`,
top:-4,
left: 'center',
textStyle:{
//文字颜色
color:'#000',
fontSize:30
}
xxx = { echart: null };
twoInit(date, dateNum, typeName) {
let item = this.xxx;
// this.forArr.forEach((item,key) => {
item.echart = echarts.init(document.getElementById("gaoceng"), "skinUpp");
var option = {
grid: {
top: 90,
},
// 标题
title: {
text: this.headname + `:总数(${this.zongcount}`,
top: -4,
left: "center",
textStyle: {
//文字颜色
color: "#000",
fontSize: 30,
},
//提示框
tooltip: {
trigger: 'axis',
formatter: function (params) {
//console.log(params)
return '时间:' + params[0].axisValueLabel + '<br>数量: ' + params[0].data;
},
//提示框
tooltip: {
trigger: "axis",
formatter: function (params) {
//console.log(params)
return (
"时间:" + params[0].axisValueLabel + "<br>数量: " + params[0].data
);
},
/* formatter: (params)=>{
/* formatter: (params)=>{
if(params[0].seriesName == "year"){
return this.serviceData.tableTooltip(this.serviceData.monthTooltip,params[0].name)
}else{
return this.serviceData.tableTooltip(this.serviceData.tableDataZhi,params[0].name)
}
}, */
position: this.serviceData.tableTooltipNoShow
position: this.serviceData.tableTooltipNoShow,
},
// x轴
xAxis: {
type: "category",
data: date,
axisLabel: {
textStyle: {
fontSize: 16,
color: "#000000",
},
color: "#000", //刻度线标签颜色
},
// x轴
xAxis: {
type: 'category',
data: date,
axisLabel: {
textStyle:{
fontSize :16,
color:'#000000'
},
color: "#000", //刻度线标签颜色
//设置坐标轴字体颜色和宽度
axisLine: {
lineStyle: {
color: "#000",
},
//设置坐标轴字体颜色和宽度
axisLine: {
lineStyle: {
color: "#000",
},
},
splitLine: {
//分割线配置
show: true,
lineStyle: {
color: "#999",
},
splitLine: {//分割线配置
show:true,
lineStyle: {
color: '#999',
}
}
},
// y轴
yAxis: {
//min:10,
type: 'value',
name: '个',
axisLabel: {
textStyle:{
fontSize :16,
color:'#000000'
},
color: "#000" //刻度线标签颜色
},
// y轴
yAxis: {
//min:10,
type: "value",
name: "个",
axisLabel: {
textStyle: {
fontSize: 16,
color: "#000000",
},
//设置坐标轴字体颜色和宽度
axisLine: {
lineStyle: {
color: "#000",
}
}
color: "#000", //刻度线标签颜色
},
// 数据
series: [{
name: typeName,
type: 'line',
markPoint: {
symbolSize:[65, 65],
data: this.tiaoshiPao
//设置坐标轴字体颜色和宽度
axisLine: {
lineStyle: {
color: "#000",
},
data: dateNum,
}
],
};
item.echart.setOption(option,true);
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];
/*事件处理代码书写位置*/
// console.log(option.series[0].data[xIndex],option.xAxis.data[xIndex],option.title.text,option.series[0].name)
if(option.series[0].name == "year"){
this.router.navigate(['/statisticanalysis/addUnit_one/addUnit_two_time/three_lineDetails'],{queryParams:{'year':this.date2[xIndex],'buildingType':this.headname,'id':this.lastId,'type':this.zhiorbuild}});
},
},
// 数据
series: [
{
name: typeName,
type: "line",
markPoint: {
symbolSize: [65, 65],
data: this.tiaoshiPao,
},
data: dateNum,
},
],
};
item.echart.setOption(option, true);
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];
/*事件处理代码书写位置*/
// console.log(option.series[0].data[xIndex],option.xAxis.data[xIndex],option.title.text,option.series[0].name)
if (option.series[0].name == "year") {
this.router.navigate(
[
"/statisticanalysis/addUnit_one/addUnit_two_time/three_lineDetails",
],
{
queryParams: {
year: this.date2[xIndex],
buildingType: this.headname,
id: this.lastId,
type: this.zhiorbuild,
},
}
);
/* this.selectType="month"
/* this.selectType="month"
this.yeardatee=option.xAxis.data[xIndex]
this.getdata() */
}else{
if(this.serviceData.level=='0'||this.serviceData.level=='1'||this.serviceData.level=='2'){
//this.router.navigate(['/statisticanalysis/addUnit_one/addUnit_two_time/three_barDetails'],{queryParams:{'level':'zhidui','time':option.xAxis.data[xIndex],'buildingTpye':this.headname}});
this.router.navigate(['/statisticanalysis/addUnit_one/addUnit_two_type'],{queryParams:{'level':this.headname,'id':this.lastId,'type':this.zhiorbuild,'year':this.thisYear,'month':option.xAxis.data[xIndex]}})
} else {
if (
this.serviceData.level == "0" ||
this.serviceData.level == "1" ||
this.serviceData.level == "2"
) {
//this.router.navigate(['/statisticanalysis/addUnit_one/addUnit_two_time/three_barDetails'],{queryParams:{'level':'zhidui','time':option.xAxis.data[xIndex],'buildingTpye':this.headname}});
this.router.navigate(
["/statisticanalysis/addUnit_one/addUnit_two_type"],
{
queryParams: {
level: this.headname,
id: this.lastId,
type: this.zhiorbuild,
year: this.thisYear,
month: option.xAxis.data[xIndex],
},
}
}
);
}
}
});
})
}
});
// })
}
//返回
backClick(){
this.router.navigateByUrl('/statisticanalysis/addUnit_one')
backClick() {
this.router.navigateByUrl("/statisticanalysis/addUnit_one");
}
}

24
src/app/statistic-analysis/addUnit/add-unit-two-type-statistics/add-unit-two-type-statistics.component.html

@ -10,29 +10,17 @@
<div class="topbox">
<div class="btnbox">
<button mat-stroked-button style="margin-left: 30px;" (click)="backClick()">返回</button>
<button mat-stroked-button (click)="reverse()" [ngClass]="{'selectedBtn': url == '/statisticanalysis/addUnit_one/addUnit_two_time'}">区间选择</button>
<button mat-stroked-button (click)="forward()" [ngClass]="{'selectedBtn': url == '/statisticanalysis/addUnit_one/addUnit_two_type'}" style="margin-right: 30px;">类型统计</button>
<button mat-stroked-button (click)="reverse()"
[ngClass]="{'selectedBtn': url == '/statisticanalysis/addUnit_one/addUnit_two_time'}">区间选择</button>
<button mat-stroked-button (click)="forward()"
[ngClass]="{'selectedBtn': url == '/statisticanalysis/addUnit_one/addUnit_two_type'}"
style="margin-right: 30px;">类型统计</button>
</div>
</div>
<div class="echartsbox">
<div style="padding-top: 100px;">
<div class="publicCss" id="gaoceng"></div>
<!-- <div class="publicCss" id="dixia"></div>
<div class="publicCss" id="guidao"></div>
<div class="publicCss" id="huagong"></div>
<div class="publicCss" id="chuguan"></div>
<div class="publicCss" id="changfang"></div>
<div class="publicCss" id="gujianzhu"></div>
<div class="publicCss" id="shichang"></div>
<div class="publicCss" id="yiyuan"></div>
<div class="publicCss" id="xuexiao"></div>
<div class="publicCss" id="binguan"></div>
<div class="publicCss" id="yule"></div>
<div class="publicCss" id="canyin"></div>
<div class="publicCss" id="yingyuan"></div>
<div class="publicCss" id="zhanlan"></div>
<div class="publicCss" id="suidao"></div> -->
</div>
</div>
</div>

959
src/app/statistic-analysis/addUnit/add-unit-two-type-statistics/add-unit-two-type-statistics.component.ts

File diff suppressed because it is too large Load Diff

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

@ -1,187 +1,230 @@
import { Component, OnInit } from '@angular/core';
import { Router } from '@angular/router';
import { HttpClient } from '@angular/common/http'
import {EchartsDataService,} from '../../echarts-data.service'
import { map } from 'rxjs/operators';
import { Component, OnInit } from "@angular/core";
import { Router } from "@angular/router";
import { HttpClient } from "@angular/common/http";
import { EchartsDataService } from "../../echarts-data.service";
import { map } from "rxjs/operators";
declare var echarts: any;
@Component({
selector: 'app-building-type-one',
templateUrl: './building-type-one.component.html',
styleUrls: ['./building-type-one.component.scss']
selector: "app-building-type-one",
templateUrl: "./building-type-one.component.html",
styleUrls: ["./building-type-one.component.scss"],
})
export class BuildingTypeOneComponent implements OnInit {
constructor(private http:HttpClient,private router: Router,public echartsData:EchartsDataService) { }
constructor(
private http: HttpClient,
private router: Router,
public echartsData: EchartsDataService
) {}
ngOnInit(): void {
if(window.matchMedia("(max-width: 1400px)").matches){
this.padHw=true
if (window.matchMedia("(max-width: 1400px)").matches) {
this.padHw = true;
//this.padjt=
}else{
this.padHw=false
} else {
this.padHw = false;
}
window.setTimeout(()=>{
this.getechartsdata()
})
window.setTimeout(() => {
this.getechartsdata();
});
}
ngOnDestroy(): void {
this.indexBzt.clear()
this.indexBzt.dispose()
this.indexBzt.clear();
this.indexBzt.dispose();
}
async getechartsdata(){
await this.echartsData.getData(null,`/api/StatisticsAnalysis/BuildingTypes`)
this.initCharts()
async getechartsdata() {
await this.echartsData.getData(
null,
`/api/StatisticsAnalysis/BuildingTypes`
);
this.initCharts();
}
/* 首页饼状图 */
indexBzt
padHw
lengthdata=[]//提示数据
count=0//总数
indexData=[]//所有数据
tabledata
initCharts(){
if(sessionStorage.getItem('refresh') === 'true') {
sessionStorage.removeItem('refresh');
indexBzt;
padHw;
lengthdata = []; //提示数据
count = 0; //总数
indexData = []; //所有数据
tabledata;
initCharts() {
if (sessionStorage.getItem("refresh") === "true") {
sessionStorage.removeItem("refresh");
location.reload();
}
this.tabledata=JSON.parse(JSON.stringify(this.echartsData.allDate))
// console.log(this.tabledata)
//console.log(this.echartsData.orid)
for(var i=0;i<this.tabledata[0].buildingTypes.length;i++){
this.lengthdata.push(this.tabledata[0].buildingTypes[i].buildingTypeName)
this.count=this.count+this.tabledata[0].buildingTypes[i].count
this.indexData.push(this.tabledata[0].buildingTypes[i])
}
//JSON.parse(JSON.stringify(this.indexData).replace(/buildingTypeName/g, 'name'))
this.indexData=this.indexData.map(v=>{return {name: v.buildingTypeName,value:v.count,id:v.buildingTypeId}})
//console.log(this.indexData)
this.indexBzt = echarts.init(document.getElementById('indexBzt'),'walden');
let options={
}
this.tabledata = JSON.parse(JSON.stringify(this.echartsData.allDate));
// console.log(this.tabledata)
//console.log(this.echartsData.orid)
for (var i = 0; i < this.tabledata[0].buildingTypes.length; i++) {
this.lengthdata.push(this.tabledata[0].buildingTypes[i].buildingTypeName);
this.count = this.count + this.tabledata[0].buildingTypes[i].count;
this.indexData.push(this.tabledata[0].buildingTypes[i]);
}
//JSON.parse(JSON.stringify(this.indexData).replace(/buildingTypeName/g, 'name'))
this.indexData = this.indexData.map((v) => {
return { name: v.buildingTypeName, value: v.count, id: v.buildingTypeId };
});
//console.log(this.indexData)
this.indexBzt = echarts.init(document.getElementById("indexBzt"), "walden");
let options = {
title: {
text: `建筑类型统计(${this.count}家)`,
left: 'center',
top: "7%",
textStyle: {
fontSize:31
}
left: "center",
top: "7%",
textStyle: {
fontSize: 31,
},
},
tooltip: {
trigger: 'item',
trigger: "item",
position: this.echartsData.tableTooltipNoShow2,
formatter: (params)=>{
this.echartsData.biaogeTishiZhi(params.data)
return this.echartsData.res
}
formatter: (params) => {
this.echartsData.biaogeTishiZhi(params.data);
return this.echartsData.res;
},
},
legend: {
orient: 'vertical',
orient: "vertical",
//left:this.padHw?50:0,
right:this.padHw?20:250,
top:60,
textStyle:{
fontSize:18,
color:"#000000"
},
data: this.lengthdata
right: this.padHw ? 20 : 250,
top: 60,
textStyle: {
fontSize: 18,
color: "#000000",
},
data: this.lengthdata,
},
series: [
{
top:this.padHw?'15%':'0',
name: '访问来源',
type: 'pie',
radius: '60%',
center: ['50%', '53%'],
label:{
show:true,
fontSize:18,
formatter:'{b}{c}家\n{d|({d}%)}',
top: this.padHw ? "15%" : "0",
name: "访问来源",
type: "pie",
radius: "60%",
center: ["50%", "53%"],
label: {
show: true,
fontSize: 18,
formatter: "{b}{c}家\n{d|({d}%)}",
rich: {
d: {
align: 'center',
fontSize:18
}
align: "center",
fontSize: 18,
},
},
},
data:this.indexData,
data: this.indexData,
emphasis: {
itemStyle: {
shadowBlur: 10,
shadowOffsetX: 0,
shadowColor: 'rgba(0, 0, 0, 0.5)'
}
}
}
]
shadowColor: "rgba(0, 0, 0, 0.5)",
},
},
},
],
};
this.indexBzt.on('click', (params) => {
var index=0
for(var i=0;i<this.tabledata[0].buildingTypes.length;i++){
if(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.indexBzt.on("click", (params) => {
var index = 0;
for (var i = 0; i < this.tabledata[0].buildingTypes.length; i++) {
if (
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
) {
console.log(111)
//总队,支队,大队跳转
this.tabledata[0].buildingTypes[i].organizations.forEach((value,index,array) => {
if(array[index].organizationId==this.echartsData.orid){
array.splice(index,1)
this.tabledata[0].buildingTypes[i].organizations.forEach(
(value, index, array) => {
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{
this.router.navigate(['/statisticanalysis/CompangInfo'],{queryParams:{'name':params.name,'type':1,'buildid':params.data.id}});
}
});
}else {
);
} else {
console.log(222)
//中队跳转
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);
}
tishiData
res:string
biaogeTishiZhi(datas){
for(var a in this.tabledata.buildingTypes){
if(this.tabledata.buildingTypes[a].buildingTypeId==datas.id){
this.tishiData=this.tabledata.buildingTypes[a].organizations
tishiData;
res: string;
biaogeTishiZhi(datas) {
for (var a in this.tabledata.buildingTypes) {
if (this.tabledata.buildingTypes[a].buildingTypeId == datas.id) {
this.tishiData = this.tabledata.buildingTypes[a].organizations;
}
}
var countall=0//总计
var countbi=0//站比
var allCountbi=0//总站比
for(var i=0;i<this.tishiData.length;i++){
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+='</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+='<thead style="font-size:18px;"><tr>';
this.res+='<td style="text-align:center;width:30%;">名称</td>';
this.res+='<td style="text-align:center;width:30%;">数量</td>'
this.res+='<td style="text-align:center;width:30%;">总占比</td>'
this.res+='</tr></thead>'
this.res+='<tbody>';
//var res='<div class="tishi" style=" width:100%;height:100%;"><div style="padding:10px 0 5px 0"><span >'+biaotou+'</span></div>'
for(var i=0;i<this.tishiData.length;i++){
countbi=Math.round(this.tishiData[i].count/countall* 10000)/ 100.00
allCountbi=allCountbi+countbi
this.res+='<tr>'
this.res+='<td style="text-align:center;">'+this.tishiData[i].organizationName+'</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
}
var countall = 0; //总计
var countbi = 0; //站比
var allCountbi = 0; //总站比
for (var i = 0; i < this.tishiData.length; i++) {
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 +=
'</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 += '<thead style="font-size:18px;"><tr>';
this.res += '<td style="text-align:center;width:30%;">名称</td>';
this.res += '<td style="text-align:center;width:30%;">数量</td>';
this.res += '<td style="text-align:center;width:30%;">总占比</td>';
this.res += "</tr></thead>";
this.res += "<tbody>";
//var res='<div class="tishi" style=" width:100%;height:100%;"><div style="padding:10px 0 5px 0"><span >'+biaotou+'</span></div>'
for (var i = 0; i < this.tishiData.length; i++) {
countbi =
Math.round((this.tishiData[i].count / countall) * 10000) / 100.0;
allCountbi = allCountbi + countbi;
this.res += "<tr>";
this.res +=
'<td style="text-align:center;">' +
this.tishiData[i].organizationName +
"</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;
}
}

22
src/app/statistic-analysis/buildingType/building-type-two-reverse/building-type-two-reverse.component.html

@ -15,27 +15,9 @@
</div>
</div>
<div class="echartsbox">
<!-- <div id="pie">
</div> -->
<div>
<div class="publicCss" id="gaoceng"></div>
<!-- <div class="publicCss" id="dixia"></div>
<div class="publicCss" id="guidao"></div>
<div class="publicCss" id="huagong"></div>
<div class="publicCss" id="chuguan"></div>
<div class="publicCss" id="changfang"></div>
<div class="publicCss" id="gujianzhu"></div>
<div class="publicCss" id="shichang"></div>
<div class="publicCss" id="yiyuan"></div>
<div class="publicCss" id="xuexiao"></div>
<div class="publicCss" id="binguan"></div>
<div class="publicCss" id="yule"></div>
<div class="publicCss" id="canyin"></div>
<div class="publicCss" id="yingyuan"></div>
<div class="publicCss" id="zhanlan"></div>
<div class="publicCss" id="suidao"></div> -->
<div class="publicCss" id="buildingTypeEcharts"></div>
</div>
</div>
</div>

720
src/app/statistic-analysis/buildingType/building-type-two-reverse/building-type-two-reverse.component.ts

@ -1,393 +1,477 @@
import { Component, OnInit } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import {EchartsDataService} from '../../echarts-data.service';
import { HttpClient } from '@angular/common/http'
import { Component, OnInit } from "@angular/core";
import { ActivatedRoute, Router } from "@angular/router";
import { EchartsDataService } from "../../echarts-data.service";
import { HttpClient } from "@angular/common/http";
declare var echarts: any;
@Component({
selector: 'app-building-type-two-reverse',
templateUrl: './building-type-two-reverse.component.html',
styleUrls: ['./building-type-two-reverse.component.scss']
selector: "app-building-type-two-reverse",
templateUrl: "./building-type-two-reverse.component.html",
styleUrls: ["./building-type-two-reverse.component.scss"],
})
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(['/statisticanalysis/buildingType_one/buildingType_two_forward'])
forward() {
this.router.navigate([
"/statisticanalysis/buildingType_one/buildingType_two_forward",
]);
}
reverse(){
this.router.navigate(['/statisticanalysis/buildingType_one/buildingType_two_reverse'])
reverse() {
this.router.navigate([
"/statisticanalysis/buildingType_one/buildingType_two_reverse",
]);
}
headname//标题
buildId//建筑id
padHw//是否是华为pad
headname; //标题
buildId; //建筑id
padHw; //是否是华为pad
ngOnInit(): void {
if(window.matchMedia("(max-width: 1300px)").matches&&window.matchMedia("(max-height: 700px)").matches){
this.padHw=true
if (
window.matchMedia("(max-width: 1300px)").matches &&
window.matchMedia("(max-height: 700px)").matches
) {
this.padHw = true;
//this.padjt=
}else{
this.padHw=false
} else {
this.padHw = false;
}
if(sessionStorage.getItem('refresh') === 'true') {
sessionStorage.removeItem('refresh');
if (sessionStorage.getItem("refresh") === "true") {
sessionStorage.removeItem("refresh");
location.reload();
}
this.route.queryParams.subscribe(param=>{
this.headname=param.level
this.buildId=param.id
}
this.route.queryParams.subscribe((param) => {
this.headname = param.level;
this.buildId = param.id;
});
let paramsdata:any = {
id:this.buildId,
let paramsdata: any = {
id: this.buildId,
//organizationId:'1'
}
window.setTimeout(()=>{
this.getechartsdata()
};
window.setTimeout(() => {
this.getechartsdata();
});
}
ngOnDestroy(): void {
/* this.indexBzt.clear()
this.indexBzt.dispose() */
this.forArr.forEach(item => {
item.echart.clear()
item.echart.dispose()
})
}
async getechartsdata(){
await this.data.getData(null,`/api/StatisticsAnalysis/Companies/BuildingTypes/${this.buildId}`)
this.tabledata=JSON.parse(JSON.stringify(this.data.allDate))
for(var i=0;i<this.tabledata[0].organizations.length;i++){
this.zhiNameData.push(this.tabledata[0].organizations[i].organizationName)
this.zhiNumData.push(this.tabledata[0].organizations[i].count)
this.organizationId.push(this.tabledata[0].organizations[i].organizationId)
this.forArr.forEach((item) => {
if (item.echart) {
item.echart.clear();
item.echart.dispose();
}
this.tiaoshiPao=this.data.qipao(this.tiaoshiPao,this.zhiNumData,this.zhiNameData)
this.barEcharts()
});
}
async getechartsdata() {
await this.data.getData(
null,
`/api/StatisticsAnalysis/Companies/BuildingTypes/${this.buildId}`
);
this.tabledata = JSON.parse(JSON.stringify(this.data.allDate));
for (var i = 0; i < this.tabledata[0].organizations.length; i++) {
this.zhiNameData.push(
this.tabledata[0].organizations[i].organizationName
);
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 = {
interval: 0,
rotate:38,
textStyle:{
fontSize :16,
color:'#000000'
},
formatter:function(value)
{
var ret = "";//拼接加\n返回的类目项
var maxLength = 2;//每项显示文字个数
var valLength = value.length;//X轴类目项的文字个数
var rowN = Math.ceil(valLength / maxLength); //类目项需要换行的行数
if (rowN > 1)//如果类目项的文字大于3,
{
for (var i = 0; i < rowN; i++) {
var temp = "";//每次截取的字符串
var start = i * maxLength;//开始截取的位置
var end = start + maxLength;//结束截取的位置
//这里也可以加一个是否是最后一行的判断,但是不加也没有影响,那就不加吧
temp = value.substring(start, end) + "\n";
ret += temp; //凭借最终的字符串
}
return ret;
}
else {
return value;
}
}
}//echarts两个字换行
rotate: 38,
textStyle: {
fontSize: 16,
color: "#000000",
},
formatter: function (value) {
var ret = ""; //拼接加\n返回的类目项
var maxLength = 2; //每项显示文字个数
var valLength = value.length; //X轴类目项的文字个数
var rowN = Math.ceil(valLength / maxLength); //类目项需要换行的行数
if (rowN > 1) {
//如果类目项的文字大于3,
for (var i = 0; i < rowN; i++) {
var temp = ""; //每次截取的字符串
var start = i * maxLength; //开始截取的位置
var end = start + maxLength; //结束截取的位置
//这里也可以加一个是否是最后一行的判断,但是不加也没有影响,那就不加吧
temp = value.substring(start, end) + "\n";
ret += temp; //凭借最终的字符串
}
return ret;
} else {
return value;
}
},
}; //echarts两个字换行
topTextlabel = {
show: true, // 开启显示
position: 'top', // 在上方显示
position: "top", // 在上方显示
distance: 10, // 距离图形元素的距离。当 position 为字符描述值(如 'top'、'insideRight')时候有效。
verticalAlign: 'middle',
textStyle: { // 数值样式
color: 'black',
fontSize: 12
}
}//柱状图数值顶部显示
verticalAlign: "middle",
textStyle: {
// 数值样式
color: "black",
fontSize: 12,
},
}; //柱状图数值顶部显示
tableDataZhi = [ {name:"浦东支队",number:"156",zhanbi:"3%"},
{name:"黄浦支队",number:"144",zhanbi:"2.8%"},
{name:"徐汇支队",number:"133",zhanbi:"2.1%"},
{name:"长宁支队",number:"122",zhanbi:"1.6%"},
{name:"静安支队",number:"120",zhanbi:"1.3%"},
{name:"普陀支队",number:"100",zhanbi:"1.1%"},
{name:"虹口支队",number:"95",zhanbi:"1%"},
{name:"杨浦支队",number:"90",zhanbi:"0.9%"},
{name:"闵行支队",number:"88",zhanbi:"0.8%"},
{name:"宝山支队",number:"83",zhanbi:"0.7%"},
{name:"徐汇支队",number:"133",zhanbi:"2.1%"},
{name:"长宁支队",number:"122",zhanbi:"1.6%"},
{name:"嘉定支队",number:"78",zhanbi:"0.6%"},
{name:"松江支队",number:"75",zhanbi:"0.5%"},
{name:"金山支队",number:"65",zhanbi:"0.4%"},
{name:"崇明支队",number:"55",zhanbi:"0.3%"} ]
tableDataZhong = [ {name:"浦东中队",number:"156",zhanbi:"3%"},
{name:"黄浦中队",number:"144",zhanbi:"2.8%"},
{name:"徐汇中队",number:"133",zhanbi:"2.1%"},
{name:"长宁中队",number:"122",zhanbi:"1.6%"},
{name:"静安中队",number:"120",zhanbi:"1.3%"},
{name:"普陀中队",number:"100",zhanbi:"1.1%"},
{name:"虹口中队",number:"95",zhanbi:"1%"},
{name:"杨浦中队",number:"90",zhanbi:"0.9%"},
{name:"闵行中队",number:"88",zhanbi:"0.8%"},
{name:"宝山中队",number:"83",zhanbi:"0.7%"},
{name:"徐汇中队",number:"133",zhanbi:"2.1%"},
{name:"长宁中队",number:"122",zhanbi:"1.6%"},
{name:"嘉定中队",number:"78",zhanbi:"0.6%"},
{name:"松江中队",number:"75",zhanbi:"0.5%"},
{name:"金山中队",number:"65",zhanbi:"0.4%"},
{name:"崇明中队",number:"55",zhanbi:"0.3%"} ]
zhiNameData = []
zhiNumData = []
tiaoshiPao:any
tableDataZhi = [
{ name: "浦东支队", number: "156", zhanbi: "3%" },
{ name: "黄浦支队", number: "144", zhanbi: "2.8%" },
{ name: "徐汇支队", number: "133", zhanbi: "2.1%" },
{ name: "长宁支队", number: "122", zhanbi: "1.6%" },
{ name: "静安支队", number: "120", zhanbi: "1.3%" },
{ name: "普陀支队", number: "100", zhanbi: "1.1%" },
{ name: "虹口支队", number: "95", zhanbi: "1%" },
{ name: "杨浦支队", number: "90", zhanbi: "0.9%" },
{ name: "闵行支队", number: "88", zhanbi: "0.8%" },
{ name: "宝山支队", number: "83", zhanbi: "0.7%" },
{ name: "徐汇支队", number: "133", zhanbi: "2.1%" },
{ name: "长宁支队", number: "122", zhanbi: "1.6%" },
{ name: "嘉定支队", number: "78", zhanbi: "0.6%" },
{ name: "松江支队", number: "75", zhanbi: "0.5%" },
{ name: "金山支队", number: "65", zhanbi: "0.4%" },
{ name: "崇明支队", number: "55", zhanbi: "0.3%" },
];
tableDataZhong = [
{ name: "浦东中队", number: "156", zhanbi: "3%" },
{ name: "黄浦中队", number: "144", zhanbi: "2.8%" },
{ name: "徐汇中队", number: "133", zhanbi: "2.1%" },
{ name: "长宁中队", number: "122", zhanbi: "1.6%" },
{ name: "静安中队", number: "120", zhanbi: "1.3%" },
{ name: "普陀中队", number: "100", zhanbi: "1.1%" },
{ name: "虹口中队", number: "95", zhanbi: "1%" },
{ name: "杨浦中队", number: "90", zhanbi: "0.9%" },
{ name: "闵行中队", number: "88", zhanbi: "0.8%" },
{ name: "宝山中队", number: "83", zhanbi: "0.7%" },
{ name: "徐汇中队", number: "133", zhanbi: "2.1%" },
{ name: "长宁中队", number: "122", zhanbi: "1.6%" },
{ name: "嘉定中队", number: "78", zhanbi: "0.6%" },
{ name: "松江中队", number: "75", zhanbi: "0.5%" },
{ name: "金山中队", number: "65", zhanbi: "0.4%" },
{ name: "崇明中队", number: "55", zhanbi: "0.3%" },
];
zhiNameData = [];
zhiNumData = [];
tiaoshiPao: any;
//气泡提示数据获取
bianli(){
if(this.zhiNumData.length>=1){
var arrshuzu='[';
for(var i=0;i<this.zhiNumData.length;i++){
arrshuzu+='{"value":'+this.zhiNumData[i]+',"coord":['+i+','+this.zhiNumData[i]+'],"name":'+'"'+this.zhiNameData[i]+'"'+'},'
}
arrshuzu=arrshuzu.substring(0,arrshuzu.length-1)
arrshuzu+=']'
this.tiaoshiPao=JSON.parse(arrshuzu)
bianli() {
if (this.zhiNumData.length >= 1) {
var arrshuzu = "[";
for (var i = 0; i < this.zhiNumData.length; i++) {
arrshuzu +=
'{"value":' +
this.zhiNumData[i] +
',"coord":[' +
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},
{id:'dixia',name:'地下',echart:null},
{id:'guidao',name:'轨道交通',echart:null},
{id:'huagong',name:'化工生产',echart:null},
{id:'chuguan',name:'储罐类',echart:null},
{id:'changfang',name:'厂房',echart:null},
{id:'gujianzhu',name:'古建筑',echart:null},
{id:'shichang',name:'商市场',echart:null},
{id:'yiyuan',name:'医院',echart:null},
{id:'xuexiao',name:'学校',echart:null},
{id:'binguan',name:'宾馆',echart:null},
{id:'yule',name:'娱乐场所',echart:null},
{id:'canyin',name:'餐饮业',echart:null},
{id:'yingyuan',name:'影剧院',echart:null},
{id:'zhanlan',name:'展览建筑',echart:null},
{id:'suidao',name:'隧道',echart:null}]
forArr = [
{ id: "gaoceng", name: "高层", echart: null },
{ id: "dixia", name: "地下", echart: null },
{ id: "guidao", name: "轨道交通", echart: null },
{ id: "huagong", name: "化工生产", echart: null },
{ id: "chuguan", name: "储罐类", echart: null },
{ id: "changfang", name: "厂房", echart: null },
{ id: "gujianzhu", name: "古建筑", echart: null },
{ id: "shichang", name: "商市场", echart: null },
{ id: "yiyuan", name: "医院", echart: null },
{ id: "xuexiao", name: "学校", echart: null },
{ id: "binguan", name: "宾馆", echart: null },
{ id: "yule", name: "娱乐场所", echart: null },
{ id: "canyin", name: "餐饮业", echart: null },
{ id: "yingyuan", name: "影剧院", echart: null },
{ id: "zhanlan", name: "展览建筑", echart: null },
{ id: "suidao", name: "隧道", echart: null },
];
//返回
goback(){
sessionStorage.setItem('refresh', 'true');
goback() {
sessionStorage.setItem("refresh", "true");
history.go(-1);
}
/* 顶部饼状图 */
indexBzt
initCharts(){
this.indexBzt = echarts.init(document.getElementById('pie'),'walden');
let options={
indexBzt;
initCharts() {
this.indexBzt = echarts.init(document.getElementById("pie"), "walden");
let options = {
title: {
text: '建筑类型统计(8900家)',
left: 'center',
top: "7%",
textStyle: {
fontSize:26
}
text: "建筑类型统计(8900家)",
left: "center",
top: "7%",
textStyle: {
fontSize: 26,
},
},
tooltip: {
trigger: 'item',
formatter: (params)=>{
return this.data.tableTooltip(this.tableDataZhi,params.name)
trigger: "item",
formatter: (params) => {
return this.data.tableTooltip(this.tableDataZhi, params.name);
},
position: this.data.tableTooltipNoShow2
position: this.data.tableTooltipNoShow2,
},
legend: {
orient: 'vertical',
orient: "vertical",
right: 150,
top:80,
textStyle:{
fontSize:18,
color:"#000000"
top: 80,
textStyle: {
fontSize: 18,
color: "#000000",
},
data: ['高层', '地下', '轨道交通', '化工生产', '储罐类' , '厂房','古建筑', '商市场', '医院', '学校', '宾馆' , '娱乐场所','餐饮业', '影剧院', '展览建筑' , '隧道']
data: [
"高层",
"地下",
"轨道交通",
"化工生产",
"储罐类",
"厂房",
"古建筑",
"商市场",
"医院",
"学校",
"宾馆",
"娱乐场所",
"餐饮业",
"影剧院",
"展览建筑",
"隧道",
],
},
series: [
{
name: '访问来源',
type: 'pie',
radius: '70%',
center: ['50%', '60%'],
label:{
show:true,
fontSize:16,
formatter:'{b}{c}家\n{d|({d}%)}',
name: "访问来源",
type: "pie",
radius: "70%",
center: ["50%", "60%"],
label: {
show: true,
fontSize: 16,
formatter: "{b}{c}家\n{d|({d}%)}",
rich: {
d: {
align: 'center',
fontSize:16
}
align: "center",
fontSize: 16,
},
},
},
data: [
{value: 500, name: '高层'},
{value: 800, name: '地下'},
{value: 900, name: '轨道交通'},
{value: 800, name: '化工生产'},
{value: 1200, name: '储罐类'},
{value: 1500, name: '厂房'},
{value: 1400, name: '古建筑'},
{value: 600, name: '商市场'},
{value: 568, name: '医院'},
{value: 888, name: '学校'},
{value: 485, name: '宾馆'},
{value: 966, name: '娱乐场所'},
{value: 789, name: '餐饮业'},
{value: 500, name: '影剧院'},
{value: 1025, name: '展览建筑'},
{value: 600, name: '隧道'}
{ value: 500, name: "高层" },
{ value: 800, name: "地下" },
{ value: 900, name: "轨道交通" },
{ value: 800, name: "化工生产" },
{ value: 1200, name: "储罐类" },
{ value: 1500, name: "厂房" },
{ value: 1400, name: "古建筑" },
{ value: 600, name: "商市场" },
{ value: 568, name: "医院" },
{ value: 888, name: "学校" },
{ value: 485, name: "宾馆" },
{ value: 966, name: "娱乐场所" },
{ value: 789, name: "餐饮业" },
{ value: 500, name: "影剧院" },
{ value: 1025, name: "展览建筑" },
{ value: 600, name: "隧道" },
],
emphasis: {
itemStyle: {
shadowBlur: 10,
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.indexBzt.setOption(options);
}
//柱状图
lengthdata=[]//提示数据
count=0//总数
indexData=[]//所有数据
organizationId=[]
tabledata
barEcharts(){
this.forArr.forEach(item=>{
let _this = this
item.echart = echarts.init(document.getElementById('gaoceng'),'walden');
let option = {
title: {
text: this.headname+this.tabledata[0].totalCount,
left: "center",
top:this.padHw?"18":"0",
bottom:this.padHw?"0":'510',
textStyle: {
fontSize: 30
}
lengthdata = []; //提示数据
count = 0; //总数
indexData = []; //所有数据
organizationId = [];
tabledata;
barEcharts() {
let item = this.forArr.find((v) => this.headname.indexOf(v.name) !== -1);
item.echart = echarts.init(
document.getElementById("buildingTypeEcharts"),
"walden"
);
let option = {
title: {
text: this.headname + this.tabledata[0].totalCount,
left: "center",
top: this.padHw ? "18" : "0",
bottom: this.padHw ? "0" : "600",
textStyle: {
fontSize: 18,
},
},
grid: {
bottom: "15%",
},
xAxis: {
id: this.organizationId,
type: "category",
data: this.zhiNameData,
axisLabel: {
interval: 0,
rotate: 28,
textStyle: {
fontSize: 16,
color: "#000000",
},
grid: {
//top: 90,
bottom: '18%',
},
xAxis: {
id:this.organizationId,
type: 'category',
data: this.zhiNameData,
axisLabel:{
//this.axisLabel,
interval: 0,
rotate:28,
textStyle:{
fontSize :16,
color:'#000000'
}
}
},
yAxis: {
type: "value",
axisLabel: {
textStyle: {
fontSize: 16,
color: "#000000",
},
yAxis: {
type: 'value',
axisLabel:{
//this.axisLabel,
textStyle:{
fontSize :16,
color:'#000000'
}
}
},
},
tooltip: {
trigger: "item",
formatter: (params) => {
return this.tableTooltip(params);
},
position: this.data.tableTooltipNoShow2,
},
series: [
{
data: this.zhiNumData,
type: "bar",
markPoint: {
data: this.tiaoshiPao,
},
tooltip: {
trigger: 'item',
formatter: (params)=>{
return this.tableTooltip(params)
},
position: this.data.tableTooltipNoShow2
backgroundStyle: {
color: "rgba(220, 220, 220, 0.8)",
},
series: [{
data: this.zhiNumData,
type: 'bar',
markPoint: {
data:this.tiaoshiPao
},
//showBackground: true,
backgroundStyle: {
color: 'rgba(220, 220, 220, 0.8)'
barWidth: "38",
},
],
};
item.echart.setOption(option);
item.echart.getZr().on("click", (params) => {
const pointInPixel = [params.offsetX, params.offsetY];
// console.log("点击图表", pointInPixel);
if (item.echart.containPixel("grid", pointInPixel)) {
let xIndex = item.echart.convertFromPixel({ seriesIndex: 0 }, [
params.offsetX,
params.offsetY,
])[0];
// console.log("点击柱状图index", xIndex);
// console.log("this.data", this.data);
// console.log("this.tabledata", this.tabledata);
if (
(this.data.level == "0" || this.data.level == "1") &&
this.tabledata[0].organizations[xIndex].subOrganizations.length !== 0
) {
// 总队,支队跳转
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],
},
barWidth :'38',
//label: this.topTextlabel
}]
};
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}});
}
);
return;
} 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}});
}
});
})
return;
});
}
//提示框表格
res
tishiData
tableTooltip(datas){
for(var a in this.data.obdata[0].organizations){
if(this.data.obdata[0].organizations[a].organizationName==datas.name){
this.tishiData=this.data.obdata[0].organizations[a].subOrganizations
res;
tishiData;
tableTooltip(datas) {
for (var a in this.data.obdata[0].organizations) {
if (this.data.obdata[0].organizations[a].organizationName == datas.name) {
this.tishiData = this.data.obdata[0].organizations[a].subOrganizations;
}
}
var countall=0//总计
var countbi=0//站比
var allCountbi=0//总站比
for(var i=0;i<this.tishiData.length;i++){
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+='</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+='<thead style="font-size:18px;"><tr>';
this.res+='<td style="text-align:center;width:30%;">名称</td>';
this.res+='<td style="text-align:center;width:30%;">数量</td>'
this.res+='<td style="text-align:center;width:30%;">总占比</td>'
this.res+='</tr></thead>'
this.res+='<tbody>';
for(var i=0;i<this.tishiData.length;i++){
countbi=Math.round(this.tishiData[i].count/countall* 10000)/ 100.00
allCountbi=allCountbi+countbi
this.res+='<tr>'
this.res+='<td style="text-align:center;">'+this.tishiData[i].organizationName+'</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
var countall = 0; //总计
var countbi = 0; //站比
var allCountbi = 0; //总站比
for (var i = 0; i < this.tishiData.length; i++) {
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 +=
'</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 += '<thead style="font-size:18px;"><tr>';
this.res += '<td style="text-align:center;width:30%;">名称</td>';
this.res += '<td style="text-align:center;width:30%;">数量</td>';
this.res += '<td style="text-align:center;width:30%;">总占比</td>';
this.res += "</tr></thead>";
this.res += "<tbody>";
for (var i = 0; i < this.tishiData.length; i++) {
countbi =
Math.round((this.tishiData[i].count / countall) * 10000) / 100.0;
allCountbi = allCountbi + countbi;
this.res += "<tr>";
this.res +=
'<td style="text-align:center;">' +
this.tishiData[i].organizationName +
"</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;
}
}

6
src/app/statistic-analysis/combined-query/combined-query.component.html

@ -8,11 +8,11 @@
<div class="header">
<div class="queryBox">
<div class="queryField ordiv">
<label style="margin-right: 10px;">消防救援站:</label>
<label style="margin-right: 10px;">所属消防救援支队:</label>
<mat-form-field class="example-full-width">
<input readonly matInput placeholder="请选择消防救援站" autocomplete="off" *ngIf="preparelevels==0"
<input readonly matInput placeholder="请选择所属消防救援支队" autocomplete="off" *ngIf="preparelevels==0"
[(ngModel)]="js" name="js" (focus)="openorganizationbox()">
<input readonly matInput placeholder="请选择消防救援站" autocomplete="off" *ngIf="preparelevels==1"
<input readonly matInput placeholder="请选择所属消防救援支队" autocomplete="off" *ngIf="preparelevels==1"
[(ngModel)]="yuanjs" name="js" (focus)="openorganizationbox()">
</mat-form-field>
<mat-checkbox style="margin-left: 6px;" color="primary" *ngIf="preparelevels==0" [(ngModel)]="jscheck"

8
src/app/statistic-analysis/combined-query/combined-query.component.ts

@ -513,7 +513,7 @@ export class CombinedQueryComponent implements OnInit {
if (this.preparelevels == 0) {
if (element == this.js) {
this.snackBar.open(
"已在当前查询的消防救援站下,无法下钻",
"已在当前查询的所属消防救援支队下,无法下钻",
"确定",
config
);
@ -522,7 +522,7 @@ export class CombinedQueryComponent implements OnInit {
} else if (this.preparelevels == 1) {
if (element == this.yuanjs) {
this.snackBar.open(
"已在当前查询的消防救援站下,无法下钻",
"已在当前查询的所属消防救援支队下,无法下钻",
"确定",
config
);
@ -530,11 +530,11 @@ export class CombinedQueryComponent implements OnInit {
}
}
if (clickOr.children.length == 0 && this.excelData.length == 1) {
this.snackBar.open("无下级消防救援站,无法下钻", "确定", config);
this.snackBar.open("无下级所属消防救援支队,无法下钻", "确定", config);
return;
}
//记录点击过的消防救援站
//记录点击过的所属消防救援支队
this.orRecord.push({ name: this.js, id: this.jsId });
if (this.preparelevels == 0) {

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

@ -26,7 +26,7 @@
<td mat-cell *matCellDef="let element">{{element.modifiedTime|date:'yyyy-MM-dd'}}</td>
</ng-container>
<ng-container matColumnDef="organizationName">
<th mat-header-cell *matHeaderCellDef style="width: 10%;">消防救援站</th>
<th mat-header-cell *matHeaderCellDef style="width: 10%;">所属消防救援支队</th>
<td mat-cell *matCellDef="let element">{{element.organizationName}}</td>
</ng-container>
<ng-container matColumnDef="buildingTypes">

90
src/app/statistic-analysis/home/home.component.html

@ -2,57 +2,43 @@
<div class="main-top">
<!-- 左侧 -->
<div class="main-left">
<div class="panel panel04" style="flex: 2.3; max-height: 410px;">
<div class="panel-hd">
<!-- <a href="javascript:;" class="panel-more"><svg width="18" height="12" xmlns="http://www.w3.org/2000/svg"><g fill="#93FCFF" fill-rule="evenodd" opacity=".6"><path d="M0 0h18v2H0zM0 5h18v2H0zM0 10h18v2H0z"/></g></svg></a> -->
</div>
<div class="panel panel04" style="flex: 1;">
<div class="panel-bd">
<div id="chartHynyxf" class="chart-item"></div>
</div>
</div>
<div class="box-wrap mt plan" style="flex: 0.7;cursor: pointer;" (click)="scheduled()">
<div class="panel-hd" style="padding-top: 0px;">
<div class="panel-tit" style="color: white;">年度完成情况</div>
</div>
<div class="panel-bd" style="padding-top: 3px;">
<div class="progress-list">
<div class="progress-item">
<div class="progress-name">当月完成情况</div>
<div class="progress">
<div class="progress-num" style="color: white;">{{completeProgress.monthlyCompleteProgress}}%</div>
<div class="progress-bar">
<div [style]="integrity(completeProgress.monthlyCompleteProgress)"
class="progress-bar-inner progress-bar-gradient"></div>
</div>
</div>
</div>
<!-- 中间 -->
<div class="main-center" style="z-index: 99;position: relative;">
<!-- 数量统计 -->
<div #chartContainer id="chartMap"></div>
<div id="tooltip" [hidden]="!isTooltip" [style.left]="mouseX" [style.top]="mouseY">
<!-- 这里是浮窗的内容 -->
<div class="content">
<div class="countbox">
<div>
<span>区域名称:</span>
<span>
{{itemData.name}}
</span>
</div>
<div>
<span>单位数量:</span>
<span>
{{itemData.companyCount}}
</span>
</div>
<div class="progress-item">
<div class="progress-name">年计划完成率</div>
<div class="progress">
<div class="progress-num" style="color: white;">{{completeProgress.yearlyCompleteProgress}}%</div>
<div class="progress-bar">
<div [style]="integrity(completeProgress.yearlyCompleteProgress)" class=" progress-bar-inner
progress-bar-gradient"></div>
</div>
</div>
<div>
<span>预案数量:</span>
<span>
{{itemData.planCount}}
</span>
</div>
<!-- <div class="progress-item">
<div class="progress-name">日历进度差</div>
<div class="progress">
<div class="progress-num">82%</div>
<div class="progress-bar">
<div style="width: 82%;" class="progress-bar-inner progress-bar-gradient"></div>
</div>
</div>
</div> -->
</div>
<span class="close" (click)="close()">x</span>
</div>
</div>
</div>
<!-- 中间 -->
<div class="main-center" id="chartMap" style="z-index: 99;">
<!-- 数量统计 -->
<div class="number-area" id="number-area" style="z-index: 100;height: 125px;">
<div class="number-area" id="number-area" style="z-index: 100;height: 125px;width: 185px;">
<div class="number-box">
<div class="number-tit" style="color: white;">预案编制总量</div>
<ul class="count-number">
@ -61,28 +47,15 @@
</li>
</ul>
</div>
<div class="number-item">
<div class="item-tit">单位数量总计</div>
<div class="item-txt" id="number01">{{keyUnitNum}}</div>
</div>
<!-- <div class="number-item">
<div class="item-tit">数据采集总量</div>
<div class="item-txt" id="number02">{{dataGetNum}}</div>
</div> -->
</div>
<!-- 图表 -->
<!-- <div class="panel panel06 mt-mlger">
<div class="panel-bd">
<div id="chartQusj" class="chart-item"></div>
</div>
</div> -->
</div>
<!-- 右侧 -->
<div class="main-right">
<div class="box-wrap planNum" style="flex: 0.7;position: relative;">
<span style="position: absolute;right: 3px;top: 3px;color: white;cursor: pointer;" (click)="changeNumList()">
<!-- <span style="position: absolute;right: 3px;top: 3px;color: white;cursor: pointer;" (click)="changeNumList()">
<mat-icon>autorenew</mat-icon>
</span>
</span> -->
<div class="panel-bd" style="padding-top: 13px;">
<div class="total-box" *ngIf="isNumList">
<div class="total-item" (click)="threePlan()">
@ -140,4 +113,5 @@
</div>
</div>
</div>
</div>

67
src/app/statistic-analysis/home/home.component.scss

@ -1,25 +1,56 @@
@import "../../../assets/css/newStyle.css";
.main-center{
position: relative;
// .main{
// }
.main-center {
position: relative;
}
#chartMap {
margin-left: 5px;
}
#chartMap{
margin-left: 5px;
.number-area {
position: absolute;
top: 0;
display: block;
width: 80%;
}
.number-area{
position: absolute;
top: 0;
display: block;
width:80%;
.total-item {
z-index: 200;
cursor: pointer;
}
.total-item{
z-index: 200;
cursor: pointer;
.total-item div {
height: 23px !important;
line-height: 23px !important;
}
.total-item div{
height: 23px!important;
line-height: 23px!important;
.xxx div {
height: 20px !important;
line-height: 20px !important;
}
.xxx div{
height: 20px!important;
line-height: 20px!important;
#tooltip {
width: 170px;
height: 90px;
position: fixed;
background-color: rgba(0, 0, 0, 0.8);
border-radius: 8px;
z-index: 999;
.content {
width: 100%;
height: 100%;
position: relative;
color: #fff;
font-size: 14px;
display: flex;
flex-direction: column;
justify-content: center;
box-sizing: border-box;
padding-left: 12px;
.close {
position: absolute;
right: 8px;
top: 3px;
cursor: pointer;
}
}
}

1237
src/app/statistic-analysis/home/home.component.ts

File diff suppressed because it is too large Load Diff

2
src/app/statistic-analysis/plan-analysis-by-synthesis/plan-analysis-by-synthesis.component.html

@ -14,7 +14,7 @@
<div class="queryField ordiv">
<label style="margin-right: 10px;">归属地:</label>
<mat-form-field class="example-full-width">
<input readonly matInput placeholder="请选择消防救援站" autocomplete="off" [(ngModel)]="js" name="js"
<input readonly matInput placeholder="请选择所属消防救援支队" autocomplete="off" [(ngModel)]="js" name="js"
(focus)="openorganizationbox()">
</mat-form-field>
<mat-checkbox style="margin-left: 6px;" [(ngModel)]="jscheck" name="jscheck">包含下级</mat-checkbox>

530
src/app/statistic-analysis/plan-analysis-by-synthesis/plan-analysis-by-synthesis.component.ts

@ -1,38 +1,60 @@
import { Component, OnInit, ViewChild, Inject } from '@angular/core';
import { HttpClient } from '@angular/common/http'
import { MatTreeFlatDataSource, MatTreeFlattener } from '@angular/material/tree';
import { MatPaginator } from '@angular/material/paginator';
import { FlatTreeControl } from '@angular/cdk/tree';
import { FormControl } from '@angular/forms';
import { Router, ActivatedRoute } from '@angular/router'
import { PageEvent } from '@angular/material/paginator';
import { MatDialogRef, MatDialog, MAT_DIALOG_DATA } from '@angular/material/dialog';
import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar';
import { TreeService } from '../../http-interceptors/tree.service'
import { Viewer } from 'photo-sphere-viewer';
declare var CryptoJS
import { Component, OnInit, ViewChild, Inject } from "@angular/core";
import { HttpClient } from "@angular/common/http";
import {
MatTreeFlatDataSource,
MatTreeFlattener,
} from "@angular/material/tree";
import { MatPaginator } from "@angular/material/paginator";
import { FlatTreeControl } from "@angular/cdk/tree";
import { FormControl } from "@angular/forms";
import { Router, ActivatedRoute } from "@angular/router";
import { PageEvent } from "@angular/material/paginator";
import {
MatDialogRef,
MatDialog,
MAT_DIALOG_DATA,
} from "@angular/material/dialog";
import { MatSnackBar, MatSnackBarConfig } from "@angular/material/snack-bar";
import { TreeService } from "../../http-interceptors/tree.service";
import { Viewer } from "photo-sphere-viewer";
declare var CryptoJS;
@Component({
selector: 'app-plan-analysis-by-synthesis',
templateUrl: './plan-analysis-by-synthesis.component.html',
styleUrls: ['./plan-analysis-by-synthesis.component.scss']
selector: "app-plan-analysis-by-synthesis",
templateUrl: "./plan-analysis-by-synthesis.component.html",
styleUrls: ["./plan-analysis-by-synthesis.component.scss"],
})
export class PlanAnalysisBySynthesisComponent 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 {
expandable: !!node.children && node.children.length > 0,
name: node.name,
level: level,
id: node.id,
parentId: node.parentId,
children: node.children
children: node.children,
};
}
treeControl = new FlatTreeControl<any>(node => node.level, node => node.expandable);
treeFlattener = new MatTreeFlattener(this._transformer, node => node.level, node => node.expandable, node => node.children);
};
treeControl = new FlatTreeControl<any>(
(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);
myControl = new FormControl();
hasChild = (_: number, node: any) => node.expandable;
@ -42,108 +64,127 @@ export class PlanAnalysisBySynthesisComponent implements OnInit {
paginator: MatPaginator;
length: any; //共多少条数据
pageSize: any; //每页条数
pageSizeOptions: number[] = [10] //设置每页条数
pageSizeOptions: number[] = [10]; //设置每页条数
PageNumber: any; //第几页
displayedColumns: string[] = ['planname', 'addpeople', 'level', 'addtime', 'plantype', 'auditStatus', 'openRange', 'projectlevel', 'operation'];
allorganizations: any //所有组织机构
allunittype: any //所有单位类型
tabledataSource: any //表格数据
url
displayedColumns: string[] = [
"planname",
"addpeople",
"level",
"addtime",
"plantype",
"auditStatus",
"openRange",
"projectlevel",
"operation",
];
allorganizations: any; //所有组织机构
allunittype: any; //所有单位类型
tabledataSource: any; //表格数据
url;
preparelevels: any
preparelevels: any;
ngOnInit(): void {
if (window.matchMedia("(max-width: 1400px)").matches) {
this.pcMore = false
this.padMore = true
this.pcfind = false
this.padjt = true
this.pcMore = false;
this.padMore = true;
this.pcfind = false;
this.padjt = true;
} else {
this.pcfind = true
this.pcMore = true
this.padMore = false
this.padjt = false
this.pcfind = true;
this.pcMore = true;
this.padMore = false;
this.padjt = false;
}
this.getunitdata();
this.getOrganizations();
this.getUnittype();
this.getAllPlanInfo();
let level = sessionStorage.getItem("level");
if (level == "0") {//如果是总队
if (level == "0") {
//如果是总队
this.preparelevels = [
{ name: "总队", value: "1" },
{ name: "支队", value: "2" },
{ name: "大队", value: "4" },
{ name: "中队", value: "8" }
]
{ name: "中队", value: "8" },
];
}
if (level == "1") {//如果是支队
if (level == "1") {
//如果是支队
this.preparelevels = [
{ name: "支队", value: "2" },
{ name: "大队", value: "4" },
{ name: "中队", value: "8" }
]
{ name: "中队", value: "8" },
];
}
if (level == "2") {//如果是大队
if (level == "2") {
//如果是大队
this.preparelevels = [
{ name: "大队", value: "4" },
{ name: "中队", value: "8" }
]
{ name: "中队", value: "8" },
];
}
if (level == "3") {//如果是中队
this.preparelevels = [
{ name: "中队", value: "8" }
]
if (level == "3") {
//如果是中队
this.preparelevels = [{ name: "中队", value: "8" }];
}
this.url = window.location.href.substring(window.location.href.length - 1, window.location.href.length)
this.url = window.location.href.substring(
window.location.href.length - 1,
window.location.href.length
);
//console.log(this.url)
}
pcMore//pc更多
pcput = false//pc收起
pcfind//pc查询
padjt = false
padMore = true//pad收缩控制
padput = false//pad收起按钮
imgsrcopen = "../../../assets/images/routdown2.png"
imgsrcdown = "../../../assets/images/routup2.png"
pcMore; //pc更多
pcput = false; //pc收起
pcfind; //pc查询
padjt = false;
padMore = true; //pad收缩控制
padput = false; //pad收起按钮
imgsrcopen = "../../../assets/images/routdown2.png";
imgsrcdown = "../../../assets/images/routup2.png";
pcInfo() {
this.pcMore = !this.pcMore
this.pcput = !this.pcput
this.pcMore = !this.pcMore;
this.pcput = !this.pcput;
}
padInfo() {
this.padMore = !this.padMore
this.padput = !this.padput
this.padMore = !this.padMore;
this.padput = !this.padput;
}
allPlanInfo: any //存储所有预案信息
allPlanInfo: any; //存储所有预案信息
//获得所有预案信息
getAllPlanInfo() {
let reservePlanType
this.reservePlanType ? reservePlanType = JSON.parse(JSON.stringify(this.reservePlanType)) : reservePlanType = ''
let reservePlanType;
this.reservePlanType
? (reservePlanType = JSON.parse(JSON.stringify(this.reservePlanType)))
: (reservePlanType = "");
if (this.reservePlanType && this.reservePlanType.length != 0) {
reservePlanType = eval(this.reservePlanType.join("|"))
reservePlanType = eval(this.reservePlanType.join("|"));
}
let paramsdata: any = {
CompanyName: this.companyName || '',
OrganizationId: this.jsId || '',
HasChildrenOrganization: this.jscheck || '',
BuildingTypeId: this.unittype || '',
PlanType: this.reservePlanType || '',
AuditStatus: '', //审核状态
PlanLevel: this.preparelevel || '',
HasChildrenPlanLevel: this.plcheck || '',
AduitTimeRangeStart: this.addtime || '',
AduitTimeRangeEnd: this.endtime || '',
PageNumber: this.PageNumber || '1',
CompanyName: this.companyName || "",
OrganizationId: this.jsId || "",
HasChildrenOrganization: this.jscheck || "",
BuildingTypeId: this.unittype || "",
PlanType: this.reservePlanType || "",
AuditStatus: "", //审核状态
PlanLevel: this.preparelevel || "",
HasChildrenPlanLevel: this.plcheck || "",
AduitTimeRangeStart: this.addtime || "",
AduitTimeRangeEnd: this.endtime || "",
PageNumber: this.PageNumber || "1",
PageSize: this.pageSizeOptions[0],
Sort: '',
PlanCategories: this.planCategory
}
this.http.get("/api/ApprovedPlans", { params: paramsdata }).subscribe((data: any) => {
this.length = data.totalCount
this.allPlanInfo = data
this.tabledataSource = data.items
})
Sort: "",
PlanCategories: this.planCategory,
};
this.http
.get("/api/ApprovedPlans", { params: paramsdata })
.subscribe((data: any) => {
this.length = data.totalCount;
this.allPlanInfo = data;
this.tabledataSource = data.items;
});
}
colorRgb(sColor) {
@ -175,7 +216,7 @@ export class PlanAnalysisBySynthesisComponent implements OnInit {
var strHex = "#";
for (var i = 0; i < aColor.length; i++) {
var hex: any = Number(aColor[i]).toString(16);
hex = hex < 10 ? 0 + '' + hex : hex;// 保证每个rgb的值为2位
hex = hex < 10 ? 0 + "" + hex : hex; // 保证每个rgb的值为2位
if (hex === "0") {
hex += hex;
}
@ -192,7 +233,7 @@ export class PlanAnalysisBySynthesisComponent implements OnInit {
} else if (aNum.length === 3) {
var numHex = "#";
for (var i = 0; i < aNum.length; i += 1) {
numHex += (aNum[i] + aNum[i]);
numHex += aNum[i] + aNum[i];
}
return numHex;
}
@ -202,8 +243,8 @@ export class PlanAnalysisBySynthesisComponent implements OnInit {
}
gradientColor(startColor, endColor, step) {
let _this = this
let startRGB = _this.colorRgb(startColor);//转换为rgb数组模式
let _this = this;
let startRGB = _this.colorRgb(startColor); //转换为rgb数组模式
let startR = startRGB[0];
let startG = startRGB[1];
let startB = startRGB[2];
@ -213,131 +254,129 @@ export class PlanAnalysisBySynthesisComponent implements OnInit {
let endG = endRGB[1];
let endB = endRGB[2];
let sR = (endR - startR) / step;//总差值
let sR = (endR - startR) / step; //总差值
let sG = (endG - startG) / step;
let sB = (endB - startB) / step;
var colorArr = [];
for (var i = 0; i < step; i++) {
//计算每一步的hex值
var hex = _this.colorHex('rgb(' + parseInt((sR * i + startR)) + ',' + parseInt((sG * i + startG)) + ',' + parseInt((sB * i + startB)) + ')');
//计算每一步的hex值
var hex = _this.colorHex(
"rgb(" +
parseInt(sR * i + startR) +
"," +
parseInt(sG * i + startG) +
"," +
parseInt(sB * i + startB) +
")"
);
colorArr.push(hex);
}
return colorArr;
}
integrity(width) {
let _this = this
let _this = this;
let style: any = {}
style.width = width + '%';
let style: any = {};
style.width = width + "%";
if (width < 30) {
let colorArr = this.gradientColor('#D50000', '#E53935', 30);
let colorArr = this.gradientColor("#D50000", "#E53935", 30);
for (let i = 0; i < 30; i++) {
if (i == width) {
style.background = colorArr[i]
style.background = colorArr[i];
}
}
}
if (width >= 30 && width < 60) {
let colorArr = this.gradientColor('#FF9800', '#E65100', 30);
let colorArr = this.gradientColor("#FF9800", "#E65100", 30);
for (let i = 30; i < 60; i++) {
if (i == width) {
style.background = colorArr[i - 30]
style.background = colorArr[i - 30];
}
}
}
if (width >= 60) {
let colorArr = this.gradientColor('#81C784', '#2E7D32', 41);
let colorArr = this.gradientColor("#81C784", "#2E7D32", 41);
for (let i = 60; i <= 100; i++) {
if (i == width) {
style.background = colorArr[i - 60]
style.background = colorArr[i - 60];
}
}
}
return style
return style;
}
integrityDetails(width, zong) {
let style: any = {}
style.width = (width / zong) * 100 + '%';
return style
let style: any = {};
style.width = (width / zong) * 100 + "%";
return style;
}
//得到当前单位信息
getunitdata() {
this.http.get("/api/Account/Profiles").subscribe(
(data: any) => {
this.organizationName = data.organizationName
}
)
this.http.get("/api/Account/Profiles").subscribe((data: any) => {
this.organizationName = data.organizationName;
});
}
addtime//开始时间
endtime//结束时间
integrityScoreMin//完整度最小值
integrityScoreMax//完整度最大值
organizationName: any //当前单位组织机构名称
treedata: any //组织机构树型数据
newArr: any = []
newallorganizations: any //用于存储在原始数据基础上的每个机构增加children字段
addtime; //开始时间
endtime; //结束时间
integrityScoreMin; //完整度最小值
integrityScoreMax; //完整度最大值
organizationName: any; //当前单位组织机构名称
treedata: any; //组织机构树型数据
newArr: any = [];
newallorganizations: any; //用于存储在原始数据基础上的每个机构增加children字段
//得到当前单位所在组织机构的tree型数据
getpresentOrganization() {
this.newallorganizations = this.allorganizations
this.newallorganizations.forEach(item => {
item.children = []
this.newallorganizations.forEach(element => {
this.newallorganizations = this.allorganizations;
this.newallorganizations.forEach((item) => {
item.children = [];
this.newallorganizations.forEach((element) => {
if (element.parentId == item.id) {
item.children.push(element)
item.children.push(element);
}
});
});
this.http.get("/api/Account/Profiles").subscribe(
(data: any) => {
this.organizationName = data.organizationName
if (this.organizationName) {
this.newallorganizations.forEach(item => {
if (item.name == this.organizationName) {
this.dataSource.data = [item]
}
});
} else {
this.dataSource.data = this.tree.toTree(this.treedata);
}
this.http.get("/api/Account/Profiles").subscribe((data: any) => {
this.organizationName = data.organizationName;
if (this.organizationName) {
this.newallorganizations.forEach((item) => {
if (item.name == this.organizationName) {
this.dataSource.data = [item];
}
});
} else {
this.dataSource.data = this.tree.toTree(this.treedata);
}
)
});
}
//获得所有组织机构
getOrganizations() {
this.http.get('/api/Organizations').subscribe(
(data: any) => {
this.allorganizations = data
this.treedata = this.tree.toTree(data);
this.getpresentOrganization();
}
)
this.http.get("/api/Organizations").subscribe((data: any) => {
this.allorganizations = data;
this.treedata = this.tree.toTree(data);
this.getpresentOrganization();
});
}
//获得所有单位类型
getUnittype() {
this.http.get('/api/BuildingTypes/Simple').subscribe(
data => {
this.allunittype = data
}
)
this.http.get("/api/BuildingTypes/Simple").subscribe((data) => {
this.allunittype = data;
});
}
//查看单位信息
lookUnitInfo(element) {
// console.log(element)
// const dialogRef = this.dialog.open(UnitInfo, {
// width: '1500px',
// height:'800px'
// });
sessionStorage.setItem("editable", "0")
sessionStorage.setItem("companyName", element.company.name)
sessionStorage.setItem("companyId", element.company.id)
sessionStorage.setItem(element.company.id, JSON.stringify(element.company.companyIntegrityScore))
window.open(`/keyUnit/viewunitinfo?id=${element.company.id}&usci=${element.company.usci}`, '_blank');
sessionStorage.setItem("editable", "0");
sessionStorage.setItem("companyName", element.company.name);
sessionStorage.setItem("companyId", element.company.id);
sessionStorage.setItem(
element.company.id,
JSON.stringify(element.company.companyIntegrityScore)
);
window.open(
`/keyUnit/viewunitinfo?id=${element.company.id}&usci=${element.company.usci}`,
"_blank"
);
}
//跳转查看预案页面 审核通过预案
@ -345,142 +384,151 @@ export class PlanAnalysisBySynthesisComponent implements OnInit {
// console.log(e)
if (e.planMode == 0 || e.planMode == 1) {
//console.log(e.attachmentUrls)
var index = e.attachmentUrls[0].indexOf("\/")
if (e.attachmentUrls[0].substr(0, index) == 'psw') {
var index = e.attachmentUrls[0].indexOf("/");
if (e.attachmentUrls[0].substr(0, index) == "psw") {
const dialogRef = this.dialog.open(GkPsViewer2, {
width: '1500px',
height: '800px',
data: e.attachmentUrls[0]
width: "1500px",
height: "800px",
data: e.attachmentUrls[0],
});
}
else {
let fetchUrl = e.attachmentUrls[0]
let suffix = fetchUrl.split('.')[fetchUrl.split('.').length - 1].toLowerCase()
if (suffix == 'docx' || suffix == 'doc') {
let arr = fetchUrl.split('.')
arr[arr.length - 1] = 'pdf'
window.open(`/api/Objects/PlanPlatform/` + arr.join('.'))
} else if (suffix == 'pdf') {
window.open(`/api/Objects/PlanPlatform/` + fetchUrl)
} else {
let fetchUrl = e.attachmentUrls[0];
let suffix = fetchUrl
.split(".")
[fetchUrl.split(".").length - 1].toLowerCase();
if (suffix == "docx" || suffix == "doc") {
let arr = fetchUrl.split(".");
arr[arr.length - 1] = "pdf";
window.open(`/api/Objects/PlanPlatform/` + arr.join("."));
} else if (suffix == "pdf") {
window.open(`/api/Objects/PlanPlatform/` + fetchUrl);
} else {
let config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open('该文件类型暂不支持在线查看', '确定', config);
config.verticalPosition = "top";
config.duration = 3000;
this.snackBar.open("该文件类型暂不支持在线查看", "确定", config);
}
}
}
if (e.planMode == 2) { //如果是在线编辑
let id = e.id
sessionStorage.setItem("planId", id)
sessionStorage.setItem("companyId", e.companyId)
if (e.planMode == 2) {
//如果是在线编辑
let id = e.id;
sessionStorage.setItem("planId", id);
sessionStorage.setItem("companyId", e.companyId);
//sessionStorage.setItem("buildingTypeId",this.unittypeId)
sessionStorage.setItem("editable", "0")
sessionStorage.setItem("planName", e.name)
let companyId = sessionStorage.getItem("companyId")
sessionStorage.setItem("editable", "0");
sessionStorage.setItem("planName", e.name);
let companyId = sessionStorage.getItem("companyId");
window.open(`/keyUnit/viewunitinfoplan?id=${companyId}`);
}
if (e.planMode == 3) { //如果是跳转网页
sessionStorage.setItem("url", e.url)
window.open(`/planManagement/webLook`)
if (e.planMode == 3) {
//如果是跳转网页
sessionStorage.setItem("url", e.url);
window.open(`/planManagement/webLook`);
}
}
//预案公开
openReserve(e) {
this.http.put(`/api/PlanAudits/${e.id}/Public`, []).subscribe(data => {
this.http.put(`/api/PlanAudits/${e.id}/Public`, []).subscribe((data) => {
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open('预案已公开', '确定', config);
})
config.verticalPosition = "top";
config.duration = 3000;
this.snackBar.open("预案已公开", "确定", config);
});
}
//预案取消公开
closeReserve(e) {
this.http.put(`/api/PlanAudits/${e.id}/Unpublic`, []).subscribe(data => {
this.http.put(`/api/PlanAudits/${e.id}/Unpublic`, []).subscribe((data) => {
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open('预案已取消公开', '确定', config);
})
config.verticalPosition = "top";
config.duration = 3000;
this.snackBar.open("预案已取消公开", "确定", config);
});
}
//分页事件
chagePage(e) {
this.PageNumber = e.pageIndex + 1
this.PageNumber = e.pageIndex + 1;
this.getAllPlanInfo();
}
//辖区中队div是否显示
isorganizationbox: boolean = false
isorganizationbox: boolean = false;
//点击辖区中队树,将选择的辖区中队添加到变量
add(node) {
this.isorganizationbox = false
this.js = node.name
this.jsId = node.id
this.isorganizationbox = false;
this.js = node.name;
this.jsId = node.id;
}
//关闭辖区中队隐藏框
closeorganizationbox() {
this.isorganizationbox = false
this.isorganizationbox = false;
}
//打开辖区中队隐藏框
openorganizationbox() {
this.isorganizationbox = true
this.isorganizationbox = true;
}
//关闭出现的组织机构div
closediv() {
this.isorganizationbox = false
this.isorganizationbox = false;
}
//查询
onSubmit(e) {
this.PageNumber = 1
this.pageEvent.pageIndex = 0
this.PageNumber = 1;
this.pageEvent.pageIndex = 0;
this.getAllPlanInfo();
}
companyName: any //单位名称
js: any //所选组织机构
jsId: any //所选组织机构的id
jscheck: boolean //所选组织机构勾选框
unittype: any //单位类型
reservePlanType: any //预案类型
preparelevel: any //编制级别
plcheck: boolean //编制级别勾选框
planCategory = []//预案级别
companyName: any; //单位名称
js: any; //所选组织机构
jsId: any; //所选组织机构的id
jscheck: boolean; //所选组织机构勾选框
unittype: any; //单位类型
reservePlanType: any; //预案类型
preparelevel: any; //编制级别
plcheck: boolean; //编制级别勾选框
planCategory = []; //预案级别
//重置
reset() {
this.companyName = ''
this.js = ''
this.jsId = ''
this.jscheck = false
this.unittype = ''
this.reservePlanType = ''
this.preparelevel = ''
this.addtime = ''
this.endtime = ''
this.plcheck = false
this.companyName = "";
this.js = "";
this.jsId = "";
this.jscheck = false;
this.unittype = "";
this.reservePlanType = "";
this.preparelevel = "";
this.addtime = "";
this.endtime = "";
this.plcheck = false;
//重新获取初始化列表
this.pageEvent.pageIndex = 0
this.PageNumber = 1
this.planCategory = []
this.pageEvent.pageIndex = 0;
this.PageNumber = 1;
this.planCategory = [];
this.getAllPlanInfo();
}
}
@Component({
selector: 'PsViewer',
templateUrl: './PsvShow.html',
styleUrls: ['./plan-analysis-by-synthesis.component.scss']
selector: "PsViewer",
templateUrl: "./PsvShow.html",
styleUrls: ["./plan-analysis-by-synthesis.component.scss"],
})
export class GkPsViewer2 {
constructor(private router: Router, private http: HttpClient, public dialog: MatDialog, public snackBar: MatSnackBar, public dialogRef: MatDialogRef<GkPsViewer2>, @Inject(MAT_DIALOG_DATA) public data: any) { }
constructor(
private router: Router,
private http: HttpClient,
public dialog: MatDialog,
public snackBar: MatSnackBar,
public dialogRef: MatDialogRef<GkPsViewer2>,
@Inject(MAT_DIALOG_DATA) public data: any
) {}
ngOnInit(): void {
// console.log(this.data)
const viewer = new Viewer({
container: document.querySelector('#viewer'),
panorama: '/api/Objects/PlanPlatform/' + this.data,
container: document.querySelector("#viewer"),
panorama: "/api/Objects/PlanPlatform/" + this.data,
});
}
}
}

244
src/app/tabbar/tabbar.component.html

@ -1,217 +1,13 @@
<mat-toolbar [color]="theme?'primary':'accent'">
<!-- <mat-toolbar> -->
<h1 style="max-width: 240px;display: block;overflow: hidden;text-overflow: ellipsis;">{{title}} <span
<h1 style="max-width: 500px;display: block;overflow: hidden;text-overflow: ellipsis;">{{title}} <span
*ngIf="planName != null">: {{planName}}</span> </h1>
<!--分数框-->
<div class="grade" *ngIf="companyIntegrityScore" onmouseover="xiangqing.style.display='block';"
onmouseout="xiangqing.style.display='none';">
<a class="active"><span><a></a>{{(companyIntegrityScore.totalScore.toFixed(2) * 100).toFixed()}} %</span></a>
</div>
<div class="integrityDetails" id="xiangqing" *ngIf="companyIntegrityScore">
<div class="integrityDetailsTop">
<span class="span1">分类名称</span>
<span class="span2">占比</span>
<span class="span3">总占比</span>
</div>
<div class="integrityDetailsBody">
<ul>
<li>
<div class="name">单位信息</div>
<div class="colorDiv">
<div class="colorDivBac">
<div class="colorDivCon"
[style]="integrityDetails((companyIntegrityScore.basicInfoScore * 5).toFixed(1),5)">
</div>
</div>
<span>{{(companyIntegrityScore.basicInfoScore * 5).toFixed(1)}}%</span>
</div>
<div class="number">5%</div>
</li>
<li>
<div class="name">建筑信息</div>
<div class="colorDiv">
<div class="colorDivBac">
<div class="colorDivCon"
[style]="integrityDetails((companyIntegrityScore.buildingInfoScore * 10).toFixed(1),10)">
</div>
</div>
<span>{{(companyIntegrityScore.buildingInfoScore * 10).toFixed(1)}}%</span>
</div>
<div class="number">10%</div>
</li>
<li>
<div class="name">平面图</div>
<div class="colorDiv">
<div class="colorDivBac">
<div class="colorDivCon"
[style]="integrityDetails((companyIntegrityScore.planImageScore * 10).toFixed(1),10)">
</div>
</div>
<span>{{(companyIntegrityScore.planImageScore * 10).toFixed(1)}}%</span>
</div>
<div class="number">10%</div>
</li>
<li>
<div class="name">四周毗邻</div>
<div class="colorDiv">
<div class="colorDivBac">
<div class="colorDivCon"
[style]="integrityDetails((companyIntegrityScore.adjoinScore * 10).toFixed(1),10)">
</div>
</div>
<span>{{(companyIntegrityScore.adjoinScore * 10).toFixed(1)}}%</span>
</div>
<div class="number">10%</div>
</li>
<li>
<div class="name">消防设施</div>
<div class="colorDiv">
<div class="colorDivBac">
<div class="colorDivCon"
[style]="integrityDetails((companyIntegrityScore.facilityScore * 25).toFixed(1),25)">
</div>
</div>
<span>{{(companyIntegrityScore.facilityScore * 25).toFixed(1)}}%</span>
</div>
<div class="number">25%</div>
</li>
<li>
<div class="name">重点部位</div>
<div class="colorDiv">
<div class="colorDivBac">
<div class="colorDivCon"
[style]="integrityDetails((companyIntegrityScore.importantLocationScore * 10).toFixed(1),10)">
</div>
</div>
<span>{{(companyIntegrityScore.importantLocationScore * 10).toFixed(1)}}%</span>
</div>
<div class="number">10%</div>
</li>
<li>
<div class="name">功能分区</div>
<div class="colorDiv">
<div class="colorDivBac">
<div class="colorDivCon"
[style]="integrityDetails((companyIntegrityScore.functionalDivisionScore * 10).toFixed(1),10)">
</div>
</div>
<span>{{(companyIntegrityScore.functionalDivisionScore * 10).toFixed(1)}}%</span>
</div>
<div class="number">10%</div>
</li>
<li>
<div class="name">实景图</div>
<div class="colorDiv">
<div class="colorDivBac">
<div class="colorDivCon"
[style]="integrityDetails((companyIntegrityScore.realityImageScore * 10).toFixed(1),10)">
</div>
</div>
<span>{{(companyIntegrityScore.realityImageScore * 10).toFixed(1)}}%</span>
</div>
<div class="number">10%</div>
</li>
<li>
<div class="name">CAD上传</div>
<div class="colorDiv">
<div class="colorDivBac">
<div class="colorDivCon"
[style]="integrityDetails((companyIntegrityScore.cadScore * 10).toFixed(1),10)"></div>
</div>
<span>{{(companyIntegrityScore.cadScore * 10).toFixed(1)}}%</span>
</div>
<div class="number">10%</div>
</li>
</ul>
</div>
<div style="width: 100%;text-align: center;font-size: 13px;position: relative;">
仅供参考
<span class="closeScore" style="position: absolute;right: 12px;top: 0px;"
onmouseover="xiangqing.style.display='none';">关闭</span>
</div>
</div>
<p *ngIf="!isUpdates" style="font-size: 16px;position: absolute; right: 233px;">欢迎您, {{realName}}</p>
<div class="scoringRule" *ngIf="companyIntegrityScore">
<span class="name" (click)="scoringRule()">
信息完整度规则
</span>
<div class="scoringRuleImg" *ngIf="scoringRuleImg">
<div class="topbox">
<span style="font-size: 18px;margin-left: 20px;font-weight: 600;">信息完整度规则 &nbsp;</span>
<!-- <span style="font-size: 12px;">单位基本信息部分共计100分</span> -->
<span class="imgbox">
<img src="../../assets/images/ruletopimg.png" alt="">
</span>
<span class="close" (click)="closebtn()">
<mat-icon>clear</mat-icon>
</span>
</div>
<div class="tablebox">
<table>
<tr>
<td>名称</td>
<td>占比</td>
<td>规则说明</td>
</tr>
<tr>
<td>单位信息</td>
<td class="bulecolor">5%</td>
<td>填写项平分该项占比分值,信息填写完整即可</td>
</tr>
<tr>
<td>建筑信息</td>
<td class="bulecolor">10%</td>
<td>根据创建的建筑个数平分该分值,每个建筑根据实际填写的完整度再进行评判</td>
</tr>
<tr>
<td>平面图</td>
<td class="bulecolor">10%</td>
<td>总平面图<span class="bulecolor">1</span>张,层平面图<span class="bulecolor">1</span></td>
</tr>
<tr>
<td>四周毗邻</td>
<td class="bulecolor">10%</td>
<td><span class="bulecolor">4</span>个方向均分,每个方向的属性信息要填写完整,并且包含图片</td>
</tr>
<tr>
<td>消防设施</td>
<td class="bulecolor">25%</td>
<td>消防水源占<span class="bulecolor">30%</span> &nbsp;&nbsp;安全疏散设施/消防泡沫系统/安全疏散模块占<span
class="bulecolor">30%</span> <br> 消防水系统/自动消防设施/消防设施/消防灭火给水系统/消火栓系统模块占<span
class="bulecolor">30%</span>
&nbsp;&nbsp;&nbsp; 内部消防力量占<span class="bulecolor">10%</span></td>
</tr>
<tr>
<td>重点部位</td>
<td class="bulecolor">10%</td>
<td>层平面图中重点部位数量大于1个,并且属性信息填写完整(包含图片)</td>
</tr>
<tr>
<td>功能分区</td>
<td class="bulecolor">10%</td>
<td>任意建筑下功能分区信息填写两条以上并且信息填写完整</td>
</tr>
<tr>
<td>实景图</td>
<td class="bulecolor">10%</td>
<td>外观,保证有<span class="bulecolor">2</span>张照片(占<span class="bulecolor">30%</span>);
重点部位,保证有<span class="bulecolor">2</span>张照片(占<span
class="bulecolor">30%</span>);安全出口,保证有<span class="bulecolor">2</span>张照片(占<span
class="bulecolor">40%</span></td>
</tr>
<tr>
<td>CAD上传</td>
<td class="bulecolor">10%</td>
<td>保证至少有<span class="bulecolor">1</span>个文件,格式不限</td>
</tr>
</table>
</div>
</div>
</div>
<div class="isUpdates" *ngIf="isUpdates">
<span [matTooltip]="contentVerify.remark" class="span"
@ -226,39 +22,7 @@
<span style="font-size: 13px;margin-left: 6px;">帮助文档下载中,请等待...</span>
</div> -->
<!-- 帮助文档按钮 -->
<button mat-icon-button [matMenuTriggerFor]="appSetHelp" class="help" title="帮助">
<mat-icon>help</mat-icon>
</button>
<mat-menu #appSetHelp="matMenu" yPosition="below" xPosition="after">
<button mat-menu-item (click)='lookUpdate()'>
<mat-icon>update</mat-icon>
<span>查看更新内容</span>
</button>
<button mat-menu-item (click)="aFile('/assets/helpword/help.pdf','数字化预案编制管理平台手册.pdf')">
<mat-icon>save_alt</mat-icon>
<span>下载帮助文档</span>
</button>
<button mat-menu-item (click)="aFile('/assets/helpword/plantemplate.zip','V级文本预案模板.zip')">
<mat-icon>save_alt</mat-icon>
<span>V级文本预案模板</span>
</button>
<button mat-menu-item (click)="aFile('/assets/helpword/plancustom.zip','V级预案自定义.zip')">
<mat-icon>save_alt</mat-icon>
<span>V级预案自定义</span>
</button>
<button mat-menu-item (click)="aFile('/assets/helpword/planonlineedit.zip','V级在线编制.zip')">
<mat-icon>save_alt</mat-icon>
<span>V级在线编制</span>
</button>
<button mat-menu-item (click)="aFile('/assets/helpword/planonlineimport.zip','V级预案转在线导入.zip')">
<mat-icon>save_alt</mat-icon>
<span>V级预案转在线导入</span>
</button>
<button mat-menu-item (click)="aFile('/assets/helpword/keyunit.pdf','重点单位设置说明.pdf')">
<mat-icon>save_alt</mat-icon>
<span>重点单位设置说明</span>
</button>
</mat-menu>
<!-- 全屏 -->
<button mat-button (click)="!isfullscreen?fullscreenToggle():closefullscreen()" class="fullscreen">
<ng-container *ngIf="!isfullscreen; else elseTemplate">

8
src/app/test/test.component.html

@ -1,8 +0,0 @@
<div class="box">
<button mat-button style="position: absolute;left: 50%;top: 0;z-index: 999;" (click)="createimg()">生成图片</button>
<div id="mapxxx"></div>
<div class="img">
<img [src]="canvasImg" alt="">
</div>
</div>

17
src/app/test/test.component.scss

@ -1,17 +0,0 @@
.box{
width: 100%;
height: 100%;
display: flex;
#mapxxx{
width: 500px;
height: 500px;
}
.img{
width: 500px;
height: 500px;
img{
width: 500px;
height: 500px;
}
}
}

25
src/app/test/test.component.spec.ts

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

56
src/app/test/test.component.ts

@ -1,56 +0,0 @@
import { Component, OnInit } from '@angular/core';
declare var html2canvas: any;
declare var AMap: any;
@Component({
selector: 'app-test',
templateUrl: './test.component.html',
styleUrls: ['./test.component.scss']
})
export class TestComponent implements OnInit {
constructor() { }
map: any
ngOnInit(): void {
setTimeout(() => {
this.map = new AMap.Map('mapxxx', {
WebGLParams: {
preserveDrawingBuffer: true
}
});
this.map.setCity('上海市');
}, 0);
}
//生成图片
canvasImg
createimg() {
// 使用html2canvas插件,将数据源中的数据转换成画布。
html2canvas(document.querySelector("#mapxxx"), {
useCORS: true,
onrendered: function (canvas) {
var dataUrl = canvas.toDataURL("image/png");
}
}).then(canvas => {
// 修改生成的宽度
// canvas.style.width = "1000px";
console.log(canvas, "生成的画布文件");
this.canvasImg = canvas.toDataURL("image/png");
// console.log(this.canvasImg)
}).then(() => {
this.downloadFile("导出图片", this.canvasImg);
})
}
downloadFile(filename, content) {
var base64Img = content;
var oA = document.createElement('a');
oA.href = base64Img;
oA.download = filename;
var event = document.createEvent('MouseEvents');
event.initMouseEvent('click', true, false, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
oA.dispatchEvent(event);
}
}

30
src/app/ui/organization/organization.component.html

@ -1,4 +1,7 @@
<div class="box" style="height: 100%; overflow-y: auto;position: relative">
<!-- <button mat-button (click)="createOne()">新增一级目录</button> -->
<div>
<mat-tree [dataSource]="dataSource" [treeControl]="treeControl" >
<mat-tree-node *matTreeNodeDef="let node;" matTreeNodePadding (click)="getOffices(node)">
@ -37,32 +40,5 @@
</mat-tree>
</div>
<!-- 组织机构下属机关 -->
<div class="rightDiv" *ngIf="selectedOrg">
<div class="topbox">
({{selectedOrg.name}})组织机构下属机关
<button style="width: 68px;margin: 0 12px;" mat-flat-button color="primary" (click)="addOffices()">新增</button>
</div>
<div class="listBox">
<ul>
<li *ngFor="let item of OfficesList">
<span>{{item.officeName}}</span>
<span class="btnbox">
<button mat-icon-button class="edit" (click)="editOffice(item)"><mat-icon>create</mat-icon></button>
<button mat-icon-button class="deleted" (click)="deleteOffice(item)"><mat-icon style="color: #f44336;">delete</mat-icon></button>
</span>
</li>
</ul>
<span style="text-align: center;" *ngIf="OfficesList && OfficesList.length == 0">
暂无下属机关
</span>
</div>
</div>
<div *ngIf="isloading" style="position: absolute;width: 100%;height: 100%;background-color: rgba(125, 125, 125, 0.3);z-index: 999;left: 0;top: 0;text-align: center;">
<mat-spinner style="position: fixed;top: 40%;left: 50%;transform: translate(-40%,-50%);"></mat-spinner>
<p style="position: fixed;top:53%;left: 53%;transform: translate(-53%,-50%);">努力加载中...</p>
</div>
</div>

1025
src/app/ui/organization/organization.component.ts

File diff suppressed because it is too large Load Diff

2
src/app/ui/unit-information/addunitinfo.component.html

@ -1,5 +1,5 @@
<form (ngSubmit)="onSubmit(form.value)" #form="ngForm" class="example-container">
<span mat-dialog-title>新增单位信息</span>
<span mat-dialog-title>新增模板信息</span>
<mat-form-field>
<input matInput id="name" name="templatename" type='text'
required minlength="1"

2
src/assets/css/newStyle.css

@ -280,7 +280,7 @@ iframe { display: block; }
.text-linear { background: linear-gradient(to bottom, #fff, #C0C2C2); -webkit-background-clip: text; color: transparent; }
.panel, .box-wrap { max-height: 270px; max-width: 590px; background-image: url(../images/panel-bg.png); background-size: 100% 100%; display: flex; flex-direction: column; width: 100%; }
.panel, .box-wrap { max-width: 590px; background-image: url(../images/panel-bg.png); background-size: 100% 100%; display: flex; flex-direction: column; width: 100%; }
.panel.panel-lg, .box-wrap.panel-lg { width: 120%; }
.panel.panel02, .box-wrap.panel02 { background-image: url(../images/panel-bg02.png); }
.panel.panel03, .box-wrap.panel03 { background-image: url(../images/panel-bg03.png); max-height: 226px; }

19
src/assets/echarts/tianjin.js

File diff suppressed because one or more lines are too long

1
src/assets/echarts/tianjin.json

File diff suppressed because one or more lines are too long

20
src/index.html

@ -6,7 +6,6 @@
<title>数字化预案编制管理平台</title>
<base href="/">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- <meta name="viewport" content="initial-scale=0.5, maximum-scale=0.5, minimum-scale=0.5, user-scalable=no,uc-fitscreen=yes,viewport-fit=cover"> -->
<link rel="icon" type="image/x-icon" href="favicon.ico">
<link href='/assets/icon/material-icons.css' rel="stylesheet">
<link rel="stylesheet" href="/assets/css/photo-sphere-viewer.css" />
@ -17,22 +16,5 @@
<div id="viewerjs" style="display:none"></div>
</body>
<!-- <script type="text/javascript" src="./assets/kmap/kmap-service-main-kd.js"></script> -->
<script type="text/javascript">
window._AMapSecurityConfig = {
securityJsCode: '0afa0b144398727fad2ca06f5f7156b3'
}
</script>
<script
src="http://10.81.73.39:8000/webapi/maps?v=2.0&key=17bb9b27e49451cde8f2e6655b11ff1a&plugin=AMap.Driving,AMap.MouseTool,AMap.RangingTool"></script>
<script src="http://10.81.73.39:8000/webapi/ui/1.1/main.js"></script>
<!-- <script
src="https://webapi.amap.com/maps?v=2.0&key=17bb9b27e49451cde8f2e6655b11ff1a&plugin=AMap.Driving,AMap.MouseTool,AMap.RangingTool"></script>
<script src="https://webapi.amap.com/ui/1.1/main.js"></script> -->
<script src="/assets/html2canvas.js"></script>
<script type="text/javascript" src="/assets/wordexport/jquery.js"></script>
<script type="text/javascript" src="/assets/wordexport/FileSaver.js"></script>
<script type="text/javascript" src="/assets/wordexport/jquery.wordexport.js"></script>
<!-- <script src="/assets/html2canvas.js"></script> -->
</html>

23
tsconfig.json

@ -10,26 +10,19 @@
"module": "esnext",
"moduleResolution": "node",
"importHelpers": true,
"target": "es2015",//es6
"target": "es2015", //es6
"allowJs": true,
"typeRoots": [
"node_modules/@types"
],
"lib": [
"es2018",
"dom"
],
"typeRoots": ["node_modules/@types"],
"lib": ["es2018", "dom"],
"paths": {
"@src/*":["src/*"]
"@src/*": ["src/*"]
}
},
"angularCompilerOptions": {
"fullTemplateTypeCheck": true,
"strictInjectionParameters": true
"strictInjectionParameters": true,
"resolveJsonModule": true,
"esModuleInterop": true
},
"include": [
"src/**/*.d.ts",
"src/**/*.ts",
"typings.d.ts"
]
"include": ["src/**/*.d.ts", "src/**/*.ts", "typings.d.ts"]
}

943
yarn.lock

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save