界面优化
parent
a408e8719c
commit
655010c2ce
@ -0,0 +1,116 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||||
|
<head>
|
||||||
|
<th:block th:include="include :: header('新增设备基础信息')" />
|
||||||
|
<th:block th:include="include :: datetimepicker-css" />
|
||||||
|
<th:block th:include="include :: select2-css" />
|
||||||
|
</head>
|
||||||
|
<body class="white-bg">
|
||||||
|
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||||
|
<form class="form-horizontal m" id="form-deviceinfo-add">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">设备编号:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="deviceid" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">设备名称:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="name" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">连接信息:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="connectstr" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">连接方式:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<select name="connectmode" id="connectmode" class="form-control m-b">
|
||||||
|
<option name="cbEditBaseDeviceConnectmode" th:each="connectmode:${cbEditBaseDeviceConnectmode}" th:value="${connectmode.connectModeID}" th:text="${connectmode.connectModeName}" th:selected="${connectmode.flag}" th:disabled="${connectmode.deleteFlag == '0'}"></option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">设备类型:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<select name="devicetype" id="devicetype" class="form-control m-b">
|
||||||
|
<option name="cbEditBaseDevicetypeInfo" th:each="devicetype:${cbEditBaseDevicetypeInfo}" th:value="${devicetype.deviceTypeName}" th:text="${devicetype.deviceTypeName}" th:selected="${devicetype.flag}" th:disabled="${devicetype.deleteFlag == '0'}"></option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">所属汇集:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<select name="collectid" id="collectid" class="form-control m-b">
|
||||||
|
<option name="cbEditBaseCollectInfo" th:each="collectid:${cbEditBaseCollectInfo}" th:value="${collectid.collectId}" th:text="${collectid.collectName}" th:selected="${collectid.flag}" th:disabled="${collectid.deleteflag == '0'}"></option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">地址:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="addr" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">备用:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="mapid" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- <div class="form-group"> -->
|
||||||
|
<!-- <label class="col-sm-3 control-label">记录时间:</label>-->
|
||||||
|
<!-- <div class="col-sm-8">-->
|
||||||
|
<!-- <div class="input-group date">-->
|
||||||
|
<!-- <input name="recordtime" class="form-control" placeholder="yyyy-MM-dd" type="text">-->
|
||||||
|
<!-- <span class="input-group-addon"><i class="fa fa-calendar"></i></span>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- <div class="form-group"> -->
|
||||||
|
<!-- <label class="col-sm-3 control-label">是否可用:</label>-->
|
||||||
|
<!-- <div class="col-sm-8">-->
|
||||||
|
<!-- <input name="deleteflag" class="form-control" type="text">-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- <div class="form-group"> -->
|
||||||
|
<!-- <label class="col-sm-3 control-label">记录人员:</label>-->
|
||||||
|
<!-- <div class="col-sm-8">-->
|
||||||
|
<!-- <input name="recordperson" class="form-control" type="text">-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- <div class="form-group"> -->
|
||||||
|
<!-- <label class="col-sm-3 control-label">主键编号:</label>-->
|
||||||
|
<!-- <div class="col-sm-8">-->
|
||||||
|
<!-- <input name="objid" class="form-control" type="text">-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<th:block th:include="include :: footer" />
|
||||||
|
<th:block th:include="include :: datetimepicker-js" />
|
||||||
|
<th:block th:include="include :: select2-js" />
|
||||||
|
<script th:inline="javascript">
|
||||||
|
var prefix = ctx + "wanli/deviceinfo"
|
||||||
|
$("#form-deviceinfo-add").validate({
|
||||||
|
focusCleanup: true
|
||||||
|
});
|
||||||
|
|
||||||
|
function submitHandler() {
|
||||||
|
if ($.validate.form()) {
|
||||||
|
$.operate.save(prefix + "/add", $('#form-deviceinfo-add').serialize());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$("input[name='recordtime']").datetimepicker({
|
||||||
|
format: "yyyy-mm-dd",
|
||||||
|
minView: "month",
|
||||||
|
autoclose: true
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@ -0,0 +1,193 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<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 :: select2-css" />
|
||||||
|
</head>
|
||||||
|
<body class="gray-bg">
|
||||||
|
<div class="container-div">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 search-collapse">
|
||||||
|
<form id="formId">
|
||||||
|
<div class="select-list">
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<label>设备:</label>
|
||||||
|
<select name="deviceid" id="deviceid" class="form-control m-b">
|
||||||
|
<option value="">所有</option>
|
||||||
|
<option name="cbEditBaseDeviceInfo" th:each="deviceid:${cbEditBaseDeviceInfo}" th:value="${deviceid.deviceid}" th:text="${deviceid.name}" th:disabled="${deviceid.deleteflag == '0'}"></option>
|
||||||
|
</select>
|
||||||
|
</li>
|
||||||
|
<!-- <li>-->
|
||||||
|
<!-- <label>设备名称:</label>-->
|
||||||
|
<!-- <input type="text" name="name"/>-->
|
||||||
|
<!-- </li>-->
|
||||||
|
<!-- <li>-->
|
||||||
|
<!-- <label>连接信息:</label>-->
|
||||||
|
<!-- <input type="text" name="connectstr"/>-->
|
||||||
|
<!-- </li>-->
|
||||||
|
<!-- <li>-->
|
||||||
|
<!-- <label>连接方式:</label>-->
|
||||||
|
<!-- <input type="text" name="connectmode"/>-->
|
||||||
|
<!-- </li>-->
|
||||||
|
<!-- <li>-->
|
||||||
|
<!-- <label>设备类型:</label>-->
|
||||||
|
<!-- <select name="devicetype">-->
|
||||||
|
<!-- <option value="">所有</option>-->
|
||||||
|
<!-- <option value="-1">代码生成请选择字典属性</option>-->
|
||||||
|
<!-- </select>-->
|
||||||
|
<!-- </li>-->
|
||||||
|
<li>
|
||||||
|
<label>汇集软件:</label>
|
||||||
|
<select name="collectid" id="collectid" class="form-control m-b">
|
||||||
|
<option value="">所有</option>
|
||||||
|
<option name="cbEditBaseCollectInfo" th:each="collectid:${cbEditBaseCollectInfo}" th:value="${collectid.collectId}" th:text="${collectid.collectName}" th:disabled="${collectid.deleteflag == '0'}"></option>
|
||||||
|
</select>
|
||||||
|
</li>
|
||||||
|
<!-- <li>-->
|
||||||
|
<!-- <label>地址:</label>-->
|
||||||
|
<!-- <input type="text" name="addr"/>-->
|
||||||
|
<!-- </li>-->
|
||||||
|
<!-- <li>-->
|
||||||
|
<!-- <label>备用:</label>-->
|
||||||
|
<!-- <input type="text" name="mapid"/>-->
|
||||||
|
<!-- </li>-->
|
||||||
|
<li class="select-time">
|
||||||
|
<label>记录时间:</label>
|
||||||
|
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginRecordtime]"/>
|
||||||
|
<span>-</span>
|
||||||
|
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endRecordtime]"/>
|
||||||
|
</li>
|
||||||
|
<!-- <li>-->
|
||||||
|
<!-- <label>是否可用:</label>-->
|
||||||
|
<!-- <input type="text" name="deleteflag"/>-->
|
||||||
|
<!-- </li>-->
|
||||||
|
<!-- <li>-->
|
||||||
|
<!-- <label>记录人员:</label>-->
|
||||||
|
<!-- <input type="text" name="recordperson"/>-->
|
||||||
|
<!-- </li>-->
|
||||||
|
<!-- <li>-->
|
||||||
|
<!-- <label>主键编号:</label>-->
|
||||||
|
<!-- <input type="text" name="objid"/>-->
|
||||||
|
<!-- </li>-->
|
||||||
|
<li>
|
||||||
|
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a>
|
||||||
|
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="btn-group-sm" id="toolbar" role="group">
|
||||||
|
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="wanli:deviceinfo:add">
|
||||||
|
<i class="fa fa-plus"></i> 添加
|
||||||
|
</a>
|
||||||
|
<!-- <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="wanli:deviceinfo:edit">-->
|
||||||
|
<!-- <i class="fa fa-edit"></i> 修改-->
|
||||||
|
<!-- </a>-->
|
||||||
|
<!-- <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="wanli:deviceinfo:remove">-->
|
||||||
|
<!-- <i class="fa fa-remove"></i> 删除-->
|
||||||
|
<!-- </a>-->
|
||||||
|
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="wanli:deviceinfo:export">
|
||||||
|
<i class="fa fa-download"></i> 导出
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 select-table table-striped">
|
||||||
|
<table id="bootstrap-table"></table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<th:block th:include="include :: footer" />
|
||||||
|
<th:block th:include="include :: select2-js" />
|
||||||
|
<script th:inline="javascript">
|
||||||
|
var editFlag = [[${@permission.hasPermi('wanli:deviceinfo:edit')}]];
|
||||||
|
var removeFlag = [[${@permission.hasPermi('wanli:deviceinfo:remove')}]];
|
||||||
|
var prefix = ctx + "wanli/deviceinfo";
|
||||||
|
|
||||||
|
$(function() {
|
||||||
|
var options = {
|
||||||
|
url: prefix + "/list",
|
||||||
|
createUrl: prefix + "/add",
|
||||||
|
updateUrl: prefix + "/edit/{id}",
|
||||||
|
removeUrl: prefix + "/remove",
|
||||||
|
exportUrl: prefix + "/export",
|
||||||
|
modalName: "设备基础信息",
|
||||||
|
columns: [
|
||||||
|
// {
|
||||||
|
// checkbox: true
|
||||||
|
// },
|
||||||
|
{
|
||||||
|
field: 'deviceid',
|
||||||
|
title: '设备编号'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'name',
|
||||||
|
title: '设备名称'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'connectstr',
|
||||||
|
title: '连接信息'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'deviceConnectmode.connectModeName',
|
||||||
|
title: '连接方式'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'devicetype',
|
||||||
|
title: '设备类型'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'collectInfo.collectName',
|
||||||
|
title: '汇集软件编号'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'addr',
|
||||||
|
title: '地址'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'mapid',
|
||||||
|
title: '备用',
|
||||||
|
visible: false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'recordtime',
|
||||||
|
title: '记录时间'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'deleteflag',
|
||||||
|
title: '是否可用',
|
||||||
|
formatter:function (value, row, index){
|
||||||
|
if (value==0){
|
||||||
|
return "是";
|
||||||
|
}
|
||||||
|
else if(value==1){
|
||||||
|
return "否";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'user.userName',
|
||||||
|
title: '记录人员'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'objid',
|
||||||
|
title: '主键编号',
|
||||||
|
visible: false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
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.deviceid + '\')"><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.deviceid + '\')"><i class="fa fa-remove"></i>删除</a>');
|
||||||
|
return actions.join('');
|
||||||
|
}
|
||||||
|
}]
|
||||||
|
};
|
||||||
|
$.table.init(options);
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@ -0,0 +1,121 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||||
|
<head>
|
||||||
|
<th:block th:include="include :: header('修改设备基础信息')" />
|
||||||
|
<th:block th:include="include :: datetimepicker-css" />
|
||||||
|
</head>
|
||||||
|
<body class="white-bg">
|
||||||
|
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||||
|
<form class="form-horizontal m" id="form-deviceinfo-edit" th:object="${baseDeviceInfo}">
|
||||||
|
<input name="objid" th:field="*{objid}" type="hidden">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">设备编号:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="deviceid" th:field="*{deviceid}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">设备名称:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="name" th:field="*{name}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">连接信息:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="connectstr" th:field="*{connectstr}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">连接方式:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<!-- <input name="connectmode" th:field="*{connectmode}" class="form-control" type="text">-->
|
||||||
|
<select name="connectmode" id="connectmode" class="form-control m-b">
|
||||||
|
<option name="cbEditBaseDeviceConnectmode" th:each="connectmode:${cbEditBaseDeviceConnectmode}" th:value="${connectmode.connectModeID}" th:text="${connectmode.connectModeName}" th:selected="${connectmode.flag}" th:disabled="${connectmode.deleteFlag == '0'}"></option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">设备类型:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<select name="devicetype" id="devicetype" class="form-control m-b">
|
||||||
|
<option name="cbEditBaseDevicetypeInfo" th:each="devicetype:${cbEditBaseDevicetypeInfo}" th:value="${devicetype.deviceTypeName}" th:text="${devicetype.deviceTypeName}" th:selected="${devicetype.flag}" th:disabled="${devicetype.deleteFlag == '0'}"></option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">所属汇集:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<!-- <input name="collectid" th:field="*{collectid}" class="form-control" type="text">-->
|
||||||
|
<select name="collectid" id="collectid" class="form-control m-b">
|
||||||
|
<option name="cbEditBaseCollectInfo" th:each="collectid:${cbEditBaseCollectInfo}" th:value="${collectid.collectId}" th:text="${collectid.collectName}" th:selected="${collectid.flag}" th:disabled="${collectid.deleteflag == '0'}"></option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">地址:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="addr" th:field="*{addr}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- <div class="form-group"> -->
|
||||||
|
<!-- <label class="col-sm-3 control-label">备用:</label>-->
|
||||||
|
<!-- <div class="col-sm-8">-->
|
||||||
|
<!-- <input name="mapid" th:field="*{mapid}" class="form-control" type="text">-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- <div class="form-group"> -->
|
||||||
|
<!-- <label class="col-sm-3 control-label">记录时间:</label>-->
|
||||||
|
<!-- <div class="col-sm-8">-->
|
||||||
|
<!-- <div class="input-group date">-->
|
||||||
|
<!-- <input name="recordtime" th:value="${#dates.format(baseDeviceInfo.recordtime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">-->
|
||||||
|
<!-- <span class="input-group-addon"><i class="fa fa-calendar"></i></span>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">是否可用:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<!-- <input name="deleteflag" th:field="*{deleteflag}" class="form-control" type="text">-->
|
||||||
|
<select name="deleteflag" class="form-control m-b" th:field="*{deleteflag}" th:with="type=${@dict.getType('deleteflag')}">
|
||||||
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- <div class="form-group"> -->
|
||||||
|
<!-- <label class="col-sm-3 control-label">记录人员:</label>-->
|
||||||
|
<!-- <div class="col-sm-8">-->
|
||||||
|
<!-- <input name="recordperson" th:field="*{recordperson}" class="form-control" type="text">-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- <div class="form-group"> -->
|
||||||
|
<!-- <label class="col-sm-3 control-label">主键编号:</label>-->
|
||||||
|
<!-- <div class="col-sm-8">-->
|
||||||
|
<!-- <input name="objid" th:field="*{objid}" class="form-control" type="text">-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<th:block th:include="include :: footer" />
|
||||||
|
<th:block th:include="include :: datetimepicker-js" />
|
||||||
|
<th:block th:include="include :: select2-js" />
|
||||||
|
<script th:inline="javascript">
|
||||||
|
var prefix = ctx + "wanli/deviceinfo";
|
||||||
|
$("#form-deviceinfo-edit").validate({
|
||||||
|
focusCleanup: true
|
||||||
|
});
|
||||||
|
|
||||||
|
function submitHandler() {
|
||||||
|
if ($.validate.form()) {
|
||||||
|
$.operate.save(prefix + "/edit", $('#form-deviceinfo-edit').serialize());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$("input[name='recordtime']").datetimepicker({
|
||||||
|
format: "yyyy-mm-dd",
|
||||||
|
minView: "month",
|
||||||
|
autoclose: true
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
Binary file not shown.
@ -0,0 +1,126 @@
|
|||||||
|
package com.ruoyi.wanli.controller;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.ui.ModelMap;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
|
import com.ruoyi.common.annotation.Log;
|
||||||
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
|
import com.ruoyi.wanli.domain.RealWorkdata;
|
||||||
|
import com.ruoyi.wanli.service.IRealWorkdataService;
|
||||||
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||||
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生产数据记录Controller
|
||||||
|
*
|
||||||
|
* @author Caesar
|
||||||
|
* @date 2025-07-11
|
||||||
|
*/
|
||||||
|
@Controller
|
||||||
|
@RequestMapping("/wanli/realworkdata")
|
||||||
|
public class RealWorkdataController extends BaseController
|
||||||
|
{
|
||||||
|
private String prefix = "wanli/realworkdata";
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IRealWorkdataService realWorkdataService;
|
||||||
|
|
||||||
|
@RequiresPermissions("wanli:realworkdata:view")
|
||||||
|
@GetMapping()
|
||||||
|
public String realworkdata()
|
||||||
|
{
|
||||||
|
return prefix + "/realworkdata";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询生产数据记录列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("wanli:realworkdata:list")
|
||||||
|
@PostMapping("/list")
|
||||||
|
@ResponseBody
|
||||||
|
public TableDataInfo list(RealWorkdata realWorkdata)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<RealWorkdata> list = realWorkdataService.selectRealWorkdataList(realWorkdata);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出生产数据记录列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("wanli:realworkdata:export")
|
||||||
|
@Log(title = "生产数据记录", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult export(RealWorkdata realWorkdata)
|
||||||
|
{
|
||||||
|
List<RealWorkdata> list = realWorkdataService.selectRealWorkdataList(realWorkdata);
|
||||||
|
ExcelUtil<RealWorkdata> util = new ExcelUtil<RealWorkdata>(RealWorkdata.class);
|
||||||
|
return util.exportExcel(list, "realworkdata");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增生产数据记录
|
||||||
|
*/
|
||||||
|
@GetMapping("/add")
|
||||||
|
public String add()
|
||||||
|
{
|
||||||
|
return prefix + "/add";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增保存生产数据记录
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("wanli:realworkdata:add")
|
||||||
|
@Log(title = "生产数据记录", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping("/add")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult addSave(RealWorkdata realWorkdata)
|
||||||
|
{
|
||||||
|
return toAjax(realWorkdataService.insertRealWorkdata(realWorkdata));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改生产数据记录
|
||||||
|
*/
|
||||||
|
@GetMapping("/edit/{combineid}")
|
||||||
|
public String edit(@PathVariable("combineid") String combineid, ModelMap mmap)
|
||||||
|
{
|
||||||
|
RealWorkdata realWorkdata = realWorkdataService.selectRealWorkdataById(combineid);
|
||||||
|
mmap.put("realWorkdata", realWorkdata);
|
||||||
|
return prefix + "/edit";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改保存生产数据记录
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("wanli:realworkdata:edit")
|
||||||
|
@Log(title = "生产数据记录", businessType = BusinessType.UPDATE)
|
||||||
|
@PostMapping("/edit")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult editSave(RealWorkdata realWorkdata)
|
||||||
|
{
|
||||||
|
return toAjax(realWorkdataService.updateRealWorkdata(realWorkdata));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除生产数据记录
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("wanli:realworkdata:remove")
|
||||||
|
@Log(title = "生产数据记录", businessType = BusinessType.DELETE)
|
||||||
|
@PostMapping( "/remove")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult remove(String ids)
|
||||||
|
{
|
||||||
|
return toAjax(realWorkdataService.deleteRealWorkdataByIds(ids));
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,109 @@
|
|||||||
|
package com.ruoyi.wanli.domain;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
import com.ruoyi.common.annotation.Excel;
|
||||||
|
import com.ruoyi.common.core.domain.BaseEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生产数据记录对象 real_workdata
|
||||||
|
*
|
||||||
|
* @author Caesar
|
||||||
|
* @date 2025-07-11
|
||||||
|
*/
|
||||||
|
public class RealWorkdata extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 传感器编号 */
|
||||||
|
@Excel(name = "传感器编号")
|
||||||
|
private String combineid;
|
||||||
|
|
||||||
|
/** 采集时间 */
|
||||||
|
@Excel(name = "采集时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||||
|
private Date tm;
|
||||||
|
|
||||||
|
/** 传感器数据 */
|
||||||
|
@Excel(name = "传感器数据")
|
||||||
|
private String data;
|
||||||
|
|
||||||
|
/** 上报方式 */
|
||||||
|
@Excel(name = "上报方式")
|
||||||
|
private Long reportmode;
|
||||||
|
|
||||||
|
/** 记录时间 */
|
||||||
|
@Excel(name = "记录时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||||
|
private Date edittime;
|
||||||
|
|
||||||
|
/** 是否可用 */
|
||||||
|
@Excel(name = "是否可用")
|
||||||
|
private Long deleteflag;
|
||||||
|
|
||||||
|
public void setCombineid(String combineid)
|
||||||
|
{
|
||||||
|
this.combineid = combineid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCombineid()
|
||||||
|
{
|
||||||
|
return combineid;
|
||||||
|
}
|
||||||
|
public void setTm(Date tm)
|
||||||
|
{
|
||||||
|
this.tm = tm;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getTm()
|
||||||
|
{
|
||||||
|
return tm;
|
||||||
|
}
|
||||||
|
public void setData(String data)
|
||||||
|
{
|
||||||
|
this.data = data;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getData()
|
||||||
|
{
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
public void setReportmode(Long reportmode)
|
||||||
|
{
|
||||||
|
this.reportmode = reportmode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getReportmode()
|
||||||
|
{
|
||||||
|
return reportmode;
|
||||||
|
}
|
||||||
|
public void setEdittime(Date edittime)
|
||||||
|
{
|
||||||
|
this.edittime = edittime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getEdittime()
|
||||||
|
{
|
||||||
|
return edittime;
|
||||||
|
}
|
||||||
|
public void setDeleteflag(Long deleteflag)
|
||||||
|
{
|
||||||
|
this.deleteflag = deleteflag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getDeleteflag()
|
||||||
|
{
|
||||||
|
return deleteflag;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||||
|
.append("combineid", getCombineid())
|
||||||
|
.append("tm", getTm())
|
||||||
|
.append("data", getData())
|
||||||
|
.append("reportmode", getReportmode())
|
||||||
|
.append("edittime", getEdittime())
|
||||||
|
.append("deleteflag", getDeleteflag())
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,61 @@
|
|||||||
|
package com.ruoyi.wanli.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ruoyi.wanli.domain.RealWorkdata;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生产数据记录Mapper接口
|
||||||
|
*
|
||||||
|
* @author Caesar
|
||||||
|
* @date 2025-07-11
|
||||||
|
*/
|
||||||
|
public interface RealWorkdataMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询生产数据记录
|
||||||
|
*
|
||||||
|
* @param combineid 生产数据记录ID
|
||||||
|
* @return 生产数据记录
|
||||||
|
*/
|
||||||
|
public RealWorkdata selectRealWorkdataById(String combineid);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询生产数据记录列表
|
||||||
|
*
|
||||||
|
* @param realWorkdata 生产数据记录
|
||||||
|
* @return 生产数据记录集合
|
||||||
|
*/
|
||||||
|
public List<RealWorkdata> selectRealWorkdataList(RealWorkdata realWorkdata);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增生产数据记录
|
||||||
|
*
|
||||||
|
* @param realWorkdata 生产数据记录
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertRealWorkdata(RealWorkdata realWorkdata);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改生产数据记录
|
||||||
|
*
|
||||||
|
* @param realWorkdata 生产数据记录
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateRealWorkdata(RealWorkdata realWorkdata);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除生产数据记录
|
||||||
|
*
|
||||||
|
* @param combineid 生产数据记录ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteRealWorkdataById(String combineid);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除生产数据记录
|
||||||
|
*
|
||||||
|
* @param combineids 需要删除的数据ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteRealWorkdataByIds(String[] combineids);
|
||||||
|
}
|
||||||
@ -0,0 +1,61 @@
|
|||||||
|
package com.ruoyi.wanli.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ruoyi.wanli.domain.RealWorkdata;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生产数据记录Service接口
|
||||||
|
*
|
||||||
|
* @author Caesar
|
||||||
|
* @date 2025-07-11
|
||||||
|
*/
|
||||||
|
public interface IRealWorkdataService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询生产数据记录
|
||||||
|
*
|
||||||
|
* @param combineid 生产数据记录ID
|
||||||
|
* @return 生产数据记录
|
||||||
|
*/
|
||||||
|
public RealWorkdata selectRealWorkdataById(String combineid);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询生产数据记录列表
|
||||||
|
*
|
||||||
|
* @param realWorkdata 生产数据记录
|
||||||
|
* @return 生产数据记录集合
|
||||||
|
*/
|
||||||
|
public List<RealWorkdata> selectRealWorkdataList(RealWorkdata realWorkdata);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增生产数据记录
|
||||||
|
*
|
||||||
|
* @param realWorkdata 生产数据记录
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertRealWorkdata(RealWorkdata realWorkdata);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改生产数据记录
|
||||||
|
*
|
||||||
|
* @param realWorkdata 生产数据记录
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateRealWorkdata(RealWorkdata realWorkdata);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除生产数据记录
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteRealWorkdataByIds(String ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除生产数据记录信息
|
||||||
|
*
|
||||||
|
* @param combineid 生产数据记录ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteRealWorkdataById(String combineid);
|
||||||
|
}
|
||||||
@ -0,0 +1,94 @@
|
|||||||
|
package com.ruoyi.wanli.service.impl;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.ruoyi.wanli.mapper.RealWorkdataMapper;
|
||||||
|
import com.ruoyi.wanli.domain.RealWorkdata;
|
||||||
|
import com.ruoyi.wanli.service.IRealWorkdataService;
|
||||||
|
import com.ruoyi.common.core.text.Convert;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生产数据记录Service业务层处理
|
||||||
|
*
|
||||||
|
* @author Caesar
|
||||||
|
* @date 2025-07-11
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class RealWorkdataServiceImpl implements IRealWorkdataService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private RealWorkdataMapper realWorkdataMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询生产数据记录
|
||||||
|
*
|
||||||
|
* @param combineid 生产数据记录ID
|
||||||
|
* @return 生产数据记录
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public RealWorkdata selectRealWorkdataById(String combineid)
|
||||||
|
{
|
||||||
|
return realWorkdataMapper.selectRealWorkdataById(combineid);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询生产数据记录列表
|
||||||
|
*
|
||||||
|
* @param realWorkdata 生产数据记录
|
||||||
|
* @return 生产数据记录
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<RealWorkdata> selectRealWorkdataList(RealWorkdata realWorkdata)
|
||||||
|
{
|
||||||
|
return realWorkdataMapper.selectRealWorkdataList(realWorkdata);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增生产数据记录
|
||||||
|
*
|
||||||
|
* @param realWorkdata 生产数据记录
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertRealWorkdata(RealWorkdata realWorkdata)
|
||||||
|
{
|
||||||
|
return realWorkdataMapper.insertRealWorkdata(realWorkdata);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改生产数据记录
|
||||||
|
*
|
||||||
|
* @param realWorkdata 生产数据记录
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateRealWorkdata(RealWorkdata realWorkdata)
|
||||||
|
{
|
||||||
|
return realWorkdataMapper.updateRealWorkdata(realWorkdata);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除生产数据记录对象
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteRealWorkdataByIds(String ids)
|
||||||
|
{
|
||||||
|
return realWorkdataMapper.deleteRealWorkdataByIds(Convert.toStrArray(ids));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除生产数据记录信息
|
||||||
|
*
|
||||||
|
* @param combineid 生产数据记录ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteRealWorkdataById(String combineid)
|
||||||
|
{
|
||||||
|
return realWorkdataMapper.deleteRealWorkdataById(combineid);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,80 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.ruoyi.wanli.mapper.RealWorkdataMapper">
|
||||||
|
|
||||||
|
<resultMap type="RealWorkdata" id="RealWorkdataResult">
|
||||||
|
<result property="combineid" column="combineid" />
|
||||||
|
<result property="tm" column="tm" />
|
||||||
|
<result property="data" column="data" />
|
||||||
|
<result property="reportmode" column="reportmode" />
|
||||||
|
<result property="edittime" column="edittime" />
|
||||||
|
<result property="deleteflag" column="deleteflag" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectRealWorkdataVo">
|
||||||
|
select combineid, tm, data, reportmode, edittime, deleteflag from real_workdata
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectRealWorkdataList" parameterType="RealWorkdata" resultMap="RealWorkdataResult">
|
||||||
|
<include refid="selectRealWorkdataVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="combineid != null and combineid != ''"> and combineid = #{combineid}</if>
|
||||||
|
<if test="tm != null "> and tm = #{tm}</if>
|
||||||
|
<if test="data != null and data != ''"> and data = #{data}</if>
|
||||||
|
<if test="reportmode != null "> and reportmode = #{reportmode}</if>
|
||||||
|
<if test="edittime != null "> and edittime = #{edittime}</if>
|
||||||
|
<if test="deleteflag != null "> and deleteflag = #{deleteflag}</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectRealWorkdataById" parameterType="String" resultMap="RealWorkdataResult">
|
||||||
|
<include refid="selectRealWorkdataVo"/>
|
||||||
|
where combineid = #{combineid}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertRealWorkdata" parameterType="RealWorkdata">
|
||||||
|
insert into real_workdata
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="combineid != null">combineid,</if>
|
||||||
|
<if test="tm != null">tm,</if>
|
||||||
|
<if test="data != null">data,</if>
|
||||||
|
<if test="reportmode != null">reportmode,</if>
|
||||||
|
<if test="edittime != null">edittime,</if>
|
||||||
|
<if test="deleteflag != null">deleteflag,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="combineid != null">#{combineid},</if>
|
||||||
|
<if test="tm != null">#{tm},</if>
|
||||||
|
<if test="data != null">#{data},</if>
|
||||||
|
<if test="reportmode != null">#{reportmode},</if>
|
||||||
|
<if test="edittime != null">#{edittime},</if>
|
||||||
|
<if test="deleteflag != null">#{deleteflag},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateRealWorkdata" parameterType="RealWorkdata">
|
||||||
|
update real_workdata
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="tm != null">tm = #{tm},</if>
|
||||||
|
<if test="data != null">data = #{data},</if>
|
||||||
|
<if test="reportmode != null">reportmode = #{reportmode},</if>
|
||||||
|
<if test="edittime != null">edittime = #{edittime},</if>
|
||||||
|
<if test="deleteflag != null">deleteflag = #{deleteflag},</if>
|
||||||
|
</trim>
|
||||||
|
where combineid = #{combineid}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteRealWorkdataById" parameterType="String">
|
||||||
|
delete from real_workdata where combineid = #{combineid}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteRealWorkdataByIds" parameterType="String">
|
||||||
|
delete from real_workdata where combineid in
|
||||||
|
<foreach item="combineid" collection="array" open="(" separator="," close=")">
|
||||||
|
#{combineid}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@ -0,0 +1,25 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||||
|
<head>
|
||||||
|
<th:block th:include="include :: header('新增生产数据记录')" />
|
||||||
|
</head>
|
||||||
|
<body class="white-bg">
|
||||||
|
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||||
|
<form class="form-horizontal m" id="form-realworkdata-add">
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<th:block th:include="include :: footer" />
|
||||||
|
<script th:inline="javascript">
|
||||||
|
var prefix = ctx + "wanli/realworkdata"
|
||||||
|
$("#form-realworkdata-add").validate({
|
||||||
|
focusCleanup: true
|
||||||
|
});
|
||||||
|
|
||||||
|
function submitHandler() {
|
||||||
|
if ($.validate.form()) {
|
||||||
|
$.operate.save(prefix + "/add", $('#form-realworkdata-add').serialize());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@ -0,0 +1,26 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||||
|
<head>
|
||||||
|
<th:block th:include="include :: header('修改生产数据记录')" />
|
||||||
|
</head>
|
||||||
|
<body class="white-bg">
|
||||||
|
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||||
|
<form class="form-horizontal m" id="form-realworkdata-edit" th:object="${realWorkdata}">
|
||||||
|
<input name="combineid" th:field="*{combineid}" type="hidden">
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<th:block th:include="include :: footer" />
|
||||||
|
<script th:inline="javascript">
|
||||||
|
var prefix = ctx + "wanli/realworkdata";
|
||||||
|
$("#form-realworkdata-edit").validate({
|
||||||
|
focusCleanup: true
|
||||||
|
});
|
||||||
|
|
||||||
|
function submitHandler() {
|
||||||
|
if ($.validate.form()) {
|
||||||
|
$.operate.save(prefix + "/edit", $('#form-realworkdata-edit').serialize());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@ -0,0 +1,129 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||||
|
<head>
|
||||||
|
<th:block th:include="include :: header('生产数据记录列表')" />
|
||||||
|
</head>
|
||||||
|
<body class="gray-bg">
|
||||||
|
<div class="container-div">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 search-collapse">
|
||||||
|
<form id="formId">
|
||||||
|
<div class="select-list">
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<label>传感器编号:</label>
|
||||||
|
<input type="text" name="combineid"/>
|
||||||
|
</li>
|
||||||
|
<li class="select-time">
|
||||||
|
<label>采集时间:</label>
|
||||||
|
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginTm]"/>
|
||||||
|
<span>-</span>
|
||||||
|
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endTm]"/>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<label>传感器数据:</label>
|
||||||
|
<input type="text" name="data"/>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<label>上报方式:</label>
|
||||||
|
<input type="text" name="reportmode"/>
|
||||||
|
</li>
|
||||||
|
<li class="select-time">
|
||||||
|
<label>记录时间:</label>
|
||||||
|
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginEdittime]"/>
|
||||||
|
<span>-</span>
|
||||||
|
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endEdittime]"/>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<label>是否可用:</label>
|
||||||
|
<input type="text" name="deleteflag"/>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a>
|
||||||
|
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="btn-group-sm" id="toolbar" role="group">
|
||||||
|
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="wanli:realworkdata:add">
|
||||||
|
<i class="fa fa-plus"></i> 添加
|
||||||
|
</a>
|
||||||
|
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="wanli:realworkdata:edit">
|
||||||
|
<i class="fa fa-edit"></i> 修改
|
||||||
|
</a>
|
||||||
|
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="wanli:realworkdata:remove">
|
||||||
|
<i class="fa fa-remove"></i> 删除
|
||||||
|
</a>
|
||||||
|
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="wanli:realworkdata:export">
|
||||||
|
<i class="fa fa-download"></i> 导出
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 select-table table-striped">
|
||||||
|
<table id="bootstrap-table"></table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<th:block th:include="include :: footer" />
|
||||||
|
<script th:inline="javascript">
|
||||||
|
var editFlag = [[${@permission.hasPermi('wanli:realworkdata:edit')}]];
|
||||||
|
var removeFlag = [[${@permission.hasPermi('wanli:realworkdata:remove')}]];
|
||||||
|
var deleteflagDatas = [[${@dict.getType('deleteflag')}]];
|
||||||
|
var prefix = ctx + "wanli/realworkdata";
|
||||||
|
|
||||||
|
$(function() {
|
||||||
|
var options = {
|
||||||
|
url: prefix + "/list",
|
||||||
|
createUrl: prefix + "/add",
|
||||||
|
updateUrl: prefix + "/edit/{id}",
|
||||||
|
removeUrl: prefix + "/remove",
|
||||||
|
exportUrl: prefix + "/export",
|
||||||
|
modalName: "生产数据记录",
|
||||||
|
columns: [{
|
||||||
|
checkbox: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'combineid',
|
||||||
|
title: '传感器编号'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'tm',
|
||||||
|
title: '采集时间'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'data',
|
||||||
|
title: '传感器数据'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'reportmode',
|
||||||
|
title: '上报方式'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'edittime',
|
||||||
|
title: '记录时间'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'deleteflag',
|
||||||
|
title: '是否可用',
|
||||||
|
formatter: function(value, row, index) {
|
||||||
|
return $.table.selectDictLabel(deleteflagDatas, value);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
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.combineid + '\')"><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.combineid + '\')"><i class="fa fa-remove"></i>删除</a>');
|
||||||
|
return actions.join('');
|
||||||
|
}
|
||||||
|
}]
|
||||||
|
};
|
||||||
|
$.table.init(options);
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@ -0,0 +1,22 @@
|
|||||||
|
-- 菜单 SQL
|
||||||
|
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||||
|
values('生产数据记录', '2058', '1', '/wanli/realworkdata', 'C', '0', 'wanli:realworkdata:view', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', '生产数据记录菜单');
|
||||||
|
|
||||||
|
-- 按钮父菜单ID
|
||||||
|
SELECT @parentId := LAST_INSERT_ID();
|
||||||
|
|
||||||
|
-- 按钮 SQL
|
||||||
|
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||||
|
values('生产数据记录查询', @parentId, '1', '#', 'F', '0', 'wanli:realworkdata:list', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', '');
|
||||||
|
|
||||||
|
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||||
|
values('生产数据记录新增', @parentId, '2', '#', 'F', '0', 'wanli:realworkdata:add', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', '');
|
||||||
|
|
||||||
|
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||||
|
values('生产数据记录修改', @parentId, '3', '#', 'F', '0', 'wanli:realworkdata:edit', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', '');
|
||||||
|
|
||||||
|
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||||
|
values('生产数据记录删除', @parentId, '4', '#', 'F', '0', 'wanli:realworkdata:remove', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', '');
|
||||||
|
|
||||||
|
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||||
|
values('生产数据记录导出', @parentId, '5', '#', 'F', '0', 'wanli:realworkdata:export', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', '');
|
||||||
Loading…
Reference in New Issue