diff --git a/src/app/key-unit/key-unit-management/key-unit-management.component.scss b/src/app/key-unit/key-unit-management/key-unit-management.component.scss index 5239b3a..933eb9d 100644 --- a/src/app/key-unit/key-unit-management/key-unit-management.component.scss +++ b/src/app/key-unit/key-unit-management/key-unit-management.component.scss @@ -93,6 +93,8 @@ } .tablebox{ .add{ + cursor:auto; + text-decoration: none; display: block; width: 40px; height: 20px; @@ -100,16 +102,19 @@ font-size: 12px; line-height: 20px; color: #FFFFFF; - margin-left: 50px; + margin-left: 60px; } .weihu{ - //display: block; + cursor:auto; + text-decoration: none; + display: block; width: 64px; height: 20px; - background: #2196F3; + background: #FFC94B; font-size: 12px; color: #FFFFFF; line-height: 20px; + margin-left: 50px; } table{ width: 100%; diff --git a/src/app/plan-management/entry-plan-look/entry-plan-look.component.scss b/src/app/plan-management/entry-plan-look/entry-plan-look.component.scss index a50c639..8af8f8b 100644 --- a/src/app/plan-management/entry-plan-look/entry-plan-look.component.scss +++ b/src/app/plan-management/entry-plan-look/entry-plan-look.component.scss @@ -26,6 +26,8 @@ .tablebox{ overflow: auto; .add{ + cursor: auto; + text-decoration: none; display: block; width: 40px; height: 20px; @@ -35,14 +37,18 @@ color: #FFFFFF; margin-left: 50px; } + .weihu{ - //display: block; + cursor: auto; + text-decoration: none; + display: block; width: 64px; height: 20px; - background: #2196F3; + background: #FFC94B; font-size: 12px; color: #FFFFFF; line-height: 20px; + margin-left: 40px; } table{ width: 100%; 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 f2cc0e7..77c5fbb 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 @@ -174,7 +174,8 @@ export class EntryPlanLookComponent implements OnInit { const config = new MatSnackBarConfig(); config.verticalPosition = 'top'; config.duration = 3000 - let isTrue = confirm('您确定编辑吗,若是公开预案会变成未公开状态') + if(e.openRange!='未公开'||e.auditStatus!=8){ + let isTrue = confirm('您确定编辑吗,若是公开预案会变成未公开状态,审核状态也会改变') if(isTrue){ if (e.auditStatus == 8) { if (e.planType == 1) { //如果是在线编辑 @@ -244,8 +245,7 @@ export class EntryPlanLookComponent implements OnInit { this.snackBar.open('只有二维预案和文本预案可以编辑!', '确定', config); } } else { - let isTrue = confirm('编辑后审核状态会成为未审核状态,您确定要编辑吗') - if (isTrue) { + //let isTrue = confirm('编辑后审核状态会成为未审核状态,您确定要编辑吗') if (e.planType == 1) { //如果是在线编辑 let id = e.id sessionStorage.setItem("planId", id) @@ -309,9 +309,148 @@ export class EntryPlanLookComponent implements OnInit { this.snackBar.open('只有二维预案和文本预案可以编辑!', '确定', config); } - } + } } + }else{ + 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) { + if(e.planMode==4){ + 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&haveNew=true`) + }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}&pattern=true`) + } + + } + 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 if (e.planType == 2) { //三维预案 + const dialogRef = this.dialog.open(ChangeUrl, { + //改网址 + data: { element: e } + }); + dialogRef.afterClosed().subscribe( + data => { + if (data) { + const config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + this.snackBar.open('修改成功!', '确定', config); + this.getAllPlanComponents() + } + } + ); + /* if (e.url.indexOf('app') == 0) { + window.location.href = e.url + } else { + sessionStorage.setItem("url", e.url) + if ((e.url as string).includes('gis/threeDimensionalHome')) { //三维预案 + window.open(`${e.url}?unitId=${this.companyId}&unitName=${this.unitdata.unitname}&editMode=true`) + } else { + window.open(`/planManagement/webLook`) + } + } */ + } else { + this.snackBar.open('只有二维预案和文本预案可以编辑!', '确定', config); + } + } else { + let isTrue = confirm('编辑后审核状态会成为未审核状态,您确定要编辑吗') + if (isTrue) { + 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 if (e.planType == 2) { //三维预案 + /* if (e.url.indexOf('app') == 0) { + window.location.href = e.url + } else { + sessionStorage.setItem("url", e.url) + if ((e.url as string).includes('gis/threeDimensionalHome')) { //三维预案 + window.open(`${e.url}?unitId=${this.companyId}&unitName=${this.unitdata.unitname}&editMode=true`) + } else { + window.open(`/planManagement/webLook`) + } + } */ + const dialogRef = this.dialog.open(ChangeUrl, { + data: { element: e } + }); + dialogRef.afterClosed().subscribe( + data => { + if (data) { + const config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + this.snackBar.open('修改成功!', '确定', config); + this.getAllPlanComponents() + + } + } + ); + } else { + + this.snackBar.open('只有二维预案和文本预案可以编辑!', '确定', config); + } + } + } + + } + } allPlanComponents: any //所有预案组件 diff --git a/src/app/plan-management/entry-plan/entry-plan.component.scss b/src/app/plan-management/entry-plan/entry-plan.component.scss index 3ffae1d..83b7d0f 100644 --- a/src/app/plan-management/entry-plan/entry-plan.component.scss +++ b/src/app/plan-management/entry-plan/entry-plan.component.scss @@ -101,6 +101,8 @@ } .tablebox{ .add{ + cursor: auto; + text-decoration: none; display: block; width: 40px; height: 20px; @@ -110,14 +112,18 @@ color: #FFFFFF; margin-left: 50px; } + .weihu{ - //display: block; + cursor: auto; + text-decoration: none; + display: block; width: 64px; height: 20px; - background: #2196F3; + background: #FFC94B; font-size: 12px; color: #FFFFFF; line-height: 20px; + margin-left: 40px; } table{ width: 100%; diff --git a/src/app/plan-management/meet-plan/meet-plan.component.scss b/src/app/plan-management/meet-plan/meet-plan.component.scss index 644ca36..4ec5923 100644 --- a/src/app/plan-management/meet-plan/meet-plan.component.scss +++ b/src/app/plan-management/meet-plan/meet-plan.component.scss @@ -112,6 +112,8 @@ } .tablebox{ .add{ + cursor: auto; + text-decoration: none; display: block; width: 40px; height: 20px; @@ -121,14 +123,18 @@ color: #FFFFFF; margin-left: 50px; } + .weihu{ - //display: block; + cursor: auto; + text-decoration: none; + display: block; width: 64px; height: 20px; - background: #2196F3; + background: #FFC94B; font-size: 12px; color: #FFFFFF; line-height: 20px; + margin-left: 40px; } table{ width: 100%; diff --git a/src/app/plan-management/onetwo-entry-plan/onetwo-entry-plan.component.scss b/src/app/plan-management/onetwo-entry-plan/onetwo-entry-plan.component.scss index c2a8398..5439277 100644 --- a/src/app/plan-management/onetwo-entry-plan/onetwo-entry-plan.component.scss +++ b/src/app/plan-management/onetwo-entry-plan/onetwo-entry-plan.component.scss @@ -122,24 +122,30 @@ } .add{ - display: block; - width: 40px; - height: 20px; - background: #1AE2AC; - font-size: 12px; - line-height: 20px; - color: #FFFFFF; - margin-left: 50px; - } - .weihu{ - //display: block; - width: 64px; - height: 20px; - background: #2196F3; - font-size: 12px; - color: #FFFFFF; - line-height: 20px; - } + cursor: auto; + text-decoration: none; + display: block; + width: 40px; + height: 20px; + background: #1AE2AC; + font-size: 12px; + line-height: 20px; + color: #FFFFFF; + margin-left: 50px; + } + + .weihu{ + cursor: auto; + text-decoration: none; + display: block; + width: 64px; + height: 20px; + background: #FFC94B; + font-size: 12px; + color: #FFFFFF; + line-height: 20px; + margin-left: 40px; + } } mat-paginator{ width: 100%; diff --git a/src/app/plan-management/open-plan/open-plan.component.scss b/src/app/plan-management/open-plan/open-plan.component.scss index a67a989..7e9f7f9 100644 --- a/src/app/plan-management/open-plan/open-plan.component.scss +++ b/src/app/plan-management/open-plan/open-plan.component.scss @@ -90,6 +90,8 @@ } .tablebox{ .add{ + cursor: auto; + text-decoration: none; display: block; width: 40px; height: 20px; @@ -99,14 +101,18 @@ color: #FFFFFF; margin-left: 50px; } + .weihu{ - //display: block; + cursor: auto; + text-decoration: none; + display: block; width: 64px; height: 20px; - background: #2196F3; + background: #FFC94B; font-size: 12px; color: #FFFFFF; line-height: 20px; + margin-left: 40px; } table{ width: 100%; diff --git a/src/app/plan-management/pass-plan/pass-plan.component.scss b/src/app/plan-management/pass-plan/pass-plan.component.scss index ae2da82..b012b72 100644 --- a/src/app/plan-management/pass-plan/pass-plan.component.scss +++ b/src/app/plan-management/pass-plan/pass-plan.component.scss @@ -96,6 +96,8 @@ } .tablebox{ .add{ + cursor: auto; + text-decoration: none; display: block; width: 40px; height: 20px; @@ -105,14 +107,18 @@ color: #FFFFFF; margin-left: 50px; } + .weihu{ - //display: block; + cursor: auto; + text-decoration: none; + display: block; width: 64px; height: 20px; - background: #2196F3; + background: #FFC94B; font-size: 12px; color: #FFFFFF; line-height: 20px; + margin-left: 40px; } table{ width: 100%; diff --git a/src/app/plan-management/reinforce-plan/reinforce-plan.component.scss b/src/app/plan-management/reinforce-plan/reinforce-plan.component.scss index 08c9400..3689b22 100644 --- a/src/app/plan-management/reinforce-plan/reinforce-plan.component.scss +++ b/src/app/plan-management/reinforce-plan/reinforce-plan.component.scss @@ -91,6 +91,8 @@ } .tablebox{ .add{ + cursor: auto; + text-decoration: none; display: block; width: 40px; height: 20px; @@ -100,14 +102,18 @@ color: #FFFFFF; margin-left: 50px; } + .weihu{ - //display: block; + cursor: auto; + text-decoration: none; + display: block; width: 64px; height: 20px; - background: #2196F3; + background: #FFC94B; font-size: 12px; color: #FFFFFF; line-height: 20px; + margin-left: 40px; } table{ width: 100%; diff --git a/src/app/plan-management/type-plan/type-plan.component.scss b/src/app/plan-management/type-plan/type-plan.component.scss index 9126325..ec93c51 100644 --- a/src/app/plan-management/type-plan/type-plan.component.scss +++ b/src/app/plan-management/type-plan/type-plan.component.scss @@ -112,6 +112,8 @@ } .tablebox{ .add{ + cursor: auto; + text-decoration: none; display: block; width: 40px; height: 20px; @@ -121,14 +123,18 @@ color: #FFFFFF; margin-left: 50px; } + .weihu{ - //display: block; + cursor: auto; + text-decoration: none; + display: block; width: 64px; height: 20px; - background: #2196F3; + background: #FFC94B; font-size: 12px; color: #FFFFFF; line-height: 20px; + margin-left: 40px; } table{ width: 100%;