Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
web-project
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
海康威视
web-project
Commits
a94ccd08
Commit
a94ccd08
authored
Jan 07, 2025
by
方建宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
实时能耗
parent
ed3ed897
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
818 additions
and
102 deletions
+818
-102
realEnergy.js
src/dataJson/RealPage/realEnergy.js
+654
-0
RealEnergyPage.vue
src/views/RealPage/RealEnergyPage.vue
+164
-102
No files found.
src/dataJson/RealPage/realEnergy.js
0 → 100644
View file @
a94ccd08
export
const
deviceReal
=
{
// "result":{"frozenList":[{"field":"RowIndex","width":50,"sortable":true,"title":"编号","filter":false,"color":"b5e6ff","isVisible":true},{"field":"Name","width":150,"sortable":true,"title":"名称","filter":false,"color":"b5e6ff","isVisible":true},{"field":"GatherTime","width":150,"sortable":true,"title":"采集时间","filter":false,"color":"b5e6ff","isVisible":true},{"field":"Temperature","width":80,"sortable":true,"title":"温度","filter":false,"color":"b5e6ff","isVisible":true},{"field":"Illumination","width":80,"sortable":true,"title":"光照","filter":false,"color":"b5e6ff","isVisible":true},{"field":"Wind","width":80,"sortable":true,"title":"风力","filter":false,"color":"b5e6ff","isVisible":true},
// {"field":"RowIndex","width":50,"sortable":true,"title":"编号","filter":false,"color":"b5e6ff","isVisible":true},{"field":"Name","width":150,"sortable":true,"title":"名称","filter":false,"color":"b5e6ff","isVisible":true},{"field":"GatherTime","width":150,"sortable":true,"title":"采集时间","filter":false,"color":"b5e6ff","isVisible":true},{"field":"Temperature","width":80,"sortable":true,"title":"温度","filter":false,"color":"b5e6ff","isVisible":true},{"field":"Illumination","width":80,"sortable":true,"title":"光照","filter":false,"color":"b5e6ff","isVisible":true},{"field":"Wind","width":80,"sortable":true,"title":"风力","filter":false,"color":"b5e6ff","isVisible":true},
// {"field":"RowIndex","width":50,"sortable":true,"title":"编号","filter":false,"color":"b5e6ff","isVisible":true},{"field":"Name","width":150,"sortable":true,"title":"名称","filter":false,"color":"b5e6ff","isVisible":true},{"field":"GatherTime","width":150,"sortable":true,"title":"采集时间","filter":false,"color":"b5e6ff","isVisible":true},{"field":"Temperature","width":80,"sortable":true,"title":"温度","filter":false,"color":"b5e6ff","isVisible":true},{"field":"Illumination","width":80,"sortable":true,"title":"光照","filter":false,"color":"b5e6ff","isVisible":true},{"field":"Wind","width":80,"sortable":true,"title":"风力","filter":false,"color":"b5e6ff","isVisible":true},
// {"field":"RowIndex","width":50,"sortable":true,"title":"编号","filter":false,"color":"b5e6ff","isVisible":true},{"field":"Name","width":150,"sortable":true,"title":"名称","filter":false,"color":"b5e6ff","isVisible":true},{"field":"GatherTime","width":150,"sortable":true,"title":"采集时间","filter":false,"color":"b5e6ff","isVisible":true},{"field":"Temperature","width":80,"sortable":true,"title":"温度","filter":false,"color":"b5e6ff","isVisible":true},{"field":"Illumination","width":80,"sortable":true,"title":"光照","filter":false,"color":"b5e6ff","isVisible":true},{"field":"Wind","width":80,"sortable":true,"title":"风力","filter":false,"color":"b5e6ff","isVisible":true}
// ],
// "otherList":[{"baseId":50,"enName":"TapWaterOutletFlowSum","cnName":"自来水出口水表流量累计 t","alias":"流量累计 t","backColor":"F2D9D9","decimalPoint":2,"width":150,"orderNum":1,"isVisible":true}],"realData":[{"rowIndex":1,"supplyId":"b354f45b-23e5-42be-a210-0fb92394f457","supplyName":"小王庄供热站","id":"ddf650a7-336d-454f-8064-2d058676c901","name":"滦河水水表","gatherTime":"2025-01-07 11:15:04","scadaDeviceStatus":"在线","tapWaterOutletFlowSum":"8214"},{"rowIndex":2,"supplyId":"b354f45b-23e5-42be-a210-0fb92394f457","supplyName":"小王庄供热站","id":"8f9c22d0-7143-4a7c-87ab-aca9d3851651","name":"地下水水表","gatherTime":"2025-01-07 11:15:04","scadaDeviceStatus":"在线","tapWaterOutletFlowSum":"222"},
// {"baseId":22,"enName":"InstantFlow","cnName":"瞬时流量 t/h","alias":"瞬时流量 t/h","backColor":"E4EFE3","decimalPoint":2,"width":150,"orderNum":1,"isVisible":true},{"baseId":23,"enName":"SumFlow","cnName":"累计流量 t","alias":"累计流量 t","backColor":"E0E1D8","decimalPoint":2,"width":150,"orderNum":2,"isVisible":true},{"baseId":21,"enName":"InstantHeat","cnName":"瞬时热量 GJ","alias":"瞬时热量GJ/h","backColor":"EBE8E9","decimalPoint":2,"width":150,"orderNum":3,"isVisible":true},{"baseId":24,"enName":"SumHeat","cnName":"累计热量 kwh","alias":"累计热量GJ","backColor":"DDDEE6","decimalPoint":2,"width":150,"orderNum":4,"isVisible":true}],"realData":[{"rowIndex":1,"supplyId":"b354f45b-23e5-42be-a210-0fb92394f457","supplyName":"小王庄供热站","id":"cdc3148e-a46e-4d0f-9577-e5d7dba21492","name":"出水总管流量计","gatherTime":"2025-01-07 11:20:09","scadaDeviceStatus":"在线","instantFlow":"192.8","sumFlow":"1414203","instantHeat":"15.9","sumHeat":"164035"},
// {"baseId":49,"enName":"ElecSum","cnName":"电量累计 A","alias":"电量累计 A","backColor":"3C3D67","decimalPoint":2,"width":150,"orderNum":1,"isVisible":true}],"realData":[{"rowIndex":1,"supplyId":"b354f45b-23e5-42be-a210-0fb92394f457","supplyName":"小王庄供热站","id":"6fc07895-31fc-4330-90b8-f77a7441da9f","name":"电表","gatherTime":"2025-01-07 11:20:09","scadaDeviceStatus":"在线","elecSum":"1422511"},
// {"baseId":6,"enName":"MeterPressure","cnName":"表内压力 KPa","alias":"表内压力 KPa","backColor":"B01515","decimalPoint":2,"width":120,"orderNum":1,"isVisible":true},{"baseId":7,"enName":"MeterTemp","cnName":"表内温度 ℃","alias":"表内温度 ℃","backColor":"FFFFFF","decimalPoint":2,"width":120,"orderNum":2,"isVisible":true},{"baseId":8,"enName":"StandardInstantFlow","cnName":"标况瞬时 NM3/H","alias":"标况瞬时 NM3/H","backColor":"FFFFFF","decimalPoint":2,"width":150,"orderNum":3,"isVisible":true},{"baseId":9,"enName":"StandardInstantSum","cnName":"标况累积 NM3","alias":"标况累积 NM3","backColor":"FFFFFF","decimalPoint":2,"width":150,"orderNum":4,"isVisible":true},{"baseId":10,"enName":"Sum","cnName":"累积 M3","alias":"工况累积 M3","backColor":"F6C58E","decimalPoint":2,"width":150,"orderNum":5,"isVisible":true},{"baseId":55,"enName":"GasInstant","cnName":"瞬时流量 M3","alias":"工况瞬时流量 M3","backColor":"FFFFFF","decimalPoint":2,"width":150,"orderNum":6,"isVisible":true}],"realData":[{"rowIndex":1,"supplyId":"b354f45b-23e5-42be-a210-0fb92394f457","supplyName":"小王庄供热站","id":"89dc98d3-7287-4b58-bf8b-b8d8336b13fa","name":"1#调压站","gatherTime":"2025-01-07 11:20:09","scadaDeviceStatus":"在线","meterPressure":"103.91","meterTemp":"10.14","standardInstantFlow":"0","standardInstantSum":"2764468","sum":"4075402","gasInstant":"0"},{"rowIndex":2,"supplyId":"b354f45b-23e5-42be-a210-0fb92394f457","supplyName":"小王庄供热站","id":"4200633f-4a74-4166-bbfd-a23f50be3120","name":"2#调压站","gatherTime":"2024-03-20 14:27:03","scadaDeviceStatus":"离线","meterPressure":"108.21","meterTemp":"28.86","standardInstantFlow":"0","standardInstantSum":"0","sum":"0","gasInstant":"0"},{"rowIndex":3,"supplyId":"b354f45b-23e5-42be-a210-0fb92394f457","supplyName":"小王庄供热站","id":"9b9cefe7-4fcc-47e0-9a35-0d9dcad9d0eb","name":"3#调压站","gatherTime":"2025-01-07 11:18:22","scadaDeviceStatus":"在线","meterPressure":"147.39","meterTemp":"5.44","standardInstantFlow":"592.12","standardInstantSum":"8854168","sum":"4608524","gasInstant":"386.79"},{"rowIndex":4,"supplyId":"b354f45b-23e5-42be-a210-0fb92394f457","supplyName":"小王庄供热站","id":"dd87c671-3a57-4a56-9243-14b2f9affff2","name":"4#调压站","gatherTime":"2024-03-20 14:27:03","scadaDeviceStatus":"离线","meterPressure":"101.41","meterTemp":"30.66","standardInstantFlow":"0","standardInstantSum":"0","sum":"0","gasInstant":"0"}
// ],"alarmData":[],"totalCount":0
// },
// "data":[
// {"deviceId":"ddf650a7-336d-454f-8064-2d058676c901","deviceName":"滦河水水表","deviceType":2,"supplyId":"b354f45b-23e5-42be-a210-0fb92394f457","serialId":"b354f45b-23e5-42be-a210-0fb92394f457","serialType":0,"description":"小王庄滦河水水表","orderNum":1,"isActive":true,"updateNullFields":null},{"deviceId":"8f9c22d0-7143-4a7c-87ab-aca9d3851651","deviceName":"地下水水表","deviceType":2,"supplyId":"b354f45b-23e5-42be-a210-0fb92394f457","serialId":"b354f45b-23e5-42be-a210-0fb92394f457","serialType":0,"description":"小王庄地下水水表","orderNum":2,"isActive":true,"updateNullFields":null},
// {"deviceId":"cdc3148e-a46e-4d0f-9577-e5d7dba21492","deviceName":"出水总管流量计","deviceType":3,"supplyId":"b354f45b-23e5-42be-a210-0fb92394f457","serialId":"b354f45b-23e5-42be-a210-0fb92394f457","serialType":0,"description":"小王庄出水总管流量计","orderNum":1,"isActive":true,"updateNullFields":null},
// {"deviceId":"6fc07895-31fc-4330-90b8-f77a7441da9f","deviceName":"电表","deviceType":4,"supplyId":"b354f45b-23e5-42be-a210-0fb92394f457","serialId":"b354f45b-23e5-42be-a210-0fb92394f457","serialType":0,"description":"小王庄电表","orderNum":1,"isActive":true,"updateNullFields":null},
// {"deviceId":"89dc98d3-7287-4b58-bf8b-b8d8336b13fa","deviceName":"1#调压站","deviceType":1,"supplyId":"b354f45b-23e5-42be-a210-0fb92394f457","serialId":"af3616fd-ac99-4de4-8b92-7e2eab9a5a90","serialType":2,"description":"小王庄1#炉调压站","orderNum":1,"isActive":true,"updateNullFields":null},{"deviceId":"4200633f-4a74-4166-bbfd-a23f50be3120","deviceName":"2#调压站","deviceType":1,"supplyId":"b354f45b-23e5-42be-a210-0fb92394f457","serialId":"0d4ad9f6-75ee-4914-929a-bedfe13b2560","serialType":2,"description":"小王庄2#炉调压站","orderNum":2,"isActive":true,"updateNullFields":null},{"deviceId":"9b9cefe7-4fcc-47e0-9a35-0d9dcad9d0eb","deviceName":"3#调压站","deviceType":1,"supplyId":"b354f45b-23e5-42be-a210-0fb92394f457","serialId":"0d4ad9f6-75ee-4914-929a-bedfe13b2560","serialType":2,"description":"小王庄3#炉调压站","orderNum":3,"isActive":true,"updateNullFields":null},{"deviceId":"dd87c671-3a57-4a56-9243-14b2f9affff2","deviceName":"4#调压站","deviceType":1,"supplyId":"b354f45b-23e5-42be-a210-0fb92394f457","serialId":"0d4ad9f6-75ee-4914-929a-bedfe13b2560","serialType":2,"description":"小王庄4#炉调压站","orderNum":4,"isActive":true,"updateNullFields":null}
// ],
"data"
:
{
"frozenList"
:
[
{
"field"
:
"RowIndex"
,
"width"
:
50
,
"sortable"
:
true
,
"title"
:
"编号"
,
"filter"
:
false
,
"color"
:
"b5e6ff"
,
"isVisible"
:
true
},
{
"field"
:
"Name"
,
"width"
:
150
,
"sortable"
:
true
,
"title"
:
"名称"
,
"filter"
:
false
,
"color"
:
"b5e6ff"
,
"isVisible"
:
true
},
{
"field"
:
"GatherTime"
,
"width"
:
150
,
"sortable"
:
true
,
"title"
:
"采集时间"
,
"filter"
:
false
,
"color"
:
"b5e6ff"
,
"isVisible"
:
true
},
{
"field"
:
"Temperature"
,
"width"
:
80
,
"sortable"
:
true
,
"title"
:
"温度"
,
"filter"
:
false
,
"color"
:
"b5e6ff"
,
"isVisible"
:
true
},
{
"field"
:
"Illumination"
,
"width"
:
80
,
"sortable"
:
true
,
"title"
:
"光照"
,
"filter"
:
false
,
"color"
:
"b5e6ff"
,
"isVisible"
:
true
},
{
"field"
:
"Wind"
,
"width"
:
80
,
"sortable"
:
true
,
"title"
:
"风力"
,
"filter"
:
false
,
"color"
:
"b5e6ff"
,
"isVisible"
:
true
}
],
"otherList"
:
[
{
"baseId"
:
50
,
"enName"
:
"TapWaterOutletFlowSum"
,
"cnName"
:
"自来水出口水表流量累计 t"
,
"alias"
:
"流量累计 t"
,
"backColor"
:
"F2D9D9"
,
"decimalPoint"
:
2
,
"width"
:
150
,
"orderNum"
:
1
,
"isVisible"
:
true
}
]
},
"title"
:
[
{
"baseId"
:
50
,
"enName"
:
"TapWaterOutletFlowSum"
,
"cnName"
:
"自来水出口水表流量累计 t"
,
"alias"
:
"流量累计 t"
,
"backColor"
:
"F2D9D9"
,
"decimalPoint"
:
2
,
"width"
:
150
,
"orderNum"
:
1
,
"isVisible"
:
true
}
],
"realData"
:
[
{
"rowIndex"
:
1
,
"supplyId"
:
"b354f45b-23e5-42be-a210-0fb92394f457"
,
"supplyName"
:
"小王庄供热站"
,
"id"
:
"ddf650a7-336d-454f-8064-2d058676c901"
,
"name"
:
"滦河水水表"
,
"gatherTime"
:
"2025-01-07 12:54:45"
,
"scadaDeviceStatus"
:
"在线"
,
"tapWaterOutletFlowSum"
:
"8214"
},
{
"rowIndex"
:
2
,
"supplyId"
:
"b354f45b-23e5-42be-a210-0fb92394f457"
,
"supplyName"
:
"小王庄供热站"
,
"id"
:
"8f9c22d0-7143-4a7c-87ab-aca9d3851651"
,
"name"
:
"地下水水表"
,
"gatherTime"
:
"2025-01-07 12:54:45"
,
"scadaDeviceStatus"
:
"在线"
,
"tapWaterOutletFlowSum"
:
"222"
}
],
"alarmData"
:
[],
"totalCount"
:
0
}
export
const
deviceReal2
=
{
"data"
:
{
"frozenList"
:
[
{
"field"
:
"RowIndex"
,
"width"
:
50
,
"sortable"
:
true
,
"title"
:
"编号"
,
"filter"
:
false
,
"color"
:
"b5e6ff"
,
"isVisible"
:
true
},
{
"field"
:
"Name"
,
"width"
:
150
,
"sortable"
:
true
,
"title"
:
"名称"
,
"filter"
:
false
,
"color"
:
"b5e6ff"
,
"isVisible"
:
true
},
{
"field"
:
"GatherTime"
,
"width"
:
150
,
"sortable"
:
true
,
"title"
:
"采集时间"
,
"filter"
:
false
,
"color"
:
"b5e6ff"
,
"isVisible"
:
true
},
{
"field"
:
"Temperature"
,
"width"
:
80
,
"sortable"
:
true
,
"title"
:
"温度"
,
"filter"
:
false
,
"color"
:
"b5e6ff"
,
"isVisible"
:
true
},
{
"field"
:
"Illumination"
,
"width"
:
80
,
"sortable"
:
true
,
"title"
:
"光照"
,
"filter"
:
false
,
"color"
:
"b5e6ff"
,
"isVisible"
:
true
},
{
"field"
:
"Wind"
,
"width"
:
80
,
"sortable"
:
true
,
"title"
:
"风力"
,
"filter"
:
false
,
"color"
:
"b5e6ff"
,
"isVisible"
:
true
}
],
"otherList"
:
[
{
"baseId"
:
22
,
"enName"
:
"InstantFlow"
,
"cnName"
:
"瞬时流量 t/h"
,
"alias"
:
"瞬时流量 t/h"
,
"backColor"
:
"E4EFE3"
,
"decimalPoint"
:
2
,
"width"
:
150
,
"orderNum"
:
1
,
"isVisible"
:
true
},
{
"baseId"
:
23
,
"enName"
:
"SumFlow"
,
"cnName"
:
"累计流量 t"
,
"alias"
:
"累计流量 t"
,
"backColor"
:
"E0E1D8"
,
"decimalPoint"
:
2
,
"width"
:
150
,
"orderNum"
:
2
,
"isVisible"
:
true
},
{
"baseId"
:
21
,
"enName"
:
"InstantHeat"
,
"cnName"
:
"瞬时热量 GJ"
,
"alias"
:
"瞬时热量GJ/h"
,
"backColor"
:
"EBE8E9"
,
"decimalPoint"
:
2
,
"width"
:
150
,
"orderNum"
:
3
,
"isVisible"
:
true
},
{
"baseId"
:
24
,
"enName"
:
"SumHeat"
,
"cnName"
:
"累计热量 kwh"
,
"alias"
:
"累计热量GJ"
,
"backColor"
:
"DDDEE6"
,
"decimalPoint"
:
2
,
"width"
:
150
,
"orderNum"
:
4
,
"isVisible"
:
true
}
]},
"title"
:
[
{
"baseId"
:
22
,
"enName"
:
"InstantFlow"
,
"cnName"
:
"瞬时流量 t/h"
,
"alias"
:
"瞬时流量 t/h"
,
"backColor"
:
"E4EFE3"
,
"decimalPoint"
:
2
,
"width"
:
150
,
"orderNum"
:
1
,
"isVisible"
:
true
},
{
"baseId"
:
23
,
"enName"
:
"SumFlow"
,
"cnName"
:
"累计流量 t"
,
"alias"
:
"累计流量 t"
,
"backColor"
:
"E0E1D8"
,
"decimalPoint"
:
2
,
"width"
:
150
,
"orderNum"
:
2
,
"isVisible"
:
true
},
{
"baseId"
:
21
,
"enName"
:
"InstantHeat"
,
"cnName"
:
"瞬时热量 GJ"
,
"alias"
:
"瞬时热量GJ/h"
,
"backColor"
:
"EBE8E9"
,
"decimalPoint"
:
2
,
"width"
:
150
,
"orderNum"
:
3
,
"isVisible"
:
true
},
{
"baseId"
:
24
,
"enName"
:
"SumHeat"
,
"cnName"
:
"累计热量 kwh"
,
"alias"
:
"累计热量GJ"
,
"backColor"
:
"DDDEE6"
,
"decimalPoint"
:
2
,
"width"
:
150
,
"orderNum"
:
4
,
"isVisible"
:
true
}
],
"realData"
:
[
{
"rowIndex"
:
1
,
"supplyId"
:
"b354f45b-23e5-42be-a210-0fb92394f457"
,
"supplyName"
:
"小王庄供热站"
,
"id"
:
"cdc3148e-a46e-4d0f-9577-e5d7dba21492"
,
"name"
:
"出水总管流量计"
,
"gatherTime"
:
"2025-01-07 12:54:45"
,
"scadaDeviceStatus"
:
"在线"
,
"instantFlow"
:
"209.58"
,
"sumFlow"
:
"1414559"
,
"instantHeat"
:
"15.53"
,
"sumHeat"
:
"164066"
}
],
"alarmData"
:
[],
"totalCount"
:
0
}
export
const
deviceReal3
=
{
"data"
:
{
"frozenList"
:
[
{
"field"
:
"RowIndex"
,
"width"
:
50
,
"sortable"
:
true
,
"title"
:
"编号"
,
"filter"
:
false
,
"color"
:
"b5e6ff"
,
"isVisible"
:
true
},
{
"field"
:
"Name"
,
"width"
:
150
,
"sortable"
:
true
,
"title"
:
"名称"
,
"filter"
:
false
,
"color"
:
"b5e6ff"
,
"isVisible"
:
true
},
{
"field"
:
"GatherTime"
,
"width"
:
150
,
"sortable"
:
true
,
"title"
:
"采集时间"
,
"filter"
:
false
,
"color"
:
"b5e6ff"
,
"isVisible"
:
true
},
{
"field"
:
"Temperature"
,
"width"
:
80
,
"sortable"
:
true
,
"title"
:
"温度"
,
"filter"
:
false
,
"color"
:
"b5e6ff"
,
"isVisible"
:
true
},
{
"field"
:
"Illumination"
,
"width"
:
80
,
"sortable"
:
true
,
"title"
:
"光照"
,
"filter"
:
false
,
"color"
:
"b5e6ff"
,
"isVisible"
:
true
},
{
"field"
:
"Wind"
,
"width"
:
80
,
"sortable"
:
true
,
"title"
:
"风力"
,
"filter"
:
false
,
"color"
:
"b5e6ff"
,
"isVisible"
:
true
}
],
"otherList"
:
[
{
"baseId"
:
49
,
"enName"
:
"ElecSum"
,
"cnName"
:
"电量累计 A"
,
"alias"
:
"电量累计 A"
,
"backColor"
:
"3C3D67"
,
"decimalPoint"
:
2
,
"width"
:
150
,
"orderNum"
:
1
,
"isVisible"
:
true
}
]
},
"title"
:
[
{
"baseId"
:
49
,
"enName"
:
"ElecSum"
,
"cnName"
:
"电量累计 A"
,
"alias"
:
"电量累计 A"
,
"backColor"
:
"3C3D67"
,
"decimalPoint"
:
2
,
"width"
:
150
,
"orderNum"
:
1
,
"isVisible"
:
true
}
],
"realData"
:
[
{
"rowIndex"
:
1
,
"supplyId"
:
"b354f45b-23e5-42be-a210-0fb92394f457"
,
"supplyName"
:
"小王庄供热站"
,
"id"
:
"6fc07895-31fc-4330-90b8-f77a7441da9f"
,
"name"
:
"电表"
,
"gatherTime"
:
"2025-01-07 12:54:45"
,
"scadaDeviceStatus"
:
"在线"
,
"elecSum"
:
"1422585"
}
],
"alarmData"
:
[],
"totalCount"
:
0
}
export
const
deviceReal4
=
{
"data"
:
{
"frozenList"
:
[
{
"field"
:
"RowIndex"
,
"width"
:
50
,
"sortable"
:
true
,
"title"
:
"编号"
,
"filter"
:
false
,
"color"
:
"b5e6ff"
,
"isVisible"
:
true
},
{
"field"
:
"Name"
,
"width"
:
150
,
"sortable"
:
true
,
"title"
:
"名称"
,
"filter"
:
false
,
"color"
:
"b5e6ff"
,
"isVisible"
:
true
},
{
"field"
:
"GatherTime"
,
"width"
:
150
,
"sortable"
:
true
,
"title"
:
"采集时间"
,
"filter"
:
false
,
"color"
:
"b5e6ff"
,
"isVisible"
:
true
},
{
"field"
:
"Temperature"
,
"width"
:
80
,
"sortable"
:
true
,
"title"
:
"温度"
,
"filter"
:
false
,
"color"
:
"b5e6ff"
,
"isVisible"
:
true
},
{
"field"
:
"Illumination"
,
"width"
:
80
,
"sortable"
:
true
,
"title"
:
"光照"
,
"filter"
:
false
,
"color"
:
"b5e6ff"
,
"isVisible"
:
true
},
{
"field"
:
"Wind"
,
"width"
:
80
,
"sortable"
:
true
,
"title"
:
"风力"
,
"filter"
:
false
,
"color"
:
"b5e6ff"
,
"isVisible"
:
true
}
],
"otherList"
:
[
{
"baseId"
:
6
,
"enName"
:
"MeterPressure"
,
"cnName"
:
"表内压力 KPa"
,
"alias"
:
"表内压力 KPa"
,
"backColor"
:
"B01515"
,
"decimalPoint"
:
2
,
"width"
:
120
,
"orderNum"
:
1
,
"isVisible"
:
true
},
{
"baseId"
:
7
,
"enName"
:
"MeterTemp"
,
"cnName"
:
"表内温度 ℃"
,
"alias"
:
"表内温度 ℃"
,
"backColor"
:
"FFFFFF"
,
"decimalPoint"
:
2
,
"width"
:
120
,
"orderNum"
:
2
,
"isVisible"
:
true
},
{
"baseId"
:
8
,
"enName"
:
"StandardInstantFlow"
,
"cnName"
:
"标况瞬时 NM3/H"
,
"alias"
:
"标况瞬时 NM3/H"
,
"backColor"
:
"FFFFFF"
,
"decimalPoint"
:
2
,
"width"
:
150
,
"orderNum"
:
3
,
"isVisible"
:
true
},
{
"baseId"
:
9
,
"enName"
:
"StandardInstantSum"
,
"cnName"
:
"标况累积 NM3"
,
"alias"
:
"标况累积 NM3"
,
"backColor"
:
"FFFFFF"
,
"decimalPoint"
:
2
,
"width"
:
150
,
"orderNum"
:
4
,
"isVisible"
:
true
},
{
"baseId"
:
10
,
"enName"
:
"Sum"
,
"cnName"
:
"累积 M3"
,
"alias"
:
"工况累积 M3"
,
"backColor"
:
"F6C58E"
,
"decimalPoint"
:
2
,
"width"
:
150
,
"orderNum"
:
5
,
"isVisible"
:
true
},
{
"baseId"
:
55
,
"enName"
:
"GasInstant"
,
"cnName"
:
"瞬时流量 M3"
,
"alias"
:
"工况瞬时流量 M3"
,
"backColor"
:
"FFFFFF"
,
"decimalPoint"
:
2
,
"width"
:
150
,
"orderNum"
:
6
,
"isVisible"
:
true
}
]},
"title"
:
[
{
"baseId"
:
6
,
"enName"
:
"MeterPressure"
,
"cnName"
:
"表内压力 KPa"
,
"alias"
:
"表内压力 KPa"
,
"backColor"
:
"B01515"
,
"decimalPoint"
:
2
,
"width"
:
120
,
"orderNum"
:
1
,
"isVisible"
:
true
},
{
"baseId"
:
7
,
"enName"
:
"MeterTemp"
,
"cnName"
:
"表内温度 ℃"
,
"alias"
:
"表内温度 ℃"
,
"backColor"
:
"FFFFFF"
,
"decimalPoint"
:
2
,
"width"
:
120
,
"orderNum"
:
2
,
"isVisible"
:
true
},
{
"baseId"
:
8
,
"enName"
:
"StandardInstantFlow"
,
"cnName"
:
"标况瞬时 NM3/H"
,
"alias"
:
"标况瞬时 NM3/H"
,
"backColor"
:
"FFFFFF"
,
"decimalPoint"
:
2
,
"width"
:
150
,
"orderNum"
:
3
,
"isVisible"
:
true
},
{
"baseId"
:
9
,
"enName"
:
"StandardInstantSum"
,
"cnName"
:
"标况累积 NM3"
,
"alias"
:
"标况累积 NM3"
,
"backColor"
:
"FFFFFF"
,
"decimalPoint"
:
2
,
"width"
:
150
,
"orderNum"
:
4
,
"isVisible"
:
true
},
{
"baseId"
:
10
,
"enName"
:
"Sum"
,
"cnName"
:
"累积 M3"
,
"alias"
:
"工况累积 M3"
,
"backColor"
:
"F6C58E"
,
"decimalPoint"
:
2
,
"width"
:
150
,
"orderNum"
:
5
,
"isVisible"
:
true
},
{
"baseId"
:
55
,
"enName"
:
"GasInstant"
,
"cnName"
:
"瞬时流量 M3"
,
"alias"
:
"工况瞬时流量 M3"
,
"backColor"
:
"FFFFFF"
,
"decimalPoint"
:
2
,
"width"
:
150
,
"orderNum"
:
6
,
"isVisible"
:
true
}
],
"realData"
:
[
{
"rowIndex"
:
1
,
"supplyId"
:
"b354f45b-23e5-42be-a210-0fb92394f457"
,
"supplyName"
:
"小王庄供热站"
,
"id"
:
"89dc98d3-7287-4b58-bf8b-b8d8336b13fa"
,
"name"
:
"1#调压站"
,
"gatherTime"
:
"2025-01-07 12:54:45"
,
"scadaDeviceStatus"
:
"在线"
,
"meterPressure"
:
"104.83"
,
"meterTemp"
:
"13.19"
,
"standardInstantFlow"
:
"0"
,
"standardInstantSum"
:
"2764468"
,
"sum"
:
"4075402"
,
"gasInstant"
:
"0"
},
{
"rowIndex"
:
2
,
"supplyId"
:
"b354f45b-23e5-42be-a210-0fb92394f457"
,
"supplyName"
:
"小王庄供热站"
,
"id"
:
"4200633f-4a74-4166-bbfd-a23f50be3120"
,
"name"
:
"2#调压站"
,
"gatherTime"
:
"2024-03-20 14:27:03"
,
"scadaDeviceStatus"
:
"离线"
,
"meterPressure"
:
"108.21"
,
"meterTemp"
:
"28.86"
,
"standardInstantFlow"
:
"0"
,
"standardInstantSum"
:
"0"
,
"sum"
:
"0"
,
"gasInstant"
:
"0"
},
{
"rowIndex"
:
3
,
"supplyId"
:
"b354f45b-23e5-42be-a210-0fb92394f457"
,
"supplyName"
:
"小王庄供热站"
,
"id"
:
"9b9cefe7-4fcc-47e0-9a35-0d9dcad9d0eb"
,
"name"
:
"3#调压站"
,
"gatherTime"
:
"2025-01-07 12:52:58"
,
"scadaDeviceStatus"
:
"在线"
,
"meterPressure"
:
"146.69"
,
"meterTemp"
:
"6.16"
,
"standardInstantFlow"
:
"617.89"
,
"standardInstantSum"
:
"8855258"
,
"sum"
:
"4609240"
,
"gasInstant"
:
"406.63"
},
{
"rowIndex"
:
4
,
"supplyId"
:
"b354f45b-23e5-42be-a210-0fb92394f457"
,
"supplyName"
:
"小王庄供热站"
,
"id"
:
"dd87c671-3a57-4a56-9243-14b2f9affff2"
,
"name"
:
"4#调压站"
,
"gatherTime"
:
"2024-03-20 14:27:03"
,
"scadaDeviceStatus"
:
"离线"
,
"meterPressure"
:
"101.41"
,
"meterTemp"
:
"30.66"
,
"standardInstantFlow"
:
"0"
,
"standardInstantSum"
:
"0"
,
"sum"
:
"0"
,
"gasInstant"
:
"0"
}
],
"alarmData"
:
[],
"totalCount"
:
0
}
src/views/RealPage/RealEnergyPage.vue
View file @
a94ccd08
...
...
@@ -251,6 +251,7 @@ import {
ArrowRight
,
Warning
}
from
'@element-plus/icons-vue'
import
{
deviceReal
,
deviceReal2
,
deviceReal3
,
deviceReal4
}
from
'../../dataJson/RealPage/realEnergy'
;
const
enterpriseId
=
ref
(
null
);
enterpriseId
.
value
=
store
.
getters
.
getEnterpriseId
();
var
gatherTime
=
ref
([]);
...
...
@@ -482,7 +483,7 @@ function makeFormsTitle() {
// name: "流量",
// title: [
// { baseId:50 }
//
//
// }
}
...
...
@@ -529,114 +530,175 @@ function setTitleFromResult(result) {
showData
.
value
=
true
;
}
async
function
getForms
()
{
var
deviceType
=
6
;
cardForms
.
tableData
.
length
=
0
;
cardForms
.
alarm
.
length
=
0
;
cardForms
.
title
.
length
=
0
;
makeFormsTitle
();
//test 4气 5水 6热 7电
await
http
.
post
(
'/api/device/title'
,
{
enterpriseId
:
enterpriseId
.
value
,
deviceType
:
4
}).
then
((
result
)
=>
{
setTitleFromResult
(
result
);
})
await
http
.
post
(
'/api/device/title'
,
{
enterpriseId
:
enterpriseId
.
value
,
deviceType
:
5
}).
then
((
result
)
=>
{
setTitleFromResult
(
result
);
})
await
http
.
post
(
'/api/device/title'
,
{
enterpriseId
:
enterpriseId
.
value
,
deviceType
:
6
}).
then
((
result
)
=>
{
setTitleFromResult
(
result
);
})
await
http
.
post
(
'/api/device/title'
,
{
enterpriseId
:
enterpriseId
.
value
,
deviceType
:
7
}).
then
((
result
)
=>
{
setTitleFromResult
(
result
);
})
// await http.post('/api/device/title', { enterpriseId: enterpriseId.value, deviceType: deviceType }).then((result) => {
// showData.value=false
// var tmpForm={name:"其他",title:[]}
// result.data.otherList.forEach(element => {
// var tmp = false;
// formLoop:
// for (var i = 0; i
<
cardForms
.
forms
.
length
;
i
++
)
{
// for (var j = 0; j
<
cardForms
.
forms
[
i
].
title
.
length
;
j
++
)
{
// if (element.baseId === cardForms.forms[i].title[j].baseId) {
// cardForms.forms[i].title[j].prop = element.enName;
// cardForms.forms[i].title[j].color = element.backColor;
// cardForms.forms[i].title[j].label = element.alias;
// cardForms.forms[i].title[j].decimalPoint = element.decimalPoint;
// cardForms.forms[i].title[j].width = element.width;
// tmp = true;
// break formLoop;
// }
// }
// }
// if(tmp===false){
// var tmpelement = {
// baseId: element.baseId,
// prop: element.enName,
// color: element.backColor,
// label: element.alias,
// decimalPoint: element.decimalPoint,
// width: element.width
// }
// tmpForm.title.push(tmpelement);
// tmp = true;
// }
// })
// if(tmpForm.title.length > 0 ){
// cardForms.forms.push(tmpForm)
// }
// showData.value=true;
// })
//动态数据
// async function getForms() {
// var deviceType = 6;
// cardForms.tableData.length = 0;
// cardForms.alarm.length = 0;
// cardForms.title.length = 0;
// makeFormsTitle();
// //test 4气 5水 6热 7电
// await http.post('/api/device/title', { enterpriseId: enterpriseId.value, deviceType: 5 }).then((result) => {
// setTitleFromResult(result);
// console.log(JSON.stringify(result));
// })
// await http.post('/api/device/title', { enterpriseId: enterpriseId.value, deviceType: 6 }).then((result) => {
// setTitleFromResult(result);
// console.log(JSON.stringify(result));
// })
// await http.post('/api/device/title', { enterpriseId: enterpriseId.value, deviceType: 7 }).then((result) => {
// setTitleFromResult(result);
// console.log(JSON.stringify(result));
// })
// await http.post('/api/device/title', { enterpriseId: enterpriseId.value, deviceType: 4 }).then((result) => {
// setTitleFromResult(result);
// console.log(JSON.stringify(result));
// })
// // await http.post('/api/device/title', { enterpriseId: enterpriseId.value, deviceType: deviceType }).then((result) => {
// // showData.value=false
// // var tmpForm={name:"其他",title:[]}
// // result.data.otherList.forEach(element => {
// // var tmp = false;
// // formLoop:
// // for (var i = 0; i
<
cardForms
.
forms
.
length
;
i
++
)
{
// // for (var j = 0; j
<
cardForms
.
forms
[
i
].
title
.
length
;
j
++
)
{
// // if (element.baseId === cardForms.forms[i].title[j].baseId) {
// // cardForms.forms[i].title[j].prop = element.enName;
// // cardForms.forms[i].title[j].color = element.backColor;
// // cardForms.forms[i].title[j].label = element.alias;
// // cardForms.forms[i].title[j].decimalPoint = element.decimalPoint;
// // cardForms.forms[i].title[j].width = element.width;
// // tmp = true;
// // break formLoop;
// // }
// // }
// // }
// // if(tmp===false){
// // var tmpelement = {
// // baseId: element.baseId,
// // prop: element.enName,
// // color: element.backColor,
// // label: element.alias,
// // decimalPoint: element.decimalPoint,
// // width: element.width
// // }
// // tmpForm.title.push(tmpelement);
// // tmp = true;
// // }
// // })
// // if(tmpForm.title.length > 0 ){
// // cardForms.forms.push(tmpForm)
// // }
// // showData.value=true;
// // })
// // console.log(selectList);
// // for (var i = 0; i
<
cardForms
.
forms
.
length
;
i
++
)
{
// // cardForms.tableData[i] = [];
// // }
// await http.post('/api/device/Real', { enterpriseId: enterpriseId.value, deviceType: 5 }).then((result) => {
// //根据返回结果,构建数据表cardForms.tableData和警告表
// //处理:将字段与form对比,放取出对应的name和value,存入正确的tableData
// if(selectList.waterList.length>0){
// findBoilderTableData(result.data, selectList.waterList[showDropdown.value].deviceId);
// console.log(JSON.stringify(result.data));
// console.log(JSON.stringify(selectList.waterList))
// }
// // findBoilderTableData(result.data, selectList.waterList[showDropdown.value].deviceId);
// })
// await http.post('/api/device/Real', { enterpriseId: enterpriseId.value, deviceType: 6 }).then((result) => {
// //根据返回结果,构建数据表cardForms.tableData和警告表
// //处理:将字段与form对比,放取出对应的name和value,存入正确的tableData
// if(selectList.heatList.length > 0){
// findBoilderTableData(result.data, selectList.heatList[showDropdown.value].deviceId);
// console.log(JSON.stringify(result.data));
// console.log(JSON.stringify(selectList.heatList))
// }
// // findBoilderTableData(result.data, selectList.heatList[showDropdown.value].deviceId);
// })
// await http.post('/api/device/Real', { enterpriseId: enterpriseId.value, deviceType: 7 }).then((result) => {
// //根据返回结果,构建数据表cardForms.tableData和警告表
// //处理:将字段与form对比,放取出对应的name和value,存入正确的tableData
// if(selectList.elecList.length>0){
// findBoilderTableData(result.data, selectList.elecList[showDropdown.value].deviceId);
// console.log(JSON.stringify(result.data));
// console.log(JSON.stringify(selectList.elecList))
// }
// })
// await http.post('/api/device/Real', { enterpriseId: enterpriseId.value, deviceType: 4 }).then((result) => {
// //根据返回结果,构建数据表cardForms.tableData和警告表
// //处理:将字段与form对比,放取出对应的name和value,存入正确的tableData
// if(selectList.gasList.length>0){
// findBoilderTableData(result.data, selectList.gasList[showDropdown.value].deviceId);
// console.log(JSON.stringify(result.data));
// console.log(JSON.stringify(selectList.gasList))
// }
// })
// // console.log(cardForms)
// console.log( JSON.stringify(cardForms));
// }
//静态数据
async
function
getForms
()
{
var
deviceType
=
6
;
cardForms
.
tableData
.
length
=
0
;
cardForms
.
alarm
.
length
=
0
;
cardForms
.
title
.
length
=
0
;
makeFormsTitle
();
// 直接使用 deviceReal 中的数据
setTitleFromResult
(
deviceReal
);
console
.
log
(
JSON
.
stringify
(
deviceReal
));
setTitleFromResult
(
deviceReal2
);
console
.
log
(
JSON
.
stringify
(
deviceReal2
));
setTitleFromResult
(
deviceReal3
);
console
.
log
(
JSON
.
stringify
(
deviceReal3
));
setTitleFromResult
(
deviceReal4
);
console
.
log
(
JSON
.
stringify
(
deviceReal4
));
// 根据返回结果,构建数据表 cardForms.tableData 和警告表
if
(
selectList
.
waterList
.
length
>
0
)
{
findBoilderTableData
(
deviceReal
,
selectList
.
waterList
[
showDropdown
.
value
].
deviceId
);
console
.
log
(
JSON
.
stringify
(
deviceReal
));
console
.
log
(
JSON
.
stringify
(
selectList
.
waterList
));
}
// console.log(selectList);
// for (var i = 0; i
<
cardForms
.
forms
.
length
;
i
++
)
{
// cardForms.tableData[i] = [];
// }
await
http
.
post
(
'/api/device/Real'
,
{
enterpriseId
:
enterpriseId
.
value
,
deviceType
:
5
}).
then
((
result
)
=>
{
//根据返回结果,构建数据表cardForms.tableData和警告表
//处理:将字段与form对比,放取出对应的name和value,存入正确的tableData
if
(
selectList
.
waterList
.
length
>
0
){
findBoilderTableData
(
result
.
data
,
selectList
.
waterList
[
showDropdown
.
value
].
deviceId
);
}
// findBoilderTableData(result.data, selectList.waterList[showDropdown.value].deviceId);
})
await
http
.
post
(
'/api/device/Real'
,
{
enterpriseId
:
enterpriseId
.
value
,
deviceType
:
6
}).
then
((
result
)
=>
{
//根据返回结果,构建数据表cardForms.tableData和警告表
//处理:将字段与form对比,放取出对应的name和value,存入正确的tableData
if
(
selectList
.
heatList
.
length
>
0
){
findBoilderTableData
(
result
.
data
,
selectList
.
heatList
[
showDropdown
.
value
].
deviceId
);
}
// findBoilderTableData(result.data, selectList.heatList[showDropdown.value].deviceId);
})
if
(
selectList
.
heatList
.
length
>
0
)
{
findBoilderTableData
(
deviceReal2
,
selectList
.
heatList
[
showDropdown
.
value
].
deviceId
);
console
.
log
(
JSON
.
stringify
(
deviceReal2
));
console
.
log
(
JSON
.
stringify
(
selectList
.
heatList
));
}
await
http
.
post
(
'/api/device/Real'
,
{
enterpriseId
:
enterpriseId
.
value
,
deviceType
:
7
}).
then
((
result
)
=>
{
//根据返回结果,构建数据表cardForms.tableData和警告表
//处理:将字段与form对比,放取出对应的name和value,存入正确的tableData
if
(
selectList
.
elecList
.
length
>
0
){
findBoilderTableData
(
result
.
data
,
selectList
.
elecList
[
showDropdown
.
value
].
deviceId
);
}
})
if
(
selectList
.
elecList
.
length
>
0
)
{
findBoilderTableData
(
deviceReal3
,
selectList
.
elecList
[
showDropdown
.
value
].
deviceId
);
console
.
log
(
JSON
.
stringify
(
deviceReal3
));
console
.
log
(
JSON
.
stringify
(
selectList
.
elecList
));
}
await
http
.
post
(
'/api/device/Real'
,
{
enterpriseId
:
enterpriseId
.
value
,
deviceType
:
4
}).
then
((
result
)
=>
{
//根据返回结果,构建数据表cardForms.tableData和警告表
//处理:将字段与form对比,放取出对应的name和value,存入正确的tableData
if
(
selectList
.
gasList
.
length
>
0
){
findBoilderTableData
(
result
.
data
,
selectList
.
gasList
[
showDropdown
.
value
].
deviceId
);
}
})
if
(
selectList
.
gasList
.
length
>
0
)
{
findBoilderTableData
(
deviceReal4
,
selectList
.
gasList
[
showDropdown
.
value
].
deviceId
);
console
.
log
(
JSON
.
stringify
(
deviceReal4
));
console
.
log
(
JSON
.
stringify
(
selectList
.
gasList
));
}
// console.log(cardForms)
console
.
log
(
JSON
.
stringify
(
cardForms
));
console
.
log
(
JSON
.
stringify
(
cardForms
));
}
function
findBoilderTableData
(
dataSource
,
Id
)
{
//找到id相同的,解析并存入数据表
var
data
=
dataSource
.
realData
;
console
.
log
(
JSON
.
stringify
(
dataSource
.
realData
));
// console.log(dataSource)
// for (var i = 0; i
<
data
.
length
;
i
++
)
{
// // console.log(data[i]['id'])
...
...
@@ -777,4 +839,4 @@ function thisIsNumber(val) {
return
/^
[
0-9
]
*$/
.
test
(
val
)
?
val
:
""
;
}
</
script
>
\ No newline at end of file
</
script
>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment