@nixweb/nixloc-ui 0.0.264 → 0.0.265
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/shared/TotalizationReport.vue +43 -10
- package/src/component/shared/query-builder/ConvertToOdata.js +5 -1
- package/src/component/template/ViewTemplateReportPreview.vue +6 -0
- package/src/store/modules/generic.js +1 -0
- package/src/store/modules/report.js +3 -0
package/package.json
CHANGED
|
@@ -2,23 +2,52 @@
|
|
|
2
2
|
<div>
|
|
3
3
|
<hr class="hr-report" />
|
|
4
4
|
<div class="text-right">
|
|
5
|
-
<
|
|
6
|
-
|
|
5
|
+
<b-row>
|
|
6
|
+
<b-col sm="10">
|
|
7
|
+
<span class="title-report-header"> Total de Registros .................. </span>
|
|
8
|
+
</b-col>
|
|
9
|
+
<b-col sm="2">
|
|
10
|
+
<span class="title-report-header value-report-header"> {{ totalRecords }} </span>
|
|
11
|
+
</b-col>
|
|
12
|
+
</b-row>
|
|
7
13
|
</div>
|
|
8
14
|
<div class="text-right" v-for="item in totalization" :key="item.title">
|
|
9
|
-
<
|
|
15
|
+
<b-row>
|
|
16
|
+
<b-col sm="10">
|
|
17
|
+
<span v-if="convertName(item[0]).type == 'currency'">
|
|
18
|
+
<span class="title-report-header">
|
|
19
|
+
{{ convertName(item[0]).title }} ..................
|
|
20
|
+
</span>
|
|
21
|
+
</span>
|
|
22
|
+
</b-col>
|
|
23
|
+
<b-col sm="2">
|
|
24
|
+
<span v-if="convertName(item[0]).type == 'currency'">
|
|
25
|
+
{{ item[1] | currency }}
|
|
26
|
+
</span>
|
|
27
|
+
<span v-if="convertName(item[0]).type == 'numeric'">
|
|
28
|
+
{{ Math.round(item[1]) }}
|
|
29
|
+
</span>
|
|
30
|
+
</b-col>
|
|
31
|
+
</b-row>
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
<!-- <span :class="convertName(item[0]).classCss">
|
|
10
35
|
<span class="title-report-header">
|
|
11
36
|
{{ convertName(item[0]).title }}
|
|
12
37
|
<span class="title-report-header value-report-header">
|
|
13
|
-
<
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
38
|
+
<div class="side-by-side div-title">
|
|
39
|
+
<span v-if="convertName(item[0]).type == 'currency'">
|
|
40
|
+
{{ item[1] | currency }}
|
|
41
|
+
</span>
|
|
42
|
+
</div>
|
|
43
|
+
<div class="side-by-side div-value">
|
|
44
|
+
<span v-if="convertName(item[0]).type == 'numeric'">
|
|
45
|
+
{{ Math.round(item[1]) }}
|
|
46
|
+
</span>
|
|
47
|
+
</div>
|
|
19
48
|
</span>
|
|
20
49
|
</span>
|
|
21
|
-
</span>
|
|
50
|
+
</span> -->
|
|
22
51
|
</div>
|
|
23
52
|
</div>
|
|
24
53
|
</template>
|
|
@@ -60,4 +89,8 @@ export default {
|
|
|
60
89
|
.receipt {
|
|
61
90
|
color: darkblue;
|
|
62
91
|
}
|
|
92
|
+
|
|
93
|
+
.div-title {
|
|
94
|
+
margin-right: 0px;
|
|
95
|
+
}
|
|
63
96
|
</style>
|
|
@@ -46,7 +46,11 @@ export default class ConvertToOdata {
|
|
|
46
46
|
if (seq + 1 != size) query += ` or `;
|
|
47
47
|
}
|
|
48
48
|
if (type == "totalization") {
|
|
49
|
-
|
|
49
|
+
|
|
50
|
+
let field = value.split('_').pop();
|
|
51
|
+
field = field.charAt(0).toLowerCase() + field.slice(1);
|
|
52
|
+
|
|
53
|
+
query += `${field} with ${value.split('_')[0]} as ${value.replace(/_/g, '')}`;
|
|
50
54
|
if (seq + 1 != size) query += `,`;
|
|
51
55
|
}
|
|
52
56
|
seq++;
|
|
@@ -153,6 +153,8 @@ export default {
|
|
|
153
153
|
rules: this.templateReport.rules,
|
|
154
154
|
});
|
|
155
155
|
|
|
156
|
+
this.clearTotalization();
|
|
157
|
+
|
|
156
158
|
if (this.id) this.getById();
|
|
157
159
|
|
|
158
160
|
if (!this.id) this.removeLoadingWithTime();
|
|
@@ -166,6 +168,7 @@ export default {
|
|
|
166
168
|
"addReport",
|
|
167
169
|
"addInitialReportCustom",
|
|
168
170
|
"removeInitialReportCustom",
|
|
171
|
+
|
|
169
172
|
]),
|
|
170
173
|
...mapMutations("generic", [
|
|
171
174
|
"addEvent",
|
|
@@ -173,6 +176,9 @@ export default {
|
|
|
173
176
|
"hideModal",
|
|
174
177
|
"removeLoading",
|
|
175
178
|
]),
|
|
179
|
+
...mapMutations("report", [
|
|
180
|
+
"clearTotalization"
|
|
181
|
+
]),
|
|
176
182
|
getById() {
|
|
177
183
|
let params = { url: this.urlGetById, obj: { id: this.id } };
|
|
178
184
|
this.getApi(params).then((response) => {
|