@nixweb/nixloc-ui 0.0.119 → 0.0.122
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/src/component/template/ModeloRelatorioView.drawio +160 -0
- package/docs/src/store/modulos/relatorio.drawio +37 -0
- package/package.json +77 -75
- package/public/index.html +2 -4
- package/public/styles/app.css +1 -2
- package/src/component/forms/{Botao.vue → Button.vue} +53 -57
- package/src/component/forms/CheckboxGroup.vue +63 -0
- package/src/component/forms/{CheckboxUnico.vue → CheckboxSimple.vue} +6 -6
- package/src/component/forms/{Cor.vue → Color.vue} +9 -9
- package/src/component/forms/DateTime.vue +53 -53
- package/src/component/forms/{BotaoDropdown.vue → Dropdown.vue} +50 -50
- package/src/component/forms/EditorHtml.vue +123 -0
- package/src/component/forms/FileUpload.vue +189 -0
- package/src/component/forms/InputDecimal.vue +137 -0
- package/src/component/forms/InputNumber.vue +149 -0
- package/src/component/forms/InputPassword.vue +135 -0
- package/src/component/forms/InputText.vue +157 -0
- package/src/component/forms/Modal.vue +15 -15
- package/src/component/forms/RadioGroup.vue +50 -0
- package/src/component/forms/Select.vue +337 -0
- package/src/component/forms/SelectStatic.vue +120 -0
- package/src/component/forms/TextArea.vue +126 -0
- package/src/component/forms/Toggle.vue +13 -13
- package/src/component/layout/{Conta.vue → Account.vue} +28 -28
- package/src/component/layout/{Alerta.vue → Alert.vue} +22 -22
- package/src/component/layout/Badge.vue +23 -23
- package/src/component/layout/{BarraFixa.vue → FixedBar.vue} +16 -16
- package/src/component/layout/{CarregandoTelaInteira.vue → LoadingFullPage.vue} +3 -3
- package/src/component/layout/Menu.vue +66 -66
- package/src/component/layout/{Moldura.vue → Molded.vue} +4 -4
- package/src/component/layout/Panel.vue +142 -0
- package/src/component/layout/Popover.vue +1 -1
- package/src/component/layout/{BarraRolagem.vue → Scrollbar.vue} +9 -11
- package/src/component/layout/Tag.vue +9 -9
- package/src/component/layout/Topo.vue +1 -1
- package/src/component/layout/Wizard.vue +3 -3
- package/src/component/shared/BotaoCarregarMais.vue +9 -9
- package/src/component/shared/BotaoConsulta.vue +9 -9
- package/src/component/shared/CabecalhoImpressao.vue +6 -6
- package/src/component/shared/CodigoEditor.vue +16 -16
- package/src/component/shared/Confirmacao.vue +28 -28
- package/src/component/shared/Dica.vue +10 -10
- package/src/component/shared/DocumentoEditor.vue +3 -3
- package/src/component/shared/DocumentoPreview.vue +2 -2
- package/src/component/shared/EsconderMostrar.vue +26 -26
- package/src/component/shared/ExportarExcel.vue +14 -14
- package/src/component/shared/ExportarPDF.vue +10 -10
- package/src/component/shared/FiltroHorizontal.vue +19 -19
- package/src/component/shared/LegendaParametro.vue +17 -17
- package/src/component/shared/{Carregando.vue → Loading.vue} +11 -11
- package/src/component/shared/Messages.vue +83 -0
- package/src/component/shared/Paginacao.vue +10 -10
- package/src/component/shared/Progresso.vue +2 -2
- package/src/component/shared/Registro.vue +2 -2
- package/src/component/shared/ResumoTabela.vue +6 -6
- package/src/component/shared/SalvarCancelar.vue +26 -26
- package/src/component/shared/{Pesquisa.vue → Search.vue} +36 -36
- package/src/component/shared/Tabela.vue +49 -49
- package/src/component/shared/TabelaBotao.vue +13 -13
- package/src/component/shared/Toast.vue +7 -7
- package/src/component/shared/{FiltroVertical.vue → VerticalFilter.vue} +14 -14
- package/src/component/shared/construtor-consulta/AdicionaFiltro.vue +191 -0
- package/src/component/shared/construtor-consulta/Campo.vue +127 -0
- package/src/component/shared/construtor-consulta/ComponenteDinamico.vue +109 -0
- package/src/component/shared/construtor-consulta/ConstrutorConsulta.vue +70 -0
- package/src/component/shared/construtor-consulta/ConverteParaOdata.js +80 -0
- package/src/component/shared/construtor-consulta/EscolherFiltro.vue +96 -0
- package/src/component/shared/{query-builder → construtor-consulta}/Filtro.vue +11 -16
- package/src/component/shared/construtor-consulta/ListaComponenteDinamico.vue +41 -0
- package/src/component/shared/{query-builder → construtor-consulta}/Rodape.vue +9 -9
- package/src/component/shared/{query-builder → construtor-consulta}/Tags.vue +7 -7
- package/src/component/shared/{query-builder → construtor-consulta}/utilities.js +0 -0
- package/src/component/template/ModeloAdicionarModificarView.vue +11 -11
- package/src/component/template/ModeloDocumentoView.vue +79 -79
- package/src/component/template/ModeloLista.vue +66 -66
- package/src/component/template/ModeloRelatorioListaView.vue +71 -68
- package/src/component/template/ModeloRelatorioView.vue +218 -200
- package/src/component/template/ModeloSubView.vue +13 -13
- package/src/component/template/ModeloView.vue +17 -17
- package/src/component/template/Relatorio.js +1 -5
- package/src/component/template/RelatorioAdicionarModificar.vue +44 -44
- package/src/component/value-objects/DadosContato.vue +27 -27
- package/src/component/value-objects/DadosPessoa.js +1 -1
- package/src/component/value-objects/DadosPessoa.vue +52 -52
- package/src/component/value-objects/Endereco.js +1 -1
- package/src/component/value-objects/Endereco.vue +83 -83
- package/src/config/dicas.js +1 -1
- package/src/config/token.js +2 -2
- package/src/store/modules/generic.js +489 -0
- package/src/store/modules/report.js +246 -0
- package/src/store/modules/user.js +38 -0
- package/src/store/modules/validation.js +39 -0
- package/src/store/store.js +4 -4
- package/public/js/menu.js +0 -11
- package/public/styles/menu.css +0 -1399
- package/src/component/forms/ArquivoUpload.vue +0 -199
- package/src/component/forms/CheckboxMultiplo.vue +0 -63
- package/src/component/forms/Decimal.vue +0 -137
- package/src/component/forms/Escolher.vue +0 -324
- package/src/component/forms/EscolherEstatico.vue +0 -139
- package/src/component/forms/Numero.vue +0 -153
- package/src/component/forms/Opcoes.vue +0 -51
- package/src/component/forms/Senha.vue +0 -139
- package/src/component/forms/Texto.vue +0 -161
- package/src/component/forms/TextoArea.vue +0 -126
- package/src/component/forms/TextoEditor.vue +0 -123
- package/src/component/layout/Painel.vue +0 -142
- package/src/component/shared/Mensagem.vue +0 -86
- package/src/component/shared/query-builder/Campo.vue +0 -116
- package/src/component/shared/query-builder/ConverteParaOdata.js +0 -73
- package/src/component/shared/query-builder/QueryBuilder.vue +0 -164
- package/src/component/shared/query-builder/components/CustomSelect.vue +0 -115
- package/src/component/shared/query-builder/components/QueryBuilderChildren.vue +0 -46
- package/src/component/shared/query-builder/components/QueryBuilderGroup.vue +0 -151
- package/src/component/shared/query-builder/components/QueryBuilderRule.vue +0 -81
- package/src/component/shared/query-builder/layouts/Bootstrap/BootstrapGroup.vue +0 -120
- package/src/component/shared/query-builder/layouts/Bootstrap/BootstrapRule.vue +0 -171
- package/src/component/shared/query-builder/main.js +0 -81
- package/src/store/modulos/generic.js +0 -494
- package/src/store/modulos/relatorio.js +0 -201
- package/src/store/modulos/usuario.js +0 -38
- package/src/store/modulos/validation.js +0 -39
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
3
|
<Painel
|
|
4
|
-
:
|
|
5
|
-
:
|
|
6
|
-
:mostrarFiltro="
|
|
7
|
-
:
|
|
8
|
-
:
|
|
4
|
+
:module="panel.module"
|
|
5
|
+
:title="panel.title"
|
|
6
|
+
:mostrarFiltro="panel.mostrarFiltro"
|
|
7
|
+
:showSearch="panel.showSearch"
|
|
8
|
+
:showButtons="panel.showButtons"
|
|
9
9
|
>
|
|
10
|
-
<div slot="
|
|
11
|
-
<slot name="
|
|
10
|
+
<div slot="content-buttons">
|
|
11
|
+
<slot name="content-buttons"></slot>
|
|
12
12
|
</div>
|
|
13
|
-
<div slot="
|
|
14
|
-
<slot name="
|
|
13
|
+
<div slot="content-main">
|
|
14
|
+
<slot name="content-main"></slot>
|
|
15
15
|
</div>
|
|
16
16
|
</Painel>
|
|
17
|
-
<SalvarCancelar :
|
|
17
|
+
<SalvarCancelar :formName="panel.formName" />
|
|
18
18
|
</div>
|
|
19
19
|
</template>
|
|
20
20
|
|
|
@@ -26,7 +26,7 @@ export default {
|
|
|
26
26
|
name: "ModeloAdicionarModificarView",
|
|
27
27
|
components: { Painel, SalvarCancelar },
|
|
28
28
|
props: {
|
|
29
|
-
|
|
29
|
+
panel: Object,
|
|
30
30
|
},
|
|
31
31
|
};
|
|
32
32
|
</script>
|
|
@@ -1,104 +1,104 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
3
|
<Painel
|
|
4
|
-
:
|
|
5
|
-
:
|
|
6
|
-
:mostrarFiltro="
|
|
7
|
-
:
|
|
8
|
-
:
|
|
4
|
+
:module="panel.module"
|
|
5
|
+
:title="panel.title"
|
|
6
|
+
:mostrarFiltro="panel.mostrarFiltro"
|
|
7
|
+
:showSearch="panel.showSearch"
|
|
8
|
+
:showButtons="panel.showButtons"
|
|
9
9
|
>
|
|
10
|
-
<div slot="
|
|
10
|
+
<div slot="content-main">
|
|
11
11
|
<div>
|
|
12
12
|
<div class="div-top">
|
|
13
|
-
<
|
|
13
|
+
<Molded>
|
|
14
14
|
<b-row>
|
|
15
15
|
<b-col sm="6">
|
|
16
|
-
<div class="
|
|
17
|
-
<
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
:
|
|
23
|
-
|
|
24
|
-
:
|
|
16
|
+
<div class="side-by-side">
|
|
17
|
+
<Button
|
|
18
|
+
key="salvarDocumento"
|
|
19
|
+
type="success"
|
|
20
|
+
title="Salvar"
|
|
21
|
+
classIcon="fas fa-save"
|
|
22
|
+
:disabled="salvarDesabilitado"
|
|
23
|
+
size="small"
|
|
24
|
+
:clicked="salvarDocumento"
|
|
25
25
|
/>
|
|
26
26
|
</div>
|
|
27
|
-
<div class="
|
|
28
|
-
<
|
|
27
|
+
<div class="side-by-side">
|
|
28
|
+
<Button
|
|
29
29
|
v-if="id"
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
:
|
|
30
|
+
key="fazerCopia"
|
|
31
|
+
type="success"
|
|
32
|
+
title="Fazer uma cópia"
|
|
33
|
+
classIcon="fas fa-clone"
|
|
34
|
+
size="small"
|
|
35
|
+
:clicked="fazerCopia"
|
|
36
36
|
/>
|
|
37
37
|
</div>
|
|
38
38
|
</b-col>
|
|
39
39
|
<b-col class="text-right" sm="6">
|
|
40
|
-
<div class="
|
|
41
|
-
<
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
:
|
|
40
|
+
<div class="side-by-side">
|
|
41
|
+
<Button
|
|
42
|
+
key="abrirLegenda"
|
|
43
|
+
type="info"
|
|
44
|
+
classIcon="fas fa-book-reader"
|
|
45
|
+
size="small"
|
|
46
|
+
:clicked="abrirLegenda"
|
|
47
47
|
/>
|
|
48
48
|
</div>
|
|
49
|
-
<div class="
|
|
50
|
-
<
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
:
|
|
49
|
+
<div class="side-by-side">
|
|
50
|
+
<Button
|
|
51
|
+
key="abrirCodigo"
|
|
52
|
+
type="info"
|
|
53
|
+
classIcon="far fa-code"
|
|
54
|
+
size="small"
|
|
55
|
+
:clicked="abrirCodigo"
|
|
56
56
|
/>
|
|
57
57
|
</div>
|
|
58
|
-
<div class="
|
|
59
|
-
<
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
:
|
|
58
|
+
<div class="side-by-side">
|
|
59
|
+
<Button
|
|
60
|
+
key="abrirVisualizar"
|
|
61
|
+
type="info"
|
|
62
|
+
title="Visualizar"
|
|
63
|
+
classIcon="far fa-eye"
|
|
64
|
+
size="small"
|
|
65
|
+
:clicked="abrirVisualizar"
|
|
66
66
|
/>
|
|
67
67
|
</div>
|
|
68
68
|
</b-col>
|
|
69
69
|
</b-row>
|
|
70
|
-
</
|
|
70
|
+
</Molded>
|
|
71
71
|
</div>
|
|
72
|
-
<Modal
|
|
72
|
+
<Modal title="Salvar" :width="500" v-show="mostrarModal('salvarDocumento')">
|
|
73
73
|
<slot></slot>
|
|
74
74
|
</Modal>
|
|
75
|
-
<Modal
|
|
76
|
-
<LegendaParametro v-if="modal.
|
|
75
|
+
<Modal title="Parâmetros" :width="1100" v-if="mostrarModal('legenda')">
|
|
76
|
+
<LegendaParametro v-if="modal.open" :legenda="legenda" />
|
|
77
77
|
</Modal>
|
|
78
|
-
<Modal
|
|
79
|
-
<CodigoEditor v-if="modal.
|
|
78
|
+
<Modal title="Editor de Código" :width="900" v-if="mostrarModal('codigo')">
|
|
79
|
+
<CodigoEditor v-if="modal.open" />
|
|
80
80
|
</Modal>
|
|
81
|
-
<Modal
|
|
82
|
-
<div v-if="modal.
|
|
81
|
+
<Modal title="Visualizar" :width="1200" v-if="mostrarModal('visualizar')">
|
|
82
|
+
<div v-if="modal.open">
|
|
83
83
|
<b-row>
|
|
84
84
|
<b-col class="text-center">
|
|
85
|
-
<
|
|
85
|
+
<Button
|
|
86
86
|
v-print="'#printMe'"
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
:
|
|
87
|
+
key="imprimir"
|
|
88
|
+
type="edit"
|
|
89
|
+
title="Imprimir"
|
|
90
|
+
classIcon="fas fa-print"
|
|
91
|
+
size="small"
|
|
92
|
+
:clicked="imprimir"
|
|
93
93
|
/>
|
|
94
94
|
</b-col>
|
|
95
95
|
</b-row>
|
|
96
96
|
<br />
|
|
97
|
-
<BarraRolagem :
|
|
97
|
+
<BarraRolagem :minHeight="500" :maxHeight="500">
|
|
98
98
|
<div>
|
|
99
99
|
<div class="a4">
|
|
100
100
|
<div id="printMe">
|
|
101
|
-
<DocumentoPreview :template="documentoPreview" :d="
|
|
101
|
+
<DocumentoPreview :template="documentoPreview" :d="data" />
|
|
102
102
|
</div>
|
|
103
103
|
</div>
|
|
104
104
|
</div>
|
|
@@ -121,8 +121,8 @@ import DocumentoEditor from "@nixweb/nixloc-ui/src/component/shared/DocumentoEdi
|
|
|
121
121
|
import DocumentoPreview from "@nixweb/nixloc-ui/src/component/shared/DocumentoPreview.vue";
|
|
122
122
|
import CodigoEditor from "@nixweb/nixloc-ui/src/component/shared/CodigoEditor.vue";
|
|
123
123
|
import LegendaParametro from "@nixweb/nixloc-ui/src/component/shared/LegendaParametro.vue";
|
|
124
|
-
import
|
|
125
|
-
import
|
|
124
|
+
import Molded from "@nixweb/nixloc-ui/src/component/layout/Molded";
|
|
125
|
+
import Button from "@nixweb/nixloc-ui/src/component/forms/Button";
|
|
126
126
|
import Modal from "@nixweb/nixloc-ui/src/component/forms/Modal";
|
|
127
127
|
import BarraRolagem from "@nixweb/nixloc-ui/src/component/layout/BarraRolagem.vue";
|
|
128
128
|
|
|
@@ -141,14 +141,14 @@ export default {
|
|
|
141
141
|
DocumentoPreview,
|
|
142
142
|
CodigoEditor,
|
|
143
143
|
LegendaParametro,
|
|
144
|
-
|
|
145
|
-
|
|
144
|
+
Molded,
|
|
145
|
+
Button,
|
|
146
146
|
Modal,
|
|
147
147
|
BarraRolagem,
|
|
148
148
|
},
|
|
149
149
|
props: {
|
|
150
|
-
|
|
151
|
-
|
|
150
|
+
panel: Object,
|
|
151
|
+
data: Object,
|
|
152
152
|
legenda: Array,
|
|
153
153
|
},
|
|
154
154
|
data() {
|
|
@@ -164,35 +164,35 @@ export default {
|
|
|
164
164
|
methods: {
|
|
165
165
|
...mapMutations("generic", [
|
|
166
166
|
"abrirModal",
|
|
167
|
-
"
|
|
168
|
-
"
|
|
169
|
-
"
|
|
167
|
+
"hideModal",
|
|
168
|
+
"removeLoading",
|
|
169
|
+
"addEvent",
|
|
170
170
|
]),
|
|
171
171
|
salvarDocumento() {
|
|
172
172
|
if (this.id) {
|
|
173
|
-
this.
|
|
173
|
+
this.addEvent({ nome: "salvarDocumento" });
|
|
174
174
|
} else {
|
|
175
175
|
this.abrirModal("salvarDocumento");
|
|
176
|
-
this.
|
|
176
|
+
this.removeLoading(["salvarDocumento"]);
|
|
177
177
|
}
|
|
178
178
|
},
|
|
179
179
|
fazerCopia() {
|
|
180
|
-
this.
|
|
180
|
+
this.addEvent({ nome: "fazerCopia" });
|
|
181
181
|
},
|
|
182
182
|
abrirLegenda() {
|
|
183
183
|
this.abrirModal("legenda");
|
|
184
|
-
this.
|
|
184
|
+
this.removeLoading(["abrirLegenda"]);
|
|
185
185
|
},
|
|
186
186
|
abrirCodigo() {
|
|
187
187
|
this.abrirModal("codigo");
|
|
188
|
-
this.
|
|
188
|
+
this.removeLoading(["abrirCodigo"]);
|
|
189
189
|
},
|
|
190
190
|
abrirVisualizar() {
|
|
191
191
|
this.abrirModal("visualizar");
|
|
192
|
-
this.
|
|
192
|
+
this.removeLoading(["abrirVisualizar"]);
|
|
193
193
|
},
|
|
194
194
|
imprimir() {
|
|
195
|
-
this.
|
|
195
|
+
this.removeLoading(["imprimir"]);
|
|
196
196
|
},
|
|
197
197
|
},
|
|
198
198
|
watch: {
|
|
@@ -1,57 +1,57 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
|
-
<div :class="{ 'g-div-
|
|
3
|
+
<div :class="{ 'g-div-molded': mostrarMoldura }">
|
|
4
4
|
<b-row>
|
|
5
5
|
<b-col sm="12"
|
|
6
6
|
><div>
|
|
7
7
|
<FiltroHorizontal v-if="mostrarFiltroHorizontal">
|
|
8
|
-
<div slot="
|
|
9
|
-
<slot name="
|
|
8
|
+
<div slot="content-filter-horizontal">
|
|
9
|
+
<slot name="content-filter-horizontal"></slot>
|
|
10
10
|
</div>
|
|
11
11
|
</FiltroHorizontal></div
|
|
12
12
|
></b-col>
|
|
13
13
|
</b-row>
|
|
14
14
|
<b-row>
|
|
15
15
|
<b-col sm="6">
|
|
16
|
-
<ResumoTabela :
|
|
16
|
+
<ResumoTabela :totalization="content.totalization" />
|
|
17
17
|
</b-col>
|
|
18
18
|
|
|
19
19
|
<b-col sm="6">
|
|
20
|
-
<Registro :totalRegistro="
|
|
20
|
+
<Registro :totalRegistro="content.totalRecords" />
|
|
21
21
|
</b-col>
|
|
22
22
|
</b-row>
|
|
23
|
-
<
|
|
23
|
+
<FixedBar posicao="topo" v-show="selecionados.length > 0">
|
|
24
24
|
<div>
|
|
25
|
-
<
|
|
25
|
+
<Button
|
|
26
26
|
v-if="botaoExcluir"
|
|
27
|
-
|
|
28
|
-
:
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
:
|
|
27
|
+
key="remover"
|
|
28
|
+
:title="`Remover ${selecionados.length}`"
|
|
29
|
+
type="danger"
|
|
30
|
+
size="small"
|
|
31
|
+
:clicked="removerSelecionados"
|
|
32
32
|
/>
|
|
33
|
-
<slot name="
|
|
34
|
-
></
|
|
33
|
+
<slot name="content-buttons-tabela-cabecalho"></slot></div
|
|
34
|
+
></FixedBar>
|
|
35
35
|
<Tabela
|
|
36
|
-
:
|
|
37
|
-
:
|
|
36
|
+
:headerTable="modeloLista.headerTable"
|
|
37
|
+
:data="content.data"
|
|
38
38
|
:mostrarChecks="modeloLista.mostrarChecks"
|
|
39
39
|
>
|
|
40
|
-
<div slot="
|
|
41
|
-
<slot name="
|
|
40
|
+
<div slot="content-buttons-tabela">
|
|
41
|
+
<slot name="content-buttons-tabela"></slot>
|
|
42
42
|
</div>
|
|
43
43
|
</Tabela>
|
|
44
44
|
</div>
|
|
45
45
|
<br />
|
|
46
|
-
<Paginacao
|
|
46
|
+
<Paginacao key="modeloLista" :totalRecords="content.totalRecords" />
|
|
47
47
|
</div>
|
|
48
48
|
</template>
|
|
49
49
|
|
|
50
50
|
<script>
|
|
51
51
|
import Paginacao from "../shared/Paginacao.vue";
|
|
52
52
|
import Tabela from "../shared/Tabela.vue";
|
|
53
|
-
import
|
|
54
|
-
import
|
|
53
|
+
import Button from "../forms/Button.vue";
|
|
54
|
+
import FixedBar from "../layout/FixedBar.vue";
|
|
55
55
|
import Registro from "../shared/Registro.vue";
|
|
56
56
|
import ResumoTabela from "../shared/ResumoTabela.vue";
|
|
57
57
|
import FiltroHorizontal from "../shared/FiltroHorizontal.vue";
|
|
@@ -80,48 +80,48 @@ export default {
|
|
|
80
80
|
FiltroHorizontal,
|
|
81
81
|
ResumoTabela,
|
|
82
82
|
Registro,
|
|
83
|
-
|
|
84
|
-
|
|
83
|
+
FixedBar,
|
|
84
|
+
Button,
|
|
85
85
|
Tabela,
|
|
86
86
|
Paginacao,
|
|
87
87
|
},
|
|
88
88
|
data() {
|
|
89
89
|
return {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
90
|
+
content: {
|
|
91
|
+
data: [],
|
|
92
|
+
totalRecords: 0,
|
|
93
93
|
},
|
|
94
94
|
baseParams: {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
95
|
+
search: undefined,
|
|
96
|
+
filter: "contem",
|
|
97
|
+
currentPage: 1,
|
|
98
|
+
totalPerPage: 10,
|
|
99
99
|
},
|
|
100
100
|
paramsFiltro: [],
|
|
101
101
|
filtroDinamico: {},
|
|
102
102
|
};
|
|
103
103
|
},
|
|
104
104
|
created() {
|
|
105
|
-
// o carregamento inicial
|
|
105
|
+
// o carregamento inicial getAll() é feito pela mudança no paginacaoChave
|
|
106
106
|
},
|
|
107
107
|
mounted() {
|
|
108
|
-
this.
|
|
109
|
-
|
|
110
|
-
|
|
108
|
+
this.updatePagination({
|
|
109
|
+
key: "modeloLista",
|
|
110
|
+
totalPerPage: this.baseParams.totalPerPage,
|
|
111
111
|
});
|
|
112
112
|
},
|
|
113
113
|
beforeDestroy() {
|
|
114
|
-
let
|
|
115
|
-
this.
|
|
114
|
+
let search = { content: "", filter: { content: "contem", id: "contem" } };
|
|
115
|
+
this.updateSearch(search);
|
|
116
116
|
},
|
|
117
117
|
computed: {
|
|
118
118
|
...mapState("generic", [
|
|
119
119
|
"selecionados",
|
|
120
120
|
"metodoExecutadoApi",
|
|
121
|
-
"
|
|
121
|
+
"search",
|
|
122
122
|
"buscouPesquisa",
|
|
123
123
|
"limpouPesquisa",
|
|
124
|
-
"
|
|
124
|
+
"totalPerPage",
|
|
125
125
|
"EscolherEstatico",
|
|
126
126
|
]),
|
|
127
127
|
...mapGetters("generic", ["paginacao"]),
|
|
@@ -132,17 +132,17 @@ export default {
|
|
|
132
132
|
methods: {
|
|
133
133
|
...mapActions("generic", ["getApi", "deleteAllApi"]),
|
|
134
134
|
...mapMutations("generic", [
|
|
135
|
-
"
|
|
136
|
-
"
|
|
137
|
-
"
|
|
138
|
-
"
|
|
135
|
+
"removeLoading",
|
|
136
|
+
"addSelection",
|
|
137
|
+
"updatePagination",
|
|
138
|
+
"updateSearch",
|
|
139
139
|
]),
|
|
140
|
-
|
|
140
|
+
getAll() {
|
|
141
141
|
let obj = { ...this.baseParams, ...this.filtroDinamico, ...this.propsParam };
|
|
142
142
|
let params = { url: this.modeloLista.urlGetApi, obj: obj };
|
|
143
143
|
this.getApi(params).then((response) => {
|
|
144
|
-
this.
|
|
145
|
-
this.
|
|
144
|
+
this.content = response.content;
|
|
145
|
+
this.removeLoading(["panel", "modeloSubView", "pesquisar", "limpar"]);
|
|
146
146
|
});
|
|
147
147
|
},
|
|
148
148
|
removerSelecionados() {
|
|
@@ -151,12 +151,12 @@ export default {
|
|
|
151
151
|
selecionados: this.selecionados,
|
|
152
152
|
};
|
|
153
153
|
this.deleteAllApi(params).then(() => {
|
|
154
|
-
this.
|
|
155
|
-
this.
|
|
154
|
+
this.removeLoading(["remover"]);
|
|
155
|
+
this.addSelection([]);
|
|
156
156
|
});
|
|
157
157
|
},
|
|
158
158
|
limpaParams() {
|
|
159
|
-
this.baseParams.
|
|
159
|
+
this.baseParams.currentPage = 1;
|
|
160
160
|
},
|
|
161
161
|
},
|
|
162
162
|
watch: {
|
|
@@ -167,56 +167,56 @@ export default {
|
|
|
167
167
|
value === "deleteAllApi" ||
|
|
168
168
|
value === "deleteAllApiErro"
|
|
169
169
|
) {
|
|
170
|
-
this.
|
|
170
|
+
this.getAll();
|
|
171
171
|
}
|
|
172
172
|
},
|
|
173
173
|
buscouPesquisa: function () {
|
|
174
|
-
this.baseParams.
|
|
175
|
-
this.baseParams.
|
|
174
|
+
this.baseParams.search = this.search.content;
|
|
175
|
+
this.baseParams.filter = this.search.filter.id;
|
|
176
176
|
this.limpaParams();
|
|
177
|
-
this.
|
|
177
|
+
this.getAll();
|
|
178
178
|
},
|
|
179
179
|
limpouPesquisa: function () {
|
|
180
|
-
this.baseParams.
|
|
181
|
-
this.baseParams.
|
|
180
|
+
this.baseParams.search = "";
|
|
181
|
+
this.baseParams.filter = "";
|
|
182
182
|
this.limpaParams();
|
|
183
|
-
this.
|
|
183
|
+
this.getAll();
|
|
184
184
|
},
|
|
185
185
|
paginacaoChave: {
|
|
186
186
|
handler(value) {
|
|
187
187
|
this.limpaParams();
|
|
188
|
-
this.baseParams.
|
|
189
|
-
this.
|
|
188
|
+
this.baseParams.currentPage = value.currentPage;
|
|
189
|
+
this.getAll();
|
|
190
190
|
},
|
|
191
191
|
deep: true,
|
|
192
192
|
},
|
|
193
193
|
EscolherEstatico: {
|
|
194
194
|
handler(value) {
|
|
195
|
-
let
|
|
196
|
-
let obj = {
|
|
195
|
+
let fieldTarget = value.fieldTarget;
|
|
196
|
+
let obj = { key: fieldTarget, valor: value.valor };
|
|
197
197
|
this.paramsFiltro.push(obj);
|
|
198
198
|
|
|
199
199
|
var result = {};
|
|
200
200
|
for (var i = 0; i < this.paramsFiltro.length; i++) {
|
|
201
|
-
let
|
|
201
|
+
let key = this.paramsFiltro[i].key;
|
|
202
202
|
let valor = this.paramsFiltro[i].valor;
|
|
203
203
|
|
|
204
|
-
if (
|
|
204
|
+
if (key == "periodo") {
|
|
205
205
|
result["inicio"] = valor.inicio;
|
|
206
206
|
result["fim"] = valor.fim;
|
|
207
207
|
} else {
|
|
208
|
-
result[
|
|
208
|
+
result[key] = valor;
|
|
209
209
|
}
|
|
210
210
|
}
|
|
211
211
|
|
|
212
212
|
this.filtroDinamico = result;
|
|
213
213
|
|
|
214
|
-
this.
|
|
215
|
-
|
|
216
|
-
|
|
214
|
+
this.updatePagination({
|
|
215
|
+
key: "modeloLista",
|
|
216
|
+
totalPerPage: this.filtroDinamico.totalPerPage,
|
|
217
217
|
});
|
|
218
218
|
|
|
219
|
-
this.
|
|
219
|
+
this.getAll();
|
|
220
220
|
},
|
|
221
221
|
deep: true,
|
|
222
222
|
},
|