From a532b5a35113b2ba9eb89ad0f26cecd0966db2e7 Mon Sep 17 00:00:00 2001
From: 廖井涛 <2265517004@qq.com>
Date: 星期一, 25 十二月 2023 09:27:40 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/Haier_MES

---
 gmms/WebContent/login/machinelistcontent.jsp |  131 ++++++++++++++++++++++++-------------------
 1 files changed, 72 insertions(+), 59 deletions(-)

diff --git a/gmms/WebContent/login/machinelistcontent.jsp b/gmms/WebContent/login/machinelistcontent.jsp
index 53d72c6..19a8940 100644
--- a/gmms/WebContent/login/machinelistcontent.jsp
+++ b/gmms/WebContent/login/machinelistcontent.jsp
@@ -6,70 +6,83 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<script src="../static/js/ng/tb-2.0.js"></script>
+<script src="../js/main.js"></script>
+<style type="text/css">
+<style>
+  .el-table .warning-row {
+    background: oldlace;
+  }
 
+  .el-table .success-row {
+    background: oldlace;
+  }
+</style>
+
+</style>
 <title>Insert title here</title>
 </head>
 <body>
- <div id="tab" style="display:width:100%">
-    </div>
+<% 
+String a=null;
+try{
+	a=Manager.getDevice().toString();
+}
+catch(Exception e){
+	a="[{}]";
+}
+
+
+%>
+ <div id="app" style="width:100%">
+ 	<el-table border
+      :data="machine"
+      height='100%'
+      style="width: 100%;"
+       :cell-class-name="tableRowClassName"
+      >
+      <el-table-column
+        prop="name"
+        label="璁惧">
+      </el-table-column>
+      <el-table-column
+        prop="ip"
+        label="IP">
+      </el-table-column>
+      <el-table-column
+        prop="port"
+        label="port">
+      </el-table-column>
+      <el-table-column
+        prop="st"
+        label="鐘舵��">
+      </el-table-column>
+      <el-table-column
+        prop="count"
+        label="璋冪敤娆℃暟">
+      </el-table-column>
+ 	</el-table>
+</div>
     <script type="text/javascript">
-    var a=
-    <%
-   // Manager.appStart(null);
-       out.print(  Manager.getDevice().toString());
-    
-    %>;
-    
-    
-    
-    		var opt={
-    			 table:{
-    				 trStyles:["background-color:none","background-color:lightblue"],
-    				 style:"width:100%",
-    				 border:1,
-    				 notify:function(message){
-    					 if(message.data.st!="宸茶繛鎺�"){
-    						 
-    						 message.tr.children[3].style["color"]="red";
-    					 }
-    				 }
-    			 },	
-    			 columns:[
-    			     {
-    			    	 name:"璁惧鍚�",
-    			     	 binding:"name"
-    			    	
-    			     },
-    			     
-    			     {
-    			    	 name:"IP",
-    			     	 binding:"ip"
-    			    	
-    			     },
-    			     {
-    			    	 name:"port",
-    			    	 binding:"port",
-    			     }
-    			     
-    			     ,
-    			     {
-    			    	 name:"鐘舵��",
-    			     	 binding:"st"
-    			     }
-    			     ,
-    			     {
-    			    	name:"璋冪敤娆℃暟",
-    			    	binding:"count"
-    			     }
-    			     
-    			   
-    			  ]
-    		};
-    		
-    	var tab=createTable(document.getElementById("tab"),opt);
-    	tab.update(a);
-    	tab.notify();
+    Vue.prototype.$echarts = echarts
+    let app =new Vue({
+      el: '#app',
+      mixins:[mixin],
+      data:{
+         machine:<%=  a%>,
+      },
+      methods:{
+    	  tableRowClassName({row,column,rowIndex,columnIndex}) {
+    		  
+   	        if (row['st'] == '鏈繛鎺�' && columnIndex==3 ) {
+   	          return 'success-row';
+   	        }else{
+   	          return ''; 
+   	        }
+   	        
+    	  }
+      }
+     })
+   // console.log(app.$data.machine);
     </script>
 </body>
 </html>
\ No newline at end of file

--
Gitblit v1.8.0