@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.
Files changed (122) hide show
  1. package/docs/src/component/template/ModeloRelatorioView.drawio +160 -0
  2. package/docs/src/store/modulos/relatorio.drawio +37 -0
  3. package/package.json +77 -75
  4. package/public/index.html +2 -4
  5. package/public/styles/app.css +1 -2
  6. package/src/component/forms/{Botao.vue → Button.vue} +53 -57
  7. package/src/component/forms/CheckboxGroup.vue +63 -0
  8. package/src/component/forms/{CheckboxUnico.vue → CheckboxSimple.vue} +6 -6
  9. package/src/component/forms/{Cor.vue → Color.vue} +9 -9
  10. package/src/component/forms/DateTime.vue +53 -53
  11. package/src/component/forms/{BotaoDropdown.vue → Dropdown.vue} +50 -50
  12. package/src/component/forms/EditorHtml.vue +123 -0
  13. package/src/component/forms/FileUpload.vue +189 -0
  14. package/src/component/forms/InputDecimal.vue +137 -0
  15. package/src/component/forms/InputNumber.vue +149 -0
  16. package/src/component/forms/InputPassword.vue +135 -0
  17. package/src/component/forms/InputText.vue +157 -0
  18. package/src/component/forms/Modal.vue +15 -15
  19. package/src/component/forms/RadioGroup.vue +50 -0
  20. package/src/component/forms/Select.vue +337 -0
  21. package/src/component/forms/SelectStatic.vue +120 -0
  22. package/src/component/forms/TextArea.vue +126 -0
  23. package/src/component/forms/Toggle.vue +13 -13
  24. package/src/component/layout/{Conta.vue → Account.vue} +28 -28
  25. package/src/component/layout/{Alerta.vue → Alert.vue} +22 -22
  26. package/src/component/layout/Badge.vue +23 -23
  27. package/src/component/layout/{BarraFixa.vue → FixedBar.vue} +16 -16
  28. package/src/component/layout/{CarregandoTelaInteira.vue → LoadingFullPage.vue} +3 -3
  29. package/src/component/layout/Menu.vue +66 -66
  30. package/src/component/layout/{Moldura.vue → Molded.vue} +4 -4
  31. package/src/component/layout/Panel.vue +142 -0
  32. package/src/component/layout/Popover.vue +1 -1
  33. package/src/component/layout/{BarraRolagem.vue → Scrollbar.vue} +9 -11
  34. package/src/component/layout/Tag.vue +9 -9
  35. package/src/component/layout/Topo.vue +1 -1
  36. package/src/component/layout/Wizard.vue +3 -3
  37. package/src/component/shared/BotaoCarregarMais.vue +9 -9
  38. package/src/component/shared/BotaoConsulta.vue +9 -9
  39. package/src/component/shared/CabecalhoImpressao.vue +6 -6
  40. package/src/component/shared/CodigoEditor.vue +16 -16
  41. package/src/component/shared/Confirmacao.vue +28 -28
  42. package/src/component/shared/Dica.vue +10 -10
  43. package/src/component/shared/DocumentoEditor.vue +3 -3
  44. package/src/component/shared/DocumentoPreview.vue +2 -2
  45. package/src/component/shared/EsconderMostrar.vue +26 -26
  46. package/src/component/shared/ExportarExcel.vue +14 -14
  47. package/src/component/shared/ExportarPDF.vue +10 -10
  48. package/src/component/shared/FiltroHorizontal.vue +19 -19
  49. package/src/component/shared/LegendaParametro.vue +17 -17
  50. package/src/component/shared/{Carregando.vue → Loading.vue} +11 -11
  51. package/src/component/shared/Messages.vue +83 -0
  52. package/src/component/shared/Paginacao.vue +10 -10
  53. package/src/component/shared/Progresso.vue +2 -2
  54. package/src/component/shared/Registro.vue +2 -2
  55. package/src/component/shared/ResumoTabela.vue +6 -6
  56. package/src/component/shared/SalvarCancelar.vue +26 -26
  57. package/src/component/shared/{Pesquisa.vue → Search.vue} +36 -36
  58. package/src/component/shared/Tabela.vue +49 -49
  59. package/src/component/shared/TabelaBotao.vue +13 -13
  60. package/src/component/shared/Toast.vue +7 -7
  61. package/src/component/shared/{FiltroVertical.vue → VerticalFilter.vue} +14 -14
  62. package/src/component/shared/construtor-consulta/AdicionaFiltro.vue +191 -0
  63. package/src/component/shared/construtor-consulta/Campo.vue +127 -0
  64. package/src/component/shared/construtor-consulta/ComponenteDinamico.vue +109 -0
  65. package/src/component/shared/construtor-consulta/ConstrutorConsulta.vue +70 -0
  66. package/src/component/shared/construtor-consulta/ConverteParaOdata.js +80 -0
  67. package/src/component/shared/construtor-consulta/EscolherFiltro.vue +96 -0
  68. package/src/component/shared/{query-builder → construtor-consulta}/Filtro.vue +11 -16
  69. package/src/component/shared/construtor-consulta/ListaComponenteDinamico.vue +41 -0
  70. package/src/component/shared/{query-builder → construtor-consulta}/Rodape.vue +9 -9
  71. package/src/component/shared/{query-builder → construtor-consulta}/Tags.vue +7 -7
  72. package/src/component/shared/{query-builder → construtor-consulta}/utilities.js +0 -0
  73. package/src/component/template/ModeloAdicionarModificarView.vue +11 -11
  74. package/src/component/template/ModeloDocumentoView.vue +79 -79
  75. package/src/component/template/ModeloLista.vue +66 -66
  76. package/src/component/template/ModeloRelatorioListaView.vue +71 -68
  77. package/src/component/template/ModeloRelatorioView.vue +218 -200
  78. package/src/component/template/ModeloSubView.vue +13 -13
  79. package/src/component/template/ModeloView.vue +17 -17
  80. package/src/component/template/Relatorio.js +1 -5
  81. package/src/component/template/RelatorioAdicionarModificar.vue +44 -44
  82. package/src/component/value-objects/DadosContato.vue +27 -27
  83. package/src/component/value-objects/DadosPessoa.js +1 -1
  84. package/src/component/value-objects/DadosPessoa.vue +52 -52
  85. package/src/component/value-objects/Endereco.js +1 -1
  86. package/src/component/value-objects/Endereco.vue +83 -83
  87. package/src/config/dicas.js +1 -1
  88. package/src/config/token.js +2 -2
  89. package/src/store/modules/generic.js +489 -0
  90. package/src/store/modules/report.js +246 -0
  91. package/src/store/modules/user.js +38 -0
  92. package/src/store/modules/validation.js +39 -0
  93. package/src/store/store.js +4 -4
  94. package/public/js/menu.js +0 -11
  95. package/public/styles/menu.css +0 -1399
  96. package/src/component/forms/ArquivoUpload.vue +0 -199
  97. package/src/component/forms/CheckboxMultiplo.vue +0 -63
  98. package/src/component/forms/Decimal.vue +0 -137
  99. package/src/component/forms/Escolher.vue +0 -324
  100. package/src/component/forms/EscolherEstatico.vue +0 -139
  101. package/src/component/forms/Numero.vue +0 -153
  102. package/src/component/forms/Opcoes.vue +0 -51
  103. package/src/component/forms/Senha.vue +0 -139
  104. package/src/component/forms/Texto.vue +0 -161
  105. package/src/component/forms/TextoArea.vue +0 -126
  106. package/src/component/forms/TextoEditor.vue +0 -123
  107. package/src/component/layout/Painel.vue +0 -142
  108. package/src/component/shared/Mensagem.vue +0 -86
  109. package/src/component/shared/query-builder/Campo.vue +0 -116
  110. package/src/component/shared/query-builder/ConverteParaOdata.js +0 -73
  111. package/src/component/shared/query-builder/QueryBuilder.vue +0 -164
  112. package/src/component/shared/query-builder/components/CustomSelect.vue +0 -115
  113. package/src/component/shared/query-builder/components/QueryBuilderChildren.vue +0 -46
  114. package/src/component/shared/query-builder/components/QueryBuilderGroup.vue +0 -151
  115. package/src/component/shared/query-builder/components/QueryBuilderRule.vue +0 -81
  116. package/src/component/shared/query-builder/layouts/Bootstrap/BootstrapGroup.vue +0 -120
  117. package/src/component/shared/query-builder/layouts/Bootstrap/BootstrapRule.vue +0 -171
  118. package/src/component/shared/query-builder/main.js +0 -81
  119. package/src/store/modulos/generic.js +0 -494
  120. package/src/store/modulos/relatorio.js +0 -201
  121. package/src/store/modulos/usuario.js +0 -38
  122. package/src/store/modulos/validation.js +0 -39
