<%@ page contentType="text/html;charset=UTF-8"%>
|
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
|
<c:set var="ctx" value="${pageContext.request.contextPath}" />
|
<html>
|
<head>
|
<script type="text/javascript"
|
src="${ctx}/static/jquery/jquery-3.1.0.min.js"></script>
|
<script>
|
var interval = setInterval('refreshStatus()', 20000);
|
//设备页面自动刷新
|
function refreshStatus() {
|
window.location.reload();
|
}
|
function addinfo() {
|
window.open("${ctx}/Config/minche",self);
|
}
|
// 停止页面自动刷新
|
function disableAutoRefresh() {
|
clearInterval(interval);
|
}
|
|
function modifyraw(){
|
disableAutoRefresh()
|
$("#add-fix-info").modal('show');
|
}
|
/*删除 */
|
function delAll(){
|
var checkboxs=document.getElementsByClassName("checkboxs");
|
for(var i=0;i<checkboxs.length;i++){
|
var checkbox=checkboxs[i];
|
if(checkbox.checked){
|
var RowHtml=checkbox.parentNode.parentNode;
|
var machineFontid=RowHtml.getElementsByClassName("machineFontid")[0].value;
|
$.ajax({
|
cache:false,
|
type:"POST",
|
dataType : "json",
|
url:"${ctx}/Config/machinefontdelete",
|
data:{
|
"machineFontid":machineFontid
|
},success:function(data){
|
alert("删除成功")
|
window.location.href="${ctx}/Config/addFont";
|
}
|
});
|
}
|
}
|
}
|
|
/*修改保存 */
|
function Updates(obj){
|
|
var RowHtml=obj.parentNode.parentNode;
|
var machineFontid=RowHtml.getElementsByClassName("machineFontid")[0].value;
|
var Flag=RowHtml.getElementsByClassName("Flag")[0].value;
|
|
$.ajax({
|
cache:false,
|
type:"POST",
|
dataType : "json",
|
url:"${ctx}/Config/machinefontUpdates",
|
data:{
|
"machineFontid":machineFontid,
|
"Flag":Flag
|
},success:function(data){
|
alert("修改成功")
|
window.location.href="${ctx}/Config/addFont";
|
}
|
});
|
|
|
}
|
</script>
|
<title>添加机器</title>
|
<style type="text/css">
|
* {
|
padding: 0px;
|
margin: 0px;
|
font-family: "microsoft yahei", "Helvetica Neue", Helvetica, Arial,
|
sans-serif;
|
}
|
|
#Top {
|
display: block;
|
margin-bottom: 10px;
|
padding: 5px;
|
padding-left: 6px;
|
padding-right: 15px;
|
line-height: 22px;
|
border-radius: 0 2px 2px 0;
|
background-color: #f2f2f2;
|
}
|
|
.btn {
|
height: 35px;
|
line-height: 35px;
|
background-color: #0dc316;
|
padding: 0 15px;
|
color: #fff;
|
border: none;
|
border-radius: 2px;
|
}
|
|
table thead tr {
|
background-color: #f2f2f2;
|
}
|
|
table {
|
width: 100%;
|
border-collapse: collapse;
|
}
|
|
table th {
|
border: 1px solid #f2f2f2;
|
height: 20px;
|
line-height: 20px;
|
padding: 9px 15px 9px 15px;
|
}
|
|
.One td {
|
border: 1px solid #f2f2f2;
|
height: 20px;
|
line-height: 20px;
|
padding: 9px 15px 9px 15px;
|
}
|
|
.two td {
|
border: 1px solid #f2f2f2;
|
height: 20px;
|
line-height: 20px;
|
padding: 9px 15px 9px 15px;
|
}
|
</style>
|
</head>
|
<body>
|
<div class="content-wrapper" style="background-color: white;">
|
<section class="content-header">
|
<div id="Top" style="margin-bottom: 0px;">
|
<button class="btn" style="background-color: #fd5f56;"
|
onclick="delAll()">批量删除</button>
|
<button class="btn" onclick="modifyraw()">添加</button>
|
<span style="float: right; line-height: 40px"></span>
|
</div>
|
|
<div class="modal fade" id="add-fix-info" tabindex="-1" role="dialog"
|
aria-labelledby="myModalLabel" aria-hidden="true">
|
<div class="modal-dialog" style="width: 100%; height: 100%;">
|
<div class="modal-content"
|
style="width: 1000px; margin: auto;">
|
<div class="modal-header">
|
<button type="button" class="close" data-dismiss="modal"
|
aria-hidden="true" data-backdrop="static">×</button>
|
<h3 class="modal-title" id="myModalLabel" style="font-weight: bolder;">添加机器</h3>
|
</div>
|
<!--提交-->
|
<form class="form-horizontal" role="form" id="category_add"
|
action="${ctx}/Config/addfont" method="post">
|
<input type="hidden" id="add-fix" name="Ids">
|
<div style="margin-top: 20px;overflow-x: auto;height: 300px;">
|
<table id="machine" class="One">
|
<thead>
|
<tr>
|
<th>选择</th>
|
<th>机器编号</th>
|
<th>机器类型</th>
|
<th>端口号</th>
|
<th>IP地址</th>
|
</tr>
|
</thead>
|
<tbody>${Machinehtml}</tbody>
|
</table>
|
</div>
|
<div style="margin-top: 20px;">
|
<!-- 机器逻辑配置添加 -->
|
<table class="two">
|
<thead>
|
<tr>
|
<th>标志位</th>
|
<th>字类型</th>
|
|
</tr>
|
</thead>
|
<tbody>
|
<tr>
|
<td><input name="flag" type='text' style="width: 60px;"></td>
|
<td><select name="message" style="text-align-last: center; vertical-align: middle;">
|
<option value="请求字">请求字</option>
|
<option value="发送字">发送字</option>
|
<option value="完成字">完成字</option>
|
<option value="完成确认字">完成确认字</option>
|
</select></td>
|
<td><input type="button" value="确认"></td>
|
</tr>
|
</tbody>
|
|
</table>
|
</div>
|
<div class="modal-footer">
|
<button type="button" class="btn btn-default btn-lg"
|
data-dismiss="modal">关闭</button>
|
<button type="submit" class="btn btn-primary btn-lg"
|
id="addbtnsubmit">提交</button>
|
</div>
|
</form>
|
</div>
|
</div>
|
</div>
|
</section>
|
|
<section class="content container-fluid">
|
<div style="overflow-x: auto;height: 750px;">
|
<table class="One">
|
<thead>
|
<tr style="background-color: #00BFFF;font-weight: 800;">
|
<td style="text-align:center;width:5%"><input type="checkbox"/></td>
|
<th style="width:16%">ID</th>
|
<th style="width:16%">机器ID</th>
|
<th style="width:16%">机器类型</th>
|
<th style="width:16%">标志位</th>
|
<th style="width:16%">字类型</th>
|
<th style="width:15%">操作</th>
|
</tr>
|
</thead>
|
<tbody>
|
${MachineFontshtml}
|
</tbody>
|
|
</table>
|
</div>
|
</section>
|
</div>
|
</body>
|
</html>
|