@nixweb/nixloc-ui 0.0.300 → 0.0.301
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/App.vue +13 -0
- package/src/component/forms/Button.vue +163 -0
- package/src/component/forms/ButtonFilter.vue +75 -0
- package/src/component/forms/ButtonGroup.vue +67 -0
- package/src/component/forms/ButtonSub.vue +98 -0
- package/src/component/forms/ButtonToggle.vue +77 -0
- package/src/component/forms/CheckboxGroup.vue +69 -0
- package/src/component/forms/CheckboxServer.vue +192 -0
- package/src/component/forms/CheckboxSimple.vue +60 -0
- package/src/component/forms/Color.vue +38 -0
- package/src/component/forms/DateTime.vue +170 -0
- package/src/component/forms/DateYearMonth.vue +193 -0
- package/src/component/forms/Dropdown.vue +236 -0
- package/src/component/forms/EditorHtml.vue +132 -0
- package/src/component/forms/FileUpload.vue +170 -0
- package/src/component/forms/ImageUpload.vue +214 -0
- package/src/component/forms/IncrementDecrement.vue +148 -0
- package/src/component/forms/InputAddressGoogle.vue +171 -0
- package/src/component/forms/InputCallToAction.vue +135 -0
- package/src/component/forms/InputDecimal.vue +153 -0
- package/src/component/forms/InputDecimalDiscount.vue +78 -0
- package/src/component/forms/InputNumber.vue +160 -0
- package/src/component/forms/InputPassword.vue +148 -0
- package/src/component/forms/InputTag.vue +125 -0
- package/src/component/forms/InputText.vue +174 -0
- package/src/component/forms/InputTextEdit.vue +69 -0
- package/src/component/forms/InputWhatsApp.vue +48 -0
- package/src/component/forms/Modal.vue +57 -0
- package/src/component/forms/RadioGroup.vue +91 -0
- package/src/component/forms/Select.vue +378 -0
- package/src/component/forms/SelectStatic.vue +198 -0
- package/src/component/forms/SideBar.vue +100 -0
- package/src/component/forms/Slider.vue +18 -0
- package/src/component/forms/TextArea.vue +138 -0
- package/src/component/forms/Toggle.vue +72 -0
- package/src/component/layout/Account.vue +131 -0
- package/src/component/layout/Alert.vue +88 -0
- package/src/component/layout/Badge.vue +111 -0
- package/src/component/layout/BarFloating.vue +68 -0
- package/src/component/layout/FixedBar.vue +103 -0
- package/src/component/layout/Gantt.vue +128 -0
- package/src/component/layout/Header.vue +56 -0
- package/src/component/layout/HideShow.vue +62 -0
- package/src/component/layout/IconMolded.vue +59 -0
- package/src/component/layout/LoadingFullPage.vue +27 -0
- package/src/component/layout/Menu.vue +287 -0
- package/src/component/layout/Molded.vue +30 -0
- package/src/component/layout/NewAccount.vue +136 -0
- package/src/component/layout/NewHeader.vue +60 -0
- package/src/component/layout/NewIconMolded.vue +71 -0
- package/src/component/layout/NewMenu.vue +456 -0
- package/src/component/layout/Panel.vue +185 -0
- package/src/component/layout/Popover.vue +126 -0
- package/src/component/layout/ScrollBar.vue +57 -0
- package/src/component/layout/Tab.vue +135 -0
- package/src/component/layout/Tag.vue +97 -0
- package/src/component/layout/Wizard.vue +211 -0
- package/src/component/rental/DisplayCalculatePeriod.vue +49 -0
- package/src/component/rental/DisplayPeriodRent.vue +55 -0
- package/src/component/rental/DisplayTotalization.vue +86 -0
- package/src/component/report/Fields.vue +109 -0
- package/src/component/report/Report.vue +314 -0
- package/src/component/report/ReportTable.vue +112 -0
- package/src/component/report/Totalization.vue +34 -0
- package/src/component/shared/CodeEditor.vue +128 -0
- package/src/component/shared/Collapse.vue +131 -0
- package/src/component/shared/Confirmation.vue +74 -0
- package/src/component/shared/DocumentEditor.vue +99 -0
- package/src/component/shared/DocumentPreview.vue +81 -0
- package/src/component/shared/DocumentPublic.vue +33 -0
- package/src/component/shared/ExportExcel.vue +56 -0
- package/src/component/shared/ExportPDF.vue +116 -0
- package/src/component/shared/FullCalendar.vue +174 -0
- package/src/component/shared/HeaderReport.vue +47 -0
- package/src/component/shared/HorizontalFilter.vue +64 -0
- package/src/component/shared/ListNotifications.vue +70 -0
- package/src/component/shared/Loading.vue +107 -0
- package/src/component/shared/LoadingCard.vue +65 -0
- package/src/component/shared/LoadingMoreButton.vue +23 -0
- package/src/component/shared/Messages.vue +109 -0
- package/src/component/shared/PDFViewer.vue +24 -0
- package/src/component/shared/Pagination.vue +108 -0
- package/src/component/shared/ParameterLegend.vue +169 -0
- package/src/component/shared/ProgressBar.vue +25 -0
- package/src/component/shared/QueryButton.vue +66 -0
- package/src/component/shared/Report.vue +200 -0
- package/src/component/shared/SaveCancel.vue +99 -0
- package/src/component/shared/Search.vue +174 -0
- package/src/component/shared/SelectOption.vue +162 -0
- package/src/component/shared/Table.vue +174 -0
- package/src/component/shared/TableButton.vue +36 -0
- package/src/component/shared/TableDraggable.vue +117 -0
- package/src/component/shared/TableImport.vue +93 -0
- package/src/component/shared/TableItem.vue +214 -0
- package/src/component/shared/TableTotalPerPage.vue +78 -0
- package/src/component/shared/TableTotalRecords.vue +44 -0
- package/src/component/shared/TableTotalization.vue +47 -0
- package/src/component/shared/TimeLine.vue +42 -0
- package/src/component/shared/Timer.vue +78 -0
- package/src/component/shared/Tip.vue +42 -0
- package/src/component/shared/Toast.vue +69 -0
- package/src/component/shared/ToggleTheme.vue +128 -0
- package/src/component/shared/TotalizationReport.vue +86 -0
- package/src/component/shared/VerticalFilter.vue +97 -0
- package/src/component/shared/automation/ActivitiesList.vue +44 -0
- package/src/component/shared/automation/AddRule.vue +61 -0
- package/src/component/shared/automation/AutomationBuilder.vue +27 -0
- package/src/component/shared/automation/DynamicComponentList.vue +86 -0
- package/src/component/shared/automation/SelectRule.vue +98 -0
- package/src/component/shared/automation/components/BillingByRent.vue +98 -0
- package/src/component/shared/automation/components/SendEmail.vue +94 -0
- package/src/component/shared/file-manager/FileManager.vue +391 -0
- package/src/component/shared/filter-builder/FilterBuilder.vue +221 -0
- package/src/component/shared/filter-builder/FilterQuery.vue +94 -0
- package/src/component/shared/query-builder/AddRule.vue +203 -0
- package/src/component/shared/query-builder/ConvertToOdata.js +86 -0
- package/src/component/shared/query-builder/DynamicComponent.vue +161 -0
- package/src/component/shared/query-builder/DynamicComponentList.vue +70 -0
- package/src/component/shared/query-builder/Fields.vue +93 -0
- package/src/component/shared/query-builder/QueryBuilder.vue +69 -0
- package/src/component/shared/query-builder/Rules.vue +68 -0
- package/src/component/shared/query-builder/SelectRule.vue +97 -0
- package/src/component/shared/query-builder/Tags.vue +59 -0
- package/src/component/shared/query-builder/utilities.js +22 -0
- package/src/component/signature/Payment.vue +161 -0
- package/src/component/signature/Warning.vue +76 -0
- package/src/component/template/ListViewWithDataHandler.vue +429 -0
- package/src/component/template/ReportCreateUpdate.vue +110 -0
- package/src/component/template/ViewTemplateConfiguration.vue +64 -0
- package/src/component/template/ViewTemplateDocumentView.vue +213 -0
- package/src/component/template/ViewTemplateImportFile.vue +347 -0
- package/src/component/template/ViewTemplateReportList.vue +217 -0
- package/src/component/template/ViewTemplateReportPreview.vue +432 -0
- package/src/component/template/ViewTemplateSelectOption.vue +46 -0
- package/src/component/template/ViewTemplateWithSalveCancel.vue +32 -0
- package/src/component/template/ViewTemplateWithTable.vue +62 -0
- package/src/component/template/model/Report.js +6 -0
- package/src/component/training/Course.vue +344 -0
- package/src/component/training/CourseView.vue +190 -0
- package/src/component/value-objects/Address.js +11 -0
- package/src/component/value-objects/Address.vue +157 -0
- package/src/component/value-objects/Contact.js +7 -0
- package/src/component/value-objects/Contact.vue +106 -0
- package/src/component/value-objects/Person.js +10 -0
- package/src/component/value-objects/Person.vue +129 -0
- package/src/config/axios.js +9 -0
- package/src/config/dicas.js +15 -0
- package/src/config/router.js +14 -0
- package/src/config/token.js +15 -0
- package/src/main.js +23 -0
- package/src/store/modules/automation.js +31 -0
- package/src/store/modules/generic.js +816 -0
- package/src/store/modules/report.js +278 -0
- package/src/store/modules/user.js +67 -0
- package/src/store/modules/util.js +26 -0
- package/src/store/modules/validation.js +39 -0
- package/src/store/store.js +14 -0
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<div class="pagination">
|
|
4
|
+
<button class="btn-pagination" @click="previousPage" :disabled="currentPage === 1 || currentPage > totalPages">
|
|
5
|
+
<i class="fa-solid fa-chevron-left"></i>
|
|
6
|
+
</button>
|
|
7
|
+
<div class="div-pagination text-center">
|
|
8
|
+
<span v-if="isLoading('loadingLine')">
|
|
9
|
+
<vue-loading type="bubbles" color="#FCA944" :size="{ width: '26px', height: '26px' }"></vue-loading>
|
|
10
|
+
</span>
|
|
11
|
+
<span v-else>
|
|
12
|
+
<div>
|
|
13
|
+
<span class="title">
|
|
14
|
+
<span v-if="totalPages == 0">0</span>
|
|
15
|
+
<span v-else>{{ currentPage }}</span> de {{ totalPages }}</span>
|
|
16
|
+
</div>
|
|
17
|
+
</span>
|
|
18
|
+
</div>
|
|
19
|
+
<button class="btn-pagination" @click="nextPage"
|
|
20
|
+
:disabled="currentPage === totalPages || currentPage > totalPages">
|
|
21
|
+
<i class="fa-solid fa-chevron-right"></i>
|
|
22
|
+
</button>
|
|
23
|
+
</div>
|
|
24
|
+
</div>
|
|
25
|
+
</template>
|
|
26
|
+
<script>
|
|
27
|
+
|
|
28
|
+
import { mapGetters, mapMutations, mapState } from "vuex";
|
|
29
|
+
|
|
30
|
+
export default {
|
|
31
|
+
props: {
|
|
32
|
+
totalRecords: Number,
|
|
33
|
+
},
|
|
34
|
+
data() {
|
|
35
|
+
return {
|
|
36
|
+
currentPage: 1,
|
|
37
|
+
totalPerPage: 10 // Substitua pelo número de registros por página desejado
|
|
38
|
+
};
|
|
39
|
+
},
|
|
40
|
+
created() {
|
|
41
|
+
var filter = this.getFilterStorage(this.$route.name);
|
|
42
|
+
if (filter)
|
|
43
|
+
this.currentPage = filter.baseParams.currentPage;
|
|
44
|
+
},
|
|
45
|
+
computed: {
|
|
46
|
+
...mapState("generic", ["paginations"]),
|
|
47
|
+
...mapGetters("generic", ["isLoading", "getFilterStorage"]),
|
|
48
|
+
totalPages() {
|
|
49
|
+
return Math.ceil(this.totalRecords / this.paginations.totalPerPage);
|
|
50
|
+
},
|
|
51
|
+
paginatedData() {
|
|
52
|
+
const startIndex = (this.currentPage - 1) * this.paginations.totalPerPage;
|
|
53
|
+
const endIndex = Math.min(startIndex + this.paginations.totalPerPage, this.totalRecords);
|
|
54
|
+
return Array.from({ length: endIndex - startIndex }, (_, index) => index + startIndex + 1);
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
methods: {
|
|
58
|
+
...mapMutations("generic", ["addEvent"]),
|
|
59
|
+
nextPage() {
|
|
60
|
+
if (this.currentPage < this.totalPages) {
|
|
61
|
+
this.currentPage++;
|
|
62
|
+
}
|
|
63
|
+
this.addEvent({ name: "page-click", data: this.currentPage });
|
|
64
|
+
},
|
|
65
|
+
previousPage() {
|
|
66
|
+
if (this.currentPage > 1) {
|
|
67
|
+
this.currentPage--;
|
|
68
|
+
}
|
|
69
|
+
this.addEvent({ name: "page-click", data: this.currentPage });
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
</script>
|
|
74
|
+
|
|
75
|
+
<style scoped>
|
|
76
|
+
.div-pagination {
|
|
77
|
+
width: 100px;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.btn-pagination {
|
|
81
|
+
padding: 5px;
|
|
82
|
+
cursor: pointer;
|
|
83
|
+
border: none;
|
|
84
|
+
min-width: 35px;
|
|
85
|
+
border-radius: 30px !important;
|
|
86
|
+
font-size: 13px !important;
|
|
87
|
+
font-weight: 400;
|
|
88
|
+
letter-spacing: 1px !important;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
.pagination {
|
|
93
|
+
display: flex;
|
|
94
|
+
justify-content: end;
|
|
95
|
+
align-items: center;
|
|
96
|
+
margin-right: 10px;
|
|
97
|
+
margin-bottom: 10px;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.pagination-button:hover {
|
|
101
|
+
background-color: #ccc;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.pagination-button:disabled {
|
|
105
|
+
opacity: 0.5;
|
|
106
|
+
cursor: not-allowed;
|
|
107
|
+
}
|
|
108
|
+
</style>
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<Search />
|
|
4
|
+
<br />
|
|
5
|
+
<ScrollBar :minHeight="400" :maxHeight="400">
|
|
6
|
+
<table class="table table-responsive-xs">
|
|
7
|
+
<thead>
|
|
8
|
+
<tr>
|
|
9
|
+
<th><span class="title-header">Descrição</span></th>
|
|
10
|
+
<th><span class="title-header">Exemplo</span></th>
|
|
11
|
+
<th><span class="title-header">Parâmetro</span></th>
|
|
12
|
+
</tr>
|
|
13
|
+
</thead>
|
|
14
|
+
<tbody v-for="(legendLocal, groupName) in grouped">
|
|
15
|
+
<td class="group text-center" colspan="8">
|
|
16
|
+
<div>{{ groupName }}</div>
|
|
17
|
+
</td>
|
|
18
|
+
<tr v-for="item in legendLocal">
|
|
19
|
+
<td class="description">
|
|
20
|
+
<span> {{ item.description }}</span>
|
|
21
|
+
</td>
|
|
22
|
+
<td>
|
|
23
|
+
<span class="exemplo"> {{ item.example }}</span>
|
|
24
|
+
</td>
|
|
25
|
+
<td class="parametro">
|
|
26
|
+
<span @click="copy(item.parameter)" v-clipboard="item.parameter">
|
|
27
|
+
{{ item.parameter }}
|
|
28
|
+
<span v-if="item.parameter">
|
|
29
|
+
<span class="copy" v-if="copied != item.parameter">
|
|
30
|
+
<span>Copiar</span>
|
|
31
|
+
</span>
|
|
32
|
+
<span class="copied" v-else>
|
|
33
|
+
<span>Copiado</span>
|
|
34
|
+
</span>
|
|
35
|
+
</span>
|
|
36
|
+
</span>
|
|
37
|
+
</td>
|
|
38
|
+
</tr>
|
|
39
|
+
</tbody>
|
|
40
|
+
</table>
|
|
41
|
+
</ScrollBar>
|
|
42
|
+
</div>
|
|
43
|
+
</template>
|
|
44
|
+
<script>
|
|
45
|
+
import Search from "@nixweb/nixloc-ui/src/component/shared/Search.vue";
|
|
46
|
+
import ScrollBar from "@nixweb/nixloc-ui/src/component/layout/ScrollBar.vue";
|
|
47
|
+
|
|
48
|
+
import { mapGetters, mapState, mapMutations } from "vuex";
|
|
49
|
+
|
|
50
|
+
export default {
|
|
51
|
+
name: "ParameterLegend",
|
|
52
|
+
components: {
|
|
53
|
+
ScrollBar,
|
|
54
|
+
Search,
|
|
55
|
+
},
|
|
56
|
+
props: {
|
|
57
|
+
legend: [],
|
|
58
|
+
module: String,
|
|
59
|
+
},
|
|
60
|
+
data() {
|
|
61
|
+
return {
|
|
62
|
+
legendLocal: [],
|
|
63
|
+
copied: "",
|
|
64
|
+
};
|
|
65
|
+
},
|
|
66
|
+
mounted() {
|
|
67
|
+
this.legendLocal = this.legend;
|
|
68
|
+
},
|
|
69
|
+
methods: {
|
|
70
|
+
...mapMutations("generic", ["removeLoading"]),
|
|
71
|
+
copy(parameter) {
|
|
72
|
+
this.copied = parameter;
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
computed: {
|
|
76
|
+
...mapGetters("generic", ["groupBy"]),
|
|
77
|
+
...mapState("generic", ["search", "executedSearch", "clearedSearch"]),
|
|
78
|
+
grouped() {
|
|
79
|
+
let legend = [];
|
|
80
|
+
/* this.legendLocal.forEach((item) => {
|
|
81
|
+
if (item.showModule.includes(this.module) || item.showModule == "all")
|
|
82
|
+
legend.push(item);
|
|
83
|
+
});*/
|
|
84
|
+
|
|
85
|
+
var list = this.groupBy({ array: this.legendLocal, key: "groupName" });
|
|
86
|
+
return list;
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
watch: {
|
|
90
|
+
executedSearch: function () {
|
|
91
|
+
let legend = [];
|
|
92
|
+
let self = this;
|
|
93
|
+
setTimeout(function () {
|
|
94
|
+
if (self.search.content) {
|
|
95
|
+
self.legend.forEach(function (item) {
|
|
96
|
+
if (self.search.filter.content == "equal") {
|
|
97
|
+
if (item.description == self.search.content) legend.push(item);
|
|
98
|
+
}
|
|
99
|
+
if (self.search.filter.content == "contains") {
|
|
100
|
+
if (item.description.includes(self.search.content))
|
|
101
|
+
legend.push(item);
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
self.legendLocal = legend;
|
|
105
|
+
}
|
|
106
|
+
self.removeLoading(["btnSearch", "btnClean"]);
|
|
107
|
+
}, 300);
|
|
108
|
+
},
|
|
109
|
+
clearedSearch: function () {
|
|
110
|
+
let self = this;
|
|
111
|
+
setTimeout(function () {
|
|
112
|
+
self.legendLocal = self.legend;
|
|
113
|
+
self.removeLoading(["btnSearch", "btnClean"]);
|
|
114
|
+
}, 300);
|
|
115
|
+
},
|
|
116
|
+
},
|
|
117
|
+
};
|
|
118
|
+
</script>
|
|
119
|
+
<style scoped>
|
|
120
|
+
.table th,
|
|
121
|
+
.table td {
|
|
122
|
+
height: 10px !important;
|
|
123
|
+
padding-left: 5px !important;
|
|
124
|
+
padding-top: 7px !important;
|
|
125
|
+
padding-bottom: 5px !important;
|
|
126
|
+
padding-right: 5px !important;
|
|
127
|
+
border-bottom: 0px !important;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.title-header {
|
|
131
|
+
font-size: 14px;
|
|
132
|
+
color: #757d8c;
|
|
133
|
+
font-weight: 400;
|
|
134
|
+
text-transform: uppercase;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.group {
|
|
138
|
+
background-color: #fafafc;
|
|
139
|
+
font-size: 14px;
|
|
140
|
+
font-weight: 500;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.description {
|
|
144
|
+
width: 350px;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.div-warning {
|
|
148
|
+
margin-bottom: 20px;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.parametro {
|
|
152
|
+
font: 12px;
|
|
153
|
+
width: 340px;
|
|
154
|
+
cursor: pointer;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.exemplo {
|
|
158
|
+
font-size: 14px;
|
|
159
|
+
color: rgb(31, 31, 82);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.copy {
|
|
163
|
+
color: rgb(31, 31, 82);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.copied {
|
|
167
|
+
color: red;
|
|
168
|
+
}
|
|
169
|
+
</style>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<progress-bar :bg-color="bColor" :bar-color="bgColor" :size="size" :text="text" :val="value" :max="max"
|
|
4
|
+
bar-border-radius="10"></progress-bar>
|
|
5
|
+
</div>
|
|
6
|
+
</template>
|
|
7
|
+
<script>
|
|
8
|
+
import ProgressBar from "vue-simple-progress";
|
|
9
|
+
|
|
10
|
+
// não mudar o nome Progress para ProgressBar
|
|
11
|
+
export default {
|
|
12
|
+
name: "Progress",
|
|
13
|
+
components: {
|
|
14
|
+
ProgressBar,
|
|
15
|
+
},
|
|
16
|
+
props: {
|
|
17
|
+
bgColor: String,
|
|
18
|
+
bColor: String,
|
|
19
|
+
text: String,
|
|
20
|
+
value: Number,
|
|
21
|
+
max: Number,
|
|
22
|
+
size: String,
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
</script>
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<div class="alignment" v-for="item in items" :key="item.title">
|
|
4
|
+
<button
|
|
5
|
+
:class="{
|
|
6
|
+
'button-query': true,
|
|
7
|
+
}"
|
|
8
|
+
@click="execute(item.valor)"
|
|
9
|
+
>
|
|
10
|
+
<span class="icon"> <i :class="item.classIcon"></i></span>
|
|
11
|
+
<span class="title">{{ item.title }}</span>
|
|
12
|
+
</button>
|
|
13
|
+
</div>
|
|
14
|
+
</div>
|
|
15
|
+
</template>
|
|
16
|
+
<script>
|
|
17
|
+
export default {
|
|
18
|
+
name: "QueryButton",
|
|
19
|
+
props: ["items", "value", "clicked"],
|
|
20
|
+
data() {
|
|
21
|
+
return {
|
|
22
|
+
currentValue: 0,
|
|
23
|
+
};
|
|
24
|
+
},
|
|
25
|
+
methods: {
|
|
26
|
+
execute(valor) {
|
|
27
|
+
this.currentValue = valor;
|
|
28
|
+
this.$emit("input", valor);
|
|
29
|
+
if (this.clicked) this.clicked();
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
</script>
|
|
34
|
+
<style scoped>
|
|
35
|
+
.button-query {
|
|
36
|
+
cursor: pointer;
|
|
37
|
+
height: 35px;
|
|
38
|
+
border: 1px solid #d5d5d5;
|
|
39
|
+
background-color: white;
|
|
40
|
+
border-radius: 3px;
|
|
41
|
+
padding-left: 10px;
|
|
42
|
+
padding-right: 7px;
|
|
43
|
+
margin-right: 10px;
|
|
44
|
+
margin-bottom: 10px;
|
|
45
|
+
font-size: 16px;
|
|
46
|
+
font-weight: normal;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.button-query:hover {
|
|
50
|
+
background-color: #d98621;
|
|
51
|
+
color: white;
|
|
52
|
+
border: none;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.icon {
|
|
56
|
+
font-size: 13px;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.title {
|
|
60
|
+
font-size: 16px;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.alignment {
|
|
64
|
+
display: inline-block;
|
|
65
|
+
}
|
|
66
|
+
</style>
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="preview">
|
|
3
|
+
<div class="toolbar">
|
|
4
|
+
<div class="icon-toolbar" v-print="'#printMe'">
|
|
5
|
+
<i class="fas fa-print"></i>
|
|
6
|
+
</div>
|
|
7
|
+
<div class="icon-toolbar icon-excel">
|
|
8
|
+
<ExportExcel :header="header" :data="data" />
|
|
9
|
+
</div>
|
|
10
|
+
</div>
|
|
11
|
+
<ScrollBar :minHeight="400" :maxHeight="820">
|
|
12
|
+
<br />
|
|
13
|
+
<div id="printMe" :style="'min-height:' + minHeight + 'px'" class="a4 footer">
|
|
14
|
+
<HeaderReport :title="titleHeader" />
|
|
15
|
+
<table class="table table-responsive-md">
|
|
16
|
+
<thead>
|
|
17
|
+
<tr>
|
|
18
|
+
<th v-for="(obj, ind) in header" :key="ind">
|
|
19
|
+
<div class="title-margem" :class="obj.classCssTitle" :style="obj.styleHeader">
|
|
20
|
+
<i class="fas fa-search" v-if="obj.iconSearch"></i>
|
|
21
|
+
<span class="title-header"> {{ obj.title }}</span>
|
|
22
|
+
</div>
|
|
23
|
+
</th>
|
|
24
|
+
</tr>
|
|
25
|
+
</thead>
|
|
26
|
+
<tbody>
|
|
27
|
+
<tr v-for="(row, index) in data" :key="index" :style="row.rowCss">
|
|
28
|
+
<td v-for="(obj, ind) in header" :key="ind">
|
|
29
|
+
<div :style="obj.styleBody" @click="sendEvent(obj.eventName, row)" :class="convertClass(row[obj.fieldComparison], obj.classCssBody)
|
|
30
|
+
" v-if="obj.type === 'text'">
|
|
31
|
+
{{ row[obj.field] }}
|
|
32
|
+
</div>
|
|
33
|
+
<div :style="obj.styleBody" @click="sendEvent(obj.eventName, row)" :class="convertClass(row[obj.fieldComparison], obj.classCssBody)
|
|
34
|
+
" v-if="obj.type === 'date'">
|
|
35
|
+
{{ row[obj.field] | moment("DD/MM/YYYY") }}
|
|
36
|
+
</div>
|
|
37
|
+
<div :style="obj.styleBody" @click="sendEvent(obj.eventName, row)" :class="convertClass(row[obj.fieldComparison], obj.classCssBody)
|
|
38
|
+
" v-if="obj.type === 'dateTime'">
|
|
39
|
+
{{ row[obj.field] | moment("DD/MM/YYYY HH:mm") }}
|
|
40
|
+
</div>
|
|
41
|
+
<div :style="obj.styleBody" @click="sendEvent(obj.eventName, row)" :class="convertClass(row[obj.fieldComparison], obj.classCssBody)
|
|
42
|
+
" v-if="obj.type === 'currency'">
|
|
43
|
+
{{ row[obj.field] | currency }}
|
|
44
|
+
</div>
|
|
45
|
+
</td>
|
|
46
|
+
</tr>
|
|
47
|
+
</tbody>
|
|
48
|
+
<tbody v-show="data.length == 0">
|
|
49
|
+
<tr>
|
|
50
|
+
<td colspan="12">
|
|
51
|
+
<span>Nenhum registro encontrado!</span>
|
|
52
|
+
</td>
|
|
53
|
+
</tr>
|
|
54
|
+
</tbody>
|
|
55
|
+
</table>
|
|
56
|
+
<div>
|
|
57
|
+
<TotalizationReport :totalization="totalization" :totalizationCustom="totalizationCustom"
|
|
58
|
+
:totalRecords="data.length" />
|
|
59
|
+
</div>
|
|
60
|
+
</div>
|
|
61
|
+
</ScrollBar>
|
|
62
|
+
</div>
|
|
63
|
+
</template>
|
|
64
|
+
|
|
65
|
+
<script>
|
|
66
|
+
import ScrollBar from "@nixweb/nixloc-ui/src/component/layout/ScrollBar.vue";
|
|
67
|
+
import HeaderReport from "../shared/HeaderReport.vue";
|
|
68
|
+
import TotalizationReport from "../shared/TotalizationReport.vue";
|
|
69
|
+
import ExportExcel from "@nixweb/nixloc-ui/src/component/shared/ExportExcel";
|
|
70
|
+
import print from "vue-print-nb";
|
|
71
|
+
|
|
72
|
+
import { mapMutations } from "vuex";
|
|
73
|
+
|
|
74
|
+
export default {
|
|
75
|
+
directives: {
|
|
76
|
+
print,
|
|
77
|
+
},
|
|
78
|
+
props: ["titleHeader", "header", "data", "totalization", "totalizationCustom", "minHeight"],
|
|
79
|
+
components: { ScrollBar, HeaderReport, TotalizationReport, ExportExcel },
|
|
80
|
+
methods: {
|
|
81
|
+
...mapMutations("generic", ["addEvent"]),
|
|
82
|
+
convertClass(fieldComparison, classCssBody) {
|
|
83
|
+
if (Array.isArray(classCssBody)) {
|
|
84
|
+
let ret = [];
|
|
85
|
+
classCssBody.forEach(function (value) {
|
|
86
|
+
let classCss = value.classCss;
|
|
87
|
+
let condition = value.fieldComparison == fieldComparison;
|
|
88
|
+
let obj = { [classCss]: condition };
|
|
89
|
+
ret.push(obj);
|
|
90
|
+
});
|
|
91
|
+
return ret;
|
|
92
|
+
} else {
|
|
93
|
+
return classCssBody;
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
sendEvent(eventName, data) {
|
|
97
|
+
if (eventName) this.addEvent({ name: eventName, data: data });
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
};
|
|
101
|
+
</script>
|
|
102
|
+
|
|
103
|
+
<style scoped>
|
|
104
|
+
table tbody tr td {
|
|
105
|
+
max-width: 350px;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.table thead tr {
|
|
109
|
+
border-top: 1px solid black;
|
|
110
|
+
border-bottom: 1px solid black;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.table th,
|
|
114
|
+
.table td {
|
|
115
|
+
height: 10px !important;
|
|
116
|
+
padding-left: 0px !important;
|
|
117
|
+
padding-top: 0px !important;
|
|
118
|
+
padding-bottom: 0px !important;
|
|
119
|
+
padding-right: 5px !important;
|
|
120
|
+
border-bottom: 0px !important;
|
|
121
|
+
border-top: 0px !important;
|
|
122
|
+
font-size: 13px !important;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.title-header {
|
|
126
|
+
font-size: 12px;
|
|
127
|
+
color: #757d8c;
|
|
128
|
+
font-weight: 400;
|
|
129
|
+
text-transform: uppercase;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.table-number {
|
|
133
|
+
font-size: 12px;
|
|
134
|
+
font-weight: bold;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.table-main {
|
|
138
|
+
color: #757d8c;
|
|
139
|
+
max-width: 200px;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.table-currency {
|
|
143
|
+
font-size: 12px;
|
|
144
|
+
min-width: 100px;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.preview {
|
|
148
|
+
background-color: #fafafa;
|
|
149
|
+
padding-bottom: 20px;
|
|
150
|
+
border: 1px solid #e4e6ec;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.toolbar {
|
|
154
|
+
height: 40px;
|
|
155
|
+
border-bottom: 1px hsl(0, 0%, 82.7%) solid;
|
|
156
|
+
overflow: hidden;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.icon-toolbar {
|
|
160
|
+
width: 20px;
|
|
161
|
+
font-size: 18px;
|
|
162
|
+
margin-left: 10px;
|
|
163
|
+
margin-top: 2px;
|
|
164
|
+
cursor: pointer;
|
|
165
|
+
display: inline-block;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.a4 {
|
|
169
|
+
max-width: 1100px;
|
|
170
|
+
padding: 20px;
|
|
171
|
+
border-radius: var(--ck-border-radius);
|
|
172
|
+
background: white;
|
|
173
|
+
box-shadow: 0 0 5px hsl(0deg 0% 0% / 10%);
|
|
174
|
+
margin: 0 auto;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.footer {
|
|
178
|
+
margin-bottom: 10px;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.icon-excel {
|
|
182
|
+
color: green;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.danger {
|
|
186
|
+
color: #f0134d;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
.progress-rent {
|
|
190
|
+
color: #4bb4e2;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.accepted {
|
|
194
|
+
color: #38a169;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.rejected {
|
|
198
|
+
color: #f0134d;
|
|
199
|
+
}
|
|
200
|
+
</style>
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<FixedBar :position="positionFixedBar" backgroundColor="#FAFAFC"
|
|
4
|
+
v-show="formDirty && !modal.open && on || showFixed">
|
|
5
|
+
<div :class="{ collapsed: menuCollapsed, notCollapsed: !menuCollapsed }"
|
|
6
|
+
:style="'margin-bottom:' + marginBottom + 'px'">
|
|
7
|
+
<Button _key="cancelSaveCancel" eventName="cancelSaveCancel" title="Cancelar" type="danger" size="small"
|
|
8
|
+
:clicked="cancel" />
|
|
9
|
+
<Button _key="saveSaveCancel" :eventName="eventName" classIcon="fa-solid fa-floppy-disk" title="Salvar"
|
|
10
|
+
type="success" :disabled="!isFormValid(formName)" size="medium" />
|
|
11
|
+
<slot></slot>
|
|
12
|
+
</div>
|
|
13
|
+
</FixedBar>
|
|
14
|
+
</div>
|
|
15
|
+
</template>
|
|
16
|
+
<script>
|
|
17
|
+
import FixedBar from "@nixweb/nixloc-ui/src/component/layout/FixedBar.vue";
|
|
18
|
+
import Button from "@nixweb/nixloc-ui/src/component/forms/Button";
|
|
19
|
+
|
|
20
|
+
import { mapState, mapMutations, mapGetters } from "vuex";
|
|
21
|
+
|
|
22
|
+
export default {
|
|
23
|
+
name: "SaveCancel",
|
|
24
|
+
components: { FixedBar, Button },
|
|
25
|
+
props: {
|
|
26
|
+
formName: String,
|
|
27
|
+
showFixed: {
|
|
28
|
+
type: Boolean,
|
|
29
|
+
default: false,
|
|
30
|
+
},
|
|
31
|
+
eventName: {
|
|
32
|
+
type: String,
|
|
33
|
+
default: "saveSaveCancel",
|
|
34
|
+
},
|
|
35
|
+
positionFixedBar: {
|
|
36
|
+
type: String,
|
|
37
|
+
default: "footer",
|
|
38
|
+
},
|
|
39
|
+
marginBottom: {
|
|
40
|
+
type: Number,
|
|
41
|
+
default: 0,
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
data() {
|
|
45
|
+
return {
|
|
46
|
+
id: this.$route.params.id,
|
|
47
|
+
on: false,
|
|
48
|
+
};
|
|
49
|
+
},
|
|
50
|
+
mounted() {
|
|
51
|
+
if (!this.id) {
|
|
52
|
+
let self = this;
|
|
53
|
+
setTimeout(function () {
|
|
54
|
+
self.resetValidation(this.formName);
|
|
55
|
+
self.updateFormDirty(false);
|
|
56
|
+
self.removeLoading(["panel"]);
|
|
57
|
+
}, 350);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
let self = this;
|
|
61
|
+
setTimeout(function () {
|
|
62
|
+
self.updateFormDirty(false);
|
|
63
|
+
self.on = true;
|
|
64
|
+
}, 1000);
|
|
65
|
+
},
|
|
66
|
+
computed: {
|
|
67
|
+
...mapState("validation", ["formDirty"]),
|
|
68
|
+
...mapState("generic", ["loading"]),
|
|
69
|
+
...mapGetters("generic", ["event"]),
|
|
70
|
+
...mapGetters("validation", ["isFormValid"]),
|
|
71
|
+
...mapState("generic", ["modal", "menuCollapsed"]),
|
|
72
|
+
},
|
|
73
|
+
methods: {
|
|
74
|
+
...mapMutations("validation", ["updateFormDirty", "resetValidation"]),
|
|
75
|
+
...mapMutations("generic", ["removeLoading", "hideSideBar"]),
|
|
76
|
+
cancel() {
|
|
77
|
+
this.updateFormDirty(false);
|
|
78
|
+
this.removeLoading(["cancelSaveCancel"]);
|
|
79
|
+
this.hideSideBar();
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
watch: {
|
|
83
|
+
"modal.open": function () {
|
|
84
|
+
this.updateFormDirty(false);
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
};
|
|
88
|
+
</script>
|
|
89
|
+
<style scoped>
|
|
90
|
+
.collapsed {
|
|
91
|
+
margin-left: 0px;
|
|
92
|
+
transition: all 0.4s ease;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.notCollapsed {
|
|
96
|
+
margin-left: 130px;
|
|
97
|
+
transition: all 0.4s ease;
|
|
98
|
+
}
|
|
99
|
+
</style>
|