@@ -1,20 +1,20 @@
1
1
  <template>
2
2
  <div>
3
3
  <Painel
4
- :modulo="painel.modulo"
5
- :titulo="painel.titulo"
6
- :mostrarFiltro="painel.mostrarFiltro"
7
- :mostrarPesquisa="painel.mostrarPesquisa"
8
- :mostrarBotoes="painel.mostrarBotoes"
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="conteudo-botoes">
11
- <slot name="conteudo-botoes"></slot>
10
+ <div slot="content-buttons">
11
+ <slot name="content-buttons"></slot>
12
12
  </div>
13
- <div slot="conteudo-principal">
14
- <slot name="conteudo-principal"></slot>
13
+ <div slot="content-main">
14
+ <slot name="content-main"></slot>
15
15
  </div>
16
16
  </Painel>
17
- <SalvarCancelar :formNome="painel.formNome" />
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
- painel: Object,
29
+ panel: Object,
30
30
  },
31
31
  };
32
32
  </script>
@@ -1,104 +1,104 @@
1
1
  <template>
2
2
  <div>
3
3
  <Painel
4
- :modulo="painel.modulo"
5
- :titulo="painel.titulo"
6
- :mostrarFiltro="painel.mostrarFiltro"
7
- :mostrarPesquisa="painel.mostrarPesquisa"
8
- :mostrarBotoes="painel.mostrarBotoes"
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="conteudo-principal">
10
+ <div slot="content-main">
11
11
  <div>
