<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="tags" tagdir="/WEB-INF/tags"%>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="en">
  <head>
    
    <title>全网智能监控分析平台</title>
    
	<script type="text/javascript"
	src="${ctx}/static/js/modernizr.custom.js"></script>

  </head>
  
  <body>
    <div id="sticky-wrap"></div>

	<div>
		<div class="container">
			<ol class="breadcrumb">
				<li><a href="${ctx}/index">首页</a>
				</li>
				<li>运营支撑</li>
				<li class="active">配置项分析</li>
			</ol>
		</div>
	</div>

	<div id="main-container main-tab-container">
		<div id="content" class="container">
			<div class="tab-bar-bt">
				<ul class="nav nav-tabs">
					<li ><a id="a_home" href="${ctx}/AnalysisSupport/PzxAnalysis?CurTabId=home#">总领</a> </li>
					<li><a id="a_profile" href="${ctx}/AnalysisSupport/PzxNumCount">数量统计</a> </li> 
					<li ><a id="a_profole1" href="${ctx}/AnalysisSupport/PzxAnalysisLifeCycle">生命周期统计</a> </li> 
					<li class="active"><a id="profile" href="#profile" data-toggle="tab">属性统计</a> </li>
					<li><a id="a_profile2" href="${ctx}/AnalysisSupport/PzxDetail">明细分析</a> </li>  
					<li><a id="a_profile3" href="${ctx}/AnalysisSupport/PzxAttributeDetail">属性明细分析</a> </li> 
				</ul>
			</div>
			<div class="section">
				<div class="tab-content">
	<!-- ---------------------------------------------------配置项属性统计分析 ------------------------------------------------>	
	                   <div class="tab-pane fade in active" id="home">
						<div class="row me-row">

							<div id="slidePushMenus" class="cbp-spmenu-push">

								<div class="slideMenu" id="cbp-spmenu-s2" style="">
									<div class="form">
									   
									    <tags:Public_ProvinceTag />
									    <tags:PzxAttriButeTag />
									    <tags:PZX_Ifkey />
									     <tags:PZX_Multiple_Province />  
										<button id="submit" class="btn btn-primary" >提交</button>
										<button type="button" class="btn btn-warning" onclick="reset()">重置</button>
									</div>
								</div>

								<div class="main col-xs-12">
									<div id="mainm" class="mainm"></div>

									<div class="content clearfix">
										<div class="block clearfix">
											<button id="showLeftPush"
												class="menu-trigger btn btn-default"  onclick="toggleMenu('slidePushMenus')">
												<span class="glyphicon glyphicon-list"></span>
											</button>
											<div class="slide-menu-tags">
												
												
												<span id="ProvinceTag" class="label label-info" data-placement="bottom">全国</span>
												<span id="ClassTag" class="label label-info" data-placement="bottom" >系统硬件</span>
												<span id="TypeTag" class="label label-info" data-placement="bottom">小型机</span>
												<span id="AttributeTag" class="label label-info" data-placement="bottom">厂商</span> 
												<span id="IfKeyTag" class="label label-info" data-placement="bottom">是否关键(全部)</span>
												<span id="MultipleProTag" class="label label-info" data-placement="bottom">单图</span>
											</div>
											<div class="bt-list-import">
												<a href="#" id="upload" class=""> <span
													class="glyphicon glyphicon-import"></span> <span
													class="glyphicon-class">导出报表</span> </a>
											</div>
										</div>

										<div class="row">
											<div class="col-xs-12">
											  <div class="panel panel-default" >
												<div class="panel-heading">配置项属性统计分析
												    <div id="time_div" class="btn-group btn-group-cog"
															style="">
															<button type="button"
																class="btn btn-default dropdown-toggle btn-control-cog"
																data-toggle="dropdown">
																<span class="glyphicon glyphicon-cog"></span>
															</button>

															<ul class="dropdown-menu dropdown-menu-right"
																id="dropdown" role="menu">
																<li><a href="#" onclick="javascript:bar()">柱状图</a>
																</li>
																<li><a href="#" onclick="javascript:pie()">饼图</a>
																</li>
															</ul>
														</div>
												</div>
											   <div class="panel-body" id=picifram> 
			                                     <div id="dynamicIframe" ></div><!-- 显示柱状图 -->
												</div>       
												      
												                   
											  </div>
											</div>
										</div>
									</div>
								</div>
								<!-- /scroller-inner -->
							</div>
						</div>
					</div>
	              <form id="export" action="#" method="post"></form>
			   </div>
			</div>
		</div>
	</div>
	<script type="text/javascript">
	var index=0;
	var picname="";
	      $(function(){
	           var localPath="${biserver_config}&path=analysissupport";
		       var Pzx_attribute_src="&action=Pzx_attribute_bar.xaction";
		       var Pzx_attributep_src="&action=Pzx_attribute_pie.xaction";
			   var IfKeyTag="'0','1'";
	        
	           typeName="小型机";
               var attributename;
               var attributeid;
               $.ajax({
                  type : 'GET',
                  contentType : 'application/json',
                  url: encodeURI(encodeURI('${ctx}/PzxClassTag/findPzxAttributeByTypeTag/'+typeName+'/'+timestamp)),
                  dataType : 'text',
                  beforeSend: function(data) {},
                  success: function(data) {
                  for(var i=0;i<data.length;i++){
                      if(data[i]=='\"'){
                         data=data.replace('\"','\'');
                      }             
                  }
//                alert(data);
                  data=eval("("+ data +")");//获取从后台返回的数据,通常是Json格式
                 // alert(data);
                   $("#pzxAttribute_div").empty();
                   $("#pzxAttribute_div").append("");

                  for(var t=0;t<data.length;t=t+2){
                      if(data[t+1]=="厂商"){
                        attributename=data[t+1];
                        attributeid=data[t];
                      }
                    }
          
                    var appendDiv = $("<br/><br/><div class='col-xs-12' align='center'></div>").append($("<span></span>")
				   					.text(
				   						("全国小型机厂商统计")
				  					))//添加标题
				   						.append($("<iframe  id='ifram0' style='width:1050px; height:430px' frameborder='0' scrolling='no'></iframe><br/><br/>")
											.attr("src","${biserver_config}&path=analysissupport&action=Pzx_attribute_bar.xaction&width=800&height=320&ProvinceTag="+getProvinceCheckedValuesString()+"&PZXAttriTag="+attributeid+"&IfKeyTag="+IfKeyTag
										));//添加iframe
				          $("#dynamicIframe").append(appendDiv); 
				          picname="全国小型机厂商统计,";                 
                    //alert($("#pzxtype").val());
                    var state="'国有化'";
		            var notstate="'非国有化'";
                    var appendDiv2 = $("<br/><br/><div class='col-xs-12' align='center'></div>").append($("<span></span>")
				   					.text(
				   						("全国小型机厂商国有化对比统计")
				  					))//添加标题
				   						.append($("<iframe  id='ifram1' style='width:900px; height:200px' frameborder='0' scrolling='no'></iframe><br/><br/>")
											.attr("src","${biserver_config}&path=analysissupport&action=Pzx_attribute_national_pie.xaction&width=620&height=120&ProvinceTag="+getProvinceCheckedValuesString()+"&PZXTypeTag="+$("#pzxtype").val()+"&IfKeyTag="+IfKeyTag+"&State="+encodeURI(state)+"&NotState="+encodeURI(notstate)
										));//添加iframe
					$("#dynamicIframe").append(appendDiv2);	
					picname=picname+"全国小型机厂商国有化对比统计";
							
                  }
                 
                  }); 
                 
                 
      $("#submit").click(function(){
      index=1;
      var attributetitle=getpzxAttributeCheckedTitle();
      var attributeid=getpzxAttributeCheckedValues();
      var provinceid=getProvinceCheckedValues();
      var provincename=getProvinceCheckedValuesTitle();
      
      if(provinceid.length==0){
           $.alert("省份为空,请重新选择!");
      }else if(attributeid.length==0){
            $.alert("配置项属性为空,请重新选择!");
	  }else{ 
	  var k=1;
      for(var t=0;t<attributetitle.length;t++) 
       if(attributetitle[t]=="厂商"){
         k=2;
       }
       
      var len=provinceid.length;
	  if(len==32){len=31;}
	     
	 if(getMultiplePro()=="0"){    //单图
	    toggleMenu("slidePushMenus");
	    $("#dynamicIframe").empty();
        picname="";
	   //省份标签
       $('#ProvinceTag').text("省份").append($("<span class='badge'></span>").text(getProvinceCheckedValues().length)).attr('data-original-title',getProvinceCheckedTitles()).tooltip();	
	   //配置项类别标签
	   $('#ClassTag').text(getClassSelectedName()); 
	   $('#TypeTag').text(getTypeSelectedName()); 
	   //配置项属性标签
	   $('#AttributeTag').text("属性").append($("<span class='badge'></span>").text(getpzxAttributeCheckedValues().length)).attr('data-original-title',getpzxAttributeCheckedTitles()).tooltip();	
	  
	   $('#IfKeyTag').text("是否关键").attr('data-original-title',getIfKeyTitle()).tooltip();
	   $('#MultipleProTag').text(getMultipleTitle());
	   var iframstr="<iframe id=ifram0 style='width:1050px; height:430px' frameborder='0' scrolling='no'></iframe><br/><br/>";
       var appendDiv = $("<br/><br/><div class='col-xs-12' align='center'></div>").append($("<span></span>")
				   	   .text(
				   	   (getTypeSelectedName()+"统计")
				  	    ))//添加标题
				   		.append($(iframstr)
						.attr("src","${biserver_config}&path=analysissupport&action=Pzx_attribute_bar.xaction&width=800&height=320&ProvinceTag="+getProvinceCheckedValuesString()+"&PZXAttriTag="+getpzxAttributeCheckedValuesString()+"&IfKeyTag="+getIfkey()
						));//添加iframe
		$("#dynamicIframe").append(appendDiv);
		picname=getTypeSelectedName()+"统计";
		for(var g=0;g<attributeid.length;g++){
		    if(attributetitle[g]=="厂商"){
		       picname+=","+getTypeSelectedName()+"厂商国有化对比统计";
		        var state="'国有化'";
		        var notstate="'非国有化'";
                var appendDiv2 = $("<br/><br/><div class='col-xs-12' align='center'></div>").append($("<span></span>")
				   					.text(
				   						(getTypeSelectedName()+"厂商国有化对比统计")
				  					))//添加标题
				   						.append($("<iframe  id='ifram1' style='width:900px; height:200px' frameborder='0' scrolling='no'></iframe><br/><br/>")
											.attr("src","${biserver_config}&path=analysissupport&action=Pzx_attribute_national_pie.xaction&width=620&height=120&ProvinceTag="+getProvinceCheckedValuesString()+"&PZXTypeTag="+$("#pzxtype").val()+"&IfKeyTag="+getIfkey()+"&State="+encodeURI(state)+"&NotState="+encodeURI(notstate)
										));//添加iframe
					$("#dynamicIframe").append(appendDiv2);	
		       
		    }
		}
	    var href="../AnalysisSupport/PzxAttribute/createLog";
					  $.ajax({
					           type : 'GET',
					           contentType : 'application/json',
					           url: href,
					           dataType : 'text',
					           beforeSend: function(data) {
					            },
					           success: function(data) {
						   
						   }
					  });    
	   
     }else{
	     
	 if(len*attributeid.length*k<32){ 
	   toggleMenu("slidePushMenus");
	    $("#dynamicIframe").empty();
        picname="";
	   //省份标签
       $('#ProvinceTag').text("省份").append($("<span class='badge'></span>").text(getProvinceCheckedValues().length)).attr('data-original-title',getProvinceCheckedTitles()).tooltip();	
	   //配置项类别标签
	   $('#ClassTag').text(getClassSelectedName()); 
	   $('#TypeTag').text(getTypeSelectedName()); 
	   //配置项属性标签
	   $('#AttributeTag').text("属性").append($("<span class='badge'></span>").text(getpzxAttributeCheckedValues().length)).attr('data-original-title',getpzxAttributeCheckedTitles()).tooltip();	
	  
	   $('#IfKeyTag').text("是否关键").attr('data-original-title',getIfKeyTitle()).tooltip();
	   $('#MultipleProTag').text(getMultipleTitle());
	
	   for(var i=0;i<provinceid.length;i++){
	      
	    if(provinceid[i]>0){
	        for(var j=0;j<attributeid.length;j++){
	                  var iframstr="<iframe id=ifram"+i+j+" style='width:1050px; height:430px' frameborder='0' scrolling='no'></iframe><br/><br/>";
                       var appendDiv = $("<br/><br/><div class='col-xs-12' align='center'></div>").append($("<span></span>")
				   					.text(
				   						(provincename[i]+getTypeSelectedName()+attributetitle[j]+"统计")
				  					))//添加标题
				   						.append($(iframstr)
											.attr("src","${biserver_config}&path=analysissupport&action=Pzx_attribute_bar.xaction&width=800&height=320&ProvinceTag="+provinceid[i]+"&PZXAttriTag="+attributeid[j]+"&IfKeyTag="+getIfkey()
										));//添加iframe
				        $("#dynamicIframe").append(appendDiv);
                        if(i==provinceid.length-1&&j==attributeid.length-1){
                            if(attributetitle[j]=="厂商"){
                               picname=picname+provincename[i]+getTypeSelectedName()+attributetitle[j]+"统计,";
                             }else{
                             
                               picname=picname+provincename[i]+getTypeSelectedName()+attributetitle[j]+"统计";
                             }
                             
                        }else{
                             
                             picname=picname+provincename[i]+getTypeSelectedName()+attributetitle[j]+"统计,";
                        }
				        
				        if(attributetitle[j]=="厂商"){
				               var iframstr="<iframe id=ifram"+i+j+"c style='width:900px; height:200px' frameborder='0' scrolling='no'></iframe><br/><br/>";
				               var state="'国有化'";
		                       var notstate="'非国有化'";
                               var appendDiv2 = $("<br/><br/><div class='col-xs-12' align='center'></div>").append($("<span></span>")
				   					.text(
				   						(provincename[i]+getTypeSelectedName()+"厂商国有化对比统计")
				  					))//添加标题
				   						.append($(iframstr)
											.attr("src","${biserver_config}&path=analysissupport&action=Pzx_attribute_national_pie.xaction&width=620&height=120&ProvinceTag="+provinceid[i]+"&PZXTypeTag="+$("#pzxtype").val()+"&IfKeyTag="+getIfkey()+"&State="+encodeURI(state)+"&NotState="+encodeURI(notstate)
										));//添加iframe
						      $("#dynamicIframe").append(appendDiv2);
						      if(i==provinceid.length-1&&j==attributeid.length-1){
						        picname=picname+provincename[i]+getTypeSelectedName()+"厂商国有化对比统计";
						      }else{
						        picname=picname+provincename[i]+getTypeSelectedName()+"厂商国有化对比统计,";
						      }
				        }
				        
				       }
				 }
                        
            } 
         var href="../AnalysisSupport/PzxAttribute/createLog?periodTag="+period;
					  $.ajax({
					           type : 'GET',
					           contentType : 'application/json',
					           url: href,
					           dataType : 'text',
					           beforeSend: function(data) {
					            },
					           success: function(data) {
						   
						   }
					  });    
              
       }else{
				        
		 $.alert("所选的组合超过了31个,请重新选择!");
	   }
	  } 
	}
  });                 
});
function bar(){
   $("#dynamicIframe").empty();
   picname="";
   if(index==0){
            var localPath="${biserver_config}&path=analysissupport";
		       var Pzx_attribute_src="&action=Pzx_attribute_bar.xaction";
		       var Pzx_attributep_src="&action=Pzx_attribute_pie.xaction";
			   var IfKeyTag="'0','1'";
	        
	           typeName="小型机";
               var attributename;
               var attributeid;
               $.ajax({
                  type : 'GET',
                  contentType : 'application/json',
                  url: encodeURI(encodeURI('${ctx}/PzxClassTag/findPzxAttributeByTypeTag/'+typeName+'/'+timestamp)),
                  dataType : 'text',
                  beforeSend: function(data) {},
                  success: function(data) {
                  for(var i=0;i<data.length;i++){
                      if(data[i]=='\"'){
                         data=data.replace('\"','\'');
                      }             
                  }
//                alert(data);
                  data=eval("("+ data +")");//获取从后台返回的数据,通常是Json格式
                 // alert(data);
                   $("#pzxAttribute_div").empty();
                   $("#pzxAttribute_div").append("");

                  for(var t=0;t<data.length;t=t+2){
                      if(data[t+1]=="厂商"){
                        attributename=data[t+1];
                        attributeid=data[t];
                      }
                    }
                    
                    var appendDiv = $("<br/><br/><div class='col-xs-12' align='center'></div>").append($("<span></span>")
				   					.text(
				   						("全国小型机厂商统计")
				  					))//添加标题
				   						.append($("<iframe id=ifram0  style='width:1050px; height:430px' frameborder='0' scrolling='no'></iframe><br/><br/>")
											.attr("src","${biserver_config}&path=analysissupport&action=Pzx_attribute_bar.xaction&width=800&height=320&ProvinceTag="+getProvinceCheckedValuesString()+"&PZXAttriTag="+attributeid+"&IfKeyTag="+IfKeyTag
										));//添加iframe
				     $("#dynamicIframe").append(appendDiv);   
				     picname="全国小型机厂商统计,";               
                    //alert($("#pzxtype").val());
                    var state="'国有化'";
		            var notstate="'非国有化'";
                    var appendDiv2 = $("<br/><br/><div class='col-xs-12' align='center'></div>").append($("<span></span>")
				   					.text(
				   						("全国小型机厂商国有化对比统计")
				  					))//添加标题
				   						.append($("<iframe id=ifram1  style='width:900px; height:200px' frameborder='0' scrolling='no'></iframe><br/><br/>")
											.attr("src","${biserver_config}&path=analysissupport&action=Pzx_attribute_national_pie.xaction&width=620&height=120&ProvinceTag="+getProvinceCheckedValuesString()+"&PZXTypeTag="+$("#pzxtype").val()+"&IfKeyTag="+IfKeyTag+"&State="+encodeURI(state)+"&NotState="+encodeURI(notstate)
										));//添加iframe
					$("#dynamicIframe").append(appendDiv2);	
					picname=picname+"全国小型机厂商国有化对比统计";	
                  }
                 
                  }); 
   }else{
	  var attributetitle=getpzxAttributeCheckedTitle();
      var attributeid=getpzxAttributeCheckedValues();
      var provinceid=getProvinceCheckedValues();
      var provincename=getProvinceCheckedValuesTitle();
      if(getMultiplePro()=="0"){
            var iframstr="<iframe id=ifram0 style='width:1050px; height:430px' frameborder='0' scrolling='no'></iframe><br/><br/>";
                       var appendDiv = $("<br/><br/><div class='col-xs-12' align='center'></div>").append($("<span></span>")
				   					.text(
				   						(getTypeSelectedName()+"统计")
				  					))//添加标题
				   						.append($(iframstr)
											.attr("src","${biserver_config}&path=analysissupport&action=Pzx_attribute_bar.xaction&width=800&height=320&ProvinceTag="+getProvinceCheckedValuesString()+"&PZXAttriTag="+getpzxAttributeCheckedValuesString()+"&IfKeyTag="+getIfkey()
										));//添加iframe
			$("#dynamicIframe").append(appendDiv);
             picname=getTypeSelectedName()+"统计";
             for(var g=0;g<attributeid.length;g++){
		    if(attributetitle[g]=="厂商"){
		       picname+=","+getTypeSelectedName()+"厂商国有化对比统计";
		        var state="'国有化'";
		        var notstate="'非国有化'";
                var appendDiv2 = $("<br/><br/><div class='col-xs-12' align='center'></div>").append($("<span></span>")
				   					.text(
				   						(getTypeSelectedName()+"厂商国有化对比统计")
				  					))//添加标题
				   						.append($("<iframe  id='ifram1' style='width:900px; height:200px' frameborder='0' scrolling='no'></iframe><br/><br/>")
											.attr("src","${biserver_config}&path=analysissupport&action=Pzx_attribute_national_pie.xaction&width=620&height=120&ProvinceTag="+getProvinceCheckedValuesString()+"&PZXTypeTag="+$("#pzxtype").val()+"&IfKeyTag="+getIfkey()+"&State="+encodeURI(state)+"&NotState="+encodeURI(notstate)
										));//添加iframe
					$("#dynamicIframe").append(appendDiv2);	
		       
		    }
		}
       }else{
	   for(var i=0;i<getProvinceCheckedValues().length;i++){
	      
	    if(getProvinceCheckedValues()[i]>0){
	        
	         for(var j=0;j<getpzxAttributeCheckedValues().length;j++){
	                 var len=getProvinceCheckedValues().length;
	                 if(len==32){len=31;}
	                 if(len*getpzxAttributeCheckedValues().length<32){
	                   var iframstr="<iframe id=ifram"+i+j+" style='width:1050px; height:430px' frameborder='0' scrolling='no'></iframe><br/><br/>";
                       var appendDiv = $("<br/><br/><div class='col-xs-12' align='center'></div>").append($("<span></span>")
				   					.text(
				   						(getProvinceCheckedValuesTitle()[i]+getTypeSelectedName()+getpzxAttributeCheckedTitle()[j]+"统计")
				  					))//添加标题
				   						.append($(iframstr)
											.attr("src","${biserver_config}&path=analysissupport&action=Pzx_attribute_bar.xaction&width=800&height=320&ProvinceTag="+getProvinceCheckedValues()[i]+"&PZXAttriTag="+getpzxAttributeCheckedValues()[j]+"&IfKeyTag="+getIfkey()
										));//添加iframe
				        $("#dynamicIframe").append(appendDiv);
                        if(i==provinceid.length-1&&j==attributeid.length-1){
                            if(attributetitle[j]=="厂商"){
                               picname=picname+provincename[i]+getTypeSelectedName()+attributetitle[j]+"统计,";
                             }else{
                             
                               picname=picname+provincename[i]+getTypeSelectedName()+attributetitle[j]+"统计";
                             }
                             
                        }else{
                             
                             picname=picname+provincename[i]+getTypeSelectedName()+attributetitle[j]+"统计,";
                        }
				        
				        if(attributetitle[j]=="厂商"){
				               var iframstr="<iframe id=ifram"+i+j+"c style='width:900px; height:200px' frameborder='0' scrolling='no'></iframe><br/><br/>";
				               var state="'国有化'";
		                       var notstate="'非国有化'";
                               var appendDiv2 = $("<br/><br/><div class='col-xs-12' align='center'></div>").append($("<span></span>")
				   					.text(
				   						(provincename[i]+getTypeSelectedName()+"厂商国有化对比统计")
				  					))//添加标题
				   						.append($(iframstr)
											.attr("src","${biserver_config}&path=analysissupport&action=Pzx_attribute_national_pie.xaction&width=620&height=120&ProvinceTag="+provinceid[i]+"&PZXTypeTag="+$("#pzxtype").val()+"&IfKeyTag="+getIfkey()+"&State="+encodeURI(state)+"&NotState="+encodeURI(notstate)
										));//添加iframe
						      $("#dynamicIframe").append(appendDiv2);
						      if(i==provinceid.length-1&&j==attributeid.length-1){
						        picname=picname+provincename[i]+getTypeSelectedName()+"厂商国有化对比统计";
						      }else{
						        picname=picname+provincename[i]+getTypeSelectedName()+"厂商国有化对比统计,";
						      }
				        }
				         
				        
				        }else{
				        
				             $.alert("所选的组合超过了31个,请重新选择!");
				        }
				       }
                     } 
                  }
       }           
    }
 }
