hou 17 часов назад
Родитель
Сommit
6a924dd00d

BIN
image/background.png


+ 9 - 1
src/com/mes/ui/LoginFarme.java

@@ -23,7 +23,7 @@ public class LoginFarme extends JFrame {
         String titleGw = MesClient.isDualStation()
                 ? MesClient.mes_gw1 + " / " + MesClient.mes_gw2
                 : MesClient.mes_gw;
-        setTitle("MES系统客户端115:" + titleGw + " - " + MesClient.mes_gw_des);
+        setTitle("MES系统客户端BE14:" + titleGw + " - " + MesClient.mes_gw_des);
 
         ImageIcon bg = new ImageIcon(MesClient.class.getResource("/background.png"));
         setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
@@ -32,6 +32,14 @@ public class LoginFarme extends JFrame {
         imgLabel.setBounds(0,0,bg.getIconWidth(), bg.getIconHeight());//设置背景标签的位置
         Container contentPane=getContentPane();
         contentPane.setLayout(null);//布局,很重要
+        if (MesClient.login_title != null && !MesClient.login_title.isEmpty()) {
+            JLabel titleLabel = new JLabel(MesClient.login_title, SwingConstants.CENTER);
+            titleLabel.setFont(new Font("微软雅黑", Font.BOLD, 28));
+            titleLabel.setForeground(Color.WHITE);
+            titleLabel.setOpaque(false);
+            titleLabel.setBounds(0, 18, 902, 50);
+            contentPane.add(titleLabel);
+        }
         JPanel welcomePanel = new JPanel();
         //welcomePanel.setLayout(new GridLayout(3, 1));
         welcomePanel.setLayout(null);

+ 8 - 1
src/com/mes/ui/MesClient.java

@@ -47,6 +47,7 @@ public class MesClient extends JFrame {
     public static String mes_server_ip = ""; // 服务器IP地址
     public static int mes_heart_icon_cycle = 1;
     public static String mes_line_sn = ""; // 产线编号
+    public static String login_title = "MES管理系统"; // 登录页顶部标题,来自配置文件
     public static int mes_device_heartbeat_minutes = 5; // 设备状态上报间隔(分钟)
     /** 免扫码、自动允许启动、不采数不提交的工位集合(来自 mes.auto_allow_stations) */
     public static Set<String> autoAllowStations = new HashSet<>();
@@ -215,6 +216,12 @@ public class MesClient extends JFrame {
         mes_plc_ip = pro.getProperty("mes.plc_ip", "192.168.1.1");
         mes_server_ip = pro.getProperty("mes.server_ip");
         mes_line_sn = pro.getProperty("mes.line_sn");
+        String loginTitleFromCfg = pro.getProperty("mes.login.title");
+        if (loginTitleFromCfg == null) {
+            login_title = "MES管理系统";
+        } else {
+            login_title = loginTitleFromCfg.trim();
+        }
         mes_gw_des = OprnoUtil.getGwDes(mes_line_sn,mes_gw);
         try {
             mes_device_heartbeat_minutes = Integer.parseInt(pro.getProperty("mes.device.heartbeat.minutes", "5").trim());
@@ -849,7 +856,7 @@ public class MesClient extends JFrame {
 
     public MesClient() {
         setIconImage(Toolkit.getDefaultToolkit().getImage(MesClient.class.getResource("/bg/logo.png")));
-        setTitle("MES系统115客户端:" + mes_gw1 + (isDualStation() ? " / " + mes_gw2 : "")
+        setTitle("MES系统BE14客户端:" + mes_gw1 + (isDualStation() ? " / " + mes_gw2 : "")
                 + " - " + mes_gw_des);
 //        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         setBounds(0, 0, 1024, 768);

+ 1 - 1
src/com/mes/ui/OprnoUtil.java

@@ -55,7 +55,7 @@ public class OprnoUtil {
     public static String getGwDes(String lineSn,String oprno){
         String des = "";
         oprno = formatOprno(oprno);
-        if(lineSn.equals("HEVXT")){
+        if(lineSn.equals("BE14XT")){
             int i = 0;
             for (String gw:xtoprnos){
                 if(gw.equals(oprno)){

+ 8 - 6
src/resources/config/config.properties

@@ -1,10 +1,12 @@
-mes.gw=OP070A
-mes.gw1=OP070A
-mes.gw2=OP080A
+mes.gw=OP140A
+mes.gw1=OP140A
+mes.gw2=OP150A
 mes.plc_ip=192.168.1.1
-#mes.server_ip=127.0.0.1
-mes.server_ip=192.168.9.180
-mes.line_sn=115XT
+mes.server_ip=127.0.0.1
+#mes.server_ip=192.168.9.180
+mes.line_sn=BE14XT
+# 登录页顶部标题(显示在背景图上方,不写在图片里)
+mes.login.title=安徽裕洋MES管理系统
 # 设备状态定时上报间隔(分钟)
 mes.device.heartbeat.minutes=5
 # 免扫码自动允许启动工位(逗号分隔)。这些工位不扫码、不采数、不提交结果,直接写允许启动