12
12
  <div class="div-top">
13
- <Moldura>
13
+ <Molded>
14
14
  <b-row>
15
15
  <b-col sm="6">
16
- <div class="lado-a-lado">
17
- <Botao
18
- chave="salvarDocumento"
19
- tipo="sucesso"
20
- titulo="Salvar"
21
- classeIcone="fas fa-save"
22
- :desabilitado="salvarDesabilitado"
23
- tamanho="pequeno"
24
- :clique="salvarDocumento"
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="lado-a-lado">
28
- <Botao
27
+ <div class="side-by-side">
28
+ <Button
29
29
  v-if="id"
30
- chave="fazerCopia"
31
- tipo="sucesso"
32
- titulo="Fazer uma cópia"
33
- classeIcone="fas fa-clone"
34
- tamanho="pequeno"
35
- :clique="fazerCopia"
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="lado-a-lado">
41
- <Botao
42
- chave="abrirLegenda"
43
- tipo="info"
44
- classeIcone="fas fa-book-reader"
45
- tamanho="pequeno"
46
- :clique="abrirLegenda"
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="lado-a-lado">
50
- <Botao
51
- chave="abrirCodigo"
52
- tipo="info"
53
- classeIcone="far fa-code"
54
- tamanho="pequeno"
55
- :clique="abrirCodigo"
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="lado-a-lado">
59
- <Botao
60
- chave="abrirVisualizar"
61
- tipo="info"
62
- titulo="Visualizar"
63
- classeIcone="far fa-eye"
64
- tamanho="pequeno"
65
- :clique="abrirVisualizar"
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
- </Moldura>
70
+ </Molded>
71
71
  </div>
72
- <Modal titulo="Salvar" :largura="500" v-show="mostrarModal('salvarDocumento')">
72
+ <Modal title="Salvar" :width="500" v-show="mostrarModal('salvarDocumento')">
73
73
  <slot></slot>
74
74
  </Modal>
75
- <Modal titulo="Parâmetros" :largura="1100" v-if="mostrarModal('legenda')">
76
- <LegendaParametro v-if="modal.abrir" :legenda="legenda" />
75
+ <Modal title="Parâmetros" :width="1100" v-if="mostrarModal('legenda')">
76
+ <LegendaParametro v-if="modal.open" :legenda="legenda" />
77
77
  </Modal>
78
- <Modal titulo="Editor de Código" :largura="900" v-if="mostrarModal('codigo')">
79
- <CodigoEditor v-if="modal.abrir" />
78
+ <Modal title="Editor de Código" :width="900" v-if="mostrarModal('codigo')">
79
+ <CodigoEditor v-if="modal.open" />
80
80
  </Modal>
81
- <Modal titulo="Visualizar" :largura="1200" v-if="mostrarModal('visualizar')">
82
- <div v-if="modal.abrir">
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
- <Botao
85
+ <Button
86
86
  v-print="'#printMe'"
