@nixweb/nixloc-ui 0.0.125 → 0.0.128
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/src/component/template/ViewTemplateReportPreview.drawio +210 -0
- package/package.json +79 -77
- package/src/App.vue +13 -13
- package/src/component/forms/Button.vue +170 -169
- package/src/component/forms/CheckboxGroup.vue +72 -63
- package/src/component/forms/CheckboxSimple.vue +46 -27
- package/src/component/forms/Color.vue +38 -38
- package/src/component/forms/DateTime.vue +167 -177
- package/src/component/forms/Dropdown.vue +218 -224
- package/src/component/forms/EditorHtml.vue +126 -123
- package/src/component/forms/FileUpload.vue +185 -189
- package/src/component/forms/ImageUpload.vue +230 -0
- package/src/component/forms/IncrementDecrement.vue +101 -0
- package/src/component/forms/InputDecimal.vue +142 -137
- package/src/component/forms/InputNumber.vue +154 -149
- package/src/component/forms/InputPassword.vue +135 -135
- package/src/component/forms/InputText.vue +162 -157
- package/src/component/forms/Modal.vue +65 -60
- package/src/component/forms/RadioGroup.vue +50 -50
- package/src/component/forms/Select.vue +349 -337
- package/src/component/forms/SelectStatic.vue +127 -120
- package/src/component/forms/Slider.vue +18 -18
- package/src/component/forms/TextArea.vue +126 -126
- package/src/component/layout/Alert.vue +92 -92
- package/src/component/layout/Badge.vue +103 -103
- package/src/component/layout/FixedBar.vue +100 -68
- package/src/component/layout/Header.vue +38 -35
- package/src/component/layout/LoadingFullPage.vue +27 -27
- package/src/component/layout/Menu.vue +210 -214
- package/src/component/layout/Molded.vue +28 -27
- package/src/component/layout/Panel.vue +140 -142
- package/src/component/layout/Popover.vue +126 -126
- package/src/component/layout/ScrollBar.vue +42 -43
- package/src/component/layout/Tab.vue +135 -0
- package/src/component/layout/Tag.vue +3 -3
- package/src/component/layout/Wizard.vue +211 -213
- package/src/component/rental/DisplayPeriodRent.vue +81 -0
- package/src/component/rental/DisplayTotalization.vue +47 -0
- package/src/component/shared/Collapse.vue +131 -131
- package/src/component/shared/Confirmation.vue +2 -2
- package/src/component/shared/DocumentEditor.vue +1 -1
- package/src/component/shared/DocumentPreview.vue +1 -1
- package/src/component/shared/DocumentPublic.vue +34 -0
- package/src/component/shared/ExportExcel.vue +1 -8
- package/src/component/shared/ExportPDF.vue +116 -116
- package/src/component/shared/{HeaderPrint.vue → HeaderReport.vue} +4 -4
- package/src/component/shared/HorizontalFilter.vue +59 -59
- package/src/component/shared/Loading.vue +107 -107
- package/src/component/shared/LoadingMoreButton.vue +23 -23
- package/src/component/shared/Messages.vue +81 -83
- package/src/component/shared/PDFViewer.vue +22 -22
- package/src/component/shared/Pagination.vue +52 -53
- package/src/component/shared/{LegendaParametro.vue → ParameterLegend.vue} +22 -26
- package/src/component/shared/ProgressBar.vue +22 -21
- package/src/component/shared/QueryButton.vue +66 -66
- package/src/component/shared/Report.vue +187 -0
- package/src/component/shared/SaveCancel.vue +26 -5
- package/src/component/shared/Search.vue +154 -154
- package/src/component/shared/SelectOption.vue +146 -0
- package/src/component/shared/Table.vue +163 -243
- package/src/component/shared/TableButton.vue +36 -36
- package/src/component/shared/TableDraggable.vue +127 -0
- package/src/component/shared/TableItem.vue +177 -0
- package/src/component/shared/TableTotalRecords.vue +9 -10
- package/src/component/shared/TableTotalization.vue +47 -47
- package/src/component/shared/Tip.vue +42 -42
- package/src/component/shared/Toast.vue +54 -54
- package/src/component/shared/TotalizationReport.vue +59 -0
- package/src/component/shared/VerticalFilter.vue +97 -145
- package/src/component/shared/query-builder/AddRule.vue +181 -187
- package/src/component/shared/query-builder/ConvertToOdata.js +34 -43
- package/src/component/shared/query-builder/DynamicComponent.vue +21 -16
- package/src/component/shared/query-builder/DynamicComponentList.vue +73 -0
- package/src/component/shared/query-builder/Fields.vue +29 -63
- package/src/component/shared/query-builder/QueryBuilder.vue +69 -69
- package/src/component/shared/query-builder/Rules.vue +2 -14
- package/src/component/shared/query-builder/SelectRule.vue +15 -15
- package/src/component/shared/query-builder/Tags.vue +24 -8
- package/src/component/shared/query-builder/utilities.js +21 -21
- package/src/component/template/{ListViewWithHandlerData.vue → ListViewWithDataHandler.vue} +260 -231
- package/src/component/template/{AddEditReport.vue → ReportCreateUpdate.vue} +40 -22
- package/src/component/template/ViewTemplateConfiguration.vue +64 -69
- package/src/component/template/ViewTemplateDocumentView.vue +22 -25
- package/src/component/template/ViewTemplateReportList.vue +39 -57
- package/src/component/template/ViewTemplateReportPreview.vue +270 -341
- package/src/component/template/ViewTemplateReportPreviewCOPIASEGURANCA.vue +497 -0
- package/src/component/template/ViewTemplateSelectOption.vue +60 -0
- package/src/component/template/ViewTemplateWithSalveCancel.vue +32 -32
- package/src/component/template/ViewTemplateWithTable.vue +56 -49
- package/src/component/template/model/Report.js +2 -2
- package/src/component/value-objects/Address.js +11 -0
- package/src/component/value-objects/{Endereco.vue → Address.vue} +39 -40
- package/src/component/value-objects/{DadosContato.js → Contact.js} +2 -2
- package/src/component/value-objects/{DadosContato.vue → Contact.vue} +24 -17
- package/src/component/value-objects/Person.js +10 -0
- package/src/component/value-objects/{DadosPessoa.vue → Person.vue} +50 -35
- package/src/config/axios.js +9 -9
- package/src/config/dicas.js +14 -14
- package/src/config/router.js +13 -13
- package/src/config/token.js +14 -14
- package/src/main.js +23 -23
- package/src/store/modules/generic.js +512 -488
- package/src/store/modules/report.js +156 -127
- package/src/store/modules/user.js +6 -0
- package/src/store/modules/validation.js +38 -38
- package/src/store/store.js +13 -13
- package/docs/src/component/template/ModeloRelatorioView.drawio +0 -160
- package/src/component/shared/query-builder/ListDynamicComponent.vue +0 -42
- package/src/component/shared/query-builder/Totalization.vue +0 -38
- package/src/component/value-objects/DadosPessoa.js +0 -10
- package/src/component/value-objects/Endereco.js +0 -11
|
@@ -1,69 +1,64 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<
|
|
4
|
-
|
|
5
|
-
<
|
|
6
|
-
<div v-if="showSearch">
|
|
7
|
-
<Search />
|
|
8
|
-
<br />
|
|
9
|
-
</div>
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
:
|
|
13
|
-
:
|
|
14
|
-
:
|
|
15
|
-
:
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
import
|
|
35
|
-
|
|
36
|
-
import
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
methods: {
|
|
66
|
-
...mapMutations("generic", ["addLoading"]),
|
|
67
|
-
},
|
|
68
|
-
};
|
|
69
|
-
</script>
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<div>
|
|
4
|
+
<slot name="content-buttons"></slot>
|
|
5
|
+
<br v-if="templateList.dragAndDrop" />
|
|
6
|
+
<div v-if="showSearch">
|
|
7
|
+
<Search />
|
|
8
|
+
<br />
|
|
9
|
+
</div>
|
|
10
|
+
<ListViewWithDataHandler
|
|
11
|
+
:templateList="templateList"
|
|
12
|
+
:propsParam="propsParam"
|
|
13
|
+
:showMolded="false"
|
|
14
|
+
:showHorizontalFilter="showHorizontalFilter"
|
|
15
|
+
:buttonRemove="buttonRemove"
|
|
16
|
+
>
|
|
17
|
+
<div slot="content-buttons-table-header">
|
|
18
|
+
<slot name="content-buttons-table-header"></slot>
|
|
19
|
+
</div>
|
|
20
|
+
<div slot="content-filter-horizontal">
|
|
21
|
+
<slot name="content-filter-horizontal"></slot>
|
|
22
|
+
</div>
|
|
23
|
+
<div slot="content-buttons-table">
|
|
24
|
+
<slot name="content-buttons-table"></slot>
|
|
25
|
+
</div>
|
|
26
|
+
</ListViewWithDataHandler>
|
|
27
|
+
</div>
|
|
28
|
+
</div>
|
|
29
|
+
</template>
|
|
30
|
+
|
|
31
|
+
<script>
|
|
32
|
+
import Search from "../shared/Search.vue";
|
|
33
|
+
|
|
34
|
+
import ListViewWithDataHandler from "@nixweb/nixloc-ui/src/component/template/ListViewWithDataHandler.vue";
|
|
35
|
+
|
|
36
|
+
import { mapGetters, mapMutations } from "vuex";
|
|
37
|
+
|
|
38
|
+
export default {
|
|
39
|
+
name: "ViewTemplateConfiguration",
|
|
40
|
+
components: { Search, ListViewWithDataHandler },
|
|
41
|
+
props: {
|
|
42
|
+
templateList: Object,
|
|
43
|
+
propsParam: Object,
|
|
44
|
+
showSearch: {
|
|
45
|
+
type: Boolean,
|
|
46
|
+
default: true,
|
|
47
|
+
},
|
|
48
|
+
showHorizontalFilter: {
|
|
49
|
+
type: Boolean,
|
|
50
|
+
default: true,
|
|
51
|
+
},
|
|
52
|
+
buttonRemove: {
|
|
53
|
+
type: Boolean,
|
|
54
|
+
default: true,
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
created() {
|
|
58
|
+
this.addLoading("loadingLine");
|
|
59
|
+
},
|
|
60
|
+
methods: {
|
|
61
|
+
...mapMutations("generic", ["addLoading"]),
|
|
62
|
+
},
|
|
63
|
+
};
|
|
64
|
+
</script>
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
<b-col sm="6">
|
|
16
16
|
<div class="side-by-side">
|
|
17
17
|
<Button
|
|
18
|
-
|
|
18
|
+
_key="saveDocument"
|
|
19
19
|
type="success"
|
|
20
20
|
title="Salvar"
|
|
21
21
|
classIcon="fas fa-save"
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
<div class="side-by-side">
|
|
28
28
|
<Button
|
|
29
29
|
v-if="id"
|
|
30
|
-
|
|
30
|
+
_key="saveAs"
|
|
31
31
|
type="success"
|
|
32
32
|
title="Fazer uma cópia"
|
|
33
33
|
classIcon="fas fa-clone"
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
<slot></slot>
|
|
74
74
|
</Modal>
|
|
75
75
|
<Modal title="Parâmetros" :width="1100" v-if="showModal('legenda')">
|
|
76
|
-
<
|
|
76
|
+
<ParameterLegend v-if="modal.open" :legend="parameterLegend" />
|
|
77
77
|
</Modal>
|
|
78
78
|
<Modal title="Editor de Código" :width="900" v-if="showModal('code')">
|
|
79
79
|
<CodeEditor v-if="modal.open" />
|
|
@@ -83,6 +83,7 @@
|
|
|
83
83
|
<b-row>
|
|
84
84
|
<b-col class="text-center">
|
|
85
85
|
<Button
|
|
86
|
+
v-if="false"
|
|
86
87
|
v-print="'#printMe'"
|
|
87
88
|
key="print"
|
|
88
89
|
type="edit"
|
|
@@ -98,7 +99,10 @@
|
|
|
98
99
|
<div>
|
|
99
100
|
<div class="a4">
|
|
100
101
|
<div id="printMe">
|
|
101
|
-
<DocumentPreview
|
|
102
|
+
<DocumentPreview
|
|
103
|
+
:template="documentPreview"
|
|
104
|
+
:d="parameterExemple"
|
|
105
|
+
/>
|
|
102
106
|
</div>
|
|
103
107
|
</div>
|
|
104
108
|
</div>
|
|
@@ -115,12 +119,11 @@
|
|
|
115
119
|
</template>
|
|
116
120
|
|
|
117
121
|
<script>
|
|
118
|
-
|
|
119
122
|
import Panel from "@nixweb/nixloc-ui/src/component/layout/Panel";
|
|
120
123
|
import DocumentEditor from "@nixweb/nixloc-ui/src/component/shared/DocumentEditor.vue";
|
|
121
124
|
import DocumentPreview from "@nixweb/nixloc-ui/src/component/shared/DocumentPreview.vue";
|
|
122
125
|
import CodeEditor from "@nixweb/nixloc-ui/src/component/shared/CodeEditor.vue";
|
|
123
|
-
import
|
|
126
|
+
import ParameterLegend from "@nixweb/nixloc-ui/src/component/shared/ParameterLegend.vue";
|
|
124
127
|
import Molded from "@nixweb/nixloc-ui/src/component/layout/Molded";
|
|
125
128
|
import Button from "@nixweb/nixloc-ui/src/component/forms/Button";
|
|
126
129
|
import Modal from "@nixweb/nixloc-ui/src/component/forms/Modal";
|
|
@@ -140,7 +143,7 @@ export default {
|
|
|
140
143
|
DocumentEditor,
|
|
141
144
|
DocumentPreview,
|
|
142
145
|
CodeEditor,
|
|
143
|
-
|
|
146
|
+
ParameterLegend,
|
|
144
147
|
Molded,
|
|
145
148
|
Button,
|
|
146
149
|
Modal,
|
|
@@ -148,8 +151,8 @@ export default {
|
|
|
148
151
|
},
|
|
149
152
|
props: {
|
|
150
153
|
panel: Object,
|
|
151
|
-
|
|
152
|
-
|
|
154
|
+
parameterExemple: Object,
|
|
155
|
+
parameterLegend: Array,
|
|
153
156
|
},
|
|
154
157
|
data() {
|
|
155
158
|
return {
|
|
@@ -159,36 +162,31 @@ export default {
|
|
|
159
162
|
},
|
|
160
163
|
computed: {
|
|
161
164
|
...mapState("generic", ["modal", "documentHtml"]),
|
|
162
|
-
...mapGetters("generic", ["showModal", "event", "
|
|
165
|
+
...mapGetters("generic", ["showModal", "event", "documentPreview"]),
|
|
163
166
|
},
|
|
164
167
|
methods: {
|
|
165
|
-
...mapMutations("generic", [
|
|
166
|
-
"showModal",
|
|
167
|
-
"hideModal",
|
|
168
|
-
"removeLoading",
|
|
169
|
-
"addEvent",
|
|
170
|
-
]),
|
|
168
|
+
...mapMutations("generic", ["openModal", "hideModal", "removeLoading", "addEvent"]),
|
|
171
169
|
saveDocument() {
|
|
172
170
|
if (this.id) {
|
|
173
|
-
this.addEvent({
|
|
171
|
+
this.addEvent({ name: "saveDocument" });
|
|
174
172
|
} else {
|
|
175
|
-
this.
|
|
173
|
+
this.openModal("saveDocument");
|
|
176
174
|
this.removeLoading(["saveDocument"]);
|
|
177
175
|
}
|
|
178
176
|
},
|
|
179
177
|
saveAs() {
|
|
180
|
-
this.addEvent({
|
|
178
|
+
this.addEvent({ name: "saveAs" });
|
|
181
179
|
},
|
|
182
180
|
showModalLegend() {
|
|
183
|
-
this.
|
|
181
|
+
this.openModal("legenda");
|
|
184
182
|
this.removeLoading(["showModalLegend"]);
|
|
185
183
|
},
|
|
186
184
|
showModalCode() {
|
|
187
|
-
this.
|
|
185
|
+
this.openModal("code");
|
|
188
186
|
this.removeLoading(["showModalCode"]);
|
|
189
187
|
},
|
|
190
188
|
showModalPreview() {
|
|
191
|
-
this.
|
|
189
|
+
this.openModal("preview");
|
|
192
190
|
this.removeLoading(["showModalPreview"]);
|
|
193
191
|
},
|
|
194
192
|
print() {
|
|
@@ -198,8 +196,8 @@ export default {
|
|
|
198
196
|
watch: {
|
|
199
197
|
event: {
|
|
200
198
|
handler(event) {
|
|
201
|
-
if (event.
|
|
202
|
-
if (event.
|
|
199
|
+
if (event.name == "documentEditorModified") this.isDisabled = true;
|
|
200
|
+
if (event.name == "documentEditorChanged") this.isDisabled = false;
|
|
203
201
|
},
|
|
204
202
|
deep: true,
|
|
205
203
|
},
|
|
@@ -223,5 +221,4 @@ export default {
|
|
|
223
221
|
box-shadow: 0 0 5px hsl(0deg 0% 0% / 10%);
|
|
224
222
|
margin: 0 auto;
|
|
225
223
|
}
|
|
226
|
-
|
|
227
224
|
</style>
|
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
>
|
|
10
10
|
<div slot="content-main">
|
|
11
11
|
<b-row>
|
|
12
|
-
<b-col xs="12" sm="12" md="12" lg="6" xl="6" v-if="
|
|
13
|
-
<div><i class="fas fa-file-alt icon-
|
|
12
|
+
<b-col xs="12" sm="12" md="12" lg="6" xl="6" v-if="allReports.saved.length > 0">
|
|
13
|
+
<div><i class="fas fa-file-alt icon-saved"></i> Personalizado</div>
|
|
14
14
|
<hr class="hr" />
|
|
15
|
-
<div class="div-molded" v-for="report in
|
|
15
|
+
<div class="div-molded" v-for="report in allReports.saved">
|
|
16
16
|
<div>
|
|
17
17
|
<Molded :borderRadius="12">
|
|
18
18
|
<b-row>
|
|
@@ -20,14 +20,14 @@
|
|
|
20
20
|
<i class="fas fa-file-alt icon-report"></i>
|
|
21
21
|
</b-col>
|
|
22
22
|
<b-col sm="10" @click="navegateTo(report)">
|
|
23
|
-
<div>{{ report.
|
|
23
|
+
<div>{{ report.name }}</div>
|
|
24
24
|
</b-col>
|
|
25
25
|
<b-col sm="1">
|
|
26
26
|
<Confirmation
|
|
27
|
-
title="Deseja
|
|
27
|
+
title="Deseja delete?"
|
|
28
28
|
type="danger"
|
|
29
29
|
:data="report"
|
|
30
|
-
:confirmed="
|
|
30
|
+
:confirmed="confirmDelete"
|
|
31
31
|
>
|
|
32
32
|
<div class="text-right">
|
|
33
33
|
<i class="fas fa-times-circle icon-remove"></i>
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
<b-col xs="12" sm="12" md="12" lg="6" xl="6">
|
|
43
43
|
<div><i class="fas fa-file-chart-line"></i> Padrão</div>
|
|
44
44
|
<hr class="hr" />
|
|
45
|
-
<div class="div-molded" v-for="report in
|
|
45
|
+
<div class="div-molded" v-for="report in allReports.default">
|
|
46
46
|
<div>
|
|
47
47
|
<Molded :borderRadius="12">
|
|
48
48
|
<b-row>
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
<i class="fas fa-file-alt icon-report"></i>
|
|
51
51
|
</b-col>
|
|
52
52
|
<b-col sm="11" @click="navegateTo(report)">
|
|
53
|
-
<div class="side-by-side">{{ report.
|
|
53
|
+
<div class="side-by-side">{{ report.name }}</div>
|
|
54
54
|
</b-col>
|
|
55
55
|
</b-row>
|
|
56
56
|
</Molded>
|
|
@@ -68,20 +68,20 @@ import Panel from "@nixweb/nixloc-ui/src/component/layout/Panel.vue";
|
|
|
68
68
|
import Molded from "@nixweb/nixloc-ui/src/component/layout/Molded";
|
|
69
69
|
import Confirmation from "@nixweb/nixloc-ui/src/component/shared/Confirmation";
|
|
70
70
|
|
|
71
|
-
import { mapState, mapActions, mapMutations } from "vuex";
|
|
71
|
+
import { _default, mapState, mapActions, mapMutations } from "vuex";
|
|
72
72
|
|
|
73
73
|
export default {
|
|
74
74
|
name: "TemplateReportListView",
|
|
75
75
|
components: { Panel, Molded, Confirmation },
|
|
76
76
|
props: {
|
|
77
77
|
panel: Object,
|
|
78
|
-
|
|
78
|
+
reports: Object,
|
|
79
79
|
},
|
|
80
80
|
data() {
|
|
81
81
|
return {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
82
|
+
allReports: { saved: [] },
|
|
83
|
+
urlGetAll: "/api/v1/shared/report/get-all",
|
|
84
|
+
urlDelete: "/api/v1/shared/report/delete",
|
|
85
85
|
};
|
|
86
86
|
},
|
|
87
87
|
computed: {
|
|
@@ -89,59 +89,41 @@ export default {
|
|
|
89
89
|
},
|
|
90
90
|
mounted() {
|
|
91
91
|
this.getAll();
|
|
92
|
-
this.
|
|
92
|
+
this.allReports = JSON.parse(JSON.stringify(this.reports)); // remove observable
|
|
93
93
|
},
|
|
94
94
|
methods: {
|
|
95
95
|
...mapMutations("generic", ["removeLoading"]),
|
|
96
|
-
...mapMutations("report", [
|
|
97
|
-
"atualizaFiltroSelecionado",
|
|
98
|
-
"atualizaCampoOrdenado",
|
|
99
|
-
"updateOptionsInitValue",
|
|
100
|
-
"atualizaConsultaFiltro",
|
|
101
|
-
]),
|
|
102
96
|
...mapActions("generic", ["getApi", "deleteAllApi"]),
|
|
103
97
|
getAll() {
|
|
104
98
|
let obj = { module: this.panel.module };
|
|
105
|
-
let params = { url: this.
|
|
99
|
+
let params = { url: this.urlGetAll, obj: obj };
|
|
106
100
|
this.getApi(params).then((response) => {
|
|
107
|
-
this.
|
|
101
|
+
this.allReports.saved = [];
|
|
108
102
|
let self = this;
|
|
109
103
|
response.content.data.forEach((item) => {
|
|
110
104
|
const query = JSON.parse(item.query);
|
|
111
105
|
let obj = {
|
|
112
106
|
id: item.id,
|
|
113
|
-
|
|
107
|
+
name: item.name,
|
|
114
108
|
routeName: query.routeName,
|
|
115
|
-
filter: query.filter,
|
|
116
|
-
field: query.field,
|
|
117
|
-
ordenacao: query.ordenacao,
|
|
118
109
|
};
|
|
119
|
-
self.
|
|
110
|
+
self.allReports.saved.push(obj);
|
|
120
111
|
});
|
|
121
112
|
this.removeLoading(["panel"]);
|
|
122
113
|
});
|
|
123
114
|
},
|
|
124
115
|
navegateTo(report) {
|
|
125
|
-
if (report.filter) {
|
|
126
|
-
let filtroSelecionado = { logicalOperator: "all", children: report.filter };
|
|
127
|
-
this.updateOptionsInitValue(report.field);
|
|
128
|
-
this.atualizaCampoOrdenado(report.ordenacao);
|
|
129
|
-
this.atualizaFiltroSelecionado(filtroSelecionado);
|
|
130
|
-
this.atualizaConsultaFiltro(filtroSelecionado);
|
|
131
|
-
} else {
|
|
132
|
-
this.updateOptionsInitValue([]);
|
|
133
|
-
}
|
|
134
116
|
this.$router.push({
|
|
135
117
|
name: report.routeName,
|
|
136
|
-
params: { id: report.id,
|
|
118
|
+
params: { id: report.id, name: report.name },
|
|
137
119
|
});
|
|
138
120
|
},
|
|
139
|
-
|
|
121
|
+
confirmDelete(data) {
|
|
140
122
|
let selected = [];
|
|
141
123
|
selected.push(data.id);
|
|
142
124
|
|
|
143
125
|
let params = {
|
|
144
|
-
url: this.
|
|
126
|
+
url: this.urlDelete,
|
|
145
127
|
selected: selected,
|
|
146
128
|
};
|
|
147
129
|
|
|
@@ -152,42 +134,42 @@ export default {
|
|
|
152
134
|
},
|
|
153
135
|
watch: {
|
|
154
136
|
executedSearch: function () {
|
|
155
|
-
let
|
|
156
|
-
let
|
|
137
|
+
let _default = [];
|
|
138
|
+
let saved = [];
|
|
157
139
|
let self = this;
|
|
158
140
|
setTimeout(function () {
|
|
159
|
-
self.
|
|
160
|
-
if (self.search.filter.
|
|
161
|
-
if (item.
|
|
141
|
+
self.allReports.default.forEach(function (item) {
|
|
142
|
+
if (self.search.filter.id == "equal") {
|
|
143
|
+
if (item.name == self.search.content) _default.push(item);
|
|
162
144
|
}
|
|
163
145
|
|
|
164
|
-
if (self.search.filter.
|
|
165
|
-
if (item.
|
|
146
|
+
if (self.search.filter.id == "contains") {
|
|
147
|
+
if (item.name.includes(self.search.content)) _default.push(item);
|
|
166
148
|
}
|
|
167
149
|
});
|
|
168
150
|
|
|
169
|
-
self.
|
|
170
|
-
if (self.search.filter.content == "
|
|
171
|
-
if (item.
|
|
151
|
+
self.allReports.saved.forEach(function (item) {
|
|
152
|
+
if (self.search.filter.content == "equal") {
|
|
153
|
+
if (item.name == self.search.content) saved.push(item);
|
|
172
154
|
}
|
|
173
155
|
|
|
174
|
-
if (self.search.filter.content == "
|
|
175
|
-
if (item.
|
|
156
|
+
if (self.search.filter.content == "contains") {
|
|
157
|
+
if (item.name.includes(self.search.content)) saved.push(item);
|
|
176
158
|
}
|
|
177
159
|
});
|
|
178
160
|
|
|
179
|
-
self.
|
|
180
|
-
self.
|
|
161
|
+
self.allReports.saved = saved;
|
|
162
|
+
self.allReports.default = _default;
|
|
181
163
|
|
|
182
|
-
self.removeLoading(["
|
|
164
|
+
self.removeLoading(["btnSearch", "btnClean"]);
|
|
183
165
|
}, 300);
|
|
184
166
|
},
|
|
185
167
|
clearedSearch: function () {
|
|
186
168
|
let self = this;
|
|
187
169
|
setTimeout(function () {
|
|
188
|
-
self.
|
|
170
|
+
self.allReports = self.reports;
|
|
189
171
|
self.getAll();
|
|
190
|
-
self.removeLoading(["
|
|
172
|
+
self.removeLoading(["btnSearch", "btnClean"]);
|
|
191
173
|
}, 300);
|
|
192
174
|
},
|
|
193
175
|
},
|
|
@@ -195,7 +177,7 @@ export default {
|
|
|
195
177
|
</script>
|
|
196
178
|
|
|
197
179
|
<style scoped>
|
|
198
|
-
.icon-
|
|
180
|
+
.icon-saved {
|
|
199
181
|
color: #94aa2a;
|
|
200
182
|
}
|
|
201
183
|
|