From f872a866a863d4abb08f3ead54175035e7558108 Mon Sep 17 00:00:00 2001 From: chenjingyu Date: Mon, 26 Apr 2021 10:07:29 +0800 Subject: [PATCH 1/2] =?UTF-8?q?[=E6=96=B0=E5=A2=9E]div=E7=94=9F=E6=88=90wo?= =?UTF-8?q?rd=E6=B5=8B=E8=AF=95=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../meet-plan/meet-plan.component.ts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/app/plan-management/meet-plan/meet-plan.component.ts b/src/app/plan-management/meet-plan/meet-plan.component.ts index b70e4fc..012aaf1 100644 --- a/src/app/plan-management/meet-plan/meet-plan.component.ts +++ b/src/app/plan-management/meet-plan/meet-plan.component.ts @@ -61,6 +61,24 @@ export class MeetPlanComponent implements OnInit { } this.getAlltabledate() } + //生产word + word(id,fileName){ + /* id :文档dom节点 fileName:文件名称(.doc) */ + var header = "" + + "Export HTML to Word Document with JavaScript" + var footer = '' + var sourceHTML = header + document.getElementById(id).innerHTML + footer + + var source = 'data:application/vnd.ms-word;charset=utf-8,' + encodeURIComponent(sourceHTML) + var fileDownload = document.createElement('a') + document.body.appendChild(fileDownload) + fileDownload.href = source + fileDownload.download = fileName // 下载名称 + fileDownload.click() + document.body.removeChild(fileDownload) + } levels preparelevels:any From d5f5e59e98e65389819ea95f24f57be511e11c0b Mon Sep 17 00:00:00 2001 From: chenjingyu Date: Thu, 29 Apr 2021 09:44:04 +0800 Subject: [PATCH 2/2] =?UTF-8?q?[=E4=BF=AE=E6=94=B9]=E6=AF=95=E5=8D=87?= =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E5=99=A8=E5=9C=B0=E5=9D=80=E6=94=B9=E4=B8=BA?= =?UTF-8?q?=E5=86=85=E7=BD=91ip?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fire-force/fire-force.component.ts | 2 +- .../linkage-forces.component.ts | 2 +- .../fireforce-audit.component.ts | 2 +- .../linkageforces-audit.component.ts | 2 +- .../plan-record/plan-record.component.ts | 4 +-- .../wait-examineer.component.ts | 4 +-- .../entry-plan-look.component.ts | 25 +++++++++++------- .../meet-plan/meet-plan.component.html | 3 ++- .../meet-plan/meet-plan.component.ts | 7 +++-- .../onetwo-entry-plan.component.ts | 2 +- .../open-plan/open-plan.component.ts | 2 +- .../pass-plan/pass-plan.component.ts | 2 +- .../type-plan/type-plan.component.ts | 2 +- .../all-plan/all-plan.component.ts | 26 +++++++++++-------- .../state/page-one/page-one.component.ts | 12 ++++----- 15 files changed, 53 insertions(+), 44 deletions(-) diff --git a/src/app/data-collection/fire-force/fire-force.component.ts b/src/app/data-collection/fire-force/fire-force.component.ts index e649243..23c3dbb 100644 --- a/src/app/data-collection/fire-force/fire-force.component.ts +++ b/src/app/data-collection/fire-force/fire-force.component.ts @@ -1151,7 +1151,7 @@ export class FireForceComponent implements OnInit { var stringjson=JSON.stringify(json) var wordArray = CryptoJS.enc.Utf8.parse(stringjson); var base64 = CryptoJS.enc.Base64.stringify(wordArray); - window.open(`http://121.5.10.84/apps/editor/openPreview?data=${base64}`) + window.open(`http://172.26.166.38:18080/apps/editor/openPreview?data=${base64}`) } if(suffix == 'mp4'){ const dialogRef = this.dialog.open(ViewDetails, {//调用open方法打开对话框并且携带参数过去 diff --git a/src/app/data-collection/linkage-forces/linkage-forces.component.ts b/src/app/data-collection/linkage-forces/linkage-forces.component.ts index 8fd3859..818359c 100644 --- a/src/app/data-collection/linkage-forces/linkage-forces.component.ts +++ b/src/app/data-collection/linkage-forces/linkage-forces.component.ts @@ -885,7 +885,7 @@ export class LinkageForcesComponent implements OnInit { var stringjson=JSON.stringify(json) var wordArray = CryptoJS.enc.Utf8.parse(stringjson); var base64 = CryptoJS.enc.Base64.stringify(wordArray); - window.open(`http://121.5.10.84/apps/editor/openPreview?data=${base64}`) + window.open(`http://172.26.166.38:18080/apps/editor/openPreview?data=${base64}`) } if(suffix == 'mp4'){ const dialogRef = this.dialog.open(ViewDetails2, {//调用open方法打开对话框并且携带参数过去 diff --git a/src/app/plan-audit/fireforce-audit/fireforce-audit.component.ts b/src/app/plan-audit/fireforce-audit/fireforce-audit.component.ts index fd531cc..34e97cd 100644 --- a/src/app/plan-audit/fireforce-audit/fireforce-audit.component.ts +++ b/src/app/plan-audit/fireforce-audit/fireforce-audit.component.ts @@ -186,7 +186,7 @@ export class FireforceAuditComponent implements OnInit { var stringjson=JSON.stringify(json) var wordArray = CryptoJS.enc.Utf8.parse(stringjson); var base64 = CryptoJS.enc.Base64.stringify(wordArray); - window.open(`http://121.5.10.84/apps/editor/openPreview?data=${base64}`) + window.open(`http://172.26.166.38:18080/apps/editor/openPreview?data=${base64}`) } if(suffix == 'mp4'){ const dialogRef = this.dialog.open(ViewDetailsComponent, {//调用open方法打开对话框并且携带参数过去 diff --git a/src/app/plan-audit/linkageforces-audit/linkageforces-audit.component.ts b/src/app/plan-audit/linkageforces-audit/linkageforces-audit.component.ts index 72f092b..0b3e74e 100644 --- a/src/app/plan-audit/linkageforces-audit/linkageforces-audit.component.ts +++ b/src/app/plan-audit/linkageforces-audit/linkageforces-audit.component.ts @@ -196,7 +196,7 @@ export class LinkageforcesAuditComponent implements OnInit { var stringjson=JSON.stringify(json) var wordArray = CryptoJS.enc.Utf8.parse(stringjson); var base64 = CryptoJS.enc.Base64.stringify(wordArray); - window.open(`http://121.5.10.84/apps/editor/openPreview?data=${base64}`) + window.open(`http://172.26.166.38:18080/apps/editor/openPreview?data=${base64}`) } if(suffix == 'mp4'){ const dialogRef = this.dialog.open(ViewDetailsComponent, {//调用open方法打开对话框并且携带参数过去 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 b27f11b..3edba85 100644 --- a/src/app/plan-audit/plan-record/plan-record.component.ts +++ b/src/app/plan-audit/plan-record/plan-record.component.ts @@ -260,9 +260,9 @@ export class PlanRecordComponent implements OnInit { var stringjson=JSON.stringify(json) var wordArray = CryptoJS.enc.Utf8.parse(stringjson); var base64 = CryptoJS.enc.Base64.stringify(wordArray); - this.src=`http://121.5.10.84/apps/editor/openPreview?data=${base64}` + this.src=`http://172.26.166.38:18080/apps/editor/openPreview?data=${base64}` this.iframeSrc=this.sanitizer.bypassSecurityTrustResourceUrl(this.src); - //window.open(`http://121.5.10.84/apps/editor/openPreview?data=${base64}`) + //window.open(`http://172.26.166.38:18080/apps/editor/openPreview?data=${base64}`) }) } //查看按钮跳转 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 17e3ce0..0f6b892 100644 --- a/src/app/plan-audit/wait-examineer/wait-examineer.component.ts +++ b/src/app/plan-audit/wait-examineer/wait-examineer.component.ts @@ -289,9 +289,9 @@ export class WaitExamineerComponent implements OnInit { var stringjson=JSON.stringify(json) var wordArray = CryptoJS.enc.Utf8.parse(stringjson); var base64 = CryptoJS.enc.Base64.stringify(wordArray); - this.src=`http://121.5.10.84/apps/editor/openPreview?data=${base64}` + this.src=`http://172.26.166.38:18080/apps/editor/openPreview?data=${base64}` this.iframeSrc=this.sanitizer.bypassSecurityTrustResourceUrl(this.src); - //window.open(`http://121.5.10.84/apps/editor/openPreview?data=${base64}`) + //window.open(`http://172.26.166.38:18080/apps/editor/openPreview?data=${base64}`) }) } //查看按钮跳转 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 c58b203..f038289 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 @@ -103,7 +103,7 @@ export class EntryPlanLookComponent implements OnInit { } //查看预案 lookPlan(e){ - if(e.planMode == 0){ + if(e.planType == 16||e.planType == 4){ // console.log(e.attachmentUrls) var index=e.attachmentUrls[0].indexOf("\/") if(e.attachmentUrls[0].substr(0,index)=='psw'){ @@ -146,17 +146,21 @@ export class EntryPlanLookComponent implements OnInit { var stringjson=JSON.stringify(json) var wordArray = CryptoJS.enc.Utf8.parse(stringjson); var base64 = CryptoJS.enc.Base64.stringify(wordArray); - window.open(`http://121.5.10.84/apps/editor/openPreview?data=${base64}`) + window.open(`http://172.26.166.38:18080/apps/editor/openPreview?data=${base64}`) }) } } - if(e.planMode == 1){ - const config = new MatSnackBarConfig(); - config.verticalPosition = 'top'; - config.duration = 3000 - this.snackBar.open('查看导入word文件','确定',config); - } - if(e.planMode == 2){ //如果是在线编辑 + /* if(e.planType == 4){ + var index=e.attachmentUrls[0].indexOf("\/") + if(e.attachmentUrls[0].substr(0,index)=='psw'){ + const dialogRef = this.dialog.open(PsViewer, { + width: '1500px', + height:'800px', + data: e.attachmentUrls[0] + }); + } + } */ + if(e.planType == 1){ //如果是在线编辑 let id = e.id sessionStorage.setItem("planId",id) sessionStorage.setItem("companyId",this.companyId) @@ -166,7 +170,7 @@ export class EntryPlanLookComponent implements OnInit { let companyId = sessionStorage.getItem("companyId") window.open(`/keyUnit/viewunitinfoplan?id=${companyId}&orName=${this.route.snapshot.queryParams.orName}&orId=${this.route.snapshot.queryParams.orId}`); } - if(e.planMode == 3){ //如果是跳转网页 + if(e.planType == 2){ //如果是跳转网页 sessionStorage.setItem("url",e.url) window.open(`/planManagement/webLook`) } @@ -784,6 +788,7 @@ export class AddPlanone { if(this.selectedPLanType=='4'&&this.file!=undefined&&this.file.type!=null){ if(this.file.type=='image/png'||this.file.type=='image/jpeg'){ this.pswShow=true + this.website=false }else{this.pswShow=false} }else{this.pswShow=false} diff --git a/src/app/plan-management/meet-plan/meet-plan.component.html b/src/app/plan-management/meet-plan/meet-plan.component.html index e9798c4..ca3359c 100644 --- a/src/app/plan-management/meet-plan/meet-plan.component.html +++ b/src/app/plan-management/meet-plan/meet-plan.component.html @@ -96,6 +96,7 @@
+
@@ -107,7 +108,7 @@
-
+
diff --git a/src/app/plan-management/meet-plan/meet-plan.component.ts b/src/app/plan-management/meet-plan/meet-plan.component.ts index 012aaf1..d03c12f 100644 --- a/src/app/plan-management/meet-plan/meet-plan.component.ts +++ b/src/app/plan-management/meet-plan/meet-plan.component.ts @@ -61,12 +61,11 @@ export class MeetPlanComponent implements OnInit { } this.getAlltabledate() } - //生产word + //生成word word(id,fileName){ /* id :文档dom节点 fileName:文件名称(.doc) */ var header = "" + + "xmlns:w='urn:schemas-microsoft-com:office:word' >" + "Export HTML to Word Document with JavaScript" var footer = '' var sourceHTML = header + document.getElementById(id).innerHTML + footer @@ -249,7 +248,7 @@ export class MeetPlanComponent implements OnInit { var stringjson=JSON.stringify(json) var wordArray = CryptoJS.enc.Utf8.parse(stringjson); var base64 = CryptoJS.enc.Base64.stringify(wordArray); - window.open(`http://121.5.10.84/apps/editor/openPreview?data=${base64}`) + window.open(`http://172.26.166.38:18080/apps/editor/openPreview?data=${base64}`) }) } diff --git a/src/app/plan-management/onetwo-entry-plan/onetwo-entry-plan.component.ts b/src/app/plan-management/onetwo-entry-plan/onetwo-entry-plan.component.ts index ca16484..da06b6c 100644 --- a/src/app/plan-management/onetwo-entry-plan/onetwo-entry-plan.component.ts +++ b/src/app/plan-management/onetwo-entry-plan/onetwo-entry-plan.component.ts @@ -257,7 +257,7 @@ export class OnetwoEntryPlanComponent implements OnInit { var stringjson=JSON.stringify(json) var wordArray = CryptoJS.enc.Utf8.parse(stringjson); var base64 = CryptoJS.enc.Base64.stringify(wordArray); - window.open(`http://121.5.10.84/apps/editor/openPreview?data=${base64}`) + window.open(`http://172.26.166.38:18080/apps/editor/openPreview?data=${base64}`) }) diff --git a/src/app/plan-management/open-plan/open-plan.component.ts b/src/app/plan-management/open-plan/open-plan.component.ts index 5d65f7d..3e4fe9f 100644 --- a/src/app/plan-management/open-plan/open-plan.component.ts +++ b/src/app/plan-management/open-plan/open-plan.component.ts @@ -236,7 +236,7 @@ export class OpenPlanComponent implements OnInit { var stringjson=JSON.stringify(json) var wordArray = CryptoJS.enc.Utf8.parse(stringjson); var base64 = CryptoJS.enc.Base64.stringify(wordArray); - window.open(`http://121.5.10.84/apps/editor/openPreview?data=${base64}`) + window.open(`http://172.26.166.38:18080/apps/editor/openPreview?data=${base64}`) }) } } diff --git a/src/app/plan-management/pass-plan/pass-plan.component.ts b/src/app/plan-management/pass-plan/pass-plan.component.ts index c973350..b77a7d3 100644 --- a/src/app/plan-management/pass-plan/pass-plan.component.ts +++ b/src/app/plan-management/pass-plan/pass-plan.component.ts @@ -383,7 +383,7 @@ export class PassPlanComponent implements OnInit { var stringjson=JSON.stringify(json) var wordArray = CryptoJS.enc.Utf8.parse(stringjson); var base64 = CryptoJS.enc.Base64.stringify(wordArray); - window.open(`http://121.5.10.84/apps/editor/openPreview?data=${base64}`) + window.open(`http://172.26.166.38:18080/apps/editor/openPreview?data=${base64}`) }) } } diff --git a/src/app/plan-management/type-plan/type-plan.component.ts b/src/app/plan-management/type-plan/type-plan.component.ts index cc5feb8..f0512db 100644 --- a/src/app/plan-management/type-plan/type-plan.component.ts +++ b/src/app/plan-management/type-plan/type-plan.component.ts @@ -238,7 +238,7 @@ export class TypePlanComponent implements OnInit { var stringjson=JSON.stringify(json) var wordArray = CryptoJS.enc.Utf8.parse(stringjson); var base64 = CryptoJS.enc.Base64.stringify(wordArray); - window.open(`http://121.5.10.84/apps/editor/openPreview?data=${base64}`) + window.open(`http://172.26.166.38:18080/apps/editor/openPreview?data=${base64}`) }) diff --git a/src/app/statistic-analysis/all-plan/all-plan.component.ts b/src/app/statistic-analysis/all-plan/all-plan.component.ts index c40c576..57adda8 100644 --- a/src/app/statistic-analysis/all-plan/all-plan.component.ts +++ b/src/app/statistic-analysis/all-plan/all-plan.component.ts @@ -4,7 +4,7 @@ * @Author: sueRimn * @Date: 2021-03-15 11:32:30 * @LastEditors: sueRimn - * @LastEditTime: 2021-04-20 17:14:54 + * @LastEditTime: 2021-04-28 15:33:00 */ import { Component, OnInit, ViewChild, Inject } from '@angular/core'; import { HttpClient } from '@angular/common/http' @@ -82,7 +82,7 @@ export class AllPlanComponent implements OnInit { //查看详情 lookPlan(e){ - if(e.planMode == 0){ + if(e.planType == 16||e.planType == 4){ var index=e.attachmentUrls[0].indexOf("\/") if(e.attachmentUrls[0].substr(0,index)=='psw'){ const dialogRef = this.dialog.open(PsViewer, { @@ -122,17 +122,21 @@ export class AllPlanComponent implements OnInit { var stringjson=JSON.stringify(json) var wordArray = CryptoJS.enc.Utf8.parse(stringjson); var base64 = CryptoJS.enc.Base64.stringify(wordArray); - window.open(`http://121.5.10.84/apps/editor/openPreview?data=${base64}`) + window.open(`http://172.26.166.38:18080/apps/editor/openPreview?data=${base64}`) }) } } - if(e.planMode == 1){ - const config = new MatSnackBarConfig(); - config.verticalPosition = 'top'; - config.duration = 3000 - this.snackBar.open('查看导入word文件','确定',config); - } - if(e.planMode == 2){ //如果是在线编辑 + /* if(e.planType == 4){ + var index=e.attachmentUrls[0].indexOf("\/") + if(e.attachmentUrls[0].substr(0,index)=='psw'){ + const dialogRef = this.dialog.open(PsViewer, { + width: '1500px', + height:'800px', + data: e.attachmentUrls[0] + }); + } + } */ + if(e.planType == 1){ //如果是在线编辑 let id = e.id sessionStorage.setItem("planId",id) sessionStorage.setItem("companyId",e.company.id) @@ -142,7 +146,7 @@ export class AllPlanComponent implements OnInit { let companyId = sessionStorage.getItem("companyId") window.open(`/keyUnit/viewunitinfoplan?id=${companyId}&orName=${this.route.snapshot.queryParams.orName}&orId=${this.route.snapshot.queryParams.orId}`); } - if(e.planMode == 3){ //如果是跳转网页 + if(e.planType == 2){ //如果是跳转网页 sessionStorage.setItem("url",e.url) window.open(`/planManagement/webLook`) } diff --git a/src/app/statistic-analysis/state/page-one/page-one.component.ts b/src/app/statistic-analysis/state/page-one/page-one.component.ts index 9344ec4..4a19663 100644 --- a/src/app/statistic-analysis/state/page-one/page-one.component.ts +++ b/src/app/statistic-analysis/state/page-one/page-one.component.ts @@ -4,7 +4,7 @@ * @Author: sueRimn * @Date: 2020-09-01 15:24:39 * @LastEditors: sueRimn - * @LastEditTime: 2021-04-22 09:52:50 + * @LastEditTime: 2021-04-29 09:11:46 */ import { Component, OnInit } from '@angular/core'; import { Router } from '@angular/router'; @@ -116,11 +116,11 @@ export class PageOneComponent implements OnInit { }, data:tid=='pieone'?[ - {value:this.tabledata[0].planCategoryStatistics.planCategories[0].count, name: 'Ⅰ级预案',planStatusName:this.tabledata[0].planCategoryStatistics.planCategories[0].planCategoryName,type:1}, - {value:this.tabledata[0].planCategoryStatistics.planCategories[1].count, name: 'Ⅱ级预案',planStatusName:this.tabledata[0].planCategoryStatistics.planCategories[1].planCategoryName,type:2}, - {value:this.tabledata[0].planCategoryStatistics.planCategories[2].count, name: 'Ⅲ级预案',planStatusName:this.tabledata[0].planCategoryStatistics.planCategories[2].planCategoryName,type:3}, - {value:this.tabledata[0].planCategoryStatistics.planCategories[3].count, name: 'Ⅳ级预案',planStatusName:this.tabledata[0].planCategoryStatistics.planCategories[3].planCategoryName,type:4}, - {value:this.tabledata[0].planCategoryStatistics.planCategories[4].count, name: 'Ⅴ级预案',planStatusName:this.tabledata[0].planCategoryStatistics.planCategories[4].planCategoryName,type:5}, + {value:this.tabledata[0].planCategoryStatistics.planCategories[0]!=undefined? this.tabledata[0].planCategoryStatistics.planCategories[0].count:0, name: 'Ⅰ级预案', planStatusName:this.tabledata[0].planCategoryStatistics.planCategories[0]!=undefined? this.tabledata[0].planCategoryStatistics.planCategories[0].planCategoryName:'',type:1}, + {value:this.tabledata[0].planCategoryStatistics.planCategories[1]!=undefined? this.tabledata[0].planCategoryStatistics.planCategories[1].count:0, name: 'Ⅱ级预案', planStatusName:this.tabledata[0].planCategoryStatistics.planCategories[1]!=undefined? this.tabledata[0].planCategoryStatistics.planCategories[1].planCategoryName:'',type:2}, + {value:this.tabledata[0].planCategoryStatistics.planCategories[2]!=undefined? this.tabledata[0].planCategoryStatistics.planCategories[2].count:0, name: 'Ⅲ级预案', planStatusName:this.tabledata[0].planCategoryStatistics.planCategories[2]!=undefined? this.tabledata[0].planCategoryStatistics.planCategories[2].planCategoryName:'',type:3}, + {value:this.tabledata[0].planCategoryStatistics.planCategories[3]!=undefined? this.tabledata[0].planCategoryStatistics.planCategories[3].count:0, name: 'Ⅳ级预案', planStatusName:this.tabledata[0].planCategoryStatistics.planCategories[3]!=undefined? this.tabledata[0].planCategoryStatistics.planCategories[3].planCategoryName:'',type:4}, + {value:this.tabledata[0].planCategoryStatistics.planCategories[4]!=undefined? this.tabledata[0].planCategoryStatistics.planCategories[4].count:0, name: 'Ⅴ级预案', planStatusName:this.tabledata[0].planCategoryStatistics.planCategories[4]!=undefined? this.tabledata[0].planCategoryStatistics.planCategories[4].planCategoryName:'',type:5}, ]: [ {value:this.tabledata[0].planStatusStatistics.planStatuses[0]!=undefined? this.tabledata[0].planStatusStatistics.planStatuses[0].count:0, name: '预案新增',type:1,planStatusName:this.tabledata[0].planStatusStatistics.planStatuses[0]!=undefined?this.tabledata[0].planStatusStatistics.planStatuses[0].planStatusName:''}, {value:this.tabledata[0].planStatusStatistics.planStatuses[2]!=undefined? this.tabledata[0].planStatusStatistics.planStatuses[2].count:0, name: '预案审核通过',type:3,planStatusName:this.tabledata[0].planStatusStatistics.planStatuses[2]!=undefined? this.tabledata[0].planStatusStatistics.planStatuses[2].planStatusName:''},
预案名称