Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
fec0753d
authored
Jan 28, 2025
by
YunaiV
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【功能优化】Bpm:完善设备属性的历史值
parent
815c9000
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
20 deletions
+14
-20
src/views/iot/device/device/detail/DeviceDataDetail.vue
+4
-1
src/views/iot/device/device/detail/DeviceDetailsLog.vue
+7
-16
src/views/iot/device/device/detail/DeviceDetailsModel.vue
+2
-2
src/views/iot/device/device/detail/index.vue
+1
-1
No files found.
src/views/iot/device/device/detail/DeviceDataDetail.vue
View file @
fec0753d
<!--
TODO 芋艿:待 review
-->
<!--
设备物模型 -> 运行状态 -> 查看数据(设备的属性值历史)
-->
<
template
>
<Dialog
title=
"查看数据"
v-model=
"dialogVisible"
>
<ContentWrap>
...
...
@@ -32,6 +32,9 @@
</el-form-item>
</el-form>
</ContentWrap>
<!-- TODO @haohao:可参考阿里云 IoT,改成“图标”、“表格”两个选项 -->
<!-- 列表 -->
<ContentWrap>
<el-table
v-loading=
"detailLoading"
:data=
"list"
:stripe=
"true"
:show-overflow-tooltip=
"true"
>
<el-table-column
...
...
src/views/iot/device/device/detail/DeviceDetailsLog.vue
View file @
fec0753d
...
...
@@ -34,10 +34,10 @@
</el-form>
<!-- 日志列表 -->
<el-table
v-loading=
"loading"
:data=
"l
ogL
ist"
:stripe=
"true"
class=
"whitespace-nowrap"
>
<el-table-column
label=
"时间"
align=
"center"
prop=
"t
ime
"
width=
"180"
>
<el-table
v-loading=
"loading"
:data=
"list"
:stripe=
"true"
class=
"whitespace-nowrap"
>
<el-table-column
label=
"时间"
align=
"center"
prop=
"t
s
"
width=
"180"
>
<template
#
default=
"scope"
>
{{
formatDate
(
scope
.
row
.
t
ime
)
}}
{{
formatDate
(
scope
.
row
.
t
s
)
}}
</
template
>
</el-table-column>
<el-table-column
label=
"类型"
align=
"center"
prop=
"type"
width=
"120"
/>
...
...
@@ -78,7 +78,7 @@ const queryParams = reactive({
// 列表数据
const
loading
=
ref
(
false
)
const
total
=
ref
(
0
)
const
l
ogList
=
ref
([])
// TODO @super:logList -> list,简洁一点。因为当前就一个 table 哈
const
l
ist
=
ref
([])
const
autoRefresh
=
ref
(
false
)
let
timer
:
any
=
null
// TODO @super:autoRefreshEnable,autoRefreshTimer;对应上
...
...
@@ -96,18 +96,9 @@ const getLogList = async () => {
if
(
!
props
.
deviceKey
)
return
loading
.
value
=
true
try
{
const
res
=
await
DeviceApi
.
getDeviceLogPage
(
queryParams
)
total
.
value
=
res
.
total
// TODO @super:尽量不转换
logList
.
value
=
res
.
list
.
map
((
item
:
any
)
=>
{
const
log
=
{
time
:
item
.
reportTime
,
type
:
item
.
type
,
subType
:
item
.
subType
,
content
:
item
.
content
}
return
log
})
const
data
=
await
DeviceApi
.
getDeviceLogPage
(
queryParams
)
total
.
value
=
data
.
total
list
.
value
=
data
.
list
}
finally
{
loading
.
value
=
false
}
...
...
src/views/iot/device/device/detail/DeviceDetailsModel.vue
View file @
fec0753d
...
...
@@ -44,6 +44,7 @@
<el-table-column
label=
"属性标识符"
align=
"center"
prop=
"identifier"
/>
<el-table-column
label=
"属性名称"
align=
"center"
prop=
"name"
/>
<el-table-column
label=
"数据类型"
align=
"center"
prop=
"dataType"
/>
<el-table-column
label=
"属性值"
align=
"center"
prop=
"value"
/>
<el-table-column
label=
"更新时间"
align=
"center"
...
...
@@ -51,7 +52,6 @@
:formatter=
"dateFormatter"
width=
"180px"
/>
<el-table-column
label=
"最新值"
align=
"center"
prop=
"value"
/>
<el-table-column
label=
"操作"
align=
"center"
>
<template
#
default=
"scope"
>
<el-button
...
...
@@ -59,7 +59,7 @@
type=
"primary"
@
click=
"openDetail(props.device.id, scope.row.identifier)"
>
查看数据
历史
</el-button>
</
template
>
</el-table-column>
...
...
src/views/iot/device/device/detail/index.vue
View file @
fec0753d
...
...
@@ -75,6 +75,6 @@ onMounted(async () => {
return
}
await
getDeviceData
(
id
)
activeTab
.
value
=
route
.
query
.
tab
as
string
activeTab
.
value
=
(
route
.
query
.
tab
as
string
)
||
'info'
})
</
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