|
|
|
@ -11,7 +11,7 @@ import { Component, Inject, OnInit, Renderer2, ViewChild, Input } from '@angular
|
|
|
|
|
import { ActivatedRoute } from '@angular/router'; |
|
|
|
|
import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; |
|
|
|
|
import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar'; |
|
|
|
|
|
|
|
|
|
import Viewer from 'viewerjs'; |
|
|
|
|
@Component({ |
|
|
|
|
selector: 'app-create-plan-online-five', |
|
|
|
|
templateUrl: './create-plan-online-five.component.html', |
|
|
|
@ -142,9 +142,42 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
|
|
|
|
|
addkeyImgItem(item) { |
|
|
|
|
item.attribute.push({ name: '', imgArr: [] }) |
|
|
|
|
} |
|
|
|
|
//通过左侧查看实景图
|
|
|
|
|
gallery |
|
|
|
|
lookkeyImgItemLeft(key1, key2,i) { |
|
|
|
|
// setTimeout(() => {
|
|
|
|
|
// if (document.getElementById('viewerjs')) {
|
|
|
|
|
// this.gallery = new Viewer(document.getElementById('viewerjs'), {
|
|
|
|
|
// url: 'data-original'
|
|
|
|
|
// });
|
|
|
|
|
// console.log('这个号甲就',document.getElementById('viewerjs'))
|
|
|
|
|
// }
|
|
|
|
|
// }, 0);
|
|
|
|
|
let dom = document.getElementById(`viewerjs`) |
|
|
|
|
let pObjs = dom.childNodes; |
|
|
|
|
let node = document.createElement("img") |
|
|
|
|
node.style.display = "none"; |
|
|
|
|
node.src = '/api/Objects/PlanPlatform/' + i.imageUrl; |
|
|
|
|
node.id = 'img' |
|
|
|
|
dom.appendChild(node) |
|
|
|
|
setTimeout(() => { |
|
|
|
|
let viewer = new Viewer(document.getElementById(`viewerjs`), { |
|
|
|
|
hidden: () => { |
|
|
|
|
dom.removeChild(pObjs[0]); |
|
|
|
|
viewer.destroy(); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
node.click(); |
|
|
|
|
}, 0); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
//通过左侧实景图增加分组
|
|
|
|
|
addkeyImgItemLeft(i) { |
|
|
|
|
console.log(i) |
|
|
|
|
addkeyImgItemLeft(item, i) { |
|
|
|
|
this.planTemplateData.forEach(element => { |
|
|
|
|
if (element.groupName == '重点图示') { |
|
|
|
|
element.attribute.push({ name: item.name + '-' + i.name, imgArr: ['/api/Objects/PlanPlatform/' + i.imageUrl] }) |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
//重点图示删除指定分组
|
|
|
|
|
deleteItem(item, key) { |
|
|
|
|