diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index e82830c..db22b94 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -4,7 +4,7 @@ * @Author: sueRimn * @Date: 2021-01-11 14:48:03 * @LastEditors: sueRimn - * @LastEditTime: 2021-03-26 15:18:46 + * @LastEditTime: 2021-07-29 10:26:58 */ import { NgModule } from '@angular/core'; import { Routes, RouterModule } from '@angular/router'; @@ -19,6 +19,7 @@ import {MTokenK1Component} from './m-token-k1/m-token-k1.component' //K1秘钥 import {ViewUnitDetailsPlanComponent} from './key-unit/view-unit-details-plan/view-unit-details-plan.component' import { TestComponent } from './test/test.component'; import { ExternalLinksPlanComponent } from './external-links-plan/external-links-plan.component'; +import { CreatePlanOnlineFiveComponent } from './plan-management/create-plan-online-five/create-plan-online-five.component' const routes: Routes = [ @@ -42,6 +43,7 @@ const routes: Routes = [ {path:'planAudit/planpass', component: PlanPassComponent , canActivate: [AuthGuard]}, {path:'test', component: TestComponent }, {path:'linksPlan', component: ExternalLinksPlanComponent }, + {path:'CreatePlanOnlineFive',component:CreatePlanOnlineFiveComponent} ]; @NgModule({ 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 e71598c..7092417 100644 --- a/src/app/plan-audit/wait-examineer/wait-examineer.component.ts +++ b/src/app/plan-audit/wait-examineer/wait-examineer.component.ts @@ -4,7 +4,7 @@ * @Author: sueRimn * @Date: 2020-12-25 16:13:50 * @LastEditors: sueRimn - * @LastEditTime: 2021-07-24 14:34:24 + * @LastEditTime: 2021-07-29 10:27:36 */ import { Component, Inject, OnInit } from '@angular/core'; import { FormControl } from '@angular/forms'; @@ -296,8 +296,10 @@ export class WaitExamineerComponent implements OnInit { this.companyName = data.companyName if (data.planType != 2 && data.planType != 1) { if (data.planMode == 2) { + this.showtype = 0 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 = `/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 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 0fd53d0..428438f 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 @@ -15,7 +15,7 @@ -
@@ -395,7 +395,7 @@ + text-align: center;width: 185px;" > {{element.tableth[tablethi]}} @@ -414,7 +414,7 @@ + text-align: center;width: 185px;"> {{itemtr.tabletd[tabletdi]}} @@ -440,11 +440,11 @@ {{itemthj.head}} + text-align: center; white-space:pre-wrap; width: 185px;">{{itemthj.head}} {{itemthj.body}} + text-align: center;white-space:pre-wrap;width: 185px;">{{itemthj.body}}
@@ -711,7 +711,8 @@ - {{info.olddata||'无原数据'}} + +
- {{info.olddata||'无原数据'}} + +
@@ -86,7 +86,7 @@ 删除 审批结果 提交审核 + *ngIf="element.auditStatus==8">提交审核 撤销审核 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 6caf765..b7977e0 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 @@ -108,7 +108,10 @@ export class EntryPlanLookComponent implements OnInit { lookPlan(e) { console.log(e) if (e.planType == 16 || e.planType == 4 || e.planType == 8) { - var index = e.attachmentUrls[0].indexOf("\/") + if (e.planType == 16&&e.attachmentUrls == null){ + window.open(`/planManagement/createplanonlinefive?navIsOpen=false&companyId=${this.companyId}&planName=${e.name}&unitName=${this.unitdata.unitname}&planCategory=${e.planCategory}&planId=${e.id}&unitTypeId=${this.compantData.buildingTypes[0].id}&orName=${this.compantData.organizationName}&orId=${this.compantData.organizationId}&pattern=false`) + }else{ + var index = e.attachmentUrls[0].indexOf("\/") if (e.attachmentUrls[0].substr(0, index) == 'psw') { const dialogRef = this.dialog.open(PsViewer, { width: '1500px', @@ -123,6 +126,7 @@ export class EntryPlanLookComponent implements OnInit { dialogRef.afterClosed().subscribe(); } else { let fetchUrl = e.attachmentUrls[0] + //console.log(fetchUrl) if (fetchUrl) { let suffix = fetchUrl.split('.')[fetchUrl.split('.').length - 1].toLowerCase() if (suffix == 'docx' || suffix == 'doc') { @@ -137,10 +141,10 @@ export class EntryPlanLookComponent implements OnInit { config.duration = 3000 this.snackBar.open('该文件类型暂不支持在线查看', '确定', config); } - } else { - window.open(`/planManagement/createplanonlinefive?navIsOpen=false&companyId=${this.companyId}&planName=${e.name}&unitName=${this.unitdata.unitname}&planCategory=${e.planCategory}&planId=${e.id}&unitTypeId=${this.compantData.buildingTypes[0].id}&orName=${this.compantData.organizationName}&orId=${this.compantData.organizationId}`) - } + } + } } + } if (e.planType == 1) { //如果是在线编辑 let id = e.id @@ -179,7 +183,7 @@ export class EntryPlanLookComponent implements OnInit { } else if (e.planType == 16) { if (e.attachmentUrls == null) { - window.open(`/planManagement/createplanonlinefive?navIsOpen=false&companyId=${this.companyId}&planName=${e.name}&unitName=${this.unitdata.unitname}&planCategory=${e.planCategory}&planId=${e.id}&unitTypeId=${this.compantData.buildingTypes[0].id}&orName=${this.compantData.organizationName}&orId=${this.compantData.organizationId}`) + window.open(`/planManagement/createplanonlinefive?navIsOpen=false&companyId=${this.companyId}&planName=${e.name}&unitName=${this.unitdata.unitname}&planCategory=${e.planCategory}&planId=${e.id}&unitTypeId=${this.compantData.buildingTypes[0].id}&orName=${this.compantData.organizationName}&orId=${this.compantData.organizationId}&pattern=true`) } else { let body = {}; diff --git a/src/app/ui/plan-template/plan-template.component.ts b/src/app/ui/plan-template/plan-template.component.ts index 713664a..bfc4330 100644 --- a/src/app/ui/plan-template/plan-template.component.ts +++ b/src/app/ui/plan-template/plan-template.component.ts @@ -4,7 +4,7 @@ * @Author: sueRimn * @Date: 2021-05-31 10:40:01 * @LastEditors: sueRimn - * @LastEditTime: 2021-07-05 15:15:36 + * @LastEditTime: 2021-07-28 14:37:50 */ import { Component, Inject, OnInit,ViewEncapsulation } from '@angular/core'; @@ -132,6 +132,9 @@ export class PlanTemplateComponent implements OnInit { } //修改模板 upPlan(item,i,operation){ + const config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 const dialogRef = this.dialog.open(upPlanname, {//调用open方法打开对话框并且携带参数过去 width: '340px', height:'340px', @@ -147,16 +150,48 @@ export class PlanTemplateComponent implements OnInit { this.newleftTabledata[i].planCategory=result.planCategory this.newleftTabledata[i].buildingTypeId=result.buildingTypeId this.newleftTabledata[i].unitname=result.unitname + let body={ + id:this.Id, + basicCategoryId:result.basicCategoryId, + buildingTypeId:result.buildingTypeId, + planCategory:Number(result.planCategory), + data:JSON.stringify(this.newleftTabledata[this.leftclicki].data) + } + this.http.put(`/api/PlanTemplate/${this.Id}`,body).subscribe((data:any)=>{ + this.snackBar.open('修改成功!','确定',config); + console.log(data) + }) }else{ - let newdata={ + /* let newdata={ basicCategoryId:result.basicCategoryId, buildingTypeId:result.buildingTypeId, data:item.data, planCategory:result.planCategory, unitname:result.unitname } - this.newleftTabledata.push(newdata) - this.save() + this.newleftTabledata.push(newdata) */ + let savaData={ + basicCategoryId:result.basicCategoryId, + buildingTypeId:result.buildingTypeId, + planCategory:Number(result.planCategory), + data:null + } + this.http.post("/api/PlanTemplate",savaData).subscribe((data:any)=>{ + this.newleftTabledata[this.newleftTabledata.length-1].id='' + this.newleftTabledata[this.newleftTabledata.length-1].id=data.id + let body={ + id:data.id, + basicCategoryId:result.basicCategoryId, + buildingTypeId:result.buildingTypeId, + planCategory:Number(result.planCategory), + data:JSON.stringify(this.newleftTabledata[this.leftclicki].data) + } + this.http.put(`/api/PlanTemplate/${data.id}`,body).subscribe((data:any)=>{ + this.snackBar.open('复制成功!','确定',config); + console.log(data) + }) + this.getLeftdata() + }) } }