Browse Source

[完善]卸油弹窗增加站名

beijing
邵佳豪 2 years ago
parent
commit
597e983c51
  1. 8
      proxy.config.json
  2. 47
      src/app/pages/oil-unloading-process/oil-unloading-process.component.html
  3. 2
      src/app/pages/oil-unloading-process/oil-unloading-process.component.scss
  4. 33
      src/app/pages/oil-unloading-process/oil-unloading-process.component.ts
  5. 1055
      src/app/pages/records/oil-unloading-process-list/oil-unloading-process-list.component.ts

8
proxy.config.json

@ -1,13 +1,13 @@
{
"/api": {
"生产": "https://znaq.sinochemoilmarketing.com/",
"target": "http://121.36.37.70:8906/",
"target": "https://znaq.sinochemoilmarketing.com/",
"测试": "http://121.36.37.70:8906/",
"secure": false,
"changeOrigin": true
},
"/signalr": {
"生产": "https://znaq.sinochemoilmarketing.com/",
"target": "http://121.36.37.70:8906/",
"target": "https://znaq.sinochemoilmarketing.com/",
"测试": "http://121.36.37.70:8906/",
"secure": false,
"ws": true,
"logLevel": "debug"

47
src/app/pages/oil-unloading-process/oil-unloading-process.component.html

@ -2,7 +2,7 @@
<div class="titlebox">
<div class="title">
<div>
卸油全流程
{{stationName}}卸油全流程
<div class="border"></div>
</div>
</div>
@ -21,8 +21,7 @@
[ngClass]="{'selectedimg': !data[0].violateImage}">
<img [src]="data[0].violateImage ? data[0].violateImage : '../../../../assets/images/nopng.png'"
alt="">
<img *ngIf="!data[0].isCorrect" class="err"
src="../../../../assets/images/err.png" alt="">
<img *ngIf="!data[0].isCorrect" class="err" src="../../../../assets/images/err.png" alt="">
</div>
<span class="name">油罐车进场</span>
</div>
@ -35,8 +34,7 @@
[ngClass]="{'selectedimg': !data[1].violateImage}">
<img [src]="data[1].violateImage ? data[1].violateImage : '../../../../assets/images/nopng.png'"
alt="">
<img *ngIf="!data[1].isCorrect" class="err"
src="../../../../assets/images/err.png" alt="">
<img *ngIf="!data[1].isCorrect" class="err" src="../../../../assets/images/err.png" alt="">
</div>
<span class="name">设置隔离区域</span>
</div>
@ -62,8 +60,7 @@
[ngClass]="{'selectedimg': !data[2].violateImage}">
<img [src]="data[2].violateImage ? data[2].violateImage : '../../../../assets/images/nopng.png'"
alt="">
<img *ngIf="!data[2].isCorrect" class="err"
src="../../../../assets/images/err.png" alt="">
<img *ngIf="!data[2].isCorrect" class="err" src="../../../../assets/images/err.png" alt="">
</div>
<span class="name">连接静电接地</span>
</div>
@ -76,8 +73,7 @@
[ngClass]="{'selectedimg': !data[3].violateImage}">
<img [src]="data[3].violateImage ? data[3].violateImage : '../../../../assets/images/nopng.png'"
alt="">
<img *ngIf="!data[3].isCorrect" class="err"
src="../../../../assets/images/err.png" alt="">
<img *ngIf="!data[3].isCorrect" class="err" src="../../../../assets/images/err.png" alt="">
</div>
<span class="name">放置消防器材</span>
</div>
@ -141,62 +137,53 @@
<span class="name">开始卸油</span>
</div> -->
<div class="imgbox">
<span class="timespan" [ngClass]="{'timespanerr': !data[4].isCorrect}"><i
nz-icon nzType="clock-circle"
nzTheme="outline"></i>{{data[4].violateTime ?
<span class="timespan" [ngClass]="{'timespanerr': !data[4].isCorrect}"><i nz-icon
nzType="clock-circle" nzTheme="outline"></i>{{data[4].violateTime ?
(data[4].violateTime | date:"MM-dd HH:mm:ss") : '/'}}</span>
<div class="img" (click)="lookImg(data[4].violateImage)"
[ngClass]="{'selectedimg': !data[4].violateImage}">
<img [src]="data[4].violateImage ? data[4].violateImage : '../../../../assets/images/nopng.png'"
alt="">
<img *ngIf="!data[4].isCorrect" class="err"
src="../../../../assets/images/err.png" alt="">
<img *ngIf="!data[4].isCorrect" class="err" src="../../../../assets/images/err.png" alt="">
</div>
<span class="name">连接卸油管</span>
</div>
<img class="rightArrow" src="../../../assets/images/rightArrow.png" alt="">
<div class="imgbox">
<span class="timespan" [ngClass]="{'timespanerr': !data[5].isCorrect}"><i
nz-icon nzType="clock-circle"
nzTheme="outline"></i>{{data[5].violateTime ?
<span class="timespan" [ngClass]="{'timespanerr': !data[5].isCorrect}"><i nz-icon
nzType="clock-circle" nzTheme="outline"></i>{{data[5].violateTime ?
(data[5].violateTime | date:"MM-dd HH:mm:ss") : '/'}}</span>
<div class="img" (click)="lookImg(data[5].violateImage)"
[ngClass]="{'selectedimg': !data[5].violateImage}">
<img [src]="data[5].violateImage ? data[5].violateImage : '../../../../assets/images/nopng.png'"
alt="">
<img *ngIf="!data[5].isCorrect" class="err"
src="../../../../assets/images/err.png" alt="">
<img *ngIf="!data[5].isCorrect" class="err" src="../../../../assets/images/err.png" alt="">
</div>
<span class="name">全程监卸</span>
</div>
<img class="rightArrow" src="../../../assets/images/rightArrow.png" alt="">
<div class="imgbox">
<span class="timespan" [ngClass]="{'timespanerr': !data[6].isCorrect}"><i
nz-icon nzType="clock-circle"
nzTheme="outline"></i>{{data[6].violateTime ?
<span class="timespan" [ngClass]="{'timespanerr': !data[6].isCorrect}"><i nz-icon
nzType="clock-circle" nzTheme="outline"></i>{{data[6].violateTime ?
(data[6].violateTime | date:"MM-dd HH:mm:ss") : '/'}}</span>
<div class="img" (click)="lookImg(data[6].violateImage)"
[ngClass]="{'selectedimg': !data[6].violateImage}">
<img [src]="data[6].violateImage ? data[6].violateImage : '../../../../assets/images/nopng.png'"
alt="">
<img *ngIf="!data[6].isCorrect" class="err"
src="../../../../assets/images/err.png" alt="">
<img *ngIf="!data[6].isCorrect" class="err" src="../../../../assets/images/err.png" alt="">
</div>
<span class="name">拆除卸油管</span>
</div>
<img class="rightArrow" src="../../../assets/images/rightArrow.png" alt="">
<div class="imgbox">
<span class="timespan"
[ngClass]="{'timespanerr': !data[7].isCorrect}"><i
nz-icon nzType="clock-circle"
nzTheme="outline"></i>{{data[7].violateTime ?
<span class="timespan" [ngClass]="{'timespanerr': !data[7].isCorrect}"><i nz-icon
nzType="clock-circle" nzTheme="outline"></i>{{data[7].violateTime ?
(data[7].violateTime | date:"MM-dd HH:mm:ss") : '/'}}</span>
<div class="img" (click)="lookImg(data[7].violateImage)"
[ngClass]="{'selectedimg': !data[7].violateImage}">
<img [src]="data[7].violateImage ? data[7].violateImage : '../../../../assets/images/nopng.png'"
alt="">
<img *ngIf="!data[7].isCorrect" class="err"
src="../../../../assets/images/err.png" alt="">
<img *ngIf="!data[7].isCorrect" class="err" src="../../../../assets/images/err.png" alt="">
</div>
<span class="name">油罐车离场</span>
</div>

2
src/app/pages/oil-unloading-process/oil-unloading-process.component.scss

@ -32,7 +32,7 @@
justify-content: center;
div {
width: 120px;
width: 500px;
height: 32px;
text-align: center;
line-height: 32px;

33
src/app/pages/oil-unloading-process/oil-unloading-process.component.ts

@ -1,41 +1,40 @@
import { Component, OnInit, Input } from '@angular/core';
import Viewer from 'viewerjs'
import { NzMessageService } from 'ng-zorro-antd/message';
import { Component, OnInit, Input } from "@angular/core";
import Viewer from "viewerjs";
import { NzMessageService } from "ng-zorro-antd/message";
@Component({
selector: 'app-oil-unloading-process',
templateUrl: './oil-unloading-process.component.html',
styleUrls: ['./oil-unloading-process.component.scss']
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(private message: NzMessageService) { }
@Input() stationName: any;
@Input() data: any;
constructor(private message: NzMessageService) {}
ngOnInit(): void {
// console.log(this.data)
}
lookImg(url) {
if (url) {
console.log(url)
let dom = document.getElementById(`viewerjs`)
console.log(url);
let dom = document.getElementById(`viewerjs`);
let pObjs = dom.childNodes;
let node = document.createElement("img")
let node = document.createElement("img");
node.style.display = "none";
node.src = url;
node.id = 'img'
dom.appendChild(node)
node.id = "img";
dom.appendChild(node);
setTimeout(() => {
let viewer = new Viewer(document.getElementById(`viewerjs`), {
hidden: () => {
dom.removeChild(pObjs[0]);
viewer.destroy();
}
},
});
node.click();
}, 0);
} else {
this.message.create('warning', `该节点没有图片`);
this.message.create("warning", `该节点没有图片`);
}
}
}

1055
src/app/pages/records/oil-unloading-process-list/oil-unloading-process-list.component.ts

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save