【代码优化】IoT:去除 Simulation 关键字,定义更清晰

This commit is contained in:
YunaiV
2025-01-31 22:47:11 +08:00
parent d27cb80065
commit 7be9c3e80e
2 changed files with 13 additions and 19 deletions

View File

@@ -100,13 +100,7 @@
</el-table>
<!-- TODO @super发送按钮可以放在右侧哈。因为我们的 simulateValue 就在最右侧 -->
<div class="mt-10px">
<el-button
type="primary"
@click="handlePropertyReport"
v-hasPermi="['iot:device:simulation']"
>
发送
</el-button>
<el-button type="primary" @click="handlePropertyReport"> 发送 </el-button>
</div>
</ContentWrap>
</el-tab-pane>
@@ -331,7 +325,7 @@ const handlePropertyReport = async () => {
})
try {
await DeviceApi.simulationDeviceUpstream({
await DeviceApi.upstreamDevice({
id: props.device.id,
type: 'property',
identifier: 'report',
@@ -375,7 +369,7 @@ const handlePropertyReport = async () => {
/** 处理设备状态 */
const handleDeviceState = async (state: number) => {
try {
await DeviceApi.simulationDeviceUpstream({
await DeviceApi.upstreamDevice({
id: props.device.id,
type: 'state',
identifier: 'report',