Commit b1c91378ac69fbd06bf1ee42998aaad5c4d4afe7
1 parent
73a089dc
Exists in
master
and in
7 other branches
inclusao de limitacao no numero de registros lidos para criacao automatica de cl…
…asses no sistema metaestat
Showing
5 changed files
with
90 additions
and
33 deletions
Show diff stats
admin/admin.db
No preview for this file type
admin/php/classe_metaestat.php
@@ -857,9 +857,11 @@ class Metaestat{ | @@ -857,9 +857,11 @@ class Metaestat{ | ||
857 | * @param filtro que sera concatenado ao sql | 857 | * @param filtro que sera concatenado ao sql |
858 | * @param 0|1 mostra ou nao todas as colunas da tabela com os dados | 858 | * @param 0|1 mostra ou nao todas as colunas da tabela com os dados |
859 | * @param coluna de agrupamento | 859 | * @param coluna de agrupamento |
860 | + * @param limite do numero de registros | ||
860 | * @return execSQL | 861 | * @return execSQL |
861 | */ | 862 | */ |
862 | - function dadosMedidaVariavel($id_medida_variavel,$filtro="",$todasascolunas = 0,$agruparpor = ""){ | 863 | + function dadosMedidaVariavel($id_medida_variavel,$filtro="",$todasascolunas = 0,$agruparpor = "",$limite=""){ |
864 | + set_time_limit(0); | ||
863 | $sql = $this->sqlMedidaVariavel($id_medida_variavel,$todasascolunas,$agruparpor); | 865 | $sql = $this->sqlMedidaVariavel($id_medida_variavel,$todasascolunas,$agruparpor); |
864 | //var_dump($sql);exit; | 866 | //var_dump($sql);exit; |
865 | $sqlf = $sql["sql"]; | 867 | $sqlf = $sql["sql"]; |
@@ -871,7 +873,9 @@ class Metaestat{ | @@ -871,7 +873,9 @@ class Metaestat{ | ||
871 | elseif(!empty($filtro)){ | 873 | elseif(!empty($filtro)){ |
872 | $sqlf .= " WHERE ".$filtro; | 874 | $sqlf .= " WHERE ".$filtro; |
873 | } | 875 | } |
874 | - //echo $sqlf;exit; | 876 | + if($limite != ""){ |
877 | + $sqlf .= " limit ".$limite; | ||
878 | + } | ||
875 | $metaVariavel = $this->listaMedidaVariavel("",$id_medida_variavel); | 879 | $metaVariavel = $this->listaMedidaVariavel("",$id_medida_variavel); |
876 | if(!empty($metaVariavel["codigo_estat_conexao"])){ | 880 | if(!empty($metaVariavel["codigo_estat_conexao"])){ |
877 | $c = $this->listaConexao($metaVariavel["codigo_estat_conexao"],true); | 881 | $c = $this->listaConexao($metaVariavel["codigo_estat_conexao"],true); |
@@ -912,12 +916,12 @@ class Metaestat{ | @@ -912,12 +916,12 @@ class Metaestat{ | ||
912 | * @param coluna de agrupamento | 916 | * @param coluna de agrupamento |
913 | * @return array("colunavalor"=>,"soma"=>,"media"=>,"menor"=>,"maior"=>,"quantidade"=>,"histograma"=>,"grupos"=>,"unidademedida"=>,"quartis"=>) | 917 | * @return array("colunavalor"=>,"soma"=>,"media"=>,"menor"=>,"maior"=>,"quantidade"=>,"histograma"=>,"grupos"=>,"unidademedida"=>,"quartis"=>) |
914 | */ | 918 | */ |
915 | - function sumarioMedidaVariavel($id_medida_variavel,$filtro="",$agruparpor=""){ | 919 | + function sumarioMedidaVariavel($id_medida_variavel,$filtro="",$agruparpor="",$limite=""){ |
916 | if(!empty($agruparpor)){ | 920 | if(!empty($agruparpor)){ |
917 | - $dados = $this->dadosMedidaVariavel($id_medida_variavel,$filtro,1); | 921 | + $dados = $this->dadosMedidaVariavel($id_medida_variavel,$filtro,1,"",$limite); |
918 | } | 922 | } |
919 | else{ | 923 | else{ |
920 | - $dados = $this->dadosMedidaVariavel($id_medida_variavel,$filtro,0); | 924 | + $dados = $this->dadosMedidaVariavel($id_medida_variavel,$filtro,0,"",$limite); |
921 | } | 925 | } |
922 | if($dados){ | 926 | if($dados){ |
923 | $metaVariavel = $this->listaMedidaVariavel("",$id_medida_variavel); | 927 | $metaVariavel = $this->listaMedidaVariavel("",$id_medida_variavel); |
admin/php/metaestat.php
@@ -474,9 +474,12 @@ switch (strtoupper($funcao)) | @@ -474,9 +474,12 @@ switch (strtoupper($funcao)) | ||
474 | $cores = str_replace(")","",$cores); | 474 | $cores = str_replace(")","",$cores); |
475 | $cores = explode(";",$cores); | 475 | $cores = explode(";",$cores); |
476 | } | 476 | } |
477 | + if(empty($limite)){ | ||
478 | + $limite = 10000; | ||
479 | + } | ||
477 | if($tipo == "quartil"){ | 480 | if($tipo == "quartil"){ |
478 | $m = new Metaestat(); | 481 | $m = new Metaestat(); |
479 | - $dados = $m->sumarioMedidaVariavel($id_medida_variavel); | 482 | + $dados = $m->sumarioMedidaVariavel($id_medida_variavel,"","",$limite); |
480 | if($dados == false){ | 483 | if($dados == false){ |
481 | retornaJSON("erro"); | 484 | retornaJSON("erro"); |
482 | exit; | 485 | exit; |
@@ -499,7 +502,7 @@ switch (strtoupper($funcao)) | @@ -499,7 +502,7 @@ switch (strtoupper($funcao)) | ||
499 | } | 502 | } |
500 | if($tipo == "intiguais5"){ | 503 | if($tipo == "intiguais5"){ |
501 | $m = new Metaestat(); | 504 | $m = new Metaestat(); |
502 | - $dados = $m->sumarioMedidaVariavel($id_medida_variavel); | 505 | + $dados = $m->sumarioMedidaVariavel($id_medida_variavel,"","",$limite); |
503 | if($dados == false){ | 506 | if($dados == false){ |
504 | retornaJSON("erro"); | 507 | retornaJSON("erro"); |
505 | exit; | 508 | exit; |
ferramentas/metaestat/analise.php
@@ -663,6 +663,7 @@ function juntaMedidasVariaveis($map_file,$layerNames,$nome){ | @@ -663,6 +663,7 @@ function juntaMedidasVariaveis($map_file,$layerNames,$nome){ | ||
663 | $nomesLayers = array(); | 663 | $nomesLayers = array(); |
664 | foreach($layernames as $layername){ | 664 | foreach($layernames as $layername){ |
665 | $l = $mapa->getlayerbyname($layername); | 665 | $l = $mapa->getlayerbyname($layername); |
666 | + $l->set("status",MS_OFF); | ||
666 | $s = explode("/*SE*/",$l->data); | 667 | $s = explode("/*SE*/",$l->data); |
667 | //pega o sql e da define um alias | 668 | //pega o sql e da define um alias |
668 | $sqls[] = $s[1]." as tabela".$conta; | 669 | $sqls[] = $s[1]." as tabela".$conta; |
@@ -686,18 +687,43 @@ function juntaMedidasVariaveis($map_file,$layerNames,$nome){ | @@ -686,18 +687,43 @@ function juntaMedidasVariaveis($map_file,$layerNames,$nome){ | ||
686 | 687 | ||
687 | $cwhere = array(); | 688 | $cwhere = array(); |
688 | for($i=1;$i<$n;$i++){ | 689 | for($i=1;$i<$n;$i++){ |
689 | - $cwhere[] = "tabela0.".$colunasIdentificador[0]." = "."tabela".$i.".".$colunasIdentificador[$i]; | 690 | + $cwhere[] = "tabela0.".$colunasIdentificador[0]."::text = "."tabela".$i.".".$colunasIdentificador[$i]."::text"; |
690 | } | 691 | } |
691 | $colunasDados = array(); | 692 | $colunasDados = array(); |
693 | + $itens = array($gid); | ||
694 | + $itensdesc = array("gid"); | ||
692 | for($i=0;$i<$n;$i++){ | 695 | for($i=0;$i<$n;$i++){ |
693 | $colunasDados[] = "tabela".$i.".".$colunasValor[$i]." as valorTema".$i; | 696 | $colunasDados[] = "tabela".$i.".".$colunasValor[$i]." as valorTema".$i; |
697 | + $itens[] = "valorTema".$i; | ||
698 | + $itensdesc[] = $nomesLayers[$i]; | ||
694 | } | 699 | } |
695 | $sqlfinal = "SELECT tabela0.".$gid.",tabela0.".$regiao["colunageo"]." as the_geom,".implode(",",$colunasDados)." from ".implode(",",$sqls)." WHERE "; | 700 | $sqlfinal = "SELECT tabela0.".$gid.",tabela0.".$regiao["colunageo"]." as the_geom,".implode(",",$colunasDados)." from ".implode(",",$sqls)." WHERE "; |
696 | $sqlfinal .= implode($cwhere," AND "); | 701 | $sqlfinal .= implode($cwhere," AND "); |
697 | $sqlfinal = str_replace("/*FA*/","",$sqlfinal); | 702 | $sqlfinal = str_replace("/*FA*/","",$sqlfinal); |
698 | $sqlfinal = str_replace("/*FAT*/","",$sqlfinal); | 703 | $sqlfinal = str_replace("/*FAT*/","",$sqlfinal); |
699 | - $data = "SELECT the_geom from ($sqlfinal) as foo using unique $gid using srid=".$regiao["srid"]; | ||
700 | - return $data; | 704 | + $data = "the_geom from ($sqlfinal) as foo using unique $gid using srid=".$regiao["srid"]; |
705 | + $nlayer = ms_newLayerObj($mapa,$mapa->getlayerbyname($layernames[0])); | ||
706 | + $nlayer->set("data",$data); | ||
707 | + $nlayer->set("name",$nlayer->name."_"); | ||
708 | + $nlayer->setmetadata("tema",$nome); | ||
709 | + $nlayer->setmetadata("METAESTAT_DERIVADO","sim"); | ||
710 | + $nlayer->setmetadata("METAESTAT_ID_MEDIDA_VARIAVEL",""); | ||
711 | + $nlayer->setmetadata("TIP",""); | ||
712 | + $nlayer->setmetadata("arquivotemaoriginal",""); | ||
713 | + $nlayer->setmetadata("nomeoriginal",""); | ||
714 | + $nlayer->setmetadata("ITENS",implode(",",$itens)); | ||
715 | + $nlayer->setmetadata("ITENSDESC",implode(",",$itensdesc)); | ||
716 | + | ||
717 | + $nclass = $nlayer->numclasses; | ||
718 | + for($i=1;$i<$nclass;$i++){ | ||
719 | + $nlayer->getclass($i)->set("status",MS_DELETE); | ||
720 | + } | ||
721 | + $c = $nlayer->getclass(0); | ||
722 | + $c->set("name"," "); | ||
723 | + $c->setexpression(""); | ||
724 | + $nlayer->set("status",MS_DEFAULT); | ||
725 | + $mapa->save($map_file); | ||
726 | + return $nlayer->name; | ||
701 | } | 727 | } |
702 | /** | 728 | /** |
703 | * Lista os nomes dos layers originados do sistema METAESTAT. | 729 | * Lista os nomes dos layers originados do sistema METAESTAT. |
ferramentas/metaestat/index.js
@@ -330,15 +330,23 @@ i3GEOF.metaestat = { | @@ -330,15 +330,23 @@ i3GEOF.metaestat = { | ||
330 | * Junta camadas em uma nova, contendo as colunas das medidas | 330 | * Junta camadas em uma nova, contendo as colunas das medidas |
331 | */ | 331 | */ |
332 | juntaMedidasVariaveis: function(){ | 332 | juntaMedidasVariaveis: function(){ |
333 | + if($i("aguardeAnalise_c") && $i("aguardeAnalise_c").style.visibility == "visible"){ | ||
334 | + return; | ||
335 | + }; | ||
333 | var p = i3GEO.configura.locaplic+"/ferramentas/metaestat/analise.php?g_sid="+i3GEO.configura.sid + | 336 | var p = i3GEO.configura.locaplic+"/ferramentas/metaestat/analise.php?g_sid="+i3GEO.configura.sid + |
334 | "&funcao=listaLayersAgrupados", | 337 | "&funcao=listaLayersAgrupados", |
335 | temp = function(retorno){ | 338 | temp = function(retorno){ |
336 | - i3GEO.janela.fechaAguarde("aguardeBuscaDados"); | 339 | + i3GEO.janela.fechaAguarde("aguardeAnalise"); |
337 | if($i("i3GEOF.junta_corpo")){ | 340 | if($i("i3GEOF.junta_corpo")){ |
338 | return; | 341 | return; |
339 | } | 342 | } |
340 | var aplica,minimiza,cabecalho,titulo,ins,n,i,lista = "<table class=lista4 >"; | 343 | var aplica,minimiza,cabecalho,titulo,ins,n,i,lista = "<table class=lista4 >"; |
341 | aplica = function(){ | 344 | aplica = function(){ |
345 | + if($i("aguardeAnalise_c") && $i("aguardeAnalise_c").style.visibility == "visible"){ | ||
346 | + return; | ||
347 | + }; | ||
348 | + i3GEO.janela.abreAguarde("aguardeAnalise","Aguarde..."); | ||
349 | + | ||
342 | var atualiza,p,lista = [],i,ics = $i("i3GEOF.junta_corpo").getElementsByTagName("input"); | 350 | var atualiza,p,lista = [],i,ics = $i("i3GEOF.junta_corpo").getElementsByTagName("input"); |
343 | n = ics.length; | 351 | n = ics.length; |
344 | for(i=0;i<n;i++){ | 352 | for(i=0;i<n;i++){ |
@@ -350,12 +358,13 @@ i3GEOF.metaestat = { | @@ -350,12 +358,13 @@ i3GEOF.metaestat = { | ||
350 | alert("Escolha uma camada"); | 358 | alert("Escolha uma camada"); |
351 | return; | 359 | return; |
352 | } | 360 | } |
353 | - i3GEO.janela.abreAguarde("aguardeBuscaDados","Aguarde..."); | 361 | + i3GEO.janela.abreAguarde("aguardeAnalise","Aguarde..."); |
354 | p = i3GEO.configura.locaplic+"/ferramentas/metaestat/analise.php?g_sid="+i3GEO.configura.sid + | 362 | p = i3GEO.configura.locaplic+"/ferramentas/metaestat/analise.php?g_sid="+i3GEO.configura.sid + |
355 | "&funcao=juntaMedidasVariaveis&layerNames="+lista.join(",")+"&nome="+$i("i3GEOFjuntaNovoNome").value; | 363 | "&funcao=juntaMedidasVariaveis&layerNames="+lista.join(",")+"&nome="+$i("i3GEOFjuntaNovoNome").value; |
356 | atualiza = function(){ | 364 | atualiza = function(){ |
357 | - i3GEO.janela.fechaAguarde("aguardeBuscaDados"); | 365 | + i3GEO.janela.fechaAguarde("aguardeAnalise"); |
358 | i3GEO.atualiza(); | 366 | i3GEO.atualiza(); |
367 | + i3GEOF.metaestat.analise.comboCamadas(); | ||
359 | }; | 368 | }; |
360 | i3GEO.util.ajaxGet(p,atualiza); | 369 | i3GEO.util.ajaxGet(p,atualiza); |
361 | }; | 370 | }; |
@@ -368,7 +377,7 @@ i3GEOF.metaestat = { | @@ -368,7 +377,7 @@ i3GEOF.metaestat = { | ||
368 | titulo = "Junção de medidas </a>"; | 377 | titulo = "Junção de medidas </a>"; |
369 | i3GEO.janela.cria( | 378 | i3GEO.janela.cria( |
370 | "260px", | 379 | "260px", |
371 | - "340px", | 380 | + "300px", |
372 | "", | 381 | "", |
373 | "", | 382 | "", |
374 | "", | 383 | "", |
@@ -397,7 +406,7 @@ i3GEOF.metaestat = { | @@ -397,7 +406,7 @@ i3GEOF.metaestat = { | ||
397 | {onclick:{fn: aplica}} | 406 | {onclick:{fn: aplica}} |
398 | ); | 407 | ); |
399 | }; | 408 | }; |
400 | - i3GEO.janela.abreAguarde("aguardeBuscaDados","Aguarde..."); | 409 | + i3GEO.janela.abreAguarde("aguardeAnalise","Aguarde..."); |
401 | i3GEO.util.ajaxGet(p,temp); | 410 | i3GEO.util.ajaxGet(p,temp); |
402 | }, | 411 | }, |
403 | /** | 412 | /** |
@@ -408,11 +417,11 @@ i3GEOF.metaestat = { | @@ -408,11 +417,11 @@ i3GEOF.metaestat = { | ||
408 | var p = i3GEO.configura.locaplic+"/ferramentas/metaestat/analise.php?g_sid="+i3GEO.configura.sid + | 417 | var p = i3GEO.configura.locaplic+"/ferramentas/metaestat/analise.php?g_sid="+i3GEO.configura.sid + |
409 | "&funcao=pegaDadosTME&tema="+i3GEO.temaAtivo, | 418 | "&funcao=pegaDadosTME&tema="+i3GEO.temaAtivo, |
410 | temp = function(retorno){ | 419 | temp = function(retorno){ |
411 | - i3GEO.janela.fechaAguarde("aguardeBuscaDados"); | 420 | + i3GEO.janela.fechaAguarde("aguardeAnalise"); |
412 | i3GEOF.toponimia.ATIVAITEM = retorno.data.itemDados; | 421 | i3GEOF.toponimia.ATIVAITEM = retorno.data.itemDados; |
413 | i3GEOF.toponimia.iniciaJanelaFlutuante(); | 422 | i3GEOF.toponimia.iniciaJanelaFlutuante(); |
414 | }; | 423 | }; |
415 | - i3GEO.janela.abreAguarde("aguardeBuscaDados","Aguarde..."); | 424 | + i3GEO.janela.abreAguarde("aguardeAnalise","Aguarde..."); |
416 | i3GEO.util.ajaxGet(p,temp); | 425 | i3GEO.util.ajaxGet(p,temp); |
417 | }, | 426 | }, |
418 | /** | 427 | /** |
@@ -436,6 +445,10 @@ i3GEOF.metaestat = { | @@ -436,6 +445,10 @@ i3GEOF.metaestat = { | ||
436 | * Executa ferramentas/metaestat/analise.php?funcao=calor; | 445 | * Executa ferramentas/metaestat/analise.php?funcao=calor; |
437 | */ | 446 | */ |
438 | calor: function(){ | 447 | calor: function(){ |
448 | + if($i("aguardeAnalise_c") && $i("aguardeAnalise_c").style.visibility == "visible"){ | ||
449 | + return; | ||
450 | + }; | ||
451 | + | ||
439 | if($i("i3geoCartoAnaliseCamadasCombo").value == ""){ | 452 | if($i("i3geoCartoAnaliseCamadasCombo").value == ""){ |
440 | i3GEO.janela.tempoMsg("Ative uma camada primeiro"); | 453 | i3GEO.janela.tempoMsg("Ative uma camada primeiro"); |
441 | return; | 454 | return; |
@@ -448,10 +461,10 @@ i3GEOF.metaestat = { | @@ -448,10 +461,10 @@ i3GEOF.metaestat = { | ||
448 | var p = i3GEO.configura.locaplic+"/ferramentas/metaestat/analise.php?g_sid="+i3GEO.configura.sid + | 461 | var p = i3GEO.configura.locaplic+"/ferramentas/metaestat/analise.php?g_sid="+i3GEO.configura.sid + |
449 | "&funcao=calor&tema="+$i("i3geoCartoAnaliseCamadasCombo").value+"&ext="+i3GEO.parametros.mapexten, | 462 | "&funcao=calor&tema="+$i("i3geoCartoAnaliseCamadasCombo").value+"&ext="+i3GEO.parametros.mapexten, |
450 | temp = function(retorno){ | 463 | temp = function(retorno){ |
451 | - i3GEO.janela.fechaAguarde("aguardecalor"); | 464 | + i3GEO.janela.fechaAguarde("aguardeAnalise"); |
452 | i3GEO.atualiza(); | 465 | i3GEO.atualiza(); |
453 | }; | 466 | }; |
454 | - i3GEO.janela.abreAguarde("aguardecalor","Aguarde..."); | 467 | + i3GEO.janela.abreAguarde("aguardeAnalise","Aguarde..."); |
455 | i3GEO.util.ajaxGet(p,temp); | 468 | i3GEO.util.ajaxGet(p,temp); |
456 | }, | 469 | }, |
457 | /** | 470 | /** |
@@ -475,6 +488,10 @@ i3GEOF.metaestat = { | @@ -475,6 +488,10 @@ i3GEOF.metaestat = { | ||
475 | * Executa ferramentas/metaestat/analise.php?funcao=alteraContorno; | 488 | * Executa ferramentas/metaestat/analise.php?funcao=alteraContorno; |
476 | */ | 489 | */ |
477 | contorno: function(){ | 490 | contorno: function(){ |
491 | + if($i("aguardeAnalise_c") && $i("aguardeAnalise_c").style.visibility == "visible"){ | ||
492 | + return; | ||
493 | + }; | ||
494 | + | ||
478 | if($i("i3geoCartoAnaliseCamadasCombo").value == ""){ | 495 | if($i("i3geoCartoAnaliseCamadasCombo").value == ""){ |
479 | i3GEO.janela.tempoMsg("Ative uma camada primeiro"); | 496 | i3GEO.janela.tempoMsg("Ative uma camada primeiro"); |
480 | return; | 497 | return; |
@@ -483,12 +500,12 @@ i3GEOF.metaestat = { | @@ -483,12 +500,12 @@ i3GEOF.metaestat = { | ||
483 | var p = i3GEO.configura.locaplic+"/ferramentas/metaestat/analise.php?g_sid="+i3GEO.configura.sid + | 500 | var p = i3GEO.configura.locaplic+"/ferramentas/metaestat/analise.php?g_sid="+i3GEO.configura.sid + |
484 | "&funcao=alteraContorno&tema="+$i("i3geoCartoAnaliseCamadasCombo").value, | 501 | "&funcao=alteraContorno&tema="+$i("i3geoCartoAnaliseCamadasCombo").value, |
485 | temp = function(retorno){ | 502 | temp = function(retorno){ |
486 | - i3GEO.janela.fechaAguarde("aguardecontorno"); | 503 | + i3GEO.janela.fechaAguarde("aguardeAnalise"); |
487 | i3GEO.atualiza(); | 504 | i3GEO.atualiza(); |
488 | i3GEO.Interface.atualizaTema("",i3GEO.temaAtivo); | 505 | i3GEO.Interface.atualizaTema("",i3GEO.temaAtivo); |
489 | i3GEO.arvoreDeCamadas.atualizaLegenda(i3GEO.temaAtivo); | 506 | i3GEO.arvoreDeCamadas.atualizaLegenda(i3GEO.temaAtivo); |
490 | }; | 507 | }; |
491 | - i3GEO.janela.abreAguarde("aguardecontorno","Aguarde..."); | 508 | + i3GEO.janela.abreAguarde("aguardeAnalise","Aguarde..."); |
492 | i3GEO.util.ajaxGet(p,temp); | 509 | i3GEO.util.ajaxGet(p,temp); |
493 | }, | 510 | }, |
494 | /** | 511 | /** |
@@ -513,12 +530,12 @@ i3GEOF.metaestat = { | @@ -513,12 +530,12 @@ i3GEOF.metaestat = { | ||
513 | var p = i3GEO.configura.locaplic+"/ferramentas/metaestat/analise.php?g_sid="+i3GEO.configura.sid + | 530 | var p = i3GEO.configura.locaplic+"/ferramentas/metaestat/analise.php?g_sid="+i3GEO.configura.sid + |
514 | "&funcao=pegaDadosTME&tema="+i3GEO.temaAtivo, | 531 | "&funcao=pegaDadosTME&tema="+i3GEO.temaAtivo, |
515 | temp = function(retorno){ | 532 | temp = function(retorno){ |
516 | - i3GEO.janela.fechaAguarde("aguardeBuscaDados"); | 533 | + i3GEO.janela.fechaAguarde("aguardeAnalise"); |
517 | i3GEOF.tme.ITEMNOMEREGIOES = retorno.data.itemNomeRegioes; | 534 | i3GEOF.tme.ITEMNOMEREGIOES = retorno.data.itemNomeRegioes; |
518 | i3GEOF.tme.ITEMDADOS = retorno.data.itemDados; | 535 | i3GEOF.tme.ITEMDADOS = retorno.data.itemDados; |
519 | i3GEOF.tme.iniciaJanelaFlutuante(); | 536 | i3GEOF.tme.iniciaJanelaFlutuante(); |
520 | }; | 537 | }; |
521 | - i3GEO.janela.abreAguarde("aguardeBuscaDados","Aguarde..."); | 538 | + i3GEO.janela.abreAguarde("aguardeAnalise","Aguarde..."); |
522 | i3GEO.util.ajaxGet(p,temp); | 539 | i3GEO.util.ajaxGet(p,temp); |
523 | }, | 540 | }, |
524 | /** | 541 | /** |
@@ -542,7 +559,7 @@ i3GEOF.metaestat = { | @@ -542,7 +559,7 @@ i3GEOF.metaestat = { | ||
542 | i3GEO.configura.sid+"&funcao=estatistica&item="+item+ | 559 | i3GEO.configura.sid+"&funcao=estatistica&item="+item+ |
543 | "&tema="+i3GEO.temaAtivo+"&exclui=&ext="+i3GEO.parametros.extentTotal, | 560 | "&tema="+i3GEO.temaAtivo+"&exclui=&ext="+i3GEO.parametros.extentTotal, |
544 | monta = function(retorno){ | 561 | monta = function(retorno){ |
545 | - i3GEO.janela.fechaAguarde("aguardeBuscaDados"); | 562 | + i3GEO.janela.fechaAguarde("aguardeAnalise"); |
546 | var ins = "", | 563 | var ins = "", |
547 | nometema, | 564 | nometema, |
548 | nome, | 565 | nome, |
@@ -572,11 +589,14 @@ i3GEOF.metaestat = { | @@ -572,11 +589,14 @@ i3GEOF.metaestat = { | ||
572 | i3GEO.util.ajaxGet(p,monta); | 589 | i3GEO.util.ajaxGet(p,monta); |
573 | } | 590 | } |
574 | else{ | 591 | else{ |
575 | - i3GEO.janela.fechaAguarde("aguardeBuscaDados"); | 592 | + i3GEO.janela.fechaAguarde("aguardeAnalise"); |
576 | i3GEO.janela.tempoMsg("Ocorreu algum erro"); | 593 | i3GEO.janela.tempoMsg("Ocorreu algum erro"); |
577 | } | 594 | } |
578 | }; | 595 | }; |
579 | - i3GEO.janela.abreAguarde("aguardeBuscaDados","Aguarde..."); | 596 | + if($i("aguardeAnalise_c") && $i("aguardeAnalise_c").style.visibility == "visible"){ |
597 | + return; | ||
598 | + }; | ||
599 | + i3GEO.janela.abreAguarde("aguardeAnalise","Aguarde..."); | ||
580 | i3GEO.util.ajaxGet(p,temp); | 600 | i3GEO.util.ajaxGet(p,temp); |
581 | }, | 601 | }, |
582 | /** | 602 | /** |
@@ -655,7 +675,7 @@ i3GEOF.metaestat = { | @@ -655,7 +675,7 @@ i3GEOF.metaestat = { | ||
655 | if(i.value != ""){ | 675 | if(i.value != ""){ |
656 | var p,temp,cores = i.value; | 676 | var p,temp,cores = i.value; |
657 | temp = function(){ | 677 | temp = function(){ |
658 | - i3GEO.janela.fechaAguarde("aguardeAplicaCores"); | 678 | + i3GEO.janela.fechaAguarde("aguardeAnalise"); |
659 | i3GEO.atualiza(); | 679 | i3GEO.atualiza(); |
660 | i3GEO.Interface.atualizaTema("",i3GEO.temaAtivo); | 680 | i3GEO.Interface.atualizaTema("",i3GEO.temaAtivo); |
661 | i3GEO.arvoreDeCamadas.atualizaLegenda(i3GEO.temaAtivo); | 681 | i3GEO.arvoreDeCamadas.atualizaLegenda(i3GEO.temaAtivo); |
@@ -666,7 +686,11 @@ i3GEOF.metaestat = { | @@ -666,7 +686,11 @@ i3GEOF.metaestat = { | ||
666 | "&tema="+i3GEO.temaAtivo + | 686 | "&tema="+i3GEO.temaAtivo + |
667 | "&cores=" + cores; | 687 | "&cores=" + cores; |
668 | i3GEO.janela.AGUARDEMODAL = true; | 688 | i3GEO.janela.AGUARDEMODAL = true; |
669 | - i3GEO.janela.abreAguarde("aguardeAplicaCores","Aplicando..."); | 689 | + if($i("aguardeAnalise_c") && $i("aguardeAnalise_c").style.visibility == "visible"){ |
690 | + return; | ||
691 | + }; | ||
692 | + | ||
693 | + i3GEO.janela.abreAguarde("aguardeAnalise","Aplicando..."); | ||
670 | i3GEO.janela.AGUARDEMODAL = false; | 694 | i3GEO.janela.AGUARDEMODAL = false; |
671 | i3GEO.util.ajaxGet(p,temp); | 695 | i3GEO.util.ajaxGet(p,temp); |
672 | } | 696 | } |
@@ -794,11 +818,11 @@ i3GEOF.metaestat = { | @@ -794,11 +818,11 @@ i3GEOF.metaestat = { | ||
794 | i3GEO.janela.tempoMsg("O filtro de tempo não modifica as camadas que foram criadas considerando-se uma data específica"); | 818 | i3GEO.janela.tempoMsg("O filtro de tempo não modifica as camadas que foram criadas considerando-se uma data específica"); |
795 | var p,pini,pfim, | 819 | var p,pini,pfim, |
796 | temp = function(retorno){ | 820 | temp = function(retorno){ |
797 | - i3GEO.janela.fechaAguarde("aguardeAplicaFiltro"); | 821 | + i3GEO.janela.fechaAguarde("aguardeAnalise"); |
798 | i3GEO.Interface.atualizaMapa(); | 822 | i3GEO.Interface.atualizaMapa(); |
799 | }; | 823 | }; |
800 | i3GEO.janela.AGUARDEMODAL = true; | 824 | i3GEO.janela.AGUARDEMODAL = true; |
801 | - i3GEO.janela.abreAguarde("aguardeAplicaFiltro","Aplicando..."); | 825 | + i3GEO.janela.abreAguarde("aguardeAnalise","Aplicando..."); |
802 | i3GEO.janela.AGUARDEMODAL = false; | 826 | i3GEO.janela.AGUARDEMODAL = false; |
803 | //pega o filtro | 827 | //pega o filtro |
804 | pini = i3GEOF.metaestat.analise.filtraPeriodo.pegaParametros("i3GEOF.filtraperiodo.Pi_0"); | 828 | pini = i3GEOF.metaestat.analise.filtraPeriodo.pegaParametros("i3GEOF.filtraperiodo.Pi_0"); |
@@ -812,7 +836,7 @@ i3GEOF.metaestat = { | @@ -812,7 +836,7 @@ i3GEOF.metaestat = { | ||
812 | "&tema="+$i("i3GEOF.filtraperiodo.comboCamada").value + | 836 | "&tema="+$i("i3GEOF.filtraperiodo.comboCamada").value + |
813 | "&g_sid="+i3GEO.configura.sid; | 837 | "&g_sid="+i3GEO.configura.sid; |
814 | if(pini[0].length == 0 || pini[1].length == 0){ | 838 | if(pini[0].length == 0 || pini[1].length == 0){ |
815 | - i3GEO.janela.fechaAguarde("aguardeAplicaFiltro"); | 839 | + i3GEO.janela.fechaAguarde("aguardeAnalise"); |
816 | return; | 840 | return; |
817 | } | 841 | } |
818 | i3GEO.util.ajaxGet(p,temp); | 842 | i3GEO.util.ajaxGet(p,temp); |
@@ -820,11 +844,11 @@ i3GEOF.metaestat = { | @@ -820,11 +844,11 @@ i3GEOF.metaestat = { | ||
820 | removeFiltro: function(){ | 844 | removeFiltro: function(){ |
821 | var p, | 845 | var p, |
822 | temp = function(retorno){ | 846 | temp = function(retorno){ |
823 | - i3GEO.janela.fechaAguarde("aguardeAplicaFiltro"); | 847 | + i3GEO.janela.fechaAguarde("aguardeAnalise"); |
824 | i3GEO.Interface.atualizaMapa(); | 848 | i3GEO.Interface.atualizaMapa(); |
825 | }; | 849 | }; |
826 | i3GEO.janela.AGUARDEMODAL = true; | 850 | i3GEO.janela.AGUARDEMODAL = true; |
827 | - i3GEO.janela.abreAguarde("aguardeAplicaFiltro","Aplicando..."); | 851 | + i3GEO.janela.abreAguarde("aguardeAnalise","Aplicando..."); |
828 | i3GEO.janela.AGUARDEMODAL = false; | 852 | i3GEO.janela.AGUARDEMODAL = false; |
829 | p = i3GEO.configura.locaplic+"/ferramentas/metaestat/analise.php?funcao=removeFiltroTempo" + | 853 | p = i3GEO.configura.locaplic+"/ferramentas/metaestat/analise.php?funcao=removeFiltroTempo" + |
830 | "&tema="+$i("i3GEOF.filtraperiodo.comboCamada").value + | 854 | "&tema="+$i("i3GEOF.filtraperiodo.comboCamada").value + |