diff --git a/src/app/canvas-share-data.service.ts b/src/app/canvas-share-data.service.ts index adf46a6..3b57938 100644 --- a/src/app/canvas-share-data.service.ts +++ b/src/app/canvas-share-data.service.ts @@ -2,6 +2,7 @@ import { Injectable } from '@angular/core'; import {ReplaySubject} from 'rxjs'; import { Observable } from 'rxjs'; import { GameMode } from './working-area/model/gameMode'; + @Injectable({ providedIn: 'root' }) @@ -10,33 +11,30 @@ export class CanvasShareDataService { private _sendMessage: ReplaySubject = new ReplaySubject(1); examDisposalNodesData; // 考生进入时获取当前试卷的处置节点 - examFacilityAssetsData; // 考生进入时获取当前试卷要考察的消防设施 + examFacilityAssetsData; // 考生进入时获取当前试卷要考察的消防设施 + examOriginaleveryStoreyData: any; // 考生答卷 总平面图/楼层/区域 楼层数据 + hiddenBasicInfoFacilities: any = []; // 考生答卷 当前楼层需要隐藏的基本信息素材 + - isChange = false; // 数据 是否改动 - selectTemplateData: any; // 选择当前 模板数据 + isChange:boolean = false; // 数据 是否改动 + + selectTemplateData:any; // 选择当前 模板数据 // 总平面图/建筑 楼层 selectStorey: any = {area: '', details: ''}; // 选择当前 楼层 数据 - originalcompanyBuildingData: any; // 单位/建筑 数据 - originaleveryStoreyData: any; // 总平面图/楼层/区域 楼层数据 - - - examOriginaleveryStoreyData: any; // 考生答卷 总平面图/楼层/区域 楼层数据 - - hiddenBasicInfoFacilities: any = []; // 考生答卷 当前楼层需要隐藏的基本信息素材 // 总平面图/建筑 楼层 // 处置 节点 allDisposalNode: any = []; // 所有 处置节点 allNodeMarkers: any; // 灾情 标签信息 - - selectPanelPoint: DisposalNodeData = new DisposalNodeData(); - + selectPanelPoint: DisposalNodeData = new DisposalNodeData(); // 当前数据节点 selectPanelPointBaseData: any = {description: '', notes: '', weather: '', airTemperature: '', windDirection: '', windScale: ''}; // 当前 数据节点 所对应的 天气,详情 数据节点 + customizeDisposalNode:any; // 新建 自定义数据节点 底图+名称 // 处置 节点 + /** * 游戏模式 */ diff --git a/src/app/ui/collection-tools-plan/collection-tools.component.html b/src/app/ui/collection-tools-plan/collection-tools.component.html index e461b35..b2bdb47 100644 --- a/src/app/ui/collection-tools-plan/collection-tools.component.html +++ b/src/app/ui/collection-tools-plan/collection-tools.component.html @@ -7,27 +7,20 @@ - - - - + 基本信息名称 visibility - - 想定作业名称 - visibility - -
- - 基本信息编辑 - -
+ + + + + tv create diff --git a/src/app/ui/collection-tools-plan/collection-tools.component.scss b/src/app/ui/collection-tools-plan/collection-tools.component.scss index 1ec5d7d..985cf7e 100644 --- a/src/app/ui/collection-tools-plan/collection-tools.component.scss +++ b/src/app/ui/collection-tools-plan/collection-tools.component.scss @@ -25,21 +25,19 @@ align-items:center; min-height: 40px; background-color: #fff; - .nameShow{ - cursor: pointer; + .marginLeftRight { + margin: 0 8px; + font-size: 16px; user-select: none; + cursor: pointer; + .mat-icon { vertical-align: middle; font-size: 24px; } } .copytobutn{ - width: 33px; - min-width: 33px; + width: 60px; + min-width: 60px; display: flex; justify-content: center; } - font-size: 18px; - mat-icon{ - font-size: 26px; - vertical-align: text-top; - } span{ height: 24px; line-height: 24px; diff --git a/src/app/ui/collection-tools/addBGCDisposalNode.html b/src/app/ui/collection-tools/addBGCDisposalNode.html new file mode 100644 index 0000000..f9f91af --- /dev/null +++ b/src/app/ui/collection-tools/addBGCDisposalNode.html @@ -0,0 +1,24 @@ +
+
+ +
+ +
+ +
+ + + +
+ + +
+ +
+ +
\ No newline at end of file diff --git a/src/app/ui/collection-tools/collection-tools.component.html b/src/app/ui/collection-tools/collection-tools.component.html index 3575416..701098a 100644 --- a/src/app/ui/collection-tools/collection-tools.component.html +++ b/src/app/ui/collection-tools/collection-tools.component.html @@ -7,22 +7,27 @@ - - - - 基本信息名称 - visibility - - - 想定作业名称 - visibility -
基本信息编辑 @@ -40,32 +45,18 @@
- - + @@ -112,10 +103,79 @@ + +
+
+
+ open_with + + + + + + + +
+
+ {{item.name}} + + + + + + +
+
+
+
+
总平面图
+
+ {{item.name}} +
+
+
+ +
+ +
+
+ keyboard_arrow_up + keyboard_arrow_down + + +
+
+ + + +
+ +
+ edit + add + library_books + delete_forever +
+
+
+ +
+
+ + -
+
+
diff --git a/src/app/ui/collection-tools/collection-tools.component.scss b/src/app/ui/collection-tools/collection-tools.component.scss index 19402a6..f01a7b7 100644 --- a/src/app/ui/collection-tools/collection-tools.component.scss +++ b/src/app/ui/collection-tools/collection-tools.component.scss @@ -25,21 +25,19 @@ align-items:center; min-height: 40px; background-color: #fff; - .nameShow{ - cursor: pointer; + .marginLeftRight { + margin: 0 8px; + font-size: 16px; user-select: none; + cursor: pointer; + .mat-icon { vertical-align: middle; font-size: 24px; } } .copytobutn{ - width: 33px; - min-width: 33px; + width: 60px; + min-width: 60px; display: flex; justify-content: center; } - font-size: 18px; - mat-icon{ - font-size: 26px; - vertical-align: text-top; - } span{ height: 24px; line-height: 24px; @@ -116,6 +114,14 @@ width: 100%; height: 100%; } + .centerBuildingDiv { + position: absolute; + max-width: 400px; + top: 40px; + left: 240px; + z-index: 150; + display: flex; + } .functionalDomainLeft { background-color: #fff; display: flex; @@ -137,7 +143,7 @@ } } .functionalDomainRight { - z-index: 1001; + z-index: 111; margin-right: 0px; transition: margin-right 0.5s; border: 1px solid #464646; @@ -158,6 +164,41 @@ } +//中间建筑/楼层 +.centerTotal { + width: 197px; + background-color: #fff; + box-shadow: 0px 0px 5px 3px rgb(165, 163, 163); + border-radius: 5px; + box-sizing: border-box; + padding: 5px 0; + .centerTotalHeader { + height: 30px; + line-height: 30px; + box-sizing: border-box; + padding-right: 5px; + font-size: 14px; + .centerTotalTitle { >label{ display: inline-block; vertical-align: middle; max-width: 90px; } } + .move{margin: 0 5px;} + .move:hover {cursor: move;} + .mat-icon { + font-size: 24px; + color: rgb(175, 164, 164); + } + } + .everyTotal { + width: 100%; + height: 30px; + line-height: 30px; + box-sizing: border-box; + padding: 0 5px; + margin: 3px 0; + cursor:pointer; + font-size: 16px; + } +} +//中间建筑/楼层 + //右边操作栏 .title{ width: 100%; diff --git a/src/app/ui/collection-tools/collection-tools.component.ts b/src/app/ui/collection-tools/collection-tools.component.ts index b101e13..c9da111 100644 --- a/src/app/ui/collection-tools/collection-tools.component.ts +++ b/src/app/ui/collection-tools/collection-tools.component.ts @@ -2,7 +2,7 @@ import { Component, OnInit, Inject, ViewChild,ElementRef,Renderer2, ViewContaine import { HttpClient, HttpHeaders } from '@angular/common/http'; import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar'; -import {leftFunctionalDomainComponent,editPlaneFigureComponent,editDisposalNodeComponent,addDisposalNodeComponent} from './leftFunctionalDomain' +import {leftFunctionalDomainComponent,editPlaneFigureComponent,editDisposalNodeComponent,addDisposalNodeComponent, addBGCDisposalNodeComponent} from './leftFunctionalDomain' import {MatTreeFlatDataSource, MatTreeFlattener} from '@angular/material/tree'; import {FlatTreeControl} from '@angular/cdk/tree'; import {WorkingAreaComponent} from '../../working-area/working-area.component' @@ -1379,6 +1379,7 @@ export class CollectionToolsComponent implements OnInit { isRefresh? this.isShowProperty = true : null isRefresh? this.isShowAttribute = true : null !this.pattern? this.mateFireForce() : null //刷新 建筑楼层 火源/力量图标 + this.beforeOneCheckedBuildingIsShow = false let beforeOneId = this.selectingSitePlan.id || '' //当前 选中 平面图 楼层/区域 id let companyBuildingData = JSON.parse(JSON.stringify( this.canvasData.originalcompanyBuildingData || {} )) // 当前 单位/建筑 数据 @@ -1423,6 +1424,9 @@ export class CollectionToolsComponent implements OnInit { togglePlane:boolean = true; //可展开面板平面图 显隐 toggleMaterialBank:boolean = false; //可展开面板素材库 显隐 toggleHandlePlans:boolean = true; //可展开面板处置预案 显隐 + + beforeOneCheckedBuildingIsShow:boolean = false; //想定作业下 建筑是否显示 + togglebeforeOneCheckedBuilding () { this.beforeOneCheckedBuildingIsShow = !this.beforeOneCheckedBuildingIsShow } //可展开面板展开或关闭 toggle () { this.toggleExpandPanel = !this.toggleExpandPanel @@ -2126,6 +2130,19 @@ export class CollectionToolsComponent implements OnInit { }) } + //新建 底图数据节点 + addBGCPanelPoint (e) { + e.stopPropagation() + let dialogRef = this.dialog.open(addBGCDisposalNodeComponent); + dialogRef.afterClosed().subscribe(data=>{ + if (data) { + this.canvasData.customizeDisposalNode = data + let imgURL = window.URL.createObjectURL(data.file) //将图片生成 url地址 + console.log(imgURL,this.canvasData.customizeDisposalNode) + } + }) + } + //新建 处置预案 节点 addPanelPoint (e,item,treeData) { e.stopPropagation() diff --git a/src/app/ui/collection-tools/leftFunctionalDomain.ts b/src/app/ui/collection-tools/leftFunctionalDomain.ts index 519653d..3deb432 100644 --- a/src/app/ui/collection-tools/leftFunctionalDomain.ts +++ b/src/app/ui/collection-tools/leftFunctionalDomain.ts @@ -129,6 +129,51 @@ export class editPlaneFigureComponent implements OnInit { +//新建 底图数据节点 +@Component({ + selector: 'app-addBGCDisposalNode', + templateUrl: './addBGCDisposalNode.html', + styleUrls: ['./panel.scss'] +}) +export class addBGCDisposalNodeComponent implements OnInit { + + constructor(private http:HttpClient,public dialog: MatDialog,public snackBar: MatSnackBar,public dialogRef: MatDialogRef,@Inject(MAT_DIALOG_DATA) public data) { } + + ngOnInit(): void { } + + file:any = null; //文件 + //上传图片 + selectFile (e) { + if (e.target.files.length ) { + let maxSize = 5*1024*1024 + if (e.target.files[0].size <= maxSize) { + this.file = e.target.files[0] + } else { + const config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + this.snackBar.open('上传图片需小于5MB','确定',config); + } + } + } + + //提交表单 + onSubmit (e) { + if (e.name && this.file) { + e.file = this.file + this.dialogRef.close(e); + } else { + const config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + this.snackBar.open('请上传图片','确定',config); + } + } + +} + + + //创建 处置预案 节点 @Component({ selector: 'app-addDisposalNode', diff --git a/src/app/ui/collection-tools/panel.scss b/src/app/ui/collection-tools/panel.scss index f0ae073..a127a5b 100644 --- a/src/app/ui/collection-tools/panel.scss +++ b/src/app/ui/collection-tools/panel.scss @@ -50,8 +50,8 @@ //火源/力量 图标 .fireForce { display: block; + margin-top: 5px; float: right; - margin: 8px 5px 0 0; width: 40px; height: 20px; line-height: 20px; @@ -261,6 +261,10 @@ .selectanelPoint { background-color: #F4C235; } +//选中 数据节点时 +.selectanelPointData { + background-color: #f8da88; +} @@ -289,3 +293,39 @@ resize:none; } } + +.leftAddBGC { + div{ text-align: center; } + input { + width: 190px; + height: 30px; + padding-left: 5px; + outline: none; + border: none; + border-radius: 5px; + background: #EEF1F5; + } +} +//上传CAD弹窗 inputfile +.uploadFile { + padding: 3px 10px; + height: 20px; + line-height: 20px; + position: relative; + cursor: pointer; + color: #0080FF; + font-size: 14px; + background: #fafafa; + border: 1px solid #0080FF; + border-radius: 3px; + overflow: hidden; + display: inline-block; + input { + position: absolute; + width: 100%; + right: 0; + top: 0; + opacity: 0; + cursor: pointer + } +} diff --git a/src/app/ui/ui.module.ts b/src/app/ui/ui.module.ts index eb9a555..d1129ac 100644 --- a/src/app/ui/ui.module.ts +++ b/src/app/ui/ui.module.ts @@ -67,7 +67,6 @@ import { UnittypeComponent,DialogOverviewExampleDialog,editorialUnit } from './u import { AuthorityComponent, CreateAuthority } from './authority/authority.component'; import { RoleComponent, CreateRole, EditRole } from './role/role.component'; import { UsermanagementComponent,CreateNewUser,EditNewUser,allRoles,seeInformation } from './usermanagement/usermanagement.component'; - import { IsnoPipe } from '../pipes/boolean.pipe'; import {ConfirmpswDirective} from './changepassword/equal-validator.directive' import { TimePipe } from '../pipes/time.pipe'; @@ -90,16 +89,15 @@ import { EditGroup } from './unit-information/editgroup.component'; import { EnterpriseuserComponent,seeenterpriseuser,editenterpriseuser } from './enterpriseuser/enterpriseuser.component'; import { AddEnterpriserUser } from './enterpriseuser/addenterpriseuser.component'; import { FireFightingFacilitiesFormworkComponent,addFireFightingFacilitiesFormworkComponent,editFireFightingFacilitiesFormworkComponent,addBuiltInComponent,addBuiltInAttributeComponent,addOptionalComponent,addOptionalAttributeComponent,editBuiltInAttributeComponent,editOptionalAttributeComponent } from './fire-fighting-facilities-formwork/fire-fighting-facilities-formwork.component'; - import { CollectionToolsComponent, CreateBuilding, EditBuilding, ViewDetails } from './collection-tools/collection-tools.component'; import { WorkingAreaComponent } from '../working-area/working-area.component'; -import {leftFunctionalDomainComponent,editPlaneFigureComponent,addDisposalNodeComponent,editDisposalNodeComponent} from './collection-tools/leftFunctionalDomain' +import {leftFunctionalDomainComponent,editPlaneFigureComponent,addDisposalNodeComponent,editDisposalNodeComponent,addBGCDisposalNodeComponent} from './collection-tools/leftFunctionalDomain' import { saveOneDialog, saveTwoDialog } from './collection-tools/save'; import { CollectionToolsPlanComponent, CreateBuildingPlan, EditBuildingPlan, ViewDetailsPlan } from './collection-tools-plan/collection-tools.component'; import { addDisposalNodeComponentPlan, editDisposalNodeComponentPlan, editPlaneFigureComponentPlan, leftFunctionalDomainComponentPlan } from './collection-tools-plan/leftFunctionalDomain'; import { saveOneDialogPlan, saveTwoDialogPlan } from './collection-tools-plan/save'; @NgModule({ - declarations: [UiComponent, DateselectComponent, MenuComponent, CardComponent, ListComponent, GridComponent, StepperComponent, TabgroupComponent, ButtonComponent, BadgeComponent, ProgressComponent, SnackbarComponent,PersonaldataComponent, FooterComponent, UserdataComponent, ChangepasswordComponent, OrganizationComponent, UnittypeComponent, AuthorityComponent, RoleComponent, UsermanagementComponent,IsnoPipe,ConfirmpswDirective,DialogOverviewExampleDialog,CreateAuthority,CreateRole,TimePipe,CreateNewUser,EditNewUser,allRoles,EditRole,CreateOrganization,EditOrganization,seeInformation,EditUser,editorialUnit,FireProtectionElementsComponent,Establish,EditingFireControl,FireFightingTemplateComponent, NavmenusComponent,CreateMenus,EditMenus,NewFireFighting,EditFireClassification, MaterialBankComponent, UnitInformationComponent,AddMatLibrary,EditMatLibrary,attributeComponent,AddOriginalCopy,addAttributeComponent,editAttribute,EditOriginalCopy,SelectOriginalCopy,EditUnitInfo,AddUnitInfo,AddGroups,EditGroup, EnterpriseuserComponent,AddEnterpriserUser,addUnitAttributeComponent,editUnitAttribute,seeenterpriseuser,editenterpriseuser, FireFightingFacilitiesFormworkComponent,addFireFightingFacilitiesFormworkComponent,editFireFightingFacilitiesFormworkComponent,addBuiltInComponent,addBuiltInAttributeComponent,addOptionalComponent,addOptionalAttributeComponent,editBuiltInAttributeComponent,editOptionalAttributeComponent, CollectionToolsComponent,WorkingAreaComponent,CreateBuilding,EditBuilding,leftFunctionalDomainComponent,editPlaneFigureComponent,ViewDetails,saveOneDialog,saveTwoDialog,addDisposalNodeComponent,editDisposalNodeComponent,CollectionToolsPlanComponent,CreateBuildingPlan,EditBuildingPlan,ViewDetailsPlan,leftFunctionalDomainComponentPlan,editPlaneFigureComponentPlan,addDisposalNodeComponentPlan,editDisposalNodeComponentPlan,saveOneDialogPlan,saveTwoDialogPlan,addOffices,editOffices], + declarations: [UiComponent, DateselectComponent, MenuComponent, CardComponent, ListComponent, GridComponent, StepperComponent, TabgroupComponent, ButtonComponent, BadgeComponent, ProgressComponent, SnackbarComponent,PersonaldataComponent, FooterComponent, UserdataComponent, ChangepasswordComponent, OrganizationComponent, UnittypeComponent, AuthorityComponent, RoleComponent, UsermanagementComponent,IsnoPipe,ConfirmpswDirective,DialogOverviewExampleDialog,CreateAuthority,CreateRole,TimePipe,CreateNewUser,EditNewUser,allRoles,EditRole,CreateOrganization,EditOrganization,seeInformation,EditUser,editorialUnit,FireProtectionElementsComponent,Establish,EditingFireControl,FireFightingTemplateComponent, NavmenusComponent,CreateMenus,EditMenus,NewFireFighting,EditFireClassification, MaterialBankComponent, UnitInformationComponent,AddMatLibrary,EditMatLibrary,attributeComponent,AddOriginalCopy,addAttributeComponent,editAttribute,EditOriginalCopy,SelectOriginalCopy,EditUnitInfo,AddUnitInfo,AddGroups,EditGroup, EnterpriseuserComponent,AddEnterpriserUser,addUnitAttributeComponent,editUnitAttribute,seeenterpriseuser,editenterpriseuser, FireFightingFacilitiesFormworkComponent,addFireFightingFacilitiesFormworkComponent,editFireFightingFacilitiesFormworkComponent,addBuiltInComponent,addBuiltInAttributeComponent,addOptionalComponent,addOptionalAttributeComponent,editBuiltInAttributeComponent,editOptionalAttributeComponent, CollectionToolsComponent,WorkingAreaComponent,CreateBuilding,EditBuilding,leftFunctionalDomainComponent,editPlaneFigureComponent,ViewDetails,saveOneDialog,saveTwoDialog,addDisposalNodeComponent,editDisposalNodeComponent,CollectionToolsPlanComponent,CreateBuildingPlan,EditBuildingPlan,ViewDetailsPlan,leftFunctionalDomainComponentPlan,editPlaneFigureComponentPlan,addDisposalNodeComponentPlan,editDisposalNodeComponentPlan,saveOneDialogPlan,saveTwoDialogPlan,addOffices,editOffices,addBGCDisposalNodeComponent], imports: [ CommonModule, diff --git a/src/app/working-area/working-area.component.ts b/src/app/working-area/working-area.component.ts index 04d2c17..add640d 100644 --- a/src/app/working-area/working-area.component.ts +++ b/src/app/working-area/working-area.component.ts @@ -276,7 +276,6 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV icon.assetData.Type === 3 || icon.assetData.Type === 4 )) { - console.log(this.backgroundImage.position); this.backgroundImage.pivot.set(icon.x, icon.y); this.backgroundImage.position.set(771, 404); clearTimeout(this.animationTime); @@ -315,7 +314,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV this.app.stage.addChild(this.grid); this.grid.drawGrid(); this.grid.onMousemove = (evt, gridCoord) => { - console.log(gridCoord); + }; this.createBackgroundImage(); @@ -504,7 +503,6 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV public setIconScale(value: number): void { this.backgroundImage.children.forEach(item => { if (item instanceof AxImageShape) { - console.log(item.image.scale); item.image.scale.set(value); } else if (item instanceof MultipointIcon) { @@ -630,7 +628,6 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV this.backgroundImage .on('pointerdown', event => { if (event.data.button !== 0) { return; } - console.log(this.backgroundImage.toLocal(this.mousePosition)); if (!event.currentTarget.dragging && this.selection.isMultiselection === false) { this.selection.deselectAll(); event.currentTarget.data = event.data;