Browse Source

[完善]根据文档修改问题

dev
邵佳豪 3 years ago
parent
commit
da20e8ecee
  1. 2
      src/app/pages/criminal-records-admin/criminal-records-admin.component.html
  2. 3
      src/app/pages/criminal-records-admin/criminal-records-admin.component.scss
  3. 4
      src/app/pages/home-page/home-page.component.html
  4. 98
      src/app/pages/home-page/home-page.component.ts
  5. 59
      src/app/pages/home/home.component.ts
  6. 2
      src/app/pages/oil-unloading-process-list/oil-unloading-process-list.component.html
  7. 3
      src/app/pages/oil-unloading-process-list/oil-unloading-process-list.component.scss
  8. 35
      src/app/pages/oil-unloading-process-list/oil-unloading-process-list.component.ts
  9. 2
      src/app/pages/today-warning-admin/today-warning-admin.component.html
  10. 4
      src/app/pages/today-warning-admin/today-warning-admin.component.scss
  11. 2
      src/app/pages/today-warning/get-out-of-line-details/get-out-of-line-details.component.html
  12. 3
      src/app/pages/today-warning/today-warning.component.scss

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

@ -28,7 +28,7 @@
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
<nz-form-item class="searchParams"> <nz-form-item class="searchParams searchParamsLong">
<nz-form-control> <nz-form-control>
<nz-tree-select [nzDropdownClassName]="'maxHeightTreeSelect'" nzShowSearch [(ngModel)]="defaultOrId" <nz-tree-select [nzDropdownClassName]="'maxHeightTreeSelect'" nzShowSearch [(ngModel)]="defaultOrId"
formControlName="organization" [nzNodes]="nodes" nzPlaceHolder="请选择所属机构"> formControlName="organization" [nzNodes]="nodes" nzPlaceHolder="请选择所属机构">

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

@ -27,6 +27,9 @@
// flex: 5; // flex: 5;
width: 150px; width: 150px;
} }
.searchParamsLong{
width: 250px;
}
.searchParams2{ .searchParams2{
width: 220px; width: 220px;
} }

4
src/app/pages/home-page/home-page.component.html

@ -115,7 +115,7 @@
<span class="itemname">近30天油站排名</span> <span class="itemname">近30天油站排名</span>
<div class="box eventbox"> <div class="box eventbox">
<div class="eventboxitem" *ngFor="let item of HomeAggregatioData.stationAgg;let key = index"> <div class="eventboxitem" *ngFor="let item of HomeAggregatioData.stationAgg;let key = index">
<div class="eventname" [title]="item.name + item.companyName"> <div class="eventname" [title]="item.companyName + item.stationName">
<div class="block" [ngClass]="{'yellow': key < 3,'blue': key > 2}"> <div class="block" [ngClass]="{'yellow': key < 3,'blue': key > 2}">
<ng-container *ngIf="key != 9; else elseTemplate"> <ng-container *ngIf="key != 9; else elseTemplate">
{{'0' + (key + 1)}} {{'0' + (key + 1)}}
@ -229,7 +229,7 @@
</div> </div>
<div class="bottomitemcontent bottomitemcontent1"> <div class="bottomitemcontent bottomitemcontent1">
<div class="bottomitemchartboxspecial"> <div class="bottomitemchartboxspecial">
<span class="bartitle">近30天卸油作业总数走势</span> <span class="bartitle">近30天卸油预警走势</span>
<div class="eventechartpie" id="oilechartpie"> <div class="eventechartpie" id="oilechartpie">
</div> </div>

98
src/app/pages/home-page/home-page.component.ts

