@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,240 +1,240 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<Panel :module="panel.module" :title="panel.title" :showVerticalFilter="panel.showVerticalFilter"
|
|
4
|
-
:showSearch="panel.showSearch" :showButtons="panel.showButtons">
|
|
5
|
-
<div slot="content-main">
|
|
6
|
-
<b-row>
|
|
7
|
-
<b-col xs="12" sm="12" md="12" lg="6" xl="6" v-if="allReports.saved.length > 0">
|
|
8
|
-
<div><i class="fas fa-file-alt icon-report-title icon-saved"></i> <span class="title">Personalizado</span>
|
|
9
|
-
</div>
|
|
10
|
-
<hr class="hr" />
|
|
11
|
-
<div class="div-molded" v-for="report in allReports.saved">
|
|
12
|
-
<div>
|
|
13
|
-
<Molded :borderRadius="12">
|
|
14
|
-
<b-row>
|
|
15
|
-
<b-col sm="1">
|
|
16
|
-
<i class="fas fa-file-alt icon-report"></i>
|
|
17
|
-
</b-col>
|
|
18
|
-
<b-col sm="10" @click="navegateTo(report)">
|
|
19
|
-
<div class="title-report">{{ report.name }}</div>
|
|
20
|
-
</b-col>
|
|
21
|
-
<b-col sm="1">
|
|
22
|
-
<Confirmation title="Deseja excluir?" type="danger" :data="report" :confirmed="confirmDelete">
|
|
23
|
-
<div class="text-right">
|
|
24
|
-
<i class="fas fa-times-circle icon-remove"></i>
|
|
25
|
-
</div>
|
|
26
|
-
</Confirmation>
|
|
27
|
-
</b-col>
|
|
28
|
-
</b-row>
|
|
29
|
-
</Molded>
|
|
30
|
-
</div>
|
|
31
|
-
</div>
|
|
32
|
-
</b-col>
|
|
33
|
-
<b-col xs="12" sm="12" md="12" lg="6" xl="6">
|
|
34
|
-
<div>
|
|
35
|
-
<i class="fas fa-file-chart-line icon-report-title icon-default"></i> <span class="title">Padrão</span>
|
|
36
|
-
</div>
|
|
37
|
-
<hr class="hr" />
|
|
38
|
-
<div class="div-molded" v-for="report in allReports.default">
|
|
39
|
-
<div>
|
|
40
|
-
<Molded :borderRadius="12">
|
|
41
|
-
<b-row>
|
|
42
|
-
<b-col sm="1">
|
|
43
|
-
<i class="fas fa-file-alt icon-report"></i>
|
|
44
|
-
</b-col>
|
|
45
|
-
<b-col sm="11" @click="navegateTo(report)">
|
|
46
|
-
<div v-if="report.showNewUntil && showNewUntil(report.showNewUntil)" class="side-by-side div-new">
|
|
47
|
-
<span>Novo</span>
|
|
48
|
-
</div>
|
|
49
|
-
<div class="title-report side-by-side">{{ report.name }}</div>
|
|
50
|
-
<div><span class="description-report">{{ report.description }}</span></div>
|
|
51
|
-
</b-col>
|
|
52
|
-
</b-row>
|
|
53
|
-
</Molded>
|
|
54
|
-
</div>
|
|
55
|
-
</div>
|
|
56
|
-
</b-col>
|
|
57
|
-
</b-row>
|
|
58
|
-
</div>
|
|
59
|
-
</Panel>
|
|
60
|
-
</div>
|
|
61
|
-
</template>
|
|
62
|
-
|
|
63
|
-
<script>
|
|
64
|
-
import Panel from "@nixweb/nixloc-ui/src/component/layout/Panel.vue";
|
|
65
|
-
import Molded from "@nixweb/nixloc-ui/src/component/layout/Molded";
|
|
66
|
-
import Confirmation from "@nixweb/nixloc-ui/src/component/shared/Confirmation";
|
|
67
|
-
|
|
68
|
-
import { _default, mapState, mapActions, mapMutations } from "vuex";
|
|
69
|
-
|
|
70
|
-
export default {
|
|
71
|
-
name: "TemplateReportListView",
|
|
72
|
-
components: { Panel, Molded, Confirmation },
|
|
73
|
-
props: {
|
|
74
|
-
panel: Object,
|
|
75
|
-
reports: Object,
|
|
76
|
-
},
|
|
77
|
-
data() {
|
|
78
|
-
return {
|
|
79
|
-
allReports: { saved: [] },
|
|
80
|
-
urlGetAll: "/api/v1/shared/report/get-all",
|
|
81
|
-
urlDelete: "/api/v1/shared/report/delete",
|
|
82
|
-
};
|
|
83
|
-
},
|
|
84
|
-
computed: {
|
|
85
|
-
...mapState("generic", ["search", "executedSearch", "clearedSearch"]),
|
|
86
|
-
|
|
87
|
-
},
|
|
88
|
-
mounted() {
|
|
89
|
-
this.getAll();
|
|
90
|
-
//this.removeLoading(["panel"]);
|
|
91
|
-
this.allReports = JSON.parse(JSON.stringify(this.reports)); // remove observable
|
|
92
|
-
},
|
|
93
|
-
methods: {
|
|
94
|
-
...mapMutations("generic", ["removeLoading"]),
|
|
95
|
-
...mapActions("generic", ["getApi", "deleteAllApi"]),
|
|
96
|
-
showNewUntil(dateStr) {
|
|
97
|
-
const [day, month, year] = dateStr.split('/');
|
|
98
|
-
const inputDate = new Date(year, month - 1, day);
|
|
99
|
-
const today = new Date();
|
|
100
|
-
|
|
101
|
-
inputDate.setHours(0, 0, 0, 0);
|
|
102
|
-
today.setHours(0, 0, 0, 0);
|
|
103
|
-
|
|
104
|
-
return today < inputDate;
|
|
105
|
-
},
|
|
106
|
-
getAll() {
|
|
107
|
-
let obj = { module: this.panel.module };
|
|
108
|
-
let params = { url: this.urlGetAll, obj: obj };
|
|
109
|
-
this.getApi(params).then((response) => {
|
|
110
|
-
this.allReports.saved = [];
|
|
111
|
-
let self = this;
|
|
112
|
-
response.content.data.forEach((item) => {
|
|
113
|
-
const query = JSON.parse(item.query);
|
|
114
|
-
let obj = {
|
|
115
|
-
id: item.id,
|
|
116
|
-
name: item.name,
|
|
117
|
-
routeName: query.routeName,
|
|
118
|
-
};
|
|
119
|
-
self.allReports.saved.push(obj);
|
|
120
|
-
});
|
|
121
|
-
this.removeLoading(["panel"]);
|
|
122
|
-
});
|
|
123
|
-
},
|
|
124
|
-
navegateTo(report) {
|
|
125
|
-
this.$router.push({
|
|
126
|
-
name: report.routeName,
|
|
127
|
-
params: { id: report.id, name: report.name },
|
|
128
|
-
});
|
|
129
|
-
},
|
|
130
|
-
confirmDelete(data) {
|
|
131
|
-
let selected = [];
|
|
132
|
-
selected.push(data.id);
|
|
133
|
-
|
|
134
|
-
let params = {
|
|
135
|
-
url: this.urlDelete,
|
|
136
|
-
selected: selected,
|
|
137
|
-
};
|
|
138
|
-
|
|
139
|
-
this.deleteAllApi(params).then((reponse) => {
|
|
140
|
-
if (reponse.success) this.getAll();
|
|
141
|
-
});
|
|
142
|
-
},
|
|
143
|
-
},
|
|
144
|
-
watch: {
|
|
145
|
-
executedSearch: function () {
|
|
146
|
-
let _default = [];
|
|
147
|
-
let saved = [];
|
|
148
|
-
let self = this;
|
|
149
|
-
setTimeout(function () {
|
|
150
|
-
self.allReports.default.forEach(function (item) {
|
|
151
|
-
if (self.search.filter.id == "equal") {
|
|
152
|
-
if (item.name == self.search.content) _default.push(item);
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
if (self.search.filter.id == "contains") {
|
|
156
|
-
if (item.name.includes(self.search.content)) _default.push(item);
|
|
157
|
-
}
|
|
158
|
-
});
|
|
159
|
-
|
|
160
|
-
self.allReports.saved.forEach(function (item) {
|
|
161
|
-
if (self.search.filter.content == "equal") {
|
|
162
|
-
if (item.name == self.search.content) saved.push(item);
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
if (self.search.filter.content == "contains") {
|
|
166
|
-
if (item.name.includes(self.search.content)) saved.push(item);
|
|
167
|
-
}
|
|
168
|
-
});
|
|
169
|
-
|
|
170
|
-
self.allReports.saved = saved;
|
|
171
|
-
self.allReports.default = _default;
|
|
172
|
-
|
|
173
|
-
self.removeLoading(["btnSearch", "btnClean"]);
|
|
174
|
-
}, 300);
|
|
175
|
-
},
|
|
176
|
-
clearedSearch: function () {
|
|
177
|
-
let self = this;
|
|
178
|
-
setTimeout(function () {
|
|
179
|
-
self.allReports = self.reports;
|
|
180
|
-
self.getAll();
|
|
181
|
-
self.removeLoading(["btnSearch", "btnClean"]);
|
|
182
|
-
}, 300);
|
|
183
|
-
},
|
|
184
|
-
},
|
|
185
|
-
};
|
|
186
|
-
</script>
|
|
187
|
-
|
|
188
|
-
<style scoped>
|
|
189
|
-
.icon-saved {
|
|
190
|
-
color: #94aa2a;
|
|
191
|
-
font-size: 20px;
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
.icon-default {
|
|
195
|
-
font-size: 20px;
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
.icon-remove {
|
|
199
|
-
color: red;
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
.icon-report {
|
|
203
|
-
font-size: 25px;
|
|
204
|
-
opacity: 0.2;
|
|
205
|
-
color: #577696;
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
.div-new {
|
|
209
|
-
background-color: #0A36DB;
|
|
210
|
-
font-size: 11px;
|
|
211
|
-
border-radius: 20px;
|
|
212
|
-
padding: 1px 8px 2px 8px;
|
|
213
|
-
margin-right: 10px;
|
|
214
|
-
color: white !important;
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
.div-molded {
|
|
218
|
-
margin-bottom: 10px;
|
|
219
|
-
cursor: pointer;
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
.div-molded:hover {
|
|
223
|
-
background-color: #fafafc;
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
.description {
|
|
227
|
-
font-size: 13.5px;
|
|
228
|
-
color: rgb(117, 117, 117);
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
.hr {
|
|
232
|
-
background: #fafafc !important;
|
|
233
|
-
height: 1px !important;
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
.description-report {
|
|
237
|
-
font-size: 13px;
|
|
238
|
-
color: rgb(110, 110, 110);
|
|
239
|
-
}
|
|
240
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<Panel :module="panel.module" :title="panel.title" :showVerticalFilter="panel.showVerticalFilter"
|
|
4
|
+
:showSearch="panel.showSearch" :showButtons="panel.showButtons">
|
|
5
|
+
<div slot="content-main">
|
|
6
|
+
<b-row>
|
|
7
|
+
<b-col xs="12" sm="12" md="12" lg="6" xl="6" v-if="allReports.saved.length > 0">
|
|
8
|
+
<div><i class="fas fa-file-alt icon-report-title icon-saved"></i> <span class="title">Personalizado</span>
|
|
9
|
+
</div>
|
|
10
|
+
<hr class="hr" />
|
|
11
|
+
<div class="div-molded" v-for="report in allReports.saved">
|
|
12
|
+
<div>
|
|
13
|
+
<Molded :borderRadius="12">
|
|
14
|
+
<b-row>
|
|
15
|
+
<b-col sm="1">
|
|
16
|
+
<i class="fas fa-file-alt icon-report"></i>
|
|
17
|
+
</b-col>
|
|
18
|
+
<b-col sm="10" @click="navegateTo(report)">
|
|
19
|
+
<div class="title-report">{{ report.name }}</div>
|
|
20
|
+
</b-col>
|
|
21
|
+
<b-col sm="1">
|
|
22
|
+
<Confirmation title="Deseja excluir?" type="danger" :data="report" :confirmed="confirmDelete">
|
|
23
|
+
<div class="text-right">
|
|
24
|
+
<i class="fas fa-times-circle icon-remove"></i>
|
|
25
|
+
</div>
|
|
26
|
+
</Confirmation>
|
|
27
|
+
</b-col>
|
|
28
|
+
</b-row>
|
|
29
|
+
</Molded>
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
32
|
+
</b-col>
|
|
33
|
+
<b-col xs="12" sm="12" md="12" lg="6" xl="6">
|
|
34
|
+
<div>
|
|
35
|
+
<i class="fas fa-file-chart-line icon-report-title icon-default"></i> <span class="title">Padrão</span>
|
|
36
|
+
</div>
|
|
37
|
+
<hr class="hr" />
|
|
38
|
+
<div class="div-molded" v-for="report in allReports.default">
|
|
39
|
+
<div>
|
|
40
|
+
<Molded :borderRadius="12">
|
|
41
|
+
<b-row>
|
|
42
|
+
<b-col sm="1">
|
|
43
|
+
<i class="fas fa-file-alt icon-report"></i>
|
|
44
|
+
</b-col>
|
|
45
|
+
<b-col sm="11" @click="navegateTo(report)">
|
|
46
|
+
<div v-if="report.showNewUntil && showNewUntil(report.showNewUntil)" class="side-by-side div-new">
|
|
47
|
+
<span>Novo</span>
|
|
48
|
+
</div>
|
|
49
|
+
<div class="title-report side-by-side">{{ report.name }}</div>
|
|
50
|
+
<div><span class="description-report">{{ report.description }}</span></div>
|
|
51
|
+
</b-col>
|
|
52
|
+
</b-row>
|
|
53
|
+
</Molded>
|
|
54
|
+
</div>
|
|
55
|
+
</div>
|
|
56
|
+
</b-col>
|
|
57
|
+
</b-row>
|
|
58
|
+
</div>
|
|
59
|
+
</Panel>
|
|
60
|
+
</div>
|
|
61
|
+
</template>
|
|
62
|
+
|
|
63
|
+
<script>
|
|
64
|
+
import Panel from "@nixweb/nixloc-ui/src/component/layout/Panel.vue";
|
|
65
|
+
import Molded from "@nixweb/nixloc-ui/src/component/layout/Molded";
|
|
66
|
+
import Confirmation from "@nixweb/nixloc-ui/src/component/shared/Confirmation";
|
|
67
|
+
|
|
68
|
+
import { _default, mapState, mapActions, mapMutations } from "vuex";
|
|
69
|
+
|
|
70
|
+
export default {
|
|
71
|
+
name: "TemplateReportListView",
|
|
72
|
+
components: { Panel, Molded, Confirmation },
|
|
73
|
+
props: {
|
|
74
|
+
panel: Object,
|
|
75
|
+
reports: Object,
|
|
76
|
+
},
|
|
77
|
+
data() {
|
|
78
|
+
return {
|
|
79
|
+
allReports: { saved: [] },
|
|
80
|
+
urlGetAll: "/api/v1/shared/report/get-all",
|
|
81
|
+
urlDelete: "/api/v1/shared/report/delete",
|
|
82
|
+
};
|
|
83
|
+
},
|
|
84
|
+
computed: {
|
|
85
|
+
...mapState("generic", ["search", "executedSearch", "clearedSearch"]),
|
|
86
|
+
|
|
87
|
+
},
|
|
88
|
+
mounted() {
|
|
89
|
+
this.getAll();
|
|
90
|
+
//this.removeLoading(["panel"]);
|
|
91
|
+
this.allReports = JSON.parse(JSON.stringify(this.reports)); // remove observable
|
|
92
|
+
},
|
|
93
|
+
methods: {
|
|
94
|
+
...mapMutations("generic", ["removeLoading"]),
|
|
95
|
+
...mapActions("generic", ["getApi", "deleteAllApi"]),
|
|
96
|
+
showNewUntil(dateStr) {
|
|
97
|
+
const [day, month, year] = dateStr.split('/');
|
|
98
|
+
const inputDate = new Date(year, month - 1, day);
|
|
99
|
+
const today = new Date();
|
|
100
|
+
|
|
101
|
+
inputDate.setHours(0, 0, 0, 0);
|
|
102
|
+
today.setHours(0, 0, 0, 0);
|
|
103
|
+
|
|
104
|
+
return today < inputDate;
|
|
105
|
+
},
|
|
106
|
+
getAll() {
|
|
107
|
+
let obj = { module: this.panel.module };
|
|
108
|
+
let params = { url: this.urlGetAll, obj: obj };
|
|
109
|
+
this.getApi(params).then((response) => {
|
|
110
|
+
this.allReports.saved = [];
|
|
111
|
+
let self = this;
|
|
112
|
+
response.content.data.forEach((item) => {
|
|
113
|
+
const query = JSON.parse(item.query);
|
|
114
|
+
let obj = {
|
|
115
|
+
id: item.id,
|
|
116
|
+
name: item.name,
|
|
117
|
+
routeName: query.routeName,
|
|
118
|
+
};
|
|
119
|
+
self.allReports.saved.push(obj);
|
|
120
|
+
});
|
|
121
|
+
this.removeLoading(["panel"]);
|
|
122
|
+
});
|
|
123
|
+
},
|
|
124
|
+
navegateTo(report) {
|
|
125
|
+
this.$router.push({
|
|
126
|
+
name: report.routeName,
|
|
127
|
+
params: { id: report.id, name: report.name },
|
|
128
|
+
});
|
|
129
|
+
},
|
|
130
|
+
confirmDelete(data) {
|
|
131
|
+
let selected = [];
|
|
132
|
+
selected.push(data.id);
|
|
133
|
+
|
|
134
|
+
let params = {
|
|
135
|
+
url: this.urlDelete,
|
|
136
|
+
selected: selected,
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
this.deleteAllApi(params).then((reponse) => {
|
|
140
|
+
if (reponse.success) this.getAll();
|
|
141
|
+
});
|
|
142
|
+
},
|
|
143
|
+
},
|
|
144
|
+
watch: {
|
|
145
|
+
executedSearch: function () {
|
|
146
|
+
let _default = [];
|
|
147
|
+
let saved = [];
|
|
148
|
+
let self = this;
|
|
149
|
+
setTimeout(function () {
|
|
150
|
+
self.allReports.default.forEach(function (item) {
|
|
151
|
+
if (self.search.filter.id == "equal") {
|
|
152
|
+
if (item.name == self.search.content) _default.push(item);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
if (self.search.filter.id == "contains") {
|
|
156
|
+
if (item.name.includes(self.search.content)) _default.push(item);
|
|
157
|
+
}
|
|
158
|
+
});
|
|
159
|
+
|
|
160
|
+
self.allReports.saved.forEach(function (item) {
|
|
161
|
+
if (self.search.filter.content == "equal") {
|
|
162
|
+
if (item.name == self.search.content) saved.push(item);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
if (self.search.filter.content == "contains") {
|
|
166
|
+
if (item.name.includes(self.search.content)) saved.push(item);
|
|
167
|
+
}
|
|
168
|
+
});
|
|
169
|
+
|
|
170
|
+
self.allReports.saved = saved;
|
|
171
|
+
self.allReports.default = _default;
|
|
172
|
+
|
|
173
|
+
self.removeLoading(["btnSearch", "btnClean"]);
|
|
174
|
+
}, 300);
|
|
175
|
+
},
|
|
176
|
+
clearedSearch: function () {
|
|
177
|
+
let self = this;
|
|
178
|
+
setTimeout(function () {
|
|
179
|
+
self.allReports = self.reports;
|
|
180
|
+
self.getAll();
|
|
181
|
+
self.removeLoading(["btnSearch", "btnClean"]);
|
|
182
|
+
}, 300);
|
|
183
|
+
},
|
|
184
|
+
},
|
|
185
|
+
};
|
|
186
|
+
</script>
|
|
187
|
+
|
|
188
|
+
<style scoped>
|
|
189
|
+
.icon-saved {
|
|
190
|
+
color: #94aa2a;
|
|
191
|
+
font-size: 20px;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.icon-default {
|
|
195
|
+
font-size: 20px;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.icon-remove {
|
|
199
|
+
color: red;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
.icon-report {
|
|
203
|
+
font-size: 25px;
|
|
204
|
+
opacity: 0.2;
|
|
205
|
+
color: #577696;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
.div-new {
|
|
209
|
+
background-color: #0A36DB;
|
|
210
|
+
font-size: 11px;
|
|
211
|
+
border-radius: 20px;
|
|
212
|
+
padding: 1px 8px 2px 8px;
|
|
213
|
+
margin-right: 10px;
|
|
214
|
+
color: white !important;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.div-molded {
|
|
218
|
+
margin-bottom: 10px;
|
|
219
|
+
cursor: pointer;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
.div-molded:hover {
|
|
223
|
+
background-color: #fafafc;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
.description {
|
|
227
|
+
font-size: 13.5px;
|
|
228
|
+
color: rgb(117, 117, 117);
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
.hr {
|
|
232
|
+
background: #fafafc !important;
|
|
233
|
+
height: 1px !important;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
.description-report {
|
|
237
|
+
font-size: 13px;
|
|
238
|
+
color: rgb(110, 110, 110);
|
|
239
|
+
}
|
|
240
|
+
</style>
|