126 lines
3.5 KiB
JavaScript
126 lines
3.5 KiB
JavaScript
let form, layer;
|
|
let user = getUser();
|
|
let classType = '1',classDataType='2';
|
|
// 定时刷新启动按钮
|
|
let scheduledTask = false;
|
|
layui.use(['form', 'layer'], function () {
|
|
form = layui.form;
|
|
layer = layui.layer;
|
|
// 是否锁定值长页
|
|
let isLockPage = sessionStorage.getItem('isLockPage');
|
|
if (!isLockPage) {
|
|
loadData();
|
|
}
|
|
})
|
|
|
|
// 锁定页面
|
|
function lockPage() {
|
|
sessionStorage.setItem('isLockPage', '1');
|
|
let frameId = parent.document.getElementById('indexIframe');
|
|
$(frameId).attr('src', '../compreDisplay/lockDutyHome.html')
|
|
}
|
|
|
|
let settings = {
|
|
trigger: 'hover',
|
|
title: '',
|
|
multi: true,
|
|
closeable: false,
|
|
style: '',
|
|
padding: true
|
|
|
|
};
|
|
|
|
let tableSettings = {
|
|
width: 1200,
|
|
height: 400,
|
|
type: 'iframe',
|
|
url: 'dutyHomeEcharts.html'
|
|
};
|
|
let tableSettings2 = {
|
|
width: 1200,
|
|
height: 400,
|
|
type: 'iframe',
|
|
url: 'dutyHomeEcharts2.html'
|
|
};
|
|
$('#province').webuiPopover('destroy').webuiPopover($.extend({}, settings, tableSettings));
|
|
$('#province2').webuiPopover('destroy').webuiPopover($.extend({}, settings, tableSettings2));
|
|
|
|
function loadData() {
|
|
loadProNumAjax();
|
|
mergeData();
|
|
loadWeekPlanAjax('1');
|
|
loadDayPlanAjax('1');
|
|
loadDutyTaskAjax();
|
|
loadDutyProgressAjax();
|
|
loadPersonNumAjax();
|
|
loadEarlyInfoAjax();
|
|
loadVoiCheckAjax();
|
|
}
|
|
|
|
// 切换浅色模式/深色模式
|
|
function changeModel(type) {
|
|
let frameId = parent.document.getElementById('indexIframe');
|
|
if (type === 1) {
|
|
$(frameId).attr('src', '../compreDisplay/newDutyHome.html')
|
|
sessionStorage.setItem('changeModel', '1');
|
|
} else if (type === 2) {
|
|
$(frameId).attr('src', '../compreDisplay/dutyHome.html')
|
|
sessionStorage.setItem('changeModel', '2');
|
|
}
|
|
parent.layer.msg('切换成功', { icon: 1 });
|
|
}
|
|
|
|
// 切换地市督查统计
|
|
function changeDuty() {
|
|
let frameId = parent.document.getElementById('indexIframe');
|
|
$(frameId).attr('src', '../compreDisplay/cityDuty.html')
|
|
}
|
|
|
|
|
|
function openClass(type, name, currentDay) {
|
|
let width = getDefaultWidth().toFixed(0) + "px";
|
|
let height = getDefaultHeight().toFixed(0) + "px";
|
|
let layerIndex = layer.open({
|
|
id: "classMeeting",
|
|
title: false,
|
|
type: 2,
|
|
maxmin: false,
|
|
skin: "my-skin child-skin",
|
|
content: 'child/classMeeting.html',
|
|
area: [width, height],
|
|
offset: ['4%', '15%'],
|
|
closeBtn: 0,
|
|
success: function (layero, index) {
|
|
let iframeWin = window["layui-layer-iframe" + layerIndex];
|
|
iframeWin.setParams(type, name, currentDay);
|
|
$(window).resize(function () {
|
|
if (autoResizeWidth) autoResizeWidth(index);
|
|
if (autoResizeHeight) autoResizeHeight(index);
|
|
});
|
|
}
|
|
});
|
|
}
|
|
|
|
|
|
|
|
/*站班会统计选中*/
|
|
$(".date4-type").click(function (e) {
|
|
$('.date4-type').each(function () {
|
|
if ($(this).find('p').eq(0).hasClass('check-p3')) {
|
|
$(this).find('p').eq(0).removeClass('check-p3')
|
|
$(this).find('p').eq(0).next('img').css('display', 'none')
|
|
}
|
|
})
|
|
classDataType = $(this).find('p').attr("classDataType")
|
|
console.log(classDataType)
|
|
$(this).find('p').eq(0).addClass('check-p3')
|
|
$(this).find('p').eq(0).next('img').removeAttr('style')
|
|
if (classDataType === '2') {
|
|
$('.date4-type img').css('width', '30px')
|
|
}
|
|
|
|
|
|
myChart9.dispose();
|
|
myChart9 = echarts.init(document.getElementById('no-execute-day-plan-echarts'));
|
|
mergeData();
|
|
}); |