Browse Source

[完善]完善消防力量审核页面

zhuzhou
邵佳豪 4 years ago
parent
commit
8930ee8a87
  1. 2
      src/app/plan-audit/fireforce-audit/fireforce-audit.component.scss
  2. 30
      src/app/plan-audit/fireforce-audit/fireforce-audit.component.ts
  3. 5
      src/app/plan-audit/plan-audit.module.ts
  4. 1
      src/app/plan-audit/view-details/view-details.component.html
  5. 0
      src/app/plan-audit/view-details/view-details.component.scss
  6. 25
      src/app/plan-audit/view-details/view-details.component.spec.ts
  7. 24
      src/app/plan-audit/view-details/view-details.component.ts
  8. 4
      src/app/plan-audit/wait-examineer/wait-examineer.component.html
  9. 1
      src/app/ui/collection-tools/collection-tools.component.ts
  10. 8
      src/app/ui/collection-tools/save.ts

2
src/app/plan-audit/fireforce-audit/fireforce-audit.component.scss

@ -20,7 +20,7 @@
} }
.detailsbox{ .detailsbox{
width: 100%; width: 100%;
height:500px; flex: 1;
position: relative; position: relative;
.tabsbox{ .tabsbox{
width: 100%; width: 100%;

30
src/app/plan-audit/fireforce-audit/fireforce-audit.component.ts

@ -1,7 +1,9 @@
import { HttpClient } from '@angular/common/http'; import { HttpClient } from '@angular/common/http';
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { MatDialog } from '@angular/material/dialog';
import { MatSnackBar } from '@angular/material/snack-bar'; import { MatSnackBar } from '@angular/material/snack-bar';
import Viewer from 'viewerjs' import Viewer from 'viewerjs'
import { ViewDetailsComponent } from '../view-details/view-details.component';
declare var CryptoJS declare var CryptoJS
declare var AMap: any; declare var AMap: any;
@Component({ @Component({
@ -11,7 +13,7 @@ declare var AMap: any;
}) })
export class FireforceAuditComponent implements OnInit { export class FireforceAuditComponent implements OnInit {
constructor(public snackBar: MatSnackBar,private http:HttpClient) { } constructor(public snackBar: MatSnackBar,private http:HttpClient,public dialog: MatDialog) { }
selectedFireForceLevel:any = 0 selectedFireForceLevel:any = 0
FireForceDetailInfo:any = { FireForceDetailInfo:any = {
@ -183,15 +185,22 @@ export class FireforceAuditComponent implements OnInit {
} }
if(suffix == 'docx' || suffix == 'doc' || suffix == 'pdf'){ if(suffix == 'docx' || suffix == 'doc' || suffix == 'pdf'){
let fetchUrl = item.objectName let fetchUrl = item.objectName
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)
let json={ let json={
doc: { doc: {
docId: new Date(), docId: docId,
title: item.fileName, title: item.fileName,
fetchUrl: `http://${location.host}/api/Objects/PlanPlatform/`+fetchUrl fetchUrl: `http://${location.host}/api/Objects/PlanPlatform/`+fetchUrl
}, },
user: { user: {
uid: "test", uid: identityJsonparse.sub,
nickName: "test", nickName: identityJsonparse.name,
avatar: "", avatar: "",
privilege: [ privilege: [
'FILE_READ','FILE_DOWNLOAD', 'FILE_PRINT' 'FILE_READ','FILE_DOWNLOAD', 'FILE_PRINT'
@ -204,11 +213,11 @@ export class FireforceAuditComponent implements OnInit {
window.open(`http://121.5.10.84/apps/editor/openPreview?data=${base64}`) window.open(`http://121.5.10.84/apps/editor/openPreview?data=${base64}`)
} }
if(suffix == 'mp4'){ if(suffix == 'mp4'){
// const dialogRef = this.dialog.open(ViewDetails, {//调用open方法打开对话框并且携带参数过去 const dialogRef = this.dialog.open(ViewDetailsComponent, {//调用open方法打开对话框并且携带参数过去
// data: {item:item,type:"video"}, data: {item:item,type:"video"},
// id:'videodialog' id:'videodialog'
// }); });
// dialogRef.afterClosed().subscribe(); dialogRef.afterClosed().subscribe();
} }
} }
@ -230,3 +239,6 @@ export class FireforceAuditComponent implements OnInit {
} }
} }
} }

5
src/app/plan-audit/plan-audit.module.ts

@ -69,10 +69,11 @@ import { FunctionPartitionComponent } from './function-partition/function-partit
import { CadDrawComponent } from './cad-draw/cad-draw.component' import { CadDrawComponent } from './cad-draw/cad-draw.component'
import { RealisticPictureLookComponent }from './realistic-picture-look/realistic-picture.component' import { RealisticPictureLookComponent }from './realistic-picture-look/realistic-picture.component'
import { previewImg3 } from './realistic-picture-look/realistic-picture.component' import { previewImg3 } from './realistic-picture-look/realistic-picture.component'
import { show3D } from './wait-examineer/wait-examineer.component' import { show3D } from './wait-examineer/wait-examineer.component';
import { ViewDetailsComponent } from './view-details/view-details.component'
@NgModule({ @NgModule({
declarations: [DetachmentLevelComponent, PlanAuditComponent, PlanPassComponent,PlanOpen, PlanRecordComponent, BasicInfoComponent, declarations: [DetachmentLevelComponent, PlanAuditComponent, PlanPassComponent,PlanOpen, PlanRecordComponent, BasicInfoComponent,
WaitExamineerComponent,AllaroundComponent,ImgDetails,FireFacilitiesComponent,ImagesData2,previewBigImg2,PlanListComponent,OpenPlanToolDialog,KeySiteLookComponent,KeySiteImgs2,FunctionPartitionComponent,CadDrawComponent,RealisticPictureLookComponent,previewImg3,show3D, WaterAuditComponent, FireforceAuditComponent, LinkageforcesAuditComponent], WaitExamineerComponent,AllaroundComponent,ImgDetails,FireFacilitiesComponent,ImagesData2,previewBigImg2,PlanListComponent,OpenPlanToolDialog,KeySiteLookComponent,KeySiteImgs2,FunctionPartitionComponent,CadDrawComponent,RealisticPictureLookComponent,previewImg3,show3D, WaterAuditComponent, FireforceAuditComponent, LinkageforcesAuditComponent, ViewDetailsComponent],
imports: [ imports: [
CommonModule, CommonModule,
PlanAuditRoutingModule, PlanAuditRoutingModule,

1
src/app/plan-audit/view-details/view-details.component.html

@ -0,0 +1 @@
<video autoplay controls *ngIf="data.type == 'video'" [src]="Url"></video>

0
src/app/plan-audit/view-details/view-details.component.scss

25
src/app/plan-audit/view-details/view-details.component.spec.ts

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

24
src/app/plan-audit/view-details/view-details.component.ts

@ -0,0 +1,24 @@
import { HttpClient } from '@angular/common/http';
import { Component, Inject, OnInit } from '@angular/core';
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
@Component({
selector: 'app-view-details',
templateUrl: './view-details.component.html',
styleUrls: ['./view-details.component.scss']
})
export class ViewDetailsComponent implements OnInit {
constructor(private http: HttpClient,public dialogRef: MatDialogRef<ViewDetailsComponent>,@Inject(MAT_DIALOG_DATA) public data) {}
Url:string
onNoClick(): void {
this.dialogRef.close();
}
ngOnInit(): void {
this.Url = '/api/Objects/PlanPlatform/' + this.data.item.objectName
}
closeDialog(){
this.dialogRef.close();
}
}

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

@ -280,9 +280,9 @@
<app-water-audit></app-water-audit> <app-water-audit></app-water-audit>
</div> --> </div> -->
<!-- 消防力量审核 --> <!-- 消防力量审核 -->
<!-- <div class="fireForceAudit"> <div class="fireForceAudit">
<app-fireforce-audit></app-fireforce-audit> <app-fireforce-audit></app-fireforce-audit>
</div> --> </div>
<!-- 联动力量审核 --> <!-- 联动力量审核 -->
<!-- <div class="LinkageForcesAudit"> <!-- <div class="LinkageForcesAudit">

1
src/app/ui/collection-tools/collection-tools.component.ts

@ -643,6 +643,7 @@ export class CollectionToolsComponent implements OnInit {
let _this = this let _this = this
AxMessageSystem.addListener('selectionChanged', ()=>{ AxMessageSystem.addListener('selectionChanged', ()=>{
if(this.canvas.selection.size() == 1){//如果是单选 if(this.canvas.selection.size() == 1){//如果是单选
this.isMultipleAsset = false this.isMultipleAsset = false
// console.log('单选',this.canvas.selection.first().assetData) // console.log('单选',this.canvas.selection.first().assetData)

8
src/app/ui/collection-tools/save.ts

@ -158,10 +158,10 @@ export class saveOneDialog {
let postdata =JSON.parse(JSON.stringify(this.canvasData.selectPanelPoint)) let postdata =JSON.parse(JSON.stringify(this.canvasData.selectPanelPoint))
postdata.Data = JSON.stringify(postdata.Data) postdata.Data = JSON.stringify(postdata.Data)
postdata.Version = "2.0" postdata.Version = "2.0"
postdata.DisposalNodeId ? null : postdata.DisposalNodeId = istrue.id postdata.DisposalNodeId = istrue.id
postdata.PlanComponentId ? null : postdata.PlanComponentId = sessionStorage.getItem("planId") postdata.PlanComponentId = sessionStorage.getItem("planId")
postdata.Id ? null : postdata.Id = '' postdata.Id = null
postdata.BackgroundImageUrl? null : postdata.BackgroundImageUrl = null postdata.BackgroundImageUrl ? null : postdata.BackgroundImageUrl = null
let imgURL = this.uploadBGC() //更新 背景图 let imgURL = this.uploadBGC() //更新 背景图
imgURL.then(url=>{ imgURL.then(url=>{
url? postdata.BackgroundImageUrl = url.toString() : null url? postdata.BackgroundImageUrl = url.toString() : null

Loading…
Cancel
Save