Browse Source

对接完善

dev
陈鹏飞 3 years ago
parent
commit
4da00987ea
  1. 9
      src/app/pages/plan/plan.component.html
  2. 20
      src/app/pages/plan/plan.component.scss
  3. 18
      src/app/pages/plan/plan.component.ts

9
src/app/pages/plan/plan.component.html

@ -59,7 +59,7 @@
<div class="autoScroll"><i nz-icon nzType="right" nzTheme="outline" (click)="bottomScroll(1)"></i></div> <div class="autoScroll"><i nz-icon nzType="right" nzTheme="outline" (click)="bottomScroll(1)"></i></div>
</div> </div>
<!-- 底部图标栏 --> <!-- 底部图标栏 -->
<!-- 右上角快捷栏 --> <!-- 右上角快捷栏 -->
<div class="rightTopFast"> <div class="rightTopFast">
<div class="publicFast leftFunction"> <div class="publicFast leftFunction">
@ -73,10 +73,13 @@
<button title="吸附" (click)="adsorb()" [ngClass]="{'leftFastIsTure': selectAdsorb }"></button> <button title="吸附" (click)="adsorb()" [ngClass]="{'leftFastIsTure': selectAdsorb }"></button>
<button title="切换至顶视图" (click)="toggleTopLevelView()" [ngClass]="{'leftFastIsTure': topLevelView }"></button> <button title="切换至顶视图" (click)="toggleTopLevelView()" [ngClass]="{'leftFastIsTure': topLevelView }"></button>
</div> </div>
<div style="margin: 0 10px;background-color: #0080FF;" title="保存"><button (click)="preserve()"><i nz-icon nzType="save" nzTheme="outline" style="font-size: 20px;"></i></button></div> <div class="save">
<button (click)="preserve(false)" title="保存模块"><i nz-icon nzType="file-done" nzTheme="outline"></i></button>
<button (click)="preserve(true)" title="保存"><i nz-icon nzType="save" nzTheme="outline"></i></button>
</div>
</div> </div>
<!-- 右上角快捷栏 --> <!-- 右上角快捷栏 -->
<!-- 新增/编辑左侧建筑弹窗 --> <!-- 新增/编辑左侧建筑弹窗 -->
<nz-modal [(nzVisible)]="addBuildingPop || editBuildingPop" nzTitle="创建/编辑建筑" (nzOnCancel)="addBuildingPop = false; editBuildingPop = null;" (nzOnOk)="addModelBuilding(form.value)" [nzOkDisabled]='name.invalid||modelType.invalid'> <nz-modal [(nzVisible)]="addBuildingPop || editBuildingPop" nzTitle="创建/编辑建筑" (nzOnCancel)="addBuildingPop = false; editBuildingPop = null;" (nzOnOk)="addModelBuilding(form.value)" [nzOkDisabled]='name.invalid||modelType.invalid'>
<form nz-form #form='ngForm'> <form nz-form #form='ngForm'>

20
src/app/pages/plan/plan.component.scss

@ -212,27 +212,31 @@
//右上角快捷栏 //右上角快捷栏
.rightTopFast{ .rightTopFast{
width: 340px; width: 400px;
height: 38px; height: 38px;
position: absolute; position: absolute;
right: 1px; right: 1px;
top: 3%; top: 3%;
overflow: hidden;
box-sizing: border-box;
display: flex; display: flex;
>div { height: 38px; border-radius: 5px; } >div { height: 38px; border-radius: 5px; }
button { button {
width: 36px; width: 38px;
height: 36px; height: 38px;
border: none; border: none;
outline: none; outline: none;
background-color: transparent; background-color: transparent;
color: #fff; color: #fff;
cursor: pointer; cursor: pointer;
padding: 0;
}
.save{
margin: 0 10px;
button{ background-color: #0080FF; border-radius: 5px; }
button:first-child{ margin-right: 10px; }
.anticon{ font-size: 20px; line-height: 40px; } //字体图标
} }
.publicFast { .publicFast {
box-sizing: border-box; padding: 0px 3px;
padding: 1px 3px;
background-color: rgba(0,0,0,0.5); background-color: rgba(0,0,0,0.5);
} }
.leftFast { .leftFast {
@ -244,7 +248,7 @@
.leftFastIsTure { border: 1px solid #fff; } //吸附样式 .leftFastIsTure { border: 1px solid #fff; } //吸附样式
} }
.leftFunction { .leftFunction {
margin: 0 10px; margin-right: 10px;
} }
.selectRightTopFast { border: 1px solid #fff; } //选种样式 .selectRightTopFast { border: 1px solid #fff; } //选种样式
} }

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

@ -110,18 +110,20 @@ export class PlanComponent implements OnInit {
this.isShowChildComponent && this.leftDomain ? this.leftDomain.initComponent(type) : null; //手动初始化子组件 this.isShowChildComponent && this.leftDomain ? this.leftDomain.initComponent(type) : null; //手动初始化子组件
this.selectFence = type this.selectFence = type
this.isShowChildComponent = true this.isShowChildComponent = true
type > 0 && type < 7 ? buildingWindow.showJYZInfoModel(fenceType, true) : null buildingWindow.showJYZInfoModel(fenceType, true)
} else { //取消选中 } else { //取消选中
this.selectFence = -1 this.selectFence = -1
this.isShowChildComponent = false this.isShowChildComponent = false
type > 0 && type < 7 ? buildingWindow.showJYZInfoModel(fenceType, false) : null buildingWindow.showJYZInfoModel(fenceType, false)
} }
} }
//获取 头部功能栏Type //获取 头部功能栏Type
getFenceType(type: number): JYZInfoMoudleType { getFenceType(type: number): JYZInfoMoudleType {
let fenceType let fenceType
if (type === 1) { if (type === 0) {
fenceType = JYZInfoMoudleType.JBXX
} else if (type === 1) {
fenceType = JYZInfoMoudleType.JYJ fenceType = JYZInfoMoudleType.JYJ
} else if (type === 2) { } else if (type === 2) {
fenceType = JYZInfoMoudleType.YG fenceType = JYZInfoMoudleType.YG
@ -133,6 +135,8 @@ export class PlanComponent implements OnInit {
fenceType = JYZInfoMoudleType.SYG fenceType = JYZInfoMoudleType.SYG
} else if (type === 6) { } else if (type === 6) {
fenceType = JYZInfoMoudleType.YQHSGX fenceType = JYZInfoMoudleType.YQHSGX
} else if (type === 7) {
fenceType = JYZInfoMoudleType.YJCZ
} }
return fenceType return fenceType
} }
@ -324,8 +328,12 @@ export class PlanComponent implements OnInit {
} }
//保存 //保存
preserve() { preserve(type: boolean) {
ToolbarWindow.instance.onBtnSave(); if (type) {
ToolbarWindow.instance.onBtnSave();
} else {
ToolbarWindow.instance.saveShowMoudleData();
}
} }
//通用 消息通知栏 //通用 消息通知栏

Loading…
Cancel
Save