|
|
@ -69,11 +69,18 @@ export class PlanComponent implements OnInit { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
ngAfterViewInit(): void { |
|
|
|
ngAfterViewInit(): void { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let simpleData: InsitutionDataSimple = new InsitutionDataSimple(); |
|
|
|
|
|
|
|
simpleData.id = 1; |
|
|
|
|
|
|
|
simpleData.key = "ceshi"; |
|
|
|
|
|
|
|
simpleData.name = "测试"; |
|
|
|
|
|
|
|
|
|
|
|
let loginStatus = StatusManager.getStatus<LoginSatus>(LoginSatus); |
|
|
|
let loginStatus = StatusManager.getStatus<LoginSatus>(LoginSatus); |
|
|
|
loginStatus.getInstitutionListFromServe((result: InsitutionDataSimple[], data: any) => { |
|
|
|
//loginStatus.getInstitutionListFromServe((result: InsitutionDataSimple[], data: any) => {
|
|
|
|
if (ModeManager.institutionDemoKey == ModeManager.c_demoKey_null) { //无指定测试单位,则为正式启动,根据当前单位key寻找
|
|
|
|
if (ModeManager.institutionDemoKey == ModeManager.c_demoKey_null) { //无指定测试单位,则为正式启动,根据当前单位key寻找
|
|
|
|
let key = 'ceshi'; |
|
|
|
let key = 'ceshi'; |
|
|
|
let find = data.find(item => { return item.key === key }) |
|
|
|
//let find = data.find(item => { return item.key === key })
|
|
|
|
|
|
|
|
let find = simpleData; |
|
|
|
if (find) { //如果在data中找到了对应的单位key,则表示已经有三维数据,直接进入
|
|
|
|
if (find) { //如果在data中找到了对应的单位key,则表示已经有三维数据,直接进入
|
|
|
|
this.beforeOneSatus = StatusManager.getStatus<LoginSatus>(LoginSatus); |
|
|
|
this.beforeOneSatus = StatusManager.getStatus<LoginSatus>(LoginSatus); |
|
|
|
this.beforeOneSatus.onSelectInsSuccess(find) |
|
|
|
this.beforeOneSatus.onSelectInsSuccess(find) |
|
|
@ -81,20 +88,22 @@ export class PlanComponent implements OnInit { |
|
|
|
let isAdd = confirm('没有单位' + key + ',是否进行初始化?') |
|
|
|
let isAdd = confirm('没有单位' + key + ',是否进行初始化?') |
|
|
|
if (isAdd) { |
|
|
|
if (isAdd) { |
|
|
|
let name = key; |
|
|
|
let name = key; |
|
|
|
loginStatus.createInsitution(key, name); |
|
|
|
let id = 2;// 单位id
|
|
|
|
|
|
|
|
loginStatus.createInsitution(key, name, id); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
let find = data.find(item => { return item.key === ModeManager.institutionDemoKey }) |
|
|
|
//let find = data.find(item => { return item.key === ModeManager.institutionDemoKey })
|
|
|
|
|
|
|
|
let find = simpleData; //测试单位
|
|
|
|
if (find) { |
|
|
|
if (find) { |
|
|
|
sessionStorage.setItem('unitId', find.key) |
|
|
|
sessionStorage.setItem('unitId', find.key) |
|
|
|
this.beforeOneSatus = StatusManager.getStatus<LoginSatus>(LoginSatus); |
|
|
|
this.beforeOneSatus = StatusManager.getStatus<LoginSatus>(LoginSatus); |
|
|
|
this.beforeOneSatus.onSelectInsSuccess(find) |
|
|
|
this.beforeOneSatus.onSelectInsSuccess(find) |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
this.modelInit(data) //开发模式 选择单位 弹窗
|
|
|
|
//this.modelInit(data) //开发模式 选择单位 弹窗
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
//});
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
ngOnDestroy(): void { //组件销毁前 销毁canvas
|
|
|
|
ngOnDestroy(): void { //组件销毁前 销毁canvas
|
|
|
@ -310,7 +319,7 @@ export class PlanComponent implements OnInit { |
|
|
|
selectProperty(e: FacilityInfoUIItem) { |
|
|
|
selectProperty(e: FacilityInfoUIItem) { |
|
|
|
this.isShowNature = true |
|
|
|
this.isShowNature = true |
|
|
|
this.beforeOnePropertyData = e |
|
|
|
this.beforeOnePropertyData = e |
|
|
|
console.log(e.getPropertyData(),'选中设备') |
|
|
|
console.log(e.getPropertyData(), '选中设备') |
|
|
|
if (this.isShowChildComponent && this.leftDomain) { |
|
|
|
if (this.isShowChildComponent && this.leftDomain) { |
|
|
|
this.leftDomain.selectFacilityId = e.getID() |
|
|
|
this.leftDomain.selectFacilityId = e.getID() |
|
|
|
} |
|
|
|
} |
|
|
|