@nixweb/nixloc-ui 1.19.0 → 1.21.0
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/package.json +1 -1
- package/src/component/forms/ButtonFilter.vue +104 -104
- package/src/component/forms/ButtonGroup.vue +66 -66
- package/src/component/forms/ButtonGroupInline.vue +210 -210
- package/src/component/forms/ButtonSub.vue +97 -97
- package/src/component/forms/ButtonToggle.vue +76 -76
- package/src/component/forms/DateYearMonth.vue +192 -192
- package/src/component/forms/ImageUpload.vue +214 -214
- package/src/component/forms/IncrementDecrement.vue +151 -151
- package/src/component/forms/InputAddressGoogle.vue +171 -171
- package/src/component/forms/InputCallToAction.vue +135 -135
- package/src/component/forms/InputDecimalDiscount.vue +146 -146
- package/src/component/forms/InputTag.vue +124 -124
- package/src/component/forms/InputTextEdit.vue +69 -69
- package/src/component/forms/InputWhatsApp.vue +47 -47
- package/src/component/forms/SideBar.vue +99 -99
- package/src/component/forms/Toggle.vue +72 -72
- package/src/component/layout/Account.vue +131 -131
- package/src/component/layout/AnimatedPhrase.vue +68 -68
- package/src/component/layout/BarFloating.vue +67 -67
- package/src/component/layout/BottomActionsBar.vue +205 -205
- package/src/component/layout/ColorPicker.vue +175 -175
- package/src/component/layout/Gantt.vue +128 -128
- package/src/component/layout/HideShow.vue +61 -61
- package/src/component/layout/IconMolded.vue +58 -58
- package/src/component/layout/IconPicker.vue +161 -161
- package/src/component/layout/NewAccount.vue +136 -136
- package/src/component/layout/NewHeader.vue +59 -59
- package/src/component/layout/NewIconMolded.vue +70 -70
- package/src/component/layout/NewMenu.vue +472 -472
- package/src/component/layout/Tab.vue +259 -259
- package/src/component/layout/Tag.vue +97 -97
- package/src/component/layout/Tooltip.vue +155 -155
- package/src/component/layout/Zoom.vue +111 -111
- package/src/component/rental/DisplayCalculatePeriod.vue +48 -48
- package/src/component/rental/DisplayPeriodRent.vue +55 -55
- package/src/component/rental/DisplayTotalization.vue +86 -86
- package/src/component/report/Fields.vue +108 -108
- package/src/component/report/Report.vue +377 -377
- package/src/component/report/ReportTable.vue +111 -111
- package/src/component/report/Totalization.vue +33 -33
- package/src/component/shared/CodeEditor.vue +128 -128
- package/src/component/shared/Confirmation.vue +74 -74
- package/src/component/shared/DocumentEditor.vue +99 -99
- package/src/component/shared/DocumentPreview.vue +117 -105
- package/src/component/shared/DocumentPublic.vue +33 -33
- package/src/component/shared/ExportExcel.vue +56 -56
- package/src/component/shared/FullCalendar.vue +175 -175
- package/src/component/shared/HeaderReport.vue +47 -47
- package/src/component/shared/ListNotifications.vue +70 -70
- package/src/component/shared/Loading.vue +1 -4
- package/src/component/shared/LoadingCard.vue +64 -64
- package/src/component/shared/ParameterLegend.vue +169 -169
- package/src/component/shared/Report.vue +250 -250
- package/src/component/shared/SaveCancel.vue +99 -117
- package/src/component/shared/SelectOption.vue +162 -162
- package/src/component/shared/TableDraggable.vue +117 -117
- package/src/component/shared/TableImport.vue +93 -93
- package/src/component/shared/TableItem.vue +228 -228
- package/src/component/shared/TableTotalPerPage.vue +114 -114
- package/src/component/shared/TableTotalRecords.vue +44 -44
- package/src/component/shared/TimeLine.vue +41 -41
- package/src/component/shared/Timer.vue +77 -77
- package/src/component/shared/ToggleTheme.vue +127 -127
- package/src/component/shared/TotalizationReport.vue +86 -86
- package/src/component/shared/actions/ActionButtons.vue +53 -53
- package/src/component/shared/actions/ActionErrorContent.vue +103 -103
- package/src/component/shared/actions/ActionFooter.vue +93 -99
- package/src/component/shared/actions/ActionHeader.vue +110 -110
- package/src/component/shared/actions/ActionItemList.vue +143 -143
- package/src/component/shared/actions/ActionsOptions.vue +209 -209
- package/src/component/shared/actions/ActionsSelected.vue +262 -262
- package/src/component/shared/automation/ActivitiesList.vue +43 -43
- package/src/component/shared/automation/AddRule.vue +60 -60
- package/src/component/shared/automation/AutomationBuilder.vue +26 -26
- package/src/component/shared/automation/DynamicComponentList.vue +85 -85
- package/src/component/shared/automation/SelectRule.vue +97 -97
- package/src/component/shared/automation/components/BillingByRent.vue +97 -97
- package/src/component/shared/automation/components/SendEmail.vue +93 -93
- package/src/component/shared/file-manager/FileManager.vue +390 -390
- package/src/component/shared/filter-builder/FilterBuilder.vue +220 -220
- package/src/component/shared/filter-builder/FilterQuery.vue +95 -95
- package/src/component/shared/query-builder/ConvertToOdata.js +86 -86
- package/src/component/shared/query-builder/DynamicComponent.vue +161 -161
- package/src/component/shared/query-builder/Fields.vue +93 -93
- package/src/component/shared/query-builder/Rules.vue +68 -68
- package/src/component/shared/query-builder/SelectRule.vue +97 -97
- package/src/component/shared/query-builder/Tags.vue +59 -59
- package/src/component/signature/Payment.vue +160 -160
- package/src/component/signature/Warning.vue +75 -75
- package/src/component/template/ReportCreateUpdate.vue +110 -110
- package/src/component/template/ViewTemplateDocumentView.vue +213 -213
- package/src/component/template/ViewTemplateImportFile.vue +347 -347
- package/src/component/template/ViewTemplateReportList.vue +240 -240
- package/src/component/template/ViewTemplateReportPreview.vue +521 -521
- package/src/component/template/ViewTemplateSelectOption.vue +46 -46
- package/src/component/template/model/Report.js +5 -5
- package/src/component/training/Course.vue +343 -343
- package/src/component/training/CourseView.vue +198 -198
- package/src/component/value-objects/Address.js +10 -10
- package/src/component/value-objects/Address.vue +173 -173
- package/src/component/value-objects/Contact.js +6 -6
- package/src/component/value-objects/Contact.vue +106 -106
- package/src/component/value-objects/Person.js +10 -10
- package/src/component/value-objects/Person.vue +130 -130
- package/src/store/modules/automation.js +30 -30
- package/src/store/modules/generic.js +16 -6
- package/src/store/modules/report.js +277 -277
- package/src/store/modules/user.js +69 -69
- package/src/store/modules/util.js +25 -25
|
@@ -1,250 +1,250 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="preview">
|
|
3
|
-
<div class="toolbar">
|
|
4
|
-
<div class="icon-toolbar" v-print="'#printMeSub'">
|
|
5
|
-
<i class="fas fa-print"></i>
|
|
6
|
-
</div>
|
|
7
|
-
<div v-if="loadingFile" class="icon-toolbar">
|
|
8
|
-
<i class="fa-duotone fa-solid fa-spinner-third loading-icon"></i>
|
|
9
|
-
</div>
|
|
10
|
-
<div v-else @click="generatePDF" class="icon-toolbar">
|
|
11
|
-
<i class="fa-solid fa-file-pdf"></i>
|
|
12
|
-
</div>
|
|
13
|
-
<div class="icon-toolbar icon-excel">
|
|
14
|
-
<ExportExcel :nameFile="name" :header="header" :data="data" />
|
|
15
|
-
</div>
|
|
16
|
-
</div>
|
|
17
|
-
<ScrollBar :minHeight="400" :maxHeight="500">
|
|
18
|
-
<br />
|
|
19
|
-
<div id="printMeSub" :style="'min-height:' + minHeight + 'px'" class="a4 footer">
|
|
20
|
-
<HeaderReport :title="titleHeader" />
|
|
21
|
-
<table class="table table-responsive-md">
|
|
22
|
-
<thead>
|
|
23
|
-
<tr>
|
|
24
|
-
<th v-for="(obj, ind) in header" :key="ind">
|
|
25
|
-
<div class="title-margem" :class="obj.classCssTitle" :style="obj.styleHeader">
|
|
26
|
-
<i class="fas fa-search" v-if="obj.iconSearch"></i>
|
|
27
|
-
<span class="title-header"> {{ obj.title }}</span>
|
|
28
|
-
</div>
|
|
29
|
-
</th>
|
|
30
|
-
</tr>
|
|
31
|
-
</thead>
|
|
32
|
-
<tbody>
|
|
33
|
-
<tr v-for="(row, index) in data" :key="index" :style="row.rowCss">
|
|
34
|
-
<td v-for="(obj, ind) in header" :key="ind">
|
|
35
|
-
<div :style="obj.styleBody" @click="sendEvent(obj.eventName, row)" :class="convertClass(row[obj.fieldComparison], obj.classCssBody)
|
|
36
|
-
" v-if="obj.type === 'text'">
|
|
37
|
-
{{ row[obj.field] }}
|
|
38
|
-
</div>
|
|
39
|
-
<div :style="obj.styleBody" @click="sendEvent(obj.eventName, row)" :class="convertClass(row[obj.fieldComparison], obj.classCssBody)
|
|
40
|
-
" v-if="obj.type === 'date'">
|
|
41
|
-
{{ row[obj.field] | moment("DD/MM/YYYY") }}
|
|
42
|
-
</div>
|
|
43
|
-
<div :style="obj.styleBody" @click="sendEvent(obj.eventName, row)" :class="convertClass(row[obj.fieldComparison], obj.classCssBody)
|
|
44
|
-
" v-if="obj.type === 'dateTime'">
|
|
45
|
-
{{ row[obj.field] | moment("DD/MM/YYYY HH:mm") }}
|
|
46
|
-
</div>
|
|
47
|
-
<div :style="obj.styleBody" @click="sendEvent(obj.eventName, row)" :class="convertClass(row[obj.fieldComparison], obj.classCssBody)
|
|
48
|
-
" v-if="obj.type === 'currency'">
|
|
49
|
-
{{ row[obj.field] | currency }}
|
|
50
|
-
</div>
|
|
51
|
-
</td>
|
|
52
|
-
</tr>
|
|
53
|
-
</tbody>
|
|
54
|
-
<tbody v-show="data.length == 0">
|
|
55
|
-
<tr>
|
|
56
|
-
<td colspan="12">
|
|
57
|
-
<span>Nenhum registro encontrado!</span>
|
|
58
|
-
</td>
|
|
59
|
-
</tr>
|
|
60
|
-
</tbody>
|
|
61
|
-
</table>
|
|
62
|
-
<div>
|
|
63
|
-
<TotalizationReport :totalization="totalization" :totalizationCustom="totalizationCustom"
|
|
64
|
-
:totalRecords="data.length" />
|
|
65
|
-
</div>
|
|
66
|
-
</div>
|
|
67
|
-
</ScrollBar>
|
|
68
|
-
</div>
|
|
69
|
-
</template>
|
|
70
|
-
|
|
71
|
-
<script>
|
|
72
|
-
import ScrollBar from "@nixweb/nixloc-ui/src/component/layout/ScrollBar.vue";
|
|
73
|
-
import HeaderReport from "../shared/HeaderReport.vue";
|
|
74
|
-
import TotalizationReport from "../shared/TotalizationReport.vue";
|
|
75
|
-
import ExportExcel from "@nixweb/nixloc-ui/src/component/shared/ExportExcel";
|
|
76
|
-
|
|
77
|
-
import print from "vue-print-nb";
|
|
78
|
-
import html2pdf from 'html2pdf.js'
|
|
79
|
-
|
|
80
|
-
import { mapMutations } from "vuex";
|
|
81
|
-
|
|
82
|
-
export default {
|
|
83
|
-
directives: {
|
|
84
|
-
print,
|
|
85
|
-
},
|
|
86
|
-
props: ["name", "titleHeader", "header", "data", "totalization", "totalizationCustom", "minHeight"],
|
|
87
|
-
components: { ScrollBar, HeaderReport, TotalizationReport, ExportExcel },
|
|
88
|
-
data() {
|
|
89
|
-
return {
|
|
90
|
-
loadingFile: false,
|
|
91
|
-
}
|
|
92
|
-
},
|
|
93
|
-
methods: {
|
|
94
|
-
...mapMutations("generic", ["addEvent"]),
|
|
95
|
-
convertClass(fieldComparison, classCssBody) {
|
|
96
|
-
if (Array.isArray(classCssBody)) {
|
|
97
|
-
let ret = [];
|
|
98
|
-
classCssBody.forEach(function (value) {
|
|
99
|
-
let classCss = value.classCss;
|
|
100
|
-
let condition = value.fieldComparison == fieldComparison;
|
|
101
|
-
let obj = { [classCss]: condition };
|
|
102
|
-
ret.push(obj);
|
|
103
|
-
});
|
|
104
|
-
return ret;
|
|
105
|
-
} else {
|
|
106
|
-
return classCssBody;
|
|
107
|
-
}
|
|
108
|
-
},
|
|
109
|
-
sendEvent(eventName, data) {
|
|
110
|
-
if (eventName) this.addEvent({ name: eventName, data: data });
|
|
111
|
-
},
|
|
112
|
-
async generatePDF() {
|
|
113
|
-
try {
|
|
114
|
-
this.loadingFile = true;
|
|
115
|
-
|
|
116
|
-
const element = document.getElementById('printMeSub');
|
|
117
|
-
|
|
118
|
-
const opt = {
|
|
119
|
-
margin: 0,
|
|
120
|
-
filename: this.name + '.pdf',
|
|
121
|
-
image: { type: 'jpeg', quality: 0.98 },
|
|
122
|
-
html2canvas: { scale: 2 },
|
|
123
|
-
jsPDF: { unit: 'mm', format: 'a4', orientation: 'landscape' }
|
|
124
|
-
};
|
|
125
|
-
|
|
126
|
-
await html2pdf()
|
|
127
|
-
.set(opt)
|
|
128
|
-
.from(element)
|
|
129
|
-
.save();
|
|
130
|
-
|
|
131
|
-
} catch (error) {
|
|
132
|
-
console.error('Erro ao gerar PDF:', error);
|
|
133
|
-
} finally {
|
|
134
|
-
this.loadingFile = false;
|
|
135
|
-
}
|
|
136
|
-
},
|
|
137
|
-
},
|
|
138
|
-
};
|
|
139
|
-
</script>
|
|
140
|
-
|
|
141
|
-
<style scoped>
|
|
142
|
-
table tbody tr td {
|
|
143
|
-
width: 1100px;
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
.table thead tr {
|
|
147
|
-
border-top: 1px solid black;
|
|
148
|
-
border-bottom: 1px solid black;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
.table th,
|
|
152
|
-
.table td {
|
|
153
|
-
height: 10px !important;
|
|
154
|
-
padding-left: 0px !important;
|
|
155
|
-
padding-top: 0px !important;
|
|
156
|
-
padding-bottom: 0px !important;
|
|
157
|
-
padding-right: 5px !important;
|
|
158
|
-
border-bottom: 0px !important;
|
|
159
|
-
border-top: 0px !important;
|
|
160
|
-
font-size: 13px !important;
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
.title-header {
|
|
164
|
-
font-size: 12px;
|
|
165
|
-
color: #757d8c;
|
|
166
|
-
font-weight: 400;
|
|
167
|
-
text-transform: uppercase;
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
.table-number {
|
|
171
|
-
font-size: 12px;
|
|
172
|
-
font-weight: bold;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
.table-main {
|
|
176
|
-
color: #757d8c;
|
|
177
|
-
max-width: 200px;
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
.table-currency {
|
|
181
|
-
font-size: 12px;
|
|
182
|
-
min-width: 100px;
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
.preview {
|
|
186
|
-
background-color: #fafafa;
|
|
187
|
-
padding-bottom: 20px;
|
|
188
|
-
border: 1px solid #e4e6ec;
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
.loading-icon {
|
|
192
|
-
color: orange;
|
|
193
|
-
font-size: 19px;
|
|
194
|
-
animation: spin 1s linear infinite;
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
@keyframes spin {
|
|
198
|
-
100% {
|
|
199
|
-
transform: rotate(360deg);
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
.toolbar {
|
|
204
|
-
height: 40px;
|
|
205
|
-
border-bottom: 1px hsl(0, 0%, 82.7%) solid;
|
|
206
|
-
overflow: hidden;
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
.icon-toolbar {
|
|
210
|
-
width: 20px;
|
|
211
|
-
font-size: 18px;
|
|
212
|
-
margin-left: 10px;
|
|
213
|
-
margin-top: 2px;
|
|
214
|
-
cursor: pointer;
|
|
215
|
-
display: inline-block;
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
.a4 {
|
|
219
|
-
max-width: 1100px;
|
|
220
|
-
padding: 20px;
|
|
221
|
-
border-radius: var(--ck-border-radius);
|
|
222
|
-
background: white;
|
|
223
|
-
box-shadow: 0 0 5px hsl(0deg 0% 0% / 10%);
|
|
224
|
-
margin: 0 auto;
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
.footer {
|
|
228
|
-
margin-bottom: 10px;
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
.icon-excel {
|
|
232
|
-
color: green;
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
.danger {
|
|
236
|
-
color: #f0134d;
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
.progress-rent {
|
|
240
|
-
color: #4bb4e2;
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
.accepted {
|
|
244
|
-
color: #38a169;
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
.rejected {
|
|
248
|
-
color: #f0134d;
|
|
249
|
-
}
|
|
250
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div class="preview">
|
|
3
|
+
<div class="toolbar">
|
|
4
|
+
<div class="icon-toolbar" v-print="'#printMeSub'">
|
|
5
|
+
<i class="fas fa-print"></i>
|
|
6
|
+
</div>
|
|
7
|
+
<div v-if="loadingFile" class="icon-toolbar">
|
|
8
|
+
<i class="fa-duotone fa-solid fa-spinner-third loading-icon"></i>
|
|
9
|
+
</div>
|
|
10
|
+
<div v-else @click="generatePDF" class="icon-toolbar">
|
|
11
|
+
<i class="fa-solid fa-file-pdf"></i>
|
|
12
|
+
</div>
|
|
13
|
+
<div class="icon-toolbar icon-excel">
|
|
14
|
+
<ExportExcel :nameFile="name" :header="header" :data="data" />
|
|
15
|
+
</div>
|
|
16
|
+
</div>
|
|
17
|
+
<ScrollBar :minHeight="400" :maxHeight="500">
|
|
18
|
+
<br />
|
|
19
|
+
<div id="printMeSub" :style="'min-height:' + minHeight + 'px'" class="a4 footer">
|
|
20
|
+
<HeaderReport :title="titleHeader" />
|
|
21
|
+
<table class="table table-responsive-md">
|
|
22
|
+
<thead>
|
|
23
|
+
<tr>
|
|
24
|
+
<th v-for="(obj, ind) in header" :key="ind">
|
|
25
|
+
<div class="title-margem" :class="obj.classCssTitle" :style="obj.styleHeader">
|
|
26
|
+
<i class="fas fa-search" v-if="obj.iconSearch"></i>
|
|
27
|
+
<span class="title-header"> {{ obj.title }}</span>
|
|
28
|
+
</div>
|
|
29
|
+
</th>
|
|
30
|
+
</tr>
|
|
31
|
+
</thead>
|
|
32
|
+
<tbody>
|
|
33
|
+
<tr v-for="(row, index) in data" :key="index" :style="row.rowCss">
|
|
34
|
+
<td v-for="(obj, ind) in header" :key="ind">
|
|
35
|
+
<div :style="obj.styleBody" @click="sendEvent(obj.eventName, row)" :class="convertClass(row[obj.fieldComparison], obj.classCssBody)
|
|
36
|
+
" v-if="obj.type === 'text'">
|
|
37
|
+
{{ row[obj.field] }}
|
|
38
|
+
</div>
|
|
39
|
+
<div :style="obj.styleBody" @click="sendEvent(obj.eventName, row)" :class="convertClass(row[obj.fieldComparison], obj.classCssBody)
|
|
40
|
+
" v-if="obj.type === 'date'">
|
|
41
|
+
{{ row[obj.field] | moment("DD/MM/YYYY") }}
|
|
42
|
+
</div>
|
|
43
|
+
<div :style="obj.styleBody" @click="sendEvent(obj.eventName, row)" :class="convertClass(row[obj.fieldComparison], obj.classCssBody)
|
|
44
|
+
" v-if="obj.type === 'dateTime'">
|
|
45
|
+
{{ row[obj.field] | moment("DD/MM/YYYY HH:mm") }}
|
|
46
|
+
</div>
|
|
47
|
+
<div :style="obj.styleBody" @click="sendEvent(obj.eventName, row)" :class="convertClass(row[obj.fieldComparison], obj.classCssBody)
|
|
48
|
+
" v-if="obj.type === 'currency'">
|
|
49
|
+
{{ row[obj.field] | currency }}
|
|
50
|
+
</div>
|
|
51
|
+
</td>
|
|
52
|
+
</tr>
|
|
53
|
+
</tbody>
|
|
54
|
+
<tbody v-show="data.length == 0">
|
|
55
|
+
<tr>
|
|
56
|
+
<td colspan="12">
|
|
57
|
+
<span>Nenhum registro encontrado!</span>
|
|
58
|
+
</td>
|
|
59
|
+
</tr>
|
|
60
|
+
</tbody>
|
|
61
|
+
</table>
|
|
62
|
+
<div>
|
|
63
|
+
<TotalizationReport :totalization="totalization" :totalizationCustom="totalizationCustom"
|
|
64
|
+
:totalRecords="data.length" />
|
|
65
|
+
</div>
|
|
66
|
+
</div>
|
|
67
|
+
</ScrollBar>
|
|
68
|
+
</div>
|
|
69
|
+
</template>
|
|
70
|
+
|
|
71
|
+
<script>
|
|
72
|
+
import ScrollBar from "@nixweb/nixloc-ui/src/component/layout/ScrollBar.vue";
|
|
73
|
+
import HeaderReport from "../shared/HeaderReport.vue";
|
|
74
|
+
import TotalizationReport from "../shared/TotalizationReport.vue";
|
|
75
|
+
import ExportExcel from "@nixweb/nixloc-ui/src/component/shared/ExportExcel";
|
|
76
|
+
|
|
77
|
+
import print from "vue-print-nb";
|
|
78
|
+
import html2pdf from 'html2pdf.js'
|
|
79
|
+
|
|
80
|
+
import { mapMutations } from "vuex";
|
|
81
|
+
|
|
82
|
+
export default {
|
|
83
|
+
directives: {
|
|
84
|
+
print,
|
|
85
|
+
},
|
|
86
|
+
props: ["name", "titleHeader", "header", "data", "totalization", "totalizationCustom", "minHeight"],
|
|
87
|
+
components: { ScrollBar, HeaderReport, TotalizationReport, ExportExcel },
|
|
88
|
+
data() {
|
|
89
|
+
return {
|
|
90
|
+
loadingFile: false,
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
methods: {
|
|
94
|
+
...mapMutations("generic", ["addEvent"]),
|
|
95
|
+
convertClass(fieldComparison, classCssBody) {
|
|
96
|
+
if (Array.isArray(classCssBody)) {
|
|
97
|
+
let ret = [];
|
|
98
|
+
classCssBody.forEach(function (value) {
|
|
99
|
+
let classCss = value.classCss;
|
|
100
|
+
let condition = value.fieldComparison == fieldComparison;
|
|
101
|
+
let obj = { [classCss]: condition };
|
|
102
|
+
ret.push(obj);
|
|
103
|
+
});
|
|
104
|
+
return ret;
|
|
105
|
+
} else {
|
|
106
|
+
return classCssBody;
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
sendEvent(eventName, data) {
|
|
110
|
+
if (eventName) this.addEvent({ name: eventName, data: data });
|
|
111
|
+
},
|
|
112
|
+
async generatePDF() {
|
|
113
|
+
try {
|
|
114
|
+
this.loadingFile = true;
|
|
115
|
+
|
|
116
|
+
const element = document.getElementById('printMeSub');
|
|
117
|
+
|
|
118
|
+
const opt = {
|
|
119
|
+
margin: 0,
|
|
120
|
+
filename: this.name + '.pdf',
|
|
121
|
+
image: { type: 'jpeg', quality: 0.98 },
|
|
122
|
+
html2canvas: { scale: 2 },
|
|
123
|
+
jsPDF: { unit: 'mm', format: 'a4', orientation: 'landscape' }
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
await html2pdf()
|
|
127
|
+
.set(opt)
|
|
128
|
+
.from(element)
|
|
129
|
+
.save();
|
|
130
|
+
|
|
131
|
+
} catch (error) {
|
|
132
|
+
console.error('Erro ao gerar PDF:', error);
|
|
133
|
+
} finally {
|
|
134
|
+
this.loadingFile = false;
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
},
|
|
138
|
+
};
|
|
139
|
+
</script>
|
|
140
|
+
|
|
141
|
+
<style scoped>
|
|
142
|
+
table tbody tr td {
|
|
143
|
+
width: 1100px;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.table thead tr {
|
|
147
|
+
border-top: 1px solid black;
|
|
148
|
+
border-bottom: 1px solid black;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.table th,
|
|
152
|
+
.table td {
|
|
153
|
+
height: 10px !important;
|
|
154
|
+
padding-left: 0px !important;
|
|
155
|
+
padding-top: 0px !important;
|
|
156
|
+
padding-bottom: 0px !important;
|
|
157
|
+
padding-right: 5px !important;
|
|
158
|
+
border-bottom: 0px !important;
|
|
159
|
+
border-top: 0px !important;
|
|
160
|
+
font-size: 13px !important;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.title-header {
|
|
164
|
+
font-size: 12px;
|
|
165
|
+
color: #757d8c;
|
|
166
|
+
font-weight: 400;
|
|
167
|
+
text-transform: uppercase;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.table-number {
|
|
171
|
+
font-size: 12px;
|
|
172
|
+
font-weight: bold;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.table-main {
|
|
176
|
+
color: #757d8c;
|
|
177
|
+
max-width: 200px;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.table-currency {
|
|
181
|
+
font-size: 12px;
|
|
182
|
+
min-width: 100px;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.preview {
|
|
186
|
+
background-color: #fafafa;
|
|
187
|
+
padding-bottom: 20px;
|
|
188
|
+
border: 1px solid #e4e6ec;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.loading-icon {
|
|
192
|
+
color: orange;
|
|
193
|
+
font-size: 19px;
|
|
194
|
+
animation: spin 1s linear infinite;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
@keyframes spin {
|
|
198
|
+
100% {
|
|
199
|
+
transform: rotate(360deg);
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.toolbar {
|
|
204
|
+
height: 40px;
|
|
205
|
+
border-bottom: 1px hsl(0, 0%, 82.7%) solid;
|
|
206
|
+
overflow: hidden;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.icon-toolbar {
|
|
210
|
+
width: 20px;
|
|
211
|
+
font-size: 18px;
|
|
212
|
+
margin-left: 10px;
|
|
213
|
+
margin-top: 2px;
|
|
214
|
+
cursor: pointer;
|
|
215
|
+
display: inline-block;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
.a4 {
|
|
219
|
+
max-width: 1100px;
|
|
220
|
+
padding: 20px;
|
|
221
|
+
border-radius: var(--ck-border-radius);
|
|
222
|
+
background: white;
|
|
223
|
+
box-shadow: 0 0 5px hsl(0deg 0% 0% / 10%);
|
|
224
|
+
margin: 0 auto;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.footer {
|
|
228
|
+
margin-bottom: 10px;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
.icon-excel {
|
|
232
|
+
color: green;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
.danger {
|
|
236
|
+
color: #f0134d;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
.progress-rent {
|
|
240
|
+
color: #4bb4e2;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
.accepted {
|
|
244
|
+
color: #38a169;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
.rejected {
|
|
248
|
+
color: #f0134d;
|
|
249
|
+
}
|
|
250
|
+
</style>
|