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> </mat-tab-group>
</div> </div>
<div class="word" *ngIf="showtype==0||bianzhi"> <div class="word" *ngIf="showtype==0">
<!-- <div class="shadow" *ngIf="!iftrue"> <div class="shadow" *ngIf="!iftrue">
<mat-spinner></mat-spinner> <mat-spinner></mat-spinner>
</div> --> </div>
<button mat-raised-button color="primary" style="float: right;margin-top: 10px;margin-right: 15px;" (click)='lookNew()'>查看详情</button> <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'></iframe> <iframe [src]='iframeSrc' (load)='ifranmeLoad()' id="myiframe"></iframe>
</div> </div>
<div id="viewer" *ngIf="showtype==1"></div> <div id="viewer" *ngIf="showtype==1"></div>
<div class="twoD" *ngIf="showtype==2"> <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.http.get(`/api/PlanComponents/${item.itemId}`).subscribe((data: any) => {
this.companyId = data.companyId this.companyId = data.companyId
this.companyName = data.companyName this.companyName = data.companyName
if (data.planMode == 2) { //this.bianzhi = false
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
if (data.planType != 2 && data.planType != 1) { 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] this.fetchUrl = data.attachmentUrls[0]
var index = this.fetchUrl.indexOf("\/") var index = this.fetchUrl.indexOf("\/")
if (this.fetchUrl.substr(0, index) == 'psw') { if (this.fetchUrl.substr(0, index) == 'psw') {
@ -211,6 +214,8 @@ export class PlanRecordComponent implements OnInit {
} else { } else {
this.lookWord() this.lookWord()
} }
}
} else { } else {
this.organizationName = item.organizationName this.organizationName = item.organizationName
this.planData = data this.planData = data
@ -221,7 +226,7 @@ export class PlanRecordComponent implements OnInit {
//this.iframeSrc=this.sanitizer.bypassSecurityTrustResourceUrl(this.src); //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`) //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() { lookWord() {
this.showtype = 0 this.showtype = 0
let src
let suffix = this.fetchUrl.split('.')[this.fetchUrl.split('.').length - 1].toLowerCase() let suffix = this.fetchUrl.split('.')[this.fetchUrl.split('.').length - 1].toLowerCase()
if (suffix == 'docx' || suffix == 'doc') { if (suffix == 'docx' || suffix == 'doc') {
let arr = this.fetchUrl.split('.') let arr = this.fetchUrl.split('.')
arr[arr.length - 1] = 'pdf' arr[arr.length - 1] = 'pdf'
src = `/api/Objects/PlanPlatform/` + arr.join('.') this.src = `/api/Objects/PlanPlatform/` + arr.join('.')
} else if (suffix == 'pdf') { } 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() { lookNew() {
@ -272,7 +276,6 @@ export class PlanRecordComponent implements OnInit {
this.compantData = { name: '', buildingTypes: [], address: '' } this.compantData = { name: '', buildingTypes: [], address: '' }
this.planType = this.planData.planMode this.planType = this.planData.planMode
let data = this.planData let data = this.planData
// console.log(data)
if (data.planType == 1) { if (data.planType == 1) {
this.twoOrthree = 2 this.twoOrthree = 2
} else if (data.planType == 2) { } else if (data.planType == 2) {

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

@ -57,7 +57,7 @@
</form> </form>
<div class="tablediv"> <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> <thead>
<th style="width: 15%;">类型</th> <th style="width: 15%;">类型</th>
<th style="width: 10%;">预案类型</th> <th style="width: 10%;">预案类型</th>

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

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

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

@ -357,16 +357,16 @@ export class WaitExamineerComponent implements OnInit {
lookWord() { lookWord() {
console.log('lookWord') console.log('lookWord')
this.showtype = 0 this.showtype = 0
let src //let src
let suffix = this.fetchUrl.split('.')[this.fetchUrl.split('.').length - 1].toLowerCase() let suffix = this.fetchUrl.split('.')[this.fetchUrl.split('.').length - 1].toLowerCase()
if (suffix == 'docx' || suffix == 'doc') { if (suffix == 'docx' || suffix == 'doc') {
let arr = this.fetchUrl.split('.') let arr = this.fetchUrl.split('.')
arr[arr.length - 1] = 'pdf' arr[arr.length - 1] = 'pdf'
src = `/api/Objects/PlanPlatform/` + arr.join('.') this.src = `/api/Objects/PlanPlatform/` + arr.join('.')
} else if (suffix == 'pdf') { } 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() { lookNew() {

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

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

Loading…
Cancel
Save