| | |
| | | const titleSelectJson = ref({ |
| | | engineerId: [], |
| | | }) |
| | | const selectGong = async () => { |
| | | try { |
| | | const response = await request.post('/loadGlass/loadglassdevicetaskhistory/queryAllMessage',{ |
| | | redisRequest: 'loadGlassRequestOne', |
| | | stationCell: 5, |
| | | tableName: 'LOAD_GLASS_DEVICE_ONE_TASK', |
| | | webSocketName: 'loadGlassOne' |
| | | }); |
| | | if (response.code == 200) { |
| | | } |
| | | } catch (error) { |
| | | } |
| | | }; |
| | | request.post("/loadGlass/up-patten-usage/setUpPattenRequest", { |
| | | state: null, |
| | | stationCell: 5 |
| | |
| | | }; |
| | | onMounted(() => { |
| | | socket = initializeWebSocket(socketUrl, handleMessage); |
| | | selectGong() |
| | | }); |
| | | onUnmounted(() => { |
| | | if (socket) { |
| | |
| | | } |
| | | }); |
| | | let socket = null; |
| | | const socketUrl = `ws://${WebSocketHost}:${host}/api/loadGlass/api/talk/loadGlassOne`; |
| | | const socketUrl = `ws://${window.ipConfig.serverUrl}/api/loadGlass/api/talk/loadGlassOne`; |
| | | const handleMessage = (data: any) => { |
| | | isLoading.value = true; |
| | | if (data.inkageState != null) { |
| | |
| | | state: 1, |
| | | }) |
| | | if (response.code == 200) { |
| | | ElMessage.success(response.message); |
| | | let timeoutId = setTimeout(() => { |
| | | // 模拟按下确认按钮 |
| | | const confirmBtn = document.querySelector('.el-message-box__btns .el-button--primary'); |
| | | if (confirmBtn) { |
| | | confirmBtn.click(); |
| | | } |
| | | }, 5000) |
| | | await ElMessageBox.alert(' ', t('basicData.sectionUpperSuccessful'), { |
| | | confirmButtonText: t('searchOrder.sure'), |
| | | type: 'success', |
| | | center: true, |
| | | customClass: 'center-message-box', |
| | | }); |
| | | // 清除定时器 |
| | | clearTimeout(timeoutId); |
| | | // 执行确认后的逻辑 |
| | | canSelectProjecta.value = false; |
| | | canSelectProjectb.value = false; |
| | | canSelectProjectc.value = true; |
| | |
| | | if (response.code == 200) { |
| | | ElMessage.success(response.message); |
| | | blinda.value = false; |
| | | canSelectProjecta.value = true; |
| | | canSelectProjectb.value = true; |
| | | canSelectProjectc.value = false; |
| | | tableData.value = response.data; |
| | | } else { |
| | | ElMessage.error(response.message); |
| | | } |