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
7fc46dcf
Commit
7fc46dcf
authored
Jul 28, 2024
by
朱超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
明日预测报表
parent
44215dce
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
61 additions
and
42 deletions
+61
-42
report.js
src/api/report.js
+6
-0
ForecastPage.vue
src/views/Report/ForecastPage.vue
+55
-42
No files found.
src/api/report.js
View file @
7fc46dcf
...
...
@@ -14,3 +14,9 @@ export const postHeatForecast = params => {
})
}
//明日预测报表(打印查询)
export
const
postPrintHeatForecast
=
params
=>
{
return
http
.
post
(
`/api/analysis/report/PrintHeatForecast`
,
params
).
then
(
res
=>
res
).
catch
(
function
(
error
)
{
console
.
log
(
error
);
})
}
\ No newline at end of file
src/views/Report/ForecastPage.vue
View file @
7fc46dcf
...
...
@@ -12,7 +12,7 @@
<th
width=
"25%"
>
<span>
记录时间
</span>
</th>
<th
width=
"25%
"
>
<th
style=
"text-align: left; background-color: #ffffff
"
>
<el-config-provider
:locale=
"zhCn"
>
<el-date-picker
type=
"datetime"
...
...
@@ -23,37 +23,35 @@
/>
</el-config-provider>
</th>
<th
width=
"25%"
></th>
<th>
<th
width=
"25%"
>
<el-button
type=
"primary"
style=
"min-width: 70px"
@
click=
"postHeat
Analysis
Fun"
@
click=
"postHeat
Forecast
Fun"
>
历史查询
</el-button
>
</th>
</tr>
<tr>
<th
width=
"25%"
>
<th>
<span>
打印时间
</span>
</th>
<th
width=
"25%
"
>
<th
style=
"text-align: left; background-color: #ffffff
"
>
<el-config-provider
:locale=
"zhCn"
>
<el-date-picker
type=
"date
time
"
value-format=
"YYYY-MM-DD
HH:mm:ss
"
type=
"date"
value-format=
"YYYY-MM-DD"
placeholder=
"选择查询时间"
style=
"width: 180px"
v-model=
"enertyInfo.
query
Time"
v-model=
"enertyInfo.
print
Time"
/>
</el-config-provider>
</th>
<th
width=
"25%"
></th>
<th>
<el-button
type=
"primary"
style=
"min-width: 70px"
@
click=
"post
HeatAnalysis
Fun"
@
click=
"post
PrintHeatForecast
Fun"
>
打印查询
</el-button
>
</th>
...
...
@@ -67,11 +65,11 @@
<tr>
<th
style=
"width: 25%"
>
天气状况
</th>
<th
style=
"width: 25%; background-color: #a6ffa6"
>
{{
weather
.
weatherCondition
}}
{{
weather
.
weatherCondition
?
weather
.
weatherCondition
:
"-"
}}
</th>
<th
style=
"width: 25%"
>
风力
</th>
<th
style=
"width: 25%; background-color: #a6ffa6"
>
{{
weather
.
wind
}}
{{
weather
.
wind
?
weather
.
wind
:
"-"
}}
</th>
</tr>
</table>
...
...
@@ -215,9 +213,9 @@
</tr>
<tr>
<th>
时间
</th>
<td
colspan=
"5"
>
{{
dataTime
.
createBillTime
}}
</td>
<td>
{{
dataTime
.
datePrediction
}}
</td>
<td>
{{
dataTime
.
degreeDatePrediction
}}
</td>
<td
colspan=
"5"
>
{{
dataTime
.
createBillTime
?
dataTime
.
createBillTime
:
"-"
}}
</td>
<td>
{{
dataTime
.
datePrediction
?
dataTime
.
datePrediction
:
"-"
}}
</td>
<td>
{{
dataTime
.
degreeDatePrediction
?
dataTime
.
degreeDatePrediction
:
"-"
}}
</td>
</tr>
</table>
<table
...
...
@@ -276,14 +274,14 @@ 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"
;
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
({
now
Time
:
null
,
print
Time
:
null
,
queryTime
:
"2024-1-1 09:00:00"
,
});
function
timeFun
()
{
...
...
@@ -316,33 +314,27 @@ function timeFun() {
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
];
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
,
};
...
...
@@ -358,8 +350,29 @@ function postHeatForecastFun() {
}
});
}
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();
timeFun
();
postHeatForecastFun
();
});
onUnmounted
(()
=>
{});
...
...
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