diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index a034b60..e0c2b10 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -18,6 +18,7 @@ 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'; const routes: Routes = [ @@ -36,14 +37,12 @@ const routes: Routes = [ {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:'keyUnit/viewunitinfoplans', component:ViewUnitDetailsPlanComponent,canActivate: [AuthGuard],}, {path:'getNoMToken',component:MTokenK1Component, canActivate: [AuthGuard],}, //K1秘钥验证失败是跳转页面 - { path: 'planAudit/planpass', component: PlanPassComponent }, - { path: 'test', component: TestComponent }, - - + {path:'planAudit/planpass', component: PlanPassComponent , canActivate: [AuthGuard]}, + {path:'test', component: TestComponent }, + {path:'linksPlan', component: ExternalLinksPlanComponent }, ]; @NgModule({ diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 9ee49f3..3a08e63 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -48,7 +48,7 @@ export class AppComponent {     document.getElementsByTagName('head')[0].appendChild(meta); - } + } if(document.documentElement.clientWidth < 800){ addMeta('viewport','initial-scale=0.5, maximum-scale=0.5, minimum-scale=0.5, user-scalable=no,uc-fitscreen=yes,viewport-fit=cover') } diff --git a/src/app/app.module.ts b/src/app/app.module.ts index d09bb8d..673c961 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -23,13 +23,15 @@ 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'; @NgModule({ declarations: [ AppComponent, HomeComponent, MTokenK1Component, - TestComponent + TestComponent, + ExternalLinksPlanComponent ], imports: [ BrowserModule, @@ -46,7 +48,8 @@ import { TestComponent } from './test/test.component'; CountdownModule, GISManagementModule, DataCollectionModule, - MatProgressSpinnerModule + MatProgressSpinnerModule, + UiModule ], providers: [httpInterceptorProviders, CacheTokenService,TreeService], bootstrap: [AppComponent] diff --git a/src/app/data-collection/fire-force/fire-force.component.ts b/src/app/data-collection/fire-force/fire-force.component.ts index 23c3dbb..cc567f7 100644 --- a/src/app/data-collection/fire-force/fire-force.component.ts +++ b/src/app/data-collection/fire-force/fire-force.component.ts @@ -1151,7 +1151,7 @@ export class FireForceComponent implements OnInit { var stringjson=JSON.stringify(json) var wordArray = CryptoJS.enc.Utf8.parse(stringjson); var base64 = CryptoJS.enc.Base64.stringify(wordArray); - window.open(`http://172.26.166.38:18080/apps/editor/openPreview?data=${base64}`) + window.open(`http://121.5.10.84:80/apps/editor/openPreview?data=${base64}`) } if(suffix == 'mp4'){ const dialogRef = this.dialog.open(ViewDetails, {//调用open方法打开对话框并且携带参数过去 diff --git a/src/app/data-collection/linkage-forces/linkage-forces.component.ts b/src/app/data-collection/linkage-forces/linkage-forces.component.ts index 818359c..391c199 100644 --- a/src/app/data-collection/linkage-forces/linkage-forces.component.ts +++ b/src/app/data-collection/linkage-forces/linkage-forces.component.ts @@ -885,7 +885,7 @@ export class LinkageForcesComponent implements OnInit { var stringjson=JSON.stringify(json) var wordArray = CryptoJS.enc.Utf8.parse(stringjson); var base64 = CryptoJS.enc.Base64.stringify(wordArray); - window.open(`http://172.26.166.38:18080/apps/editor/openPreview?data=${base64}`) + window.open(`http://121.5.10.84:80/apps/editor/openPreview?data=${base64}`) } if(suffix == 'mp4'){ const dialogRef = this.dialog.open(ViewDetails2, {//调用open方法打开对话框并且携带参数过去 diff --git a/src/app/external-links-plan/external-links-plan.component.html b/src/app/external-links-plan/external-links-plan.component.html new file mode 100644 index 0000000..4b768c3 --- /dev/null +++ b/src/app/external-links-plan/external-links-plan.component.html @@ -0,0 +1,11 @@ + +
+ +
+
+
+ +
+
+ +
diff --git a/src/app/external-links-plan/external-links-plan.component.scss b/src/app/external-links-plan/external-links-plan.component.scss new file mode 100644 index 0000000..39aa468 --- /dev/null +++ b/src/app/external-links-plan/external-links-plan.component.scss @@ -0,0 +1,4 @@ +div{ + width: 100%; + height: 100%; +} \ No newline at end of file diff --git a/src/app/external-links-plan/external-links-plan.component.spec.ts b/src/app/external-links-plan/external-links-plan.component.spec.ts new file mode 100644 index 0000000..3726b46 --- /dev/null +++ b/src/app/external-links-plan/external-links-plan.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ExternalLinksPlanComponent } from './external-links-plan.component'; + +describe('ExternalLinksPlanComponent', () => { + let component: ExternalLinksPlanComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ ExternalLinksPlanComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(ExternalLinksPlanComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/external-links-plan/external-links-plan.component.ts b/src/app/external-links-plan/external-links-plan.component.ts new file mode 100644 index 0000000..1758f5d --- /dev/null +++ b/src/app/external-links-plan/external-links-plan.component.ts @@ -0,0 +1,136 @@ +import { HttpClient } from '@angular/common/http'; +import { Component, OnInit } from '@angular/core'; +import { ActivatedRoute } from '@angular/router'; +import { CacheTokenService } from '../http-interceptors/cache-token.service'; +import { Viewer } from 'photo-sphere-viewer'; +import { DomSanitizer } from '@angular/platform-browser'; + +declare var CryptoJS +@Component({ + selector: 'app-external-links-plan', + templateUrl: './external-links-plan.component.html', + styleUrls: ['./external-links-plan.component.scss'] +}) +export class ExternalLinksPlanComponent implements OnInit { + + constructor(private http:HttpClient,private token:CacheTokenService,public route: ActivatedRoute,private sanitizer: DomSanitizer) { } + planId:any//预案id + viewer//全景图对象 + fetchUrl//预案文件地址 + showType//预案类型 1:全景图 + planData//预案信息 + async ngOnInit(): Promise { + await this.login()//登录存储token + this.route.queryParams.subscribe(paramsData=>{ + this.planId = paramsData.planId + let planId = paramsData.planId + this.http.get(`/api/PlanComponents/${planId}`).subscribe((data:any)=>{ + console.log('单个预案详细信息',data) + this.planData = data + if(data.planType != 1 && data.planType != 2){ + this.fetchUrl = data.attachmentUrls[0] + var index = this.fetchUrl.indexOf("\/") + if(this.fetchUrl.substr(0,index) == 'psw'){ + this.showType = 1 + var obj = document.getElementById('viewer') + if(obj != null){ + obj.innerHTML='' + } + window.setTimeout(()=>{ + this.viewer = new Viewer({ + container: document.querySelector('#viewer'), + panorama:'/api/Objects/PlanPlatform/'+ this.fetchUrl, + }); + }) + }else{ + //毕生 + this.lookWord() + } + }else{ + // 二维三维预案 + this.handleData() + } + }) + }) + } + + async login(){ + await new Promise((resolve, reject) => { + this.http.post('/api/Account/SignIn',{ + name: 'zhuzhouyuanchakan', + password: '12345678'}).subscribe((data:any)=>{ + sessionStorage.setItem("level",data.level); + sessionStorage.setItem("token",data.token); + sessionStorage.setItem("refreshToken",data.refreshToken); + console.log('登录成功',data) + resolve(data) + this.token.startUp() + }) + }) + + } + iframeSrc//毕生服务器链接 + src//文件存储地址 + lookWord(){ + let docIdWordArray = CryptoJS.enc.Utf8.parse(`PlanPlatform/` + this.fetchUrl); + let docId = CryptoJS.enc.Base64.stringify(docIdWordArray); + let jwt = sessionStorage.getItem("token"); + let rawJwt = CryptoJS.enc.Base64.parse(jwt.split('.')[1]); + let identityJson = CryptoJS.enc.Utf8.stringify(rawJwt); + let identityJsonparse = JSON.parse(identityJson) + let filename:string + this.http.get(`/api/ObjectMetadata/PlanPlatform/${this.fetchUrl}`).subscribe((data:any)=>{ + filename = data.fileName + let json = { + doc: { + docId: docId, + title: filename, + //title: filename, + fetchUrl: `http://${location.host}/api/Objects/PlanPlatform/`+this.fetchUrl + }, + user: { + uid: identityJsonparse.sub, + nickName: identityJsonparse.name, + avatar: "", + privilege: [ + 'FILE_READ','FILE_DOWNLOAD', 'FILE_PRINT' + ], + }, + } + var stringjson = JSON.stringify(json) + var wordArray = CryptoJS.enc.Utf8.parse(stringjson); + var base64 = CryptoJS.enc.Base64.stringify(wordArray); + this.src = `http://121.5.10.84:80/apps/editor/openPreview?data=${base64}` + this.iframeSrc = this.sanitizer.bypassSecurityTrustResourceUrl(this.src); + this.showType = 0 + }) + } + + companyData//当前公司信息 + thirdPartyURL + threedUrl:any + handleData () { + let data = this.planData + if (this.planData.planMode == 2) { //预案planMode=2时, 跳查看页面组件 + + this.http.get(`/api/Plans/${data.companyId}`).subscribe((data:any)=>{ + console.log(data) + data && data.company? this.companyData = data.company : null + sessionStorage.setItem("buildingTypeId", this.companyData.buildingTypes.length? this.companyData.buildingTypes[0].id: undefined); + sessionStorage.setItem("companyId",data.companyId); + sessionStorage.setItem("planId",this.planId); + sessionStorage.setItem("editable",'0'); + sessionStorage.setItem("planName",this.planData.name) + this.showType = 3 + // this.threedUrl = this.sanitizer.bypassSecurityTrustResourceUrl(`/keyUnit/viewunitinfoplans?id=${data.companyId}`) + }) + } else if (this.planData.planMode == 3) { //预案planMode=3时, 第三方网址' + this.http.get(`/api/Plans/${data.companyId}`).subscribe((data:any)=>{ + data && data.company? this.companyData = data.company : null + this.threedUrl = this.sanitizer.bypassSecurityTrustResourceUrl(data.url) + this.showType = 2 + }) + + } + } +} diff --git a/src/app/pages/login/login.component.ts b/src/app/pages/login/login.component.ts index 413b796..e0e4405 100644 --- a/src/app/pages/login/login.component.ts +++ b/src/app/pages/login/login.component.ts @@ -4,9 +4,6 @@ import { Data } from '../../interface' import { Router,ActivatedRoute } from '@angular/router' import {CacheTokenService} from '../../http-interceptors/cache-token.service'//引入服务 import { MatSnackBar } from '@angular/material/snack-bar'; -import { ConstantPositionProperty } from 'cesium'; - - @Component({ selector: 'app-login', diff --git a/src/app/plan-audit/fireforce-audit/fireforce-audit.component.ts b/src/app/plan-audit/fireforce-audit/fireforce-audit.component.ts index 34e97cd..e691ce8 100644 --- a/src/app/plan-audit/fireforce-audit/fireforce-audit.component.ts +++ b/src/app/plan-audit/fireforce-audit/fireforce-audit.component.ts @@ -186,7 +186,7 @@ export class FireforceAuditComponent implements OnInit { var stringjson=JSON.stringify(json) var wordArray = CryptoJS.enc.Utf8.parse(stringjson); var base64 = CryptoJS.enc.Base64.stringify(wordArray); - window.open(`http://172.26.166.38:18080/apps/editor/openPreview?data=${base64}`) + window.open(`http://121.5.10.84:80/apps/editor/openPreview?data=${base64}`) } if(suffix == 'mp4'){ const dialogRef = this.dialog.open(ViewDetailsComponent, {//调用open方法打开对话框并且携带参数过去 diff --git a/src/app/plan-audit/linkageforces-audit/linkageforces-audit.component.ts b/src/app/plan-audit/linkageforces-audit/linkageforces-audit.component.ts index 0b3e74e..dc9b47e 100644 --- a/src/app/plan-audit/linkageforces-audit/linkageforces-audit.component.ts +++ b/src/app/plan-audit/linkageforces-audit/linkageforces-audit.component.ts @@ -196,7 +196,7 @@ export class LinkageforcesAuditComponent implements OnInit { var stringjson=JSON.stringify(json) var wordArray = CryptoJS.enc.Utf8.parse(stringjson); var base64 = CryptoJS.enc.Base64.stringify(wordArray); - window.open(`http://172.26.166.38:18080/apps/editor/openPreview?data=${base64}`) + window.open(`http://121.5.10.84:80/apps/editor/openPreview?data=${base64}`) } if(suffix == 'mp4'){ const dialogRef = this.dialog.open(ViewDetailsComponent, {//调用open方法打开对话框并且携带参数过去 diff --git a/src/app/plan-audit/plan-record/plan-record.component.ts b/src/app/plan-audit/plan-record/plan-record.component.ts index 3edba85..fb5d6e4 100644 --- a/src/app/plan-audit/plan-record/plan-record.component.ts +++ b/src/app/plan-audit/plan-record/plan-record.component.ts @@ -260,9 +260,9 @@ export class PlanRecordComponent implements OnInit { var stringjson=JSON.stringify(json) var wordArray = CryptoJS.enc.Utf8.parse(stringjson); var base64 = CryptoJS.enc.Base64.stringify(wordArray); - this.src=`http://172.26.166.38:18080/apps/editor/openPreview?data=${base64}` + this.src=`http://121.5.10.84:80/apps/editor/openPreview?data=${base64}` this.iframeSrc=this.sanitizer.bypassSecurityTrustResourceUrl(this.src); - //window.open(`http://172.26.166.38:18080/apps/editor/openPreview?data=${base64}`) + //window.open(`http://121.5.10.84:80/apps/editor/openPreview?data=${base64}`) }) } //查看按钮跳转 diff --git a/src/app/plan-audit/wait-examineer/wait-examineer.component.ts b/src/app/plan-audit/wait-examineer/wait-examineer.component.ts index 0f6b892..a13eeda 100644 --- a/src/app/plan-audit/wait-examineer/wait-examineer.component.ts +++ b/src/app/plan-audit/wait-examineer/wait-examineer.component.ts @@ -289,9 +289,9 @@ export class WaitExamineerComponent implements OnInit { var stringjson=JSON.stringify(json) var wordArray = CryptoJS.enc.Utf8.parse(stringjson); var base64 = CryptoJS.enc.Base64.stringify(wordArray); - this.src=`http://172.26.166.38:18080/apps/editor/openPreview?data=${base64}` + this.src=`http://121.5.10.84:80/apps/editor/openPreview?data=${base64}` this.iframeSrc=this.sanitizer.bypassSecurityTrustResourceUrl(this.src); - //window.open(`http://172.26.166.38:18080/apps/editor/openPreview?data=${base64}`) + //window.open(`http://121.5.10.84:80/apps/editor/openPreview?data=${base64}`) }) } //查看按钮跳转 diff --git a/src/app/plan-management/entry-plan-look/entry-plan-look.component.ts b/src/app/plan-management/entry-plan-look/entry-plan-look.component.ts index f038289..d2802ab 100644 --- a/src/app/plan-management/entry-plan-look/entry-plan-look.component.ts +++ b/src/app/plan-management/entry-plan-look/entry-plan-look.component.ts @@ -146,7 +146,7 @@ export class EntryPlanLookComponent implements OnInit { var stringjson=JSON.stringify(json) var wordArray = CryptoJS.enc.Utf8.parse(stringjson); var base64 = CryptoJS.enc.Base64.stringify(wordArray); - window.open(`http://172.26.166.38:18080/apps/editor/openPreview?data=${base64}`) + window.open(`http://121.5.10.84:80/apps/editor/openPreview?data=${base64}`) }) } } diff --git a/src/app/plan-management/meet-plan/meet-plan.component.ts b/src/app/plan-management/meet-plan/meet-plan.component.ts index d03c12f..8dab35f 100644 --- a/src/app/plan-management/meet-plan/meet-plan.component.ts +++ b/src/app/plan-management/meet-plan/meet-plan.component.ts @@ -248,7 +248,7 @@ export class MeetPlanComponent implements OnInit { var stringjson=JSON.stringify(json) var wordArray = CryptoJS.enc.Utf8.parse(stringjson); var base64 = CryptoJS.enc.Base64.stringify(wordArray); - window.open(`http://172.26.166.38:18080/apps/editor/openPreview?data=${base64}`) + window.open(`http://121.5.10.84:80/apps/editor/openPreview?data=${base64}`) }) } diff --git a/src/app/plan-management/onetwo-entry-plan/onetwo-entry-plan.component.ts b/src/app/plan-management/onetwo-entry-plan/onetwo-entry-plan.component.ts index da06b6c..c5ed166 100644 --- a/src/app/plan-management/onetwo-entry-plan/onetwo-entry-plan.component.ts +++ b/src/app/plan-management/onetwo-entry-plan/onetwo-entry-plan.component.ts @@ -257,7 +257,7 @@ export class OnetwoEntryPlanComponent implements OnInit { var stringjson=JSON.stringify(json) var wordArray = CryptoJS.enc.Utf8.parse(stringjson); var base64 = CryptoJS.enc.Base64.stringify(wordArray); - window.open(`http://172.26.166.38:18080/apps/editor/openPreview?data=${base64}`) + window.open(`http://121.5.10.84:80/apps/editor/openPreview?data=${base64}`) }) diff --git a/src/app/plan-management/open-plan/open-plan.component.ts b/src/app/plan-management/open-plan/open-plan.component.ts index 3e4fe9f..2182d1a 100644 --- a/src/app/plan-management/open-plan/open-plan.component.ts +++ b/src/app/plan-management/open-plan/open-plan.component.ts @@ -236,7 +236,7 @@ export class OpenPlanComponent implements OnInit { var stringjson=JSON.stringify(json) var wordArray = CryptoJS.enc.Utf8.parse(stringjson); var base64 = CryptoJS.enc.Base64.stringify(wordArray); - window.open(`http://172.26.166.38:18080/apps/editor/openPreview?data=${base64}`) + window.open(`http://121.5.10.84:80/apps/editor/openPreview?data=${base64}`) }) } } diff --git a/src/app/plan-management/pass-plan/pass-plan.component.ts b/src/app/plan-management/pass-plan/pass-plan.component.ts index b77a7d3..86e1bd5 100644 --- a/src/app/plan-management/pass-plan/pass-plan.component.ts +++ b/src/app/plan-management/pass-plan/pass-plan.component.ts @@ -383,7 +383,7 @@ export class PassPlanComponent implements OnInit { var stringjson=JSON.stringify(json) var wordArray = CryptoJS.enc.Utf8.parse(stringjson); var base64 = CryptoJS.enc.Base64.stringify(wordArray); - window.open(`http://172.26.166.38:18080/apps/editor/openPreview?data=${base64}`) + window.open(`http://121.5.10.84:80/apps/editor/openPreview?data=${base64}`) }) } } diff --git a/src/app/plan-management/plan-management.module.ts b/src/app/plan-management/plan-management.module.ts index 812756a..04b596f 100644 --- a/src/app/plan-management/plan-management.module.ts +++ b/src/app/plan-management/plan-management.module.ts @@ -119,6 +119,6 @@ import { ReinforcePlanComponent } from './reinforce-plan/reinforce-plan.componen MatTooltipModule, MatTreeModule ], - exports:[PlanType, AuditSatus, PlanLevel] + exports:[PlanType, AuditSatus, PlanLevel, state] }) export class PlanManagementModule { } diff --git a/src/app/plan-management/type-plan/type-plan.component.ts b/src/app/plan-management/type-plan/type-plan.component.ts index f0512db..034b5de 100644 --- a/src/app/plan-management/type-plan/type-plan.component.ts +++ b/src/app/plan-management/type-plan/type-plan.component.ts @@ -238,7 +238,7 @@ export class TypePlanComponent implements OnInit { var stringjson=JSON.stringify(json) var wordArray = CryptoJS.enc.Utf8.parse(stringjson); var base64 = CryptoJS.enc.Base64.stringify(wordArray); - window.open(`http://172.26.166.38:18080/apps/editor/openPreview?data=${base64}`) + window.open(`http://121.5.10.84:80/apps/editor/openPreview?data=${base64}`) }) diff --git a/src/app/statistic-analysis/all-plan/all-plan.component.ts b/src/app/statistic-analysis/all-plan/all-plan.component.ts index 57adda8..a20df2f 100644 --- a/src/app/statistic-analysis/all-plan/all-plan.component.ts +++ b/src/app/statistic-analysis/all-plan/all-plan.component.ts @@ -122,7 +122,7 @@ export class AllPlanComponent implements OnInit { var stringjson=JSON.stringify(json) var wordArray = CryptoJS.enc.Utf8.parse(stringjson); var base64 = CryptoJS.enc.Base64.stringify(wordArray); - window.open(`http://172.26.166.38:18080/apps/editor/openPreview?data=${base64}`) + window.open(`http://121.5.10.84:80/apps/editor/openPreview?data=${base64}`) }) } } diff --git a/src/app/statistic-analysis/plan-analysis-by-synthesis/PsvShow.html b/src/app/statistic-analysis/plan-analysis-by-synthesis/PsvShow.html new file mode 100644 index 0000000..66cf21a --- /dev/null +++ b/src/app/statistic-analysis/plan-analysis-by-synthesis/PsvShow.html @@ -0,0 +1,2 @@ + +
\ No newline at end of file diff --git a/src/app/statistic-analysis/plan-analysis-by-synthesis/plan-analysis-by-synthesis.component.html b/src/app/statistic-analysis/plan-analysis-by-synthesis/plan-analysis-by-synthesis.component.html new file mode 100644 index 0000000..0de004f --- /dev/null +++ b/src/app/statistic-analysis/plan-analysis-by-synthesis/plan-analysis-by-synthesis.component.html @@ -0,0 +1,184 @@ + +
+
+
+
+ +
+ + + + +
+ +
+ + + + + 包含下级 + 更多筛选条件 + 收起 +
+
clear
+ + + +
  • {{node.name}}
  • +
    + + +
  • {{node.name}}
  • +
    +
    +
    +
    +
    + + +
    +
    + + + + 文本预案 + 二维预案 + 三维预案 + 其他预案 + + + +
    +
    + + + + + {{unit.name}} + + + + 更多筛选条件 + 收起 +
    +
    + + +
    +
    + + + + {{item.name}} + + + 包含下级 +
    + +
    + + + + 应急预案(国家级) + 应急预案(市级) + 类型预案 + Ⅰ级预案 + Ⅱ级预案 + Ⅲ级预案 + Ⅳ级预案 + Ⅴ级预案 + + +
    + +
    + + + + + + 🠊 + + + +
    + +
    + +
    +
    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    预案名称{{element.name}}添加人{{element.creatorName}}预案级别{{element.planCategory==1?'Ⅰ级预案':element.planCategory==2?'Ⅱ级预案': + element.planCategory==3?'Ⅲ级预案':element.planCategory==4?'Ⅳ级预案':element.planCategory==5?'Ⅴ级预案':element.planCategory==8?'类型预案':'应急预案'}}审核时间{{element.creationTime | date:'yyyy-MM-dd'}}预案类型{{element.planType | plantype}}审核状态{{element.auditStatus | auditsatus}}是否公开{{element.openRange}}编制级别{{element.planLevel | planlevel}}操作 + + {{url=='1'?'审核预案':'查看预案'}} + +
    + + + +
    +
    +
    + diff --git a/src/app/statistic-analysis/plan-analysis-by-synthesis/plan-analysis-by-synthesis.component.scss b/src/app/statistic-analysis/plan-analysis-by-synthesis/plan-analysis-by-synthesis.component.scss new file mode 100644 index 0000000..6b834aa --- /dev/null +++ b/src/app/statistic-analysis/plan-analysis-by-synthesis/plan-analysis-by-synthesis.component.scss @@ -0,0 +1,233 @@ +.header { + width: 100%; + padding: 12px 10px; + box-sizing: border-box; + .queryBox { + box-sizing: border-box; + padding: 5px 0 0 5px; + // margin-left: 50px; + display: flex; + flex-direction: row; + flex-wrap: wrap; + align-items:center; + // justify-content:center; + .queryField { + //margin: 0 10px; + input { + width: 180px; + height: 22px; + line-height: 22px; + border-radius: 3px; + } + @media screen and (min-device-width:1400px){ + margin: 3px 20px; + } + @media screen and (max-device-width:1400px)and (min-device-width:1200px){ + margin: 3px 10px; + mat-form-field{ + width: 180px; + } + } + @media screen and (max-device-width:1200px){ + margin: 3px 0 3px 10px; + mat-form-field{ + width: 120px; + } + } + + } + + + } //queryBox + .butclass{ + button{ + width: 80px;height: 36px; + font-size: 16px; + } +} + .ordiv{ + position: relative; + .organizationbox{ + width:450px; + height: 200px; + background: white; + position: absolute; + top: 48px; + left: 77px; + z-index: 999; + border: 1px solid grey; + overflow-y: auto; + li{ + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } + mat-tree-node{ + cursor: pointer; + white-space:pre; + } + mat-tree-node:hover{ + background: rgba(225, 225, 225, 0.8); + } + .closediv{ + z-index: 100; + position: absolute; + right: 0; + top: 0; + width: 30px; + height: 30px; + cursor: pointer; + line-height: 30px; + text-align: center; + } + .closediv:hover{ + background:rgba(225, 225, 225, 0.8); + } + } + + } + } + .body{ + .buttonbox{ + padding-left: 50px; + button{ + margin:0 10px + } + } + .tablebox{ + table{ + width: 100%; + // margin-left: 2%; + margin-top: 15px; + } + mat-paginator{ + width:100%; + // margin-left: 2%; + // margin-top: 30px; + } + } + } + .mat-header-cell{ + text-align: center; +} +.mat-cell{ + text-align: center; + +} + +//完整度 +.integrityDiv{ + width: 180px; + height: 30px; + background-color: #e2e7ee; + // background-image: linear-gradient(to right, #e2e7ee ,#FF4500, #FF8C00,#32cd32); + margin: 0 auto; + position: relative; + .integrityNum{ + position: absolute; + left: 50%; + top: 50%; + transform: translate(-50%, -50%); + color: black; + font-weight: 800; + font-size: 15px; + cursor: default; + } + .integrityColorDiv{ + height: 100%; + } + .integrityDetails{ + position: absolute; + display: none; + width: 350px; + height:280px; + border: 1px solid rgba(0, 0, 0, 0.22); + background-color: white; + .integrityDetailsTop{ + width: 100%; + height: 23px; + line-height:23px; + border-bottom: 1px solid rgba(0, 0, 0, 0.22); + margin-bottom: 1px; + font-size: 14px; + span{ + display: inline-block; + text-align: center; + font-weight: 800; + } + .span1{ + width: 25%; + } + .span2{ + width: 60%; + } + .span3{ + width: 15%; + } + } + .integrityDetailsBody{ + ul{ + li{ + width: 100%; + height: 23px; + line-height: 23px; + margin: 3px 0; + div{ + float: left; + font-size: 13px; + } + .name{ + width: 25%; + height: 100%; + } + .colorDiv{ + width: 60%; + height: 100%; + position: relative; + .colorDivBac{ + width: 90%; + height: 100%; + position: absolute; + left: 50%; + top: 50%; + transform: translate(-50%,-50%); + background-color: #dfe5ec; + border-radius: 5px; + .colorDivCon{ + border-radius: 5px; + height: 100%; + background-color: #2398f1; + } + } + span{ + position: absolute; + left: 50%; + top: 50%; + transform: translate(-50%,-50%); + // color: white; + font-weight: 600; + } + } + .number{ + width: 15%; + height: 100%; + } + } + } + + } + } + .bottomposition{ + top: 2px; + left: 188px; + } + .topposition{ + top: -252px; + left: 188px; + } +} +.integrityDiv:hover{ + .integrityDetails{ + display: block; + } +} \ No newline at end of file diff --git a/src/app/statistic-analysis/plan-analysis-by-synthesis/plan-analysis-by-synthesis.component.spec.ts b/src/app/statistic-analysis/plan-analysis-by-synthesis/plan-analysis-by-synthesis.component.spec.ts new file mode 100644 index 0000000..110ac2d --- /dev/null +++ b/src/app/statistic-analysis/plan-analysis-by-synthesis/plan-analysis-by-synthesis.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { PlanAnalysisBySynthesisComponent } from './plan-analysis-by-synthesis.component'; + +describe('PlanAnalysisBySynthesisComponent', () => { + let component: PlanAnalysisBySynthesisComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ PlanAnalysisBySynthesisComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(PlanAnalysisBySynthesisComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/statistic-analysis/plan-analysis-by-synthesis/plan-analysis-by-synthesis.component.ts b/src/app/statistic-analysis/plan-analysis-by-synthesis/plan-analysis-by-synthesis.component.ts new file mode 100644 index 0000000..9fb2f69 --- /dev/null +++ b/src/app/statistic-analysis/plan-analysis-by-synthesis/plan-analysis-by-synthesis.component.ts @@ -0,0 +1,504 @@ +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'] +}) +export class PlanAnalysisBySynthesisComponent implements OnInit { + + 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 + return { + expandable: !!node.children && node.children.length > 0, + name: node.name, + level: level, + id: node.id, + parentId: node.parentId, + children: node.children + }; + } + treeControl = new FlatTreeControl(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; + //分页 + @ViewChild(MatPaginator, {static: true}) + pageEvent: PageEvent; + paginator: MatPaginator; + length:any; //共多少条数据 + pageSize:any; //每页条数 + pageSizeOptions: number[] = [10] //设置每页条数 + PageNumber:any; //第几页 + + displayedColumns: string[] = ['planname', 'addpeople','level','addtime','plantype','auditStatus','openRange','projectlevel','operation']; + allorganizations:any //所有组织机构 + allunittype:any //所有单位类型 + tabledataSource:any //表格数据 + url + + preparelevels:any + ngOnInit(): void { + if(window.matchMedia("(max-width: 1400px)").matches){ + 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.getunitdata(); + this.getOrganizations(); + this.getUnittype(); + this.getAllPlanInfo(); + let level = sessionStorage.getItem("level"); + if(level == "0"){//如果是总队 + this.preparelevels = [ + {name:"总队",value:"1"}, + {name:"支队",value:"2"}, + {name:"大队",value:"4"}, + {name:"中队",value:"8"} + ] + } + if(level == "1"){//如果是支队 + this.preparelevels = [ + {name:"支队",value:"2"}, + {name:"大队",value:"4"}, + {name:"中队",value:"8"} + ] + } + if(level == "2"){//如果是大队 + this.preparelevels = [ + {name:"大队",value:"4"}, + {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) + //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" + pcInfo(){ + this.pcMore=!this.pcMore + this.pcput=!this.pcput + } + padInfo(){ + this.padMore=!this.padMore + this.padput=!this.padput + } + + allPlanInfo:any //存储所有预案信息 + //获得所有预案信息 + getAllPlanInfo(){ + let reservePlanType + this.reservePlanType ? reservePlanType = JSON.parse(JSON.stringify(this.reservePlanType)) : reservePlanType = '' + if(this.reservePlanType && this.reservePlanType.length != 0){ + 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 || '', + CreationTimeRangeStart:this.addtime||'', + CreationTimeRangeEnd: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 + }) + } + + colorRgb(sColor){ + var reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/; + var sColor = sColor.toLowerCase(); + if (sColor && reg.test(sColor)) { + if (sColor.length === 4) { + var sColorNew = "#"; + for (var i = 1; i < 4; i += 1) { + sColorNew += sColor.slice(i, i + 1).concat(sColor.slice(i, i + 1)); + } + sColor = sColorNew; + } + //处理六位的颜色值 + var sColorChange = []; + for (var i = 1; i < 7; i += 2) { + sColorChange.push(parseInt("0x" + sColor.slice(i, i + 2))); + } + return sColorChange; + } else { + return sColor; + } + } + colorHex(rgb){ + var _this = rgb; + var reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/; + if (/^(rgb|RGB)/.test(_this)) { + var aColor = _this.replace(/(?:(|)|rgb|RGB)*/g, "").split(","); + 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位 + if (hex === "0") { + hex += hex; + } + strHex += hex; + } + if (strHex.length !== 7) { + strHex = _this; + } + return strHex; + } else if (reg.test(_this)) { + var aNum = _this.replace(/#/, "").split(""); + if (aNum.length === 6) { + return _this; + } else if (aNum.length === 3) { + var numHex = "#"; + for (var i = 0; i < aNum.length; i += 1) { + numHex += (aNum[i] + aNum[i]); + } + return numHex; + } + } else { + return _this; + } + } + + gradientColor(startColor, endColor, step) { + let _this = this + let startRGB = _this.colorRgb(startColor);//转换为rgb数组模式 + let startR = startRGB[0]; + let startG = startRGB[1]; + let startB = startRGB[2]; + + let endRGB = _this.colorRgb(endColor); + let endR = endRGB[0]; + let endG = endRGB[1]; + let endB = endRGB[2]; + + 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)) + ')'); + colorArr.push(hex); + } + return colorArr; +} + integrity(width){ + let _this = this + + let style:any = {} + style.width = width +'%'; + if(width < 30){ + let colorArr = this.gradientColor('#D50000', '#E53935', 30); + for(let i = 0; i < 30; i++){ + if( i == width){ + style.background = colorArr[i] + } + } + } + if(width >= 30 && width < 60){ + let colorArr = this.gradientColor('#FF9800', '#E65100', 30); + for(let i = 30; i < 60; i++){ + if( i == width){ + style.background = colorArr[i-30] + } + } + } + if(width >= 60){ + let colorArr = this.gradientColor('#81C784', '#2E7D32', 41); + for(let i = 60; i <= 100; i++){ + if( i == width){ + style.background = colorArr[i-60] + } + } + } + return style + } + integrityDetails(width,zong){ + let style:any = {} + style.width = (width/zong)*100 +'%'; + return style + } + + + + //得到当前单位信息 + getunitdata(){ + 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字段 + //得到当前单位所在组织机构的tree型数据 + getpresentOrganization(){ + this.newallorganizations = this.allorganizations + this.newallorganizations.forEach(item => { + item.children = [] + this.newallorganizations.forEach(element => { + if(element.parentId == item.id){ + 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); + } + } + ) + + } + //获得所有组织机构 + getOrganizations(){ + 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 + } + ) + } + //查看单位信息 + 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'); + } + + //跳转查看预案页面 审核通过预案 + routerTo(e){ + // 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'){ + const dialogRef = this.dialog.open(GkPsViewer2, { + width: '1500px', + height:'800px', + data: e.attachmentUrls[0] + }); + } + else /* if(e.attachmentUrls[0].substr(e.attachmentUrls[0].length-4,e.attachmentUrls[0].length-1)=='docx'||e.attachmentUrls[0].substr(e.attachmentUrls[0].length-3,e.attachmentUrls[0].length)=='pdf' + ||e.attachmentUrls[0].substr(e.attachmentUrls[0].length-3,e.attachmentUrls[0].length)=='doc'||e.attachmentUrls[0].substr(e.attachmentUrls[0].length-3,e.attachmentUrls[0].length)=='DOC' + ||e.attachmentUrls[0].substr(e.attachmentUrls[0].length-3,e.attachmentUrls[0].length)=='txt'||e.attachmentUrls[0].substr(e.attachmentUrls[0].length-3,e.attachmentUrls[0].length)=='JPG') */{ + let filename:string + let fetchUrl = e.attachmentUrls[0] + let docIdWordArray = CryptoJS.enc.Utf8.parse(`PlanPlatform/` + fetchUrl); + let docId = CryptoJS.enc.Base64.stringify(docIdWordArray); + let jwt = sessionStorage.getItem("token"); + let rawJwt = CryptoJS.enc.Base64.parse(jwt.split('.')[1]); + let identityJson = CryptoJS.enc.Utf8.stringify(rawJwt); + let identityJsonparse=JSON.parse(identityJson) + this.http.get(`/api/ObjectMetadata/PlanPlatform/${fetchUrl}`).subscribe((data:any)=>{ + filename=data.fileName + let json={ + doc: { + docId: docId, + title: filename, + fetchUrl: `http://39.106.78.171:8000/api/Objects/PlanPlatform/`+fetchUrl, + }, + user: { + uid: identityJsonparse.sub, + nickName: identityJsonparse.name, + avatar: "", + privilege: [ + 'FILE_READ','FILE_DOWNLOAD', 'FILE_PRINT' + ], + }, + } + var stringjson=JSON.stringify(json) + var wordArray = CryptoJS.enc.Utf8.parse(stringjson); + var base64 = CryptoJS.enc.Base64.stringify(wordArray); + window.open(`http://121.5.10.84:80/apps/editor/openPreview?data=${base64}`) + }) + } + } + + 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") + window.open(`/keyUnit/viewunitinfoplan?id=${companyId}`); + } + 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=>{ + const config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + this.snackBar.open('预案已公开','确定',config); + }) + } + + //预案取消公开 + closeReserve (e) { + this.http.put(`/api/PlanAudits/${e.id}/Unpublic`,[]).subscribe(data=>{ + const config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + this.snackBar.open('预案已取消公开','确定',config); + }) + } + + //分页事件 + chagePage(e){ + this.PageNumber = e.pageIndex+1 + this.getAllPlanInfo(); + } + + //辖区中队div是否显示 + isorganizationbox:boolean = false + //点击辖区中队树,将选择的辖区中队添加到变量 + add(node) { + this.isorganizationbox = false + this.js = node.name + this.jsId = node.id + } + //关闭辖区中队隐藏框 + closeorganizationbox() { + this.isorganizationbox = false + } + //打开辖区中队隐藏框 + openorganizationbox() { + this.isorganizationbox = true + } + //关闭出现的组织机构div + closediv(){ + this.isorganizationbox = false + } + //查询 + onSubmit (e) { + 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=[]//预案级别 + //重置 + reset(){ + 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.getAllPlanInfo(); + } +} + +@Component({ + 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,@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, + + }); + } +} \ No newline at end of file diff --git a/src/app/statistic-analysis/statistic-analysis-routing.module.ts b/src/app/statistic-analysis/statistic-analysis-routing.module.ts index 9d0808c..a94bbc3 100644 --- a/src/app/statistic-analysis/statistic-analysis-routing.module.ts +++ b/src/app/statistic-analysis/statistic-analysis-routing.module.ts @@ -35,7 +35,7 @@ import { HomeComponent } from './home/home.component'; import { yueDateComponent }from './scheduled-updates/scheduled-updates.component' import { CompangInfoComponent }from './compang-info/compang-info.component' import { AllPlanComponent } from './all-plan/all-plan.component' -import { from } from 'rxjs'; +import { PlanAnalysisBySynthesisComponent } from './plan-analysis-by-synthesis/plan-analysis-by-synthesis.component'; const routes: Routes = [ @@ -70,7 +70,8 @@ const routes: Routes = [ { path: 'scheduledUpdates/PublicEcharts', component: publicEchartsComponent}, { path: 'home', component: HomeComponent}, { path: 'CompangInfo',component:CompangInfoComponent}, - { path:'AllPlan',component:AllPlanComponent} + { path:'AllPlan',component:AllPlanComponent}, + { path:'PlanAnalysisBySynthesis',component:PlanAnalysisBySynthesisComponent}, ]; @NgModule({ diff --git a/src/app/statistic-analysis/statistic-analysis.module.ts b/src/app/statistic-analysis/statistic-analysis.module.ts index 016fdf6..3cbf1c0 100644 --- a/src/app/statistic-analysis/statistic-analysis.module.ts +++ b/src/app/statistic-analysis/statistic-analysis.module.ts @@ -70,12 +70,12 @@ import { PageThereYearComponent } from './state/page-there-year/page-there-year. import { DeleteTwoNewaddComponent } from './deleteUnit/delete-two-newadd/delete-two-newadd.component'; import { CompangInfoComponent } from './compang-info/compang-info.component'; import { AllPlanComponent } from './all-plan/all-plan.component'; -import { PsViewer }from './all-plan/all-plan.component' - - +import { PsViewer }from './all-plan/all-plan.component'; +import { GkPsViewer2, PlanAnalysisBySynthesisComponent } from './plan-analysis-by-synthesis/plan-analysis-by-synthesis.component' +import { PlanManagementModule } from '../plan-management/plan-management.module'; @NgModule({ - declarations: [PageOneComponent, PageTwoTimeComponent, PageTwoNameComponent, PageZhongDuiDetailsComponent,echartsComponent, DeleteOneComponent, DeleteTwoComponent, DeleteThereComponent, DeleteFourComponent, BuildingTypeOneComponent, ScheduledUpdatesComponent,publicEchartsComponent,verifiedComponent,notVerifiedComponent,detailedInformationComponent,moreTableComponent,yueDateComponent,yuebuildingDateComponent,indexConditionComponent, BuildingTypeTwoForwardComponent, BuildingTypeTwoReverseComponent, BuildingTypeThreeDetailsComponent, AddUnitOneComponent, AddUnitTwoTypeStatisticsComponent, AddUnitTwoTypeDetailsComponent, AddUnitTwoTimeComponent,AddUnitThreeLineDetailsComponent,AddUnitThreeBarDetailsComponent, HomeComponent, DeleteThereLineDetailsComponent, PageThereComponent, PageThereYearComponent, DeleteTwoNewaddComponent, CompangInfoComponent, AllPlanComponent,PsViewer], + declarations: [GkPsViewer2,PageOneComponent, PageTwoTimeComponent, PageTwoNameComponent, PageZhongDuiDetailsComponent,echartsComponent, DeleteOneComponent, DeleteTwoComponent, DeleteThereComponent, DeleteFourComponent, BuildingTypeOneComponent, ScheduledUpdatesComponent,publicEchartsComponent,verifiedComponent,notVerifiedComponent,detailedInformationComponent,moreTableComponent,yueDateComponent,yuebuildingDateComponent,indexConditionComponent, BuildingTypeTwoForwardComponent, BuildingTypeTwoReverseComponent, BuildingTypeThreeDetailsComponent, AddUnitOneComponent, AddUnitTwoTypeStatisticsComponent, AddUnitTwoTypeDetailsComponent, AddUnitTwoTimeComponent,AddUnitThreeLineDetailsComponent,AddUnitThreeBarDetailsComponent, HomeComponent, DeleteThereLineDetailsComponent, PageThereComponent, PageThereYearComponent, DeleteTwoNewaddComponent, CompangInfoComponent, AllPlanComponent,PsViewer, PlanAnalysisBySynthesisComponent], imports: [ CommonModule, StatisticAnalysisRoutingModule, @@ -123,7 +123,8 @@ import { PsViewer }from './all-plan/all-plan.component' MatTabsModule, MatToolbarModule, MatTooltipModule, - MatTreeModule + MatTreeModule, + PlanManagementModule ] }) export class StatisticAnalysisModule { } diff --git a/src/app/ui/collection-tools-building/collection-tools.component.html b/src/app/ui/collection-tools-building/collection-tools.component.html index cb25215..d979ced 100644 --- a/src/app/ui/collection-tools-building/collection-tools.component.html +++ b/src/app/ui/collection-tools-building/collection-tools.component.html @@ -24,7 +24,7 @@ 复制library_books @@ -35,7 +35,11 @@ 重置缩放 - + + image + 导出图片 + + diff --git a/src/app/ui/collection-tools-plan/collection-tools.component.html b/src/app/ui/collection-tools-plan/collection-tools.component.html index b9f8423..4efa401 100644 --- a/src/app/ui/collection-tools-plan/collection-tools.component.html +++ b/src/app/ui/collection-tools-plan/collection-tools.component.html @@ -30,7 +30,10 @@ 重置缩放 - + + image + 导出图片 + diff --git a/src/app/ui/collection-tools/collection-tools.component.html b/src/app/ui/collection-tools/collection-tools.component.html index 313e55e..e7ad822 100644 --- a/src/app/ui/collection-tools/collection-tools.component.html +++ b/src/app/ui/collection-tools/collection-tools.component.html @@ -37,6 +37,10 @@ 重置缩放 + + image + 导出图片 +
    天气 diff --git a/src/app/ui/collection-tools/collection-tools.component.ts b/src/app/ui/collection-tools/collection-tools.component.ts index e044107..df9e105 100644 --- a/src/app/ui/collection-tools/collection-tools.component.ts +++ b/src/app/ui/collection-tools/collection-tools.component.ts @@ -170,7 +170,10 @@ export class CollectionToolsComponent implements OnInit { }); } - + //截图 + takeScreenshot() { + this.canvas.takeScreenshot(); + } pattern:boolean = false//默认为基本信息编辑 //基本信息编辑模式 baseInfo(){ diff --git a/src/index.html b/src/index.html index 3e12f4c..0e6018c 100644 --- a/src/index.html +++ b/src/index.html @@ -22,9 +22,9 @@ - - - + + +