function pie(){
   
	   $("#dynamicIframe").empty();
	   picname="";
   if(index==0){
           var localPath="${biserver_config}&path=analysissupport";
		       var Pzx_attribute_src="&action=Pzx_attribute_bar.xaction";
		       var Pzx_attributep_src="&action=Pzx_attribute_pie.xaction";
			   var IfKeyTag="'0','1'";
	        
	           typeName="小型机";
               var attributename;
               var attributeid;
               $.ajax({
                  type : 'GET',
                  contentType : 'application/json',
                  url: encodeURI(encodeURI('${ctx}/PzxClassTag/findPzxAttributeByTypeTag/'+typeName+'/'+timestamp)),
                  dataType : 'text',
                  beforeSend: function(data) {},
                  success: function(data) {
                  for(var i=0;i<data.length;i++){
                      if(data[i]=='\"'){
                         data=data.replace('\"','\'');
                      }             
                  }
//                alert(data);
                  data=eval("("+ data +")");//获取从后台返回的数据,通常是Json格式
                 // alert(data);
                   $("#pzxAttribute_div").empty();
                   $("#pzxAttribute_div").append("");

                  for(var t=0;t<data.length;t=t+2){
                      if(data[t+1]=="厂商"){
                        attributename=data[t+1];
                        attributeid=data[t];
                      }
                    }
         
                    var appendDiv = $("<br/><br/><div class='col-xs-12' align='center'></div>").append($("<span></span>")
				   					.text(
				   						("全国小型机厂商统计")
				  					))//添加标题
				   						.append($("<iframe  id=ifram style='width:1050px; height:430px' frameborder='0' scrolling='no'></iframe><br/><br/>")
											.attr("src","${biserver_config}&path=analysissupport&action=Pzx_attribute_pie.xaction&width=780&height=320&ProvinceTag="+getProvinceCheckedValuesString()+"&PZXAttriTag="+attributeid+"&IfKeyTag="+IfKeyTag
										));//添加iframe
				     $("#dynamicIframe").append(appendDiv); 
				     picname="全国小型机厂商统计";                        	
                     }
                 
                  }); 
   }else{
    if(getMultiplePro()=="0"){
       
        var iframstr="<iframe id=ifram"+i+j+" style='width:1050px; height:430px' frameborder='0' scrolling='no'></iframe><br/><br/>";
        var appendDiv = $("<br/><br/><div class='col-xs-12' align='center'></div>").append($("<span></span>")
				   		.text(
				   		(getTypeSelectedName()+"统计")
				  		))//添加标题
				   		.append($(iframstr)
						.attr("src","${biserver_config}&path=analysissupport&action=Pzx_attribute_pie.xaction&width=760&height=320&ProvinceTag="+getProvinceCheckedValuesString()+"&PZXAttriTag="+getpzxAttributeCheckedValuesString()+"&IfKeyTag="+getIfkey()
						));//添加iframe
				        $("#dynamicIframe").append(appendDiv);
				        picname=getTypeSelectedName()+"统计";
    }else{
	   for(var i=0;i<getProvinceCheckedValues().length;i++){
	      
	    if(getProvinceCheckedValues()[i]>0){
	        
	         for(var j=0;j<getpzxAttributeCheckedValues().length;j++){
	                 var len=getProvinceCheckedValues().length;
	                 if(len==32){len=31;}
	                 if(len*getpzxAttributeCheckedValues().length<32){
	                  var iframstr="<iframe id=ifram"+i+j+" style='width:1050px; height:430px' frameborder='0' scrolling='no'></iframe><br/><br/>";
                       var appendDiv = $("<br/><br/><div class='col-xs-12' align='center'></div>").append($("<span></span>")
				   					.text(
				   						(getProvinceCheckedValuesTitle()[i]+getTypeSelectedName()+getpzxAttributeCheckedTitle()[j]+"统计")
				  					))//添加标题
				   						.append($(iframstr)
											.attr("src","${biserver_config}&path=analysissupport&action=Pzx_attribute_pie.xaction&width=760&height=320&ProvinceTag="+getProvinceCheckedValues()[i]+"&PZXAttriTag="+getpzxAttributeCheckedValues()[j] +"&IfKeyTag="+getIfkey()
										));//添加iframe
				        $("#dynamicIframe").append(appendDiv);
				        if(i==getProvinceCheckedValues().length-1&&j==getpzxAttributeCheckedValues().length-1){
				          picname=picname+getProvinceCheckedValuesTitle()[i]+getTypeSelectedName()+getpzxAttributeCheckedTitle()[j]+"统计";
				        }else{
				          picname=picname+getProvinceCheckedValuesTitle()[i]+getTypeSelectedName()+getpzxAttributeCheckedTitle()[j]+"统计,";
				        }
				        
				        }else{
				        
				             $.alert("所选的组合超过了31个,请重新选择!");
				        }
				       }
                     } 
                  }
      }            
   }		              
}
 function reset() {
		ProvinceReset();
		resetAttribute();
        $('#ifKey')[0].selectedIndex = 0;
        $('#multiplepro')[0].selectedIndex = 0;
	}
	
	$("#upload").click(function(){
	    
	      //var temi = $(this).attr("id").charAt($(this).attr("id").length-1);
          //alert(temi);
          var picArr = new Array();
          var str;
          var i=0;
          $("#picifram").find("iframe").each(function(){
             if(i!=0){
              if(str!=$(this).attr("id")){
                 //alert($(this).attr("id"));
                 //picArr.push($(window.frames[$(this).attr("id")].document).find("img").attr("src").substr(24));
                  var tmpArr = new Array();
	              var tmpStr = $(window.frames[$(this).attr("id")].document).find("img").attr("src");
	              tmpArr = tmpStr.split("?image=");
	              picArr.push(tmpArr[1]);
               }
              }else{
                 //alert($(this).attr("id"));
                 //picArr.push($(window.frames[$(this).attr("id")].document).find("img").attr("src").substr(24));
                  var tmpArr = new Array();
	              var tmpStr = $(window.frames[$(this).attr("id")].document).find("img").attr("src");
	              tmpArr = tmpStr.split("?image=");
	              picArr.push(tmpArr[1]);
              }
              str=$(this).attr("id");
              i++;
          });
          var picStr = picArr.join(",");
        $.dialog({
			id: "export",
			title: "请选择导出文件类型",
			content: "<div style='position:relative;height:40px;margin:0 0 0 11px;'><div class='form-horizontal'>"
	        +"<div class='form-group'><div class='col-sm-4'><label class='radio-inline'><input type='radio' name='expradio' class='expradio' value='word' checked/>Word</label></div>"
	        +"<div class='col-sm-4'><label class='radio-inline'><input type='radio' name='expradio' class='expradio' value='excel'/>Excel</label></div>"
	        +"<div class='col-sm-4'><label class='radio-inline'><input type='radio' name='expradio' class='expradio' value='pdf'/>Pdf</label></div></div>"
	        +"</div></div>",
			width: 276,
			height: 140,
			initialize: function () {
			      $(".d-buttons input:first").css({
			              "color": "#ffffff",
                          "background": "#428bca",
                          "border-color": "#357ebd"
			      });
			},
	        button: [{
			        value: "确定",
			        callback: function () {
			        
			               //alert(picStr);
			               //alert($('input[name="expradio"]:checked').val());
			               var listForm=$("#export");
		                   listForm.attr("action","${ctx}/AnalysisSupport/PzxAttribute/"+$('input[name="expradio"]:checked').val()+"?picStr="+picStr+"&picname="+picname);
		                   listForm.submit();
		                   listForm.attr("action","#");
			        }  
	        	},{
			        value: "取消",
			        callback: function () {}  
				}], 
			lock: false
		});      
      	 
	 });
	</script>		
  </body>
</html>