@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.
- package/docs/src/component/template/ModeloRelatorioView.drawio +2 -2
- package/docs/src/store/modulos/relatorio.drawio +2 -2
- package/package.json +77 -77
- package/public/styles/app.css +1 -1
- 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} +8 -8
- package/src/component/forms/{Cor.vue → Color.vue} +9 -9
- package/src/component/forms/DateTime.vue +55 -55
- package/src/component/forms/{BotaoDropdown.vue → Dropdown.vue} +58 -58
- 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/{Topo.vue → Header.vue} +5 -5
- 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 +15 -15
- package/src/component/layout/Wizard.vue +3 -3
- package/src/component/shared/{CodigoEditor.vue → CodeEditor.vue} +25 -25
- package/src/component/shared/Collapse.vue +131 -0
- package/src/component/shared/Confirmation.vue +80 -0
- package/src/component/shared/{DocumentoEditor.vue → DocumentEditor.vue} +10 -16
- package/src/component/shared/{DocumentoPreview.vue → DocumentPreview.vue} +2 -2
- package/src/component/shared/ExportExcel.vue +67 -0
- package/src/component/shared/{ExportarPDF.vue → ExportPDF.vue} +18 -18
- package/src/component/shared/HeaderPrint.vue +36 -0
- package/src/component/shared/HorizontalFilter.vue +59 -0
- package/src/component/shared/LegendaParametro.vue +22 -22
- package/src/component/shared/{Carregando.vue → Loading.vue} +16 -16
- package/src/component/shared/LoadingMoreButton.vue +23 -0
- package/src/component/shared/Messages.vue +83 -0
- package/src/component/shared/{Paginacao.vue → Pagination.vue} +12 -12
- package/src/component/shared/ProgressBar.vue +21 -0
- package/src/component/shared/{BotaoConsulta.vue → QueryButton.vue} +16 -16
- package/src/component/shared/SaveCancel.vue +56 -0
- package/src/component/shared/{Pesquisa.vue → Search.vue} +46 -46
- package/src/component/shared/Table.vue +243 -0
- package/src/component/shared/TableButton.vue +36 -0
- package/src/component/shared/{Registro.vue → TableTotalRecords.vue} +7 -7
- package/src/component/shared/{ResumoTabela.vue → TableTotalization.vue} +12 -8
- package/src/component/shared/Tip.vue +42 -0
- package/src/component/shared/Toast.vue +7 -7
- package/src/component/shared/{FiltroVertical.vue → VerticalFilter.vue} +24 -24
- package/src/component/shared/query-builder/AddRule.vue +187 -0
- package/src/component/shared/query-builder/ConvertToOdata.js +80 -0
- package/src/component/shared/query-builder/DynamicComponent.vue +107 -0
- package/src/component/shared/query-builder/Fields.vue +127 -0
- package/src/component/shared/query-builder/ListDynamicComponent.vue +42 -0
- package/src/component/shared/query-builder/QueryBuilder.vue +25 -120
- package/src/component/shared/query-builder/{Filtro.vue → Rules.vue} +13 -18
- package/src/component/shared/query-builder/SelectRule.vue +96 -0
- package/src/component/shared/query-builder/Tags.vue +14 -14
- package/src/component/shared/query-builder/{Rodape.vue → Totalization.vue} +10 -10
- package/src/component/template/AddEditReport.vue +106 -0
- package/src/component/template/ListViewWithHandlerData.vue +231 -0
- package/src/component/template/ViewTemplateConfiguration.vue +69 -0
- package/src/component/template/ViewTemplateDocumentView.vue +227 -0
- package/src/component/template/ViewTemplateReportList.vue +230 -0
- package/src/component/template/ViewTemplateReportPreview.vue +500 -0
- package/src/component/template/ViewTemplateWithSalveCancel.vue +32 -0
- package/src/component/template/ViewTemplateWithTable.vue +49 -0
- package/src/component/template/model/Report.js +6 -0
- package/src/component/value-objects/DadosContato.vue +34 -35
- package/src/component/value-objects/DadosPessoa.vue +58 -58
- package/src/component/value-objects/Endereco.vue +96 -97
- 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/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 -335
- 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/BotaoCarregarMais.vue +0 -23
- package/src/component/shared/CabecalhoImpressao.vue +0 -36
- package/src/component/shared/Confirmacao.vue +0 -80
- package/src/component/shared/Dica.vue +0 -42
- package/src/component/shared/EsconderMostrar.vue +0 -131
- package/src/component/shared/ExportarExcel.vue +0 -67
- package/src/component/shared/FiltroHorizontal.vue +0 -59
- package/src/component/shared/Mensagem.vue +0 -86
- package/src/component/shared/Progresso.vue +0 -21
- package/src/component/shared/SalvarCancelar.vue +0 -56
- package/src/component/shared/Tabela.vue +0 -275
- package/src/component/shared/TabelaBotao.vue +0 -36
- package/src/component/shared/query-builder/Campo.vue +0 -116
- package/src/component/shared/query-builder/ConverteParaOdata.js +0 -77
- 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 -187
- package/src/component/shared/query-builder/main.js +0 -81
- package/src/component/template/ModeloAdicionarModificarView.vue +0 -32
- package/src/component/template/ModeloDocumentoView.vue +0 -227
- package/src/component/template/ModeloLista.vue +0 -231
- package/src/component/template/ModeloRelatorioListaView.vue +0 -227
- package/src/component/template/ModeloRelatorioView.vue +0 -489
- package/src/component/template/ModeloSubView.vue +0 -69
- package/src/component/template/ModeloView.vue +0 -49
- package/src/component/template/Relatorio.js +0 -10
- package/src/component/template/RelatorioAdicionarModificar.vue +0 -106
- package/src/store/modulos/generic.js +0 -494
- package/src/store/modulos/relatorio.js +0 -204
- package/src/store/modulos/usuario.js +0 -38
- package/src/store/modulos/validation.js +0 -39
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<Panel
|
|
4
|
+
:module="panel.module"
|
|
5
|
+
:title="panel.title"
|
|
6
|
+
:showVerticalFilter="panel.showVerticalFilter"
|
|
7
|
+
:showSearch="panel.showSearch"
|
|
8
|
+
:showButtons="panel.showButtons"
|
|
9
|
+
>
|
|
10
|
+
<div slot="content-main">
|
|
11
|
+
<b-row>
|
|
12
|
+
<b-col xs="12" sm="12" md="12" lg="6" xl="6" v-if="todos.salvo.length > 0">
|
|
13
|
+
<div><i class="fas fa-file-alt icon-salvo"></i> Personalizado</div>
|
|
14
|
+
<hr class="hr" />
|
|
15
|
+
<div class="div-molded" v-for="report in todos.salvo">
|
|
16
|
+
<div>
|
|
17
|
+
<Molded :borderRadius="12">
|
|
18
|
+
<b-row>
|
|
19
|
+
<b-col sm="1">
|
|
20
|
+
<i class="fas fa-file-alt icon-report"></i>
|
|
21
|
+
</b-col>
|
|
22
|
+
<b-col sm="10" @click="navegateTo(report)">
|
|
23
|
+
<div>{{ report.nome }}</div>
|
|
24
|
+
</b-col>
|
|
25
|
+
<b-col sm="1">
|
|
26
|
+
<Confirmation
|
|
27
|
+
title="Deseja excluir?"
|
|
28
|
+
type="danger"
|
|
29
|
+
:data="report"
|
|
30
|
+
:confirmed="excluir"
|
|
31
|
+
>
|
|
32
|
+
<div class="text-right">
|
|
33
|
+
<i class="fas fa-times-circle icon-remove"></i>
|
|
34
|
+
</div>
|
|
35
|
+
</Confirmation>
|
|
36
|
+
</b-col>
|
|
37
|
+
</b-row>
|
|
38
|
+
</Molded>
|
|
39
|
+
</div>
|
|
40
|
+
</div>
|
|
41
|
+
</b-col>
|
|
42
|
+
<b-col xs="12" sm="12" md="12" lg="6" xl="6">
|
|
43
|
+
<div><i class="fas fa-file-chart-line"></i> Padrão</div>
|
|
44
|
+
<hr class="hr" />
|
|
45
|
+
<div class="div-molded" v-for="report in todos.padrao">
|
|
46
|
+
<div>
|
|
47
|
+
<Molded :borderRadius="12">
|
|
48
|
+
<b-row>
|
|
49
|
+
<b-col sm="1">
|
|
50
|
+
<i class="fas fa-file-alt icon-report"></i>
|
|
51
|
+
</b-col>
|
|
52
|
+
<b-col sm="11" @click="navegateTo(report)">
|
|
53
|
+
<div class="side-by-side">{{ report.nome }}</div>
|
|
54
|
+
</b-col>
|
|
55
|
+
</b-row>
|
|
56
|
+
</Molded>
|
|
57
|
+
</div>
|
|
58
|
+
</div>
|
|
59
|
+
</b-col>
|
|
60
|
+
</b-row>
|
|
61
|
+
</div>
|
|
62
|
+
</Panel>
|
|
63
|
+
</div>
|
|
64
|
+
</template>
|
|
65
|
+
|
|
66
|
+
<script>
|
|
67
|
+
import Panel from "@nixweb/nixloc-ui/src/component/layout/Panel.vue";
|
|
68
|
+
import Molded from "@nixweb/nixloc-ui/src/component/layout/Molded";
|
|
69
|
+
import Confirmation from "@nixweb/nixloc-ui/src/component/shared/Confirmation";
|
|
70
|
+
|
|
71
|
+
import { mapState, mapActions, mapMutations } from "vuex";
|
|
72
|
+
|
|
73
|
+
export default {
|
|
74
|
+
name: "TemplateReportListView",
|
|
75
|
+
components: { Panel, Molded, Confirmation },
|
|
76
|
+
props: {
|
|
77
|
+
panel: Object,
|
|
78
|
+
relatorios: Object,
|
|
79
|
+
},
|
|
80
|
+
data() {
|
|
81
|
+
return {
|
|
82
|
+
todos: { salvo: [] },
|
|
83
|
+
urlObterTodos: "/api/v1/shared/relatorio/obter-todos",
|
|
84
|
+
urlRemover: "/api/v1/shared/relatorio/remove",
|
|
85
|
+
};
|
|
86
|
+
},
|
|
87
|
+
computed: {
|
|
88
|
+
...mapState("generic", ["search", "executedSearch", "clearedSearch"]),
|
|
89
|
+
},
|
|
90
|
+
mounted() {
|
|
91
|
+
this.getAll();
|
|
92
|
+
this.todos = JSON.parse(JSON.stringify(this.relatorios)); // remove observable
|
|
93
|
+
},
|
|
94
|
+
methods: {
|
|
95
|
+
...mapMutations("generic", ["removeLoading"]),
|
|
96
|
+
...mapMutations("report", [
|
|
97
|
+
"atualizaFiltroSelecionado",
|
|
98
|
+
"atualizaCampoOrdenado",
|
|
99
|
+
"updateOptionsInitValue",
|
|
100
|
+
"atualizaConsultaFiltro",
|
|
101
|
+
]),
|
|
102
|
+
...mapActions("generic", ["getApi", "deleteAllApi"]),
|
|
103
|
+
getAll() {
|
|
104
|
+
let obj = { module: this.panel.module };
|
|
105
|
+
let params = { url: this.urlObterTodos, obj: obj };
|
|
106
|
+
this.getApi(params).then((response) => {
|
|
107
|
+
this.todos.salvo = [];
|
|
108
|
+
let self = this;
|
|
109
|
+
response.content.data.forEach((item) => {
|
|
110
|
+
const query = JSON.parse(item.query);
|
|
111
|
+
let obj = {
|
|
112
|
+
id: item.id,
|
|
113
|
+
nome: item.nome,
|
|
114
|
+
routeName: query.routeName,
|
|
115
|
+
filter: query.filter,
|
|
116
|
+
field: query.field,
|
|
117
|
+
ordenacao: query.ordenacao,
|
|
118
|
+
};
|
|
119
|
+
self.todos.salvo.push(obj);
|
|
120
|
+
});
|
|
121
|
+
this.removeLoading(["panel"]);
|
|
122
|
+
});
|
|
123
|
+
},
|
|
124
|
+
navegateTo(report) {
|
|
125
|
+
if (report.filter) {
|
|
126
|
+
let filtroSelecionado = { logicalOperator: "all", children: report.filter };
|
|
127
|
+
this.updateOptionsInitValue(report.field);
|
|
128
|
+
this.atualizaCampoOrdenado(report.ordenacao);
|
|
129
|
+
this.atualizaFiltroSelecionado(filtroSelecionado);
|
|
130
|
+
this.atualizaConsultaFiltro(filtroSelecionado);
|
|
131
|
+
} else {
|
|
132
|
+
this.updateOptionsInitValue([]);
|
|
133
|
+
}
|
|
134
|
+
this.$router.push({
|
|
135
|
+
name: report.routeName,
|
|
136
|
+
params: { id: report.id, nome: report.nome },
|
|
137
|
+
});
|
|
138
|
+
},
|
|
139
|
+
excluir(data) {
|
|
140
|
+
let selected = [];
|
|
141
|
+
selected.push(data.id);
|
|
142
|
+
|
|
143
|
+
let params = {
|
|
144
|
+
url: this.urlRemover,
|
|
145
|
+
selected: selected,
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
this.deleteAllApi(params).then((reponse) => {
|
|
149
|
+
if (reponse.success) this.getAll();
|
|
150
|
+
});
|
|
151
|
+
},
|
|
152
|
+
},
|
|
153
|
+
watch: {
|
|
154
|
+
executedSearch: function () {
|
|
155
|
+
let padrao = [];
|
|
156
|
+
let salvo = [];
|
|
157
|
+
let self = this;
|
|
158
|
+
setTimeout(function () {
|
|
159
|
+
self.todos.padrao.forEach(function (item) {
|
|
160
|
+
if (self.search.filter.content == "igual") {
|
|
161
|
+
if (item.nome == self.search.content) padrao.push(item);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
if (self.search.filter.content == "contem") {
|
|
165
|
+
if (item.nome.includes(self.search.content)) padrao.push(item);
|
|
166
|
+
}
|
|
167
|
+
});
|
|
168
|
+
|
|
169
|
+
self.todos.salvo.forEach(function (item) {
|
|
170
|
+
if (self.search.filter.content == "igual") {
|
|
171
|
+
if (item.nome == self.search.content) salvo.push(item);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
if (self.search.filter.content == "contem") {
|
|
175
|
+
if (item.nome.includes(self.search.content)) salvo.push(item);
|
|
176
|
+
}
|
|
177
|
+
});
|
|
178
|
+
|
|
179
|
+
self.todos.salvo = salvo;
|
|
180
|
+
self.todos.padrao = padrao;
|
|
181
|
+
|
|
182
|
+
self.removeLoading(["search", "clean"]);
|
|
183
|
+
}, 300);
|
|
184
|
+
},
|
|
185
|
+
clearedSearch: function () {
|
|
186
|
+
let self = this;
|
|
187
|
+
setTimeout(function () {
|
|
188
|
+
self.todos = self.relatorios;
|
|
189
|
+
self.getAll();
|
|
190
|
+
self.removeLoading(["search", "clean"]);
|
|
191
|
+
}, 300);
|
|
192
|
+
},
|
|
193
|
+
},
|
|
194
|
+
};
|
|
195
|
+
</script>
|
|
196
|
+
|
|
197
|
+
<style scoped>
|
|
198
|
+
.icon-salvo {
|
|
199
|
+
color: #94aa2a;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
.icon-remove {
|
|
203
|
+
color: red;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
.icon-report {
|
|
207
|
+
font-size: 25px;
|
|
208
|
+
opacity: 0.2;
|
|
209
|
+
color: #577696;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
.div-molded {
|
|
213
|
+
margin-bottom: 10px;
|
|
214
|
+
cursor: pointer;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.div-molded:hover {
|
|
218
|
+
background-color: #fafafc;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.description {
|
|
222
|
+
font-size: 13.5px;
|
|
223
|
+
color: rgb(117, 117, 117);
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
.hr {
|
|
227
|
+
background: #fafafc !important;
|
|
228
|
+
height: 1px !important;
|
|
229
|
+
}
|
|
230
|
+
</style>
|