diff --git a/src/app/pages/left-domain/left-domain.component.html b/src/app/pages/left-domain/left-domain.component.html index ff2a673..3aacebb 100644 --- a/src/app/pages/left-domain/left-domain.component.html +++ b/src/app/pages/left-domain/left-domain.component.html @@ -101,8 +101,7 @@

- - +

@@ -126,8 +125,18 @@

+
+
+

连接的加油机

+

连接的油罐

+
+
+

+

+
+
-

设计图纸

+

设计图纸

@@ -186,6 +195,9 @@ + + +
diff --git a/src/app/pages/left-domain/left-domain.component.ts b/src/app/pages/left-domain/left-domain.component.ts index f162dbf..ba39a28 100644 --- a/src/app/pages/left-domain/left-domain.component.ts +++ b/src/app/pages/left-domain/left-domain.component.ts @@ -36,6 +36,7 @@ export class LeftDomainComponent implements OnInit { FacilityList: FacilityInfoUIItem[] = []; //统计设备 list selectFacilityId: string = null; //选中设备 ID baseInfo: any; //基本信息 + isShowBaseDialog: boolean = false; //显隐 编辑信息/导出Excel 弹窗 //初始化组件 initComponent(type?: number) { @@ -351,17 +352,29 @@ export class LeftDomainComponent implements OnInit { } } + originalData: any; //sessionStorage 原始数据 + //编辑信息 editInfo() { - + this.originalData = sessionStorage.getItem('userdata') + let userdata = { organization: PlanComponent.instance.companyData, hideCloseBtn: true } + sessionStorage.setItem('userdata', JSON.stringify(userdata)) + this.isShowBaseDialog = true } //导出Excel deriveExcel() { - + this.originalData = sessionStorage.getItem('userdata') + let userdata = { organization: PlanComponent.instance.companyData, hideCloseBtn: true } + sessionStorage.setItem('userdata', JSON.stringify(userdata)) + this.isShowBaseDialog = true } - + //关闭 编辑信息/导出Excel 弹窗 + closeBaseInfoDialog() { + sessionStorage.setItem('userdata', this.originalData) + this.isShowBaseDialog = false + } } diff --git a/src/app/pages/oil-station-info/oil-station-info.component.html b/src/app/pages/oil-station-info/oil-station-info.component.html index 441c74f..ca5f682 100644 --- a/src/app/pages/oil-station-info/oil-station-info.component.html +++ b/src/app/pages/oil-station-info/oil-station-info.component.html @@ -372,7 +372,7 @@ -
+
\ No newline at end of file diff --git a/src/app/pages/plan/plan.component.html b/src/app/pages/plan/plan.component.html index 8769b30..14d41b5 100644 --- a/src/app/pages/plan/plan.component.html +++ b/src/app/pages/plan/plan.component.html @@ -57,6 +57,10 @@
+
+
方向
+
+
详情
diff --git a/src/app/pages/plan/plan.component.scss b/src/app/pages/plan/plan.component.scss index bec982c..a14884e 100644 --- a/src/app/pages/plan/plan.component.scss +++ b/src/app/pages/plan/plan.component.scss @@ -194,6 +194,7 @@ padding: 0 20px; margin-bottom: 5px; .natureTitle{ margin-bottom: 5px; height: 20px; line-height: 20px; } + input{ width: 100%; height: 28px; background: rgba(145, 204, 255, 0.41); border: 1px solid #91CCFF; padding: 0; resize: none; outline: none; } textarea{ width: 100%; height: 75px; background: rgba(145, 204, 255, 0.41); border: 1px solid #91CCFF; padding: 0; resize: none; outline: none; } .natureImg{ margin-bottom: 5px; img{ width: auto; height: auto; max-height: 120px; } } .natureUpload{ margin: 0; text-align: center; width: 50px; height: 50px; line-height: 50px; } diff --git a/src/app/pages/plan/plan.component.ts b/src/app/pages/plan/plan.component.ts index 48c179c..a0a3c25 100644 --- a/src/app/pages/plan/plan.component.ts +++ b/src/app/pages/plan/plan.component.ts @@ -29,6 +29,7 @@ import { EventManager as babylonEventManager } from 'src/app/babylon/controller/ import { Event_GetAllMarkPlanData } from 'src/app/babylon/controller/event-manager/events/event-get-markplandata-success'; import { FacilityInfoInSceneWindow } from 'src/app/babylon/view/facilityinfoinscene-window/facilityinfoinscene-window'; import { FacilityType } from 'src/app/babylon/model/data/model-data/model-data-facility'; +import { HttpClient } from '@angular/common/http'; @@ -39,7 +40,7 @@ import { FacilityType } from 'src/app/babylon/model/data/model-data/model-data-f }) export class PlanComponent implements OnInit { - constructor(private element: ElementRef, private buildingBISrv: BuildingBasicInfosService, private objectsSrv: ObjectsService, private eventManager: EventManager, private message: NzMessageService) { } + constructor(private element: ElementRef, private buildingBISrv: BuildingBasicInfosService, private objectsSrv: ObjectsService, private eventManager: EventManager, private message: NzMessageService, private http: HttpClient) { } static instance: PlanComponent; public game: Game = new Game(); @@ -49,7 +50,7 @@ export class PlanComponent implements OnInit { public userMode: boolean = ModeManager.s_isMakeMode; //是否为 内部权限 public bucketName: string = ObjectsService.getFullPath("文件路径"); //当前桶名 public isShowLoading: boolean = true; //显隐 loading加载条 - public companyData: any; //当前加油站 信息 + public companyData: any; //当前加油站所属组织机构 data ngOnInit(): void { PlanComponent.instance = this; @@ -78,43 +79,46 @@ export class PlanComponent implements OnInit { } ngAfterViewInit(): void { - let simpleData: InsitutionDataSimple = new InsitutionDataSimple(); - simpleData.id = 1; //来自选中的单位的信息 ,测试:1 - simpleData.key = "ceshi"; //正式: id.tostring(),测试:"ceshi" - simpleData.name = this.companyData.displayName || "测试"; //来自选中的单位的信息 ,测试:"测试" - - let has3dData = true;//是否有三维数据,来自选中单位的信息 - let loginStatus = StatusManager.getStatus(LoginSatus); - if (ModeManager.institutionDemoKey == ModeManager.c_demoKey_null) { //无指定测试单位,则为正式启动,根据当前单位key寻找 - if (has3dData) { //如果已经有三维数据,直接进入 - this.beforeOneSatus = StatusManager.getStatus(LoginSatus); - this.beforeOneSatus.onSelectInsSuccess(simpleData) - } else { //如果没有三维数据 - if (ModeManager.s_isMakeMode) //内部制作模式下,询问新建 - { - let isAdd = confirm('没有单位' + simpleData.key + ',是否进行初始化?') - if (isAdd) { - let name = simpleData.name; - let id = simpleData.id;// 单位id - loginStatus.createInsitution(simpleData.key, name, id); + this.getGasStationBaseInfo().then((res: any)=>{ //获取单位 基本信息 + console.log(res,"当前加油站信息") + let simpleData: InsitutionDataSimple = new InsitutionDataSimple(); + simpleData.id = res.id || 1; //来自选中的单位的信息 ,测试:1 + simpleData.key = `${res.id}` || "ceshi"; //测试:"ceshi" + simpleData.name = res.stationName || "测试"; //来自选中的单位的信息 ,测试:"测试" + + let has3dData = res.hasBuildingInfo; //是否有三维数据,来自选中单位的信息 + let loginStatus = StatusManager.getStatus(LoginSatus); + if (ModeManager.institutionDemoKey == ModeManager.c_demoKey_null) { //无指定测试单位,则为正式启动,根据当前单位key寻找 + if (has3dData) { //如果已经有三维数据,直接进入 + this.beforeOneSatus = StatusManager.getStatus(LoginSatus); + this.beforeOneSatus.onSelectInsSuccess(simpleData) + } else { //如果没有三维数据 + if (ModeManager.s_isMakeMode) //内部制作模式下,询问新建 + { + let isAdd = confirm('没有单位' + simpleData.key + ',是否进行初始化?') + if (isAdd) { + let name = simpleData.name; + let id = simpleData.id;// 单位id + loginStatus.createInsitution(simpleData.key, name, id); + } + } + else //非内部制作模式,不开启 + { + console.log("没有单位" + simpleData.key); } } - else //非内部制作模式,不开启 - { - console.log("没有单位" + simpleData.key); - } - } - } else { - //let find = data.find(item => { return item.key === ModeManager.institutionDemoKey }) - let find = simpleData; //测试单位 - if (find) { - sessionStorage.setItem('unitId', find.key) - this.beforeOneSatus = StatusManager.getStatus(LoginSatus); - this.beforeOneSatus.onSelectInsSuccess(find) } else { - //this.modelInit(data) //开发模式 选择单位 弹窗 + //let find = data.find(item => { return item.key === ModeManager.institutionDemoKey }) + let find = simpleData; //测试单位 + if (find) { + sessionStorage.setItem('unitId', find.key) + this.beforeOneSatus = StatusManager.getStatus(LoginSatus); + this.beforeOneSatus.onSelectInsSuccess(find) + } else { + //this.modelInit(data) //开发模式 选择单位 弹窗 + } } - } + }) } ngOnDestroy(): void { //组件销毁前 销毁canvas @@ -122,6 +126,16 @@ export class PlanComponent implements OnInit { this.game = null; } + //获取 当前加油站基本信息 + getGasStationBaseInfo() { + return new Promise((resolve, reject) => { + let params = { organizationUnitId: this.companyData.id } + this.http.get('/api/services/app/GasStation/Get', { params: params }).subscribe((data: any)=>{ + resolve(data.result) + }) + }) + } + //开发模式 选择单位 弹窗 modelInit(InsList) { } diff --git a/src/styles.scss b/src/styles.scss index 528abfe..643b993 100644 --- a/src/styles.scss +++ b/src/styles.scss @@ -125,6 +125,11 @@ h1 { .ant-input { background: rgba(145, 204, 255, 0.41); border: 1px solid #91CCFF; } textarea { resize: none; outline: none; } } +.baseInfoDialog{ + height: 80%; + .ant-modal-footer { padding: 0; } + .ant-modal-body,.ant-modal-content { height: 100%; background: radial-gradient(closest-side at 50% 55%, #004988 0%, #00122D 100%); } +} .videoDialog{ height: 80%; .ant-modal-footer { padding: 0; }