From b708cf8505b4ab442d32a7c6253ed2619f01265a Mon Sep 17 00:00:00 2001 From: chenjingyu Date: Fri, 2 Jul 2021 11:24:13 +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=E5=8D=95=E4=BD=8D=E6=A6=82=E5=86=B5=E5=8F=A6=E4=B8=80?= =?UTF-8?q?=E5=A5=97=E5=89=8D=E7=AB=AF=E5=B8=83=E5=B1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../create-plan-online-five.component.html | 361 +++++++++++++++--- .../entry-plan-look.component.ts | 43 ++- 2 files changed, 350 insertions(+), 54 deletions(-) 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 d6657d7..7ea512f 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 @@ -288,41 +288,83 @@ -
-
+
{{item.groupName}}
-
-
- {{element.headName}} - +
+ {{element.headName}} + -
- - -
+ + + + + + - + + + + + +
+ [(ngModel)]="element.tableth[tablethi]" > +
+ {{element.tableth[tablethi]}}
+ +
+ {{itemtr.tabletd[tabletdi]}}
- +
{{element.tableth||''}}
+ [(ngModel)]="itemthj.head" *ngIf="pattern == 'edit'"> + [(ngModel)]="itemthj.body" *ngIf="pattern == 'edit'"> + + + + + +
{{itemthj.head}}{{itemthj.body}}
+
@@ -467,16 +522,37 @@
-
+
-
- {{itemunit.name}} -
-
+
+ {{itemunit.name}} +
+
-
- {{element.surveyName}} +
+ {{element.surveyName}}
@@ -484,23 +560,37 @@
-
- {{attack.head}} +
+ {{attack.head}}
- - +
+ - + + + + - + + + + +
{{attack.tableth[tablethi]}}
@@ -509,7 +599,18 @@
+ {{itemtr.tabletd[tabletdi]}} +
@@ -520,16 +621,44 @@
- - + + + + + + + +
{{info.propertyName}}{{info.value}}
- - + + + + + + + +
{{info.propertyName}}{{info.propertyValue}}
@@ -537,14 +666,35 @@
-
- {{attack.name}} +
+ {{attack.name}}
- - + + + + + + + +
{{info.name}}{{info.value}}
@@ -556,50 +706,155 @@
- - - + + + + + + + +
{{info.name}}{{info.value}}
- - + + + + + + + +
{{info.name}}{{info.value}}
-
- +
+ + {{parts.heafName}}
- - + + + + + + + +
{{parts.body[0].name}}{{parts.body[0].value}}
- - + + + + + + + +
{{parts.body[1].name}}{{parts.body[1].value}}
- - + + + + + + + +
{{parts.body[2].name}}{{parts.body[2].value}}
- - + + + + + + + +
{{parts.body[3].name}}{{parts.body[3].value}}
- - + + + + + + + +
{{parts.body[4].name}}{{parts.body[4].value}}
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 e90a214..ef49dae 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 @@ -193,7 +193,46 @@ export class EntryPlanLookComponent implements OnInit { const config = new MatSnackBarConfig(); config.verticalPosition = 'top'; config.duration = 3000 - let isTrue = confirm('编辑后审核状态会成为未审核状态,您确定要编辑吗') + if(e.auditStatus==8){ + if (e.planType == 1) { //如果是在线编辑 + let id = e.id + sessionStorage.setItem("planId", id) + sessionStorage.setItem("companyId", this.companyId) + sessionStorage.setItem("buildingTypeId", this.unittypeId) + sessionStorage.setItem("editable", "1") + sessionStorage.setItem("planName", e.name) + let companyId = sessionStorage.getItem("companyId") + window.open(`/keyUnit/editunitinfo?id=${companyId}&orName=${this.route.snapshot.queryParams.orName}&orId=${this.route.snapshot.queryParams.orId}`); + } + else if (e.planType == 16) { + if (e.attachmentUrls == null) { + console.log(this.compantData) + 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}`) + } + else { + let body = {}; + let resetAudit = true + let headers = new HttpHeaders({ + 'Content-Type': 'text/json' + }); + let options = { + headers + }; + this.http.put(`/api/PlanComponents/${e.id}?resetAudit=${resetAudit}`, body, options).subscribe(data => { + this.getAllPlanComponents() + this.lookPlan(e) + }/* ,err => { + this.snackBar.open(err,'确定',config); + } */) + } + + } + else { + + this.snackBar.open('只有二维预案和文本预案可以编辑!', '确定', config); + } + }else{ + let isTrue = confirm('编辑后审核状态会成为未审核状态,您确定要编辑吗') if (isTrue) { if (e.planType == 1) { //如果是在线编辑 let id = e.id @@ -233,6 +272,8 @@ export class EntryPlanLookComponent implements OnInit { this.snackBar.open('只有二维预案和文本预案可以编辑!', '确定', config); } } + } + } allPlanComponents: any //所有预案组件