first commit
This commit is contained in:
123
WebRoot/jsp/alarm/alarmSysSubscribePointList.jsp
Normal file
123
WebRoot/jsp/alarm/alarmSysSubscribePointList.jsp
Normal file
@ -0,0 +1,123 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
|
||||
<%@page import="com.sipai.entity.alarm.AlarmPoint" %>
|
||||
<% request.setAttribute("Type_MPoint", AlarmPoint.Type_MPoint);%>
|
||||
|
||||
<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 () {
|
||||
$("#pointTable").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/alarm/alarmPoint/getlistForSubscribeSys.do', // 获取表格数据的url
|
||||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
pageList: [10, 20, 50], // 设置页面可以显示的数据条数
|
||||
pageSize: 10, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
sidePagination: 'server', // 设置为服务器端分页
|
||||
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
||||
return {
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset / params.limit + 1, // 每页显示数据的开始页码
|
||||
sort: params.sort, // 要排序的字段
|
||||
order: params.order,
|
||||
unitId: unitId,
|
||||
informationCode:'${param.code}'
|
||||
}
|
||||
},
|
||||
sortName: 'alarm_point', // 要排序的字段
|
||||
sortOrder: 'asc', // 排序规则
|
||||
onClickRow: function (row) {//单击行事件,执行查看功能
|
||||
// viewFun(row.id);
|
||||
},
|
||||
columns: [
|
||||
{
|
||||
field: 'alarmPointName', // 返回json数据中的name
|
||||
title: '报警点名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function () { //加载成功时执行
|
||||
adjustBootstrapTableView("pointTable");
|
||||
},
|
||||
onLoadError: function () { //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
var deletePointFun = function (id) {
|
||||
stopBubbleDefaultEvent();
|
||||
swal({
|
||||
text: "您确定要删除此记录?",
|
||||
dangerMode: true,
|
||||
buttons: {
|
||||
cancel: {
|
||||
text: "取消",
|
||||
value: null,
|
||||
visible: true,
|
||||
className: "btn btn-default btn-sm",
|
||||
closeModal: true,
|
||||
},
|
||||
confirm: {
|
||||
text: "确定",
|
||||
value: true,
|
||||
visible: true,
|
||||
className: "btn btn-danger btn-sm",
|
||||
closeModal: true
|
||||
}
|
||||
}
|
||||
})
|
||||
.then(function (willDelete) {
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/alarm/alarmPoint/dodelete.do', {id: id}, function (data) {
|
||||
if (data.code == 1) {
|
||||
$("#pointTable").bootstrapTable('refresh');
|
||||
} else {
|
||||
showAlert('d', data.msg, 'mainAlertdiv');
|
||||
}
|
||||
}, 'json');
|
||||
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
</script>
|
||||
<div class="box box-primary">
|
||||
<!-- /.box-header -->
|
||||
<div class="box box-solid">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">报警点列表</h3>
|
||||
<div class="box-tools pull-right">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="box-body ">
|
||||
<div>
|
||||
<div class="btn-group" style="width: 220px;padding-bottom:10px;">
|
||||
<%-- <button type="button" class="btn btn-default" onclick="addMpPointFun();"><i class="fa fa-plus"></i>--%>
|
||||
<%-- 新增测量点--%>
|
||||
<%-- </button>--%>
|
||||
<%-- <button type="button" class="btn btn-default" onclick="deletePointFuns();"><i--%>
|
||||
<%-- class="fa fa-trash-o"></i> 删除--%>
|
||||
<%-- </button>--%>
|
||||
</div>
|
||||
<br>
|
||||
<table id="pointTable"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user