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
9c034f4d
Commit
9c034f4d
authored
Aug 05, 2024
by
朱超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
环比同比更新
parent
061a9056
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
100 additions
and
60 deletions
+100
-60
QOQ.vue
src/views/HandlerPage/QOQ.vue
+98
-58
YOY.vue
src/views/HandlerPage/YOY.vue
+2
-2
No files found.
src/views/HandlerPage/QOQ.vue
View file @
9c034f4d
...
@@ -229,9 +229,12 @@ function getEnterprise() {
...
@@ -229,9 +229,12 @@ function getEnterprise() {
}
}
function
transferIdChange
()
{
function
transferIdChange
()
{
if
(
enertyInfo
.
transferId
.
length
>
10
)
{
if
(
networkType
.
value
==
2
)
{
if
(
enertyInfo
.
idList
.
length
>
10
)
{
ElMessage
.
error
(
"换热机组最多只能选择10个"
);
ElMessage
.
error
(
"换热机组最多只能选择10个"
);
}
}
}
else
{
}
}
}
function
exportTableToExcel
()
{
function
exportTableToExcel
()
{
...
@@ -243,7 +246,7 @@ function exportTableToExcel() {
...
@@ -243,7 +246,7 @@ function exportTableToExcel() {
transferName
:
element
.
transferName
,
transferName
:
element
.
transferName
,
gatherTime
:
element
.
gatherTime
.
replace
(
"T"
,
" "
),
gatherTime
:
element
.
gatherTime
.
replace
(
"T"
,
" "
),
temperature
:
element
.
temperature
,
temperature
:
element
.
temperature
,
record
:
element
.
record
,
record
:
parseFloat
(
element
.
record
)
,
};
};
exlData
.
push
(
tableArr
);
exlData
.
push
(
tableArr
);
});
});
...
@@ -415,6 +418,10 @@ function selTypeChange() {
...
@@ -415,6 +418,10 @@ function selTypeChange() {
//换热站机组能耗数据接口(用量环比)
//换热站机组能耗数据接口(用量环比)
function
postExternalQOQFun
()
{
function
postExternalQOQFun
()
{
if
(
enertyInfo
.
idList
.
length
>
10
)
{
ElMessage
.
error
(
"换热机组最多只能选择10个"
);
return
false
;
}
loading
.
value
=
true
;
loading
.
value
=
true
;
echarts
.
dispose
(
document
.
getElementById
(
"echartsLayer"
));
echarts
.
dispose
(
document
.
getElementById
(
"echartsLayer"
));
tableData
.
length
=
0
;
tableData
.
length
=
0
;
...
@@ -488,6 +495,37 @@ function clearData() {
...
@@ -488,6 +495,37 @@ function clearData() {
function
pageInitFun
(
res
)
{
function
pageInitFun
(
res
)
{
tableData
.
length
=
0
;
tableData
.
length
=
0
;
let
tableArr
=
[];
if
(
networkType
.
value
==
2
)
{
if
(
res
.
data
.
hourWater
.
length
>
0
)
{
res
.
data
.
hourWater
.
forEach
((
element
)
=>
{
tableArr
=
{
transferName
:
element
.
transferName
,
gatherTime
:
element
.
gatherTime
.
replace
(
"T"
,
" "
),
temperature
:
element
.
temperature
,
record
:
parseFloat
(
element
.
record
).
toFixed
(
2
),
};
tableData
.
push
(
tableArr
);
});
}
else
{
return
false
;
}
}
else
{
if
(
res
.
data
.
data
.
length
>
0
)
{
res
.
data
.
data
.
forEach
((
element
)
=>
{
tableArr
=
{
transferName
:
element
.
supplyName
,
gatherTime
:
element
.
gatherTime
.
replace
(
"T"
,
" "
),
temperature
:
element
.
temperature
,
record
:
parseFloat
(
element
.
record
).
toFixed
(
2
),
};
tableData
.
push
(
tableArr
);
});
}
else
{
return
false
;
}
}
// res.data.hourWater.forEach((element) => {
// res.data.hourWater.forEach((element) => {
// let tableArr = {
// let tableArr = {
// transferName: element.transferName,
// transferName: element.transferName,
...
@@ -503,10 +541,13 @@ function pageInitFun(res) {
...
@@ -503,10 +541,13 @@ function pageInitFun(res) {
echartSeries
.
length
=
0
;
echartSeries
.
length
=
0
;
echartDataLegend
.
length
=
0
;
echartDataLegend
.
length
=
0
;
echartDataTime
.
length
=
0
;
echartDataTime
.
length
=
0
;
if
(
res
.
data
.
hourWater
.
length
>
0
)
{
tableData
.
value
=
res
.
data
.
hourWater
;
nodata
.
value
=
true
;
nodata
.
value
=
true
;
echartData
.
value
=
dataDeal
(
res
.
data
.
hourWater
);
if
(
networkType
.
value
==
2
)
{
echartData
.
value
=
dataDeal
(
tableData
.
value
);
}
else
{
echartData
.
value
=
dataDeal
(
tableData
);
}
echartData
.
value
[
0
].
listInfo
.
forEach
((
element
)
=>
{
echartData
.
value
[
0
].
listInfo
.
forEach
((
element
)
=>
{
if
(
element
.
gatherTime
)
{
if
(
element
.
gatherTime
)
{
echartDataTime
.
push
(
element
.
gatherTime
);
echartDataTime
.
push
(
element
.
gatherTime
);
...
@@ -563,7 +604,6 @@ function pageInitFun(res) {
...
@@ -563,7 +604,6 @@ function pageInitFun(res) {
echartDataLegend
.
push
(
element
.
name
);
echartDataLegend
.
push
(
element
.
name
);
});
});
echartInit
();
echartInit
();
}
}
}
function
setContentHeight
()
{
function
setContentHeight
()
{
...
...
src/views/HandlerPage/YOY.vue
View file @
9c034f4d
...
@@ -391,13 +391,13 @@ function exportTableToExcel() {
...
@@ -391,13 +391,13 @@ function exportTableToExcel() {
},
},
};
};
XLSX
.
utils
.
book_append_sheet
(
workbook
,
worksheet
,
"
换热站趋势
"
);
XLSX
.
utils
.
book_append_sheet
(
workbook
,
worksheet
,
"
用量同比
"
);
const
excelBuffer
=
XLSX
.
write
(
workbook
,
{
bookType
:
"xlsx"
,
type
:
"array"
});
const
excelBuffer
=
XLSX
.
write
(
workbook
,
{
bookType
:
"xlsx"
,
type
:
"array"
});
const
dataBlob
=
new
Blob
([
excelBuffer
],
{
const
dataBlob
=
new
Blob
([
excelBuffer
],
{
type
:
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=UTF-8"
,
type
:
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=UTF-8"
,
});
});
const
downloadUrl
=
URL
.
createObjectURL
(
dataBlob
);
const
downloadUrl
=
URL
.
createObjectURL
(
dataBlob
);
saveAs
(
dataBlob
,
"
tableData
.xlsx"
);
saveAs
(
dataBlob
,
"
用量同比
.xlsx"
);
ElMessage
.
success
(
"导出成功!请稍后。。。"
);
ElMessage
.
success
(
"导出成功!请稍后。。。"
);
}
}
...
...
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