Browse Source

[完善]今日预警查询列表联动

beijing
邵佳豪 3 years ago
parent
commit
8e373c3de6
  1. 3
      src/app/pages/criminal-records-admin/criminal-records-admin.component.html
  2. 8
      src/app/pages/oil-station-info/oil-station-info.component.html
  3. 2
      src/app/pages/oil-station-info/oil-station-info.component.ts
  4. 26
      src/app/pages/today-warning-admin/today-warning-admin.component.html
  5. 25
      src/app/pages/today-warning-admin/today-warning-admin.component.scss
  6. 67
      src/app/pages/today-warning-admin/today-warning-admin.component.ts
  7. 34
      src/app/pages/today-warning/today-warning.component.html
  8. 28
      src/app/pages/today-warning/today-warning.component.scss
  9. 71
      src/app/pages/today-warning/today-warning.component.ts
  10. 21
      src/theme.less

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

@ -97,6 +97,7 @@
</nz-select>
</nz-form-control>
</nz-form-item>
<nz-form-item class="searchParamsZ eventInput">
<nz-form-control>
<nz-select [nzMaxTagCount]="1" nzMode="multitagsple" nzAllowClear formControlName="event"
@ -106,6 +107,7 @@
</nz-select>
</nz-form-control>
</nz-form-item>
<nz-form-item class="searchParamsS eventInput">
<nz-form-control>
<nz-select [nzMaxTagCount]="1" nzMode="multitagsple" nzAllowClear id="site" formControlName="site"
@ -119,6 +121,7 @@
</nz-select>
</nz-form-control>
</nz-form-item>
<nz-form-item class="searchParams">
<nz-form-control>
<nz-select nzAllowClear formControlName="disposalState" nzPlaceHolder="请选择处置状态">

8
src/app/pages/oil-station-info/oil-station-info.component.html

@ -303,11 +303,9 @@
</table>
<!-- 审核中遮罩层 -->
<div class="shade" *ngIf="httpBody.auditStatus == 1">
<div class="shade" *ngIf="httpBody.auditStatus == 1 || httpBody.auditStatus == 2">
审核中...
</div>
<!-- <table class="imgtable" id="images">
<tr *ngFor="let item of httpBody.licenses;let key = index">
<td class="head" [title]="item.name">{{item.name}}</td>
@ -428,8 +426,8 @@
</div>
<div class="btnbox">
<span style="color: #fff;">当前审核状态:{{httpBody.auditStatus | auditStatus}}</span>
<button [nzLoading]="isSubmitAuditLoading" nz-button type="button" *ngIf="httpBody.auditStatus != 1" (click)="submitAudit()">提交审核</button>
<button [nzLoading]="isRevocationAuditLoading" nz-button type="button" *ngIf="httpBody.auditStatus == 1" (click)="revocationAudit()">撤销审核</button>
<button [nzLoading]="isSubmitAuditLoading" nz-button type="button" *ngIf="httpBody.auditStatus != 1 && httpBody.auditStatus != 2" (click)="submitAudit()">提交审核</button>
<!-- <button [nzLoading]="isRevocationAuditLoading" nz-button type="button" *ngIf="httpBody.auditStatus == 1" (click)="revocationAudit()">撤销审核</button> -->
<button [nzLoading]="isLoadingSave" nz-button type="button" (click)="submitForm()" *ngIf="httpBody.auditStatus != 1" >保存</button>
<button (click)="exportExcel()" nz-button type="button"><img style="vertical-align: top;margin-right: 6px;"
src="../../../assets/images/excel.png" alt=""> 导出Excel</button>

2
src/app/pages/oil-station-info/oil-station-info.component.ts

