Browse Source

[新增]预案编制按钮加提示

tangshan
陈敬瑜 3 years ago
parent
commit
e5c5c29343
  1. 8
      src/app/plan-management/entry-plan-look/entry-plan-look.component.ts

8
src/app/plan-management/entry-plan-look/entry-plan-look.component.ts

@ -174,6 +174,8 @@ export class EntryPlanLookComponent implements OnInit {
const config = new MatSnackBarConfig(); const config = new MatSnackBarConfig();
config.verticalPosition = 'top'; config.verticalPosition = 'top';
config.duration = 3000 config.duration = 3000
let isTrue = confirm('您确定编辑吗,若是公开预案会变成未公开状态')
if(isTrue){
if (e.auditStatus == 8) { if (e.auditStatus == 8) {
if (e.planType == 1) { //如果是在线编辑 if (e.planType == 1) { //如果是在线编辑
let id = e.id let id = e.id
@ -309,7 +311,7 @@ export class EntryPlanLookComponent implements OnInit {
} }
} }
} }
}
} }
allPlanComponents: any //所有预案组件 allPlanComponents: any //所有预案组件
@ -384,6 +386,8 @@ export class EntryPlanLookComponent implements OnInit {
this.http.delete(`/api/PlanComponents2D/${plandata.id}`).subscribe(data => { this.http.delete(`/api/PlanComponents2D/${plandata.id}`).subscribe(data => {
this.snackBar.open('删除成功!', '确定', config); this.snackBar.open('删除成功!', '确定', config);
this.getAllPlanComponents() this.getAllPlanComponents()
},err=>{
this.snackBar.open(err, '确定', config);
}) })
} else { } else {
this.http.delete(`/api/PlanComponents/${plandata.id}`).subscribe(data => { this.http.delete(`/api/PlanComponents/${plandata.id}`).subscribe(data => {
@ -392,6 +396,8 @@ export class EntryPlanLookComponent implements OnInit {
config.duration = 3000 config.duration = 3000
this.snackBar.open('删除成功!', '确定', config); this.snackBar.open('删除成功!', '确定', config);
this.getAllPlanComponents() this.getAllPlanComponents()
},err=>{
this.snackBar.open(err, '确定', config);
}) })
} }
} }

Loading…
Cancel
Save