File tree Expand file tree Collapse file tree 2 files changed +13
-19
lines changed
views/iot/device/device/detail Expand file tree Collapse file tree 2 files changed +13
-19
lines changed Original file line number Diff line number Diff line change @@ -56,16 +56,16 @@ export enum DeviceStateEnum {
56
56
OFFLINE = 2 // 离线
57
57
}
58
58
59
- // IoT 模拟设备上行数据 Request VO
60
- export interface IotDeviceSimulationUpstreamReqVO {
59
+ // IoT 设备上行 Request VO
60
+ export interface IotDeviceUpstreamReqVO {
61
61
id : number // 设备编号
62
62
type : string // 消息类型
63
63
identifier : string // 标识符
64
64
data : any // 请求参数
65
65
}
66
66
67
- // IoT 模拟设备下行数据 Request VO
68
- export interface IotDeviceSimulationDownstreamReqVO {
67
+ // IoT 设备下行 Request VO
68
+ export interface IotDeviceDownstreamReqVO {
69
69
id : number // 设备编号
70
70
type : string // 消息类型
71
71
identifier : string // 标识符
@@ -129,14 +129,14 @@ export const DeviceApi = {
129
129
return await request . download ( { url : `/iot/device/get-import-template` } )
130
130
} ,
131
131
132
- // 模拟设备上行
133
- simulationDeviceUpstream : async ( data : IotDeviceSimulationUpstreamReqVO ) => {
134
- return await request . post ( { url : `/iot/device/simulation- upstream` , data } )
132
+ // 设备上行
133
+ upstreamDevice : async ( data : IotDeviceUpstreamReqVO ) => {
134
+ return await request . post ( { url : `/iot/device/upstream` , data } )
135
135
} ,
136
136
137
- // 模拟设备下行
138
- simulationDeviceDownstream : async ( data : IotDeviceSimulationDownstreamReqVO ) => {
139
- return await request . post ( { url : `/iot/device/simulation- downstream` , data } )
137
+ // 设备下行
138
+ downstreamDevice : async ( data : IotDeviceDownstreamReqVO ) => {
139
+ return await request . post ( { url : `/iot/device/downstream` , data } )
140
140
} ,
141
141
142
142
// 获取设备属性最新数据
Original file line number Diff line number Diff line change 100
100
</el-table >
101
101
<!-- TODO @super:发送按钮,可以放在右侧哈。因为我们的 simulateValue 就在最右侧 -->
102
102
<div class =" mt-10px" >
103
- <el-button
104
- type =" primary"
105
- @click =" handlePropertyReport"
106
- v-hasPermi =" ['iot:device:simulation']"
107
- >
108
- 发送
109
- </el-button >
103
+ <el-button type =" primary" @click =" handlePropertyReport" > 发送 </el-button >
110
104
</div >
111
105
</ContentWrap >
112
106
</el-tab-pane >
@@ -331,7 +325,7 @@ const handlePropertyReport = async () => {
331
325
})
332
326
333
327
try {
334
- await DeviceApi .simulationDeviceUpstream ({
328
+ await DeviceApi .upstreamDevice ({
335
329
id: props .device .id ,
336
330
type: ' property' ,
337
331
identifier: ' report' ,
@@ -375,7 +369,7 @@ const handlePropertyReport = async () => {
375
369
/** 处理设备状态 */
376
370
const handleDeviceState = async (state : number ) => {
377
371
try {
378
- await DeviceApi .simulationDeviceUpstream ({
372
+ await DeviceApi .upstreamDevice ({
379
373
id: props .device .id ,
380
374
type: ' state' ,
381
375
identifier: ' report' ,
You can’t perform that action at this time.
0 commit comments