diff --git a/.vscode/launch.json b/.vscode/launch.json
new file mode 100644
index 0000000..a1481f9
--- /dev/null
+++ b/.vscode/launch.json
@@ -0,0 +1,15 @@
+{
+ // 使用 IntelliSense 了解相关属性。
+ // 悬停以查看现有属性的描述。
+ // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
+ "version": "0.2.0",
+ "configurations": [
+ {
+ "type": "pwa-chrome",
+ "request": "launch",
+ "name": "Launch Chrome against localhost",
+ "url": "http://localhost:4200",
+ "webRoot": "${workspaceFolder}"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/src/app/canvas-share-data.service.ts b/src/app/canvas-share-data.service.ts
index 0bcbbde..f8097f2 100644
--- a/src/app/canvas-share-data.service.ts
+++ b/src/app/canvas-share-data.service.ts
@@ -25,6 +25,11 @@ export class CanvasShareDataService {
selectPanelPoint:any = {disposalNodeId:''}; //选择当前 数据节点
selectPanelPointBaseData:any = {description: '', notes: '',weather: '',airTemperature: '',windDirection: '',windScale: ''}; //当前 数据节点 所对应的 天气,详情 数据节点
//处置 节点
+
+ //预案赋能 选择 车辆
+ selectCar:any = {Id: '', WaterYield: '', Foam: '', PeopleNum: '', Tonnage: '', Assignment: '', LinkCar: '', WaterOccupy: ''}
+ //预案赋能 选择 车辆
+
/**
* 游戏模式
*/
diff --git a/src/app/navigation/navigation.component.ts b/src/app/navigation/navigation.component.ts
index a5c9acd..c0ac672 100644
--- a/src/app/navigation/navigation.component.ts
+++ b/src/app/navigation/navigation.component.ts
@@ -28,7 +28,7 @@ export class NavigationComponent implements OnInit {
{name:'危化品', url: '/ui/dangerous'},
{name:'类似预案', url: '/ui/similarPlans'},
{name:'真实战例', url: '/ui/realCases'},
- {name:'预案辅助', url: '/ui/planAssistance'}
+ {name:'预案赋能', url: '/ui/planAssistance'}
]
ngOnInit () {
diff --git a/src/app/ui/disposal-node/disposal-node.component.html b/src/app/ui/disposal-node/disposal-node.component.html
index 5f52123..2d1a5a6 100644
--- a/src/app/ui/disposal-node/disposal-node.component.html
+++ b/src/app/ui/disposal-node/disposal-node.component.html
@@ -1 +1,23 @@
-
-
+
+
+
+
+
+
{{item.Name}}
+
{{item.FireTeamName}}
+
+
已到场
+
0">
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
载水量
+
载泡沫
+
载人数
+
吨位
+
执行任务
+
连接车辆
+
水源占用
+
+
+
{{canvasData.selectCar.WaterYield}}
+
{{canvasData.selectCar.Foam}}
+
{{canvasData.selectCar.PeopleNum}}
+
{{canvasData.selectCar.Tonnage}}
+
+
+
+
{{canvasData.selectCar.LinkCar}}
+
{{canvasData.selectCar.WaterOccupy}}
+
+
+
+
+
+
+
+
+
+
keyboard_arrow_left
+
+
+
+
+
+
+
+
+
+
diff --git a/src/app/ui/plan-assistance/plan-assistance.component.scss b/src/app/ui/plan-assistance/plan-assistance.component.scss
index 379ad01..c1ea7e3 100644
--- a/src/app/ui/plan-assistance/plan-assistance.component.scss
+++ b/src/app/ui/plan-assistance/plan-assistance.component.scss
@@ -7,14 +7,230 @@
display: flex;
}
+//左右侧 header
+.header {
+ width: 100%;
+ height: 40px;
+ min-height: 40px;
+}
+.leftHeader {
+ line-height: 40px;
+ text-align: center;
+ font-size: 20px;
+ font-weight: 550;
+ color: #F7bA2A;
+ cursor: pointer;
+}
+.title {
+ display: inline-block;
+ margin: 1px 0;
+ width: 120px;
+ height: 38px;
+ line-height: 38px;
+ background: url('../../../assets/images/标签正常.png');
+ -moz-background-size:100% 100%;
+ background-size:100% 100%;
+ font-size: 20px;
+ color: #fff;
+ padding-left: 25px;
+ cursor: pointer;
+}
+
//左侧菜单
.left {
width: 300px;
height: 100%;
- background-color: #000;
+ min-width: 250px;
+ box-sizing: border-box;
+ padding: 1px;
+ display: flex;
+ flex-direction: column;
+ .list {
+ flex: 1;
+ overflow: hidden;
+ .tableDiv {
+ height: 100%;
+ overflow-y: auto;
+ border-left: 1px solid #30bbec;
+ border-top: 1px solid #30bbec;
+ }
+ }
+ //每一行
+ .tableRows {
+ height: 50px;
+ overflow: hidden;
+ display: flex;
+ margin: 13px 0;
+ .contentText {
+ font-size: 12px;
+ color: #fff;
+ cursor: pointer;
+ overflow: hidden;
+ text-overflow:ellipsis;
+ white-space: nowrap;
+ }
+ }
+}
+
+//选中状态
+.selectIcon {
+ background-color: rgba(13, 139, 241, 0.7);
}
//右侧工作区
.center {
flex: 1;
+ box-sizing: border-box;
+ display: flex;
+ flex-direction: column;
+ .canvas {
+ flex: 1;
+ position: relative;
+ }
+}
+
+.mat-icon { vertical-align: middle; cursor: pointer; }
+//下方 车辆信息 UI
+.bottomWork {
+ width: 800px;
+ height: 100px;
+ position: absolute;
+ bottom: 5px;
+ left: 50%;
+ margin-left: -400px;
+ z-index: 10;
+ display: flex;
+ flex-direction: column;
+ >div{ background-color:rgba(2, 44, 73, 0.9); }
+ button { width: 50px; height: 40px; background-color: #67c23a; color: #fff; }
+ //table表格
+ .publicRow {
+ height: 50%;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ p { flex: 1; text-align: center; line-height: 35px; }
+ }
+ .taskInput {
+ width: 100px;
+ height: 24px;
+ padding-left: 5px;
+ outline: none;
+ border: none;
+ background-color:rgba(255,255,255,0);
+ background: url('../../../assets/images/输入框.png') no-repeat;
+ background-size: 100% 100%;
+ color: #fff;
+ }
+}
+
+//右侧 楼层UI
+.rightStorey {
+ width: 100px;
+ height: 250px;
+ position: absolute;
+ right: 2px;
+ top: 50%;
+ margin-top: -125px;
+ z-index: 10;
+ display: flex;
+ flex-direction: column;
+ background-color:rgba(2, 44, 73, 0.9);
+ color: #fff;
+ font-weight: 300;
+ >div {text-align: center; line-height: 25px;}
+}
+.showRightStorey {
+ position: absolute;
+ right: 0;
+ top: 50%;
+ margin-top: -13px;
+ z-index: 10;
+ width: 26px;
+ height: 26px;
+ line-height: 26px;
+ text-align: center;
+ background-color:rgba(2, 44, 73, 0.9);
+ color: #fff;
+}
+//打开关闭右侧 楼层
+.openRight {
+ margin-right: 0px;
+ transition: margin-right 0.5s;
+}
+.closeRight {
+ margin-right: -300px;
+ transition: margin-right 0.5s;
+}
+
+//右侧语音 UI
+.rightSpeak {
+ position: absolute;
+ top: 40px;
+ left: -275px;
+ width: 310px;
+ height: 320px;
+ z-index: 11;
+ box-sizing: border-box;
+ padding: 3px;
+ border: 1px solid #30bbec;
+ background-color:rgba(2, 44, 73, 0.9);
+ color: #fff;
+ display: flex;
+ flex-direction: column;
+ .mat-icon {
+ font-size: 28px;
+ width: 28px;
+ height: 28px;
+ margin: 3px 10px;
+ }
+ .sayBgc {
+ flex: 1;
+ box-sizing: border-box;
+ background: url('../../../assets/images/输入框.png');
+ background-size: 100% 100%;
+ color: #30bbec;
+ }
+ .iconButton {
+ margin: 10px;
+ border-radius: 18px;
+ width: 70px;
+ height: 30px;
+ text-align: center;
+ line-height: 30px;
+ display: inline-block;
+ font-size: 13px;
+ color: white;
+ cursor: pointer;
+ }
+}
+
+//右侧 绘制工具
+.draw {
+ display: inline-block;
+ position: absolute;
+ width: 80px;
+ height: 38px;
+ top: 1px;
+ left: 50%;
+ margin-left: -40px;
+ padding-top: 6px;
+ label {
+ display: inline-block;
+ width: 24px;
+ height: 24px;
+ margin: 0 5px;
+ border-radius: 50%;
+ cursor: pointer;
+ }
+ :first-child {
+ background: url('../../../assets/images/route.png') no-repeat center center;
+ background-size: 16px 16px;
+ background-color: #fff;
+ }
+ :last-child {
+ background: url('../../../assets/images/direction.png') no-repeat center center;
+ background-size: 16px 16px;
+ background-color: #fff;
+ }
}
\ No newline at end of file
diff --git a/src/app/ui/plan-assistance/plan-assistance.component.ts b/src/app/ui/plan-assistance/plan-assistance.component.ts
index e8e6fe6..c706246 100644
--- a/src/app/ui/plan-assistance/plan-assistance.component.ts
+++ b/src/app/ui/plan-assistance/plan-assistance.component.ts
@@ -1,5 +1,7 @@
-import { Component, OnInit, AfterViewInit, ViewChild } from '@angular/core';
+import { Component, OnInit, AfterViewInit, ViewChild, } from '@angular/core';
import { WorkingAreaComponent } from 'src/app/working-area/working-area.component';
+import {CanvasShareDataService} from '../../canvas-share-data.service'
+import * as ObjectID from 'bson-objectid';
@Component({
selector: 'app-plan-assistance',
@@ -7,12 +9,11 @@ import { WorkingAreaComponent } from 'src/app/working-area/working-area.componen
styleUrls: ['./plan-assistance.component.scss']
})
export class PlanAssistanceComponent implements OnInit, AfterViewInit {
- constructor() { }
+ constructor(public canvasData:CanvasShareDataService) { }
@ViewChild('workingArea')
workingArea: WorkingAreaComponent;
-
demoData = [
{
TemplateId: null,
@@ -23,6 +24,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit {
FillMode: 0,
FireElementId: 0,
FixedSize: false,
+ CanConnection: true,
+ ConnectionObjs: [],
Height: 32,
Width: 32,
Id: '5f67f92238f13cd2048cae9d',
@@ -50,6 +53,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit {
FillMode: 0,
FireElementId: 0,
FixedSize: false,
+ CanConnection: true,
+ ConnectionObjs: [],
Height: 32,
Width: 32,
Id: '5f67f92238f13cd2048cae9e',
@@ -77,6 +82,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit {
FillMode: 0,
FireElementId: 0,
FixedSize: false,
+ CanConnection: true,
+ ConnectionObjs: [],
Height: 32,
Width: 32,
Id: '5f67f92238f13cd2048cae9f',
@@ -104,6 +111,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit {
FillMode: 0,
FireElementId: 0,
FixedSize: false,
+ CanConnection: true,
+ ConnectionObjs: [],
Height: 32,
Width: 32,
Id: '5f67f92238f13cd2048caea0',
@@ -131,6 +140,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit {
FillMode: 0,
FireElementId: 0,
FixedSize: false,
+ CanConnection: true,
+ ConnectionObjs: [],
Height: 32,
Width: 32,
Id: '5f67f92238f13cd2048caea1',
@@ -158,6 +169,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit {
FillMode: 0,
FireElementId: 0,
FixedSize: false,
+ CanConnection: true,
+ ConnectionObjs: [],
Height: 32,
Width: 32,
Id: '5f67f92238f13cd2048caea2',
@@ -185,6 +198,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit {
FillMode: 0,
FireElementId: 0,
FixedSize: false,
+ CanConnection: true,
+ ConnectionObjs: [],
Height: 32,
Width: 32,
Id: '5f67f92238f13cd2048caea3',
@@ -212,6 +227,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit {
FillMode: 0,
FireElementId: 0,
FixedSize: false,
+ CanConnection: true,
+ ConnectionObjs: [],
Height: 32,
Width: 32,
Id: '5f67f92238f13cd2048caea4',
@@ -239,6 +256,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit {
FillMode: 0,
FireElementId: 0,
FixedSize: false,
+ CanConnection: true,
+ ConnectionObjs: [],
Height: 32,
Width: 32,
Id: '5f67f92238f13cd2048caea5',
@@ -266,6 +285,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit {
FillMode: 0,
FireElementId: 0,
FixedSize: false,
+ CanConnection: true,
+ ConnectionObjs: [],
Height: 32,
Width: 32,
Id: '5f67f92238f13cd2048caea6',
@@ -293,6 +314,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit {
FillMode: 0,
FireElementId: 0,
FixedSize: false,
+ CanConnection: true,
+ ConnectionObjs: [],
Height: 32,
Width: 32,
Id: '5f67f92238f13cd2048caea7',
@@ -320,6 +343,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit {
FillMode: 0,
FireElementId: 0,
FixedSize: false,
+ CanConnection: true,
+ ConnectionObjs: [],
Height: 32,
Width: 32,
Id: '5f67f92238f13cd2048caea8',
@@ -347,6 +372,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit {
FillMode: 0,
FireElementId: 0,
FixedSize: false,
+ CanConnection: true,
+ ConnectionObjs: [],
Height: 32,
Width: 32,
Id: '5f67f92238f13cd2048caea9',
@@ -374,6 +401,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit {
FillMode: 0,
FireElementId: 0,
FixedSize: false,
+ CanConnection: true,
+ ConnectionObjs: [],
Height: 32,
Width: 32,
Id: '5f67f92238f13cd2048caeaa',
@@ -401,6 +430,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit {
FillMode: 0,
FireElementId: 0,
FixedSize: false,
+ CanConnection: true,
+ ConnectionObjs: [],
Height: 32,
Width: 32,
Id: '5f67f92238f13cd2048caeab',
@@ -428,6 +459,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit {
FillMode: 0,
FireElementId: 0,
FixedSize: false,
+ CanConnection: true,
+ ConnectionObjs: [],
Height: 32,
Width: 32,
Id: '5f67f92238f13cd2048caeac',
@@ -455,6 +488,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit {
FillMode: 0,
FireElementId: 0,
FixedSize: false,
+ CanConnection: true,
+ ConnectionObjs: [],
Height: 32,
Width: 32,
Id: '5f67f92238f13cd2048caead',
@@ -482,6 +517,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit {
FillMode: 0,
FireElementId: 0,
FixedSize: false,
+ CanConnection: true,
+ ConnectionObjs: [],
Height: 32,
Width: 32,
Id: '5f67f92238f13cd2048caeae',
@@ -509,6 +546,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit {
FillMode: 0,
FireElementId: 0,
FixedSize: false,
+ CanConnection: true,
+ ConnectionObjs: [],
Height: 32,
Width: 32,
Id: '5f67f92238f13cd2048caeaf',
@@ -536,6 +575,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit {
FillMode: 0,
FireElementId: 0,
FixedSize: false,
+ CanConnection: true,
+ ConnectionObjs: [],
Height: 32,
Width: 32,
Id: '5f67f92238f13cd2048caeb0',
@@ -563,6 +604,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit {
FillMode: 0,
FireElementId: 0,
FixedSize: false,
+ CanConnection: true,
+ ConnectionObjs: [],
Height: 32,
Width: 32,
Id: '5f67f92238f13cd2048caeb1',
@@ -590,6 +633,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit {
FillMode: 0,
FireElementId: 0,
FixedSize: false,
+ CanConnection: true,
+ ConnectionObjs: [],
Height: 32,
Width: 32,
Id: '5f67f92238f13cd2048caeb2',
@@ -617,6 +662,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit {
FillMode: 0,
FireElementId: 0,
FixedSize: false,
+ CanConnection: true,
+ ConnectionObjs: [],
Height: 32,
Width: 32,
Id: '5f67f92238f13cd2048caeb3',
@@ -644,6 +691,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit {
FillMode: 0,
FireElementId: 0,
FixedSize: false,
+ CanConnection: true,
+ ConnectionObjs: [],
Height: 32,
Width: 32,
Id: '5f67f92238f13cd2048caeb4',
@@ -671,6 +720,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit {
FillMode: 0,
FireElementId: 0,
FixedSize: false,
+ CanConnection: true,
+ ConnectionObjs: [],
Height: 32,
Width: 32,
Id: '5f67f92238f13cd2048caeb5',
@@ -698,6 +749,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit {
FillMode: 0,
FireElementId: 0,
FixedSize: false,
+ CanConnection: true,
+ ConnectionObjs: [],
Height: 32,
Width: 32,
Id: '5f67f92238f13cd2048caeb6',
@@ -725,6 +778,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit {
FillMode: 0,
FireElementId: 0,
FixedSize: false,
+ CanConnection: true,
+ ConnectionObjs: [],
Height: 32,
Width: 32,
Id: '5f67f92238f13cd2048caeb7',
@@ -752,6 +807,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit {
FillMode: 0,
FireElementId: 0,
FixedSize: false,
+ CanConnection: true,
+ ConnectionObjs: [],
Height: 32,
Width: 32,
Id: '5f67f92238f13cd2048caeb8',
@@ -779,6 +836,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit {
FillMode: 0,
FireElementId: 0,
FixedSize: false,
+ CanConnection: true,
+ ConnectionObjs: [],
Height: 32,
Width: 32,
Id: '5f67f92238f13cd2048caeb9',
@@ -806,6 +865,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit {
FillMode: 0,
FireElementId: 0,
FixedSize: false,
+ CanConnection: true,
+ ConnectionObjs: [],
Height: 32,
Width: 32,
Id: '5f67f92238f13cd2048caeba',
@@ -833,6 +894,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit {
FillMode: 0,
FireElementId: 0,
FixedSize: false,
+ CanConnection: true,
+ ConnectionObjs: [],
Height: 32,
Width: 32,
Id: '5f67f92238f13cd2048caebb',
@@ -860,6 +923,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit {
FillMode: 0,
FireElementId: 0,
FixedSize: false,
+ CanConnection: true,
+ ConnectionObjs: [],
Height: 32,
Width: 32,
Id: '5f67f92238f13cd2048caebc',
@@ -887,6 +952,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit {
FillMode: 0,
FireElementId: 0,
FixedSize: false,
+ CanConnection: true,
+ ConnectionObjs: [],
Height: 32,
Width: 32,
Id: '5f67f92238f13cd2048caebd',
@@ -914,6 +981,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit {
FillMode: 0,
FireElementId: 0,
FixedSize: false,
+ CanConnection: true,
+ ConnectionObjs: [],
Height: 32,
Width: 32,
Id: '5f67f92238f13cd2048caebe',
@@ -941,6 +1010,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit {
FillMode: 0,
FireElementId: 0,
FixedSize: false,
+ CanConnection: true,
+ ConnectionObjs: [],
Height: 32,
Width: 32,
Id: '5f67f92238f13cd2048caebf',
@@ -968,6 +1039,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit {
FillMode: 0,
FireElementId: 0,
FixedSize: false,
+ CanConnection: true,
+ ConnectionObjs: [],
Height: 32,
Width: 32,
Id: '5f67f92238f13cd2048caec0',
@@ -995,6 +1068,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit {
FillMode: 0,
FireElementId: 0,
FixedSize: false,
+ CanConnection: true,
+ ConnectionObjs: [],
Height: 32,
Width: 32,
Id: '5f67f92238f13cd2048caec1',
@@ -1022,6 +1097,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit {
FillMode: 0,
FireElementId: 0,
FixedSize: false,
+ CanConnection: true,
+ ConnectionObjs: [],
Height: 32,
Width: 32,
Id: '5f67f92238f13cd2048caec2',
@@ -1049,6 +1126,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit {
FillMode: 0,
FireElementId: 0,
FixedSize: false,
+ CanConnection: true,
+ ConnectionObjs: [],
Height: 32,
Width: 32,
Id: '5f67f92238f13cd2048caec3',
@@ -1076,6 +1155,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit {
FillMode: 0,
FireElementId: 0,
FixedSize: false,
+ CanConnection: true,
+ ConnectionObjs: [],
Height: 32,
Width: 32,
Id: '5f67f92238f13cd2048caec4',
@@ -1103,6 +1184,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit {
FillMode: 0,
FireElementId: 0,
FixedSize: false,
+ CanConnection: true,
+ ConnectionObjs: [],
Height: 32,
Width: 32,
Id: '5f67f92238f13cd2048caec5',
@@ -1130,6 +1213,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit {
FillMode: 0,
FireElementId: 0,
FixedSize: false,
+ CanConnection: true,
+ ConnectionObjs: [],
Height: 32,
Width: 32,
Id: '5f67f92238f13cd2048caec6',
@@ -1157,6 +1242,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit {
FillMode: 0,
FireElementId: 0,
FixedSize: false,
+ CanConnection: true,
+ ConnectionObjs: [],
Height: 32,
Width: 32,
Id: '5f67f92238f13cd2048caec7',
@@ -1184,6 +1271,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit {
FillMode: 0,
FireElementId: 0,
FixedSize: false,
+ CanConnection: true,
+ ConnectionObjs: [],
Height: 32,
Width: 32,
Id: '5f67f92238f13cd2048caec8',
@@ -1211,6 +1300,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit {
FillMode: 0,
FireElementId: 0,
FixedSize: false,
+ CanConnection: true,
+ ConnectionObjs: [],
Height: 32,
Width: 32,
Id: '5f67f92238f13cd2048caec9',
@@ -1238,6 +1329,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit {
FillMode: 0,
FireElementId: 0,
FixedSize: false,
+ CanConnection: true,
+ ConnectionObjs: [],
Height: 32,
Width: 32,
Id: '5f67f92238f13cd2048caeca',
@@ -1265,6 +1358,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit {
FillMode: 0,
FireElementId: 0,
FixedSize: false,
+ CanConnection: true,
+ ConnectionObjs: [],
Height: 32,
Width: 32,
Id: '5f67f92238f13cd2048caecb',
@@ -1292,6 +1387,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit {
FillMode: 0,
FireElementId: 0,
FixedSize: false,
+ CanConnection: true,
+ ConnectionObjs: [],
Height: 32,
Width: 32,
Id: '5f67f92238f13cd2048caecc',
@@ -1319,6 +1416,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit {
FillMode: 0,
FireElementId: 0,
FixedSize: false,
+ CanConnection: true,
+ ConnectionObjs: [],
Height: 32,
Width: 32,
Id: '5f67f92238f13cd2048caecd',
@@ -1346,6 +1445,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit {
FillMode: 0,
FireElementId: 0,
FixedSize: false,
+ CanConnection: true,
+ ConnectionObjs: [],
Height: 32,
Width: 32,
Id: '5f67f92238f13cd2048caece',
@@ -1375,6 +1476,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit {
FillMode: 0,
FireElementId: 0,
FixedSize: false,
+ CanConnection: true,
+ ConnectionObjs: [],
Height: 32,
Width: 32,
Id: '5f67f92238f13cd2048cae9d',
@@ -1408,10 +1511,664 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit {
GameMode: 2
};
ngOnInit(): void {
-
+ let that = this
+ window.setTimeout(()=>{
+ document.getElementById("center").oncontextmenu = function (event) {
+ that.workingArea.cancelPaint()
+ event.preventDefault();
+ };
+ })
}
ngAfterViewInit(): void {
this.workingArea.loadDemoScene(this.demoData, 0.149);
}
+
+ //所有车辆信息
+ allCarsData = [
+ {
+ TemplateId: null,
+ FloorId: null,
+ Angle: 0,
+ Color: 0,
+ Enabled: true,
+ FillMode: 0,
+ FireElementId: 0,
+ FixedSize: false,
+ Height: 32,
+ Width: 32,
+ Id: ObjectID.default.generate(),
+ ImageUrl: './assets/images/水罐消防车.png',
+ InteractiveMode: 0,
+ MultiPoint: null,
+ Point: {
+ x: 1295,
+ y: 1237
+ },
+ Name: '水罐消防车',
+ FireTeamName: '港北区解放路消防救援站', //所属消防队
+ ReachTime: 0, //到场剩余时间
+ WaterYield: '8t',//载水量
+ Foam: '0t', //载泡沫
+ PeopleNum: 6, //载人数
+ Tonnage: '10t', //吨位
+ Assignment: '供液', //执行任务
+ LinkCar: '', //连接车辆
+ WaterOccupy: '', //水源占用
+ PropertyInfos: [
+ {
+ Enabled: true,
+ Order: 0,
+ PhysicalUnit: '',
+ PropertyName: '名称/编号',
+ PropertyType: 0,
+ PropertyValue: '港北区解放路消防救援站',
+ Required: false,
+ RuleName: '',
+ RuleValue: '',
+ Tag: '',
+ Visible: true
+ }
+ ],
+ Border: null,
+ DrawMode: null,
+ Thickness: 0,
+ IsFromBuilding: false,
+ GameMode: 2
+ },
+ {
+ TemplateId: null,
+ FloorId: null,
+ Angle: 0,
+ Color: 0,
+ Enabled: true,
+ FillMode: 0,
+ FireElementId: 0,
+ FixedSize: false,
+ Height: 32,
+ Width: 32,
+ Id: ObjectID.default.generate(),
+ ImageUrl: './assets/images/泡沫消防车.png',
+ InteractiveMode: 0,
+ MultiPoint: null,
+ Point: {
+ x: 1295,
+ y: 1237
+ },
+ Name: '水罐泡沫消防车',
+ FireTeamName: '港北区解放路消防救援站', //所属消防队
+ ReachTime: 0, //到场剩余时间
+ WaterYield: '10t',//载水量
+ Foam: '2t', //载泡沫
+ PeopleNum: 6, //载人数
+ Tonnage: '12t', //吨位
+ Assignment: '灭火', //执行任务
+ LinkCar: '', //连接车辆
+ WaterOccupy: '', //水源占用
+ PropertyInfos: [
+ {
+ Enabled: true,
+ Order: 0,
+ PhysicalUnit: '',
+ PropertyName: '名称/编号',
+ PropertyType: 0,
+ PropertyValue: '港北区解放路消防救援站',
+ Required: false,
+ RuleName: '',
+ RuleValue: '',
+ Tag: '',
+ Visible: true
+ }
+ ],
+ Border: null,
+ DrawMode: null,
+ Thickness: 0,
+ IsFromBuilding: false,
+ GameMode: 2
+ },
+ {
+ TemplateId: null,
+ FloorId: null,
+ Angle: 0,
+ Color: 0,
+ Enabled: true,
+ FillMode: 0,
+ FireElementId: 0,
+ FixedSize: false,
+ Height: 32,
+ Width: 32,
+ Id: ObjectID.default.generate(),
+ ImageUrl: './assets/images/泡沫消防车.png',
+ InteractiveMode: 0,
+ MultiPoint: null,
+ Point: {
+ x: 1295,
+ y: 1237
+ },
+ Name: '水罐泡沫消防车',
+ FireTeamName: '港北区解放路消防救援站', //所属消防队
+ ReachTime: 0, //到场剩余时间
+ WaterYield: '4t',//载水量
+ Foam: '1t', //载泡沫
+ PeopleNum: 6, //载人数
+ Tonnage: '6t', //吨位
+ Assignment: '灭火', //执行任务
+ LinkCar: '', //连接车辆
+ WaterOccupy: '', //水源占用
+ PropertyInfos: [
+ {
+ Enabled: true,
+ Order: 0,
+ PhysicalUnit: '',
+ PropertyName: '名称/编号',
+ PropertyType: 0,
+ PropertyValue: '港北区解放路消防救援站',
+ Required: false,
+ RuleName: '',
+ RuleValue: '',
+ Tag: '',
+ Visible: true
+ }
+ ],
+ Border: null,
+ DrawMode: null,
+ Thickness: 0,
+ IsFromBuilding: false,
+ GameMode: 2
+ },
+ {
+ TemplateId: null,
+ FloorId: null,
+ Angle: 0,
+ Color: 0,
+ Enabled: true,
+ FillMode: 0,
+ FireElementId: 0,
+ FixedSize: false,
+ Height: 32,
+ Width: 32,
+ Id: ObjectID.default.generate(),
+ ImageUrl: './assets/images/压缩空气泡沫消防车.png',
+ InteractiveMode: 0,
+ MultiPoint: null,
+ Point: {
+ x: 1295,
+ y: 1237
+ },
+ Name: '举高喷射消防车',
+ FireTeamName: '港北区解放路消防救援站', //所属消防队
+ ReachTime: 0, //到场剩余时间
+ WaterYield: '18t',//载水量
+ Foam: '2t', //载泡沫
+ PeopleNum: 6, //载人数
+ Tonnage: '20t', //吨位
+ Assignment: '灭火', //执行任务
+ LinkCar: '', //连接车辆
+ WaterOccupy: '', //水源占用
+ PropertyInfos: [
+ {
+ Enabled: true,
+ Order: 0,
+ PhysicalUnit: '',
+ PropertyName: '名称/编号',
+ PropertyType: 0,
+ PropertyValue: '港北区解放路消防救援站',
+ Required: false,
+ RuleName: '',
+ RuleValue: '',
+ Tag: '',
+ Visible: true
+ }
+ ],
+ Border: null,
+ DrawMode: null,
+ Thickness: 0,
+ IsFromBuilding: false,
+ GameMode: 2
+ },
+ {
+ TemplateId: null,
+ FloorId: null,
+ Angle: 0,
+ Color: 0,
+ Enabled: true,
+ FillMode: 0,
+ FireElementId: 0,
+ FixedSize: false,
+ Height: 32,
+ Width: 32,
+ Id: ObjectID.default.generate(),
+ ImageUrl: './assets/images/水罐消防车.png',
+ InteractiveMode: 0,
+ MultiPoint: null,
+ Point: {
+ x: 1295,
+ y: 1237
+ },
+ Name: '水罐消防车',
+ FireTeamName: '八塘消防救援站', //所属消防队
+ ReachTime: 3, //到场剩余时间
+ WaterYield: '12t',//载水量
+ Foam: '0t', //载泡沫
+ PeopleNum: 6, //载人数
+ Tonnage: '14t', //吨位
+ Assignment: '冷却', //执行任务
+ LinkCar: '', //连接车辆
+ WaterOccupy: '', //水源占用
+ PropertyInfos: [
+ {
+ Enabled: true,
+ Order: 0,
+ PhysicalUnit: '',
+ PropertyName: '名称/编号',
+ PropertyType: 0,
+ PropertyValue: '八塘消防救援站',
+ Required: false,
+ RuleName: '',
+ RuleValue: '',
+ Tag: '',
+ Visible: true
+ }
+ ],
+ Border: null,
+ DrawMode: null,
+ Thickness: 0,
+ IsFromBuilding: false,
+ GameMode: 2
+ },
+ {
+ TemplateId: null,
+ FloorId: null,
+ Angle: 0,
+ Color: 0,
+ Enabled: true,
+ FillMode: 0,
+ FireElementId: 0,
+ FixedSize: false,
+ Height: 32,
+ Width: 32,
+ Id: ObjectID.default.generate(),
+ ImageUrl: './assets/images/泡沫消防车.png',
+ InteractiveMode: 0,
+ MultiPoint: null,
+ Point: {
+ x: 1295,
+ y: 1237
+ },
+ Name: '水罐泡沫消防车',
+ FireTeamName: '八塘消防救援站', //所属消防队
+ ReachTime: 3, //到场剩余时间
+ WaterYield: '6t',//载水量
+ Foam: '2t', //载泡沫
+ PeopleNum: 6, //载人数
+ Tonnage: '8t', //吨位
+ Assignment: '冷却', //执行任务
+ LinkCar: '', //连接车辆
+ WaterOccupy: '', //水源占用
+ PropertyInfos: [
+ {
+ Enabled: true,
+ Order: 0,
+ PhysicalUnit: '',
+ PropertyName: '名称/编号',
+ PropertyType: 0,
+ PropertyValue: '八塘消防救援站',
+ Required: false,
+ RuleName: '',
+ RuleValue: '',
+ Tag: '',
+ Visible: true
+ }
+ ],
+ Border: null,
+ DrawMode: null,
+ Thickness: 0,
+ IsFromBuilding: false,
+ GameMode: 2
+ },
+ {
+ TemplateId: null,
+ FloorId: null,
+ Angle: 0,
+ Color: 0,
+ Enabled: true,
+ FillMode: 0,
+ FireElementId: 0,
+ FixedSize: false,
+ Height: 32,
+ Width: 32,
+ Id: ObjectID.default.generate(),
+ ImageUrl: './assets/images/泡沫消防车.png',
+ InteractiveMode: 0,
+ MultiPoint: null,
+ Point: {
+ x: 1295,
+ y: 1237
+ },
+ Name: '水罐泡沫消防车',
+ FireTeamName: '八塘消防救援站', //所属消防队
+ ReachTime: 3, //到场剩余时间
+ WaterYield: '3t',//载水量
+ Foam: '1t', //载泡沫
+ PeopleNum: 8, //载人数
+ Tonnage: '5t', //吨位
+ Assignment: '堵截', //执行任务
+ LinkCar: '', //连接车辆
+ WaterOccupy: '', //水源占用
+ PropertyInfos: [
+ {
+ Enabled: true,
+ Order: 0,
+ PhysicalUnit: '',
+ PropertyName: '名称/编号',
+ PropertyType: 0,
+ PropertyValue: '八塘消防救援站',
+ Required: false,
+ RuleName: '',
+ RuleValue: '',
+ Tag: '',
+ Visible: true
+ }
+ ],
+ Border: null,
+ DrawMode: null,
+ Thickness: 0,
+ IsFromBuilding: false,
+ GameMode: 2
+ },
+ {
+ TemplateId: null,
+ FloorId: null,
+ Angle: 0,
+ Color: 0,
+ Enabled: true,
+ FillMode: 0,
+ FireElementId: 0,
+ FixedSize: false,
+ Height: 32,
+ Width: 32,
+ Id: ObjectID.default.generate(),
+ ImageUrl: './assets/images/压缩空气泡沫消防车.png',
+ InteractiveMode: 0,
+ MultiPoint: null,
+ Point: {
+ x: 1295,
+ y: 1237
+ },
+ Name: '举高喷射消防车',
+ FireTeamName: '八塘消防救援站', //所属消防队
+ ReachTime: 4, //到场剩余时间
+ WaterYield: '16t',//载水量
+ Foam: '2t', //载泡沫
+ PeopleNum: 4, //载人数
+ Tonnage: '18t', //吨位
+ Assignment: '灭火', //执行任务
+ LinkCar: '', //连接车辆
+ WaterOccupy: '', //水源占用
+ PropertyInfos: [
+ {
+ Enabled: true,
+ Order: 0,
+ PhysicalUnit: '',
+ PropertyName: '名称/编号',
+ PropertyType: 0,
+ PropertyValue: '八塘消防救援站',
+ Required: false,
+ RuleName: '',
+ RuleValue: '',
+ Tag: '',
+ Visible: true
+ }
+ ],
+ Border: null,
+ DrawMode: null,
+ Thickness: 0,
+ IsFromBuilding: false,
+ GameMode: 2
+ },
+ {
+ TemplateId: null,
+ FloorId: null,
+ Angle: 0,
+ Color: 0,
+ Enabled: true,
+ FillMode: 0,
+ FireElementId: 0,
+ FixedSize: false,
+ Height: 32,
+ Width: 32,
+ Id: ObjectID.default.generate(),
+ ImageUrl: './assets/images/泡沫消防车.png',
+ InteractiveMode: 0,
+ MultiPoint: null,
+ Point: {
+ x: 1295,
+ y: 1237
+ },
+ Name: '水罐泡沫消防车',
+ FireTeamName: '龚州消防救援站', //所属消防队
+ ReachTime: 11, //到场剩余时间
+ WaterYield: '6t',//载水量
+ Foam: '2t', //载泡沫
+ PeopleNum: 6, //载人数
+ Tonnage: '8t', //吨位
+ Assignment: '供液', //执行任务
+ LinkCar: '', //连接车辆
+ WaterOccupy: '', //水源占用
+ PropertyInfos: [
+ {
+ Enabled: true,
+ Order: 0,
+ PhysicalUnit: '',
+ PropertyName: '名称/编号',
+ PropertyType: 0,
+ PropertyValue: '龚州消防救援站',
+ Required: false,
+ RuleName: '',
+ RuleValue: '',
+ Tag: '',
+ Visible: true
+ }
+ ],
+ Border: null,
+ DrawMode: null,
+ Thickness: 0,
+ IsFromBuilding: false,
+ GameMode: 2
+ },
+ {
+ TemplateId: null,
+ FloorId: null,
+ Angle: 0,
+ Color: 0,
+ Enabled: true,
+ FillMode: 0,
+ FireElementId: 0,
+ FixedSize: false,
+ Height: 32,
+ Width: 32,
+ Id: ObjectID.default.generate(),
+ ImageUrl: './assets/images/泡沫消防车.png',
+ InteractiveMode: 0,
+ MultiPoint: null,
+ Point: {
+ x: 1295,
+ y: 1237
+ },
+ Name: '水罐泡沫消防车',
+ FireTeamName: '龚州消防救援站', //所属消防队
+ ReachTime: 15, //到场剩余时间
+ WaterYield: '5t',//载水量
+ Foam: '1t', //载泡沫
+ PeopleNum: 6, //载人数
+ Tonnage: '7t', //吨位
+ Assignment: '供液', //执行任务
+ LinkCar: '', //连接车辆
+ WaterOccupy: '', //水源占用
+ PropertyInfos: [
+ {
+ Enabled: true,
+ Order: 0,
+ PhysicalUnit: '',
+ PropertyName: '名称/编号',
+ PropertyType: 0,
+ PropertyValue: '龚州消防救援站',
+ Required: false,
+ RuleName: '',
+ RuleValue: '',
+ Tag: '',
+ Visible: true
+ }
+ ],
+ Border: null,
+ DrawMode: null,
+ Thickness: 0,
+ IsFromBuilding: false,
+ GameMode: 2
+ },
+ {
+ TemplateId: null,
+ FloorId: null,
+ Angle: 0,
+ Color: 0,
+ Enabled: true,
+ FillMode: 0,
+ FireElementId: 0,
+ FixedSize: false,
+ Height: 32,
+ Width: 32,
+ Id: ObjectID.default.generate(),
+ ImageUrl: './assets/images/泡沫消防车.png',
+ InteractiveMode: 0,
+ MultiPoint: null,
+ Point: {
+ x: 1295,
+ y: 1237
+ },
+ Name: '水罐泡沫消防车',
+ FireTeamName: '龚州消防救援站', //所属消防队
+ ReachTime: 15, //到场剩余时间
+ WaterYield: '3t',//载水量
+ Foam: '1t', //载泡沫
+ PeopleNum: 6, //载人数
+ Tonnage: '5t', //吨位
+ Assignment: '供液', //执行任务
+ LinkCar: '', //连接车辆
+ WaterOccupy: '', //水源占用
+ PropertyInfos: [
+ {
+ Enabled: true,
+ Order: 0,
+ PhysicalUnit: '',
+ PropertyName: '名称/编号',
+ PropertyType: 0,
+ PropertyValue: '龚州消防救援站',
+ Required: false,
+ RuleName: '',
+ RuleValue: '',
+ Tag: '',
+ Visible: true
+ }
+ ],
+ Border: null,
+ DrawMode: null,
+ Thickness: 0,
+ IsFromBuilding: false,
+ GameMode: 2
+ },
+ {
+ TemplateId: null,
+ FloorId: null,
+ Angle: 0,
+ Color: 0,
+ Enabled: true,
+ FillMode: 0,
+ FireElementId: 0,
+ FixedSize: false,
+ Height: 32,
+ Width: 32,
+ Id: ObjectID.default.generate(),
+ ImageUrl: './assets/images/压缩空气泡沫消防车.png',
+ InteractiveMode: 0,
+ MultiPoint: null,
+ Point: {
+ x: 1295,
+ y: 1237
+ },
+ Name: '举高喷射消防车',
+ FireTeamName: '龚州消防救援站', //所属消防队
+ ReachTime: 15, //到场剩余时间
+ WaterYield: '18t',//载水量
+ Foam: '2t', //载泡沫
+ PeopleNum: 4, //载人数
+ Tonnage: '20t', //吨位
+ Assignment: '灭火', //执行任务
+ LinkCar: '', //连接车辆
+ WaterOccupy: '', //水源占用
+ PropertyInfos: [
+ {
+ Enabled: true,
+ Order: 0,
+ PhysicalUnit: '',
+ PropertyName: '名称/编号',
+ PropertyType: 0,
+ PropertyValue: '龚州消防救援站',
+ Required: false,
+ RuleName: '',
+ RuleValue: '',
+ Tag: '',
+ Visible: true
+ }
+ ],
+ Border: null,
+ DrawMode: null,
+ Thickness: 0,
+ IsFromBuilding: false,
+ GameMode: 2
+ }
+ ]
+
+ //开始绘制
+ plot (e) {
+
+ }
+
+ bottomIsShow:boolean = false; //底部车辆信息是否展示
+ rightIsShow:boolean = true; //右侧楼层是否展示
+ rightSayIsShow:boolean = false; //右侧语音是否展示
+
+ //选择 车辆
+ selectCar (e) {
+ console.log(e)
+ this.canvasData.selectCar = e
+ this.bottomIsShow = true
+ }
+
+ //倒计时结束
+ handleEvent (e,item) {
+ console.log(e,item)
+ }
+
+ //关闭 底部车辆信息
+ closeBottom () {
+ this.bottomIsShow = false
+ }
+
+ //打开 右侧楼层
+ openRight () {
+ this.rightIsShow = true
+ }
+
+ //关闭 右侧楼层
+ closeRight () {
+ this.rightIsShow = false
+ }
+
+ //打开 关闭 右侧语音
+ toggleSay () {
+ this.rightSayIsShow = !this.rightSayIsShow
+ }
+
+
+
}
diff --git a/src/app/ui/similar-plans/similar-plans.component.html b/src/app/ui/similar-plans/similar-plans.component.html
index 44bcb13..5863341 100644
--- a/src/app/ui/similar-plans/similar-plans.component.html
+++ b/src/app/ui/similar-plans/similar-plans.component.html
@@ -1 +1,13 @@
-
similar-plans works!
+
+
+
+ 单位名称 |
+ 始建于 |
+ 着火物 |
+ 点火位置 |
+ 相近度 |
+ 详情 |
+
+
+
+
diff --git a/src/app/ui/similar-plans/similar-plans.component.scss b/src/app/ui/similar-plans/similar-plans.component.scss
index e69de29..5fd855a 100644
--- a/src/app/ui/similar-plans/similar-plans.component.scss
+++ b/src/app/ui/similar-plans/similar-plans.component.scss
@@ -0,0 +1,19 @@
+.leisiTable{
+ border:1px solid #0E79A9;
+ height: 95%;
+ width: 100%;
+ background-color: #05385E;
+ margin-top: 50px;
+ table{
+ width: 100%;
+ height: 100%;
+ thead{
+ td{
+ color:#F7BA2A;
+ height: 50px;
+ text-align:center;
+ border-bottom: 1px solid #0E79A9;
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/app/ui/similar-plans/similar-plans.component.ts b/src/app/ui/similar-plans/similar-plans.component.ts
index 5393651..ff65ba0 100644
--- a/src/app/ui/similar-plans/similar-plans.component.ts
+++ b/src/app/ui/similar-plans/similar-plans.component.ts
@@ -10,6 +10,44 @@ export class SimilarPlansComponent implements OnInit {
constructor() { }
ngOnInit(): void {
+ this.tableData()
+ }
+
+ leisiYuan=[
+ {danweiName:"广西钦州志诚化工有限公司",year:"XXXX年",zhoahuo:"XXX",weizhi:"2#储罐",xiangjin:"80%"},
+ {danweiName:"南宁交能石化有限责任公司",year:"",zhoahuo:"XXX",weizhi:"3#储罐",xiangjin:"75%"},
+ {danweiName:"广西藤县通轩立信化学有限公司",year:"",zhoahuo:"XXX",weizhi:"1#储罐",xiangjin:"70%"},
+ {danweiName:"广西田东锦盛化工科技有限公司",year:"",zhoahuo:"XXXXXX",weizhi:"12#储罐",xiangjin:"60%"},
+ {danweiName:"梧州市联溢化工有限公司",year:"",zhoahuo:"XXX",weizhi:"5#储罐",xiangjin:"50%"},
+ {danweiName:"田东石油化工钦州港油品储运库",year:"",zhoahuo:"XXX",weizhi:"4-1#储罐",xiangjin:"40%"},
+ {danweiName:"中国石油进德油库",year:"",zhoahuo:"XXX",weizhi:"3#储罐",xiangjin:"45%"},
+ {danweiName:"广西华鑫化工有限公司",year:"",zhoahuo:"XXX",weizhi:"11#储罐",xiangjin:"42%"},
+ {danweiName:"广西中油能源有限公司",year:"",zhoahuo:"XXX",weizhi:"6#储罐",xiangjin:"39%"},
+ {danweiName:"广西钦州澄星化工科技有限公司",year:"",zhoahuo:"XXX",weizhi:"5-2#储罐",xiangjin:"35%"},
+ {danweiName:"中油广西田东石油化工总厂有限公司",year:"",zhoahuo:"XXX",weizhi:"3-1#储罐",xiangjin:"35%"}
+ ]
+ tableData(){
+ var res=''
+ for(var i=0;i
'
+ res+=''+this.leisiYuan[i].danweiName+' | '
+ res+=''+"" +' | '
+ res+=''+""+' | '
+ res+=''+this.leisiYuan[i].weizhi+' | '
+ if(parseFloat(this.leisiYuan[i].xiangjin)'+this.leisiYuan[i].xiangjin+''
+ }
+ else if(parseFloat(this.leisiYuan[i].xiangjin)<=parseFloat('60%')&&parseFloat(this.leisiYuan[i].xiangjin)>=parseFloat('50%')){
+ res+=''+this.leisiYuan[i].xiangjin+' | '
+ }
+ else{
+ res+=''+this.leisiYuan[i].xiangjin+' | '
+ }
+ res+='查看详情 | '
+ }
+ res+=''
+ var shuju=document.getElementById('shujubody')
+ shuju.innerHTML=res
}
}
diff --git a/src/app/working-area/working-area.component.ts b/src/app/working-area/working-area.component.ts
index 79a0531..b49a02e 100644
--- a/src/app/working-area/working-area.component.ts
+++ b/src/app/working-area/working-area.component.ts
@@ -71,6 +71,14 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
* 绘制点集合
*/
public paintPoints: PIXI.Point[] = [];
+ /**
+ * 绘制中的管线
+ */
+ public paintingPipeline: Pipeline = null;
+ /**
+ * 绘制中的箭头
+ */
+ public paintingArrows: Arrows = null;
/**
* 绘制中的多点图标
*/
@@ -148,11 +156,11 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
// 删除 选中的数据
if (item.assetData.IsFromBuilding) {
// console.log(this.canvasData.originaleveryStoreyData.data[item.assetData.Id]);
- delete this.canvasData.originalcompanyBuildingData.data[item.assetData.Id];
+ delete this.canvasData.originalcompanyBuildingData?.data[item.assetData.Id];
// console.log(this.canvasData.originalcompanyBuildingData.data[item.assetData.Id]);
} else {
// console.log(this.canvasData.originaleveryStoreyData.data[item.assetData.Id]);
- delete this.canvasData.originaleveryStoreyData.data[item.assetData.Id];
+ delete this.canvasData.originaleveryStoreyData?.data[item.assetData.Id];
// console.log(this.canvasData.originaleveryStoreyData.data[item.assetData.Id]);
}
// console.log(this.backgroundImage.getChildByName(item.assetData.Id));
@@ -240,19 +248,27 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
// this.createEnterPaintEndButton();
// this.backgroundImage.addChild(this.paintingLine);
this.on('select', obj => {
- if (obj instanceof MultipointIcon) {
- obj.setPointVisiable(true);
- } else if (obj instanceof PolygonIcon) {
- obj.setPointVisiable(true);
+ if (this.allowEdit) {
+ if (obj instanceof MultipointIcon) {
+ obj.setPointVisiable(true);
+ } else if (obj instanceof PolygonIcon) {
+ obj.setPointVisiable(true);
+ } else {
+ obj.filters = [this.outlineFilterGreen];
+ }
} else {
obj.filters = [this.outlineFilterGreen];
}
});
this.on('deselect', obj => {
- if (obj instanceof MultipointIcon) {
- obj.setPointVisiable(false);
- } else if (obj instanceof PolygonIcon) {
- obj.setPointVisiable(false);
+ if (this.allowEdit) {
+ if (obj instanceof MultipointIcon) {
+ obj.setPointVisiable(false);
+ } else if (obj instanceof PolygonIcon) {
+ obj.setPointVisiable(false);
+ } else {
+ obj.filters = [];
+ }
} else {
obj.filters = [];
}
@@ -297,6 +313,10 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
this.rectToolGraphics.endFill();
this.rectToolGraphics.closePath();
}
+ if (this.paintingArrows !== null) {
+ this.paintingArrows.data.pointB = new PIXI.Point(this.circleShadow.position.x, this.circleShadow.position.y);
+ this.paintingArrows.refresh();
+ }
});
}
/**
@@ -407,7 +427,6 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
const single = new SinglePointIcon(element, this);
});
this.setNameVisible(false, GameMode.BasicInformation);
- this.allowEdit = true;
const tempData = {
@@ -419,6 +438,8 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
FillMode: 0,
FireElementId: 0,
FixedSize: false,
+ CanConnection: true,
+ ConnectionObjs: [],
Height: 45,
Width: 45,
Id: '5f67f92238f13cd2048cae9d',
@@ -463,6 +484,8 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
Enabled: true,
FillMode: 0,
FireElementId: 0,
+ CanConnection: true,
+ ConnectionObjs: [],
FixedSize: false,
Height: 45,
Width: 45,
@@ -500,9 +523,9 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
tempCar2.setParent(this.app.stage);
tempCar2.position.set(25, 50);
- this.cancelPaint();
- this.paintMode = PaintMode.connection;
- this.previewSinglePointIcon.texture = PIXI.Texture.from('./assets/images/水罐消防车.png');
+ // 开始绘制管线
+ this.beginPaintPipeline();
+ // this.beginPaintingArrows();
}
/**
@@ -712,8 +735,30 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
// }
// this.paintingIcon = new PolygonIcon(this.paintPoints, this);
break;
- case PaintMode.connection:
-
+ case PaintMode.Pipeline:
+ if (this.paintingPipeline !== null) {
+ this.currentClickPoint.position = new PIXI.Point(this.circleShadow.x, this.circleShadow.y);
+ this.paintPoints.push(new PIXI.Point(this.circleShadow.x, this.circleShadow.y));
+ this.paintingPipeline.assetData.MultiPoint = JSON.parse(JSON.stringify(this.paintPoints));
+ this.paintingPipeline.refresh();
+ }
+ // this.emit('backgroundScale', this.backgroundImage.scale.x);
+ break;
+ case PaintMode.Arrows:
+ if (this.paintingArrows === null) {
+ const data = {
+ name: 'string',
+ point: new PIXI.Point(this.circleShadow.x, this.circleShadow.y),
+ pointA: new PIXI.Point(this.circleShadow.x, this.circleShadow.y),
+ pointB: new PIXI.Point(this.circleShadow.x, this.circleShadow.y),
+ source: 'assets/images/进攻方向.png',
+ };
+ this.paintingArrows = new Arrows(data, this);
+ } else {
+ this.paintingArrows.ready = true;
+ this.paintingArrows = null;
+ this.beginPaintPipeline();
+ }
break;
}
} else if (!event.currentTarget.dragging && this.selection.isMultiselection === true) {
@@ -899,6 +944,25 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
this.previewSinglePointIcon.texture = PIXI.Texture.from(this.canvasData.selectTemplateData.imageUrl);
this.circleShadow.visible = true;
}
+ /**
+ * 开始绘制管线
+ */
+ private beginPaintPipeline(): void {
+ this.paintMode = PaintMode.Pipeline;
+ }
+ public paintingPipelineFinish(): void {
+ if (this.paintMode === PaintMode.Pipeline) {
+ this.paintMode = PaintMode.endPaint;
+ this.paintPoints.splice(0, this.paintPoints.length);
+ this.paintingPipeline = null;
+ }
+ this.beginPaintingArrows();
+ }
+ public beginPaintingArrows(): void {
+ this.paintMode = PaintMode.Arrows;
+ }
+
+
/**
* 取消绘画
*/
@@ -1041,9 +1105,9 @@ enum PaintMode {
singlePointIcon,
lineIcon,
polygonIcon,
- beginPainting,
endPaint,
- connection
+ Pipeline,
+ Arrows
}
/**
* 单点图标
@@ -1071,7 +1135,11 @@ export class SinglePointIcon extends PIXI.Container {
+ this.assetData.PropertyInfos?.find(item => item.PropertyName === '名称/编号')?.PropertyValue, this.style);
private image = PIXI.Sprite.from(this.assetData.ImageUrl);
// 是否可以被链接
- canConnection: boolean;
+ canConnection = false;
+ // 链接对象
+ connectionObjs: any[] = [];
+ // 链接的管线
+ pipelines: any[] = [];
constructor(public assetData: any, private workingArea: WorkingAreaComponent) {
super();
@@ -1080,6 +1148,8 @@ export class SinglePointIcon extends PIXI.Container {
this.y = this.assetData.Point.y;
this.name = this.assetData.Id;
+ this.canConnection = this.assetData.CanConnection === undefined ? false : this.assetData.CanConnection;
+
this.image.angle = this.assetData.Angle;
this.image.x = 0;
@@ -1095,7 +1165,33 @@ export class SinglePointIcon extends PIXI.Container {
console.log(this.assetData);
event.stopPropagation();
this.workingArea.selection.selectOne(this);
- if (this.workingArea.allowEdit || this.assetData.GameMode === 2) {
+ if (this.canConnection && this.parent === this.workingArea.backgroundImage) {
+ if (this.workingArea.paintMode === PaintMode.Pipeline) {
+ if (this.workingArea.paintingPipeline === null) {
+ this.workingArea.previewLineSegment.visible = true;
+ this.workingArea.currentClickPoint.position =
+ new PIXI.Point(this.workingArea.circleShadow.x, this.workingArea.circleShadow.y);
+ this.workingArea.paintPoints.push(new PIXI.Point(this.position.x, this.position.y));
+ const tempData = {
+ Id: ObjectID.default.generate(),
+ MultiPoint: JSON.parse(JSON.stringify(this.workingArea.paintPoints)),
+ Point: new PIXI.Point(0, 0),
+ Name: '管线',
+ };
+ this.workingArea.paintingPipeline = new Pipeline(tempData, this.workingArea);
+ } else {
+ this.workingArea.previewLineSegment.visible = false;
+ this.workingArea.currentClickPoint.position =
+ new PIXI.Point(this.workingArea.circleShadow.x, this.workingArea.circleShadow.y);
+ this.workingArea.paintPoints.push(new PIXI.Point(this.position.x, this.position.y));
+ this.workingArea.paintingPipeline.assetData.MultiPoint = JSON.parse(JSON.stringify(this.workingArea.paintPoints));
+ this.workingArea.paintingPipeline.refresh();
+ this.workingArea.paintingPipelineFinish();
+ }
+ }
+ }
+ // 如果链接对象不为空,禁止移动
+ if ((this.workingArea.allowEdit || this.assetData.GameMode === 2) && this.connectionObjs.length === 0) {
event.currentTarget.parent.data = event.data;
event.currentTarget.parent.alpha = 0.5;
event.currentTarget.parent.dragging = true;
@@ -1653,11 +1749,91 @@ export class PolygonIcon extends PIXI.Container {
export class Car extends SinglePointIcon {
}
-export class Conection extends PIXI.Container {
-
+/**
+ * 管线
+ */
+export class Pipeline extends PIXI.Graphics {
+ constructor(public assetData: any, private workingArea: WorkingAreaComponent) {
+ super();
+ this.name = this.assetData.Id;
+ this.x = this.assetData.Point.x;
+ this.y = this.assetData.Point.y;
+ this.workingArea.backgroundImage.addChild(this);
+ // 画线图标
+ this.refresh();
+ this.interactive = true;
+ this.on('mousedown', event => {
+ console.log(this.assetData);
+ event.stopPropagation();
+ this.workingArea.selection.selectOne(this);
+ });
+ }
+ /**
+ * 刷新
+ */
+ public refresh() {
+ this.clear();
+ this.lineStyle(5, 0x0000ff, 1);
+ for (let i = 0, count = this.assetData.MultiPoint.length; i < count; i++) {
+ const pointA = this.assetData.MultiPoint[i];
+ if (i === 0) {
+ this.moveTo(pointA.x, pointA.y);
+ } else {
+ this.lineTo(pointA.x, pointA.y);
+ }
+ }
+ if (this.assetData.MultiPoint.length >= 2) {
+ const pointA = this.assetData.MultiPoint[0];
+ const pointB = this.assetData.MultiPoint[this.assetData.MultiPoint.length - 1];
+ // const angle = Math.atan2((pointB.y - pointA.y), (pointB.x - pointA.x)) * (5 / Math.PI);
+ this.beginFill(0x0000ff);
+ // this.drawStar(pointB.x, pointB.y, 3, 5, 0, angle);
+ this.drawCircle(pointA.x, pointA.y, 5);
+ this.drawCircle(pointB.x, pointB.y, 5);
+ this.endFill();
+ }
+ }
+}
+/**
+ * 箭头
+ * 创建一个只有2个点组成的箭头
+ */
+export class Arrows extends PIXI.Container {
+ public data: any;
+ public icon: PIXI.TilingSprite;
+ public ready = false;
+ constructor(assetData: any, private workingArea: WorkingAreaComponent) {
+ super();
+ this.workingArea.backgroundImage.addChild(this);
+ this.data = assetData;
+ // 画线图标
+ this.icon = new PIXI.TilingSprite(PIXI.Texture.from(this.data.source), 0, 68);
+ this.addChild(this.icon);
+ this.refresh();
+ this.interactive = true;
+ this.on('mousedown', event => {
+ if (!this.ready) { return; }
+ event.stopPropagation();
+ this.workingArea.selection.selectOne(this);
+ });
+ }
+ /**
+ * 刷新
+ */
+ public refresh() {
+ const angle = Math.atan2((this.data.pointB.y - this.data.pointA.y), (this.data.pointB.x - this.data.pointA.x)) * (180 / Math.PI);
+ const a = this.data.pointB.x - this.data.pointA.x;
+ const b = this.data.pointB.y - this.data.pointA.y;
+ const distance = Math.sqrt(a * a + b * b);
+
+ this.icon.width = distance;
+ this.icon.height = 68;
+ this.icon.anchor.set(0, 0.5);
+ this.icon.x = this.data.pointA.x;
+ this.icon.y = this.data.pointA.y;
+ this.icon.angle = angle;
+ }
}
-
-
/**
* 选择器
*/
@@ -1798,117 +1974,3 @@ export class PropertyInfo {
*/
public PropertyValue: string;
}
-/**
- * demo图标
- */
-export class DemoIcon extends PIXI.Container {
- style = new PIXI.TextStyle({
- fontFamily: 'Arial',
- fontSize: 18,
- fontStyle: 'normal',
- fontWeight: 'bold',
- fill: ['#000000'],
- stroke: '#ffffff',
- strokeThickness: 3,
- dropShadow: true,
- dropShadowColor: '#000000',
- dropShadowBlur: 3,
- dropShadowAngle: Math.PI / 6,
- dropShadowDistance: 1,
- wordWrap: false,
- wordWrapWidth: 100,
- });
-
- private text = new PIXI.Text(this.assetData.Name
- + '\r\n'
- + this.assetData.PropertyInfos.find(item => item.PropertyName === '名称/编号')?.PropertyValue, this.style);
- private image = PIXI.Sprite.from(this.assetData.ImageUrl);
- constructor(public assetData: any, private workingArea: WorkingAreaComponent) {
- super();
- this.workingArea.backgroundImage.addChild(this);
- this.x = this.assetData.Point.x;
- this.y = this.assetData.Point.y;
- this.name = this.assetData.Id;
-
- this.image.angle = this.assetData.Angle;
-
- this.image.x = 0;
- this.image.y = 0;
- this.image.width = this.assetData.Width;
- this.image.height = this.assetData.Height;
-
- this.image.alpha = 1;
- this.image.anchor.set(0.5);
- this.image.interactive = true;
- this.image
- .on('mousedown', event => {
- event.stopPropagation();
- this.workingArea.selection.selectOne(this);
- if (this.workingArea.allowEdit) {
- event.currentTarget.parent.data = event.data;
- event.currentTarget.parent.alpha = 0.5;
- event.currentTarget.parent.dragging = true;
- }
- })
- .on('mouseup', event => {
- if (event.currentTarget.parent.dragging) {
- event.currentTarget.parent.alpha = 1;
- event.currentTarget.parent.dragging = false;
- event.currentTarget.parent.data = null;
- }
- })
- .on('mouseupoutside', event => {
- if (event.currentTarget.parent.dragging) {
- event.currentTarget.parent.alpha = 1;
- event.currentTarget.parent.dragging = false;
- event.currentTarget.parent.data = null;
- }
- })
- .on('mousemove', event => {
- if (event.currentTarget.parent.dragging) {
- const newPosition = event.currentTarget.parent.data.getLocalPosition(event.currentTarget.parent.parent);
- event.currentTarget.parent.x = newPosition.x;
- event.currentTarget.parent.y = newPosition.y;
- this.assetData.Point = new PIXI.Point(this.x, this.y);
- this.workingArea.canvasData.isChange = true;
- }
- })
- .on('rightclick', event => {
-
- })
- .on('mouseover', event => {
-
- });
-
- this.workingArea.on('backgroundScale', data => {
- if (this.assetData.FixedSize) {
- const scale = 1 / data;
- this.scale.set(scale);
- }
- });
-
- this.text.x = this.image.x;
- this.text.y = this.image.y - this.image.height / 2;
- this.text.anchor.set(0.5, 1);
-
- this.addChild(this.text);
- this.addChild(this.image);
- }
- // 设置名称
- public setNameVisible(value: boolean, mode: GameMode) {
- if (this.assetData.GameMode === mode) {
- this.text.visible = value;
- }
- }
- // 刷新
- public refresh() {
- this.image.width = this.assetData.Width;
- this.image.height = this.assetData.Height;
- this.image.angle = this.assetData.Angle;
- this.text.text = this.assetData.Name
- + '\r\n'
- + this.assetData.PropertyInfos.find(item => item.PropertyName === '名称/编号')?.PropertyValue;
- this.text.x = this.image.x;
- this.text.y = this.image.y - this.image.height / 2;
- }
-}
diff --git a/src/assets/images/direction.png b/src/assets/images/direction.png
new file mode 100644
index 0000000..46e0bec
Binary files /dev/null and b/src/assets/images/direction.png differ
diff --git a/src/assets/images/route.png b/src/assets/images/route.png
new file mode 100644
index 0000000..8445226
Binary files /dev/null and b/src/assets/images/route.png differ
diff --git a/src/assets/images/进攻方向.png b/src/assets/images/进攻方向.png
new file mode 100644
index 0000000..914c848
Binary files /dev/null and b/src/assets/images/进攻方向.png differ
diff --git a/src/index.html b/src/index.html
index ebc3ab9..b039ca4 100644
--- a/src/index.html
+++ b/src/index.html
@@ -2,7 +2,7 @@
- 实战指挥预案
+ 智能实战指挥平台