87
- chave="imprimir"
88
- tipo="editar"
89
- titulo="Imprimir"
90
- classeIcone="fas fa-print"
91
- tamanho="pequeno"
92
- :clique="imprimir"
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 :alturaMinima="500" :alturaMaxima="500">
97
+ <BarraRolagem :minHeight="500" :maxHeight="500">
98
98
  <div>
99
99
  <div class="a4">
100
100
  <div id="printMe">
101
- <DocumentoPreview :template="documentoPreview" :d="dados" />
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 Moldura from "@nixweb/nixloc-ui/src/component/layout/Moldura";
125
- import Botao from "@nixweb/nixloc-ui/src/component/forms/Botao";
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
- Moldura,
145
- Botao,
144
+ Molded,
145
+ Button,
146
146
  Modal,
147
147
  BarraRolagem,
148
148
  },
149
149
  props: {
150
- painel: Object,
151
- dados: Object,
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
- "fecharModal",
168
- "removeCarregando",
169
- "insereEvento",
167
+ "hideModal",
168
+ "removeLoading",
169
+ "addEvent",
170
170
  ]),
171
171
  salvarDocumento() {
172
172
  if (this.id) {
173
- this.insereEvento({ nome: "salvarDocumento" });
173
+ this.addEvent({ nome: "salvarDocumento" });
174
174
  } else {
175
175
  this.abrirModal("salvarDocumento");
176
- this.removeCarregando(["salvarDocumento"]);
176
+ this.removeLoading(["salvarDocumento"]);
177
177
  }
178
178
  },
179
179
  fazerCopia() {
180
- this.insereEvento({ nome: "fazerCopia" });
180
+ this.addEvent({ nome: "fazerCopia" });
181
181
  },
182
182
  abrirLegenda() {
183
183
  this.abrirModal("legenda");
184
- this.removeCarregando(["abrirLegenda"]);
184
+ this.removeLoading(["abrirLegenda"]);
185
185
  },
186
186
  abrirCodigo() {
187
187
  this.abrirModal("codigo");
188
- this.removeCarregando(["abrirCodigo"]);
188
+ this.removeLoading(["abrirCodigo"]);
189
189
  },
190
190
  abrirVisualizar() {
191
191
  this.abrirModal("visualizar");
192
- this.removeCarregando(["abrirVisualizar"]);
192
+ this.removeLoading(["abrirVisualizar"]);
193
193
  },
194
194
  imprimir() {
195
- this.removeCarregando(["imprimir"]);
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-moldura': mostrarMoldura }">
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="conteudo-filtro-horizontal">
9
- <slot name="conteudo-filtro-horizontal"></slot>
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 :resumo="conteudo.resumo" />
16
+ <ResumoTabela :totalization="content.totalization" />
17
17
  </b-col>
18
18
 
19
19
  <b-col sm="6">
20
- <Registro :totalRegistro="conteudo.totalRegistros" />
20
+ <Registro :totalRegistro="content.totalRecords" />
21
21
  </b-col>
22
22
  </b-row>
23
- <BarraFixa posicao="topo" v-show="selecionados.length > 0">
23
+ <FixedBar posicao="topo" v-show="selecionados.length > 0">
24
24
  <div>
25
- <Botao
25
+ <Button
26
26
  v-if="botaoExcluir"
27
- chave="remover"
28
- :titulo="`Remover ${selecionados.length}`"
29
- tipo="perigo"
30
- tamanho="pequeno"
31
- :clique="removerSelecionados"
27
+ key="remover"
28
+ :title="`Remover ${selecionados.length}`"
29
+ type="danger"
30
+ size="small"
31
+ :clicked="removerSelecionados"
32
32
  />
33
- <slot name="conteudo-botoes-tabela-cabecalho"></slot></div
34
- ></BarraFixa>
33
+ <slot name="content-buttons-tabela-cabecalho"></slot></div
34
+ ></FixedBar>
35
35
  <Tabela
36
- :cabecalhoTabela="modeloLista.cabecalhoTabela"
37
- :dados="conteudo.dados"
36
+ :headerTable="modeloLista.headerTable"
37
+ :data="content.data"
38
38
  :mostrarChecks="modeloLista.mostrarChecks"
39
39
  >
40
- <div slot="conteudo-botoes-tabela">
41
- <slot name="conteudo-botoes-tabela"></slot>
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 chave="modeloLista" :totalRegistros="conteudo.totalRegistros" />
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 Botao from "../forms/Botao.vue";
54
- import BarraFixa from "../layout/BarraFixa.vue";
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
- BarraFixa,
84
- Botao,
83
+ FixedBar,
84
+ Button,
85
85
  Tabela,
86
86
  Paginacao,
87
87
  },
