刘向辉 3 years ago
parent
commit
361e41170d
  1. 4
      src/app/babylon/controller/data-manager.ts
  2. 4
      src/app/babylon/model/data/institution/building/export-data.ts
  3. 6
      src/app/babylon/model/data/institution/facility/property-data/in/property-data-jyj.ts
  4. 6
      src/app/babylon/model/data/institution/facility/property-data/in/property-data-yg.ts
  5. 3
      src/app/pages/criminal-records-admin/criminal-records-admin.component.html
  6. 10
      src/app/pages/criminal-records-admin/criminal-records-admin.component.scss
  7. 7
      src/app/pages/criminal-records-admin/criminal-records-admin.component.ts
  8. 5
      src/app/pages/criminal-records/criminal-records.component.html
  9. 10
      src/app/pages/criminal-records/criminal-records.component.scss
  10. 7
      src/app/pages/criminal-records/criminal-records.component.ts
  11. 58
      src/app/pages/home-page/home-page.component.html
  12. 36
      src/app/pages/home-page/home-page.component.scss
  13. 152
      src/app/pages/home-page/home-page.component.ts
  14. 2
      src/app/pages/home/home.component.ts
  15. 2
      src/app/pages/init3D.guard.ts
  16. 6
      src/app/pages/left-domain/left-domain.component.html
  17. 11
      src/app/pages/left-domain/left-domain.component.ts
  18. 28
      src/app/pages/oil-unloading-process-list/oil-unloading-process-list.component.html
  19. 12
      src/app/pages/oil-unloading-process-list/oil-unloading-process-list.component.scss
  20. 12
      src/app/pages/oil-unloading-process-list/oil-unloading-process-list.component.ts
  21. 21
      src/app/pages/plan-admin/plan-admin.component.ts
  22. 24
      src/app/pages/today-warning-admin/today-warning-admin.component.html
  23. 26
      src/app/pages/today-warning-admin/today-warning-admin.component.scss
  24. 8
      src/app/pages/today-warning-admin/today-warning-admin.component.ts
  25. 41
      src/app/pages/today-warning/get-out-of-line-details/get-out-of-line-details.component.html
  26. 139
      src/app/pages/today-warning/get-out-of-line-details/get-out-of-line-details.component.scss
  27. 3
      src/app/pages/today-warning/get-out-of-line-details/get-out-of-line-details.component.ts
  28. 16
      src/app/pages/today-warning/today-warning.component.html
  29. 15
      src/app/pages/today-warning/today-warning.component.scss
  30. 4
      src/app/pages/today-warning/today-warning.component.ts
  31. 10
      src/app/system-management/analysis-of-the-host/analysis-of-the-host.component.ts
  32. 45
      src/app/system-management/organization/organization.component.ts
  33. 2
      src/app/system-management/user/user.component.html
  34. 229
      src/assets/js/echarts-tooltip-carousel.js
  35. 1
      src/index.html

4
src/app/babylon/controller/data-manager.ts

