@nixweb/nixloc-ui 1.19.0 → 1.20.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 +105 -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 +15 -1
- 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,221 +1,221 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<b-row>
|
|
4
|
-
<b-col sm="9">
|
|
5
|
-
<SelectStatic title="Tipo" :onlyQuery="true" :data="options" :markFormDirty="true"
|
|
6
|
-
v-model="filterSelected" />
|
|
7
|
-
</b-col>
|
|
8
|
-
</b-row>
|
|
9
|
-
<div>
|
|
10
|
-
<div v-for="item in filtersAdded">
|
|
11
|
-
<div class="molded">
|
|
12
|
-
<b-row>
|
|
13
|
-
<b-col sm="11">
|
|
14
|
-
<CheckboxGroup v-if="item.type == 'options'" :title="item.title" :options="item.options"
|
|
15
|
-
:initialValue="item.value" v-model="item.value" />
|
|
16
|
-
<div class="div-date">
|
|
17
|
-
<DateTime v-if="item.type == 'date' || item.type == 'dateRange'" :title="item.title"
|
|
18
|
-
format="DD/MM/YYYY" type="date" :range="true" :confirm="true" confirmText="Ok"
|
|
19
|
-
placeholder v-model="item.value" />
|
|
20
|
-
</div>
|
|
21
|
-
<div v-if="item.type == 'decimal'">
|
|
22
|
-
<b-row>
|
|
23
|
-
<b-col sm="6">
|
|
24
|
-
<InputDecimal title="Valor Inicial" v-model="item.valueStart" />
|
|
25
|
-
</b-col>
|
|
26
|
-
<b-col sm="6">
|
|
27
|
-
<InputDecimal title="Valor Final" v-model="item.valueEnd" />
|
|
28
|
-
</b-col>
|
|
29
|
-
</b-row>
|
|
30
|
-
</div>
|
|
31
|
-
<div v-if="item.type == 'multiOptions' || item.type == 'listOptions'">
|
|
32
|
-
<div class="div-multi-options">
|
|
33
|
-
<CheckboxServer v-if="!item.options" :title="item.title"
|
|
34
|
-
:propsParams="item.propsParams" :url="item.url" v-model="item.value" />
|
|
35
|
-
|
|
36
|
-
<CheckboxGroup v-else :title="item.title" :options="item.options"
|
|
37
|
-
:initialValue="item.value" v-model="item.value" />
|
|
38
|
-
</div>
|
|
39
|
-
</div>
|
|
40
|
-
|
|
41
|
-
<RadioGroup v-if="item.type == 'radio'" :title="item.title" :options="item.options"
|
|
42
|
-
v-model="item.value" />
|
|
43
|
-
|
|
44
|
-
<InputText v-if="item.type == 'text' || item.type == 'patrimony'" :title="item.title"
|
|
45
|
-
v-model="item.value" />
|
|
46
|
-
|
|
47
|
-
<InputNumber v-if="item.type == 'number'" :title="item.title" v-model="item.value" />
|
|
48
|
-
</b-col>
|
|
49
|
-
<b-col sm="1">
|
|
50
|
-
<div class="icon-remove" @click="removeItem(item.field)">
|
|
51
|
-
<i class="fas fa-times"></i>
|
|
52
|
-
</div>
|
|
53
|
-
</b-col>
|
|
54
|
-
</b-row>
|
|
55
|
-
</div>
|
|
56
|
-
</div>
|
|
57
|
-
</div>
|
|
58
|
-
<div class="text-center">
|
|
59
|
-
<Button _key="btnApply" title="Aplicar" backGroundColor="#017AFF" color="white" size="small"
|
|
60
|
-
:clicked="apply" />
|
|
61
|
-
</div>
|
|
62
|
-
</div>
|
|
63
|
-
</template>
|
|
64
|
-
|
|
65
|
-
<script>
|
|
66
|
-
|
|
67
|
-
import Button from "@nixweb/nixloc-ui/src/component/forms/Button";
|
|
68
|
-
import InputText from "@nixweb/nixloc-ui/src/component/forms/InputText";
|
|
69
|
-
import InputDecimal from "@nixweb/nixloc-ui/src/component/forms/InputDecimal";
|
|
70
|
-
import InputNumber from "@nixweb/nixloc-ui/src/component/forms/InputNumber";
|
|
71
|
-
import SelectStatic from "@nixweb/nixloc-ui/src/component/forms/SelectStatic";
|
|
72
|
-
import CheckboxGroup from "@nixweb/nixloc-ui/src/component/forms/CheckboxGroup";
|
|
73
|
-
import CheckboxServer from "@nixweb/nixloc-ui/src/component/forms/CheckboxServer";
|
|
74
|
-
import ScrollBar from "@nixweb/nixloc-ui/src/component/layout/ScrollBar.vue";
|
|
75
|
-
import DateTime from "@nixweb/nixloc-ui/src/component/forms/DateTime";
|
|
76
|
-
import RadioGroup from "@nixweb/nixloc-ui/src/component/forms/RadioGroup";
|
|
77
|
-
|
|
78
|
-
import { mapMutations, mapState, mapGetters } from "vuex";
|
|
79
|
-
|
|
80
|
-
export default {
|
|
81
|
-
name: "FilterBuilder",
|
|
82
|
-
props: ["filters", "value"],
|
|
83
|
-
components: { SelectStatic, Button, CheckboxGroup, CheckboxServer, InputText, InputNumber, ScrollBar, DateTime, InputDecimal, RadioGroup },
|
|
84
|
-
data() {
|
|
85
|
-
return {
|
|
86
|
-
filterSelected: {},
|
|
87
|
-
filtersAdded: [],
|
|
88
|
-
}
|
|
89
|
-
},
|
|
90
|
-
mounted() {
|
|
91
|
-
var filterStorage = this.getQueryFilter(this.$route.name);
|
|
92
|
-
if (filterStorage) {
|
|
93
|
-
this.filtersAdded = filterStorage.filtersAdded;
|
|
94
|
-
this.addEvent({ name: "stringFilter", data: this.filterFinal });
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
},
|
|
98
|
-
computed: {
|
|
99
|
-
...mapGetters("generic", ["event", "getQueryFilter"]),
|
|
100
|
-
...mapState("generic", ["filterQuery"]),
|
|
101
|
-
options() {
|
|
102
|
-
let options = [];
|
|
103
|
-
this.filters.forEach(filter => {
|
|
104
|
-
options.push(
|
|
105
|
-
{
|
|
106
|
-
id: filter.type,
|
|
107
|
-
content: filter.title,
|
|
108
|
-
listName: filter.listName,
|
|
109
|
-
field: filter.field,
|
|
110
|
-
options: filter.options,
|
|
111
|
-
title: filter.title,
|
|
112
|
-
type: filter.type,
|
|
113
|
-
url: filter.url,
|
|
114
|
-
value: filter.value,
|
|
115
|
-
required: filter.required,
|
|
116
|
-
propsParams: filter.propsParams
|
|
117
|
-
});
|
|
118
|
-
});
|
|
119
|
-
return options;
|
|
120
|
-
},
|
|
121
|
-
filterFinal() {
|
|
122
|
-
return this.filtersAdded.map(item => ({
|
|
123
|
-
routeName: this.$route.name,
|
|
124
|
-
title: item.title,
|
|
125
|
-
listName: item.listName,
|
|
126
|
-
field: item.field,
|
|
127
|
-
type: item.type,
|
|
128
|
-
originalValue: item.value,
|
|
129
|
-
required: item.required,
|
|
130
|
-
value: item.type == "decimal" ? [item.valueStart, item.valueEnd].join('<>') : Array.isArray(item.value) ? item.value.join('<>') : item.value.toString()
|
|
131
|
-
}));
|
|
132
|
-
},
|
|
133
|
-
},
|
|
134
|
-
methods: {
|
|
135
|
-
...mapMutations("generic", ["addEvent", "hideModal", "removeLoading", "addFilterQuery"]),
|
|
136
|
-
add() {
|
|
137
|
-
if (this.filterSelected.id && !this.contentExists(this.filterSelected.field)) {
|
|
138
|
-
this.filtersAdded.push(this.filterSelected);
|
|
139
|
-
this.filterSelected = { content: "", id: "" };
|
|
140
|
-
}
|
|
141
|
-
this.removeLoading(["btnAddFilter"]);
|
|
142
|
-
},
|
|
143
|
-
contentExists(field) {
|
|
144
|
-
return this.filtersAdded.some(item => item.field === field);
|
|
145
|
-
},
|
|
146
|
-
removeItem(field) {
|
|
147
|
-
this.filtersAdded = this.filtersAdded.filter(item => item.field !== field);
|
|
148
|
-
},
|
|
149
|
-
apply() {
|
|
150
|
-
this.addEvent({ name: "stringFilter", data: this.filterFinal });
|
|
151
|
-
this.hideModal();
|
|
152
|
-
this.removeLoading(["btnApply"]);
|
|
153
|
-
}
|
|
154
|
-
},
|
|
155
|
-
watch: {
|
|
156
|
-
event: {
|
|
157
|
-
handler(event) {
|
|
158
|
-
|
|
159
|
-
if (event.name == "tagFilterRemove") {
|
|
160
|
-
this.removeItem(event.data.field);
|
|
161
|
-
this.addEvent({ name: "stringFilter" });
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
if (event.name == "filterStorageRemoved") {
|
|
165
|
-
this.filtersAdded = [];
|
|
166
|
-
this.addEvent({ name: "stringFilter", data: this.filterFinal });
|
|
167
|
-
}
|
|
168
|
-
},
|
|
169
|
-
deep: true,
|
|
170
|
-
},
|
|
171
|
-
filterFinal: {
|
|
172
|
-
handler(filterFinal) {
|
|
173
|
-
this.$emit("input", filterFinal);
|
|
174
|
-
this.addFilterQuery({ routeName: this.$route.name, filtersAdded: this.filtersAdded });
|
|
175
|
-
},
|
|
176
|
-
deep: true,
|
|
177
|
-
},
|
|
178
|
-
filterSelected: {
|
|
179
|
-
handler(filterSelected) {
|
|
180
|
-
this.add();
|
|
181
|
-
},
|
|
182
|
-
deep: true,
|
|
183
|
-
},
|
|
184
|
-
},
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
</script>
|
|
189
|
-
|
|
190
|
-
<style scoped>
|
|
191
|
-
.div-btn {
|
|
192
|
-
margin-top: 38px;
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
.div-date {
|
|
196
|
-
width: 300px;
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
.molded {
|
|
200
|
-
border: 1px solid #e8eaed;
|
|
201
|
-
background-color: white;
|
|
202
|
-
border-radius: 8px !important;
|
|
203
|
-
padding-left: 10px;
|
|
204
|
-
padding-right: 10px;
|
|
205
|
-
padding-top: 10px;
|
|
206
|
-
margin-bottom: 10px;
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
.icon-remove {
|
|
211
|
-
display: flex;
|
|
212
|
-
align-items: center;
|
|
213
|
-
justify-content: center;
|
|
214
|
-
height: 60px;
|
|
215
|
-
width: 30px;
|
|
216
|
-
cursor: pointer;
|
|
217
|
-
color: #F0134D;
|
|
218
|
-
cursor: pointer;
|
|
219
|
-
font-size: 17px;
|
|
220
|
-
}
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<b-row>
|
|
4
|
+
<b-col sm="9">
|
|
5
|
+
<SelectStatic title="Tipo" :onlyQuery="true" :data="options" :markFormDirty="true"
|
|
6
|
+
v-model="filterSelected" />
|
|
7
|
+
</b-col>
|
|
8
|
+
</b-row>
|
|
9
|
+
<div>
|
|
10
|
+
<div v-for="item in filtersAdded">
|
|
11
|
+
<div class="molded">
|
|
12
|
+
<b-row>
|
|
13
|
+
<b-col sm="11">
|
|
14
|
+
<CheckboxGroup v-if="item.type == 'options'" :title="item.title" :options="item.options"
|
|
15
|
+
:initialValue="item.value" v-model="item.value" />
|
|
16
|
+
<div class="div-date">
|
|
17
|
+
<DateTime v-if="item.type == 'date' || item.type == 'dateRange'" :title="item.title"
|
|
18
|
+
format="DD/MM/YYYY" type="date" :range="true" :confirm="true" confirmText="Ok"
|
|
19
|
+
placeholder v-model="item.value" />
|
|
20
|
+
</div>
|
|
21
|
+
<div v-if="item.type == 'decimal'">
|
|
22
|
+
<b-row>
|
|
23
|
+
<b-col sm="6">
|
|
24
|
+
<InputDecimal title="Valor Inicial" v-model="item.valueStart" />
|
|
25
|
+
</b-col>
|
|
26
|
+
<b-col sm="6">
|
|
27
|
+
<InputDecimal title="Valor Final" v-model="item.valueEnd" />
|
|
28
|
+
</b-col>
|
|
29
|
+
</b-row>
|
|
30
|
+
</div>
|
|
31
|
+
<div v-if="item.type == 'multiOptions' || item.type == 'listOptions'">
|
|
32
|
+
<div class="div-multi-options">
|
|
33
|
+
<CheckboxServer v-if="!item.options" :title="item.title"
|
|
34
|
+
:propsParams="item.propsParams" :url="item.url" v-model="item.value" />
|
|
35
|
+
|
|
36
|
+
<CheckboxGroup v-else :title="item.title" :options="item.options"
|
|
37
|
+
:initialValue="item.value" v-model="item.value" />
|
|
38
|
+
</div>
|
|
39
|
+
</div>
|
|
40
|
+
|
|
41
|
+
<RadioGroup v-if="item.type == 'radio'" :title="item.title" :options="item.options"
|
|
42
|
+
v-model="item.value" />
|
|
43
|
+
|
|
44
|
+
<InputText v-if="item.type == 'text' || item.type == 'patrimony'" :title="item.title"
|
|
45
|
+
v-model="item.value" />
|
|
46
|
+
|
|
47
|
+
<InputNumber v-if="item.type == 'number'" :title="item.title" v-model="item.value" />
|
|
48
|
+
</b-col>
|
|
49
|
+
<b-col sm="1">
|
|
50
|
+
<div class="icon-remove" @click="removeItem(item.field)">
|
|
51
|
+
<i class="fas fa-times"></i>
|
|
52
|
+
</div>
|
|
53
|
+
</b-col>
|
|
54
|
+
</b-row>
|
|
55
|
+
</div>
|
|
56
|
+
</div>
|
|
57
|
+
</div>
|
|
58
|
+
<div class="text-center">
|
|
59
|
+
<Button _key="btnApply" title="Aplicar" backGroundColor="#017AFF" color="white" size="small"
|
|
60
|
+
:clicked="apply" />
|
|
61
|
+
</div>
|
|
62
|
+
</div>
|
|
63
|
+
</template>
|
|
64
|
+
|
|
65
|
+
<script>
|
|
66
|
+
|
|
67
|
+
import Button from "@nixweb/nixloc-ui/src/component/forms/Button";
|
|
68
|
+
import InputText from "@nixweb/nixloc-ui/src/component/forms/InputText";
|
|
69
|
+
import InputDecimal from "@nixweb/nixloc-ui/src/component/forms/InputDecimal";
|
|
70
|
+
import InputNumber from "@nixweb/nixloc-ui/src/component/forms/InputNumber";
|
|
71
|
+
import SelectStatic from "@nixweb/nixloc-ui/src/component/forms/SelectStatic";
|
|
72
|
+
import CheckboxGroup from "@nixweb/nixloc-ui/src/component/forms/CheckboxGroup";
|
|
73
|
+
import CheckboxServer from "@nixweb/nixloc-ui/src/component/forms/CheckboxServer";
|
|
74
|
+
import ScrollBar from "@nixweb/nixloc-ui/src/component/layout/ScrollBar.vue";
|
|
75
|
+
import DateTime from "@nixweb/nixloc-ui/src/component/forms/DateTime";
|
|
76
|
+
import RadioGroup from "@nixweb/nixloc-ui/src/component/forms/RadioGroup";
|
|
77
|
+
|
|
78
|
+
import { mapMutations, mapState, mapGetters } from "vuex";
|
|
79
|
+
|
|
80
|
+
export default {
|
|
81
|
+
name: "FilterBuilder",
|
|
82
|
+
props: ["filters", "value"],
|
|
83
|
+
components: { SelectStatic, Button, CheckboxGroup, CheckboxServer, InputText, InputNumber, ScrollBar, DateTime, InputDecimal, RadioGroup },
|
|
84
|
+
data() {
|
|
85
|
+
return {
|
|
86
|
+
filterSelected: {},
|
|
87
|
+
filtersAdded: [],
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
mounted() {
|
|
91
|
+
var filterStorage = this.getQueryFilter(this.$route.name);
|
|
92
|
+
if (filterStorage) {
|
|
93
|
+
this.filtersAdded = filterStorage.filtersAdded;
|
|
94
|
+
this.addEvent({ name: "stringFilter", data: this.filterFinal });
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
},
|
|
98
|
+
computed: {
|
|
99
|
+
...mapGetters("generic", ["event", "getQueryFilter"]),
|
|
100
|
+
...mapState("generic", ["filterQuery"]),
|
|
101
|
+
options() {
|
|
102
|
+
let options = [];
|
|
103
|
+
this.filters.forEach(filter => {
|
|
104
|
+
options.push(
|
|
105
|
+
{
|
|
106
|
+
id: filter.type,
|
|
107
|
+
content: filter.title,
|
|
108
|
+
listName: filter.listName,
|
|
109
|
+
field: filter.field,
|
|
110
|
+
options: filter.options,
|
|
111
|
+
title: filter.title,
|
|
112
|
+
type: filter.type,
|
|
113
|
+
url: filter.url,
|
|
114
|
+
value: filter.value,
|
|
115
|
+
required: filter.required,
|
|
116
|
+
propsParams: filter.propsParams
|
|
117
|
+
});
|
|
118
|
+
});
|
|
119
|
+
return options;
|
|
120
|
+
},
|
|
121
|
+
filterFinal() {
|
|
122
|
+
return this.filtersAdded.map(item => ({
|
|
123
|
+
routeName: this.$route.name,
|
|
124
|
+
title: item.title,
|
|
125
|
+
listName: item.listName,
|
|
126
|
+
field: item.field,
|
|
127
|
+
type: item.type,
|
|
128
|
+
originalValue: item.value,
|
|
129
|
+
required: item.required,
|
|
130
|
+
value: item.type == "decimal" ? [item.valueStart, item.valueEnd].join('<>') : Array.isArray(item.value) ? item.value.join('<>') : item.value.toString()
|
|
131
|
+
}));
|
|
132
|
+
},
|
|
133
|
+
},
|
|
134
|
+
methods: {
|
|
135
|
+
...mapMutations("generic", ["addEvent", "hideModal", "removeLoading", "addFilterQuery"]),
|
|
136
|
+
add() {
|
|
137
|
+
if (this.filterSelected.id && !this.contentExists(this.filterSelected.field)) {
|
|
138
|
+
this.filtersAdded.push(this.filterSelected);
|
|
139
|
+
this.filterSelected = { content: "", id: "" };
|
|
140
|
+
}
|
|
141
|
+
this.removeLoading(["btnAddFilter"]);
|
|
142
|
+
},
|
|
143
|
+
contentExists(field) {
|
|
144
|
+
return this.filtersAdded.some(item => item.field === field);
|
|
145
|
+
},
|
|
146
|
+
removeItem(field) {
|
|
147
|
+
this.filtersAdded = this.filtersAdded.filter(item => item.field !== field);
|
|
148
|
+
},
|
|
149
|
+
apply() {
|
|
150
|
+
this.addEvent({ name: "stringFilter", data: this.filterFinal });
|
|
151
|
+
this.hideModal();
|
|
152
|
+
this.removeLoading(["btnApply"]);
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
watch: {
|
|
156
|
+
event: {
|
|
157
|
+
handler(event) {
|
|
158
|
+
|
|
159
|
+
if (event.name == "tagFilterRemove") {
|
|
160
|
+
this.removeItem(event.data.field);
|
|
161
|
+
this.addEvent({ name: "stringFilter" });
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
if (event.name == "filterStorageRemoved") {
|
|
165
|
+
this.filtersAdded = [];
|
|
166
|
+
this.addEvent({ name: "stringFilter", data: this.filterFinal });
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
deep: true,
|
|
170
|
+
},
|
|
171
|
+
filterFinal: {
|
|
172
|
+
handler(filterFinal) {
|
|
173
|
+
this.$emit("input", filterFinal);
|
|
174
|
+
this.addFilterQuery({ routeName: this.$route.name, filtersAdded: this.filtersAdded });
|
|
175
|
+
},
|
|
176
|
+
deep: true,
|
|
177
|
+
},
|
|
178
|
+
filterSelected: {
|
|
179
|
+
handler(filterSelected) {
|
|
180
|
+
this.add();
|
|
181
|
+
},
|
|
182
|
+
deep: true,
|
|
183
|
+
},
|
|
184
|
+
},
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
</script>
|
|
189
|
+
|
|
190
|
+
<style scoped>
|
|
191
|
+
.div-btn {
|
|
192
|
+
margin-top: 38px;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.div-date {
|
|
196
|
+
width: 300px;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.molded {
|
|
200
|
+
border: 1px solid #e8eaed;
|
|
201
|
+
background-color: white;
|
|
202
|
+
border-radius: 8px !important;
|
|
203
|
+
padding-left: 10px;
|
|
204
|
+
padding-right: 10px;
|
|
205
|
+
padding-top: 10px;
|
|
206
|
+
margin-bottom: 10px;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
.icon-remove {
|
|
211
|
+
display: flex;
|
|
212
|
+
align-items: center;
|
|
213
|
+
justify-content: center;
|
|
214
|
+
height: 60px;
|
|
215
|
+
width: 30px;
|
|
216
|
+
cursor: pointer;
|
|
217
|
+
color: #F0134D;
|
|
218
|
+
cursor: pointer;
|
|
219
|
+
font-size: 17px;
|
|
220
|
+
}
|
|
221
221
|
</style>
|
|
@@ -1,95 +1,95 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="div-main-filter">
|
|
3
|
-
<div>
|
|
4
|
-
<Button _key="btnFilter" tooltip="Aplicar Filtros" color="black" backGroundColor="#F0F0F0" title="Filtros"
|
|
5
|
-
classIcon="fa-sharp fa-solid fa-filters" size="small" :clicked="openFilter" />
|
|
6
|
-
|
|
7
|
-
<div class="side-by-side" v-for="item in tags">
|
|
8
|
-
<div class="div-tag">
|
|
9
|
-
<Tag v-if="item.value" eventName="eventName" :params="item" eventData="tag"
|
|
10
|
-
:clickedBody="openFilter" :clickedRemove="removeTag" :title="item.title" :value="item.value"
|
|
11
|
-
:tagRemoved="false" />
|
|
12
|
-
</div>
|
|
13
|
-
</div>
|
|
14
|
-
</div>
|
|
15
|
-
|
|
16
|
-
<Modal title="Filtros" :width="700" :height="750" v-show="showModal('filter')">
|
|
17
|
-
<slot></slot>
|
|
18
|
-
<FilterBuilder :filters="filters" v-model="filterFinal" />
|
|
19
|
-
</Modal>
|
|
20
|
-
</div>
|
|
21
|
-
</template>
|
|
22
|
-
|
|
23
|
-
<script>
|
|
24
|
-
|
|
25
|
-
import Button from "@nixweb/nixloc-ui/src/component/forms/Button";
|
|
26
|
-
import Modal from "@nixweb/nixloc-ui/src/component/forms/Modal";
|
|
27
|
-
import FilterBuilder from "./FilterBuilder.vue";
|
|
28
|
-
import Tag from "@nixweb/nixloc-ui/src/component/layout/Tag";
|
|
29
|
-
|
|
30
|
-
import { mapGetters, mapMutations } from "vuex";
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
export default {
|
|
34
|
-
name: "FilterQuery",
|
|
35
|
-
props: ["filters", "showDateYearMonth", "value"],
|
|
36
|
-
components: {
|
|
37
|
-
Button, Modal, FilterBuilder, Tag
|
|
38
|
-
},
|
|
39
|
-
data() {
|
|
40
|
-
return {
|
|
41
|
-
filterFinal: [],
|
|
42
|
-
tags: [],
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
computed: {
|
|
46
|
-
...mapGetters("generic", ["showModal", "event"]),
|
|
47
|
-
},
|
|
48
|
-
methods: {
|
|
49
|
-
...mapMutations("generic", ["openModal", "addEvent", "removeLoading", "updateQueryTags", "updateFilterFinal"]),
|
|
50
|
-
openFilter() {
|
|
51
|
-
this.openModal("filter");
|
|
52
|
-
this.removeLoading(["btnFilter"]);
|
|
53
|
-
},
|
|
54
|
-
removeTag(params) {
|
|
55
|
-
this.tags = this.tags.filter(item => item.field !== params.field);
|
|
56
|
-
this.addEvent({ name: "tagFilterRemove", data: params });
|
|
57
|
-
}
|
|
58
|
-
},
|
|
59
|
-
watch: {
|
|
60
|
-
event: {
|
|
61
|
-
handler(event) {
|
|
62
|
-
if (event.name == "stringFilter") {
|
|
63
|
-
var data = JSON.stringify(event.data);
|
|
64
|
-
this.tags = JSON.parse(data);
|
|
65
|
-
}
|
|
66
|
-
},
|
|
67
|
-
deep: true,
|
|
68
|
-
},
|
|
69
|
-
filterFinal: {
|
|
70
|
-
handler(filterFinal) {
|
|
71
|
-
this.$emit("input", filterFinal);
|
|
72
|
-
this.updateFilterFinal(filterFinal);
|
|
73
|
-
},
|
|
74
|
-
deep: true,
|
|
75
|
-
},
|
|
76
|
-
tags: {
|
|
77
|
-
handler(tags) {
|
|
78
|
-
this.updateQueryTags(tags);
|
|
79
|
-
},
|
|
80
|
-
deep: true,
|
|
81
|
-
},
|
|
82
|
-
},
|
|
83
|
-
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
</script>.
|
|
87
|
-
<style>
|
|
88
|
-
.div-main-filter {
|
|
89
|
-
margin-bottom: 20px;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
.div-tag {
|
|
93
|
-
margin-left: 2px;
|
|
94
|
-
}
|
|
95
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div class="div-main-filter">
|
|
3
|
+
<div>
|
|
4
|
+
<Button _key="btnFilter" tooltip="Aplicar Filtros" color="black" backGroundColor="#F0F0F0" title="Filtros"
|
|
5
|
+
classIcon="fa-sharp fa-solid fa-filters" size="small" :clicked="openFilter" />
|
|
6
|
+
|
|
7
|
+
<div class="side-by-side" v-for="item in tags">
|
|
8
|
+
<div class="div-tag">
|
|
9
|
+
<Tag v-if="item.value" eventName="eventName" :params="item" eventData="tag"
|
|
10
|
+
:clickedBody="openFilter" :clickedRemove="removeTag" :title="item.title" :value="item.value"
|
|
11
|
+
:tagRemoved="false" />
|
|
12
|
+
</div>
|
|
13
|
+
</div>
|
|
14
|
+
</div>
|
|
15
|
+
|
|
16
|
+
<Modal title="Filtros" :width="700" :height="750" v-show="showModal('filter')">
|
|
17
|
+
<slot></slot>
|
|
18
|
+
<FilterBuilder :filters="filters" v-model="filterFinal" />
|
|
19
|
+
</Modal>
|
|
20
|
+
</div>
|
|
21
|
+
</template>
|
|
22
|
+
|
|
23
|
+
<script>
|
|
24
|
+
|
|
25
|
+
import Button from "@nixweb/nixloc-ui/src/component/forms/Button";
|
|
26
|
+
import Modal from "@nixweb/nixloc-ui/src/component/forms/Modal";
|
|
27
|
+
import FilterBuilder from "./FilterBuilder.vue";
|
|
28
|
+
import Tag from "@nixweb/nixloc-ui/src/component/layout/Tag";
|
|
29
|
+
|
|
30
|
+
import { mapGetters, mapMutations } from "vuex";
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
export default {
|
|
34
|
+
name: "FilterQuery",
|
|
35
|
+
props: ["filters", "showDateYearMonth", "value"],
|
|
36
|
+
components: {
|
|
37
|
+
Button, Modal, FilterBuilder, Tag
|
|
38
|
+
},
|
|
39
|
+
data() {
|
|
40
|
+
return {
|
|
41
|
+
filterFinal: [],
|
|
42
|
+
tags: [],
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
computed: {
|
|
46
|
+
...mapGetters("generic", ["showModal", "event"]),
|
|
47
|
+
},
|
|
48
|
+
methods: {
|
|
49
|
+
...mapMutations("generic", ["openModal", "addEvent", "removeLoading", "updateQueryTags", "updateFilterFinal"]),
|
|
50
|
+
openFilter() {
|
|
51
|
+
this.openModal("filter");
|
|
52
|
+
this.removeLoading(["btnFilter"]);
|
|
53
|
+
},
|
|
54
|
+
removeTag(params) {
|
|
55
|
+
this.tags = this.tags.filter(item => item.field !== params.field);
|
|
56
|
+
this.addEvent({ name: "tagFilterRemove", data: params });
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
watch: {
|
|
60
|
+
event: {
|
|
61
|
+
handler(event) {
|
|
62
|
+
if (event.name == "stringFilter") {
|
|
63
|
+
var data = JSON.stringify(event.data);
|
|
64
|
+
this.tags = JSON.parse(data);
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
deep: true,
|
|
68
|
+
},
|
|
69
|
+
filterFinal: {
|
|
70
|
+
handler(filterFinal) {
|
|
71
|
+
this.$emit("input", filterFinal);
|
|
72
|
+
this.updateFilterFinal(filterFinal);
|
|
73
|
+
},
|
|
74
|
+
deep: true,
|
|
75
|
+
},
|
|
76
|
+
tags: {
|
|
77
|
+
handler(tags) {
|
|
78
|
+
this.updateQueryTags(tags);
|
|
79
|
+
},
|
|
80
|
+
deep: true,
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
</script>.
|
|
87
|
+
<style>
|
|
88
|
+
.div-main-filter {
|
|
89
|
+
margin-bottom: 20px;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.div-tag {
|
|
93
|
+
margin-left: 2px;
|
|
94
|
+
}
|
|
95
|
+
</style>
|