88
88
  data() {
89
89
  return {
90
- conteudo: {
91
- dados: [],
92
- totalRegistros: 0,
90
+ content: {
91
+ data: [],
92
+ totalRecords: 0,
93
93
  },
94
94
  baseParams: {
95
- pesquisa: undefined,
96
- filtro: "contem",
97
- paginaAtual: 1,
98
- totalPorPagina: 10,
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 obterTodos() é feito pela mudança no paginacaoChave
105
+ // o carregamento inicial getAll() é feito pela mudança no paginacaoChave
106
106
  },
107
107
  mounted() {
108
- this.atualizaPaginacao({
109
- chave: "modeloLista",
110
- totalPorPagina: this.baseParams.totalPorPagina,
108
+ this.updatePagination({
109
+ key: "modeloLista",
110
+ totalPerPage: this.baseParams.totalPerPage,
111
111
  });
112
112
  },
113
113
  beforeDestroy() {
114
- let pesquisa = { conteudo: "", filtro: { conteudo: "contem", id: "contem" } };
115
- this.atualizaCampoPesquisa(pesquisa);
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
- "pesquisa",
121
+ "search",
122
122
  "buscouPesquisa",
123
123
  "limpouPesquisa",
124
- "totalPorPagina",
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
- "removeCarregando",
136
- "adicionaSelecao",
137
- "atualizaPaginacao",
138
- "atualizaCampoPesquisa",
135
+ "removeLoading",
136
+ "addSelection",
137
+ "updatePagination",
138
+ "updateSearch",
139
139
  ]),
140
- obterTodos() {
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.conteudo = response.conteudo;
145
- this.removeCarregando(["painel", "modeloSubView", "pesquisar", "limpar"]);
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.removeCarregando(["remover"]);
155
- this.adicionaSelecao([]);
154
+ this.removeLoading(["remover"]);
155
+ this.addSelection([]);
156
156
  });
157
157
  },
158
158
  limpaParams() {
159
- this.baseParams.paginaAtual = 1;
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.obterTodos();
170
+ this.getAll();
171
171
  }
172
172
  },
173
173
  buscouPesquisa: function () {
174
- this.baseParams.pesquisa = this.pesquisa.conteudo;
175
- this.baseParams.filtro = this.pesquisa.filtro.id;
174
+ this.baseParams.search = this.search.content;
175
+ this.baseParams.filter = this.search.filter.id;
176
176
  this.limpaParams();
177
- this.obterTodos();
177
+ this.getAll();
178
178
  },
179
179
  limpouPesquisa: function () {
180
- this.baseParams.pesquisa = "";
181
- this.baseParams.filtro = "";
180
+ this.baseParams.search = "";
181
+ this.baseParams.filter = "";
182
182
  this.limpaParams();
183
- this.obterTodos();
183
+ this.getAll();
184
184
  },
185
185
  paginacaoChave: {
186
186
  handler(value) {
187
187
  this.limpaParams();
188
- this.baseParams.paginaAtual = value.paginaAtual;
189
- this.obterTodos();
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 campoAlvo = value.campoAlvo;
196
- let obj = { chave: campoAlvo, valor: value.valor };
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 chave = this.paramsFiltro[i].chave;
201
+ let key = this.paramsFiltro[i].key;
202
202
  let valor = this.paramsFiltro[i].valor;
203
203
 
204
- if (chave == "periodo") {
204
+ if (key == "periodo") {
205
205
  result["inicio"] = valor.inicio;
206
206
  result["fim"] = valor.fim;
207
207
  } else {
208
- result[chave] = valor;
208
+ result[key] = valor;
209
209
  }
210
210
  }
211
211
 
212
212
  this.filtroDinamico = result;
213
213
 
214
- this.atualizaPaginacao({
215
- chave: "modeloLista",
216
- totalPorPagina: this.filtroDinamico.totalPorPagina,
214
+ this.updatePagination({
215
+ key: "modeloLista",
216
+ totalPerPage: this.filtroDinamico.totalPerPage,
217
217
  });
218
218
 
219
- this.obterTodos();
219
+ this.getAll();
220
220
  },
221
221
  deep: true,
222
222
  },