Browse Source

[完善]基本信息素材tag为1

master
邵佳豪 4 years ago
parent
commit
6b90c51ae3
  1. 16
      src/app/ui/collection-tools-examinee/collection-tools.component.ts

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

@ -1,4 +1,4 @@
import { Component, OnInit, Inject, ViewChild,ElementRef,Renderer2, ViewContainerRef } from '@angular/core'; import { Component, OnInit, Inject, ViewChild,ElementRef,Renderer2, ViewContainerRef, ɵConsole } from '@angular/core';
import { HttpClient, HttpHeaders } from '@angular/common/http'; import { HttpClient, HttpHeaders } from '@angular/common/http';
import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar'; import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar';
@ -483,6 +483,9 @@ export class CollectionToolsExamineeComponent implements OnInit {
.subscribe((data:any) => { .subscribe((data:any) => {
console.log(index,data) console.log(index,data)
if(data && data.length != 0){ if(data && data.length != 0){
data.forEach(item => {
item.tag = 1
})
element.images = data element.images = data
this.basicAssetLibraries.push( this.basicAssetLibraries.push(
element element
@ -492,7 +495,7 @@ export class CollectionToolsExamineeComponent implements OnInit {
}) })
}) })
} }
console.log(55555,this.basicAssetLibraries) // console.log(55555,this.basicAssetLibraries)
this.allLibrary = [...this.originalallLibrary,...this.basicAssetLibraries] this.allLibrary = [...this.originalallLibrary,...this.basicAssetLibraries]
}) })
@ -508,6 +511,7 @@ export class CollectionToolsExamineeComponent implements OnInit {
this.canvas.on("select",obj=>{ this.canvas.on("select",obj=>{
//选中素材属性注入函数 //选中素材属性注入函数
this.setAssetsProperty(obj.assetData) this.setAssetsProperty(obj.assetData)
}) })
// 监听canvas组件取消选中素材事件 // 监听canvas组件取消选中素材事件
this.canvas.on("deselect",obj=>{ this.canvas.on("deselect",obj=>{
@ -515,6 +519,7 @@ export class CollectionToolsExamineeComponent implements OnInit {
}) })
// 监听canvas组件新增素材事件 // 监听canvas组件新增素材事件
this.canvas.on("createIcon",obj=>{ this.canvas.on("createIcon",obj=>{
console.log(obj.assetData)
// this.renovateTreeData(false) // this.renovateTreeData(false)
}) })
// 监听canvas组件删除素材事件 // 监听canvas组件删除素材事件
@ -1076,7 +1081,8 @@ export class CollectionToolsExamineeComponent implements OnInit {
let examParams = { let examParams = {
sitePlanId : e.id, sitePlanId : e.id,
examinationId : this.route.snapshot.queryParams.examId examinationId : this.route.snapshot.queryParams.examId,
planComponentId : this.route.snapshot.queryParams.planComponentId
} }
this.http.get('/api/ExamSitePlanData',{params:examParams}).subscribe((data:any)=>{ this.http.get('/api/ExamSitePlanData',{params:examParams}).subscribe((data:any)=>{
console.log("cnm1",data) console.log("cnm1",data)
@ -1098,7 +1104,8 @@ export class CollectionToolsExamineeComponent implements OnInit {
this.canvasData.originaleveryStoreyData.buildingAreaId? null : this.canvasData.originaleveryStoreyData.buildingAreaId = e.id || null this.canvasData.originaleveryStoreyData.buildingAreaId? null : this.canvasData.originaleveryStoreyData.buildingAreaId = e.id || null
let examParams = { let examParams = {
buildingAreaId : e.id, buildingAreaId : e.id,
examinationId : this.route.snapshot.queryParams.examId examinationId : this.route.snapshot.queryParams.examId,
planComponentId : this.route.snapshot.queryParams.planComponentId
} }
this.http.get('/api/ExamBuildingAreaData',{params:examParams}).subscribe((data:any)=>{ this.http.get('/api/ExamBuildingAreaData',{params:examParams}).subscribe((data:any)=>{
console.log("cnm2",data) console.log("cnm2",data)
@ -1430,6 +1437,7 @@ export class CollectionToolsExamineeComponent implements OnInit {
//点击选中素材库图片时 //点击选中素材库图片时
selectImg (item,items,index) { selectImg (item,items,index) {
console.log(66666666,items)
this.selectLibrary = item.name this.selectLibrary = item.name
this.selectImage = items this.selectImage = items
this.selectImageIndex = index this.selectImageIndex = index

Loading…
Cancel
Save