@nixweb/nixloc-ui 0.0.124 → 0.0.127
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 +3 -1
- package/src/component/forms/Button.vue +7 -6
- package/src/component/forms/CheckboxGroup.vue +7 -4
- package/src/component/forms/CheckboxSimple.vue +17 -2
- package/src/component/forms/DateTime.vue +15 -29
- package/src/component/forms/EditorHtml.vue +8 -5
- package/src/component/forms/FileUpload.vue +7 -11
- package/src/component/forms/ImageUpload.vue +222 -0
- package/src/component/forms/InputDecimal.vue +10 -9
- package/src/component/forms/InputNumber.vue +20 -15
- package/src/component/forms/InputPassword.vue +1 -1
- package/src/component/forms/InputText.vue +3 -3
- package/src/component/forms/Modal.vue +9 -4
- package/src/component/forms/Select.vue +12 -9
- package/src/component/forms/SelectStatic.vue +8 -1
- package/src/component/layout/Menu.vue +4 -3
- package/src/component/layout/Panel.vue +0 -2
- package/src/component/layout/{Scrollbar.vue → ScrollBar.vue} +4 -5
- package/src/component/layout/Tag.vue +3 -3
- package/src/component/layout/Wizard.vue +11 -13
- package/src/component/shared/BodyReport.vue +186 -0
- package/src/component/shared/Confirmation.vue +2 -2
- package/src/component/shared/DocumentEditor.vue +1 -1
- package/src/component/shared/ExportExcel.vue +1 -8
- package/src/component/shared/{HeaderPrint.vue → HeaderReport.vue} +3 -3
- package/src/component/shared/HorizontalFilter.vue +1 -1
- package/src/component/shared/Loading.vue +1 -1
- package/src/component/shared/Messages.vue +2 -4
- package/src/component/shared/Pagination.vue +4 -5
- package/src/component/shared/{LegendaParametro.vue → ParameterLegend.vue} +25 -29
- package/src/component/shared/ProgressBar.vue +2 -1
- package/src/component/shared/SaveCancel.vue +20 -4
- package/src/component/shared/Search.vue +16 -16
- package/src/component/shared/SelectOption.vue +137 -0
- package/src/component/shared/Table.vue +33 -22
- package/src/component/shared/TableButton.vue +3 -3
- package/src/component/shared/TableTotalRecords.vue +9 -10
- package/src/component/shared/Toast.vue +2 -2
- package/src/component/shared/VerticalFilter.vue +2 -50
- package/src/component/shared/query-builder/AddRule.vue +49 -55
- package/src/component/shared/query-builder/ConvertToOdata.js +39 -42
- package/src/component/shared/query-builder/DynamicComponent.vue +16 -15
- package/src/component/shared/query-builder/DynamicComponentList.vue +62 -0
- package/src/component/shared/query-builder/Fields.vue +32 -66
- package/src/component/shared/query-builder/QueryBuilder.vue +12 -12
- 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/template/{ListViewWithHandlerData.vue → ListViewWithDataHandler.vue} +30 -23
- package/src/component/template/{AddEditReport.vue → ReportCreateUpdate.vue} +31 -20
- package/src/component/template/ViewTemplateConfiguration.vue +6 -12
- package/src/component/template/ViewTemplateDocumentView.vue +21 -25
- package/src/component/template/ViewTemplateReportList.vue +39 -57
- package/src/component/template/ViewTemplateReportPreview.vue +238 -354
- package/src/component/template/ViewTemplateReportPreviewCOPIASEGURANCA.vue +497 -0
- package/src/component/template/ViewTemplateSelectOption.vue +60 -0
- package/src/component/template/ViewTemplateWithTable.vue +21 -14
- 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} +17 -17
- package/src/component/value-objects/Person.js +10 -0
- package/src/component/value-objects/{DadosPessoa.vue → Person.vue} +35 -35
- package/src/store/modules/generic.js +17 -11
- package/src/store/modules/report.js +124 -113
- package/src/store/modules/user.js +3 -0
- package/docs/src/component/template/ModeloRelatorioView.drawio +0 -160
- package/src/component/shared/query-builder/ListDynamicComponent.vue +0 -42
- package/src/component/value-objects/DadosPessoa.js +0 -10
- package/src/component/value-objects/Endereco.js +0 -11
|
@@ -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
|
|