@ -88,7 +88,7 @@ export class OilStationInfoComponent implements OnInit {
this.fireBrigade = data.result.govUnitDetail.fireBrigade
}
// console.log('油站信息', this.httpBody)
console.log('油站信息', this.httpBody)
}, err => {
console.log('油站错误信息', err.error.error.message)

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

@ -11,11 +11,11 @@
<form nz-form [formGroup]="validateForm" class="login-form" (ngSubmit)="submitForm()">
<nz-form-item class="searchParams">
<nz-form-control>
<nz-select id="level" 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>
@ -40,24 +40,27 @@
<nz-form-item class="searchParams">
<nz-form-control>
<nz-select nzAllowClear formControlName="type" (ngModelChange)="typeChange($event)" nzPlaceHolder="请选择预警类型">
<nz-select nzAllowClear id="type" (ngModelChange)="typeChange($event)" formControlName="type"
nzPlaceHolder="请选择预警类型">
<nz-option *ngFor="let item of warningTypes" [nzValue]="item.key" [nzLabel]="item.key"></nz-option>
</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="area" formControlName="area" nzPlaceHolder="请选择区域">
<nz-select [nzMaxTagCount]="1" nzMode="multitagsple" nzAllowClear id="area" formControlName="area"
nzPlaceHolder="请选择区域">
<nz-option nzValue="出入口" nzLabel="出入口"></nz-option>
<nz-option nzValue="加油区" nzLabel="加油区"></nz-option>
<nz-option nzValue="油罐区" nzLabel="油罐区"></nz-option>
@ -93,7 +96,8 @@
<nz-form-item class="btn">
<nz-form-control>
<button [nzLoading]="isLoading" nz-button type="submit" class="submit"><i nz-icon [nzType]="'search'"></i>查询</button>
<button [nzLoading]="isLoading" nz-button type="submit" class="submit"><i nz-icon
[nzType]="'search'"></i>查询</button>
</nz-form-control>
</nz-form-item>

25
src/app/pages/today-warning-admin/today-warning-admin.component.scss

@ -65,11 +65,20 @@
// flex: 3;
width: 150px;
}
.searchParamsLong{
.searchParamsLong {
width: 250px;
}
.btn {
// flex: 1;
.searchParamsZ {
min-width: 200px;
max-width: 250px;
margin-right: 3px;
}
.searchParamsS {
min-width: 180px;
max-width: 250px;
}
nz-select {
@ -105,6 +114,7 @@
background: linear-gradient(180deg, rgba(3, 0, 0, 0) 0%, rgba(0, 46, 91, 0.68) 100%);
box-sizing: border-box;
white-space: nowrap;
div {
font-size: 15px;
text-align: left;
@ -120,15 +130,17 @@
color: #91CCFF;
}
}
.imgbox{
span{
img{
.imgbox {
span {
img {
width: 30%;
height: 30%;
margin-left: 15px;
}
}
}
.propsm {
display: inline-block;
width: 38px;
@ -215,6 +227,7 @@
overflow-y: auto;
box-sizing: border-box;
padding: 16px 35px 16px 36px;
.listitem {
height: 40px;
line-height: 40px;

67
src/app/pages/today-warning-admin/today-warning-admin.component.ts

@ -70,24 +70,73 @@ export class TodayWarningAdminComponent implements OnInit {
}
//预警类型接口
warningTypes: any //预警接口数据
warningTypesDetailsMetadata: 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.warningTypesDetailsMetadata = JSON.parse(JSON.stringify(data.result))
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) {
// console.log(e)
if (!e) {
this.warningTypesDetails = this.warningTypesDetailsMetadata
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({
@ -126,12 +175,12 @@ export class TodayWarningAdminComponent implements OnInit {
list: any = [
]
totalCount: string //预警总数
isLoading = false
isLoading = false
getEarlyWarningList() {
this.isLoading = true
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 => {
@ -151,7 +200,7 @@ export class TodayWarningAdminComponent implements OnInit {
let params = {
Level: this.validateForm.value.level,
ViolationIds: ViolationIds,
ViolateArea: this.validateForm.value.area,
ViolateAreas: 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'],

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

@ -11,11 +11,11 @@
<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>
@ -29,9 +29,20 @@
</nz-form-control>
</nz-form-item>
<nz-form-item class="searchParams">
<nz-form-item class="searchParamsZ eventInput">
<nz-form-control>
<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="searchParamsS eventInput">
<nz-form-control>
<nz-select nzAllowClear formControlName="area" nzPlaceHolder="请选择区域">
<nz-select [nzMaxTagCount]="1" nzMode="multitagsple" nzAllowClear id="area" formControlName="area"
nzPlaceHolder="请选择区域">
<nz-option nzValue="出入口" nzLabel="出入口"></nz-option>
<nz-option nzValue="加油区" nzLabel="加油区"></nz-option>
<nz-option nzValue="油罐区" nzLabel="油罐区"></nz-option>
@ -41,6 +52,8 @@
</nz-select>
</nz-form-control>
</nz-form-item>
<nz-form-item class="searchParams">
<nz-form-control>
<nz-select nzAllowClear formControlName="disposalState" nzPlaceHolder="请选择处置状态">
@ -65,7 +78,8 @@
<nz-form-item class="btn">
<nz-form-control>
<button [nzLoading]="isLoading" nz-button type="submit" class="submit"><i nz-icon [nzType]="'search'"></i>查询</button>
<button [nzLoading]="isLoading" nz-button type="submit" class="submit"><i nz-icon
[nzType]="'search'"></i>查询</button>
</nz-form-control>
</nz-form-item>
@ -79,7 +93,7 @@
</div>
<div class="listbox" style="text-align: center;">
<div nz-row class="listitem listitem2">
<div nz-row class="listitem listitemhead">
<div nz-col nzSpan="3" class="imgbox">
预警级别
</div>
@ -87,7 +101,7 @@
预警类型
</div>
<div nz-col nzSpan="4">
预警信息
预警事件
</div>
<div nz-col nzSpan="4">
预警区域

28
src/app/pages/today-warning/today-warning.component.scss

@ -65,12 +65,20 @@
// flex: 2.9;
width: 150px;
}
.searchParamsLong{
.searchParamsLong {
width: 250px;
}
.btn {
// flex: 1;
.searchParamsZ {
min-width: 200px;
max-width: 250px;
margin-right: 3px;
}
.searchParamsS {
min-width: 180px;
max-width: 250px;
}
nz-select {
@ -117,19 +125,25 @@
color: #91CCFF;
}
}
.imgbox{
span{
img{
.imgbox {
span {
img {
width: 30%;
height: 80%;
}
}
}
}
.listitem2{
.listitemhead {
height: 40px;
line-height: 40px;
background: rgba(35, 153, 255, 0.22);
border: 1px solid rgba(35, 217, 255, 0.4);
color: #23D9FF;
}
.dispositioned {
color: #23D9FF;
}

71
src/app/pages/today-warning/today-warning.component.ts

@ -25,6 +25,7 @@ export class TodayWarningComponent implements OnInit {
this.validateForm = this.fb.group({
level: [null],
type: [null],
event: [null],
area: [null],
disposalState: [null],
datePickerStart: [new Date(`${moment(new Date()).format('YYYY-MM-DD')} 00:00`)],
@ -60,21 +61,78 @@ export class TodayWarningComponent 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,
});
}
//获得预警列表
@ -86,7 +144,10 @@ export class TodayWarningComponent implements OnInit {
getEarlyWarningList() {
this.isLoading = true
let ViolationIds = []
if (this.validateForm.value.type) {
if (this.validateForm.value.event) {
ViolationIds = this.validateForm.value.event
}
if (this.validateForm.value.type && !this.validateForm.value.event) {
this.warningTypesDetails.forEach(item => {
item.id ? ViolationIds.push(item.id) : null
});
@ -102,7 +163,7 @@ export class TodayWarningComponent implements OnInit {
let params = {
Level: this.validateForm.value.level,
ViolationIds: ViolationIds,
ViolateArea: this.validateForm.value.area,
ViolateAreas: 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,
IsHandled: disposalState,

21
src/theme.less

@ -46,16 +46,7 @@
}
.eventInput {
.ant-select-selection-item {
background: #143c61;
color: #fff;
}
.ant-select-selection-item-remove {
color: #fff;
}
}
}
@ -573,3 +564,13 @@
text-align: center;
}
}
.eventInput {
.ant-select-selection-item {
background: #143c61;
color: #fff;
}
.ant-select-selection-item-remove {
color: #fff;
}
}
Loading…
Cancel
Save