PzxAttribute.jsp 31.7 KB
Newer Older
afe's avatar
afe committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679
<%@ 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>