From 83770e08c720d4130807a785019003abe65ed315 Mon Sep 17 00:00:00 2001 From: SHAOJIAHAO <55341701@qq.com> Date: Thu, 12 Jan 2023 15:09:05 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=AE=8C=E5=96=84]=E4=BF=AE=E6=94=B9=E9=A2=84?= =?UTF-8?q?=E6=A1=88=E5=AE=A1=E6=A0=B8=E6=8F=90=E7=A4=BAbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../entry-plan-look.component.ts | 35 +++-------- .../meet-plan/meet-plan.component.ts | 60 +++++++++---------- .../onetwo-entry-plan.component.ts | 21 +++---- .../type-plan/type-plan.component.ts | 14 ++--- 4 files changed, 54 insertions(+), 76 deletions(-) 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 97935bf..4f2910d 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 @@ -570,28 +570,23 @@ export class EntryPlanLookComponent implements OnInit { const config = new MatSnackBarConfig(); config.verticalPosition = 'top'; config.duration = 3000 - /* if(element.auditStatus == 4){ - this.snackBar.open('审核退回的预案需要修改后方可再次提交审核!','确定',config); - } */ + if (element.auditStatus == 4 || element.auditStatus == 32) { + this.snackBar.open('审核退回的预案需要修改后方可再次提交审核!', '确定', config); + } if (element.planType == 1) {//如果提交审核的是二维预案 - if (element.auditStatus == 8) { + if (element.auditStatus == 8 || (element.auditStatus == 2 && !element.isNewData)) { this.http.put(`/api/PlanComponents2D/${element.id}/Commit`, "").subscribe(data => { this.getAllPlanComponents() - }/* ,err => { - this.snackBar.open(err,'确定',config); - } */) - } - else { - this.snackBar.open('审核退回的预案需要修改后方可再次提交审核!', '确定', config); + }) } } else { this.http.put(`/api/PlanComponents/${element.id}/Commit`, "").subscribe(data => { this.getAllPlanComponents() }) } - - } + + //撤销审核 cancelAudit(element) { if (element.planType == 1) {//如果撤销审核的是二维预案 @@ -601,29 +596,15 @@ export class EntryPlanLookComponent implements OnInit { } else { this.http.put(`/api/PlanComponents/${element.id}/Cancel`, "").subscribe(data => { this.getAllPlanComponents() - }/* ,err => { - const config = new MatSnackBarConfig(); - config.verticalPosition = 'top'; - config.duration = 3000 - this.snackBar.open(err,'确定',config); - } */) + }) } } //审核结果 auditResult(element) { - // console.log(element) const dialogRef = this.dialog.open(AuditResult, { width: "395px", data: { element: element } }); - dialogRef.afterClosed().subscribe( - data => { - if (data) { - - } - } - ); - } //下载↓ 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 943ee8d..c4e7dcb 100644 --- a/src/app/plan-management/meet-plan/meet-plan.component.ts +++ b/src/app/plan-management/meet-plan/meet-plan.component.ts @@ -83,8 +83,8 @@ export class MeetPlanComponent implements OnInit { preparelevels: any plcheck: boolean //编制级别勾选框 - IsNewData='' //维护更新活新增 - displayedColumns: string[] = ['state','unitname', 'level', 'addname', 'addtime', 'plantype', 'isopen', 'projectlevel','passstate','weihustate', 'operation']; + IsNewData = '' //维护更新活新增 + displayedColumns: string[] = ['state', 'unitname', 'level', 'addname', 'addtime', 'plantype', 'isopen', 'projectlevel', 'passstate', 'weihustate', 'operation']; tabledataSource typePlan//新预案类型 unitname//预案名称 @@ -142,7 +142,7 @@ export class MeetPlanComponent implements OnInit { HasChildrenPlanLevel: this.plcheck || '', PageNumber: this.PageNumber || '1', PageSize: this.pageSizeOptions[0], - IsNewData:this.IsNewData, + IsNewData: this.IsNewData, } this.http.get("/api/PlanComponentsMajor", { params: paramsdata }).subscribe((data: any) => { this.length = data.totalCount @@ -166,29 +166,29 @@ export class MeetPlanComponent implements OnInit { this.PageNumber = 1 this.pageEvent.pageIndex = 0 let reservePlanType - this.reservePlanType ? reservePlanType = JSON.parse(JSON.stringify(this.reservePlanType)) : reservePlanType = '' - if (this.reservePlanType && this.reservePlanType.length != 0) { - reservePlanType = eval(this.reservePlanType.join("|")) - } - let paramsdata: any = { - Name: this.unitname || '', - planCategories: this.level || [6, 7], - //PlanType:reservePlanType||'', - DisasterType: this.typePlan || '', - CreatorName: this.addname || '', - AuditStatus: this.unitstate || '', - CreationTimeRangeStart: this.addtime || '', - CreationTimeRangeEnd: this.endtime || '', - PlanLevel: this.projectlevel || '', - HasChildrenPlanLevel: this.plcheck || '', - PageNumber: this.PageNumber || '1', - PageSize: this.pageSizeOptions[0], - IsNewData:this.IsNewData, - } - this.http.get("/api/PlanComponentsMajor", { params: paramsdata }).subscribe((data: any) => { - this.length = data.totalCount - this.tabledataSource = data.items - }) + this.reservePlanType ? reservePlanType = JSON.parse(JSON.stringify(this.reservePlanType)) : reservePlanType = '' + if (this.reservePlanType && this.reservePlanType.length != 0) { + reservePlanType = eval(this.reservePlanType.join("|")) + } + let paramsdata: any = { + Name: this.unitname || '', + planCategories: this.level || [6, 7], + //PlanType:reservePlanType||'', + DisasterType: this.typePlan || '', + CreatorName: this.addname || '', + AuditStatus: this.unitstate || '', + CreationTimeRangeStart: this.addtime || '', + CreationTimeRangeEnd: this.endtime || '', + PlanLevel: this.projectlevel || '', + HasChildrenPlanLevel: this.plcheck || '', + PageNumber: this.PageNumber || '1', + PageSize: this.pageSizeOptions[0], + IsNewData: this.IsNewData, + } + this.http.get("/api/PlanComponentsMajor", { params: paramsdata }).subscribe((data: any) => { + this.length = data.totalCount + this.tabledataSource = data.items + }) } } @@ -215,9 +215,9 @@ export class MeetPlanComponent implements OnInit { const config = new MatSnackBarConfig(); config.verticalPosition = 'top'; config.duration = 3000 - /* if(element.auditStatus == 4){ - this.snackBar.open('审核退回的预案需要修改后方可再次提交审核!','确定',config); - } */ + if (element.auditStatus == 4 || element.auditStatus == 32) { + this.snackBar.open('审核退回的预案需要修改后方可再次提交审核!', '确定', config); + } this.http.put(`/api/PlanComponentsMajor/${element.id}/Commit`, "").subscribe(data => { this.getAlltabledate() }, err => { @@ -369,7 +369,7 @@ export class MeetPlanComponent implements OnInit { this.unitstate = '' this.projectlevel = '' this.plcheck = false - this.IsNewData='' + this.IsNewData = '' this.getAlltabledate() } //新增预案弹窗 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 3fa4bf5..06a56c3 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 @@ -95,7 +95,7 @@ export class OnetwoEntryPlanComponent implements OnInit { url preparelevels: any plcheck: boolean //编制级别勾选框 - displayedColumns: string[] = ['state','unitname', 'level', 'addname', 'addtime', 'plantype', 'isopen', 'projectlevel', 'passstate','weihustate','operation']; + displayedColumns: string[] = ['state', 'unitname', 'level', 'addname', 'addtime', 'plantype', 'isopen', 'projectlevel', 'passstate', 'weihustate', 'operation']; tabledataSource unitname//预案名称 level//预案级别 @@ -114,7 +114,7 @@ export class OnetwoEntryPlanComponent implements OnInit { pageSize: any; //每页条数 pageSizeOptions: number[] = [10] //设置每页条数 PageNumber: any; //第几页 - IsNewData='' //维护更新活新增 + IsNewData = '' //维护更新活新增 //获取表格数据 getAlltabledate() { @@ -136,7 +136,7 @@ export class OnetwoEntryPlanComponent implements OnInit { HasChildrenPlanLevel: this.plcheck || '', PageNumber: this.PageNumber || '1', PageSize: this.pageSizeOptions[0], - IsNewData:this.IsNewData, + IsNewData: this.IsNewData, } this.http.get("/api/PlanComponentsMajor", { params: paramsdata }).subscribe((data: any) => { this.length = data.totalCount @@ -151,7 +151,7 @@ export class OnetwoEntryPlanComponent implements OnInit { //重置 reset() { - this.IsNewData='' + this.IsNewData = '' this.typePlan = '' this.unitname = '' this.level = '' @@ -192,12 +192,9 @@ export class OnetwoEntryPlanComponent implements OnInit { const config = new MatSnackBarConfig(); config.verticalPosition = 'top'; config.duration = 3000 - /* if(element.auditStatus == 4){ - const config = new MatSnackBarConfig(); - config.verticalPosition = 'top'; - config.duration = 3000 - this.snackBar.open('审核退回的预案需要修改后方可再次提交审核!','确定',config); - } */ + if (element.auditStatus == 4 || element.auditStatus == 32) { + this.snackBar.open('审核退回的预案需要修改后方可再次提交审核!', '确定', config); + } this.http.put(`/api/PlanComponentsMajor/${element.id}/Commit`, "").subscribe(data => { this.getAlltabledate() }, err => { @@ -225,9 +222,9 @@ export class OnetwoEntryPlanComponent implements OnInit { let arr = fetchUrl.split('.') arr[arr.length - 1] = 'pdf' window.open(`/api/Objects/PlanPlatform/` + arr.join('.')) - }else if (suffix == 'pdf') { + } else if (suffix == 'pdf') { window.open(`/api/Objects/PlanPlatform/` + element.attachmentUrls[0]) - }else{ + } else { let config = new MatSnackBarConfig(); config.verticalPosition = 'top'; config.duration = 3000 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 6448a64..147a395 100644 --- a/src/app/plan-management/type-plan/type-plan.component.ts +++ b/src/app/plan-management/type-plan/type-plan.component.ts @@ -89,8 +89,8 @@ export class TypePlanComponent implements OnInit { levels preparelevels: any plcheck: boolean //编制级别勾选框 - IsNewData='' //维护更新活新增 - displayedColumns: string[] = ['state','unitname', 'addname', 'addtime', 'plantype', 'isopen', 'projectlevel','passstate','weihustate', 'operation']; + IsNewData = '' //维护更新活新增 + displayedColumns: string[] = ['state', 'unitname', 'addname', 'addtime', 'plantype', 'isopen', 'projectlevel', 'passstate', 'weihustate', 'operation']; tabledataSource unitname//预案名称 level//预案级别 @@ -122,7 +122,7 @@ export class TypePlanComponent implements OnInit { HasChildrenPlanLevel: this.plcheck || '', PageNumber: this.PageNumber || '1', PageSize: this.pageSizeOptions[0], - IsNewData:this.IsNewData, + IsNewData: this.IsNewData, } this.http.get("/api/PlanComponentsMajor", { params: paramsdata }).subscribe((data: any) => { this.length = data.totalCount @@ -137,7 +137,7 @@ export class TypePlanComponent implements OnInit { //重置 reset() { - this.IsNewData='' + this.IsNewData = '' this.unitname = '' this.level = '' this.addname = '' @@ -177,9 +177,9 @@ export class TypePlanComponent implements OnInit { const config = new MatSnackBarConfig(); config.verticalPosition = 'top'; config.duration = 3000 - /* if(element.auditStatus == 4){ - this.snackBar.open('审核退回的预案需要修改后方可再次提交审核!','确定',config); - } */ + if (element.auditStatus == 4 || element.auditStatus == 32) { + this.snackBar.open('审核退回的预案需要修改后方可再次提交审核!', '确定', config); + } this.http.put(`/api/PlanComponentsMajor/${element.id}/Commit`, "").subscribe(data => { this.getAlltabledate() }, err => {