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
a3c2038d
Commit
a3c2038d
authored
Jul 20, 2024
by
朱超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
换热站趋势图更新
parent
3dfd5b83
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
322 additions
and
85 deletions
+322
-85
analysis.js
src/api/analysis.js
+37
-1
TransferEnergyView.vue
src/views/HandlerPage/TransferEnergyView.vue
+285
-84
No files found.
src/api/analysis.js
View file @
a3c2038d
...
@@ -43,9 +43,45 @@ export const postFirBackT = params => {
...
@@ -43,9 +43,45 @@ export const postFirBackT = params => {
})
})
}
}
//一网万平米流量
export
const
postWPMLL
=
params
=>
{
return
http
.
post
(
`/api/analysis/external/WPMLL`
,
params
).
then
(
res
=>
res
).
catch
(
function
(
error
)
{
console
.
log
(
error
);
})
}
//换热站板换效率
export
const
postHeatEffiUc
=
params
=>
{
return
http
.
post
(
`/api/analysis/external/HeatEffiUc`
,
params
).
then
(
res
=>
res
).
catch
(
function
(
error
)
{
console
.
log
(
error
);
})
}
//换热站二网均温
export
const
postSecAvgTUc
=
params
=>
{
return
http
.
post
(
`/api/analysis/external/SecAvgTUc`
,
params
).
then
(
res
=>
res
).
catch
(
function
(
error
)
{
console
.
log
(
error
);
})
}
//二网温差
export
const
postSecAbsTUc
=
params
=>
{
return
http
.
post
(
`/api/analysis/external/SecAbsTUc`
,
params
).
then
(
res
=>
res
).
catch
(
function
(
error
)
{
console
.
log
(
error
);
})
}
// //二网温差
// export const postSecAvgTUc = params => {
// return http.post(`/api/analysis/external/SecAvgTUc`, params).then(res => res).catch(function (error) {
// console.log(error);
// })
// }
//热量分析报表
//热量分析报表
export
const
postHeatAnalysis
=
params
=>
{
export
const
postHeatAnalysis
=
params
=>
{
return
http
.
post
(
`/api/analysis/report/HeatAnalysis`
,
params
).
then
(
res
=>
res
).
catch
(
function
(
error
)
{
return
http
.
post
(
`/api/analysis/report/HeatAnalysis`
,
params
).
then
(
res
=>
res
).
catch
(
function
(
error
)
{
console
.
log
(
error
);
console
.
log
(
error
);
})
})
}
}
\ No newline at end of file
src/views/HandlerPage/TransferEnergyView.vue
View file @
a3c2038d
<
template
>
<
template
>
<div
class=
"contentBlock"
id=
"contentBlock"
>
<div
class=
"contentBlock"
id=
"contentBlock"
>
<el-card
class=
"card-contianer"
>
<el-card
class=
"card-contianer"
>
<el-form
:inline=
"true"
:model=
"formInline"
class=
"demo-form-inline"
>
<el-form
<!-- 控制表格和图表的开关 -->
:inline=
"true"
<el-form-item>
:model=
"heatUctInfo"
<el-switch
class=
"demo-form-inline"
v-model=
"switchV"
:rules=
"rules"
active-text=
"表格"
ref=
"formRef"
inactive-text=
"曲线图"
>
style=
"
<el-form-item
label=
"换热机组:"
prop=
"transferId"
>
--el-switch-on-color: #13ce66;
--el-switch-off-color: #ff4949;
min-width: 130px;
"
@
change=
"changeFun"
/>
</el-form-item>
<el-form-item
label=
"换热机组:"
>
<el-cascader
<el-cascader
:options=
"options"
:options=
"options"
v-model=
"heatUctInfo.transferId"
v-model=
"heatUctInfo.transferId"
...
@@ -25,10 +17,10 @@
...
@@ -25,10 +17,10 @@
clearable
clearable
:show-all-levels=
"false"
:show-all-levels=
"false"
placeholder=
"请选择"
placeholder=
"请选择"
style=
"width:
13
0px"
style=
"width:
22
0px"
/>
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"开始时间:"
>
<el-form-item
label=
"开始时间:"
prop=
"startTime"
>
<el-config-provider
:locale=
"zhCn"
>
<el-config-provider
:locale=
"zhCn"
>
<el-date-picker
<el-date-picker
type=
"datetime"
type=
"datetime"
...
@@ -39,7 +31,7 @@
...
@@ -39,7 +31,7 @@
/>
/>
</el-config-provider>
</el-config-provider>
</el-form-item>
</el-form-item>
<el-form-item
label=
"结束时间:"
>
<el-form-item
label=
"结束时间:"
prop=
"endTime"
>
<el-config-provider
:locale=
"zhCn"
>
<el-config-provider
:locale=
"zhCn"
>
<el-date-picker
<el-date-picker
type=
"datetime"
type=
"datetime"
...
@@ -55,7 +47,6 @@
...
@@ -55,7 +47,6 @@
v-model=
"heatUctInfo.interval"
v-model=
"heatUctInfo.interval"
placeholder=
"请选择"
placeholder=
"请选择"
style=
"min-width: 80px"
style=
"min-width: 80px"
clearable
>
>
<el-option
label=
"小时"
:value=
"0"
/>
<el-option
label=
"小时"
:value=
"0"
/>
<el-option
label=
"日"
:value=
"1"
/>
<el-option
label=
"日"
:value=
"1"
/>
...
@@ -63,11 +54,41 @@
...
@@ -63,11 +54,41 @@
<el-option
label=
"月"
:value=
"3"
/>
<el-option
label=
"月"
:value=
"3"
/>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"能耗类型"
>
<el-select
v-model=
"heatUctInfo.type"
placeholder=
"请选择"
style=
"min-width: 150px"
>
<!--
<el-option
label=
"用量环比"
:value=
"0"
/>
-->
<el-option
label=
"热单耗"
:value=
"1"
/>
<el-option
label=
"电单耗"
:value=
"2"
/>
<el-option
label=
"水单耗"
:value=
"3"
/>
<el-option
label=
"度日数热耗"
:value=
"4"
/>
<el-option
label=
"一网回温"
:value=
"5"
/>
<el-option
label=
"一网万平米流量"
:value=
"6"
/>
<el-option
label=
"换热站板换效率"
:value=
"7"
/>
<el-option
label=
"换热站二网均温"
:value=
"8"
/>
<!--
<el-option
label=
"二网温差"
:value=
"9"
/>
<el-option
label=
"二网均温"
:value=
"10"
/>
-->
</el-select>
</el-form-item>
<!-- 控制表格和图表的开关 -->
<el-form-item>
<el-form-item>
<el-button
<el-switch
type=
"primary"
v-model=
"switchV"
style=
"min-width: 70px"
active-text=
"表格"
@
click=
"postHeatUctFun"
inactive-text=
"曲线图"
style=
"
--el-switch-on-color: #13ce66;
--el-switch-off-color: #ff4949;
min-width: 130px;
"
@
change=
"changeFun"
/>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
style=
"min-width: 70px"
@
click=
"sendClick"
>
查询
</el-button
>
查询
</el-button
>
>
</el-form-item>
</el-form-item>
...
@@ -106,7 +127,8 @@ import store from "../../store/index";
...
@@ -106,7 +127,8 @@ import store from "../../store/index";
import
*
as
echarts
from
"echarts"
;
import
*
as
echarts
from
"echarts"
;
import
http
from
"../../api/http"
;
import
http
from
"../../api/http"
;
import
zhCn
from
"element-plus/dist/locale/zh-cn.mjs"
;
import
zhCn
from
"element-plus/dist/locale/zh-cn.mjs"
;
import
{
postHeatUct
}
from
"../../api/analysis"
;
import
{
ElMessage
}
from
"element-plus"
;
import
{
postQOQlist
,
postHeatUct
,
postElecUc
,
postWaterUc
,
postDayHeat
,
postFirBackT
,
postWPMLL
,
postHeatEffiUc
,
postSecAvgTUc
,
postSecAbsTUc
}
from
"../../api/analysis"
;
const
options
=
reactive
([]);
const
options
=
reactive
([]);
const
enterpriseId
=
ref
();
const
enterpriseId
=
ref
();
const
props
=
{
multiple
:
true
,
emitPath
:
false
};
const
props
=
{
multiple
:
true
,
emitPath
:
false
};
...
@@ -122,13 +144,22 @@ const tabloading = ref(false);
...
@@ -122,13 +144,22 @@ const tabloading = ref(false);
const
tableHeight
=
ref
(
500
);
const
tableHeight
=
ref
(
500
);
const
computedWidth
=
ref
(
"1200px"
);
const
computedWidth
=
ref
(
"1200px"
);
const
computedHeight
=
ref
(
"500px"
);
const
computedHeight
=
ref
(
"500px"
);
const
formRef
=
ref
(
null
);
const
heatUctInfo
=
reactive
({
const
heatUctInfo
=
reactive
({
supplyId
:
null
,
supplyId
:
null
,
transferId
:
[],
transferId
:
[],
startTime
:
null
,
startTime
:
null
,
endTime
:
null
,
endTime
:
null
,
interval
:
2
,
interval
:
2
,
type
:
1
,
});
});
const
heatUctInfoStyle
=
reactive
(
0
);
const
rules
=
{
transferId
:
[{
required
:
true
,
message
:
"请选择换热机组"
,
trigger
:
"blur"
}],
startTime
:
[{
required
:
true
,
message
:
"请选择开始时间"
,
trigger
:
"blur"
}],
endTime
:
[{
required
:
true
,
message
:
"请选择结束时间"
,
trigger
:
"blur"
}],
};
function
getEnterprise
()
{
function
getEnterprise
()
{
var
result
=
store
.
getters
.
getEnterprise
();
var
result
=
store
.
getters
.
getEnterprise
();
...
@@ -172,6 +203,61 @@ function getSupplys() {
...
@@ -172,6 +203,61 @@ function getSupplys() {
}
}
}
}
function
sendClick
()
{
formRef
.
value
.
validate
((
valid
)
=>
{
if
(
valid
)
{
switch
(
heatUctInfo
.
type
)
{
case
0
:
postQOQlistFun
();
break
;
//用量环比
case
1
:
postHeatUctFun
();
break
;
//热单耗
case
2
:
postElecUcFun
();
//电单耗
break
;
case
3
:
postWaterUcFun
();
//电单耗
break
;
case
4
:
postDayHeatFun
();
//度日数热耗
break
;
case
5
:
postFirBackTFun
();
//一网回温
break
;
case
6
:
postWPMLLFun
();
//一网万平米流量
break
;
case
7
:
postHeatEffiUcFun
();
//换热站板换效率
break
;
case
8
:
postSecAvgTUcFun
();
//换热站二网均温
break
;
}
}
else
{
console
.
log
(
"验证失败"
);
return
false
;
}
});
}
//换热站机组能耗数据接口(用量环比)
function
postQOQlistFun
()
{
tabloading
.
value
=
true
;
postQOQlist
(
heatUctInfo
).
then
((
res
)
=>
{
echarts
.
dispose
(
document
.
getElementById
(
"echartsLayer"
));
if
(
res
.
success
===
true
)
{
pageInitFun
(
res
);
}
else
if
(
res
.
status
==
9
)
{
setInterval
(
function
()
{
tabloading
.
value
=
false
;
this
.
postQOQlistFun
();
},
600000
);
}
});
}
//换热站机组能耗数据接口(热单耗)
//换热站机组能耗数据接口(热单耗)
function
postHeatUctFun
()
{
function
postHeatUctFun
()
{
tabloading
.
value
=
true
;
tabloading
.
value
=
true
;
...
@@ -189,64 +275,7 @@ function postHeatUctFun() {
...
@@ -189,64 +275,7 @@ function postHeatUctFun() {
echarts
.
dispose
(
document
.
getElementById
(
"echartsLayer"
));
echarts
.
dispose
(
document
.
getElementById
(
"echartsLayer"
));
// postHeatUct(params).then((res) => {
// postHeatUct(params).then((res) => {
if
(
res
.
success
===
true
)
{
if
(
res
.
success
===
true
)
{
tableData
.
length
=
0
;
pageInitFun
(
res
);
res
.
data
.
forEach
((
element
)
=>
{
let
tableArr
=
{
transferName
:
element
.
transferName
,
gatherTime
:
element
.
gatherTime
,
temperature
:
element
.
temperature
,
};
tableData
.
push
(
tableArr
);
});
nodata
.
value
=
true
;
tabloading
.
value
=
false
;
echartData
.
length
=
0
;
echartSeries
.
length
=
0
;
echartDataLegend
.
length
=
0
;
echartDataTime
.
length
=
0
;
echartData
.
value
=
dataDeal
(
res
.
data
);
echartData
.
value
[
0
].
listInfo
.
forEach
((
element
)
=>
{
if
(
element
.
gatherTime
)
{
echartDataTime
.
push
(
element
.
gatherTime
.
split
(
" 00:00:00"
)[
0
]);
}
});
echartData
.
value
.
forEach
((
element
)
=>
{
let
data1
=
[];
let
data2
=
[];
element
.
listInfo
.
forEach
((
item
)
=>
{
data1
.
push
(
item
.
temperature
);
data2
.
push
(
parseFloat
(
item
.
uc
).
toFixed
(
2
));
});
echartSeries
.
push
(
{
name
:
element
.
transferName
+
"温度"
,
type
:
"line"
,
tooltip
:
{
valueFormatter
:
function
(
value
)
{
return
value
+
" ℃"
;
},
},
data
:
data1
,
},
{
name
:
element
.
transferName
+
"能耗"
,
type
:
"bar"
,
yAxisIndex
:
1
,
tooltip
:
{
valueFormatter
:
function
(
value
)
{
return
value
;
},
},
data
:
data2
,
}
);
});
echartSeries
.
forEach
((
element
,
index
)
=>
{
console
.
log
(
element
);
echartDataLegend
.
push
(
element
.
name
);
});
echartInit
();
}
else
if
(
res
.
status
==
9
)
{
}
else
if
(
res
.
status
==
9
)
{
setInterval
(
function
()
{
setInterval
(
function
()
{
tabloading
.
value
=
false
;
tabloading
.
value
=
false
;
...
@@ -256,6 +285,178 @@ function postHeatUctFun() {
...
@@ -256,6 +285,178 @@ function postHeatUctFun() {
});
});
}
}
//换热站机组能耗数据接口(电单耗)
function
postElecUcFun
()
{
tabloading
.
value
=
true
;
postElecUc
(
heatUctInfo
).
then
((
res
)
=>
{
echarts
.
dispose
(
document
.
getElementById
(
"echartsLayer"
));
if
(
res
.
success
===
true
)
{
pageInitFun
(
res
);
}
else
if
(
res
.
status
==
9
)
{
setInterval
(
function
()
{
tabloading
.
value
=
false
;
this
.
postElecUcFun
();
},
600000
);
}
});
}
//换热站机组能耗数据接口(水单耗)
function
postWaterUcFun
()
{
tabloading
.
value
=
true
;
postWaterUc
(
heatUctInfo
).
then
((
res
)
=>
{
echarts
.
dispose
(
document
.
getElementById
(
"echartsLayer"
));
if
(
res
.
success
===
true
)
{
pageInitFun
(
res
);
}
else
if
(
res
.
status
==
9
)
{
setInterval
(
function
()
{
tabloading
.
value
=
false
;
this
.
postWaterUcFun
();
},
600000
);
}
});
}
//换热站机组能耗数据接口(度日数热耗)
function
postDayHeatFun
()
{
tabloading
.
value
=
true
;
postDayHeat
(
heatUctInfo
).
then
((
res
)
=>
{
echarts
.
dispose
(
document
.
getElementById
(
"echartsLayer"
));
if
(
res
.
success
===
true
)
{
pageInitFun
(
res
);
}
else
if
(
res
.
status
==
9
)
{
setInterval
(
function
()
{
tabloading
.
value
=
false
;
this
.
postDayHeatFun
();
},
600000
);
}
});
}
//换热站机组能耗数据接口(一网回温)
function
postFirBackTFun
()
{
tabloading
.
value
=
true
;
postFirBackT
(
heatUctInfo
).
then
((
res
)
=>
{
echarts
.
dispose
(
document
.
getElementById
(
"echartsLayer"
));
if
(
res
.
success
===
true
)
{
pageInitFun
(
res
);
}
else
if
(
res
.
status
==
9
)
{
setInterval
(
function
()
{
tabloading
.
value
=
false
;
this
.
postFirBackTFun
();
},
600000
);
}
});
}
//换热站机组能耗数据接口(一网万平米流量)
function
postWPMLLFun
()
{
tabloading
.
value
=
true
;
postWPMLL
(
heatUctInfo
).
then
((
res
)
=>
{
echarts
.
dispose
(
document
.
getElementById
(
"echartsLayer"
));
if
(
res
.
success
===
true
)
{
pageInitFun
(
res
);
}
else
if
(
res
.
status
==
9
)
{
setInterval
(
function
()
{
tabloading
.
value
=
false
;
this
.
postWPMLLFun
();
},
600000
);
}
});
}
//换热站机组能耗数据接口(一网万平米流量)
function
postHeatEffiUcFun
()
{
tabloading
.
value
=
true
;
postHeatEffiUc
(
heatUctInfo
).
then
((
res
)
=>
{
echarts
.
dispose
(
document
.
getElementById
(
"echartsLayer"
));
if
(
res
.
success
===
true
)
{
pageInitFun
(
res
);
}
else
if
(
res
.
status
==
9
)
{
setInterval
(
function
()
{
tabloading
.
value
=
false
;
this
.
postHeatEffiUcFun
();
},
600000
);
}
});
}
//换热站机组能耗数据接口(换热站二网均温)
function
postSecAvgTUcFun
()
{
tabloading
.
value
=
true
;
postSecAvgTUc
(
heatUctInfo
).
then
((
res
)
=>
{
echarts
.
dispose
(
document
.
getElementById
(
"echartsLayer"
));
if
(
res
.
success
===
true
)
{
pageInitFun
(
res
);
}
else
if
(
res
.
status
==
9
)
{
setInterval
(
function
()
{
tabloading
.
value
=
false
;
this
.
postSecAvgTUcFun
();
},
600000
);
}
});
}
function
pageInitFun
(
res
)
{
tableData
.
length
=
0
;
res
.
data
.
forEach
((
element
)
=>
{
let
tableArr
=
{
transferName
:
element
.
transferName
,
gatherTime
:
element
.
gatherTime
,
temperature
:
element
.
temperature
,
};
tableData
.
push
(
tableArr
);
});
nodata
.
value
=
true
;
tabloading
.
value
=
false
;
echartData
.
length
=
0
;
echartSeries
.
length
=
0
;
echartDataLegend
.
length
=
0
;
echartDataTime
.
length
=
0
;
echartData
.
value
=
dataDeal
(
res
.
data
);
echartData
.
value
[
0
].
listInfo
.
forEach
((
element
)
=>
{
if
(
element
.
gatherTime
)
{
echartDataTime
.
push
(
element
.
gatherTime
.
split
(
" 00:00:00"
)[
0
]);
}
});
echartData
.
value
.
forEach
((
element
)
=>
{
let
data1
=
[];
let
data2
=
[];
element
.
listInfo
.
forEach
((
item
)
=>
{
data1
.
push
(
item
.
temperature
);
data2
.
push
(
parseFloat
(
item
.
uc
).
toFixed
(
2
));
});
echartSeries
.
push
(
{
name
:
element
.
transferName
+
"温度"
,
type
:
"line"
,
tooltip
:
{
valueFormatter
:
function
(
value
)
{
return
value
+
" ℃"
;
},
},
data
:
data1
,
},
{
name
:
element
.
transferName
+
"能耗"
,
type
:
"bar"
,
yAxisIndex
:
1
,
tooltip
:
{
valueFormatter
:
function
(
value
)
{
return
value
;
},
},
data
:
data2
,
}
);
});
echartSeries
.
forEach
((
element
,
index
)
=>
{
echartDataLegend
.
push
(
element
.
name
);
});
echartInit
();
}
function
setContentHeight
()
{
function
setContentHeight
()
{
tableHeight
.
value
=
window
.
innerHeight
-
232
;
tableHeight
.
value
=
window
.
innerHeight
-
232
;
}
}
...
@@ -398,7 +599,7 @@ onUnmounted(() => {
...
@@ -398,7 +599,7 @@ onUnmounted(() => {
margin-right: 10px;
margin-right: 10px;
}
}
.el-form-item {
.el-form-item {
margin: 5px 5px
0
!important;
margin: 5px 5px
10px
!important;
}
}
.echartsLayer {
.echartsLayer {
width: 100%;
width: 100%;
...
...
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