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
ed247d4d
Commit
ed247d4d
authored
Jul 28, 2024
by
朱超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
换热站能耗报表
parent
7fc46dcf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
269 additions
and
1 deletion
+269
-1
TransferEnergyPage.vue
src/views/Report/TransferEnergyPage.vue
+269
-1
No files found.
src/views/Report/TransferEnergyPage.vue
View file @
ed247d4d
<
template
>
换热站能耗
</
template
>
\ No newline at end of file
<
template
>
<div
class=
"contentBlock"
>
<div
class=
"contentBlockInn"
>
<el-card
class=
"card-contianer"
>
<table
cellpadding=
"0"
cellspacing=
"1"
style=
"background-color: #99bbe8"
>
<tr>
<th
style=
"width: 25%"
>
起始时间
</th>
<td
style=
"width: 60%; margin: 0; padding: 0"
>
<table
cellpadding=
"0"
cellspacing=
"0"
>
<tr>
<td
style=
"text-align: left"
>
<el-config-provider
:locale=
"zhCn"
>
<el-date-picker
type=
"date"
value-format=
"YYYY-MM-DD"
placeholder=
"选择开始时间"
style=
"width: 180px"
v-model=
"enertyInfo.printTime"
/>
</el-config-provider>
</td>
<th
style=
"width: 30%"
>
结束时间
</th>
<td
style=
"text-align: left"
>
<el-config-provider
:locale=
"zhCn"
>
<el-date-picker
type=
"date"
value-format=
"YYYY-MM-DD"
placeholder=
"选择结束时间"
style=
"width: 180px"
v-model=
"enertyInfo.printTime"
/>
</el-config-provider>
</td>
</tr>
</table>
</td>
<th
rowspan=
"3"
>
<div>
<div
class=
"btngrounp"
>
<el-button
type=
"primary"
@
click=
"sendClick"
style=
"margin: 15px 0 0 0"
>
查询
</el-button
><el-button
type=
"primary"
@
click=
"exportTableToExcel"
style=
"margin: 15px 0 0 10px"
>
打印
</el-button
><el-button
type=
"primary"
@
click=
"exportTableToExcel"
style=
"margin: 15px 0 0 10px"
>
打印预览
</el-button
>
<el-button
type=
"primary"
@
click=
"exportTableToExcel"
style=
"margin: 15px 0 0 10px"
>
导出
</el-button
>
</div>
</div>
</th>
</tr>
<tr>
<th>
面积
</th>
<td
style=
"text-align: left"
>
<el-radio-group
v-model=
"radio"
>
<el-radio
:value=
"3"
>
计算面积
</el-radio>
<el-radio
:value=
"6"
>
实供建筑面积
</el-radio>
</el-radio-group>
</td>
</tr>
<tr>
<th>
片区
</th>
<td>
<el-radio-group
v-model=
"radio"
>
<el-radio
:value=
"3"
>
港东南区
</el-radio>
<el-radio
:value=
"6"
>
港东北区
</el-radio>
<el-radio
:value=
"3"
>
重阳里计量站
</el-radio>
<el-radio
:value=
"6"
>
行政区供热站
</el-radio>
<el-radio
:value=
"3"
>
福苑里供热站
</el-radio>
<el-radio
:value=
"6"
>
小王庄供热站
</el-radio>
<el-radio
:value=
"3"
>
港益供热站
</el-radio>
</el-radio-group>
</td>
</tr>
</table>
<el-table
:data=
"tableData"
style=
"width: 100%; margin-top:10px;"
>
<el-table-column
prop=
"date"
label=
"序号"
width=
"60"
/>
<el-table-column
prop=
"name"
label=
"片区"
/>
<el-table-column
prop=
"address"
label=
"换热站名称"
/>
<el-table-column
prop=
"date"
label=
"面积"
/>
<el-table-column
prop=
"date"
label=
"热量(GJ)"
/>
<el-table-column
prop=
"date"
label=
"热耗(GJ/㎡)"
/>
<el-table-column
prop=
"date"
label=
"热耗(W/㎡)"
/>
<el-table-column
prop=
"date"
label=
"水量(T)"
/>
<el-table-column
prop=
"date"
label=
"水耗(KG/㎡)"
/>
<el-table-column
prop=
"date"
label=
"电量(KWH)"
/>
<el-table-column
prop=
"date"
label=
"电量(KWH/㎡)"
style=
"width:180px;"
/>
</el-table>
</el-card>
</div>
</div>
</
template
>
<
script
setup
>
import
{
ref
,
reactive
,
onMounted
,
onUnmounted
}
from
"vue"
;
import
http
from
"../../api/http"
;
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
{
postHeatForecast
,
postPrintHeatForecast
}
from
"../../api/report"
;
const
temp
=
ref
([]);
//24小时室外预测值
const
weather
=
ref
([]);
//当日气象信息
const
predTemp
=
ref
([]);
//24小时室外体感预测值
const
dataList
=
ref
([]);
//预测热量明细
const
dataTime
=
ref
([]);
//报表记录时间及总计
const
enertyInfo
=
reactive
({
printTime
:
null
,
queryTime
:
"2024-1-1 09:00:00"
,
});
function
timeFun
()
{
var
date
=
new
Date
();
var
year
=
date
.
getFullYear
();
var
dateArr
=
[
date
.
getMonth
()
+
1
,
date
.
getDate
(),
date
.
getHours
(),
date
.
getMinutes
(),
date
.
getSeconds
(),
];
var
endTimeHour
=
parseInt
(
dateArr
[
2
]
-
1
);
if
(
endTimeHour
<
10
)
{
endTimeHour
=
"0"
+
endTimeHour
;
}
if
(
dateArr
[
0
]
<
10
)
{
dateArr
[
0
]
=
"0"
+
dateArr
[
0
];
}
if
(
dateArr
[
1
]
<
10
)
{
dateArr
[
1
]
=
"0"
+
dateArr
[
1
];
}
if
(
dateArr
[
2
]
<
10
)
{
dateArr
[
2
]
=
"0"
+
dateArr
[
2
];
}
if
(
dateArr
[
3
]
<
10
)
{
dateArr
[
3
]
=
"0"
+
dateArr
[
3
];
}
if
(
dateArr
[
4
]
<
10
)
{
dateArr
[
4
]
=
"0"
+
dateArr
[
4
];
}
let
endTimes
=
year
+
"-"
+
dateArr
[
0
]
+
"-"
+
dateArr
[
1
]
+
" "
+
endTimeHour
+
":00:00"
;
// enertyInfo.printTime =
// year +
// "-" +
// dateArr[0] +
// "-" +
// dateArr[1] +
// " " +
// dateArr[2] +
// ":" +
// dateArr[3] +
// ":" +
// dateArr[4];
enertyInfo
.
queryTime
=
endTimes
;
}
function
postHeatForecastFun
()
{
if
(
enertyInfo
.
queryTime
==
null
)
{
ElMessage
.
error
(
"请选择记录时间"
);
return
false
;
}
let
params
=
{
QueryTime
:
enertyInfo
.
queryTime
,
};
postHeatForecast
(
params
).
then
((
res
)
=>
{
if
(
res
.
success
===
true
)
{
temp
.
value
=
res
.
data
.
temp
;
predTemp
.
value
=
res
.
data
.
predTemp
;
weather
.
value
=
res
.
data
.
weather
;
dataList
.
value
=
res
.
data
.
list
;
dataTime
.
value
=
res
.
data
.
time
;
}
else
{
ElMessage
.
error
(
res
.
message
);
}
});
}
function
postPrintHeatForecastFun
()
{
if
(
enertyInfo
.
printTime
==
null
)
{
ElMessage
.
error
(
"请选择打印时间"
);
return
false
;
}
let
params
=
{
QueryTime
:
enertyInfo
.
printTime
,
};
postPrintHeatForecast
(
params
).
then
((
res
)
=>
{
if
(
res
.
success
===
true
)
{
temp
.
value
=
res
.
data
.
temp
;
predTemp
.
value
=
res
.
data
.
predTemp
;
weather
.
value
=
res
.
data
.
weather
;
dataList
.
value
=
res
.
data
.
list
;
dataTime
.
value
=
res
.
data
.
time
;
}
else
{
ElMessage
.
error
(
res
.
message
);
}
});
}
onMounted
(()
=>
{
timeFun
();
//postHeatForecastFun();
});
onUnmounted
(()
=>
{});
</
script
>
<
style
lang=
"less"
scoped
>
.contentBlock {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: #ffffff;
overflow: auto;
}
table {
width: 100%;
}
table,
tr,
th,
td {
font-size: 14px;
margin: 0;
padding: 0;
}
table {
width: 100%;
}
table th {
background-color: #dfe8f6;
text-align: center;
padding: 5px 10px;
}
table td {
text-align: center;
background-color: #ffffff;
padding: 5px 10px;
}
.btngrounp {
width: 300px;
}
.gc td {
background-color: #a6ffa6;
}
.gc td:first-child {
background-color: #ffffff;
}
table.botList td {
width: 33%;
text-align: left;
font-weight: bolder;
}
</
style
>
\ No newline at end of file
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