change - 读取记录修改

master
wenjy 2 years ago
parent d9cb7e4dae
commit 6ab2b1e4d5

@ -98,7 +98,7 @@ shiro:
# 首页地址
indexUrl: /index
# 验证码开关
captchaEnabled: false
captchaEnabled: true
# 验证码类型 math 数组计算 char 字符
captchaType: math
cookie:

@ -44,8 +44,8 @@
<form id="signupForm" autocomplete="off">
<h4 class="no-margins">登录:</h4>
<!--<p class="m-t-md">你若不离不弃,我必生死相依</p>-->
<input type="text" name="username" class="form-control uname" placeholder="用户名" value="admin" />
<input type="password" name="password" class="form-control pword" placeholder="密码" value="admin123" />
<input type="text" name="username" class="form-control uname" placeholder="用户名" />
<input type="password" name="password" class="form-control pword" placeholder="密码"/>
<div class="row m-t" th:if="${captchaEnabled==true}">
<div class="col-xs-6">
<input type="text" name="validateCode" class="form-control code" placeholder="验证码" maxlength="5" />

@ -32,6 +32,8 @@ public class Ztree implements Serializable
/** 是否能勾选 */
private boolean nocheck = false;
private String remark;
public Long getId()
{
return id;
@ -101,4 +103,14 @@ public class Ztree implements Serializable
{
this.nocheck = nocheck;
}
public String getRemark()
{
return remark;
}
public void setRemark(String remark)
{
this.remark = remark;
}
}

@ -114,6 +114,7 @@ public class BaseDeviceInfoServiceImpl implements IBaseDeviceInfoService
ztree.setpId(baseDeviceInfo.getParentId());
ztree.setName(baseDeviceInfo.getDeviceName());
ztree.setTitle(baseDeviceInfo.getDeviceName());
ztree.setRemark(baseDeviceInfo.getResource());
ztrees.add(ztree);
}
return ztrees;

@ -2,24 +2,43 @@
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
<th:block th:include="include :: header('读取记录列表')" />
<th:block th:include="include :: layout-latest-css" />
<th:block th:include="include :: ztree-css" />
</head>
<body class="gray-bg">
<div class="ui-layout-west">
<div class="box box-main">
<div class="box-header">
<div class="box-title">
<i class="fa icon-grid"></i> 设备信息
</div>
<div class="box-tools pull-right">
<a type="button" class="btn btn-box-tool" href="#" onclick="deviceInfo()" title="设备信息"><i class="fa fa-edit"></i></a>
<button type="button" class="btn btn-box-tool" id="btnExpand" title="展开" style="display:none;"><i class="fa fa-chevron-up"></i></button>
<button type="button" class="btn btn-box-tool" id="btnCollapse" title="折叠"><i class="fa fa-chevron-down"></i></button>
<button type="button" class="btn btn-box-tool" id="btnRefresh" title="刷新"><i class="fa fa-refresh"></i></button>
</div>
</div>
<div class="ui-layout-content">
<div id="tree" class="ztree"></div>
</div>
</div>
</div>
<div class="ui-layout-center">
<div class="container-div">
<div class="row">
<div class="col-sm-12 search-collapse">
<form id="formId">
<input id="resource" type="text" name="resource" hidden="true"/>
<div class="select-list">
<ul>
<li>
<label>资源号:</label>
<input type="text" name="resource"/>
</li>
<li>
<label>位置编号:</label>
<input type="text" name="positionId"/>
</li>
<li>
<label>RFID条码</label>
<label>RFID </label>
<input type="text" name="rfidStr"/>
</li>
<li>
@ -30,7 +49,7 @@
</select>
</li>
<li class="select-time">
<label>读取时间</label>
<label>日 期 </label>
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginReadTime]"/>
<span>-</span>
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endReadTime]"/>
@ -63,7 +82,10 @@
</div>
</div>
</div>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: layout-latest-js" />
<th:block th:include="include :: ztree-js" />
<script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('traceability:readRecord:edit')}]];
var removeFlag = [[${@permission.hasPermi('traceability:readRecord:remove')}]];
@ -71,6 +93,24 @@
var prefix = ctx + "traceability/readRecord";
$(function() {
var panehHidden = false;
if ($(this).width() < 769) {
panehHidden = true;
}
$('body').layout({ initClosed: panehHidden, west__size: 185 });
// 回到顶部绑定
if ($.fn.toTop !== undefined) {
var opt = {
win:$('.ui-layout-center'),
doc:$('.ui-layout-center')
};
$('#scroll-up').toTop(opt);
}
queryReadList();
queryResourceTree();
});
function queryReadList() {
var options = {
url: prefix + "/list",
createUrl: prefix + "/add",
@ -81,60 +121,99 @@
columns: [{
checkbox: true
},
{
field: 'id',
title: '主键标识',
visible: false
},
{
field: 'machineId',
title: '机台编号',
visible: false
},
{
field: 'resource',
title: '资源号'
},
{
field: 'equipId',
title: '设备编号'
},
{
field: 'positionId',
title: '位置编号'
},
{
field: 'ant',
title: '天线编号'
},
{
field: 'rfidStr',
title: 'RFID条码'
},
{
field: 'isSuccess',
title: '是否成功',
formatter: function(value, row, index) {
return $.table.selectDictLabel(isSuccessDatas, value);
}
},
{
field: 'readTime',
title: '读取时间'
},
{
title: '操作',
align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
return actions.join('');
}
}]
{
field: 'id',
title: '主键标识',
visible: false
},
{
field: 'machineId',
title: '机台编号',
visible: false
},
{
field: 'resource',
title: '资源号'
},
{
field: 'equipId',
title: '设备编号'
},
{
field: 'positionId',
title: '位置编号'
},
{
field: 'ant',
title: '天线编号'
},
{
field: 'rfidStr',
title: 'RFID条码'
},
{
field: 'isSuccess',
title: '是否成功',
formatter: function(value, row, index) {
return $.table.selectDictLabel(isSuccessDatas, value);
}
},
{
field: 'readTime',
title: '读取时间'
},
{
title: '操作',
align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
return actions.join('');
}
}]
};
$.table.init(options);
}
function queryResourceTree()
{
var url = ctx + "traceability/deviceinfo/treeData";
var options = {
url: url,
expandLevel: 2,
onClick : zOnClick
};
$.tree.init(options);
function zOnClick(event, treeId, treeNode) {
$("#resource").val(treeNode.remark);
$.table.search();
}
}
$('#btnExpand').click(function() {
$._tree.expandAll(true);
$(this).hide();
$('#btnCollapse').show();
});
$('#btnCollapse').click(function() {
$._tree.expandAll(false);
$(this).hide();
$('#btnExpand').show();
});
$('#btnRefresh').click(function() {
queryReadList();
});
/* 设备信息 */
function deviceInfo() {
var url = ctx + "traceability/deviceinfo";
$.modal.openTab("设备信息", url);
}
</script>
</body>
</html>
Loading…
Cancel
Save