@nixweb/nixloc-ui 0.0.127 → 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/package.json +79 -79
- package/src/App.vue +13 -13
- package/src/component/forms/Button.vue +170 -170
- package/src/component/forms/CheckboxGroup.vue +72 -66
- package/src/component/forms/CheckboxSimple.vue +46 -42
- package/src/component/forms/Color.vue +38 -38
- package/src/component/forms/DateTime.vue +167 -163
- package/src/component/forms/Dropdown.vue +218 -224
- package/src/component/forms/EditorHtml.vue +126 -126
- package/src/component/forms/FileUpload.vue +185 -185
- package/src/component/forms/ImageUpload.vue +12 -4
- package/src/component/forms/IncrementDecrement.vue +101 -0
- package/src/component/forms/InputDecimal.vue +142 -138
- package/src/component/forms/InputNumber.vue +154 -154
- package/src/component/forms/InputPassword.vue +135 -135
- package/src/component/forms/InputText.vue +162 -157
- package/src/component/forms/Modal.vue +65 -65
- package/src/component/forms/RadioGroup.vue +50 -50
- package/src/component/forms/Select.vue +349 -340
- package/src/component/forms/SelectStatic.vue +127 -127
- 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 -215
- package/src/component/layout/Molded.vue +28 -27
- package/src/component/layout/Panel.vue +140 -140
- package/src/component/layout/Popover.vue +126 -126
- package/src/component/layout/ScrollBar.vue +42 -42
- package/src/component/layout/Tab.vue +135 -0
- package/src/component/layout/Wizard.vue +211 -211
- 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/DocumentPreview.vue +1 -1
- package/src/component/shared/DocumentPublic.vue +34 -0
- package/src/component/shared/ExportPDF.vue +116 -116
- package/src/component/shared/HeaderReport.vue +1 -1
- 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 -81
- package/src/component/shared/PDFViewer.vue +22 -22
- package/src/component/shared/Pagination.vue +52 -52
- package/src/component/shared/ProgressBar.vue +22 -22
- package/src/component/shared/QueryButton.vue +66 -66
- package/src/component/shared/{BodyReport.vue → Report.vue} +8 -7
- package/src/component/shared/SaveCancel.vue +6 -1
- package/src/component/shared/Search.vue +154 -154
- package/src/component/shared/SelectOption.vue +18 -9
- package/src/component/shared/Table.vue +163 -254
- 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/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 -97
- package/src/component/shared/query-builder/AddRule.vue +181 -181
- package/src/component/shared/query-builder/ConvertToOdata.js +3 -9
- package/src/component/shared/query-builder/DynamicComponent.vue +5 -1
- package/src/component/shared/query-builder/DynamicComponentList.vue +73 -62
- package/src/component/shared/query-builder/QueryBuilder.vue +69 -69
- package/src/component/shared/query-builder/utilities.js +21 -21
- package/src/component/template/ListViewWithDataHandler.vue +260 -238
- package/src/component/template/ReportCreateUpdate.vue +9 -2
- package/src/component/template/ViewTemplateConfiguration.vue +64 -63
- package/src/component/template/ViewTemplateDocumentView.vue +1 -0
- package/src/component/template/ViewTemplateReportPreview.vue +56 -12
- package/src/component/template/ViewTemplateWithSalveCancel.vue +32 -32
- package/src/component/template/ViewTemplateWithTable.vue +56 -56
- package/src/component/value-objects/Contact.vue +7 -0
- package/src/component/value-objects/Person.vue +15 -0
- 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 -494
- package/src/store/modules/report.js +37 -19
- package/src/store/modules/user.js +3 -0
- package/src/store/modules/validation.js +38 -38
- package/src/store/store.js +13 -13
- package/src/component/shared/query-builder/Totalization.vue +0 -38
|
@@ -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>
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="main">
|
|
3
|
+
<div class="content">
|
|
4
|
+
<DocumentPreview :template="template" :d="d" />
|
|
5
|
+
</div>
|
|
6
|
+
</div>
|
|
7
|
+
</template>
|
|
8
|
+
<script>
|
|
9
|
+
import DocumentPreview from "@nixweb/nixloc-ui/src/component/shared/DocumentPreview.vue";
|
|
10
|
+
|
|
11
|
+
export default {
|
|
12
|
+
name: "DocumentPublic",
|
|
13
|
+
components: {
|
|
14
|
+
DocumentPreview,
|
|
15
|
+
},
|
|
16
|
+
props: {
|
|
17
|
+
template: String,
|
|
18
|
+
d: Object,
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
</script>
|
|
22
|
+
|
|
23
|
+
<style scoped>
|
|
24
|
+
.main {
|
|
25
|
+
background-color: white;
|
|
26
|
+
min-height: 900px;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.content {
|
|
30
|
+
width: 1024px;
|
|
31
|
+
margin: auto;
|
|
32
|
+
padding: 10px;
|
|
33
|
+
}
|
|
34
|
+
</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,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="div-header">
|
|
3
|
-
<div class="title">{{
|
|
3
|
+
<div class="title">Relatório {{ $route.params.name }}</span></div>
|
|
4
4
|
<div class="side-by-side div-tag" v-for="tag in tags" :key="tag.id">
|
|
5
5
|
<span>{{ tag.title }}</span> <span>{{ tag.value }}</span>
|
|
6
6
|
<span>,</span>
|
|
@@ -1,59 +1,59 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="filter-horizontal">
|
|
3
|
-
<Collapse
|
|
4
|
-
:buttonShow="{
|
|
5
|
-
title: 'Mais filtros',
|
|
6
|
-
icon: 'fas fa-arrow-alt-circle-down',
|
|
7
|
-
type: 'info',
|
|
8
|
-
}"
|
|
9
|
-
:buttonHide="{
|
|
10
|
-
title: 'Menos filtros',
|
|
11
|
-
icon: 'fas fa-arrow-alt-circle-up',
|
|
12
|
-
type: 'warning',
|
|
13
|
-
}"
|
|
14
|
-
>
|
|
15
|
-
<b-row>
|
|
16
|
-
<b-col :sm="showTotalPerPage ? 10 : 12">
|
|
17
|
-
<slot name="content-filter-horizontal"></slot>
|
|
18
|
-
</b-col>
|
|
19
|
-
<b-col xs="12" sm="12" md="12" lg="2" xl="2" v-if="showTotalPerPage">
|
|
20
|
-
<SelectStatic
|
|
21
|
-
title="Mostrar"
|
|
22
|
-
fieldTarget="totalPerPage"
|
|
23
|
-
:initialValue="{ content: '10', id: 10 }"
|
|
24
|
-
:data="[
|
|
25
|
-
{ content: '10', id: 10 },
|
|
26
|
-
{ content: '20', id: 20 },
|
|
27
|
-
{ content: '30', id: 30 },
|
|
28
|
-
{ content: '50', id: 50 },
|
|
29
|
-
{ content: '100', id: 100 },
|
|
30
|
-
]"
|
|
31
|
-
/>
|
|
32
|
-
</b-col>
|
|
33
|
-
</b-row>
|
|
34
|
-
</Collapse>
|
|
35
|
-
</div>
|
|
36
|
-
</template>
|
|
37
|
-
|
|
38
|
-
<script>
|
|
39
|
-
import Collapse from "./Collapse.vue";
|
|
40
|
-
import SelectStatic from "../forms/SelectStatic.vue";
|
|
41
|
-
import Select from "../forms/Select";
|
|
42
|
-
|
|
43
|
-
export default {
|
|
44
|
-
name: "ListViewWithHandlerData",
|
|
45
|
-
components: { Select, SelectStatic, Collapse },
|
|
46
|
-
props: {
|
|
47
|
-
showTotalPerPage: {
|
|
48
|
-
type: Boolean,
|
|
49
|
-
default: true,
|
|
50
|
-
},
|
|
51
|
-
},
|
|
52
|
-
};
|
|
53
|
-
</script>
|
|
54
|
-
|
|
55
|
-
<style scoped>
|
|
56
|
-
.filter-horizontal {
|
|
57
|
-
margin-bottom: 5px;
|
|
58
|
-
}
|
|
59
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div class="filter-horizontal">
|
|
3
|
+
<Collapse
|
|
4
|
+
:buttonShow="{
|
|
5
|
+
title: 'Mais filtros',
|
|
6
|
+
icon: 'fas fa-arrow-alt-circle-down',
|
|
7
|
+
type: 'info',
|
|
8
|
+
}"
|
|
9
|
+
:buttonHide="{
|
|
10
|
+
title: 'Menos filtros',
|
|
11
|
+
icon: 'fas fa-arrow-alt-circle-up',
|
|
12
|
+
type: 'warning',
|
|
13
|
+
}"
|
|
14
|
+
>
|
|
15
|
+
<b-row>
|
|
16
|
+
<b-col :sm="showTotalPerPage ? 10 : 12">
|
|
17
|
+
<slot name="content-filter-horizontal"></slot>
|
|
18
|
+
</b-col>
|
|
19
|
+
<b-col xs="12" sm="12" md="12" lg="2" xl="2" v-if="showTotalPerPage">
|
|
20
|
+
<SelectStatic
|
|
21
|
+
title="Mostrar"
|
|
22
|
+
fieldTarget="totalPerPage"
|
|
23
|
+
:initialValue="{ content: '10', id: 10 }"
|
|
24
|
+
:data="[
|
|
25
|
+
{ content: '10', id: 10 },
|
|
26
|
+
{ content: '20', id: 20 },
|
|
27
|
+
{ content: '30', id: 30 },
|
|
28
|
+
{ content: '50', id: 50 },
|
|
29
|
+
{ content: '100', id: 100 },
|
|
30
|
+
]"
|
|
31
|
+
/>
|
|
32
|
+
</b-col>
|
|
33
|
+
</b-row>
|
|
34
|
+
</Collapse>
|
|
35
|
+
</div>
|
|
36
|
+
</template>
|
|
37
|
+
|
|
38
|
+
<script>
|
|
39
|
+
import Collapse from "./Collapse.vue";
|
|
40
|
+
import SelectStatic from "../forms/SelectStatic.vue";
|
|
41
|
+
import Select from "../forms/Select";
|
|
42
|
+
|
|
43
|
+
export default {
|
|
44
|
+
name: "ListViewWithHandlerData",
|
|
45
|
+
components: { Select, SelectStatic, Collapse },
|
|
46
|
+
props: {
|
|
47
|
+
showTotalPerPage: {
|
|
48
|
+
type: Boolean,
|
|
49
|
+
default: true,
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
};
|
|
53
|
+
</script>
|
|
54
|
+
|
|
55
|
+
<style scoped>
|
|
56
|
+
.filter-horizontal {
|
|
57
|
+
margin-bottom: 5px;
|
|
58
|
+
}
|
|
59
|
+
</style>
|