处理页面

This commit is contained in:
WenG 2021-03-21 14:19:08 +08:00
parent 6dfeb5d590
commit 7a5585e29b
6 changed files with 42 additions and 43 deletions

View File

@ -70,7 +70,7 @@
<!-- 新增采集分钟数据 --> <!-- 新增采集分钟数据 -->
<insert id="save" parameterType="map"> <insert id="save" parameterType="map">
INSERT INTO pollute_data_minute( INSERT INTO pollute_data_minute (
data_id, data_id,
collector_sn, collector_sn,
enterprise_id, enterprise_id,

View File

@ -190,9 +190,16 @@
1 = 1 1 = 1
<if test="keywords != null and keywords != ''"> <if test="keywords != null and keywords != ''">
AND ( AND (
<!-- 这里添加其他条件 --> t1.poll_no LIKE CONCAT('%', #{keywords}, '%')
t1.id LIKE CONCAT('%', #{keywords}, '%') OR
) t1.poll_no_old LIKE CONCAT('%', #{keywords}, '%')
OR
t1.poll_name LIKE CONCAT('%', #{keywords}, '%')
)
</if>
<if test="pollType != null">
AND
poll_type = #{pollType}
</if> </if>
<if test="pollIds != null and pollIds.size > 0"> <if test="pollIds != null and pollIds.size > 0">
AND AND
@ -220,10 +227,17 @@
1 = 1 1 = 1
<if test="keywords != null and keywords != ''"> <if test="keywords != null and keywords != ''">
AND ( AND (
<!-- 这里添加其他条件 --> t1.poll_no LIKE CONCAT('%', #{keywords}, '%')
t1.id LIKE CONCAT('%', #{keywords}, '%') OR
t1.poll_no_old LIKE CONCAT('%', #{keywords}, '%')
OR
t1.poll_name LIKE CONCAT('%', #{keywords}, '%')
) )
</if> </if>
<if test="pollType != null">
AND
poll_type = #{pollType}
</if>
<if test="pollIds != null and pollIds.size > 0"> <if test="pollIds != null and pollIds.size > 0">
AND AND
t1.poll_id IN t1.poll_id IN
@ -250,9 +264,16 @@
1 = 1 1 = 1
<if test="keywords != null and keywords != ''"> <if test="keywords != null and keywords != ''">
AND ( AND (
<!-- 这里添加其他条件 --> t1.poll_no LIKE CONCAT('%', #{keywords}, '%')
t1.id LIKE CONCAT('%', #{keywords}, '%') OR
) t1.poll_no_old LIKE CONCAT('%', #{keywords}, '%')
OR
t1.poll_name LIKE CONCAT('%', #{keywords}, '%')
)
</if>
<if test="pollType != null">
AND
poll_type = #{pollType}
</if> </if>
<if test="pollIds != null and pollIds.size > 0"> <if test="pollIds != null and pollIds.size > 0">
AND AND

View File

@ -86,15 +86,6 @@
[ [
{type:'checkbox', fixed: 'left'}, {type:'checkbox', fixed: 'left'},
{field:'rowNum', width:80, title: '序号', fixed: 'left', align:'center', templet: '<span>{{d.LAY_INDEX}}</span>'}, {field:'rowNum', width:80, title: '序号', fixed: 'left', align:'center', templet: '<span>{{d.LAY_INDEX}}</span>'},
{field: 'collectorId', width: 180, title: '', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{field: 'collectorMn', width: 180, title: '设备编号', align:'center', {field: 'collectorMn', width: 180, title: '设备编号', align:'center',
templet: function(row) { templet: function(row) {
var rowData = row[this.field]; var rowData = row[this.field];

View File

@ -86,15 +86,6 @@
[ [
{type:'checkbox', fixed: 'left'}, {type:'checkbox', fixed: 'left'},
{field:'rowNum', width:80, title: '序号', fixed: 'left', align:'center', templet: '<span>{{d.LAY_INDEX}}</span>'}, {field:'rowNum', width:80, title: '序号', fixed: 'left', align:'center', templet: '<span>{{d.LAY_INDEX}}</span>'},
{field: 'enterpriseId', width: 180, title: '', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{field: 'enterpriseName', width: 180, title: '名称', align:'center', {field: 'enterpriseName', width: 180, title: '名称', align:'center',
templet: function(row) { templet: function(row) {
var rowData = row[this.field]; var rowData = row[this.field];

View File

@ -86,15 +86,6 @@
[ [
{type:'checkbox', fixed: 'left'}, {type:'checkbox', fixed: 'left'},
{field:'rowNum', width:80, title: '序号', fixed: 'left', align:'center', templet: '<span>{{d.LAY_INDEX}}</span>'}, {field:'rowNum', width:80, title: '序号', fixed: 'left', align:'center', templet: '<span>{{d.LAY_INDEX}}</span>'},
{field: 'instrumentId', width: 180, title: '', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{field: 'instrumentMn', width: 180, title: '设备编号', align:'center', {field: 'instrumentMn', width: 180, title: '设备编号', align:'center',
templet: function(row) { templet: function(row) {
var rowData = row[this.field]; var rowData = row[this.field];

View File

@ -9,6 +9,9 @@
<link rel="stylesheet" href="assets/fonts/font-awesome/css/font-awesome.css"/> <link rel="stylesheet" href="assets/fonts/font-awesome/css/font-awesome.css"/>
<link rel="stylesheet" href="assets/layuiadmin/layui/css/layui.css" media="all"> <link rel="stylesheet" href="assets/layuiadmin/layui/css/layui.css" media="all">
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all"> <link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
<style>
.layui-input {height: 30px;}
</style>
</head> </head>
<body> <body>
<div class="layui-fluid layui-anim layui-anim-fadein"> <div class="layui-fluid layui-anim layui-anim-fadein">
@ -16,15 +19,18 @@
<div class="layui-col-md12"> <div class="layui-col-md12">
<div class="layui-card"> <div class="layui-card">
<div class="layui-card-body"> <div class="layui-card-body">
<div class="test-table-reload-btn" style="margin-bottom: 10px;"> <div class="test-table-reload-btn layui-form" style="margin-bottom: 10px;">
<div class="layui-inline"> <div class="layui-inline">
<input type="text" id="keywords" class="layui-input search-item" placeholder="输入关键字"> <input type="text" id="keywords" class="layui-input search-item" placeholder="输入关键字">
</div> </div>
<div class="layui-inline"> <div class="layui-inline">
<input type="text" id="startTime" class="layui-input search-item" placeholder="开始时间" readonly> <select id="pollType" name="pollType">
</div> <option value="">请选择类型</option>
<div class="layui-inline"> <option value="water">水监测因子</option>
<input type="text" id="endTime" class="layui-input search-item" placeholder="结束时间" readonly> <option value="sewage">污水排放过程(工况)监控监测因子</option>
<option value="gas">气监测因子</option>
<option value="smoke">烟气排放过程(工况)监控监测因子</option>
</select>
</div> </div>
<button type="button" id="search" class="layui-btn layui-btn-sm"> <button type="button" id="search" class="layui-btn layui-btn-sm">
<i class="fa fa-lg fa-search"></i> 搜索 <i class="fa fa-lg fa-search"></i> 搜索
@ -168,8 +174,7 @@
url: top.restAjax.path(tableUrl, []), url: top.restAjax.path(tableUrl, []),
where: { where: {
keywords: $('#keywords').val(), keywords: $('#keywords').val(),
startTime: $('#startTime').val(), pollType: $('#pollType').val(),
endTime: $('#endTime').val()
}, },
page: { page: {
curr: currentPage curr: currentPage