| New file |
| | |
| | | { |
| | | "plcAddressBegin":"00C8", |
| | | "plcAddressLength":"50", |
| | | "requestHead":"000100000006010300C80032", |
| | | "parameterInfo":[ |
| | | { |
| | | "codeId": "plcRequest", |
| | | "addressIndex": "400", |
| | | "addressLength": "2", |
| | | "type": "word", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "plcRequestID", |
| | | "addressIndex": "402", |
| | | "addressLength": "2", |
| | | "type": "word", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "plcReport", |
| | | "addressIndex": "410", |
| | | "addressLength": "2", |
| | | "type": "word", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "plcReportID", |
| | | "addressIndex": "412", |
| | | "addressLength": "2", |
| | | "type": "word", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "mesSend", |
| | | "addressIndex": "420", |
| | | "addressLength": "2", |
| | | "type": "word", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "mesSendID", |
| | | "addressIndex": "422", |
| | | "addressLength": "2", |
| | | "type": "word", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "JPZX", |
| | | "addressIndex": "424", |
| | | "addressLength": "2", |
| | | "type": "word", |
| | | "unit": "" |
| | | }, |
| | | |
| | | { |
| | | "codeId": "thickness", |
| | | "addressIndex": "426", |
| | | "addressLength": "2", |
| | | "type": "word", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "side1", |
| | | "addressIndex": "428", |
| | | "addressLength": "2", |
| | | "type": "word", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "side2", |
| | | "addressIndex": "430", |
| | | "addressLength": "2", |
| | | "type": "word", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "side3", |
| | | "addressIndex": "432", |
| | | "addressLength": "2", |
| | | "type": "word", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "side4", |
| | | "addressIndex": "434", |
| | | "addressLength": "2", |
| | | "type": "word", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "R_angle1_1", |
| | | "addressIndex": "436", |
| | | "addressLength": "2", |
| | | "type": "word", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "R_angle1_2", |
| | | "addressIndex": "438", |
| | | "addressLength": "2", |
| | | "type": "word", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "R_angle2_1", |
| | | "addressIndex": "440", |
| | | "addressLength": "2", |
| | | "type": "word", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "R_angle2_2", |
| | | "addressIndex": "442", |
| | | "addressLength": "2", |
| | | "type": "word", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "R_angle3_1", |
| | | "addressIndex": "444", |
| | | "addressLength": "2", |
| | | "type": "word", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "R_angle3_2", |
| | | "addressIndex": "446", |
| | | "addressLength": "2", |
| | | "type": "word", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "R_angle4_1", |
| | | "addressIndex": "448", |
| | | "addressLength": "2", |
| | | "type": "word", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "R_angle4_2", |
| | | "addressIndex": "450", |
| | | "addressLength": "2", |
| | | "type": "word", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "mesConfirm", |
| | | "addressIndex": "454", |
| | | "addressLength": "2", |
| | | "type": "word", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "mesConfirmID", |
| | | "addressIndex": "456", |
| | | "addressLength": "2", |
| | | "type": "word", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "alarmStatus", |
| | | "addressIndex": "460", |
| | | "addressLength": "2", |
| | | "type": "word", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "alarmWord1", |
| | | "addressIndex": "462", |
| | | "addressLength": "2", |
| | | "type": "word", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "alarmWord2", |
| | | "addressIndex": "464", |
| | | "addressLength": "2", |
| | | "type": "word", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "alarmWord3", |
| | | "addressIndex": "466", |
| | | "addressLength": "2", |
| | | "type": "word", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "alarmWord4", |
| | | "addressIndex": "468", |
| | | "addressLength": "2", |
| | | "type": "word", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "machineStatusWord", |
| | | "addressIndex": "470", |
| | | "addressLength": "2", |
| | | "type": "word", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "inputOrOut2", |
| | | "addressIndex": "474", |
| | | "addressLength": "2", |
| | | "type": "word", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "inputOrOut3", |
| | | "addressIndex": "476", |
| | | "addressLength": "2", |
| | | "type": "word", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "inputOrOut4", |
| | | "addressIndex": "478", |
| | | "addressLength": "2", |
| | | "type": "word", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "inputOrOut5", |
| | | "addressIndex": "480", |
| | | "addressLength": "2", |
| | | "type": "word", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "inputOrOut6", |
| | | "addressIndex": "482", |
| | | "addressLength": "2", |
| | | "type": "word", |
| | | "unit": "" |
| | | }, |
| | | { |
| | | "codeId": "inputOrOut7", |
| | | "addressIndex": "484", |
| | | "addressLength": "2", |
| | | "type": "word", |
| | | "unit": "" |
| | | } |
| | | ] |
| | | |
| | | } |
| | |
| | | |
| | | /** |
| | | * 自动打标机 |
| | | * |
| | | * @Author : yanzhxiin |
| | | * @Date: 2024/8/20 11:19 |
| | | * @Description: |
| | |
| | | //机械手 |
| | | @Scheduled(fixedDelay = 500) |
| | | public void MarkingTasks() { |
| | | try { |
| | | machineListLoad =machineMapper.selectList(new QueryWrapper<Machine>().lambda().eq(Machine::getName,"上片")); |
| | | JSONObject jsonObject = new JSONObject(); |
| | | jsonObject.append("sessionMapName", "loadTask"); |
| | |
| | | jsonObject.append(machine.getId().toString(), jsonObjectItem); |
| | | } |
| | | this.webSocketServer(jsonObject); |
| | | } catch (Exception exception) { |
| | | log.info("MarkingTasks:{}", exception.getMessage()); |
| | | } |
| | | } |
| | | |
| | | //磨边机 |
| | | @Scheduled(fixedDelay = 500) |
| | | public void edgingTasks() { |
| | | try { |
| | | machineListEdging =machineMapper.selectList(new QueryWrapper<Machine>().lambda().eq(Machine::getName,"磨边")); |
| | | JSONObject jsonObject = new JSONObject(); |
| | | jsonObject.append("sessionMapName", "edgingTask"); |
| | |
| | | jsonObject.append(machine.getId().toString(), jsonObjectItem); |
| | | } |
| | | this.webSocketServer(jsonObject); |
| | | } catch (Exception exception) { |
| | | log.info("edgingTasks:{}", exception.getMessage()); |
| | | } |
| | | } |
| | | |
| | | //翻片台 |
| | | @Scheduled(fixedDelay = 500) |
| | | public void flipSliceTasks() { |
| | | try { |
| | | machineListFlipSlice =machineMapper.selectList(new QueryWrapper<Machine>().lambda().eq(Machine::getName,"翻片")); |
| | | JSONObject jsonObject = new JSONObject(); |
| | | jsonObject.append("sessionMapName", "flipSlice"); |
| | |
| | | jsonObject.append(machine.getId().toString(), jsonObjectItem); |
| | | } |
| | | this.webSocketServer(jsonObject); |
| | | } catch (Exception exception) { |
| | | log.info("flipSliceTasks:{}", exception.getMessage()); |
| | | } |
| | | |
| | | } |
| | | |
| | | //打标机 |
| | | @Scheduled(fixedDelay = 500) |
| | | public void markingTasks() { |
| | | try { |
| | | machineListMarking =machineMapper.selectList(new QueryWrapper<Machine>().lambda().eq(Machine::getName,"自动打标机")); |
| | | |
| | | JSONObject jsonObject = new JSONObject(); |
| | |
| | | jsonObject.append(machine.getId().toString(), jsonObjectItem); |
| | | } |
| | | this.webSocketServer(jsonObject); |
| | | } catch (Exception exception) { |
| | | log.info("markingTasks:{}", exception.getMessage()); |
| | | } |
| | | } |
| | | |
| | | //丝印机 |
| | | @Scheduled(fixedDelay = 500) |
| | | public void silkScreenTasks() { |
| | | try { |
| | | machineListSilkScreen =machineMapper.selectList(new QueryWrapper<Machine>().lambda().eq(Machine::getName,"自动丝印机")); |
| | | JSONObject jsonObject = new JSONObject(); |
| | | jsonObject.append("sessionMapName", "silkScreenTask"); |
| | |
| | | jsonObject.append(machine.getId().toString(), jsonObjectItem); |
| | | } |
| | | this.webSocketServer(jsonObject); |
| | | } catch (Exception exception) { |
| | | log.info("silkScreenTasks:{}", exception.getMessage()); |
| | | } |
| | | } |
| | | |
| | | //点胶机 |
| | | //@Scheduled(fixedDelay = 500) |
| | | @Scheduled(fixedDelay = 500) |
| | | public void glueDispenserTasks() { |
| | | try { |
| | | machineListGlueDispenser =machineMapper.selectList(new QueryWrapper<Machine>().lambda().eq(Machine::getName,"自动点胶机")); |
| | | JSONObject jsonObject = new JSONObject(); |
| | | jsonObject.append("sessionMapName", "glueDispenser"); |
| | |
| | | jsonObject.append(machine.getId().toString(), jsonObjectItem); |
| | | } |
| | | this.webSocketServer(jsonObject); |
| | | } catch (Exception exception) { |
| | | log.info("glueDispenserTasks:{}", exception.getMessage()); |
| | | } |
| | | } |
| | | |
| | | //旋转台 |
| | | @Scheduled(fixedDelay = 500) |
| | | public void rotateTasks() { |
| | | try { |
| | | machineListRotate =machineMapper.selectList(new QueryWrapper<Machine>().lambda().eq(Machine::getName,"旋转台")); |
| | | JSONObject jsonObject = new JSONObject(); |
| | | jsonObject.append("sessionMapName", "rotate"); |
| | |
| | | jsonObject.append(machine.getId().toString(), jsonObjectItem); |
| | | } |
| | | this.webSocketServer(jsonObject); |
| | | } catch (Exception exception) { |
| | | log.info("rotateTasks:{}", exception.getMessage()); |
| | | } |
| | | } |
| | | |
| | | //贴膜机 |
| | | @Scheduled(fixedDelay = 500) |
| | | public void laminationTasks() { |
| | | try { |
| | | machineListLamination =machineMapper.selectList(new QueryWrapper<Machine>().lambda().eq(Machine::getName,"自动贴膜机")); |
| | | JSONObject jsonObject = new JSONObject(); |
| | | jsonObject.append("sessionMapName", "lamination"); |
| | |
| | | jsonObject.append(machine.getId().toString(), jsonObjectItem); |
| | | } |
| | | this.webSocketServer(jsonObject); |
| | | } catch (Exception exception) { |
| | | log.info("laminationTasks:{}", exception.getMessage()); |
| | | } |
| | | } |
| | | |
| | | |
| | | //报工页面查询 |
| | | @Scheduled(fixedDelay = 1000) |
| | | public void manualReporting() { |
| | | |
| | | try { |
| | | machineListScanQrCode =machineMapper.selectList(new QueryWrapper<Machine>().lambda().eq(Machine::getName,"识别报工")); |
| | | JSONObject jsonObject = new JSONObject(); |
| | | jsonObject.append("sessionMapName", "manualReporting"); |
| | |
| | | } |
| | | |
| | | this.webSocketServer(jsonObject); |
| | | } catch (Exception exception) { |
| | | log.info("manualReporting:{}", exception.getMessage()); |
| | | } |
| | | } |
| | | |
| | | //线下玻璃查询 |
| | | @Scheduled(fixedDelay = 1000) |
| | | public void downLineTask() { |
| | | try { |
| | | JSONObject jsonObject = new JSONObject(); |
| | | List<Tasking> downLineTask=taskingService.findDownLineTask(); |
| | | jsonObject.append("sessionMapName", "downLineTask"); |
| | | jsonObject.append("downLineTask", downLineTask); |
| | | this.webSocketServer(jsonObject); |
| | | } catch (Exception exception) { |
| | | log.info("downLineTask:{}", exception.getMessage()); |
| | | } |
| | | } |
| | | |
| | | public void webSocketServer(JSONObject jsonObject) { |
| | | try { |
| | | log.info("发送数据:{}", jsonObject.getJSONArray("sessionMapName").get(0).toString()); |
| | | String sessionMapName=jsonObject.getJSONArray("sessionMapName").get(0).toString(); |
| | | webSocketServer.sendToWeb(sessionMapName, jsonObject.toString()); |
| | | } catch (Exception ex) { |
| | |
| | | const downLineTask = ref([]); |
| | | |
| | | const userInfo=JSON.parse(window.localStorage.getItem('userInfo')); |
| | | const pageParams=userInfo.user.menus[0].pages[2].params; |
| | | const pageParams=userInfo.user.menus[0].pages[12].params; |
| | | const pageParamsJson=JSON.parse(pageParams); |
| | | console.log(userInfo.user); |
| | | |
| | | const machineId = pageParamsJson.machineId;//当前页面的设备ID |
| | | console.log(machineId); |
| | | //使用WebSocket方式展示数据 |
| | |
| | | |
| | | loadData.value = dataJson.taskingList[0]; |
| | | findMachine.value = dataJson.machine[0]; |
| | | |
| | | sendRecords.value = dataJson.sendRecords[0].reverse(); |
| | | |
| | | }; |
| | |
| | | </div> |
| | | <div id="main-body"> |
| | | <!-- 表格内容 --> |
| | | <el-table :data="loadData" stripe style="height:260px" |
| | | <el-table :data="loadData" stripe style="height:560px" |
| | | :header-cell-style="{ background: '#F2F3F5 ', color: '#1D2129', textAlign: 'center' }" |
| | | :cell-style="{ textAlign: 'center' }"> |
| | | <!-- <el-table-column type="selection" min-width="30" /> --> |
| | |
| | | </el-table> |
| | | </div> |
| | | |
| | | <div id="main-body" style="width: 100%; height: 460px;min-width: 1200px;"> |
| | | <!-- <div id="main-body" style="width: 100%; height: 460px;min-width: 1200px;"> |
| | | <img style="width: 70%;min-width: 900px; height: 460px;float: left;" src="../../assets/翻片台.png"> |
| | | <!-- <el-image style="width: 70%;min-width: 900px; height: 460px;float: left;" src="../../src/assets/翻片台.png"></el-image> --> |
| | | <!-- <div style="width: 70%;min-width: 900px; height: 460px;background-image: url(../../src/assets/翻片台.png) ;background-size: 100% 100%;float: left;"> |
| | | |
| | | </div> --> |
| | | <div style="width: 30%;min-width: 300px; height: 460px;float: left;padding: 20px;;"> |
| | | <el-table :data="sendRecords" stripe |
| | | :header-cell-style="{ background: '#F2F3F5 ', color: '#1D2129', textAlign: 'center', height: '30px' }" |
| | |
| | | </div> |
| | | <div style="clear:both"></div> |
| | | |
| | | </div> |
| | | </div> --> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | <el-table-column prop="workState" :label="$t('glassInfo.workState')" /> |
| | | <el-table-column fixed="right" :label="$t('productStock.operate')" align="center" width="70"> |
| | | <template #default="scope"> |
| | | <el-button size="mini" link type="primary" plain @click="startOrStopTask(scope.row, findMachine.id, 1)">{{ |
| | | <el-button size="small" link type="primary" plain @click="startOrStopTask(scope.row, findMachine.id, 1)">{{ |
| | | $t('functionState.getTask') }}</el-button> |
| | | </template> |
| | | </el-table-column> |