Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
IoTSharp
IoTSharp
提交
387949ec
IoTSharp
项目概览
IoTSharp
/
IoTSharp
8 个月 前同步成功
通知
15
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
IoTSharp
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
387949ec
编写于
7月 04, 2019
作者:
麦壳饼
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' of
https://github.com/IoTSharp/IoTSharp
上级
522f3e87
08448cc7
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
55 addition
and
34 deletion
+55
-34
IoTSharp/ClientApp/src/api/device.js
IoTSharp/ClientApp/src/api/device.js
+8
-0
IoTSharp/ClientApp/src/components/GithubCorner/index.vue
IoTSharp/ClientApp/src/components/GithubCorner/index.vue
+1
-1
IoTSharp/ClientApp/src/views/dashboard/admin/components/PanelGroup.vue
...ntApp/src/views/dashboard/admin/components/PanelGroup.vue
+21
-21
IoTSharp/ClientApp/src/views/device/device-board.vue
IoTSharp/ClientApp/src/views/device/device-board.vue
+25
-12
未找到文件。
IoTSharp/ClientApp/src/api/device.js
浏览文件 @
387949ec
...
...
@@ -16,6 +16,14 @@ export function getDevice(id) {
})
}
// Get a device's credentials
export
function
GetIdentity
(
id
)
{
return
request
({
url
:
'
/Devices/
'
+
id
,
method
:
'
get
'
})
}
// Create a new device
export
function
creatDevice
(
data
)
{
return
request
({
...
...
IoTSharp/ClientApp/src/components/GithubCorner/index.vue
浏览文件 @
387949ec
<
template
>
<a
href=
"https://github.com/
PanJiaChen/vue-element-admin
"
target=
"_blank"
class=
"github-corner"
aria-label=
"View source on Github"
>
<a
href=
"https://github.com/
IoTSharp/IoTSharp
"
target=
"_blank"
class=
"github-corner"
aria-label=
"View source on Github"
>
<svg
width=
"80"
height=
"80"
...
...
IoTSharp/ClientApp/src/views/dashboard/admin/components/PanelGroup.vue
浏览文件 @
387949ec
...
...
@@ -2,12 +2,12 @@
<el-row
:gutter=
"40"
class=
"panel-group"
>
<el-col
:xs=
"12"
:sm=
"12"
:lg=
"6"
class=
"card-panel-col"
>
<div
class=
"card-panel"
@
click=
"handleSetLineChartData('newVisitis')"
>
<div
class=
"card-panel-icon-wrapper icon-
peopl
e"
>
<svg-icon
icon-class=
"
peoples
"
class-name=
"card-panel-icon"
/>
<div
class=
"card-panel-icon-wrapper icon-
devic
e"
>
<svg-icon
icon-class=
"
example
"
class-name=
"card-panel-icon"
/>
</div>
<div
class=
"card-panel-description"
>
<div
class=
"card-panel-text"
>
New Visits
设备总数
</div>
<count-to
:start-val=
"0"
:end-val=
"102400"
:duration=
"2600"
class=
"card-panel-num"
/>
</div>
...
...
@@ -15,12 +15,12 @@
</el-col>
<el-col
:xs=
"12"
:sm=
"12"
:lg=
"6"
class=
"card-panel-col"
>
<div
class=
"card-panel"
@
click=
"handleSetLineChartData('messages')"
>
<div
class=
"card-panel-icon-wrapper icon-
messag
e"
>
<svg-icon
icon-class=
"
message
"
class-name=
"card-panel-icon"
/>
<div
class=
"card-panel-icon-wrapper icon-
peopl
e"
>
<svg-icon
icon-class=
"
peoples
"
class-name=
"card-panel-icon"
/>
</div>
<div
class=
"card-panel-description"
>
<div
class=
"card-panel-text"
>
M
essages
M
QTT客户端
</div>
<count-to
:start-val=
"0"
:end-val=
"81212"
:duration=
"3000"
class=
"card-panel-num"
/>
</div>
...
...
@@ -28,12 +28,12 @@
</el-col>
<el-col
:xs=
"12"
:sm=
"12"
:lg=
"6"
class=
"card-panel-col"
>
<div
class=
"card-panel"
@
click=
"handleSetLineChartData('purchases')"
>
<div
class=
"card-panel-icon-wrapper icon-
money
"
>
<svg-icon
icon-class=
"
money
"
class-name=
"card-panel-icon"
/>
<div
class=
"card-panel-icon-wrapper icon-
guide
"
>
<svg-icon
icon-class=
"
guide
"
class-name=
"card-panel-icon"
/>
</div>
<div
class=
"card-panel-description"
>
<div
class=
"card-panel-text"
>
Purchases
MQTT主题
</div>
<count-to
:start-val=
"0"
:end-val=
"9280"
:duration=
"3200"
class=
"card-panel-num"
/>
</div>
...
...
@@ -41,12 +41,12 @@
</el-col>
<el-col
:xs=
"12"
:sm=
"12"
:lg=
"6"
class=
"card-panel-col"
>
<div
class=
"card-panel"
@
click=
"handleSetLineChartData('shoppings')"
>
<div
class=
"card-panel-icon-wrapper icon-
shopping
"
>
<svg-icon
icon-class=
"
shopping
"
class-name=
"card-panel-icon"
/>
<div
class=
"card-panel-icon-wrapper icon-
message
"
>
<svg-icon
icon-class=
"
message
"
class-name=
"card-panel-icon"
/>
</div>
<div
class=
"card-panel-description"
>
<div
class=
"card-panel-text"
>
Shoppings
MQTT消息
</div>
<count-to
:start-val=
"0"
:end-val=
"13600"
:duration=
"3600"
class=
"card-panel-num"
/>
</div>
...
...
@@ -94,36 +94,36 @@ export default {
color
:
#fff
;
}
.icon-
peopl
e
{
.icon-
devic
e
{
background
:
#40c9c6
;
}
.icon-
messag
e
{
.icon-
peopl
e
{
background
:
#36a3f7
;
}
.icon-
money
{
background
:
#
f4516c
;
.icon-
guide
{
background
:
#
51f47a
;
}
.icon-
shopping
{
.icon-
message
{
background
:
#34bfa3
}
}
.icon-
peopl
e
{
.icon-
devic
e
{
color
:
#40c9c6
;
}
.icon-
messag
e
{
.icon-
peopl
e
{
color
:
#36a3f7
;
}
.icon-
money
{
.icon-
guide
{
color
:
#f4516c
;
}
.icon-
shopping
{
.icon-
message
{
color
:
#34bfa3
}
...
...
IoTSharp/ClientApp/src/views/device/device-board.vue
浏览文件 @
387949ec
...
...
@@ -41,9 +41,16 @@
</el-card>
</el-col>
<el-col
:span=
"18"
style=
"padding-left:20px;margin-bottom:30px;margin-top:8px"
>
<div>
<svg-icon
icon-class=
"list"
/>
<span
style=
"margin-left:10px;"
>
设备属性:
</span>
<div
style=
"display:inline"
>
<div
style=
"float:left"
>
<svg-icon
icon-class=
"list"
/>
<span
style=
"margin-left:10px;"
>
设备属性:
</span>
</div>
<div
style=
"float:right;margin-right:10px;"
>
<span
style=
"margin-left:5px;"
>
Access Token:
</span>
<span
style=
"margin-left:10px; color:#F00"
>
{{ curSelectedDeviceToken }}
</span>
<el-button
@
click=
"getDevicToken"
><svg-icon
icon-class=
"password"
/></el-button>
</div>
</div>
<el-table
:key=
"tableKey"
...
...
@@ -136,7 +143,7 @@
</el-table-column>
</el-table>
</el-col>
<el-col
:span=
"18"
style=
"padding-left:20px;margin-bottom:30px;margin-top:8px"
>
<el-col
:span=
"18"
:offset=
"6"
style=
"padding-left:20px;margin-bottom:30px;margin-top:8px"
>
<div>
<svg-icon
icon-class=
"list"
/>
<span
style=
"margin-left:10px;"
>
设备数据:
</span>
...
...
@@ -425,16 +432,23 @@ export default {
})
},
getDevicToken
(
id
)
{
getDevicToken
()
{
if
(
this
.
curSelectedDevIdAndName
.
id
===
''
)
{
this
.
$message
({
message
:
'
请选择一个设备!
'
,
type
:
'
error
'
})
return
}
return
new
Promise
((
resolve
,
reject
)
=>
{
getDeviceAccessToken
(
id
).
then
(
response
=>
{
getDeviceAccessToken
(
this
.
curSelectedDevIdAndName
.
id
).
then
(
response
=>
{
console
.
log
(
'
dev access token response:
'
)
console
.
log
(
response
)
this
.
curSelectedDeviceToken
=
response
.
id
}).
catch
(()
=>
{
this
.
$message
({
message
:
'
获取
DeviceId
失败
'
,
type
:
'
success
'
message
:
'
获取
DeviceId
失败
'
,
type
:
'
error
'
})
}).
catch
(
err
=>
{
console
.
log
(
err
)
...
...
@@ -444,7 +458,6 @@ export default {
},
openDeviceDetails
(
row
)
{
console
.
log
(
'
Start get token:
'
)
// this.getDevicToken(row.id)
console
.
log
(
row
.
id
)
console
.
log
(
'
start get attr, passed value :
'
)
console
.
log
(
row
.
id
)
...
...
@@ -457,7 +470,7 @@ export default {
}).
catch
(()
=>
{
this
.
$message
({
message
:
'
获取Device Attr失败
'
,
type
:
'
success
'
type
:
'
error
'
})
})
getDeviceTelemetryLatest
(
row
.
id
).
then
(
response
=>
{
...
...
@@ -466,8 +479,8 @@ export default {
this
.
devMeterList
=
response
}).
catch
(()
=>
{
this
.
$message
({
message
:
'
获取Device
Att
r失败
'
,
type
:
'
success
'
message
:
'
获取Device
Telemete
r失败
'
,
type
:
'
error
'
})
})
},
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录