【代码优化】IoT:重构设备 upstream 为 message,包括上行 + 下行

This commit is contained in:
YunaiV
2025-01-30 08:43:49 +08:00
parent c830c2b9bb
commit d27cb80065
2 changed files with 21 additions and 8 deletions

View File

@ -103,7 +103,7 @@
<el-button
type="primary"
@click="handlePropertyReport"
v-hasPermi="['iot:device:simulation-report']"
v-hasPermi="['iot:device:simulation']"
>
发送
</el-button>
@ -331,7 +331,7 @@ const handlePropertyReport = async () => {
})
try {
await DeviceApi.simulationReportDevice({
await DeviceApi.simulationDeviceUpstream({
id: props.device.id,
type: 'property',
identifier: 'report',
@ -375,7 +375,7 @@ const handlePropertyReport = async () => {
/** 处理设备状态 */
const handleDeviceState = async (state: number) => {
try {
await DeviceApi.simulationReportDevice({
await DeviceApi.simulationDeviceUpstream({
id: props.device.id,
type: 'state',
identifier: 'report',