Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gassafety
Project
Project
Details
Activity
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
耿迪迪
gassafety
Commits
56ab3ace
Commit
56ab3ace
authored
Jan 13, 2022
by
王晓倩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
设备上报数据统计页面处理
parent
7a19c5cc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
52 additions
and
29 deletions
+52
-29
DeviceStatistics.java
.../main/java/com/zehong/system/domain/DeviceStatistics.java
+4
-0
index.vue
...y-web/src/views/dataMonitoring/deviceStatistics/index.vue
+48
-29
No files found.
gassafety-system/src/main/java/com/zehong/system/domain/DeviceStatistics.java
View file @
56ab3ace
package
com
.
zehong
.
system
.
domain
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
java.math.BigDecimal
;
import
java.util.Date
;
...
...
@@ -18,11 +20,13 @@ public class DeviceStatistics {
/**
* 设备统计开始时间
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
startTime
;
/**
* 设备统计结束时间
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
endTime
;
/**
...
...
gassafety-web/src/views/dataMonitoring/deviceStatistics/index.vue
View file @
56ab3ace
<
template
>
<div
class=
"app-container"
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
:inline=
"true"
v-show=
"showSearch"
label-width=
"
68
px"
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
:inline=
"true"
v-show=
"showSearch"
label-width=
"
80
px"
>
<el-form-item
label=
"设备编号"
prop=
"deviceThreshold"
>
<el-input
v-model=
"queryParams.device
Threshold
"
placeholder=
"请输入设备
阈值
"
v-model=
"queryParams.device
Num
"
placeholder=
"请输入设备
编号
"
clearable
size=
"small"
@
keyup
.
enter
.
native=
"handleQuery"
...
...
@@ -13,31 +13,31 @@
<el-form-item
label=
"设备名称"
prop=
"deviceThreshold"
>
<el-input
v-model=
"queryParams.deviceThreshold"
placeholder=
"请输入设备
阈值
"
placeholder=
"请输入设备
名称
"
clearable
size=
"small"
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"开始时间"
prop=
"start
Create
Time"
>
<el-form-item
label=
"开始时间"
prop=
"startTime"
>
<el-date-picker
clearable
size=
"small"
v-model=
"queryParams.start
Create
Time"
v-model=
"queryParams.startTime"
value-format=
"yyyy-MM-dd HH:mm:ss"
type=
"datetime"
placeholder=
"请选择
起
始时间"
placeholder=
"请选择
开
始时间"
align=
"right"
style=
"width: 200px"
>
</el-date-picker>
<font
color=
"#C0C4CC"
>
至
</font>
</el-form-item>
<el-form-item
label=
"结束时间"
prop=
"
startCreate
Time"
>
<el-form-item
label=
"结束时间"
prop=
"
end
Time"
>
<el-date-picker
clearable
size=
"small"
v-model=
"queryParams.
startCreate
Time"
v-model=
"queryParams.
end
Time"
value-format=
"yyyy-MM-dd HH:mm:ss"
type=
"datetime"
placeholder=
"请选择
起始
时间"
placeholder=
"请选择
结束
时间"
align=
"right"
style=
"width: 200px"
>
</el-date-picker>
...
...
@@ -64,11 +64,11 @@
</el-row>
<el-table
v-loading=
"loading"
:data=
"deviceList"
>
<el-table-column
label=
"设备名称"
align=
"center"
prop=
"
monitorId
"
/>
<el-table-column
label=
"设备名称"
align=
"center"
prop=
"
deviceNum
"
/>
<el-table-column
label=
"设备编号"
align=
"center"
prop=
"deviceName"
/>
<el-table-column
label=
"
开始时间"
align=
"center"
prop=
"deviceThreshold
"
/>
<el-table-column
label=
"
结束时间"
align=
"center"
prop=
"relationPipeNa
me"
/>
<el-table-column
label=
"标况累计流量(m³)"
align=
"center"
prop=
"
relationPipeThreshold
"
/>
<el-table-column
label=
"
设备上报开始时间"
align=
"center"
prop=
"startTime
"
/>
<el-table-column
label=
"
设备上报结束时间"
align=
"center"
prop=
"endTi
me"
/>
<el-table-column
label=
"标况累计流量(m³)"
align=
"center"
prop=
"
standardConditionAccumulation
"
/>
</el-table>
<pagination
...
...
@@ -113,19 +113,20 @@ export default {
queryParams
:
{
pageNum
:
1
,
pageSize
:
10
,
deviceId
:
null
,
deviceThreshold
:
null
,
relationPipeId
:
null
,
relationPipeThreshold
:
null
,
relationDeviceId
:
null
,
relationDeviceThreshold
:
null
,
deviceNum
:
null
,
deviceName
:
null
,
startTime
:
null
,
endTime
:
null
,
},
// 表单参数
form
:
{}
};
},
created
()
{
this
.
getList
();
// this.getList();
this
.
loading
=
false
;
this
.
getCurrentMonthFirst
();
this
.
getCurrentMonthLast
();
},
methods
:
{
/** 查询设备监控列表 */
...
...
@@ -133,8 +134,8 @@ export default {
this
.
loading
=
true
;
getDeviceStatisticsInfo
(
this
.
queryParams
).
then
(
response
=>
{
console
.
log
(
response
)
/*
this.deviceList = response.rows;
this.total = response.total;
*/
this
.
deviceList
=
response
.
rows
;
this
.
total
=
response
.
total
;
this
.
loading
=
false
;
});
},
...
...
@@ -147,7 +148,7 @@ export default {
resetQuery
()
{
this
.
resetForm
(
"queryForm"
);
this
.
handleQuery
();
},
/** 导出按钮操作 */
},
/** 导出按钮操作 */
handleExport
()
{
const
queryParams
=
this
.
queryParams
;
this
.
$confirm
(
'是否确认导出所有设备监控数据项?'
,
"警告"
,
{
...
...
@@ -156,12 +157,30 @@ export default {
type
:
"warning"
}).
then
(()
=>
{
this
.
exportLoading
=
true
;
return
exportDevice
(
queryParams
);
}).
then
(
response
=>
{
return
exportDevice
(
queryParams
);
}).
then
(
response
=>
{
this
.
download
(
response
.
msg
);
this
.
exportLoading
=
false
;
}).
catch
(()
=>
{});
}
this
.
exportLoading
=
false
;
}).
catch
(()
=>
{
});
},
getCurrentMonthFirst
()
{
var
date
=
new
Date
()
date
.
setDate
(
1
)
var
month
=
parseInt
(
date
.
getMonth
()
+
1
)
var
day
=
date
.
getDate
()
if
(
month
<
10
)
month
=
'0'
+
month
if
(
day
<
10
)
day
=
'0'
+
day
this
.
queryParams
.
startTime
=
date
.
getFullYear
()
+
'-'
+
month
+
'-'
+
day
+
' 00:00:00'
},
getCurrentMonthLast
()
{
var
date
=
new
Date
()
var
month
=
parseInt
(
date
.
getMonth
()
+
1
)
var
day
=
date
.
getDate
()
if
(
month
<
10
)
month
=
'0'
+
month
if
(
day
<
10
)
day
=
'0'
+
day
this
.
queryParams
.
endTime
=
date
.
getFullYear
()
+
'-'
+
month
+
'-'
+
day
+
" "
+
date
.
getHours
()
+
":"
+
date
.
getMinutes
()
+
":"
+
date
.
getSeconds
()
},
}
};
</
script
>
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