@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,53 +1,52 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<b-pagination
|
|
4
|
-
v-model="pagination(
|
|
5
|
-
prev-text="Anterior"
|
|
6
|
-
next-text="Próximo"
|
|
7
|
-
align="right"
|
|
8
|
-
:hide-goto-end-buttons="true"
|
|
9
|
-
:per-page="pagination(
|
|
10
|
-
:total-rows="totalRecords"
|
|
11
|
-
></b-pagination>
|
|
12
|
-
</div>
|
|
13
|
-
</template>
|
|
14
|
-
|
|
15
|
-
<script>
|
|
16
|
-
import { mapGetters, mapMutations } from "vuex";
|
|
17
|
-
|
|
18
|
-
export default {
|
|
19
|
-
name: "Pagination",
|
|
20
|
-
props: {
|
|
21
|
-
|
|
22
|
-
totalRecords: Number,
|
|
23
|
-
},
|
|
24
|
-
created() {
|
|
25
|
-
this.addPagination({
|
|
26
|
-
key: this.
|
|
27
|
-
currentPage: 1,
|
|
28
|
-
totalPerPage: 10,
|
|
29
|
-
});
|
|
30
|
-
},
|
|
31
|
-
computed: {
|
|
32
|
-
...mapGetters("generic", ["pagination"]),
|
|
33
|
-
},
|
|
34
|
-
methods: {
|
|
35
|
-
...mapMutations("generic", ["addPagination"]),
|
|
36
|
-
},
|
|
37
|
-
};
|
|
38
|
-
</script>
|
|
39
|
-
|
|
40
|
-
<style>
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
color: #
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<b-pagination
|
|
4
|
+
v-model="pagination(_key).currentPage"
|
|
5
|
+
prev-text="Anterior"
|
|
6
|
+
next-text="Próximo"
|
|
7
|
+
align="right"
|
|
8
|
+
:hide-goto-end-buttons="true"
|
|
9
|
+
:per-page="pagination(_key).totalPerPage"
|
|
10
|
+
:total-rows="totalRecords"
|
|
11
|
+
></b-pagination>
|
|
12
|
+
</div>
|
|
13
|
+
</template>
|
|
14
|
+
|
|
15
|
+
<script>
|
|
16
|
+
import { mapGetters, mapMutations } from "vuex";
|
|
17
|
+
|
|
18
|
+
export default {
|
|
19
|
+
name: "Pagination",
|
|
20
|
+
props: {
|
|
21
|
+
_key: String,
|
|
22
|
+
totalRecords: Number,
|
|
23
|
+
},
|
|
24
|
+
created() {
|
|
25
|
+
this.addPagination({
|
|
26
|
+
key: this._key,
|
|
27
|
+
currentPage: 1,
|
|
28
|
+
totalPerPage: 10,
|
|
29
|
+
});
|
|
30
|
+
},
|
|
31
|
+
computed: {
|
|
32
|
+
...mapGetters("generic", ["pagination"]),
|
|
33
|
+
},
|
|
34
|
+
methods: {
|
|
35
|
+
...mapMutations("generic", ["addPagination"]),
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
</script>
|
|
39
|
+
|
|
40
|
+
<style>
|
|
41
|
+
.page-item {
|
|
42
|
+
font-size: 13px !important;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.page-item.active .page-link {
|
|
46
|
+
font-size: 13px !important;
|
|
47
|
+
z-index: 3 !important;
|
|
48
|
+
color: #fff !important;
|
|
49
|
+
background-color: #d98621 !important;
|
|
50
|
+
border-color: #d98621 !important;
|
|
51
|
+
}
|
|
52
|
+
</style>
|
|
@@ -11,19 +11,19 @@
|
|
|
11
11
|
<th><span class="title-header">Exemplo</span></th>
|
|
12
12
|
</tr>
|
|
13
13
|
</thead>
|
|
14
|
-
<tbody v-for="(
|
|
15
|
-
<td class="
|
|
16
|
-
<div>{{
|
|
14
|
+
<tbody v-for="(legendLocal, groupName) in grouped">
|
|
15
|
+
<td class="group text-center" colspan="8">
|
|
16
|
+
<div>{{ groupName.toUpperCase() }}</div>
|
|
17
17
|
</td>
|
|
18
|
-
<tr v-for="item in
|
|
18
|
+
<tr v-for="item in legendLocal">
|
|
19
19
|
<td class="parametro">
|
|
20
|
-
<span> {{ item.
|
|
20
|
+
<span> {{ item.parameter }}</span>
|
|
21
21
|
</td>
|
|
22
22
|
<td>
|
|
23
23
|
<span> {{ item.description }}</span>
|
|
24
24
|
</td>
|
|
25
25
|
<td>
|
|
26
|
-
<span class="exemplo"> {{ item.
|
|
26
|
+
<span class="exemplo"> {{ item.example }}</span>
|
|
27
27
|
</td>
|
|
28
28
|
</tr>
|
|
29
29
|
</tbody>
|
|
@@ -38,21 +38,21 @@ import ScrollBar from "@nixweb/nixloc-ui/src/component/layout/ScrollBar.vue";
|
|
|
38
38
|
import { mapGetters, mapState, mapMutations } from "vuex";
|
|
39
39
|
|
|
40
40
|
export default {
|
|
41
|
-
name: "
|
|
41
|
+
name: "ParameterLegend",
|
|
42
42
|
components: {
|
|
43
43
|
ScrollBar,
|
|
44
44
|
Search,
|
|
45
45
|
},
|
|
46
46
|
props: {
|
|
47
|
-
|
|
47
|
+
legend: [],
|
|
48
48
|
},
|
|
49
49
|
data() {
|
|
50
50
|
return {
|
|
51
|
-
|
|
51
|
+
legendLocal: [],
|
|
52
52
|
};
|
|
53
53
|
},
|
|
54
54
|
mounted() {
|
|
55
|
-
this.
|
|
55
|
+
this.legendLocal = this.legend;
|
|
56
56
|
},
|
|
57
57
|
methods: {
|
|
58
58
|
...mapMutations("generic", ["removeLoading"]),
|
|
@@ -60,36 +60,32 @@ export default {
|
|
|
60
60
|
computed: {
|
|
61
61
|
...mapGetters("generic", ["groupBy"]),
|
|
62
62
|
...mapState("generic", ["search", "executedSearch", "clearedSearch"]),
|
|
63
|
-
|
|
64
|
-
var
|
|
65
|
-
return
|
|
63
|
+
grouped() {
|
|
64
|
+
var list = this.groupBy({ array: this.legendLocal, key: "groupName" });
|
|
65
|
+
return list;
|
|
66
66
|
},
|
|
67
67
|
},
|
|
68
68
|
watch: {
|
|
69
69
|
executedSearch: function () {
|
|
70
|
-
let
|
|
71
|
-
|
|
70
|
+
let legend = [];
|
|
72
71
|
let self = this;
|
|
73
72
|
setTimeout(function () {
|
|
74
|
-
self.
|
|
75
|
-
if (self.search.filter.content == "
|
|
76
|
-
if (item.description == self.search.content)
|
|
73
|
+
self.legend.forEach(function (item) {
|
|
74
|
+
if (self.search.filter.content == "equal") {
|
|
75
|
+
if (item.description == self.search.content) legend.push(item);
|
|
77
76
|
}
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
if (item.description.includes(self.search.content)) legenda.push(item);
|
|
77
|
+
if (self.search.filter.content == "contains") {
|
|
78
|
+
if (item.description.includes(self.search.content)) legend.push(item);
|
|
81
79
|
}
|
|
82
80
|
});
|
|
83
|
-
|
|
84
|
-
self.legendaLocal = legenda;
|
|
85
|
-
|
|
81
|
+
self.legendLocal = legend;
|
|
86
82
|
self.removeLoading(["search", "clean"]);
|
|
87
83
|
}, 300);
|
|
88
84
|
},
|
|
89
85
|
clearedSearch: function () {
|
|
90
86
|
let self = this;
|
|
91
87
|
setTimeout(function () {
|
|
92
|
-
self.
|
|
88
|
+
self.legendLocal = self.legend;
|
|
93
89
|
self.removeLoading(["search", "clean"]);
|
|
94
90
|
}, 300);
|
|
95
91
|
},
|
|
@@ -114,7 +110,7 @@ export default {
|
|
|
114
110
|
text-transform: uppercase;
|
|
115
111
|
}
|
|
116
112
|
|
|
117
|
-
.
|
|
113
|
+
.group {
|
|
118
114
|
background-color: #fafafc;
|
|
119
115
|
font-size: 14px;
|
|
120
116
|
font-weight: 500;
|
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<progress-bar :size="size" :text="text" :val="value" :max="max"></progress-bar>
|
|
4
|
-
</div>
|
|
5
|
-
</template>
|
|
6
|
-
<script>
|
|
7
|
-
import ProgressBar from "vue-simple-progress";
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<progress-bar :size="size" :text="text" :val="value" :max="max"></progress-bar>
|
|
4
|
+
</div>
|
|
5
|
+
</template>
|
|
6
|
+
<script>
|
|
7
|
+
import ProgressBar from "vue-simple-progress";
|
|
8
|
+
|
|
9
|
+
// não mudar o nome Progress para ProgressBar
|
|
10
|
+
export default {
|
|
11
|
+
name: "Progress",
|
|
12
|
+
components: {
|
|
13
|
+
ProgressBar,
|
|
14
|
+
},
|
|
15
|
+
props: {
|
|
16
|
+
text: String,
|
|
17
|
+
value: Number,
|
|
18
|
+
max: Number,
|
|
19
|
+
size: String,
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
</script>
|
|
@@ -1,66 +1,66 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<div class="alignment" v-for="item in items" :key="item.title">
|
|
4
|
-
<button
|
|
5
|
-
:class="{
|
|
6
|
-
'button-query': true,
|
|
7
|
-
}"
|
|
8
|
-
@click="execute(item.valor)"
|
|
9
|
-
>
|
|
10
|
-
<span class="icon"> <i :class="item.classIcon"></i></span>
|
|
11
|
-
<span class="title">{{ item.title }}</span>
|
|
12
|
-
</button>
|
|
13
|
-
</div>
|
|
14
|
-
</div>
|
|
15
|
-
</template>
|
|
16
|
-
<script>
|
|
17
|
-
export default {
|
|
18
|
-
name: "QueryButton",
|
|
19
|
-
props: ["items", "value", "clicked"],
|
|
20
|
-
data() {
|
|
21
|
-
return {
|
|
22
|
-
currentValue: 0,
|
|
23
|
-
};
|
|
24
|
-
},
|
|
25
|
-
methods: {
|
|
26
|
-
execute(valor) {
|
|
27
|
-
this.currentValue = valor;
|
|
28
|
-
this.$emit("input", valor);
|
|
29
|
-
if (this.clicked) this.clicked();
|
|
30
|
-
},
|
|
31
|
-
},
|
|
32
|
-
};
|
|
33
|
-
</script>
|
|
34
|
-
<style scoped>
|
|
35
|
-
.button-query {
|
|
36
|
-
cursor: pointer;
|
|
37
|
-
height: 35px;
|
|
38
|
-
border: 1px solid #d5d5d5;
|
|
39
|
-
background-color: white;
|
|
40
|
-
border-radius: 3px;
|
|
41
|
-
padding-left: 10px;
|
|
42
|
-
padding-right: 7px;
|
|
43
|
-
margin-right: 10px;
|
|
44
|
-
margin-bottom: 10px;
|
|
45
|
-
font-size: 16px;
|
|
46
|
-
font-weight: normal;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.button-query:hover {
|
|
50
|
-
background-color: #d98621;
|
|
51
|
-
color: white;
|
|
52
|
-
border: none;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
.icon {
|
|
56
|
-
font-size: 13px;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.title {
|
|
60
|
-
font-size: 16px;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.alignment {
|
|
64
|
-
display: inline-block;
|
|
65
|
-
}
|
|
66
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<div class="alignment" v-for="item in items" :key="item.title">
|
|
4
|
+
<button
|
|
5
|
+
:class="{
|
|
6
|
+
'button-query': true,
|
|
7
|
+
}"
|
|
8
|
+
@click="execute(item.valor)"
|
|
9
|
+
>
|
|
10
|
+
<span class="icon"> <i :class="item.classIcon"></i></span>
|
|
11
|
+
<span class="title">{{ item.title }}</span>
|
|
12
|
+
</button>
|
|
13
|
+
</div>
|
|
14
|
+
</div>
|
|
15
|
+
</template>
|
|
16
|
+
<script>
|
|
17
|
+
export default {
|
|
18
|
+
name: "QueryButton",
|
|
19
|
+
props: ["items", "value", "clicked"],
|
|
20
|
+
data() {
|
|
21
|
+
return {
|
|
22
|
+
currentValue: 0,
|
|
23
|
+
};
|
|
24
|
+
},
|
|
25
|
+
methods: {
|
|
26
|
+
execute(valor) {
|
|
27
|
+
this.currentValue = valor;
|
|
28
|
+
this.$emit("input", valor);
|
|
29
|
+
if (this.clicked) this.clicked();
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
</script>
|
|
34
|
+
<style scoped>
|
|
35
|
+
.button-query {
|
|
36
|
+
cursor: pointer;
|
|
37
|
+
height: 35px;
|
|
38
|
+
border: 1px solid #d5d5d5;
|
|
39
|
+
background-color: white;
|
|
40
|
+
border-radius: 3px;
|
|
41
|
+
padding-left: 10px;
|
|
42
|
+
padding-right: 7px;
|
|
43
|
+
margin-right: 10px;
|
|
44
|
+
margin-bottom: 10px;
|
|
45
|
+
font-size: 16px;
|
|
46
|
+
font-weight: normal;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.button-query:hover {
|
|
50
|
+
background-color: #d98621;
|
|
51
|
+
color: white;
|
|
52
|
+
border: none;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.icon {
|
|
56
|
+
font-size: 13px;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.title {
|
|
60
|
+
font-size: 16px;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.alignment {
|
|
64
|
+
display: inline-block;
|
|
65
|
+
}
|
|
66
|
+
</style>
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="preview">
|
|
3
|
+
<div class="toolbar">
|
|
4
|
+
<div class="icon-toolbar" v-print="'#printMe'">
|
|
5
|
+
<i class="fas fa-print"></i>
|
|
6
|
+
</div>
|
|
7
|
+
<div class="icon-toolbar icon-excel">
|
|
8
|
+
<ExportExcel :header="header" :data="data" />
|
|
9
|
+
</div>
|
|
10
|
+
</div>
|
|
11
|
+
<ScrollBar :minHeight="400" :maxHeight="820">
|
|
12
|
+
<br />
|
|
13
|
+
<div id="printMe" class="a4 footer">
|
|
14
|
+
<HeaderReport />
|
|
15
|
+
<table class="table table-responsive-xs">
|
|
16
|
+
<thead>
|
|
17
|
+
<tr>
|
|
18
|
+
<th v-for="(obj, ind) in header" :key="ind">
|
|
19
|
+
<div class="title-margem" :class="obj.classCssTitle">
|
|
20
|
+
<i class="fas fa-search" v-if="obj.iconSearch"></i>
|
|
21
|
+
<span class="title-header"> {{ obj.title }}</span>
|
|
22
|
+
</div>
|
|
23
|
+
</th>
|
|
24
|
+
</tr>
|
|
25
|
+
</thead>
|
|
26
|
+
<tbody>
|
|
27
|
+
<tr v-for="(row, index) in data" :key="index" :style="row.rowCss">
|
|
28
|
+
<td v-for="(obj, ind) in header" :key="ind">
|
|
29
|
+
<div
|
|
30
|
+
:class="convertClass(row[obj.fieldComparison], obj.classCssBody)"
|
|
31
|
+
v-if="obj.type === 'text'"
|
|
32
|
+
>
|
|
33
|
+
{{ row[obj.field] }}
|
|
34
|
+
</div>
|
|
35
|
+
<div
|
|
36
|
+
:class="convertClass(row[obj.fieldComparison], obj.classCssBody)"
|
|
37
|
+
v-if="obj.type === 'date'"
|
|
38
|
+
>
|
|
39
|
+
{{ row[obj.field] | moment("DD/MM/YYYY") }}
|
|
40
|
+
</div>
|
|
41
|
+
<div
|
|
42
|
+
:class="convertClass(row[obj.fieldComparison], obj.classCssBody)"
|
|
43
|
+
v-if="obj.type === 'dateTime'"
|
|
44
|
+
>
|
|
45
|
+
{{ row[obj.field] | moment("DD/MM/YYYY HH:mm") }}
|
|
46
|
+
</div>
|
|
47
|
+
<div
|
|
48
|
+
:class="convertClass(row[obj.fieldComparison], obj.classCssBody)"
|
|
49
|
+
v-if="obj.type === 'currency'"
|
|
50
|
+
>
|
|
51
|
+
{{ row[obj.field] | currency }}
|
|
52
|
+
</div>
|
|
53
|
+
</td>
|
|
54
|
+
</tr>
|
|
55
|
+
</tbody>
|
|
56
|
+
<tbody v-show="data.length == 0">
|
|
57
|
+
<tr>
|
|
58
|
+
<td colspan="12">
|
|
59
|
+
<span>Nenhum registro encontrado!</span>
|
|
60
|
+
</td>
|
|
61
|
+
</tr>
|
|
62
|
+
</tbody>
|
|
63
|
+
</table>
|
|
64
|
+
<div>
|
|
65
|
+
<TotalizationReport :totalization="totalization" :totalRecords="data.length" />
|
|
66
|
+
</div>
|
|
67
|
+
</div>
|
|
68
|
+
</ScrollBar>
|
|
69
|
+
</div>
|
|
70
|
+
</template>
|
|
71
|
+
|
|
72
|
+
<script>
|
|
73
|
+
import ScrollBar from "@nixweb/nixloc-ui/src/component/layout/ScrollBar.vue";
|
|
74
|
+
import HeaderReport from "../shared/HeaderReport.vue";
|
|
75
|
+
import TotalizationReport from "../shared/TotalizationReport.vue";
|
|
76
|
+
import ExportExcel from "@nixweb/nixloc-ui/src/component/shared/ExportExcel";
|
|
77
|
+
import print from "vue-print-nb";
|
|
78
|
+
|
|
79
|
+
import { mapState, mapMutations, mapActions } from "vuex";
|
|
80
|
+
|
|
81
|
+
export default {
|
|
82
|
+
directives: {
|
|
83
|
+
print,
|
|
84
|
+
},
|
|
85
|
+
props: ["header", "data", "totalization"],
|
|
86
|
+
components: { ScrollBar, HeaderReport, TotalizationReport, ExportExcel },
|
|
87
|
+
methods: {
|
|
88
|
+
convertClass(fieldComparison, classCssBody) {
|
|
89
|
+
if (Array.isArray(classCssBody)) {
|
|
90
|
+
let ret = [];
|
|
91
|
+
classCssBody.forEach(function (value) {
|
|
92
|
+
let classCss = value.classCss;
|
|
93
|
+
let condition = value.fieldComparison == fieldComparison;
|
|
94
|
+
let obj = { [classCss]: condition };
|
|
95
|
+
ret.push(obj);
|
|
96
|
+
});
|
|
97
|
+
return ret;
|
|
98
|
+
} else {
|
|
99
|
+
return classCssBody;
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
},
|
|
103
|
+
};
|
|
104
|
+
</script>
|
|
105
|
+
|
|
106
|
+
<style scoped>
|
|
107
|
+
table tbody tr td {
|
|
108
|
+
max-width: 350px;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.table thead tr {
|
|
112
|
+
border-top: 1px solid black;
|
|
113
|
+
border-bottom: 1px solid black;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.table th,
|
|
117
|
+
.table td {
|
|
118
|
+
height: 10px !important;
|
|
119
|
+
padding-left: 0px !important;
|
|
120
|
+
padding-top: 0px !important;
|
|
121
|
+
padding-bottom: 0px !important;
|
|
122
|
+
padding-right: 5px !important;
|
|
123
|
+
border-bottom: 0px !important;
|
|
124
|
+
border-top: 0px !important;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.title-header {
|
|
128
|
+
font-size: 13px;
|
|
129
|
+
color: #757d8c;
|
|
130
|
+
font-weight: 400;
|
|
131
|
+
text-transform: uppercase;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.table-number {
|
|
135
|
+
font-size: 14px;
|
|
136
|
+
font-weight: bold;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.table-main {
|
|
140
|
+
color: #757d8c;
|
|
141
|
+
max-width: 200px;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.table-currency {
|
|
145
|
+
font-size: 14px;
|
|
146
|
+
min-width: 100px;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.preview {
|
|
150
|
+
background-color: #fafafa;
|
|
151
|
+
padding-bottom: 20px;
|
|
152
|
+
border: 1px solid #e4e6ec;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.toolbar {
|
|
156
|
+
height: 40px;
|
|
157
|
+
border-bottom: 1px hsl(0, 0%, 82.7%) solid;
|
|
158
|
+
overflow: hidden;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.icon-toolbar {
|
|
162
|
+
width: 20px;
|
|
163
|
+
font-size: 18px;
|
|
164
|
+
margin-left: 10px;
|
|
165
|
+
margin-top: 2px;
|
|
166
|
+
cursor: pointer;
|
|
167
|
+
display: inline-block;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.a4 {
|
|
171
|
+
max-width: 1100px;
|
|
172
|
+
min-height: 700px;
|
|
173
|
+
padding: 20px;
|
|
174
|
+
border-radius: var(--ck-border-radius);
|
|
175
|
+
background: white;
|
|
176
|
+
box-shadow: 0 0 5px hsl(0deg 0% 0% / 10%);
|
|
177
|
+
margin: 0 auto;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.footer {
|
|
181
|
+
margin-bottom: 10px;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.icon-excel {
|
|
185
|
+
color: green;
|
|
186
|
+
}
|
|
187
|
+
</style>
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
|
-
<FixedBar
|
|
4
|
-
<div>
|
|
3
|
+
<FixedBar position="footer" v-show="formDirty && !modal.open">
|
|
4
|
+
<div class="margin">
|
|
5
5
|
<Button
|
|
6
|
-
|
|
6
|
+
_key="cancelSaveCancel"
|
|
7
7
|
eventName="cancelSaveCancel"
|
|
8
8
|
title="Cancelar"
|
|
9
9
|
type="danger"
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
:clicked="cancel"
|
|
12
12
|
/>
|
|
13
13
|
<Button
|
|
14
|
-
|
|
14
|
+
_key="saveSaveCancel"
|
|
15
15
|
eventName="saveSaveCancel"
|
|
16
16
|
title="Salvar"
|
|
17
17
|
type="success"
|
|
@@ -34,13 +34,29 @@ export default {
|
|
|
34
34
|
props: {
|
|
35
35
|
formName: String,
|
|
36
36
|
},
|
|
37
|
+
data() {
|
|
38
|
+
return {
|
|
39
|
+
id: this.$route.params.id,
|
|
40
|
+
};
|
|
41
|
+
},
|
|
42
|
+
mounted() {
|
|
43
|
+
if (!this.id) {
|
|
44
|
+
let self = this;
|
|
45
|
+
setTimeout(function () {
|
|
46
|
+
self.resetValidation(this.formName);
|
|
47
|
+
self.updateFormDirty(false);
|
|
48
|
+
self.removeLoading(["panel"]);
|
|
49
|
+
}, 350);
|
|
50
|
+
}
|
|
51
|
+
},
|
|
37
52
|
computed: {
|
|
38
53
|
...mapState("validation", ["formDirty"]),
|
|
54
|
+
...mapState("generic", ["loading"]),
|
|
39
55
|
...mapGetters("validation", ["isFormValid"]),
|
|
40
56
|
...mapState("generic", ["modal"]),
|
|
41
57
|
},
|
|
42
58
|
methods: {
|
|
43
|
-
...mapMutations("validation", ["updateFormDirty"]),
|
|
59
|
+
...mapMutations("validation", ["updateFormDirty", "resetValidation"]),
|
|
44
60
|
...mapMutations("generic", ["removeLoading"]),
|
|
45
61
|
cancel() {
|
|
46
62
|
this.updateFormDirty(false);
|
|
@@ -54,3 +70,8 @@ export default {
|
|
|
54
70
|
},
|
|
55
71
|
};
|
|
56
72
|
</script>
|
|
73
|
+
<style scoped>
|
|
74
|
+
.margin{
|
|
75
|
+
margin-left: 0px;
|
|
76
|
+
}
|
|
77
|
+
</style>
|