From 3d57406d97eb56542cca40f4cdd59e9449c1de65 Mon Sep 17 00:00:00 2001 From: SHAOJIAHAO <55341701@qq.com> Date: Fri, 26 Nov 2021 08:42:19 +0800 Subject: [PATCH 1/2] =?UTF-8?q?[=E5=AE=8C=E5=96=84]=E5=AE=8C=E5=96=84?= =?UTF-8?q?=E8=BF=94=E5=9B=9E=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../equipment-info.component.html | 3 ++ .../equipment-info.component.scss | 17 ++++++++++ .../equipment-info.component.ts | 7 +++- src/app/pages/home/home.component.html | 7 +--- src/app/pages/home/home.component.scss | 2 +- src/app/pages/home/home.component.ts | 32 +++++++------------ .../oil-station-info.component.html | 6 +++- .../oil-station-info.component.scss | 18 +++++++++++ .../oil-station-info.component.ts | 7 ++-- .../today-warning.component.html | 5 ++- .../today-warning.component.scss | 7 ++-- .../today-warning/today-warning.component.ts | 4 +++ 12 files changed, 80 insertions(+), 35 deletions(-) diff --git a/src/app/pages/equipment-info/equipment-info.component.html b/src/app/pages/equipment-info/equipment-info.component.html index 7261383..4d88e13 100644 --- a/src/app/pages/equipment-info/equipment-info.component.html +++ b/src/app/pages/equipment-info/equipment-info.component.html @@ -80,4 +80,7 @@ +
+ +
diff --git a/src/app/pages/equipment-info/equipment-info.component.scss b/src/app/pages/equipment-info/equipment-info.component.scss index 7d58fc2..1bf72e0 100644 --- a/src/app/pages/equipment-info/equipment-info.component.scss +++ b/src/app/pages/equipment-info/equipment-info.component.scss @@ -3,6 +3,7 @@ height: 100%; display: flex; justify-content: center; + position: relative; } .content { @@ -115,3 +116,19 @@ } } + + +.backbtn { + position: absolute; + right: 66px; + top: 22px; + + button { + width: 64px; + height: 32px; + background: rgba(0, 129, 255, 0.3); + border: 1px solid #36A2FF; + border-radius: 0px; + color: #91CCFF; + } +} \ No newline at end of file diff --git a/src/app/pages/equipment-info/equipment-info.component.ts b/src/app/pages/equipment-info/equipment-info.component.ts index c62f119..7d4cf02 100644 --- a/src/app/pages/equipment-info/equipment-info.component.ts +++ b/src/app/pages/equipment-info/equipment-info.component.ts @@ -5,6 +5,7 @@ import { NzMessageService } from 'ng-zorro-antd/message'; import { AddequipmentComponent } from './addequipment/addequipment.component'; import { HttpClient } from '@angular/common/http'; import { EditequipmentComponent } from './editequipment/editequipment.component'; +import { Router, ActivatedRoute } from '@angular/router' @Component({ selector: 'app-equipment-info', templateUrl: './equipment-info.component.html', @@ -12,7 +13,7 @@ import { EditequipmentComponent } from './editequipment/editequipment.component' }) export class EquipmentInfoComponent implements OnInit { validateForm!: FormGroup; - constructor(private fb: FormBuilder, private modal: NzModalService, private viewContainerRef: ViewContainerRef, private message: NzMessageService, private http: HttpClient) { } + constructor(private router: Router,private fb: FormBuilder, private modal: NzModalService, private viewContainerRef: ViewContainerRef, private message: NzMessageService, private http: HttpClient) { } arr = [] ngOnInit(): void { this.validateForm = this.fb.group({ @@ -159,4 +160,8 @@ export class EquipmentInfoComponent implements OnInit { } }); } + + goback(){ + this.router.navigate(['/warning/petrolStation']) + } } diff --git a/src/app/pages/home/home.component.html b/src/app/pages/home/home.component.html index 5594d54..46dc0cf 100644 --- a/src/app/pages/home/home.component.html +++ b/src/app/pages/home/home.component.html @@ -52,14 +52,9 @@ -
+
-
diff --git a/src/app/pages/home/home.component.scss b/src/app/pages/home/home.component.scss index 9e5f1e5..7b1a7bc 100644 --- a/src/app/pages/home/home.component.scss +++ b/src/app/pages/home/home.component.scss @@ -63,7 +63,7 @@ .backbtn { position: absolute; - right: 26px; + left: 205px; bottom: 6px; button { diff --git a/src/app/pages/home/home.component.ts b/src/app/pages/home/home.component.ts index 16b76c5..499ef6a 100644 --- a/src/app/pages/home/home.component.ts +++ b/src/app/pages/home/home.component.ts @@ -17,12 +17,11 @@ export class HomeComponent implements OnInit { private cookieService: CookieService, private message: NzMessageService) { } isGasStationNav: boolean isGasStation: boolean - isWarning: boolean = false//是否是今日预警页面 + isGasStationBack: boolean num surname: string userName: string - // isGasStation: string ngOnInit(): void { this.navChangeService.getMessage().subscribe((message: any) => { @@ -30,25 +29,21 @@ export class HomeComponent implements OnInit { if (message.name == 'oilstation') { this.isGasStationNav = true } - if (message.name == '改变数量') { - this.isWarning = true - this.num = message.num - } }); - if (this.router.url.indexOf('warning') != -1) { - this.isWarning = true - } else { - this.isWarning = false - } - if (this.router.url.indexOf('petrolStation') != -1 && sessionStorage.getItem('isGasStation') == 'false') {//控制返回按钮显示 - this.isGasStation = true + this.isGasStationBack = true } else { - this.isGasStation = false + this.isGasStationBack = false } + // if (this.router.url.indexOf('petrolStation') != -1 && sessionStorage.getItem('isGasStation') == 'true') { + // this.isGasStation = true + // } else { + // this.isGasStation = false + // } + if (sessionStorage.getItem('isGasStation') == 'true') { this.isGasStation = true this.isGasStationNav = true @@ -60,15 +55,10 @@ export class HomeComponent implements OnInit { this.router.events.pipe( filter(event => event instanceof NavigationEnd) ).subscribe((event: any) => { - if (event.url.indexOf('warning') != -1) {//控制今日预警左上角数字显示 - - } else { - this.isWarning = false - } if (event.url.indexOf('petrolStation') != -1 && sessionStorage.getItem('isGasStation') == 'false') {//控制返回按钮显示 - this.isGasStation = true + this.isGasStationBack = true } else { - this.isGasStation = false + this.isGasStationBack = false } }); diff --git a/src/app/pages/oil-station-info/oil-station-info.component.html b/src/app/pages/oil-station-info/oil-station-info.component.html index 816d689..441c74f 100644 --- a/src/app/pages/oil-station-info/oil-station-info.component.html +++ b/src/app/pages/oil-station-info/oil-station-info.component.html @@ -139,7 +139,8 @@ - + @@ -371,4 +372,7 @@
+
+ +
\ No newline at end of file diff --git a/src/app/pages/oil-station-info/oil-station-info.component.scss b/src/app/pages/oil-station-info/oil-station-info.component.scss index 0964eb4..79910b3 100644 --- a/src/app/pages/oil-station-info/oil-station-info.component.scss +++ b/src/app/pages/oil-station-info/oil-station-info.component.scss @@ -3,6 +3,7 @@ height: 100%; display: flex; justify-content: center; + position: relative; } ::-webkit-scrollbar { @@ -149,10 +150,12 @@ border-radius: 0px; color: #91CCFF; } + button:nth-child(1) { width: 100px; margin-left: 16px; } + button:nth-child(2) { width: 130px; margin-left: 16px; @@ -160,3 +163,18 @@ } } } + +.backbtn { + position: absolute; + right: 66px; + top: 22px; + + button { + width: 64px; + height: 32px; + background: rgba(0, 129, 255, 0.3); + border: 1px solid #36A2FF; + border-radius: 0px; + color: #91CCFF; + } +} diff --git a/src/app/pages/oil-station-info/oil-station-info.component.ts b/src/app/pages/oil-station-info/oil-station-info.component.ts index 98d8c61..8db1358 100644 --- a/src/app/pages/oil-station-info/oil-station-info.component.ts +++ b/src/app/pages/oil-station-info/oil-station-info.component.ts @@ -5,6 +5,7 @@ import { ObjectsSimpleService } from 'src/app/service/objectsSimple.service'; import { NzMessageService } from 'ng-zorro-antd/message'; import * as moment from 'moment'; import Viewer from 'viewerjs'; +import { Router, ActivatedRoute } from '@angular/router' @Component({ selector: 'app-oil-station-info', templateUrl: './oil-station-info.component.html', @@ -12,7 +13,7 @@ import Viewer from 'viewerjs'; }) export class OilStationInfoComponent implements OnInit { validateForm!: FormGroup; - constructor(private fb: FormBuilder, private objectsSrv: ObjectsSimpleService, private http: HttpClient, private message: NzMessageService) { } + constructor(private router: Router, private fb: FormBuilder, private objectsSrv: ObjectsSimpleService, private http: HttpClient, private message: NzMessageService) { } userdata: any @@ -148,7 +149,9 @@ export class OilStationInfoComponent implements OnInit { dangerousChemicalLicenseImage: '', gasSellLicenseImage: '' } - + goback() { + this.router.navigate(['/warning/petrolStation']) + } submitForm() { diff --git a/src/app/pages/today-warning/today-warning.component.html b/src/app/pages/today-warning/today-warning.component.html index 8d11460..76addb9 100644 --- a/src/app/pages/today-warning/today-warning.component.html +++ b/src/app/pages/today-warning/today-warning.component.html @@ -111,7 +111,10 @@ {{item.violateTime | date:"yyyy-MM-dd HH:mm:ss"}}
- + + + + 已处置
diff --git a/src/app/pages/today-warning/today-warning.component.scss b/src/app/pages/today-warning/today-warning.component.scss index cc102d1..1707ad9 100644 --- a/src/app/pages/today-warning/today-warning.component.scss +++ b/src/app/pages/today-warning/today-warning.component.scss @@ -87,7 +87,8 @@ color: #91CCFF; margin-bottom: 12px; background: linear-gradient(180deg, rgba(3, 0, 0, 0) 0%, rgba(0, 46, 91, 0.68) 100%); - + box-sizing: border-box; + padding-right: 36px; div { font-size: 15px; text-align: center; @@ -103,6 +104,8 @@ } } } - + .dispositioned{ + color: #23D9FF; + } } } diff --git a/src/app/pages/today-warning/today-warning.component.ts b/src/app/pages/today-warning/today-warning.component.ts index 32b412e..e4c0bfe 100644 --- a/src/app/pages/today-warning/today-warning.component.ts +++ b/src/app/pages/today-warning/today-warning.component.ts @@ -128,4 +128,8 @@ export class TodayWarningComponent implements OnInit { }); const instance = modal.getContentComponent(); } + + disposition(item){ + + } } From b4441138994189667b7c6cd1190dd16c84971c36 Mon Sep 17 00:00:00 2001 From: cpf <1105965053@qq.com> Date: Fri, 26 Nov 2021 10:22:14 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=AE=8C=E5=96=84=E8=BF=9B=E5=BA=A6?= =?UTF-8?q?=E6=9D=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../left-domain/left-domain.component.ts | 1 - src/app/pages/pages.module.ts | 4 +- src/app/pages/plan/plan.component.html | 8 +- src/app/pages/plan/plan.component.ts | 102 ++++++++---------- 4 files changed, 52 insertions(+), 63 deletions(-) diff --git a/src/app/pages/left-domain/left-domain.component.ts b/src/app/pages/left-domain/left-domain.component.ts index 03245d4..b0f88b5 100644 --- a/src/app/pages/left-domain/left-domain.component.ts +++ b/src/app/pages/left-domain/left-domain.component.ts @@ -230,7 +230,6 @@ export class LeftDomainComponent implements OnInit { updateFatherData(index) { PlanComponent.instance.nzCurrent = index PlanComponent.instance.isSuspend = true //暂停 - PlanComponent.instance.timer? window.clearTimeout(PlanComponent.instance.timer) : null //清除定时器 PlanComponent.instance.updateTimer? window.clearTimeout(PlanComponent.instance.updateTimer) : null //清除定时器 } diff --git a/src/app/pages/pages.module.ts b/src/app/pages/pages.module.ts index 3324872..e176876 100644 --- a/src/app/pages/pages.module.ts +++ b/src/app/pages/pages.module.ts @@ -37,6 +37,7 @@ import { NzCheckboxModule } from 'ng-zorro-antd/checkbox'; import { NzTimePickerModule } from 'ng-zorro-antd/time-picker'; import { NzProgressModule } from 'ng-zorro-antd/progress'; import { NzPopconfirmModule } from 'ng-zorro-antd/popconfirm'; +import { NzBadgeModule } from 'ng-zorro-antd/badge'; import { TodayWarningAdminComponent } from './today-warning-admin/today-warning-admin.component'; import { CriminalRecordsAdminComponent } from './criminal-records-admin/criminal-records-admin.component'; import { EquipmentInfoComponent } from './equipment-info/equipment-info.component'; @@ -90,7 +91,8 @@ import { NzNotificationModule } from 'ng-zorro-antd/notification'; NzTimePickerModule, NzProgressModule, NzNotificationModule, - NzPopconfirmModule + NzPopconfirmModule, + NzBadgeModule ], entryComponents: [AddequipmentComponent, EditequipmentComponent,GetOutOfLineDetailsComponent], schemas: [CUSTOM_ELEMENTS_SCHEMA] diff --git a/src/app/pages/plan/plan.component.html b/src/app/pages/plan/plan.component.html index 5ed645a..c090567 100644 --- a/src/app/pages/plan/plan.component.html +++ b/src/app/pages/plan/plan.component.html @@ -161,7 +161,7 @@
-
+
@@ -169,7 +169,7 @@ - + @@ -233,6 +233,10 @@ + + + + \ No newline at end of file diff --git a/src/app/pages/plan/plan.component.ts b/src/app/pages/plan/plan.component.ts index 5633852..2ffbaa6 100644 --- a/src/app/pages/plan/plan.component.ts +++ b/src/app/pages/plan/plan.component.ts @@ -338,7 +338,6 @@ export class PlanComponent implements OnInit { beforePlanNode: MarkNodeData = new MarkNodeData(-99, "请选择节点"); //当前选择 预案节点 nzCurrent: number = -1; //当前选择 预案节点Index isSuspend: boolean = false; //是否暂停 自动切换节点 - timer: any; //定时器 progressList: number[] = []; //进度条 条/值 updateTimer: any; //更新进度条定时器 @@ -347,7 +346,6 @@ export class PlanComponent implements OnInit { this.beforeEmergencyPlan = new MarkPlanData(-99, "请选择节点") this.beforePlanNode = new MarkNodeData(-99, "请选择节点") this.isSuspend = false //初始化暂停状态 - window.clearTimeout(this.timer) //清除定时器 this.progressList = [] window.clearTimeout(this.updateTimer) //清除定时器 } @@ -369,62 +367,50 @@ export class PlanComponent implements OnInit { selectChildNode(item: MarkPlanData) { if (this.isShowChildComponent && this.leftDomain) { if (item.nodes.length) { - let isTrue = confirm("即将开始播放节点") - if (isTrue) { - this.timer? window.clearTimeout(this.timer) : null //清除定时器 - this.updateTimer? window.clearTimeout(this.updateTimer) : null //清除定时器 - this.nzCurrent = 0 - this.beforeEmergencyPlan = item - this.updateProgressList().then(res=>{ - this.publicToggleNode().then(data=>{ - !this.isSuspend? this.autoPlay() : null - }) - }) - } + this.updateTimer? window.clearTimeout(this.updateTimer) : null //清除定时器 + this.nzCurrent = 0 + this.beforeEmergencyPlan = item + this.updateProgressList().then(res=>{ + this.publicToggleNode() + }) } else { this.message.info('暂无数据节点'); } } } + //更新进度条 条数 + updateProgressList() { + return new Promise((resolve, reject) => { + this.progressList = [] + this.beforeEmergencyPlan.nodes.forEach(item=>{ this.progressList.push(0) }) + resolve(true) + }) + } + //更新进度条 值 updateProgress() { if (this.progressList[this.nzCurrent] >= 100) { this.progressList[this.nzCurrent] = 100 window.clearTimeout(this.updateTimer) //清除定时器 + !this.isSuspend? this.autoPlay() : null return } let time: number = this.beforePlanNode.getShowTime() || 1 this.updateTimer = window.setTimeout(()=>{ - this.progressList[this.nzCurrent] = this.progressList[this.nzCurrent] + Math.ceil(100 / time) + this.progressList[this.nzCurrent] = this.progressList[this.nzCurrent] + Number((100 / time).toFixed(2)) / 10 this.updateProgress() - },1000) - } - - //更新进度条 条数 - updateProgressList() { - return new Promise((resolve, reject) => { - this.progressList = [] - this.beforeEmergencyPlan.nodes.forEach(item=>{ this.progressList.push(0) }) - resolve(true) - }) + },100) } //自动播放-切换接点 autoPlay() { - let time: number = this.beforePlanNode.getShowTime() || 1 - this.timer = window.setTimeout(()=>{ - if (this.nzCurrent >= this.beforeEmergencyPlan.nodes.length - 1) { - this.isSuspend = false //初始化暂停状态 - window.clearTimeout(this.timer) //清除定时器 - this.message.info('已播放至最后一节点'); - return - } - this.nzCurrent = this.nzCurrent + 1 - this.publicToggleNode().then(data=>{ - !this.isSuspend? this.autoPlay() : null - }) - },time * 1000) + if (this.nzCurrent >= this.beforeEmergencyPlan.nodes.length - 1) { + this.message.info('已播放至最后一节点'); + return + } + this.nzCurrent = this.nzCurrent + 1 + this.publicToggleNode() } //切换预案节点 @@ -432,10 +418,10 @@ export class PlanComponent implements OnInit { if (this.progressList.length != this.beforeEmergencyPlan.nodes.length) { this.updateProgressList() } - this.timer? window.clearTimeout(this.timer) : null //清除定时器 this.updateTimer? window.clearTimeout(this.updateTimer) : null //清除定时器 + this.isSuspend = true //暂停 this.nzCurrent = event - this.progressList[this.nzCurrent] = 0 + this.progressList.forEach((item,index)=>{ index >= this.nzCurrent? this.progressList[index] = 0 : null }) this.publicToggleNode() } @@ -452,13 +438,10 @@ export class PlanComponent implements OnInit { if (this.progressList.length != this.beforeEmergencyPlan.nodes.length) { this.updateProgressList() } - this.timer? window.clearTimeout(this.timer) : null //清除定时器 this.updateTimer? window.clearTimeout(this.updateTimer) : null //清除定时器 this.nzCurrent = this.nzCurrent - 1 - this.progressList[this.nzCurrent] = 0 - this.publicToggleNode().then(data=>{ - //!this.isSuspend? this.autoPlay() : null - }) + this.progressList.forEach((item,index)=>{ index >= this.nzCurrent? this.progressList[index] = 0 : null }) + this.publicToggleNode() } //切换预案节点 暂停 @@ -474,15 +457,11 @@ export class PlanComponent implements OnInit { let msg: string = this.isSuspend? "目前已暂停" : "目前已开始播放" this.message.info(msg); if (this.isSuspend) { //暂停 - window.clearTimeout(this.timer) //清除定时器 window.clearTimeout(this.updateTimer) //清除定时器 } else { //开启 - this.timer? window.clearTimeout(this.timer) : null //清除定时器 this.updateTimer? window.clearTimeout(this.updateTimer) : null //清除定时器 - this.progressList.forEach((item,index)=>{ index >= this.nzCurrent? this.progressList[index] = 0 : null }) - MarkWindow.instance.selectMarkNode(this.beforeEmergencyPlan.id, this.beforePlanNode.id, false, true) + this.progressList.forEach((item,index)=>{ index > this.nzCurrent? this.progressList[index] = 0 : null }) this.updateProgress() - this.autoPlay() } } @@ -492,13 +471,10 @@ export class PlanComponent implements OnInit { this.message.info('请选择节点'); return } - this.timer? window.clearTimeout(this.timer) : null //清除定时器 this.updateTimer? window.clearTimeout(this.updateTimer) : null //清除定时器 this.updateProgressList().then(res=>{ this.nzCurrent = 0 - this.publicToggleNode().then(data=>{ - !this.isSuspend? this.autoPlay() : null - }) + this.publicToggleNode() }) } @@ -515,13 +491,10 @@ export class PlanComponent implements OnInit { if (this.progressList.length != this.beforeEmergencyPlan.nodes.length) { this.updateProgressList() } - this.timer? window.clearTimeout(this.timer) : null //清除定时器 this.updateTimer? window.clearTimeout(this.updateTimer) : null //清除定时器 this.nzCurrent = this.nzCurrent + 1 - this.progressList[this.nzCurrent] = 0 - this.publicToggleNode().then(data=>{ - //!this.isSuspend? this.autoPlay() : null - }) + this.progressList.forEach((item,index)=>{ index >= this.nzCurrent? this.progressList[index] = 0 : null }) + this.publicToggleNode() } //获取进度条 flex分布 @@ -569,6 +542,8 @@ export class PlanComponent implements OnInit { this.contingencyPlanTask = null //关闭弹窗 } + videoDialogType: videoDialog = new videoDialog(true, null); //全景图/视频 弹窗 + selectRightTopFast: number = 0; //当前选择功能 快捷栏 selectAdsorb: boolean = false; //吸附状态 topLevelView: boolean = false; //顶视图状态 @@ -644,6 +619,15 @@ export class PlanComponent implements OnInit { } +//全景图/视频 type +export class videoDialog { + isVideo: boolean + url: string + constructor(isVideo: boolean, url: string) { + this.isVideo = isVideo + this.url = url + } +} //设备任务窗口 数据类型 export class taskDialog { institution: string; //单位