| | |
| | | import { ElMessageBox, ElMessage } from "element-plus"; |
| | | import { cellsDataLine, cellsDataOne, cellsDataTwo, cellsDataThree } from './data'; |
| | | import { auth } from '/@/utils/authFunction'; |
| | | import Index from '../deviceInfo/index.vue'; |
| | | |
| | | //连接signalR 监听变更 |
| | | onMounted(async () => { |
| | | signalR.off('PublicAlarm'); |
| | | signalR.on('PublicAlarm', (dataArray: any) => { |
| | | dataArray.forEach(data => { |
| | | console.log(data); |
| | | console.log("1111111:"+data); |
| | | // 更新 tableData |
| | | const index = tableData.value.findIndex(t => t.id == data.id); |
| | | console.log("2222222:"+index.value); |
| | | |
| | | if (index === -1 && data.status == 1) { |
| | | // 如果不存在,添加新数据 |
| | | tableData.value.unshift(data); |
| | |
| | | }) |
| | | .then(async () => { |
| | | var param = Object.assign(row); |
| | | console.log(row.stationNum); |
| | | console.log(layer.value); |
| | | console.log("row.stationNum:"+row.stationNum); |
| | | console.log("layer.value:"+layer.value); |
| | | var data = { |
| | | LocatNo: row.stationNum,//工位 |
| | | Layer: layer.value,//楼层 |
| | | } |
| | | |
| | | var res = await WriteInfo(data); |
| | | console.log(res.data.result); |
| | | console.log("res.data.result:"+res.data.result); |
| | | // await topUpWcsTask(param); |
| | | // handleQuery(); |
| | | // handleQuery2(); |