Merge branch 'master' of http://10.153.19.25:10101/r/HangZhouMes
# Conflicts:
# UI-Project/src/views/UnLoadGlass/Landingindicationtwo.vue
# UI-Project/src/views/mm/identify/identify.vue
13个文件已修改
14 文件已重命名
15个文件已添加
116个文件已删除
| | |
| | | package com.mes.common.PlcTools; |
| | | |
| | | |
| | | import java.nio.ByteBuffer; |
| | | import java.nio.ByteOrder; |
| | | import java.nio.charset.StandardCharsets; |
| | | import java.sql.Time; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | |
| | | import com.github.xingshuangs.iot.protocol.s7.service.MultiAddressWrite; |
| | | import com.github.xingshuangs.iot.protocol.s7.service.S7PLC; |
| | | import com.google.common.primitives.Bytes; |
| | | import org.apache.ibatis.jdbc.Null; |
| | | |
| | | public class S7control { |
| | | |
| | | S7PLC s7PLC; // PLC通讯类实例 |
| | | |
| | | public S7control(EPlcType plcType, String ip, int port, int rack, int slot) { |
| | | private EPlcType plcType = EPlcType.S1500; // 西门子PLC类型 |
| | | private String ip = "192.168.10.1"; // plc ip地址 |
| | | private int port = 102; // plc 端口号 |
| | | |
| | | private static volatile S7control instance = null; |
| | | |
| | | private S7control() { |
| | | if (s7PLC == null) |
| | | s7PLC = new S7PLC(plcType, ip, port,0,0); |
| | | } |
| | | } |
| | | public S7control(EPlcType plcType,String ip,int port,int a,int b) { |
| | | if (s7PLC == null) |
| | | s7PLC = new S7PLC(plcType, ip, port,a,b); |
| | | } |
| | | |
| | | // 单例模式 获取类的唯一实例 |
| | | public static S7control getinstance() { |
| | | if (instance == null) { |
| | | synchronized (S7control.class) { |
| | | if (instance == null) |
| | | instance = new S7control(); |
| | | } |
| | | } |
| | | return instance; |
| | | } |
| | | |
| | | /** |
| | | * 关闭西门子s7通讯连接 |
| | | */ |
| | |
| | | public boolean CheckConnected() { |
| | | return s7PLC.checkConnected(); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 按指定的地址 写入一个word |
| | | * |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | private int getIndexFromAddress(String address) { |
| | |
| | | public List<Short> ReadWord(String address, int count) { |
| | | if (s7PLC == null) |
| | | return null; |
| | | |
| | | List<String> addresslist = GetAddressList(address, count, 16); |
| | | try { |
| | | return s7PLC.readInt16(addresslist); |
| | |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | public byte[] Readbyte(String address, int count) { |
| | | byte[] byt=new byte[count]; |
| | | int wordcount=((count%2==0)?count/2:count+1); |
| | | List<Short> word=ReadWord(address,wordcount); |
| | | |
| | | return byt; |
| | | } |
| | | /** |
| | | * 按指定的地址 读取byte结果集 |
| | | * |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | public List<String> readStringsandword(List<String> addressList) { |
| | | if (s7PLC == null) { |
| | | return null; |
| | | } |
| | | List<String> result = new ArrayList<>(); |
| | | for (String address : addressList) { |
| | | try { |
| | | if (address.contains("-")) { |
| | | address = address.substring(0, address.indexOf("-")); |
| | | |
| | | byte[] bytes = s7PLC.readByte(address, 14); |
| | | if (bytes != null) { |
| | | String str = new String(bytes, StandardCharsets.UTF_8); |
| | | result.add(str); |
| | | } |
| | | |
| | | } else { |
| | | Short value = s7PLC.readInt16(address); |
| | | result.add(value.toString()); |
| | | |
| | | } |
| | | } catch (Exception e) { |
| | | System.out.println("读取 " + address + " 失败:" + e.getMessage()); |
| | | result.add(null); |
| | | } |
| | | } |
| | | |
| | | return result; |
| | | } |
| | | |
| | | |
| | | |
| | | //不连续地址写入Word |
| | | public void WriteWord(List<String> address, List<Short> datas) { |
| | | if (s7PLC == null) |
| | |
| | | glassidlist.add(Byte.valueOf(String.valueOf(iditem))); |
| | | } |
| | | byte[] bytes = Bytes.toArray(glassidlist); |
| | | WriteByte(addr, bytes); |
| | | S7control.getinstance().WriteByte(addr, bytes); |
| | | } |
| | | |
| | | //读取不连续word |
| | |
| | | } |
| | | return addresslist; |
| | | } |
| | | public void writeString(String addr,String data) { |
| | | s7PLC.writeString(addr,data); |
| | | } |
| | | |
| | | public String readStrings(String addr) { |
| | | return s7PLC.readString(addr); |
| | | } |
| | | } |
New file |
| | |
| | | package com.mes.controller; |
| | | |
| | | import com.mes.mapper.SelectInfo; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import com.mes.common.Result; |
| | | import com.mes.entity.Tempered; |
| | | import com.mes.service.pp.SelectdppService; |
| | | import com.mes.service.hangzhoumes.*; |
| | | |
| | | @RestController |
| | | @RequestMapping("/TidyUpGlassModule") |
| | | |
| | | // TidyUpGlassModule 理片模块 |
| | | public class TidyUpGlassModuleController { |
| | | @Autowired |
| | | private SelectInfo SelectInfo; |
| | | |
| | | @Autowired |
| | | private SelectdppService SelectppService; |
| | | |
| | | @Autowired |
| | | private hangzhoumesService hangzhoumesService; |
| | | |
| | | @GetMapping("/SelectTerritoryInfo") // 查询钢化版图信息-根据 工程号 |
| | | @ResponseBody |
| | | public Result SelectTerritoryInfo(@RequestParam(name = "ProcessId", required = false) String ProcessId) { |
| | | List<Tempered> h = SelectppService.SelectTemperedTerritory(ProcessId); |
| | | System.out.println(h.size()+":"+ProcessId); |
| | | return Result.seccess(h); |
| | | } |
| | | |
| | | @GetMapping("/CutTerritory") // 查询切割版图信息-根据 工程号 |
| | | @ResponseBody |
| | | public Result CutTerritory(String ProcessId) { |
| | | List<Map> h = SelectppService.SelectCutTerritory(ProcessId); |
| | | System.out.println(h.size()); |
| | | return Result.seccess(h); |
| | | } |
| | | |
| | | @GetMapping("/SelectCutTerritory") // 识别显示 当前版图 |
| | | @ResponseBody |
| | | public Result SelectCutTerritory(String ProcessId) { |
| | | List<Map> h = SelectppService.SelectCutTerritory("P24032508"); |
| | | System.out.println(h.size()); |
| | | return Result.seccess(h); |
| | | } |
| | | |
| | | |
| | | @GetMapping("/SelectCageInfo") // 查询笼内信息 |
| | | @ResponseBody |
| | | public Result SelectCageInfo(String ProcessId) { |
| | | List<Map> h = SelectppService.SelectCutTerritory("P24032508"); |
| | | System.out.println(h.size()); |
| | | return Result.seccess(h); |
| | | } |
| | | |
| | | |
| | | @GetMapping("/SelectEdgTask") //磨边任务 |
| | | @ResponseBody |
| | | public Result SelectEdgTask(String ProcessId) { |
| | | List<Map> EdgTasks = hangzhoumesService.SelectEdgInfo("1"); |
| | | System.out.println(EdgTasks.size()); |
| | | return Result.seccess(EdgTasks); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | @Data //lombok 简写java代码 实体类的get与set |
| | | @TableName("task_cache") |
| | | public class TaskCache { |
| | | private String ID;//任务编号 |
| | | private String startcell;//起始 |
| | | private String endcell;//结束 |
| | | private String tasktype;//任务类型 |
| | | private String taskstauts;//任务状态 |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.entity.device; |
| | | import cn.hutool.json.JSONArray; |
| | | import cn.hutool.json.JSONObject; |
| | | import java.io.BufferedReader; |
| | | import java.io.FileReader; |
| | | import java.io.IOException; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | |
| | | import com.mes.common.PlcTools.S7control; |
| | | |
| | | public class InitUtil { |
| | | //初始化word |
| | | public static PlcParameterObject initword(String jsonFilePath) { |
| | | try { |
| | | FileReader fileReader = new FileReader(jsonFilePath); |
| | | BufferedReader bufferedReader = new BufferedReader(fileReader); |
| | | |
| | | StringBuilder content = new StringBuilder(); |
| | | String line; |
| | | |
| | | while ((line = bufferedReader.readLine()) != null) { |
| | | content.append(line); |
| | | } |
| | | |
| | | bufferedReader.close(); |
| | | fileReader.close(); |
| | | |
| | | JSONObject jsonfileobj = new JSONObject(content.toString()); |
| | | JSONArray jsonArray = jsonfileobj.getJSONArray("parameteInfor"); |
| | | PlcParameterObject plcParameterObject = new PlcParameterObject(); |
| | | plcParameterObject.setPlcAddressBegin(jsonfileobj.getStr("plcAddressBegin"));//设置起始位地址 |
| | | plcParameterObject.setPlcAddressLength(Integer.valueOf(jsonfileobj.getStr("plcAddressLenght")));//设置地址长度 |
| | | |
| | | for (int i = 0; i < jsonArray.size(); i++) { |
| | | JSONObject parameterObj = jsonArray.getJSONObject(i); |
| | | PlcParameterInfo plcParameterInfo = new PlcParameterInfo(jsonfileobj.getStr("plcAddressBegin")); //参数实例 |
| | | String codeid = parameterObj.getStr("codeId"); |
| | | plcParameterInfo.setCodeId(codeid); |
| | | plcParameterInfo.setAddressIndex(Integer.valueOf(parameterObj.getStr("addressIndex"))); |
| | | //plcParameterInfo.setRatio(Integer.valueOf(parameterObj.getStr("ratio"))); |
| | | plcParameterInfo.setAddressLength(Integer.valueOf(parameterObj.getStr("addressLenght"))); |
| | | plcParameterInfo.setUnit(parameterObj.getStr("unit")); |
| | | plcParameterObject.addPlcParameter(plcParameterInfo); |
| | | } |
| | | // byte[] getplcvlues = {0x01, 0x02, 0x03, 0x04,0x01, 0x02, 0x03, 0x04,0x01, 0x02, 0x03, 0x04,0x01, 0x02,0x01, 0x02, 0x03, 0x04,0x01, 0x02, 0x03, 0x04,0x01, 0x02, 0x03, 0x04,0x01, 0x02,0x01, 0x02, 0x03, 0x04,0x01, 0x02, 0x03, 0x04,0x01, 0x02, 0x03, 0x04,0x01, 0x02}; |
| | | // byte[] getplcvlues = S7control.getinstance().ReadByte(plcParameterObject.getPlcAddressBegin(), plcParameterObject.getPlcAddressLength()); |
| | | // plcParameterObject.setPlcParameterList(getplcvlues); |
| | | |
| | | return plcParameterObject; |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | //初始化bit |
| | | public static PlcBitObject initbit(String jsonFilePath) { |
| | | PlcBitObject plcBitObject = new PlcBitObject(); |
| | | |
| | | try { |
| | | FileReader fileReader = new FileReader(jsonFilePath); |
| | | BufferedReader bufferedReader = new BufferedReader(fileReader); |
| | | |
| | | StringBuilder content = new StringBuilder(); |
| | | String line; |
| | | |
| | | while ((line = bufferedReader.readLine()) != null) { |
| | | content.append(line); |
| | | } |
| | | |
| | | bufferedReader.close(); |
| | | fileReader.close(); |
| | | |
| | | JSONObject jsonfileobj = new JSONObject(content.toString()); |
| | | JSONArray jsonArray = jsonfileobj.getJSONArray("parameteInfor"); |
| | | plcBitObject.setPlcAddressBegin(jsonfileobj.getStr("plcAddressBegin"));//设置起始位地址 |
| | | plcBitObject.setPlcAddressLength(Integer.valueOf(jsonfileobj.getStr("plcAddressLenght")));//设置地址长度 |
| | | |
| | | for (int i = 0; i < jsonArray.size(); i++) { |
| | | JSONObject parameterObj = jsonArray.getJSONObject(i); |
| | | |
| | | PlcBitInfo plcBitInfo = new PlcBitInfo(jsonfileobj.getStr("plcAddressBegin")); //参数实例 |
| | | String codeid = parameterObj.getStr("codeId"); |
| | | plcBitInfo.setCodeId(codeid); |
| | | plcBitInfo.setAddressIndex(Integer.valueOf(parameterObj.getStr("addressIndex"))); |
| | | |
| | | plcBitObject.addPlcBit(plcBitInfo); |
| | | } |
| | | System.out.println(""); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | //Boolean[] values1 = { false, true, true, true, false, false, true, false, |
| | | // false, true ,true }; |
| | | // List<Boolean> getplcvlues = new ArrayList<>(Arrays.asList(values1)); |
| | | |
| | | // List<Boolean> getplcvlues = S7control.getinstance().ReadBits(plcBitObject.getPlcAddressBegin(), plcBitObject.getPlcAddressLength()); |
| | | // plcBitObject.setPlcBitList(getplcvlues); |
| | | return plcBitObject; |
| | | } |
| | | |
| | | // |
| | | public static void readAndUpdateBitValues(PlcBitObject plcBitObject) { |
| | | |
| | | // Boolean[] values1 = { false, true, true, true, false, false, true, false, |
| | | // false, true ,true }; |
| | | // List<Boolean> getplcvlues = new ArrayList<>(Arrays.asList(values1)); |
| | | List<Boolean> getplcvlues = S7control.getinstance().ReadBits(plcBitObject.getPlcAddressBegin(), plcBitObject.getPlcAddressLength()); |
| | | plcBitObject.setPlcBitList(getplcvlues); |
| | | } |
| | | |
| | | |
| | | public static void readAndUpdateWordValues(PlcParameterObject plcParameterObject) { |
| | | |
| | | // byte[] getplcvlues = {0x01, 0x02, 0x03, 0x04,0x01, 0x02, 0x03, 0x04,0x01, 0x02, 0x03, 0x04,0x01, 0x02,0x01, 0x02, 0x03, 0x04,0x01, 0x02, 0x03, 0x04,0x01, 0x02, 0x03, 0x04,0x01, 0x02,0x01, 0x02, 0x03, 0x04,0x01, 0x02, 0x03, 0x04,0x01, 0x02, 0x03, 0x04,0x01, 0x02}; |
| | | byte[] getplcvlues = S7control.getinstance().ReadByte(plcParameterObject.getPlcAddressBegin(), plcParameterObject.getPlcAddressLength()); |
| | | plcParameterObject.setPlcParameterList(getplcvlues); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.entity.device; |
| | | |
| | | |
| | | import java.io.IOException; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import static com.mes.entity.device.InitUtil.readAndUpdateWordValues; |
| | | public class PLCAutoMes extends Thread { |
| | | |
| | | // // 用于存储应用程序的配置信息 |
| | | // private Configuration config; |
| | | private static InitUtil initUtil; |
| | | // public static PlcParameterObject PlcMesObject; |
| | | // public static PlcParameterObject PlcReadObject; |
| | | // public static PlcParameterObject PlcframeObject; |
| | | |
| | | // // 创建一个自定义的 S7 控制器消息处理器对象 |
| | | // MessageHandler customS7Control = new MessageHandler(); |
| | | |
| | | // 单例实例 |
| | | private static PLCAutoMes instance; |
| | | // private static String PlcMes = PLCAutoMes.class.getResource("/JsonFile/PlcMes.json").getPath(); |
| | | private static String PlcAlbania = PLCAutoMes.class.getResource("/JsonFile/PlcAlbania.json").getPath(); |
| | | // private static String PlcRead = PLCAutoMes.class.getResource("/JsonFile/PlcRead.json").getPath(); |
| | | // private static String Plcframe = PLCAutoMes.class.getResource("/JsonFile/Plcframe.json").getPath(); |
| | | // private static String PlcParameter = PLCAutomaticParameterSettingReview2.class.getResource("/JsonFile/PlcParameter.json").getPath(); |
| | | |
| | | // private static String PlcSign = PLCAutomaticParameterSettingReview2.class.getResource("/JsonFile/PlcSign.json").getPath(); |
| | | |
| | | // private static String PlcState = PLCAutomaticParameterSettingReview2.class.getResource("/JsonFile/PlcState.json").getPath(); |
| | | |
| | | // private static String PlcAlarm = PLCAutoMes.class.getResource("/JsonFile/PlcAlarm.json").getPath(); |
| | | // private static String PlcTest = PLCAutoMes.class.getResource("/JsonFile/PlcTest.json").getPath(); |
| | | |
| | | // 调用initword方法 |
| | | |
| | | // public static PlcParameterObject plcParameterObject = initUtil.initword(PlcParameter); |
| | | // public static PlcBitObject plcPlcTest = initUtil.initbit(PlcTest); |
| | | // public static PlcBitObject plcBitObject = initUtil.initbit(PlcSign); |
| | | // public static PlcParameterObject plcStateObject= initUtil.initword(PlcState); |
| | | // public static PlcBitObject plcPlcAlarm = initUtil.initbit(PlcAlarm); |
| | | public static PlcParameterObject PlcMesObject = InitUtil.initword(PlcAlbania); |
| | | // public static PlcParameterObject PlcReadObject = initUtil.initword(PlcRead); |
| | | // public static PlcParameterObject PlcframeObject = initUtil.initword(Plcframe); |
| | | |
| | | // 私有构造函数 |
| | | public PLCAutoMes() throws IOException { |
| | | //config = new Configuration("config.properties"); |
| | | initUtil = new InitUtil(); |
| | | } |
| | | |
| | | // 获取单例实例 |
| | | public static synchronized PLCAutoMes getInstance() throws IOException { |
| | | if (instance == null) { |
| | | instance = new PLCAutoMes(); |
| | | } |
| | | return instance; |
| | | } |
| | | |
| | | @Override |
| | | public void run() { |
| | | while (this != null) { |
| | | try { |
| | | Thread.sleep(100); |
| | | |
| | | } catch (InterruptedException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | // System.out.println(jsonFilePath); |
| | | |
| | | //readAndUpdateWordValues(PlcReadObject); |
| | | readAndUpdateWordValues(PlcMesObject); |
| | | //readAndUpdateWordValues(PlcframeObject); |
| | | // readAndUpdateWordValues(PlcframeObject); |
| | | |
| | | // readAndUpdateWordValues(plcStateObject); |
| | | // int index = PlcMesObject.getPlcParameter("AddStart").getAddressIndex(); |
| | | // // System.out.println(index); |
| | | // PlcMesObject.getPlcParameter("AddStart").getAddress(index); |
| | | // // System.out.println(PlcMesObject.getPlcParameter("AddStart").getAddress(index)); |
| | | // List<String> addresses = new ArrayList<>(); |
| | | // addresses.add("FeedID"); |
| | | // addresses.add("AddStart"); |
| | | // // System.out.println(addresses); |
| | | // // System.out.println(PlcMesObject.getPlcParameterValues(addresses)); |
| | | // List<String> addresses2 = new ArrayList<>(); |
| | | // addresses2.add("FeedID"); |
| | | // addresses2.add("FeedCarStatus"); |
| | | |
| | | //System.out.println(PlcReadObject.getPlcParameterValues(addresses2)); |
| | | |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | package com.mes.entity.device; |
| | | |
| | | |
| | | |
| | | public class PlcBitInfo { |
| | | |
| | | public PlcBitInfo(String startAddress) { |
| | | this.startAddress = startAddress; |
| | | } |
| | | private String startAddress; |
| | | // 参数标识 |
| | | private String codeId; |
| | | |
| | | // 参数名称 |
| | | private String name; |
| | | |
| | | // 读取 参数值 |
| | | private Boolean value; |
| | | // 参数地址 |
| | | private int addressIndex; |
| | | |
| | | public String getCodeId() { |
| | | return this.codeId; |
| | | } |
| | | |
| | | public void setCodeId(String codeId) { |
| | | this.codeId = codeId; |
| | | } |
| | | |
| | | public String getName() { |
| | | return this.name; |
| | | } |
| | | |
| | | public void setName(String name) { |
| | | this.name = name; |
| | | } |
| | | |
| | | public Boolean getValue() { |
| | | return this.value; |
| | | } |
| | | |
| | | public void setValue(Boolean value) { |
| | | this.value = value; |
| | | } |
| | | |
| | | |
| | | public int getAddressIndex() { |
| | | return this.addressIndex; |
| | | } |
| | | /** |
| | | * 获取地址 |
| | | * |
| | | * @param index 索引地址 |
| | | */ |
| | | public String getAddress(int index) { |
| | | String[] stringdatas = this.startAddress.trim().split("\\."); |
| | | if (stringdatas.length < 2 ) |
| | | return null; |
| | | int dbwindex = 0; |
| | | int bitindex = 0; |
| | | if (stringdatas.length == 3) { |
| | | dbwindex = Integer.parseInt(stringdatas[1]); |
| | | bitindex = Integer.parseInt(stringdatas[2]); |
| | | } else |
| | | return null; |
| | | dbwindex+=index/8; |
| | | bitindex+=index%8; |
| | | return stringdatas[0]+"."+dbwindex+"."+bitindex; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | public void setAddressIndex(int addressindex) { |
| | | this.addressIndex = addressindex; |
| | | } |
| | | } |
New file |
| | |
| | | package com.mes.entity.device; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.LinkedHashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | public class PlcBitObject { |
| | | |
| | | // 该模块数据类型,数据起始位置 |
| | | private String plcAddressBegin; |
| | | // 数据地址长度:第一参数到最后一个参数的长度 |
| | | private int plcAddressLength; |
| | | private ArrayList<PlcBitInfo> plcBitList; |
| | | |
| | | /** |
| | | * @return 数据区开始地址 |
| | | */ |
| | | public String getPlcAddressBegin() { |
| | | return plcAddressBegin; |
| | | } |
| | | |
| | | /** |
| | | * @param plcAddressBegin 设置数据区开始地址 |
| | | */ |
| | | public void setPlcAddressBegin(String plcAddressBegin) { |
| | | this.plcAddressBegin = plcAddressBegin; |
| | | } |
| | | |
| | | /** |
| | | * @return 数据区 读取所有数据所需的长度(以byte类型为基准) |
| | | */ |
| | | public int getPlcAddressLength() { |
| | | return plcAddressLength; |
| | | } |
| | | |
| | | /** |
| | | * @return 设置:数据区 读取所有数据所需的长度(以byte类型为基准) |
| | | */ |
| | | public void setPlcAddressLength(int plcAddressLength) { |
| | | this.plcAddressLength = plcAddressLength; |
| | | } |
| | | |
| | | /** |
| | | * @return 获取参数实例集合 |
| | | */ |
| | | public ArrayList<PlcBitInfo> getBitList() { |
| | | return plcBitList; |
| | | } |
| | | |
| | | /** |
| | | * 根据参数标识 获取某个参数实例 |
| | | * |
| | | * @param codeid 参数标识 |
| | | * @return 获取某个参数实例 |
| | | */ |
| | | public PlcBitInfo getPlcBit(String codeid) { |
| | | if (plcBitList != null) { |
| | | for (PlcBitInfo plcbitInfo : plcBitList) { |
| | | if (plcbitInfo.getCodeId().equals(codeid)) |
| | | return plcbitInfo; |
| | | } |
| | | return null; |
| | | } else |
| | | return null; |
| | | } |
| | | |
| | | /** |
| | | * 根据参数标识 获取某个参数实例 |
| | | * |
| | | * @param codeid 参数标识 |
| | | * @return 获取某个参数实例 |
| | | */ |
| | | public List<Boolean> getPlcBitValues(List<String> codeids) { |
| | | List<Boolean> arrayList = new ArrayList<>(); |
| | | if (plcBitList != null) { |
| | | Map<String, Boolean> resultMap = new LinkedHashMap<>(); // 使用 LinkedHashMap 保留插入顺序 |
| | | for (PlcBitInfo plcBitInfo : plcBitList) { |
| | | if (codeids.contains(plcBitInfo.getCodeId().toString())) { |
| | | resultMap.put(plcBitInfo.getCodeId().toString(), plcBitInfo.getValue()); |
| | | } |
| | | } |
| | | for (String codeId : codeids) { // 按照传入参数的顺序遍历 |
| | | Boolean value = resultMap.get(codeId); |
| | | if (value != null) { |
| | | arrayList.add(value); |
| | | } else { |
| | | arrayList.add(null); // 如果找不到对应的值,添加 null |
| | | } |
| | | } |
| | | } |
| | | return arrayList; |
| | | } |
| | | |
| | | |
| | | public List<String> getAddressListByCodeId(List<String> codeIdList) { |
| | | List<String> addressList = new ArrayList<>(); |
| | | for (String codeId : codeIdList) { |
| | | for (PlcBitInfo plcBitInfo : plcBitList) { |
| | | if (plcBitInfo.getCodeId().equals(codeId)) { |
| | | int index = plcBitInfo.getAddressIndex(); |
| | | String address = plcBitInfo.getAddress(index); |
| | | if (address != null) { |
| | | addressList.add(address); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | return addressList; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 添加参数实例 |
| | | * |
| | | * @param param 参数实例 |
| | | */ |
| | | public void addPlcBit(PlcBitInfo param) { |
| | | if (plcBitList != null) |
| | | plcBitList.add(param); |
| | | else { |
| | | plcBitList = new ArrayList<PlcBitInfo>(); |
| | | plcBitList.add(param); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 根据PLC返回的数据 给参数实例赋值 |
| | | * |
| | | * @param plcValueArray PLC读取回来的byte类型数据集合 |
| | | */ |
| | | public void setPlcBitList(List<Boolean> plcValueArray) { |
| | | if (plcBitList != null) { |
| | | for (PlcBitInfo plcbitInfo : plcBitList) { |
| | | plcbitInfo.setValue(plcValueArray.get(plcbitInfo.getAddressIndex())); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.entity.device; |
| | | public class PlcParameterInfo { |
| | | public PlcParameterInfo(String startAddress) { |
| | | this.startAddress = startAddress; |
| | | } |
| | | private String startAddress; |
| | | // 参数标识 |
| | | private String codeId; |
| | | |
| | | // 参数名称 |
| | | private String name; |
| | | |
| | | // 读取 参数值 |
| | | private String value; |
| | | |
| | | // // 写入 参数值 |
| | | // private String writeValue; |
| | | |
| | | // 参数单位 |
| | | private String unit; |
| | | |
| | | // 参数值转换系数 |
| | | private int ratio; |
| | | |
| | | // 参数地址 |
| | | private int addressIndex; |
| | | |
| | | // 参数地址位长度 |
| | | private int addressLength; |
| | | |
| | | public String getCodeId() { |
| | | return this.codeId; |
| | | } |
| | | |
| | | public void setCodeId(String codeId) { |
| | | this.codeId = codeId; |
| | | } |
| | | |
| | | public String getName() { |
| | | return this.name; |
| | | } |
| | | |
| | | public void setName(String name) { |
| | | this.name = name; |
| | | } |
| | | |
| | | public String getValue() { |
| | | return this.value; |
| | | } |
| | | |
| | | public void setValue(String value) { |
| | | this.value = value; |
| | | } |
| | | |
| | | // public String getWriteValue() { |
| | | // return this.writeValue; |
| | | // } |
| | | |
| | | // public void setWriteValue(String writeValue) { |
| | | // this.writeValue = writeValue; |
| | | // } |
| | | |
| | | public String getUnit() { |
| | | return this.unit; |
| | | } |
| | | |
| | | public void setUnit(String unit) { |
| | | this.unit = unit; |
| | | } |
| | | |
| | | public int getAddressIndex() { |
| | | return this.addressIndex; |
| | | } |
| | | |
| | | public void setAddressIndex(int addressindex) { |
| | | this.addressIndex = addressindex; |
| | | } |
| | | |
| | | public int getAddressLength() { |
| | | return this.addressLength; |
| | | } |
| | | |
| | | public void setAddressLength(int addresslength) { |
| | | this.addressLength = addresslength; |
| | | } |
| | | |
| | | public int getRatio() { |
| | | return this.ratio; |
| | | } |
| | | |
| | | public void setRatio(int ratio) { |
| | | this.ratio = ratio; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取地址 |
| | | * |
| | | * @param index 索引地址 |
| | | */ |
| | | public String getAddress(int index) { |
| | | String[] stringdatas = this.startAddress.trim().split("\\."); |
| | | int addressLength=this.addressLength; |
| | | if (addressLength < 2 ){ |
| | | return null; |
| | | } |
| | | |
| | | if (addressLength == 2 ) { |
| | | int wordindex = index; |
| | | |
| | | return stringdatas[0] + "." + wordindex; |
| | | } |
| | | if (addressLength == 14 ) { |
| | | int wordindex = index; |
| | | //int newIndex = wordindex + 13; |
| | | return stringdatas[0] + "." + wordindex ; |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public int getPlcAddress() { |
| | | |
| | | return addressIndex; |
| | | } |
| | | public String getAddress() { |
| | | return getAddress(this.addressIndex); |
| | | } |
| | | } |
New file |
| | |
| | | package com.mes.entity.device; |
| | | |
| | | import java.lang.reflect.Array; |
| | | import java.nio.charset.StandardCharsets; |
| | | import java.util.ArrayList; |
| | | import java.util.LinkedHashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | public class PlcParameterObject { |
| | | |
| | | // 该模块数据类型,数据起始位置 |
| | | private String plcAddressBegin; |
| | | // 数据地址长度:第一参数到最后一个参数的长度 |
| | | private int plcAddressLength; |
| | | private ArrayList<PlcParameterInfo> plcParameterList; |
| | | |
| | | /** |
| | | * @return 数据区开始地址 |
| | | */ |
| | | public String getPlcAddressBegin() { |
| | | return plcAddressBegin; |
| | | } |
| | | |
| | | /** |
| | | * @param plcAddressBegin 设置数据区开始地址 |
| | | */ |
| | | public void setPlcAddressBegin(String plcAddressBegin) { |
| | | this.plcAddressBegin = plcAddressBegin; |
| | | } |
| | | |
| | | /** |
| | | * @return 数据区 读取所有数据所需的长度(以byte类型为基准) |
| | | */ |
| | | public int getPlcAddressLength() { |
| | | return plcAddressLength; |
| | | } |
| | | |
| | | /** |
| | | * @return 设置:数据区 读取所有数据所需的长度(以byte类型为基准) |
| | | */ |
| | | public void setPlcAddressLength(int plcAddressLength) { |
| | | this.plcAddressLength = plcAddressLength; |
| | | } |
| | | |
| | | /** |
| | | * @return 获取参数实例集合 |
| | | */ |
| | | public ArrayList<PlcParameterInfo> getPlcParameterList() { |
| | | return plcParameterList; |
| | | } |
| | | |
| | | /** |
| | | * 根据参数标识 获取某个参数实例 |
| | | * |
| | | * @param codeid 参数标识 |
| | | * @return 获取某个参数实例 |
| | | */ |
| | | public PlcParameterInfo getPlcParameter(String codeid) { |
| | | if (plcParameterList != null) { |
| | | for (PlcParameterInfo plcParameterInfo : plcParameterList) { |
| | | if (plcParameterInfo.getCodeId().equals(codeid)) |
| | | return plcParameterInfo; |
| | | } |
| | | return null; |
| | | } else |
| | | return null; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 根据参数标识 获取某个参数实例 |
| | | * |
| | | * @param codeids 参数标识 |
| | | * @return 获取某个参数实例 |
| | | */ |
| | | public List<String> getPlcParameterValues(List<String> codeids) { |
| | | List<String> arrayList = new ArrayList<>(); |
| | | if (plcParameterList != null) { |
| | | Map<String, PlcParameterInfo> resultMap = new LinkedHashMap<>(); // 使用 LinkedHashMap 保留插入顺序 |
| | | for (PlcParameterInfo plcParameterInfo : plcParameterList) { |
| | | if (codeids.contains(plcParameterInfo.getCodeId())) { |
| | | resultMap.put(plcParameterInfo.getCodeId(), plcParameterInfo); |
| | | } |
| | | } |
| | | for (String codeId : codeids) { // 按照传入参数的顺序遍历 |
| | | PlcParameterInfo plcParameterInfo = resultMap.get(codeId); |
| | | if (plcParameterInfo != null) { |
| | | arrayList.add(plcParameterInfo.getValue()); |
| | | } else { |
| | | arrayList.add(null); // 如果找不到对应的值,添加 null |
| | | } |
| | | } |
| | | } |
| | | return arrayList; |
| | | } |
| | | |
| | | |
| | | public List<String> getAddressListByCodeId(List<String> codeIdList) { |
| | | List<String> addressList = new ArrayList<>(); |
| | | for (String codeId : codeIdList) { |
| | | for (PlcParameterInfo plcParameterInfo : plcParameterList) { |
| | | if (plcParameterInfo.getCodeId().equals(codeId)) { |
| | | int index = plcParameterInfo.getAddressIndex(); |
| | | String address = plcParameterInfo.getAddress(index); |
| | | if (address != null) { |
| | | addressList.add(address); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | return addressList; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 添加参数实例 |
| | | * |
| | | * @param param 参数实例 |
| | | */ |
| | | public void addPlcParameter(PlcParameterInfo param) { |
| | | if (plcParameterList != null) |
| | | plcParameterList.add(param); |
| | | else { |
| | | plcParameterList = new ArrayList<PlcParameterInfo>(); |
| | | plcParameterList.add(param); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 根据PLC返回的数据 给参数实例赋值 |
| | | * |
| | | * @param plcValueArray PLC读取回来的byte类型数据集合 |
| | | */ |
| | | public void setPlcParameterList(byte[] plcValueArray) { |
| | | if (plcParameterList != null) { |
| | | |
| | | for (PlcParameterInfo plcParameterInfo : plcParameterList) { |
| | | |
| | | byte[] valueList = new byte[plcParameterInfo.getAddressLength()]; |
| | | |
| | | // System.out.println(plcParameterInfo.getAddressLength()); |
| | | |
| | | for (int i = 0; i < plcParameterInfo.getAddressLength(); i++) { |
| | | Array.setByte(valueList, i, plcValueArray[plcParameterInfo.getAddressIndex() + i]); |
| | | |
| | | } |
| | | if (plcParameterInfo.getAddressLength()==2) { |
| | | plcParameterInfo.setValue(String.valueOf(byte2short(valueList))); |
| | | } |
| | | else if (plcParameterInfo.getAddressLength()==14) { |
| | | plcParameterInfo.setValue((byteToHexString(valueList))); |
| | | } |
| | | |
| | | else |
| | | { |
| | | String valuestr = new String(valueList); |
| | | plcParameterInfo.setValue(valuestr); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | /** |
| | | * short类型转byte[] |
| | | * |
| | | * @param s short类型值 |
| | | */ |
| | | public static byte[] short2byte(short s){ |
| | | byte[] b = new byte[2]; |
| | | for(int i = 0; i < 2; i++){ |
| | | int offset = 16 - (i+1)*8; //因为byte占4个字节,所以要计算偏移量 |
| | | b[i] = (byte)((s >> offset)&0xff); //把16位分为2个8位进行分别存储 |
| | | } |
| | | return b; |
| | | } |
| | | /** |
| | | * byte[]类型转short |
| | | * |
| | | * @param b byte[]类型值 |
| | | */ |
| | | public static short byte2short(byte[] b){ |
| | | short l = 0; |
| | | for (int i = 0; i < 2; i++) { |
| | | l<<=8; //<<=和我们的 +=是一样的,意思就是 l = l << 8 |
| | | l |= (b[i] & 0xff); //和上面也是一样的 l = l | (b[i]&0xff) |
| | | } |
| | | return l; |
| | | } |
| | | |
| | | public static String byteToHexString(byte[] bytes) { |
| | | |
| | | String str = new String(bytes, StandardCharsets.UTF_8); |
| | | return str; |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | package com.mes.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.mes.entity.EdgStorageCageDetails; |
| | | import com.mes.entity.GlassInfo; |
| | | import com.mes.entity.OrderTest; |
| | | import com.mes.entity.TaskCache; |
| | | import com.mes.entity.Tempered; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | import org.apache.ibatis.annotations.*; |
| | | |
| | | @Mapper |
| | | public interface SelectInfo { |
| | | //玻璃信息 按ID查询 |
| | | // 玻璃信息 按ID查询 |
| | | @Select("select * from `glass_info` where id=#{id}") |
| | | GlassInfo SelectGlassId(String id); |
| | | |
| | | //钢化按工程查询 |
| | | // 钢化按工程查询 |
| | | @Select("select * from `v_optimize_heat_layout` where project_no=#{projeceid} ") |
| | | List<Tempered> SelectTempered(String projeceid); |
| | | // |
| | | // @Insert("INSERT `order`(order_id)VALUES(#{order_id})") |
| | | // Integer insert(Order order); |
| | | // |
| | | // @Delete("delete from `order` where id=#{id}") |
| | | // Integer deleteById(@Param("id") Integer id); |
| | | // |
| | | // @Update("update `order` set order_id=#{order_id} where id=#{id}") |
| | | // Integer update(@Param("id") Integer id,@Param("order_id") String order_id); |
| | | List<Tempered> SelectTemperedTerritory(String projeceid); |
| | | |
| | | // 切割版图按工程查询 |
| | | @Select("select * from optimize_detail where project_no=#{projeceid} ") |
| | | List<Map> SelectCutTerritory(String projeceid); |
| | | |
| | | // 查询磨边信息 |
| | | @Select("select * from task_cache where task_type='2' and task_stauts='2' and end_cell=#{EndCell}") |
| | | List<Map> SelectEdgInfo(String EndCell); |
| | | |
| | | // 查询笼子内空闲 |
| | | @Select("select escd.* from edg_storage_cage as esc LEFT JOIN edg_storage_cage_details as escd on esc.slot=escd.slot where escd.slot is null order by escd.slot") |
| | | List<EdgStorageCageDetails> SelectCacheLeisure(); |
| | | |
| | | // 查询笼子内出片任务 |
| | | @Select("select escd.* from edg_storage_cage as esc LEFT JOIN edg_storage_cage_details as escd on esc.slot=escd.slot WHERE escd.slot IS NOT NULL order by escd.tempering_layout_id,escd.tempering_feed_sequence") |
| | | List<EdgStorageCageDetails> SelectCacheOut(); |
| | | |
| | | // 查询笼子内信息 |
| | | @Select("select escd.* from edg_storage_cage as esc LEFT JOIN edg_storage_cage_details as escd on esc.slot=escd.slot order by esc.slot") |
| | | List<EdgStorageCageDetails> SelectCachInfo(); |
| | | |
| | | // 查询可进此片玻璃的栅格号 |
| | | @Select("select escd.* from edg_storage_cage as esc LEFT JOIN edg_storage_cage_details as escd on esc.slot=escd.slot where escd.slot is not null escd.tempering_layout_id=#{tempering_layout_id} and escd.tempering_feed_sequence<#{tempering_feed_sequence} and esc.remain_width-#{width}>0 order by escd.tempering_feed_sequence") |
| | | List<EdgStorageCageDetails> SelectIsExistIntoCache(Integer tempering_layout_id, Integer tempering_feed_sequence, |
| | | double width); |
| | | |
| | | // 查询可进此片玻璃的栅格号 |
| | | @Select("select escd.* from edg_storage_cage as esc LEFT JOIN edg_storage_cage_details as escd on esc.slot=escd.slot where escd.slot is not null escd.tempering_layout_id<#{tempering_layout_id} and esc.remain_width-#{width}>0 order by escd.tempering_layout_id desc,escd.tempering_feed_sequence") |
| | | List<EdgStorageCageDetails> SelectIsExistIntoCache(Integer tempering_layout_id, double width); |
| | | |
| | | // 查询全部任务 |
| | | @Select("select * from task_cache") |
| | | List<TaskCache> SelectCacheInfoAll(); |
| | | |
| | | // 查询进片任务 |
| | | @Select("select * from task_cache where task_type='1' and task_stauts='0'") |
| | | List<TaskCache> SelectInputCacheInfo(); |
| | | |
| | | // 查询出片任务 |
| | | @Select("select * from task_cache where task_type='2' and task_stauts='0'") |
| | | List<TaskCache> SelectOutCacheInfo(); |
| | | |
| | | // 查询 A09 或 A10 最新的一片 出片任务 |
| | | @Select("select * from task_cache where task_type='2' and task_stauts='2' and end_cell=#{EndCell} limit 1") |
| | | GlassInfo SelectLastOutCacheInfo(String EndCell); |
| | | |
| | | // 修改笼子内信息 |
| | | @Update("update") |
| | | Integer UpdateCache(@Param("id") Integer id, @Param("order_id") String order_id); |
| | | |
| | | // 添加理片任务 |
| | | @Insert("INSERT into task_cache VALUES(#{id},#{start},#{end},#{type},0)") |
| | | Integer insertCacheTask(String id, String start, String end, String type); |
| | | |
| | | // |
| | | // @Insert("INSERT `order`(order_id)VALUES(#{order_id})") |
| | | // Integer insert(Order order); |
| | | // |
| | | // @Delete("delete from `order` where id=#{id}") |
| | | // Integer deleteById(@Param("id") Integer id); |
| | | // |
| | | // @Update("update `order` set order_id=#{order_id} where id=#{id}") |
| | | // Integer update(@Param("id") Integer id,@Param("order_id") String order_id); |
| | | } |
| | |
| | | package com.mes.service.CacheGlassService; |
| | | |
| | | import java.util.List; |
| | | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import com.mes.common.PlcTools.S7control; |
| | | import com.mes.entity.EdgStorageCageDetails; |
| | | import com.mes.entity.GlassInfo; |
| | | import com.mes.entity.TaskCache; |
| | | import com.mes.entity.device.PLCAutoMes; |
| | | import com.mes.entity.device.PlcParameterObject; |
| | | import com.mes.mapper.SelectInfo; |
| | | |
| | | |
| | |
| | | public class Logic { |
| | | @Autowired |
| | | private SelectInfo selectInfo; |
| | | //识别逻辑 |
| | | //识别逻辑 不交互 |
| | | public void identify(String Number){ |
| | | //查询任务 |
| | | // PlcParameterObject plcmes=PLCAutoMes.PlcMesObject; |
| | | // S7control.getinstance().WriteWord(plcmes.getPlcParameter("MESToGaStatus").getAddress(),(short) 1); |
| | | PlcParameterObject plcmes=PLCAutoMes.PlcMesObject; |
| | | S7control.getinstance().WriteWord(plcmes.getPlcParameter("MESToGaStatus").getAddress(),(short) 1); |
| | | String s=S7control.getinstance().ReadWord("DB14.26", 1).get(0)+""; |
| | | boolean isexist=isExist(Number); |
| | | if (isexist) { |
| | | //存在逻辑 1.添加信息 2.回复PLC存在 |
| | |
| | | //S7control.getinstance().WriteWord(plcmes.getPlcParameter("MESToGaStatus").getAddress(),(short) 2); |
| | | } |
| | | } |
| | | //理片 |
| | | public void Process(){ |
| | | String Result=S7control.getinstance().ReadWord("DB14.0", 1).get(0)+""; |
| | | String Number=S7control.getinstance().ReadWord("DB14.2", 1).get(0)+""; |
| | | if(Result=="1"){//进片请求 |
| | | processInto(Number); |
| | | }else if(Result=="2"){//出片请求 |
| | | processOut(); |
| | | }else if(Result=="3"){//进出片请求 |
| | | if (!processOut()) { //先出后进 |
| | | processInto(Number); |
| | | } |
| | | } |
| | | } |
| | | //理片 进 |
| | | public void process(String imagePath){ |
| | | public boolean processInto(String Number){ |
| | | //查询消息队列里的玻璃 |
| | | |
| | | GlassInfo GlassInfo=selectInfo.SelectGlassId(Number); |
| | | PlcParameterObject plcmes=PLCAutoMes.PlcMesObject; |
| | | if(GlassInfo!=null){//存在此玻璃编号 |
| | | //同钢化版图内的栅格号 |
| | | List<EdgStorageCageDetails> list=selectInfo.SelectIsExistIntoCache(GlassInfo.getTemperinglayoutid(),GlassInfo.getTemperingfeedsequence(),GlassInfo.getWidth()); |
| | | //空栅格号 |
| | | if (list.size()==0) { |
| | | list=selectInfo.SelectCacheLeisure(); |
| | | } |
| | | //小于此玻璃钢化版图序号的栅格号 |
| | | if(list.size()==0){ |
| | | list=selectInfo.SelectIsExistIntoCache(GlassInfo.getTemperinglayoutid(),GlassInfo.getWidth()); |
| | | } |
| | | if(list.size()>0){ |
| | | //存在空格 |
| | | //1.生成任务: 起始位置0 结束位置this.slot 任务类型 1 (进片任务) |
| | | //2.回复 1进片 |
| | | EdgStorageCageDetails item=list.get(0); |
| | | selectInfo.insertCacheTask(GlassInfo.getId()+"","0",item.getSlot()+"","1"); |
| | | S7control.getinstance().WriteWord(plcmes.getPlcParameter("MESToGaStatus").getAddress(),(short) 1); |
| | | return true; |
| | | } |
| | | |
| | | }else{ |
| | | // ID编号不存在 不处理/回复PLC 进行报警提示 |
| | | } |
| | | //返回结果 |
| | | return false; |
| | | } |
| | | //理片 出 |
| | | public void processOut(String imagePath){ |
| | | public boolean processOut(){ |
| | | //查询任务 |
| | | |
| | | String A09=S7control.getinstance().ReadWord("DB14.56", 1).get(0)+""; |
| | | String A10=S7control.getinstance().ReadWord("DB14.58", 1).get(0)+""; |
| | | PlcParameterObject plcmes=PLCAutoMes.PlcMesObject; |
| | | List<EdgStorageCageDetails> list=selectInfo.SelectCacheOut(); |
| | | boolean isOut=true;//其他情况条件 如:后续设备故障禁止理片出片 等 |
| | | if (list.size()>0&&isOut) { |
| | | EdgStorageCageDetails item=list.get(0); |
| | | if(A09=="0"&&A10=="1"){ |
| | | //出到 A09 |
| | | selectInfo.insertCacheTask(item.getGlassid()+"","0","09","2"); |
| | | S7control.getinstance().writeString(plcmes.getPlcParameter("DB14.28").getAddress(), "1"); |
| | | S7control.getinstance().writeString(plcmes.getPlcParameter("DB14.20").getAddress(), "1"); |
| | | return true; |
| | | }else if(A09=="1"&&A10=="0"){ |
| | | //出到 A10 |
| | | selectInfo.insertCacheTask(item.getGlassid()+"","0","10","2"); |
| | | S7control.getinstance().writeString(plcmes.getPlcParameter("DB14.28").getAddress(), "2"); |
| | | S7control.getinstance().writeString(plcmes.getPlcParameter("DB14.20").getAddress(), "1"); |
| | | return true; |
| | | }else if(A09=="0"&&A10=="0"){ |
| | | //都允许 A09/A10 上一片是否和此片玻璃尺寸尺寸相同 |
| | | String endcell="09"; |
| | | String SendEndcell="1"; |
| | | boolean If_=false; |
| | | GlassInfo glassInfo09= selectInfo.SelectLastOutCacheInfo("09"); |
| | | GlassInfo glassInfo10= selectInfo.SelectLastOutCacheInfo("10"); |
| | | if(glassInfo10!=null&&glassInfo10.getWidth()==item.getWidth()&&glassInfo10.getHeight()==item.getHeight()){ |
| | | endcell="10"; |
| | | SendEndcell="2"; |
| | | }else if(glassInfo10!=null&&If_){ |
| | | //其他条件 |
| | | } |
| | | selectInfo.insertCacheTask(item.getGlassid()+"","0",endcell,"2"); |
| | | S7control.getinstance().writeString(plcmes.getPlcParameter("DB14.28").getAddress(), SendEndcell); |
| | | S7control.getinstance().writeString(plcmes.getPlcParameter("DB14.20").getAddress(), "1"); |
| | | return true; |
| | | } |
| | | } |
| | | //返回结果 |
| | | return false; |
| | | } |
| | | //磨边 |
| | | public void processMb(String imagePath){ |
| | | //查询任务 |
| | | |
| | | //磨边 不交互 理片和磨边机自己交互 |
| | | public void processMb(String Number){ |
| | | //查询任务 |
| | | GlassInfo GlassInfo=selectInfo.SelectGlassId(Number); |
| | | PlcParameterObject plcmes=PLCAutoMes.PlcMesObject; |
| | | if(GlassInfo!=null){ |
| | | //发送任务 ID 长 宽 厚 倒角 工艺功能等 |
| | | S7control.getinstance().writeString(plcmes.getPlcParameter("DB14.22").getAddress(),"N10000"); |
| | | S7control.getinstance().writeString(plcmes.getPlcParameter("DB14.24").getAddress(), "1000"); |
| | | S7control.getinstance().writeString(plcmes.getPlcParameter("DB14.26").getAddress(),"800"); |
| | | S7control.getinstance().writeString(plcmes.getPlcParameter("DB14.28").getAddress(),"60"); |
| | | S7control.getinstance().writeString(plcmes.getPlcParameter("DB14.30").getAddress(), "2"); |
| | | S7control.getinstance().writeString(plcmes.getPlcParameter("DB14.20").getAddress(), "1"); |
| | | } |
| | | //返回结果 |
| | | } |
| | | |
| | |
| | | } |
| | | return true;//返回 存在 |
| | | } |
| | | |
| | | //是否存在此编号玻璃 |
| | | public boolean isExist(String Number){ |
| | | //查询是否存在 |
New file |
| | |
| | | package com.mes.service.hangzhoumes; |
| | | |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.mes.entity.EdgStorageCageDetails; |
| | | import com.mes.entity.GlassInfo; |
| | | import com.mes.entity.Tempered; |
| | | import com.mes.mapper.SelectInfo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @Service |
| | | @DS("hangzhoumes") |
| | | public class hangzhoumesService { |
| | | |
| | | @Autowired |
| | | private SelectInfo SelectInfo; |
| | | |
| | | public GlassInfo getUserInfo(String process_id){ |
| | | return SelectInfo.SelectGlassId(process_id); |
| | | } |
| | | // //识别信息 |
| | | // public List<Map> SelectCutTerritory(String process_id){ |
| | | // return SelectInfo.SelectCutTerritory(process_id); |
| | | // } |
| | | |
| | | //理片缓存 笼内信息 |
| | | public List<EdgStorageCageDetails> SelectCageInfo(){ |
| | | return SelectInfo.SelectCachInfo(); |
| | | } |
| | | |
| | | //磨边小片信息 |
| | | public List<Map> SelectEdgInfo(String line){ |
| | | |
| | | return SelectInfo.SelectEdgInfo(line); |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | package com.mes.service.pp; |
| | | |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.mes.common.CacheUtil; |
| | | import com.mes.common.Result; |
| | | import com.mes.entity.GlassInfo; |
| | | import com.mes.entity.Tempered; |
| | | import com.mes.entity.userInfo.User; |
| | | import com.mes.mapper.SelectInfo; |
| | | import com.mes.mapper.userInfo.UserMapper; |
| | | import com.mes.controller.dto.UserDTO; |
| | | import com.mes.tools.TokenTools; |
| | | import org.apache.ibatis.jdbc.Null; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.cache.annotation.CacheEvict; |
| | | import org.springframework.cache.annotation.Cacheable; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @Service |
| | | @DS("pp") |
| | |
| | | return SelectInfo.SelectGlassId(process_id); |
| | | } |
| | | |
| | | public List<Tempered> getSelectTempered(String process_id){ |
| | | return SelectInfo.SelectTempered(process_id); |
| | | public List<Tempered> SelectTemperedTerritory(String process_id){ |
| | | return SelectInfo.SelectTemperedTerritory(process_id); |
| | | } |
| | | //切割版图 |
| | | public List<Map> SelectCutTerritory(String process_id){ |
| | | return SelectInfo.SelectCutTerritory(process_id); |
| | | } |
| | | |
| | | |
| | |
| | | url: jdbc:mysql://10.153.19.150:3306/hangzhoumes?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | pp: |
| | | url: jdbc:mysql://10.153.19.150:3306/pp?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | |
| | | url: jdbc:mysql://10.153.19.150:3306/hangzhoumes?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | pp: |
| | | url: jdbc:mysql://10.153.19.150:3306/pp?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | |
| | | <html lang="en"> |
| | | <head> |
| | | <meta charset="UTF-8"> |
| | | <link rel="icon" href="/favicon.ico"> |
| | | <!-- <link rel="icon" href="/favicon.ico"> --> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| | | <title>北玻</title> |
| | | </head> |
| | |
| | | } |
| | | ] |
| | | }, |
| | | //sd模块 |
| | | |
| | | /*----------- 上片机 ----------------*/ |
| | | { |
| | | path: 'Returns', |
| | | name: 'Returns', |
| | | component: () => import('../views/Returns/returns.vue'), |
| | | children:[ |
| | | { |
| | | path: '/Returns/returns', |
| | | name: 'returns', |
| | | component: () => import('../views/Returns/returns.vue') |
| | | }, |
| | | ] |
| | | }, |
| | | /*----------- 掰片/识别 ----------------*/ |
| | | { |
| | | path: 'Identify', |
| | | name: 'Identify', |
| | | component: () => import('../views/Identify/identify.vue'), |
| | | children:[ |
| | | { |
| | | path: 'product',//产品 |
| | | name: 'product', |
| | | component: () => import('../views/sd/product/Product.vue'), |
| | | children:[ |
| | | { |
| | | path: 'createProduct', |
| | | name: 'createProduct', |
| | | component: () => import('../views/sd/product/CreateProduct.vue') |
| | | }, |
| | | { |
| | | path: 'selectProduct', |
| | | name: 'selectProduct', |
| | | component: () => import('../views/sd/product/SelectProduct.vue') |
| | | }, |
| | | { |
| | | path: 'test', |
| | | name: 'test', |
| | | component: () => import('../views/sd/product/Test.vue') |
| | | }, |
| | | { |
| | | path: 'test1', |
| | | name: 'test1', |
| | | component: () => import('../views/sd/product/Test11.vue') |
| | | }, |
| | | { |
| | | path: 'testSort', |
| | | name: 'testSort', |
| | | component: () => import('../views/sd/product/testSort.vue') |
| | | }, |
| | | { |
| | | name: 'product', |
| | | path: '', |
| | | redirect:'/main/product/selectProduct' |
| | | } |
| | | ] |
| | | path: '/Identify/identify', |
| | | name: 'identify', |
| | | component: () => import('../views/Identify/identify.vue') |
| | | }, |
| | | { |
| | | path: 'order',//订单 |
| | | name: 'order', |
| | | component: () => import('../views/sd/order/Order.vue'), |
| | | children:[ |
| | | { |
| | | path: 'selectOrder', |
| | | name: 'selectOrder', |
| | | component: () => import('../views/sd/order/SelectOrder.vue'), |
| | | }, |
| | | { |
| | | path: 'createOrder', |
| | | name: 'createOrder', |
| | | component: () => import('../views/sd/order/CreateOrder.vue'), |
| | | }, |
| | | { |
| | | path: 'updateOrderCraft', |
| | | name: 'updateOrderCraft', |
| | | component: () => import('../views/sd/order/UpdateOrderCraft.vue'), |
| | | }, |
| | | { |
| | | path: 'orderReport', |
| | | name: 'orderReport', |
| | | component: () => import('../views/sd/order/OrderReport.vue'), |
| | | }, |
| | | { |
| | | path: '', |
| | | redirect:'/main/order/SelectOrder' |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | path: 'delivery',//发货 |
| | | name: 'delivery', |
| | | component: () => import('../views/sd/delivery/Delivery.vue'), |
| | | children: [ |
| | | { |
| | | path: 'selectDelivery', |
| | | name: 'selectDelivery', |
| | | component: () => import('../views/sd/delivery/SelectDelivery.vue'), |
| | | }, |
| | | { |
| | | path: 'selectOrderList', |
| | | name: 'selectOrderList', |
| | | component: () => import('../views/sd/delivery/SelectOrderList.vue'), |
| | | }, |
| | | { |
| | | path: 'deliveryReport', |
| | | name: 'deliveryReport', |
| | | component: () => import('../views/sd/delivery/DeliveryReport.vue'), |
| | | }, |
| | | { |
| | | path: 'createDelivery', |
| | | name: 'createDelivery', |
| | | component: () => import('../views/sd/delivery/CreateDelivery.vue'), |
| | | }, |
| | | |
| | | |
| | | { |
| | | path: '', |
| | | redirect:'/main/delivery/selectDelivery' |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | path: 'returns',//退货 |
| | | name: 'returns', |
| | | component: () => import('../views/sd/returns/Returns.vue'), |
| | | children: [ |
| | | { |
| | | path: '', |
| | | redirect:'/main/returns/selectReturns' |
| | | }, |
| | | { |
| | | path: 'selectReturns', |
| | | name: 'selectReturns', |
| | | component: () => import('../views/sd/returns/SelectReturns.vue'), |
| | | }, |
| | | |
| | | { |
| | | path: 'createReturns', |
| | | name: 'createReturns', |
| | | component: () => import('../views/sd/returns/CreateReturns.vue'), |
| | | }, |
| | | { |
| | | path: 'selectDeliveryList', |
| | | name: 'selectDeliveryList', |
| | | component: () => import('../views/sd/returns/SelectDeliveryList.vue'), |
| | | }, |
| | | { |
| | | path: 'returnsReport', |
| | | name: 'returnsReport', |
| | | component: () => import('../views/sd/returns/ReturnsReport.vue'), |
| | | } |
| | | |
| | | |
| | | ] |
| | | }, |
| | | { |
| | | path: 'customer',//客户 |
| | | name: 'customer', |
| | | component: () => import('../views/sd/customer/Customer.vue'), |
| | | children: [ |
| | | { |
| | | path: '', |
| | | redirect:'/main/customer/selectCustomer' |
| | | }, |
| | | { |
| | | path: 'selectCustomer', |
| | | name: 'selectCustomer', |
| | | component: () => import('../views/sd/customer/SelectCustomer.vue'), |
| | | }, |
| | | { |
| | | path: 'createCustomer', |
| | | name: 'createCustomer', |
| | | component: () => import('../views/sd/customer/CreateCustomer.vue'), |
| | | } |
| | | ] |
| | | }, |
| | | // { |
| | | // path:'appMenu', |
| | | // name:'appMenu', |
| | | // component: () => import('../layout/component/appMpenu.vue'), |
| | | // children:[ |
| | | // { |
| | | // path: 'appMenu', |
| | | // name: 'appMenu', |
| | | // component:()=>import('../layout/component/appMpenu.vue') |
| | | // }, |
| | | // { |
| | | // path: 'appView', |
| | | // name: 'appView', |
| | | // component:()=>import('../layout/component/appView.vue') |
| | | // }, |
| | | // { |
| | | // path: 'logoHeader', |
| | | // name: 'logoHeader', |
| | | // component:()=>import('../layout/component/logoHeader.vue') |
| | | // }, |
| | | // { |
| | | // path: 'routerHeader', |
| | | // name: 'routerHeader', |
| | | // component:()=>import('../layout/component/routerHeader.vue') |
| | | // }, |
| | | // ] |
| | | // }, |
| | | |
| | | //pp模块 |
| | | { |
| | | //工单管理 |
| | | path: 'workOrder', |
| | | name: 'workOrder', |
| | | component: () => import('../views/pp/workOrder/WorkOrder.vue'), |
| | | children:[ |
| | | |
| | | { |
| | | path: 'selectAddWorkOrder', |
| | | name: 'selectAddWorkOrder', |
| | | component: () => import('../views/pp/workOrder/SelectAddWorkOrder.vue'), |
| | | }, |
| | | // { |
| | | // path: 'releaseWorkOrder', |
| | | // name: 'releaseWorkOrder', |
| | | // component: () => import('../views/pp/workOrder/ReleaseWorkOrder.vue'), |
| | | // }, |
| | | { |
| | | path: 'addWorkOrder', |
| | | name: 'addWorkOrder', |
| | | component: () => import('../views/pp/workOrder/AddWorkOrder.vue'), |
| | | }, |
| | | { |
| | | path: 'selectWorkOrder', |
| | | name: 'selectWorkOrder', |
| | | component: () => import('../views/pp/workOrder/SelectWorkOrder.vue'), |
| | | }, |
| | | { |
| | | path: '', |
| | | redirect:'/main/workOrder/SelectWorkOrder' |
| | | } |
| | | ] |
| | | |
| | | }, |
| | | { |
| | | //流程卡管理 |
| | | path: 'processCard', |
| | | name: 'processCard', |
| | | component: () => import('../views/pp/processCard/ProcessCard.vue'), |
| | | children:[ |
| | | |
| | | { |
| | | path: 'addProcessCard', |
| | | name: 'addProcessCard', |
| | | component: () => import('../views/pp/processCard/AddProcessCard.vue'), |
| | | }, |
| | | { |
| | | path: 'printFlowCard', |
| | | name: 'printFlowCard', |
| | | component: () => import('../views/pp/processCard/PrintFlowCard.vue'), |
| | | }, |
| | | { |
| | | path: 'selectAddProcess', |
| | | name: 'selectAddProcess', |
| | | component: () => import('../views/pp/processCard/SelectAddProcess.vue'), |
| | | }, |
| | | { |
| | | path: 'selectPrintFlowCard', |
| | | name: 'selectPrintFlowCard', |
| | | component: () => import('../views/pp/processCard/SelectPrintFlowCard.vue'), |
| | | }, |
| | | { |
| | | path: 'selectProcessCard', |
| | | name: 'selectProcessCard', |
| | | component: () => import('../views/pp/processCard/SelectProcessCard.vue'), |
| | | }, |
| | | { |
| | | path: 'processCardDetails', |
| | | name: 'processCardDetails', |
| | | component: () => import('../views/pp/processCard/ProcessCardDetails.vue'), |
| | | }, |
| | | { |
| | | path: 'splittingDetails', |
| | | name: 'splittingDetails', |
| | | component: () => import('../views/pp/processCard/SplittingDetails.vue'), |
| | | }, |
| | | { |
| | | path: 'printProcess', |
| | | name: 'printProcess', |
| | | component: () => import('../views/pp/processCard/PrintProcess.vue'), |
| | | }, |
| | | { |
| | | path: 'productionScheduling', |
| | | name: 'productionScheduling', |
| | | component: () => import('../views/pp/processCard/ProductionScheduling.vue'), |
| | | }, |
| | | { |
| | | path: '', |
| | | redirect:'/main/processCard/SelectProcessCard' |
| | | } |
| | | ] |
| | | |
| | | }, |
| | | { |
| | | //报工管理 |
| | | path: 'reportingWorks', |
| | | name: 'reportingWorks', |
| | | component: () => import('../views/pp/reportingWorks/ReportingWorks.vue'), |
| | | children:[ |
| | | |
| | | { |
| | | path: 'selectReportingWorks', |
| | | name: 'selectReportingWorks', |
| | | component: () => import('../views/pp/reportingWorks/SelectReportingWorks.vue'), |
| | | }, |
| | | { |
| | | path: 'addReportingWork', |
| | | name: 'addReportingWork', |
| | | component: () => import('../views/pp/reportingWorks/AddReportingWork.vue'), |
| | | }, |
| | | { |
| | | path: 'qualityInspectionReview', |
| | | name: 'qualityInspectionReview', |
| | | component: () => import('../views/pp/reportingWorks/QualityInspectionReview.vue'), |
| | | }, |
| | | { |
| | | path: 'reportingWorkDetail', |
| | | name: 'reportingWorkDetail', |
| | | component: () => import('../views/pp/reportingWorks/ReportingWorkDetail.vue'), |
| | | }, |
| | | { |
| | | path: 'qualityInReviewDetail', |
| | | name: 'qualityInReviewDetail', |
| | | component: () => import('../views/pp/reportingWorks/QualityInReviewDetail.vue'), |
| | | }, |
| | | { |
| | | path: '', |
| | | redirect:'/main/reportingWorks/SelectReportingWorks' |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | //补片管理 |
| | | path: 'replenish', |
| | | name: 'replenish', |
| | | component: () => import('../views/pp/Replenish/Replenish.vue'), |
| | | children:[ |
| | | |
| | | { |
| | | path: 'addReplenish', |
| | | name: 'addReplenish', |
| | | component: () => import('../views/pp/Replenish/AddReplenish.vue'), |
| | | }, |
| | | { |
| | | path: 'printReplenishFlowCard', |
| | | name: 'printReplenishFlowCard', |
| | | component: () => import('../views/pp/Replenish/PrintReplenishFlowCard.vue'), |
| | | }, |
| | | { |
| | | path: 'selectReplenish', |
| | | name: 'selectReplenish', |
| | | component: () => import('../views/pp/Replenish/SelectReplenish.vue'), |
| | | }, |
| | | { |
| | | path: '', |
| | | redirect:'/main/Replenish/SelectReplenish' |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | //返工管理 |
| | | path: 'rework', |
| | | name: 'rework', |
| | | component: () => import('../views/pp/Rework/Rework.vue'), |
| | | children:[ |
| | | |
| | | { |
| | | path: 'addRework', |
| | | name: 'addRework', |
| | | component: () => import('../views/pp/Rework/AddRework.vue'), |
| | | }, |
| | | { |
| | | path: 'selectRework', |
| | | name: 'selectRework', |
| | | component: () => import('../views/pp/Rework/SelectRework.vue'), |
| | | }, |
| | | { |
| | | path: '', |
| | | redirect:'/main/Rework/SelectRework' |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | //BOM管理 |
| | | path: 'BOM', |
| | | name: 'BOM', |
| | | component: () => import('../views/pp/BOM/BOM.vue'), |
| | | children:[ |
| | | { |
| | | path: 'benchmarkBOM', |
| | | name: 'benchmarkBOM', |
| | | component: () => import('../views/pp/BOM/BenchmarkBOM.vue'), |
| | | }, |
| | | { |
| | | path: 'standardBOM', |
| | | name: 'standardBOM', |
| | | component: () => import('../views/pp/BOM/StandardBOM.vue'), |
| | | }, |
| | | { |
| | | path: 'orderBOM', |
| | | name: 'orderBOM', |
| | | component: () => import('../views/pp/BOM/OrderBOM.vue'), |
| | | }, |
| | | { |
| | | path: 'selectBOM', |
| | | name: 'selectBOM', |
| | | component: () => import('../views/pp/BOM/SelectBOM.vue'), |
| | | }, |
| | | { |
| | | path: 'orderBOMDetails', |
| | | name: 'orderBOMDetails', |
| | | component: () => import('../views/pp/BOM/OrderBOMDetails.vue'), |
| | | }, |
| | | { |
| | | path: 'standardBOMDetail', |
| | | name: 'standardBOMDetail', |
| | | component: () => import('../views/pp/BOM/StandardBOMDetail.vue'), |
| | | }, |
| | | { |
| | | path: '', |
| | | redirect:'/main/BOM/SelectBOM' |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | //设备管理 |
| | | path: 'machine', |
| | | name: 'machine', |
| | | component: () => import('../views/pp/machine/Machine.vue'), |
| | | children:[ |
| | | { |
| | | path: 'selectMachine', |
| | | name: 'selectMachine', |
| | | component: () => import('../views/pp/machine/SelectMachine.vue'), |
| | | }, |
| | | { |
| | | path: 'addMachine', |
| | | name: 'addMachine', |
| | | component: () => import('../views/pp/machine/AddMachine.vue'), |
| | | }, |
| | | { |
| | | path: 'maintenanceAndRepair', |
| | | name: 'maintenanceAndRepair', |
| | | component: () => import('../views/pp/machine/MaintenanceAndRepair.vue'), |
| | | }, |
| | | { |
| | | path: 'addMaintenanceAndRepair', |
| | | name: 'addMaintenanceAndRepair', |
| | | component: () => import('../views/pp/machine/AddMaintenanceAndRepair.vue'), |
| | | }, |
| | | { |
| | | path: '', |
| | | redirect:'/main/machine/SelectMachine' |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | //报表管理 |
| | | path: 'report', |
| | | name: 'report', |
| | | component: () => import('../views/pp/report/Report.vue'), |
| | | children:[ |
| | | { |
| | | //设备产量 |
| | | path: 'equipmentOutput', |
| | | name: 'equipmentOutput', |
| | | component: () => import('../views/pp/report/EquipmentOutput.vue'), |
| | | }, |
| | | { |
| | | //订单BOM |
| | | path: 'orderBOMOutside', |
| | | name: 'orderBOMOutside', |
| | | component: () => import('../views/pp/report/OrderBOMOutside.vue'), |
| | | }, |
| | | { |
| | | //订单计划分解 |
| | | path: 'orderPlanDecomposition', |
| | | name: 'orderPlanDecomposition', |
| | | component: () => import('../views/pp/report/OrderPlanDecomposition.vue'), |
| | | }, |
| | | { |
| | | //工序待完成 |
| | | path: 'processToBeCompleted', |
| | | name: 'processToBeCompleted', |
| | | component: () => import('../views/pp/report/ProcessToBeCompleted.vue'), |
| | | }, |
| | | { |
| | | //生产进度 |
| | | path: 'productionSchedule', |
| | | name: 'productionSchedule', |
| | | component: () => import('../views/pp/report/ProductionSchedule.vue'), |
| | | }, |
| | | { |
| | | //流程卡进度 |
| | | path: 'processCardProgress', |
| | | name: 'processCardProgress', |
| | | component: () => import('../views/pp/report/ProcessCardProgress.vue'), |
| | | }, |
| | | { |
| | | //品质报表 |
| | | path: 'qualityReport', |
| | | name: 'qualityReport', |
| | | component: () => import('../views/pp/report/QualityReport.vue'), |
| | | }, |
| | | { |
| | | //原片领料报表 |
| | | path: 'rawMaterialRequisition', |
| | | name: 'rawMaterialRequisition', |
| | | component: () => import('../views/pp/report/RawMaterialRequisition.vue'), |
| | | }, |
| | | { |
| | | //分架明细 |
| | | path: 'splittingDetailsOutside', |
| | | name: 'splittingDetailsOutside', |
| | | component: () => import('../views/pp/report/SplittingDetailsOutside.vue'), |
| | | }, |
| | | { |
| | | //任务完成情况 |
| | | path: 'taskCompletionStatus', |
| | | name: 'taskCompletionStatus', |
| | | component: () => import('../views/pp/report/TaskCompletionStatus.vue'), |
| | | }, |
| | | { |
| | | //班组产量 |
| | | path: 'teamOutput', |
| | | name: 'teamOutput', |
| | | component: () => import('../views/pp/report/TeamOutput.vue'), |
| | | }, |
| | | { |
| | | //在制品报表 |
| | | path: 'workInProgress', |
| | | name: 'workInProgress', |
| | | component: () => import('../views/pp/report/WorkInProgress.vue'), |
| | | }, |
| | | { |
| | | //成品率报表 |
| | | path: 'yield', |
| | | name: 'yield', |
| | | component: () => import('../views/pp/report/Yield.vue'), |
| | | }, |
| | | { |
| | | //次破报表 |
| | | path: 'damageReport', |
| | | name: 'damageReport', |
| | | component: () => import('../views/pp/report/DamageReport.vue'), |
| | | }, |
| | | // { |
| | | // path: '', |
| | | // redirect:'/main/report/ProductionSchedule' |
| | | // } |
| | | ] |
| | | }, |
| | | //mm模块 |
| | | { |
| | | path: 'productStock', |
| | | name: 'productStock', |
| | | component: () => import('../views/mm/mainProductStock/ProductStock.vue'), |
| | | children:[ |
| | | { |
| | | // 成品库存 |
| | | path: 'productStockList', |
| | | name: 'productStockList', |
| | | component: () => import('../views/mm/mainProductStock/ProductStockList.vue'), |
| | | }, |
| | | { |
| | | // 成品入库 |
| | | path: 'createProductStock', |
| | | name: 'createProductStock', |
| | | component:()=> import('../views/mm/mainProductStock/CreateProductStock.vue'), |
| | | }, |
| | | { |
| | | // 成品出库 |
| | | path: 'finishedProductOut', |
| | | name: 'finishedProductOut', |
| | | component:()=>import('../views/mm/mainProductStock/FinishedProductOut.vue') |
| | | }, |
| | | { |
| | | // 成品出库 |
| | | path: 'finishedProductReturn', |
| | | name: 'finishedProductReturn', |
| | | component:()=>import('../views/mm/mainProductStock/FinishedProductReturn.vue') |
| | | }, |
| | | { |
| | | // 订单调拨 |
| | | path: 'orderAllocation', |
| | | name: 'orderAllocation', |
| | | component:()=>import('../views/mm/mainProductStock/OrderAllocation.vue'), |
| | | }, |
| | | { |
| | | // 成品领出 |
| | | path: 'finishedGoodsIssue', |
| | | name: 'finishedGoodsIssue', |
| | | component:()=>import('../views/mm/mainProductStock/FinishedGoodsIssue.vue'), |
| | | }, |
| | | { |
| | | // 成品返工 |
| | | path: 'finishedProductRework', |
| | | name: 'finishedProductRework', |
| | | component:()=>import('../views/mm/mainProductStock/FinishedProductRework.vue'), |
| | | }, |
| | | { |
| | | // 调拨记录 |
| | | path: 'transferRecord', |
| | | name: 'transferRecord', |
| | | component:()=>import('../views/mm/mainProductStock/TransferRecord.vue'), |
| | | }, |
| | | { |
| | | // 领出记录 |
| | | path: 'takeOutRecord', |
| | | name: 'takeOutRecord', |
| | | component:()=>import('../views/mm/mainProductStock/TakeOutRecord.vue'), |
| | | }, |
| | | { |
| | | // 返工记录 |
| | | path: 'reworkRecord', |
| | | name: 'reworkRecord', |
| | | component:()=>import('../views/mm/mainProductStock/ReworkRecord.vue'), |
| | | }, |
| | | |
| | | { |
| | | path: '', |
| | | redirect:'/main/productStock/ProductStockList' |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | // 物料资料 |
| | | path:'ingredients', |
| | | name:'ingredients', |
| | | component: () => import('../views/mm/mainIngredient/Ingredients.vue'), |
| | | children:[ |
| | | { |
| | | path: 'selectIngredients', |
| | | name: 'selectIngredients', |
| | | component:()=>import('../views/mm/mainIngredient/SelectIngredients.vue') |
| | | }, |
| | | { |
| | | path: 'createIngredients', |
| | | name: 'createIngredients', |
| | | component:()=>import('../views/mm/mainIngredient/CreateIngredients.vue') |
| | | }, |
| | | { |
| | | path: '', |
| | | redirect:'/main/ingredients/SelectIngredients' |
| | | } |
| | | ] |
| | | }, |
| | | |
| | | |
| | | ] |
| | | }, |
| | | /*----------- 卧式缓存 ----------------*/ |
| | | { |
| | | path: 'Caching', |
| | | name: 'Caching', |
| | | component: () => import('../views/Caching/caching.vue'), |
| | | children:[ |
| | | { |
| | | path: '/Caching/caching', |
| | | name: 'caching', |
| | | component: () => import('../views/Caching/caching.vue') |
| | | }, |
| | | ] |
| | | }, |
| | | /*----------- 磨边(冷加工) ----------------*/ |
| | | { |
| | | path: 'StockBasicData', |
| | | name: 'StockBasicData', |
| | | component: () => import('../views/StockBasicData/stockBasicData.vue'), |
| | | children:[ |
| | | { |
| | | path: '/StockBasicData/stockBasicData', |
| | | name: 'stockBasicData', |
| | | component: () => import('../views/StockBasicData/stockBasicData.vue') |
| | | }, |
| | | ] |
| | | }, |
| | | /*----------- 大理片笼 ----------------*/ |
| | | { |
| | | path: 'Slicecage', |
| | | name: 'Slicecage', |
| | | component: () => import('../views/Slicecage/slicecage.vue'), |
| | | children:[ |
| | | { |
| | | path: '/Slicecage/slicecage', |
| | | name: 'slicecage', |
| | | component: () => import('../views/Slicecage/slicecage.vue') |
| | | }, |
| | | ] |
| | | }, |
| | | /*----------- 钢化 ----------------*/ |
| | | { |
| | | path: 'PurchaseReturn', |
| | | name: 'purchase', |
| | | component: () => import('../views/PurchaseReturn/purchase.vue'), |
| | | children:[ |
| | | { |
| | | path: '/PurchaseReturn/purchaseReturn', |
| | | name: 'purchaseReturn', |
| | | component: () => import('../views/PurchaseReturn/purchaseReturn.vue') |
| | | }, |
| | | { |
| | | path: '/PurchaseReturn/purchaseStorage', |
| | | name: 'purchaseStorage', |
| | | component: () => import('../views/PurchaseReturn/purchaseStorage.vue') |
| | | }, |
| | | ] |
| | | }, |
| | | /*----------- 下片台 ----------------*/ |
| | | { |
| | | path: 'UnLoadGlass', |
| | | name: 'UnLoadGlass', |
| | |
| | | path: '/UnLoadGlass/loadmachinerack', |
| | | name: 'loadmachinerack', |
| | | component: () => import('../views/UnLoadGlass/loadmachinerack.vue') |
| | | }, |
| | | { |
| | | path: '/UnLoadGlass/loadmachineracktwo', |
| | | name: 'loadmachineracktwo', |
| | | component: () => import('../views/UnLoadGlass/loadmachineracktwo.vue') |
| | | }, |
| | | { |
| | | path: '/UnLoadGlass/Landingindication', |
| | |
| | | ] |
| | | }, |
| | | { |
| | | /*----------- 采购订单 ----------------*/ |
| | | path: 'purchaseOrder', |
| | | name: 'purchaseOrder', |
| | | component: () => import('../views/mm/purchaseOrder/PurchaseOrder.vue'), |
| | | children: [ |
| | | { |
| | | path: 'SelectPurchaseOrder', |
| | | name: 'SelectPurchaseOrder', |
| | | component: () => import('../views/mm/purchaseOrder/Select.vue'), |
| | | }, { |
| | | path: 'CreatePurchaseOrder', |
| | | name: 'CreatePurchaseOrder', |
| | | component: () => import('../views/mm/purchaseOrder/Create.vue') |
| | | }, |
| | | /*----------- 新增 ----------------*/ |
| | | { |
| | | path: 'PaymentPurchaseOrder', |
| | | name: 'PaymentPurchaseOrder', |
| | | component: () => import('../views/mm/purchaseOrder/Payment.vue') |
| | | }, |
| | | /*----------- 退货 ----------------*/ |
| | | { |
| | | path: 'ReturnPurchaseOrder', |
| | | name: 'ReturnPurchaseOrder', |
| | | component: () => import('../views/mm/purchaseOrder/Return.vue') |
| | | }, |
| | | /*----------- 入库 ----------------*/ |
| | | { |
| | | path: 'StoragePurchaseOrder', |
| | | name: 'StoragePurchaseOrder', |
| | | component: () => import('../views/mm/purchaseOrder/Storage.vue') |
| | | }, |
| | | { |
| | | path: '', |
| | | redirect: '/main/purchaseOrder/SelectPurchaseOrder' |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | /*----------- 掰片/识别 ----------------*/ |
| | | path: 'identify', |
| | | name: 'identify', |
| | | component: () => import('../views/mm/identify/Identify.vue'), |
| | | children: [ |
| | | { |
| | | path: 'SelectIdentify', |
| | | name: 'SelectIdentify', |
| | | component: () => import('../views/mm/identify/Select.vue'), |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | /*----------- 卧式缓存----------------*/ |
| | | path: 'caching', |
| | | name: 'caching', |
| | | component: () => import('../views/mm/caching/Caching.vue'), |
| | | children: [ |
| | | { |
| | | path: 'SelectCaching', |
| | | name: 'SelectCaching', |
| | | component: () => import('../views/mm/caching/caching.vue'), |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | /*----------- 大理片笼----------------*/ |
| | | path: 'slicecage', |
| | | name: 'slicecage', |
| | | component: () => import('../views/mm/slicecage/Slicecage.vue'), |
| | | children: [ |
| | | { |
| | | path: 'SelectSlicecage', |
| | | name: 'SelectSlicecage', |
| | | component: () => import('../views/mm/slicecage/slicecage.vue'), |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | // 供应商管理!!! |
| | | path:'trader', |
| | | name:'trader', |
| | | component: () => import('../views/mm/mainTrader/Trader.vue'), |
| | | children:[ |
| | | { |
| | | path: 'selectTrader', |
| | | name: 'selectTrader', |
| | | component:()=>import('../views/mm/mainTrader/SelectTrader.vue') |
| | | }, |
| | | { |
| | | path: 'createTrader', |
| | | name: 'createTrader', |
| | | component:()=>import('../views/mm/mainTrader/CreateTrader.vue') |
| | | }, |
| | | { |
| | | path: '', |
| | | redirect:'/main/trader/SelectTrader' |
| | | } |
| | | ] |
| | | }, |
| | | /*------------- sunshiqiang Add --*/ |
| | | { |
| | | /*----------- 仓储报表 ----------------*/ |
| | | path: 'stockReport', |
| | | name: 'stockReport', |
| | | component: () => import('../views/mm/stockReport/stockReport.vue'), |
| | | children:[ |
| | | { |
| | | path: 'WarehouseReport', |
| | | name: 'WarehouseReport', |
| | | component: () => import('../views/mm/stockReport/WarehouseReport.vue'), |
| | | }, { |
| | | path: 'StockMonthReport', |
| | | name: 'StockMonthReport', |
| | | component: () => import('../views/mm/stockReport/StockMonthReport.vue'), |
| | | }, { |
| | | path: 'SubsidiaryMonthReport', |
| | | name: 'SubsidiaryMonthReport', |
| | | component: () => import('../views/mm/stockReport/SubsidiaryMonthReport.vue'), |
| | | }, |
| | | /*----------- 新增 ----------------*/ |
| | | { |
| | | path: 'StockWarehouseReport', |
| | | name: 'StockWarehouseReport', |
| | | component: () => import('../views/mm/stockReport/StockWarehouseReport.vue'), |
| | | }, { |
| | | path: '', |
| | | redirect: '/main/stockReport/WarehouseReport' |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | /*----------- ----------------*/ |
| | | path: 'stockBasicData', |
| | | name: 'stockBasicData', |
| | | component: () => import('../views/mm/stockBasicData/StockBasicData.vue'), |
| | | children: [ |
| | | { |
| | | path: 'SelectStockBasicData', |
| | | name: 'SelectStockBasicData', |
| | | component: () => import('../views/mm/stockBasicData/Select.vue'), |
| | | }, |
| | | ] |
| | | }, |
| | | { |
| | | /*----------- 采购入库 ----------------*/ |
| | | path: 'purchaseStorage', |
| | | name: 'purchaseStorage', |
| | | component: () => import('../views/mm/purchaseStorage/PurchaseStorage.vue'), |
| | | children: [ |
| | | { |
| | | path: 'SelectPurchaseStorage', |
| | | name: 'SelectPurchaseStorage', |
| | | component: () => import('../views/mm/purchaseStorage/Select.vue'), |
| | | }, |
| | | { |
| | | path: '', |
| | | redirect: '/main/purchaseStorage/SelectPurchaseStorage' |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | /*----------- 采购退货 ----------------*/ |
| | | path: 'purchaseReturn', |
| | | name: 'purchaseReturn', |
| | | component: () => import('../views/mm/purchaseReturn/PurchaseReturn.vue'), |
| | | children: [ |
| | | { |
| | | path: 'SelectPurchaseReturn', |
| | | name: 'SelectPurchaseReturn', |
| | | component: () => import('../views/mm/purchaseReturn/Select.vue'), |
| | | }, |
| | | { |
| | | path: '', |
| | | redirect: '/main/purchaseReturn/SelectPurchaseReturn' |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | path: '', |
| | | redirect:'/main/order' |
| | | redirect:'/Slicecage/slicecage' |
| | | } |
| | | ] |
| | | }, |
File was renamed from UI-Project/src/views/mm/caching/caching.vue |
| | |
| | | long: '1005', |
| | | wide: '183.6', |
| | | thick: '1991', |
| | | type: '待识别', |
| | | type: '1200', |
| | | typea: '1', |
| | | }, |
| | | { |
| | |
| | | wide: '183', |
| | | thick: '191', |
| | | typea: '1', |
| | | type: '待识别' |
| | | type: '1200' |
| | | }, |
| | | { |
| | | id: '2', |
| | |
| | | wide: '183', |
| | | thick: '191', |
| | | typea: '1', |
| | | type: '待识别' |
| | | type: '1200' |
| | | }, |
| | | { |
| | | id: '2', |
| | |
| | | wide: '183', |
| | | thick: '191', |
| | | typea: '1', |
| | | type: '待识别' |
| | | type: '1200' |
| | | }, |
| | | { |
| | | id: '2', |
| | |
| | | |
| | | </div> |
| | | <div id="awatch"> |
| | | <img src="../../../assets/woshihuancun.png" alt="" style="width: 70%;height: 100%;margin-left: 160px;"> |
| | | <img src="../../assets/woshihuancun.png" alt="" style="width: 60%;height: 90%;margin-left: 260px;margin-top: 20px;"> |
| | | |
| | | </div> |
| | | </template> |
| | |
| | | margin-left: 28%; |
| | | } |
| | | #awatch{ |
| | | height: 450px; |
| | | height: 460px; |
| | | /* margin-top: -60px; */ |
| | | } |
| | | </style> |
New file |
| | |
| | | <template> |
| | | <el-card style="margin-left: 10px; margin-top: 10px; margin-right: 10px;" v-loading="loading"> |
| | | <div style="display: flex;"> |
| | | <div style="margin-left: 400px; font-size: 20px;">工程号:P20240305001 </div> |
| | | <div style="margin-left: 150px; font-size: 20px;">版图编号:1</div> |
| | | </div> |
| | | <svg width="100%" height="690" xmlns="http://www.w3.org/2000/svg" style="margin-top: -40px;"> |
| | | <defs> |
| | | <marker id="arrow" markerUnits="strokeWidth" markerWidth="12" markerHeight="12" viewBox="0 0 12 12" refX="6" |
| | | refY="6" orient="auto"> |
| | | <path d="M2,2 L10,6 L2,10 L2,2" style="fill: #911005;" /> |
| | | </marker> |
| | | </defs> |
| | | <g v-for="(rack, index) in racks" :key="index"> |
| | | <rect |
| | | :x="rack.x" |
| | | :y="rack.y" |
| | | :width="rack.width" |
| | | :height="rack.height" |
| | | :fill="rack.fillColor" |
| | | :data-index="index" |
| | | class="rack-rect" |
| | | style="stroke:#c8c9cc;stroke-width:3;" |
| | | @click="showRectInfo(rack)" |
| | | /> |
| | | <line x1='510' y1='309' x2='260' y2='310' stroke='#911005' stroke-width='2' marker-end='url(#arrow)'> |
| | | </line> |
| | | <line x1='850' y1='309' x2='1100' y2='310' stroke='#911005' stroke-width='2' marker-end='url(#arrow)'> |
| | | </line> |
| | | <line x1='510' y1='409' x2='260' y2='410' stroke='#911005' stroke-width='2' marker-end='url(#arrow)'> |
| | | </line> |
| | | <line x1='1200' y1='650' x2='1200' y2='470' stroke='#911005' stroke-width='2' marker-end='url(#arrow)'> |
| | | </line> |
| | | <text x="370" y="240" dominant-baseline="middle" text-anchor="middle">NG2024030501A-01</text> |
| | | <text x="370" y="260" dominant-baseline="middle" text-anchor="middle">500*300</text> |
| | | |
| | | <text x="970" y="240" dominant-baseline="middle" text-anchor="middle">NG2024030501A-02</text> |
| | | <text x="970" y="260" dominant-baseline="middle" text-anchor="middle">500*300</text> |
| | | |
| | | <text x="600" y="500" dominant-baseline="middle" text-anchor="middle">NG2024030501A-03</text> |
| | | <text x="600" y="520" dominant-baseline="middle" text-anchor="middle">800*450</text> |
| | | |
| | | |
| | | <text x="1280" y="520" dominant-baseline="middle" text-anchor="middle">NG2024030501A-04</text> |
| | | <text x="1280" y="540" dominant-baseline="middle" text-anchor="middle">400*300</text> |
| | | <g v-for="(item, itemIndex) in rack.items" :key="itemIndex"> |
| | | <rect |
| | | :x="calculateItemXPosition(rack, item, itemIndex)" |
| | | :y="calculateItemYPosition(rack, item, itemIndex)" |
| | | :width="item.width" |
| | | :height="item.height" |
| | | :fill="item.fillColor" |
| | | /> |
| | | </g> |
| | | </g> |
| | | </svg> |
| | | </el-card> |
| | | </template> |
| | | |
| | | <script> |
| | | import Swal from 'sweetalert2' |
| | | export default { |
| | | data() { |
| | | return { |
| | | loading: false, |
| | | racks: [ |
| | | { |
| | | x: 70, y: 126, width: 600, height: 240, fillColor: '#93d2f3', |
| | | items: [ |
| | | { position: 'top-left', width: 40, height: 30, fillColor: '#ffffff', content: 'NG123456',y: '20'}, |
| | | { position: 'bottom-left', width: 40, height: 30, fillColor: '#ffffff', content: 'NG1234567' }, |
| | | { position: 'bottom-right', width: 40, height: 30, fillColor: '#ffffff', content: 'NG12345678' } |
| | | ] |
| | | }, |
| | | { |
| | | x: 685, y: 126, width: 600, height: 240, fillColor: '#93d2f3', |
| | | items: [ |
| | | { position: 'bottom-left', width: 40, height: 30, fillColor: '#ffffff', content: 'NG123456' }, |
| | | { position: 'bottom-right', width: 40, height: 30, fillColor: '#ffffff', content: 'NG123456' }, |
| | | { position: 'top-right', width: 40, height: 30, fillColor: '#ffffff', content: 'NG1234567' } |
| | | ] |
| | | }, |
| | | { |
| | | x: 70, y: 380, width: 1100, height: 260, fillColor: '#81b337', |
| | | items: [ |
| | | { position: 'top-left', width: 40, height: 30, fillColor: '#ffffff', content: 'NG123456' }, |
| | | { position: 'bottom-right', width: 40, height: 30, fillColor: '#ffffff', content: 'NG123456' }, |
| | | { position: 'top-right', width: 40, height: 30, fillColor: '#ffffff', content: 'NG1234567' } |
| | | ] |
| | | }, |
| | | { |
| | | x: 1185, y: 380, width: 200, height: 300,fillColor: '#81b337', |
| | | items: [ |
| | | { position: 'bottom-right', width: 40, height: 30, fillColor: '#ffffff', content: 'NG123456' }, |
| | | { position: 'top-right',width: 40, height: 30, fillColor: '#ffffff', content: 'NG123456' }, |
| | | { position: 'top-left', width: 40, height: 30, fillColor: '#ffffff', content: 'NG1234567' }, |
| | | ] |
| | | } |
| | | |
| | | // Add more racks and items here as needed |
| | | ], |
| | | }; |
| | | }, |
| | | |
| | | methods: { |
| | | calculateItemXPosition(rack, item, index) { |
| | | if (item.position === 'top-right' || item.position === 'bottom-right') { |
| | | return Math.min(rack.x + rack.width - item.width, rack.x + rack.width); |
| | | } else { |
| | | return rack.x; |
| | | } |
| | | }, |
| | | |
| | | calculateItemYPosition(rack, item, index) { |
| | | if (item.position === 'bottom-left' || item.position === 'bottom-right') { |
| | | return Math.min(rack.y + rack.height - item.height, rack.y + rack.height); |
| | | } else { |
| | | return rack.y; |
| | | } |
| | | }, |
| | | |
| | | showCustomAlert(content) { |
| | | Swal.fire({ |
| | | // type: 'warning', // 弹框类型 |
| | | title: '该片玻璃状态', //标题 |
| | | // text: "注销后将无法恢复,请谨慎操作!", //显示内容 |
| | | |
| | | confirmButtonColor: '#3085d6',// 确定按钮的 颜色 |
| | | confirmButtonText: '人工拿走',// 确定按钮的 文字 |
| | | showCancelButton: true, // 是否显示取消按钮 |
| | | cancelButtonColor: '#d33', // 取消按钮的 颜色 |
| | | cancelButtonText: "破损", // 取消按钮的 文字 |
| | | |
| | | // focusCancel: true, // 是否聚焦 取消按钮 |
| | | reverseButtons: true // 是否 反转 两个按钮的位置 默认是 左边 确定 右边 取消 |
| | | }).then((isConfirm) => { |
| | | try { |
| | | //判断 是否 点击的 确定按钮 |
| | | if (isConfirm.value) { |
| | | Swal.fire("人工拿走", "点击了人工拿走", "success"); |
| | | } |
| | | else { |
| | | Swal.fire("破损", "点击了破损", "error"); |
| | | } |
| | | } catch (e) { |
| | | alert(e); |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | showRectInfo(rectInfo) { |
| | | const contents = rectInfo.items.map(item => item.content).join(', '); |
| | | this.$nextTick(() => { |
| | | this.showCustomAlert(contents); |
| | | }); |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .glass-rack { |
| | | width: 100%; |
| | | height: 80vh; |
| | | } |
| | | .rack-rect:hover { |
| | | cursor: pointer; |
| | | } |
| | | .custom-popover-class { |
| | | background-color: lightgrey; |
| | | color: black; |
| | | border: 1px solid black; |
| | | } |
| | | </style> |
New file |
| | |
| | | <script setup> |
| | | import {ArrowLeftBold, ArrowRight, Search} from "@element-plus/icons-vue" |
| | | import {useRouter} from "vue-router"; |
| | | let indexFlag=$ref(1) |
| | | function changeRouter(index){ |
| | | indexFlag=index |
| | | } |
| | | |
| | | </script> |
| | | |
| | | <template> |
| | | <!-- <div id="main-div"> --> |
| | | |
| | | |
| | | <div id="main-body"> |
| | | <router-view /> |
| | | </div> |
| | | <!-- </div> --> |
| | | </template> |
| | | |
| | | <style scoped> |
| | | #main-div{ |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | #div-title{ |
| | | height: 2%; |
| | | width: 100%; |
| | | } |
| | | #searchButton{ |
| | | margin-top: -5px; |
| | | margin-left: 1rem; |
| | | } |
| | | /* #searchButton1{ |
| | | //margin-left: 10rem; |
| | | } */ |
| | | /*main-body样式*/ |
| | | #main-body{ |
| | | width: 100%; |
| | | height: 95%; |
| | | /* margin-top: 1%; */ |
| | | } |
| | | #select{ |
| | | margin-left:0.5rem; |
| | | } |
| | | :deep(.indexTag .el-breadcrumb__inner){ |
| | | color: #5CADFE !important; |
| | | } |
| | | </style> |
New file |
| | |
| | | <script setup> |
| | | import {Search} from "@element-plus/icons-vue"; |
| | | import {reactive} from "vue"; |
| | | import {useRouter} from "vue-router" |
| | | |
| | | import { ref } from 'vue' |
| | | |
| | | const dialogFormVisible = ref(true) |
| | | const dialogFormVisiblea = ref(false) |
| | | |
| | | const getTableRow = (row,type) =>{ |
| | | switch (type) { |
| | | case 'edit' :{ |
| | | //alert('我接收到子组件传送的编辑信息') |
| | | router.push({path: '/main/returns/createReturns', query: { ReturnID: 'TH24010101' }}) |
| | | break |
| | | } |
| | | case 'delete':{ |
| | | alert('我接收到子组件传送的删除信息') |
| | | break |
| | | } |
| | | } |
| | | } |
| | | |
| | | const gridOptions = reactive({ |
| | | border: "full",//表格加边框 |
| | | keepSource: true,//保持源数据 |
| | | align: 'center',//文字居中 |
| | | stripe:true,//斑马纹 |
| | | rowConfig: {isCurrent: true, isHover: true,height: 50},//鼠标移动或选择高亮 |
| | | id: 'OrderList', |
| | | showFooter: true,//显示脚 |
| | | printConfig: {}, |
| | | importConfig: {}, |
| | | exportConfig: {}, |
| | | scrollY:{ enabled: true },//开启虚拟滚动 |
| | | showOverflow:true, |
| | | columnConfig: { |
| | | resizable: true, |
| | | useKey: true |
| | | }, |
| | | filterConfig: { //筛选配置项 |
| | | remote: true |
| | | }, |
| | | customConfig: { |
| | | storage: true |
| | | }, |
| | | editConfig: { |
| | | trigger: 'click', |
| | | mode: 'row', |
| | | showStatus: true |
| | | }, |
| | | data: [ |
| | | { |
| | | } |
| | | ], |
| | | }) |
| | | </script> |
| | | |
| | | <template> |
| | | <div style="margin-top: 10px;"> |
| | | <div> |
| | | <el-card style="margin-left: 10px;margin-top: 10px;margin-right: 10px;" v-loading="loading"> |
| | | <div style="display: flex;margin-top: 20px;"> |
| | | <div style="margin-left: 400px;font-size: 20px;">工程号:P20240305001 </div> |
| | | <div style="margin-left: 150px;font-size: 20px;">版图编号:1</div> |
| | | </div> |
| | | <div> |
| | | <div id="boxa" style="width: 700px;height: 220px;margin-left: 260px;"> |
| | | <div style="margin-top: 85px;"> NG202405060798A01-1</div> |
| | | <div> 500×1500</div> |
| | | </div> |
| | | </div> |
| | | </el-card> |
| | | </div> |
| | | </div> |
| | | |
| | | </template> |
| | | |
| | | <style scoped> |
| | | #boxa{ |
| | | border: 1px solid rgb(119, 116, 116); |
| | | background-color: #529b2e; |
| | | text-align: center; |
| | | display: inline-block; |
| | | margin-left: 20px; |
| | | margin-top: 70px; |
| | | margin-bottom: 50px; |
| | | } |
| | | </style> |
File was renamed from UI-Project/src/views/sd/returns/SelectReturns.vue |
| | |
| | | <el-table-column prop="thick" align="center" label="厚" min-width="120" /> |
| | | <el-table-column fixed="right" label="操作" align="center" width="200"> |
| | | <template #default> |
| | | <el-button size="mini" type="text" plain @click="open">人工拿走</el-button> |
| | | <el-button size="mini" type="text" plain @click="open">人工拿111走</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
File was renamed from UI-Project/src/views/sd/returns/Returns.vue |
| | |
| | | <el-table-column prop="wide" label="原片长" align="center"/> |
| | | <el-table-column prop="thick" label="膜系" align="center"/> |
| | | <el-table-column prop="thick" label="数量" align="center"/> |
| | | <el-table-column prop="wide" label="厚度" align="center"/> |
| | | <el-table-column |
| | | align="center" |
| | | label="状态" |
| | |
| | | </div> |
| | | </el-card> |
| | | <div id="parent"> |
| | | <img src="../../../assets/shangpianji .png" alt="" style="max-width: 20%;max-height: 20%;margin-top: 20px;margin-left: 130px;"> |
| | | <img src="../../assets/shangpianji .png" alt="" style="max-width: 20%;max-height: 20%;margin-top: 20px;margin-left: 130px;"> |
| | | <el-button style="margin-top: -830px;margin-left: -40px;" size="mini" id="searchButton" @click="add = true">添加原片</el-button> |
| | | <el-button style="margin-top: -10px;margin-left: -80px;" size="mini" id="searchButton" @click="adda = true">添加原片</el-button> |
| | | <div id="overlay" v-show="state"></div> |
| | | <div id="overlaya" v-show="statea"></div> |
| | | <!-- <div id="overlay" v-show="state"></div> --> |
| | | <!-- <div id="overlaya" v-show="statea"></div> --> |
| | | </div> |
| | | </div> |
| | | |
| | |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | <el-dialog v-model="add" top="23vh" width="40%" title="添加原片" > |
| | | <el-dialog v-model="add" top="23vh" width="45%" title="添加原片" > |
| | | <div style="margin-left: -50px;margin-top: 10px;margin-bottom: 10px;"> |
| | | <el-form size="mini" label-width="150px"> |
| | | <el-form > |
| | | <el-form label-width="70px" label-position="right"> |
| | | <el-row style="margin-top: -15px;margin-bottom: -2px;"> |
| | | <el-col :span="6"> |
| | | <div id="dt" style="font-size: 15px;"> |
| | | <div> |
| | | <el-form-item label="宽:" :required="true" style="width: 14vw"> |
| | | <el-form-item label="长:" :required="true" style="width: 14vw"> |
| | | <el-input autocomplete="off" /> |
| | | </el-form-item></div></div> |
| | | </el-col> |
| | | <el-col :span="9"> |
| | | <div id="dta" style="font-size: 15px;"> |
| | | <div> |
| | | <el-form-item label="长:" :required="true" style="width: 14vw"> |
| | | <el-form-item label="宽:" :required="true" style="width: 14vw"> |
| | | <el-input autocomplete="off" /> |
| | | </el-form-item></div> |
| | | </div> |
| | |
| | | <el-col :span="9"> |
| | | <div id="dta" style="font-size: 15px;"> |
| | | <div> |
| | | <el-form-item label="数量:" :required="true" style="width: 14vw"> |
| | | <el-form-item label="厚度:" :required="true" style="width: 14vw"> |
| | | <el-input autocomplete="off" /> |
| | | </el-form-item></div></div> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row style="margin-top: 10px;"> |
| | | <el-col :span="6"> |
| | | <div id="dt" style="font-size: 15px;"> |
| | | <div> |
| | | <el-form-item label="数量:" :required="true" style="width: 14vw;"> |
| | | <el-input autocomplete="off" /> |
| | | </el-form-item></div></div> |
| | | </el-col> |
| | |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | <el-dialog v-model="adda" top="23vh" width="40%" title="添加原片" > |
| | | <el-dialog v-model="adda" top="23vh" width="45%" title="添加原片" > |
| | | <div style="margin-left: -50px;margin-top: 10px;margin-bottom: 10px;"> |
| | | <el-form size="mini" label-width="150px"> |
| | | <el-form > |
| | | <el-form size="mini" > |
| | | <el-form label-width="70px" label-position="right"> |
| | | <el-row style="margin-top: -15px;margin-bottom: -2px;"> |
| | | <el-col :span="6"> |
| | | <div id="dt" style="font-size: 15px;"> |
| | | <div> |
| | | <el-form-item label="宽:" :required="true" style="width: 14vw"> |
| | | <el-input autocomplete="off" /> |
| | | <el-form-item label="长:" :required="true" style="width: 14vw"> |
| | | <el-input autocomplete="off" style="width: 180px" /> |
| | | </el-form-item></div></div> |
| | | </el-col> |
| | | <el-col :span="9"> |
| | | <div id="dta" style="font-size: 15px;"> |
| | | <div> |
| | | <el-form-item label="长:" :required="true" style="width: 14vw"> |
| | | <el-input autocomplete="off" /> |
| | | <el-form-item label="宽:" :required="true" style="width: 14vw"> |
| | | <el-input autocomplete="off" style="width: 180px" /> |
| | | </el-form-item></div> |
| | | </div> |
| | | </el-col> |
| | |
| | | <div id="dt" style="font-size: 15px;"> |
| | | <div> |
| | | <el-form-item label="膜系:" :required="true" style="width: 14vw;"> |
| | | <el-input autocomplete="off" /> |
| | | <el-input autocomplete="off" style="width: 180px" /> |
| | | </el-form-item></div></div> |
| | | </el-col> |
| | | <el-col :span="9"> |
| | | <div id="dta" style="font-size: 15px;"> |
| | | <div> |
| | | <el-form-item label="数量:" :required="true" style="width: 14vw"> |
| | | <el-input autocomplete="off" /> |
| | | <el-form-item label="厚度:" :required="true" style="width: 14vw"> |
| | | <el-input autocomplete="off" style="width: 180px" /> |
| | | </el-form-item></div></div> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row style="margin-top: 10px;"> |
| | | <el-col :span="6"> |
| | | <div id="dt" style="font-size: 15px;"> |
| | | <div> |
| | | <el-form-item label="数量:" :required="true" style="width: 14vw;"> |
| | | <el-input autocomplete="off" style="width: 180px" /> |
| | | </el-form-item></div></div> |
| | | </el-col> |
| | | </el-row> |
File was renamed from UI-Project/src/views/mm/slicecage/slicecage.vue |
| | |
| | | |
| | | <template> |
| | | <div style="height: 700px;"> |
| | | <el-button style="margin-top: 5px;margin-left: 10px;" id="searchButton" type="primary" @click="dialogFormVisible = true">手动进片</el-button> |
| | | <!-- <el-button style="margin-top: 5px;margin-left: 10px;" id="searchButton" type="primary" @click="dialogFormVisible = true">手动进片</el-button> --> |
| | | <el-button style="margin-top: 5px;margin-left: 10px;" id="searchButton" type="primary" @click="dialogFormVisiblea = true">订单信息</el-button> |
| | | <el-button style="margin-top: 5px;margin-left: 10px;" id="searchButton" type="success" @click="dialogFormVisibleb = true">出片队列</el-button> |
| | | <el-button style="margin-top: 5px;margin-left: 10px;" id="searchButton" type="danger">终止进片</el-button> |
| | |
| | | <el-table-column prop="id" align="center" label="出片玻璃ID" min-width="80" /> |
| | | <el-table-column prop="long" align="center" label="笼子" min-width="120" /> |
| | | <el-table-column prop="wide" align="center" label="格子" min-width="120" /> |
| | | <el-table-column prop="type" align="center" label="订单编号" min-width="120" /> |
| | | <el-table-column prop="type" align="center" label="列表编号" min-width="120" /> |
| | | <el-table-column prop="type" align="center" label="箱子编号" min-width="120" /> |
| | | <el-table-column prop="type" align="center" label="工程号" min-width="120" /> |
| | | <el-table-column prop="type" align="center" label="流程卡号" min-width="120" /> |
| | | <el-table-column prop="type" align="center" label="钢化版图号" min-width="120" /> |
| | | <el-table-column prop="type" align="center" label="尺寸" min-width="120" /> |
| | | <el-table-column prop="type" align="center" label="结束任务" min-width="120" /> |
| | | </el-table> |
| | |
| | | <el-table-column prop="idb" align="center" label="进片玻璃ID" min-width="80" /> |
| | | <el-table-column prop="longb" align="center" label="笼子" min-width="120" /> |
| | | <el-table-column prop="wideb" align="center" label="格子" min-width="120" /> |
| | | <el-table-column prop="typeb" align="center" label="订单编号" min-width="120" /> |
| | | <el-table-column prop="typeb" align="center" label="列表编号" min-width="120" /> |
| | | <el-table-column prop="typeb" align="center" label="箱子编号" min-width="120" /> |
| | | <el-table-column prop="typeb" align="center" label="工程号" min-width="120" /> |
| | | <el-table-column prop="typeb" align="center" label="流程卡号" min-width="120" /> |
| | | <el-table-column prop="typeb" align="center" label="钢化版图号" min-width="120" /> |
| | | <el-table-column prop="typeb" align="center" label="尺寸" min-width="120" /> |
| | | <el-table-column prop="typeb" align="center" label="结束任务" min-width="120" /> |
| | | </el-table> |
| | |
| | | </div> |
| | | </div> |
| | | <div id="awatch"> |
| | | <img src="../../../assets/xmjc.png" alt="" style="width: 70%;height: 100%;margin-left: 160px;"> |
| | | <img src="../../assets/xmjc.png" alt="" style="width: 70%;height: 100%;margin-left: 160px;"> |
| | | </div> |
| | | </div> |
| | | <el-dialog v-model="dialogFormVisible" top="12vh" width="85%" title="请确认玻璃信息" > |
| | |
| | | </template> |
| | | </el-dialog> |
| | | <el-dialog v-model="dialogFormVisiblea" top="10vh" width="85%" title="订单信息" > |
| | | <el-input placeholder="请输入订单id" style="width: 180px;size: mini;"></el-input> |
| | | <el-input placeholder="请输入工程号" style="width: 180px;size: mini;"></el-input> |
| | | <el-button style="margin-left: 10px;size: mini;" type="primary">查询</el-button> |
| | | <el-table ref="table" style="margin-top: 20px;height: 500px;" |
| | | @selection-change="handleSelectionChange" |
| | | :data="tableDataa" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"> |
| | | <el-table-column prop="ida" align="center" label="玻璃id" min-width="80" /> |
| | | <el-table-column prop="typea" align="center" label="订单编号" min-width="120" /> |
| | | <el-table-column prop="typea" align="center" label="列表编号" min-width="120" /> |
| | | <el-table-column prop="typea" align="center" label="箱子编号" min-width="120" /> |
| | | <el-table-column prop="ida" align="center" label="铝框id" min-width="120" /> |
| | | <el-table-column prop="typea" align="center" label="工程号" min-width="120" /> |
| | | <el-table-column prop="typea" align="center" label="长" min-width="120" /> |
| | | <el-table-column prop="typea" align="center" label="宽" min-width="120" /> |
| | | <el-table-column prop="typea" align="center" label="厚" min-width="120" /> |
| | | </el-table> |
| | | <div id="demo-pagination-block"> |
| | | <el-pagination |
| | |
| | | /> |
| | | </div> |
| | | </el-dialog> |
| | | <el-dialog v-model="dialogFormVisibleb" top="10vh" width="85%" title="订单信息" > |
| | | <el-dialog v-model="dialogFormVisibleb" top="10vh" width="85%" title="出片队列" > |
| | | <div style="display: flex;"> |
| | | <p style="margin-top: 4px;">队列状态:</p> |
| | | <p style="margin-top: 4px;">开始</p> |
New file |
| | |
| | | <script setup> |
| | | import {Search} from "@element-plus/icons-vue"; |
| | | import {reactive} from "vue"; |
| | | import {useRouter} from "vue-router" |
| | | const router = useRouter() |
| | | |
| | | import { ref } from 'vue' |
| | | import { ElMessage, ElMessageBox } from 'element-plus' |
| | | |
| | | const tableData = [ |
| | | { |
| | | id: '1', |
| | | long: '1005', |
| | | wide: '183.6', |
| | | thick: '1991', |
| | | type: '待识别', |
| | | typea: '1', |
| | | }, |
| | | { |
| | | id: '2', |
| | | long: '105', |
| | | wide: '183', |
| | | thick: '191', |
| | | typea: '1', |
| | | type: '待识别' |
| | | }, |
| | | { |
| | | id: '2', |
| | | long: '105', |
| | | wide: '183', |
| | | thick: '191', |
| | | typea: '1', |
| | | type: '待识别' |
| | | }, |
| | | ] |
| | | const open = () => { |
| | | ElMessageBox.confirm( |
| | | '是否删除该条信息?', |
| | | '提示', |
| | | { |
| | | confirmButtonText: '是', |
| | | cancelButtonText: '取消', |
| | | type: 'warning', |
| | | } |
| | | ) |
| | | .then(() => { |
| | | ElMessage({ |
| | | type: 'success', |
| | | message: '删除成功!', |
| | | }) |
| | | }) |
| | | .catch(() => { |
| | | ElMessage({ |
| | | type: 'info', |
| | | message: '删除失败', |
| | | }) |
| | | }) |
| | | } |
| | | const getTableRow = (row,type) =>{ |
| | | switch (type) { |
| | | case 'edit' :{ |
| | | //alert('我接收到子组件传送的编辑信息') |
| | | router.push({path: '/main/returns/createReturns', query: { ReturnID: 'TH24010101' }}) |
| | | break |
| | | } |
| | | case 'delete':{ |
| | | alert('我接收到子组件传送的删除信息') |
| | | break |
| | | } |
| | | } |
| | | } |
| | | |
| | | const gridOptions = reactive({ |
| | | border: "full",//表格加边框 |
| | | keepSource: true,//保持源数据 |
| | | align: 'center',//文字居中 |
| | | stripe:true,//斑马纹 |
| | | rowConfig: {isCurrent: true, isHover: true,height: 50},//鼠标移动或选择高亮 |
| | | id: 'OrderList', |
| | | showFooter: true,//显示脚 |
| | | printConfig: {}, |
| | | importConfig: {}, |
| | | exportConfig: {}, |
| | | scrollY:{ enabled: true },//开启虚拟滚动 |
| | | showOverflow:true, |
| | | columnConfig: { |
| | | resizable: true, |
| | | useKey: true |
| | | }, |
| | | filterConfig: { //筛选配置项 |
| | | remote: true |
| | | }, |
| | | customConfig: { |
| | | storage: true |
| | | }, |
| | | editConfig: { |
| | | trigger: 'click', |
| | | mode: 'row', |
| | | showStatus: true |
| | | }, |
| | | data: [ |
| | | { |
| | | 'id': '1', |
| | | 'long': '5', |
| | | 'wide': '1005', |
| | | 'thick': '183.6', |
| | | } |
| | | ], |
| | | }) |
| | | |
| | | </script> |
| | | |
| | | <template> |
| | | <div> |
| | | <el-card style="flex: 1;margin-left: 10px;margin-top: 5px;" v-loading="loading"> |
| | | <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;max-height: 200px;"> |
| | | <el-table height="100%" ref="table" |
| | | @selection-change="handleSelectionChange" |
| | | :data="tableData" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"> |
| | | <el-table-column prop="id" align="center" label="id" min-width="80" /> |
| | | <el-table-column prop="long" align="center" label="长" min-width="120" /> |
| | | <el-table-column prop="wide" align="center" label="宽" min-width="120" /> |
| | | <el-table-column prop="wide" align="center" label="厚度" min-width="120" /> |
| | | <el-table-column prop="wide" align="center" label="膜系" min-width="120" /> |
| | | <el-table-column prop="wide" align="center" label="出片顺序" min-width="120" /> |
| | | <el-table-column prop="wide" align="center" label="流程卡号" min-width="120" /> |
| | | <el-table-column prop="wide" align="center" label="其他" min-width="120" /> |
| | | <el-table-column fixed="right" label="操作" align="center" width="200"> |
| | | <template #default> |
| | | <el-button size="mini" type="text" plain @click="dialogFormVisiblea = true">破损</el-button> |
| | | <el-button size="mini" type="text" plain @click="dialogFormVisiblea = true">删除</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | </el-card> |
| | | |
| | | </div> |
| | | </template> |
| | | |
| | | <style scoped> |
| | | |
| | | #dt { display:block; float:left;line-height: 20px;margin-left: 100px;} |
| | | #dta { display:block; float:left;line-height: 20px;margin-left: 80%;} |
| | | #dialog-footer{ |
| | | text-align: center; |
| | | margin-top: -15px; |
| | | } |
| | | #message{ |
| | | text-align: center; |
| | | align-items: center; |
| | | color: black; |
| | | width: 200px; |
| | | height: 100px; |
| | | background-color: #337ecc; |
| | | margin-left: 28%; |
| | | } |
| | | #awatch{ |
| | | height: 450px; |
| | | } |
| | | #main-body{ |
| | | margin-top: -20px; |
| | | margin-left: 300px; |
| | | } |
| | | #main-bodya{ |
| | | margin-top: -10px; |
| | | margin-left: 100px; |
| | | } |
| | | </style> |
| | |
| | | import deepClone from "@/utils/deepClone"; |
| | | import { ElMessage } from "element-plus"; |
| | | import { useRouter } from "vue-router"; |
| | | import GlassType from '@/components/basic/product/GlassType.vue' |
| | | |
| | | |
| | | const router = useRouter() |
| | |
| | | export default { |
| | | mounted() { |
| | | //获取数据 |
| | | request.get("/Temper/Tindex").then((res) => { |
| | | var data="ProcessId="+"P24032508"; |
| | | request.get("/TidyUpGlassModule/SelectTerritoryInfo?"+data).then((res) => { |
| | | if (res.code == 200) { |
| | | var StoveCount=0; |
| | | var temperid; |
| | |
| | | |
| | | <template> |
| | | <div ref="content"> |
| | | |
| | | <canvas ref="mycanvas"></canvas> |
| | | </div> |
| | | <canvas ref="mycanvas" > |
| | | |
| | | </canvas> |
| | | </template> |
| | | |
| | | <style scoped> |
| | |
| | | <template> |
| | | <div class="glass-rack"> |
| | | <div > |
| | | <svg width="300" height="500" xmlns="http://www.w3.org/2000/svg"> |
| | | <svg width="500" height="500" xmlns="http://www.w3.org/2000/svg"> |
| | | <g stroke="null" id="Layer_1"> |
| | | <!-- 使用 v-for 循环渲染数据 --> |
| | | <g v-for="(rack, index) in racks" :key="index"> |
| | |
| | | :width="rack.width" |
| | | :height="rack.height" |
| | | :fill="rack.fillColor" |
| | | |
| | | :data-index="index" |
| | | class="rack-rect" |
| | | @click="showRectInfo(rack)" |
| | | /> |
| | | <rect |
| | | :x="calculateItemXPosition(rack, rack.item, index)" |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | let socket; |
| | | import Swal from 'sweetalert2' |
| | | export default { |
| | | data() { |
| | | return { |
| | | racks: [ |
| | | { x: 50, y: 100, height: 100, width: 60, fillColor: '#6a6da9', item: { height: 90, width: 10, fillColor: 'yellow', content: 'NG123456' } }, |
| | | { x: 50, y: 270, height: 100, width: 60, fillColor: '#6a6da9', item: { height: 20, width: 10, fillColor: 'yellow', content: 'NG1234567' } }, |
| | | { x: 190, y: 100, height: 100, width: 60, fillColor: '#6a6da9', item: { height: 30, width: 20, fillColor: 'yellow', content: 'NG12345678' } }, |
| | | { x: 190, y: 270, height: 100, width: 60, fillColor: '#6a6da9', item: { height: 35, width: 23, fillColor: 'yellow', content: 'NG123456910' } }, |
| | | { x: 95, y: 420, height: 60, width: 110, fillColor: '#6a6da9', item: { height: 30, width: 100, fillColor: 'yellow', content: 'NG1234561454' } } |
| | | { x: 280, y: 100, height: 100, width: 60, fillColor: '#6a6da9', item: { height: 30, width: 20, fillColor: 'yellow', content: 'NG12345678' } }, |
| | | { x: 280, y: 270, height: 100, width: 60, fillColor: '#6a6da9', item: { height: 35, width: 23, fillColor: 'yellow', content: 'NG123456910' } }, |
| | | { x: 140, y: 420, height: 60, width: 110, fillColor: '#6a6da9', item: { height: 30, width: 100, fillColor: 'yellow', content: 'NG1234561454' } } |
| | | ] |
| | | }; |
| | | }, |
| | | activated() { |
| | | this.initWebSocket(); |
| | | }, |
| | | methods: { |
| | | // 计算内部物品的 x 坐标位置 |
| | |
| | | return rack.y + rack.height - item.height; // 返回底部对齐的 y 坐标 |
| | | } |
| | | }, |
| | | initWebSocket() { |
| | | let viewname = "Landingindication"; |
| | | showCustomAlert(content) { |
| | | var str="架号 : 111\n" + |
| | | "长 : 111\n" + |
| | | "宽 : 111\n" + |
| | | "厚 : 111\n"+ |
| | | "玻璃ID : 111\n"+ |
| | | "膜系 : 111\n"; |
| | | |
| | | if (typeof WebSocket === "undefined") { |
| | | console.log("您的浏览器不支持WebSocket"); |
| | | } else { |
| | | let socketUrl = "ws://" + "localhost:8081" + "/mesModuleTools/api/talk/" + viewname; |
| | | |
| | | if (socket != null) { |
| | | socket.close(); |
| | | socket = null; |
| | | } |
| | | |
| | | // 开启一个websocket服务 |
| | | socket = new WebSocket(socketUrl); |
| | | |
| | | // 打开事件 |
| | | socket.onopen = function () { |
| | | console.log("websocket已打开"); |
| | | }; |
| | | |
| | | // 收到消息 |
| | | socket.onmessage = (msg) => { |
| | | if (!msg.data) { |
| | | return; // 如果收到空数据,则直接返回,不执行后续逻辑 |
| | | } |
| | | |
| | | |
| | | let obj = JSON.parse(msg.data); |
| | | |
| | | console.log(obj); |
| | | |
| | | |
| | | |
| | | // 关闭事件 |
| | | socket.onclose = function () { |
| | | console.log("websocket已关闭"); |
| | | }; |
| | | |
| | | // 发生错误事件 |
| | | socket.onerror = function () { |
| | | console.log("websocket发生了错误"); |
| | | }; |
| | | |
| | | this.$router.afterEach(function () { |
| | | socket.close(); |
| | | }); |
| | | } |
| | | } |
| | | Swal.fire({ |
| | | title: '玻璃信息', |
| | | html: '<pre>' + str + '</pre>', |
| | | customClass: { |
| | | popup: 'format-pre' |
| | | } |
| | | }); |
| | | |
| | | |
| | | |
| | | }, |
| | | showRectInfo( rectInfo) { |
| | | const content = rectInfo.item.content; |
| | | this.$nextTick(() => { |
| | | this.showCustomAlert(content); |
| | | }); |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | <style scoped> |
| | | .glass-rack { |
| | | margin-left: 20px; |
| | | width: 300px; |
| | | width: 500px; |
| | | margin-top: 10px; |
| | | /* background-color: antiquewhite; */ |
| | | } |
| | | .rack-rect:hover { |
| | | cursor: pointer; |
| | | } |
| | | .custom-popover-class { |
| | | background-color: lightgrey; |
| | | color: black; |
| | | border: 1px solid black; |
| | | } |
| | | .format-pre pre { |
| | | background: #49483e; |
| | | color: #f7f7f7; |
| | | padding: 10px; |
| | | font-size: 14px; |
| | | } |
| | | |
| | | </style> |
| | |
| | | <template> |
| | | <div class="glass-rack"> |
| | | <div> |
| | | <svg width="300" height="500" xmlns="http://www.w3.org/2000/svg"> |
| | | <svg width="500" height="500" xmlns="http://www.w3.org/2000/svg"> |
| | | <g stroke="null" id="Layer_1"> |
| | | <!-- 使用 v-for 循环渲染数据 --> |
| | | <g v-for="(rack, index) in racks" :key="index"> |
| | |
| | | :width="rack.width" |
| | | :height="rack.height" |
| | | :fill="rack.fillColor" |
| | | :data-index="index" |
| | | class="rack-rect" |
| | | @click="showRectInfo(rack)" |
| | | /> |
| | | <rect |
| | | :x="calculateItemXPosition(rack, rack.item, index)" |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import Swal from 'sweetalert2' |
| | | export default { |
| | | data() { |
| | | return { |
| | | racks: [ |
| | | { x: 50, y: 100, height: 100, width: 60, fillColor: '#6a6da9', item: { height: 90, width: 10, fillColor: 'yellow', content: 'NG123456' } }, |
| | | { x: 50, y: 270, height: 100, width: 60, fillColor: '#6a6da9', item: { height: 20, width: 10, fillColor: 'yellow', content: 'NG1234567' } }, |
| | | { x: 190, y: 100, height: 100, width: 60, fillColor: '#6a6da9', item: { height: 30, width: 20, fillColor: 'yellow', content: 'NG12345678' } }, |
| | | { x: 190, y: 270, height: 100, width: 60, fillColor: '#6a6da9', item: { height: 35, width: 23, fillColor: 'yellow', content: 'NG123456910' } }, |
| | | { x: 95, y: 420, height: 60, width: 110, fillColor: '#6a6da9', item: { height: 30, width: 100, fillColor: 'yellow', content: 'NG1234561454' } } |
| | | { x: 280, y: 100, height: 100, width: 60, fillColor: '#6a6da9', item: { height: 30, width: 20, fillColor: 'yellow', content: 'NG12345678' } }, |
| | | { x: 280, y: 270, height: 100, width: 60, fillColor: '#6a6da9', item: { height: 35, width: 23, fillColor: 'yellow', content: 'NG123456910' } }, |
| | | { x: 140, y: 420, height: 60, width: 110, fillColor: '#6a6da9', item: { height: 30, width: 100, fillColor: 'yellow', content: 'NG1234561454' } } |
| | | ] |
| | | }; |
| | | }, |
| | |
| | | } else { |
| | | return rack.y + rack.height - item.height; |
| | | } |
| | | } |
| | | }, |
| | | showCustomAlert(content) { |
| | | var str="架号 : 111\n" + |
| | | "长 : 111\n" + |
| | | "宽 : 111\n" + |
| | | "厚 : 111\n"+ |
| | | "玻璃ID : 111\n"+ |
| | | "膜系 : 111\n"; |
| | | |
| | | Swal.fire({ |
| | | title: '玻璃信息', |
| | | html: '<pre>' + str + '</pre>', |
| | | customClass: { |
| | | popup: 'format-pre' |
| | | } |
| | | }); |
| | | |
| | | }, |
| | | showRectInfo( rectInfo) { |
| | | const content = rectInfo.item.content; |
| | | this.$nextTick(() => { |
| | | this.showCustomAlert(content); |
| | | }); |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | <style scoped> |
| | | .glass-rack { |
| | | margin-left: 20px; |
| | | width: 300px; |
| | | width: 500px; |
| | | } |
| | | .rack-rect:hover { |
| | | cursor: pointer; |
| | | } |
| | | .custom-popover-class { |
| | | background-color: lightgrey; |
| | | color: black; |
| | | border: 1px solid black; |
| | | } |
| | | .format-pre pre { |
| | | background: #49483e; |
| | | color: #f7f7f7; |
| | | padding: 10px; |
| | | font-size: 14px; |
| | | } |
| | | |
| | | </style> |
| | |
| | | import {useRouter} from "vue-router" |
| | | const router = useRouter() |
| | | |
| | | const dialogFormVisiblea = ref(false) |
| | | import { ref } from 'vue' |
| | | import { ElMessage, ElMessageBox } from 'element-plus' |
| | | import Landingindication from "./Landingindication.vue"; |
| | | import Landingindicationtwo from "./Landingindicationtwo.vue"; |
| | | // import Landingindicationtwo from "./Landingindicationtwo.vue"; |
| | | |
| | | const tableData = [ |
| | | { |
| | |
| | | long: '1005', |
| | | wide: '183.6', |
| | | thick: '1991', |
| | | type: '待识别', |
| | | typea: '1', |
| | | state: '未启用', |
| | | }, |
| | | { |
| | | id: '2', |
| | | long: '105', |
| | | wide: '183', |
| | | thick: '191', |
| | | typea: '1', |
| | | type: '待识别' |
| | | state: '未启用' |
| | | }, |
| | | { |
| | | id: '2', |
| | | long: '105', |
| | | wide: '183', |
| | | thick: '191', |
| | | typea: '1', |
| | | type: '待识别' |
| | | state: '未启用' |
| | | }, |
| | | ] |
| | | const open = () => { |
| | |
| | | <el-table-column prop="id" align="center" label="下片位" min-width="80" /> |
| | | <el-table-column prop="long" align="center" label="架号" min-width="120" /> |
| | | <el-table-column prop="wide" align="center" label="流程卡号" min-width="120" /> |
| | | <el-table-column prop="type" align="center" label="状态" min-width="120" /> |
| | | <el-table-column prop="type" align="center" label="设备号" min-width="120" /> |
| | | <el-table-column prop="type" align="center" label="启用状态" min-width="120" /> |
| | | <el-table-column prop="wide" align="center" label="总数量" min-width="120" /> |
| | | <el-table-column prop="wide" align="center" label="已落架数量" min-width="120" /> |
| | | <el-table-column prop="state" align="center" label="启用状态" min-width="120" /> |
| | | <el-table-column fixed="right" label="操作" align="center" width="200"> |
| | | <template #default> |
| | | <el-button size="mini" type="text" plain @click="dialogFormVisiblea = true">绑定架子</el-button> |
| | | <el-button size="mini" type="text" plain @click="dialogFormVisiblea = true">清空</el-button> |
| | | <el-button size="mini" type="text" plain v-show="state !== '已启用' " @click="dialogFormVisiblea = true">绑定架子</el-button> |
| | | <el-button size="mini" type="text" plain @click="dialogFormVisible = true">清空</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | <div id="main-body"> |
| | | <Landingindication></Landingindication> |
| | | </div> |
| | | <div id="main-bodya"> |
| | | <!-- <div id="main-bodya"> |
| | | <Landingindicationtwo></Landingindicationtwo> |
| | | </div></div> |
| | | </div> --> |
| | | </div> |
| | | <el-dialog v-model="dialogFormVisiblea" top="21vh" width="30%" title="绑定架子" > |
| | | <div style="margin-left: 50px;margin-top: 10px;margin-bottom: 10px;"> |
| | | <el-form size="mini" label-width="150px"> |
| | | <el-form label-width="100px" label-position="right"> |
| | | <el-form-item label="架号:" :required="true" style="width: 18vw"> |
| | | <el-input autocomplete="off"/> |
| | | </el-form-item> |
| | | <el-form-item label="流程卡号:" :required="true" style="width: 18vw;"> |
| | | <el-input autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-form> |
| | | </el-form> |
| | | </div> |
| | | <template #footer> |
| | | <div id="dialog-footer"> |
| | | <el-button type="primary" @click="dialogFormVisiblea = false"> |
| | | 确认 |
| | | </el-button> |
| | | <el-button @click="dialogFormVisiblea = false">取消</el-button> |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | </template> |
| | | |
| | | <style scoped> |
| | |
| | | } |
| | | #main-body{ |
| | | margin-top: -20px; |
| | | margin-left: 300px; |
| | | } |
| | | #main-bodya{ |
| | | margin-top: -10px; |
| | | margin-left: 100px; |
| | | margin-left: 450px; |
| | | } |
| | | </style> |
New file |
| | |
| | | <script setup> |
| | | import {Search} from "@element-plus/icons-vue"; |
| | | import {reactive} from "vue"; |
| | | import {useRouter} from "vue-router" |
| | | const router = useRouter() |
| | | |
| | | const dialogFormVisiblea = ref(false) |
| | | import { ref } from 'vue' |
| | | import { ElMessage, ElMessageBox } from 'element-plus' |
| | | // import Landingindication from "./Landingindication.vue"; |
| | | import Landingindicationtwo from "./Landingindicationtwo.vue"; |
| | | |
| | | const tableData = [ |
| | | { |
| | | id: '1', |
| | | long: '1005', |
| | | wide: '183.6', |
| | | thick: '1991', |
| | | state: '未启用', |
| | | }, |
| | | { |
| | | id: '2', |
| | | long: '105', |
| | | wide: '183', |
| | | thick: '191', |
| | | state: '未启用' |
| | | }, |
| | | { |
| | | id: '2', |
| | | long: '105', |
| | | wide: '183', |
| | | thick: '191', |
| | | state: '未启用' |
| | | }, |
| | | ] |
| | | const open = () => { |
| | | ElMessageBox.confirm( |
| | | '是否删除该条信息?', |
| | | '提示', |
| | | { |
| | | confirmButtonText: '是', |
| | | cancelButtonText: '取消', |
| | | type: 'warning', |
| | | } |
| | | ) |
| | | .then(() => { |
| | | ElMessage({ |
| | | type: 'success', |
| | | message: '删除成功!', |
| | | }) |
| | | }) |
| | | .catch(() => { |
| | | ElMessage({ |
| | | type: 'info', |
| | | message: '删除失败', |
| | | }) |
| | | }) |
| | | } |
| | | const getTableRow = (row,type) =>{ |
| | | switch (type) { |
| | | case 'edit' :{ |
| | | //alert('我接收到子组件传送的编辑信息') |
| | | router.push({path: '/main/returns/createReturns', query: { ReturnID: 'TH24010101' }}) |
| | | break |
| | | } |
| | | case 'delete':{ |
| | | alert('我接收到子组件传送的删除信息') |
| | | break |
| | | } |
| | | } |
| | | } |
| | | |
| | | const gridOptions = reactive({ |
| | | border: "full",//表格加边框 |
| | | keepSource: true,//保持源数据 |
| | | align: 'center',//文字居中 |
| | | stripe:true,//斑马纹 |
| | | rowConfig: {isCurrent: true, isHover: true,height: 50},//鼠标移动或选择高亮 |
| | | id: 'OrderList', |
| | | showFooter: true,//显示脚 |
| | | printConfig: {}, |
| | | importConfig: {}, |
| | | exportConfig: {}, |
| | | scrollY:{ enabled: true },//开启虚拟滚动 |
| | | showOverflow:true, |
| | | columnConfig: { |
| | | resizable: true, |
| | | useKey: true |
| | | }, |
| | | filterConfig: { //筛选配置项 |
| | | remote: true |
| | | }, |
| | | customConfig: { |
| | | storage: true |
| | | }, |
| | | editConfig: { |
| | | trigger: 'click', |
| | | mode: 'row', |
| | | showStatus: true |
| | | }, |
| | | data: [ |
| | | { |
| | | 'id': '1', |
| | | 'long': '5', |
| | | 'wide': '1005', |
| | | 'thick': '183.6', |
| | | } |
| | | ], |
| | | }) |
| | | |
| | | </script> |
| | | |
| | | <template> |
| | | <div> |
| | | <el-card style="flex: 1;margin-left: 10px;margin-top: 5px;" v-loading="loading"> |
| | | <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;max-height: 200px;"> |
| | | <el-table height="100%" ref="table" |
| | | @selection-change="handleSelectionChange" |
| | | :data="tableData" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"> |
| | | <el-table-column prop="id" align="center" label="下片位" min-width="80" /> |
| | | <el-table-column prop="long" align="center" label="架号" min-width="120" /> |
| | | <el-table-column prop="wide" align="center" label="流程卡号" min-width="120" /> |
| | | <el-table-column prop="wide" align="center" label="总数量" min-width="120" /> |
| | | <el-table-column prop="wide" align="center" label="已落架数量" min-width="120" /> |
| | | <el-table-column prop="state" align="center" label="启用状态" min-width="120" /> |
| | | <el-table-column fixed="right" label="操作" align="center" width="200"> |
| | | <template #default> |
| | | <el-button size="mini" type="text" plain v-show="state !== '已启用' " @click="dialogFormVisiblea = true">绑定架子</el-button> |
| | | <el-button size="mini" type="text" plain @click="dialogFormVisible = true">清空</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | </el-card> |
| | | |
| | | </div> |
| | | <div style="display: flex;"> |
| | | <!-- <div id="main-body"> |
| | | <Landingindication></Landingindication> |
| | | </div> --> |
| | | <div id="main-body"> |
| | | <Landingindicationtwo></Landingindicationtwo> |
| | | </div> |
| | | </div> |
| | | <el-dialog v-model="dialogFormVisiblea" top="21vh" width="30%" title="绑定架子" > |
| | | <div style="margin-left: 50px;margin-top: 10px;margin-bottom: 10px;"> |
| | | <el-form size="mini" label-width="150px"> |
| | | <el-form label-width="100px" label-position="right"> |
| | | <el-form-item label="架号:" :required="true" style="width: 18vw"> |
| | | <el-input autocomplete="off"/> |
| | | </el-form-item> |
| | | <el-form-item label="流程卡号:" :required="true" style="width: 18vw;"> |
| | | <el-input autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-form> |
| | | </el-form> |
| | | </div> |
| | | <template #footer> |
| | | <div id="dialog-footer"> |
| | | <el-button type="primary" @click="dialogFormVisiblea = false"> |
| | | 确认 |
| | | </el-button> |
| | | <el-button @click="dialogFormVisiblea = false">取消</el-button> |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | </template> |
| | | |
| | | <style scoped> |
| | | |
| | | #dt { display:block; float:left;line-height: 20px;margin-left: 100px;} |
| | | #dta { display:block; float:left;line-height: 20px;margin-left: 80%;} |
| | | #dialog-footer{ |
| | | text-align: center; |
| | | margin-top: -15px; |
| | | } |
| | | #message{ |
| | | text-align: center; |
| | | align-items: center; |
| | | color: black; |
| | | width: 200px; |
| | | height: 100px; |
| | | background-color: #337ecc; |
| | | margin-left: 28%; |
| | | } |
| | | #awatch{ |
| | | height: 450px; |
| | | } |
| | | #main-body{ |
| | | margin-top: -10px; |
| | | margin-left: 450px; |
| | | } |
| | | </style> |