@nixweb/nixloc-ui 1.10.0 → 1.12.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/@nixweb/nixloc-ui/package.json +88 -88
- package/@nixweb/nixloc-ui/src/App.vue +13 -13
- package/@nixweb/nixloc-ui/src/component/forms/Button.vue +163 -163
- package/@nixweb/nixloc-ui/src/component/forms/CheckboxGroup.vue +69 -69
- package/@nixweb/nixloc-ui/src/component/forms/CheckboxServer.vue +192 -192
- package/@nixweb/nixloc-ui/src/component/forms/CheckboxSimple.vue +60 -60
- package/@nixweb/nixloc-ui/src/component/forms/Color.vue +38 -38
- package/@nixweb/nixloc-ui/src/component/forms/DateTime.vue +170 -170
- package/@nixweb/nixloc-ui/src/component/forms/Dropdown.vue +236 -236
- package/@nixweb/nixloc-ui/src/component/forms/EditorHtml.vue +132 -132
- package/@nixweb/nixloc-ui/src/component/forms/FileUpload.vue +170 -170
- package/@nixweb/nixloc-ui/src/component/forms/InputDecimal.vue +153 -153
- package/@nixweb/nixloc-ui/src/component/forms/InputNumber.vue +160 -160
- package/@nixweb/nixloc-ui/src/component/forms/InputPassword.vue +148 -148
- package/@nixweb/nixloc-ui/src/component/forms/InputText.vue +174 -174
- package/@nixweb/nixloc-ui/src/component/forms/Modal.vue +57 -57
- package/@nixweb/nixloc-ui/src/component/forms/RadioGroup.vue +91 -91
- package/@nixweb/nixloc-ui/src/component/forms/Select.vue +378 -378
- package/@nixweb/nixloc-ui/src/component/forms/SelectStatic.vue +198 -198
- package/@nixweb/nixloc-ui/src/component/forms/Slider.vue +18 -18
- package/@nixweb/nixloc-ui/src/component/forms/TextArea.vue +138 -138
- package/@nixweb/nixloc-ui/src/component/layout/Alert.vue +88 -88
- package/@nixweb/nixloc-ui/src/component/layout/Badge.vue +111 -111
- package/@nixweb/nixloc-ui/src/component/layout/FixedBar.vue +103 -103
- package/@nixweb/nixloc-ui/src/component/layout/Header.vue +56 -56
- package/@nixweb/nixloc-ui/src/component/layout/LoadingFullPage.vue +27 -27
- package/@nixweb/nixloc-ui/src/component/layout/Menu.vue +287 -287
- package/@nixweb/nixloc-ui/src/component/layout/Molded.vue +30 -30
- package/@nixweb/nixloc-ui/src/component/layout/Panel.vue +185 -185
- package/@nixweb/nixloc-ui/src/component/layout/Popover.vue +126 -126
- package/@nixweb/nixloc-ui/src/component/layout/ScrollBar.vue +57 -57
- package/@nixweb/nixloc-ui/src/component/layout/Wizard.vue +211 -211
- package/@nixweb/nixloc-ui/src/component/shared/Collapse.vue +131 -131
- package/@nixweb/nixloc-ui/src/component/shared/ExportPDF.vue +116 -116
- package/@nixweb/nixloc-ui/src/component/shared/HorizontalFilter.vue +64 -64
- package/@nixweb/nixloc-ui/src/component/shared/Loading.vue +107 -107
- package/@nixweb/nixloc-ui/src/component/shared/LoadingMoreButton.vue +23 -23
- package/@nixweb/nixloc-ui/src/component/shared/Messages.vue +109 -109
- package/@nixweb/nixloc-ui/src/component/shared/PDFViewer.vue +24 -24
- package/@nixweb/nixloc-ui/src/component/shared/Pagination.vue +108 -108
- package/@nixweb/nixloc-ui/src/component/shared/ProgressBar.vue +25 -25
- package/@nixweb/nixloc-ui/src/component/shared/QueryButton.vue +66 -66
- package/@nixweb/nixloc-ui/src/component/shared/Search.vue +174 -174
- package/@nixweb/nixloc-ui/src/component/shared/Table.vue +174 -174
- package/@nixweb/nixloc-ui/src/component/shared/TableButton.vue +36 -36
- package/@nixweb/nixloc-ui/src/component/shared/TableTotalization.vue +47 -47
- package/@nixweb/nixloc-ui/src/component/shared/Tip.vue +42 -42
- package/@nixweb/nixloc-ui/src/component/shared/Toast.vue +69 -69
- package/@nixweb/nixloc-ui/src/component/shared/VerticalFilter.vue +97 -97
- package/@nixweb/nixloc-ui/src/component/shared/query-builder/AddRule.vue +203 -203
- package/@nixweb/nixloc-ui/src/component/shared/query-builder/DynamicComponentList.vue +70 -70
- package/@nixweb/nixloc-ui/src/component/shared/query-builder/QueryBuilder.vue +69 -69
- package/@nixweb/nixloc-ui/src/component/shared/query-builder/utilities.js +21 -21
- package/@nixweb/nixloc-ui/src/component/template/ListViewWithDataHandler.vue +429 -429
- package/@nixweb/nixloc-ui/src/component/template/ViewTemplateConfiguration.vue +64 -64
- package/@nixweb/nixloc-ui/src/component/template/ViewTemplateWithSalveCancel.vue +32 -32
- package/@nixweb/nixloc-ui/src/component/template/ViewTemplateWithTable.vue +62 -62
- package/@nixweb/nixloc-ui/src/config/axios.js +9 -9
- package/@nixweb/nixloc-ui/src/config/dicas.js +14 -14
- package/@nixweb/nixloc-ui/src/config/router.js +13 -13
- package/@nixweb/nixloc-ui/src/config/token.js +14 -14
- package/@nixweb/nixloc-ui/src/main.js +23 -23
- package/@nixweb/nixloc-ui/src/store/modules/generic.js +815 -815
- package/@nixweb/nixloc-ui/src/store/modules/validation.js +38 -38
- package/@nixweb/nixloc-ui/src/store/store.js +13 -13
- package/package.json +1 -1
- package/src/component/forms/InputDecimal.vue +18 -5
- package/src/component/training/CourseView.vue +16 -7
- package/src/component/value-objects/Address.vue +35 -19
- package/src/store/modules/generic.js +0 -1
|
@@ -1,131 +1,131 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<div class="line-arrow" v-if="type == 'arrow'">
|
|
4
|
-
<div class="arrow" @click="show" v-if="!showCollapse">
|
|
5
|
-
<b-row>
|
|
6
|
-
<b-col sm="6" class="text-left">
|
|
7
|
-
<span class="title">{{ title }}</span>
|
|
8
|
-
</b-col>
|
|
9
|
-
<b-col sm="6" class="text-right">
|
|
10
|
-
<i class="far fa-plus"></i>
|
|
11
|
-
</b-col>
|
|
12
|
-
</b-row>
|
|
13
|
-
</div>
|
|
14
|
-
<div class="arrow" @click="hide" v-if="showCollapse">
|
|
15
|
-
<b-row>
|
|
16
|
-
<b-col sm="6" class="text-left">
|
|
17
|
-
<span class="title">{{ title }}</span>
|
|
18
|
-
</b-col>
|
|
19
|
-
<b-col sm="6" class="text-right">
|
|
20
|
-
<i class="far fa-minus"></i>
|
|
21
|
-
</b-col>
|
|
22
|
-
</b-row>
|
|
23
|
-
</div>
|
|
24
|
-
</div>
|
|
25
|
-
<b-collapse id="collapse-4" v-model="showCollapse" class="mt-2">
|
|
26
|
-
<slot></slot>
|
|
27
|
-
</b-collapse>
|
|
28
|
-
<div v-if="type == 'button'">
|
|
29
|
-
<b-row>
|
|
30
|
-
<b-col sm="12">
|
|
31
|
-
<div class="text-center">
|
|
32
|
-
<Button
|
|
33
|
-
v-if="!showCollapse"
|
|
34
|
-
:title="buttonShow.title"
|
|
35
|
-
:classIcon="buttonShow.icon"
|
|
36
|
-
:type="buttonShow.type"
|
|
37
|
-
size="small"
|
|
38
|
-
:clicked="show"
|
|
39
|
-
/>
|
|
40
|
-
</div>
|
|
41
|
-
</b-col>
|
|
42
|
-
</b-row>
|
|
43
|
-
<b-row>
|
|
44
|
-
<b-col>
|
|
45
|
-
<div class="text-center">
|
|
46
|
-
<Button
|
|
47
|
-
v-if="showCollapse"
|
|
48
|
-
key="hideCollapse"
|
|
49
|
-
:title="buttonHide.title"
|
|
50
|
-
:classIcon="buttonHide.icon"
|
|
51
|
-
:type="buttonHide.type"
|
|
52
|
-
size="small"
|
|
53
|
-
:clicked="hide"
|
|
54
|
-
/>
|
|
55
|
-
</div>
|
|
56
|
-
</b-col>
|
|
57
|
-
</b-row>
|
|
58
|
-
</div>
|
|
59
|
-
</div>
|
|
60
|
-
</template>
|
|
61
|
-
|
|
62
|
-
<script>
|
|
63
|
-
import Button from "../forms/Button.vue";
|
|
64
|
-
|
|
65
|
-
import { mapMutations } from "vuex";
|
|
66
|
-
|
|
67
|
-
export default {
|
|
68
|
-
components: { Button },
|
|
69
|
-
name: "Collapse",
|
|
70
|
-
props: {
|
|
71
|
-
buttonShow: Object,
|
|
72
|
-
buttonHide: Object,
|
|
73
|
-
type: {
|
|
74
|
-
type: String,
|
|
75
|
-
default: "button",
|
|
76
|
-
},
|
|
77
|
-
title: String,
|
|
78
|
-
startOpen: {
|
|
79
|
-
type: Boolean,
|
|
80
|
-
default: false,
|
|
81
|
-
},
|
|
82
|
-
},
|
|
83
|
-
data() {
|
|
84
|
-
return {
|
|
85
|
-
showCollapse: false,
|
|
86
|
-
};
|
|
87
|
-
},
|
|
88
|
-
created() {
|
|
89
|
-
this.showCollapse = this.startOpen;
|
|
90
|
-
},
|
|
91
|
-
methods: {
|
|
92
|
-
...mapMutations("generic", ["removeLoading"]),
|
|
93
|
-
show() {
|
|
94
|
-
let self = this;
|
|
95
|
-
setTimeout(function () {
|
|
96
|
-
self.showCollapse = true;
|
|
97
|
-
}, 200);
|
|
98
|
-
this.removeLoadingButton();
|
|
99
|
-
},
|
|
100
|
-
hide() {
|
|
101
|
-
let self = this;
|
|
102
|
-
setTimeout(function () {
|
|
103
|
-
self.showCollapse = false;
|
|
104
|
-
}, 200);
|
|
105
|
-
this.removeLoadingButton();
|
|
106
|
-
},
|
|
107
|
-
removeLoadingButton() {
|
|
108
|
-
this.removeLoading(["showCollapse", "hideCollapse"]);
|
|
109
|
-
},
|
|
110
|
-
},
|
|
111
|
-
};
|
|
112
|
-
</script>
|
|
113
|
-
<style scoped>
|
|
114
|
-
.arrow {
|
|
115
|
-
font-size: 14px;
|
|
116
|
-
color: #577696;
|
|
117
|
-
cursor: pointer;
|
|
118
|
-
margin-bottom: 10px;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
.title {
|
|
122
|
-
font-size: 16px;
|
|
123
|
-
margin-left: 5px;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
.line-arrow {
|
|
127
|
-
border-top: solid 1px #dbdfe9;
|
|
128
|
-
margin-top: 10px;
|
|
129
|
-
padding-top: 10px;
|
|
130
|
-
}
|
|
131
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<div class="line-arrow" v-if="type == 'arrow'">
|
|
4
|
+
<div class="arrow" @click="show" v-if="!showCollapse">
|
|
5
|
+
<b-row>
|
|
6
|
+
<b-col sm="6" class="text-left">
|
|
7
|
+
<span class="title">{{ title }}</span>
|
|
8
|
+
</b-col>
|
|
9
|
+
<b-col sm="6" class="text-right">
|
|
10
|
+
<i class="far fa-plus"></i>
|
|
11
|
+
</b-col>
|
|
12
|
+
</b-row>
|
|
13
|
+
</div>
|
|
14
|
+
<div class="arrow" @click="hide" v-if="showCollapse">
|
|
15
|
+
<b-row>
|
|
16
|
+
<b-col sm="6" class="text-left">
|
|
17
|
+
<span class="title">{{ title }}</span>
|
|
18
|
+
</b-col>
|
|
19
|
+
<b-col sm="6" class="text-right">
|
|
20
|
+
<i class="far fa-minus"></i>
|
|
21
|
+
</b-col>
|
|
22
|
+
</b-row>
|
|
23
|
+
</div>
|
|
24
|
+
</div>
|
|
25
|
+
<b-collapse id="collapse-4" v-model="showCollapse" class="mt-2">
|
|
26
|
+
<slot></slot>
|
|
27
|
+
</b-collapse>
|
|
28
|
+
<div v-if="type == 'button'">
|
|
29
|
+
<b-row>
|
|
30
|
+
<b-col sm="12">
|
|
31
|
+
<div class="text-center">
|
|
32
|
+
<Button
|
|
33
|
+
v-if="!showCollapse"
|
|
34
|
+
:title="buttonShow.title"
|
|
35
|
+
:classIcon="buttonShow.icon"
|
|
36
|
+
:type="buttonShow.type"
|
|
37
|
+
size="small"
|
|
38
|
+
:clicked="show"
|
|
39
|
+
/>
|
|
40
|
+
</div>
|
|
41
|
+
</b-col>
|
|
42
|
+
</b-row>
|
|
43
|
+
<b-row>
|
|
44
|
+
<b-col>
|
|
45
|
+
<div class="text-center">
|
|
46
|
+
<Button
|
|
47
|
+
v-if="showCollapse"
|
|
48
|
+
key="hideCollapse"
|
|
49
|
+
:title="buttonHide.title"
|
|
50
|
+
:classIcon="buttonHide.icon"
|
|
51
|
+
:type="buttonHide.type"
|
|
52
|
+
size="small"
|
|
53
|
+
:clicked="hide"
|
|
54
|
+
/>
|
|
55
|
+
</div>
|
|
56
|
+
</b-col>
|
|
57
|
+
</b-row>
|
|
58
|
+
</div>
|
|
59
|
+
</div>
|
|
60
|
+
</template>
|
|
61
|
+
|
|
62
|
+
<script>
|
|
63
|
+
import Button from "../forms/Button.vue";
|
|
64
|
+
|
|
65
|
+
import { mapMutations } from "vuex";
|
|
66
|
+
|
|
67
|
+
export default {
|
|
68
|
+
components: { Button },
|
|
69
|
+
name: "Collapse",
|
|
70
|
+
props: {
|
|
71
|
+
buttonShow: Object,
|
|
72
|
+
buttonHide: Object,
|
|
73
|
+
type: {
|
|
74
|
+
type: String,
|
|
75
|
+
default: "button",
|
|
76
|
+
},
|
|
77
|
+
title: String,
|
|
78
|
+
startOpen: {
|
|
79
|
+
type: Boolean,
|
|
80
|
+
default: false,
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
data() {
|
|
84
|
+
return {
|
|
85
|
+
showCollapse: false,
|
|
86
|
+
};
|
|
87
|
+
},
|
|
88
|
+
created() {
|
|
89
|
+
this.showCollapse = this.startOpen;
|
|
90
|
+
},
|
|
91
|
+
methods: {
|
|
92
|
+
...mapMutations("generic", ["removeLoading"]),
|
|
93
|
+
show() {
|
|
94
|
+
let self = this;
|
|
95
|
+
setTimeout(function () {
|
|
96
|
+
self.showCollapse = true;
|
|
97
|
+
}, 200);
|
|
98
|
+
this.removeLoadingButton();
|
|
99
|
+
},
|
|
100
|
+
hide() {
|
|
101
|
+
let self = this;
|
|
102
|
+
setTimeout(function () {
|
|
103
|
+
self.showCollapse = false;
|
|
104
|
+
}, 200);
|
|
105
|
+
this.removeLoadingButton();
|
|
106
|
+
},
|
|
107
|
+
removeLoadingButton() {
|
|
108
|
+
this.removeLoading(["showCollapse", "hideCollapse"]);
|
|
109
|
+
},
|
|
110
|
+
},
|
|
111
|
+
};
|
|
112
|
+
</script>
|
|
113
|
+
<style scoped>
|
|
114
|
+
.arrow {
|
|
115
|
+
font-size: 14px;
|
|
116
|
+
color: #577696;
|
|
117
|
+
cursor: pointer;
|
|
118
|
+
margin-bottom: 10px;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.title {
|
|
122
|
+
font-size: 16px;
|
|
123
|
+
margin-left: 5px;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.line-arrow {
|
|
127
|
+
border-top: solid 1px #dbdfe9;
|
|
128
|
+
margin-top: 10px;
|
|
129
|
+
padding-top: 10px;
|
|
130
|
+
}
|
|
131
|
+
</style>
|
|
@@ -1,116 +1,116 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<div v-show="carregando" class="full-width">
|
|
4
|
-
<Loading
|
|
5
|
-
:center="true"
|
|
6
|
-
:width="70"
|
|
7
|
-
:height="70"
|
|
8
|
-
message="Por favor aguarde, estamos gerando a impressão..."
|
|
9
|
-
/>
|
|
10
|
-
</div>
|
|
11
|
-
<vue-html2pdf
|
|
12
|
-
:show-layout="false"
|
|
13
|
-
:float-layout="false"
|
|
14
|
-
:enable-download="false"
|
|
15
|
-
:preview-modal="true"
|
|
16
|
-
:paginate-elements-by-height="1400"
|
|
17
|
-
:filename="fileName"
|
|
18
|
-
:pdf-quality="2"
|
|
19
|
-
:manual-pagination="false"
|
|
20
|
-
:pdf-format="tamanhoPagina"
|
|
21
|
-
:pdf-orientation="orientacao"
|
|
22
|
-
pdf-content-width="100%"
|
|
23
|
-
@progress="onProgress($event)"
|
|
24
|
-
@hasStartedGeneration="hasStartedGeneration()"
|
|
25
|
-
@hasGenerated="hasGenerated($event)"
|
|
26
|
-
ref="html2Pdf"
|
|
27
|
-
:html-to-pdf-options="htmlToPdfOptions"
|
|
28
|
-
>
|
|
29
|
-
<section slot="pdf-content">
|
|
30
|
-
<section class="pdf-item">
|
|
31
|
-
<ScrollBar :height="alturaBarraRolagem">
|
|
32
|
-
<div id="height">
|
|
33
|
-
<slot></slot>
|
|
34
|
-
</div>
|
|
35
|
-
</ScrollBar>
|
|
36
|
-
</section>
|
|
37
|
-
</section>
|
|
38
|
-
</vue-html2pdf>
|
|
39
|
-
<br />
|
|
40
|
-
<b-row
|
|
41
|
-
><b-col sm="12" class="text-right">
|
|
42
|
-
<button @click="gerarRelatorio()">gerar</button></b-col
|
|
43
|
-
></b-row
|
|
44
|
-
>
|
|
45
|
-
</div>
|
|
46
|
-
</template>
|
|
47
|
-
|
|
48
|
-
<script>
|
|
49
|
-
import Loading from "./Loading.vue";
|
|
50
|
-
import ScrollBar from "../layout/Scrollbar.vue";
|
|
51
|
-
import VueHtml2pdf from "vue-html2pdf";
|
|
52
|
-
|
|
53
|
-
export default {
|
|
54
|
-
name: "ExportPDF",
|
|
55
|
-
components: { VueHtml2pdf, ScrollBar, Loading },
|
|
56
|
-
props: {
|
|
57
|
-
title: String,
|
|
58
|
-
fileName: String,
|
|
59
|
-
tamanhoPagina: String,
|
|
60
|
-
orientacao: String,
|
|
61
|
-
larguraImpressao: Number,
|
|
62
|
-
},
|
|
63
|
-
data() {
|
|
64
|
-
return {
|
|
65
|
-
alturaBarraRolagem: 450,
|
|
66
|
-
carregando: false,
|
|
67
|
-
htmlToPdfOptions: {
|
|
68
|
-
margin: [5, 3, 5, 3],
|
|
69
|
-
},
|
|
70
|
-
};
|
|
71
|
-
},
|
|
72
|
-
methods: {
|
|
73
|
-
onProgress(event) {
|
|
74
|
-
if (event == 100) {
|
|
75
|
-
this.alturaBarraRolagem = 450;
|
|
76
|
-
this.carregando = false;
|
|
77
|
-
}
|
|
78
|
-
},
|
|
79
|
-
hasStartedGeneration() {
|
|
80
|
-
console.log("começou");
|
|
81
|
-
},
|
|
82
|
-
hasDownloaded() {
|
|
83
|
-
console.log("finalizou");
|
|
84
|
-
},
|
|
85
|
-
gerarRelatorio() {
|
|
86
|
-
const listElm = document.querySelector("#height");
|
|
87
|
-
this.alturaBarraRolagem = listElm.scrollHeight;
|
|
88
|
-
this.carregando = true;
|
|
89
|
-
let self = this;
|
|
90
|
-
setTimeout(function () {
|
|
91
|
-
self.$refs.html2Pdf.generatePdf();
|
|
92
|
-
}, 1000);
|
|
93
|
-
},
|
|
94
|
-
},
|
|
95
|
-
};
|
|
96
|
-
</script>
|
|
97
|
-
|
|
98
|
-
<style scoped>
|
|
99
|
-
.button {
|
|
100
|
-
margin-bottom: 20px;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
.title {
|
|
104
|
-
font-size: 20px;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
.full-width {
|
|
108
|
-
position: fixed;
|
|
109
|
-
width: 100%;
|
|
110
|
-
height: 100%;
|
|
111
|
-
left: 0;
|
|
112
|
-
top: 0;
|
|
113
|
-
background: white;
|
|
114
|
-
z-index: 99999;
|
|
115
|
-
}
|
|
116
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<div v-show="carregando" class="full-width">
|
|
4
|
+
<Loading
|
|
5
|
+
:center="true"
|
|
6
|
+
:width="70"
|
|
7
|
+
:height="70"
|
|
8
|
+
message="Por favor aguarde, estamos gerando a impressão..."
|
|
9
|
+
/>
|
|
10
|
+
</div>
|
|
11
|
+
<vue-html2pdf
|
|
12
|
+
:show-layout="false"
|
|
13
|
+
:float-layout="false"
|
|
14
|
+
:enable-download="false"
|
|
15
|
+
:preview-modal="true"
|
|
16
|
+
:paginate-elements-by-height="1400"
|
|
17
|
+
:filename="fileName"
|
|
18
|
+
:pdf-quality="2"
|
|
19
|
+
:manual-pagination="false"
|
|
20
|
+
:pdf-format="tamanhoPagina"
|
|
21
|
+
:pdf-orientation="orientacao"
|
|
22
|
+
pdf-content-width="100%"
|
|
23
|
+
@progress="onProgress($event)"
|
|
24
|
+
@hasStartedGeneration="hasStartedGeneration()"
|
|
25
|
+
@hasGenerated="hasGenerated($event)"
|
|
26
|
+
ref="html2Pdf"
|
|
27
|
+
:html-to-pdf-options="htmlToPdfOptions"
|
|
28
|
+
>
|
|
29
|
+
<section slot="pdf-content">
|
|
30
|
+
<section class="pdf-item">
|
|
31
|
+
<ScrollBar :height="alturaBarraRolagem">
|
|
32
|
+
<div id="height">
|
|
33
|
+
<slot></slot>
|
|
34
|
+
</div>
|
|
35
|
+
</ScrollBar>
|
|
36
|
+
</section>
|
|
37
|
+
</section>
|
|
38
|
+
</vue-html2pdf>
|
|
39
|
+
<br />
|
|
40
|
+
<b-row
|
|
41
|
+
><b-col sm="12" class="text-right">
|
|
42
|
+
<button @click="gerarRelatorio()">gerar</button></b-col
|
|
43
|
+
></b-row
|
|
44
|
+
>
|
|
45
|
+
</div>
|
|
46
|
+
</template>
|
|
47
|
+
|
|
48
|
+
<script>
|
|
49
|
+
import Loading from "./Loading.vue";
|
|
50
|
+
import ScrollBar from "../layout/Scrollbar.vue";
|
|
51
|
+
import VueHtml2pdf from "vue-html2pdf";
|
|
52
|
+
|
|
53
|
+
export default {
|
|
54
|
+
name: "ExportPDF",
|
|
55
|
+
components: { VueHtml2pdf, ScrollBar, Loading },
|
|
56
|
+
props: {
|
|
57
|
+
title: String,
|
|
58
|
+
fileName: String,
|
|
59
|
+
tamanhoPagina: String,
|
|
60
|
+
orientacao: String,
|
|
61
|
+
larguraImpressao: Number,
|
|
62
|
+
},
|
|
63
|
+
data() {
|
|
64
|
+
return {
|
|
65
|
+
alturaBarraRolagem: 450,
|
|
66
|
+
carregando: false,
|
|
67
|
+
htmlToPdfOptions: {
|
|
68
|
+
margin: [5, 3, 5, 3],
|
|
69
|
+
},
|
|
70
|
+
};
|
|
71
|
+
},
|
|
72
|
+
methods: {
|
|
73
|
+
onProgress(event) {
|
|
74
|
+
if (event == 100) {
|
|
75
|
+
this.alturaBarraRolagem = 450;
|
|
76
|
+
this.carregando = false;
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
hasStartedGeneration() {
|
|
80
|
+
console.log("começou");
|
|
81
|
+
},
|
|
82
|
+
hasDownloaded() {
|
|
83
|
+
console.log("finalizou");
|
|
84
|
+
},
|
|
85
|
+
gerarRelatorio() {
|
|
86
|
+
const listElm = document.querySelector("#height");
|
|
87
|
+
this.alturaBarraRolagem = listElm.scrollHeight;
|
|
88
|
+
this.carregando = true;
|
|
89
|
+
let self = this;
|
|
90
|
+
setTimeout(function () {
|
|
91
|
+
self.$refs.html2Pdf.generatePdf();
|
|
92
|
+
}, 1000);
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
};
|
|
96
|
+
</script>
|
|
97
|
+
|
|
98
|
+
<style scoped>
|
|
99
|
+
.button {
|
|
100
|
+
margin-bottom: 20px;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.title {
|
|
104
|
+
font-size: 20px;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.full-width {
|
|
108
|
+
position: fixed;
|
|
109
|
+
width: 100%;
|
|
110
|
+
height: 100%;
|
|
111
|
+
left: 0;
|
|
112
|
+
top: 0;
|
|
113
|
+
background: white;
|
|
114
|
+
z-index: 99999;
|
|
115
|
+
}
|
|
116
|
+
</style>
|
|
@@ -1,64 +1,64 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="filter-horizontal">
|
|
3
|
-
<Collapse :buttonShow="{
|
|
4
|
-
title: 'Mais filtros',
|
|
5
|
-
icon: 'fas fa-arrow-alt-circle-down',
|
|
6
|
-
type: 'info',
|
|
7
|
-
}" :buttonHide="{
|
|
8
|
-
title: 'Menos filtros',
|
|
9
|
-
icon: 'fas fa-arrow-alt-circle-up',
|
|
10
|
-
type: 'warning',
|
|
11
|
-
}">
|
|
12
|
-
<slot name="content-filter-horizontal"></slot>
|
|
13
|
-
</Collapse>
|
|
14
|
-
</div>
|
|
15
|
-
</template>
|
|
16
|
-
|
|
17
|
-
<script>
|
|
18
|
-
import Collapse from "./Collapse.vue";
|
|
19
|
-
import SelectStatic from "../forms/SelectStatic.vue";
|
|
20
|
-
import Select from "../forms/Select";
|
|
21
|
-
|
|
22
|
-
import { mapMutations, mapState } from "vuex";
|
|
23
|
-
|
|
24
|
-
export default {
|
|
25
|
-
name: "ListViewWithHandlerData",
|
|
26
|
-
components: { Select, SelectStatic, Collapse },
|
|
27
|
-
props: {
|
|
28
|
-
showTotalPerPage: {
|
|
29
|
-
type: Boolean,
|
|
30
|
-
default: true,
|
|
31
|
-
},
|
|
32
|
-
},
|
|
33
|
-
data() {
|
|
34
|
-
return {
|
|
35
|
-
initialValue: {}
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
created() {
|
|
39
|
-
this.initialValue = { content: this.paginations.totalPerPage, id: this.paginations.totalPerPage }
|
|
40
|
-
},
|
|
41
|
-
computed: {
|
|
42
|
-
...mapState("generic", ["paginations"]),
|
|
43
|
-
totalPerPage: {
|
|
44
|
-
get() {
|
|
45
|
-
return this.$store.state.generic.paginations.totalPerPage;
|
|
46
|
-
},
|
|
47
|
-
set(value) {
|
|
48
|
-
this.updateTotalPerPage(value);
|
|
49
|
-
},
|
|
50
|
-
},
|
|
51
|
-
},
|
|
52
|
-
methods: {
|
|
53
|
-
...mapMutations("generic", [
|
|
54
|
-
"updateTotalPerPage",
|
|
55
|
-
]),
|
|
56
|
-
}
|
|
57
|
-
};
|
|
58
|
-
</script>
|
|
59
|
-
|
|
60
|
-
<style scoped>
|
|
61
|
-
.filter-horizontal {
|
|
62
|
-
margin-bottom: 5px;
|
|
63
|
-
}
|
|
64
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div class="filter-horizontal">
|
|
3
|
+
<Collapse :buttonShow="{
|
|
4
|
+
title: 'Mais filtros',
|
|
5
|
+
icon: 'fas fa-arrow-alt-circle-down',
|
|
6
|
+
type: 'info',
|
|
7
|
+
}" :buttonHide="{
|
|
8
|
+
title: 'Menos filtros',
|
|
9
|
+
icon: 'fas fa-arrow-alt-circle-up',
|
|
10
|
+
type: 'warning',
|
|
11
|
+
}">
|
|
12
|
+
<slot name="content-filter-horizontal"></slot>
|
|
13
|
+
</Collapse>
|
|
14
|
+
</div>
|
|
15
|
+
</template>
|
|
16
|
+
|
|
17
|
+
<script>
|
|
18
|
+
import Collapse from "./Collapse.vue";
|
|
19
|
+
import SelectStatic from "../forms/SelectStatic.vue";
|
|
20
|
+
import Select from "../forms/Select";
|
|
21
|
+
|
|
22
|
+
import { mapMutations, mapState } from "vuex";
|
|
23
|
+
|
|
24
|
+
export default {
|
|
25
|
+
name: "ListViewWithHandlerData",
|
|
26
|
+
components: { Select, SelectStatic, Collapse },
|
|
27
|
+
props: {
|
|
28
|
+
showTotalPerPage: {
|
|
29
|
+
type: Boolean,
|
|
30
|
+
default: true,
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
data() {
|
|
34
|
+
return {
|
|
35
|
+
initialValue: {}
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
created() {
|
|
39
|
+
this.initialValue = { content: this.paginations.totalPerPage, id: this.paginations.totalPerPage }
|
|
40
|
+
},
|
|
41
|
+
computed: {
|
|
42
|
+
...mapState("generic", ["paginations"]),
|
|
43
|
+
totalPerPage: {
|
|
44
|
+
get() {
|
|
45
|
+
return this.$store.state.generic.paginations.totalPerPage;
|
|
46
|
+
},
|
|
47
|
+
set(value) {
|
|
48
|
+
this.updateTotalPerPage(value);
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
methods: {
|
|
53
|
+
...mapMutations("generic", [
|
|
54
|
+
"updateTotalPerPage",
|
|
55
|
+
]),
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
</script>
|
|
59
|
+
|
|
60
|
+
<style scoped>
|
|
61
|
+
.filter-horizontal {
|
|
62
|
+
margin-bottom: 5px;
|
|
63
|
+
}
|
|
64
|
+
</style>
|