add_circle_outline添加预案
@@ -282,8 +282,8 @@
- 编辑
- 删除
+ 编辑
+ 删除
|
diff --git a/src/app/examiner/create-test-score/create-test-score.component.ts b/src/app/examiner/create-test-score/create-test-score.component.ts
index 07bf7ad..0b073ba 100644
--- a/src/app/examiner/create-test-score/create-test-score.component.ts
+++ b/src/app/examiner/create-test-score/create-test-score.component.ts
@@ -20,7 +20,10 @@ export class CreateTestScoreComponent implements OnInit {
constructor(private router:Router,public dialog: MatDialog,private http: HttpClient,public snackBar: MatSnackBar) { }
selectedTab:number = 1 //选中的选项卡
selectTab(index){
- this.selectedTab = index
+ setTimeout(() => {
+ this.selectedTab = index
+ }, 0);
+
}
ngOnInit(): void {
for (let y = 0, length = this.unitId.length; y < length; y++){
@@ -279,7 +282,6 @@ export class CreateTestScoreComponent implements OnInit {
async getKeySite(){
let that = this
for (let y = 0, length = this.unitId.length; y < length; y++){
- console.log("xiba")
let element = this.unitId[y]
//获得单位重点部位
@@ -531,13 +533,6 @@ export class CreateTestScoreComponent implements OnInit {
stopPropagation($event){
$event.stopPropagation()
}
- //模拟预案数据
- planDatas:any = [
- {name:'5楼电路故障灾情扑救',or:'上海总队',time:'2020-09-24',isOpen:'未公开',level:'总队',score:0},
- {name:'6楼电路故障灾情扑救',or:'上海总队',time:'2020-09-24',isOpen:'未公开',level:'总队',score:0},
- {name:'7楼电路故障灾情扑救',or:'上海总队',time:'2020-09-24',isOpen:'未公开',level:'总队',score:0}
- ]
-
defaultCheckedKeys = []; //指定选中复选框的树节点 key值
defaultExpandedKeys = []; //展开指定的树节点 key值
defaultSelectedKeys = []; //指定选中的树节点 key值
@@ -550,11 +545,6 @@ export class CreateTestScoreComponent implements OnInit {
calculateScore(key){
//key代表第几个建筑
//计算整个单位的总分
- // console.log(this.unitId[key].basicInfoScore)
- // console.log(this.unitId[key].aroundScore)
- // console.log(this.unitId[key].keySiteScore)
- // console.log(this.unitId[key].funDivScore)
- // console.log(this.unitId[key].fireFacScore)
this.unitId[key].score = this.unitId[key].basicInfoScore + this.unitId[key].aroundScore + this.unitId[key].keySiteScore + this.unitId[key].funDivScore + this.unitId[key].fireFacScore
//计算整个试卷的总分
@@ -760,7 +750,25 @@ export class CreateTestScoreComponent implements OnInit {
})
this.examScore = examScore + examScore2
}
-
+ //编辑每条预案试卷
+ edit(item){
+ const config = new MatSnackBarConfig();
+ config.verticalPosition = 'top';
+ config.duration = 3000
+ this.snackBar.open('暂不能编辑','确定',config);
+ }
+ //删除每条预案试卷
+ deletePlan(item){
+ this.unitId[this.selectedUnitIndex].planList.forEach((element,key)=>{
+ if(item == element){
+ this.unitId[this.selectedUnitIndex].planList.splice(key,1)
+ }
+ })
+ const config = new MatSnackBarConfig();
+ config.verticalPosition = 'top';
+ config.duration = 3000
+ this.snackBar.open('删除成功','确定',config);
+ }
//保存
save(){
let copyDatas = JSON.parse(JSON.stringify(this.unitId))
diff --git a/src/app/ui/collection-tools/collection-tools.component.html b/src/app/ui/collection-tools/collection-tools.component.html
index 32493aa..4760694 100644
--- a/src/app/ui/collection-tools/collection-tools.component.html
+++ b/src/app/ui/collection-tools/collection-tools.component.html
@@ -104,7 +104,7 @@
-
+
{{node.name}}
@@ -113,7 +113,7 @@
check_circle_outline
-
+