| | |
| | | // 假设后端返回的数据格式与 handleMessage 预期一致 |
| | | const responseData = res.data || {}; |
| | | findMachine.value =responseData; |
| | | if (Object.keys(findMachine.value).length === 0){ |
| | | if(findMachine.value.remark.toString()!=errorScanId&&findMachine.value.remark.toString()!=""&&findMachine.value.remark.toString()!=undefined){ |
| | | //有数据就弹窗 |
| | | if(errorOpen){ |
| | | ElMessageBox.close(); |
| | | } |
| | | errorScanId=findMachine.value.remark.toString(); |
| | | errorInfoFuntion(findMachine.value.remark.toString()); |
| | | errorOpen=true; |
| | | }else if(findMachine.value.remark.toString()==""&&errorOpen){ |
| | | ElMessageBox.close(); |
| | | errorOpen=false; |
| | | } |
| | | } |
| | | } |
| | | }); |
| | | |
| | | // 线下数据 |
| | | request.post("/deviceInteraction/tasking/selectGlassDownLine").then((res) => { // 替换为你的API端点 |
| | | if (res.code === 200) { |
| | | // 假设后端返回的数据格式与 handleMessage 预期一致 |
| | | const responseData = res.data || {}; |
| | | downLineTask.value =responseData; |
| | | } |
| | | }); |
| | | } catch (err) { |
| | | console.error('定时请求后端接口失败:', err); |
| | | } |
| | |
| | | <div id="search" > |
| | | <!-- 功能 --> |
| | | <el-button :type="(findMachine['state']=='暂停'?'danger':'success')" id="ButtonMachineStatus" @click="machineStatus((findMachine['state']=='暂停'?'开工':'暂停'))">{{findMachine['state']=='开工'?$t('functionState.start'):$t('functionState.stop')}}</el-button> |
| | | <el-button type="primary" id="ButtonTopLine" @click="topLine">{{$t('functionState.topLine')}}</el-button> |
| | | <!-- <el-button type="primary" id="ButtonTopLine" @click="topLine">{{$t('functionState.topLine')}}</el-button>--> |
| | | <!-- <el-button type="primary" id="searchButton" @click="downLine('下线')">下线</el-button> |
| | | <el-button type="primary" id="searchButton" @click="workStatus('破损')">破损</el-button> |
| | | <el-button type="primary" id="searchButton" @click="workStatus('完工')">完工</el-button> --> |