刘向辉 3 years ago
parent
commit
8b6de1ed08
  1. 2
      src/app/http-interceptors/base-interceptor.ts
  2. 6
      src/app/pages/audit/audit-inform-time/audit-details-inform-time/audit-details-inform-time.component.html
  3. 6
      src/app/pages/audit/audit-ing/audit-dispose/audit-dispose.component.html
  4. 13
      src/app/pages/audit/audit-ing/audit-ing.component.html
  5. 8
      src/app/pages/audit/audit-ing/audit-ing.component.ts
  6. 11
      src/app/pages/audit/audit-record/audit-record.component.html
  7. 17
      src/app/pages/audit/audit-record/audit-record.component.ts
  8. 117
      src/app/pages/criminal-records-admin/criminal-records-admin.component.html
  9. 12
      src/app/pages/criminal-records-admin/criminal-records-admin.component.scss
  10. 71
      src/app/pages/criminal-records-admin/criminal-records-admin.component.ts
  11. 99
      src/app/pages/criminal-records/criminal-records.component.html
  12. 11
      src/app/pages/criminal-records/criminal-records.component.scss
  13. 66
      src/app/pages/criminal-records/criminal-records.component.ts
  14. 24
      src/app/pages/home/home.component.html
  15. 18
      src/app/pages/home/home.component.ts
  16. 11
      src/app/pages/license/file-category/details-file-category/details-file-category.component.html
  17. 8
      src/app/pages/license/file-category/edit-file-category/edit-file-category.component.html
  18. 2
      src/app/pages/license/file-category/edit-file-category/edit-file-category.component.scss
  19. 14
      src/app/pages/license/file-category/edit-file-category/edit-file-category.component.ts
  20. 18
      src/app/pages/license/file-category/file-category.component.html
  21. 23
      src/app/pages/license/file-category/file-category.component.ts
  22. 2
      src/app/pages/license/histories/histories.component.ts
  23. 2
      src/app/pages/license/nav-bar/nav-bar.component.ts
  24. 7
      src/app/pages/license/update-category/details-update-category/details-update-category.component.html
  25. 3
      src/app/pages/license/update-category/edit-update-category/edit-update-category.component.html
  26. 2
      src/app/pages/license/update-category/edit-update-category/edit-update-category.component.scss
  27. 14
      src/app/pages/license/update-category/edit-update-category/edit-update-category.component.ts
  28. 32
      src/app/pages/license/update-category/update-category.component.html
  29. 21
      src/app/pages/license/update-category/update-category.component.ts
  30. 8
      src/app/pages/oil-unloading-process-list/oil-unloading-process-list.component.html
  31. 22
      src/app/pages/oil-unloading-process-list/oil-unloading-process-list.component.ts
  32. 6
      src/app/pages/today-warning-admin/today-warning-admin.component.html
  33. 9
      src/app/pages/today-warning/get-out-of-line-details/get-out-of-line-details.component.html
  34. 45
      src/app/pages/today-warning/get-out-of-line-details/get-out-of-line-details.component.ts
  35. 6
      src/app/pages/today-warning/today-warning.component.html
  36. 22
      src/app/pages/warning-statistics-list/warning-statistics-list.component.ts
  37. 2
      src/app/pipes/type.pipe.ts
  38. 14
      src/theme.less

2
src/app/http-interceptors/base-interceptor.ts