@ -651,39 +651,6 @@ export class HomePageComponent implements OnInit {
} }
areaList: any = [
{ name: '加油区', num: 92 },
{ name: '油罐区', num: 81 },
{ name: '出入口', num: 66 },
{ name: '便利店', num: 34 },
{ name: '办公区', num: 20 },
{ name: '其他区域', num: 17 }
]
eventList: any = [
{ name: '员工服务', num: 92 },
{ name: '监控设备监测', num: 81 },
{ name: '安全隐患', num: 77 },
{ name: '车流调查', num: 34 },
{ name: '员工服务', num: 92 },
{ name: '监控设备监测', num: 81 },
{ name: '安全隐患', num: 77 },
{ name: '车流调查', num: 34 },
{ name: '安全隐患', num: 77 },
{ name: '车流调查', num: 34 }
]
stationList: any = [
{ name: '北京市第十九加油站', num: 92 },
{ name: '北京市第十九加油站', num: 81 },
{ name: '北京市第十九加油站', num: 77 },
{ name: '北京市第十九加油站', num: 34 },
{ name: '北京市第十九加油站', num: 92 },
{ name: '北京市第十九加油站', num: 81 },
{ name: '北京市第十九加油站', num: 77 },
{ name: '北京市第十九加油站', num: 34 },
{ name: '北京市第十九加油站', num: 77 },
{ name: '北京市第十九加油站', num: 34 }
]
width(width: string, denominator: string) { width(width: string, denominator: string) {
let style: any = {} let style: any = {}
style.width = ((Number(width) / Number(denominator)) * 100).toFixed() + '%'; style.width = ((Number(width) / Number(denominator)) * 100).toFixed() + '%';
@ -694,43 +661,36 @@ export class HomePageComponent implements OnInit {
isOpenModel: boolean = false isOpenModel: boolean = false
look(item) { look(item) {
// console.log(item) console.log('消息item', item)
if (item.notification.data.eventSystemName == '灭火器维护' || item.notification.data.eventSystemName == '证照预警') { this.isOpenModel = true
this.message.create('warning', item.notification.data.content1); item.notification.data.id = item.notification.entityId
} else { let data = item.notification.data
this.isOpenModel = true const modal = this.modal.create({
let data = { nzContent: GetOutOfLineDetailsComponent,
violateImage: item.notification.data.violateImage, nzWrapClassName: "vertical-center-modal",
violateVideo: item.notification.data.violateVideo nzViewContainerRef: this.viewContainerRef,
} nzWidth: (document.documentElement.clientHeight < 650 || document.documentElement.clientWidth < 1400) ? 1000 : 1200,
const modal = this.modal.create({ nzBodyStyle: {
nzContent: GetOutOfLineDetailsComponent, 'border': '1px solid #6d9cc7',
nzWrapClassName: "vertical-center-modal", 'border-radius': '0px',
nzViewContainerRef: this.viewContainerRef, 'padding': '0px',
nzWidth: (document.documentElement.clientHeight < 650 || document.documentElement.clientWidth < 1400) ? 1000 : 1200, 'box-shadow': '0 0 8px 0 #fff',
nzBodyStyle: { 'background': '#000D21',
'border': '1px solid #6d9cc7', },
'border-radius': '0px', nzComponentParams: {
'padding': '0px', data: data
'box-shadow': '0 0 8px 0 #fff', },
'background': '#000D21', nzFooter: null,
}, nzOnOk: async () => {
nzComponentParams: {
data: data
},
nzFooter: null,
nzOnOk: async () => {
}
});
const instance = modal.getContentComponent();
modal.afterClose.subscribe(result => {
this.isOpenModel = false
this.rollStart()
});
this.readMess(item.notification.id)
}
}
});
const instance = modal.getContentComponent();
modal.afterClose.subscribe(result => {
this.isOpenModel = false
this.rollStart()
});
this.readMess(item.notification.id)
} }

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

@ -106,45 +106,38 @@ export class HomeComponent implements OnInit {
modalData modalData
look(item) { look(item) {
console.log('推送信息',item)
let params = { let params = {
id: item.notification.entityId id: item.notification.entityId
} }
this.http.get('/api/services/app/ViolateRecord/Get', { this.http.get('/api/services/app/ViolateRecord/Get', {
params: params params: params
}).subscribe((data: any) => { }).subscribe((data: any) => {
// console.log(data) console.log('推送信息后获取信息',data)
if (item.notification.data.properties.EventSystemName == '灭火器维护' || item.notification.data.properties.EventSystemName == '证照预警') { const modal = this.modal.create({
this.message.create('warning', data.result.content1); nzContent: GetOutOfLineDetailsComponent,
} else { nzWrapClassName: "vertical-center-modal",
const modal = this.modal.create({ nzViewContainerRef: this.viewContainerRef,
nzContent: GetOutOfLineDetailsComponent, nzWidth: (document.documentElement.clientHeight < 650 || document.documentElement.clientWidth < 1400) ? 1000 : 1200,
nzWrapClassName: "vertical-center-modal", nzBodyStyle: {
nzViewContainerRef: this.viewContainerRef, 'border': '1px solid #6d9cc7',
nzWidth: (document.documentElement.clientHeight < 650 || document.documentElement.clientWidth < 1400) ? 1000 : 1200, 'border-radius': '0px',
nzBodyStyle: { 'padding': '0px',
'border': '1px solid #6d9cc7', 'box-shadow': '0 0 8px 0 #fff',
'border-radius': '0px', 'background': '#000D21',
'padding': '0px', },
'box-shadow': '0 0 8px 0 #fff', nzComponentParams: {
'background': '#000D21', data: data.result
}, },
nzComponentParams: { nzFooter: null,
data: data.result });
}, const instance = modal.getContentComponent();
nzFooter: null, this.messageId.forEach((element) => {
nzOnOk: async () => { if (element.id == item.notification.entityId) {
this.notificationService.remove(element.messageId)
} }
}); })
const instance = modal.getContentComponent(); this.readMess(item.notification.id)
this.messageId.forEach((element) => {
if (element.id == item.notification.entityId) {
this.notificationService.remove(element.messageId)
}
})
this.readMess(item.notification.id)
}
}) })
} }

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

@ -55,7 +55,7 @@
</nz-select> </nz-select>
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
<nz-form-item class="searchParams" *ngIf="isOrShow"> <nz-form-item class="searchParams searchParamsLong" *ngIf="isOrShow">
<nz-form-control> <nz-form-control>
<nz-tree-select [nzDropdownClassName]="'maxHeightTreeSelect'" nzShowSearch <nz-tree-select [nzDropdownClassName]="'maxHeightTreeSelect'" nzShowSearch
[(ngModel)]="defaultOrId" formControlName="organization" [nzNodes]="nodes" [(ngModel)]="defaultOrId" formControlName="organization" [nzNodes]="nodes"

3
src/app/pages/oil-unloading-process-list/oil-unloading-process-list.component.scss

@ -28,6 +28,9 @@
width: 150px; width: 150px;
} }
.searchParamsLong{
width: 250px;
}
.searchParams2{ .searchParams2{
width: 220px; width: 220px;
} }

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

@ -66,7 +66,7 @@ export class OilUnloadingProcessListComponent implements OnInit {
startdate startdate
enddate enddate
isOrShow:boolean isOrShow: boolean
ngOnInit(): void { ngOnInit(): void {
//当前日期 //当前日期
let myDate: any = new Date(); let myDate: any = new Date();
@ -91,9 +91,9 @@ export class OilUnloadingProcessListComponent implements OnInit {
this.mybarChart = echarts.init(document.getElementById('barchart')); this.mybarChart = echarts.init(document.getElementById('barchart'));
this.getAllOrganization() this.getAllOrganization()
this.getAggregations() this.getAggregations()
if(this.router.url.indexOf('petrolStation') != -1){ if (this.router.url.indexOf('petrolStation') != -1) {
this.isOrShow = false this.isOrShow = false
}else{ } else {
this.isOrShow = true this.isOrShow = true
} }
} }
@ -443,6 +443,8 @@ export class OilUnloadingProcessListComponent implements OnInit {
] ]
this.oilchartpieOption.series[0].data = this.oilchartpieOptionPieData1 this.oilchartpieOption.series[0].data = this.oilchartpieOptionPieData1
this.myChart.setOption(this.oilchartpieOption); this.myChart.setOption(this.oilchartpieOption);
this.myChart.off('legendselectchanged')
this.myChart.off('click')
this.myChart.on('legendselectchanged', (params) => { this.myChart.on('legendselectchanged', (params) => {
this.myChart.setOption({ this.myChart.setOption({
legend: { selected: { [params.name]: true } } legend: { selected: { [params.name]: true } }
@ -450,12 +452,24 @@ export class OilUnloadingProcessListComponent implements OnInit {
if (params.name == '预警事件') { if (params.name == '预警事件') {
this.isgoback = true this.isgoback = true
this.refreshEchartsData2(this.echartsData) this.refreshEchartsData2(this.echartsData)
this.validateForm.patchValue({
state: '0'
});
this.list = []
this.SkipCount = '0'
this.getViolateRecordList()
} }
}); });
this.myChart.on('click', (params) => { this.myChart.on('click', (params) => {
if (params.name == '预警事件') { if (params.name == '预警事件') {
this.isgoback = true this.isgoback = true
this.refreshEchartsData2(this.echartsData) this.refreshEchartsData2(this.echartsData)
this.validateForm.patchValue({
state: '0'
});
this.list = []
this.SkipCount = '0'
this.getViolateRecordList()
} }
}); });
@ -504,12 +518,19 @@ export class OilUnloadingProcessListComponent implements OnInit {
} }
goback() { goback() {
this.isgoback = false this.isgoback = false
this.myChart.clear();
this.mybarChart.clear(); this.mybarChart.clear();
this.refreshEchartsData1(this.echartsData) this.refreshEchartsData1(this.echartsData)
this.validateForm.patchValue({
state: null
});
this.list = []
this.SkipCount = '0'
this.getViolateRecordList()
} }
defaultOrId: string defaultOrId: string
//获取所有组织机构 //获取所有组织机构
nodes: any = [] nodes: any = []
@ -531,8 +552,7 @@ export class OilUnloadingProcessListComponent implements OnInit {
}); });
this.nodes = [...this.toTree.toTree(data.result.items)] this.nodes = [...this.toTree.toTree(data.result.items)]
this.defaultOrId = JSON.parse(sessionStorage.getItem('userdata')).organization.id this.defaultOrId = JSON.parse(sessionStorage.getItem('userdata')).organization.id
this.validateForm.value.organization = this.defaultOrId this.validateForm.value.organization = JSON.parse(sessionStorage.getItem('userdata')).organization.id
this.validateForm.patchValue({ this.validateForm.patchValue({
datePicker: [this.startdate, this.enddate] datePicker: [this.startdate, this.enddate]
}); });
@ -614,7 +634,10 @@ export class OilUnloadingProcessListComponent implements OnInit {
this.validateForm.controls[key].markAsPristine(); this.validateForm.controls[key].markAsPristine();
this.validateForm.controls[key].updateValueAndValidity(); this.validateForm.controls[key].updateValueAndValidity();
} }
console.log(JSON.parse(sessionStorage.getItem('userdata')).organization.id)
// this.validateForm.value.organization = JSON.parse(sessionStorage.getItem('userdata')).organization.id
this.validateForm.patchValue({ this.validateForm.patchValue({
organization:JSON.parse(sessionStorage.getItem('userdata')).organization.id,
datePicker: [this.startdate, this.enddate] datePicker: [this.startdate, this.enddate]
}); });
this.list = [] this.list = []

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

@ -20,7 +20,7 @@
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
<nz-form-item class="searchParams"> <nz-form-item class="searchParams searchParamsLong">
<nz-form-control> <nz-form-control>
<nz-tree-select [nzDropdownClassName]="'maxHeightTreeSelect'" nzShowSearch [(ngModel)]="defaultOrId" <nz-tree-select [nzDropdownClassName]="'maxHeightTreeSelect'" nzShowSearch [(ngModel)]="defaultOrId"
formControlName="organization" [nzNodes]="nodes" nzPlaceHolder="请选择所属机构"> formControlName="organization" [nzNodes]="nodes" nzPlaceHolder="请选择所属机构">

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

@ -65,7 +65,9 @@
// flex: 3; // flex: 3;
width: 150px; width: 150px;
} }
.searchParamsLong{
width: 250px;
}
.btn { .btn {
// flex: 1; // flex: 1;
} }

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

@ -33,7 +33,7 @@
<textarea *ngIf="!data.handleTime" [(ngModel)]="content"></textarea> <textarea *ngIf="!data.handleTime" [(ngModel)]="content"></textarea>
<span *ngIf="data.handleTime">{{content}}</span> <span *ngIf="data.handleTime">{{content}}</span>
</div> </div>
<div class="disposeTime"> <div class="disposeTime" *ngIf="data.handleTime">
<span style="margin-right: 12px;"> <span style="margin-right: 12px;">
处置人:{{data.handleUsername}} 处置人:{{data.handleUsername}}
</span> </span>

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

@ -65,6 +65,9 @@
// flex: 2.9; // flex: 2.9;
width: 150px; width: 150px;
} }
.searchParamsLong{
width: 250px;
}
.btn { .btn {
// flex: 1; // flex: 1;

Loading…
Cancel
Save