224 lines
11 KiB
Plaintext
224 lines
11 KiB
Plaintext
|
|
<%@ page language="java" pageEncoding="UTF-8"%>
|
|||
|
|
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
|||
|
|
<style type="text/css">
|
|||
|
|
/* .select2-container .select2-selection--single{
|
|||
|
|
height:34px;
|
|||
|
|
line-height: 34px;
|
|||
|
|
}
|
|||
|
|
.select2-selection__arrow{
|
|||
|
|
margin-top:3px;
|
|||
|
|
} */
|
|||
|
|
</style>
|
|||
|
|
<script type="text/javascript">
|
|||
|
|
$(function(){
|
|||
|
|
<%--var alarmInformationJson=jQuery.parseJSON('${alarmInformationJson}');--%>
|
|||
|
|
<%--var selelct_ = $("#informationCode").select2({--%>
|
|||
|
|
<%-- data: alarmInformationJson,--%>
|
|||
|
|
<%-- cache: false,--%>
|
|||
|
|
<%-- placeholder: '请选择',//默认文字提示--%>
|
|||
|
|
<%-- allowClear: false,//允许清空--%>
|
|||
|
|
<%-- escapeMarkup: function (markup) { return markup; }, // 自定义格式化防止xss注入--%>
|
|||
|
|
<%-- language: "zh-CN",--%>
|
|||
|
|
<%-- minimumInputLength: 0,--%>
|
|||
|
|
<%-- minimumResultsForSearch: 10,//数据超过十个启用搜索框--%>
|
|||
|
|
<%-- formatResult: function formatRepo(repo) { return repo.text; }, // 函数用来渲染结果--%>
|
|||
|
|
<%-- formatSelection: function formatRepoSelection(repo) { return repo.text; } // 函数用于呈现当前的选择--%>
|
|||
|
|
<%--});--%>
|
|||
|
|
<%--if(alarmInformationJson!=''){--%>
|
|||
|
|
<%-- selelct_.val(alarmInformationJson[0].id).trigger("change");--%>
|
|||
|
|
<%--}else{--%>
|
|||
|
|
<%-- selelct_.val('').trigger("change");--%>
|
|||
|
|
<%--}--%>
|
|||
|
|
|
|||
|
|
// selelct_.on("change", function (e) {
|
|||
|
|
// var value = $(this).val();
|
|||
|
|
// });
|
|||
|
|
|
|||
|
|
$.post(ext.contextPath + "/user/processSection/getProcessSection4Select.do", {companyId:unitId},function (data) {
|
|||
|
|
$("#processSection").empty();
|
|||
|
|
var selelct_ = $("#processSection").select2({
|
|||
|
|
data: data,
|
|||
|
|
cache: false,
|
|||
|
|
placeholder: '请选择',//默认文字提示
|
|||
|
|
allowClear: true,//允许清空
|
|||
|
|
escapeMarkup: function (markup) { return markup; }, // 自定义格式化防止xss注入
|
|||
|
|
language: "zh-CN",
|
|||
|
|
minimumInputLength: 0,
|
|||
|
|
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
|||
|
|
formatResult: function formatRepo(repo) { return repo.text; }, // 函数用来渲染结果
|
|||
|
|
formatSelection: function formatRepoSelection(repo) { return repo.text; } // 函数用于呈现当前的选择
|
|||
|
|
});
|
|||
|
|
$(".select2-selection--single").css({ 'height': '30px', 'paddingTop': '4px' })
|
|||
|
|
selelct_.val('').trigger("change");
|
|||
|
|
selelct_.on("change", function (e) {
|
|||
|
|
$("#addMPoint_table").bootstrapTable('refresh');
|
|||
|
|
});
|
|||
|
|
}, 'json');
|
|||
|
|
})
|
|||
|
|
|
|||
|
|
function dosearch(){
|
|||
|
|
$("#addMPoint_table").bootstrapTable('refresh');
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
$(function(){
|
|||
|
|
$("#addMPoint_table").bootstrapTable({ // 对应table标签的id
|
|||
|
|
url: ext.contextPath + '/work/mpoint/getAlarmMPointList.do', // 获取表格数据的url
|
|||
|
|
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
|||
|
|
striped: true, //表格显示条纹,默认为false
|
|||
|
|
pagination: true, // 在表格底部显示分页组件,默认false
|
|||
|
|
pageList: [10, 20, 50], // 设置页面可以显示的数据条数
|
|||
|
|
pageSize: 20, // 页面数据条数
|
|||
|
|
pageNumber: 1, // 首页页码
|
|||
|
|
sidePagination: 'server', // 设置为服务器端分页
|
|||
|
|
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
|||
|
|
return {
|
|||
|
|
rows: params.limit, // 每页要显示的数据条数
|
|||
|
|
page: params.offset / params.limit + 1, // 每页显示数据的开始页码
|
|||
|
|
sort: params.sort, // 要排序的字段
|
|||
|
|
order: params.order,
|
|||
|
|
companyId:unitId,
|
|||
|
|
triggerAlarm: $("#triggerAlarm").val(),
|
|||
|
|
signalType: $("#signalType").val(),
|
|||
|
|
pSectionId: $("#processSection").val(),
|
|||
|
|
search_name: $('#search_name').val()
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
sortName: 'morder', // 要排序的字段
|
|||
|
|
sortOrder: 'asc', // 排序规则
|
|||
|
|
onClickRow: function (row) {//单击行事件,执行查看功能
|
|||
|
|
// viewFun(row.id);
|
|||
|
|
},
|
|||
|
|
columns: [
|
|||
|
|
{
|
|||
|
|
checkbox: true, // 显示一个勾选框
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
field: 'parmname', // 返回json数据中的name
|
|||
|
|
title: '测量点名称', // 表格表头显示文字
|
|||
|
|
align: 'center', // 左右居中
|
|||
|
|
valign: 'middle' // 上下居中
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
field: 'mpointcode', // 返回json数据中的name
|
|||
|
|
title: '测量点标识', // 表格表头显示文字
|
|||
|
|
align: 'center', // 左右居中
|
|||
|
|
valign: 'middle' // 上下居中
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
field: 'parmvalue', // 返回json数据中的name
|
|||
|
|
title: '最新值', // 表格表头显示文字
|
|||
|
|
align: 'center', // 左右居中
|
|||
|
|
valign: 'middle' // 上下居中
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
field: 'measuredt', // 返回json数据中的name
|
|||
|
|
title: '最新时间', // 表格表头显示文字
|
|||
|
|
align: 'center', // 左右居中
|
|||
|
|
valign: 'middle', // 上下居中
|
|||
|
|
formatter: function (value, row, index) {
|
|||
|
|
return value.substring(0,16);
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
field: 'unit', // 返回json数据中的name
|
|||
|
|
title: '单位', // 表格表头显示文字
|
|||
|
|
align: 'center', // 左右居中
|
|||
|
|
valign: 'middle' // 上下居中
|
|||
|
|
}
|
|||
|
|
],
|
|||
|
|
onLoadSuccess: function () { //加载成功时执行
|
|||
|
|
adjustBootstrapTableView("addMPoint_table");
|
|||
|
|
},
|
|||
|
|
onLoadError: function () { //加载失败时执行
|
|||
|
|
console.info("加载数据失败");
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
});
|
|||
|
|
|
|||
|
|
})
|
|||
|
|
|
|||
|
|
function dosave() {
|
|||
|
|
var checkedItems = $("#addMPoint_table").bootstrapTable('getSelections');
|
|||
|
|
var ids="";
|
|||
|
|
$.each(checkedItems, function(index, item){
|
|||
|
|
ids+=item.id+",";
|
|||
|
|
});
|
|||
|
|
if(ids==""){
|
|||
|
|
showAlert('d','请先选择记录','addsAlertdiv');
|
|||
|
|
}else{
|
|||
|
|
var informationCode=$('#informationCodeMp').val();
|
|||
|
|
$.post(ext.contextPath + '/alarm/alarmPoint/doMPointSaves.do', {ids:ids,informationCode:informationCode,type:'${param.addType}',unitId:unitId} , function(data) {
|
|||
|
|
$("#pointTable").bootstrapTable('refresh');
|
|||
|
|
closeModal('subModal');
|
|||
|
|
},'json');
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
</script>
|
|||
|
|
<div class="modal fade" id="subModal">
|
|||
|
|
<div class="modal-dialog" style="width: 1200px;">
|
|||
|
|
<div class="modal-content">
|
|||
|
|
<div class="modal-header">
|
|||
|
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
|||
|
|
<span aria-hidden="true">×</span></button>
|
|||
|
|
<h4 class="modal-title">新增</h4>
|
|||
|
|
</div>
|
|||
|
|
<div class="modal-body">
|
|||
|
|
<div id="addsAlertdiv"></div>
|
|||
|
|
<input id="informationCodeMp" name="informationCodeMp" type="hidden" value="${param.informationCodeMp}" />
|
|||
|
|
<div class="form-group form-inline" style="padding:0;">
|
|||
|
|
<div class="form-group pull-left">
|
|||
|
|
<%-- <div class="input-group input-group-sm " style="width: 240px;">--%>
|
|||
|
|
<%-- <label class="control-label" style="float:left;width:25%;line-height: 30px;padding: 0px;">信息标识</label>--%>
|
|||
|
|
<%-- <div class="control-label" style="float:left;width:75%;">--%>
|
|||
|
|
<%-- <select class="form-control select2 " id="informationCode" name ="informationCode" style="width: 100%;" ></select>--%>
|
|||
|
|
<%-- </div>--%>
|
|||
|
|
<%-- </div>--%>
|
|||
|
|
</div>
|
|||
|
|
<div class="form-group pull-right">
|
|||
|
|
<div class="input-group input-group-sm " style="width: 140px;">
|
|||
|
|
<label class="control-label" style="float:left;width:45%;line-height: 30px;padding: 0px;">查询内容</label>
|
|||
|
|
<div class="control-label" style="float:left;width:55%;" >
|
|||
|
|
<select id ="triggerAlarm" name="triggerAlarm" class="form-control select2" style="width:100%;padding: 0px;height: 30px;border-radius:4px;border:1px solid #aaa;" onchange="dosearch();">
|
|||
|
|
<option value="-1" >全部</option>
|
|||
|
|
<option value="1" >预设值</option>
|
|||
|
|
</select>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="input-group input-group-sm " style="width: 120px;">
|
|||
|
|
<label class="control-label" style="float:left;width:30%;line-height: 30px;padding: 0px;">信号</label>
|
|||
|
|
<div class="control-label" style="float:left;width:70%;">
|
|||
|
|
<select id ="signalType" name="signalType" class="form-control select2" style="width:100%;padding: 0px;height: 30px;border-radius:4px;border:1px solid #aaa;" onchange="dosearch();">
|
|||
|
|
<option value="-1" >全部</option>
|
|||
|
|
<option value="AI" >AI</option>
|
|||
|
|
<option value="DI" >DI</option>
|
|||
|
|
</select>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="input-group input-group-sm " style="width: 200px;">
|
|||
|
|
<label class="control-label" style="float:left;width:25%;line-height: 30px;padding: 0px;">工艺段</label>
|
|||
|
|
<div class="control-label" style="float:left;width:75%;">
|
|||
|
|
<select class="form-control select2 " id="processSection" name ="processSection" style="width: 100%;" ></select>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="input-group input-group-sm" style="width: 180px;padding-right: 5px;">
|
|||
|
|
<input type="text" id="search_name" name="search_name" class="form-control pull-right" placeholder="名称">
|
|||
|
|
<div class="input-group-btn">
|
|||
|
|
<button class="btn btn-default" onclick="dosearch();"><i class="fa fa-search"></i></button>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<br>
|
|||
|
|
<table id="addMPoint_table"></table>
|
|||
|
|
</div>
|
|||
|
|
<div class="modal-footer">
|
|||
|
|
<button type="button" class="btn btn-default pull-left" data-dismiss="modal">关闭</button>
|
|||
|
|
<button type="button" class="btn btn-primary" onclick="dosave()" id="btn_save">保存</button>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<!-- /.modal-content -->
|
|||
|
|
</div>
|
|||
|
|
<!-- /.modal-dialog -->
|
|||
|
|
</div>
|