Browse Source

[完善]完善代码

master
邵佳豪 3 years ago
parent
commit
324a4264e9
  1. 12
      src/app/examiner/create-test-score/create-test-score.component.ts
  2. 5
      src/app/ui/collection-tools-examinee/collection-tools.component.ts
  3. 8
      src/app/ui/collection-tools/collection-tools.component.ts
  4. 1
      src/app/ui/collection-tools/save.ts

12
src/app/examiner/create-test-score/create-test-score.component.ts

@ -1285,17 +1285,17 @@ export class CreateTestScoreComponent implements OnInit {
paperDataInfo:paperDataInfo
}
this.http.put(`/api/Papers/UpdatePaperData/${sessionStorage.getItem('paperId')}`,body).subscribe(data => {
const dialogRef = this.dialog.open(editorsDia, {
width: '650px',
data: this.editdata
});
/* const config = new MatSnackBarConfig();
// const dialogRef = this.dialog.open(editorsDia, {
// width: '650px',
// data: this.editdata
// });
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open('创建试卷成功,页面将于一秒后退出','确定',config);
setTimeout(() => {
this.router.navigateByUrl('/home/createexam-index')
}, 1000); */
}, 1000);
})
})

5
src/app/ui/collection-tools-examinee/collection-tools.component.ts

@ -424,7 +424,7 @@ export class CollectionToolsExamineeComponent implements OnInit {
}
async ngOnInit(): Promise<void> {
this.canvasData.gameMode = GameMode.Assignment
this.getAllLibrary('plan') //获取素材库
this.getAllBuildings() //获取所有建筑
this.getAllFirePlan() //获取当前单位灾情
@ -518,7 +518,7 @@ export class CollectionToolsExamineeComponent implements OnInit {
ngAfterViewInit(): void {
this.canvasData.gameMode = GameMode.Examinee
this.getSitePlan() //获取总平面图/楼层
// 监听canvas组件选中素材事件
@ -586,6 +586,7 @@ export class CollectionToolsExamineeComponent implements OnInit {
if (this.selectingSitePlan && this.selectingSitePlan.id) {
let SitePlanData = JSON.parse(JSON.stringify(this.canvasData.examOriginaleveryStoreyData));
console.log('基本信息素材',SitePlanData,this.canvasData.gameMode)
SitePlanData.data = JSON.stringify(SitePlanData.data)
SitePlanData.examinationId = this.route.snapshot.queryParams.examId
SitePlanData.planComponentId = this.route.snapshot.queryParams.planComponentId

8
src/app/ui/collection-tools/collection-tools.component.ts

@ -229,7 +229,7 @@ export class CollectionToolsComponent implements OnInit {
targetNodeData.forEach(i => {
idArr.push(i.id)
})
console.log(6666666666666,event);
// console.log(6666666666666,event);
if(this.pos == 0 && event.node.origin.children.length == 1){
console.log("移入,没有兄弟")
let key = event.dragNode.key
@ -633,7 +633,7 @@ export class CollectionToolsComponent implements OnInit {
}
ngOnInit(): void {
this.canvasData.gameMode = GameMode.Examinee
this.getAllLibrary('plan') //获取素材库
this.getAllBuildings() //获取所有建筑
this.getAllFirePlan() //获取当前单位灾情
@ -662,6 +662,7 @@ export class CollectionToolsComponent implements OnInit {
// 监听canvas组件选中素材事件
this.canvas.on("select",obj=>{
//选中素材属性注入函数
console.log(1111)
this.setAssetsProperty(obj.assetData)
})
// 监听canvas组件取消选中素材事件
@ -670,6 +671,7 @@ export class CollectionToolsComponent implements OnInit {
})
// 监听canvas组件新增素材事件
this.canvas.on("createIcon",obj=>{
console.log(2222,this.canvasData.selectPanelPoint.Data)
this.renovateTreeData(false)
})
// 监听canvas组件删除素材事件
@ -902,7 +904,7 @@ export class CollectionToolsComponent implements OnInit {
this.storeyData = storeyData
let data = JSON.parse(JSON.stringify(this.allFireElements)) //所有消防要素模板
console.log(889,this.storeyData)
// console.log(889,this.storeyData)
let treeData = [] //tree型 处理完成后的数据
this.allFireElements.forEach(element => {
element.key = element.id

1
src/app/ui/collection-tools/save.ts

@ -274,6 +274,7 @@ export class saveOneDialog {
// console.log(6666,data)
// let postdata =JSON.parse(JSON.stringify(this.canvasData.selectPanelPoint))
// postdata.Data = JSON.stringify(postdata.Data)
console.log('处置素材',this.canvasData.selectPanelPoint.Data)
let objData = {
id: null,
data: JSON.stringify(this.canvasData.selectPanelPoint.Data) || null,

Loading…
Cancel
Save