| | |
| | | <div class="node-actions"> |
| | | <el-button |
| | | size="small" |
| | | text |
| | | type="danger" |
| | | @click.stop="clearPlc(device)" |
| | | :loading="clearingDeviceId === (device.deviceId || device.id)" |
| | | > |
| | |
| | | try { |
| | | togglingDeviceId.value = deviceId |
| | | await deviceInteractionApi.executeOperation({ |
| | | deviceId, |
| | | id: deviceId, |
| | | operation: 'setOnlineState', |
| | | params: { |
| | | onlineState: value |
| | |
| | | try { |
| | | clearingDeviceId.value = deviceId |
| | | await deviceInteractionApi.executeOperation({ |
| | | deviceId, |
| | | id: deviceId, |
| | | operation: 'clearPlc' |
| | | }) |
| | | ElMessage.success(`已清空 ${device.deviceName || device.deviceCode} 的PLC数据`) |