<%@page import="builder.Manager"%>
|
<%@page import="ng.db.*"%>
|
<%@ page language="java" import="java.sql.*" contentType="text/html; charset=UTF-8"
|
pageEncoding="UTF-8"%>
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
<html>
|
<head>
|
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
<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>
|
<%
|
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">
|
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>
|