Explorar o código

登录页优化

hou hai 2 días
pai
achega
de1165a337

BIN=BIN
image/background.png


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

@@ -24,7 +24,7 @@ public class LoginFarme extends JFrame {
     static JButton scanLoginButton = new JButton("扫  码  登  录");
 
     public LoginFarme(){
-        setTitle("MES系统客户端115:"+MesClient.mes_gw+" - "+MesClient.mes_gw_des);
+        setTitle("MES系统客户端BE14:"+MesClient.mes_gw+" - "+MesClient.mes_gw_des);
 
         ImageIcon bg = new ImageIcon(MesClient.class.getResource("/background.png"));
         setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
@@ -33,6 +33,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

@@ -36,6 +36,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; // 设备状态上报间隔(分钟)
     public static String csyq =  "";
 
@@ -133,6 +134,12 @@ public class MesClient extends JFrame {
         mes_gw =  pro.getProperty("mes.gw");
         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();
+        }
         csyq = pro.getProperty("mes.csyq");
         mes_gw_des = OprnoUtil.getGwDes(mes_line_sn,mes_gw);
         try {
@@ -374,7 +381,7 @@ public class MesClient extends JFrame {
 
     public MesClient() {
         setIconImage(Toolkit.getDefaultToolkit().getImage(MesClient.class.getResource("/bg/logo.png")));
-        setTitle("MES系统客户端115:"+mes_gw + "- " + mes_gw_des);
+        setTitle("MES系统客户端BE14:"+mes_gw + "- " + mes_gw_des);
 //        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         setBounds(0, 0, 1024, 768);
 

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

@@ -19,7 +19,7 @@ public class OprnoUtil {
     };
     public static String[] xtoprnodes = new String[]{
             "凸焊","左边梁防爆阀拉铆","CMT框架一序焊接",
-            "人工补焊", "框架CMT二序焊接", "人工补焊", "焊道检查", "总成正面CNC",
+            "气密", "框架CMT二序焊接", "人工补焊", "焊道检查", "总成正面CNC",
             "总成反面CNC", "框架去毛刺+清洁", "封堵片焊接+打磨", "白件气密检测", "焊道补焊",
             "框架反面涂胶", "总成气密检测", "正面溢胶清理,补胶", "液冷板激光点固", "液冷板水嘴处焊接",
             "焊道打磨", "液冷板FSW", "匙孔补焊打磨", "总成反面拉铆", "总成正面拉铆1",

+ 4 - 2
src/resources/config/config.properties

@@ -1,7 +1,9 @@
 mes.gw=OP110A
-#mes.server_ip=127.0.0.1
-mes.server_ip=192.168.9.180
+mes.server_ip=127.0.0.1
+#mes.server_ip=192.168.9.180
 mes.line_sn=BE14XT
+# 登录页顶部标题(显示在背景图上方,不写在图片里)
+mes.login.title=安徽裕洋MES管理系统
 mes.csyq=comso
 # 当前客户端初始版本号;升级成功后会在程序目录生成 client-version.properties 记录实际版本。
 mes.client.version=100