@ -481,8 +481,8 @@ export class DataManager {
case FacilityType.XF_MHQ_GF_8: case FacilityType.XF_MHQ_GF_8:
case FacilityType.XF_MHQ_GF_25: case FacilityType.XF_MHQ_GF_25:
case FacilityType.XF_MHQ_GF_35: result = new PropertyData_MHQ(key, facilityType); break; case FacilityType.XF_MHQ_GF_35: result = new PropertyData_MHQ(key, facilityType); break;
case FacilityType.JY_JYJ: result = new PropertyData_JYJ(key, "", "", "", "", "",); break; case FacilityType.JY_JYJ: result = new PropertyData_JYJ(key, "", "", "", "", "", "",); break;
case FacilityType.JY_YG: result = new PropertyData_YG(key, "", "", "", "", "", ""); break; case FacilityType.JY_YG: result = new PropertyData_YG(key, "", "", "", "", "","", ""); break;
case FacilityType.JY_SYGX: result = new PropertyData_SYGX(key); break; case FacilityType.JY_SYGX: result = new PropertyData_SYGX(key); break;
case FacilityType.JY_YQHSGX: result = new PropertyData_YQHSGX(key); break; case FacilityType.JY_YQHSGX: result = new PropertyData_YQHSGX(key); break;

4
src/app/babylon/model/data/institution/building/export-data.ts

@ -66,6 +66,7 @@ export class ExportData_JYJ {
品牌: string; 品牌: string;
油枪数量: string; 油枪数量: string;
油品品号: string; 油品品号: string;
油枪编号: string;
油泵类型: string; 油泵类型: string;
流量: string; 流量: string;
功率: string; 功率: string;
@ -74,6 +75,7 @@ export class ExportData_JYJ {
this. = jyj_property.brand; this. = jyj_property.brand;
this. = jyj_property.oilGunNum; this. = jyj_property.oilGunNum;
this. = jyj_property.oilProductNo; this. = jyj_property.oilProductNo;
this. = jyj_property.oilGunNo;
this. = jyj_property.oilPumpType; this. = jyj_property.oilPumpType;
this. = jyj_property.flow; this. = jyj_property.flow;
this. = jyj_property.power; this. = jyj_property.power;
@ -88,6 +90,7 @@ export class ExportData_YG {
名称: string; 名称: string;
油品品号: string; 油品品号: string;
油枪编号: string;
油罐容积: string; 油罐容积: string;
安全容积: string; 安全容积: string;
罐区: string; 罐区: string;
@ -96,6 +99,7 @@ export class ExportData_YG {
constructor(yg_property: PropertyData_YG) { constructor(yg_property: PropertyData_YG) {
this. = yg_property.name; this. = yg_property.name;
this. = yg_property.oilProductNo; this. = yg_property.oilProductNo;
this. = yg_property.oilGunNo;
this. = yg_property.oilTankVolume; this. = yg_property.oilTankVolume;
this. = yg_property.safeVolume; this. = yg_property.safeVolume;
this. = yg_property.tankFarm; this. = yg_property.tankFarm;

6
src/app/babylon/model/data/institution/facility/property-data/in/property-data-jyj.ts

@ -11,24 +11,26 @@ export class PropertyData_JYJ extends PropertyData_Base {
superBrand: string = ""; //超大牌 superBrand: string = ""; //超大牌
oilGunNum: string = ""; //油枪数量 oilGunNum: string = ""; //油枪数量
oilProductNo: string = ""; //油品品号 oilProductNo: string = ""; //油品品号
oilGunNo: string = ""; //油枪编号
oilPumpType: string = ""; //油泵类型 oilPumpType: string = ""; //油泵类型
flow: string = ""; //流量 flow: string = ""; //流量
power: string = ""; //功率 power: string = ""; //功率
constructor(key: string, brand: string, superBrand: string, oilGunNum: string, oilProductNo: string, oilPumpType: string) { constructor(key: string, brand: string, superBrand: string, oilGunNum: string, oilProductNo: string, oilGunNo: string, oilPumpType: string) {
super(key, FacilityType.JY_JYJ); super(key, FacilityType.JY_JYJ);
this.name = "未命名"; this.name = "未命名";
this.brand = brand this.brand = brand
this.superBrand = superBrand this.superBrand = superBrand
this.oilGunNum = oilGunNum this.oilGunNum = oilGunNum
this.oilProductNo = oilProductNo this.oilProductNo = oilProductNo
this.oilGunNo = oilGunNo
this.oilPumpType = oilPumpType this.oilPumpType = oilPumpType
this.flow = "0.5kg/s" this.flow = "0.5kg/s"
this.power = "1kw" this.power = "1kw"
} }
clone(key: string) { clone(key: string) {
let result = new PropertyData_JYJ(key, this.brand, this.superBrand, this.oilGunNum, this.oilProductNo, this.oilPumpType); let result = new PropertyData_JYJ(key, this.brand, this.superBrand, this.oilGunNum, this.oilProductNo, this.oilGunNo, this.oilPumpType);
result.name = this.name; result.name = this.name;
result.flow = this.flow; result.flow = this.flow;
result.power = this.power; result.power = this.power;

6
src/app/babylon/model/data/institution/facility/property-data/in/property-data-yg.ts

@ -8,16 +8,18 @@ import { PropertyData_Base } from "../property-data-base";
export class PropertyData_YG extends PropertyData_Base { export class PropertyData_YG extends PropertyData_Base {
oilProductNo: string = ""; //油品品号 oilProductNo: string = ""; //油品品号
oilGunNo: string = ""; //油枪编号
oilTankVolume: string = ""; //油罐容积 oilTankVolume: string = ""; //油罐容积
safeVolume: string = ""; //安全容积 safeVolume: string = ""; //安全容积
quantity: string = ""; //数量 quantity: string = ""; //数量
tankFarm: string = ""; //罐区 tankFarm: string = ""; //罐区
oilTankType: string = ""; //油罐类型 oilTankType: string = ""; //油罐类型
constructor(key: string,oilProductNo: string,oilTankVolume: string,safeVolume: string,quantity: string,tankFarm: string,oilTankType: string) { constructor(key: string,oilProductNo: string,oilGunNo: string,oilTankVolume: string,safeVolume: string,quantity: string,tankFarm: string,oilTankType: string) {
super(key, FacilityType.JY_YG); super(key, FacilityType.JY_YG);
this.name = "未命名"; this.name = "未命名";
this.oilProductNo = oilProductNo this.oilProductNo = oilProductNo
this.oilGunNo = oilGunNo
this.oilTankVolume = oilTankVolume this.oilTankVolume = oilTankVolume
this.safeVolume = safeVolume this.safeVolume = safeVolume
this.quantity = quantity this.quantity = quantity
@ -26,7 +28,7 @@ export class PropertyData_YG extends PropertyData_Base {
} }
clone(key: string) { clone(key: string) {
let result = new PropertyData_YG(key,this.oilProductNo,this.oilTankVolume,this.safeVolume,this.quantity,this.tankFarm,this.oilTankType); let result = new PropertyData_YG(key,this.oilProductNo,this.oilGunNo,this.oilTankVolume,this.safeVolume,this.quantity,this.tankFarm,this.oilTankType);
result.name = this.name; result.name = this.name;
return result; return result;
} }

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

@ -71,7 +71,7 @@
</nz-select> </nz-select>
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
<nz-form-item class="searchParams"> <nz-form-item class="searchParams searchParams2">
<nz-form-control> <nz-form-control>
<nz-range-picker formControlName="datePicker"></nz-range-picker> <nz-range-picker formControlName="datePicker"></nz-range-picker>
<br /> <br />
@ -228,6 +228,7 @@
<span *ngIf="item.handleTime" style="color: rgba(145, 204, 255, 0.24);;">处置</span> --> <span *ngIf="item.handleTime" style="color: rgba(145, 204, 255, 0.24);;">处置</span> -->
</div> </div>
</div> </div>
<!-- <nz-spin style="text-align: center;margin-top: 12px;" nzSimple *ngIf="isSpin"></nz-spin> -->
</div> </div>
</div> </div>
<!-- <div class="pagination"> <!-- <div class="pagination">

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

@ -16,7 +16,7 @@
width: 100%; width: 100%;
height: 32px; height: 32px;
display: flex; display: flex;
justify-content: space-around; justify-content: flex-start;
.searchParams, .searchParams,
.btn { .btn {
@ -24,11 +24,15 @@
} }
.searchParams { .searchParams {
flex: 5; // flex: 5;
width: 150px;
}
.searchParams2{
width: 220px;
} }
.btn { .btn {
flex: 1; // flex: 1;
} }
nz-select { nz-select {

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

@ -108,7 +108,7 @@ export class CriminalRecordsAdminComponent implements OnInit {
} }
}, },
tooltip: { tooltip: {
trigger: 'axis' // trigger: 'axis'
}, },
series: [ series: [
{ {
@ -163,7 +163,7 @@ export class CriminalRecordsAdminComponent implements OnInit {
show: false show: false
}, },
tooltip: { tooltip: {
trigger: 'axis' // trigger: 'axis'
}, },
yAxis: { yAxis: {
type: 'category', type: 'category',
@ -434,6 +434,7 @@ export class CriminalRecordsAdminComponent implements OnInit {
MaxResultCount: string = '50' MaxResultCount: string = '50'
list: any = [] list: any = []
totalCount: string totalCount: string
isSpin: boolean = false
getViolateRecordList() { getViolateRecordList() {
let ViolationIds = [] let ViolationIds = []
if (this.validateForm.value.event) { if (this.validateForm.value.event) {
@ -463,6 +464,7 @@ export class CriminalRecordsAdminComponent implements OnInit {
SkipCount: this.SkipCount, SkipCount: this.SkipCount,
MaxResultCount: this.MaxResultCount MaxResultCount: this.MaxResultCount
} }
this.isSpin = true
this.http.get('/api/services/app/ViolateRecord/GetAll', { this.http.get('/api/services/app/ViolateRecord/GetAll', {
params: params params: params
}).subscribe((data: any) => { }).subscribe((data: any) => {
@ -471,6 +473,7 @@ export class CriminalRecordsAdminComponent implements OnInit {
// this.list = data.result.items // this.list = data.result.items
this.totalCount = data.result.totalCount this.totalCount = data.result.totalCount
console.log('违规记录列表', data) console.log('违规记录列表', data)
this.isSpin = false
this.getAggregations() this.getAggregations()
console.log(this.list.length) console.log(this.list.length)
}) })

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

@ -62,7 +62,7 @@
</nz-select> </nz-select>
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
<nz-form-item class="searchParams"> <nz-form-item class="searchParams searchParams2">
<nz-form-control> <nz-form-control>
<nz-range-picker formControlName="datePicker"></nz-range-picker> <nz-range-picker formControlName="datePicker"></nz-range-picker>
<br /> <br />
@ -175,7 +175,7 @@
{{item.violation.eventSystemName}} {{item.violation.eventSystemName}}
</div> </div>
<div nz-col nzSpan="3"> <div nz-col nzSpan="3">
{{item.violation.violationName}} {{item.gasStation.locationName}}
</div> </div>
<div nz-col nzSpan="3"> <div nz-col nzSpan="3">
{{item.violateArea}} {{item.violateArea}}
@ -196,6 +196,7 @@
<span *ngIf="item.handleTime" style="color: rgba(145, 204, 255, 0.24);;">处置</span> --> <span *ngIf="item.handleTime" style="color: rgba(145, 204, 255, 0.24);;">处置</span> -->
</div> </div>
</div> </div>
<!-- <nz-spin style="text-align: center;margin-top: 12px;" nzSimple *ngIf="isSpin"></nz-spin> -->
</div> </div>
</div> </div>
<!-- <div class="pagination"> <!-- <div class="pagination">

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

@ -16,16 +16,20 @@
width: 100%; width: 100%;
height: 32px; height: 32px;
display: flex; display: flex;
justify-content: space-around; justify-content: flex-start;
.searchParams,.btn{ .searchParams,.btn{
margin: 0 3px; margin: 0 3px;
} }
.searchParams { .searchParams {
flex: 3.8; // flex: 5;
width: 150px;
}
.searchParams2{
width: 220px;
} }
.btn { .btn {
flex: 1; // flex: 1;
} }
nz-select { nz-select {

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

@ -104,7 +104,7 @@ export class CriminalRecordsComponent implements OnInit {
} }
}, },
tooltip: { tooltip: {
trigger: 'axis' // trigger: 'axis'
}, },
series: [ series: [
{ {
@ -159,7 +159,7 @@ export class CriminalRecordsComponent implements OnInit {
show: false show: false
}, },
tooltip: { tooltip: {
trigger: 'axis' // trigger: 'axis'
}, },
yAxis: { yAxis: {
type: 'category', type: 'category',
@ -414,6 +414,7 @@ export class CriminalRecordsComponent implements OnInit {
MaxResultCount: string = '50' MaxResultCount: string = '50'
list: any = [] list: any = []
totalCount: string totalCount: string
isSpin: boolean = false
getViolateRecordList() { getViolateRecordList() {
let ViolationIds = [] let ViolationIds = []
if (this.validateForm.value.event) { if (this.validateForm.value.event) {
@ -443,6 +444,7 @@ export class CriminalRecordsComponent implements OnInit {
SkipCount: this.SkipCount, SkipCount: this.SkipCount,
MaxResultCount: this.MaxResultCount MaxResultCount: this.MaxResultCount
} }
this.isSpin = true
this.http.get('/api/services/app/ViolateRecord/GetAll', { this.http.get('/api/services/app/ViolateRecord/GetAll', {
params: params params: params
}).subscribe((data: any) => { }).subscribe((data: any) => {
@ -451,6 +453,7 @@ export class CriminalRecordsComponent implements OnInit {
// this.list = data.result.items // this.list = data.result.items
this.totalCount = data.result.totalCount this.totalCount = data.result.totalCount
console.log('违规记录列表', data) console.log('违规记录列表', data)
this.isSpin = false
this.getAggregations() this.getAggregations()
}) })
} }

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

@ -40,12 +40,12 @@
<div class="leftitem leftitemlimit"> <div class="leftitem leftitemlimit">
<div class="warningnum"> <div class="warningnum">
<h1>{{HomeAggregatioData.recordCount}}</h1> <h1>{{HomeAggregatioData.recordCount}}</h1>
<span>预警总数</span> <span>累计预警</span>
</div> </div>
<img class="bucket" src="../../../assets/images/bucket.png" alt=""> <img class="bucket" src="../../../assets/images/bucket.png" alt="">
<img class="circle" src="../../../assets/images/circle.png" alt=""> <img class="circle" src="../../../assets/images/circle.png" alt="">
</div> </div>
<div class="leftitem" *ngIf="!userdata.organization.parentId"> <!-- <div class="leftitem" *ngIf="!userdata.organization.parentId">
<span class="itemname">公司排名</span> <span class="itemname">公司排名</span>
<div class="box areabox"> <div class="box areabox">
<div class="areaboxitem" *ngFor="let item of HomeAggregatioData.compayAgg;let key = index"> <div class="areaboxitem" *ngFor="let item of HomeAggregatioData.compayAgg;let key = index">
@ -65,7 +65,8 @@
</span> </span>
</div> </div>
<div class="progress"> <div class="progress">
<div class="colorbar" [ngStyle]="width(item.count,HomeAggregatioData.compayAgg[0].count)" <div class="colorbar"
[ngStyle]="width(item.count,HomeAggregatioData.compayAgg[0].count)"
[ngClass]="{'red': key < 2,'yellow': key > 1 && key <4,'blue': key > 3 && key <10 }"> [ngClass]="{'red': key < 2,'yellow': key > 1 && key <4,'blue': key > 3 && key <10 }">
</div> </div>
</div> </div>
@ -75,13 +76,13 @@
<div class="angle-border right-top-border"></div> <div class="angle-border right-top-border"></div>
<div class="angle-border left-bottom-border"></div> <div class="angle-border left-bottom-border"></div>
<div class="angle-border right-bottom-border"></div> <div class="angle-border right-bottom-border"></div>
</div> </div> -->
<div class="leftitem"> <div class="leftitem">
<span class="itemname">事件排名</span> <span class="itemname">近30天事件排名</span>
<div class="box eventbox"> <div class="box eventbox">
<div class="eventboxitem" <div class="eventboxitem"
*ngFor="let item of HomeAggregatioData.violationNameAgg;let key = index"> *ngFor="let item of HomeAggregatioData.violationNameAgg;let key = index">
<div class="eventname" [title]="item.key"> <div class="eventname" [title]="item.eventSystemName">
<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)}}
@ -90,7 +91,7 @@
{{key + 1}} {{key + 1}}
</ng-template> </ng-template>
</div> </div>
{{item.key}} {{item.eventSystemName}}
</div> </div>
<div class="progressbox"> <div class="progressbox">
<div class="progress"> <div class="progress">
@ -111,10 +112,9 @@
<div class="angle-border right-bottom-border"></div> <div class="angle-border right-bottom-border"></div>
</div> </div>
<div class="leftitem"> <div class="leftitem">
<span class="itemname">油站排名</span> <span class="itemname">近30天油站排名</span>
<div class="box eventbox"> <div class="box eventbox">
<div class="eventboxitem" <div class="eventboxitem" *ngFor="let item of HomeAggregatioData.stationAgg;let key = index">
*ngFor="let item of HomeAggregatioData.stationAgg;let key = index">
<div class="eventname" [title]="item.name + item.companyName"> <div class="eventname" [title]="item.name + item.companyName">
<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">
@ -124,7 +124,7 @@
{{key + 1}} {{key + 1}}
</ng-template> </ng-template>
</div> </div>
{{item.name}} {{item.companyName}} {{item.companyName}} {{item.stationName}}
</div> </div>
<div class="progressbox"> <div class="progressbox">
<div class="progress"> <div class="progress">
@ -168,7 +168,7 @@
</div> </div>
<div class="rightbox"> <div class="rightbox">
<div class="title" style="margin-left: -18px;"> <div class="title" style="margin-left: -18px;">
<app-title [name]="'设备统计'"></app-title> <app-title [name]="'AI接入统计'"></app-title>
</div> </div>
<div class="rightboxcontent"> <div class="rightboxcontent">
<div class="rightitem"> <div class="rightitem">
@ -204,11 +204,11 @@
<div class="bottombox"> <div class="bottombox">
<div class="bottomitem"> <div class="bottomitem">
<div class="title" style="padding-left: 20px;"> <div class="title" style="padding-left: 20px;">
<app-title [name]="'预警事件'"></app-title> <app-title [name]="'预警走势'"></app-title>
</div> </div>
<div class="bottomitemcontent bottomitemcontent1"> <div class="bottomitemcontent bottomitemcontent1">
<div class="bottomitemchartboxspecial"> <div class="bottomitemchartboxspecial">
<span class="bartitle">预警事件统计</span> <span class="bartitle">近30天预警事件统计</span>
<div class="eventechartpie" id="eventechartpie"> <div class="eventechartpie" id="eventechartpie">
@ -243,20 +243,30 @@
<div class="oilNum"> <div class="oilNum">
<div class="oilNumItem"> <div class="oilNumItem">
<div class="point"></div> <div class="pointbox">
<span>卸油正常</span> <div class="point"></div>
{{HomeAggregatioData.ouViolationType.ouCorrectCount}} <span>累计卸油总车次</span>
</div>
{{HomeAggregatioData.ouViolationType.ouTotalCount}}
</div> </div>
<!-- <div class="oilNumItem">
<div class="pointbox">
<div class="point"></div>
<span>累计卸油正常车次</span>
</div>
{{HomeAggregatioData.ouViolationType.ouCorrectCount}}
</div> -->
<div class="oilNumItem"> <div class="oilNumItem">
<div class="point"></div> <div class="pointbox">
<span>卸油违规</span> <div class="point"></div>
<span>累计卸油预警车次</span>
</div>
{{HomeAggregatioData.ouViolationType.ouNotCorrectCount}} {{HomeAggregatioData.ouViolationType.ouNotCorrectCount}}
</div> </div>
<div class="oilNumItem">
<div class="point"></div>
<span>卸油总数</span>
{{HomeAggregatioData.ouViolationType.ouTotalCount}}
</div>
</div> </div>
</div> </div>
</div> </div>

36
src/app/pages/home-page/home-page.component.scss

@ -569,29 +569,35 @@
width: 76%; width: 76%;
// border: 1px solid red; // border: 1px solid red;
} }
.oilNum{
.oilNum {
position: absolute; position: absolute;
left: 1%; left: 4%;
bottom: 20px; bottom: 22px;
display: flex; display: flex;
flex-wrap: wrap; flex-direction: column;
.oilNumItem{
margin-right: 6px; .oilNumItem {
}
div{
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between;
color: white; color: white;
font-size: 12px; font-size: 14px;
span{ span {
margin:0 4px; margin: 0 4px;
} }
.point{
.pointbox {
display: flex;
align-items: center;
}
.point {
width: 6px; width: 6px;
height: 6px; height: 6px;
background-color: #91CCFF; background-color: #91CCFF;
} }
} }
} }
@ -648,7 +654,7 @@
// 适配125% // 适配125%
@media screen and (max-height: 750px) { @media screen and (max-height: 900px) {
.informbox { .informbox {
width: 100%; width: 100%;
height: 38px; height: 38px;

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

@ -6,6 +6,8 @@ import * as moment from 'moment';
import { NzModalService } from 'ng-zorro-antd/modal'; import { NzModalService } from 'ng-zorro-antd/modal';
import { GetOutOfLineDetailsComponent } from '../today-warning/get-out-of-line-details/get-out-of-line-details.component'; import { GetOutOfLineDetailsComponent } from '../today-warning/get-out-of-line-details/get-out-of-line-details.component';
import { NzMessageService } from 'ng-zorro-antd/message'; import { NzMessageService } from 'ng-zorro-antd/message';
declare var tools
@Component({ @Component({
selector: 'app-home-page', selector: 'app-home-page',
templateUrl: './home-page.component.html', templateUrl: './home-page.component.html',
@ -23,7 +25,7 @@ export class HomePageComponent implements OnInit {
}, },
legend: { legend: {
top: '5%', top: '5%',
left: '20%', left: '25.5%',
itemGap: 8, itemGap: 8,
itemWidth: 6, itemWidth: 6,
itemHeight: 6, itemHeight: 6,
@ -128,48 +130,11 @@ export class HomePageComponent implements OnInit {
} }
}, },
tooltip: { tooltip: {
trigger: 'axis'//触发类型 // trigger: 'axis'//触发类型
}, },
// series: [
// {
// data: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 15, 14, 13, 12, 11, 10, 8, 7, 6, 3, 2, 1],
// type: 'line',
// smooth: true,
// showSymbol: false,
// label: {
// show: true,
// position: 'top'
// },
// lineStyle: {
// color: '#46DFFF',
// width: 1
// },
// areaStyle: {
// opacity: 0.8,
// color: {
// type: 'linear',
// x: 0,
// y: 0,
// x2: 0,
// y2: 1,
// colorStops: [
// {
// offset: 0, color: '#46DFFF' // 0% 处的颜色
// },
// {
// offset: 0.3, color: '#46DFFF' // 0% 处的颜色
// },
// {
// offset: 1, color: 'rgba(0, 13, 33, 0)' // 100% 处的颜色
// }],
// global: false // 缺省为 false
// }
// },
// }
// ],
series: [ series: [
{ {
data: [], data: [4000, 3000, 4000, 4000, 4000, 4000, 3000, 4000, 4000, 4000, 4000, 3000, 4000, 4000, 4000, 4000, 3000, 4000, 4000, 4000, 4000, 3000, 4000, 4000, 4000, 4000, 3000, 4000, 4000, 4000,],
type: 'bar', type: 'bar',
itemStyle: { itemStyle: {
color: { color: {
@ -189,12 +154,26 @@ export class HomePageComponent implements OnInit {
barWidth: '35%' barWidth: '35%'
}, },
{ {
data: [], data: [4000, 3000, 4000, 4000, 4000, 4000, 3000, 4000, 4000, 4000, 4000, 3000, 4000, 4000, 4000, 4000, 3000, 4000, 4000, 4000, 4000, 3000, 4000, 4000, 4000, 4000, 3000, 4000, 4000, 4000,],
type: 'line', type: 'line',
symbol: 'circle', symbol: 'circle',
symbolSize: 5, symbolSize: 5,
label: { label: {
show: true normal: {
show: true,
formatter: function (dataObj) {
const { dataIndex, value } = dataObj;
let labelText = value;
labelText = '';
if (dataIndex % 1 === 0) { // 每隔三个x坐标显示一个
labelText = value;
}
return `${labelText}`
}
}
}, },
itemStyle: { itemStyle: {
color: '#fff', color: '#fff',
@ -208,7 +187,7 @@ export class HomePageComponent implements OnInit {
} }
], ],
grid: { grid: {
left: '18px', left: '40px',
right: '30px', right: '30px',
bottom: '38px', bottom: '38px',
top: '30px' top: '30px'
@ -222,7 +201,7 @@ export class HomePageComponent implements OnInit {
}, },
legend: { legend: {
top: '5%', top: '5%',
left: '20%', left: '25%',
itemGap: 8, itemGap: 8,
itemWidth: 6, itemWidth: 6,
itemHeight: 6, itemHeight: 6,
@ -242,7 +221,7 @@ export class HomePageComponent implements OnInit {
{ {
type: 'pie', type: 'pie',
radius: ['50%', '60%'], radius: ['50%', '60%'],
bottom: '-5%', bottom: '8%',
right: '77%', right: '77%',
avoidLabelOverlap: false,//防止标签重叠策略 avoidLabelOverlap: false,//防止标签重叠策略
label: { label: {
@ -261,7 +240,7 @@ export class HomePageComponent implements OnInit {
active: { active: {
fontSize: document.documentElement.clientHeight < 750 ? 12 : 14, fontSize: document.documentElement.clientHeight < 750 ? 12 : 14,
color: '#fff', color: '#fff',
fontFamily: 'Microsoft YaHei', // fontFamily: 'Microsoft YaHei',
}, },
} }
}, },
@ -298,7 +277,7 @@ export class HomePageComponent implements OnInit {
axisTick: {//刻度线 axisTick: {//刻度线
show: false show: false
}, },
inverse: true // inverse: true
}, },
yAxis: { yAxis: {
@ -323,7 +302,7 @@ export class HomePageComponent implements OnInit {
} }
}, },
tooltip: { tooltip: {
trigger: 'axis' // // trigger: 'axis'
}, },
series: [ series: [
{ {
@ -354,7 +333,20 @@ export class HomePageComponent implements OnInit {
symbol: 'circle', symbol: 'circle',
symbolSize: 8, symbolSize: 8,
label: { label: {
show: true normal: {
show: true,
formatter: function (dataObj) {
const { dataIndex, value } = dataObj;
let labelText = value;
labelText = '';
if (dataIndex % 1 === 0) { // 每隔三个x坐标显示一个
labelText = value;
}
return `${labelText}`
}
}
}, },
itemStyle: { itemStyle: {
color: '#fff', color: '#fff',
@ -378,7 +370,7 @@ export class HomePageComponent implements OnInit {
// itemHeight: 8, // itemHeight: 8,
// }, // },
grid: { grid: {
left: '36px', left: '40px',
right: '30px', right: '30px',
bottom: '38px', bottom: '38px',
top: '66px' top: '66px'
@ -424,6 +416,10 @@ export class HomePageComponent implements OnInit {
// this.getAggregations() // this.getAggregations()
setTimeout(() => {
this.getHomeAggregation()
}, 10 * 6000);
} }
//获得所有未读消息 //获得所有未读消息
@ -499,6 +495,8 @@ export class HomePageComponent implements OnInit {
} }
//预警图表 //预警图表
equipmentechartdata equipmentechartdata
tools1
tools2
eventEcharts(data) { eventEcharts(data) {
data.violationType.violationTypeAgg.forEach(element => { data.violationType.violationTypeAgg.forEach(element => {
// num += element.count // num += element.count
@ -506,9 +504,16 @@ export class HomePageComponent implements OnInit {
element.value = element.count element.value = element.count
}); });
this.warningechartpieOption.series[0].data = data.violationType.violationTypeAgg; this.warningechartpieOption.series[0].data = data.violationType.violationTypeAgg;
this.warningechartpieOption.series[0].label.normal.formatter = '{total|' + data.recordCount + '}' + '\n\r' + '{active|总数}' this.warningechartpieOption.series[0].label.normal.formatter = '{total|' + data.recordCount + '}' + '\n\r' + '{active|预警事件}'
this.warningechartpie.setOption(this.warningechartpieOption); this.warningechartpie.setOption(this.warningechartpieOption);
// 可调用clearLoop方法,清除定时器
this.tools1 && this.tools1.clearLoop();
this.tools1 = null;
this.tools1 = tools.loopShowTooltip(this.warningechartpie, this.warningechartpieOption, {
interval: 5000,
loopSeries: true
});
let monthArr = [] let monthArr = []
let valuedata = [] let valuedata = []
@ -519,6 +524,23 @@ export class HomePageComponent implements OnInit {
this.warningechartbarOption.xAxis.data = monthArr this.warningechartbarOption.xAxis.data = monthArr
this.warningechartbarOption.series[0].data = valuedata this.warningechartbarOption.series[0].data = valuedata
this.warningechartbarOption.series[1].data = valuedata this.warningechartbarOption.series[1].data = valuedata
let xxx = valuedata.find(function (value, index, arr) {
return value > 1000;
})
if (xxx) {
// console.log('xxxxxxxxxx')
this.warningechartbarOption.series[1].label.normal.formatter = function (dataObj) {
const { dataIndex, value } = dataObj;
let labelText = value;
labelText = '';
if (dataIndex % 2 === 0) { // 每隔三个x坐标显示一个
labelText = value;
}
return `${labelText}`
}
}
this.warningechartbar.setOption(this.warningechartbarOption); this.warningechartbar.setOption(this.warningechartbarOption);
@ -535,10 +557,17 @@ export class HomePageComponent implements OnInit {
element.value = element.count element.value = element.count
}); });
this.oilchartpieOptionPieData1 = data.ouViolationType.ouViolationTypeAgg this.oilchartpieOptionPieData1 = data.ouViolationType.ouViolationTypeAgg
this.oilchartpieOption.series[0].label.normal.formatter = '{total|' + data.ouRecordCount + '}' + '\n\r' + '{active|总数}' this.oilchartpieOption.series[0].label.normal.formatter = '{total|' + data.ouRecordCount + '}' + '\n\r' + '{active|卸油预警}'
this.oilchartpieOption.series[0].data = this.oilchartpieOptionPieData1 this.oilchartpieOption.series[0].data = this.oilchartpieOptionPieData1
this.oilchartpie.setOption(this.oilchartpieOption); this.oilchartpie.setOption(this.oilchartpieOption);
// 可调用clearLoop方法,清除定时器
this.tools2 && this.tools2.clearLoop();
this.tools2 = null;
this.tools2 = tools.loopShowTooltip(this.oilchartpie, this.oilchartpieOption, {
interval: 5000,
loopSeries: true
});
//柱状图 //柱状图
let monthArr = [] let monthArr = []
let valuedata = [] let valuedata = []
@ -549,6 +578,23 @@ export class HomePageComponent implements OnInit {
this.oilchartbarOption.xAxis.data = monthArr this.oilchartbarOption.xAxis.data = monthArr
this.oilchartbarOption.series[0].data = valuedata this.oilchartbarOption.series[0].data = valuedata
this.oilchartbarOption.series[1].data = valuedata this.oilchartbarOption.series[1].data = valuedata
let xxx = valuedata.find(function (value, index, arr) {
return value > 1000;
})
if (xxx) {
// console.log('xxxxxxxxxx')
this.warningechartbarOption.series[1].label.normal.formatter = function (dataObj) {
const { dataIndex, value } = dataObj;
let labelText = value;
labelText = '';
if (dataIndex % 2 === 0) { // 每隔三个x坐标显示一个
labelText = value;
}
return `${labelText}`
}
}
this.oilchartbar.setOption(this.oilchartbarOption); this.oilchartbar.setOption(this.oilchartbarOption);
} }
//获取统计信息 //获取统计信息
@ -650,7 +696,7 @@ export class HomePageComponent implements OnInit {
look(item) { look(item) {
// console.log(item) // console.log(item)
if (item.notification.data.eventSystemName == '灭火器维护' || item.notification.data.eventSystemName == '证照预警') { if (item.notification.data.eventSystemName == '灭火器维护' || item.notification.data.eventSystemName == '证照预警') {
this.message.create('warning', item.notification.data.desc); this.message.create('warning', item.notification.data.content1);
} else { } else {
this.isOpenModel = true this.isOpenModel = true
let data = { let data = {

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

@ -114,7 +114,7 @@ export class HomeComponent implements OnInit {
}).subscribe((data: any) => { }).subscribe((data: any) => {
// console.log(data) // console.log(data)
if (item.notification.data.properties.EventSystemName == '灭火器维护' || item.notification.data.properties.EventSystemName == '证照预警') { if (item.notification.data.properties.EventSystemName == '灭火器维护' || item.notification.data.properties.EventSystemName == '证照预警') {
this.message.create('warning', data.result.desc); this.message.create('warning', data.result.content1);
} else { } else {
const modal = this.modal.create({ const modal = this.modal.create({
nzContent: GetOutOfLineDetailsComponent, nzContent: GetOutOfLineDetailsComponent,

2
src/app/pages/init3D.guard.ts

@ -25,7 +25,7 @@ export class init3DGuard implements CanActivate {
if (userdata.userName == 'superadmin' || res.hasBuildingInfo) { if (userdata.userName == 'superadmin' || res.hasBuildingInfo) {
return true return true
} else { } else {
this.message.info("当前站点没有数字油站!"); this.message.info("当前油站未开通!");
return false return false
} }
}); });

6
src/app/pages/left-domain/left-domain.component.html

@ -7,7 +7,7 @@
<p class="title">{{baseInfo.stationName || '暂无数据'}}<button class="titleBotton"><label *ngIf="baseInfo.stationType == 0">自营</label><label *ngIf="baseInfo.stationType == 1">加盟</label><label *ngIf="baseInfo.stationType == 2">其他</label></button></p> <p class="title">{{baseInfo.stationName || '暂无数据'}}<button class="titleBotton"><label *ngIf="baseInfo.stationType == 0">自营</label><label *ngIf="baseInfo.stationType == 1">加盟</label><label *ngIf="baseInfo.stationType == 2">其他</label></button></p>
<p class="text"><img src="../../../assets/images/baseInfo/position.png" class="textIcon">{{baseInfo.address || '暂无数据'}}</p> <p class="text"><img src="../../../assets/images/baseInfo/position.png" class="textIcon">{{baseInfo.address || '暂无数据'}}</p>
<p class="text"><img src="../../../assets/images/baseInfo/building.png" class="textIcon">{{baseInfo.locationName || '暂无数据'}}</p> <p class="text"><img src="../../../assets/images/baseInfo/building.png" class="textIcon">{{baseInfo.locationName || '暂无数据'}}</p>
<p class="text"><img src="../../../assets/images/baseInfo/date.png" class="textIcon">{{baseInfo.openTime | date:"yyyy/MM/dd HH:mm:ss" || '0:00:00'}} 开业</p> <p class="text"><img src="../../../assets/images/baseInfo/date.png" class="textIcon">{{baseInfo.openTime | date:"yyyy/MM/dd" || ''}} 开业</p>
<p class="text"><img src="../../../assets/images/baseInfo/road.png" class="textIcon">{{baseInfo.laneCount || '0'}} 车道</p> <p class="text"><img src="../../../assets/images/baseInfo/road.png" class="textIcon">{{baseInfo.laneCount || '0'}} 车道</p>
<p class="text">所属公司: {{baseInfo.companyName || '暂无数据'}}</p> <p class="text">所属公司: {{baseInfo.companyName || '暂无数据'}}</p>
<p class="text">联系人: {{baseInfo.leaderName || '暂无数据'}}</p> <p class="text">联系人: {{baseInfo.leaderName || '暂无数据'}}</p>
@ -67,12 +67,14 @@
<p>品牌</p> <p>品牌</p>
<p>油枪数量</p> <p>油枪数量</p>
<p>油品品号</p> <p>油品品号</p>
<p>油枪编号</p>
<p>油泵类型</p> <p>油泵类型</p>
</div> </div>
<div class="tableContent"> <div class="tableContent">
<p><input type="text" class="tableInput" [disabled]="!editMode" [(ngModel)]="item.getPropertyData().brand" (click)="stopBubbling($event)"></p> <p><input type="text" class="tableInput" [disabled]="!editMode" [(ngModel)]="item.getPropertyData().brand" (click)="stopBubbling($event)"></p>
<p><input type="text" class="tableInput" [disabled]="!editMode" [(ngModel)]="item.getPropertyData().oilGunNum" (click)="stopBubbling($event)"></p> <p><input type="text" class="tableInput" [disabled]="!editMode" [(ngModel)]="item.getPropertyData().oilGunNum" (click)="stopBubbling($event)"></p>
<p><input type="text" class="tableInput" [disabled]="!editMode" [(ngModel)]="item.getPropertyData().oilProductNo" (click)="stopBubbling($event)"></p> <p><input type="text" class="tableInput" [disabled]="!editMode" [(ngModel)]="item.getPropertyData().oilProductNo" (click)="stopBubbling($event)"></p>
<p><input type="text" class="tableInput" [disabled]="!editMode" [(ngModel)]="item.getPropertyData().oilGunNo" (click)="stopBubbling($event)"></p>
<p style="padding-left: 8px;" (click)="stopBubbling($event)"> <p style="padding-left: 8px;" (click)="stopBubbling($event)">
<nz-select class="tableSelect" [nzBorderless]="true" [nzDisabled]="!editMode" [(ngModel)]="item.getPropertyData().oilPumpType"> <nz-select class="tableSelect" [nzBorderless]="true" [nzDisabled]="!editMode" [(ngModel)]="item.getPropertyData().oilPumpType">
<nz-option nzValue="zxb" nzLabel="自吸泵"></nz-option> <nz-option nzValue="zxb" nzLabel="自吸泵"></nz-option>
@ -91,6 +93,7 @@
<div class="table"> <div class="table">
<div class="tableHeader"> <div class="tableHeader">
<p>油品品号</p> <p>油品品号</p>
<p>油枪编号</p>
<p>油罐容积</p> <p>油罐容积</p>
<p>安全容积</p> <p>安全容积</p>
<p>罐区</p> <p>罐区</p>
@ -98,6 +101,7 @@
</div> </div>
<div class="tableContent"> <div class="tableContent">
<p><input type="text" class="tableInput" [disabled]="!editMode" [(ngModel)]="item.getPropertyData().oilProductNo" (click)="stopBubbling($event)"></p> <p><input type="text" class="tableInput" [disabled]="!editMode" [(ngModel)]="item.getPropertyData().oilProductNo" (click)="stopBubbling($event)"></p>
<p><input type="text" class="tableInput" [disabled]="!editMode" [(ngModel)]="item.getPropertyData().oilGunNo" (click)="stopBubbling($event)"></p>
<p><input type="text" class="tableInput" [disabled]="!editMode" [(ngModel)]="item.getPropertyData().oilTankVolume" (click)="stopBubbling($event)"></p> <p><input type="text" class="tableInput" [disabled]="!editMode" [(ngModel)]="item.getPropertyData().oilTankVolume" (click)="stopBubbling($event)"></p>
<p><input type="text" class="tableInput" [disabled]="!editMode" [(ngModel)]="item.getPropertyData().safeVolume" (click)="stopBubbling($event)"></p> <p><input type="text" class="tableInput" [disabled]="!editMode" [(ngModel)]="item.getPropertyData().safeVolume" (click)="stopBubbling($event)"></p>
<p><input type="text" class="tableInput" [disabled]="!editMode" [(ngModel)]="item.getPropertyData().tankFarm" (click)="stopBubbling($event)"></p> <p><input type="text" class="tableInput" [disabled]="!editMode" [(ngModel)]="item.getPropertyData().tankFarm" (click)="stopBubbling($event)"></p>

11
src/app/pages/left-domain/left-domain.component.ts

@ -396,8 +396,15 @@ export class LeftDomainComponent implements OnInit {
//关闭 编辑信息/导出Excel 弹窗 //关闭 编辑信息/导出Excel 弹窗
closeBaseInfoDialog() { closeBaseInfoDialog() {
sessionStorage.setItem('userdata', this.originalData) PlanComponent.instance.isShowLoading = true
this.isShowBaseDialog = false let params = { organizationUnitId: PlanComponent.instance.companyData.id }
this.http.get('/api/services/app/GasStation/Get', { params: params }).subscribe((data: any) => {
data.result.govUnitDetail ? data.result.govUnitDetail = JSON.parse(data.result.govUnitDetail) : null
this.baseInfo = data.result
sessionStorage.setItem('userdata', this.originalData)
this.isShowBaseDialog = false
PlanComponent.instance.isShowLoading = false
})
} }
} }

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

@ -83,7 +83,7 @@
</nz-form-control> </nz-form-control>
</nz-form-item> --> </nz-form-item> -->
<nz-form-item class="searchParams"> <nz-form-item class="searchParams searchParams2">
<nz-form-control> <nz-form-control>
<nz-range-picker formControlName="datePicker"></nz-range-picker> <nz-range-picker formControlName="datePicker"></nz-range-picker>
<br /> <br />
@ -113,19 +113,22 @@
油站名称 油站名称
</div> </div>
<div nz-col nzSpan="2"> <div nz-col nzSpan="2">
组织机构 公司名称
</div> </div>
<div nz-col nzSpan="3"> <div nz-col nzSpan="2">
区域
</div>
<div nz-col nzSpan="2">
卸油开始时间 卸油开始时间
</div> </div>
<div nz-col nzSpan="3"> <div nz-col nzSpan="2">
卸油结束时间 卸油结束时间
</div> </div>
<div nz-col nzSpan="3"> <div nz-col nzSpan="3">
操作前准备预警节点数量 操作前准备预警节点数量
</div> </div>
<div nz-col nzSpan="3"> <div nz-col nzSpan="3">
操作准备预警节点数量 操作准备预警节点数量
</div> </div>
<div nz-col nzSpan="3"> <div nz-col nzSpan="3">
全流程准备预警节点数量 全流程准备预警节点数量
@ -142,29 +145,32 @@
<div nz-col nzSpan="1"> <div nz-col nzSpan="1">
</div> </div>
<div nz-col nzSpan="2"> <div nz-col nzSpan="2">
油站名称 {{item.gasStation.stationName}}
</div> </div>
<div nz-col nzSpan="2"> <div nz-col nzSpan="2">
组织机构 {{item.gasStation.companyName}}
</div> </div>
<div nz-col nzSpan="3"> <div nz-col nzSpan="2">
{{item.gasStation.locationName}}
</div>
<div nz-col nzSpan="2">
{{item.startTime ? (item.startTime | date:"yyyy-MM-dd HH:mm:ss") : '/'}} {{item.startTime ? (item.startTime | date:"yyyy-MM-dd HH:mm:ss") : '/'}}
</div> </div>
<div nz-col nzSpan="3"> <div nz-col nzSpan="2">
{{item.endTime ? (item.endTime | date:"yyyy-MM-dd HH:mm:ss") : '/'}} {{item.endTime ? (item.endTime | date:"yyyy-MM-dd HH:mm:ss") : '/'}}
</div> </div>
<div nz-col nzSpan="3"> <div nz-col nzSpan="3">
{{item.proccessBeforeCount}} {{item.proccessBeforeCount}}
</div> </div>
<div nz-col nzSpan="3"> <div nz-col nzSpan="3">
{{item.proccessAfterCount}} {{item.proccessingCount}}
</div> </div>
<div nz-col nzSpan="3"> <div nz-col nzSpan="3">
{{item.allProccessCount}} {{item.allProccessCount}}
</div> </div>
<div nz-col nzSpan="2"> <div nz-col nzSpan="2">
<ng-container <ng-container
*ngIf="item.proccessBeforeCount == 0 && item.proccessAfterCount == 0 && item.allProccessCount == 0; else elseTemplate"> *ngIf="item.proccessBeforeCount == 0 && item.proccessingCount == 0 && item.allProccessCount == 0; else elseTemplate">
<span style="color: #4BFFD4;">合规</span> <span style="color: #4BFFD4;">合规</span>
</ng-container> </ng-container>
<ng-template #elseTemplate> <ng-template #elseTemplate>

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

@ -16,7 +16,7 @@
width: 100%; width: 100%;
height: 32px; height: 32px;
display: flex; display: flex;
justify-content: space-around; justify-content: flex-start;
.searchParams, .searchParams,
.btn { .btn {
@ -24,11 +24,15 @@
} }
.searchParams { .searchParams {
flex: 10; // flex: 10;
width: 150px;
}
.searchParams2{
width: 220px;
} }
.btn { .btn {
flex: 1; // flex: 1;
} }
nz-select { nz-select {

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

@ -193,7 +193,7 @@ export class OilUnloadingProcessListComponent implements OnInit {
} }
}, },
tooltip: { tooltip: {
trigger: 'axis' // trigger: 'axis'
}, },
series: [ series: [
{ {
@ -313,7 +313,7 @@ export class OilUnloadingProcessListComponent implements OnInit {
//二级柱状图 //二级柱状图
oilchartbarOption2 = { oilchartbarOption2 = {
tooltip: { tooltip: {
trigger: 'axis' // trigger: 'axis'
}, },
xAxis: { xAxis: {
type: 'category', type: 'category',
@ -452,6 +452,12 @@ export class OilUnloadingProcessListComponent implements OnInit {
this.refreshEchartsData2(this.echartsData) this.refreshEchartsData2(this.echartsData)
} }
}); });
this.myChart.on('click', (params) => {
if (params.name == '预警事件') {
this.isgoback = true
this.refreshEchartsData2(this.echartsData)
}
});
//柱状图 //柱状图
let monthArr = [] let monthArr = []
@ -585,7 +591,7 @@ export class OilUnloadingProcessListComponent implements OnInit {
}).subscribe((data: any) => { }).subscribe((data: any) => {
this.list = this.list.concat(data.result.items); this.list = this.list.concat(data.result.items);
this.list = [...this.list] this.list = [...this.list]
console.log('xxx',this.list) // console.log('xxx',this.list)
this.totalCount = data.result.totalCount this.totalCount = data.result.totalCount
console.log('获取卸油流程列表', data.result.items) console.log('获取卸油流程列表', data.result.items)
// this.getAggregations() // this.getAggregations()

21
src/app/pages/plan-admin/plan-admin.component.ts

@ -38,7 +38,8 @@ export class PlanAdminComponent implements OnInit {
OrganizationUnitId: String(this.OrganizationUnitId), OrganizationUnitId: String(this.OrganizationUnitId),
IsContainsChildren: 'true', IsContainsChildren: 'true',
SkipCount: this.SkipCount, SkipCount: this.SkipCount,
MaxResultCount: this.MaxResultCount MaxResultCount: this.MaxResultCount,
Sorting:' BuildingBasicInfo.Id asc'
} }
await new Promise((resolve, reject) => { await new Promise((resolve, reject) => {
this.http.get('/api/services/app/GasStation/GetAll', { this.http.get('/api/services/app/GasStation/GetAll', {
@ -65,7 +66,9 @@ export class PlanAdminComponent implements OnInit {
OrganizationUnitId: String(this.OrganizationUnitId), OrganizationUnitId: String(this.OrganizationUnitId),
IsContainsChildren: 'true', IsContainsChildren: 'true',
SkipCount: '0', SkipCount: '0',
MaxResultCount: this.MaxResultCount MaxResultCount: this.MaxResultCount,
Sorting:' BuildingBasicInfo.Id asc'
} }
this.http.get('/api/services/app/GasStation/GetAll', { this.http.get('/api/services/app/GasStation/GetAll', {
params: params params: params
@ -85,7 +88,8 @@ export class PlanAdminComponent implements OnInit {
OrganizationUnitId: String(this.OrganizationUnitId), OrganizationUnitId: String(this.OrganizationUnitId),
IsContainsChildren: 'true', IsContainsChildren: 'true',
SkipCount: '0', SkipCount: '0',
MaxResultCount: this.MaxResultCount MaxResultCount: this.MaxResultCount,
Sorting:' BuildingBasicInfo.Id asc'
} }
this.http.get('/api/services/app/GasStation/GetAll', { this.http.get('/api/services/app/GasStation/GetAll', {
params: params params: params
@ -118,12 +122,16 @@ export class PlanAdminComponent implements OnInit {
const element = data.result.items[index]; const element = data.result.items[index];
element.key = element.id element.key = element.id
element.title = element.displayName element.title = element.displayName
// if(element.parentId == OrganizationUnitId){
// element.isLeaf = true
// }
} }
console.log('组织机构', data.result.items)
this.nodes = [...this.toTree.toTree(data.result.items)] this.nodes = [...this.toTree.toTree(data.result.items)]
this.nzExpandedKeys = [OrganizationUnitId]
this.nzSelectedKeys = [OrganizationUnitId] this.nzSelectedKeys = [OrganizationUnitId]
this.OrganizationUnitId = OrganizationUnitId this.OrganizationUnitId = OrganizationUnitId
this.nzExpandAll = true // this.nzExpandAll = true
this.getGasStation() this.getGasStation()
}) })
} }
@ -171,7 +179,8 @@ export class PlanAdminComponent implements OnInit {
OrganizationUnitId: String(this.OrganizationUnitId), OrganizationUnitId: String(this.OrganizationUnitId),
IsContainsChildren: 'true', IsContainsChildren: 'true',
SkipCount: this.SkipCount, SkipCount: this.SkipCount,
MaxResultCount: this.MaxResultCount MaxResultCount: this.MaxResultCount,
Sorting:' BuildingBasicInfo.Id asc'
} }
await new Promise((resolve, reject) => { await new Promise((resolve, reject) => {
this.http.get('/api/services/app/GasStation/GetAll', { this.http.get('/api/services/app/GasStation/GetAll', {

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

@ -93,16 +93,17 @@
</nz-form-item> </nz-form-item>
</form> </form>
</div> </div>
<div class="listbox"> <div class="listbox" style="text-align: center;">
<div nz-row class="listitem listitemhead"> <div nz-row class="listitem listitemhead">
<div nz-col nzSpan="2" style="box-sizing: border-box;padding-left: 10px;"> <div nz-col nzSpan="2" style="box-sizing: border-box;padding-left: 30px;">
预警级别 预警级别
</div> </div>
<div nz-col nzSpan="2"> <div nz-col nzSpan="2">
预警类型 预警类型
</div> </div>
<div nz-col nzSpan="4"> <div nz-col nzSpan="3">
预警信息 预警事件
</div> </div>
<div nz-col nzSpan="2"> <div nz-col nzSpan="2">
所属公司 所属公司
@ -125,12 +126,13 @@
<div nz-col nzSpan="2"> <div nz-col nzSpan="2">
处置状态 处置状态
</div> </div>
<div nz-col nzSpan="1"> <div nz-col nzSpan="2">
操作 操作
</div> </div>
</div> </div>
<div nz-row class="listitem" *ngFor="let item of list"> <div nz-row class="listitem" *ngFor="let item of list">
<div nz-col nzSpan="2"> <div nz-col nzSpan="2" class="imgbox">
<span *ngIf="item.violation.violationType == '卸油作业检查'"> <span *ngIf="item.violation.violationType == '卸油作业检查'">
<img src="../../../assets/images/warning2.png"> <img src="../../../assets/images/warning2.png">
</span> </span>
@ -160,8 +162,8 @@
<div nz-col nzSpan="2"> <div nz-col nzSpan="2">
{{item.violation.violationType}} {{item.violation.violationType}}
</div> </div>
<div nz-col nzSpan="4"> <div nz-col nzSpan="3">
{{item.violation.violationName}} {{item.violation.eventSystemName}}
</div> </div>
<div nz-col nzSpan="2"> <div nz-col nzSpan="2">
{{item.gasStation.companyName}} {{item.gasStation.companyName}}
@ -189,11 +191,11 @@
<span style="color: #23D9FF;">已处置</span> <span style="color: #23D9FF;">已处置</span>
</ng-template> </ng-template>
</div> </div>
<div nz-col nzSpan="1"> <div nz-col nzSpan="2" style="min-width: 64px;">
<button nz-button (click)="look(item)" style="margin-right: 16px;">查看</button> <button nz-button (click)="look(item)">查看</button>
<!-- <button *ngIf="!item.handleTime" nz-button (click)="dispose(item)">处置</button> -->
</div> </div>
</div> </div>
<nz-spin nzSimple *ngIf="isSpin"></nz-spin>
</div> </div>
</div> </div>

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

@ -54,7 +54,7 @@
width: 100%; width: 100%;
height: 32px; height: 32px;
display: flex; display: flex;
justify-content: space-around; justify-content: flex-start;
.searchParams, .searchParams,
.btn { .btn {
@ -62,12 +62,12 @@
} }
.searchParams { .searchParams {
flex: 3; // flex: 3;
// max-width: 100px; width: 150px;
} }
.btn { .btn {
flex: 1; // flex: 1;
} }
nz-select { nz-select {
@ -102,17 +102,14 @@
margin-bottom: 12px; margin-bottom: 12px;
background: linear-gradient(180deg, rgba(3, 0, 0, 0) 0%, rgba(0, 46, 91, 0.68) 100%); background: linear-gradient(180deg, rgba(3, 0, 0, 0) 0%, rgba(0, 46, 91, 0.68) 100%);
box-sizing: border-box; box-sizing: border-box;
padding-left: 20px; white-space: nowrap;
padding-right: 60px;
div { div {
font-size: 15px; font-size: 15px;
text-align: left; text-align: left;
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
display: flex;
align-items: center;
button { button {
font-size: 15px; font-size: 15px;
@ -121,7 +118,15 @@
color: #91CCFF; color: #91CCFF;
} }
} }
.imgbox{
span{
img{
width: 30%;
height: 30%;
margin-left: 15px;
}
}
}
.propsm { .propsm {
display: inline-block; display: inline-block;
width: 38px; width: 38px;
@ -208,7 +213,6 @@
overflow-y: auto; overflow-y: auto;
box-sizing: border-box; box-sizing: border-box;
padding: 16px 35px 16px 36px; padding: 16px 35px 16px 36px;
.listitem { .listitem {
height: 40px; height: 40px;
line-height: 40px; line-height: 40px;

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

@ -25,7 +25,7 @@ export class TodayWarningAdminComponent implements OnInit {
validateForm!: FormGroup; validateForm!: FormGroup;
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) { } 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) { }
isSpin:boolean = false
ngOnInit(): void { ngOnInit(): void {
this.validateForm = this.fb.group({ this.validateForm = this.fb.group({
level: [null], level: [null],
@ -112,6 +112,7 @@ export class TodayWarningAdminComponent implements OnInit {
disposalState = null disposalState = null
} }
console.log(this.validateForm.value) console.log(this.validateForm.value)
this.isSpin = true
let params = { let params = {
Level: this.validateForm.value.level, Level: this.validateForm.value.level,
ViolationIds: ViolationIds, ViolationIds: ViolationIds,
@ -130,7 +131,7 @@ export class TodayWarningAdminComponent implements OnInit {
this.list = data.result.items this.list = data.result.items
this.totalCount = data.result.totalCount this.totalCount = data.result.totalCount
console.log('预警列表', this.list) console.log('预警列表', this.list)
this.isSpin = false
let obj = { let obj = {
name: '改变数量', name: '改变数量',
num: this.totalCount num: this.totalCount
@ -171,6 +172,7 @@ export class TodayWarningAdminComponent implements OnInit {
isVisible = false isVisible = false
look(item) { look(item) {
console.log(item)
const modal = this.modal.create({ const modal = this.modal.create({
nzContent: GetOutOfLineDetailsComponent, nzContent: GetOutOfLineDetailsComponent,
nzWrapClassName: "vertical-center-modal", nzWrapClassName: "vertical-center-modal",
@ -188,7 +190,7 @@ export class TodayWarningAdminComponent implements OnInit {
}, },
nzFooter: null, nzFooter: null,
nzOnOk: async () => { nzOnOk: async () => {
console.log(99999,instance.content)
} }
}); });
const instance = modal.getContentComponent(); const instance = modal.getContentComponent();

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

@ -5,34 +5,41 @@
预警截图 预警截图
<div class="border"></div> <div class="border"></div>
</div> </div>
<div *ngIf="data.violation.eventSystemName != '灭火器维护' && data.violation.eventSystemName != '证照预警'" (click)="contentType('video')" [ngClass]="{'selected': selectedType == 'video'}"> <div *ngIf="data.violation && data.violation.eventSystemName != '灭火器维护' && data.violation.eventSystemName != '证照预警'"
(click)="contentType('video')" [ngClass]="{'selected': selectedType == 'video'}">
预警视频 预警视频
<div class="border"></div> <div class="border"></div>
</div> </div>
</div> </div>
</div> </div>
<div class="details">
预警详情:{{details}}
</div>
<div class="content"> <div class="content">
<div class="details">
{{details}}
</div>
<div *ngIf="selectedType == 'img'" class="imgbox"> <div *ngIf="selectedType == 'img'" class="imgbox">
<div class="bigimg"> <img [src]="imgUrl" alt="">
<img [src]="imgUrl" alt="">
</div>
</div> </div>
<div *ngIf="selectedType == 'video'" class="vediobox"> <div *ngIf="selectedType == 'video'" class="vediobox">
<video controls style="width: 100%;height: 100%;" [src]="vedioUrl"></video> <video controls style="width: 100%;height: 100%;" [src]="vedioUrl"></video>
</div> </div>
<div class="disposebox"> </div>
<div class="title"> <div class="disposebox">
<span>处置内容</span> <div class="title">
<span *ngIf="!data.handleTime" style="color: #36A2FF;cursor: pointer;" (click)="submit()">提交</span> <span>处置内容</span>
<span *ngIf="data.handleTime" style="color: #4BFFD4;cursor: default;">已处置</span> <span *ngIf="!data.handleTime" style="color: #36A2FF;cursor: pointer;" (click)="submit()">提交</span>
</div> <span *ngIf="data.handleTime" style="color: #4BFFD4;cursor: default;">已处置</span>
<div class="textarea"> </div>
<textarea [(ngModel)]="content" style="width: 100%;height: 100%;" name="" id="" cols="30" rows="10"></textarea> <div class="disposeContent">
</div> <textarea *ngIf="!data.handleTime" [(ngModel)]="content"></textarea>
<span *ngIf="data.handleTime">{{content}}</span>
</div>
<div class="disposeTime">
<span style="margin-right: 12px;">
处置人:{{data.handleUsername}}
</span>
<span>
处置时间:{{data.handleTime|date:"yyyy-MM-dd HH:mm:ss"}}
</span>
</div> </div>
</div> </div>
</div> </div>

139
src/app/pages/today-warning/get-out-of-line-details/get-out-of-line-details.component.scss

@ -1,7 +1,7 @@
.box { .box {
width: 100%; width: 100%;
height: 715px; height: 715px;
overflow-y: auto; // overflow-y: auto;
color: #fff; color: #fff;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@ -54,106 +54,87 @@
} }
} }
.ant-modal-close { .details {
color: #fff; width: 100%;
height: 45px;
line-height: 45px;
box-sizing: border-box;
padding: 0 12px;
} }
.content { .content {
flex: 1; flex: 1;
box-sizing: border-box;
padding: 12px;
overflow: hidden; overflow: hidden;
display: flex;
flex-direction: column;
overflow-y: auto;
.details {
margin-bottom: 12px;
}
.disposebox { .imgbox {
width: 100%;
height: 100%;
display: flex; display: flex;
flex-direction: column; align-items: center;
height: 72px; justify-content: center;
margin-bottom: 25px;
.title {
display: flex;
justify-content: space-between;
margin-bottom: 12px;
img {
max-width: 100%;
max-height: 100%;
} }
}
.textarea { .vediobox {
height: 60px; width: 100%;
height: 100%;
textarea { display: flex;
color: #C4E2FC; align-items: center;
border: 1px solid #91CCFF; justify-content: center;
background-color: #172c45;
}
video {
max-width: 100%;
max-height: 100%;
} }
} }
}
.imgbox { .disposebox {
flex: 1; width: 100%;
display: flex; height: 95px;
width: 100%; box-sizing: border-box;
padding: 5px 12px;
.imglist { display: flex;
display: flex; flex-direction: column;
flex-direction: column;
width: 196px;
height: 100%;
overflow-y: auto;
box-sizing: border-box;
padding-right: 12px;
border-right: 1px solid rgba(145, 204, 255, 0.3);
.imglisttitle {
font-size: 16px;
font-family: sybold;
margin-bottom: 16px;
}
.img { .title {
width: 178px; display: flex;
height: 108px; justify-content: space-between;
margin-bottom: 8px; }
img { .disposeContent {
width: 100%; display: flex;
height: 100%; align-items: center;
cursor: pointer; textarea {
} width: 100%;
} height: 40px;
color: #C4E2FC;
border: 1px solid #91CCFF;
background-color: #172c45;
} }
span{
.bigimg { display: inline-block;
// min-width: 1149px; width: 100%;
flex: 1; height: 40px;
box-sizing: border-box; line-height: 40px;
padding-left: 13px;
display: flex;
justify-content: center;
max-height: 500px;
img {
max-width: 100%;
max-height: 100%;
}
} }
} }
.vediobox { .disposeTime {}
flex: 1;
width: 100%; }
video{
max-height: 500px; .ant-modal-close {
} color: #fff;
}
} }
// 适配125% // 适配125%
@media screen and (max-height: 750px) { @media screen and (max-height: 750px) {
.box { .box {
@ -234,4 +215,4 @@
::-webkit-scrollbar-track { ::-webkit-scrollbar-track {
background-color: #061d3c; background-color: #061d3c;
} }

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

@ -19,7 +19,7 @@ export class GetOutOfLineDetailsComponent implements OnInit {
details details
ngOnInit(): void { ngOnInit(): void {
console.log(this.data) console.log(this.data)
this.details = this.data.desc this.details = this.data.content1
this.imgUrl = this.data.violateImage this.imgUrl = this.data.violateImage
this.vedioUrl = this.data.violateVideo this.vedioUrl = this.data.violateVideo
this.content = this.data.handleRecord this.content = this.data.handleRecord
@ -38,6 +38,7 @@ export class GetOutOfLineDetailsComponent implements OnInit {
this.http.post('/api/services/app/ViolateRecord/HandleViolateRecord', body).subscribe(data => { this.http.post('/api/services/app/ViolateRecord/HandleViolateRecord', body).subscribe(data => {
this.message.create('success', '处置成功!'); this.message.create('success', '处置成功!');
this.data.handleTime = new Date() this.data.handleTime = new Date()
this.data.handleRecord = this.content
}) })
} }
} }

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

@ -75,10 +75,9 @@
</form> </form>
</div> </div>
<div class="listbox" style="text-align: center;">
<div class="listbox">
<div nz-row class="listitem" *ngFor="let item of list"> <div nz-row class="listitem" *ngFor="let item of list">
<div nz-col nzSpan="3"> <div nz-col nzSpan="3" class="imgbox">
<span *ngIf="item.violation.violationType == '卸油作业检查'"> <span *ngIf="item.violation.violationType == '卸油作业检查'">
<img src="../../../assets/images/warning2.png"> <img src="../../../assets/images/warning2.png">
</span> </span>
@ -109,7 +108,7 @@
预警类型: {{item.violation.violationType}} 预警类型: {{item.violation.violationType}}
</div> </div>
<div nz-col nzSpan="4"> <div nz-col nzSpan="4">
预警信息: {{item.violation.violationName}} 预警信息: {{item.violation.eventSystemName}}
</div> </div>
<div nz-col nzSpan="4"> <div nz-col nzSpan="4">
区域: {{item.violateArea}} 区域: {{item.violateArea}}
@ -117,7 +116,7 @@
<div nz-col nzSpan="3"> <div nz-col nzSpan="3">
摄像头: {{item.cameraNo}} 摄像头: {{item.cameraNo}}
</div> </div>
<div nz-col nzSpan="4"> <div nz-col nzSpan="3">
{{item.violateTime | date:"yyyy-MM-dd HH:mm:ss"}} {{item.violateTime | date:"yyyy-MM-dd HH:mm:ss"}}
</div> </div>
<div nz-col nzSpan="2"> <div nz-col nzSpan="2">
@ -128,11 +127,12 @@
<span style="color: #23D9FF;">已处置</span> <span style="color: #23D9FF;">已处置</span>
</ng-template> </ng-template>
</div> </div>
<div nz-col nzSpan="1"> <div nz-col nzSpan="2">
<button nz-button (click)="look(item)" style="margin-right: 16px;">查看</button> <button nz-button (click)="look(item)" style="margin-right: 16px;">查看</button>
<button *ngIf="!item.handleTime" nz-button (click)="dispose(item)">处置</button> <!-- <button *ngIf="!item.handleTime" nz-button (click)="dispose(item)">处置</button>
<span *ngIf="item.handleTime" style="color: #23D9FF;margin-left: 10px;">已处置</span> <span *ngIf="item.handleTime" style="color: #23D9FF;margin-left: 10px;">已处置</span> -->
</div> </div>
</div> </div>
<nz-spin nzSimple *ngIf="isSpin"></nz-spin>
</div> </div>
</div> </div>

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

@ -54,7 +54,7 @@
width: 100%; width: 100%;
height: 32px; height: 32px;
display: flex; display: flex;
justify-content: space-around; justify-content: flex-start;
.searchParams, .searchParams,
.btn { .btn {
@ -62,11 +62,12 @@
} }
.searchParams { .searchParams {
flex: 2.9; // flex: 2.9;
width: 150px;
} }
.btn { .btn {
flex: 1; // flex: 1;
} }
nz-select { nz-select {
@ -113,6 +114,14 @@
color: #91CCFF; color: #91CCFF;
} }
} }
.imgbox{
span{
img{
width: 30%;
height: 80%;
}
}
}
} }
.dispositioned { .dispositioned {

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

@ -54,6 +54,7 @@ export class TodayWarningComponent implements OnInit {
list: any = [ list: any = [
] ]
totalCount: string //预警总数 totalCount: string //预警总数
isSpin:boolean = false
getEarlyWarningList() { getEarlyWarningList() {
let ViolationIds = [] let ViolationIds = []
if (this.validateForm.value.type) { if (this.validateForm.value.type) {
@ -81,13 +82,14 @@ export class TodayWarningComponent implements OnInit {
SkipCount: '0', SkipCount: '0',
MaxResultCount: '9999' MaxResultCount: '9999'
} }
this.isSpin = true
this.http.get('/api/services/app/ViolateRecord/GetAll', { this.http.get('/api/services/app/ViolateRecord/GetAll', {
params: params params: params
}).subscribe((data: any) => { }).subscribe((data: any) => {
this.list = data.result.items this.list = data.result.items
this.totalCount = data.result.totalCount this.totalCount = data.result.totalCount
console.log('预警列表', this.list) console.log('预警列表', this.list)
this.isSpin = false
let obj = { let obj = {
name: '改变数量', name: '改变数量',
num: this.totalCount num: this.totalCount

10
src/app/system-management/analysis-of-the-host/analysis-of-the-host.component.ts

@ -72,7 +72,9 @@ export class AnalysisOfTheHostComponent implements OnInit {
getHost() { getHost() {
this.http.get('/api/services/app/EdgeDevice/GetAll', { this.http.get('/api/services/app/EdgeDevice/GetAll', {
params: { params: {
organizationUnitId: this.selectedOilStation.id organizationUnitId: this.selectedOilStation.id,
SkipCount: '0',
MaxResultCount: '100',
} }
}).subscribe((data: any) => { }).subscribe((data: any) => {
console.log('主机列表', data.result.items) console.log('主机列表', data.result.items)
@ -86,10 +88,12 @@ export class AnalysisOfTheHostComponent implements OnInit {
getCamera() { getCamera() {
this.http.get('/api/services/app/Camera/GetAll', { this.http.get('/api/services/app/Camera/GetAll', {
params: { params: {
organizationUnitId: this.selectedOilStation.id organizationUnitId: this.selectedOilStation.id,
SkipCount: '0',
MaxResultCount: '100',
} }
}).subscribe((data: any) => { }).subscribe((data: any) => {
console.log('摄像头列表', data) // console.log('摄像头列表', data)
this.listOfDataCamera = data.result.items this.listOfDataCamera = data.result.items
}) })
} }

45
src/app/system-management/organization/organization.component.ts

@ -155,28 +155,33 @@ export class OrganizationComponent implements OnInit {
} }
deleteOr(item) { deleteOr(item) {
console.log(item) console.log(item)
this.modal.confirm({ if (item.origin.children && item.origin.children.length != 0) {
nzTitle: `确定要删除${item.title}这个机构吗?`, this.message.create('warning', '请先删除所有子节点');
nzOkText: '确定', } else {
nzOkType: 'danger', this.modal.confirm({
nzOnOk: () => { nzTitle: `确定要删除${item.title}这个机构吗?`,
this.http.delete('/api/services/app/Organization/Delete', { nzOkText: '确定',
params: { nzOkType: 'danger',
Id: item.origin.id nzOnOk: () => {
} this.http.delete('/api/services/app/Organization/Delete', {
}).subscribe(data => { params: {
this.nzTreeComponent.getExpandedNodeList().forEach((item) => { Id: item.origin.id
this.defaultExpandedKeys.push(item.key) }
}).subscribe(data => {
this.nzTreeComponent.getExpandedNodeList().forEach((item) => {
this.defaultExpandedKeys.push(item.key)
})
this.getAllOrganization()
this.message.create('success', '删除成功!');
}) })
this.getAllOrganization() },
this.message.create('success', '删除成功!'); nzCancelText: '取消',
}) nzOnCancel: () => {
},
nzCancelText: '取消', }
nzOnCancel: () => { });
}
}
});
} }

2
src/app/system-management/user/user.component.html

@ -37,7 +37,7 @@
<td>{{ data.userName }}</td> <td>{{ data.userName }}</td>
<td>{{ data.name }}</td> <td>{{ data.name }}</td>
<td nzBreakWord> <td nzBreakWord>
<span style="margin-right: 8px;" *ngFor="let item of data.roleNames">{{item}}</span> <span style="margin-right: 8px;" *ngFor="let item of data.roleDisplayNames">{{item}}</span>
</td> </td>
<td> <td>
<!-- <div class="ortype"> <!-- <div class="ortype">

229
src/assets/js/echarts-tooltip-carousel.js

@ -0,0 +1,229 @@
/**
* Created by chengwb on 2016/9/3.
*/
(function (global) {
global.tools = global.tools || {};
/**
* echarts tooltip轮播
* @param chart ECharts实例
* @param chartOption echarts的配置信息
* @param options object 选项
* {
* interval 轮播时间间隔单位毫秒默认为2000
* loopSeries boolean类型默认为false
* true表示循环所有series的tooltipfalse则显示指定seriesIndex的tooltip
* seriesIndex 默认为0指定某个系列option中的series索引循环显示tooltip
* 当loopSeries为true时从seriesIndex系列开始执行
* updateData 自定义更新数据的函数默认为null
* 用于类似于分页的效果比如总数据有20条chart一次只显示5条全部数据可以分4次显示
* }
* @returns {{clearLoop: clearLoop}}
*/
tools.loopShowTooltip = function (chart, chartOption, options) {
let defaultOptions = {
interval: 2000,
loopSeries: false,
seriesIndex: 0,
updateData: null
};
if (!chart || !chartOption) {
return;
}
let dataIndex = 0; // 数据索引,初始化为-1,是为了判断是否是第一次执行
let seriesIndex = 0; // 系列索引
let timeTicket = 0;
let seriesLen = chartOption.series.length; // 系列个数
let dataLen = 0; // 某个系列数据个数
let chartType; // 系列类型
let first = true;
let lastShowSeriesIndex = 0;
let lastShowDataIndex = 0;
if (seriesLen === 0) {
return;
}
//待处理列表
//不循环series时seriesIndex指定显示tooltip的系列,不指定默认为0,指定多个则默认为第一个
//循环series时seriesIndex指定循环的series,不指定则从0开始循环所有series,指定单个则相当于不循环,指定多个
//要不要添加开始series索引和开始的data索引?
if (options) {
options.interval = options.interval || defaultOptions.interval;
options.loopSeries = options.loopSeries || defaultOptions.loopSeries;
options.seriesIndex = options.seriesIndex || defaultOptions.seriesIndex;
options.updateData = options.updateData || defaultOptions.updateData;
} else {
options = defaultOptions;
}
//如果设置的seriesIndex无效,则默认为0
if (options.seriesIndex < 0 || options.seriesIndex >= seriesLen) {
seriesIndex = 0;
} else {
seriesIndex = options.seriesIndex;
}
/**
* 清除定时器
*/
function clearLoop() {
if (timeTicket) {
clearInterval(timeTicket);
timeTicket = 0;
}
chart.off('mousemove', stopAutoShow);
zRender.off('mousemove', zRenderMouseMove);
zRender.off('globalout', zRenderGlobalOut);
}
/**
* 取消高亮
*/
function cancelHighlight() {
/**
* 如果dataIndex为0表示上次系列完成显示如果是循环系列且系列索引为0则上次是seriesLen-1否则为seriesIndex-1
* 如果不是循环系列则就是当前系列
* 如果dataIndex>0则就是当前系列
*/
let tempSeriesIndex = dataIndex === 0 ?
(options.loopSeries ?
(seriesIndex === 0 ? seriesLen - 1 : seriesIndex - 1) :
seriesIndex) :
seriesIndex;
let tempType = chartOption.series[tempSeriesIndex].type;
if (tempType === 'pie' || tempType === 'radar') {
chart.dispatchAction({
type: 'downplay',
seriesIndex: lastShowSeriesIndex,
dataIndex: lastShowDataIndex
}); //wait 系列序号为0且循环系列,则要判断上次的系列类型是否是pie、radar
}
}
/**
* 自动轮播tooltip
*/
function autoShowTip() {
let invalidSeries = 0;
let invalidData = 0;
function showTip() {
//判断是否更新数据
if (dataIndex === 0 && !first && typeof options.updateData === "function") {
options.updateData();
chart.setOption(chartOption);
}
let series = chartOption.series;
let currSeries = series[seriesIndex];
if (!series || series.length === 0 ||
!currSeries || !currSeries.type || !currSeries.data ||
!currSeries.data.length) {
return;
}
chartType = currSeries.type; // 系列类型
dataLen = currSeries.data.length; // 某个系列的数据个数
let tipParams = {
seriesIndex: seriesIndex
};
switch (chartType) {
case 'pie':
case 'map':
case 'chord':
tipParams.name = currSeries.data[dataIndex].name;
break;
case 'radar': // 雷达图
tipParams.seriesIndex = seriesIndex;
tipParams.dataIndex = dataIndex;
break;
default:
tipParams.dataIndex = dataIndex;
break;
}
if (chartType === 'pie' || chartType === 'radar') {
if (!first) {
cancelHighlight();
}
// 高亮当前图形
chart.dispatchAction({
type: 'highlight',
seriesIndex: seriesIndex,
dataIndex: dataIndex
});
}
// 显示 tooltip
tipParams.type = 'showTip';
// 防止updateData时先处理tooltip后刷新数据导出tooltip显示不正确
setTimeout(() => {
chart.dispatchAction(tipParams);
}, 0);
lastShowSeriesIndex = seriesIndex;
lastShowDataIndex = dataIndex;
dataIndex = (dataIndex + 1) % dataLen;
if (options.loopSeries && dataIndex === 0) { // 数据索引归0表示当前系列数据已经循环完
invalidData = 0;
seriesIndex = (seriesIndex + 1) % seriesLen;
if (seriesIndex === options.seriesIndex) {
invalidSeries = 0;
}
}
first = false;
}
showTip();
timeTicket = setInterval(showTip, options.interval);
}
// 关闭轮播
function stopAutoShow() {
if (timeTicket) {
clearInterval(timeTicket);
timeTicket = 0;
if (chartType === 'pie' || chartType === 'radar') {
cancelHighlight();
}
}
}
let zRender = chart.getZr();
function zRenderMouseMove(param) {
if (param.event) {
//阻止canvas上的鼠标移动事件冒泡
param.event.cancelBubble = true;
}
stopAutoShow();
}
// 离开echarts图时恢复自动轮播
function zRenderGlobalOut() {
if (!timeTicket) {
autoShowTip();
}
}
// 鼠标在echarts图上时停止轮播
chart.on('mousemove', stopAutoShow);
zRender.on('mousemove', zRenderMouseMove);
zRender.on('globalout', zRenderGlobalOut);
autoShowTip();
return {
clearLoop: clearLoop
};
};
})(window);

1
src/index.html

@ -11,4 +11,5 @@
<app-root></app-root> <app-root></app-root>
</body> </body>
<script src="./assets/js/abp.js"></script> <script src="./assets/js/abp.js"></script>
<script src="./assets/js/echarts-tooltip-carousel.js"></script>
</html> </html>

Loading…
Cancel
Save