|
|
@ -54,8 +54,8 @@ export class LeftDomainComponent implements OnInit { |
|
|
|
if (this.beforeFence === 0) { //基本信息
|
|
|
|
if (this.beforeFence === 0) { //基本信息
|
|
|
|
if (!this.baseInfo) { |
|
|
|
if (!this.baseInfo) { |
|
|
|
let params = { organizationUnitId: PlanComponent.instance.companyData.id } |
|
|
|
let params = { organizationUnitId: PlanComponent.instance.companyData.id } |
|
|
|
this.http.get('/api/services/app/GasStation/Get', { params: params }).subscribe((data: any)=>{ |
|
|
|
this.http.get('/api/services/app/GasStation/Get', { params: params }).subscribe((data: any) => { |
|
|
|
data.result.govUnitDetail? data.result.govUnitDetail = JSON.parse(data.result.govUnitDetail) : null |
|
|
|
data.result.govUnitDetail ? data.result.govUnitDetail = JSON.parse(data.result.govUnitDetail) : null |
|
|
|
this.baseInfo = data.result |
|
|
|
this.baseInfo = data.result |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
@ -88,8 +88,8 @@ export class LeftDomainComponent implements OnInit { |
|
|
|
if (this.beforeFence === 3) { //消防设施
|
|
|
|
if (this.beforeFence === 3) { //消防设施
|
|
|
|
this.handleTreeData(this.FacilityList) |
|
|
|
this.handleTreeData(this.FacilityList) |
|
|
|
} else if (this.beforeFence === 5 || this.beforeFence === 6) { //初始化 Viewer
|
|
|
|
} else if (this.beforeFence === 5 || this.beforeFence === 6) { //初始化 Viewer
|
|
|
|
let id: string = this.beforeFence === 5? "pipelineViewer" : "orvrViewer" |
|
|
|
let id: string = this.beforeFence === 5 ? "pipelineViewer" : "orvrViewer" |
|
|
|
this.FacilityList.forEach(item=>{ |
|
|
|
this.FacilityList.forEach(item => { |
|
|
|
if (item.getPropertyData() && item.getPropertyData().img) { |
|
|
|
if (item.getPropertyData() && item.getPropertyData().img) { |
|
|
|
window.setTimeout(() => { |
|
|
|
window.setTimeout(() => { |
|
|
|
new Viewer(this.element.nativeElement.querySelector(`#${id}${item.getID()}`), { url: 'data-original', navbar: false }); |
|
|
|
new Viewer(this.element.nativeElement.querySelector(`#${id}${item.getID()}`), { url: 'data-original', navbar: false }); |
|
|
@ -126,7 +126,8 @@ export class LeftDomainComponent implements OnInit { |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
PlanComponent.instance.isShowLoading = true //打开遮罩
|
|
|
|
PlanComponent.instance.isShowLoading = true //打开遮罩
|
|
|
|
let institutionKey = PlanComponent.instance.companyData.id || "ceshi"; //单位id
|
|
|
|
//let institutionKey = PlanComponent.instance.companyData.id || "ceshi"; //单位id
|
|
|
|
|
|
|
|
let institutionKey = DataManager.institutionData_simple.key; |
|
|
|
let buildingKey = PlanComponent.instance.buildingUIItems.find(item => { return item.getBuildingID() == PlanComponent.instance.beforeOneBuildingID }) |
|
|
|
let buildingKey = PlanComponent.instance.buildingUIItems.find(item => { return item.getBuildingID() == PlanComponent.instance.beforeOneBuildingID }) |
|
|
|
let url = DataManager.getResPath_facilityProperty(institutionKey, buildingKey.getBuildingID(), item.getType(), item.getID(), null) |
|
|
|
let url = DataManager.getResPath_facilityProperty(institutionKey, buildingKey.getBuildingID(), item.getType(), item.getID(), null) |
|
|
|
ServeManager.instance.openFileSelect(file, url, (name: string, path: string) => { //上传
|
|
|
|
ServeManager.instance.openFileSelect(file, url, (name: string, path: string) => { //上传
|
|
|
@ -150,7 +151,7 @@ export class LeftDomainComponent implements OnInit { |
|
|
|
deleteImg(item: FacilityInfoUIItem) { |
|
|
|
deleteImg(item: FacilityInfoUIItem) { |
|
|
|
let isDelete = confirm("您确定要删除吗?") |
|
|
|
let isDelete = confirm("您确定要删除吗?") |
|
|
|
if (isDelete) { |
|
|
|
if (isDelete) { |
|
|
|
this.http.delete(`${item.getPropertyData().img}`).subscribe(data=>{ |
|
|
|
this.http.delete(`${item.getPropertyData().img}`).subscribe(data => { |
|
|
|
item.getPropertyData().img = "" |
|
|
|
item.getPropertyData().img = "" |
|
|
|
this.message.info("删除成功!"); |
|
|
|
this.message.info("删除成功!"); |
|
|
|
}) |
|
|
|
}) |
|
|
@ -184,7 +185,7 @@ export class LeftDomainComponent implements OnInit { |
|
|
|
}) |
|
|
|
}) |
|
|
|
//编辑模式
|
|
|
|
//编辑模式
|
|
|
|
if (this.editMode) { |
|
|
|
if (this.editMode) { |
|
|
|
let isFind = this.treeData.find(item=>{ return item.key === 'XF_MHQ' }) |
|
|
|
let isFind = this.treeData.find(item => { return item.key === 'XF_MHQ' }) |
|
|
|
if (!isFind) { |
|
|
|
if (!isFind) { |
|
|
|
let primaryNode = { title: '灭火器', key: 'XF_MHQ', selectable: false, } |
|
|
|
let primaryNode = { title: '灭火器', key: 'XF_MHQ', selectable: false, } |
|
|
|
this.treeData.push(primaryNode) |
|
|
|
this.treeData.push(primaryNode) |
|
|
@ -299,8 +300,8 @@ export class LeftDomainComponent implements OnInit { |
|
|
|
|
|
|
|
|
|
|
|
//更新/初始化父组件 数据
|
|
|
|
//更新/初始化父组件 数据
|
|
|
|
updateFatherData(index) { |
|
|
|
updateFatherData(index) { |
|
|
|
PlanComponent.instance.updateTimer? window.clearTimeout(PlanComponent.instance.updateTimer) : null //清除定时器
|
|
|
|
PlanComponent.instance.updateTimer ? window.clearTimeout(PlanComponent.instance.updateTimer) : null //清除定时器
|
|
|
|
PlanComponent.instance.progressList.forEach((item,key)=>{ key >= index? PlanComponent.instance.progressList[key] = 0 : PlanComponent.instance.progressList[key] = 100 }) |
|
|
|
PlanComponent.instance.progressList.forEach((item, key) => { key >= index ? PlanComponent.instance.progressList[key] = 0 : PlanComponent.instance.progressList[key] = 100 }) |
|
|
|
PlanComponent.instance.nzCurrent = index |
|
|
|
PlanComponent.instance.nzCurrent = index |
|
|
|
PlanComponent.instance.isSuspend = true //暂停
|
|
|
|
PlanComponent.instance.isSuspend = true //暂停
|
|
|
|
} |
|
|
|
} |
|
|
|