@nixweb/nixloc-ui 0.0.121 → 0.0.124

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 (135) hide show
  1. package/docs/src/component/template/ModeloRelatorioView.drawio +2 -2
  2. package/docs/src/store/modulos/relatorio.drawio +2 -2
  3. package/package.json +77 -77
  4. package/public/styles/app.css +1 -1
  5. package/src/component/forms/{Botao.vue → Button.vue} +53 -57
  6. package/src/component/forms/CheckboxGroup.vue +63 -0
  7. package/src/component/forms/{CheckboxUnico.vue → CheckboxSimple.vue} +8 -8
  8. package/src/component/forms/{Cor.vue → Color.vue} +9 -9
  9. package/src/component/forms/DateTime.vue +55 -55
  10. package/src/component/forms/{BotaoDropdown.vue → Dropdown.vue} +58 -58
  11. package/src/component/forms/EditorHtml.vue +123 -0
  12. package/src/component/forms/FileUpload.vue +189 -0
  13. package/src/component/forms/InputDecimal.vue +137 -0
  14. package/src/component/forms/InputNumber.vue +149 -0
  15. package/src/component/forms/InputPassword.vue +135 -0
  16. package/src/component/forms/InputText.vue +157 -0
  17. package/src/component/forms/Modal.vue +15 -15
  18. package/src/component/forms/RadioGroup.vue +50 -0
  19. package/src/component/forms/Select.vue +337 -0
  20. package/src/component/forms/SelectStatic.vue +120 -0
  21. package/src/component/forms/TextArea.vue +126 -0
  22. package/src/component/forms/Toggle.vue +13 -13
  23. package/src/component/layout/{Conta.vue → Account.vue} +28 -28
  24. package/src/component/layout/{Alerta.vue → Alert.vue} +22 -22
  25. package/src/component/layout/Badge.vue +23 -23
  26. package/src/component/layout/{BarraFixa.vue → FixedBar.vue} +16 -16
  27. package/src/component/layout/{Topo.vue → Header.vue} +5 -5
  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 +15 -15
  35. package/src/component/layout/Wizard.vue +3 -3
  36. package/src/component/shared/{CodigoEditor.vue → CodeEditor.vue} +25 -25
  37. package/src/component/shared/Collapse.vue +131 -0
  38. package/src/component/shared/Confirmation.vue +80 -0
  39. package/src/component/shared/{DocumentoEditor.vue → DocumentEditor.vue} +10 -16
  40. package/src/component/shared/{DocumentoPreview.vue → DocumentPreview.vue} +2 -2
  41. package/src/component/shared/ExportExcel.vue +67 -0
  42. package/src/component/shared/{ExportarPDF.vue → ExportPDF.vue} +18 -18
  43. package/src/component/shared/HeaderPrint.vue +36 -0
  44. package/src/component/shared/HorizontalFilter.vue +59 -0
  45. package/src/component/shared/LegendaParametro.vue +22 -22
  46. package/src/component/shared/{Carregando.vue → Loading.vue} +16 -16
  47. package/src/component/shared/LoadingMoreButton.vue +23 -0
  48. package/src/component/shared/Messages.vue +83 -0
  49. package/src/component/shared/{Paginacao.vue → Pagination.vue} +12 -12
  50. package/src/component/shared/ProgressBar.vue +21 -0
  51. package/src/component/shared/{BotaoConsulta.vue → QueryButton.vue} +16 -16
  52. package/src/component/shared/SaveCancel.vue +56 -0
  53. package/src/component/shared/{Pesquisa.vue → Search.vue} +46 -46
  54. package/src/component/shared/Table.vue +243 -0
  55. package/src/component/shared/TableButton.vue +36 -0
  56. package/src/component/shared/{Registro.vue → TableTotalRecords.vue} +7 -7
  57. package/src/component/shared/{ResumoTabela.vue → TableTotalization.vue} +12 -8
  58. package/src/component/shared/Tip.vue +42 -0
  59. package/src/component/shared/Toast.vue +7 -7
  60. package/src/component/shared/{FiltroVertical.vue → VerticalFilter.vue} +24 -24
  61. package/src/component/shared/query-builder/AddRule.vue +187 -0
  62. package/src/component/shared/query-builder/ConvertToOdata.js +80 -0
  63. package/src/component/shared/query-builder/DynamicComponent.vue +107 -0
  64. package/src/component/shared/query-builder/Fields.vue +127 -0
  65. package/src/component/shared/query-builder/ListDynamicComponent.vue +42 -0
  66. package/src/component/shared/query-builder/QueryBuilder.vue +25 -120
  67. package/src/component/shared/query-builder/{Filtro.vue → Rules.vue} +13 -18
  68. package/src/component/shared/query-builder/SelectRule.vue +96 -0
  69. package/src/component/shared/query-builder/Tags.vue +14 -14
  70. package/src/component/shared/query-builder/{Rodape.vue → Totalization.vue} +10 -10
  71. package/src/component/template/AddEditReport.vue +106 -0
  72. package/src/component/template/ListViewWithHandlerData.vue +231 -0
  73. package/src/component/template/ViewTemplateConfiguration.vue +69 -0
  74. package/src/component/template/ViewTemplateDocumentView.vue +227 -0
  75. package/src/component/template/ViewTemplateReportList.vue +230 -0
  76. package/src/component/template/ViewTemplateReportPreview.vue +500 -0
  77. package/src/component/template/ViewTemplateWithSalveCancel.vue +32 -0
  78. package/src/component/template/ViewTemplateWithTable.vue +49 -0
  79. package/src/component/template/model/Report.js +6 -0
  80. package/src/component/value-objects/DadosContato.vue +34 -35
  81. package/src/component/value-objects/DadosPessoa.vue +58 -58
  82. package/src/component/value-objects/Endereco.vue +96 -97
  83. package/src/config/dicas.js +1 -1
  84. package/src/config/token.js +2 -2
  85. package/src/store/modules/generic.js +489 -0
  86. package/src/store/modules/report.js +246 -0
  87. package/src/store/modules/user.js +38 -0
  88. package/src/store/modules/validation.js +39 -0
  89. package/src/store/store.js +4 -4
  90. package/src/component/forms/ArquivoUpload.vue +0 -199
  91. package/src/component/forms/CheckboxMultiplo.vue +0 -63
  92. package/src/component/forms/Decimal.vue +0 -137
  93. package/src/component/forms/Escolher.vue +0 -335
  94. package/src/component/forms/EscolherEstatico.vue +0 -139
  95. package/src/component/forms/Numero.vue +0 -153
  96. package/src/component/forms/Opcoes.vue +0 -51
  97. package/src/component/forms/Senha.vue +0 -139
  98. package/src/component/forms/Texto.vue +0 -161
  99. package/src/component/forms/TextoArea.vue +0 -126
  100. package/src/component/forms/TextoEditor.vue +0 -123
  101. package/src/component/layout/Painel.vue +0 -142
  102. package/src/component/shared/BotaoCarregarMais.vue +0 -23
  103. package/src/component/shared/CabecalhoImpressao.vue +0 -36
  104. package/src/component/shared/Confirmacao.vue +0 -80
  105. package/src/component/shared/Dica.vue +0 -42
  106. package/src/component/shared/EsconderMostrar.vue +0 -131
  107. package/src/component/shared/ExportarExcel.vue +0 -67
  108. package/src/component/shared/FiltroHorizontal.vue +0 -59
  109. package/src/component/shared/Mensagem.vue +0 -86
  110. package/src/component/shared/Progresso.vue +0 -21
  111. package/src/component/shared/SalvarCancelar.vue +0 -56
  112. package/src/component/shared/Tabela.vue +0 -275
  113. package/src/component/shared/TabelaBotao.vue +0 -36
  114. package/src/component/shared/query-builder/Campo.vue +0 -116
  115. package/src/component/shared/query-builder/ConverteParaOdata.js +0 -77
  116. package/src/component/shared/query-builder/components/CustomSelect.vue +0 -115
  117. package/src/component/shared/query-builder/components/QueryBuilderChildren.vue +0 -46
  118. package/src/component/shared/query-builder/components/QueryBuilderGroup.vue +0 -151
  119. package/src/component/shared/query-builder/components/QueryBuilderRule.vue +0 -81
  120. package/src/component/shared/query-builder/layouts/Bootstrap/BootstrapGroup.vue +0 -120
  121. package/src/component/shared/query-builder/layouts/Bootstrap/BootstrapRule.vue +0 -187
  122. package/src/component/shared/query-builder/main.js +0 -81
  123. package/src/component/template/ModeloAdicionarModificarView.vue +0 -32
  124. package/src/component/template/ModeloDocumentoView.vue +0 -227
  125. package/src/component/template/ModeloLista.vue +0 -231
  126. package/src/component/template/ModeloRelatorioListaView.vue +0 -227
  127. package/src/component/template/ModeloRelatorioView.vue +0 -489
  128. package/src/component/template/ModeloSubView.vue +0 -69
  129. package/src/component/template/ModeloView.vue +0 -49
  130. package/src/component/template/Relatorio.js +0 -10
  131. package/src/component/template/RelatorioAdicionarModificar.vue +0 -106
  132. package/src/store/modulos/generic.js +0 -494
  133. package/src/store/modulos/relatorio.js +0 -204
  134. package/src/store/modulos/usuario.js +0 -38
  135. package/src/store/modulos/validation.js +0 -39
