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
91d03704
Commit
91d03704
authored
Aug 01, 2024
by
朱超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
环比增加国内接口
parent
16d572bd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
70 additions
and
29 deletions
+70
-29
analysis.js
src/api/analysis.js
+9
-2
QOQ.vue
src/views/HandlerPage/QOQ.vue
+61
-27
No files found.
src/api/analysis.js
View file @
91d03704
...
...
@@ -78,8 +78,15 @@ export const postHeatAnalysis = params => {
})
}
//换热站机组用量环比接口(耗水量、耗电量、耗热量)
export
const
postQOQ
=
params
=>
{
//换热站机组用量环比接口(耗水量、耗电量、耗热量)网内
export
const
postWithinQOQ
=
params
=>
{
return
http
.
post
(
`/api/analysis/within/QOQ`
,
params
).
then
(
res
=>
res
).
catch
(
function
(
error
)
{
console
.
log
(
error
);
})
}
//换热站机组用量环比接口(耗水量、耗电量、耗热量)网外
export
const
postExternalQOQ
=
params
=>
{
return
http
.
post
(
`/api/analysis/external/QOQ`
,
params
).
then
(
res
=>
res
).
catch
(
function
(
error
)
{
console
.
log
(
error
);
})
...
...
src/views/HandlerPage/QOQ.vue
View file @
91d03704
...
...
@@ -101,7 +101,7 @@
v-model=
"enertyInfo.energyType"
placeholder=
"请选择"
style=
"width: 80px"
@
change=
"postQOQFun"
@
change=
"post
External
QOQFun"
>
<el-option
label=
"耗气"
:value=
"1"
v-show=
"networkType == 1"
/>
<el-option
label=
"耗水"
:value=
"2"
/>
...
...
@@ -113,7 +113,7 @@
<div
style=
"position: absolute; right: 2%"
>
<el-button
type=
"primary"
@
click=
"postQOQFun"
@
click=
"post
External
QOQFun"
style=
"margin: 15px 0 0 0"
>
查询
</el-button
><el-button
...
...
@@ -173,7 +173,7 @@ import zhCn from "element-plus/dist/locale/zh-cn.mjs";
import
{
ElMessage
}
from
"element-plus"
;
import
{
saveAs
}
from
"file-saver"
;
import
XLSX
from
"xlsx-js-style"
;
import
{
postQOQ
}
from
"../../api/analysis"
;
import
{
post
ExternalQOQ
,
postWithin
QOQ
}
from
"../../api/analysis"
;
const
tdType
=
ref
(
1
);
const
networkType
=
ref
(
2
);
...
...
@@ -194,6 +194,7 @@ const switchV = ref(true);
const
echartF
=
ref
(
false
);
const
nodata
=
ref
(
false
);
let
tableData
=
reactive
([]);
const
echartTitle
=
reactive
([
"耗水量趋势图"
]);
const
echartData
=
reactive
([]);
const
echartDataTime
=
reactive
([]);
const
echartDataLegend
=
reactive
([]);
...
...
@@ -348,12 +349,25 @@ function selTypeChange() {
}
//换热站机组能耗数据接口(用量环比)
function
postQOQFun
()
{
function
post
External
QOQFun
()
{
tabloading
.
value
=
true
;
switch
(
enertyInfo
.
energyType
)
{
case
2
:
company
.
value
=
"T"
;
break
;
case
3
:
company
.
value
=
"GJ"
;
break
;
case
4
:
company
.
value
=
"A"
;
break
;
switch
(
enertyInfo
.
energyType
)
{
case
1
:
company
.
value
=
"Nm³"
;
echartTitle
.
value
=
"耗气量趋势图"
;
break
;
case
2
:
company
.
value
=
"T"
;
echartTitle
.
value
=
"耗水量趋势图"
;
break
;
case
3
:
company
.
value
=
"GJ"
;
echartTitle
.
value
=
"耗热量趋势图"
;
break
;
case
4
:
company
.
value
=
"A"
;
echartTitle
.
value
=
"耗电量趋势图"
;
break
;
}
let
params
=
{
supplyIdList
:
networkType
.
value
==
1
?
enertyInfo
.
supplyIdList
:
null
,
...
...
@@ -363,22 +377,41 @@ function postQOQFun() {
energyType
:
enertyInfo
.
energyType
,
interval
:
enertyInfo
.
interval
,
};
postQOQ
(
params
).
then
((
res
)
=>
{
echarts
.
dispose
(
document
.
getElementById
(
"echartsLayer"
));
if
(
res
.
success
===
true
)
{
pageInitFun
(
res
);
tableData
=
res
.
data
.
hourWater
;
tabloading
.
value
=
false
;
}
else
{
echartData
.
length
=
0
;
echartSeries
.
length
=
0
;
echartDataLegend
.
length
=
0
;
echartDataTime
.
length
=
0
;
tableData
.
length
=
0
;
tabloading
.
value
=
false
;
ElMessage
.
error
(
res
.
message
);
}
});
clearData
();
if
(
networkType
.
value
==
2
)
{
postExternalQOQ
(
params
).
then
((
res
)
=>
{
echarts
.
dispose
(
document
.
getElementById
(
"echartsLayer"
));
if
(
res
.
success
===
true
)
{
if
(
res
.
data
.
hourWater
.
length
>
0
)
{
pageInitFun
(
res
);
tableData
=
res
.
data
.
hourWater
;
}
}
else
{
ElMessage
.
error
(
res
.
message
);
}
});
}
else
{
postWithinQOQ
(
params
).
then
((
res
)
=>
{
echarts
.
dispose
(
document
.
getElementById
(
"echartsLayer"
));
if
(
res
.
success
===
true
)
{
if
(
res
.
data
.
data
.
length
>
0
)
{
pageInitFun
(
res
);
tableData
=
res
.
data
.
hourWater
;
}
}
else
{
ElMessage
.
error
(
res
.
message
);
}
});
}
}
function
clearData
()
{
echartData
.
length
=
0
;
echartSeries
.
length
=
0
;
echartDataLegend
.
length
=
0
;
echartDataTime
.
length
=
0
;
tableData
.
length
=
0
;
tabloading
.
value
=
false
;
}
function
pageInitFun
(
res
)
{
...
...
@@ -488,7 +521,7 @@ function dataDeal(data) {
gatherDay
:
el
.
gatherDay
,
gatherHour
:
el
.
gatherHour
,
gatherMonth
:
el
.
gatherMonth
,
gatherTime
:
el
.
gatherTime
,
gatherTime
:
el
.
gatherTime
.
replace
(
"T"
,
" "
)
,
gatherYear
:
el
.
gatherYear
,
temperature
:
el
.
temperature
,
transferId
:
el
.
transferId
,
...
...
@@ -524,7 +557,7 @@ function echartInit() {
"#470c66"
,
],
title
:
{
text
:
"换热站趋势图"
,
text
:
echartTitle
.
value
,
top
:
0
,
left
:
50
,
},
...
...
@@ -582,6 +615,7 @@ function echartInit() {
}
function
changeFun
()
{
tabloading
.
value
=
false
;
nodata
.
value
=
true
;
var
divWidth
=
document
.
getElementById
(
"contentBlock"
).
offsetWidth
;
var
divHeight
=
document
.
getElementById
(
"contentBlock"
).
scrollHeight
;
...
...
@@ -594,7 +628,7 @@ onMounted(() => {
timeFun
();
getEnterprise
();
getSupplys
();
postQOQFun
();
post
External
QOQFun
();
changeFun
();
window
.
addEventListener
(
"resize"
,
function
()
{
location
.
reload
();
...
...
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