| | |
| | | int startIndex = i * maxChunkSize; |
| | | int endIndex = Math.min(startIndex + maxChunkSize, length); |
| | | String chunk = message.substring(startIndex, endIndex); |
| | | |
| | | // 判断是否是最后一块消息 |
| | | boolean isLastChunk = (i == chunks - 1); |
| | | if(isLastChunk==true){ |
| | |
| | | |
| | | } |
| | | } catch (Exception e) { |
| | | log.error("发送消息给客户端失败:{}", e.getMessage(), e); |
| | | //log.error("发送消息给客户端失败:{}", e.getMessage(), e); |
| | | } |
| | | } |
| | | |
| | |
| | | @Override |
| | | public void run(ApplicationArguments args) throws Exception { |
| | | // TODO Auto-generated method stub |
| | | // new MachineLoad(taskingMapper,machineMapper,taskingService,primitiveTaskService,lineConfigurationService).start(); |
| | | // new MachineEdging(taskingMapper,machineMapper,taskingService,primitiveTaskService,lineConfigurationService).start(); |
| | | // new MachineFlipSlice(machineMapper,taskingService).start(); |
| | | // new MachineMarking(machineMapper,taskingService).start(); |
| | | // new MachineSilkScreen(machineMapper,taskingService).start(); |
| | | // new MachineRotate(machineMapper,taskingService).start(); |
| | | new MachineLoad(taskingMapper,machineMapper,taskingService,primitiveTaskService,lineConfigurationService).start(); |
| | | new MachineEdging(taskingMapper,machineMapper,taskingService,primitiveTaskService,lineConfigurationService).start(); |
| | | new MachineFlipSlice(machineMapper,taskingService).start(); |
| | | new MachineMarking(machineMapper,taskingService).start(); |
| | | new MachineSilkScreen(machineMapper,taskingService).start(); |
| | | new MachineRotate(machineMapper,taskingService).start(); |
| | | } |
| | | } |
| | |
| | | |
| | | import cn.hutool.json.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import com.mes.md.entity.*; |
| | | import com.mes.md.mapper.MachineMapper; |
| | | import com.mes.md.mapper.TaskingMapper; |
| | |
| | | import com.mes.service.PlcParameter; |
| | | import com.mes.tools.WebSocketServer; |
| | | import com.mes.utils.HexUtil; |
| | | import com.mes.utils.Result; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | |
| | | @Autowired |
| | | KBBTJPDrawingBPService kBBTJPDrawingBPService; |
| | | |
| | | //@Scheduled(fixedDelay = 30000) |
| | | public void AddTasks() { |
| | | projectService.insertProjectStandard(); |
| | | @Autowired |
| | | TaskingMapper taskingMapper; |
| | | |
| | | @Scheduled(fixedDelay = 86400000) |
| | | public void deleteTasking() { |
| | | //创建Calendar实例 |
| | | Calendar cal = Calendar.getInstance(); |
| | | //设置当前时间 |
| | | cal.setTime(new Date()); |
| | | cal.add(Calendar.DATE, -5); |
| | | int deleteCount=taskingMapper.deleteJoin(new MPJLambdaWrapper<Tasking>() |
| | | .selectAll(Tasking.class) |
| | | .le(Tasking::getOperationRecordTime,cal.getTime())); |
| | | log.info("定时清除多余数据:{}",deleteCount); |
| | | } |
| | | //@Scheduled(fixedDelay = 1000) |
| | | public void notReceive() { |
| | |
| | | if (sendwServer != null) { |
| | | for (WebSocketServer webserver : sendwServer) { |
| | | if (webserver != null) { |
| | | webserver.sendMessage(jsonObject.toString()); |
| | | List<String> messages = webserver.getMessages(); |
| | | if (!messages.isEmpty()) { |
| | | // // 将最后一个消息转换为整数类型的列表 |
| | | webserver.clearMessages(); |
| | | try { |
| | | webserver.sendMessage(jsonObject.toString()); |
| | | List<String> messages = webserver.getMessages(); |
| | | if (!messages.isEmpty()) { |
| | | // // 将最后一个消息转换为整数类型的列表 |
| | | webserver.clearMessages(); |
| | | } |
| | | }catch (Exception e) { |
| | | |
| | | } |
| | | } else { |
| | | log.info("Home is closed"); |
| | |
| | | if (sendwServer != null) { |
| | | for (WebSocketServer webserver : sendwServer) { |
| | | if (webserver != null) { |
| | | webserver.sendMessage(jsonObject.toString()); |
| | | List<String> messages = webserver.getMessages(); |
| | | if (!messages.isEmpty()) { |
| | | // // 将最后一个消息转换为整数类型的列表 |
| | | webserver.clearMessages(); |
| | | try { |
| | | webserver.sendMessage(jsonObject.toString()); |
| | | List<String> messages = webserver.getMessages(); |
| | | if (!messages.isEmpty()) { |
| | | // // 将最后一个消息转换为整数类型的列表 |
| | | webserver.clearMessages(); |
| | | } |
| | | }catch (Exception e) { |
| | | |
| | | } |
| | | } else { |
| | | log.info("Home is closed"); |
| | |
| | | //log.info("无可执行的条件"); |
| | | |
| | | } |
| | | @Scheduled(fixedDelay = 1000) |
| | | @Scheduled(fixedDelay = 500) |
| | | public void markingTasks() { |
| | | JSONObject jsonObject = new JSONObject(); |
| | | Machine machine=machineMapper.selectById(12L); |
| | |
| | | if (sendwServer != null) { |
| | | for (WebSocketServer webserver : sendwServer) { |
| | | if (webserver != null) { |
| | | webserver.sendMessage(jsonObject.toString()); |
| | | List<String> messages = webserver.getMessages(); |
| | | if (!messages.isEmpty()) { |
| | | // // 将最后一个消息转换为整数类型的列表 |
| | | webserver.clearMessages(); |
| | | try { |
| | | webserver.sendMessage(jsonObject.toString()); |
| | | List<String> messages = webserver.getMessages(); |
| | | if (!messages.isEmpty()) { |
| | | // // 将最后一个消息转换为整数类型的列表 |
| | | webserver.clearMessages(); |
| | | } |
| | | }catch (Exception e) { |
| | | |
| | | } |
| | | } else { |
| | | log.info("Home is closed"); |
| | |
| | | } |
| | | return ""; |
| | | } |
| | | @Scheduled(fixedDelay = 1000) |
| | | @Scheduled(fixedDelay = 500) |
| | | public void EdgingTasks() { |
| | | |
| | | JSONObject jsonObject = new JSONObject(); |
| | | Machine machine=machineMapper.selectById(6L); |
| | | List<Tasking> taskingList=taskingService.findMachineTask(machine); |
| | |
| | | if (sendwServer != null) { |
| | | for (WebSocketServer webserver : sendwServer) { |
| | | if (webserver != null) { |
| | | webserver.sendMessage(jsonObject.toString()); |
| | | List<String> messages = webserver.getMessages(); |
| | | if (!messages.isEmpty()) { |
| | | // // 将最后一个消息转换为整数类型的列表 |
| | | webserver.clearMessages(); |
| | | try { |
| | | webserver.sendMessage(jsonObject.toString()); |
| | | List<String> messages = webserver.getMessages(); |
| | | if (!messages.isEmpty()) { |
| | | // // 将最后一个消息转换为整数类型的列表 |
| | | webserver.clearMessages(); |
| | | } |
| | | }catch (Exception e) { |
| | | |
| | | } |
| | | |
| | | } else { |
| | | log.info("Home is closed"); |
| | | } |
| | |
| | | machineMapper.updateById(machine); |
| | | } |
| | | } |
| | | @Scheduled(fixedDelay = 1000) |
| | | @Scheduled(fixedDelay = 500) |
| | | public void flipSliceTask() { |
| | | //获取报警状态 |
| | | JSONObject jsonObject = new JSONObject(); |
| | |
| | | if (sendServer != null) { |
| | | for (WebSocketServer webserver : sendServer) { |
| | | if (webserver != null) { |
| | | webserver.sendMessage(jsonObject.toString()); |
| | | List<String> messages = webserver.getMessages(); |
| | | if (!messages.isEmpty()) { |
| | | // // 将最后一个消息转换为整数类型的列表 |
| | | webserver.clearMessages(); |
| | | try { |
| | | webserver.sendMessage(jsonObject.toString()); |
| | | List<String> messages = webserver.getMessages(); |
| | | if (!messages.isEmpty()) { |
| | | // // 将最后一个消息转换为整数类型的列表 |
| | | webserver.clearMessages(); |
| | | } |
| | | }catch (Exception e) { |
| | | |
| | | } |
| | | } else { |
| | | log.info("Home is closed"); |
| | |
| | | modbusTcp1.close(); |
| | | //log.info("无可执行的条件"); |
| | | } |
| | | @Scheduled(fixedDelay = 1000) |
| | | @Scheduled(fixedDelay = 500) |
| | | public void loadTasks() { |
| | | JSONObject jsonObject = new JSONObject(); |
| | | Machine machine=machineMapper.selectById(machineId2); |
| | |
| | | if (sendwServer != null) { |
| | | for (WebSocketServer webserver : sendwServer) { |
| | | if (webserver != null) { |
| | | webserver.sendMessage(jsonObject.toString()); |
| | | List<String> messages = webserver.getMessages(); |
| | | if (!messages.isEmpty()) { |
| | | // // 将最后一个消息转换为整数类型的列表 |
| | | webserver.clearMessages(); |
| | | try { |
| | | webserver.sendMessage(jsonObject.toString()); |
| | | List<String> messages = webserver.getMessages(); |
| | | if (!messages.isEmpty()) { |
| | | // // 将最后一个消息转换为整数类型的列表 |
| | | webserver.clearMessages(); |
| | | } |
| | | }catch (Exception e) { |
| | | |
| | | } |
| | | } else { |
| | | log.info("Home is closed"); |
| | |
| | | package com.mes.job; |
| | | |
| | | import cn.hutool.json.JSONObject; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import com.mes.common.S7object; |
| | | import com.mes.device.PlcParameterObject; |
| | | import com.mes.md.entity.LineConfiguration; |
| | | import com.mes.md.entity.Machine; |
| | | import com.mes.md.entity.PrimitiveTask; |
| | | import com.mes.md.entity.Tasking; |
| | | import com.mes.md.mapper.MachineMapper; |
| | | import com.mes.md.mapper.TaskingMapper; |
| | | import com.mes.md.service.PrimitiveTaskService; |
| | | import com.mes.md.service.TaskingService; |
| | | import com.mes.tools.WebSocketServer; |
| | |
| | | @Autowired |
| | | TaskingService taskingService; |
| | | @Autowired |
| | | TaskingMapper taskingMapper; |
| | | @Autowired |
| | | MachineMapper machineMapper; |
| | | @Autowired |
| | | PrimitiveTaskService primitiveTaskService; |
| | | |
| | | //@Scheduled(fixedDelay = 500) |
| | | //@Scheduled(fixedDelay = 1000) |
| | | @Scheduled(fixedDelay = 500) |
| | | public void manualReporting() { |
| | | |
| | | JSONObject jsonObject = new JSONObject(); |
| | | List<PrimitiveTask> taskingList = primitiveTaskService.selectPrimitiveTask(new PrimitiveTask()); |
| | | Machine machine=machineMapper.selectById(24L); |
| | | List<Tasking> taskingList=taskingMapper.selectJoinList(Tasking.class,new MPJLambdaWrapper<Tasking>() |
| | | .selectAll(Tasking.class) |
| | | .innerJoin(LineConfiguration.class,LineConfiguration::getId,Tasking::getLineConfigurationId) |
| | | .innerJoin(Machine.class,Machine::getId,LineConfiguration::getMachineId) |
| | | .eq(LineConfiguration::getMachineId,machine.getId()) |
| | | .eq(Tasking::getGlassState,"正常") |
| | | .eq(Tasking::getState,"线上") |
| | | .ne(Tasking::getWorkState,"完工") |
| | | .orderByDesc(Tasking::getOperationRecordTime)); |
| | | |
| | | //List<PrimitiveTask> taskingList = primitiveTaskService.selectPrimitiveTask(new PrimitiveTask()); |
| | | jsonObject.append("taskingList", taskingList); |
| | | jsonObject.append("machine", machine); |
| | | ArrayList<WebSocketServer> sendwServer = WebSocketServer.sessionMap.get("manualReporting"); |
| | | if (sendwServer != null) { |
| | | for (WebSocketServer webserver : sendwServer) { |
| | | if (webserver != null) { |
| | | webserver.sendMessage(jsonObject.toString()); |
| | | List<String> messages = webserver.getMessages(); |
| | | if (!messages.isEmpty()) { |
| | | // // 将最后一个消息转换为整数类型的列表 |
| | | webserver.clearMessages(); |
| | | try { |
| | | webserver.sendMessage(jsonObject.toString()); |
| | | List<String> messages = webserver.getMessages(); |
| | | if (!messages.isEmpty()) { |
| | | // // 将最后一个消息转换为整数类型的列表 |
| | | webserver.clearMessages(); |
| | | } |
| | | }catch (Exception e) { |
| | | |
| | | } |
| | | } else { |
| | | log.info("Home is closed"); |
| | |
| | | machineMapper.updateById(machine); |
| | | } |
| | | } |
| | | @Scheduled(fixedDelay = 1000) |
| | | @Scheduled(fixedDelay = 500) |
| | | public void rotateTask() { |
| | | //获取报警状态 |
| | | JSONObject jsonObject = new JSONObject(); |
| | |
| | | if (sendwServer != null) { |
| | | for (WebSocketServer webserver : sendwServer) { |
| | | if (webserver != null) { |
| | | webserver.sendMessage(jsonObject.toString()); |
| | | List<String> messages = webserver.getMessages(); |
| | | if (!messages.isEmpty()) { |
| | | // // 将最后一个消息转换为整数类型的列表 |
| | | webserver.clearMessages(); |
| | | try { |
| | | webserver.sendMessage(jsonObject.toString()); |
| | | List<String> messages = webserver.getMessages(); |
| | | if (!messages.isEmpty()) { |
| | | // // 将最后一个消息转换为整数类型的列表 |
| | | webserver.clearMessages(); |
| | | } |
| | | }catch (Exception e) { |
| | | |
| | | } |
| | | } else { |
| | | log.info("Home is closed"); |
| | |
| | | //log.info("无可执行的条件"); |
| | | } |
| | | |
| | | @Scheduled(fixedDelay = 1000) |
| | | @Scheduled(fixedDelay = 500) |
| | | public void SilkScreenTasks() { |
| | | JSONObject jsonObject = new JSONObject(); |
| | | Machine machine=machineMapper.selectById(14L); |
| | |
| | | if (sendwServer != null) { |
| | | for (WebSocketServer webserver : sendwServer) { |
| | | if (webserver != null) { |
| | | webserver.sendMessage(jsonObject.toString()); |
| | | List<String> messages = webserver.getMessages(); |
| | | if (!messages.isEmpty()) { |
| | | // // 将最后一个消息转换为整数类型的列表 |
| | | webserver.clearMessages(); |
| | | try { |
| | | webserver.sendMessage(jsonObject.toString()); |
| | | List<String> messages = webserver.getMessages(); |
| | | if (!messages.isEmpty()) { |
| | | // // 将最后一个消息转换为整数类型的列表 |
| | | webserver.clearMessages(); |
| | | } |
| | | }catch (Exception e) { |
| | | |
| | | } |
| | | } else { |
| | | log.info("Home is closed"); |
| | |
| | | package com.mes.md.controller; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import com.mes.md.entity.KBBTLensSorting; |
| | | import com.mes.md.entity.LineConfiguration; |
| | | import com.mes.md.entity.Machine; |
| | | import com.mes.md.entity.Tasking; |
| | | import com.mes.md.mapper.KBBTLensSortingMapper; |
| | | import com.mes.md.mapper.MachineMapper; |
| | | import com.mes.md.mapper.TaskingMapper; |
| | | import com.mes.md.service.ProjectService; |
| | | import com.mes.md.service.TaskingService; |
| | | import com.mes.utils.Result; |
| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | private ProjectService projectService; |
| | | @Autowired |
| | | private MachineMapper machineMapper; |
| | | @Autowired |
| | | private TaskingMapper taskingMapper; |
| | | |
| | | @Autowired |
| | | private KBBTLensSortingMapper kBBTLensSortingMapper; |
| | | |
| | | |
| | | |
| | | @ApiOperation("查询库位信息 返回结果") |
| | | @PostMapping("/findKBBTLensSorting") |
| | | @ResponseBody |
| | | public Result findKBBTLensSorting(@RequestBody Map<String, String> map) { |
| | | try { |
| | | String scanId=map.get("scanId").toString(); |
| | | if (!scanId.isEmpty()){ |
| | | List<KBBTLensSorting> list=kBBTLensSortingMapper.selectList(new QueryWrapper<KBBTLensSorting>().lambda() |
| | | .eq(KBBTLensSorting::getBarcode,scanId)); |
| | | return Result.build(200,"成功",list); |
| | | } |
| | | return Result.build(199,"前端传值NULL",map); |
| | | }catch (Exception e){ |
| | | return Result.build(199,"异常",map); |
| | | } |
| | | } |
| | | @ApiOperation("扫码成功后返回结果 machineId,scanId") |
| | | @PostMapping("/scanMachineAdd") |
| | | @ResponseBody |
| | | public Result scanMachineAdd(@RequestBody Map<String, String> map) { |
| | | try { |
| | | String machineId=map.get("machineId").toString(); |
| | | String scanId=map.get("scanId").toString(); |
| | | if (!scanId.isEmpty()&&!machineId.isEmpty()){ |
| | | Machine machine = machineMapper.selectById(machineId); |
| | | int addCount =taskingService.scanMachineAdd(machine,scanId); |
| | | return Result.build(200,"成功",addCount); |
| | | } |
| | | return Result.build(199,"前端传值NULL",map); |
| | | }catch (Exception e){ |
| | | return Result.build(199,"异常",map); |
| | | } |
| | | } |
| | | @ApiOperation("报工提交 ") |
| | | @PostMapping("/reportForWork") |
| | | @ResponseBody |
| | | public Result reportForWork(@RequestBody Machine machine) { |
| | | try { |
| | | int deleteCount=taskingMapper.deleteJoin(new MPJLambdaWrapper<Tasking>() |
| | | .selectAll(Tasking.class) |
| | | .innerJoin(LineConfiguration.class,LineConfiguration::getId,Tasking::getLineConfigurationId) |
| | | .innerJoin(Machine.class,Machine::getId,LineConfiguration::getMachineId) |
| | | .eq(LineConfiguration::getMachineId,machine.getId()) |
| | | .eq(Tasking::getGlassState,"正常") |
| | | .eq(Tasking::getState,"线上") |
| | | .ne(Tasking::getWorkState,"完工")); |
| | | return Result.build(200,"成功",deleteCount); |
| | | }catch (Exception e){ |
| | | return Result.build(199,"异常",machine); |
| | | } |
| | | } |
| | | @ApiOperation("查询当前设备,未完工状态的线上任务") |
| | | @PostMapping("/findMachineTask") |
| | | @ResponseBody |
| | |
| | | return Result.build(200,"修改成功:"+count,count); |
| | | } |
| | | |
| | | @ApiOperation("提交 扫码报工 ") |
| | | @PostMapping("/scanReport") |
| | | @ResponseBody |
| | | public Result scanReport(@RequestBody Tasking tasking) { |
| | | int count =taskingService.stopTasking(tasking); |
| | | return Result.build(200,"修改成功:"+count,count); |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | private Date endTime; |
| | | |
| | | /** |
| | | * 结束时 任务执行状态【等待/工作/完成】 |
| | | */ |
| | | private String workState; |
| | | |
| | | /** |
| | | * 结束时 所在工艺 id (线路ID) |
| | | */ |
| | | private Long lineConfigurationId; |
| | | |
| | | /** |
| | | * 结束时 生产状态【线上/线下】 |
| | | */ |
| | | private String state; |
| | | |
| | | /** |
| | | * 结束时 玻璃状态【正常/破损】 |
| | | */ |
| | | private String glassState; |
| | | |
| | | /** |
| | | * 领取线路 |
| | | */ |
| | | private Integer getLine; |
| | | |
| | | /** |
| | | * 补单数量 |
| | | */ |
| | | private Integer unusualCount; |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | |
| | | * R角4-2(左下角) |
| | | */ |
| | | private Double r_4_2; |
| | | |
| | | /** |
| | | * 总表ID |
| | | */ |
| | | private Long primitiveTaskId; |
| | | |
| | | /** |
| | | * 操作时间 |
| | | */ |
| | | private Date operationRecordTime; |
| | | |
| | | /** |
| | | * 操作者 |
| | | */ |
| | | private String operationRecord; |
| | | |
| | | /** |
| | | * 操作类型 【开始/结束】 |
| | | */ |
| | | private String operationMode; |
| | | /** |
| | | * 库位 |
| | | */ |
| | | private String warehouse; |
| | | |
| | | } |
| | |
| | | import com.mes.md.entity.*; |
| | | import com.mes.md.mapper.*; |
| | | import com.mes.md.service.*; |
| | | import lombok.Data; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | private MachineMapper machineMapper; |
| | | @Autowired |
| | | private LineConfigurationService lineConfigurationService; |
| | | |
| | | @Autowired |
| | | KBBTLensSortingMapper kBBTLensSortingMapper; |
| | | |
| | | /** |
| | | * @param machine |
| | |
| | | List<Tasking> list=this.findMachineWorkStateTask(machine,"等待"); |
| | | if(!list.isEmpty()){ |
| | | Tasking tasking=list.get(0); |
| | | LineConfiguration thisLineConfiguration=lineConfigurationMapper.selectById(tasking.getLineConfigurationId()); |
| | | tasking.setOperationRecord(thisLineConfiguration.getRemark()+thisLineConfiguration.getLineId()); |
| | | tasking.setOperationRecordTime(new Date()); |
| | | tasking.setOperationMode("开始"); |
| | | tasking.setWorkState("正在工作"); |
| | | if(baseMapper.updateById(tasking)>0){ |
| | | return tasking; |
| | |
| | | if(!list.isEmpty()){ |
| | | Tasking tasking=list.get(0); |
| | | if(scan_id.equals(tasking.getScanId())){ |
| | | LineConfiguration thisLineConfiguration=lineConfigurationMapper.selectById(tasking.getLineConfigurationId()); |
| | | tasking.setOperationRecord(thisLineConfiguration.getRemark()+thisLineConfiguration.getLineId()); |
| | | tasking.setOperationRecordTime(new Date()); |
| | | tasking.setOperationMode("开始"); |
| | | tasking.setWorkState("正在工作"); |
| | | if(baseMapper.updateById(tasking)>0){ |
| | | return tasking; |
| | |
| | | machine.setTodayCount(taskSequence); |
| | | machineMapper.updateById(machine); |
| | | tasking.setTaskSequence(taskSequence); |
| | | |
| | | tasking.setWorkState("正在工作"); |
| | | tasking.setLineConfigurationId(machineLineConfiguration.get(0).getId()); |
| | | //记录设备开始时间 |
| | | tasking.setOperationRecord(machineLineConfiguration.get(0).getRemark()+machineLineConfiguration.get(0).getLineId()); |
| | | tasking.setOperationRecordTime(new Date()); |
| | | tasking.setOperationMode("开始"); |
| | | |
| | | if(baseMapper.updateById(tasking)>0){ |
| | | finishMachineTask(machine); |
| | | return tasking; |
| | |
| | | if(!list.isEmpty()){ |
| | | Tasking tasking=list.get(0); |
| | | if (!listLineConfiguration.isEmpty()){ |
| | | LineConfiguration thisLineConfiguration=lineConfigurationMapper.selectById(tasking.getLineConfigurationId()); |
| | | tasking.setOperationRecord(thisLineConfiguration.getRemark()+thisLineConfiguration.getLineId()); |
| | | tasking.setOperationRecordTime(new Date()); |
| | | tasking.setOperationMode("结束"); |
| | | tasking.setLineConfigurationId(listLineConfiguration.get(0).getId()); |
| | | tasking.setWorkState("等待"); |
| | | return baseMapper.updateById(tasking); |
| | |
| | | ); |
| | | if(!list.isEmpty()){ |
| | | Tasking tasking=list.get(0); |
| | | LineConfiguration thisLineConfiguration=lineConfigurationMapper.selectById(tasking.getLineConfigurationId()); |
| | | tasking.setOperationRecord(thisLineConfiguration.getRemark()+thisLineConfiguration.getLineId()); |
| | | tasking.setOperationRecordTime(new Date()); |
| | | tasking.setOperationMode("结束"); |
| | | if (!listLineConfiguration.isEmpty()){ |
| | | tasking.setLineConfigurationId(listLineConfiguration.get(0).getId()); |
| | | tasking.setWorkState("等待"); |
| | | return baseMapper.updateById(tasking); |
| | | }else{ |
| | | return this.stopTasking(tasking); |
| | | } |
| | | else{ |
| | | tasking.setWorkState("完工"); |
| | | return baseMapper.updateById(tasking); |
| | | //return this.stopTasking(tasking); |
| | | } |
| | | |
| | | } |
| | |
| | | .orderByDesc(Tasking::getTaskSequence)); |
| | | if(!list.isEmpty()){ |
| | | Tasking tasking=list.get(0); |
| | | LineConfiguration thisLineConfiguration=lineConfigurationMapper.selectById(tasking.getLineConfigurationId()); |
| | | tasking.setOperationRecord(thisLineConfiguration.getRemark()+thisLineConfiguration.getLineId()); |
| | | tasking.setOperationRecordTime(new Date()); |
| | | tasking.setOperationMode("人工"); |
| | | tasking.setWorkState("等待"); |
| | | return baseMapper.updateById(tasking); |
| | | } |
| | |
| | | .orderByDesc(Tasking::getTaskSequence)); |
| | | if(!list.isEmpty()){ |
| | | Tasking tasking=list.get(0); |
| | | LineConfiguration thisLineConfiguration=lineConfigurationMapper.selectById(tasking.getLineConfigurationId()); |
| | | tasking.setOperationRecord(thisLineConfiguration.getRemark()+thisLineConfiguration.getLineId()); |
| | | tasking.setOperationRecordTime(new Date()); |
| | | tasking.setOperationMode("自动"); |
| | | tasking.setState("线下"); |
| | | return baseMapper.updateById(tasking); |
| | | } |
| | |
| | | public int damagedTask(Tasking tasking) { |
| | | Tasking oldTasking=baseMapper.selectById(tasking); |
| | | if(!Objects.isNull(oldTasking)){ |
| | | LineConfiguration thisLineConfiguration=lineConfigurationMapper.selectById(oldTasking.getLineConfigurationId()); |
| | | oldTasking.setOperationRecord(thisLineConfiguration.getRemark()+thisLineConfiguration.getLineId()); |
| | | oldTasking.setOperationRecordTime(new Date()); |
| | | oldTasking.setOperationMode("人工"); |
| | | oldTasking.setGlassState("破损"); |
| | | return baseMapper.updateById(oldTasking); |
| | | } |
| | |
| | | public int glassDownLine(Tasking tasking) { |
| | | Tasking oldTasking=baseMapper.selectById(tasking); |
| | | if (!Objects.isNull(oldTasking)){ |
| | | LineConfiguration thisLineConfiguration=lineConfigurationMapper.selectById(oldTasking.getLineConfigurationId()); |
| | | oldTasking.setOperationRecord(thisLineConfiguration.getRemark()+thisLineConfiguration.getLineId()); |
| | | oldTasking.setOperationRecordTime(new Date()); |
| | | oldTasking.setOperationMode("人工"); |
| | | oldTasking.setState("线下"); |
| | | return baseMapper.updateById(oldTasking); |
| | | } |
| | |
| | | if(!Objects.isNull(scanId)){ |
| | | List<PrimitiveTask> primitiveTaskList=primitiveTaskMapper.selectList(new QueryWrapper<PrimitiveTask>().lambda() |
| | | .eq(PrimitiveTask::getScanId,scanId)); |
| | | if(primitiveTaskList.isEmpty()){ |
| | | int insertCount=projectService.insertProjectCustomization(scanId); |
| | | errorStr="扫码ID:"+scanId+" 九牧IT数据库未下发"; |
| | | if (insertCount<1&&!errorStr.equals(machine.getRemark())){ |
| | | machine.setRemark(errorStr); |
| | | machineMapper.updateById(machine); |
| | | return 0; |
| | | } |
| | | } |
| | | primitiveTaskList=primitiveTaskMapper.selectList(new QueryWrapper<PrimitiveTask>().lambda() |
| | | .eq(PrimitiveTask::getScanId,scanId)); |
| | | |
| | | if(!primitiveTaskList.isEmpty()){ |
| | | PrimitiveTask primitiveTask=primitiveTaskList.get(0); |
| | | LineConfiguration lineConfiguration=lineConfigurationService.machineLineConfiguration(machine); |
| | | List<Tasking> listTasking=baseMapper.selectList(new QueryWrapper<Tasking>().lambda() |
| | | .eq(Tasking::getScanId,scanId) |
| | | .ne(Tasking::getLineConfigurationId,113) |
| | | .ne(Tasking::getState,"线下") |
| | | .ne(Tasking::getGlassState,"破损")); |
| | | if(listTasking.size()<primitiveTaskList.get(0).getTaskQuantity()){ |
| | | if((listTasking.size()<primitiveTaskList.get(0).getTaskQuantity())||machine.getMode()==3){ |
| | | Tasking tasking=primitiveTaskService.convertListTasking(primitiveTask,lineConfiguration.getId()); |
| | | Integer taskSequence=1; |
| | | if (machine.getTodayCount()>0&&machine.getTodayCount()<5000){ |
| | |
| | | taskSequence=1; |
| | | } |
| | | machine.setTodayCount(taskSequence); |
| | | String Warehouse=""; |
| | | if (machine.getId()==24){ |
| | | List<KBBTLensSorting> list=kBBTLensSortingMapper.selectList(new QueryWrapper<KBBTLensSorting>().lambda() |
| | | .eq(KBBTLensSorting::getBarcode,scanId) |
| | | .notLike(KBBTLensSorting::getProductionOrder,"防碎膜")); |
| | | if (list.size()>0){ |
| | | Warehouse=list.get(0).getWarehouse(); |
| | | } |
| | | } |
| | | tasking.setWarehouse(Warehouse); |
| | | tasking.setOperationRecord(lineConfiguration.getRemark()+lineConfiguration.getLineId()); |
| | | tasking.setOperationRecordTime(new Date()); |
| | | tasking.setOperationMode("插入数据"); |
| | | |
| | | tasking.setTaskSequence(taskSequence); |
| | | machineMapper.updateById(machine); |
| | | return baseMapper.insert(tasking); |
| | |
| | | machine.setRemark(errorStr); |
| | | machineMapper.updateById(machine); |
| | | } |
| | | }else{ |
| | | int insertCount=projectService.insertProjectCustomization(scanId); |
| | | errorStr="扫码ID:"+scanId+" 九牧IT数据库未下发"; |
| | | if (insertCount<1&&!errorStr.equals(machine.getRemark())){ |
| | | machine.setRemark(errorStr); |
| | | machineMapper.updateById(machine); |
| | | } |
| | | } |
| | | |
| | | } |
| | | return 0; |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public Boolean insertTasking(String status) { |
| | | Tasking tasking = new Tasking(); |
| | |
| | | String send= HexUtil.intTo2ByteHex(0); |
| | | modbusTcp1.writeString(send,HexUtil.intTo2ByteHex(mesSend.getAddressStart()/2)); |
| | | log.info("发送字 清空成功;内容:{},发送起始地址:{}",send,HexUtil.intTo2ByteHex(mesSend.getAddressStart())); |
| | | errorMachine(machine,""); |
| | | modbusTcp1.close(); |
| | | return; |
| | | } |
| | |
| | | modbusTcp1.close(); |
| | | return; |
| | | } |
| | | if(1==plcReport.getValueInt()&&0==mesConfirm.getValueInt()){ |
| | | if((1==plcReport.getValueInt()&&0==mesConfirm.getValueInt())){ |
| | | int finishCount=taskingService.finishMachineTask(machine); |
| | | log.info("3、任务完成"); |
| | | if(finishCount>0) {//有任务 |
| | |
| | | } |
| | | List<Tasking> taskingCount=taskingService.findMachineWorkStateTask(machine,"正在工作"); |
| | | |
| | | if((1==plcRequest.getValueInt()&&0==mesSend.getValueInt()) |
| | | if(((1==plcRequest.getValueInt()&&0==mesSend.getValueInt()) |
| | | &&"开工".equals(machine.getState()) |
| | | &&taskingCount.size()<machine.getMaxTaskCount()){ |
| | | &&taskingCount.size()<machine.getMaxTaskCount())){ |
| | | Machine loadMachine=machineMapper.selectById(2L); |
| | | Tasking tasking; |
| | | String scan_id=""; |
| | |
| | | }else{ |
| | | //定制模式 |
| | | String PlcRequestID_=clientTCPSocket(); |
| | | //String PlcRequestID_=",,46607221"; |
| | | //String PlcRequestID_=",,46408889"; |
| | | if (PlcRequestID_==null||PlcRequestID_.lastIndexOf(",")<0){ |
| | | modbusTcp1.close(); |
| | | errorMachine(machine,("扫不到码:"+PlcRequestID_)); |
| | |
| | | //发送字置0 |
| | | log.info("1.发送类型字置零,清除上次发送的类型数据{}->0",mesSendType.getValue()); |
| | | s7objectMachine.plccontrol.writeWord(mesSendType.getAddress(), 0); |
| | | |
| | | return; |
| | | } |
| | | if ("0".equals(plcRequest.getValue())&&!"0".equals(mesSend.getValue())) { |
| | | //发送字置0 |
| | | int finishCount=taskingService.finishMachineTask(machine); |
| | | nullMachine(machine); |
| | | log.info("2.发送字置零,清除上次发送的数据{},{},{},{},{}" |
| | | ,finishCount |
| | | ,length.getValue() |
| | |
| | | &&"开工".equals(machine.getState())){ |
| | | int loadCount=0; |
| | | if(machine.getMode()==1){ |
| | | |
| | | //标准模式 找已领取未完成的第一条任务 |
| | | LineConfiguration lineConfiguration=lineConfigurationService.machineLineConfiguration(machine); |
| | | List<PrimitiveTask> findPrimitiveTasking=primitiveTaskService.findPrimitiveTasking(machine,lineConfiguration.getLineId()); |
| | |
| | | //任务数>已上数量 |
| | | List<Tasking> taskingTopList=taskingMapper.selectList(new QueryWrapper<Tasking>().lambda() |
| | | .eq(Tasking::getScanId,primitiveTask.getScanId()) |
| | | .eq(Tasking::getState,"线上") |
| | | .eq(Tasking::getGlassState,"正常") |
| | | ); |
| | | loadCount=primitiveTask.getTaskQuantity()-taskingTopList.size(); |
| | | loadCount=(loadCount>0?loadCount:0); |
| | | if (primitiveTask.getTaskQuantity()>primitiveTask.getReportCount()){ |
| | | loadCount=primitiveTask.getTaskQuantity()-taskingTopList.size(); |
| | | loadCount=(loadCount>0?loadCount:0); |
| | | } |
| | | break; |
| | | } |
| | | }else{ |
| | |
| | | if ("0".equals(plcRequest.getValue())&&!"0".equals(mesSend.getValue())) { |
| | | //发送字置0 |
| | | int finishCount=taskingService.finishMachineTask(machine); |
| | | nullMachine(machine); |
| | | log.info("1.发送字置零,清除上次发送的数据{},{},{},{},{}" |
| | | ,finishCount |
| | | ,length.getValue() |
| | |
| | | s7objectMachine.plccontrol.writeWord(mesSendId.getAddress(), 0); |
| | | s7objectMachine.plccontrol.writeWord(rotateType.getAddress(), 0); |
| | | s7objectMachine.plccontrol.writeWord(mesSend.getAddress(), 0); |
| | | |
| | | return; |
| | | } |
| | | if ("1".equals(plcRequestType.getValue())&&"0".equals(mesSendType.getValue())) { |
| | |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | salve_JomooKBB: |
| | | url: jdbc:sqlserver://localhost:1433;databasename=JomooKBB |
| | | username: sa |
| | | password: beibo.123/ |
| | | driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver |
| | | # salve_JomooKBB: |
| | | # url: jdbc:sqlserver://172.18.19.85:1433;databasename=JomooKBB |
| | | # username: thok |
| | | # password: jomoo@123 |
| | | # url: jdbc:sqlserver://localhost:1433;databasename=JomooKBB |
| | | # username: sa |
| | | # password: beibo.123/ |
| | | # driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver |
| | | salve_JomooKBB: |
| | | url: jdbc:sqlserver://172.18.19.85:1433;databasename=JomooKBB |
| | | username: thok |
| | | password: jomoo@123 |
| | | driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver |
| | | cloud: |
| | | nacos: |
| | | discovery: |
| | |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import com.mes.md.entity.*; |
| | | import com.mes.md.mapper.AccountMapper; |
| | | import com.mes.md.mapper.KBBTJPDrawingBPMapper; |
| | | import com.mes.md.mapper.MachineMapper; |
| | | import com.mes.md.mapper.PrimitiveTaskMapper; |
| | | import com.mes.md.mapper.*; |
| | | import com.mes.md.service.AccountService; |
| | | import com.mes.md.service.PrimitiveTaskService; |
| | | import com.mes.md.service.ProjectService; |
| | |
| | | import java.net.Socket; |
| | | import java.nio.charset.StandardCharsets; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Random; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * @Author : yanzhixin |
| | |
| | | @Autowired |
| | | MachineMapper machineMapper; |
| | | |
| | | @Autowired |
| | | TaskingMapper taskingMapper; |
| | | |
| | | @Autowired |
| | | KBBTLensSortingMapper kBBTLensSortingMapper; |
| | | |
| | | /** |
| | | * 测试 扫码后库位 |
| | | */ |
| | | @Test |
| | | public void testStr() { |
| | | String str=new String("4、发送任务 任务数据:{}, ".getBytes(),StandardCharsets.UTF_8); |
| | | int a=1; |
| | | log.info(str,1); |
| | | |
| | | //创建Calendar实例 |
| | | Calendar cal = Calendar.getInstance(); |
| | | //设置当前时间 |
| | | cal.setTime(new Date()); |
| | | cal.add(Calendar.DATE, -3); |
| | | int deleteCount=taskingMapper.deleteJoin(new MPJLambdaWrapper<Tasking>() |
| | | .selectAll(Tasking.class) |
| | | .le(Tasking::getOperationRecordTime,cal.getTime())); |
| | | |
| | | log.info("{},删除数据:{}",cal.getTime(),deleteCount); |
| | | } |
| | | |
| | | @Test |
| | | public void testSaoMa3() { |
| | | try { |
| | | // 创建TCP客户端并连接到服务器 |
| | | String serverAddress = "192.168.1.8"; |
| | | int serverPort = 2001; |
| | | Socket clientSocket = new Socket(serverAddress, serverPort); |
| | | // 创建输入流和输出流 |
| | | InputStream inputStream = clientSocket.getInputStream(); |
| | | OutputStream outputStream = clientSocket.getOutputStream(); |
| | | // 发送数据给服务器 |
| | | String message = "start"; |
| | | outputStream.write(message.getBytes()); |
| | | // 读取服务器响应的数据 |
| | | byte[] buffer = new byte[1024]; |
| | | int bytesRead = inputStream.read(buffer); |
| | | String receivedMessage = new String(buffer, 0, bytesRead); |
| | | System.out.println("收到服务器响应:" + receivedMessage); |
| | | // 关闭连接 |
| | | clientSocket.close(); |
| | | }catch (Exception e){ |
| | | log.info("扫码异常"); |
| | | } |
| | | int deleteCount=taskingMapper.deleteJoin(new MPJLambdaWrapper<Tasking>() |
| | | .selectAll(Tasking.class) |
| | | .innerJoin(LineConfiguration.class,LineConfiguration::getId,Tasking::getLineConfigurationId) |
| | | .innerJoin(Machine.class,Machine::getId,LineConfiguration::getMachineId) |
| | | .eq(LineConfiguration::getMachineId,24L) |
| | | .eq(Tasking::getGlassState,"正常") |
| | | .eq(Tasking::getState,"线上") |
| | | .ne(Tasking::getWorkState,"完工")); |
| | | log.info("{}",deleteCount); |
| | | } |
| | | |
| | | @Test |
| | |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | salve_JomooKBB: |
| | | url: jdbc:sqlserver://localhost:1433;databasename=JomooKBB |
| | | username: sa |
| | | password: beibo.123/ |
| | | driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver |
| | | # salve_JomooKBB: |
| | | # url: jdbc:sqlserver://172.18.19.85:1433;databasename=JomooKBB |
| | | # username: thok |
| | | # password: jomoo@123 |
| | | # url: jdbc:sqlserver://localhost:1433;databasename=JomooKBB |
| | | # username: sa |
| | | # password: beibo.123/ |
| | | # driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver |
| | | salve_JomooKBB: |
| | | url: jdbc:sqlserver://172.18.19.85:1433;databasename=JomooKBB |
| | | username: thok |
| | | password: jomoo@123 |
| | | driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver |
| | | cloud: |
| | | nacos: |
| | | discovery: |
| | |
| | | com\mes\md\controller\WorkTaskDetailController.class |
| | | com\mes\md\controller\MenuController.class |
| | | com\mes\md\entity\OrderOriginalPiece.class |
| | | com\mes\md\mapper\KBBTLensSortingMapper.class |
| | | com\mes\md\service\MenuService.class |
| | | com\mes\md\mapper\KBBTJPDrawingBPMapper.class |
| | | com\mes\md\controller\GlassInfoController.class |
| | |
| | | com\mes\md\entity\RoleMenu.class |
| | | com\mes\md\controller\TaskLogController.class |
| | | com\mes\md\service\impl\TaskingServiceImpl.class |
| | | com\mes\md\entity\KBBTLensSorting.class |
| | | com\mes\md\service\impl\KBBTJPDrawingBPServiceImpl.class |
| | | com\mes\md\mapper\ProjectMapper.class |
| | | com\mes\job\PLCScanQrCodesReport.class |
| | |
| | | D:\workfile\JiuMuMES\JiuMuMesParent\moduleService\DeviceInteractionModule\src\main\java\com\mes\md\service\impl\PrimitiveTaskServiceImpl.java |
| | | D:\workfile\JiuMuMES\JiuMuMesParent\moduleService\DeviceInteractionModule\src\main\java\com\mes\edgstoragecage\service\EdgStorageCageService.java |
| | | D:\workfile\JiuMuMES\JiuMuMesParent\moduleService\DeviceInteractionModule\src\main\java\com\mes\md\entity\EdgeGrindingLog.java |
| | | D:\workfile\JiuMuMES\JiuMuMesParent\moduleService\DeviceInteractionModule\src\main\java\com\mes\md\mapper\KBBTLensSortingMapper.java |
| | | D:\workfile\JiuMuMES\JiuMuMesParent\moduleService\DeviceInteractionModule\src\main\java\com\mes\md\controller\TaskingController.java |
| | | D:\workfile\JiuMuMES\JiuMuMesParent\moduleService\DeviceInteractionModule\src\main\java\com\mes\md\service\impl\TaskLogServiceImpl.java |
| | | D:\workfile\JiuMuMES\JiuMuMesParent\moduleService\DeviceInteractionModule\src\main\java\com\mes\md\service\impl\TaskingServiceImpl.java |
| | |
| | | D:\workfile\JiuMuMES\JiuMuMesParent\moduleService\DeviceInteractionModule\src\main\java\com\mes\job\AddTask.java |
| | | D:\workfile\JiuMuMES\JiuMuMesParent\moduleService\DeviceInteractionModule\src\main\java\com\mes\job\PLCMechanicalArm.java |
| | | D:\workfile\JiuMuMES\JiuMuMesParent\moduleService\DeviceInteractionModule\src\main\java\com\mes\md\mapper\LineMapper.java |
| | | D:\workfile\JiuMuMES\JiuMuMesParent\moduleService\DeviceInteractionModule\src\main\java\com\mes\md\entity\KBBTLensSorting.java |
| | | D:\workfile\JiuMuMES\JiuMuMesParent\moduleService\DeviceInteractionModule\src\main\java\com\mes\md\entity\ProjectLog.java |
| | | D:\workfile\JiuMuMES\JiuMuMesParent\moduleService\DeviceInteractionModule\src\main\java\com\mes\md\entity\KBBTJPDrawingBP.java |
| | | D:\workfile\JiuMuMES\JiuMuMesParent\moduleService\DeviceInteractionModule\src\main\java\com\mes\md\service\PageService.java |
| | |
| | | export default { |
| | | |
| | | serverUrl: "localhost:88/api", |
| | | serverUrl2: "localhost:88" |
| | | |
| | | // serverUrl: "10.36.164.200:88/api", |
| | | // serverUrl2: "10.36.164.200:88" |
| | | // serverUrl: "10.153.19.29:88/api", |
| | | //serverUrl: "10.36.164.201:88/api", |
| | | serverUrl: "localhost:88/api", |
| | | |
| | | // serverUrl: "127.0.0.1:88/api", |
| | | // serverUrl2: "10.153.19.29:88" |
| | | //serverUrl2: "10.36.164.201:88" |
| | | serverUrl2: "localhost:88" |
| | | |
| | | // serverUrl2: "127.0.0.1:88" |
| | | |
| | | //serverUrl:"res.abeim.cn" |
| | |
| | | state: '生产状态', |
| | | glassState: '玻璃状态', |
| | | reportCount: '报工数量', |
| | | operationRecordTime:"最新时间", |
| | | sendTime: '发送时间', |
| | | sendContent: '发送内容', |
| | | warehouse:'仓库' |
| | | }, |
| | | machine: { |
| | | mechanicalArm:'自动上片机', |
| | |
| | | export const WebSocketHost = "localhost"; |
| | | //export const WebSocketHost = "10.36.164.201"; |
| | | // export const WebSocketHost = "10.36.164.200"; |
| | | // export const WebSocketHost = "10.153.19.29"; |
| | | // export const WebSocketHost = "127.0.0.1"; |
| | | export const host = "88"; |
| | |
| | | import { useI18n } from 'vue-i18n' |
| | | import { WebSocketHost, host } from '@/utils/constants' |
| | | import { initializeWebSocket, closeWebSocket } from '@/utils/WebSocketService'; |
| | | import {gridDateFormatter} from '@/stores/tool'; |
| | | let language = ref(localStorage.getItem('lang') || 'zh') |
| | | const { t } = useI18n() |
| | | const requestData = reactive({ |
| | |
| | | <el-table-column prop="width" :label="$t('glassInfo.width')" /> |
| | | <el-table-column prop="thickness" :label="$t('glassInfo.thickness')" /> |
| | | <el-table-column prop="workState" :label="$t('glassInfo.workState')" /> |
| | | <el-table-column prop="operationRecordTime" :formatter="gridDateFormatter" :label="$t('glassInfo.operationRecordTime')" width="180"/> |
| | | <el-table-column fixed="right" :label="$t('productStock.operate')" align="center" width="270"> |
| | | <template #default="scope"> |
| | | <el-button size="mini" link type="primary" plain @click="workStatus(scope.row, '重发')">{{ |
| | |
| | | import { useI18n } from 'vue-i18n' |
| | | import { WebSocketHost, host } from '@/utils/constants' |
| | | import { initializeWebSocket, closeWebSocket } from '@/utils/WebSocketService'; |
| | | |
| | | import {gridDateFormatter} from '@/stores/tool'; |
| | | |
| | | let language = ref(localStorage.getItem('lang') || 'zh') |
| | | const { t } = useI18n() |
| | | const requestData = reactive({ |
| | |
| | | <el-table-column prop="width" :label="$t('glassInfo.width')" /> |
| | | <el-table-column prop="thickness" :label="$t('glassInfo.thickness')" /> |
| | | <el-table-column prop="workState" :label="$t('glassInfo.workState')" /> |
| | | <el-table-column prop="operationRecordTime" :formatter="gridDateFormatter" :label="$t('glassInfo.operationRecordTime')" width="180"/> |
| | | <el-table-column fixed="right" :label="$t('productStock.operate')" align="center" width="270"> |
| | | <template #default="scope"> |
| | | <el-button size="mini" link type="primary" plain @click="workStatus(scope.row, '重发')">{{ |
| | |
| | | </div> |
| | | |
| | | <div id="main-body" style="width: 100%; height: 460px;min-width: 1200px;"> |
| | | <el-image style="width: 70%;min-width: 900px; height: 460px;float: left;" src="../../src/assets/翻片台.png"></el-image> |
| | | <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> --> |
| | |
| | | import { useI18n } from 'vue-i18n' |
| | | import { WebSocketHost, host } from '@/utils/constants' |
| | | import { initializeWebSocket, closeWebSocket } from '@/utils/WebSocketService'; |
| | | import {gridDateFormatter,getDataSort} from '@/stores/tool'; |
| | | let language = ref(localStorage.getItem('lang') || 'zh') |
| | | const { t } = useI18n() |
| | | const requestData = reactive({ |
| | |
| | | const blind = ref(false) |
| | | const errorInfo = ref(true) |
| | | const loadData = ref([]); |
| | | const taskinggoruby = ref([]); |
| | | const findMachine = ref([]); |
| | | const sendRecords = ref([]); |
| | | const downLineTask = ref([]); |
| | |
| | | const scanCodeOld = ref([]); |
| | | const searcheh = ref(); |
| | | |
| | | const machineId = 2;//当前页面的设备ID |
| | | const machineId = 24;//当前页面的设备ID |
| | | var errorScanId; |
| | | var errorOpen=false; |
| | | //使用WebSocket方式展示数据 |
| | | let socket = null; |
| | | let socketDownLineTask = null; |
| | |
| | | // 定义消息处理函数,更新 receivedData 变量 |
| | | const handleMessage = (data) => { |
| | | // 更新 tableData 的数据 |
| | | //taskinggoruby.value = data.taskinggoruby[0]; |
| | | //loadData.value =getDataSort(data.taskingList[0]); |
| | | loadData.value = data.taskingList[0]; |
| | | findMachine.value = data.machine[0]; |
| | | scanCode.value = data.scanCode[0]; |
| | | sendRecords.value = data.sendRecords[0].reverse(); |
| | | |
| | | if(scanCode.value.length>0&&scanCode.value[0].scanId.toString()!=errorScanId){ |
| | | if(findMachine.value.remark.toString()!=errorScanId&&findMachine.value.remark.toString()!=""&&findMachine.value.remark.toString()!=undefined){ |
| | | //有数据就弹窗 |
| | | errorScanId=scanCode.value[0].scanId.toString(); |
| | | errorInfoFuntion(scanCode.value[0]); |
| | | 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; |
| | | } |
| | | |
| | | }; |
| | |
| | | }); |
| | | //报警提示 |
| | | const errorInfoFuntion = async (info) => { |
| | | let infoScancode='扫码ID:'+info.scanId+' '+info.scanCode; |
| | | let infoScancode=info; |
| | | ElMessageBox.confirm( |
| | | infoScancode, |
| | | t('delivery.prompt'), |
| | |
| | | } |
| | | ) |
| | | .then(() => { |
| | | //重新补单 |
| | | request.post("/deviceInteraction/tasking/glassAgainTopLine", |
| | | { |
| | | "scanId": info.scanId, |
| | | }).then((res) => { // 替换为你的API端点 |
| | | if (res.code === 200) { |
| | | ElMessage.success(res.message); |
| | | } else { |
| | | ElMessage.warning(res.message) |
| | | } |
| | | }) |
| | | }) |
| | | .catch(() => { |
| | | ElMessage({ |
| | |
| | | blind.value = true; |
| | | } |
| | | const fetchData = async () => { |
| | | setTimeout(()=>{ |
| | | //扫码回车后延迟一秒 |
| | | //alert(searcheh.value); |
| | | //下线接口 |
| | | let scanId= searcheh.value; |
| | | request.post("/deviceInteraction/tasking/scanMachineAdd", |
| | | { |
| | | "machineId": machineId, |
| | | "scanId": scanId |
| | | }).then((res) => { // 替换为你的API端点 |
| | | if (res.code === 200) { |
| | | ElMessage.success(res.message); |
| | | } else { |
| | | ElMessage.warning(res.message) |
| | | } |
| | | }) |
| | | searcheh.value=""; |
| | | },1000); |
| | | |
| | | //扫码回车提交 |
| | | alert(searcheh.value); |
| | | searcheh.value=""; |
| | | //searcheh.value=""; |
| | | } |
| | | //上线 |
| | | const topLine = async (row) => { |
| | |
| | | const handleDialogClose = () => { |
| | | |
| | | } |
| | | //全部提交 |
| | | const reportForWork = async () => { |
| | | let infoReport = "是否提交 "+loadData.value.length+" 片玻璃?"; |
| | | ElMessageBox.confirm( |
| | | infoReport, |
| | | t('delivery.prompt'), |
| | | { |
| | | confirmButtonText: t('functionState.sure'), |
| | | cancelButtonText: t('functionState.cancel'), |
| | | type: 'warning', |
| | | } |
| | | ) |
| | | .then(() => { |
| | | //下线接口 |
| | | request.post("/deviceInteraction/tasking/reportForWork", |
| | | { |
| | | "id": machineId, |
| | | }).then((res) => { // 替换为你的API端点 |
| | | if (res.code === 200) { |
| | | ElMessage.success(res.message); |
| | | } else { |
| | | ElMessage.warning(res.message) |
| | | } |
| | | }) |
| | | }) |
| | | .catch(() => { |
| | | ElMessage({ |
| | | type: 'info', |
| | | message: t('functionState.cancel'), |
| | | }) |
| | | }) |
| | | } |
| | | |
| | | |
| | | </script> |
| | | <template> |
| | | <div ref="content" style="padding:0 20px;"> |
| | |
| | | <br> |
| | | <div id="search" style="height:35px;line-height: 35px;"> |
| | | <!-- 功能 --> |
| | | <el-button type="primary" id="ButtonTopLine" @click="topLineShow">{{ $t('functionState.reporting') }}</el-button> |
| | | <el-button type="primary" id="ButtonTopLine" @click="reportForWork">{{ $t('functionState.reporting') }}</el-button> |
| | | <!-- <el-button type="primary" id="ButtonTopLine" @click="topLineShow">{{ $t('functionState.reporting') }}</el-button> --> |
| | | |
| | | <el-input v-model="searcheh" type="primary" id="ReportSubmission" @keyup.enter="fetchData" |
| | | style="width:1000px;height:35px;line-height: 35px;font-size: 35px;float: right;"></el-input> |
| | |
| | | |
| | | <div id="main-body" style="min-height:240px;"> |
| | | <!-- 表格内容 --> |
| | | <el-table :data="loadData" stripe |
| | | <el-table :data="taskinggoruby" stripe |
| | | :header-cell-style="{ background: '#F2F3F5 ', color: '#1D2129', textAlign: 'center' }" |
| | | :cell-style="{ textAlign: 'center' }"> |
| | | <!-- <el-table-column type="selection" min-width="30" /> --> |
| | |
| | | <el-icon @click="fetchData"><CaretBottom /></el-icon> |
| | | <el-icon color="#409efc"><Filter /></el-icon> |
| | | </div> |
| | | |
| | | |
| | | <!-- <el-input size="small" placeholder="Type to search" /> --> |
| | | |
| | | </div> |
| | | |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="scanId" :label="$t('glassInfo.scanId')" /> |
| | | <el-table-column prop="taskQuantity" :label="$t('glassInfo.taskQuantity')" /> |
| | | <el-table-column prop="reportCount" :label="$t('glassInfo.reportCount')" /> |
| | | |
| | | <el-table-column fixed="right" :label="$t('productStock.operate')" align="center" width="270"> |
| | | <template #default="scope"> |
| | | <el-button size="mini" link type="primary" plain @click="workStatus(scope.row, '完工')">{{ |
| | | $t('functionState.finish') }}</el-button> |
| | | <el-button size="mini" link type="primary" plain @click="damagedTask(scope.row)">{{ $t('functionState.lose') |
| | | }}</el-button> |
| | | </template> |
| | |
| | | <el-table-column type="index" :label="$t('glassInfo.number')" min-width="30" /> |
| | | <el-table-column prop="batchNumber" :label="$t('glassInfo.batchNumber')" /> |
| | | <el-table-column prop="taskType" :label="$t('glassInfo.taskType')" /> |
| | | <el-table-column prop="glassId" :label="$t('glassInfo.glassId')" /> |
| | | <el-table-column prop="scanId" :label="$t('glassInfo.scanId')" /> |
| | | <el-table-column prop="length" :label="$t('glassInfo.length')" /> |
| | | <el-table-column prop="width" :label="$t('glassInfo.width')" /> |
| | | <el-table-column prop="thickness" :label="$t('glassInfo.thickness')" /> |
| | | <el-table-column prop="workState" :label="$t('glassInfo.workState')" /> |
| | | <el-table-column prop="operationRecordTime" :formatter="gridDateFormatter" :label="$t('glassInfo.operationRecordTime')" width="180"/> |
| | | <el-table-column prop="warehouse" :label="$t('glassInfo.warehouse')" /> |
| | | <el-table-column fixed="right" :label="$t('productStock.operate')" align="center" width="270"> |
| | | <template #default="scope"> |
| | | <el-button size="mini" link type="primary" plain @click="workStatus(scope.row, '完工')">{{ |
| | | $t('functionState.finish') }}</el-button> |
| | | <el-button size="mini" link type="primary" plain @click="damagedTask(scope.row)">{{ $t('functionState.lose') |
| | | }}</el-button> |
| | | </template> |
| | |
| | | import { useI18n } from 'vue-i18n' |
| | | import { WebSocketHost ,host} from '@/utils/constants' |
| | | import { initializeWebSocket, closeWebSocket } from '@/utils/WebSocketService'; |
| | | import {gridDateFormatter} from '@/stores/tool'; |
| | | |
| | | let language = ref(localStorage.getItem('lang') || 'zh') |
| | | const { t } = useI18n() |
| | |
| | | <el-table-column prop="width" :label="$t('glassInfo.width')"/> |
| | | <el-table-column prop="thickness" :label="$t('glassInfo.thickness')"/> |
| | | <el-table-column prop="workState" :label="$t('glassInfo.workState')"/> |
| | | <el-table-column prop="operationRecordTime" :formatter="gridDateFormatter" :label="$t('glassInfo.operationRecordTime')" width="180"/> |
| | | <el-table-column fixed="right" :label="$t('productStock.operate')" align="center" width="270"> |
| | | <template #default="scope"> |
| | | <el-button size="mini" link type="primary" plain @click="workStatus(scope.row, '重发')" >{{$t('functionState.anew')}}</el-button> |
| | |
| | | </div> |
| | | |
| | | <div id="main-body" style="width: 100%; height: 460px;min-width: 1200px;"> |
| | | <el-image style="width: 70%;min-width: 900px; height: 460px;float: left;" src="../../src/assets/自动打标机.png"></el-image> |
| | | <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> --> |
| | |
| | | <script setup> |
| | | import request from "@/utils/request"; |
| | | import { ElMessage, ElMessageBox } from "element-plus"; |
| | | import { computed,reactive, ref, onMounted, onBeforeUnmount, onUnmounted } from 'vue' |
| | | import { computed, reactive, ref, onMounted, onBeforeUnmount, onUnmounted } from 'vue' |
| | | import { useI18n } from 'vue-i18n' |
| | | import { WebSocketHost, host } from '@/utils/constants' |
| | | import { initializeWebSocket, closeWebSocket } from '@/utils/WebSocketService'; |
| | |
| | | }); |
| | | //报警提示 |
| | | const errorInfoFuntion = async (info) => { |
| | | let infoScancode='扫码ID:'+info.scanId+' '+info.scanCode; |
| | | let infoScancode = '扫码ID:' + info.scanId + ' ' + info.scanCode; |
| | | ElMessageBox.confirm( |
| | | infoScancode, |
| | | t('delivery.prompt'), |
| | |
| | | }) |
| | | } |
| | | const topLineShow = async () => { |
| | | blind.value = true; |
| | | blind.value = true; |
| | | } |
| | | //领取任务/结束任务 |
| | | const startOrStopTask = async (row,line,isWorking) => { |
| | | const startOrStopTask = async (row, line, isWorking) => { |
| | | ElMessageBox.confirm( |
| | | t('functionState.tips'), |
| | | t('delivery.prompt'), |
| | |
| | | }).then((res) => { // 替换为你的API端点 |
| | | if (res.code === 200) { |
| | | ElMessage.success(res.message); |
| | | } else {n |
| | | } else { |
| | | n |
| | | ElMessage.warning(res.message) |
| | | } |
| | | }) |
| | |
| | | }) |
| | | }) |
| | | } |
| | | const handleDialogClose = () => { |
| | | |
| | | const handleDialogClose = () => { |
| | | |
| | | } |
| | | |
| | | |
| | | const fetchData = async () => { |
| | | //扫码回车提交 |
| | | alert(searchs.value); |
| | | searchs.value=""; |
| | | //alert(searchs.value); |
| | | searchs.value = ""; |
| | | } |
| | | const filterTableData = computed(() => |
| | | loadData.value.filter( |
| | | (data) => |
| | | !searchs.value ||data.scanId.toLowerCase().includes(searchs.value.toLowerCase()) |
| | | !searchs.value || data.scanId.toLowerCase().includes(searchs.value.toLowerCase()) |
| | | ) |
| | | ) |
| | | </script> |
| | |
| | | {{ $t('machine.mechanicalArm') }} |
| | | </div> |
| | | <el-dialog v-model="blind" top="30vh" style="text-align: center;" @close="handleDialogClose"> |
| | | <!-- 未领取的标准任务 --> |
| | | |
| | | <el-table :data="findPrimitiveTask" stripe style="height:260px" :header-cell-style="{ background: '#F2F3F5 ', color: '#1D2129', textAlign: 'center' }" :cell-style="{ textAlign: 'center' }"> |
| | | <!-- 未领取的标准任务 --> |
| | | |
| | | <el-table :data="findPrimitiveTask" stripe style="height:260px" |
| | | :header-cell-style="{ background: '#F2F3F5 ', color: '#1D2129', textAlign: 'center' }" |
| | | :cell-style="{ textAlign: 'center' }"> |
| | | <!-- <el-table-column type="selection" min-width="30" /> --> |
| | | |
| | | |
| | | <el-table-column type="index" :label="$t('glassInfo.number')" min-width="30" /> |
| | | <el-table-column prop="batchNumber" :label="$t('glassInfo.batchNumber')" /> |
| | | <el-table-column prop="taskType" :label="$t('glassInfo.taskType')" /> |
| | |
| | | <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,2,1)">{{ |
| | | <el-button size="mini" link type="primary" plain @click="startOrStopTask(scope.row, 2, 1)">{{ |
| | | $t('functionState.getTask') }}</el-button> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | <br> |
| | | <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> |
| | | $t('functionState.start') : $t('functionState.stop') }}</el-button> |
| | | <el-button type="primary" id="ButtonTopLine" @click="topLineShow">{{ $t('functionState.getTask') }}</el-button> |
| | | |
| | | <el-button :type="(findMachine['mode'] == '定制' ? 'danger' : 'success')" id="ButtonMachineMode" |
| | | @click="machineMode((findMachine['mode'] == 0 ? 1 : 0))">{{ findMachine['mode'] == 0 ? |
| | | $t('functionState.modeD') : $t('functionState.modeB') }}</el-button> |
| | | $t('functionState.modeD') : $t('functionState.modeB') }}</el-button> |
| | | </div> |
| | | |
| | | |
| | | <div id="main-body" style="min-height:240px;"> |
| | | <!-- 表格内容 --> |
| | | <el-table :data="filterTableData" stripe style="height:260px" |
| | |
| | | <el-table-column type="index" :label="$t('glassInfo.number')" min-width="30" /> |
| | | <el-table-column prop="batchNumber" sortable :label="$t('glassInfo.batchNumber')" /> |
| | | <el-table-column prop="taskType" sortable :label="$t('glassInfo.taskType')" /> |
| | | <el-table-column prop="scanId" sortable :label="$t('glassInfo.scanId')" > |
| | | <template #header> |
| | | <el-table-column prop="scanId" :label="$t('glassInfo.scanId')"> |
| | | <template #header> |
| | | <div> |
| | | <div>{{ $t('glassInfo.taskType') }} |
| | | <el-icon @click="fetchData"><CaretTop /></el-icon> |
| | | <el-icon @click="fetchData"><CaretBottom /></el-icon> |
| | | <el-icon color="#409efc"><Filter /></el-icon> |
| | | </div> |
| | | <el-input v-model="searchs" type="primary" id="ReportSubmission" @keyup.enter="fetchData"></el-input> |
| | | <span>{{ $t('glassInfo.scanId') }}</span> |
| | | <span style="margin-left:10px ;"></span> |
| | | <el-popover placement="bottom" title="筛选" :width="200" trigger="click"> |
| | | <el-input v-model="searchs" type="primary" id="ReportSubmission" @keyup.enter="fetchData"></el-input> |
| | | <template #reference> |
| | | <el-icon><Filter /></el-icon> |
| | | </template> |
| | | </el-popover> |
| | | <el-icon><CaretTop /></el-icon> |
| | | <el-icon><CaretBottom /></el-icon> |
| | | <!-- <el-input v-model="searchs" type="primary" id="ReportSubmission" @keyup.enter="fetchData"></el-input> --> |
| | | <!-- <el-input size="small" placeholder="Type to search" /> --> |
| | | </div> |
| | | </template> |
| | |
| | | <el-table-column prop="isWorking" sortable :label="$t('glassInfo.isWorking')" /> |
| | | <el-table-column fixed="right" :label="$t('productStock.operate')" align="center" width="270"> |
| | | <template #default="scope"> |
| | | <el-button size="mini" link type="primary" plain @click="startOrStopTask(scope.row,2,2)">{{ |
| | | <el-button size="mini" link type="primary" plain @click="startOrStopTask(scope.row, 2, 2)">{{ |
| | | $t('functionState.stopTask') }}</el-button> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | </div> |
| | | |
| | | <div id="main-body" style="width: 100%; height: 460px;min-width: 1200px;"> |
| | | <el-image style="width: 70%;min-width: 900px; height: 460px;float: left;" src="../../src/assets/扫码识别.png"></el-image> |
| | | <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> --> |
| | |
| | | border: none; |
| | | cursor: pointer; |
| | | } |
| | | |
| | | .dotClass { |
| | | width:10px; |
| | | height:10px; |
| | | width: 10px; |
| | | height: 10px; |
| | | border-radius: 50%; |
| | | display: block; |
| | | margin-left: 10px; |
| | | margin-left: 10px; |
| | | } |
| | | </style> |
| | |
| | | <script setup> |
| | | import request from "@/utils/request"; |
| | | import { ElMessage, ElMessageBox } from "element-plus"; |
| | | import { reactive, ref, onMounted, onBeforeUnmount, onUnmounted } from 'vue' |
| | | import { computed,reactive, ref, onMounted, onBeforeUnmount, onUnmounted } from 'vue' |
| | | import { useI18n } from 'vue-i18n' |
| | | import { WebSocketHost, host } from '@/utils/constants' |
| | | import { initializeWebSocket, closeWebSocket } from '@/utils/WebSocketService'; |
| | | import {gridDateFormatter} from '@/stores/tool'; |
| | | |
| | | let language = ref(localStorage.getItem('lang') || 'zh') |
| | | const { t } = useI18n() |
| | | const requestData = reactive({ |
| | |
| | | const findMachine = ref([]); |
| | | const sendRecords = ref([]); |
| | | const downLineTask = ref([]); |
| | | const searchs = ref(); |
| | | |
| | | const machineId = 20;//当前页面的设备ID |
| | | var errorScanId; |
| | |
| | | const handleDialogClose = () => { |
| | | |
| | | } |
| | | const fetchData = async () => { |
| | | //扫码回车提交 |
| | | //alert(searchs.value); |
| | | searchs.value=""; |
| | | } |
| | | const filterTableData = computed(() => |
| | | loadData.value.filter( |
| | | (data) => |
| | | !searchs.value ||data.scanId.toLowerCase().includes(searchs.value.toLowerCase()) |
| | | ) |
| | | ) |
| | | </script> |
| | | <template> |
| | | <div ref="content" style="padding:0 20px;"> |
| | |
| | | </div> |
| | | <div id="main-body" style="min-height:240px;"> |
| | | <!-- 表格内容 --> |
| | | <el-table :data="loadData" stripe style="height:680px" |
| | | <el-table :data="filterTableData" stripe style="height:680px" |
| | | :header-cell-style="{ background: '#F2F3F5 ', color: '#1D2129', textAlign: 'center' }" |
| | | :cell-style="{ textAlign: 'center' }"> |
| | | <!-- <el-table-column type="selection" min-width="30" /> --> |
| | |
| | | <el-table-column prop="batchNumber" :label="$t('glassInfo.batchNumber')" /> |
| | | <el-table-column prop="taskType" :label="$t('glassInfo.taskType')" /> |
| | | <el-table-column prop="glassId" :label="$t('glassInfo.glassId')" /> |
| | | <el-table-column prop="scanId" :label="$t('glassInfo.scanId')" /> |
| | | <el-table-column prop="scanId" :label="$t('glassInfo.scanId')" > |
| | | <template #header> |
| | | <div> |
| | | <div>{{ $t('glassInfo.scanId') }} |
| | | </div> |
| | | <el-input v-model="searchs" type="primary" id="ReportSubmission" @keyup.enter="fetchData"></el-input> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="length" :label="$t('glassInfo.length')" /> |
| | | <el-table-column prop="width" :label="$t('glassInfo.width')" /> |
| | | <el-table-column prop="thickness" :label="$t('glassInfo.thickness')" /> |
| | | <el-table-column prop="workState" :label="$t('glassInfo.workState')" /> |
| | | <el-table-column prop="operationRecordTime" :formatter="gridDateFormatter" :label="$t('glassInfo.operationRecordTime')" width="180"/> |
| | | <el-table-column fixed="right" :label="$t('productStock.operate')" align="center" width="270"> |
| | | <template #default="scope"> |
| | | <el-button size="mini" link type="primary" plain @click="workStatus(scope.row, '重发')">{{ |
| | |
| | | import { useI18n } from 'vue-i18n' |
| | | import { WebSocketHost ,host} from '@/utils/constants' |
| | | import { initializeWebSocket, closeWebSocket } from '@/utils/WebSocketService'; |
| | | import {gridDateFormatter} from '@/stores/tool'; |
| | | |
| | | let language = ref(localStorage.getItem('lang') || 'zh') |
| | | const { t } = useI18n() |
| | |
| | | {{findMachine['state']=='开工'?$t('functionState.start'):$t('functionState.stop')}}</el-button> |
| | | <el-button type="primary" id="ButtonTopLine" @click="topLine">{{$t('functionState.topLine')}}</el-button> |
| | | </div> |
| | | <div id="main-body" style="height:240px; min-height:240px;"> |
| | | <div id="main-body" style=" min-height:240px;"> |
| | | <!-- 表格内容 --> |
| | | <el-table :data="loadData" stripe style="height:680px" |
| | | :header-cell-style="{ background: '#F2F3F5 ', color: '#1D2129', textAlign: 'center' }" |
| | |
| | | <el-table-column prop="silkScreenX" :label="$t('glassInfo.silkScreenX')"/> |
| | | <el-table-column prop="silkScreenY" :label="$t('glassInfo.silkScreenY')"/> |
| | | <el-table-column prop="workState" :label="$t('glassInfo.workState')"/> |
| | | <el-table-column prop="operationRecordTime" :formatter="gridDateFormatter" :label="$t('glassInfo.operationRecordTime')" width="180"/> |
| | | <el-table-column fixed="right" :label="$t('productStock.operate')" align="center" width="270"> |
| | | <template #default="scope"> |
| | | <el-button size="mini" link type="primary" plain @click="workStatus(scope.row, '重发')" >{{$t('functionState.anew')}}</el-button> |