From 4dbeaf2b36ffb4c09dcfcc83abe20916b57ca038 Mon Sep 17 00:00:00 2001 From: cpf <1105965053@qq.com> Date: Tue, 17 May 2022 13:47:40 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../plan-record/plan-record.component.html | 5 +++ .../plan-record/plan-record.component.ts | 5 ++- .../wait-examineer.component.html | 8 +++- .../wait-examineer.component.ts | 40 +++++++++++++----- .../entry-plan-look.component.html | 2 +- .../entry-plan-look.component.ts | 41 +++++++++++++------ .../ui/collection-tools-building/panel.scss | 2 +- src/app/ui/collection-tools-plan/panel.scss | 2 +- .../collection-tools.component.scss | 3 ++ src/app/ui/collection-tools/panel.scss | 2 +- 10 files changed, 79 insertions(+), 31 deletions(-) diff --git a/src/app/plan-audit/plan-record/plan-record.component.html b/src/app/plan-audit/plan-record/plan-record.component.html index 76be3aa..872b654 100644 --- a/src/app/plan-audit/plan-record/plan-record.component.html +++ b/src/app/plan-audit/plan-record/plan-record.component.html @@ -176,6 +176,11 @@ + +
+ +
+
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 7bd68e5..7738138 100644 --- a/src/app/plan-audit/plan-record/plan-record.component.ts +++ b/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 diff --git a/src/app/plan-audit/wait-examineer/wait-examineer.component.html b/src/app/plan-audit/wait-examineer/wait-examineer.component.html index c94363c..e254bef 100644 --- a/src/app/plan-audit/wait-examineer/wait-examineer.component.html +++ b/src/app/plan-audit/wait-examineer/wait-examineer.component.html @@ -59,8 +59,7 @@ - - + {{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'?'联动力量':'未知'}} @@ -282,6 +281,11 @@
+ +
+ +
+
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 b5704ec..3ac34c1 100644 --- a/src/app/plan-audit/wait-examineer/wait-examineer.component.ts +++ b/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 diff --git a/src/app/plan-management/entry-plan-look/entry-plan-look.component.html b/src/app/plan-management/entry-plan-look/entry-plan-look.component.html index c896a54..23cd57f 100644 --- a/src/app/plan-management/entry-plan-look/entry-plan-look.component.html +++ b/src/app/plan-management/entry-plan-look/entry-plan-look.component.html @@ -76,7 +76,7 @@ 操作 改名 - 编辑 + 编辑 查看 下载 删除 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 d056900..1d76c08 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 @@ -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() }) }) } diff --git a/src/app/ui/collection-tools-building/panel.scss b/src/app/ui/collection-tools-building/panel.scss index dea5232..ff7deb9 100644 --- a/src/app/ui/collection-tools-building/panel.scss +++ b/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; } diff --git a/src/app/ui/collection-tools-plan/panel.scss b/src/app/ui/collection-tools-plan/panel.scss index ef131fc..142a1f1 100644 --- a/src/app/ui/collection-tools-plan/panel.scss +++ b/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; } diff --git a/src/app/ui/collection-tools/collection-tools.component.scss b/src/app/ui/collection-tools/collection-tools.component.scss index 487c95c..4134885 100644 --- a/src/app/ui/collection-tools/collection-tools.component.scss +++ b/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; diff --git a/src/app/ui/collection-tools/panel.scss b/src/app/ui/collection-tools/panel.scss index 9dd9848..21e7ff2 100644 --- a/src/app/ui/collection-tools/panel.scss +++ b/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; }