<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" %>
|
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
|
<html lang="en">
|
|
<head>
|
<meta charset="utf-8">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, shrink-to-fit=no">
|
<title>告警汇总</title>
|
<link href="/hxzkoa/hxzk/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
|
<link href="/hxzkoa/hxzk/assets/img/favicon.ico" rel="icon" type="image/x-icon" />
|
<link href="/hxzkoa/hxzk/assets/css/components/custom-modal.css" rel="stylesheet" type="text/css" />
|
<link href="/hxzkoa/hxzk/assets/css/components/custom-sweetalert.css" rel="stylesheet"
|
type="text/css" />
|
<link href="/hxzkoa/hxzk/assets/css/dashboard/dash_2.css" rel="stylesheet" type="text/css" />
|
<link href="/hxzkoa/hxzk/assets/css/elements/custom-pagination.css" rel="stylesheet" type="text/css" />
|
<link href="/hxzkoa/hxzk/assets/css/loader.css" rel="stylesheet" type="text/css" />
|
<link href="/hxzkoa/hxzk/assets/css/scrollspyNav.css" rel="stylesheet" type="text/css" />
|
<link href="/hxzkoa/hxzk/assets/css/main.css" rel="stylesheet" type="text/css" />
|
<link href="/hxzkoa/hxzk/assets/css/elements/search.css" rel="stylesheet" type="text/css" />
|
<link href="/hxzkoa/hxzk/plugins/apex/apexcharts.css" rel="stylesheet" type="text/css">
|
<link href="/hxzkoa/hxzk/plugins/animate/animate.css" rel="stylesheet" type="text/css" />
|
<link href="/hxzkoa/hxzk/plugins/highlight/styles/monokai-sublime.css" rel="stylesheet"
|
type="text/css" />
|
<link href="/hxzkoa/hxzk/plugins/sweetalerts/sweetalert2.min.css" rel="stylesheet" type="text/css" />
|
<link href="/hxzkoa/hxzk/plugins/sweetalerts/sweetalert.css" rel="stylesheet" type="text/css" />
|
<link href="/hxzkoa/hxzk/plugins/table/datatable/datatables.css" rel="stylesheet" type="text/css">
|
<link href="/hxzkoa/hxzk/plugins/table/datatable/custom_dt_html5.css" rel="stylesheet" type="text/css">
|
|
<link href="/hxzkoa/hxzk/plugins/perfect-scrollbar/perfect-scrollbar.css" rel="stylesheet"
|
type="text/css" />
|
<link href="https://fonts.gstatic.com" rel="preconnect">
|
<link href="https://fonts.googleapis.com/css2?family=Ma+Shan+Zheng&display=swap" rel="stylesheet">
|
<link href="https://fonts.googleapis.com/css?family=Quicksand:400,500,600,700&display=swap"
|
rel="stylesheet">
|
<style>
|
</style>
|
<script src="/hxzkoa/hxzk/assets/js/app.js"></script>
|
<script src="/hxzkoa/hxzk/assets/js/dashboard/dash_2.js"></script>
|
<script src="/hxzkoa/hxzk/assets/js/loader.js"></script>
|
<script src="/hxzkoa/hxzk/assets/js/libs/jquery-3.1.1.min.js"></script>
|
<script src="/hxzkoa/hxzk/bootstrap/js/bootstrap.min.js"></script>
|
<script src="/hxzkoa/hxzk/bootstrap/js/popper.min.js"></script>
|
<script src="/hxzkoa/hxzk/plugins/apex/apexcharts.min.js"></script>
|
<script src="/hxzkoa/hxzk/plugins/table/datatable/button-ext/jszip.min.js"></script>
|
<script src="/hxzkoa/hxzk/plugins/table/jquery.table2excel.js"></script>
|
<script src="/hxzkoa/hxzk/plugins/sweetalerts/promise-polyfill.js"></script>
|
<script src="/hxzkoa/hxzk/plugins/sweetalerts/sweetalert2.min.js"></script>
|
<script src="/hxzkoa/hxzk/plugins/sweetalerts/custom-sweetalert.js"></script>
|
<script src="/hxzkoa/hxzk/plugins/perfect-scrollbar/perfect-scrollbar.min.js"></script>
|
</head>
|
<style>
|
tr:first-child,
|
tr:last-child{
|
position: sticky;
|
background: #F4F4F5;
|
border-left: 1px solid #DDDDDD ;
|
}
|
thead tr {
|
position: sticky;
|
top: 0;
|
background: #F4F4F5;
|
height: 30px;
|
}
|
|
tr:first-child {
|
z-index: 3;
|
/*左上角单元格z-index,切记要设置,不然表格纵向横向滚动时会被该单元格右方或者下方的单元格遮挡*/
|
background: #F4F4F5;
|
}
|
.panel-head {
|
font-size: 1rem;
|
color: rgba(255, 255, 255, .7);
|
line-height: 2rem;
|
text-align: center;
|
background: linear-gradient(rgb(0, 20, 30), rgb(0, 40, 70));
|
border: 2px solid rgba(0, 90, 120, .3);
|
}
|
</style>
|
<body>
|
|
<table id="html5-extension" class="table table-hover" style="width: 760px">
|
<thead>
|
<div class='panel-head'>SOS信息</div>
|
<tr align="center">
|
<th style="color: #029890">序号</th>
|
<th style="color: #029890">警告类型</th>
|
<th style="color: #029890">设备id</th>
|
<th style="color: #029890">处理情况</th>
|
</tr>
|
</thead>
|
<tbody style="background-color: #46535B;">
|
<c:forEach items="${warningSummaryList}" var="list">
|
<tr align="center">
|
<td style="color: white">${list.id}</td>
|
<td style="color: white">${list.type}</td>
|
<td style="color: white">${list.objectid}</td>
|
<td style="color: white">${list.status}</td>
|
</tr>
|
</c:forEach>
|
</tbody>
|
</table>
|
<% String superuser=(String) session.getAttribute("superuser"); String deleteq=(String)
|
session.getAttribute("deleteq"); String alertq=(String) session.getAttribute("alertq"); String
|
deleteall=(String) session.getAttribute("deleteall"); String username=(String)
|
session.getAttribute("username"); if (username==null || username.equals("")) {
|
request.getRequestDispatcher("/hxzk/login.jsp").forward(request, response); return; } %>
|
<input type="hidden" name="superuser" id="superuser" value="<%=superuser%>">
|
<input type="hidden" name="deleteq" id="deleteq" value="<%=deleteq%>">
|
<input type="hidden" name="alertq" id="alertq" value="<%=alertq%>">
|
<input type="hidden" name="deleteall" id="deleteall" value="<%=deleteall%>">
|
<input type="hidden" name="xianusera" id="xianusera" value="<%=username%>">
|
<!-- END MAIN CONTAINER -->
|
<script>
|
// 页面初始化
|
window.onload = function () {
|
App.init();
|
$.ajax({
|
async: false,
|
type: "POST",
|
url: "/hxzkoa/getSysSetting_list2.do",
|
data: {},
|
dataType: "json",
|
success: function (data) {
|
/* title = data[0].title; document.title = title; */
|
if (data.dataList2[0].label == 0) {
|
$("#labela").css({ 'display': 'none' });
|
};
|
if (data.dataList2[0].achor == 0) {
|
$("#anchora").css({ 'display': 'none' });
|
};
|
if (data.dataList2[0].gps == 0) {
|
$("#gpsa").css({ 'display': 'none' });
|
};
|
if (data.dataList2[0].fence == 0) {
|
$("#fencea").css({ 'display': 'none' });
|
};
|
if (data.dataList2[0].warning == 0) {
|
$("#warninga").css({ 'display': 'none' });
|
};
|
if (data.dataList2[0].history == 0) {
|
$("#historya").css({ 'display': 'none' });
|
};
|
if (data.dataList2[0].attendance == 0) {
|
$("#attendancea").css({ 'display': 'none' });
|
};
|
if (data.dataList2[0].basiclnfo == 0) {
|
$("#basiclnfoa").css({ 'display': 'none' });
|
};
|
if (data.dataList2[0].video == 0) {
|
$("#videoa").css({ 'display': 'none' });
|
};
|
if (data.dataList2[0].gas == 0) {
|
$("#gasa").css({ 'display': 'none' });
|
};
|
},
|
});
|
$("#page_1").addClass("active");
|
var superuser = document.getElementById("superuser").value;
|
var deleteq = document.getElementById("deleteq").value;
|
var alertq = document.getElementById("alertq").value;
|
var deleteall = document.getElementById("deleteall").value;
|
document.getElementById("xianuser").innerHTML=document.getElementById("xianusera").value
|
//console.log(superuser)
|
if (superuser == "访客") {
|
$("#addButton").attr("disabled", "true");
|
$("#deleteButton").attr("disabled", "true");
|
$("#modifyButton").attr("disabled", "true");
|
$("#deleteAllButton").attr("disabled", "true");
|
$("#modifyAllButton").attr("disabled", "true");
|
$("#importButton").attr("disabled", "true");
|
}
|
if (deleteq == "否") {
|
$("#deleteButton").attr("disabled", "true");
|
}
|
if (alertq == "否") {
|
$("#modifyButton").attr("disabled", "true");
|
$("#modifyAllButton").attr("disabled", "true");
|
}
|
if (deleteall == "否") {
|
$("#deleteAllButton").attr("disabled", "true");
|
}
|
};
|
// 加载head复用页面
|
$('.header-page').load('/hxzkoa/hxzk/top.html'); $('.login-page').load('/hxzkoa/hxzk/head.html');
|
// 刷新功能
|
$(".reset").click(function () {
|
setTimeout("window.location.reload()", 1000);
|
});
|
// 搜索功能
|
$(".search").click(function () {
|
var input = $("#search_input").val();
|
if (input == "") {
|
swal('输入有误', '输入不能为空!', 'error'); return;
|
}
|
if (isNaN(input)) {
|
//swal('输入有误','请输入数字!','error');return;
|
}
|
$.ajax({
|
async: false, //同步的
|
type: "POST",
|
url: "/hxzkoa/warningSummary_search.do",
|
data: {
|
input: input
|
},
|
dataType: "json",
|
success: function (data) {
|
//搜索完成后刷新页面,只显示查到的部分
|
var str = "";
|
for (var k in data.dataList) {
|
if (data.dataList[k].status == '未处理') {
|
str += "<tr align=\"center\"><td class=\"noExl custom-control custom-checkbox\"><input type=\"checkbox\" class=\"custom-control-input\" id=" + data.dataList[k].id + " name=\"selectIds\"><input type=\"hidden\" class=\"custom-control-input\" value=" + data.dataList[k].objectid + " name=\"objectids\"><input type=\"hidden\" class=\"custom-control-input\" value=" + data.dataList[k].status + " name=\"statuss\"><label class=\"custom-control-label\" for=" + data.dataList[k].id + " style=\"position:raletive;left:20px;bottom:5px;\"></label></td><td>" + data.dataList[k].id + "</td><td>" + data.dataList[k].type + "</td><td>" + data.dataList[k].objectid + "</td><td>" + data.dataList[k].status + "</td><td class=\"noExl\">" + "<img src=\"hxzk/image/icon/未处理.png\"/>" + "</td><td>" + data.dataList[k].time + "</td><td>" + data.dataList[k].baoliu1 + "</td></tr>";
|
} else {
|
str += "<tr align=\"center\"><td class=\"noExl custom-control custom-checkbox\"><input type=\"checkbox\" class=\"custom-control-input\" id=" + data.dataList[k].id + " name=\"selectIds\"><input type=\"hidden\" class=\"custom-control-input\" value=" + data.dataList[k].objectid + " name=\"objectids\"><input type=\"hidden\" class=\"custom-control-input\" value=" + data.dataList[k].status + " name=\"statuss\"><label class=\"custom-control-label\" for=" + data.dataList[k].id + " style=\"position:raletive;left:20px;bottom:5px;\"></label></td><td>" + data.dataList[k].id + "</td><td>" + data.dataList[k].type + "</td><td>" + data.dataList[k].objectid + "</td><td>" + data.dataList[k].status + "</td><td class=\"noExl\">" + "<img src=\"hxzk/image/icon/已处理.png\"/>" + "</td><td>" + data.dataList[k].time + "</td><td>" + data.dataList[k].baoliu1 + "</td></tr>";
|
}
|
}
|
$("#nr").html(str);
|
if (!data.pageList.length == 0) {
|
str = "";
|
str += "<li><a href=\"javascript:page('pre');\">上一页</a></li>";
|
for (var k = 0; k < data.pageList.length; k++) {
|
str += "<li id=\"page_" + data.pageList[k] + "\"><a href=\"javascript:page('" + data.pageList[k] + "');\">" + data.pageList[k] + "</a></li>";
|
}
|
str += "<li><a href=\"javascript:page('next');\">下一页</a></li>";
|
$("#pageListId").html(str);
|
}
|
$("#pageListId>li.active").removeClass("active");
|
$("#page_" + data.curPage).addClass("active");
|
$("#curPage").val(data.curPage);
|
},
|
error: function () {
|
//console.log('error');
|
}
|
});
|
});
|
// 处理
|
$(".handle").click(function () {
|
var checkVal = [];
|
var types = [];
|
var obj = document.getElementsByName("selectIds");
|
var tagids = document.getElementsByName("objectids");
|
var statuss = document.getElementsByName("statuss");
|
var type = document.getElementsByName("type");
|
var flag = 0
|
//console.log(tagids[0].value);
|
for (var k in obj) {
|
if (obj[k].checked) {
|
checkVal.push(tagids[k].value);
|
types.push(type[k].value);
|
if (statuss[k].value == "未处理") {
|
flag = 1
|
}
|
}
|
}
|
if (checkVal.length > 0) {
|
//console.log(flag)
|
if (flag == 0) {
|
swal({
|
title: "Handled!",
|
text: "已经处理不用重复处理!",
|
type: "error",
|
showCancelButton: false,
|
showConfirmButton: false,
|
buttons: false,
|
timer: 3000
|
})
|
return
|
}
|
$.ajax({
|
async: false, //同步的
|
type: "POST",
|
url: "/hxzkoa/historicalWarning_handle.do",
|
data: {
|
checkVal: checkVal.toString(),
|
types: types.toString()
|
},
|
dataType: "json"
|
});
|
swal({
|
title: "Handled!",
|
text: "处理成功!将在1分中后更新数据",
|
type: "success",
|
showCancelButton: false,
|
showConfirmButton: false,
|
buttons: false
|
})
|
setTimeout("window.location.reload()", 1000);
|
} else {
|
swal(
|
'处理失败!',
|
'请先选择处理的内容',
|
'error'
|
)
|
}
|
});
|
// 全部处理
|
$(".handleAll").click(function () {
|
swal({
|
title: '确定要全部处理么?',
|
text: "选择全部处理将会处理列表中所有数据!",
|
type: 'warning',
|
showCancelButton: true,
|
confirmButtonText: '确定',
|
cancelButtonText: '取消',
|
padding: '2em'
|
}).then(function (result) {
|
if (result.value) {
|
var checkVal = [];
|
var obj = document.getElementsByName("selectIds");
|
for (var k in obj) {
|
checkVal.push(obj[k].id);
|
}
|
if (checkVal.length > 0) {
|
$.ajax({
|
async: false, //同步的
|
type: "POST",
|
url: "/hxzkoa/historicalWarning_handleAll.do",
|
data: {
|
checkVal: checkVal.toString()
|
},
|
dataType: "json"
|
});
|
swal({
|
title: "Handled!",
|
text: "处理成功!将在1分中后更新数据",
|
type: "success",
|
showCancelButton: false,
|
showConfirmButton: false,
|
buttons: false
|
})
|
setTimeout("window.location.reload()", 1000);
|
} else {
|
swal(
|
'处理失败!',
|
'列表中数据为空',
|
'error'
|
)
|
}
|
}
|
})
|
});
|
// 删除
|
$('.delete').on('click', function () {
|
swal({
|
title: '确定要删除么?',
|
text: "删除之后无法恢复!",
|
type: 'warning',
|
showCancelButton: true,
|
confirmButtonText: '删除',
|
cancelButtonText: '取消',
|
padding: '2em'
|
}).then(function (result) {
|
if (result.value) {
|
//获取选中数据
|
var checkVal = [];
|
var tagids = [];
|
var types = [];
|
var obj = document.getElementsByName("selectIds");
|
var tagid = document.getElementsByName("objectids");
|
var type = document.getElementsByName("type");
|
for (var k in obj) {
|
if (obj[k].checked) {
|
checkVal.push(obj[k].id);
|
tagids.push(tagid[k].value);
|
types.push(type[k].value);
|
}
|
}
|
console.log(tagids)
|
if (checkVal.length > 0) {
|
$.ajax({
|
async: false, //同步的
|
type: "POST",
|
url: "/hxzkoa/Warning_delete.do",
|
data: {
|
checkVal: checkVal.toString(),
|
tagids: tagids.toString(),
|
types: types.toString()
|
},
|
dataType: "json"
|
});
|
swal({
|
title: "Deleted!",
|
text: "删除成功!",
|
type: "success",
|
showCancelButton: false,
|
showConfirmButton: false,
|
buttons: false
|
})
|
setTimeout("window.location.reload()", 1000);
|
} else {
|
swal(
|
'删除失败!',
|
'请先选择删除的内容',
|
'error'
|
)
|
}
|
}
|
})
|
});
|
// 全部删除
|
$('.deleteAll').on('click', function () {
|
swal({
|
title: '确定要全部删除么?',
|
text: "删除之后无法恢复!",
|
type: 'warning',
|
showCancelButton: true,
|
confirmButtonText: '删除',
|
cancelButtonText: '取消',
|
padding: '2em'
|
}).then(function (result) {
|
if (result.value) {
|
//获取选中数据
|
var checkVal = [];
|
var obj = document.getElementsByName("selectIds");
|
for (var k in obj) {
|
if (obj[k].checked) {
|
checkVal.push(obj[k].id);
|
}
|
}
|
var fenlei = $("#shaileixing").val()
|
$.ajax({
|
async: false, //同步的
|
type: "POST",
|
url: "/hxzkoa/Warning_deleteAll.do",
|
data: {
|
checkVal: checkVal.toString(),
|
fenlei: fenlei,
|
},
|
dataType: "json"
|
});
|
swal({
|
title: "Deleted!",
|
text: "删除成功!",
|
type: "success",
|
showCancelButton: false,
|
showConfirmButton: false,
|
buttons: false
|
})
|
setTimeout("window.location.reload()", 1000);
|
}
|
})
|
});
|
// 导出表格
|
$(".toAllExcel").click(function () {
|
window.location.href = '/hxzkoa/warningSummary_export.do';
|
swal({
|
title: "Exported!",
|
text: "导出成功!",
|
type: "success",
|
showCancelButton: false,
|
showConfirmButton: false,
|
buttons: false
|
})
|
setTimeout("window.location.reload()", 1000);
|
});
|
//分类查询
|
function fenlei() {
|
var shaileixing = document.getElementById("shaileixing").value;
|
var shaizhuangtai = document.getElementById("shaizhuangtai").value;
|
if (shaileixing == '全部') {
|
if (shaizhuangtai == '全部') {
|
window.location.reload();
|
} else {
|
$.ajax({
|
async: false, //同步的
|
type: "POST",
|
url: "/hxzkoa/shaizhuangtai.do",
|
data: {
|
fenlei: shaizhuangtai,
|
},
|
dataType: "json",
|
success: function (data) {
|
var str = "";
|
for (var k in data.dataList) {
|
if (data.dataList[k].status == '未处理') {
|
str += "<tr align=\"center\"><td class=\"noExl custom-control custom-checkbox\"><input type=\"checkbox\" class=\"custom-control-input\" id=" + data.dataList[k].id + " name=\"selectIds\"><input type=\"hidden\" class=\"custom-control-input\" value=" + data.dataList[k].objectid + " name=\"objectids\"><input type=\"hidden\" class=\"custom-control-input\" value=" + data.dataList[k].status + " name=\"statuss\"><label class=\"custom-control-label\" for=" + data.dataList[k].id + " style=\"position:raletive;left:20px;bottom:5px;\"></label></td><td>" + data.dataList[k].id + "</td><td>" + data.dataList[k].type + "</td><td>" + data.dataList[k].objectid + "</td><td>" + data.dataList[k].status + "</td><td class=\"noExl\">" + "<img src=\"hxzk/image/icon/未处理.png\"/>" + "</td><td>" + data.dataList[k].time + "</td><td>" + data.dataList[k].baoliu1 + "</td></tr>";
|
} else {
|
str += "<tr align=\"center\"><td class=\"noExl custom-control custom-checkbox\"><input type=\"checkbox\" class=\"custom-control-input\" id=" + data.dataList[k].id + " name=\"selectIds\"><input type=\"hidden\" class=\"custom-control-input\" value=" + data.dataList[k].objectid + " name=\"objectids\"><input type=\"hidden\" class=\"custom-control-input\" value=" + data.dataList[k].status + " name=\"statuss\"><label class=\"custom-control-label\" for=" + data.dataList[k].id + " style=\"position:raletive;left:20px;bottom:5px;\"></label></td><td>" + data.dataList[k].id + "</td><td>" + data.dataList[k].type + "</td><td>" + data.dataList[k].objectid + "</td><td>" + data.dataList[k].status + "</td><td class=\"noExl\">" + "<img src=\"hxzk/image/icon/已处理.png\"/>" + "</td><td>" + data.dataList[k].time + "</td><td>" + data.dataList[k].baoliu1 + "</td></tr>";
|
}
|
}
|
$("#nr").html(str);
|
},
|
error: function () {
|
console.log('error');
|
}
|
});
|
}
|
} else if (shaizhuangtai == '全部') {
|
$.ajax({
|
async: false, //同步的
|
type: "POST",
|
url: "/hxzkoa/shaileixing.do",
|
data: {
|
fenlei: shaileixing,
|
},
|
dataType: "json",
|
success: function (data) {
|
var str = "";
|
for (var k in data.dataList) {
|
if (data.dataList[k].status == '未处理') {
|
str += "<tr align=\"center\"><td class=\"noExl custom-control custom-checkbox\"><input type=\"checkbox\" class=\"custom-control-input\" id=" + data.dataList[k].id + " name=\"selectIds\"><input type=\"hidden\" class=\"custom-control-input\" value=" + data.dataList[k].objectid + " name=\"objectids\"><input type=\"hidden\" class=\"custom-control-input\" value=" + data.dataList[k].status + " name=\"statuss\"><label class=\"custom-control-label\" for=" + data.dataList[k].id + " style=\"position:raletive;left:20px;bottom:5px;\"></label></td><td>" + data.dataList[k].id + "</td><td>" + data.dataList[k].type + "</td><td>" + data.dataList[k].objectid + "</td><td>" + data.dataList[k].status + "</td><td class=\"noExl\">" + "<img src=\"hxzk/image/icon/未处理.png\"/>" + "</td><td>" + data.dataList[k].time + "</td><td>" + data.dataList[k].baoliu1 + "</td></tr>";
|
} else {
|
str += "<tr align=\"center\"><td class=\"noExl custom-control custom-checkbox\"><input type=\"checkbox\" class=\"custom-control-input\" id=" + data.dataList[k].id + " name=\"selectIds\"><input type=\"hidden\" class=\"custom-control-input\" value=" + data.dataList[k].objectid + " name=\"objectids\"><input type=\"hidden\" class=\"custom-control-input\" value=" + data.dataList[k].status + " name=\"statuss\"><label class=\"custom-control-label\" for=" + data.dataList[k].id + " style=\"position:raletive;left:20px;bottom:5px;\"></label></td><td>" + data.dataList[k].id + "</td><td>" + data.dataList[k].type + "</td><td>" + data.dataList[k].objectid + "</td><td>" + data.dataList[k].status + "</td><td class=\"noExl\">" + "<img src=\"hxzk/image/icon/已处理.png\"/>" + "</td><td>" + data.dataList[k].time + "</td><td>" + data.dataList[k].baoliu1 + "</td></tr>";
|
}
|
}
|
$("#nr").html(str);
|
},
|
error: function () {
|
console.log('error');
|
}
|
});
|
} else {
|
$.ajax({
|
async: false, //同步的
|
type: "POST",
|
url: "/hxzkoa/shuangshai.do",
|
data: {
|
fenlei: shaileixing,
|
fenlei2: shaizhuangtai
|
},
|
dataType: "json",
|
success: function (data) {
|
var str = "";
|
for (var k in data.dataList) {
|
if (data.dataList[k].status == '未处理') {
|
str += "<tr align=\"center\"><td class=\"noExl custom-control custom-checkbox\"><input type=\"checkbox\" class=\"custom-control-input\" id=" + data.dataList[k].id + " name=\"selectIds\"><input type=\"hidden\" class=\"custom-control-input\" value=" + data.dataList[k].objectid + " name=\"objectids\"><input type=\"hidden\" class=\"custom-control-input\" value=" + data.dataList[k].status + " name=\"statuss\"><label class=\"custom-control-label\" for=" + data.dataList[k].id + " style=\"position:raletive;left:20px;bottom:5px;\"></label></td><td>" + data.dataList[k].id + "</td><td>" + data.dataList[k].type + "</td><td>" + data.dataList[k].objectid + "</td><td>" + data.dataList[k].status + "</td><td class=\"noExl\">" + "<img src=\"hxzk/image/icon/未处理.png\"/>" + "</td><td>" + data.dataList[k].time + "</td><td>" + data.dataList[k].baoliu1 + "</td></tr>";
|
} else {
|
str += "<tr align=\"center\"><td class=\"noExl custom-control custom-checkbox\"><input type=\"checkbox\" class=\"custom-control-input\" id=" + data.dataList[k].id + " name=\"selectIds\"><input type=\"hidden\" class=\"custom-control-input\" value=" + data.dataList[k].objectid + " name=\"objectids\"><input type=\"hidden\" class=\"custom-control-input\" value=" + data.dataList[k].status + " name=\"statuss\"><label class=\"custom-control-label\" for=" + data.dataList[k].id + " style=\"position:raletive;left:20px;bottom:5px;\"></label></td><td>" + data.dataList[k].id + "</td><td>" + data.dataList[k].type + "</td><td>" + data.dataList[k].objectid + "</td><td>" + data.dataList[k].status + "</td><td class=\"noExl\">" + "<img src=\"hxzk/image/icon/已处理.png\"/>" + "</td><td>" + data.dataList[k].time + "</td><td>" + data.dataList[k].baoliu1 + "</td></tr>";
|
}
|
}
|
$("#nr").html(str);
|
},
|
error: function () {
|
console.log('error');
|
}
|
});
|
}
|
}
|
$(".table tbody").on('click', 'tr', function (e) {
|
//console.log(e.target.type)
|
if (e.target.type != 'checkbox') {
|
if ($(this).find(":checkbox").prop("checked") == true) {
|
$(this).find(":checkbox").prop("checked", false);
|
} else {
|
$(this).find(":checkbox").prop("checked", true);
|
}
|
} else {
|
return false;
|
}
|
});
|
|
</script>
|
</body>
|
|
</html>
|