Files
SIPAIIS_WMS_JSSW/WebRoot/jsp/timeefficiency/patrolRecordViewFinishData.jsp

196 lines
6.2 KiB
Plaintext
Raw Permalink Normal View History

2026-01-16 14:13:44 +08:00
<%@ page language="java" pageEncoding="UTF-8"%>
<style type="text/css">
.select2-container .select2-selection--single{
height:34px;
line-height: 34px;
}
.select2-selection__arrow{
margin-top:3px;
}
.div-row{
margin-left:3px;
margin-right:3px;
}
.div-border{
border-style:solid;
border-width:1px;
text-align:center;
}
.right-border{
border-right:none;
}
.top-right-border{
border-top:none;
border-right:none;
}
.top-border{
border-top:none;
}
</style>
<script type="text/javascript">
var patrolPointorEquipment="p";
var showDetailView = function(id) {
if(${PatrolType_Equipment==patrolRecord.type}){
$.post(ext.contextPath + '/timeEfficiency/patrolRecord/viewDetial_Equipment.do', {id:id} , function(data) {
$("#subDiv_recordDetail").html(data);
openModal('subModal_recordDetail');
});
}else{
$.post(ext.contextPath + '/timeEfficiency/patrolRecord/viewDetial.do', {id:id} , function(data) {
$("#subDiv_recordDetail").html(data);
openModal('subModal_recordDetail');
});
}
};
var getRecordStatus = function(status){
switch(status){
case '${Status_Issue}':
return "已下发";
break;
case '${Status_Start}':
return "进行中";
break;
case '${Status_Finish}':
return "已完成";
break;
default:
return "";
}
}
var viewContentsFun = function (patrolRecordId,patrolPointId,unitId) {
$.post(ext.contextPath + '/timeEfficiency/patrolContentsRecord/showPatrolPointViewContentsMeasurepoints.do', { patrolRecordId: patrolRecordId, patrolPointId: patrolPointId, unitId: unitId }, function (data) {
$("#subDiv_contents").html(data);
openModal('subModal_contents');
});
};
var initFun = function () {
$('#table_user').bootstrapTable('destroy');
$("#table_user").bootstrapTable({ // 对应table标签的id
url: ext.contextPath + '/timeEfficiency/patrolRecord/getFinishData.do', // 获取表格数据的url
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
striped: true, //表格显示条纹默认为false
pagination: true, // 在表格底部显示分页组件默认false
pageList: [1000], // 设置页面可以显示的数据条数
pageSize: 1000, // 页面数据条数
pageNumber: 1, // 首页页码
sidePagination: 'server', // 设置为服务器端分页
queryParams: function (params) { // 请求服务器数据时发送的参数可以在这里添加额外的查询参数返回false则终止请求
return {
rows: params.limit, // 每页要显示的数据条数
page: params.offset / params.limit + 1, // 每页显示数据的开始页码
sort: params.sort, // 要排序的字段
order: params.order,
dateType: '${param.dateType}',
selectDate: '${param.selectDate}',
unitId: '${param.unitId}'
}
},
/*onClickRow: function (row) {//单击行事件,执行查看功能
viewFun(row.id);
},*/
/*responseHandler: function(res){
return res.result
},*/
sortName: 'id', // 要排序的字段
sortOrder: 'desc', // 排序规则
//导出配置使用需要单独引用js
//是否显示导出按钮
showExport: false,
//导出表格方式默认basic只导出当前页的表格数据all导出所有数据selected导出选中的数据
exportDataType: "all",
//导出文件类型
exportTypes: ['excel'],
exportOptions:{
worksheetName: '统计', //表格工作区名称
fileName: '人员工单统计'
},
//end
columns: [
{
field: 'userName', // 返回json数据中的name
title: '人名', // 表格表头显示文字
align: 'center', // 左右居中
valign: 'middle', // 上下居中
width: '25%'
},{
field: 'finishNum', // 返回json数据中的name
title: '巡检完成数', // 表格表头显示文字
align: 'center', // 左右居中
valign: 'middle', // 上下居中
width: '25%'
},{
field: 'workingHours', // 返回json数据中的name
title: '工时(分钟)', // 表格表头显示文字
align: 'center', // 左右居中
valign: 'middle', // 上下居中
width: '25%'
},{
field: 'abnormityNum', // 返回json数据中的name
title: '异常上报数', // 表格表头显示文字
align: 'center', // 左右居中
valign: 'middle', // 上下居中
width: '25%'
}
],
onLoadSuccess: function () { //加载成功时执行
adjustBootstrapTableView("table_user");
},
onLoadError: function () { //加载失败时执行
console.info("加载数据失败");
}
});
}
function doExport(){
$('#table_user').tableExport({
type: 'excel',
exportDataType: "all",
//ignoreColumn: [7],//忽略某一列的索引
fileName: '人员巡检统计',//下载文件名称
onCellHtmlData: function (cell, row, col, data){//处理导出内容,自定义某一行、某一列、某个单元格的内容
return data;
},
});
}
$(function(){
var status =getRecordStatus('${patrolRecord.status}')
$('#status').text(status)
initFun();
})
</script>
<div class="modal fade" id="subModal">
<div class="modal-dialog" style="width:900px">
<div class="modal-content">
<!-- <div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span></button>
<h4 class="modal-title">完成详情 &nbsp; &nbsp; ${param.selectDate}</h4>
</div> -->
<div class="modal-body">
<div class="box box-primary" >
<div class="box-header with-border">
<h3 class="box-title">人员数据统计 </h3>
</div>
<div class="box-body ">
<table id="table_user"></table>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" onclick="doExport();">导出</button>
<button type="button" class="btn btn-default " data-dismiss="modal">关闭</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal-dialog -->
</div>