+
{{item.Name}}
{{item.FireTeamName}}
已到场
0">
-
diff --git a/src/app/ui/plan-assistance/plan-assistance.component.ts b/src/app/ui/plan-assistance/plan-assistance.component.ts
index 799c99b..a3db338 100644
--- a/src/app/ui/plan-assistance/plan-assistance.component.ts
+++ b/src/app/ui/plan-assistance/plan-assistance.component.ts
@@ -1,6 +1,7 @@
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 { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar';
import * as ObjectID from 'bson-objectid';
@Component({
@@ -9,7 +10,7 @@ import * as ObjectID from 'bson-objectid';
styleUrls: ['./plan-assistance.component.scss']
})
export class PlanAssistanceComponent implements OnInit, AfterViewInit {
- constructor(public canvasData: CanvasShareDataService) { }
+ constructor(public canvasData: CanvasShareDataService, public snackBar: MatSnackBar, ) { }
@ViewChild('workingArea')
workingArea: WorkingAreaComponent;
@@ -6639,7 +6640,7 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit {
DrawMode: null,
Thickness: 0,
IsFromBuilding: false,
- GameMode: 2
+ GameMode: 0
};
// 所有车辆信息
@@ -6864,15 +6865,15 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit {
y: 1237
},
Name: '水罐消防车',
- FireTeamName: '八塘消防救援站', //所属消防队
- ReachTime: 240, //到场剩余时间
- WaterYield: '12t',//载水量
- Foam: '0t', //载泡沫
- PeopleNum: 6, //载人数
- Tonnage: '14t', //吨位
- Assignment: '冷却', //执行任务
- LinkCar: '', //连接车辆
- WaterOccupy: '', //水源占用
+ FireTeamName: '八塘消防救援站', // 所属消防队
+ ReachTime: 240, // 到场剩余时间
+ WaterYield: '12t', // 载水量
+ Foam: '0t', // 载泡沫
+ PeopleNum: 6, // 载人数
+ Tonnage: '14t', // 吨位
+ Assignment: '冷却', // 执行任务
+ LinkCar: '', // 连接车辆
+ WaterOccupy: '', // 水源占用
PropertyInfos: [
{
Enabled: true,
@@ -6914,15 +6915,15 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit {
y: 1237
},
Name: '水罐泡沫消防车',
- FireTeamName: '八塘消防救援站', //所属消防队
- ReachTime: 240, //到场剩余时间
- WaterYield: '6t',//载水量
- Foam: '2t', //载泡沫
- PeopleNum: 6, //载人数
- Tonnage: '8t', //吨位
- Assignment: '冷却', //执行任务
- LinkCar: '', //连接车辆
- WaterOccupy: '', //水源占用
+ FireTeamName: '八塘消防救援站', // 所属消防队
+ ReachTime: 240, // 到场剩余时间
+ WaterYield: '6t', // 载水量
+ Foam: '2t', // 载泡沫
+ PeopleNum: 6, // 载人数
+ Tonnage: '8t', // 吨位
+ Assignment: '冷却', // 执行任务
+ LinkCar: '', // 连接车辆
+ WaterOccupy: '', // 水源占用
PropertyInfos: [
{
Enabled: true,
@@ -6964,15 +6965,15 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit {
y: 1237
},
Name: '水罐泡沫消防车',
- FireTeamName: '八塘消防救援站', //所属消防队
- ReachTime: 240, //到场剩余时间
- WaterYield: '3t',//载水量
- Foam: '1t', //载泡沫
- PeopleNum: 8, //载人数
- Tonnage: '5t', //吨位
- Assignment: '堵截', //执行任务
- LinkCar: '', //连接车辆
- WaterOccupy: '', //水源占用
+ FireTeamName: '八塘消防救援站', // 所属消防队
+ ReachTime: 240, // 到场剩余时间
+ WaterYield: '3t', // 载水量
+ Foam: '1t', // 载泡沫
+ PeopleNum: 8, // 载人数
+ Tonnage: '5t', // 吨位
+ Assignment: '堵截', // 执行任务
+ LinkCar: '', // 连接车辆
+ WaterOccupy: '', // 水源占用
PropertyInfos: [
{
Enabled: true,
@@ -7014,15 +7015,15 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit {
y: 1237
},
Name: '举高喷射消防车',
- FireTeamName: '八塘消防救援站', //所属消防队
- ReachTime: 300, //到场剩余时间
- WaterYield: '16t',//载水量
- Foam: '2t', //载泡沫
- PeopleNum: 4, //载人数
- Tonnage: '18t', //吨位
- Assignment: '灭火', //执行任务
- LinkCar: '', //连接车辆
- WaterOccupy: '', //水源占用
+ FireTeamName: '八塘消防救援站', // 所属消防队
+ ReachTime: 300, // 到场剩余时间
+ WaterYield: '16t', // 载水量
+ Foam: '2t', // 载泡沫
+ PeopleNum: 4, // 载人数
+ Tonnage: '18t', // 吨位
+ Assignment: '灭火', // 执行任务
+ LinkCar: '', // 连接车辆
+ WaterOccupy: '', // 水源占用
PropertyInfos: [
{
Enabled: true,
@@ -7064,15 +7065,15 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit {
y: 1237
},
Name: '水罐泡沫消防车',
- FireTeamName: '龚州消防救援站', //所属消防队
- ReachTime: 660, //到场剩余时间
- WaterYield: '6t',//载水量
- Foam: '2t', //载泡沫
- PeopleNum: 6, //载人数
- Tonnage: '8t', //吨位
- Assignment: '供液', //执行任务
- LinkCar: '', //连接车辆
- WaterOccupy: '', //水源占用
+ FireTeamName: '龚州消防救援站', // 所属消防队
+ ReachTime: 660, // 到场剩余时间
+ WaterYield: '6t', // 载水量
+ Foam: '2t', // 载泡沫
+ PeopleNum: 6, // 载人数
+ Tonnage: '8t', // 吨位
+ Assignment: '供液', // 执行任务
+ LinkCar: '', // 连接车辆
+ WaterOccupy: '', // 水源占用
PropertyInfos: [
{
Enabled: true,
@@ -7114,15 +7115,15 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit {
y: 1237
},
Name: '水罐泡沫消防车',
- FireTeamName: '龚州消防救援站', //所属消防队
- ReachTime: 720, //到场剩余时间
- WaterYield: '5t',//载水量
- Foam: '1t', //载泡沫
- PeopleNum: 6, //载人数
- Tonnage: '7t', //吨位
- Assignment: '供液', //执行任务
- LinkCar: '', //连接车辆
- WaterOccupy: '', //水源占用
+ FireTeamName: '龚州消防救援站', // 所属消防队
+ ReachTime: 720, // 到场剩余时间
+ WaterYield: '5t', // 载水量
+ Foam: '1t', // 载泡沫
+ PeopleNum: 6, // 载人数
+ Tonnage: '7t', // 吨位
+ Assignment: '供液', // 执行任务
+ LinkCar: '', // 连接车辆
+ WaterOccupy: '', // 水源占用
PropertyInfos: [
{
Enabled: true,
@@ -7164,15 +7165,15 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit {
y: 1237
},
Name: '水罐泡沫消防车',
- FireTeamName: '龚州消防救援站', //所属消防队
- ReachTime: 960, //到场剩余时间
- WaterYield: '3t',//载水量
- Foam: '1t', //载泡沫
- PeopleNum: 6, //载人数
- Tonnage: '5t', //吨位
- Assignment: '供液', //执行任务
- LinkCar: '', //连接车辆
- WaterOccupy: '', //水源占用
+ FireTeamName: '龚州消防救援站', // 所属消防队
+ ReachTime: 960, // 到场剩余时间
+ WaterYield: '3t', // 载水量
+ Foam: '1t', // 载泡沫
+ PeopleNum: 6, // 载人数
+ Tonnage: '5t', // 吨位
+ Assignment: '供液', // 执行任务
+ LinkCar: '', // 连接车辆
+ WaterOccupy: '', // 水源占用
PropertyInfos: [
{
Enabled: true,
@@ -7214,15 +7215,15 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit {
y: 1237
},
Name: '举高喷射消防车',
- FireTeamName: '龚州消防救援站', //所属消防队
- ReachTime: 960, //到场剩余时间
- WaterYield: '18t',//载水量
- Foam: '2t', //载泡沫
- PeopleNum: 4, //载人数
- Tonnage: '20t', //吨位
- Assignment: '灭火', //执行任务
- LinkCar: '', //连接车辆
- WaterOccupy: '', //水源占用
+ FireTeamName: '龚州消防救援站', // 所属消防队
+ ReachTime: 960, // 到场剩余时间
+ WaterYield: '18t', // 载水量
+ Foam: '2t', // 载泡沫
+ PeopleNum: 4, // 载人数
+ Tonnage: '20t', // 吨位
+ Assignment: '灭火', // 执行任务
+ LinkCar: '', // 连接车辆
+ WaterOccupy: '', // 水源占用
PropertyInfos: [
{
Enabled: true,
@@ -7249,6 +7250,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit {
bottomIsShow = false; // 底部车辆信息是否展示
rightIsShow = true; // 右侧楼层是否展示
rightSayIsShow = false; // 右侧语音是否展示
+ selectCarID:string = ''; // 选中车辆 样式
+
ngOnInit(): void {
const that = this;
window.setTimeout(() => {
@@ -7261,28 +7264,62 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit {
ngAfterViewInit(): void {
this.workingArea.loadDemoScene(this.demoData, 0.149);
+
+ this.dataInit();
+ // 监听canvas组件选中素材事件
+ this.workingArea.on("select",obj=>{
+ //选中素材属性注入函数
+ this.selectCar(obj.assetData,false)
+ })
+ // 监听canvas组件取消选中素材事件
+ this.workingArea.on("deselect",obj=>{
+ this.bottomIsShow = false;
+ this.selectCarID = ''
+ });
}
// 开始绘制
plot(e) {
+ e == 0 ? this.workingArea.beginPaintingArrows() : this.workingArea.beginPaintPipeline();
+ }
+ // 到场车辆初始化
+ dataInit() {
+ this.allCarsData.forEach(item => {
+ item.ReachTime == 0 ? this.workingArea.ShowCarIcon(item) : null;
+ });
}
- //倒计时结束
- handleEvent (e,item) {
- e.left==0? item.ReachTime=0 : null
+ // 倒计时结束
+ handleEvent(e, item) {
+ if (e.left == 0) {
+ item.ReachTime = 0;
+ this.workingArea.ShowCarIcon(item);
+ } else {
+ item.ReachTime = e.left / 1000;
+ }
}
//选择 车辆
- selectCar (e) {
- console.log(e)
- this.canvasData.selectCar = e
- this.bottomIsShow = true
+ selectCar (e,isSelect:boolean = true) {
+ if (e.ReachTime == 0) {
+ this.canvasData.selectCar = e
+ this.selectCarID = JSON.parse(JSON.stringify( e.Id ))
+ this.bottomIsShow = true
+ let list = []
+ list.push(e.Id)
+ isSelect? this.workingArea.setHighlight(list) : null
+ } else {
+ const config = new MatSnackBarConfig();
+ config.verticalPosition = 'top';
+ config.duration = 3000;
+ this.snackBar.open('车辆目前未到场', '确定', config);
+ }
}
- //关闭 底部车辆信息
- closeBottom () {
- this.bottomIsShow = false
+ // 关闭 底部车辆信息
+ closeBottom() {
+ this.bottomIsShow = false;
}
// 打开 右侧楼层
diff --git a/src/app/ui/plan/collection-tools.component.ts b/src/app/ui/plan/collection-tools.component.ts
index 233f1f6..63062ad 100644
--- a/src/app/ui/plan/collection-tools.component.ts
+++ b/src/app/ui/plan/collection-tools.component.ts
@@ -9,7 +9,7 @@ import {WorkingAreaComponent} from '../../working-area/working-area.component'
import {CanvasShareDataService,GameMode} from '../../canvas-share-data.service' //引入服务
import Viewer from 'viewerjs';
@Component({
- selector: 'app-collection-tools',
+ selector: 'plan',
templateUrl: './collection-tools.component.html',
styleUrls: ['./collection-tools.component.scss']
})
diff --git a/src/app/ui/similar-plans/similar-plans.component.html b/src/app/ui/similar-plans/similar-plans.component.html
index 5c5605a..c35b400 100644
--- a/src/app/ui/similar-plans/similar-plans.component.html
+++ b/src/app/ui/similar-plans/similar-plans.component.html
@@ -1,4 +1,4 @@
-
+
+
\ 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 78997e0..078b54c 100644
--- a/src/app/ui/similar-plans/similar-plans.component.ts
+++ b/src/app/ui/similar-plans/similar-plans.component.ts
@@ -31,4 +31,5 @@ export class SimilarPlansComponent implements OnInit {
+
}
diff --git a/src/app/working-area/working-area.component.ts b/src/app/working-area/working-area.component.ts
index 33bb2d6..b6a977b 100644
--- a/src/app/working-area/working-area.component.ts
+++ b/src/app/working-area/working-area.component.ts
@@ -121,6 +121,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
// 是否登录
public verificationURL = '/ui/plan'; // 验证url地址是否为验证页面
+ public verificationURLTwo = '/ui/similarPlans'; // 验证url地址是否为验证页面
count = 0;
isLogin() {
const token = sessionStorage.getItem('token'); // 判断 是否登录状态
@@ -241,7 +242,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
this.content.nativeElement.appendChild(this.app.view);
const url = this.router.url;
// tslint:disable-next-line: no-unused-expression
- url === this.verificationURL ? this.isLogin() : null;
+ url === this.verificationURL || url === this.verificationURLTwo ? this.isLogin() : null;
this.createBackgroundImage();
// this.createPreviewSinglePointIcon();
@@ -250,6 +251,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
// this.createEnterPaintEndButton();
// this.backgroundImage.addChild(this.paintingLine);
this.on('select', obj => {
+ console.log('选择了' + obj);
if (this.allowEdit) {
if (obj instanceof MultipointIcon) {
obj.setPointVisiable(true);
@@ -372,7 +374,10 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
public setHighlight(ids: string[]): void {
this.selection.deselectAll();
ids.forEach(item => {
- const obj = this.backgroundImage.getChildByName(item);
+ let obj = this.backgroundImage.getChildByName(item);
+ if (obj === null) {
+ obj = this.app.stage.getChildByName(item);
+ }
this.selection.select(obj);
});
}
@@ -429,106 +434,118 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
list.forEach(element => {
const single = new SinglePointIcon(element, this);
});
- this.setNameVisible(false, GameMode.BasicInformation);
+ this.setNameVisible(false, GameMode.BasicInformation);
const tempData = {
- TemplateId: null,
- FloorId: null,
- Angle: 0,
- Color: 0,
- Enabled: true,
- FillMode: 0,
- FireElementId: 0,
- FixedSize: false,
- CanConnection: true,
- ConnectionObjs: [],
- Height: 45,
- Width: 45,
- Id: '5f67f92238f13cd2048cae9d',
- ImageUrl: './assets/images/泡沫消防车.png',
- InteractiveMode: 0,
- MultiPoint: null,
- Point: {
- x: 1295,
- y: 1237
- },
- Name: '',
- 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
- };
-
- const tempData2 = {
- TemplateId: null,
- FloorId: null,
- Angle: 0,
- Color: 0,
- Enabled: true,
- FillMode: 0,
- FireElementId: 0,
- CanConnection: true,
- ConnectionObjs: [],
- FixedSize: false,
- Height: 45,
- Width: 45,
- Id: '5f67f92238f13cd2048cae9d',
- ImageUrl: './assets/images/水罐消防车.png',
- InteractiveMode: 0,
- MultiPoint: null,
- Point: {
- x: 1295,
- y: 1237
- },
- Name: '',
- 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
- };
- this.ShowCarIcon(tempData);
- this.ShowCarIcon(tempData2);
- this.ShowCarIcon(tempData);
- this.ShowCarIcon(tempData2);
- this.ShowCarIcon(tempData);
- this.ShowCarIcon(tempData2);
-
- // // 开始绘制管线
- // this.beginPaintPipeline();
- this.beginPaintingArrows();
+ Id: '5f6719a4e03abe3856d87d7b',
+ Name: '作业面',
+ Angle: 0,
+ Color: '#066eed80',
+ Point: {
+ x: 2139,
+ y: 399
+ },
+ Width: 32,
+ Border: {
+ w: 0,
+ x: 0,
+ y: 0,
+ z: 0
+ },
+ Height: 32,
+ Enabled: true,
+ FloorId: '5f670bb79e91f4410005f564',
+ DrawMode: 0,
+ FillMode: 1,
+ GameMode: 1,
+ ImageUrl: '/api/Objects/PlanPlatform/5e7b384e8121c2286c0cb290.png',
+ CompanyId: '5f67042b9e91f4410005f55c',
+ FixedSize: false,
+ CanConnection: true,
+ ConnectionObjs: [],
+ Thickness: 0,
+ BuildingId: '5f6704859e91f4410005f55f',
+ MultiPoint: [
+ {
+ x: 2139,
+ y: 399
+ },
+ {
+ x: 2194,
+ y: 399
+ },
+ {
+ x: 2194,
+ y: 1217
+ },
+ {
+ x: 2139,
+ y: 1217
+ },
+ ],
+ TemplateId: '5e7b38610137e12020bd7f7b',
+ FireElementId: '5e7967f30814180f1c1ecaab',
+ PropertyInfos: [
+ {
+ Tag: '',
+ Order: 0,
+ Enabled: true,
+ Visible: true,
+ Required: false,
+ RuleName: '',
+ RuleValue: '',
+ PhysicalUnit: '',
+ PropertyName: '名称/编号',
+ PropertyType: 0,
+ PropertyValue: '15'
+ },
+ {
+ Tag: '',
+ Order: 0,
+ Enabled: true,
+ Visible: true,
+ Required: false,
+ RuleName: '',
+ RuleValue: '',
+ PhysicalUnit: '',
+ PropertyName: '压力',
+ PropertyType: 0,
+ PropertyValue: '0.1Mpa'
+ },
+ {
+ Tag: '',
+ Order: 0,
+ Enabled: true,
+ Visible: true,
+ Required: false,
+ RuleName: '',
+ RuleValue: '',
+ PhysicalUnit: '张',
+ PropertyName: '图片',
+ PropertyType: 4,
+ PropertyValue: '5'
+ },
+ {
+ Tag: null,
+ Order: 0,
+ Enabled: false,
+ Visible: false,
+ Required: false,
+ RuleName: null,
+ RuleValue: null,
+ PhysicalUnit: null,
+ PropertyName: '图片',
+ PropertyType: 3,
+ PropertyValue: '/api/Objects/WebPlan2D/5f67042b9e91f4410005f55c/5f6717b48db9a325049fa975.jpg'
+ }
+ ],
+ IsFromBuilding: true,
+ InteractiveMode: 0
+ }
+ ;
+
+ const poly = new PolygonIcon(tempData, this);
}
/**
* 显示车辆图标
@@ -769,7 +786,6 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
} else {
this.paintingArrows.ready = true;
this.paintingArrows = null;
- this.beginPaintPipeline();
}
break;
}
@@ -959,7 +975,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
/**
* 开始绘制管线
*/
- private beginPaintPipeline(): void {
+ public beginPaintPipeline(): void {
this.paintMode = PaintMode.Pipeline;
}
public paintingPipelineFinish(): void {
@@ -968,7 +984,6 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
this.paintPoints.splice(0, this.paintPoints.length);
this.paintingPipeline = null;
}
- this.beginPaintingArrows();
}
public beginPaintingArrows(): void {
this.paintMode = PaintMode.Arrows;
@@ -1258,6 +1273,10 @@ export class SinglePointIcon extends PIXI.Container {
this.text.y = this.image.y - this.image.height / 2;
this.text.anchor.set(0.5, 1);
+ if (this.assetData.GameMode === 2) {
+ this.text.visible = false;
+ }
+
this.addChild(this.text);
this.addChild(this.image);
}