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
44215dce
Commit
44215dce
authored
Jul 28, 2024
by
朱超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
明日预测报表
parent
76ec69cf
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
425 additions
and
5 deletions
+425
-5
report.js
src/api/report.js
+8
-0
ForecastPage.vue
src/views/Report/ForecastPage.vue
+415
-2
HeatAnalysisPage.vue
src/views/Report/HeatAnalysisPage.vue
+2
-3
No files found.
src/api/report.js
View file @
44215dce
...
...
@@ -6,3 +6,11 @@ export const postHeatAnalysis = params => {
console
.
log
(
error
);
})
}
//明日预测报表(实时或历史查询)
export
const
postHeatForecast
=
params
=>
{
return
http
.
post
(
`/api/analysis/report/HeatForecast`
,
params
).
then
(
res
=>
res
).
catch
(
function
(
error
)
{
console
.
log
(
error
);
})
}
src/views/Report/ForecastPage.vue
View file @
44215dce
<
template
>
明日预测
</
template
>
\ No newline at end of file
<div
class=
"contentBlock"
>
<div
class=
"contentBlockInn"
>
<el-card
class=
"card-contianer"
>
<table
cellpadding=
"0"
cellspacing=
"1"
style=
"background-color: #99bbe8"
>
<tr>
<th
width=
"25%"
>
<span>
记录时间
</span>
</th>
<th
width=
"25%"
>
<el-config-provider
:locale=
"zhCn"
>
<el-date-picker
type=
"datetime"
value-format=
"YYYY-MM-DD HH:mm:ss"
placeholder=
"选择查询时间"
style=
"width: 180px"
v-model=
"enertyInfo.queryTime"
/>
</el-config-provider>
</th>
<th
width=
"25%"
></th>
<th>
<el-button
type=
"primary"
style=
"min-width: 70px"
@
click=
"postHeatAnalysisFun"
>
历史查询
</el-button
>
</th>
</tr>
<tr>
<th
width=
"25%"
>
<span>
打印时间
</span>
</th>
<th
width=
"25%"
>
<el-config-provider
:locale=
"zhCn"
>
<el-date-picker
type=
"datetime"
value-format=
"YYYY-MM-DD HH:mm:ss"
placeholder=
"选择查询时间"
style=
"width: 180px"
v-model=
"enertyInfo.queryTime"
/>
</el-config-provider>
</th>
<th
width=
"25%"
></th>
<th>
<el-button
type=
"primary"
style=
"min-width: 70px"
@
click=
"postHeatAnalysisFun"
>
打印查询
</el-button
>
</th>
</tr>
</table>
<table
cellpadding=
"0"
cellspacing=
"1"
style=
"background-color: #99bbe8; margin-top: 5px"
>
<tr>
<th
style=
"width: 25%"
>
天气状况
</th>
<th
style=
"width: 25%; background-color: #a6ffa6"
>
{{
weather
.
weatherCondition
}}
</th>
<th
style=
"width: 25%"
>
风力
</th>
<th
style=
"width: 25%; background-color: #a6ffa6"
>
{{
weather
.
wind
}}
</th>
</tr>
</table>
<table
cellpadding=
"0"
cellspacing=
"1"
style=
"margin-top: 5px; background-color: #99bbe8"
>
<tr>
<th
rowspan=
"8"
>
00:00-24:00
<br
/>
数据分析
</th>
<th>
白天
</th>
<th>
01:00
</th>
<th>
02:00
</th>
<th>
03:00
</th>
<th>
04:00
</th>
<th>
05:00
</th>
<th>
06:00
</th>
<th>
07:00
</th>
<th>
08:00
</th>
<th>
09:00
</th>
<th>
10:00
</th>
<th>
11:00
</th>
<th>
12:00
</th>
<th>
制表编号
</th>
</tr>
<tr
class=
"gc"
>
<td>
室外预测值(℃)
</td>
<td>
{{
temp
.
temp1
?
temp
.
temp1
:
"-"
}}
</td>
<td>
{{
temp
.
temp2
?
temp
.
temp2
:
"-"
}}
</td>
<td>
{{
temp
.
temp3
?
temp
.
temp3
:
"-"
}}
</td>
<td>
{{
temp
.
temp4
?
temp
.
temp4
:
"-"
}}
</td>
<td>
{{
temp
.
temp5
?
temp
.
temp5
:
"-"
}}
</td>
<td>
{{
temp
.
temp6
?
temp
.
temp6
:
"-"
}}
</td>
<td>
{{
temp
.
temp7
?
temp
.
temp7
:
"-"
}}
</td>
<td>
{{
temp
.
temp8
?
temp
.
temp8
:
"-"
}}
</td>
<td>
{{
temp
.
temp9
?
temp
.
temp9
:
"-"
}}
</td>
<td>
{{
temp
.
temp10
?
temp
.
temp10
:
"-"
}}
</td>
<td>
{{
temp
.
temp11
?
temp
.
temp11
:
"-"
}}
</td>
<td>
{{
temp
.
temp12
?
temp
.
temp12
:
"-"
}}
</td>
<td>
-
</td>
</tr>
<tr
class=
"gc"
>
<td>
室外体感预测值(℃)
</td>
<td>
{{
predTemp
.
temp1
?
predTemp
.
temp1
:
"-"
}}
</td>
<td>
{{
predTemp
.
temp2
?
predTemp
.
temp2
:
"-"
}}
</td>
<td>
{{
predTemp
.
temp3
?
predTemp
.
temp3
:
"-"
}}
</td>
<td>
{{
predTemp
.
temp4
?
predTemp
.
temp4
:
"-"
}}
</td>
<td>
{{
predTemp
.
temp5
?
predTemp
.
temp5
:
"-"
}}
</td>
<td>
{{
predTemp
.
temp6
?
predTemp
.
temp6
:
"-"
}}
</td>
<td>
{{
predTemp
.
temp7
?
predTemp
.
temp7
:
"-"
}}
</td>
<td>
{{
predTemp
.
temp8
?
predTemp
.
temp8
:
"-"
}}
</td>
<td>
{{
predTemp
.
temp9
?
predTemp
.
temp9
:
"-"
}}
</td>
<td>
{{
predTemp
.
temp10
?
predTemp
.
temp10
:
"-"
}}
</td>
<td>
{{
predTemp
.
temp11
?
predTemp
.
temp11
:
"-"
}}
</td>
<td>
{{
predTemp
.
temp12
?
predTemp
.
temp12
:
"-"
}}
</td>
<td>
-
</td>
</tr>
<tr>
<th>
夜间
</th>
<th>
13:00
</th>
<th>
14:00
</th>
<th>
15:00
</th>
<th>
16:00
</th>
<th>
17:00
</th>
<th>
18:00
</th>
<th>
19:00
</th>
<th>
20:00
</th>
<th>
21:00
</th>
<th>
22:00
</th>
<th>
23:00
</th>
<th>
24:00
</th>
<th>
<div>
预测室外
</div>
<div>
平均温度
</div>
</th>
</tr>
<tr
class=
"gc"
>
<td>
室外预测值(℃)
</td>
<td>
{{
temp
.
temp13
?
temp
.
temp13
:
"-"
}}
</td>
<td>
{{
temp
.
temp14
?
temp
.
temp14
:
"-"
}}
</td>
<td>
{{
temp
.
temp15
?
temp
.
temp15
:
"-"
}}
</td>
<td>
{{
temp
.
temp16
?
temp
.
temp16
:
"-"
}}
</td>
<td>
{{
temp
.
temp17
?
temp
.
temp17
:
"-"
}}
</td>
<td>
{{
temp
.
temp18
?
temp
.
temp18
:
"-"
}}
</td>
<td>
{{
temp
.
temp19
?
temp
.
temp19
:
"-"
}}
</td>
<td>
{{
temp
.
temp20
?
temp
.
temp20
:
"-"
}}
</td>
<td>
{{
temp
.
temp21
?
temp
.
temp21
:
"-"
}}
</td>
<td>
{{
temp
.
temp22
?
temp
.
temp22
:
"-"
}}
</td>
<td>
{{
temp
.
temp23
?
temp
.
temp23
:
"-"
}}
</td>
<td>
{{
temp
.
temp24
?
temp
.
temp24
:
"-"
}}
</td>
<td
style=
"background-color: #ffffff"
>
{{
temp
.
avgTemp
?
temp
.
avgTemp
:
"-"
}}
</td>
</tr>
<tr
class=
"gc"
>
<td>
室外体感预测值(℃)
</td>
<td>
{{
predTemp
.
temp13
?
predTemp
.
temp13
:
"-"
}}
</td>
<td>
{{
predTemp
.
temp14
?
predTemp
.
temp14
:
"-"
}}
</td>
<td>
{{
predTemp
.
temp15
?
predTemp
.
temp15
:
"-"
}}
</td>
<td>
{{
predTemp
.
temp16
?
predTemp
.
temp16
:
"-"
}}
</td>
<td>
{{
predTemp
.
temp17
?
predTemp
.
temp17
:
"-"
}}
</td>
<td>
{{
predTemp
.
temp18
?
predTemp
.
temp18
:
"-"
}}
</td>
<td>
{{
predTemp
.
temp19
?
predTemp
.
temp19
:
"-"
}}
</td>
<td>
{{
predTemp
.
temp20
?
predTemp
.
temp20
:
"-"
}}
</td>
<td>
{{
predTemp
.
temp21
?
predTemp
.
temp21
:
"-"
}}
</td>
<td>
{{
predTemp
.
temp22
?
predTemp
.
temp22
:
"-"
}}
</td>
<td>
{{
predTemp
.
temp23
?
predTemp
.
temp23
:
"-"
}}
</td>
<td>
{{
predTemp
.
temp24
?
predTemp
.
temp24
:
"-"
}}
</td>
<td
style=
"background-color: #ffffff"
>
{{
predTemp
.
avgTemp
?
predTemp
.
avgTemp
:
"-"
}}
</td>
</tr>
</table>
<table
cellpadding=
"0"
cellspacing=
"1"
style=
"margin-top: 5px; background-color: #99bbe8"
>
<tr>
<th
colspan=
"8"
>
后一天热量(万吉焦)
</th>
</tr>
<tr>
<th>
地点
</th>
<th>
00:00-04:00
</th>
<th>
04:00-08:00
</th>
<th>
08:00-12:00
</th>
<th>
12:00-16:00
</th>
<th>
16:00-20:00
</th>
<th>
20:00-24:00
</th>
<th>
小计
</th>
</tr>
<tr
v-for=
"item in dataList"
:key=
"item"
>
<th>
{{
item
.
name
}}
</th>
<td>
{{
item
.
part1
}}
</td>
<td>
{{
item
.
part2
}}
</td>
<td>
{{
item
.
part3
}}
</td>
<td>
{{
item
.
part4
}}
</td>
<td>
{{
item
.
part5
}}
</td>
<td>
{{
item
.
part6
}}
</td>
<td>
{{
item
.
total
}}
</td>
</tr>
<tr>
<th>
时间
</th>
<td
colspan=
"5"
>
{{
dataTime
.
createBillTime
}}
</td>
<td>
{{
dataTime
.
datePrediction
}}
</td>
<td>
{{
dataTime
.
degreeDatePrediction
}}
</td>
</tr>
</table>
<table
cellpadding=
"0"
cellspacing=
"0"
style=
"margin-top: 5px; background-color: #99bbe8"
class=
"botList"
>
<tr>
<td>
制表:
</td>
<td>
确认:
</td>
<td>
领导:
</td>
</tr>
</table>
<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"
>
导出PDF
</el-button
>
<el-button
type=
"primary"
@
click=
"exportTableToExcel"
style=
"margin: 15px 0 0 10px"
>
实时分析
</el-button
>
</div>
</div>
</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
}
from
"../../api/report"
;
const
temp
=
ref
([]);
//24小时室外预测值
const
weather
=
ref
([]);
//当日气象信息
const
predTemp
=
ref
([]);
//24小时室外体感预测值
const
dataList
=
ref
([]);
//预测热量明细
const
dataTime
=
ref
([]);
//报表记录时间及总计
const
enertyInfo
=
reactive
({
nowTime
:
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
+
":"
+
dateArr
[
3
]
+
":"
+
dateArr
[
4
];
enertyInfo
.
nowTime
=
year
+
"-"
+
dateArr
[
0
]
+
"-"
+
dateArr
[
1
]
+
" "
+
dateArr
[
2
]
+
":"
+
dateArr
[
3
]
+
":"
+
dateArr
[
4
];
enertyInfo
.
queryTime
=
endTimes
;
}
function
postHeatForecastFun
()
{
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
);
}
});
}
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: 500px;
margin: 0 auto;
text-align: center;
}
.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
src/views/Report/HeatAnalysisPage.vue
View file @
44215dce
...
...
@@ -430,9 +430,7 @@ onMounted(() => {
postHeatAnalysisFun
();
});
onUnmounted
(()
=>
{
if
(
$chart
)
{
$chart
.
dispose
();
}
});
</
script
>
<
style
lang=
"less"
scoped
>
...
...
@@ -472,5 +470,6 @@ table td {
.btngrounp {
width: 300px;
margin: 0 auto;
text-align: center;
}
</
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