1'use strict'; 2 3/** 4 * @ngdoc function 5 * @name minovateApp.controller: conta_publicaCtrl 6 * @description 7 * # Chama seção de Contas públicas 8 * Controller of the portalgovApp 9 */ 10angular.module('portalgovApp') 11 .controller('conta_publicaCtrl', function ($scope, $modal, $http,$rootScope,MetaService) { 12 $scope.filteredTodos = [] 13 $scope.contas=[]; 14 15 $http({method: 'POST', url: '../controllers/relatorio_iss/class_relatorio_iss.php', data: $.param({func:'7', param: 1}), headers: {'Content-Type': 'application/x-www-form-urlencoded'} }). 16 then(function(response) { 17 var r=response.data; 18 $scope.contas = r; 19 20 $scope.$watch('contas + data.currentPage + data.numPerPage', function() { 21 var begin = (($scope.data.currentPage - 1) * $scope.data.numPerPage), end = begin + $scope.data.numPerPage; 22 $scope.filteredTodos = $scope.contas.slice(begin, end); 23 }); 24 25 $scope.data.totalItems = $scope.contas.length; 26 }); 27 28 $scope.change_page = function(page){ 29 $scope.data.currentPage=page; 30 }; 31 32 $scope.busca_contas = function(param){ 33 if(param==1){ 34 document.getElementById('form_pesquisa_conta').reset(); 35 36 document.getElementById('bt_lic_tudo').value="Buscando ..."; 37 document.getElementById('bt_lic_tudo').disabled=true; 38 $http({method: 'POST', url: 'controllers/relatorio_iss/class_relatorio_iss.php', data: $.param({func:'7', param: 1}), headers: {'Content-Type': 'application/x-www-form-urlencoded'} }). 39 then(function(response) { 40 var r=response.data; 41 42 if(param==1){ 43 document.getElementById('bt_lic_tudo').value="Mostrar todos"; 44 document.getElementById('bt_lic_tudo').disabled=false; 45 } 46 else{ 47 document.getElementById('bt_lic_filtro').value="Pesquisar"; 48 document.getElementById('bt_lic_filtro').disabled=false; 49 } 50 51 if(r.length!=0){ 52 $scope.contas = r; 53 54 $scope.$watch('contas + data.currentPage + data.numPerPage', function() { 55 var begin = (($scope.data.currentPage - 1) * $scope.data.numPerPage), end = begin + $scope.data.numPerPage; 56 $scope.filteredTodos = $scope.contas.slice(begin, end); 57 }); 58 59 $scope.data.totalItems = $scope.contas.length; 60 } 61 else{ 62 bootbox.dialog({ 63 message: "Não foram encontrados resultados de acordo com esta busca!", 64 title: "Informação sobre a pesquisa", 65 buttons: { 66 main: { 67 label: "Ok", 68 className: "btn-primary", 69 } 70 } 71 }); 72 } 73 74 }); 75 } 76 else{ 77 document.getElementById('bt_lic_filtro').value="Buscando ..."; 78 document.getElementById('bt_lic_filtro').disabled=true; 79 80 var tipo_rel=document.getElementById('tipo_rel').value; 81 var periodo="0"; 82 var tipo_periodo="0"; 83 if(tipo_rel!="0"){ 84 if(tipo_rel=="DCRGF"){ 85 tipo_periodo="-1"; 86 periodo="-1"; 87 } 88 else { 89 if(tipo_rel.indexOf("RREO")!=-1){ 90 tipo_periodo=document.getElementById('tipo_periodo_3').value; 91 if(tipo_periodo!="0"){ 92 if(tipo_periodo=='Semestral'){ 93 periodo=document.getElementById('periodo_3').value; 94 } 95 else { 96 periodo=document.getElementById('periodo_5').value; 97 } 98 } 99 } 100 else { 101 if(tipo_rel.indexOf("RGF")!=-1){ 102 tipo_periodo=document.getElementById('tipo_periodo').value; 103 if(tipo_periodo!="0"){ 104 if(tipo_periodo=='Semestral'){ 105 periodo=document.getElementById('periodo_3').value; 106 } 107 else { 108 periodo=document.getElementById('periodo_2').value; 109 } 110 } 111 } 112 if(tipo_rel=="Relatórios"){ 113 tipo_periodo=document.getElementById('tipo_periodo_2').value; 114 if(tipo_periodo!="0"){ 115 if(tipo_periodo=='Anual'){ 116 periodo="-1"; 117 } 118 else{ 119 if(tipo_periodo=='Bimestral'){ 120 periodo=document.getElementById('periodo_5').value; 121 } 122 else { 123 periodo=document.getElementById('periodo_4').value; 124 } 125 } 126 } 127 } 128 } 129 } 130 } 131 132 var ano = document.getElementById("ano_rel").value; 133 var nome_rel = document.getElementById("nome_rel").value; 134 135 if(tipo_periodo!="0" && tipo_periodo!="Anual" && periodo=="0"){ 136 if(param==1){ 137 document.getElementById('bt_lic_tudo').value="Mostrar todos"; 138 document.getElementById('bt_lic_tudo').disabled=false; 139 } 140 else{ 141 document.getElementById('bt_lic_filtro').value="Pesquisar"; 142 document.getElementById('bt_lic_filtro').disabled=false; 143 } 144 145 bootbox.dialog({ 146 message: "Termine de escolher o perÃodo desejado!", 147 title: "Informação sobre a pesquisa", 148 buttons: { 149 main: { 150 label: "Ok", 151 className: "btn-primary", 152 } 153 } 154 }); 155 } 156 else{ 157 $http({method: 'POST', url: 'controllers/relatorio_iss/class_relatorio_iss.php', data: $.param({func:'7', param: 2, nome: nome_rel, tipo_rel: tipo_rel, tipo_periodo: tipo_periodo, periodo: periodo, ano: ano }), headers: {'Content-Type': 'application/x-www-form-urlencoded'} }). 158 then(function(response) { 159 var r=response.data; 160 161 if(param==1){ 162 document.getElementById('bt_lic_tudo').value="Mostrar todos"; 163 document.getElementById('bt_lic_tudo').disabled=false; 164 } 165 else{ 166 document.getElementById('bt_lic_filtro').value="Pesquisar"; 167 document.getElementById('bt_lic_filtro').disabled=false; 168 } 169 170 if(r.length!=0){ 171 $scope.contas = r; 172 173 $scope.$watch('contas + data.currentPage + data.numPerPage', function() { 174 var begin = (($scope.data.currentPage - 1) * $scope.data.numPerPage), end = begin + $scope.data.numPerPage; 175 $scope.filteredTodos = $scope.contas.slice(begin, end); 176 }); 177 178 $scope.data.totalItems = $scope.contas.length; 179 } 180 else{ 181 bootbox.dialog({ 182 message: "Não foram encontrados resultados de acordo com esta busca!", 183 title: "Informação sobre a pesquisa", 184 buttons: { 185 main: { 186 label: "Ok", 187 className: "btn-primary", 188 } 189 } 190 }); 191 } 192 }); 193 } 194 } 195 }; 196 197 $rootScope.metaservice = MetaService; 198 $rootScope.metaservice.set("Contas Públicas","",""); 199 200 $scope.data ={ 201 currentPage: 1, 202 numPerPage: 15, 203 maxSize: 5 204 }; 205 });
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.