wxw
2024-09-25 f44c5df9cc045644982f578fb0b3c3e60b88eb68
Web/src/views/device/sortPallet/index.vue
@@ -109,10 +109,25 @@
</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>([]);