@ -84,7 +84,7 @@ export class BaseInterceptor implements HttpInterceptor {
this.message.create('error', `请核对您的输入信息或格式是否正确!`);
}
if (error.status === 500) {
this.message.create('error', `状态500,服务器错误!`);
this.message.create('error', `状态500,服务器错误!${error.error.message}`);
}
if (error.error instanceof ErrorEvent) {
// 发生客户端或网络错误。相应处理。

6
src/app/pages/audit/audit-inform-time/audit-details-inform-time/audit-details-inform-time.component.html

@ -9,6 +9,10 @@
<div class="content">
<p>{{organizationName}}</p>
<div class="cutoffrule"></div>
<p>证照名称: {{data.licenseType ? data.licenseType.licenseName : null}}</p>
<div class="cutoffrule"></div>
<p>公司名称: {{data.organization ? data.organization.displayName : null}}</p>
<div class="cutoffrule"></div>
<p class="flexp">
<span>办理提醒时间:修改时间 {{data.handleRemindDays}}天</span>
<span>默认时间 {{data.handleRemindDaysDefault}}天</span>
@ -23,7 +27,7 @@
<div class="cutoffrule"></div>
<p>审核状态:{{data.auditStatus | auditStatus}}</p>
<div class="cutoffrule"></div>
<p>驳回说明:{{data.auditLog? data.auditLog.rejectReason : ''}}</p>
<p>审核说明:{{data.auditLog? data.auditLog.rejectReason : ''}}</p>
</div>

6
src/app/pages/audit/audit-ing/audit-dispose/audit-dispose.component.html

@ -11,6 +11,10 @@
<div class="cutoffrule" *ngIf="data.auditType != 0 && data.auditType != 1"></div>
<div *ngIf="data.auditType == 0"><app-gas-base-info [data]="data"></app-gas-base-info></div>
<div *ngIf="data.auditType == 1">
<p>公司名称: &nbsp;&nbsp;{{data.organization.displayName}}</p>
<div class="cutoffrule"></div>
<p>证件名称: &nbsp;&nbsp;{{data.getData.licenseType.licenseName}}</p>
<div class="cutoffrule"></div>
<p>
办理提醒时间:修改时间 &nbsp;&nbsp;{{data.getData.handleRemindDays}}天
<span style="float: right;">默认时间 {{data.getData.handleRemindDaysDefault}}天</span>
@ -39,7 +43,7 @@
<div *ngIf="data.auditType == 3">
<p>证件名称: &nbsp;&nbsp;{{data.getData.licenseTypeName}}</p>
<div class="cutoffrule"></div>
<p>效期类型: &nbsp;&nbsp;<span *ngIf="data.getData.validatyType == 0">不适用</span><span *ngIf="data.getData.validatyType == 1"></span><span *ngIf="data.getData.validatyType == 2"></span></p>
<p>无证照: &nbsp;&nbsp;<span *ngIf="data.getData.validatyType == 0">不适用</span><span *ngIf="data.getData.validatyType == 1"></span><span *ngIf="data.getData.validatyType == 2"></span></p>
</div>
<div class="cutoffrule"></div>
<p [hidden]="data.getData.imageUrl === undefined">证件图片: &nbsp;&nbsp;

13
src/app/pages/audit/audit-ing/audit-ing.component.html

@ -29,8 +29,17 @@
</td>
<td><label *ngIf="item.gasStation">{{item.gasStation.stationName}}</label></td>
<td><label *ngIf="item.gasStation">{{item.gasStation.locationName}}</label></td>
<td><label *ngIf="item.gasStation">{{item.gasStation.companyName}}</label></td>
<td>{{item.committedTime | date:"yyyy/MM/dd"}}</td>
<td>
<ng-container *ngIf="item.gasStation; else elseTemplate">
<label>{{item.gasStation.companyName}}</label>
</ng-container>
<ng-template #elseTemplate>
<label>{{item.organization ? item.organization.displayName : null}}</label>
</ng-template>
</td>
<td>{{item.committedTime | date:"yyyy/MM/dd HH:mm:ss" }}</td>
<td>{{item.auditStatusDesc}}</td>
<td class="operation">
<span class="blueColor" (click)="dispose(item)">处置</span>

8
src/app/pages/audit/audit-ing/audit-ing.component.ts

@ -188,6 +188,14 @@ export class AuditIngComponent implements OnInit {
return new Promise((resolve, reject) => {
let params = { id: item.itemId }
this.http.get(url, { params }).subscribe((data: any) => {
let auditLog = { rejectReason: item.rejectReason }
let organization = { displayName: item.organization? item.organization.displayName : "" }
if (item.auditType == 1) {
data.result.auditLog = auditLog
data.result.organization = organization
data.result.handleRemindDaysDefault = data.result.licenseType.handleRemindDays
data.result.closingRemindDaysDefault = data.result.licenseType.closingRemindDays
}
resolve(data.result)
})
})

11
src/app/pages/audit/audit-record/audit-record.component.html

@ -112,8 +112,15 @@
</td>
<td><label *ngIf="item.gasStation">{{item.gasStation.stationName}}</label></td>
<td><label *ngIf="item.gasStation">{{item.gasStation.locationName}}</label></td>
<td><label *ngIf="item.gasStation">{{item.gasStation.companyName}}</label></td>
<td>{{item.committedTime | date:"yyyy/MM/dd"}}</td>
<td>
<ng-container *ngIf="item.gasStation; else elseTemplate">
<label>{{item.gasStation.companyName}}</label>
</ng-container>
<ng-template #elseTemplate>
<label>{{item.organization ? item.organization.displayName : null}}</label>
</ng-template>
</td>
<td>{{item.committedTime | date:"yyyy/MM/dd HH:mm:ss"}}</td>
<td>{{item.auditStatusDesc}}</td>
<td class="operation">
<span class="blueColor" (click)="details(item)">详情</span>

17
src/app/pages/audit/audit-record/audit-record.component.ts

@ -161,13 +161,16 @@ export class AuditRecordComponent implements OnInit {
MaxResultCount: string = '100'
getRecordList() {
this.tableSpin = true
let endTime = this.validateForm.value.datePicker[1] + ' 23:59:59'
console.log('结束时间', endTime)
let params = {
IsContainsChildren: 'true',
OrganizationUnitId: this.validateForm.value.organization,
AuditTitle: this.validateForm.value.type,
AuditType: this.validateForm.value.info,
StartTime: this.validateForm.value.datePicker[0],
EndTime: this.validateForm.value.datePicker[1],
EndTime: endTime,
AuditStatuses: this.validateForm.value.state,
AuditLevel: this.validateForm.value.level,
Sorting: null,
@ -188,6 +191,7 @@ export class AuditRecordComponent implements OnInit {
}
details(item) {
let or = item
let component
if (item.auditType == 0) {
component = GasBaseInfoComponent
@ -200,6 +204,9 @@ export class AuditRecordComponent implements OnInit {
}
this.getData(item).then(res => {
item.getData = res
if (item.auditType == 1) {
item.getData.organization = item.organization
}
const modal = this.modal.create({
nzContent: component,
nzViewContainerRef: this.viewContainerRef,
@ -241,6 +248,14 @@ export class AuditRecordComponent implements OnInit {
return new Promise((resolve, reject) => {
let params = { id: item.itemId }
this.http.get(url, { params }).subscribe((data: any) => {
let auditLog = { rejectReason: item.rejectReason }
let organization = { displayName: item.organization? item.organization.displayName : "" }
if (item.auditType == 1) {
data.result.auditLog = auditLog
data.result.organization = organization
data.result.handleRemindDaysDefault = data.result.licenseType.handleRemindDays
data.result.closingRemindDaysDefault = data.result.licenseType.closingRemindDays
}
resolve(data.result)
})
})

117
src/app/pages/criminal-records-admin/criminal-records-admin.component.html

@ -16,15 +16,57 @@
<img (click)="isEchartsShow()" class="packup" src="../../../assets/images/packup.png" alt="">
</div>
<div class="search" [hidden]="!isEcharts">
<div class="chartsbox" [hidden]="!isEcharts">
<div class="chart">
<div class="leftbox" style="position: relative;">
<span class="chartname">
<img src="../../../assets/images/flower.png" alt="">
预警类别统计
</span>
<div class="centerContent">
<div class="numname">预警事件总数</div>
<div class="num">{{num}}</div>
</div>
<div class="piechart" id="piechart">
</div>
<nz-spin *ngIf="chartsSpin" nzSimple class="nzspin"></nz-spin>
</div>
<div class="rightbox" style="position: relative;">
<span class="chartname">
<img src="../../../assets/images/flower.png" alt="">
近一个月预警统计
</span>
<div class="btnbox">
<div class="btn" (click)="echartClick('分布')" [ngClass]="{'selectedbtn': selectedType == '分布'}">统计</div>
<div class="rankingBtnbox" (mouseenter)="mouseEnter()" (mouseleave)="mouseleave()">
<div class="btn"
[ngClass]="{'selectedbtn': (selectedRankingType == '站点排名' || selectedRankingType == '事件排名')}">排名</div>
<div class="btn rankingBtn" *ngIf="isMouseEnter" (click)="echartClick2('站点排名')"
[ngClass]="{'selectedbtn': selectedRankingType == '站点排名'}">油站</div>
<div class="btn rankingBtn" *ngIf="isMouseEnter" (click)="echartClick2('事件排名')"
[ngClass]="{'selectedbtn': selectedRankingType == '事件排名'}">事件</div>
</div>
</div>
<div class="barchart" id="barchart">
</div>
<nz-spin *ngIf="chartsSpin" nzSimple class="nzspin"></nz-spin>
</div>
</div>
</div>
<div class="title">
<app-title [name]="'预警类型统计'"></app-title>
</div>
<div class="search">
<form nz-form [formGroup]="validateForm" class="login-form" (ngSubmit)="submitForm()">
<nz-form-item class="searchParams">
<nz-form-control>
<nz-select nzAllowClear id="level" formControlName="level" nzPlaceHolder="请选择预警级别">
<nz-option nzValue="1" nzLabel="Ⅰ级"></nz-option>
<nz-option nzValue="2" nzLabel="Ⅱ级"></nz-option>
<nz-option nzValue="3" nzLabel="Ⅲ级"></nz-option>
<nz-option nzValue="4" nzLabel="Ⅳ级"></nz-option>
<nz-select (ngModelChange)="levelChange($event)" nzAllowClear id="level" formControlName="level"
nzPlaceHolder="请选择预警级别">
<nz-option *ngFor="let item of warningLevels" [nzValue]="item.key"
[nzLabel]="item.key == 1 ? 'Ⅰ级' : item.key == 2 ? 'Ⅱ级' : item.key == 3 ? 'Ⅲ级' : item.key == 4 ? 'Ⅳ级' : null">
</nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
@ -55,17 +97,19 @@
</nz-select>
</nz-form-control>
</nz-form-item>
<nz-form-item class="searchParams">
<nz-form-item class="searchParamsZ eventInput">
<nz-form-control>
<nz-select nzAllowClear formControlName="event" nzPlaceHolder="请选择预警事件">
<nz-select [nzMaxTagCount]="1" nzMode="multitagsple" nzAllowClear formControlName="event"
nzPlaceHolder="请选择预警事件">
<nz-option *ngFor="let item of warningTypesDetails" [nzValue]="item.id" [nzLabel]="item.eventSystemName">
</nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
<nz-form-item class="searchParams">
<nz-form-item class="searchParamsS eventInput">
<nz-form-control>
<nz-select nzAllowClear id="site" formControlName="site" nzPlaceHolder="请选择区域">
<nz-select [nzMaxTagCount]="1" nzMode="multitagsple" nzAllowClear id="site" formControlName="site"
nzPlaceHolder="请选择区域">
<nz-option nzValue="出入口" nzLabel="出入口"></nz-option>
<nz-option nzValue="加油区" nzLabel="加油区"></nz-option>
<nz-option nzValue="油罐区" nzLabel="油罐区"></nz-option>
@ -89,11 +133,6 @@
<br />
</nz-form-control>
</nz-form-item>
<!-- <nz-form-item>
<nz-form-control class="searchParams">
<label style="color: #91CCFF;" nz-checkbox formControlName="misinformation">是否显示误报预警</label>
</nz-form-control>
</nz-form-item> -->
<nz-form-item class="searchParams" [hidden]="!isMisinformation">
<nz-form-control>
<nz-select nzAllowClear formControlName="misinformation" nzPlaceHolder="是否显示标记">
@ -116,57 +155,15 @@
</nz-form-item>
</form>
</div>
<div class="chartsbox" [hidden]="!isEcharts">
<div class="chart">
<div class="leftbox" style="position: relative;">
<span class="chartname">
<img src="../../../assets/images/flower.png" alt="">
预警类别统计
</span>
<div class="centerContent">
<div class="numname">预警事件总数</div>
<div class="num">{{num}}</div>
</div>
<div class="piechart" id="piechart">
</div>
<nz-spin *ngIf="chartsSpin" nzSimple class="nzspin"></nz-spin>
</div>
<div class="rightbox" style="position: relative;">
<span class="chartname">
<img src="../../../assets/images/flower.png" alt="">
近一个月预警统计
</span>
<div class="btnbox">
<div class="btn" (click)="echartClick('分布')" [ngClass]="{'selectedbtn': selectedType == '分布'}">统计</div>
<div class="rankingBtnbox" (mouseenter)="mouseEnter()" (mouseleave)="mouseleave()">
<div class="btn"
[ngClass]="{'selectedbtn': (selectedRankingType == '站点排名' || selectedRankingType == '事件排名')}">排名</div>
<div class="btn rankingBtn" *ngIf="isMouseEnter" (click)="echartClick2('站点排名')"
[ngClass]="{'selectedbtn': selectedRankingType == '站点排名'}">油站</div>
<div class="btn rankingBtn" *ngIf="isMouseEnter" (click)="echartClick2('事件排名')"
[ngClass]="{'selectedbtn': selectedRankingType == '事件排名'}">事件</div>
</div>
</div>
<div class="barchart" id="barchart">
</div>
<nz-spin *ngIf="chartsSpin" nzSimple class="nzspin"></nz-spin>
</div>
</div>
</div>
<div class="title">
<app-title [name]="'预警类型统计'"></app-title>
</div>
<div class="tablebox">
<div class="table">
<div nz-row class="th">
<div nz-col nzSpan="1" style="text-align: center;">
<span>序号</span>
</div>
<div nz-col nzSpan="2" style="text-align: center;">
<div nz-col nzSpan="2" style="text-align: center;white-space:nowrap;
overflow:hidden;
text-overflow:ellipsis;">
<span style="margin-right:46px;">
预警级别
</span>

12
src/app/pages/criminal-records-admin/criminal-records-admin.component.scss

@ -28,6 +28,16 @@
width: 150px;
}
.searchParamsZ {
min-width: 200px;
max-width: 250px;
margin-right: 3px;
}
.searchParamsS{
min-width: 180px;
max-width: 250px;
}
.searchParamsLong {
width: 250px;
}
@ -140,7 +150,7 @@
}
.chart {
width: 98%;
width: 97%;
height: 350px;
box-sizing: border-box;
padding: 0 10px;

71
src/app/pages/criminal-records-admin/criminal-records-admin.component.ts

@ -3,10 +3,8 @@ import { Component, ElementRef, OnInit, ViewContainerRef } from '@angular/core';
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
import { Router } from '@angular/router'
import * as echarts from 'echarts';
import { fromEvent } from 'rxjs';
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';
@ -426,7 +424,6 @@ export class CriminalRecordsAdminComponent implements OnInit {
}
this.mybarChart.setOption(option);
}
//获取统计信息
chartsSpin: boolean = false
getAggregations() {
@ -460,8 +457,9 @@ export class CriminalRecordsAdminComponent implements OnInit {
tableSpin: boolean = false
getViolateRecordList() {
let ViolationIds = []
// console.log(this.validateForm.value.event)
if (this.validateForm.value.event) {
ViolationIds.push(this.validateForm.value.event)
ViolationIds = this.validateForm.value.event
}
if (this.validateForm.value.type && !this.validateForm.value.event) {
this.warningTypesDetails.forEach(item => {
@ -479,7 +477,7 @@ export class CriminalRecordsAdminComponent implements OnInit {
let params = {
Level: this.validateForm.value.level,
ViolationIds: ViolationIds,
ViolateArea: this.validateForm.value.site,
ViolateAreas: this.validateForm.value.site,
OrganizationUnitId: this.validateForm.value.organization,
IsContainsChildren: 'true',
IsHandled: disposalState,
@ -500,6 +498,7 @@ export class CriminalRecordsAdminComponent implements OnInit {
})
}
isMouseEnter = false
mouseEnter() {
this.isMouseEnter = true
@ -577,30 +576,84 @@ export class CriminalRecordsAdminComponent implements OnInit {
});
this.list = []
this.SkipCount = '0'
console.log('xxxx',this.validateForm.value)
console.log('xxxx', this.validateForm.value)
this.getViolateRecordList()
}
//预警类型接口
warningTypes: any //预警接口数据
warningTypesDetails: any
warningTypesDetailsCopy: any
warningTypes: any //预警接口数据
warningTypesCopy: any
warningLevels: any
warningLevelsCopy: any
warningType() {
this.http.get('/api/services/app/Violation/GetAllList').subscribe((data: any) => {
this.warningTypesDetails = data.result
this.warningTypesDetails = JSON.parse(JSON.stringify(data.result))
this.warningTypesDetailsCopy = JSON.parse(JSON.stringify(data.result)) //原始数据备份
this.warningTypes = (data.result as any).groupBy((t) => { return t.violationType });
this.warningTypesCopy = (data.result as any).groupBy((t) => { return t.violationType })
this.warningLevels = (data.result as any).groupBy((t) => { return t.level });
this.warningLevelsCopy = (data.result as any).groupBy((t) => { return t.level })
this.warningLevels.sort(function (a, b) {
if (a.key < b.key) {
return -1;
} else if (a.key == b.key) {
return 0;
} else {
return 1;
}
});
this.warningLevelsCopy.sort(function (a, b) {
if (a.key < b.key) {
return -1;
} else if (a.key == b.key) {
return 0;
} else {
return 1;
}
});
// console.log(111, this.warningTypesDetails)
// console.log(222, this.warningTypesCopy)
// console.log(333, this.warningLevels)
})
}
typeChange(e) {
if (!e) {
this.warningTypesDetails = this.warningTypesDetailsCopy
this.warningLevels = this.warningLevelsCopy
return
}
this.warningTypes.forEach(element => {
if (element.key == e) {
this.warningTypesDetails = element
this.warningLevels = (element as any).groupBy((t) => { return t.level });
}
});
this.validateForm.patchValue({
event: null,
});
}
levelChange(e) {
if (!e) {
this.warningTypesDetails = this.warningTypesDetailsCopy
this.warningTypes = this.warningTypesCopy
this.validateForm.patchValue({
type: null,
});
return
}
this.warningLevels.forEach(element => {
if (element.key == e) {
this.warningTypesDetails = element
this.warningTypes = (element as any).groupBy((t) => { return t.violationType });
}
});
this.validateForm.patchValue({
event: null,
});
}
look(item) {

99
src/app/pages/criminal-records/criminal-records.component.html

@ -15,15 +15,54 @@
</div>
<img (click)="isEchartsShow()" class="packup" src="../../../assets/images/packup.png" alt="">
</div>
<div class="search" [hidden]="!isEcharts">
<div class="chartsbox" [hidden]="!isEcharts">
<div class="chart">
<div class="leftbox" style="position: relative;">
<span class="chartname">
<img src="../../../assets/images/flower.png" alt="">
预警类别统计
</span>
<div class="centerContent">
<div class="numname">预警事件总数</div>
<div class="num">{{num}}</div>
</div>
<div class="piechart" id="piechart">
</div>
<nz-spin *ngIf="chartsSpin" nzSimple class="nzspin"></nz-spin>
</div>
<div class="rightbox" style="position: relative;">
<span class="chartname">
<img src="../../../assets/images/flower.png" alt="">
近一个月预警统计
</span>
<div class="btnbox">
<!-- <button class="rankingBtn" *ngIf="selectedType == '排名'" nz-button (click)="echartClick2('站点排名')"
[ngClass]="{'selectedbtn': selectedRankingType == '站点排名'}">油站</button>
<button class="rankingBtn" *ngIf="selectedType == '排名'" nz-button (click)="echartClick2('事件排名')"
[ngClass]="{'selectedbtn': selectedRankingType == '事件排名'}">事件</button> -->
<button nz-button (click)="echartClick('分布')" [ngClass]="{'selectedbtn': selectedType == '分布'}">统计</button>
<button nz-button (click)="echartClick('排名')" [ngClass]="{'selectedbtn': selectedType == '排名'}">排名</button>
</div>
<div class="barchart" id="barchart">
</div>
<nz-spin *ngIf="chartsSpin" nzSimple class="nzspin"></nz-spin>
</div>
</div>
</div>
<div class="title">
<app-title [name]="'预警类型统计'"></app-title>
</div>
<div class="search">
<form nz-form [formGroup]="validateForm" class="login-form" (ngSubmit)="submitForm()">
<nz-form-item class="searchParams">
<nz-form-control>
<nz-select nzAllowClear formControlName="level" nzPlaceHolder="请选择预警级别">
<nz-option nzValue="1" nzLabel="Ⅰ级"></nz-option>
<nz-option nzValue="2" nzLabel="Ⅱ级"></nz-option>
<nz-option nzValue="3" nzLabel="Ⅲ级"></nz-option>
<nz-option nzValue="4" nzLabel="Ⅳ级"></nz-option>
<nz-select (ngModelChange)="levelChange($event)" nzAllowClear id="level" formControlName="level"
nzPlaceHolder="请选择预警级别">
<nz-option *ngFor="let item of warningLevels" [nzValue]="item.key"
[nzLabel]="item.key == 1 ? 'Ⅰ级' : item.key == 2 ? 'Ⅱ级' : item.key == 3 ? 'Ⅲ级' : item.key == 4 ? 'Ⅳ级' : null">
</nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
@ -36,17 +75,17 @@
</nz-form-control>
</nz-form-item>
<nz-form-item class="searchParams">
<nz-form-item class="searchParamsZ eventInput">
<nz-form-control>
<nz-select nzAllowClear formControlName="event" nzPlaceHolder="请选择预警事件">
<nz-select [nzMaxTagCount]="1" nzMode="multitagsple" nzAllowClear formControlName="event" nzPlaceHolder="请选择预警事件">
<nz-option *ngFor="let item of warningTypesDetails" [nzValue]="item.id" [nzLabel]="item.eventSystemName">
</nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
<nz-form-item class="searchParams">
<nz-form-item class="searchParamsS eventInput">
<nz-form-control>
<nz-select nzAllowClear formControlName="site" nzPlaceHolder="请选择站内发生区域">
<nz-select [nzMaxTagCount]="1" nzMode="multitagsple" nzAllowClear formControlName="site" nzPlaceHolder="请选择站内发生区域">
<nz-option nzValue="出入口" nzLabel="出入口"></nz-option>
<nz-option nzValue="加油区" nzLabel="加油区"></nz-option>
<nz-option nzValue="油罐区" nzLabel="油罐区"></nz-option>
@ -92,46 +131,6 @@
</nz-form-item>
</form>
</div>
<div class="chartsbox" [hidden]="!isEcharts">
<div class="chart">
<div class="leftbox" style="position: relative;">
<span class="chartname">
<img src="../../../assets/images/flower.png" alt="">
预警类别统计
</span>
<div class="centerContent">
<div class="numname">预警事件总数</div>
<div class="num">{{num}}</div>
</div>
<div class="piechart" id="piechart">
</div>
<nz-spin *ngIf="chartsSpin" nzSimple class="nzspin"></nz-spin>
</div>
<div class="rightbox" style="position: relative;">
<span class="chartname">
<img src="../../../assets/images/flower.png" alt="">
近一个月预警统计
</span>
<div class="btnbox">
<!-- <button class="rankingBtn" *ngIf="selectedType == '排名'" nz-button (click)="echartClick2('站点排名')"
[ngClass]="{'selectedbtn': selectedRankingType == '站点排名'}">油站</button>
<button class="rankingBtn" *ngIf="selectedType == '排名'" nz-button (click)="echartClick2('事件排名')"
[ngClass]="{'selectedbtn': selectedRankingType == '事件排名'}">事件</button> -->
<button nz-button (click)="echartClick('分布')" [ngClass]="{'selectedbtn': selectedType == '分布'}">统计</button>
<button nz-button (click)="echartClick('排名')" [ngClass]="{'selectedbtn': selectedType == '排名'}">排名</button>
</div>
<div class="barchart" id="barchart">
</div>
<nz-spin *ngIf="chartsSpin" nzSimple class="nzspin"></nz-spin>
</div>
</div>
</div>
<div class="title">
<app-title [name]="'预警类型统计'"></app-title>
</div>
<div class="tablebox">
<div class="table">
<div nz-row class="th">

11
src/app/pages/criminal-records/criminal-records.component.scss

@ -32,6 +32,17 @@
width: 220px;
}
.searchParamsZ {
min-width: 200px;
max-width: 250px;
margin-right: 3px;
}
.searchParamsS {
min-width: 180px;
max-width: 250px;
}
.btn {
// flex: 1;
}

66
src/app/pages/criminal-records/criminal-records.component.ts

@ -439,7 +439,7 @@ export class CriminalRecordsComponent implements OnInit {
getViolateRecordList() {
let ViolationIds = []
if (this.validateForm.value.event) {
ViolationIds.push(this.validateForm.value.event)
ViolationIds = this.validateForm.value.event
}
if (this.validateForm.value.type && !this.validateForm.value.event) {
this.warningTypesDetails.forEach(item => {
@ -457,7 +457,7 @@ export class CriminalRecordsComponent implements OnInit {
let params = {
Level: this.validateForm.value.level,
ViolationIds: ViolationIds,
ViolateArea: this.validateForm.value.site,
ViolateAreas: this.validateForm.value.site,
OrganizationUnitId: JSON.parse(sessionStorage.getItem('userdataOfgasstation')).organization.id,
IsContainsChildren: 'true',
ViolateTime: this.validateForm.value.datePicker ? [moment(this.validateForm.value.datePicker[0]).format('yyyy-MM-DD'), moment(this.validateForm.value.datePicker[1]).format('yyyy-MM-DD')] : null,
@ -518,24 +518,82 @@ export class CriminalRecordsComponent implements OnInit {
//预警类型接口
warningTypes: any //预警接口数据
warningTypesDetails: any
warningTypesDetailsCopy: any
warningTypes: any //预警接口数据
warningTypesCopy: any
warningLevels: any
warningLevelsCopy: any
warningType() {
this.http.get('/api/services/app/Violation/GetAllList').subscribe((data: any) => {
this.warningTypesDetails = data.result
this.warningTypesDetails = JSON.parse(JSON.stringify(data.result))
this.warningTypesDetailsCopy = JSON.parse(JSON.stringify(data.result)) //原始数据备份
this.warningTypes = (data.result as any).groupBy((t) => { return t.violationType });
this.warningTypesCopy = (data.result as any).groupBy((t) => { return t.violationType })
this.warningLevels = (data.result as any).groupBy((t) => { return t.level });
this.warningLevelsCopy = (data.result as any).groupBy((t) => { return t.level })
this.warningLevels.sort(function (a, b) {
if (a.key < b.key) {
return -1;
} else if (a.key == b.key) {
return 0;
} else {
return 1;
}
});
this.warningLevelsCopy.sort(function (a, b) {
if (a.key < b.key) {
return -1;
} else if (a.key == b.key) {
return 0;
} else {
return 1;
}
});
// console.log(111, this.warningTypesDetails)
// console.log(222, this.warningTypesCopy)
// console.log(333, this.warningLevels)
})
}
typeChange(e) {
if (!e) {
this.warningTypesDetails = this.warningTypesDetailsCopy
this.warningLevels = this.warningLevelsCopy
return
}
this.warningTypes.forEach(element => {
if (element.key == e) {
this.warningTypesDetails = element
this.warningLevels = (element as any).groupBy((t) => { return t.level });
}
});
this.validateForm.patchValue({
event: null,
});
}
levelChange(e) {
if (!e) {
this.warningTypesDetails = this.warningTypesDetailsCopy
this.warningTypes = this.warningTypesCopy
this.validateForm.patchValue({
type: null,
});
return
}
this.warningLevels.forEach(element => {
if (element.key == e) {
this.warningTypesDetails = element
this.warningTypes = (element as any).groupBy((t) => { return t.violationType });
}
});
this.validateForm.patchValue({
event: null,
});
}
selectedType = '分布'
selectedRankingType = '站点排名'
echartClick(type) {

24
src/app/pages/home/home.component.html

@ -34,7 +34,7 @@
预警记录
</li>
<li [routerLink]="['/license/petrolStation']" routerLinkActive="router-link-active">
照管理
</li>
</div>
@ -87,6 +87,21 @@
<span class="details">{{item.notification.data.properties.ViolationName}}</span>
</div>
</div>
<ng-container
*ngIf="item.notification.data.type == 'AX.SinochemServer.License.Notifications.LicenseNotificationData'; else elseTemplate">
<div class="btnbox">
<div class="look" (click)="updateState(item,1)">
处置
</div>
<div class="look" (click)="updateState(item,2)">
申请延期
</div>
<div class="lose" (click)="updateState(item,0)">
忽略
</div>
</div>
</ng-container>
<ng-template #elseTemplate>
<div class="btnbox">
<div class="look" (click)="look(item)">
查看
@ -95,6 +110,9 @@
忽略
</div>
</div>
</ng-template>
</ng-template>
<!-- 修改密码 -->
@ -109,8 +127,8 @@
<nz-form-item>
<nz-form-control nzErrorTip="">
<nz-input-group>
<input name="oldpassword" type="password" nz-input formControlName="oldpassword"
placeholder="请输入原密码" autocomplete="off" />
<input name="oldpassword" type="password" nz-input formControlName="oldpassword" placeholder="请输入原密码"
autocomplete="off" />
</nz-input-group>
</nz-form-control>
</nz-form-item>

18
src/app/pages/home/home.component.ts

@ -310,7 +310,23 @@ export class HomeComponent implements OnInit {
}
})
}
//处置
updateState(item, type) {
let body = {
id: item.notification.entityId,
operation: type
}
this.http.put('/api/services/app/StationValidityLicenseNotificationRecord/UpdateState', body).subscribe(data => {
this.messageId.forEach((element) => {
if (element.id == item.notification.entityId) {
this.notificationService.remove(element.messageId)
}
})
this.message.create('success', '操作成功');
}, err => {
this.message.create('error', '操作失败');
})
}
ngOnDestroy() {
console.log('退出')

11
src/app/pages/license/file-category/details-file-category/details-file-category.component.html

@ -9,7 +9,7 @@
<div class="content">
<p>证件名称: &nbsp;&nbsp;{{data.licenseTypeName}}</p>
<div class="cutoffrule"></div>
<p>效期类型: &nbsp;&nbsp;<span *ngIf="data.validatyType == 0">不适用</span><span *ngIf="data.validatyType == 1"></span><span *ngIf="data.validatyType == 2"></span></p>
<p>无证照: &nbsp;&nbsp;<span *ngIf="data.validatyType == 0">不适用</span><span *ngIf="data.validatyType == 1"></span><span *ngIf="data.validatyType == 2"></span></p>
<div class="cutoffrule"></div>
<!-- <p>是否年检: &nbsp;&nbsp;是</p>
<div class="cutoffrule"></div> -->
@ -19,7 +19,9 @@
<img *ngIf="data.imageUrl && getFileType(data.imageUrl) == 'pdf'" src="../../../../assets/images/license/pdf.png" (click)="lookFile(data)">
</p>
<div class="cutoffrule"></div>
<p class="recordP">
<p>说明: &nbsp;&nbsp;{{data.remark}}</p>
<div class="cutoffrule"></div>
<p class="recordP" style="margin-bottom: 32px">
<span>审核记录</span>
<span>
<span style="margin-right: 6px;">
@ -32,8 +34,9 @@
</p>
<nz-timeline>
<nz-timeline-item *ngFor="let item of auditList">
<span style="margin-right: 12px;">{{item.creationTime | date:"yyyy/MM/dd"}}</span>
<span>{{item.auditStatus | auditStatus}}</span>
<span>{{item.creationTime | date:"yyyy/MM/dd"}}</span>
<span style="margin: 0 10px;">{{item.auditStatus | auditStatus}}</span>
<span *ngIf="item.auditStatus == 3">驳回说明:{{item.auditLog? item.auditLog.rejectReason : ''}}</span>
</nz-timeline-item>
</nz-timeline>
<ng-template #soccerTemplate>

8
src/app/pages/license/file-category/edit-file-category/edit-file-category.component.html

@ -10,7 +10,7 @@
<div class="cutoffrule"></div>
<p>有效期类型<span style="color: red;">*</span></p>
<p>适用类型<span style="color: red;">*</span></p>
<nz-form-item>
<nz-form-control>
@ -40,8 +40,12 @@
</div>
</div>
<p>说明</p>
<textarea style="background: #173350;height: 100px;width: 100%;border-radius: 0;border: 0;color: white;" cols="30" rows="10" [(ngModel)]="data2.remark" formControlName="remark"></textarea>
<div class="btnbox">
<button nz-button type="submit" class="ok" (click)="ok()">确定</button>
<button nz-button type="submit" class="ok" (click)="submitReview()">提交审核</button>
<button nz-button type="submit" class="ok" (click)="ok()">保存</button>
<button nz-button type="button" class="cancel" (click)="destroyModal()">取消</button>
</div>
</form>

2
src/app/pages/license/file-category/edit-file-category/edit-file-category.component.scss

@ -70,7 +70,7 @@
}
button:nth-child(2) {
margin-left: 16px;
margin: 0 15px;
}
.ok {

14
src/app/pages/license/file-category/edit-file-category/edit-file-category.component.ts

@ -21,7 +21,8 @@ export class EditFileCategoryComponent implements OnInit {
data2
ngOnInit(): void {
this.validateForm = this.fb.group({
type: [null, [Validators.required]]
type: [null, [Validators.required]],
remark: [null]
});
this.data2 = JSON.parse(JSON.stringify(this.data))
this.validatyType = (this.data2.validatyType).toString()
@ -38,8 +39,17 @@ export class EditFileCategoryComponent implements OnInit {
destroyModal() {
this.modal.destroy({ data: 'this the result data' });
}
isSubmit: boolean = false;
ok() {
this.modal.triggerOk()
this.isSubmit = false;
this.modal.triggerOk();
}
//提交审核
submitReview(){
this.isSubmit = true;
this.modal.triggerOk();
}

18
src/app/pages/license/file-category/file-category.component.html

@ -5,12 +5,12 @@
<thead>
<tr>
<th [nzWidth]="'16%'">
<span style="margin-left: 25%;">名称</span>
<span style="margin-left: 25%;">名称</span>
</th>
<th>有效期类型</th>
<th>有无证照</th>
<!-- <th>提交时间</th>
<th>审核状态</th> -->
<th>附件</th>
<th>提交时间</th>
<th>审核状态</th>
<th>操作</th>
</tr>
</thead>
@ -24,20 +24,20 @@
<span *ngIf="item.validatyType == 1"></span>
<span *ngIf="item.validatyType == 2"></span>
</td>
<!-- <td>{{item.committedTime | date:"yyyy/MM/dd"}}<span *ngIf="!item.committedTime">未提交审核</span></td>
<td>
<span *ngIf="item.auditLog">{{item.auditLog.auditStatusDesc || ''}}</span>
</td> -->
<td>
<img *ngIf="item.imageUrl && getFileType(item.imageUrl) == 'img'" [src]="item.imageUrl" (click)="viewImg(item.imageUrl)">
<img *ngIf="item.imageUrl && getFileType(item.imageUrl) == 'word'" src="../../../../assets/images/license/word.png" (click)="lookFile(item)">
<img *ngIf="item.imageUrl && getFileType(item.imageUrl) == 'pdf'" src="../../../../assets/images/license/pdf.png" (click)="lookFile(item)">
</td>
<td>{{item.committedTime | date:"yyyy/MM/dd"}}<span *ngIf="!item.committedTime">未提交审核</span></td>
<td>
<span>{{item.auditStatus | auditStatus}}</span>
</td>
<td class="operation">
<span class="blueColor" (click)="edit(item)">编辑</span>
<span class="blueColor" (click)="details(item)">详情</span>
<span class="blueColor" (click)="cancelReview(item)" *ngIf="item.auditStatus === 1">撤销审核</span>
<span class="blueColor" (click)="submitReview(item)" *ngIf="item.auditStatus != 1">提交审核</span>
<!-- <span class="blueColor" (click)="submitReview(item)" *ngIf="item.auditStatus != 1">提交审核</span> -->
</td>
</tr>
</tbody>

23
src/app/pages/license/file-category/file-category.component.ts

@ -95,6 +95,10 @@ export class FileCategoryComponent implements OnInit {
}
edit(item) {
if (item.auditStatus === 1) {
this.message.create('warning', '审核中不允许编辑!');
return
}
const modal = this.modal.create({
nzContent: EditFileCategoryComponent,
nzViewContainerRef: this.viewContainerRef,
@ -112,13 +116,24 @@ export class FileCategoryComponent implements OnInit {
nzFooter: null,
nzClosable: false,
nzOnOk: async () => {
if (instance.validatyType == '2' && !instance.data2.imageUrl) {
this.message.create('warning', '请上传附件!');
return false;
}
await new Promise(resolve => {
instance.data2.validatyType = Number(instance.validatyType)
this.http.post('/api/services/app/StationFileLicense/Create', instance.data2).subscribe(data => {
this.http.post('/api/services/app/StationFileLicense/Create', instance.data2).subscribe((data: any) => {
if (!instance.isSubmit) {
resolve(data);
this.getStationList();
this.message.create('success', '修改成功!');
return true
return true;
} else { //提交审核
this.submitReview(data.result).then(res=>{
resolve(data);
return true;
});
}
})
})
}
@ -154,12 +169,16 @@ export class FileCategoryComponent implements OnInit {
//提交审核
submitReview(item) {
if (!item.id) {
this.message.create('warning', '该证照请编辑保存后再提交审核!');
return
}
return new Promise((resolve, reject)=>{
let params = { id: item.id }
this.http.post('/api/services/app/StationFileLicense/Commit', {}, { params }).subscribe(data => {
this.message.create('success', '提交审核成功!');
this.getStationList();
resolve('success');
})
})
}

2
src/app/pages/license/histories/histories.component.ts

@ -75,6 +75,8 @@ export class HistoriesComponent implements OnInit {
//处置
details(item) {
console.log(item)
item.licenseSnapshot.licenseTypeName = item.licenseSnapshot.validityLicenseType.licenseName
const modal = this.modal.create({
nzContent: DetailsUpdateCategoryComponent,
nzViewContainerRef: this.viewContainerRef,

2
src/app/pages/license/nav-bar/nav-bar.component.ts

@ -9,7 +9,7 @@ export class NavBarComponent implements OnInit {
constructor() { }
navList = ['通知','更新类证件','档案类证件','历史纪录']
navList = ['通知','经营类证照','资产类证照','历史纪录']
selectedItem = '通知'
selectNav(item){
this.selectedItem = item

7
src/app/pages/license/update-category/details-update-category/details-update-category.component.html

@ -25,7 +25,7 @@
<img *ngIf="data.imageUrl && getFileType(data.imageUrl) == 'pdf'" src="../../../../assets/images/license/pdf.png" (click)="lookFile(data)">
</p>
<div class="cutoffrule"></div>
<p class="recordP">
<p class="recordP" style="margin-bottom: 32px">
<span>审核记录</span>
<span>
<span style="margin-right: 6px;">
@ -38,8 +38,9 @@
</p>
<nz-timeline>
<nz-timeline-item *ngFor="let item of auditList">
<span style="margin-right: 12px;">{{item.creationTime | date:"yyyy/MM/dd"}}</span>
<span>{{item.auditStatus | auditStatus}}</span>
<span>{{item.creationTime | date:"yyyy/MM/dd"}}</span>
<span style="margin: 0 10px;">{{item.auditStatus | auditStatus}}</span>
<span *ngIf="item.auditStatus == 3">驳回说明:{{item.auditLog? item.auditLog.rejectReason : ''}}</span>
</nz-timeline-item>
</nz-timeline>
<ng-template #soccerTemplate>

3
src/app/pages/license/update-category/edit-update-category/edit-update-category.component.html

@ -63,7 +63,8 @@
</div>
<div class="btnbox">
<button nz-button type="submit" class="ok" (click)="ok()">确定</button>
<button nz-button type="submit" class="ok" (click)="submitReview()">提交审核</button>
<button nz-button type="submit" class="ok" (click)="ok()">保存</button>
<button nz-button type="button" class="cancel" (click)="destroyModal()">取消</button>
</div>
</form>

2
src/app/pages/license/update-category/edit-update-category/edit-update-category.component.scss

@ -70,7 +70,7 @@
}
button:nth-child(2) {
margin-left: 16px;
margin: 0 15px;
}
.ok {

14
src/app/pages/license/update-category/edit-update-category/edit-update-category.component.ts

@ -57,8 +57,16 @@ export class EditUpdateCategoryComponent implements OnInit {
this.modal.destroy({ data: 'this the result data' });
}
isSubmit: boolean = false;
ok() {
this.modal.triggerOk()
this.isSubmit = false;
this.modal.triggerOk();
}
//提交审核
submitReview(){
this.isSubmit = true;
this.modal.triggerOk();
}
//check change
@ -72,7 +80,7 @@ export class EditUpdateCategoryComponent implements OnInit {
if (time <= 0) {
this.data2.validityDays = 0
} else {
this.data2.validityDays = time / (1000*3600*24);
this.data2.validityDays = Math.floor(time / (1000*3600*24));
}
}
}
@ -89,7 +97,7 @@ export class EditUpdateCategoryComponent implements OnInit {
if (time <= 0) {
this.data2.validityDays = 0
} else {
this.data2.validityDays = time / (1000*3600*24);
this.data2.validityDays = Math.floor(time / (1000*3600*24));
}
} else {
this.data2.validityDays = 999

32
src/app/pages/license/update-category/update-category.component.html

@ -5,17 +5,17 @@
<thead>
<tr>
<th [nzWidth]="'16%'">
<span style="margin-left: 30px;">名称</span>
<span style="margin-left: 30px;">名称</span>
</th>
<th>证件编号</th>
<th>证件有效期</th>
<th>附件</th>
<th>有效期类型</th>
<th>证照编号</th>
<th>证照效期</th>
<th>有效天数</th>
<th>办理类型</th>
<!-- <th>是否年检</th> -->
<!-- <th>是否年检</th>
<th>提交时间</th>
<th>审核状态</th>
<th>审核状态</th> -->
<th>预警状态</th>
<th>附件</th>
<th>操作</th>
</tr>
</thead>
@ -26,11 +26,6 @@
</td>
<td>{{item.licenseCode || ''}}</td>
<td>{{item.isLongTerm ? '长期证照' : (item.validityEndTime | date:"yyyy/MM/dd")}}</td>
<td>
<img *ngIf="item.imageUrl && getFileType(item.imageUrl) == 'img'" [src]="item.imageUrl" (click)="viewImg(item.imageUrl)">
<img *ngIf="item.imageUrl && getFileType(item.imageUrl) == 'word'" src="../../../../assets/images/license/word.png" (click)="lookFile(item)">
<img *ngIf="item.imageUrl && getFileType(item.imageUrl) == 'pdf'" src="../../../../assets/images/license/pdf.png" (click)="lookFile(item)">
</td>
<td>
<ng-container *ngIf="item.isLongTerm; else elseTemplate">
长期
@ -41,22 +36,27 @@
</td>
<td>{{getHandleTypes(item.handleTypes)}}</td>
<!-- <td><span *ngIf="item.isYearlyCheck">是</span><span *ngIf="!item.isYearlyCheck">否</span></td> -->
<!-- <td><span *ngIf="item.isYearlyCheck">是</span><span *ngIf="!item.isYearlyCheck">否</span></td>
<td>{{item.committedTime | date:"yyyy/MM/dd"}}<span *ngIf="!item.committedTime">未提交审核</span></td>
<td>
<span>{{item.auditStatus | auditStatus}}</span>
</td>
<span *ngIf="item.auditLog">{{item.auditLog.auditStatusDesc || ''}}</span>
</td> -->
<td>
<span *ngIf="item.licenseViolationType == 0"></span>
<span *ngIf="item.licenseViolationType == 1">办理提醒</span>
<span *ngIf="item.licenseViolationType == 2">临期提醒</span>
<span *ngIf="item.licenseViolationType == 3">逾期报警</span>
</td>
<td>
<img *ngIf="item.imageUrl && getFileType(item.imageUrl) == 'img'" [src]="item.imageUrl" (click)="viewImg(item.imageUrl)">
<img *ngIf="item.imageUrl && getFileType(item.imageUrl) == 'word'" src="../../../../assets/images/license/word.png" (click)="lookFile(item)">
<img *ngIf="item.imageUrl && getFileType(item.imageUrl) == 'pdf'" src="../../../../assets/images/license/pdf.png" (click)="lookFile(item)">
</td>
<td class="operation">
<span class="blueColor" (click)="edit(item)">编辑</span>
<span class="blueColor" (click)="details(item)">详情</span>
<span class="blueColor" (click)="cancelReview(item)" *ngIf="item.auditStatus === 1">撤销审核</span>
<span class="blueColor" (click)="submitReview(item)" *ngIf="item.auditStatus != 1">提交审核</span>
<!-- <span class="blueColor" (click)="submitReview(item)" *ngIf="item.auditStatus != 1">提交审核</span> -->
</td>
</tr>
</tbody>

21
src/app/pages/license/update-category/update-category.component.ts

@ -112,6 +112,10 @@ export class UpdateCategoryComponent implements OnInit {
}
edit(item) {
if (item.auditStatus === 1) {
this.message.create('warning', '审核中不允许编辑!');
return
}
const modal = this.modal.create({
nzContent: EditUpdateCategoryComponent,
nzViewContainerRef: this.viewContainerRef,
@ -134,16 +138,23 @@ export class UpdateCategoryComponent implements OnInit {
let body = instance.data2
// 日期
if (body.isLongTerm) {
body.validityStartTime = instance.isLongTermTime
body.validityStartTime = instance.isLongTermTime || new Date()
} else {
body.validityStartTime = instance.isNoLongTermTime[0] || new Date()
body.validityEndTime = instance.isNoLongTermTime[1] || new Date()
}
this.http.post('/api/services/app/StationValidityLicense/Create', body).subscribe(data => {
this.http.post('/api/services/app/StationValidityLicense/Create', body).subscribe((data:any) => {
if (!instance.isSubmit) {
resolve(data);
this.getStationList();
this.message.create('success', '修改成功!');
return true
return true;
} else { //提交审核
this.submitReview(data.result).then(res=>{
resolve(data);
return true;
});
}
})
})
} else {
@ -184,12 +195,16 @@ export class UpdateCategoryComponent implements OnInit {
//提交审核
submitReview(item){
if (!item.id) {
this.message.create('warning', '该证照请编辑保存后再提交审核!');
return
}
return new Promise((resolve, reject)=>{
let params = { id: item.id }
this.http.post('/api/services/app/StationValidityLicense/Commit', {},{params}).subscribe(data => {
this.message.create('success', '提交审核成功!');
this.getStationList();
resolve('success');
})
})
}

8
src/app/pages/oil-unloading-process-list/oil-unloading-process-list.component.html

@ -49,11 +49,11 @@
<div class="title">
<app-title [name]="'卸油作业留证列表'"></app-title>
</div>
<div class="search" [hidden]="!isEcharts">
<div class="search">
<form nz-form [formGroup]="validateForm" class="login-form" (ngSubmit)="submitForm()">
<nz-form-item class="searchParams">
<nz-form-control>
<nz-select (ngModelChange)="stateChange($event)" nzAllowClear formControlName="state"
<nz-select nzAllowClear formControlName="state"
nzPlaceHolder="请选择状态">
<nz-option nzValue="0" nzLabel="预警"></nz-option>
<nz-option nzValue="1" nzLabel="合规"></nz-option>
@ -121,10 +121,10 @@
卸油结束时间
</div>
<div nz-col nzSpan="3" style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
操作前准备预警节点数量
卸油准备
</div>
<div nz-col nzSpan="3" style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
操作中准备预警节点数量
卸油操作
</div>
<!-- <div nz-col nzSpan="3" style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
全流程准备预警节点数量

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

@ -254,17 +254,17 @@ export class OilUnloadingProcessListComponent implements OnInit {
}
}
],
legend: {
selectedMode: false, // 是否允许点击
data: ['卸油事件'],
textStyle: {
color: '#fff'
},
right: 28,
top: 18,
itemWidth: 8,
itemHeight: 8,
},
// legend: {
// selectedMode: false, // 是否允许点击
// data: ['卸油事件'],
// textStyle: {
// color: '#fff'
// },
// right: 28,
// top: 18,
// itemWidth: 8,
// itemHeight: 8,
// },
grid: {
left: '42px',
right: '30px',

6
src/app/pages/today-warning-admin/today-warning-admin.component.html

@ -124,19 +124,19 @@
管理区域
</div>
<div nz-col nzSpan="2">
油站名称
油站
</div>
<div nz-col nzSpan="2">
预警区域
</div>
<div nz-col nzSpan="2">
摄像头
摄像头名称
</div>
<div nz-col nzSpan="3">
预警时间
</div>
<div nz-col nzSpan="2">
处置状态
状态
</div>
<div nz-col nzSpan="2">
操作

9
src/app/pages/today-warning/get-out-of-line-details/get-out-of-line-details.component.html

@ -17,7 +17,12 @@
</div>
<div class="content">
<div *ngIf="selectedType == 'img'" class="imgbox">
<ng-container *ngIf="isImage; else elseTemplate">
<img [src]="imgUrl" alt="">
</ng-container>
<ng-template #elseTemplate>
<iframe width="100%" height="100%" [src]="fileUrl" frameborder="0"></iframe>
</ng-template>
</div>
<div *ngIf="selectedType == 'video'" class="vediobox">
<video controls style="width: 100%;height: 100%;" [src]="vedioUrl"></video>
@ -32,8 +37,8 @@
</ng-container>
<ng-template #elseTemplate>
<div class="btn">
<span *ngIf="!data.handleTime && isMisinformation" style="color: #FF4B65;cursor: pointer;"
(click)="misinformation()">误报</span>
<span *ngIf="!data.handleTime && isMisinformation"
style="color: #FF4B65;cursor: pointer;margin-right: 20px;" (click)="misinformation()">误报</span>
<span *ngIf="!data.handleTime" style="color: #36A2FF;cursor: pointer;" (click)="submit()">提交</span>
<span *ngIf="data.handleTime" style="color: #4BFFD4;cursor: default;">已处置</span>
</div>

45
src/app/pages/today-warning/get-out-of-line-details/get-out-of-line-details.component.ts

@ -1,6 +1,7 @@
import { HttpClient } from '@angular/common/http';
import { Component, OnInit, Input } from '@angular/core';
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
import { DomSanitizer } from '@angular/platform-browser';
import { NzMessageService } from 'ng-zorro-antd/message';
import { NzModalRef, NzModalService } from 'ng-zorro-antd/modal';
@Component({
@ -11,7 +12,7 @@ import { NzModalRef, NzModalService } from 'ng-zorro-antd/modal';
export class GetOutOfLineDetailsComponent implements OnInit {
@Input() data: any
constructor(private fb: FormBuilder, private http: HttpClient, private message: NzMessageService, private modal: NzModalService, private initialModal: NzModalRef) { }
constructor(private fb: FormBuilder, private http: HttpClient, private message: NzMessageService, private modal: NzModalService, private initialModal: NzModalRef, private sanitizer: DomSanitizer) { }
imgUrl: string
@ -21,12 +22,35 @@ export class GetOutOfLineDetailsComponent implements OnInit {
isMisinformation: boolean = false//误报按钮的显隐
isImage //传过来的文件是否是图片
fileUrl
ngOnInit(): void {
console.log(this.data)
this.details = this.data.content1
this.imgUrl = this.data.violateImage
this.vedioUrl = this.data.violateVideo
this.content = this.data.handleRecord
this.imgUrl = this.data.violateImage
if (this.getFileType(this.imgUrl) == 'img') {
this.isImage = true
} else {
this.isImage = false
if (this.getFileType(this.imgUrl) == 'word') {
let arr = this.imgUrl.split('.')
arr[arr.length - 1] = 'pdf'
this.fileUrl = this.sanitizer.bypassSecurityTrustResourceUrl(arr.join('.'));
} else if (this.getFileType(this.imgUrl) == 'pdf') {
this.fileUrl = this.sanitizer.bypassSecurityTrustResourceUrl(this.imgUrl);
}
}
let loginUserInfo
if (sessionStorage.getItem('isGasStation') == 'true') {
@ -45,6 +69,23 @@ export class GetOutOfLineDetailsComponent implements OnInit {
}
//获取文件格式
getFileType(name: string): string {
let suffix
if (name.substring(name.length - 4).includes('png') || name.substring(name.length - 4).includes('jpg') || name.substring(name.length - 4).includes('jpeg') || name.substring(name.length - 4).includes('webp')) {
suffix = 'img'
} else if (name.substring(name.length - 4).includes('doc') || name.substring(name.length - 4).includes('docx')) {
suffix = 'word'
} else if (name.substring(name.length - 4).includes('pdf')) {
suffix = 'pdf'
}
return suffix
}
selectedType: string = 'img'
contentType(type) {
this.selectedType = type

6
src/app/pages/today-warning/today-warning.component.html

@ -90,16 +90,16 @@
预警信息
</div>
<div nz-col nzSpan="4">
区域
预警区域
</div>
<div nz-col nzSpan="3">
摄像头
摄像头名称
</div>
<div nz-col nzSpan="3">
预警时间
</div>
<div nz-col nzSpan="2">
处置状态
状态
</div>
<div nz-col nzSpan="2">
操作

22
src/app/pages/warning-statistics-list/warning-statistics-list.component.ts

@ -222,17 +222,17 @@ export class WarningStatisticsListComponent implements OnInit {
}
}
],
legend: {
selectedMode: false, // 是否允许点击
data: ['预警事件'],
textStyle: {
color: '#fff'
},
right: 28,
top: 18,
itemWidth: 8,
itemHeight: 8,
},
// legend: {
// selectedMode: false, // 是否允许点击
// data: ['预警事件'],
// textStyle: {
// color: '#fff'
// },
// right: 28,
// top: 18,
// itemWidth: 8,
// itemHeight: 8,
// },
grid: {
left: '42px',
right: '30px',

2
src/app/pipes/type.pipe.ts

@ -30,7 +30,7 @@ export class licenseViolationType implements PipeTransform {
@Pipe({ name: 'handleState' })
export class handleState implements PipeTransform {
transform(value: number): string {
let arr = ['未启动', '已启动', '已关闭', '已延期']
let arr = ['未启动', '已启动', '已关闭', '已延期', '已忽略']
return arr[value]
}
}

14
src/theme.less

@ -44,6 +44,20 @@
.ant-pagination-item-active a {
background: #107495;
}
.eventInput {
.ant-select-selection-item {
background: #143c61;
color: #fff;
}
.ant-select-selection-item-remove {
color: #fff;
}
}
}
//查询重置按钮

Loading…
Cancel
Save