atualização plancidades v1.0

parent af296c73
......@@ -122,6 +122,8 @@ class IndicadorObjEstrController extends Controller
$where[] = ['bln_ppa', true];
}
// return $where;
// $indicadores = IndicadoresObjetivosEstrategicos::join('mcid_plancidades.opc_unidades_responsaveis', 'opc_unidades_responsaveis.id', '=', 'unidade_responsavel_id')
// ->join('mcid_plancidades.opc_orgao_pei', 'opc_orgao_pei.id','=','opc_unidades_responsaveis.orgao_pei_id')
// ->join('mcid_plancidades.opc_objetivos_estrategicos_pei', 'opc_objetivos_estrategicos_pei.id', '=', 'objetivo_estrategico_pei_id')
......
<?php
namespace App\Mod_plancidades;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasOne;
class ViewIndicadoresObjetivosEstrategicos extends Model
{
protected $connection = 'pgsql_corp';
protected $keyType = 'string';
protected $table = 'mcid_plancidades.view_indicadores_objetivos_estrategicos';
public $timestamps = false; // tabela possui coluna de data de criação/atualização
}
......@@ -16574,8 +16574,8 @@ if (token) {
isRight = dir < 0,
arrLength = isArr ? array.length : 0,
view = getView(0, arrLength, this.__views__),
start = View.start,
end = View.end,
start = view.start,
end = view.end,
length = end - start,
index = isRight ? end : (start - 1),
iteratees = this.__iteratees__,
......@@ -100129,7 +100129,7 @@ var render = function() {
"a",
{
staticClass: "br-button danger mr-3",
attrs: { type: "button", href: this.url }
attrs: { type: "button", href: this.url + "/plancidades/" }
},
[_vm._v("Voltar\n ")]
)
......@@ -101133,7 +101133,7 @@ var render = function() {
staticClass: "br-button danger mr-3",
attrs: {
type: "button",
onclick: "javascript:window.history.go(-1)"
href: "javascript:window.history.go(-1)"
}
},
[_vm._v("Voltar\n ")]
......@@ -102808,7 +102808,10 @@ var render = function() {
_vm._v(" "),
_c(
"a",
{ staticClass: "br-button danger mr-3", attrs: { href: this.url } },
{
staticClass: "br-button danger mr-3",
attrs: { href: this.url + "/plancidades/" }
},
[_vm._v("Voltar\n ")]
)
])
......@@ -105317,7 +105320,10 @@ var render = function() {
_vm._v(" "),
_c(
"a",
{ staticClass: "br-button danger mr-3", attrs: { href: this.url } },
{
staticClass: "br-button danger mr-3",
attrs: { href: this.url + "/plancidades/" }
},
[_vm._v("Voltar\n ")]
)
])
......@@ -106140,6 +106146,12 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
//
//
//
//
//
//
//
//
//
/* harmony default export */ __webpack_exports__["default"] = ({
props: ['url', 'dadosMonitoramento', 'dadosProjeto', 'etapasProjeto', 'etapasPreenchidas', 'situacaoMonitoramento'],
......@@ -106242,27 +106254,28 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
}
return this.percentual_estimado_ano;
},
corProgressoPorcentagem: function corProgressoPorcentagem() {
if (this.dadosProjeto.progressoProjeto < 50) {
return 'bg-warning';
corProgressoPorcentagem: function corProgressoPorcentagem(progresso) {
if (progresso / this.PercentualEstimadoAno() < 0.5) {
return 'bg-danger';
} else {
if (this.dadosProjeto.progressoProjeto <= 99) {
return 'bg-primary';
if (progresso / this.PercentualEstimadoAno() <= 0.75) {
return 'bg-warning';
} else {
return 'bg-success';
}
}
},
corTabelaPorcentagem: function corTabelaPorcentagem(item) {
if (item.situacao_etapa_projeto_id == 1 || item.situacao_etapa_projeto_id == null) {
return '';
} else {
if (item.situacao_etapa_projeto_id == 2) {
return 'table-warning';
} else {
return 'table-success';
}
if (item.situacao_etapa_projeto_id == 1) {
return 'table-secondary';
}
if (item.situacao_etapa_projeto_id > 1 && item.situacao_etapa_projeto_id < 5) {
return 'table-warning';
}
if (item.situacao_etapa_projeto_id == 5) {
return 'table-success';
}
return '';
}
},
mounted: function mounted() {
......@@ -106292,7 +106305,7 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
this.situacao_monitoramento_observacao = '';
};
console.log(this.dadosMonitoramento.num_ano_periodo_monitoramento);
console.log(this.etapasPreenchidas);
}
});
......@@ -106436,7 +106449,12 @@ var render = function() {
_vm._v(" "),
_c("div", { staticClass: "progress" }, [
_c("div", {
class: ["progress-bar", _vm.corProgressoPorcentagem()],
class: [
"progress-bar",
_vm.corProgressoPorcentagem(
this.dadosProjeto.percentualAtual
)
],
style: { width: _vm.dadosProjeto.percentualAtual + "%" },
attrs: {
role: "progressbar",
......@@ -106468,7 +106486,12 @@ var render = function() {
_vm._v(" "),
_c("div", { staticClass: "progress" }, [
_c("div", {
class: ["progress-bar", _vm.corProgressoPorcentagem()],
class: [
"progress-bar",
_vm.corProgressoPorcentagem(
this.dadosProjeto.vlr_percentual_validado
)
],
style: {
width: _vm.dadosProjeto.vlr_percentual_validado + "%"
},
......@@ -106508,6 +106531,8 @@ var render = function() {
])
]),
_vm._v(" "),
_vm._t("default"),
_vm._v(" "),
_c("hr"),
_vm._v(" "),
_c("div", { staticClass: "mt-5" }, [
......@@ -106525,15 +106550,26 @@ var render = function() {
_vm._v(" "),
_c("td", [_vm._v(_vm._s(item.dsc_etapa))]),
_vm._v(" "),
_c("td", { staticClass: "text-center" }, [
_vm._v(_vm._s(item.vlr_peso_etapa))
]),
_c(
"td",
{
staticClass: "text-center",
staticStyle: {
width: "80px",
"border-left": "1px solid #dee2e6"
}
},
[_vm._v(_vm._s(item.vlr_peso_etapa))]
),
_vm._v(" "),
_c(
"td",
{
staticClass: "text-center",
staticStyle: { width: "90px" }
staticStyle: {
width: "80px",
"border-left": "1px solid #dee2e6"
}
},
[
_vm._v(
......@@ -106552,7 +106588,7 @@ var render = function() {
"td",
{
staticClass: "text-center",
staticStyle: { width: "90px" }
staticStyle: { width: "80px" }
},
[
_vm._v(
......@@ -106569,35 +106605,101 @@ var render = function() {
]
),
_vm._v(" "),
_c("td", { staticClass: "text-center" }, [
_vm._v(
_vm._s(
item.txt_situacao != null
? item.txt_situacao
: "Não monitorado"
_c(
"td",
{
staticClass: "text-center",
staticStyle: { width: "160px" }
},
[
_vm._v(
_vm._s(
item.txt_situacao_validada != null
? item.txt_situacao_validada + " (validada)"
: "Não monitorado"
)
)
)
]),
]
),
_vm._v(" "),
_c("td", { staticClass: "text-center" }, [
_vm._v(
_vm._s(
item.dte_efetiva_inicio_etapa != null
? _vm.formatarData(item.dte_efetiva_inicio_etapa)
: "Não monitorado"
_c(
"td",
{
staticClass: "text-center",
staticStyle: {
width: "160px",
"border-left": "1px solid #dee2e6"
}
},
[
_vm._v(
_vm._s(
item.dte_efetiva_inicio_etapa != null
? _vm.formatarData(item.dte_efetiva_inicio_etapa)
: "Não monitorado"
)
)
)
]),
]
),
_vm._v(" "),
_c("td", { staticClass: "text-center" }, [
_vm._v(
_vm._s(
item.dte_efetiva_conclusao_etapa != null
? _vm.formatarData(item.dte_efetiva_conclusao_etapa)
: "Não monitorado"
_c(
"td",
{
staticClass: "text-center",
staticStyle: { width: "160px" }
},
[
_vm._v(
_vm._s(
item.dte_efetiva_conclusao_etapa != null
? _vm.formatarData(item.dte_efetiva_conclusao_etapa)
: "Não monitorado"
)
)
)
])
]
),
_vm._v(" "),
_c(
"td",
{
staticClass: "text-center",
staticStyle: { width: "160px" }
},
[
_vm._v(
_vm._s(
item.txt_situacao != null
? item.txt_situacao
: "Não monitorado"
)
)
]
),
_vm._v(" "),
_c(
"td",
{
staticClass: "text-center",
staticStyle: { "border-left": "1px solid #dee2e6" }
},
[
_c(
"button",
{
staticClass: "br-button circle primary small",
attrs: {
type: "button",
"data-bs-toggle": "modal",
"data-bs-target": "#" + item.etapa_projeto_id,
"data-toggle": "tooltip",
"data-placement": "top",
title: "Monitorar etapa"
}
},
[_c("i", { staticClass: "fa fa-pen" })]
)
]
)
])
}),
0
......@@ -106606,8 +106708,6 @@ var render = function() {
])
]),
_vm._v(" "),
_vm._t("default"),
_vm._v(" "),
_c("div", { staticClass: "row mt-3" }, [
_c("div", { staticClass: "col col-xs-12 br-textarea" }, [
_c("label", [_vm._v("Análise do Projeto")]),
......@@ -106806,21 +106906,53 @@ var staticRenderFns = [
_vm._v(" "),
_c("th", [_vm._v("Nome da etapa (Produto)")]),
_vm._v(" "),
_c("th", { staticClass: "text-center" }, [_vm._v("Peso relativo")]),
_c(
"th",
{
staticClass: "text-center",
staticStyle: { "border-left": "1px solid #dee2e6" }
},
[_vm._v("Peso relativo")]
),
_vm._v(" "),
_c("th", { staticClass: "text-center" }, [_vm._v("Data de Início")]),
_c(
"th",
{
staticClass: "text-center",
staticStyle: { "border-left": "1px solid #dee2e6" }
},
[_vm._v("Data de Início")]
),
_vm._v(" "),
_c("th", { staticClass: "text-center" }, [_vm._v("Data de Conclusão")]),
_vm._v(" "),
_c("th", { staticClass: "text-center" }, [_vm._v("Situação da Etapa")]),
_vm._v(" "),
_c(
"th",
{
staticClass: "text-center",
staticStyle: { "border-left": "1px solid #dee2e6" }
},
[_vm._v("Data Atual de Início")]
),
_vm._v(" "),
_c("th", { staticClass: "text-center" }, [
_vm._v("Data efetiva de início")
_vm._v("Data Atual de Conclusão")
]),
_vm._v(" "),
_c("th", { staticClass: "text-center" }, [
_vm._v("Data efetiva de conclusão")
])
_vm._v("Situação Atual da Etapa")
]),
_vm._v(" "),
_c(
"th",
{
staticClass: "text-center",
staticStyle: { "border-left": "1px solid #dee2e6" }
},
[_vm._v("Monitorar")]
)
])
])
}
......@@ -107080,6 +107212,8 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
//
//
//
//
//
/* harmony default export */ __webpack_exports__["default"] = ({
props: ['url', 'dadosMonitoramento', 'dadosProjeto', 'etapasProjeto', 'etapasPreenchidas', 'situacaoMonitoramento'],
......@@ -107128,26 +107262,27 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
return this.percentual_estimado_ano;
},
corProgressoPorcentagem: function corProgressoPorcentagem() {
if (this.dadosProjeto.progressoProjeto < 50) {
return 'bg-warning';
if (this.dadosProjeto.percentualAtual / this.PercentualEstimadoAno() < 0.5) {
return 'bg-danger';
} else {
if (this.dadosProjeto.progressoProjeto <= 99) {
return 'bg-primary';
if (this.dadosProjeto.percentualAtual / this.PercentualEstimadoAno() <= 0.75) {
return 'bg-warning';
} else {
return 'bg-success';
}
}
},
corTabelaPorcentagem: function corTabelaPorcentagem(item) {
if (item.situacao_etapa_projeto_id == 1 || item.situacao_etapa_projeto_id == null) {
return '';
} else {
if (item.situacao_etapa_projeto_id == 2) {
return 'table-warning';
} else {
return 'table-success';
}
if (item.situacao_etapa_projeto_id == 1) {
return 'table-secondary';
}
if (item.situacao_etapa_projeto_id > 1 && item.situacao_etapa_projeto_id < 5) {
return 'table-warning';
}
if (item.situacao_etapa_projeto_id == 5) {
return 'table-success';
}
return '';
}
},
mounted: function mounted() {
......@@ -107380,15 +107515,26 @@ var render = function() {
_vm._v(" "),
_c("td", [_vm._v(_vm._s(item.dsc_etapa))]),
_vm._v(" "),
_c("td", { staticClass: "text-center" }, [
_vm._v(_vm._s(item.vlr_peso_etapa))
]),
_c(
"td",
{
staticClass: "text-center",
staticStyle: {
width: "80px",
"border-left": "1px solid #dee2e6"
}
},
[_vm._v(_vm._s(item.vlr_peso_etapa))]
),
_vm._v(" "),
_c(
"td",
{
staticClass: "text-center",
staticStyle: { width: "90px" }
staticStyle: {
width: "80px",
"border-left": "1px solid #dee2e6"
}
},
[
_vm._v(
......@@ -107407,7 +107553,7 @@ var render = function() {
"td",
{
staticClass: "text-center",
staticStyle: { width: "90px" }
staticStyle: { width: "80px" }
},
[
_vm._v(
......@@ -107424,35 +107570,76 @@ var render = function() {
]
),
_vm._v(" "),
_c("td", { staticClass: "text-center" }, [
_vm._v(
_vm._s(
item.txt_situacao != null
? item.txt_situacao
: "Não monitorado"
_c(
"td",
{
staticClass: "text-center",
staticStyle: { width: "160px" }
},
[
_vm._v(
_vm._s(
item.txt_situacao_validada != null
? item.txt_situacao_validada + " (validada)"
: "Não monitorado"
)
)
)
]),
]
),
_vm._v(" "),
_c("td", { staticClass: "text-center" }, [
_vm._v(
_vm._s(
item.dte_efetiva_inicio_etapa != null
? _vm.formatarData(item.dte_efetiva_inicio_etapa)
: "Não monitorado"
_c(
"td",
{
staticClass: "text-center",
staticStyle: {
width: "160px",
"border-left": "1px solid #dee2e6"
}
},
[
_vm._v(
_vm._s(
item.dte_efetiva_inicio_etapa != null
? _vm.formatarData(item.dte_efetiva_inicio_etapa)
: "Não monitorado"
)
)
)
]),
]
),
_vm._v(" "),
_c("td", { staticClass: "text-center" }, [
_vm._v(
_vm._s(
item.dte_efetiva_conclusao_etapa != null
? _vm.formatarData(item.dte_efetiva_conclusao_etapa)
: "Não monitorado"
_c(
"td",
{
staticClass: "text-center",
staticStyle: { width: "160px" }
},
[
_vm._v(
_vm._s(
item.dte_efetiva_conclusao_etapa != null
? _vm.formatarData(item.dte_efetiva_conclusao_etapa)
: "Não monitorado"
)
)
)
])
]
),
_vm._v(" "),
_c(
"td",
{
staticClass: "text-center",
staticStyle: { width: "160px" }
},
[
_vm._v(
_vm._s(
item.txt_situacao != null
? item.txt_situacao
: "Não monitorado"
)
)
]
)
])
}),
0
......@@ -107596,20 +107783,43 @@ var staticRenderFns = [
_vm._v(" "),
_c("th", [_vm._v("Nome da etapa (Produto)")]),
_vm._v(" "),
_c("th", { staticClass: "text-center" }, [_vm._v("Peso relativo")]),
_c(
"th",
{
staticClass: "text-center",
staticStyle: { "border-left": "1px solid #dee2e6" }
},
[_vm._v("Peso relativo")]
),
_vm._v(" "),
_c("th", { staticClass: "text-center" }, [_vm._v("Data de Início")]),
_c(
"th",
{
staticClass: "text-center",
staticStyle: { "border-left": "1px solid #dee2e6" }
},
[_vm._v("Data de Início")]
),
_vm._v(" "),
_c("th", { staticClass: "text-center" }, [_vm._v("Data de Conclusão")]),
_vm._v(" "),
_c("th", { staticClass: "text-center" }, [_vm._v("Situação da Etapa")]),
_vm._v(" "),
_c(
"th",
{
staticClass: "text-center",
staticStyle: { "border-left": "1px solid #dee2e6" }
},
[_vm._v("Data Atual de Início")]
),
_vm._v(" "),
_c("th", { staticClass: "text-center" }, [
_vm._v("Data efetiva de início")
_vm._v("Data Atual de Conclusão")
]),
_vm._v(" "),
_c("th", { staticClass: "text-center" }, [
_vm._v("Data efetiva de conclusão")
_vm._v("Situação Atual da Etapa")
])
])
])
......@@ -43,7 +43,7 @@
</button>
<a class="br-button danger mr-3" type="button" :href="this.url+'/plancidades/'">Voltar
<a class="br-button danger mr-3" type="button" :href='this.url+"/plancidades/"'>Voltar
</a>
</div>
</div>
......
......@@ -30,7 +30,7 @@
</p>
</div>
<form role="form" method="GET" action='{{ route('plancidades.monitoramentos.objetivoEstrategico.listarIndicadores') }}'>
<form role="form" method="GET" action="{{ route('plancidades.monitoramentos.objetivoEstrategico.listarIndicadores') }}">
<consulta-monitoramento-indicador :url="'{{ url('/') }}'">
</consulta-monitoramento-indicador>
<span class="br-divider sm my-3"></span>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment