510
| <![CDATA[<script type="text/javascript">
google.charts.load("current", {
packages: ['corechart', 'bar']
});
google.charts.setOnLoadCallback(drawChart);
function drawChart() {
var data = google.visualization.arrayToDataTable([
["Element", "Quantidade", {
role: "style"
}],
['DÚVIDAS', 29, '#15B063'],
['RECLAMAÇÕES', 23, '#F1491C'],
['URGÊNCIAS', 23, '#A349A4'],
['DENÚNCIAS', 16, '#0DA5AA'],
['SUGESTÕES', 16, '#C52259'],
['ELOGIOS', 7, '#FF7F00'],
['SERVIÇOS', 5, '#2C93DE'],
['CRÍTICAS', 4, '#939393'],
['DIREITO DO CONSUMIDOR', 2, ''],
['', , ''],
]);
var view = new google.visualization.DataView(data);
// Com decimais //decimalSymbol: ',', groupingSymbol: '.'
var formatter = new google.visualization.NumberFormat({
pattern: '#',
groupingSymbol: '.'
});
formatter.format(data, 1);
view.setColumns([0, 1,
{
calc: "stringify",
sourceColumn: 1,
type: "string",
role: "annotation"
},
2
]);
var options = {
title: "",
height: 220,
chartArea: {
width: '85%'
},
animation: {
"startup": true,
duration: 2000,
easing: 'out'
},
legend: {
position: "none",
},
viewWindow: {
min: [7, 30, 0],
max: [17, 30, 0]
},
hAxis: {
title: '',
minValue: 0
},
textStyle: {
bold: true,
fontSize: 12,
color: '#FFFFFF'
},
};
var chart = new google.visualization.ColumnChart(document.getElementById("chart_div"));
chart.draw(data, options);
}
</script>]]>
|
588
| <![CDATA[<script>
$(function() {
var nav = $('#menuOuvidoria');
$(window).scroll(function() {
if ($(this).scrollTop() > 150) {
nav.addClass("menu-fixo");
$('body').css('padding-top', 70);
} else {
nav.removeClass("menu-fixo");
$('body').css('padding-top', 0);
}
});
});
</script>]]>
|
603
| <![CDATA[<script>
function rolar_para(botaoContatos) {
var targetOffset = $(botaoContatos).offset().top;
$('html, body').animate({
scrollTop: targetOffset - 100
}, 2000);
}
$(document).ready(function() {
$(".formsend").submit(function (e) {
e.preventDefault();
var form = $(this);
var load = $(".ajax_load");
var flashClass = "ajax_response";
var flash = $("." + flashClass);
var btnsubmit = form.find('button[type=submit]');
form.ajaxSubmit({
"url": form.attr("action"),
"type": "POST",
"dataType": "json",
"beforeSend": function () {
btnsubmit.prop('disabled', true);
load.fadeIn(200).css("display", "flex");
},
"success": function (data) {
console.log(data);
btnsubmit.removeAttr('disabled');
Swal.fire(
{ text: data.msg,
title: data.title,
confirmButtonText: data.btn,
type: data.tipo
}).then(() => {
if (data.retorno != '') {
form.trigger("reset");
if (data.retorno == 'R') {
window.location.reload();
} else {
window.location.href=data.retorno;
}
}
});
},
"complete": function () {
load.fadeOut(200);
btnsubmit.removeAttr('disabled');
if (form.data("reset") === true) {
form.trigger("reset");
}
}
});
});
var uf = $("#UfId").val();
optionsCidades(uf, '#MunicipioId');
$("#UfId").change(function() {
var uf = $(this).val();
optionsCidades(uf, '#MunicipioId');
})
function optionsCidades(u, sel, muni) {
var uf = u;
var select = sel;
var municipio = muni;
$.ajax({
type: "POST",
url: 'data_cidades.php',
data: {
uf: uf,
municipio: municipio
},
beforeSend: function() {
$(select).html('<option disabled value="" selected hidden>Carregando...</option>');
},
success: function(data) {
$(select).html(data);
},
error: function() {
alert('erro optionsCidades');
},
complete: function() {
//$('.load').hide();
}
});
}
$("#data").mask("99/99/9999");
$("#fone").mask("(99) 99999-9999");
$("#fixo").click(function(e) {
$("#fone").mask("(99) 9999-9999");
});
$("#sim").click(function(e) {
$("#nome").removeAttr('required');
$("#sexo").removeAttr('required');
$("#grau").removeAttr('required');
$("#data").removeAttr('required');
$("#UfId").removeAttr('required');
$("#MunicipioId").removeAttr('required');
$("#asterisco").hide();
$("#_sexo").hide();
$("#_grau").hide();
$("#_data").hide();
$("#_uf").hide();
$("#_municipio").hide();
});
$("#nao").click(function(e) {
$("#nome").attr('required');
$("#sexo").attr('required');
$("#grau").attr('required');
$("#data").attr('required');
$("#UfId").attr('required');
$("#MunicipioId").attr('required');
$("#asterisco").show();
$("#_sexo").show();
$("#_grau").show();
$("#_data").show();
$("#_uf").show();
$("#_municipio").show();
});
$("#celular").click(function(e) {
$("#fone").mask("(99) 99999-9999");
});
});
var toggle = true;
$(".sidebar-icon").click(function() {
if (toggle) {
$(".page-container").addClass("sidebar-collapsed").removeClass("sidebar-collapsed-back");
$("#menu span").css({
"position": "absolute"
});
} else {
$(".page-container").removeClass("sidebar-collapsed").addClass("sidebar-collapsed-back");
setTimeout(function() {
$("#menu span").css({
"position": "relative"
});
}, 400);
}
toggle = !toggle;
});
</script>]]>
|
774
| <![CDATA[<script>
var doughnutData = [{
value: 28,
color: "#e74c3c",
label: "Não respondidos"
},
{
value: 357,
color: "#27ae60",
label: "Respondidos"
},
];
new Chart(document.getElementById("doughnut").getContext("2d")).Doughnut(doughnutData);
var doughnutDataS = [
{
value: 295,
color: "#27ae60",
label: "NÃO INFORMADO",
},
{
value: 45,
color: "#f39c12",
label: "FEMININO",
},
{
value: 45,
color: "#2980b9",
label: "MASCULINO",
},
];
new Chart(document.getElementById("doughnutS").getContext("2d")).Doughnut(doughnutDataS);
var doughnutDataG = [
{
value: 295,
color: "#27ae60",
label: "NÃO INFORMADO",
},
{
value: 45,
color: "#f39c12",
label: "AT� O 5� ANO INCOMPLETO DO ENSINO FUNDAMENTAL (ANTIGA 4� S�RIE) QUE SE TENHA ALFABETIZADO SEM TER FREQ�ENTADO ESCOLA REGULAR.",
},
{
value: 45,
color: "#2980b9",
label: "ANALFABETO, INCLUSIVE O QUE, EMBORA TENHA RECEBIDO INSTRU��O, N�O SE ALFABETIZOU.",
},
];
new Chart(document.getElementById("doughnutG").getContext("2d")).Doughnut(doughnutDataG);
var doughnutDataI = [
{
value: 3,
color: "#27ae60",
label: "FAIXA 1 - DE 0 A 20 ANOS",
},
{
value: 45,
color: "#f39c12",
label: "FAIXA 2 - DE 21 A 40 ANOS ",
},
{
value: 35,
color: "#2980b9",
label: "FAIXA 3 - ACIMA DE 40 ANOS",
},
{
value: 302,
color: "#1abc9c",
label: "FAIXA 4 - NÃO INFORMADO",
},
];
new Chart(document.getElementById("doughnutI").getContext("2d")).Doughnut(doughnutDataI);
</script>]]>
|
888
| <![CDATA[<script>
$("#assunto").change(function() {
var texto = $(this).find('option:selected').data('texto');
var cor = $(this).find('option:selected').data('cor');
var style = '';
$("#detalheassundo").empty();
if (texto !== '') {
if (cor !== '') {
style = 'background-color:' + cor + '; color:#FFF;';
}
$("#detalheassundo").html('<div class="alert alert-success" style="' + style + '" role="alert" ><i class="fa fa-lightbulb-o"></i> <i>' + texto + ' </i> </div>');
}
})
</script>]]>
|