| | |
| | | </template> |
| | | |
| | | <script lang="ts" setup> |
| | | import { ref } from 'vue'; |
| | | import { ref, onMounted } from 'vue'; |
| | | import { GetWcsPackPlcList,GetWcsPackStationPlcList,BindTaskForPLC,CloseTaskForPLC } from '/@/api/wcs/wcsDevice'; |
| | | import { pageWcsOderTask } from '/@/api/device/wcsOderTask'; |
| | | import { ElMessageBox,ElMessage } from 'element-plus'; |
| | | import { signalR,stopConnection } from './signalR'; |
| | | //连接signalR 监听变更 |
| | | onMounted(async () => { |
| | | signalR.off('PublicCheckTask'); |
| | | signalR.on('PublicCheckTask', (data: any) => { |
| | | //todo 需要测试 |
| | | // if (data.type == 0) { |
| | | |
| | | // } |
| | | var index = devicePointData.value.findIndex(s => s.id == data.id); |
| | | if (index !== -1) { |
| | | devicePointData.value.splice(index, 1, data); |
| | | } |
| | | }); |
| | | }); |
| | | |
| | | //设备数据 |
| | | const deviceList=ref<any>([]); |