Browse Source

修正BUG

zhuzhou
陈鹏飞 3 years ago
parent
commit
4dbeaf2b36
  1. 5
      src/app/plan-audit/plan-record/plan-record.component.html
  2. 5
      src/app/plan-audit/plan-record/plan-record.component.ts
  3. 8
      src/app/plan-audit/wait-examineer/wait-examineer.component.html
  4. 40
      src/app/plan-audit/wait-examineer/wait-examineer.component.ts
  5. 2
      src/app/plan-management/entry-plan-look/entry-plan-look.component.html
  6. 41
      src/app/plan-management/entry-plan-look/entry-plan-look.component.ts
  7. 2
      src/app/ui/collection-tools-building/panel.scss
  8. 2
      src/app/ui/collection-tools-plan/panel.scss
  9. 3
      src/app/ui/collection-tools/collection-tools.component.scss
  10. 2
      src/app/ui/collection-tools/panel.scss

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

@ -176,6 +176,11 @@
<button mat-raised-button color="primary" style="float: right;margin-top: 10px;margin-right: 15px;" (click)='lookNew()'>查看详情</button>
<iframe [src]='iframeSrc'></iframe>
</div>
<!-- 图片 -->
<div class="imgBox" *ngIf="showtype==1024" style="text-align: center; overflow: hidden; height: 100%;">
<img [src]="src" (click)="lookImg(fetchUrl)" style="width: auto; height: auto; max-height: 100%;">
</div>
<!-- 图片 -->
<!-- 视频 -->
<div class="video" *ngIf="showtype == 1080" style="text-align: center; overflow: hidden; height: 100%;">
<video [src]="src" controls="controls" width="auto" height="100%"></video>

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

