diff --git a/package-lock.json b/package-lock.json index 1382c9c..381bb38 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4874,7 +4874,7 @@ }, "ascli": { "version": "1.0.1", - "resolved": "https://registry.nlark.com/ascli/download/ascli-1.0.1.tgz", + "resolved": "https://registry.npm.taobao.org/ascli/download/ascli-1.0.1.tgz", "integrity": "sha1-vPpZdKYvGOgcq660lzKrSoj5Brw=", "requires": { "colour": "~0.7.1", @@ -5516,7 +5516,7 @@ "dependencies": { "long": { "version": "3.2.0", - "resolved": "https://registry.npmmirror.com/long/download/long-3.2.0.tgz?cache=0&sync_timestamp=1635674102680&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Flong%2Fdownload%2Flong-3.2.0.tgz", + "resolved": "https://registry.npm.taobao.org/long/download/long-3.2.0.tgz", "integrity": "sha1-2CG3E4yhy1gcFymQ7xTbIAtcR0s=" } } @@ -5936,7 +5936,7 @@ }, "colour": { "version": "0.7.1", - "resolved": "https://registry.nlark.com/colour/download/colour-0.7.1.tgz", + "resolved": "https://registry.npm.taobao.org/colour/download/colour-0.7.1.tgz", "integrity": "sha1-nLFpkX7F0SwHNtPoaFdG3xyt93g=" }, "combined-stream": { @@ -8226,7 +8226,7 @@ }, "grpc": { "version": "1.24.2", - "resolved": "https://registry.npmmirror.com/grpc/download/grpc-1.24.2.tgz", + "resolved": "https://registry.npm.taobao.org/grpc/download/grpc-1.24.2.tgz", "integrity": "sha1-dtBHv6ewW2B8u+OruZBl3O/gwJk=", "requires": { "@types/bytebuffer": "^5.0.40", @@ -8271,7 +8271,7 @@ }, "camelcase": { "version": "2.1.1", - "resolved": "https://registry.npmmirror.com/camelcase/download/camelcase-2.1.1.tgz?cache=0&sync_timestamp=1636945122112&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fcamelcase%2Fdownload%2Fcamelcase-2.1.1.tgz", + "resolved": "https://registry.npm.taobao.org/camelcase/download/camelcase-2.1.1.tgz", "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=" }, "chownr": { @@ -8280,7 +8280,7 @@ }, "cliui": { "version": "3.2.0", - "resolved": "https://registry.nlark.com/cliui/download/cliui-3.2.0.tgz", + "resolved": "https://registry.npm.taobao.org/cliui/download/cliui-3.2.0.tgz?cache=0&sync_timestamp=1573943458671&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcliui%2Fdownload%2Fcliui-3.2.0.tgz", "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", "requires": { "string-width": "^1.0.1", @@ -8396,7 +8396,7 @@ }, "invert-kv": { "version": "1.0.0", - "resolved": "https://registry.nlark.com/invert-kv/download/invert-kv-1.0.0.tgz?cache=0&sync_timestamp=1630996775723&other_urls=https%3A%2F%2Fregistry.nlark.com%2Finvert-kv%2Fdownload%2Finvert-kv-1.0.0.tgz", + "resolved": "https://registry.npm.taobao.org/invert-kv/download/invert-kv-1.0.0.tgz", "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=" }, "is-fullwidth-code-point": { @@ -8537,7 +8537,7 @@ }, "os-locale": { "version": "1.4.0", - "resolved": "https://registry.npmmirror.com/os-locale/download/os-locale-1.4.0.tgz?cache=0&sync_timestamp=1633618260196&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fos-locale%2Fdownload%2Fos-locale-1.4.0.tgz", + "resolved": "https://registry.npm.taobao.org/os-locale/download/os-locale-1.4.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fos-locale%2Fdownload%2Fos-locale-1.4.0.tgz", "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", "requires": { "lcid": "^1.0.0" @@ -8565,7 +8565,7 @@ }, "protobufjs": { "version": "5.0.3", - "resolved": "https://registry.nlark.com/protobufjs/download/protobufjs-5.0.3.tgz", + "resolved": "https://registry.npm.taobao.org/protobufjs/download/protobufjs-5.0.3.tgz", "integrity": "sha1-5N/p+2fJCyYw0VhoJJvMSWFGehc=", "requires": { "ascli": "~1", @@ -8694,7 +8694,7 @@ }, "yargs": { "version": "3.32.0", - "resolved": "https://registry.npmmirror.com/yargs/download/yargs-3.32.0.tgz", + "resolved": "https://registry.npm.taobao.org/yargs/download/yargs-3.32.0.tgz?cache=0&sync_timestamp=1577940861093&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fyargs%2Fdownload%2Fyargs-3.32.0.tgz", "integrity": "sha1-AwiOnr+edWtpdRYR0qXvWRSCyZU=", "requires": { "camelcase": "^2.0.1", @@ -10875,7 +10875,7 @@ }, "lodash.clone": { "version": "4.5.0", - "resolved": "https://registry.nlark.com/lodash.clone/download/lodash.clone-4.5.0.tgz", + "resolved": "https://registry.npm.taobao.org/lodash.clone/download/lodash.clone-4.5.0.tgz", "integrity": "sha1-GVhwRQ9aExkkeN9Lw9I9LeoZB7Y=" }, "lodash.clonedeep": { @@ -12053,7 +12053,7 @@ }, "optjs": { "version": "3.2.2", - "resolved": "https://registry.nlark.com/optjs/download/optjs-3.2.2.tgz", + "resolved": "https://registry.npm.taobao.org/optjs/download/optjs-3.2.2.tgz", "integrity": "sha1-aabOicRCpEQDFBrS+bNwvVu29O4=" }, "ora": { diff --git a/src/app/pages/criminal-records-admin/criminal-records-admin.component.html b/src/app/pages/criminal-records-admin/criminal-records-admin.component.html index 03256b2..a028105 100644 --- a/src/app/pages/criminal-records-admin/criminal-records-admin.component.html +++ b/src/app/pages/criminal-records-admin/criminal-records-admin.component.html @@ -110,7 +110,7 @@
预警类型
-
+
所属公司
@@ -119,7 +119,7 @@
-
+
加油站
@@ -128,6 +128,9 @@
预警时间
+
+ 状态 +
操作
@@ -153,7 +156,7 @@
{{item.violation.violationType}}
-
+
{{item.gasStation.companyName}}
@@ -162,7 +165,7 @@
-
+
{{item.gasStation.stationName}}
@@ -171,6 +174,10 @@
{{item.violateTime | date:"yyyy-MM-dd HH:mm:ss"}}
+
+ 已处置 + 未处置 +
查看
diff --git a/src/app/pages/criminal-records-admin/criminal-records-admin.component.ts b/src/app/pages/criminal-records-admin/criminal-records-admin.component.ts index d76adf5..27e9755 100644 --- a/src/app/pages/criminal-records-admin/criminal-records-admin.component.ts +++ b/src/app/pages/criminal-records-admin/criminal-records-admin.component.ts @@ -10,6 +10,7 @@ import { debounceTime } from 'rxjs/operators'; import * as moment from 'moment'; import { NzModalService } from 'ng-zorro-antd/modal'; import { GetOutOfLineDetailsComponent } from '../today-warning/get-out-of-line-details/get-out-of-line-details.component'; +import { OilUnloadingProcessComponent } from '../oil-unloading-process/oil-unloading-process.component'; @Component({ selector: 'app-criminal-records-admin', templateUrl: './criminal-records-admin.component.html', @@ -146,7 +147,7 @@ export class CriminalRecordsAdminComponent implements OnInit { left: '42px', right: '30px', bottom: '38px', - top: '60px' + top: '80px' } }; baroption2 = { @@ -515,6 +516,8 @@ export class CriminalRecordsAdminComponent implements OnInit { look(item) { + // GetOutOfLineDetailsComponent + // OilUnloadingProcessComponent const modal = this.modal.create({ nzContent: GetOutOfLineDetailsComponent, nzViewContainerRef: this.viewContainerRef, diff --git a/src/app/pages/criminal-records/criminal-records.component.html b/src/app/pages/criminal-records/criminal-records.component.html index a10f121..847128d 100644 --- a/src/app/pages/criminal-records/criminal-records.component.html +++ b/src/app/pages/criminal-records/criminal-records.component.html @@ -106,10 +106,10 @@
预警级别
-
+
预警类型
-
+
预警信息
@@ -118,6 +118,9 @@
预警时间
+
+ 状态 +
操作
@@ -140,10 +143,10 @@ Ⅲ级 Ⅳ级
-
+
{{item.violation.violationType}}
-
+
{{item.violation.violationName}}
@@ -152,6 +155,10 @@
{{item.violateTime | date:"yyyy-MM-dd HH:mm:ss"}}
+
+ 已处置 + 未处置 +
查看
diff --git a/src/app/pages/criminal-records/criminal-records.component.ts b/src/app/pages/criminal-records/criminal-records.component.ts index b9c18f2..e3c2425 100644 --- a/src/app/pages/criminal-records/criminal-records.component.ts +++ b/src/app/pages/criminal-records/criminal-records.component.ts @@ -143,7 +143,7 @@ export class CriminalRecordsComponent implements OnInit { left: '42px', right: '30px', bottom: '38px', - top: '60px' + top: '80px' } }; baroption2 = { diff --git a/src/app/pages/disposition/disposition.component.html b/src/app/pages/disposition/disposition.component.html new file mode 100644 index 0000000..152f821 --- /dev/null +++ b/src/app/pages/disposition/disposition.component.html @@ -0,0 +1,21 @@ +
+
+
+ 处置 +
+ +
+
+

处置内容

+ + + + + +

处置人: {{peopleName}}

+
+ + +
+
+
\ No newline at end of file diff --git a/src/app/pages/disposition/disposition.component.scss b/src/app/pages/disposition/disposition.component.scss new file mode 100644 index 0000000..b616fdb --- /dev/null +++ b/src/app/pages/disposition/disposition.component.scss @@ -0,0 +1,85 @@ +.box { + .title { + font-family: sybold; + width: 100%; + height: 48px; + background: linear-gradient(270deg, rgba(35, 153, 255, 0) 0%, rgba(35, 153, 255, 0.57) 50%, rgba(35, 153, 255, 0) 100%); + display: flex; + align-items: center; + position: relative; + + .titlecontent { + width: 100%; + height: 32px; + line-height: 32px; + background: linear-gradient(270deg, rgba(35, 153, 255, 0) 0%, rgba(35, 153, 255, 0.57) 50%, rgba(35, 153, 255, 0) 100%); + text-align: center; + color: #91CCFF; + font-size: 16px; + } + + i { + position: absolute; + right: 12px; + color: #fff; + font-size: 18px; + cursor: pointer; + } + } + + .form { + box-sizing: border-box; + padding: 0 17px; + + p { + margin-bottom: 0; + color: #C4E2FC; + margin: 16px 0; + } + + nz-form-item { + margin-bottom: 0; + + textarea { + color: rgba(145, 204, 255, 0.95) !important; + width: 100%; + height: 300px; + background: #173d60; + } + } + + nz-date-picker { + background-color: #143c61; + width: 100%; + } + + .btnbox { + width: 100%; + margin-top: 24px; + margin-bottom: 17px; + display: flex; + justify-content: flex-end; + + button { + border-radius: 0px; + color: #91CCFF; + } + + button:nth-child(2) { + margin-left: 16px; + } + + .ok { + background: rgba(0, 129, 255, 0.4); + } + + .cancel { + border: 1px solid #C4E2FC; + background: #0c1e38; + color: rgba(99, 102, 105, 0.6); + box-shadow: 0 0 3px 0 #fff inset; + } + } + } + +} diff --git a/src/app/pages/disposition/disposition.component.ts b/src/app/pages/disposition/disposition.component.ts new file mode 100644 index 0000000..93ec6b3 --- /dev/null +++ b/src/app/pages/disposition/disposition.component.ts @@ -0,0 +1,33 @@ +import { Component, OnInit } from '@angular/core'; +import { NzModalRef } from 'ng-zorro-antd/modal'; +import { FormBuilder, FormGroup, Validators } from '@angular/forms'; +@Component({ + selector: 'app-disposition', + templateUrl: './disposition.component.html', + styleUrls: ['./disposition.component.scss'] +}) +export class DispositionComponent implements OnInit { + validateForm!: FormGroup; + constructor(private modal: NzModalRef, private fb: FormBuilder) { } + + + peopleName:string + + ngOnInit(): void { + if(sessionStorage.getItem('isGasStation') == 'true'){ + this.peopleName = JSON.parse(sessionStorage.getItem('userdataOfgasstation')).name + }else{ + this.peopleName = JSON.parse(sessionStorage.getItem('userdata')).name + } + + this.validateForm = this.fb.group({ + content: [null, [Validators.required]] + }); + } + destroyModal(){ + this.modal.destroy(); + } + ok(){ + this.modal.triggerOk() + } +} diff --git a/src/app/pages/home/home.component.html b/src/app/pages/home/home.component.html index 46dc0cf..f8c1dbb 100644 --- a/src/app/pages/home/home.component.html +++ b/src/app/pages/home/home.component.html @@ -59,4 +59,24 @@
-
\ No newline at end of file +
+ + +
+
+ +
+
+ 您有一条新的预警提醒! + {{item.notification.data.properties.ViolationName}} +
+
+
+
+ 查看 +
+
+ 忽略 +
+
+
\ No newline at end of file diff --git a/src/app/pages/home/home.component.ts b/src/app/pages/home/home.component.ts index a08734d..dfe18f8 100644 --- a/src/app/pages/home/home.component.ts +++ b/src/app/pages/home/home.component.ts @@ -1,14 +1,17 @@ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, ViewChild, TemplateRef, ViewContainerRef } from '@angular/core'; import { Router, NavigationEnd, ActivatedRoute } from '@angular/router'; import { Title } from '@angular/platform-browser' import { filter } from 'rxjs/operators'; -import { NavChangeService } from 'src/app/service/navChange.service'; +import { NavChangeService } from '../../service/navChange.service'; import { CacheTokenService } from '../../service/cache-token.service' //引入服务 import { CookieService } from 'ngx-cookie-service'; import { NzMessageService } from 'ng-zorro-antd/message'; import { SignalRAspNetCoreHelper } from '../../../shared/helpers/SignalRAspNetCoreHelper'; - - +import { NzNotificationService } from 'ng-zorro-antd/notification'; +import { GetOutOfLineDetailsComponent } from '../today-warning/get-out-of-line-details/get-out-of-line-details.component'; +import { NzModalService } from 'ng-zorro-antd/modal'; +import { HttpClient } from '@angular/common/http'; +declare var abp: any @Component({ selector: 'app-home', @@ -16,9 +19,10 @@ import { SignalRAspNetCoreHelper } from '../../../shared/helpers/SignalRAspNetCo styleUrls: ['./home.component.scss'] }) export class HomeComponent implements OnInit { + @ViewChild('warning', { static: false }) template?: TemplateRef<{}>; + constructor(private http: HttpClient, private router: Router, private navChangeService: NavChangeService, public token: CacheTokenService, + private cookieService: CookieService, private message: NzMessageService, private notificationService: NzNotificationService, private modal: NzModalService, private viewContainerRef: ViewContainerRef) { } - constructor(private router: Router, private navChangeService: NavChangeService, public token: CacheTokenService, - private cookieService: CookieService, private message: NzMessageService) { } isGasStationNav: boolean isGasStation: boolean isGasStationBack: boolean @@ -78,13 +82,73 @@ export class HomeComponent implements OnInit { this.userName = JSON.parse(sessionStorage.getItem('userdata')).userName } + + + } + ngAfterViewInit() { SignalRAspNetCoreHelper.initSignalR(); - abp.event.on('abp.notifications.received', function (userNotification) { - console.log('abp.notifications.received成功收到了哈哈哈', userNotification); + abp.event.on('abp.notifications.received', (userNotification) => { + console.log('abp.notifications.received收到通知', userNotification); + this.receiptOfNotification(userNotification) }); + } + messageId = [] + receiptOfNotification(userNotification) { + let obj = { + id: userNotification.notification.entityId, + messageId: this.notificationService.template(this.template!, { nzPlacement: 'bottomRight', nzClass: 'receiptOfNotification', nzDuration: 0, nzData: userNotification }).messageId + } + this.messageId.push(obj) + } + + look(item) { + let params = { + id: item.notification.entityId + } + this.http.get('/api/services/app/ViolateRecord/Get', { + params: params + }).subscribe((data: any) => { + const modal = this.modal.create({ + nzContent: GetOutOfLineDetailsComponent, + nzViewContainerRef: this.viewContainerRef, + nzWidth: 1200, + nzBodyStyle: { + 'border': '1px solid #6d9cc7', + 'border-radius': '0px', + 'padding': '0px', + 'box-shadow': '0 0 8px 0 #fff', + 'background': '#000D21', + }, + nzComponentParams: { + data: data.result + }, + nzFooter: null, + nzOnOk: async () => { + + } + }); + const instance = modal.getContentComponent(); + this.messageId.forEach((element) => { + if (element.id == item.notification.entityId) { + this.notificationService.remove(element.messageId) + } + }) + }) } + close(item) { + // console.log(item) + this.messageId.forEach((element) => { + if (element.id == item.notification.entityId) { + this.notificationService.remove(element.messageId) + } + }) + } + + ngOnDestroy() { + abp.signalr.disconnect() + } //获得时间 time: string diff --git a/src/app/pages/left-domain/left-domain.component.ts b/src/app/pages/left-domain/left-domain.component.ts index e263429..010427d 100644 --- a/src/app/pages/left-domain/left-domain.component.ts +++ b/src/app/pages/left-domain/left-domain.component.ts @@ -38,6 +38,8 @@ export class LeftDomainComponent implements OnInit { //初始化组件 initComponent(type?: number) { + this.selectPlanId = null + this.selectNodeId = null if (type != undefined && type != null) { this.beforeFence = type this.handleFacility() @@ -50,12 +52,9 @@ export class LeftDomainComponent implements OnInit { //处理 设备data handleFacility() { if (this.beforeFence === 7) { //应急预案 - MarkWindow.instance ? this.allMarkPlanData = MarkWindow.instance.allMarkPlanData : null - EventManager.addListener(Event_GetAllMarkPlanData, (data: Event_GetAllMarkPlanData) => { - this.allMarkPlanData = data.data - PlanComponent.instance.allMarkPlanData = this.allMarkPlanData - }) - PlanComponent.instance.allMarkPlanData = this.allMarkPlanData + if (MarkWindow.instance) { + this.allMarkPlanData = MarkWindow.instance.allMarkPlanData + } return } let list: FacilityInfoUIItem[] = [] @@ -210,31 +209,33 @@ export class LeftDomainComponent implements OnInit { //选中 数据节点 selectNode(item: MarkPlanData, e: MarkNodeData, index: number) { if (this.selectPlanId != item.id || this.selectNodeId != e.id) { //选中 + this.selectPlanId = item.id + this.selectNodeId = e.id + PlanComponent.instance.beforeEmergencyPlan = item + PlanComponent.instance.beforePlanNode = e if (PlanComponent.instance.progressList.length != item.nodes.length) { PlanComponent.instance.updateProgressList() } this.updateFatherData(index) //更新/初始化父组件 数据 - this.selectPlanId = item.id - this.selectNodeId = e.id + PlanComponent.instance.initViewer() MarkWindow.instance.selectMarkNode(item.id, e.id) - PlanComponent.instance.beforeEmergencyPlan = item PlanComponent.instance.beforePlanNode = MarkWindow.instance.currentMarkNodeInfo.nodeData } else if (this.selectPlanId === item.id && this.selectNodeId === e.id) { //取消选中 + this.selectPlanId = null + this.selectNodeId = null PlanComponent.instance.beforeEmergencyPlan = new MarkPlanData(-99, "请选择节点") PlanComponent.instance.beforePlanNode = new MarkNodeData(-99, "请选择节点") this.updateFatherData(index) //更新/初始化父组件 数据 - this.selectPlanId = null - this.selectNodeId = null MarkWindow.instance.selectMarkNode(null, null) } } //更新/初始化父组件 数据 updateFatherData(index) { + PlanComponent.instance.updateTimer? window.clearTimeout(PlanComponent.instance.updateTimer) : null //清除定时器 PlanComponent.instance.progressList.forEach((item,key)=>{ key >= index? PlanComponent.instance.progressList[key] = 0 : PlanComponent.instance.progressList[key] = 100 }) PlanComponent.instance.nzCurrent = index PlanComponent.instance.isSuspend = true //暂停 - PlanComponent.instance.updateTimer? window.clearTimeout(PlanComponent.instance.updateTimer) : null //清除定时器 } saveDisposalDialog: boolean = false; //整体保存预案 弹窗 diff --git a/src/app/pages/login/login.component.html b/src/app/pages/login/login.component.html index ce7ecf1..5fc7bb9 100644 --- a/src/app/pages/login/login.component.html +++ b/src/app/pages/login/login.component.html @@ -61,18 +61,3 @@
- -
-
- -
-
- 您有一条新的预警提醒! - 这是详细描述这是详细描述这是详细描述... -
-
-
- - -
-
diff --git a/src/app/pages/login/login.component.ts b/src/app/pages/login/login.component.ts index 1fc96cf..7a6b72d 100644 --- a/src/app/pages/login/login.component.ts +++ b/src/app/pages/login/login.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit, AfterViewInit, ViewChild, TemplateRef } from '@angular/core'; +import { Component, OnInit } from '@angular/core'; import { HttpClient } from '@angular/common/http' import { Router, ActivatedRoute } from '@angular/router' import { CacheTokenService } from '../../service/cache-token.service'//引入服务 @@ -18,7 +18,6 @@ declare var abp: any export class LoginComponent implements OnInit { validateForm!: FormGroup; - @ViewChild(TemplateRef, { static: false }) template?: TemplateRef<{}>; constructor(private http: HttpClient, private router: Router, private route: ActivatedRoute, public token: CacheTokenService, private cookieService: CookieService, private fb: FormBuilder, private message: NzMessageService, private notificationService: NzNotificationService) { } ngOnInit() { @@ -149,10 +148,6 @@ export class LoginComponent implements OnInit { ) } - receiptOfNotification() { - this.notificationService.template(this.template!, { nzPlacement: 'bottomRight', nzClass: 'receiptOfNotification', nzDuration: 0 }); - } - roleList = [ '管理员', '职工' ] diff --git a/src/app/pages/oil-unloading-process/oil-unloading-process.component.html b/src/app/pages/oil-unloading-process/oil-unloading-process.component.html new file mode 100644 index 0000000..fa9eb0d --- /dev/null +++ b/src/app/pages/oil-unloading-process/oil-unloading-process.component.html @@ -0,0 +1,182 @@ +
+
+
+
+ 卸油全流程 +
+
+
+
+
+
+
+
+
+ 事前准备 +
+
+
+
+
+ +
+ 油罐车朝向检察 +
+
+
+ +
+ 卸油效率检查 +
+
+
+ +
+ 设置隔离检查 +
+
+
+ +
+ 轮胎固定检察 +
+
+
+ +
+ 放置灭火器检察 +
+
+
+
+
+
+
+
+ +
+
+
+ +
+ 静电接地检查15分钟 +
+
+
+
+ + +
+
+ 事中操作 +
+
+
+
+
+
+ +
+ 卸油车取样 +
+
+
+ +
+ 连接卸油管 +
+
+
+ +
+
+ +
+
+ +
+ 1.第三方确认检查 +
+ +
+
+ +
+ 2.拆除卸油管 +
+ +
+
+ +
+ 3.作业现场清理 +
+ +
+
+ +
+ 车辆出场 +
+
+
+
+
+
+
+
+ +
+ 车辆进场 +
+
+ +
+
+ 卸油过程全程监测 +
+
+
+ 卸油全程监卸 +
+ + +
+
+
+ 卸油员及司押人员服装 +
+ +
+
+
+ 登车防护检查 +
+ +
+
+
+ 油品泄漏检查 +
+ +
+
+
+
+
+
+ +
+ +
+ +
+ +
+ +
+
+ + \ No newline at end of file diff --git a/src/app/pages/oil-unloading-process/oil-unloading-process.component.scss b/src/app/pages/oil-unloading-process/oil-unloading-process.component.scss new file mode 100644 index 0000000..bfa4b73 --- /dev/null +++ b/src/app/pages/oil-unloading-process/oil-unloading-process.component.scss @@ -0,0 +1,344 @@ +.box { + width: 100%; + // height: 700px; + color: #fff; + display: flex; + flex-direction: column; + background-image: linear-gradient(#003B6E, #000D21); + position: relative; + + ::-webkit-scrollbar { + display: none; /* Chrome Safari */ + } + scrollbar-width: none; /* firefox */ + -ms-overflow-style: none; /* IE 10+ */ +} + +.titlebox { + width: 100%; + height: 48px; + background: linear-gradient(270deg, rgba(35, 153, 255, 0) 0%, rgba(35, 153, 255, 0.57) 50%, rgba(35, 153, 255, 0) 100%); + display: flex; + align-items: center; + + .title { + width: 100%; + height: 32px; + background: linear-gradient(270deg, rgba(35, 153, 255, 0) 0%, rgba(35, 153, 255, 0.57) 50%, rgba(35, 153, 255, 0) 100%); + display: flex; + justify-content: center; + + div { + width: 120px; + height: 32px; + text-align: center; + line-height: 32px; + font-family: sybold; + font-size: 16px; + position: relative; + cursor: pointer; + margin: 0 18px; + + .border { + position: absolute; + bottom: -7px; + left: -18px; + width: 120px; + height: 4px; + } + } + + .selected { + background: linear-gradient(90deg, rgba(35, 153, 255, 0.57) 0%, #25b7d4 50%, rgba(35, 153, 255, 0.57) 100%); + + .border { + background: linear-gradient(90deg, rgba(35, 217, 255, 0) 0%, #25b7d4 50%, rgba(35, 217, 255, 0) 100%); + } + + } + } +} + +.ant-modal-close { + color: #fff; +} + +.content { + flex: 1; + box-sizing: border-box; + padding: 18px; + max-height: 700px; + overflow-y: auto; + position: relative; + + .oilbox { + display: flex; + width: 100%; + height: 100%; + box-sizing: border-box; + padding: 18px 20px; + + .title { + width: 100%; + height: 30px; + line-height: 30px; + background: rgba(35, 153, 255, 0.2); + text-align: left; + border-bottom: 1px solid rgba(54, 162, 255, 0.47); + box-sizing: border-box; + padding-left: 16px; + color: #36A2FF; + + } + + .leftbox { + display: flex; + flex-direction: column; + justify-content: space-between; + align-items: center; + margin-right: 70px; + + .lefttop, + .leftbottom { + width: 840px; + border: 1px solid rgba(54, 162, 255, 0.47); + display: flex; + + .title { + height: 100%; + width: 26px; + text-align: center; + padding: 0; + } + + .content { + flex: 1; + background: #001d3c; + } + } + + .lefttop { + margin-bottom: 16px; + + .content { + display: flex; + flex-direction: column; + justify-content: space-between; + align-items: center; + + .imglist1 { + width: 100%; + display: flex; + justify-content: space-around; + } + + .line { + width: 80%; + display: flex; + margin-top: 6px; + + div { + flex: 1; + height: 6px; + border-right: 1px solid #91CCFF; + border-bottom: 1px solid #91CCFF; + } + + div:nth-child(1) { + border-left: 1px solid #91CCFF; + } + } + + .imglist2 { + margin-top: -6px; + width: 100%; + display: flex; + justify-content: center; + } + } + } + + .leftbottom { + .content { + position: relative; + display: flex; + flex-direction: column; + justify-content: space-around; + align-items: center; + + .colimglist { + display: flex; + flex-direction: column; + align-items: center; + + .colimglist1 { + display: flex; + align-items: center; + justify-content: center; + + .img { + margin: 0 50px; + } + } + + .colline { + height: 6px; + width: 200px; + border-right: 1px solid #91CCFF; + border-left: 1px solid #91CCFF; + border-bottom: 1px solid #91CCFF; + } + } + + width: 100%; + + .goout1 { + position: absolute; + bottom: 52px; + right: 280px; + } + + .goout2 { + position: absolute; + bottom: 18px; + right: 160px; + } + } + + } + } + + .rightbox { + flex: 1; + display: flex; + flex-direction: column; + align-items: center; + + .rightbottom { + width: 160px; + height: 538px; + display: flex; + flex-direction: column; + border: 1px solid rgba(54, 162, 255, 0.47); + + .content { + padding: 6px; + flex: 1; + background: #001d3c; + display: flex; + flex-direction: column; + justify-content: space-around; + // align-items:; + .imgbox{ + .name{ + margin-bottom: 3px; + } + } + } + } + } + + .imgbox { + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + + .img { + width: 96px; + height: 64px; + box-shadow: 0px 0px 6px #36A2FF; + border: 1px solid #C4E2FC; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + position: relative; + + img { + width: 100%; + height: 100%; + cursor: pointer; + } + + .err { + width: 24px; + height: 24px; + position: absolute; + left: 50%; + top: 50%; + transform: translate(-50%, -50%); + } + } + + .selectedimg { + box-shadow: 0px 0px 8px #FF4B65; + border: 1px solid #FF4B65; + background: #3f213b; + + img { + width: 24px; + height: 24px; + } + } + + .errimg { + box-shadow: 0px 0px 8px #FF4B65; + border: 1px solid #FF4B65; + } + + .name { + margin-top: 3px; + color: #FFFFFF; + font-size: 14px; + } + + } + } + + .topline{ + position: absolute; + top: 18px; + right: 136px; + width: 576px; + height:16px; + border-top: 1px solid #91CCFF; + border-right: 1px solid #91CCFF; + } + .toplinearrows{ + position: absolute; + top: 5px; + right: 690px; + } + .bottomlinearrows{ + position: absolute; + bottom: -88px; + right: 428px; + } + .bottomline{ + position: absolute; + bottom: -68px; + right: 136px; + width: 300px; + height: 17px; + border-bottom: 1px solid #91CCFF; + border-right: 1px solid #91CCFF; + } +} + + +.longleft1, +.longleft2 { + position: absolute; +} + +.longleft1 { + right: 213px; + top: 102px; +} + +.longleft2 { + right: 250px; + bottom: 137px; + width: 100px; +} diff --git a/src/app/pages/oil-unloading-process/oil-unloading-process.component.ts b/src/app/pages/oil-unloading-process/oil-unloading-process.component.ts new file mode 100644 index 0000000..42be27a --- /dev/null +++ b/src/app/pages/oil-unloading-process/oil-unloading-process.component.ts @@ -0,0 +1,32 @@ +import { Component, OnInit, Input } from '@angular/core'; +import Viewer from 'viewerjs' +@Component({ + selector: 'app-oil-unloading-process', + templateUrl: './oil-unloading-process.component.html', + styleUrls: ['./oil-unloading-process.component.scss'] +}) +export class OilUnloadingProcessComponent implements OnInit { + @Input() data: any + constructor() { } + + ngOnInit(): void { + } + lookImg() { + let dom = document.getElementById(`viewerjs`) + let pObjs = dom.childNodes; + let node = document.createElement("img") + node.style.display = "none"; + node.src = "../../../../assets/images/bgImg.png"; + node.id = 'img' + dom.appendChild(node) + setTimeout(() => { + let viewer = new Viewer(document.getElementById(`viewerjs`), { + hidden: () => { + dom.removeChild(pObjs[0]); + viewer.destroy(); + } + }); + node.click(); + }, 0); + } +} diff --git a/src/app/pages/pages.module.ts b/src/app/pages/pages.module.ts index e176876..70eb8c1 100644 --- a/src/app/pages/pages.module.ts +++ b/src/app/pages/pages.module.ts @@ -49,11 +49,13 @@ import { NzTreeSelectModule } from 'ng-zorro-antd/tree-select'; import { PlanAdminComponent } from './plan-admin/plan-admin.component'; import { GetOutOfLineDetailsComponent } from './today-warning/get-out-of-line-details/get-out-of-line-details.component'; import { NzNotificationModule } from 'ng-zorro-antd/notification'; +import { DispositionComponent } from './disposition/disposition.component'; +import { OilUnloadingProcessComponent } from './oil-unloading-process/oil-unloading-process.component'; @NgModule({ declarations: [LoginComponent, RegisterComponent, HomeComponent, PlanComponent, TodayWarningComponent, CriminalRecordsComponent, TodayWarningAdminComponent, CriminalRecordsAdminComponent, LeftDomainComponent, EquipmentInfoComponent, OilStationInfoComponent, - AddequipmentComponent, EditequipmentComponent,PlanAdminComponent, GetOutOfLineDetailsComponent], + AddequipmentComponent, EditequipmentComponent,PlanAdminComponent, GetOutOfLineDetailsComponent, DispositionComponent, OilUnloadingProcessComponent], imports: [ @@ -94,7 +96,7 @@ import { NzNotificationModule } from 'ng-zorro-antd/notification'; NzPopconfirmModule, NzBadgeModule ], - entryComponents: [AddequipmentComponent, EditequipmentComponent,GetOutOfLineDetailsComponent], + entryComponents: [AddequipmentComponent, EditequipmentComponent,GetOutOfLineDetailsComponent,DispositionComponent,OilUnloadingProcessComponent], schemas: [CUSTOM_ELEMENTS_SCHEMA] }) diff --git a/src/app/pages/plan-admin/plan-admin.component.html b/src/app/pages/plan-admin/plan-admin.component.html index e30c6b0..97fec22 100644 --- a/src/app/pages/plan-admin/plan-admin.component.html +++ b/src/app/pages/plan-admin/plan-admin.component.html @@ -5,9 +5,9 @@
- + @@ -52,10 +52,12 @@
- + - 加油站名称 + + 加油站名称 区域 所属公司 联系人 @@ -70,7 +72,9 @@ - {{item.stationName}} + + {{item.stationName}} {{item.locationName}} {{item.companyName}} {{item.leaderName}} @@ -88,7 +92,7 @@ -
-
+
\ No newline at end of file diff --git a/src/app/pages/plan-admin/plan-admin.component.ts b/src/app/pages/plan-admin/plan-admin.component.ts index 8024f77..eea8d3c 100644 --- a/src/app/pages/plan-admin/plan-admin.component.ts +++ b/src/app/pages/plan-admin/plan-admin.component.ts @@ -181,7 +181,6 @@ export class PlanAdminComponent implements OnInit { // this.list = this.list.concat(data.result.items); this.list = [...data.result.items] resolve(data) - // console.log(999999, data) }) }) } diff --git a/src/app/pages/plan/plan.component.html b/src/app/pages/plan/plan.component.html index a182b17..c8827f3 100644 --- a/src/app/pages/plan/plan.component.html +++ b/src/app/pages/plan/plan.component.html @@ -26,7 +26,7 @@ -
+
{{allFence[selectFence]}}
@@ -146,8 +146,16 @@

-
-
+
+ + + +
+
+ + + +
@@ -235,7 +243,7 @@ - + diff --git a/src/app/pages/plan/plan.component.scss b/src/app/pages/plan/plan.component.scss index 12e7da1..e6e8a68 100644 --- a/src/app/pages/plan/plan.component.scss +++ b/src/app/pages/plan/plan.component.scss @@ -335,8 +335,10 @@ input{ border: none; outline: none; background-color: transparent; width: 100%; height: 100%; } textarea{ width: 100%; height: 50px; background: rgba(145, 204, 255, 0.41); border: 1px solid #91CCFF; padding: 0; resize: none; outline: none; } } - .planHeaderImg{ width: 100px; height: 100%; text-align: center; } - .planHeaderVideo{ width: 120px; height: 100%; text-align: center; } + .planHeaderImg{ width: 140px; height: 100%; text-align: center; line-height: 80px; .imgSrc{ width: 100px; height: auto; max-height: 100%; } } + .uploadImage{ width: 20px; height: 20px; line-height: 20px; float: right; margin-top: 30px; } + .planHeaderVideo{ width: 180px; height: 100%; text-align: center; line-height: 80px; video{ width: 120px; height: auto; max-height: 100%; } } + .uploadVideo{ width: 30px; height: 30px; line-height: 30px; float: right; margin-top: 25px; } } .bottomPlanCenter{ height: 35px; diff --git a/src/app/pages/plan/plan.component.ts b/src/app/pages/plan/plan.component.ts index d3e4195..093947a 100644 --- a/src/app/pages/plan/plan.component.ts +++ b/src/app/pages/plan/plan.component.ts @@ -1,4 +1,5 @@ import { Component, ElementRef, OnInit, ViewChild } from '@angular/core'; +import Viewer from 'viewerjs'; import { Game } from 'src/app/babylon/game'; import { LoginSatus } from 'src/app/babylon/controller/status/login-status'; import { StatusManager } from 'src/app/babylon/controller/status/status-manager'; @@ -23,6 +24,9 @@ import { AllMarkData } from 'src/app/babylon/model/data/mark/all-mark-data'; import { MarkData, MarkTask } from 'src/app/babylon/model/data/mark/mark-data'; import { MarkWindow } from 'src/app/babylon/view/mark-window/mark-window'; import { AllMarkPlanData, MarkNodeData, MarkPlanData } from 'src/app/babylon/model/data/mark/mark-plan-data'; +import { DataManager, ResType } from 'src/app/babylon/controller/data-manager'; +import { EventManager as babylonEventManager } from 'src/app/babylon/controller/event-manager/event-manager'; +import { Event_GetAllMarkPlanData } from 'src/app/babylon/controller/event-manager/events/event-get-markplandata-success'; @@ -41,6 +45,7 @@ export class PlanComponent implements OnInit { public canvas: HTMLCanvasElement; //canvas 实例 public editMode: boolean = true; //编辑/查看 模式 public userMode: boolean = ModeManager.s_isMakeMode; //是否为 内部权限 + public bucketName: string = ObjectsService.getFullPath("文件路径"); //当前桶名 public isShowLoading: boolean = true; //显隐 loading加载条 ngOnInit(): void { @@ -133,10 +138,23 @@ export class PlanComponent implements OnInit { if (this.selectFence === 7) { //初始化 应急预案模块 this.initializePlan() } - this.isShowChildComponent && this.leftDomain && type != 4 ? this.leftDomain.initComponent(type) : null; //手动初始化子组件 - this.selectFence = type - this.isShowChildComponent = true - buildingWindow.changeJYZInfoModel(fenceType, true) + if (type === 7) { //初始化 应急预案 data + this.isShowChildComponent && this.leftDomain? this.leftDomain.initComponent(type) : null; //手动初始化子组件 + this.selectFence = type + this.isShowChildComponent = true + buildingWindow.changeJYZInfoModel(fenceType, true) + MarkWindow.instance ? this.allMarkPlanData = MarkWindow.instance.allMarkPlanData : null; + babylonEventManager.addListener(Event_GetAllMarkPlanData, (data: Event_GetAllMarkPlanData) => { + this.allMarkPlanData = MarkWindow.instance.allMarkPlanData + this.isShowChildComponent && this.leftDomain? this.leftDomain.allMarkPlanData = MarkWindow.instance.allMarkPlanData : null + }) + this.isShowChildComponent && this.leftDomain? this.leftDomain.allMarkPlanData = MarkWindow.instance.allMarkPlanData : null + } else { + this.isShowChildComponent && this.leftDomain && type != 4 ? this.leftDomain.initComponent(type) : null; //手动初始化子组件 + this.selectFence = type + this.isShowChildComponent = true + buildingWindow.changeJYZInfoModel(fenceType, true) + } } else { //取消选中 this.selectFence = -1 this.isShowChildComponent = false @@ -354,10 +372,11 @@ export class PlanComponent implements OnInit { publicToggleNode() { return new Promise((resolve, reject) => { this.beforePlanNode = this.beforeEmergencyPlan.nodes[this.nzCurrent] - this.isShowChildComponent && this.leftDomain ? this.leftDomain.selectPlanId = this.beforeEmergencyPlan.id : null - this.isShowChildComponent && this.leftDomain ? this.leftDomain.selectNodeId = this.beforePlanNode.id : null + this.isShowChildComponent && this.leftDomain? this.leftDomain.selectPlanId = this.beforeEmergencyPlan.id : null + this.isShowChildComponent && this.leftDomain? this.leftDomain.selectNodeId = this.beforePlanNode.id : null MarkWindow.instance.selectMarkNode(this.beforeEmergencyPlan.id, this.beforePlanNode.id, false, true) this.beforePlanNode = MarkWindow.instance.currentMarkNodeInfo.nodeData + this.initViewer() this.updateProgress() //更新进度条 resolve(true) }) @@ -543,6 +562,49 @@ export class PlanComponent implements OnInit { } videoDialogType: videoDialog = new videoDialog(true, null); //全景图/视频 弹窗 + planNodeImg: Viewer; //应急预案图片Viewer 实例 + + //初始化 Viewer图片 + initViewer() { + if (this.beforePlanNode.texture) { + window.setTimeout(() => { + this.planNodeImg = new Viewer(this.element.nativeElement.querySelector('#planNodeImg'), { url: 'data-original' }); + }, 0) + } + } + + //上传 图片/视频 + uploadImgVideo(e, isVideo: boolean) { + if (e.target.files.length) { + let maxSize = 30 * 1024 * 1024 //限制30MB + let file = e.target.files[0] + if (file.size > maxSize) { //超出限制 + this.message.info("上传资源需小于30MB"); + return + } + this.isShowLoading = true //打开遮罩 + let institutionKey = sessionStorage.getItem('unitId') || "ceshi"; //单位id + let resType = isVideo? ResType.Video : ResType.Texture + let key = `${(new Date()).getMonth() + 1}-${(new Date()).getDate()}-${(new Date()).getHours()}` + let url = DataManager.getResPath_mark(institutionKey, resType, key) //url + ServeManager.instance.openFileSelect(file, url, (name: string, path: string) => { //上传 + if (!isVideo) { //img + this.beforePlanNode.texture = ObjectsService.getFullPath(path + name) + this.initViewer() + } else { //video + this.beforePlanNode.video = ObjectsService.getFullPath(path + name) + } + this.isShowLoading = false //关闭遮罩 + this.message.info("上传成功!"); + }) + } + } + + //打开视频弹窗 + openVideo(src: string) { + this.videoDialogType.isVideo = true + this.videoDialogType.url = src + } selectRightTopFast: number = 0; //当前选择功能 快捷栏 selectAdsorb: boolean = false; //吸附状态 diff --git a/src/app/pages/plan/publicPop.scss b/src/app/pages/plan/publicPop.scss index f658838..a221c9b 100644 --- a/src/app/pages/plan/publicPop.scss +++ b/src/app/pages/plan/publicPop.scss @@ -26,7 +26,15 @@ overflow: hidden; display: inline-block; } -.uploadBackGround input,.bottomPlanUpload input { +.imgAndVideoUpload{ + position: relative; + cursor: pointer; + background: rgba(145, 204, 255, 0.41); + border: 1px dashed #91CCFF; + overflow: hidden; + display: inline-block; +} +.uploadBackGround input,.bottomPlanUpload input,.imgAndVideoUpload input { position: absolute; width: 100%; height: 100%; diff --git a/src/app/pages/today-warning-admin/today-warning-admin.component.html b/src/app/pages/today-warning-admin/today-warning-admin.component.html index 28baa97..819d8a0 100644 --- a/src/app/pages/today-warning-admin/today-warning-admin.component.html +++ b/src/app/pages/today-warning-admin/today-warning-admin.component.html @@ -164,8 +164,9 @@ {{item.violateTime | date:"yyyy-MM-dd HH:mm:ss"}}
- - + + + 已处置
diff --git a/src/app/pages/today-warning-admin/today-warning-admin.component.scss b/src/app/pages/today-warning-admin/today-warning-admin.component.scss index 1f23f6d..e8ae4c0 100644 --- a/src/app/pages/today-warning-admin/today-warning-admin.component.scss +++ b/src/app/pages/today-warning-admin/today-warning-admin.component.scss @@ -95,7 +95,7 @@ background: linear-gradient(180deg, rgba(3, 0, 0, 0) 0%, rgba(0, 46, 91, 0.68) 100%); box-sizing: border-box; padding-left: 20px; - + padding-right: 60px; div { font-size: 15px; text-align: left; diff --git a/src/app/pages/today-warning-admin/today-warning-admin.component.ts b/src/app/pages/today-warning-admin/today-warning-admin.component.ts index 5ddb301..c0a59c8 100644 --- a/src/app/pages/today-warning-admin/today-warning-admin.component.ts +++ b/src/app/pages/today-warning-admin/today-warning-admin.component.ts @@ -2,15 +2,19 @@ import { Component, OnInit, ViewContainerRef } from '@angular/core'; import { FormBuilder, FormGroup, Validators } from '@angular/forms'; import { Router } from '@angular/router'; import { HttpClient } from '@angular/common/http'; -import { TreeService } from 'src/app/service/tree.service'; + import { NzModalService } from 'ng-zorro-antd/modal'; import { GetOutOfLineDetailsComponent } from '../today-warning/get-out-of-line-details/get-out-of-line-details.component'; import * as moment from 'moment'; -import { NavChangeService } from 'src/app/service/navChange.service'; +// import { TreeService } from 'src/app/service/tree.service'; +// import { NavChangeService } from 'src/app/service/navChange.service'; +import { TreeService } from '../../service/tree.service'; +import { NavChangeService } from '../../service/navChange.service'; import 'linqjs'; - +import { DispositionComponent } from '../disposition/disposition.component'; +import { NzMessageService } from 'ng-zorro-antd/message'; @Component({ selector: 'app-today-warning-admin', @@ -20,7 +24,7 @@ import 'linqjs'; export class TodayWarningAdminComponent implements OnInit { validateForm!: FormGroup; - constructor(private http: HttpClient, private fb: FormBuilder, private router: Router, private toTree: TreeService, private modal: NzModalService, private viewContainerRef: ViewContainerRef, private navChangeService: NavChangeService) { } + constructor(private http: HttpClient, private fb: FormBuilder, private router: Router, private toTree: TreeService, private modal: NzModalService, private viewContainerRef: ViewContainerRef, private navChangeService: NavChangeService, private message: NzMessageService) { } ngOnInit(): void { this.validateForm = this.fb.group({ @@ -105,6 +109,8 @@ export class TodayWarningAdminComponent implements OnInit { ViolateArea: this.validateForm.value.area, organizationUnitId: this.validateForm.value.organization, ViolateTime: (this.validateForm.value.datePickerEnd && this.validateForm.value.datePickerStart) ? [moment(this.validateForm.value.datePickerStart).format('yyyy-MM-DD HH:mm:ss'), moment(this.validateForm.value.datePickerEnd).format('yyyy-MM-DD HH:mm:ss')] : null, + // ViolateTime: ['2021-10-27', '2021-11-26'], + IsContainsChildren: 'true', SkipCount: '0', MaxResultCount: '9999' } @@ -155,6 +161,12 @@ export class TodayWarningAdminComponent implements OnInit { look(item) { + let type + if (item.violation.violationType.indexOf('卸油')) { + type = 1 + } else { + type = 0 + } const modal = this.modal.create({ nzContent: GetOutOfLineDetailsComponent, nzViewContainerRef: this.viewContainerRef, @@ -176,4 +188,43 @@ export class TodayWarningAdminComponent implements OnInit { }); const instance = modal.getContentComponent(); } + + dispose(item) { + console.log(item) + const modal = this.modal.create({ + nzContent: DispositionComponent, + nzViewContainerRef: this.viewContainerRef, + nzWidth: 380, + nzBodyStyle: { + 'border': '1px solid #91CCFF', + 'border-radius': '0px', + 'padding': '7px', + 'box-shadow': '0 0 8px 0 #fff', + 'background-image': 'linear-gradient(#003665, #000f25)' + }, + nzComponentParams: {}, + nzFooter: null, + nzClosable: false, + nzOnOk: async () => { + if (instance.validateForm.valid) { + await new Promise(resolve => { + let body = { + id: item.id, + handleRecord: instance.validateForm.value.content + } + this.http.post('/api/services/app/ViolateRecord/HandleViolateRecord', body).subscribe(data => { + resolve(data) + this.message.create('success', '处置成功!'); + item.handleTime = new Date() + return true + }) + }) + } else { + this.message.create('warning', '请填写完整!'); + return false + } + }, + }); + const instance = modal.getContentComponent(); + } } diff --git a/src/app/pages/today-warning/get-out-of-line-details/get-out-of-line-details.component.html b/src/app/pages/today-warning/get-out-of-line-details/get-out-of-line-details.component.html index eb1904f..243fa66 100644 --- a/src/app/pages/today-warning/get-out-of-line-details/get-out-of-line-details.component.html +++ b/src/app/pages/today-warning/get-out-of-line-details/get-out-of-line-details.component.html @@ -1,7 +1,6 @@ -
-
+
预警截图
@@ -11,15 +10,9 @@
-
-
- 卸油作业 -
-
-
-
+
+ + + 已处置
diff --git a/src/app/pages/today-warning/today-warning.component.scss b/src/app/pages/today-warning/today-warning.component.scss index 1707ad9..78a2db0 100644 --- a/src/app/pages/today-warning/today-warning.component.scss +++ b/src/app/pages/today-warning/today-warning.component.scss @@ -88,7 +88,7 @@ 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; + padding-right: 60px; div { font-size: 15px; text-align: center; diff --git a/src/app/pages/today-warning/today-warning.component.ts b/src/app/pages/today-warning/today-warning.component.ts index e4c0bfe..04f223c 100644 --- a/src/app/pages/today-warning/today-warning.component.ts +++ b/src/app/pages/today-warning/today-warning.component.ts @@ -3,9 +3,13 @@ import { FormBuilder, FormGroup, Validators } from '@angular/forms'; import { HttpClient } from '@angular/common/http'; import { NzModalService } from 'ng-zorro-antd/modal'; import { GetOutOfLineDetailsComponent } from './get-out-of-line-details/get-out-of-line-details.component'; -import { TreeService } from 'src/app/service/tree.service'; -import { NavChangeService } from 'src/app/service/navChange.service'; +// import { TreeService } from 'src/app/service/tree.service'; +// import { NavChangeService } from 'src/app/service/navChange.service'; +import { TreeService } from '../../service/tree.service'; +import { NavChangeService } from '../../service/navChange.service'; import * as moment from 'moment'; +import { DispositionComponent } from '../disposition/disposition.component'; +import { NzMessageService } from 'ng-zorro-antd/message'; @Component({ selector: 'app-today-warning', templateUrl: './today-warning.component.html', @@ -13,7 +17,7 @@ import * as moment from 'moment'; }) export class TodayWarningComponent implements OnInit { validateForm!: FormGroup; - constructor(private http: HttpClient, private fb: FormBuilder, private toTree: TreeService, private modal: NzModalService, private viewContainerRef: ViewContainerRef, private navChangeService: NavChangeService) { } + constructor(private http: HttpClient, private fb: FormBuilder, private toTree: TreeService, private modal: NzModalService, private viewContainerRef: ViewContainerRef, private navChangeService: NavChangeService, private message: NzMessageService) { } ngOnInit(): void { this.validateForm = this.fb.group({ @@ -62,6 +66,8 @@ export class TodayWarningComponent implements OnInit { ViolateArea: this.validateForm.value.area, organizationUnitId: JSON.parse(sessionStorage.getItem('userdataOfgasstation')).organization.id, ViolateTime: (this.validateForm.value.datePickerEnd && this.validateForm.value.datePickerStart) ? [moment(this.validateForm.value.datePickerStart).format('yyyy-MM-DD HH:mm:ss'), moment(this.validateForm.value.datePickerEnd).format('yyyy-MM-DD HH:mm:ss')] : null, + // ViolateTime: ['2021-10-27', '2021-11-26'], + IsContainsChildren: 'true', SkipCount: '0', MaxResultCount: '9999' } @@ -107,6 +113,12 @@ export class TodayWarningComponent implements OnInit { look(item) { + let type + if (item.violation.violationType.indexOf('卸油')) { + type = 1 + } else { + type = 0 + } const modal = this.modal.create({ nzContent: GetOutOfLineDetailsComponent, nzViewContainerRef: this.viewContainerRef, @@ -129,7 +141,47 @@ export class TodayWarningComponent implements OnInit { const instance = modal.getContentComponent(); } - disposition(item){ - + dispose(item) { + console.log(item) + if (item.isEnableHandle) { + const modal = this.modal.create({ + nzContent: DispositionComponent, + nzViewContainerRef: this.viewContainerRef, + nzWidth: 380, + nzBodyStyle: { + 'border': '1px solid #91CCFF', + 'border-radius': '0px', + 'padding': '7px', + 'box-shadow': '0 0 8px 0 #fff', + 'background-image': 'linear-gradient(#003665, #000f25)' + }, + nzComponentParams: {}, + nzFooter: null, + nzClosable: false, + nzOnOk: async () => { + if (instance.validateForm.valid) { + await new Promise(resolve => { + let body = { + id: item.id, + handleRecord: instance.validateForm.value.content + } + this.http.post('/api/services/app/ViolateRecord/HandleViolateRecord', body).subscribe(data => { + resolve(data) + this.message.create('success', '处置成功!'); + item.handleTime = new Date() + return true + }) + }) + } else { + this.message.create('warning', '请填写完整!'); + return false + } + }, + }); + const instance = modal.getContentComponent(); + } else { + this.message.create('warning', '无处置权限!'); + } + } } diff --git a/src/assets/images/3d.png b/src/assets/images/3d.png new file mode 100644 index 0000000..bcd6752 Binary files /dev/null and b/src/assets/images/3d.png differ diff --git a/src/assets/images/left3.png b/src/assets/images/left3.png new file mode 100644 index 0000000..94bc679 Binary files /dev/null and b/src/assets/images/left3.png differ diff --git a/src/assets/images/warning.png b/src/assets/images/warning.png new file mode 100644 index 0000000..c952377 Binary files /dev/null and b/src/assets/images/warning.png differ diff --git a/src/assets/js/abp.signalr-client.js b/src/assets/js/abp.signalr-client.js index 3dc5018..f7dd8e1 100644 --- a/src/assets/js/abp.signalr-client.js +++ b/src/assets/js/abp.signalr-client.js @@ -84,7 +84,10 @@ var abp = abp || {}; abp.log.debug(error.message); }); } - + abp.signalr.disconnect = function() { + abp.signalr.autoReconnect = false + abp.signalr.hubs.common.stop() + }; // Starts a connection with transport fallback - if the connection cannot be started using // the webSockets transport the function will fallback to the serverSentEvents transport and // if this does not work it will try longPolling. If the connection cannot be started using diff --git a/src/shared/helpers/SignalRAspNetCoreHelper.ts b/src/shared/helpers/SignalRAspNetCoreHelper.ts index 269f3f2..44dd445 100644 --- a/src/shared/helpers/SignalRAspNetCoreHelper.ts +++ b/src/shared/helpers/SignalRAspNetCoreHelper.ts @@ -1,6 +1,6 @@ - +declare var abp: any export class SignalRAspNetCoreHelper { - static initSignalR(callback?: () => void): void { + static initSignalR(callback?: () => void): void { const encryptedAuthToken = sessionStorage.getItem("encryptedAccessToken"); let url = "http://39.106.78.171:8906"; abp.signalr = { diff --git a/src/theme.less b/src/theme.less index 7f7917c..e61ea9e 100644 --- a/src/theme.less +++ b/src/theme.less @@ -68,7 +68,7 @@ .receiptOfNotification { height: 160px; background-color: rgba(1, 13, 27, 0.9); - box-shadow: 0 0 36px 3px #8f1622 inset; + box-shadow: 0 0 28px 3px #8f1622 inset; display: flex; flex-direction: column; padding: 5px; @@ -77,40 +77,53 @@ position: relative; flex: 1; display: flex; + align-items: center; img { - max-width: 64px; - max-height: 64px; + width: 90px; + height: 80px; + margin-left: 10px; + margin-right: 14px; } .text { display: flex; flex-direction: column; - color: white; justify-content: center; + + .name { + font-size: 16px; + color: #ffaaaa; + margin-top: 4px; + margin-bottom: 6px; + } + + .details { + font-size: 14px; + color: white; + } } } .btnbox { - height: 30px; + height: 36px; + line-height: 36px; display: flex; justify-content: center; align-items: center; margin: 12px 0; - button { - margin: 0 5px; + div { + width: 80px; + height: 32px; + line-height: 32px; + text-align: center; + margin: 0 8px; + color: #FFFFFF; + cursor: pointer; } } - button { - width: 64px; - height: 30px; - line-height: 30px; - background-color: rgba(1, 13, 27, 0.9); - color: white; - border: 0px; - } .look { box-shadow: 0 0 12px #8f1622 inset; @@ -177,7 +190,8 @@ #recordsbox, #warningbox, #warningboxadmin, -#addequipment,#stationPlanBox { +#addequipment, +#stationPlanBox { ::-webkit-input-placeholder { /* WebKit browsers */ color: #345d85; @@ -278,7 +292,7 @@ #stationPlanBox { - + .ant-tree .ant-tree-node-content-wrapper:hover, .ant-tree .ant-tree-node-content-wrapper.ant-tree-node-selected { background: linear-gradient(90deg, rgba(0, 13, 33, 0) 0%, #2399FF 50%, rgba(0, 13, 33, 0) 100%); @@ -342,20 +356,25 @@ padding: 0; color: #91CCFF; } + .look { color: #36A2FF; cursor: pointer; } - .ant-table-measure-now{ + + .ant-table-measure-now { display: none; } - .ant-empty-description{ + + .ant-empty-description { color: #23D9FF; } - .ant-table-tbody > tr > td{ + + .ant-table-tbody>tr>td { border-bottom: none; } - .ant-table-tbody > tr > td:hover{ + + .ant-table-tbody>tr>td:hover { background: none; } }