刘向辉 3 years ago
parent
commit
6a6c4b04e0
  1. 13
      src/app/babylon/view/facilityinfoinscene-window/facilityinfoinscene-window.ts
  2. 1
      src/app/babylon/view/mark-window/mark-window.ts
  3. 12
      src/app/pages/left-domain/left-domain.component.ts
  4. 4
      src/app/pages/plan/plan.component.ts

13
src/app/babylon/view/facilityinfoinscene-window/facilityinfoinscene-window.ts

@ -483,7 +483,6 @@ export class FacilityInfoInSceneWindow extends UIBase {
if (this.currentSelectJYJInfo != null) {
let facilityItem: FacilityInfoUIItem = FacilityInfoInSceneWindow.instance.getFacilityItem(this.currentSelectJYJInfo);
facilityItem.onSelect(false);
// this.playJYJSelectEffect(false, this.currentSelectJYJInfo);
this.currentSelectJYJInfo = null;
}
@ -496,8 +495,6 @@ export class FacilityInfoInSceneWindow extends UIBase {
try {
let facilityInfosByType = BuildingWindow.instance.currentBuidngItem.buildingInfo.ModelInfo.facilityInfos;
for (let i = 0; i < facilityInfosByType.length; i++) {
if ((currentMoudle == null || currentMoudle == JYZInfoMoudleType.JYJ) && facilityInfosByType[i].type == FacilityType.JY_JYJ ||
(currentMoudle == null || currentMoudle == JYZInfoMoudleType.YG) && facilityInfosByType[i].type == FacilityType.JY_YG) {
@ -519,28 +516,18 @@ export class FacilityInfoInSceneWindow extends UIBase {
for (let j = 0; j < childMesh.length; j++) {
if (pickInfo.pickedMesh == childMesh[j]) {
result = allJYJInfo[i];
console.log("通过点击,找到加油机了");
break;
}
}
}
if (result != null) {
//this.playJYJSelectEffect(true, result);
if ((result.modelData as ModelData_facility).facilityType == FacilityType.JY_JYJ && currentMoudle == null) {
PlanComponent.instance.toggleHeaderFence(1);//在空状态下,点击加油机,跳转到加油机页签
}
let facilityItem: FacilityInfoUIItem = FacilityInfoInSceneWindow.instance.getFacilityItem(result);
console.log("场景中选中设备", facilityItem); //通知前端
this.selectFacilityItem(facilityItem);
// facilityItem.onSelect(true);
//FacilityInfoInSceneWindow.instance.selectFacilityItemToThree([facilityItem], true);
//console.log(facilityItem.getHeadUIPos());
}
}

1
src/app/babylon/view/mark-window/mark-window.ts

@ -189,6 +189,7 @@ export class MarkWindow extends UIBase {
*
*/
static openWindow(): MarkWindow {
console.log("进入沙盘");
if (MarkWindow.instance == null) {
SceneManager.s_markWindow = UIManager.open(MarkWindow);
}

12
src/app/pages/left-domain/left-domain.component.ts

@ -10,6 +10,7 @@ import { Event_GetAllMarkPlanData } from 'src/app/babylon/controller/event-manag
import { AllMarkPlanData, MarkNodeData, MarkPlanData } from 'src/app/babylon/model/data/mark/mark-plan-data';
import { MarkWindow } from 'src/app/babylon/view/mark-window/mark-window';
import { NzMessageService } from 'ng-zorro-antd/message';
import { ModeManager, ModeType } from 'src/app/babylon/controller/mode-manager';
@Component({
selector: 'app-left-domain',
@ -187,7 +188,11 @@ export class LeftDomainComponent implements OnInit {
this.selectNodeId = e.id
MarkWindow.instance.selectMarkNode(item.id, e.id)
} else { //已选中节点
let isTrue = confirm('切换节点后,没保存的信息将会丢失!')
let isTrue = true;
if (ModeManager.currentMode == ModeType.Edit) {
isTrue = confirm('切换节点后,没保存的信息将会丢失!')
}
if (isTrue) {
this.selectPlanId = item.id
this.selectNodeId = e.id
@ -195,7 +200,10 @@ export class LeftDomainComponent implements OnInit {
}
}
} else if (this.selectPlanId === item.id && this.selectNodeId === e.id) { //取消选中
let isTrue = confirm('切换节点后,没保存的信息将会丢失!')
let isTrue = true;
if (ModeManager.currentMode == ModeType.Edit) {
isTrue = confirm('切换节点后,没保存的信息将会丢失!')
}
if (isTrue) {
this.selectPlanId = null
this.selectNodeId = null

4
src/app/pages/plan/plan.component.ts

@ -64,9 +64,9 @@ export class PlanComponent implements OnInit {
this.beforeOneSatus = StatusManager.getStatus<LoginSatus>(LoginSatus);
this.beforeOneSatus.onSelectInsSuccess(find)
} else { //如果没有找到对应的单位key,则调用新建单位
let isAdd = confirm('没有单位name,是否进行初始化?')
let isAdd = confirm('没有单位' + key + ',是否进行初始化?')
if (isAdd) {
let name = 'ceshi';
let name = key;
loginStatus.createInsitution(key, name);
}
}

Loading…
Cancel
Save