@ -243,8 +243,9 @@ export class PlanRecordComponent implements OnInit {
} else if (suffix == 'pdf') {
this.src = `/api/Objects/PlanPlatform/` + this.fetchUrl
} else if (suffix == 'jpeg' || suffix == 'jpg' || suffix == 'png') {
this.src = ""
this.lookImg(this.fetchUrl)
this.showtype = 1024 //图片
this.src = `/api/Objects/PlanPlatform/` + this.fetchUrl
return
} else if (suffix == 'mp4' || suffix == 'MP4') {
this.showtype = 1080 //视频
this.src = `/api/Objects/PlanPlatform/` + this.fetchUrl

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

@ -59,8 +59,7 @@
<tr [ngClass]="{'selectedTr': item.id == id}" *ngFor="let item of tableDate;let key = index"
(click)='radioClick($event,item)'>
<td style="width: 15%;">
<mat-checkbox color="primary" (change)='radioClick($event,item)' style="float: left;margin-top:'2px'">
</mat-checkbox>
<input type="checkbox" (change)='checkChange($event,item)' (click)='stopClick($event)' style="float: left;margin-top:'2px'" class="check{{item.id}}">
{{item.contentType=='1'?'Ⅰ级预案':item.contentType=='2'?'Ⅱ级预案':item.contentType=='3'?'Ⅲ级预案':item.contentType=='4'?'Ⅳ级预案':item.contentType=='5'?
'Ⅴ级预案':item.contentType=='6'?'应急预案(国家级)':item.contentType=='7'?'应急预案(市级)':item.contentType=='8'?'类型预案':item.contentType=='11'?'重点单位':item.contentType=='12'?'水源':item.contentType=='13'?'消防力量':item.contentType=='14'?'联动力量':'未知'}}
</td>
@ -282,6 +281,11 @@
<div class="word" *ngIf="showtype == 0">
<iframe [src]='iframeSrc'></iframe>
</div>
<!-- 图片 -->
<div class="imgBox" *ngIf="showtype==1024" style="text-align: center; overflow: hidden; height: 100%;">
<img [src]="src" (click)="lookImg(fetchUrl)" style="width: auto; height: auto; max-height: 100%;">
</div>
<!-- 图片 -->
<!-- 视频 -->
<div class="video" *ngIf="showtype == 1080" style="text-align: center; overflow: hidden; height: 100%;">
<video [src]="src" controls="controls" width="auto" height="100%"></video>

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

@ -6,7 +6,7 @@
* @LastEditors: sueRimn
* @LastEditTime: 2021-08-16 11:12:52
*/
import { Component, Inject, OnInit } from '@angular/core';
import { Component, ElementRef, Inject, OnInit } from '@angular/core';
import { FormControl } from '@angular/forms';
import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar';
import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
@ -26,7 +26,7 @@ declare var echarts: any;
})
export class WaitExamineerComponent implements OnInit {
constructor(private http: HttpClient, public snackBar: MatSnackBar, private sanitizer: DomSanitizer, public dialog: MatDialog) {
constructor(private http: HttpClient, public snackBar: MatSnackBar, private sanitizer: DomSanitizer, public dialog: MatDialog,private elementRef: ElementRef) {
}
preparelevels: any//编制级别下拉框
@ -180,17 +180,13 @@ export class WaitExamineerComponent implements OnInit {
differentContentOfPicture: any//当前单位变更数据 之 实景图
bianzhi = false
radioClick(e, item) {
e.stopPropagation();
this.selectedItem = item
//console.log(item)
// console.log('当前选择的信息',JSON.parse(this.selectedItem.differentContent) )
if (item.contentType == 11 && this.selectedItem.differentContent) {
let differentContent = JSON.parse(this.selectedItem.differentContent)
//console.log('差异信息', differentContent)
// 单位信息
this.differentContentOfUnitInfo = differentContent.filter(item => item.propertyName == 'basicInfo')
// 实景图
@ -342,17 +338,38 @@ export class WaitExamineerComponent implements OnInit {
})
}
if (e.checked) {
let div = this.elementRef.nativeElement.querySelector(`.check${item.id}`)
div.checked = true
let isTrue = this.shenheTable.find(element=>{ return element.id == item.id })
if (!isTrue) {
this.shenheTable.push(item)
}
this.radioid = item.itemId
}
// check change
checkChange(e, item) {
if (e.target.checked) {
let isTrue = this.shenheTable.find(element=>{ return element.id == item.id })
if (!isTrue) {
this.shenheTable.push(item)
}
}
else {
for (var i = 0; i < this.shenheTable.length; i++) {
if (this.shenheTable[i].id == item.id) {
this.shenheTable.splice(i, 1)
}
}
if (!this.shenheTable.length) {
this.showtype = -1
}
}
this.radioid = item.itemId
}
stopClick(e) {
e.stopPropagation();
}
//毕升
@ -368,8 +385,9 @@ export class WaitExamineerComponent implements OnInit {
} else if (suffix == 'pdf') {
this.src = `/api/Objects/PlanPlatform/` + this.fetchUrl
} else if (suffix == 'jpeg' || suffix == 'jpg' || suffix == 'png') {
this.src = ""
this.lookImg(this.fetchUrl)
this.showtype = 1024 //图片
this.src = `/api/Objects/PlanPlatform/` + this.fetchUrl
return
} else if (suffix == 'mp4' || suffix == 'MP4') {
this.showtype = 1080 //视频
this.src = `/api/Objects/PlanPlatform/` + this.fetchUrl

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

@ -76,7 +76,7 @@
<th mat-header-cell *matHeaderCellDef>操作</th>
<td mat-cell *matCellDef="let element">
<span (click)="changeName(element)" *ngIf="element.auditStatus==8">改名</span>
<span (click)="editPlan(element)" [ngClass]="{'grey': [!(element.auditStatus!='16' && element.auditStatus != '1')]&&element.planType!=1&&element.planType!=4}">编辑</span>
<span (click)="editPlan(element)" [ngClass]="{'grey': [!(element.auditStatus!='16' && element.auditStatus != '1')]&&element.planType!=1&&element.planType!=4&&element.planType!=16}">编辑</span>
<span (click)="lookPlan(element)">查看</span>
<span (click)="readFile(element)" [ngClass]="{'grey': element.planMode == '1' || element.planMode == '2' || element.planMode == '3'}">下载</span>
<span (click)="deletePlan(element)" *ngIf="element.auditStatus==8">删除</span>

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

@ -187,20 +187,28 @@ export class EntryPlanLookComponent implements OnInit {
Dom.click()
}
else if (e.planType == 16) {
this.lookPlan(e)
let body = JSON.stringify("");
let resetAudit = true
let headers = new HttpHeaders({
'Content-Type': 'text/json'
});
let options = {
headers
};
this.http.put(`/api/PlanComponents/${e.id}?resetAudit=${resetAudit}`, body, options).subscribe(data => {
this.http.put(`/api/PlanComponents/${e.id}`,e).subscribe(info=>{
this.selectPlan = e
let Dom = document.getElementById('uploadFile')
Dom.click()
this.getAllPlanComponents()
}, err => {
},err=>{
this.snackBar.open(err, '确定', config);
})
// this.lookPlan(e)
// let body = JSON.stringify("");
// let resetAudit = true
// let headers = new HttpHeaders({
// 'Content-Type': 'text/json'
// });
// let options = {
// headers
// };
// this.http.put(`/api/PlanComponents/${e.id}?resetAudit=${resetAudit}`, body, options).subscribe(data => {
// this.getAllPlanComponents()
// }, err => {
// this.snackBar.open(err, '确定', config);
// })
}
else {
@ -374,7 +382,14 @@ export class EntryPlanLookComponent implements OnInit {
uploadId: any; //上传分块上传事件编号
//选择文件上传
filechange(e) {
if (!this.selectPlan) { return }
if (!this.selectPlan || !e.target.files.length) { return }
if (this.selectPlan.auditStatus == 1) {
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open('提交审核中不允许编辑!', '确定', config);
return
}
this.maskLayerService.sendMessage(true);
this.file = e.target.files[0]
let file = e.target.files[0] || null //上传的文件
@ -392,6 +407,7 @@ export class EntryPlanLookComponent implements OnInit {
config.duration = 3000
this.snackBar.open('上传成功!', '确定', config);
this.maskLayerService.sendMessage(false);
this.getAllPlanComponents()
})
})
} else if (file && fileSize > shardSize) { //上传文件>5MB时,分块上传
@ -451,6 +467,7 @@ export class EntryPlanLookComponent implements OnInit {
config.duration = 3000
this.snackBar.open('上传成功!', '确定', config);
this.maskLayerService.sendMessage(false);
this.getAllPlanComponents()
})
})
}

2
src/app/ui/collection-tools-building/panel.scss

@ -43,7 +43,7 @@
height: 35px;
line-height: 35px;
box-sizing: border-box;
padding: 0 10px 0 25px;
padding: 0 10px;
.mat-icon {
font-size: 20px;
}

2
src/app/ui/collection-tools-plan/panel.scss

@ -44,7 +44,7 @@
height: 35px;
line-height: 35px;
box-sizing: border-box;
padding: 0 10px 0 25px;
padding: 0 10px;
.mat-icon {
font-size: 20px;
}

3
src/app/ui/collection-tools/collection-tools.component.scss

@ -326,6 +326,9 @@
border-radius: 5px;
box-sizing: border-box;
padding: 5px 0;
max-height: 600px;
overflow-x: hidden;
overflow-y: auto;
.centerTotalHeader {
height: 30px;
line-height: 30px;

2
src/app/ui/collection-tools/panel.scss

@ -53,7 +53,7 @@
height: 35px;
line-height: 35px;
box-sizing: border-box;
padding: 0 10px 0 25px;
padding: 0 10px;
.mat-icon {
font-size: 20px;
}

Loading…
Cancel
Save