function setMtzl(id, mtmc){ $('#mtzl').html(mtmc); } function getMenuList(){ $('#mapsubmit').attr('disabled', 'disabled'); window.load=document.getElementById("form").submit(); } function getTreeDataList(selectClick, indexSelect){ $('#mapsubmit').attr('disabled', 'disabled'); $('#TB_overlayBG').css({ display:'block',height:$(document).height() }); $('.box1').css({ left:($('body').width()-$('.box1').width())/2-20+'px', top:($(window).height()-$('.box1').height())/2+$(window).scrollTop()+'px', display:'block' }); window.parent.window.IframeSrc($('#id').val(), $('#rightshow').val(), $('#isleaf').val(), selectClick, indexSelect, $('#topid').val(), $('#sjlx').val()); } //map地图,submit:disabled function mapSubmit(){ $('#mapsubmit').attr('disabled', 'disabled'); return true; } function setMenuSearch(msg){ $('#jqssul').empty(); var str = ''; if (msg != '') { var json = JSON.parse(msg); if (json[0] != null) { for ( var i = 0; i < json.length; i++) { var id = json[i].ID; var menuname = json[i].MENUNAME; str += '
  • '+menuname+'
  • '; } }else str = '暂无数据!'; }else str = '暂无数据!'; $('#jqssul').append(str); } function getMenuSearch(lx){ var cdlx; var menutype = document.form.datalx; for( i=0;iendtime){ alert("期初时间不能大于期末时间,请选择正确的日期!"); $('#tjtsubmit').removeAttr('disabled'); return false; } var checkdq = ""; $("[name='checkdq']:checked").each(function(){ checkdq+=$(this).val(); }); if(checkdq == "" && $('#inputdq').val() != 1){ alert("请选择地区列表!"); $('#tjtsubmit').removeAttr('disabled'); return false; } var tjzt = ""; $("[name='tjzt']:checked").each(function(){ tjzt+=$(this).val(); }); if(tjzt == ""){ alert("请选择推荐作图指标!"); $('#tjtsubmit').removeAttr('disabled'); return false; } return true; } //统计图判断时间是否正确 function clickTjtTimeSubmit(){ $('#tjtsubmit').attr('disabled', 'disabled'); var starttime = $('#starttime').val(); var endtime = $('#endtime').val(); if(starttime>endtime){ $('#tjtsubmit').removeAttr('disabled'); return false; } var checkdq = ""; $("[name='checkdq']:checked").each(function(){ checkdq+=$(this).val(); }); if(checkdq == "" && $('#inputdq').val() != 1){ $('#tjtsubmit').removeAttr('disabled'); return false; } var tjzt = ""; $("[name='tjzt']:checked").each(function(){ tjzt+=$(this).val(); }); if(tjzt == ""){ $('#tjtsubmit').removeAttr('disabled'); return false; } return true; } function showhiddimg(){ $('#TB_overlayBG').css({ display:'block',height:$(document).height() }); $('.box1').css({ left:($('body').width()-$('.box1').width())/2-20+'px', top:($(window).height()-$('.box1').height())/2+$(window).scrollTop()+'px', display:'block' }); var jump = clickTjtTimeSubmit(); if(!jump){ $('#TB_overlayBG').css('display','none'); $('.box1 ').css('display','none'); } return jump; } //统计图判断时间是否正确 function tjtDqSubmit(){ if(timecxtiaojiao()){ if(showhiddimg()){ window.load=document.getElementById("form1").submit(); } } } //checkbox全选 function selectAllCheckbox(){ $("input[name='checkdq']").each(function(){ $(this).attr("checked",true); }); if(timecxtiaojiao()){ if(showhiddimg()){ window.load=document.getElementById("form1").submit(); } } //$("[name='checkdq']").attr("checked",'true');//全选 } //checkbox反选 function selectCheckbox(){ $("input[name='checkdq']").each(function(){ $(this).attr("checked",!this.checked); }); if(timecxtiaojiao()){ if(showhiddimg()){ window.load=document.getElementById("form1").submit(); } } } //checkbox清空 function removeAllCheckbox(){ $("input[name='checkdq']").each(function(){ $(this).attr("checked",false); }); //$("[name='checkdq']").attr("checked",'true');//全选 } function SetDivHeightIn(){ $("#treeID").css("height", 600); $(".container_980").css("height", 660); } function SetDivHeight(){ var treeHeight = $("#treeID")[0].scrollHeight; var treeHeight1 = $("#treeID")[0].clientHeight; var dataHeight = $(".container_980")[0].scrollHeight; if(treeHeight1 < treeHeight && dataHeight < treeHeight){ $("#treeID").css("height",treeHeight > 600 ? treeHeight : 600); $(".container_980").css("height",treeHeight > 600 ? treeHeight + 30 : 660); }else if(dataHeight > treeHeight){ $("#treeID").css("height",dataHeight > 600 ? dataHeight : 600); $(".container_980").css("height",dataHeight > 600 ? dataHeight + 30 : 660); } } function SetCwinHeight(iframeID) { var ifm= document.getElementById(iframeID); var treeHeight = $("#treeID")[0].scrollHeight; var subWeb = document.frames ? document.frames[iframeID].document : ifm.contentDocument; if(ifm != null && subWeb != null) { ifm.height = subWeb.body.scrollHeight + 30; if(treeHeight < subWeb.body.scrollHeight){ treeHeight = subWeb.body.scrollHeight; } $("#treeID").css("height", (treeHeight + 30)>600 ? (treeHeight + 30) : 600 ); $(".container_980").css("height", (treeHeight + 30)>600 ? (treeHeight + 60) : 660); } } function sumAll(type){ var dotCount = 0; var ths = $("#tabColor0 thead tr th"); if(type === 'x'){ var th = $('求和'); $("#tabColor0 thead tr").append(th); $("#tabColor0 tbody tr").each(function(){ var count = ''; $(this).find('td').each(function(i){ if(i){ var sct = $(this).text().replace(/,/g, ''); if(sct !== ""){ var dotIndex = sct.indexOf("."); if (dotIndex > -1) { if(dotCount == 0){ dotCount = sct.length - dotIndex - 1; } } if($(ths[i]).is(":visible")){ var ct = +sct; count = (count || 0) + ct; } } } }); if(count === ''){ $(this).append(''); }else{ $(this).append('' + StringUtil.format(count.toFixed(dotCount || 2)) + ''); } }); initSortColumns($("#tabColor0")); }else{ var countArr = []; var len = 0; $("#tabColor0 tbody tr:visible").each(function(){ var tds = $(this).find('td'); len = tds.size(); tds.each(function(i){ if(i){ var sct = $(this).text().replace(/,/g, ''); if(sct !== ""){ var dotIndex = sct.indexOf("."); if (dotIndex > -1) { if(dotCount == 0){ dotCount = sct.length - dotIndex - 1; } } var ct = +sct; countArr[i] = ct + (countArr[i] || 0); } } }); }); var tr = $(""); tr.append('求和'); for(var i=1;i' + v + ''); if($(ths[i]).is(":hidden")){ td.hide(); } tr.append(td); } $("#tabColor0 tbody").append(tr); } };