-
-
Resultado
-
- A-
-
-
- A+
-
-
-
-
-
Sim: {{ resultado.numero_votos.votos_sim }}
- Não: {{ resultado.numero_votos.votos_nao }}
- Abstenções: {{ resultado.numero_votos.abstencoes }}
- Presentes: {{ resultado.numero_votos.num_presentes }}
- Total votos: {{ resultado.numero_votos.total_votos }}
-
-
{{ resultado.resultado_votacao }}
+
+
+
+
+
+ Presentes
+ {{ numPresentes }}
+
+
+ Sim
+ {{ votosSim }}
+
+
+ Não
+ {{ votosNao }}
+
+
+ Abstenções
+ {{ votosAbstencao }}
+
+
+ Total votos
+ {{ totalVotos }}
+
+
+
@@ -28,18 +35,6 @@ export default {
name: 'PainelResultado',
data() {
return {
- /*
- resultado: {
- numero_votos: {
- votos_sim: 0,
- votos_nao: 0,
- abstencoes: 0,
- total_votos: 0,
- num_presentes: 0,
- },
- resultado_votacao: '',
- }
- */
};
},
mounted() {
@@ -50,20 +45,64 @@ export default {
canRender () {
return this.sessao_aberta && this.painel_aberto;
},
- ...mapState(["painel_aberto", "sessao_aberta", "resultado"])
- },
- methods: {
- changeFontSize(value) {
- const el = this.$refs.votacao;
- if (!el) return;
- let fontSize = window.getComputedStyle(el).fontSize;
- fontSize = parseFloat(fontSize); // safely convert "16px" → 16
- el.style.fontSize = (fontSize + value) + 'px';
+ ...mapState(["painel_aberto", "sessao_aberta", "resultado", "parlamentares"]),
+ numPresentes() {
+ if (this.resultado && this.resultado.numero_votos && typeof this.resultado.numero_votos.num_presentes !== 'undefined' && this.resultado.numero_votos.num_presentes !== null) {
+ return this.resultado.numero_votos.num_presentes;
+ }
+ return this.parlamentares ? this.parlamentares.length : 0;
+ },
+ votosSim() {
+ if (this.resultado && this.resultado.numero_votos && typeof this.resultado.numero_votos.votos_sim !== 'undefined' && this.resultado.numero_votos.votos_sim !== null && this.resultado.numero_votos.votos_sim > 0) {
+ return this.resultado.numero_votos.votos_sim;
+ }
+ return this.parlamentares ? this.parlamentares.filter(p => p.voto === 'Sim').length : 0;
},
- }
+ votosNao() {
+ if (this.resultado && this.resultado.numero_votos && typeof this.resultado.numero_votos.votos_nao !== 'undefined' && this.resultado.numero_votos.votos_nao !== null && this.resultado.numero_votos.votos_nao > 0) {
+ return this.resultado.numero_votos.votos_nao;
+ }
+ return this.parlamentares ? this.parlamentares.filter(p => p.voto === 'Não').length : 0;
+ },
+ votosAbstencao() {
+ if (this.resultado && this.resultado.numero_votos && typeof this.resultado.numero_votos.abstencoes !== 'undefined' && this.resultado.numero_votos.abstencoes !== null && this.resultado.numero_votos.abstencoes > 0) {
+ return this.resultado.numero_votos.abstencoes;
+ }
+ return this.parlamentares ? this.parlamentares.filter(p => p.voto === 'Abstenção').length : 0;
+ },
+ totalVotos() {
+ if (this.resultado && this.resultado.numero_votos && typeof this.resultado.numero_votos.total_votos !== 'undefined' && this.resultado.numero_votos.total_votos !== null && this.resultado.numero_votos.total_votos > 0) {
+ return this.resultado.numero_votos.total_votos;
+ }
+ return this.votosSim + this.votosNao + this.votosAbstencao;
+ }
+ },
};
\ No newline at end of file
diff --git a/sapl/templates/painel/painel_v2.html b/sapl/templates/painel/painel_v2.html
index e8ceeb76e..ee5360311 100644
--- a/sapl/templates/painel/painel_v2.html
+++ b/sapl/templates/painel/painel_v2.html
@@ -5,86 +5,57 @@
{% load webpack_static from webpack_loader %}
-
-
-
-
{% block head_title %}{% trans 'SAPL - Sistema de Apoio ao Processo Legislativo' %}{% endblock %}
-
+
+
{% block webpack_loader_css %}
{% render_chunk_vendors 'css' %}
{% render_bundle 'global' 'css' %}
{% render_bundle 'painel' 'css' %}
{% endblock webpack_loader_css %}
-
-
-
-
+
{% block vue_content %}
-
+
+
-
-
-
+
-
-
+
+
-
-
-
-
Cronômetros
-
-
-
- A-
-
-
- A+
-
-
-
-
-
-
-
-
+
-
-
-
+
Tema da Sessão Solene
-
+ [[ sessao.tema_solene ]]
+
+
+
-
{% endblock %}
{% block webpack_loader_js %}