281 lines
12 KiB
Plaintext
281 lines
12 KiB
Plaintext
<%@ page language="java" pageEncoding="UTF-8"%>
|
|
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
|
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
|
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
|
|
<%@ page import="com.sipai.entity.base.ServerObject"%>
|
|
<%@ taglib uri="http://www.springsecurity.org/jsp" prefix="security"%>
|
|
<!DOCTYPE html>
|
|
<!-- <html lang="zh-CN"> -->
|
|
<!-- BEGIN HEAD -->
|
|
<head>
|
|
<title><%= ServerObject.atttable.get("TOPTITLE")%></title>
|
|
<!-- 引用页头及CSS页-->
|
|
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
|
<!-- bootstrap switch -->
|
|
<link rel="stylesheet" href="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/css/bootstrap3/bootstrap-switch.min.css" />
|
|
<script type="text/javascript" src="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/js/bootstrap-switch.min.js" charset="utf-8"></script>
|
|
<!-- 文件上传-->
|
|
<link rel="stylesheet" href="<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/css/fileinput.min.css"/>
|
|
<script type="text/javascript" src="<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/js/fileinput.min.js" charset="utf-8"></script>
|
|
<script type="text/javascript" src="<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/js/locales/zh.js" charset="utf-8"></script>
|
|
<!-- echarts-->
|
|
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/echarts/echarts.js" charset="utf-8"></script>
|
|
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/echarts/macarons.js" charset="utf-8"></script>
|
|
<!-- 引入daterangepicker-->
|
|
<link rel="stylesheet" href="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/daterangepicker.css"/>
|
|
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/moment.min.js" charset="utf-8"></script>
|
|
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/daterangepicker.js" charset="utf-8"></script>
|
|
<!-- TableFreeze表格工具-->
|
|
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/bootstrap-table/TableFreeze.js" charset="utf-8"></script>
|
|
|
|
<script type="text/javascript">
|
|
|
|
var beginTimeStore = '';
|
|
var endTimeStore = '';
|
|
function initDate() {
|
|
//定义locale汉化插件
|
|
var timestatus=$('#timestatus').val();
|
|
var timevalue=$('#timevalue').val();
|
|
|
|
if(timestatus=='1'){
|
|
beginTimeStore = timevalue.substring(0,7);
|
|
endTimeStore = timevalue.substring(8, 15);
|
|
}else{
|
|
beginTimeStore = moment().subtract(0, 'month').format('YYYY-MM');
|
|
endTimeStore = moment().subtract(0, 'month').format('YYYY-MM');
|
|
}
|
|
|
|
var locale = {
|
|
"format": 'YYYY-MM',
|
|
"separator": "~",
|
|
"applyLabel": "确定",
|
|
"cancelLabel": "取消",
|
|
"fromLabel": "起始时间",
|
|
"toLabel": "结束时间'",
|
|
"customRangeLabel": "自定义",
|
|
"weekLabel": "W",
|
|
"daysOfWeek": ["日", "一", "二", "三", "四", "五", "六"],
|
|
"monthNames": ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"],
|
|
"firstDay": 1
|
|
};
|
|
$('#reservationtime').daterangepicker({
|
|
timePicker: false,
|
|
timePicker24Hour: false,
|
|
linkedCalendars: false,
|
|
autoUpdateInput: false,
|
|
showDropdowns: true,
|
|
locale: locale,
|
|
//汉化按钮部分
|
|
ranges: {
|
|
'本月': [moment().startOf('month'), moment().endOf('month').subtract(0, 'month')],
|
|
'上月': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month').subtract(0, 'month')]
|
|
},
|
|
startDate: beginTimeStore,
|
|
endDate: endTimeStore
|
|
}, function(start, end, label) {
|
|
beginTimeStore = start.format(this.locale.format);
|
|
endTimeStore = end.format(this.locale.format);
|
|
if(!this.startDate){
|
|
this.element.val('');
|
|
}else{
|
|
this.element.val(this.startDate.format(this.locale.format) + this.locale.separator + this.endDate.format(this.locale.format));
|
|
}
|
|
dosearch();
|
|
});
|
|
$('#reservationtime').val(beginTimeStore + locale.separator + endTimeStore);
|
|
};
|
|
|
|
|
|
function dosearch() {
|
|
var time=$('#reservationtime').val();
|
|
|
|
window.location.href="showList.do?time="+time+"&bizid="+$('#company_id').val();
|
|
};
|
|
|
|
$(function () {
|
|
initDate();
|
|
var time=$('#reservationtime').val();
|
|
$.post(ext.contextPath + '/report/drainageDataomprehensiveTable/gettable.do',{ time: time,bizid:$('#company_id').val()}, function(result) {
|
|
var htmlstr="";
|
|
htmlstr+=result;
|
|
//console.log(htmlstr);
|
|
$("#table").html(htmlstr);
|
|
})
|
|
});
|
|
|
|
$(document).ready(function(){
|
|
setTimeout(function () {
|
|
freeTable();
|
|
}, 1000);
|
|
});
|
|
|
|
|
|
function freeTable(){
|
|
var table = $("#table"); //获取当前table
|
|
var tableId = table.attr('id'); //table的ID之后作为参数传递
|
|
var freezeRowNum = table.attr('freezeRowNum'); //获取页面table定义的冻结行和列
|
|
var freezeColumnNum = table.attr('freezeColumnNum');
|
|
|
|
if (typeof(freezeRowNum) != 'undefined' || typeof(freezeColumnNum) != 'undefined') {
|
|
freezeTable(table, freezeRowNum || 0, freezeColumnNum || 0, pageWidth()-10, pageHeight()-100);
|
|
|
|
var flag = false;
|
|
$(window).resize(function() {
|
|
if (flag)
|
|
return ;
|
|
|
|
setTimeout(function() {
|
|
adjustTableSize(tableId, pageWidth()-10, pageHeight()-100);
|
|
flag = false;
|
|
}, 100);
|
|
|
|
flag = true;
|
|
});
|
|
}
|
|
}
|
|
|
|
$(function () {
|
|
$.post(ext.contextPath + '/user/getUnitForTree.do', { ng: '' }, function (data) {
|
|
//console.log("data",data);
|
|
if (data.length == 1 && !data[0].hasOwnProperty("nodes")) {
|
|
//当登陆者的pid以下没有子节点时显示单独一个span
|
|
$("#company_id").val(data[0].id);
|
|
$("#companyselect").hide();
|
|
$("#companyName").text("公司:" + data[0].text);
|
|
|
|
} else if ((data.length == 1 && data.node != "") || data.length > 1) {
|
|
//第一次加载时赋值
|
|
|
|
/*$("#company_id").val(data[0].id);
|
|
$("#cname_input").val(data[0].text);*/
|
|
//$table.bootstrapTable('refresh');//异步加载重新刷新,待修改
|
|
$('#companytree').treeview({
|
|
data: data,
|
|
showBorder: false,
|
|
levels: 3
|
|
});
|
|
|
|
|
|
$('#companytree').on('nodeSelected', function (event, data) {
|
|
var nodesnum=0;
|
|
if(data.nodes!=null){
|
|
nodesnum=data.nodes.length;
|
|
}else{
|
|
nodesnum=nodesnum;
|
|
}
|
|
|
|
if(nodesnum>0){
|
|
|
|
}else{
|
|
$("#company_id").val(data.id);
|
|
$("#cname_input").val(data.text);
|
|
document.getElementById('ul_tree').style.display = "none";
|
|
|
|
var time=$('#reservationtime').val();
|
|
var bizid=$('#company_id').val();
|
|
window.location.href="showList.do?time="+time+"&bizid="+bizid;
|
|
}
|
|
|
|
});
|
|
|
|
} else {
|
|
//待完善
|
|
};
|
|
}, 'json');
|
|
|
|
//防止点击树收起下拉框
|
|
$("#ul_tree").on("click", function (e) {
|
|
event.stopPropagation();
|
|
});
|
|
//点击树之外其他区域收起
|
|
$(document).click(function(){
|
|
$("#ul_tree").hide();
|
|
});
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
</script>
|
|
<style >
|
|
table{
|
|
border:1px solid black;
|
|
|
|
}
|
|
table tr td{
|
|
border:1px solid black;
|
|
}
|
|
|
|
ol, ul {
|
|
margin-bottom: 0px;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body onload="initMenu()" class="hold-transition ${cu.themeclass} sidebar-mini" style="overflow-y: hidden" >
|
|
<div class="wrapper" >
|
|
<div class="content-wrapper">
|
|
<!-- Content Header (Page header) -->
|
|
<section class="content-header">
|
|
<h1 id ="head_title"></h1>
|
|
<ol class="breadcrumb">
|
|
<li><a id ='head_firstlevel' href="#"><i class="fa fa-dashboard"></i> </a></li>
|
|
<!-- <li class="active">Here</li> -->
|
|
</ol>
|
|
</section>
|
|
<!-- Main content -->
|
|
<section class="content container-fluid" >
|
|
|
|
<form id="ListForm" method="post" enctype="multipart/form-data">
|
|
<input type="hidden" id="timestatus" name="timestatus" value="${timestatus}">
|
|
<input type="hidden" id="timevalue" name="timevalue" value="${time}">
|
|
<input id="company_id" name="company_id" type="hidden" value="${bizid}" />
|
|
|
|
<div class="form-group form-inline" style="padding:0;">
|
|
<div class="form-group">
|
|
<ul id="companyselect" style="list-style-type:none;padding-left:0px;width:300px;">
|
|
<li class="dropdown" style="width:300px;">
|
|
<!-- Menu toggle button -->
|
|
<a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown" style="width:300px;"
|
|
onclick="document.getElementById('ul_tree').style.display = 'block';">
|
|
<div class="input-group">
|
|
<span class="input-group-addon" style="height:31px;color:#000000;border-top-left-radius: 4px;border-bottom-left-radius: 4px;font-weight:bold">水厂列表:</span>
|
|
<input class="form-control " id="cname_input" name="cname_input" style="height:31px;width: 220px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;" value="${bizname}"
|
|
readonly />
|
|
</div><!-- /input-group -->
|
|
</a>
|
|
<ul id="ul_tree" class="dropdown-menu" data-stopPropagation="true">
|
|
<li class="header">
|
|
<div id="companytree" style="width: 275px;overflow:auto;"></div>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label class="input-lable" > 日期:</label>
|
|
<div class="input-group " >
|
|
<div class="input-group pull-right input-group-sm" >
|
|
<div class="input-group-addon">
|
|
<i class="fa fa-clock-o"></i>
|
|
</div>
|
|
<input type="text" class="form-control" id="reservationtime" style="width:175px">
|
|
<!-- <div class="input-group-btn ">
|
|
<button type="button" class="btn btn-default" onclick="dosearch();" ><i class="fa fa-search"></i> 查询</button>
|
|
</div> -->
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<table id="table" style="width:${monthnum*400+850}px;" freezeColumnNum="2" freezeRowNum="2"></table>
|
|
|
|
|
|
</form>
|
|
</section>
|
|
<!-- /.content -->
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html> |