|
|
|
@ -210,7 +210,6 @@ export class CollectionToolsReadComponent implements OnInit {
|
|
|
|
|
this.refurbishTreeData() |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
paperId:any = this.route.snapshot.queryParams.paperId |
|
|
|
|
planData:any //当前考题题目
|
|
|
|
@ -262,12 +261,43 @@ export class CollectionToolsReadComponent implements OnInit {
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//保存平面图
|
|
|
|
|
saveNum :any = [] |
|
|
|
|
async saveSite(){ |
|
|
|
|
|
|
|
|
|
score(){ |
|
|
|
|
let data = {score:this.planData.score} |
|
|
|
|
let dialogRef = this.dialog.open(Score,{data}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
submitScore(){ |
|
|
|
|
if(!sessionStorage.getItem('scoreNum')){ |
|
|
|
|
const config = new MatSnackBarConfig(); |
|
|
|
|
config.verticalPosition = 'top'; |
|
|
|
|
config.duration = 3000 |
|
|
|
|
this.snackBar.open('请先进行评分!','确定',config); |
|
|
|
|
}else{ |
|
|
|
|
if(window.confirm('你确定要提交此阅卷结果吗?')){ |
|
|
|
|
let params = { |
|
|
|
|
paperPlanId : this.route.snapshot.queryParams.paperplanId, |
|
|
|
|
examinationId : this.route.snapshot.queryParams.examId, |
|
|
|
|
score : sessionStorage.getItem('scoreNum') |
|
|
|
|
} |
|
|
|
|
this.http.put('/api/ExaminationPlans/ModifyScore','',{params:params}).subscribe(data => { |
|
|
|
|
const config = new MatSnackBarConfig(); |
|
|
|
|
config.verticalPosition = 'top'; |
|
|
|
|
config.duration = 1000 |
|
|
|
|
this.snackBar.open('提交成功,页面将于一秒后关闭!','确定',config); |
|
|
|
|
setTimeout(() => { |
|
|
|
|
window.close() |
|
|
|
|
}, 1000); |
|
|
|
|
}) |
|
|
|
|
return true; |
|
|
|
|
}else{ |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//获得所有的建筑物
|
|
|
|
|
getAllBuildings(){ |
|
|
|
|
this.http.get("/api/Buildings",{ |
|
|
|
@ -398,6 +428,7 @@ export class CollectionToolsReadComponent implements OnInit {
|
|
|
|
|
//点击树节点的显示隐藏icon
|
|
|
|
|
clickLookItem(node){ |
|
|
|
|
//子节点跟随父节点的islook变化
|
|
|
|
|
let iconVisibleArr:any = [] |
|
|
|
|
if(node.origin.children && node.origin.children.length != 0){ |
|
|
|
|
node.origin.isLook = !node.origin.isLook |
|
|
|
|
node.origin.children.forEach(item=>{ |
|
|
|
@ -405,45 +436,23 @@ export class CollectionToolsReadComponent implements OnInit {
|
|
|
|
|
if(item.children && item.children.length != 0){ |
|
|
|
|
item.children.forEach(i=>{ |
|
|
|
|
i.isLook = node.origin.isLook
|
|
|
|
|
if(i.children && i.children.length != 0){ |
|
|
|
|
|
|
|
|
|
}else{ |
|
|
|
|
iconVisibleArr.push(i.Id) |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
}else{ |
|
|
|
|
iconVisibleArr.push(item.Id) |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}else{ |
|
|
|
|
node.origin.isLook = !node.origin.isLook |
|
|
|
|
iconVisibleArr.push(node.origin.Id) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//canvas上的素材显隐
|
|
|
|
|
let iconVisibleArr:any = [] |
|
|
|
|
console.log(this.renderData) |
|
|
|
|
this.renderData.forEach(item =>{ |
|
|
|
|
if(item.Id && item.isLook == true){ |
|
|
|
|
iconVisibleArr.push(item.Id) |
|
|
|
|
}else{ |
|
|
|
|
if(item.children && item.children.length != 0){ |
|
|
|
|
item.children.forEach(i => { |
|
|
|
|
if(i.Id && i.isLook == true){ |
|
|
|
|
iconVisibleArr.push(i.Id) |
|
|
|
|
}else{ |
|
|
|
|
if(i.children && i.children.length != 0){ |
|
|
|
|
i.children.forEach(element => { |
|
|
|
|
if(element.Id && element.isLook == true){ |
|
|
|
|
iconVisibleArr.push(element.Id) |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
console.log(iconVisibleArr) |
|
|
|
|
// this.canvasData.originaleveryStoreyData = JSON.parse(JSON.stringify(this.originaleveryStoreyData))
|
|
|
|
|
// this.canvasData.originaleveryStoreyData.data? this.canvasData.originaleveryStoreyData.data = JSON.parse(this.canvasData.originaleveryStoreyData.data) : this.canvasData.originaleveryStoreyData.data = {}
|
|
|
|
|
// this.canvasData.originaleveryStoreyData.version? null : this.canvasData.originaleveryStoreyData.version = "2.0"
|
|
|
|
|
// this.canvasData.hiddenBasicInfoFacilities = iconVisibleArr
|
|
|
|
|
// this.canvas.onExamineeClickFloor()
|
|
|
|
|
this.canvas.setIconVisible(iconVisibleArr,true) |
|
|
|
|
console.log(node.origin.isLook) |
|
|
|
|
this.canvas.setIconVisible(iconVisibleArr, node.origin.isLook) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//打开消防设施考题设定
|
|
|
|
@ -1198,3 +1207,62 @@ export class CollectionToolsReadComponent implements OnInit {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//查看需要标记的消防设施按钮
|
|
|
|
|
@Component({ |
|
|
|
|
selector: 'score', |
|
|
|
|
templateUrl: './score.html', |
|
|
|
|
styleUrls: ['./score.scss',] |
|
|
|
|
}) |
|
|
|
|
export class Score { |
|
|
|
|
|
|
|
|
|
constructor(private http:HttpClient, public dialog: MatDialog, public snackBar: MatSnackBar, public dialogRef: MatDialogRef<any>, |
|
|
|
|
@Inject(MAT_DIALOG_DATA) public data) {} |
|
|
|
|
|
|
|
|
|
score:any |
|
|
|
|
scoreNum:any = sessionStorage.getItem('scoreNum') || '' |
|
|
|
|
ngOnInit(): void { |
|
|
|
|
console.log(this.data) |
|
|
|
|
this.score = '请输入分数 ( 此试题满分为' + this.data.score + '分 ) ' |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
isSave:boolean = false |
|
|
|
|
inputNum(){ |
|
|
|
|
if(this.scoreNum > this.data.score){ |
|
|
|
|
// this.scoreNum = this.data.score
|
|
|
|
|
const config = new MatSnackBarConfig(); |
|
|
|
|
config.verticalPosition = 'top'; |
|
|
|
|
config.duration = 3000 |
|
|
|
|
this.snackBar.open('超出最大分值!','确定',config); |
|
|
|
|
} |
|
|
|
|
if(this.scoreNum < 0){ |
|
|
|
|
// this.scoreNum = 0
|
|
|
|
|
const config = new MatSnackBarConfig(); |
|
|
|
|
config.verticalPosition = 'top'; |
|
|
|
|
config.duration = 3000 |
|
|
|
|
this.snackBar.open('分数不能为负数!','确定',config); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
ok(){ |
|
|
|
|
if(this.scoreNum > this.data.score){ |
|
|
|
|
const config = new MatSnackBarConfig(); |
|
|
|
|
config.verticalPosition = 'top'; |
|
|
|
|
config.duration = 3000 |
|
|
|
|
this.snackBar.open('超出最大分值!','确定',config); |
|
|
|
|
} |
|
|
|
|
if(this.scoreNum < 0){ |
|
|
|
|
// this.scoreNum = 0
|
|
|
|
|
const config = new MatSnackBarConfig(); |
|
|
|
|
config.verticalPosition = 'top'; |
|
|
|
|
config.duration = 3000 |
|
|
|
|
this.snackBar.open('分数不能为负数!','确定',config); |
|
|
|
|
} |
|
|
|
|
if(this.scoreNum >= 0 && this.scoreNum < this.data.score){ |
|
|
|
|
sessionStorage.setItem('scoreNum',this.scoreNum) |
|
|
|
|
this.dialogRef.close() |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |