Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
super-hive-web
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
SuperHive
front-end
super-hive-web
Commits
0b74ee88
Commit
0b74ee88
authored
Aug 14, 2020
by
wends
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update 历史查询
parent
22b3f912
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
1 deletion
+31
-1
index.vue
src/views/device-management/history-data/index.vue
+31
-1
No files found.
src/views/device-management/history-data/index.vue
View file @
0b74ee88
...
@@ -73,7 +73,7 @@
...
@@ -73,7 +73,7 @@
<el-card
class=
"margin-top-20"
>
<el-card
class=
"margin-top-20"
>
<div
slot=
"header"
class=
"clearfix"
>
<div
slot=
"header"
class=
"clearfix"
>
<span>
详细
</span>
<span>
详细
</span>
<el-button
style=
"float: right; padding: 3px 0"
type=
"text"
>
导出
</el-button>
<el-button
style=
"float: right; padding: 3px 0"
type=
"text"
@
click=
"handleDownload"
>
导出
</el-button>
</div>
</div>
<el-table
:data=
"tableDataPaged"
border
style=
"width: 100%"
>
<el-table
:data=
"tableDataPaged"
border
style=
"width: 100%"
>
<el-table-column
type=
"index"
label=
"序号"
width=
"50"
/>
<el-table-column
type=
"index"
label=
"序号"
width=
"50"
/>
...
@@ -257,6 +257,36 @@ export default {
...
@@ -257,6 +257,36 @@ export default {
await
this
.
queryData
()
await
this
.
queryData
()
return
{}
return
{}
},
},
formatJson
(
filterVal
,
jsonData
)
{
return
jsonData
.
map
(
v
=>
filterVal
.
map
(
j
=>
{
if
(
j
===
'
time
'
)
{
return
this
.
$moment
(
v
[
j
],
'
YYYY-MM-DD HH:mm:ss
'
)
}
else
{
return
v
[
j
]
}
}))
},
handleDownload
()
{
this
.
downloadLoading
=
true
import
(
'
@/vendor/Export2Excel
'
).
then
(
excel
=>
{
const
tHeader
=
[]
const
filterVal
=
[]
for
(
const
key
in
this
.
tableDataPaged
[
0
])
{
tHeader
.
push
(
key
)
filterVal
.
push
(
key
)
}
const
list
=
this
.
tableData
const
data
=
this
.
formatJson
(
filterVal
,
list
)
excel
.
export_json_to_excel
({
header
:
tHeader
,
data
,
filename
:
this
.
filename
,
autoWidth
:
this
.
autoWidth
,
bookType
:
this
.
bookType
})
this
.
downloadLoading
=
false
})
},
getChartData
(
propertyCode
)
{
getChartData
(
propertyCode
)
{
return
this
.
tableData
.
map
(
v
=>
{
return
this
.
tableData
.
map
(
v
=>
{
return
{
return
{
...
...
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