@nixweb/nixloc-ui 0.0.125 → 0.0.128
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/ViewTemplateReportPreview.drawio +210 -0
- package/package.json +79 -77
- package/src/App.vue +13 -13
- package/src/component/forms/Button.vue +170 -169
- package/src/component/forms/CheckboxGroup.vue +72 -63
- package/src/component/forms/CheckboxSimple.vue +46 -27
- package/src/component/forms/Color.vue +38 -38
- package/src/component/forms/DateTime.vue +167 -177
- package/src/component/forms/Dropdown.vue +218 -224
- package/src/component/forms/EditorHtml.vue +126 -123
- package/src/component/forms/FileUpload.vue +185 -189
- package/src/component/forms/ImageUpload.vue +230 -0
- package/src/component/forms/IncrementDecrement.vue +101 -0
- package/src/component/forms/InputDecimal.vue +142 -137
- package/src/component/forms/InputNumber.vue +154 -149
- package/src/component/forms/InputPassword.vue +135 -135
- package/src/component/forms/InputText.vue +162 -157
- package/src/component/forms/Modal.vue +65 -60
- package/src/component/forms/RadioGroup.vue +50 -50
- package/src/component/forms/Select.vue +349 -337
- package/src/component/forms/SelectStatic.vue +127 -120
- package/src/component/forms/Slider.vue +18 -18
- package/src/component/forms/TextArea.vue +126 -126
- package/src/component/layout/Alert.vue +92 -92
- package/src/component/layout/Badge.vue +103 -103
- package/src/component/layout/FixedBar.vue +100 -68
- package/src/component/layout/Header.vue +38 -35
- package/src/component/layout/LoadingFullPage.vue +27 -27
- package/src/component/layout/Menu.vue +210 -214
- package/src/component/layout/Molded.vue +28 -27
- package/src/component/layout/Panel.vue +140 -142
- package/src/component/layout/Popover.vue +126 -126
- package/src/component/layout/ScrollBar.vue +42 -43
- package/src/component/layout/Tab.vue +135 -0
- package/src/component/layout/Tag.vue +3 -3
- package/src/component/layout/Wizard.vue +211 -213
- package/src/component/rental/DisplayPeriodRent.vue +81 -0
- package/src/component/rental/DisplayTotalization.vue +47 -0
- package/src/component/shared/Collapse.vue +131 -131
- package/src/component/shared/Confirmation.vue +2 -2
- package/src/component/shared/DocumentEditor.vue +1 -1
- package/src/component/shared/DocumentPreview.vue +1 -1
- package/src/component/shared/DocumentPublic.vue +34 -0
- package/src/component/shared/ExportExcel.vue +1 -8
- package/src/component/shared/ExportPDF.vue +116 -116
- package/src/component/shared/{HeaderPrint.vue → HeaderReport.vue} +4 -4
- package/src/component/shared/HorizontalFilter.vue +59 -59
- package/src/component/shared/Loading.vue +107 -107
- package/src/component/shared/LoadingMoreButton.vue +23 -23
- package/src/component/shared/Messages.vue +81 -83
- package/src/component/shared/PDFViewer.vue +22 -22
- package/src/component/shared/Pagination.vue +52 -53
- package/src/component/shared/{LegendaParametro.vue → ParameterLegend.vue} +22 -26
- package/src/component/shared/ProgressBar.vue +22 -21
- package/src/component/shared/QueryButton.vue +66 -66
- package/src/component/shared/Report.vue +187 -0
- package/src/component/shared/SaveCancel.vue +26 -5
- package/src/component/shared/Search.vue +154 -154
- package/src/component/shared/SelectOption.vue +146 -0
- package/src/component/shared/Table.vue +163 -243
- package/src/component/shared/TableButton.vue +36 -36
- package/src/component/shared/TableDraggable.vue +127 -0
- package/src/component/shared/TableItem.vue +177 -0
- package/src/component/shared/TableTotalRecords.vue +9 -10
- package/src/component/shared/TableTotalization.vue +47 -47
- package/src/component/shared/Tip.vue +42 -42
- package/src/component/shared/Toast.vue +54 -54
- package/src/component/shared/TotalizationReport.vue +59 -0
- package/src/component/shared/VerticalFilter.vue +97 -145
- package/src/component/shared/query-builder/AddRule.vue +181 -187
- package/src/component/shared/query-builder/ConvertToOdata.js +34 -43
- package/src/component/shared/query-builder/DynamicComponent.vue +21 -16
- package/src/component/shared/query-builder/DynamicComponentList.vue +73 -0
- package/src/component/shared/query-builder/Fields.vue +29 -63
- package/src/component/shared/query-builder/QueryBuilder.vue +69 -69
- package/src/component/shared/query-builder/Rules.vue +2 -14
- package/src/component/shared/query-builder/SelectRule.vue +15 -15
- package/src/component/shared/query-builder/Tags.vue +24 -8
- package/src/component/shared/query-builder/utilities.js +21 -21
- package/src/component/template/{ListViewWithHandlerData.vue → ListViewWithDataHandler.vue} +260 -231
- package/src/component/template/{AddEditReport.vue → ReportCreateUpdate.vue} +40 -22
- package/src/component/template/ViewTemplateConfiguration.vue +64 -69
- package/src/component/template/ViewTemplateDocumentView.vue +22 -25
- package/src/component/template/ViewTemplateReportList.vue +39 -57
- package/src/component/template/ViewTemplateReportPreview.vue +270 -341
- package/src/component/template/ViewTemplateReportPreviewCOPIASEGURANCA.vue +497 -0
- package/src/component/template/ViewTemplateSelectOption.vue +60 -0
- package/src/component/template/ViewTemplateWithSalveCancel.vue +32 -32
- package/src/component/template/ViewTemplateWithTable.vue +56 -49
- package/src/component/template/model/Report.js +2 -2
- package/src/component/value-objects/Address.js +11 -0
- package/src/component/value-objects/{Endereco.vue → Address.vue} +39 -40
- package/src/component/value-objects/{DadosContato.js → Contact.js} +2 -2
- package/src/component/value-objects/{DadosContato.vue → Contact.vue} +24 -17
- package/src/component/value-objects/Person.js +10 -0
- package/src/component/value-objects/{DadosPessoa.vue → Person.vue} +50 -35
- package/src/config/axios.js +9 -9
- package/src/config/dicas.js +14 -14
- package/src/config/router.js +13 -13
- package/src/config/token.js +14 -14
- package/src/main.js +23 -23
- package/src/store/modules/generic.js +512 -488
- package/src/store/modules/report.js +156 -127
- package/src/store/modules/user.js +6 -0
- package/src/store/modules/validation.js +38 -38
- package/src/store/store.js +13 -13
- package/docs/src/component/template/ModeloRelatorioView.drawio +0 -160
- package/src/component/shared/query-builder/ListDynamicComponent.vue +0 -42
- package/src/component/shared/query-builder/Totalization.vue +0 -38
- package/src/component/value-objects/DadosPessoa.js +0 -10
- package/src/component/value-objects/Endereco.js +0 -11
|
@@ -0,0 +1,497 @@
|
|
|
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
|
+
<br />
|
|
12
|
+
<!-- <div class="div-progress" v-if="loading && liveTotalRecords > 0">
|
|
13
|
+
<ProgressBar
|
|
14
|
+
:text="`Carregando ${liveTotalRecords} registro(s) de ${content.totalRecords}`"
|
|
15
|
+
:value="liveTotalRecords"
|
|
16
|
+
:max="content.totalRecords"
|
|
17
|
+
size="medium"
|
|
18
|
+
/>
|
|
19
|
+
</div>
|
|
20
|
+
<Modal title="Salvar" :width="550" v-show="showModal('saveReport')">
|
|
21
|
+
<ReportCreateUpdate :module="panel.module" />
|
|
22
|
+
</Modal>
|
|
23
|
+
<Molded>
|
|
24
|
+
<div>
|
|
25
|
+
<div slot="content-filter-horizontal">
|
|
26
|
+
<b-row>
|
|
27
|
+
<b-col sm="6">
|
|
28
|
+
<div class="side-by-side">
|
|
29
|
+
<Button
|
|
30
|
+
_key="searchReport"
|
|
31
|
+
type="primary"
|
|
32
|
+
title="Buscar"
|
|
33
|
+
classIcon="fas fa-file-search"
|
|
34
|
+
size="medium"
|
|
35
|
+
:disabled="invalid || btnDisabled"
|
|
36
|
+
:clicked="getAll"
|
|
37
|
+
/>
|
|
38
|
+
</div>
|
|
39
|
+
<div class="side-by-side">
|
|
40
|
+
<Button
|
|
41
|
+
v-if="!invalid"
|
|
42
|
+
_key="btnSaveReport"
|
|
43
|
+
type="success"
|
|
44
|
+
title="Salvar Modelo"
|
|
45
|
+
classIcon="fas fa-save"
|
|
46
|
+
:disabled="loading || invalid"
|
|
47
|
+
size="small"
|
|
48
|
+
:clicked="openSaveReport"
|
|
49
|
+
/>
|
|
50
|
+
</div>
|
|
51
|
+
</b-col>
|
|
52
|
+
<b-col class="text-right" sm="6">
|
|
53
|
+
<div class="side-by-side">
|
|
54
|
+
<Button
|
|
55
|
+
_key="btnOpenFields"
|
|
56
|
+
type="info"
|
|
57
|
+
title="Campos"
|
|
58
|
+
classIcon="fas fa-database"
|
|
59
|
+
size="small"
|
|
60
|
+
:disabled="loading"
|
|
61
|
+
:clicked="openFields"
|
|
62
|
+
/>
|
|
63
|
+
</div>
|
|
64
|
+
<div class="side-by-side">
|
|
65
|
+
<Button
|
|
66
|
+
_key="btnOpenFilters"
|
|
67
|
+
type="info"
|
|
68
|
+
title="Filtros"
|
|
69
|
+
classIcon="fas fa-filter"
|
|
70
|
+
size="small"
|
|
71
|
+
:disabled="loading"
|
|
72
|
+
:clicked="openFilters"
|
|
73
|
+
/>
|
|
74
|
+
</div>
|
|
75
|
+
</b-col>
|
|
76
|
+
</b-row>
|
|
77
|
+
<Modal title="Campos" :width="600" v-if="showModal('fields')">
|
|
78
|
+
<Fields />
|
|
79
|
+
<b-row>
|
|
80
|
+
<b-col class="text-right" sm="12">
|
|
81
|
+
<div class="side-by-side">
|
|
82
|
+
<Button
|
|
83
|
+
_key="btnApplyFilters"
|
|
84
|
+
type="primary"
|
|
85
|
+
title="Aplicar"
|
|
86
|
+
classIcon="fas fa-filter"
|
|
87
|
+
size="small"
|
|
88
|
+
:disabled="fields.selected.length == 0"
|
|
89
|
+
:clicked="applyFilters"
|
|
90
|
+
/>
|
|
91
|
+
</div>
|
|
92
|
+
</b-col>
|
|
93
|
+
</b-row>
|
|
94
|
+
</Modal>
|
|
95
|
+
<Modal title="Filtros" :width="900" v-show="showModal('filters')">
|
|
96
|
+
<Rules :rules="rules" />
|
|
97
|
+
<br />
|
|
98
|
+
<b-row>
|
|
99
|
+
<b-col class="text-right" sm="12">
|
|
100
|
+
<div class="side-by-side">
|
|
101
|
+
<Button
|
|
102
|
+
_key="btnApplyFilters"
|
|
103
|
+
type="primary"
|
|
104
|
+
title="Aplicar"
|
|
105
|
+
classIcon="fas fa-filter"
|
|
106
|
+
size="small"
|
|
107
|
+
:clicked="applyFilters"
|
|
108
|
+
/>
|
|
109
|
+
</div>
|
|
110
|
+
</b-col>
|
|
111
|
+
</b-row>
|
|
112
|
+
</Modal>
|
|
113
|
+
</div>
|
|
114
|
+
</div>
|
|
115
|
+
</Molded>
|
|
116
|
+
<div class="div-required" v-show="invalid">
|
|
117
|
+
<Alert type="info" v-for="item in requiredRules" :key="item.id">
|
|
118
|
+
É necessário informar o filtro
|
|
119
|
+
<span class="filter-required">{{ item.title }}</span
|
|
120
|
+
>, clique no botão "Filtros" para adicionar.
|
|
121
|
+
</Alert>
|
|
122
|
+
</div>
|
|
123
|
+
<div class="div-tags">
|
|
124
|
+
<Tags eventName="tagReport" />
|
|
125
|
+
</div>
|
|
126
|
+
<div class="g-div-molded div-table" v-if="!loading && liveTotalRecords > 0">
|
|
127
|
+
<b-row>
|
|
128
|
+
<b-col sm="6">
|
|
129
|
+
<div class="div-button">
|
|
130
|
+
<div class="side-by-side">
|
|
131
|
+
<ExportExcel
|
|
132
|
+
:button="{ type: 'edit', title: 'Excel', size: 'small' }"
|
|
133
|
+
fileName="Auditoria"
|
|
134
|
+
:cabecalho="content.headerTable"
|
|
135
|
+
:data="content.data"
|
|
136
|
+
/>
|
|
137
|
+
</div>
|
|
138
|
+
<div class="side-by-side">
|
|
139
|
+
<div>
|
|
140
|
+
<Button
|
|
141
|
+
v-print="'#printMe'"
|
|
142
|
+
_key="btnApplyFilters"
|
|
143
|
+
type="edit"
|
|
144
|
+
title="Imprimir"
|
|
145
|
+
classIcon="fas fa-print"
|
|
146
|
+
size="small"
|
|
147
|
+
:clicked="applyFilters"
|
|
148
|
+
/>
|
|
149
|
+
</div>
|
|
150
|
+
</div>
|
|
151
|
+
</div>
|
|
152
|
+
</b-col>
|
|
153
|
+
<b-col sm="6">
|
|
154
|
+
<TableTotalRecords :totalRecords="content.totalRecords" />
|
|
155
|
+
</b-col>
|
|
156
|
+
</b-row>
|
|
157
|
+
<ScrollBar :minHeight="400" :maxHeight="600">
|
|
158
|
+
<div id="printMe">
|
|
159
|
+
<HeaderPrint />
|
|
160
|
+
{{ content.headerTable }}
|
|
161
|
+
<Table
|
|
162
|
+
:headerTable="content.headerTable"
|
|
163
|
+
:data="content.data"
|
|
164
|
+
:showChecks="templateList.showChecks"
|
|
165
|
+
/>
|
|
166
|
+
</div>
|
|
167
|
+
</ScrollBar>
|
|
168
|
+
</div>
|
|
169
|
+
<div class="div-sem-data" v-if="noDataReturned">
|
|
170
|
+
<Alert type="info">
|
|
171
|
+
<span> Nenhum registro foi encontrato!</span>
|
|
172
|
+
</Alert>
|
|
173
|
+
</div>
|
|
174
|
+
<div class="div-Totalization" v-if="content.totalization.length > 0">
|
|
175
|
+
<Totalization :data="content.totalization" />
|
|
176
|
+
</div>
|
|
177
|
+
</div> -->
|
|
178
|
+
</div>
|
|
179
|
+
</Panel>
|
|
180
|
+
</div>
|
|
181
|
+
</template>
|
|
182
|
+
|
|
183
|
+
<script>
|
|
184
|
+
import Alert from "@nixweb/nixloc-ui/src/component/layout/Alert";
|
|
185
|
+
import Modal from "@nixweb/nixloc-ui/src/component/forms/Modal";
|
|
186
|
+
import Button from "@nixweb/nixloc-ui/src/component/forms/Button";
|
|
187
|
+
import ExportExcel from "@nixweb/nixloc-ui/src/component/shared/ExportExcel";
|
|
188
|
+
import Table from "../shared/Table.vue";
|
|
189
|
+
import HeaderPrint from "../shared/HeaderPrint.vue";
|
|
190
|
+
import TableTotalRecords from "../shared/TableTotalRecords.vue";
|
|
191
|
+
import Panel from "@nixweb/nixloc-ui/src/component/layout/Panel.vue";
|
|
192
|
+
import ScrollBar from "@nixweb/nixloc-ui/src/component/layout/ScrollBar.vue";
|
|
193
|
+
import Molded from "@nixweb/nixloc-ui/src/component/layout/Molded";
|
|
194
|
+
import ProgressBar from "@nixweb/nixloc-ui/src/component/shared/ProgressBar";
|
|
195
|
+
import Totalization from "@nixweb/nixloc-ui/src/component/shared/query-builder/Totalization.vue";
|
|
196
|
+
import Tags from "@nixweb/nixloc-ui/src/component/shared/query-builder/Tags.vue";
|
|
197
|
+
import ReportCreateUpdate from "@nixweb/nixloc-ui/src/component/template/ReportCreateUpdate.vue";
|
|
198
|
+
import Fields from "@nixweb/nixloc-ui/src/component/shared/query-builder/Fields.vue";
|
|
199
|
+
import Rules from "@nixweb/nixloc-ui/src/component/shared/query-builder/Rules.vue";
|
|
200
|
+
import print from "vue-print-nb";
|
|
201
|
+
|
|
202
|
+
import { mapState, mapGetters, mapActions, mapMutations } from "vuex";
|
|
203
|
+
|
|
204
|
+
export default {
|
|
205
|
+
name: "TemplateReportView",
|
|
206
|
+
directives: {
|
|
207
|
+
print,
|
|
208
|
+
},
|
|
209
|
+
props: {
|
|
210
|
+
panel: Object,
|
|
211
|
+
templateList: Object,
|
|
212
|
+
templateReport: Object,
|
|
213
|
+
},
|
|
214
|
+
components: {
|
|
215
|
+
Alert,
|
|
216
|
+
Modal,
|
|
217
|
+
Button,
|
|
218
|
+
TableTotalRecords,
|
|
219
|
+
Table,
|
|
220
|
+
Panel,
|
|
221
|
+
ScrollBar,
|
|
222
|
+
Molded,
|
|
223
|
+
Totalization,
|
|
224
|
+
ProgressBar,
|
|
225
|
+
Tags,
|
|
226
|
+
ReportCreateUpdate,
|
|
227
|
+
ExportExcel,
|
|
228
|
+
HeaderPrint,
|
|
229
|
+
Fields,
|
|
230
|
+
Rules,
|
|
231
|
+
},
|
|
232
|
+
data() {
|
|
233
|
+
return {
|
|
234
|
+
content: {
|
|
235
|
+
headerTable: [],
|
|
236
|
+
data: [],
|
|
237
|
+
totalization: [],
|
|
238
|
+
pagination: 0,
|
|
239
|
+
currentPage: 1,
|
|
240
|
+
totalPerPage: 100,
|
|
241
|
+
totalRecords: 0,
|
|
242
|
+
},
|
|
243
|
+
btnDisabled: true,
|
|
244
|
+
loading: false,
|
|
245
|
+
noDataReturned: false,
|
|
246
|
+
};
|
|
247
|
+
},
|
|
248
|
+
mounted() {
|
|
249
|
+
this.addReport(this.templateReport);
|
|
250
|
+
this.removeLoading(["panel"]);
|
|
251
|
+
},
|
|
252
|
+
beforeDestroy() {
|
|
253
|
+
/* this.updateOptionsInitValue({});
|
|
254
|
+
this.atualizaCampoOrdenado({});
|
|
255
|
+
this.atualizaFiltroSelecionado({ children: [] });*/
|
|
256
|
+
},
|
|
257
|
+
computed: {
|
|
258
|
+
...mapGetters("generic", ["showModal", "event"]),
|
|
259
|
+
...mapGetters("report", [
|
|
260
|
+
"headerTable",
|
|
261
|
+
"selectedRules",
|
|
262
|
+
"requiredRules",
|
|
263
|
+
"requiredRulesAlreadyAdded",
|
|
264
|
+
"hasSelectedFields",
|
|
265
|
+
"oDataSelect",
|
|
266
|
+
"oDataFilter",
|
|
267
|
+
"oDataOrderBy",
|
|
268
|
+
]),
|
|
269
|
+
...mapState("report", ["report", "fields", "totalization"]),
|
|
270
|
+
urlQuery() {
|
|
271
|
+
let baseUrl = `${this.templateList.urlGetApi}?${this.oDataSelect}&${this.oDataOrderBy}&${this.oDataFilter.query}&$skip=${this.skip}&$top=${this.content.totalPerPage}&$count=true`;
|
|
272
|
+
return baseUrl.replace("&&", "&");
|
|
273
|
+
},
|
|
274
|
+
urlTotalization() {
|
|
275
|
+
let query = this.oDataFilter.totalization
|
|
276
|
+
? `$apply=filter(${this.oDataFilter.query.replace("$filter=", "")})/`
|
|
277
|
+
: "$apply=";
|
|
278
|
+
let baseUrl = `${this.templateList.urlGetApi}?${query}aggregate(${this.oDataFilter.totalization})`;
|
|
279
|
+
return baseUrl;
|
|
280
|
+
},
|
|
281
|
+
skip() {
|
|
282
|
+
return (this.content.currentPage - 1) * this.content.totalPerPage;
|
|
283
|
+
},
|
|
284
|
+
invalid() {
|
|
285
|
+
let ret = true;
|
|
286
|
+
this.requiredRules.forEach((rule) => {
|
|
287
|
+
ret = this.requiredRulesAlreadyAdded(rule);
|
|
288
|
+
});
|
|
289
|
+
|
|
290
|
+
if (this.requiredRules.length == 0) ret = false;
|
|
291
|
+
|
|
292
|
+
return ret;
|
|
293
|
+
},
|
|
294
|
+
liveTotalRecords() {
|
|
295
|
+
return this.content.data.length;
|
|
296
|
+
},
|
|
297
|
+
},
|
|
298
|
+
methods: {
|
|
299
|
+
...mapActions("generic", ["getApiOdata"]),
|
|
300
|
+
...mapMutations("generic", ["addEvent", "openModal", "hideModal", "removeLoading"]),
|
|
301
|
+
...mapMutations("report", [
|
|
302
|
+
"addReport",
|
|
303
|
+
"atualizaFiltroSelecionado",
|
|
304
|
+
"atualizaCampoOrdenado",
|
|
305
|
+
"updateOptionsInitValue",
|
|
306
|
+
"atualizaCabecalhoTabela",
|
|
307
|
+
]),
|
|
308
|
+
getAll() {
|
|
309
|
+
this.content.data = [];
|
|
310
|
+
this.content.totalization = [];
|
|
311
|
+
this.btnDisabled = true;
|
|
312
|
+
|
|
313
|
+
if (!this.invalid) {
|
|
314
|
+
this.showHideFields();
|
|
315
|
+
this.pagination();
|
|
316
|
+
this.removeLoading(["searchReport"]);
|
|
317
|
+
|
|
318
|
+
if (this.oDataFilter.totalization) this.totalizationOData();
|
|
319
|
+
if (!this.oDataFilter.totalization) this.content.totalization = [];
|
|
320
|
+
}
|
|
321
|
+
},
|
|
322
|
+
pagination() {
|
|
323
|
+
let paramsQuery = { url: this.urlQuery };
|
|
324
|
+
this.resetData();
|
|
325
|
+
|
|
326
|
+
this.getApiOdata(paramsQuery).then((response) => {
|
|
327
|
+
let totalRecords = response["@odata.count"];
|
|
328
|
+
if (totalRecords == 0) this.noDataReturned = true;
|
|
329
|
+
this.content.totalRecords = totalRecords;
|
|
330
|
+
this.content.pagination = Math.round(totalRecords / this.content.totalPerPage);
|
|
331
|
+
|
|
332
|
+
if (totalRecords <= this.content.totalPerPage) {
|
|
333
|
+
this.queryOData();
|
|
334
|
+
this.content.headerTable = this.headerTable;
|
|
335
|
+
}
|
|
336
|
+
if (this.content.pagination == 0) this.loading = false;
|
|
337
|
+
});
|
|
338
|
+
},
|
|
339
|
+
resetData() {
|
|
340
|
+
this.loading = true;
|
|
341
|
+
this.content.data = [];
|
|
342
|
+
this.content.currentPage = 1;
|
|
343
|
+
this.noDataReturned = false;
|
|
344
|
+
},
|
|
345
|
+
queryOData() {
|
|
346
|
+
let paramsQuery = { url: this.urlQuery };
|
|
347
|
+
this.getApiOdata(paramsQuery).then((response) => {
|
|
348
|
+
let self = this;
|
|
349
|
+
response.value.forEach(function (obj) {
|
|
350
|
+
self.content.data.push(obj);
|
|
351
|
+
});
|
|
352
|
+
this.content.currentPage++;
|
|
353
|
+
});
|
|
354
|
+
this.content.headerTable = this.headerTable;
|
|
355
|
+
},
|
|
356
|
+
totalizationOData() {
|
|
357
|
+
let paramsResumo = { url: this.urlTotalization };
|
|
358
|
+
this.getApiOdata(paramsResumo).then((response) => {
|
|
359
|
+
this.content.totalization = [];
|
|
360
|
+
const result = Object.entries(response[0]);
|
|
361
|
+
let self = this;
|
|
362
|
+
result.forEach(function (value) {
|
|
363
|
+
self.totalization.forEach(function (totalization) {
|
|
364
|
+
let obj = {
|
|
365
|
+
title: "",
|
|
366
|
+
value: value[1],
|
|
367
|
+
classCss: totalization.classCss,
|
|
368
|
+
type: totalization.type,
|
|
369
|
+
};
|
|
370
|
+
if (totalization.value == value[0]) {
|
|
371
|
+
obj.title = totalization.title;
|
|
372
|
+
self.content.totalization.push(obj);
|
|
373
|
+
}
|
|
374
|
+
});
|
|
375
|
+
});
|
|
376
|
+
});
|
|
377
|
+
},
|
|
378
|
+
openSaveReport() {
|
|
379
|
+
this.addEvent({ nome: "changeReport" });
|
|
380
|
+
this.openModal("saveReport");
|
|
381
|
+
this.removeLoading(["btnSaveReport"]);
|
|
382
|
+
},
|
|
383
|
+
openFields() {
|
|
384
|
+
this.openModal("fields");
|
|
385
|
+
this.removeLoading(["btnOpenFields"]);
|
|
386
|
+
},
|
|
387
|
+
openFilters() {
|
|
388
|
+
this.openModal("filters");
|
|
389
|
+
this.removeLoading(["btnOpenFilters"]);
|
|
390
|
+
},
|
|
391
|
+
applyFilters() {
|
|
392
|
+
this.hideModal();
|
|
393
|
+
this.removeLoading(["btnApplyFilters"]);
|
|
394
|
+
},
|
|
395
|
+
showHideFields() {
|
|
396
|
+
let self = this;
|
|
397
|
+
this.report.fields.forEach(function (field) {
|
|
398
|
+
/* if (self.hasSelectedFields(field.field, self.selectedFields)) {
|
|
399
|
+
field.show = true;
|
|
400
|
+
} else {
|
|
401
|
+
field.show = false;
|
|
402
|
+
}*/
|
|
403
|
+
});
|
|
404
|
+
},
|
|
405
|
+
},
|
|
406
|
+
watch: {
|
|
407
|
+
event: {
|
|
408
|
+
handler(event) {
|
|
409
|
+
if (event.nome == "tagReport") this.openModal("filters");
|
|
410
|
+
},
|
|
411
|
+
deep: true,
|
|
412
|
+
},
|
|
413
|
+
selectedFields: {
|
|
414
|
+
handler() {
|
|
415
|
+
this.showHideFields();
|
|
416
|
+
},
|
|
417
|
+
deep: true,
|
|
418
|
+
},
|
|
419
|
+
"content.currentPage": {
|
|
420
|
+
handler(currentPage) {
|
|
421
|
+
if (currentPage <= this.content.pagination - 1) {
|
|
422
|
+
let self = this;
|
|
423
|
+
setTimeout(function () {
|
|
424
|
+
self.queryOData();
|
|
425
|
+
}, 200);
|
|
426
|
+
}
|
|
427
|
+
if (currentPage == this.content.pagination && currentPage != 0)
|
|
428
|
+
this.loading = false;
|
|
429
|
+
},
|
|
430
|
+
deep: true,
|
|
431
|
+
},
|
|
432
|
+
"content.pagination": {
|
|
433
|
+
handler() {
|
|
434
|
+
this.queryOData();
|
|
435
|
+
},
|
|
436
|
+
deep: true,
|
|
437
|
+
},
|
|
438
|
+
"oDataFilter.query": {
|
|
439
|
+
handler() {
|
|
440
|
+
this.btnDisabled = false;
|
|
441
|
+
},
|
|
442
|
+
deep: true,
|
|
443
|
+
},
|
|
444
|
+
oDataSelect: {
|
|
445
|
+
handler() {
|
|
446
|
+
this.btnDisabled = false;
|
|
447
|
+
},
|
|
448
|
+
deep: true,
|
|
449
|
+
},
|
|
450
|
+
oDataOrderBy: {
|
|
451
|
+
handler() {
|
|
452
|
+
this.btnDisabled = false;
|
|
453
|
+
},
|
|
454
|
+
deep: true,
|
|
455
|
+
},
|
|
456
|
+
},
|
|
457
|
+
};
|
|
458
|
+
</script>
|
|
459
|
+
|
|
460
|
+
<style scoped>
|
|
461
|
+
.div-button {
|
|
462
|
+
padding-bottom: 15px;
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
.div-progress {
|
|
466
|
+
margin-bottom: 10px;
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
.div-sem-data {
|
|
470
|
+
margin-top: 20px;
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
.div-table {
|
|
474
|
+
margin-top: 20px;
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
.div-separacao {
|
|
478
|
+
margin-left: 10px;
|
|
479
|
+
margin-right: 5px;
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
.div-Totalization {
|
|
483
|
+
margin-top: 20px;
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
.div-tags {
|
|
487
|
+
margin-top: 15px;
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
.div-required {
|
|
491
|
+
margin-top: 20px;
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
.filter-required {
|
|
495
|
+
font-weight: 500;
|
|
496
|
+
}
|
|
497
|
+
</style>
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<Panel
|
|
4
|
+
:module="panel.module"
|
|
5
|
+
:title="panel.title"
|
|
6
|
+
:showFilter="panel.showFilter"
|
|
7
|
+
:showSearch="panel.showSearch"
|
|
8
|
+
:showButtons="panel.showButtons"
|
|
9
|
+
>
|
|
10
|
+
<div slot="content-main">
|
|
11
|
+
<SelectOption
|
|
12
|
+
:title="title"
|
|
13
|
+
:titleSize="18"
|
|
14
|
+
buttonSize="large"
|
|
15
|
+
buttonClassIcon="fas fa-arrow-circle-right"
|
|
16
|
+
:width="180"
|
|
17
|
+
:height="190"
|
|
18
|
+
:options="options"
|
|
19
|
+
v-model="selectedOption"
|
|
20
|
+
:clickedNext="execute"
|
|
21
|
+
/>
|
|
22
|
+
</div>
|
|
23
|
+
</Panel>
|
|
24
|
+
</div>
|
|
25
|
+
</template>
|
|
26
|
+
|
|
27
|
+
<script>
|
|
28
|
+
import Panel from "@nixweb/nixloc-ui/src/component/layout/Panel";
|
|
29
|
+
import SelectOption from "@nixweb/nixloc-ui/src/component/shared/SelectOption.vue";
|
|
30
|
+
|
|
31
|
+
import { mapMutations } from "vuex";
|
|
32
|
+
|
|
33
|
+
export default {
|
|
34
|
+
name: "ViewTemplateSelectOption",
|
|
35
|
+
components: { Panel, SelectOption },
|
|
36
|
+
props: {
|
|
37
|
+
title: String,
|
|
38
|
+
panel: Object,
|
|
39
|
+
options: Array,
|
|
40
|
+
clickedNext: Function,
|
|
41
|
+
},
|
|
42
|
+
data() {
|
|
43
|
+
return {
|
|
44
|
+
selectedOption: null,
|
|
45
|
+
};
|
|
46
|
+
},
|
|
47
|
+
created() {
|
|
48
|
+
let self = this;
|
|
49
|
+
setTimeout(function () {
|
|
50
|
+
self.removeLoading(["panel"]);
|
|
51
|
+
}, 350);
|
|
52
|
+
},
|
|
53
|
+
methods: {
|
|
54
|
+
...mapMutations("generic", ["removeLoading"]),
|
|
55
|
+
execute() {
|
|
56
|
+
if (this.clickedNext) this.clickedNext(this.selectedOption);
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
};
|
|
60
|
+
</script>
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<Panel
|
|
4
|
-
:module="panel.module"
|
|
5
|
-
:title="panel.title"
|
|
6
|
-
:showFilter="panel.showFilter"
|
|
7
|
-
:showSearch="panel.showSearch"
|
|
8
|
-
:showButtons="panel.showButtons"
|
|
9
|
-
>
|
|
10
|
-
<div slot="content-buttons">
|
|
11
|
-
<slot name="content-buttons"></slot>
|
|
12
|
-
</div>
|
|
13
|
-
<div slot="content-main">
|
|
14
|
-
<slot name="content-main"></slot>
|
|
15
|
-
</div>
|
|
16
|
-
</Panel>
|
|
17
|
-
<SaveCancel :formName="panel.formName" />
|
|
18
|
-
</div>
|
|
19
|
-
</template>
|
|
20
|
-
|
|
21
|
-
<script>
|
|
22
|
-
import Panel from "@nixweb/nixloc-ui/src/component/layout/Panel";
|
|
23
|
-
import SaveCancel from "@nixweb/nixloc-ui/src/component/shared/SaveCancel";
|
|
24
|
-
|
|
25
|
-
export default {
|
|
26
|
-
name: "ViewTemplateCrud",
|
|
27
|
-
components: { Panel, SaveCancel },
|
|
28
|
-
props: {
|
|
29
|
-
panel: Object,
|
|
30
|
-
},
|
|
31
|
-
};
|
|
32
|
-
</script>
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<Panel
|
|
4
|
+
:module="panel.module"
|
|
5
|
+
:title="panel.title"
|
|
6
|
+
:showFilter="panel.showFilter"
|
|
7
|
+
:showSearch="panel.showSearch"
|
|
8
|
+
:showButtons="panel.showButtons"
|
|
9
|
+
>
|
|
10
|
+
<div slot="content-buttons">
|
|
11
|
+
<slot name="content-buttons"></slot>
|
|
12
|
+
</div>
|
|
13
|
+
<div slot="content-main">
|
|
14
|
+
<slot name="content-main"></slot>
|
|
15
|
+
</div>
|
|
16
|
+
</Panel>
|
|
17
|
+
<SaveCancel :formName="panel.formName" />
|
|
18
|
+
</div>
|
|
19
|
+
</template>
|
|
20
|
+
|
|
21
|
+
<script>
|
|
22
|
+
import Panel from "@nixweb/nixloc-ui/src/component/layout/Panel";
|
|
23
|
+
import SaveCancel from "@nixweb/nixloc-ui/src/component/shared/SaveCancel";
|
|
24
|
+
|
|
25
|
+
export default {
|
|
26
|
+
name: "ViewTemplateCrud",
|
|
27
|
+
components: { Panel, SaveCancel },
|
|
28
|
+
props: {
|
|
29
|
+
panel: Object,
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
</script>
|