Browse Source

[修改]审核记录页面二维预案和文本预案查看详情报错问题

tangshan
陈敬瑜 3 years ago
parent
commit
6b05ea27c3
  1. 10
      src/app/plan-audit/plan-record/plan-record.component.html
  2. 27
      src/app/plan-audit/plan-record/plan-record.component.ts
  3. 2
      src/app/plan-audit/wait-examineer/wait-examineer.component.html
  4. 7
      src/app/plan-audit/wait-examineer/wait-examineer.component.scss
  5. 8
      src/app/plan-audit/wait-examineer/wait-examineer.component.ts
  6. 6
      src/app/statistic-analysis/combined-query/combined-query.component.ts

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

@ -186,12 +186,12 @@
</mat-tab-group>
</div>
<div class="word" *ngIf="showtype==0||bianzhi">
<!-- <div class="shadow" *ngIf="!iftrue">
<div class="word" *ngIf="showtype==0">
<div class="shadow" *ngIf="!iftrue">
<mat-spinner></mat-spinner>
</div> -->
<button mat-raised-button color="primary" style="float: right;margin-top: 10px;margin-right: 15px;" (click)='lookNew()'>查看详情</button>
<iframe [src]='iframeSrc'></iframe>
</div>
<button mat-raised-button color="primary" style="float: right;margin-top: 10px;margin-right: 15px;" *ngIf="showtype == 0||bianzhi" (click)='lookNew()'>查看详情</button>
<iframe [src]='iframeSrc' (load)='ifranmeLoad()' id="myiframe"></iframe>
</div>
<div id="viewer" *ngIf="showtype==1"></div>
<div class="twoD" *ngIf="showtype==2">

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

@ -185,13 +185,16 @@ export class PlanRecordComponent implements OnInit {
this.http.get(`/api/PlanComponents/${item.itemId}`).subscribe((data: any) => {
this.companyId = data.companyId
this.companyName = data.companyName
if (data.planMode == 2) {
this.bianzhi = true
this.src = `/planManagement/createplanonlinefive?navIsOpen=false&companyId=${data.companyId}&planName=${data.name}&unitName=${data.companyName}&planCategory=${data.planCategory}&planId=${data.id}&unitTypeId=${data.company.buildingTypes[0].id}&orName=${data.company.organizationName}&orId=${data.company.organizationId}&pattern=false`
//this.src=`/keyUnit/viewunitinfoplan?id=${data.companyId}&orName=${data.company.organizationId}&orId=${data.company.organizationName}`
} else {
this.bianzhi = false
//this.bianzhi = false
if (data.planType != 2 && data.planType != 1) {
if (data.planMode == 2) {
this.showtype = 0
this.bianzhi = true
this.src = `/CreatePlanOnlineFive?navIsOpen=false&companyId=${data.companyId}&planName=${data.name}&unitName=${data.companyName}&planCategory=${data.planCategory}&planId=${data.id}&unitTypeId=${data.company.buildingTypes[0].id}&orName=${data.company.organizationName}&orId=${data.company.organizationId}&pattern=false`
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("\/")
if (this.fetchUrl.substr(0, index) == 'psw') {
@ -211,6 +214,8 @@ export class PlanRecordComponent implements OnInit {
} else {
this.lookWord()
}
}
} else {
this.organizationName = item.organizationName
this.planData = data
@ -221,7 +226,7 @@ export class PlanRecordComponent implements OnInit {
//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`)
}
}
@ -248,16 +253,15 @@ export class PlanRecordComponent implements OnInit {
//毕升
lookWord() {
this.showtype = 0
let src
let suffix = this.fetchUrl.split('.')[this.fetchUrl.split('.').length - 1].toLowerCase()
if (suffix == 'docx' || suffix == 'doc') {
let arr = this.fetchUrl.split('.')
arr[arr.length - 1] = 'pdf'
src = `/api/Objects/PlanPlatform/` + arr.join('.')
this.src = `/api/Objects/PlanPlatform/` + arr.join('.')
} else if (suffix == 'pdf') {
src = `/api/Objects/PlanPlatform/` + this.fetchUrl
this.src = `/api/Objects/PlanPlatform/` + this.fetchUrl
}
this.iframeSrc = this.sanitizer.bypassSecurityTrustResourceUrl(src);
this.iframeSrc = this.sanitizer.bypassSecurityTrustResourceUrl(this.src);
}
//查看按钮跳转
lookNew() {
@ -272,7 +276,6 @@ export class PlanRecordComponent implements OnInit {
this.compantData = { name: '', buildingTypes: [], address: '' }
this.planType = this.planData.planMode
let data = this.planData
// console.log(data)
if (data.planType == 1) {
this.twoOrthree = 2
} else if (data.planType == 2) {

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

@ -57,7 +57,7 @@
</form>
<div class="tablediv">
<table cellspacing="0" cellpadding="0" style="margin-top: 10px;">
<table cellspacing="0" cellpadding="0" style="margin-top: 10px;margin-bottom: 5px;">
<thead>
<th style="width: 15%;">类型</th>
<th style="width: 10%;">预案类型</th>

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

@ -11,8 +11,9 @@
background-color: #ffffff;
display: flex;
flex-direction: column;
overflow: auto;
//overflow: auto;
.lefthead {
height: 30%;
display: flex;
flex-direction: column;
.headdiv {
@ -131,13 +132,13 @@
}
.tablediv {
width: 100%;
height: 100%;
height: 70%;
.tbodycss {
@media screen and (min-device-width: 1400px) {
overflow-y: auto;
}
height: 650px;
height: 600px;
width: 100%;
.selectedTr {
background-color: #b3d3ee;

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

@ -357,16 +357,16 @@ export class WaitExamineerComponent implements OnInit {
lookWord() {
console.log('lookWord')
this.showtype = 0
let src
//let src
let suffix = this.fetchUrl.split('.')[this.fetchUrl.split('.').length - 1].toLowerCase()
if (suffix == 'docx' || suffix == 'doc') {
let arr = this.fetchUrl.split('.')
arr[arr.length - 1] = 'pdf'
src = `/api/Objects/PlanPlatform/` + arr.join('.')
this.src = `/api/Objects/PlanPlatform/` + arr.join('.')
} else if (suffix == 'pdf') {
src = `/api/Objects/PlanPlatform/` + this.fetchUrl
this.src = `/api/Objects/PlanPlatform/` + this.fetchUrl
}
this.iframeSrc = this.sanitizer.bypassSecurityTrustResourceUrl(src);
this.iframeSrc = this.sanitizer.bypassSecurityTrustResourceUrl(this.src);
}
//查看按钮跳转
lookNew() {

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

@ -563,14 +563,12 @@ export class CombinedQueryComponent implements OnInit {
const httpOptions = {
responseType: 'blob' as 'json'
};
let formData = new FormData()
console.log('000')
this.http.post(`/api/StatisticsAnalysis/Excel?queryMode=${this.preparelevels}`,this.excelData).subscribe((data:any) => {
this.http.post(`/api/StatisticsAnalysis/Excel?queryMode=${this.preparelevels}`,this.excelData,httpOptions).subscribe((data:any) => {
// // 文件名中有中文 则对文件名进行转码
const link = document.createElement('a');
const blob = new Blob([data], {type: 'application/vnd.ms-excel'});
link.setAttribute('href', window.URL.createObjectURL(blob));
link.setAttribute('download', '统计信息'+'.xlsx');
link.setAttribute('download', '统计信息'+'.xls');
link.style.visibility = 'hidden';
document.body.appendChild(link);
link.click();

Loading…
Cancel
Save