Files
SIPAIIS_WMS_JSSW/WebRoot/jsp/timeefficiency/patrolRecordCalendar.jsp
2026-01-16 14:13:44 +08:00

577 lines
35 KiB
Plaintext
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<%@page import="com.sipai.entity.timeefficiency.PatrolRecord" %>
<%@ 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>
<link rel="stylesheet" href="<%=request.getContextPath()%>/node_modules/fullcalendar/dist/fullcalendar.min.css"/>
<link rel="stylesheet"
href="<%=request.getContextPath()%>/node_modules/fullcalendar/dist/fullcalendar.print.min.css" media='print'/>
<script type="text/javascript" src="<%=request.getContextPath()%>/node_modules/moment/min/moment.min.js"
charset="utf-8"></script>
<script type="text/javascript"
src="<%=request.getContextPath()%>/node_modules/fullcalendar/dist/fullcalendar.min.js"
charset="utf-8"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/node_modules/fullcalendar/dist/locale/zh-cn.js"
charset="utf-8"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/JS/baiduMapGL/TrackAnimation.min.js"
charset="utf-8"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/JS/baiduMapGL/apiv1.3.js"
charset="utf-8"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/JS/baiduMapGL/Lushu.min.js"
charset="utf-8"></script>
<%--文件上传 minio--%>
<script type="text/javascript" src="<%=request.getContextPath()%>/JS/commonFile.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()%>/JS/commonFileUpload.js" charset="utf-8"></script>
<script type="text/javascript">
document.write("<scr" + "ipt src=\"<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/js/fileinput.min.js\"></sc" + "ript>")
document.write("<scr" + "ipt src=\"<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/js/locales/zh.js\"></sc" + "ript>")
</script>
<%-- <script type="text/javascript" src="<%=request.getContextPath()%>/JS/baiduMap/apiv2.0.3.min.js" charset="utf-8"></script>--%>
<%-- <script type="text/javascript" src="<%=request.getContextPath()%>/JS/baiduMap/LuShu_min.js" charset="utf-8"></script>--%>
<%-- <script type="text/javascript" src="<%=request.getContextPath()%>/JS/baiduMap/findtiles.js" charset="utf-8"></script>--%>
<%-- <script type="text/javascript" src="<%=request.getContextPath()%>/JS/baiduMap/area.js" charset="utf-8"></script>--%>
<style type="text/css">
/*
解决了右边框每次加17px问题
*/
body.modal-open {
overflow-y: auto !important;
padding-right: 0 !important;
}
/*
解决背景颜色加深问题
*/
/*.modal-backdrop {
opacity: 0 !important;
filter: alpha(opacity=0) !important;
}*/
/*
文字大小
*/
.fc-event {
font-size: 0.8em;
}
#titleId {
color: green;
}
.left {
display:inline-block;
}
.right {
display:inline-block;
float: right;
}
#wancheng100 {
background-color:#e2fad4;
}
#weiwancheng {
background-color:#fff0b8;
}
/*.fc-event .fc-content{
padding: 20px;
}*/
@media (min-width: 400px) and (min-height: 300px) {
.fc-event {
font-size: 0.2em;
}
.fc-day-number {
font-size: 0.2em;
}
}
@media (min-width: 768px) and (min-height: 432px) {
.fc-event {
font-size: 0.4em;
}
.fc-day-number {
font-size: 0.4em;
}
}
@media (min-width: 992px) and (min-height: 558px) {
.fc-event {
font-size: 0.6em;
}
.fc-day-number {
font-size: 0.6em;
}
}
@media (min-width: 1200px) and (min-height: 675px) {
.fc-event {
font-size: 0.6em;
}
.fc-day-number {
font-size: 0.6em;
}
}
@media (min-width: 1400px) and (min-height: 875px) {
.fc-event {
font-size: 0.8em;
}
.fc-day-number {
font-size: 0.8em;
}
}
@media (min-width: 1500px) and (min-height: 975px) {
.fc-event {
font-size: 1em;
}
.fc-day-number {
font-size: 1em;
}
}
@media (min-width: 1600px) and (min-height: 1075px) {
.fc-event {
font-size: 1em;
}
.fc-day-number {
font-size: 1em;
}
}
@media (min-width: 1800px) and (min-height: 1275px) {
.fc-event {
font-size: 1.2em;
}
.fc-day-number {
font-size: 1.2em;
}
}
p {
margin: 0 0 0 0;
/*padding: 0;*/
/*text-indent: 2em;*/
line-height: 150%;
}
.date-picker-wrap {
position: absolute;
right: 18px;
z-index: 10;
padding-top: 15px;
}
li{
list-style-type: none;
}
</style>
<script type="text/javascript">
//为了平台和APP统一接收unitId
var company_id = '';
/*
指定日期巡检任务列表
*/
var recordListFun = function (sdt, type) {
$.post(ext.contextPath + '/timeEfficiency/patrolRecord/viewList.do', {
patrolDate: sdt,
type: type,
unitId: company_id
}, function (data) {
$("#subDiv_calendar").html(data);
openModal('subModal_List');
});
}
var dosearch = function () {
$('#calendar').fullCalendar('refetchEvents');
};
$(function () {
initAll();
$("#monthDt").datetimepicker({
keyboardNavigation: false,
language: 'zh-CN',
forceParse: false,
autoclose: true,
todayBtn: true,
clearBtn: true,
startView: 3,
minView : 3,
maxView : 4,
format: 'yyyy-mm',
endDate: new Date(),
}).on('changeDate', function () {
var date = new Date($("#monthDt").val());
$('#calendar').fullCalendar('gotoDate', date);
});
});
function initAll() {
if ('${param.unitId}' != null && '${param.unitId}' != '') {
//上位机请求
company_id = '${param.unitId}';
} else {
//平台正常请求
company_id = unitId;
}
var nowdate = '${param.selectDate}';
if (nowdate != null && nowdate != '') {
} else {
nowdate = '${nowdate}';
}
$('#calendar').fullCalendar({
header: {
left: 'prev,next today',
center: 'title',
right: ''
},
defaultDate: nowdate,
timeFormat: 'HH:mm',  //定义表格中显示的时间格式如2230默认格式为HH(:mm)效果是整点的时候自动隐藏分钟例如2300会显示成23
displayEventEnd: true,  //显示事件的结束时间默认是false
aspectRatio: 1.3,     //设置日历单元格显示的宽高比,数值越小越窄高
navLinks: true, // can click day/week names to navigate views
eventLimit: true, // allow "more" link when too many events
editable: false,     //允许编辑
eventStartEditable: false,   //允许直接在界面中编辑事件的开始时间
eventDurationEditable: false,    //允许编辑事件的时长
events: function (start, end, timezone, callback) {    //单击日历中事件时触发的函数,实现效果是获取当前点击事件的标题,开始时间,结束时间传给DOM控件
var events = [];
/* var starttime = moment(calEvent.start).format('YYYY-MM-DD HH:mm:ss');   //使用moment.js对时间进行格式化
var endtime = moment(calEvent.end).format('YYYY-MM-DD HH:mm:ss'); */
$.post(ext.contextPath + '/timeEfficiency/patrolRecord/getListForCalendar.do', {
sdt: start.format(),
edt: end.format(),
unitId: company_id,
type: '${type}'
}, function (data) {
var changeNum = -1;
var lastPatrolPlanId = "";
var str = data.result;
//获取今天的时间
var day1 = new Date();
day1.setDate(day1.getDate());
var todayformat = day1.format("yyyy-MM-dd");
var todayStr = todayformat;
for (var i = 0; i < str.length; i++) {
var obj = new Object();
var imgstr = '';
if (str[i].doRate != null && str[i].doRate == '100') {
imgstr = 'workrecord1';
} else {
imgstr = 'workrecord2';
}
var renwuimgstr = '';
if (str[i].doRate != null && str[i].doRate == '100') {
renwuimgstr = 'wancheng100';
} else {
renwuimgstr = 'weiwancheng';
}
var renwudivstr = '';
if (str[i].doRate != null && str[i].doRate == '100') {
renwudivstr = 'wancheng100';
} else {
renwudivstr = 'weiwancheng';
}
obj.title = '<ul style="padding: 5px; color: black">' +
'<li id="' + renwudivstr + '" style="padding: 5px; border-radius: 5px;">' +
'<div class="left"><img style="height: 15px" src="' + ext.contextPath + '/IMG/patrol/' + renwuimgstr + '.png""> 任务完成率</i></div>' +
'<div class="right"><img> ' + str[i].doRate + '%' + '</img></div>' +
'</li>' +
'<li id="renwu2" style="background-color:#f1f5fb; padding: 5px; margin-top: 1px; border-radius: 5px">' +
'<div class="left"><span><img style="height: 15px" src="' + ext.contextPath + '/IMG/patrol/suoyourenwu.png"> 任务数</img></span></div>' +
'<div class="right"><span><img style="height: 15px" src="' + ext.contextPath + '/IMG/patrol/jihuarenwu.png"/> ' + str[i].routineNum + '</span>' +
'<span><img style="height: 15px" src="' + ext.contextPath + '/IMG/patrol/linshirenwu.png"/> ' + str[i].tempNum + '</span></div>' +
'</li>' +
'<li id="renwu3" style="background-color:#f1f5fb; padding: 5px; margin-top: 1px; border-radius: 5px">' +
'<div class="left"><span><img style="height: 15px" src="' + ext.contextPath + '/IMG/patrol/Warning.png"> 上报异常</img></span></div>' +
'<div class="right"><span> ' + str[i].faultNum + '</span>' +
'</li>' +
'</ul>';
// if (str[i].tempNum != null && str[i].tempNum != '0') {
// //存在运行+设备异常
// if (str[i].faultNum != null && str[i].faultNum != '0' && str[i].faultNum_e != null && str[i].faultNum_e != '0') {
// console.log("tempNum存在运行+设备异常")
// obj.title = '<ul style="padding: 5px; color: black">' +
// '<li id="' + renwudivstr + '" style="padding: 5px; border-radius: 5px;">' +
// '<div class="left"><img style="height: 15px" src="' + ext.contextPath + '/IMG/patrol/' + renwuimgstr + '.png""> 任务完成率</i></div>' +
// '<div class="right"><img> ' + str[i].doRate + '%' + '</img></div>' +
// '</li>' +
// '<li id="renwu2" style="background-color:#f1f5fb; padding: 5px; margin-top: 1px; border-radius: 5px">' +
// '<div class="left"><span><img style="height: 15px" src="' + ext.contextPath + '/IMG/patrol/suoyourenwu.png"> 任务数</img></span></div>' +
// '<div class="right"><span><img style="height: 15px" src="' + ext.contextPath + '/IMG/patrol/jihuarenwu.png"/> ' + str[i].routineNum + '</span>' +
// '<span><img style="height: 15px" src="' + ext.contextPath + '/IMG/patrol/linshirenwu.png"/> ' + str[i].tempNum + '</span></div>' +
// '</li>' +
// '<li id="renwu3" style="background-color:#f1f5fb; padding: 5px; margin-top: 1px; border-radius: 5px">' +
// '<div class="left"><span><img style="height: 15px" src="' + ext.contextPath + '/IMG/patrol/Warning.png"> 上报异常</img></span></div>' +
// '<div class="right"><span><img style="height: 15px" src="' + ext.contextPath + '/IMG/patrol/eq.png"/> ' + str[i].faultNum + '</span>' +
// '<span><img style="height: 15px" src="' + ext.contextPath + '/IMG/patrol/air.png"/> ' + str[i].faultNum_e + '</span></div>' +
// '</li>' +
// '</ul>';
// } else {
// //只有运行异常
// if (str[i].faultNum != null && str[i].faultNum != '0' && (str[i].faultNum_e == null || str[i].faultNum_e == '0')) {
// console.log(3)
// console.log("tempNum只有运行异常")
// obj.title = '<ul style="padding: 5px; color: black">' +
// '<li id="' + renwudivstr + '" style="padding: 5px; border-radius: 5px;">' +
// '<div class="left"><img style="height: 15px" src="' + ext.contextPath + '/IMG/patrol/' + renwuimgstr + '.png""> 任务完成率</i></div>' +
// '<div class="right"><img> ' + str[i].doRate + '%' + '</img></div>' +
// '</li>' +
// '<li id="renwu2" style="background-color:#f1f5fb; padding: 5px; margin-top: 1px; border-radius: 5px">' +
// '<div class="left"><span><img style="height: 15px" src="' + ext.contextPath + '/IMG/patrol/suoyourenwu.png"> 任务数</img></span></div>' +
// '<div class="right"><span><img style="height: 15px" src="' + ext.contextPath + '/IMG/patrol/jihuarenwu.png"/> ' + str[i].routineNum + '</span>' +
// '<span><img style="height: 15px" src="' + ext.contextPath + '/IMG/patrol/linshirenwu.png"/> ' + str[i].tempNum + '</span></div>' +
// '</li>' +
// '<li id="renwu3" style="background-color:#f1f5fb; padding: 5px; margin-top: 1px; border-radius: 5px">' +
// '<div class="left"><span><img style="height: 15px" src="' + ext.contextPath + '/IMG/patrol/Warning.png"> 上报异常</img></span></div>' +
// '<div class="right"><span><img style="height: 15px" src="' + ext.contextPath + '/IMG/patrol/jihuarenwu.png"/> ' + str[i].faultNum + '</span>' +
// '</li>' +
// '</ul>';
// }
// //只有设备异常
// if (str[i].faultNum_e != null && str[i].faultNum_e != '0' && (str[i].faultNum == null || str[i].faultNum == '0')) {
// console.log("tempNum只有设备异常")
// obj.title = '<ul style="padding: 5px; color: black">' +
// '<li id="' + renwudivstr + '" style="padding: 5px; border-radius: 5px;">' +
// '<div class="left"><img style="height: 15px" src="' + ext.contextPath + '/IMG/patrol/' + renwuimgstr + '.png""> 任务完成率</i></div>' +
// '<div class="right"><img> ' + str[i].doRate + '%' + '</img></div>' +
// '</li>' +
// '<li id="renwu2" style="background-color:#f1f5fb; padding: 5px; margin-top: 1px; border-radius: 5px">' +
// '<div class="left"><span><img style="height: 15px" src="' + ext.contextPath + '/IMG/patrol/suoyourenwu.png"> 任务数</img></span></div>' +
// '<div class="right"><span><img style="height: 15px" src="' + ext.contextPath + '/IMG/patrol/jihuarenwu.png"/> ' + str[i].routineNum + '</span>' +
// '<span><img style="height: 15px" src="' + ext.contextPath + '/IMG/patrol/linshirenwu.png"/> ' + str[i].tempNum + '</span></div>' +
// '</li>' +
// '<li id="renwu3" style="background-color:#f1f5fb; padding: 5px; margin-top: 1px; border-radius: 5px">' +
// '<div class="left"><span><img style="height: 15px" src="' + ext.contextPath + '/IMG/patrol/Warning.png"> 上报异常</img></span></div>' +
// '<div class="right"><span><img style="height: 15px" src="' + ext.contextPath + '/IMG/patrol/jihuarenwu.png"/> ' + str[i].faultNum_e + '</span>' +
// '</li>' +
// '</ul>';
// }
// //无异常
// if ((str[i].faultNum == null || str[i].faultNum == '0') && (str[i].faultNum_e == null || str[i].faultNum_e == '0')) {
// console.log(5)
// console.log("tempNum无异常")
// obj.title = '<ul style="padding: 5px; color: black">' +
// '<li id="' + renwudivstr + '" style="padding: 5px; border-radius: 5px; height: 15px;">' +
// '<div class="left"><img style="height: 15px" src="' + ext.contextPath + '/IMG/patrol/' + renwuimgstr + '.png""> 任务完成率</i></div>' +
// '<div class="right"><img> ' + str[i].doRate + '%' + '</img></div>' +
// '</li>' +
// '<li id="renwu2" style="background-color:#f1f5fb; padding: 5px; margin-top: 1px; border-radius: 5px">' +
// '<div class="left"><span><img style="height: 15px" src="' + ext.contextPath + '/IMG/patrol/suoyourenwu.png"> 任务数</img></span></div>' +
// '<div class="right"><span><img style="height: 15px" src="' + ext.contextPath + '/IMG/patrol/jihuarenwu.png"/> ' + str[i].routineNum + '</span>' +
// '<span><img style="height: 15px" src="' + ext.contextPath + '/IMG/patrol/linshirenwu.png"/> ' + str[i].tempNum + '</span></div>' +
// '</li>' +
// '</ul>';
// }
// }
// } else {
// //存在运行+设备异常
// if (str[i].faultNum != null && str[i].faultNum != '0' && str[i].faultNum_e != null && str[i].faultNum_e != '0') {
// console.log("存在运行+设备异常")
// obj.title = '<ul style="padding: 5px; color: black">' +
// '<li id="' + renwudivstr + '" style="padding: 5px; border-radius: 5px">' +
// '<div class="left"><img style="height: 15px" src="' + ext.contextPath + '/IMG/patrol/' + renwuimgstr + '.png""> 任务完成率</i></div>' +
// '<div class="right"><img> ' + str[i].doRate + '%' + '</img></div>' +
// '</li>' +
// '<li id="renwu2" style="background-color:#f1f5fb; padding: 5px; margin-top: 1px; border-radius: 5px">' +
// '<div class="left"><span><img style="height: 15px" src="' + ext.contextPath + '/IMG/patrol/suoyourenwu.png"> 任务数</img></span></div>' +
// '<div class="right"><span><img style="height: 15px" src="' + ext.contextPath + '/IMG/patrol/jihuarenwu.png"/> ' + str[i].routineNum + '</div>' +
// '</li>' +
// '<li id="renwu3" style="background-color:#f1f5fb; padding: 5px; margin-top: 1px; border-radius: 5px">' +
// '<div class="left"><span><img style="height: 15px" src="' + ext.contextPath + '/IMG/patrol/Warning.png"> 上报异常</img></span></div>' +
// '<div class="right"><span><img style="height: 15px" src="' + ext.contextPath + '/IMG/patrol/rt.png"/> ' + str[i].faultNum + '</div>' +
// '<div class="right"><span><img style="height: 15px" src="' + ext.contextPath + '/IMG/patrol/eq.png"/> ' + str[i].faultNum_e + '</div>' +
// '</li>' +
// '</ul>';
// } else {
// //只有运行异常
// if (str[i].faultNum != null && str[i].faultNum != '0' && (str[i].faultNum_e == null || str[i].faultNum_e == '0')) {
// console.log("只有运行异常")
// obj.title = '<ul style="padding: 5px; color: black">' +
// '<li id="' + renwudivstr + '" style="padding: 5px; border-radius: 5px">' +
// '<div class="left"><img style="height: 15px" src="' + ext.contextPath + '/IMG/patrol/' + renwuimgstr + '.png""> 任务完成率</i></div>' +
// '<div class="right"><img> ' + str[i].doRate + '%' + '</img></div>' +
// '</li>' +
// '<li id="renwu2" style="background-color:#f1f5fb; padding: 5px; margin-top: 1px; border-radius: 5px">' +
// '<div class="left"><span><img style="height: 15px" src="' + ext.contextPath + '/IMG/patrol/suoyourenwu.png"> 任务数</img></span></div>' +
// '<div class="right"><span><img style="height: 15px" src="' + ext.contextPath + '/IMG/patrol/jihuarenwu.png"/> ' + str[i].routineNum + '</div>' +
// '</li>' +
// '<li id="renwu3" style="background-color:#f1f5fb; padding: 5px; margin-top: 1px; border-radius: 5px">' +
// '<div class="left"><span><img style="height: 15px" src="' + ext.contextPath + '/IMG/patrol/Warning.png"> 上报异常</img></span></div>' +
// '<div class="right"><span><img style="height: 15px" src="' + ext.contextPath + '/IMG/patrol/rt.png"/> ' + str[i].faultNum + '</div>' +
// '</li>' +
// '</ul>';
// }
// //只有设备异常
// if (str[i].faultNum_e != null && str[i].faultNum_e != '0' && (str[i].faultNum == null || str[i].faultNum == '0')) {
// console.log("只有设备异常")
// obj.title = '<ul style="padding: 5px; color: black">' +
// '<li id="' + renwudivstr + '" style="padding: 5px; border-radius: 5px">' +
// '<div class="left"><img style="height: 15px" src="' + ext.contextPath + '/IMG/patrol/' + renwuimgstr + '.png""> 任务完成率</i></div>' +
// '<div class="right"><img> ' + str[i].doRate + '%' + '</img></div>' +
// '</li>' +
// '<li id="renwu2" style="background-color:#f1f5fb; padding: 5px; margin-top: 1px; border-radius: 5px">' +
// '<div class="left"><span><img style="height: 15px" src="' + ext.contextPath + '/IMG/patrol/suoyourenwu.png"> 任务数</img></span></div>' +
// '<div class="right"><span><img style="height: 15px" src="' + ext.contextPath + '/IMG/patrol/jihuarenwu.png"/> ' + str[i].routineNum + '</div>' +
// '</li>' +
// '<li id="renwu3" style="background-color:#f1f5fb; padding: 5px; margin-top: 1px; border-radius: 5px">' +
// '<div class="left"><span><img style="height: 15px" src="' + ext.contextPath + '/IMG/patrol/Warning.png"> 上报异常</img></span></div>' +
// '<div class="right"><span><img style="height: 15px" src="' + ext.contextPath + '/IMG/patrol/eq.png"/> ' + str[i].faultNum_e + '</div>' +
// '</li>' +
// '</ul>';
// }
// //无异常
// if ((str[i].faultNum == null || str[i].faultNum == '0') && (str[i].faultNum_e == null || str[i].faultNum_e == '0')) {
// console.log("无异常")
// obj.title = '<ul style="padding: 5px; color: black">' +
// '<li id="' + renwudivstr + '" style="padding: 5px; border-radius: 5px">' +
// '<div class="left"><img style="height: 15px" src="' + ext.contextPath + '/IMG/patrol/' + renwuimgstr + '.png""> 任务完成率</i></div>' +
// '<div class="right"><img> ' + str[i].doRate + '%' + '</img></div>' +
// '</li>' +
// '<li id="renwu2" style="background-color:#f1f5fb; padding: 5px; margin-top: 1px; border-radius: 5px">' +
// '<div class="left"><span><img style="height: 15px" src="' + ext.contextPath + '/IMG/patrol/suoyourenwu.png"> 任务数</img></span></div>' +
// '<div class="right"><span><img style="height: 15px" src="' + ext.contextPath + '/IMG/patrol/jihuarenwu.png"/> ' + str[i].routineNum + '</div>' +
// '</li>' +
// '</ul>';
// }
// }
// }
/*if (str[i].tempNum != null && str[i].tempNum != '0') {
obj.title = '<p id="titleId" style="text-align:center;cursor:pointer">巡检任务: <img src="' + ext.contextPath + '/IMG/patrol/' + imgstr + '.png"/> ' + str[i].doRate + '%<br/>任务数: <img src="' + ext.contextPath + '/IMG/patrol/workrecord3.png"/> ' + str[i].routineNum + ' <img src="' + ext.contextPath + '/IMG/patrol/workrecord4.png"/> ' + str[i].tempNum + '<br/>异常数: <img src="' + ext.contextPath + '/IMG/patrol/workrecord3.png"/> ' + str[i].routineNum + ' <img src="' + ext.contextPath + '/IMG/patrol/workrecord4.png"/> ' + str[i].tempNum + '</p>';
} else {
obj.title = '<p id="titleId" style="text-align:center;cursor:pointer">巡检任务: <img src="' + ext.contextPath + '/IMG/patrol/' + imgstr + '.png"/> ' + str[i].doRate + '%<br/>任务数: <img src="' + ext.contextPath + '/IMG/patrol/workrecord3.png"/> ' + str[i].routineNum + '<br/>异常数: <img src="' + ext.contextPath + '/IMG/patrol/workrecord3.png"/> ' + str[i].routineNum + ' <img src="' + ext.contextPath + '/IMG/patrol/workrecord4.png"/> ' + str[i].tempNum + '</p>';
}*/
if (str[i].startTime == todayStr) {
obj.color = '#FCF8E3';
} else {
obj.color = '#FFFFFF';
}
obj.start = str[i].startTime;
events.push(obj);
}
callback(events);
}, 'json'); //把从后台取出的数据进行封装以后在页面上以fullCalendar的方式进行显示
},
eventClick: function (event, jsEvent, view) {
var sdt = moment(event.start).format('YYYY-MM-DD');
var type = '${type}';
// viewRecordFun(event.id);
recordListFun(sdt, type);
},
dayClick: function (date, jsEvent, view) {
//点击空白日期调用
},
eventRender: function (event, element) {//title以HTML显示换行
//element.html(moment(event.start).format('MM-DD')+'~'+moment(event.end).format('MM-DD')+' '+event.title);
element.html(event.title);
},
eventMouseover: function (event, element, view) {//鼠标在日程区块上时触发
},
});
}
/**
*对Date的扩展将 Date 转化为指定格式的String
*月(M)、日(d)、小时(h)、分(m)、秒(s)、季度(q) 可以用 1-2 个占位符,
*年(y)可以用 1-4 个占位符,毫秒(S)只能用 1 个占位符(是 1-3 位的数字)
*例子:
*(new Date()).Format("yyyy-MM-dd hh:mm:ss.S") ==> 2006-07-02 08:09:04.423
*(new Date()).Format("yyyy-M-d h:m:s.S") ==> 2006-7-2 8:9:4.18
*/
Date.prototype.format = function (fmt) {
var o = {
"M+": this.getMonth() + 1, //月份
"d+": this.getDate(), //日
"h+": this.getHours(), //小时
"m+": this.getMinutes(), //分
"s+": this.getSeconds(), //秒
"q+": Math.floor((this.getMonth() + 3) / 3), //季度
"S": this.getMilliseconds() //毫秒
};
if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
for (var k in o)
if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
return fmt;
}
</script>
</head>
<body onload="initMenu()" class="hold-transition ${cu.themeclass} sidebar-mini">
<div class="wrapper">
<!-- 引用top -->
<%-- <jsp:include page="/jsp/top.jsp"></jsp:include> --%>
<!-- 菜单栏 -->
<%-- <jsp:include page="/jsp/left.jsp"></jsp:include> --%>
<div class="content-wrapper">
<section class="content container-fluid">
<div id="mainAlertdiv"></div>
<div id="subDiv_calendar"></div>
<div id="subDiv_aView"></div>
<div id="subDiv_view"></div>
<div id="subDivBbnorm"></div>
<div id="subDiv_recordDetail"></div>
<div id="subDiv_recordGPS"></div>
<div id="subDiv_contents"></div>
<div id="doview_wx_div"></div>
<div class="box box-primary">
<div class="date-picker-wrap">
<input id="monthDt" name="monthDt" type="text" style="width: 200px;" placeholder="点击选择" class="form-control input-sm" value="${nowdate.substring(0,7)}" readonly/>
</div>
<div class="box-body no-padding">
<div id="calendar"></div>
</div>
</div>
</section>
</div>
</div>
</body>
</html>