From 11b704a8d685715c09ec8d8573905fae340ced2b Mon Sep 17 00:00:00 2001 From: cpf <1105965053@qq.com> Date: Mon, 29 Nov 2021 09:42:43 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E5=8A=A0=E6=B2=B9?= =?UTF-8?q?=E7=AB=99=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/pages/plan/plan.component.ts | 75 ++++++++++++++++------------ 1 file changed, 44 insertions(+), 31 deletions(-) diff --git a/src/app/pages/plan/plan.component.ts b/src/app/pages/plan/plan.component.ts index 48c179c..e88e00d 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(); @@ -79,42 +80,44 @@ export class PlanComponent implements OnInit { ngAfterViewInit(): void { let simpleData: InsitutionDataSimple = new InsitutionDataSimple(); - simpleData.id = 1; //来自选中的单位的信息 ,测试:1 - simpleData.key = "ceshi"; //正式: id.tostring(),测试:"ceshi" + simpleData.id = 1; //this.companyData.id || 来自选中的单位的信息 ,测试:1 + simpleData.key = "ceshi"; //`${this.companyData.id}` || 测试:"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)=>{ //获取单位 基本信息 + 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); + } + } + 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 +125,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) { } From 10b019978e0f5b5077024b0f3d56332cf936d27c Mon Sep 17 00:00:00 2001 From: cpf <1105965053@qq.com> Date: Mon, 29 Nov 2021 10:33:56 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E7=BC=96=E8=BE=91=E5=9F=BA=E6=9C=AC?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../left-domain/left-domain.component.html | 3 +++ .../left-domain/left-domain.component.ts | 19 ++++++++++++++++--- .../oil-station-info.component.html | 2 +- src/styles.scss | 5 +++++ 4 files changed, 25 insertions(+), 4 deletions(-) diff --git a/src/app/pages/left-domain/left-domain.component.html b/src/app/pages/left-domain/left-domain.component.html index ff2a673..7960582 100644 --- a/src/app/pages/left-domain/left-domain.component.html +++ b/src/app/pages/left-domain/left-domain.component.html @@ -186,6 +186,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/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; } From a692ca44fe8703fca2a4ddf95645d3253a43730d Mon Sep 17 00:00:00 2001 From: cpf <1105965053@qq.com> Date: Mon, 29 Nov 2021 11:25:40 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E5=AF=B9=E6=8E=A5=E5=8A=A0=E6=B2=B9?= =?UTF-8?q?=E7=AB=99=E5=88=9D=E5=A7=8B=E5=8C=96=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/left-domain/left-domain.component.html | 15 ++++++++++++--- src/app/pages/plan/plan.component.html | 4 ++++ src/app/pages/plan/plan.component.scss | 1 + src/app/pages/plan/plan.component.ts | 15 ++++++++------- 4 files changed, 25 insertions(+), 10 deletions(-) diff --git a/src/app/pages/left-domain/left-domain.component.html b/src/app/pages/left-domain/left-domain.component.html index 7960582..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 @@

+
+
+

连接的加油机

+

连接的油罐

+
+
+

+

+
+
-

设计图纸

+

设计图纸

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 e88e00d..a0a3c25 100644 --- a/src/app/pages/plan/plan.component.ts +++ b/src/app/pages/plan/plan.component.ts @@ -50,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; @@ -79,13 +79,14 @@ export class PlanComponent implements OnInit { } ngAfterViewInit(): void { - let simpleData: InsitutionDataSimple = new InsitutionDataSimple(); - simpleData.id = 1; //this.companyData.id || 来自选中的单位的信息 ,测试:1 - simpleData.key = "ceshi"; //`${this.companyData.id}` || 测试:"ceshi" - simpleData.name = this.companyData.displayName || "测试"; //来自选中的单位的信息 ,测试:"测试" - this.getGasStationBaseInfo().then((res: any)=>{ //获取单位 基本信息 - let has3dData = true;//是否有三维数据,来自选中单位的信息 + 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) { //如果已经有三维数据,直接进入