From 8610a77e34ca52ec684941534bb98a6815d72390 Mon Sep 17 00:00:00 2001 From: chenjingyu <1148019379@qq.com> Date: Sat, 22 Jan 2022 14:32:35 +0800 Subject: [PATCH] =?UTF-8?q?[=E4=BF=AE=E6=94=B9]=E5=9C=A8=E7=BA=BF=E7=BC=96?= =?UTF-8?q?=E5=88=B6=E9=A2=84=E6=A1=88=E4=B8=8B=E8=BD=BD=EF=BC=8C=E6=B6=88?= =?UTF-8?q?=E9=98=B2=E8=AE=BE=E6=96=BD=E6=A8=A1=E5=9D=97=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wait-examineer.component.ts | 2 +- .../create-plan-online-five.component.html | 7 ++- .../create-plan-online-five.component.ts | 20 ++++-- .../entry-plan-look.component.html | 2 +- .../entry-plan-look.component.scss | 3 + .../entry-plan-look.component.ts | 63 ++++++++++++++----- .../entry-plan-look/upLoad.html | 16 +++-- .../entry-plan-look/upNew.html | 3 + .../plan-management/plan-management.module.ts | 3 +- .../statistic-analysis/home/home.component.ts | 4 ++ 10 files changed, 92 insertions(+), 31 deletions(-) create mode 100644 src/app/plan-management/entry-plan-look/upNew.html 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 72dd752..bf36843 100644 --- a/src/app/plan-audit/wait-examineer/wait-examineer.component.ts +++ b/src/app/plan-audit/wait-examineer/wait-examineer.component.ts @@ -302,7 +302,7 @@ export class WaitExamineerComponent implements OnInit { this.companyId = data.companyId this.companyName = data.companyName if (data.planType != 2 && data.planType != 1) { - if (data.planMode == 2) { + if (data.planMode == 2 ||data.planMode==4) { 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` diff --git a/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.html b/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.html index 6c47d3f..2d8542a 100644 --- a/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.html +++ b/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.html @@ -437,7 +437,8 @@ *ngIf="item.groupName!='单位概况'&&item.groupName!='交通水源'&&item.groupName!='重点图示'&&item.groupName!='预案附件'&&item.groupName!='封面'">
{{item.groupName}} - + + {{item.headName}}
@@ -866,12 +867,12 @@ height: 40px; width: 40%; font-size: 16px; - text-align: center;">{{info.name}} + text-align: center;" *ngIf="info.completed">{{info.name}} {{info.value}} + text-align: center;" *ngIf="info.completed">{{info.value}} diff --git a/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.ts b/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.ts index 7378932..12f9914 100644 --- a/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.ts +++ b/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.ts @@ -62,7 +62,7 @@ export class CreatePlanOnlineFiveComponent implements OnInit { haveNew=false planMode//预案类型 //index - ngOnInit(): void { + ngOnInit() { //this.index = this.getArrayIndex(this.planTemplateData,'单位概况') this.haveNew=this.route.snapshot.queryParams.haveNew this.planMode=this.route.snapshot.queryParams.planMode @@ -77,9 +77,14 @@ export class CreatePlanOnlineFiveComponent implements OnInit { this.selectedItem='封面' this.pattern = 'edit' } - this.getUnitData() - this.getOrganizations() - + this.getUnitData() + this.getOrganizations() + if(this.route.snapshot.queryParams.xiazai=='true'){ + window.setTimeout(()=>{ + this.generatingDoc() + },2500) + + } } zdysearch = '' organizationName: any //当前单位组织机构名称 @@ -2139,7 +2144,12 @@ export class disaster{ this.snackBar.open('请选择类型!','确定',config); }else if(this.headName==undefined||this.headName==''){ this.snackBar.open('请输入表头名称!','确定',config); - }else{ + }else if(this.level==2&& (this.lieNumber==undefined||this.lieNumber=='')){ + this.snackBar.open('请输入列数!','确定',config); + }else if(this.level==2&& (this.hNumber==undefined||this.hNumber=='')){ + this.snackBar.open('请输入行数!','确定',config); + } + else{ let tree={ json:[], name: '' 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 51e3107..a98b227 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 @@ -102,7 +102,7 @@ [ngClass]="{'grey': !(element.auditStatus!='16' && element.auditStatus != '1' )}">编辑 查看 下载 + [ngClass]="{'grey':element.planMode == '3'}">下载 删除 审批结果 { //初始化tree return { @@ -639,20 +640,31 @@ export class EntryPlanLookComponent implements OnInit { //读取下载文件信息 readFile(element) { this.uploadFileLonging = element - const dialogRef = this.dialog.open(DownloadFile, { - width: "435px", - // height:"410px", - data: { fileUrls: element.attachmentUrls, compantData: this.unitdata.unitname, element: element } - }); - dialogRef.afterClosed().subscribe( - data => { - if (data) { - this.downloadFileName = data.fileName - this.download = data - this.downloadFile() + console.log(element) + if(element.planType==16&&(element.planMode==4||element.planMode==2)){ + const dialogRef = this.dialog.open(wenbenUpload, { + width: "650px", + height:"710px", + data: {src:`/planManagement/createplanonlinefive?navIsOpen=false&companyId=${this.companyId}&planName=${element.name}&unitName=${this.unitdata.unitname}&planCategory=${element.planCategory}&planId=${element.id}&unitTypeId=${this.compantData.buildingTypes[0].id}&orName=${this.compantData.organizationName}&orId=${this.compantData.organizationId}&pattern=false&xiazai=true`} + }); + //window.open(`/planManagement/createplanonlinefive?navIsOpen=false&companyId=${this.companyId}&planName=${element.name}&unitName=${this.unitdata.unitname}&planCategory=${element.planCategory}&planId=${element.id}&unitTypeId=${this.compantData.buildingTypes[0].id}&orName=${this.compantData.organizationName}&orId=${this.compantData.organizationId}&pattern=false&xiazai=true`) + }else{ + const dialogRef = this.dialog.open(DownloadFile, { + width: "435px", + // height:"410px", + data: { fileUrls: element.attachmentUrls, compantData: this.unitdata.unitname, element: element } + }); + dialogRef.afterClosed().subscribe( + data => { + if (data) { + this.downloadFileName = data.fileName + this.download = data + this.downloadFile() + } } - } - ); + ); + } + } //初始化下载 @@ -1681,7 +1693,7 @@ export class editUpload{ constructor(private http: HttpClient, public dialogRef: MatDialogRef, @Inject(MAT_DIALOG_DATA) public data, public snackBar: MatSnackBar) { } planName: any//预案名称 ngOnInit(): void { - console.log(this.data) + //console.log(this.data) } onNoClick(): void { this.dialogRef.close(); @@ -1694,7 +1706,10 @@ export class editUpload{ objectName: any; //上传对象名 uploadId: any; //上传分块上传事件编号 lastyuanData //之前的预案数据 - + //上传 + upload() { + document.getElementById('up').click() + } //上传文件input filechange(e) { this.file = e.target.files[0] || null //上传的文件 @@ -1852,3 +1867,19 @@ filechange(e) { }) } } +//在线编制文本预案下载 +@Component({ + selector: 'wenbenUpload', + templateUrl: './upNew.html', + styleUrls: ['./entry-plan-look.component.scss'] +}) +export class wenbenUpload{ + constructor(private http: HttpClient, public dialogRef: MatDialogRef, @Inject(MAT_DIALOG_DATA) public data, public snackBar: MatSnackBar, private sanitizer: DomSanitizer) { } + ngOnInit(): void { + console.log(this.data) + window.setTimeout(()=>{ + this.dialogRef.close(); + },5000) + } + src=this.sanitizer.bypassSecurityTrustResourceUrl(this.data.src); +} diff --git a/src/app/plan-management/entry-plan-look/upLoad.html b/src/app/plan-management/entry-plan-look/upLoad.html index a4a531a..b63e1bb 100644 --- a/src/app/plan-management/entry-plan-look/upLoad.html +++ b/src/app/plan-management/entry-plan-look/upLoad.html @@ -1,10 +1,18 @@
- + + +
-
- - + +
+ +
\ No newline at end of file diff --git a/src/app/plan-management/entry-plan-look/upNew.html b/src/app/plan-management/entry-plan-look/upNew.html new file mode 100644 index 0000000..e3faec1 --- /dev/null +++ b/src/app/plan-management/entry-plan-look/upNew.html @@ -0,0 +1,3 @@ +
+ +
\ No newline at end of file diff --git a/src/app/plan-management/plan-management.module.ts b/src/app/plan-management/plan-management.module.ts index 61d886e..429df79 100644 --- a/src/app/plan-management/plan-management.module.ts +++ b/src/app/plan-management/plan-management.module.ts @@ -76,12 +76,13 @@ import { updataHl } from './create-plan-online-five/create-plan-online-five.comp import {ChangeUrl} from './entry-plan-look/entry-plan-look.component' import {adddwsurveys} from './create-plan-online-five/create-plan-online-five.component' import { editUpload } from './entry-plan-look/entry-plan-look.component' +import { wenbenUpload } from './entry-plan-look/entry-plan-look.component' @NgModule({ declarations: [EntryPlanComponent, PassPlanComponent, OpenPlanComponent, EntryPlanLookComponent, AddPlanone, PlanType, AuditSatus, PlanLevel, DownloadFile, AuditResult, ChangeName, WebLookComponent, OnetwoEntryPlanComponent, newunitComponent, MeetPlanComponent, newunitMeet, TypePlanComponent, newunitType, PsViewer, onetwoAuditResult, meetAuditResult, typeAuditResult, MaintainUpComponent, GkPsViewer, GkhtmlPsViewer, UnitInfo, ReinforcePlanComponent, state, ImgDetails, CreatePlanOnlineFiveComponent, CreatePlanOnlineThreeComponent, - OpenPlanToolDialog,yinYong,newTitle,disaster,updataHl,ChangeUrl,adddwsurveys,editUpload], + OpenPlanToolDialog,yinYong,newTitle,disaster,updataHl,ChangeUrl,adddwsurveys,editUpload,wenbenUpload], imports: [ CommonModule, PlanManagementRoutingModule, diff --git a/src/app/statistic-analysis/home/home.component.ts b/src/app/statistic-analysis/home/home.component.ts index ee23787..1f5e22e 100644 --- a/src/app/statistic-analysis/home/home.component.ts +++ b/src/app/statistic-analysis/home/home.component.ts @@ -58,6 +58,10 @@ export class HomeComponent implements OnInit { await this.emitService.getData(paramsdata, `/api/StatisticsAnalysis/BuildingTypes`) this.keyUnit() } + //获取年度完成情况数据 + getYearData(){ + + } threePlan() {