@@ -1,123 +0,0 @@
1
- <template>
2
- <div>
3
- <label>
4
- <span class="titulo">{{ titulo }}</span>
5
- <span class="requerido" v-if="requerido">*</span>
6
- <Dica :campo="campo" :formNome="formNome" />
7
- </label>
8
- <div class="inner-addon right-addon">
9
- <i
10
- v-if="notificacoes.length > 0 && formSujo"
11
- class="requerido glyphicon fas fa-exclamation-triangle"
12
- ></i>
13
- <vue-editor v-model.trim="value" :editorToolbar="customToolbar"></vue-editor>
14
- </div>
15
-
16
- <div v-if="formSujo">
17
- <div v-for="mensagem in notificacoes" :key="mensagem">
18
- <span class="invalido">{{ mensagem }}</span>
19
- </div>
20
- </div>
21
- </div>
22
- </template>
23
-
24
- <script>
25
- import Dica from "../shared/Dica.vue";
26
- import { VueEditor } from "vue2-editor";
27
-
28
- import { mapState, mapMutations } from "vuex";
29
-
30
- export default {
31
- components: { Dica, VueEditor },
32
- name: "TextoEditor",
33
- mixins: [],
34
- props: {
35
- titulo: String,
36
- campo: String,
37
- formNome: String,
38
- requerido: Boolean,
39
- tamanhoMaximo: Number,
40
- value: String,
41
- },
42
- data() {
43
- return {
44
- notificacoes: [],
45
- formSujo: false,
46
- textoEditor: "",
47
- customToolbar: [
48
- ["bold", "italic", "underline"],
49
- [{ list: "ordered" }, { list: "bullet" }],
50
- [{ align: "" }, { align: "center" }, { align: "right" }, { align: "justify" }],
51
- [{ header: [false] }],
52
- ],
53
- };
54
- },
55
- created() {
56
- this.valida();
57
- },
58
- methods: {
59
- ...mapMutations("validation", ["insereValidacao", "removeValidacao"]),
60
- valida() {
61
- this.notificacoes = [];
62
-
63
- if (this.requerido && this.value.length == 0) {
64
- var mensagem = `${this.titulo} não pode ser vazio!`;
65
- this.notificacoes.push(mensagem);
66
- }
67
-
68
- if (this.tamanhoMaximo > 0) {
69
- if (this.value.length > this.tamanhoMaximo) {
70
- var mensagem = `Máximo de ${this.tamanhoMaximo} caracteres!`;
71
- this.notificacoes.push(mensagem);
72
- }
73
- }
74
- },
75
- },
76
- computed: {
77
- ...mapState("validation", ["reiniciaForm", "validacao"]),
78
- },
79
- watch: {
80
- value() {
81
- this.valida();
82
- this.formSujo = true;
83
- this.$emit("input", this.value);
84
- },
85
- notificacoes() {
86
- let self = this;
87
- this.notificacoes.forEach(function (notificacao) {
88
- let obj = {
89
- chave: self.campo + "&" + self.formNome,
90
- formNome: self.formNome,
91
- notificacao: notificacao,
92
- };
93
- self.insereValidacao(obj);
94
- });
95
-
96
- if (this.notificacoes.length == 0) {
97
- let obj = {
98
- chave: self.campo + "&" + self.formNome,
99
- formNome: self.formNome,
100
- };
101
- self.removeValidacao(obj);
102
- }
103
- },
104
- reiniciaForm: {
105
- handler(form) {
106
- if (form.nome == this.formNome) this.formSujo = false;
107
- },
108
- deep: true,
109
- },
110
- },
111
- };
112
- </script>
113
-
114
- <style scoped>
115
- .sucesso {
116
- color: #94aa2a;
117
- font-size: 14px;
118
- }
119
- .invalido {
120
- color: #f0134d;
121
- font-size: 14px;
122
- }
123
- </style>
@@ -1,142 +0,0 @@
1
- <template>
2
- <div class="painel">
3
- <Toast />
4
- <Carregando v-show="carregando('painel')" />
5
- <div v-show="!carregando('painel')">
6
- <div v-show="mostrarFiltroVertical">
7
- <FiltroVertical>
8
- <slot name="conteudo-filtro"></slot>
9
- </FiltroVertical>
10
- </div>
11
- <div class="c-container">
12
- <Mensagem v-if="!modal.abrir" />
13
- <div class="row">
14
- <div class="col-10">
15
- <div class="div-titulo">
16
- <span class="modulo">
17
- <span class="icone"><i class="fas fa-compass"></i></span> {{ modulo }} |</span
18
- >
19
- <span class="titulo"> {{ titulo }}</span>
20
- </div>
21
- </div>
22
- <div class="col-2 text-right" v-show="rotaAtual != 'Dashboard'">
23
- <div class="c-voltar" @click="voltar()">
24
- <span class="g-espaco-esquerda">Voltar</span>
25
- </div>
26
- </div>
27
- </div>
28
- <br v-show="mostrarBotoes" />
29
- <div class="row" v-show="mostrarBotoes">
30
- <div class="col-12" v-show="mostrarBotoes">
31
- <slot name="conteudo-botoes"></slot>
32
- </div>
33
- </div>
34
- <br v-show="mostrarBotoes || mostrarPesquisa" />
35
- <div v-show="mostrarBotoes || mostrarPesquisa">
36
- <div>
37
- <div v-show="mostrarPesquisa"><Pesquisa /></div>
38
- </div>
39
- </div>
40
- <br v-show="mostrarPesquisa" />
41
- <div>
42
- <slot name="conteudo-principal"></slot>
43
- </div>
44
- </div>
45
- </div>
46
- <br /><br /><br />
47
- </div>
48
- </template>
49
-
50
- <script>
51
- import Toast from "../shared/Toast.vue";
52
- import Mensagem from "../shared/Mensagem.vue";
53
- import Pesquisa from "../shared/Pesquisa.vue";
54
- import Carregando from "../shared/Carregando.vue";
55
- import FiltroVertical from "../shared/FiltroVertical";
56
-
57
- import { mapState, mapGetters, mapMutations } from "vuex";
58
-
59
- export default {
60
- name: "Painel",
61
- components: {
62
- Carregando,
63
- FiltroVertical,
64
- Pesquisa,
65
- Mensagem,
66
- Toast,
67
- },
68
- props: {
69
- modulo: String,
70
- titulo: String,
71
- mostrarFiltroVertical: Boolean,
72
- mostrarPesquisa: Boolean,
73
- mostrarBotoes: Boolean,
74
- },
75
- data() {
76
- return {
77
- rotaAtual: this.$route.name,
78
- };
79
- },
80
- created() {
81
- this.insereCarregando("painel");
82
- },
83
- updated() {
84
- this.rotaAtual = this.$route.name;
85
- },
86
- computed: {
87
- ...mapGetters("generic", ["carregando"]),
88
- ...mapState("generic", ["modal"]),
89
- },
90
- methods: {
91
- ...mapMutations("generic", ["insereCarregando"]),
92
- voltar() {
93
- window.history.back();
94
- },
95
- },
96
- };
97
- </script>
98
- <style scoped>
99
- .c-container {
100
- margin: auto;
101
- padding-left: 110px;
102
- max-width: 1400px;
103
- }
104
-
105
- .div-titulo {
106
- margin-top: 15px;
107
- }
108
-
109
- .modulo {
110
- font-size: 16px;
111
- font-weight: 400;
112
- }
113
-
114
- .titulo {
115
- font-size: 18px;
116
- font-weight: 400;
117
- line-height: 34px;
118
- color: #577696;
119
- }
120
-
121
- .icone{
122
- opacity: 0.8;
123
- font-size: 20px;
124
- }
125
-
126
-
127
- .c-voltar {
128
- margin-top: 20px;
129
- margin-right: 12px;
130
- font-size: 16px;
131
- cursor: pointer;
132
- color: #8ca1b7;
133
- }
134
-
135
- .c-voltar:hover {
136
- color: #8ca1b7;
137
- }
138
-
139
- .painel {
140
- padding: 25px;
141
- }
142
- </style>
@@ -1,23 +0,0 @@
1
- <template>
2
- <div>
3
- <Botao
4
- chave="carregarMais"
5
- nomeEvento="carregarMais"
6
- tipo="alerta"
7
- titulo="Carregar mais..."
8
- classeIcone="fas fa-redo"
9
- tamanho="medio"
10
- />
11
- </div>
12
- </template>
13
- <script>
14
- import Botao from "../forms/Botao.vue";
15
- export default {
16
- name: "BotaoCarregarMais",
17
- components: { Botao },
18
- data() {
19
- return {};
20
- },
21
- methods: {},
22
- };
23
- </script>
@@ -1,36 +0,0 @@
1
- <template>
2
- <div class="div-cabecalho somente-impressao">
3
- <div class="titulo">{{ nomeArquivo }}</div>
4
- <div class="lado-a-lado div-tag" v-for="tag in tags" :key="tag.id">
5
- <span>{{ tag.titulo }}</span> <span>{{ tag.valor }}</span>
6
- <span>,</span>
7
- </div>
8
- </div>
9
- </template>
10
-
11
- <script>
12
- import { mapGetters, mapMutations } from "vuex";
13
-
14
- export default {
15
- name: "CabecalhoImpressao",
16
- computed: {
17
- ...mapGetters("relatorio", ["tags"]),
18
- nomeArquivo() {
19
- return this.$route.matched[0].props.default.relatorio;
20
- },
21
- },
22
- };
23
- </script>
24
- <style scoped>
25
- .div-cabecalho {
26
- margin: 20px;
27
- }
28
-
29
- .div-tag {
30
- margin-right: 10px;
31
- }
32
-
33
- .titulo {
34
- font-size: 18px;
35
- }
36
- </style>
@@ -1,80 +0,0 @@
1
- <template>
2
- <div>
3
- <div @click="executar()">
4
- <slot></slot>
5
- </div>
6
- <Modal
7
- :titulo="titulo"
8
- :largura="450"
9
- :altura="250"
10
- v-show="mostrarModal(`confirmacao${dados.id}`)"
11
- >
12
- <b-col sm="12">
13
- <div class="div-botao text-center">
14
- <Botao
15
- chave="confirmacaoNao"
16
- tipo="editar"
17
- titulo="cancelar"
18
- tamanho="pequeno"
19
- :clique="cancelar"
20
- />
21
- <Botao
22
- chave="confirmacaoSim"
23
- :tipo="tipo"
24
- titulo="Sim, confirmar"
25
- tamanho="medio"
26
- :clique="confirmar"
27
- />
28
- </div>
29
- </b-col>
30
- </Modal>
31
- </div>
32
- </template>
33
-
34
- <script>
35
- import Botao from "@nixweb/nixloc-ui/src/component/forms/Botao";
36
- import Modal from "@nixweb/nixloc-ui/src/component/forms/Modal";
37
-
38
- import { mapGetters, mapMutations } from "vuex";
39
-
40
- export default {
41
- name: "Confirmacao",
42
- components: {
43
- Botao,
44
- Modal,
45
- },
46
- props: {
47
- titulo: String,
48
- tipo: String,
49
- dados: Object,
50
- confirmado: Function,
51
- },
52
- methods: {
53
- ...mapMutations("generic", ["abrirModal", "fecharModal", "removeCarregando"]),
54
- executar() {
55
- this.abrirModal(`confirmacao${this.dados.id}`);
56
- },
57
- confirmar() {
58
- let self = this;
59
- setTimeout(function () {
60
- if (self.confirmado) self.confirmado(self.dados);
61
- self.removeCarregando(["confirmacaoSim"]);
62
- self.fecharModal();
63
- }, 200);
64
- },
65
- cancelar() {
66
- this.removeCarregando(["confirmacaoNao"]);
67
- this.fecharModal();
68
- },
69
- },
70
- computed: {
71
- ...mapGetters("generic", ["mostrarModal", "evento"]),
72
- },
73
- };
74
- </script>
75
- <style scoped>
76
- .div-botao {
77
- padding-top: 20px;
78
- height: 100px;
79
- }
80
- </style>
@@ -1,42 +0,0 @@
1
- <template>
2
- <span class="dica" v-if="titulo">
3
- <i
4
- class="fal fa-exclamation-circle"
5
- :title="titulo"
6
- v-b-popover.hover.top="descricao"
7
- ></i>
8
- </span>
9
- </template>
10
- <script>
11
- import { mapGetters } from "vuex";
12
-
13
- export default {
14
- name: "Dica",
15
- props: {
16
- campo: String,
17
- formNome: String,
18
- },
19
- data() {
20
- return {
21
- titulo: "",
22
- descricao: "",
23
- };
24
- },
25
- mounted() {
26
- let dica = this.dica({ campo: this.campo, formNome: this.formNome });
27
- if (dica) {
28
- this.titulo = dica.titulo;
29
- this.descricao = dica.descricao;
30
- }
31
- },
32
- computed: {
33
- ...mapGetters("generic", ["dica"]),
34
- },
35
- };
36
- </script>
37
-
38
- <style scoped>
39
- .dica {
40
- cursor: pointer;
41
- }
42
- </style>
@@ -1,131 +0,0 @@
1
- <template>
2
- <div>
3
- <div class="linha-seta" v-if="tipo == 'seta'">
4
- <div class="seta" @click="mostrar" v-if="!mostrarCollapse">
5
- <b-row>
6
- <b-col sm="6" class="text-left">
7
- <span class="titulo">{{ titulo }}</span>
8
- </b-col>
9
- <b-col sm="6" class="text-right">
10
- <i class="far fa-plus"></i>
11
- </b-col>
12
- </b-row>
13
- </div>
14
- <div class="seta" @click="esconder" v-if="mostrarCollapse">
15
- <b-row>
16
- <b-col sm="6" class="text-left">
17
- <span class="titulo">{{ titulo }}</span>
18
- </b-col>
19
- <b-col sm="6" class="text-right">
20
- <i class="far fa-minus"></i>
21
- </b-col>
22
- </b-row>
23
- </div>
24
- </div>
25
- <b-collapse id="collapse-4" v-model="mostrarCollapse" class="mt-2">
26
- <slot></slot>
27
- </b-collapse>
28
- <div v-if="tipo == 'botao'">
29
- <b-row>
30
- <b-col sm="12">
31
- <div class="text-center">
32
- <Botao
33
- v-if="!mostrarCollapse"
34
- :titulo="botaoMostrar.titulo"
35
- :classeIcone="botaoMostrar.icone"
36
- :tipo="botaoMostrar.tipo"
37
- tamanho="pequeno"
38
- :clique="mostrar"
39
- />
40
- </div>
41
- </b-col>
42
- </b-row>
43
- <b-row>
44
- <b-col>
45
- <div class="text-center">
46
- <Botao
47
- v-if="mostrarCollapse"
48
- chave="esconderCollapse"
49
- :titulo="botaoEsconder.titulo"
50
- :classeIcone="botaoEsconder.icone"
51
- :tipo="botaoEsconder.tipo"
52
- tamanho="pequeno"
53
- :clique="esconder"
54
- />
55
- </div>
56
- </b-col>
57
- </b-row>
58
- </div>
59
- </div>
60
- </template>
61
-
62
- <script>
63
- import Botao from "../forms/Botao.vue";
64
-
65
- import { mapMutations } from "vuex";
66
-
67
- export default {
68
- components: { Botao },
69
- name: "EsconderMostrar",
70
- props: {
71
- botaoMostrar: Object,
72
- botaoEsconder: Object,
73
- tipo: {
74
- type: String,
75
- default: "botao",
76
- },
77
- titulo: String,
78
- iniciarAberto: {
79
- type: Boolean,
80
- default: false,
81
- },
82
- },
83
- data() {
84
- return {
85
- mostrarCollapse: false,
86
- };
87
- },
88
- created() {
89
- this.mostrarCollapse = this.iniciarAberto;
90
- },
91
- methods: {
92
- ...mapMutations("generic", ["removeCarregando"]),
93
- mostrar() {
94
- let self = this;
95
- setTimeout(function () {
96
- self.mostrarCollapse = true;
97
- }, 200);
98
- this.removeCarregandoBotao();
99
- },
100
- esconder() {
101
- let self = this;
102
- setTimeout(function () {
103
- self.mostrarCollapse = false;
104
- }, 200);
105
- this.removeCarregandoBotao();
106
- },
107
- removeCarregandoBotao() {
108
- this.removeCarregando(["mostrarCollapse", "esconderCollapse"]);
109
- },
110
- },
111
- };
112
- </script>
113
- <style scoped>
114
- .seta {
115
- font-size: 14px;
116
- color: #577696;
117
- cursor: pointer;
118
- margin-bottom: 10px;
119
- }
120
-
121
- .titulo {
122
- font-size: 16px;
123
- margin-left: 5px;
124
- }
125
-
126
- .linha-seta {
127
- border-top: solid 1px #dbdfe9;
128
- margin-top: 10px;
129
- padding-top: 10px;
130
- }
131
- </style>
@@ -1,67 +0,0 @@
1
- <template>
2
- <div>
3
- <download-excel
4
- :fields="coluna"
5
- :data="dados"
6
- :before-finish="exportacaoFinalizada"
7
- worksheet="Planilha"
8
- :name="`${nomeArquivo}.xls`"
9
- >
10
- <Botao
11
- chave="exportarExcel"
12
- :tipo="botao.tipo"
13
- :titulo="botao.titulo"
14
- classeIcone="fas fa-file-excel"
15
- :tamanho="botao.tamanho"
16
- />
17
- </download-excel>
18
- </div>
19
- </template>
20
-
21
- <script>
22
- import Botao from "@nixweb/nixloc-ui/src/component/forms/Botao";
23
-
24
- import { mapState, mapGetters, mapActions, mapMutations } from "vuex";
25
-
26
- export default {
27
- name: "ExportarExcel",
28
- props: {
29
- botao: Object,
30
- cabecalho: Array,
31
- dados: Array,
32
- },
33
- components: {
34
- Botao,
35
- },
36
- data() {
37
- return {
38
- json_meta: [
39
- [
40
- {
41
- key: "charset",
42
- value: "utf-8",
43
- },
44
- ],
45
- ],
46
- };
47
- },
48
- methods: {
49
- ...mapMutations("generic", ["removeCarregando"]),
50
- exportacaoFinalizada() {
51
- this.removeCarregando(["exportarExcel"]);
52
- },
53
- },
54
- computed: {
55
- coluna() {
56
- var object = this.cabecalho.reduce(
57
- (obj, item) => Object.assign(obj, { [item.titulo]: item.campo }),
58
- {}
59
- );
60
- return object;
61
- },
62
- nomeArquivo() {
63
- return this.$route.matched[0].props.default.relatorio;
64
- },
65
- },
66
- };
67
- </script>
@@ -1,59 +0,0 @@
1
- <template>
2
- <div class="filtro-horizontal">
3
- <EsconderMostrar
4
- :botaoMostrar="{
5
- titulo: 'Mais filtros',
6
- icone: 'fas fa-arrow-alt-circle-down',
7
- tipo: 'info',
8
- }"
9
- :botaoEsconder="{
10
- titulo: 'Menos filtros',
11
- icone: 'fas fa-arrow-alt-circle-up',
12
- tipo: 'alerta',
13
- }"
14
- >
15
- <b-row>
16
- <b-col :sm="mostrarTotalPorPagina ? 10 : 12">
17
- <slot name="conteudo-filtro-horizontal"></slot>
18
- </b-col>
19
- <b-col xs="12" sm="12" md="12" lg="2" xl="2" v-if="mostrarTotalPorPagina">
20
- <EscolherEstatico
21
- titulo="Mostrar"
22
- campoAlvo="totalPorPagina"
23
- :valorInicial="{ conteudo: '10', id: 10 }"
24
- :dados="[
25
- { conteudo: '10', id: 10 },
26
- { conteudo: '20', id: 20 },
27
- { conteudo: '30', id: 30 },
28
- { conteudo: '50', id: 50 },
29
- { conteudo: '100', id: 100 },
30
- ]"
31
- />
32
- </b-col>
33
- </b-row>
34
- </EsconderMostrar>
35
- </div>
36
- </template>
37
-
38
- <script>
39
- import EsconderMostrar from "./EsconderMostrar.vue";
40
- import EscolherEstatico from "../forms/EscolherEstatico.vue";
41
- import Escolher from "../forms/Escolher";
42
-
43
- export default {
44
- name: "ModeloLista",
45
- components: { Escolher, EscolherEstatico, EsconderMostrar },
46
- props: {
47
- mostrarTotalPorPagina: {
48
- type: Boolean,
49
- default: true,
50
- },
51
- },
52
- };
53
- </script>
54
-
55
- <style scoped>
56
- .filtro-horizontal {
57
- margin-bottom: 5px;
58
- }
59
- </style>