@nixweb/nixloc-ui 0.0.97 → 0.0.100
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/ckeditor5/LICENSE.md +49 -0
- package/ckeditor5/README.md +68 -0
- package/ckeditor5/build/ckeditor.js +6 -0
- package/ckeditor5/build/ckeditor.js.map +1 -0
- package/ckeditor5/build/translations/af.js +1 -0
- package/ckeditor5/build/translations/ar.js +1 -0
- package/ckeditor5/build/translations/ast.js +1 -0
- package/ckeditor5/build/translations/az.js +1 -0
- package/ckeditor5/build/translations/bg.js +1 -0
- package/ckeditor5/build/translations/bs.js +1 -0
- package/ckeditor5/build/translations/ca.js +1 -0
- package/ckeditor5/build/translations/cs.js +1 -0
- package/ckeditor5/build/translations/da.js +1 -0
- package/ckeditor5/build/translations/de-ch.js +1 -0
- package/ckeditor5/build/translations/de.js +1 -0
- package/ckeditor5/build/translations/el.js +1 -0
- package/ckeditor5/build/translations/en-au.js +1 -0
- package/ckeditor5/build/translations/en-gb.js +1 -0
- package/ckeditor5/build/translations/en.js +1 -0
- package/ckeditor5/build/translations/eo.js +1 -0
- package/ckeditor5/build/translations/es.js +1 -0
- package/ckeditor5/build/translations/et.js +1 -0
- package/ckeditor5/build/translations/eu.js +1 -0
- package/ckeditor5/build/translations/fa.js +1 -0
- package/ckeditor5/build/translations/fi.js +1 -0
- package/ckeditor5/build/translations/fr.js +1 -0
- package/ckeditor5/build/translations/gl.js +1 -0
- package/ckeditor5/build/translations/gu.js +1 -0
- package/ckeditor5/build/translations/he.js +1 -0
- package/ckeditor5/build/translations/hi.js +1 -0
- package/ckeditor5/build/translations/hr.js +1 -0
- package/ckeditor5/build/translations/hu.js +1 -0
- package/ckeditor5/build/translations/id.js +1 -0
- package/ckeditor5/build/translations/it.js +1 -0
- package/ckeditor5/build/translations/ja.js +1 -0
- package/ckeditor5/build/translations/kk.js +1 -0
- package/ckeditor5/build/translations/km.js +1 -0
- package/ckeditor5/build/translations/kn.js +1 -0
- package/ckeditor5/build/translations/ko.js +1 -0
- package/ckeditor5/build/translations/ku.js +1 -0
- package/ckeditor5/build/translations/lt.js +1 -0
- package/ckeditor5/build/translations/lv.js +1 -0
- package/ckeditor5/build/translations/nb.js +1 -0
- package/ckeditor5/build/translations/ne.js +1 -0
- package/ckeditor5/build/translations/nl.js +1 -0
- package/ckeditor5/build/translations/no.js +1 -0
- package/ckeditor5/build/translations/oc.js +1 -0
- package/ckeditor5/build/translations/pl.js +1 -0
- package/ckeditor5/build/translations/pt.js +1 -0
- package/ckeditor5/build/translations/ro.js +1 -0
- package/ckeditor5/build/translations/ru.js +1 -0
- package/ckeditor5/build/translations/si.js +1 -0
- package/ckeditor5/build/translations/sk.js +1 -0
- package/ckeditor5/build/translations/sl.js +1 -0
- package/ckeditor5/build/translations/sq.js +1 -0
- package/ckeditor5/build/translations/sr-latn.js +1 -0
- package/ckeditor5/build/translations/sr.js +1 -0
- package/ckeditor5/build/translations/sv.js +1 -0
- package/ckeditor5/build/translations/th.js +1 -0
- package/ckeditor5/build/translations/tk.js +1 -0
- package/ckeditor5/build/translations/tr.js +1 -0
- package/ckeditor5/build/translations/tt.js +1 -0
- package/ckeditor5/build/translations/ug.js +1 -0
- package/ckeditor5/build/translations/uk.js +1 -0
- package/ckeditor5/build/translations/uz.js +1 -0
- package/ckeditor5/build/translations/vi.js +1 -0
- package/ckeditor5/build/translations/zh-cn.js +1 -0
- package/ckeditor5/build/translations/zh.js +1 -0
- package/ckeditor5/package.json +41 -0
- package/ckeditor5/sample/index.html +133 -0
- package/ckeditor5/sample/styles.css +500 -0
- package/ckeditor5/src/ckeditor.js +122 -0
- package/ckeditor5/webpack.config.js +96 -0
- package/package.json +9 -5
- package/src/component/forms/TextoArea.vue +0 -1
- package/src/component/shared/CabecalhoImpressao.vue +36 -0
- package/src/component/shared/DocumentoEditor.vue +134 -0
- package/src/component/shared/DocumentoPreview.vue +25 -0
- package/src/component/shared/ExportarExcel.vue +67 -0
- package/src/component/shared/{Imprimir.vue → ExportarPDF.vue} +5 -3
- package/src/component/shared/query-builder/Tags.vue +2 -38
- package/src/component/template/ModeloRelatorioView.vue +34 -21
- package/src/store/modulos/generic.js +1 -1
- package/src/store/modulos/relatorio.js +35 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nixweb/nixloc-ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.100",
|
|
4
4
|
"description": "Componentes UI",
|
|
5
5
|
"author": "Fábio Ávila <fabio@nixweb.com.br>",
|
|
6
6
|
"private": false,
|
|
@@ -10,12 +10,17 @@
|
|
|
10
10
|
"lint": "vue-cli-service lint"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
+
"@ckeditor/ckeditor5-vue2": "^2.0.0",
|
|
13
14
|
"@babel/polyfill": "^7.2.5",
|
|
14
15
|
"bootstrap-vue": "^2.0.0-rc.11",
|
|
15
|
-
"
|
|
16
|
+
"ckeditor5-custom-build": "file:ckeditor5",
|
|
16
17
|
"sass-loader": "^12.4.0",
|
|
17
18
|
"vodal": "^2.4.0",
|
|
19
|
+
"v-runtime-template": "^1.10.0",
|
|
18
20
|
"vue-color": "^2.7.0",
|
|
21
|
+
"vue-html2pdf": "^1.8.0",
|
|
22
|
+
"vue-json-excel": "^0.3.0",
|
|
23
|
+
"vue-print-nb": "^1.7.5",
|
|
19
24
|
"vue-currency-filter": "^3.3.0",
|
|
20
25
|
"vue-js-toggle-button": "^1.3.0",
|
|
21
26
|
"vue-loading-template": "^1.3.0",
|
|
@@ -28,8 +33,7 @@
|
|
|
28
33
|
"vue-toggles": "^1.1.4",
|
|
29
34
|
"vue-upload-file": "^1.1.0",
|
|
30
35
|
"vue2-datepicker": "^2.13.0",
|
|
31
|
-
"vue2-editor": "^2.6.6"
|
|
32
|
-
"xlsx": "^0.18.5"
|
|
36
|
+
"vue2-editor": "^2.6.6"
|
|
33
37
|
},
|
|
34
38
|
"devDependencies": {
|
|
35
39
|
"@vue/cli-plugin-babel": "~4.5.0",
|
|
@@ -68,4 +72,4 @@
|
|
|
68
72
|
"type": "git",
|
|
69
73
|
"url": "git+https://github.com/nixweb-sistemas/nixloc-ui.git"
|
|
70
74
|
}
|
|
71
|
-
}
|
|
75
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="div-cabecalho somente-impressao">
|
|
3
|
+
<div class="titulo">{{ nomeArquivo }}</div>
|
|
4
|
+
<div class="lado-a-lado div-tag" v-for="tag in tags" :key="tag.id">
|
|
5
|
+
<span>{{ tag.titulo }}</span> <span>{{ tag.valor }}</span>
|
|
6
|
+
<span>,</span>
|
|
7
|
+
</div>
|
|
8
|
+
</div>
|
|
9
|
+
</template>
|
|
10
|
+
|
|
11
|
+
<script>
|
|
12
|
+
import { mapGetters, mapMutations } from "vuex";
|
|
13
|
+
|
|
14
|
+
export default {
|
|
15
|
+
name: "CabecalhoImpressao",
|
|
16
|
+
computed: {
|
|
17
|
+
...mapGetters("relatorio", ["tags"]),
|
|
18
|
+
nomeArquivo() {
|
|
19
|
+
return this.$route.matched[0].props.default.relatorio;
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
</script>
|
|
24
|
+
<style scoped>
|
|
25
|
+
.div-cabecalho {
|
|
26
|
+
margin: 20px;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.div-tag {
|
|
30
|
+
margin-right: 10px;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.titulo {
|
|
34
|
+
font-size: 18px;
|
|
35
|
+
}
|
|
36
|
+
</style>
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<div class="form-group row">
|
|
4
|
+
<div>
|
|
5
|
+
<div class="document-editor__toolbar"></div>
|
|
6
|
+
<div class="document-editor__editable-container">
|
|
7
|
+
<ckeditor :editor="editor" v-model="template" @ready="onReady"></ckeditor>
|
|
8
|
+
</div>
|
|
9
|
+
</div>
|
|
10
|
+
</div>
|
|
11
|
+
<br />
|
|
12
|
+
</div>
|
|
13
|
+
</template>
|
|
14
|
+
|
|
15
|
+
<script>
|
|
16
|
+
import CKEditor from "ckeditor5-custom-build/build/ckeditor";
|
|
17
|
+
|
|
18
|
+
export default {
|
|
19
|
+
name: "HtmlEditor",
|
|
20
|
+
components: {
|
|
21
|
+
CKEditor,
|
|
22
|
+
},
|
|
23
|
+
props: {
|
|
24
|
+
value: String,
|
|
25
|
+
},
|
|
26
|
+
data() {
|
|
27
|
+
return {
|
|
28
|
+
editor: CKEditor,
|
|
29
|
+
template: "",
|
|
30
|
+
};
|
|
31
|
+
},
|
|
32
|
+
methods: {
|
|
33
|
+
onReady(editor) {
|
|
34
|
+
const toolbarContainer = document.querySelector(".document-editor__toolbar");
|
|
35
|
+
toolbarContainer.appendChild(editor.ui.view.toolbar.element);
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
watch: {
|
|
39
|
+
template() {
|
|
40
|
+
this.$emit("input", this.template);
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
};
|
|
44
|
+
</script>
|
|
45
|
+
|
|
46
|
+
<style scoped>
|
|
47
|
+
.document-editor {
|
|
48
|
+
border-radius: var(--ck-border-radius);
|
|
49
|
+
max-height: 700px;
|
|
50
|
+
display: flex;
|
|
51
|
+
flex-flow: column nowrap;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.document-editor__toolbar {
|
|
55
|
+
z-index: 1 !important;
|
|
56
|
+
min-width: 1100px;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.document-editor__toolbar .ck-toolbar {
|
|
60
|
+
border-radius: 0;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.document-editor__editable-container {
|
|
64
|
+
padding: 10px;
|
|
65
|
+
border: 1px solid #e4e6ec;
|
|
66
|
+
background: var(--ck-color-base-foreground);
|
|
67
|
+
overflow-y: scroll;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.document-editor__editable-container .ck-editor__editable {
|
|
71
|
+
width: 20.8cm;
|
|
72
|
+
min-height: 21cm;
|
|
73
|
+
padding: 20px;
|
|
74
|
+
border: 1px hsl(0, 0%, 82.7%) solid;
|
|
75
|
+
border-radius: var(--ck-border-radius);
|
|
76
|
+
background: white;
|
|
77
|
+
box-shadow: 0 0 5px hsla(0, 0%, 0%, 0.1);
|
|
78
|
+
margin: 0 auto;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.document-editor .ck-content,
|
|
82
|
+
.document-editor .ck-heading-dropdown .ck-list .ck-button__label {
|
|
83
|
+
font: 16px/1.6 "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/* Adjust the headings dropdown to host some larger heading styles. */
|
|
87
|
+
.document-editor .ck-heading-dropdown .ck-list .ck-button__label {
|
|
88
|
+
line-height: calc(1.7 * var(--ck-line-height-base) * var(--ck-font-size-base));
|
|
89
|
+
min-width: 6em;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/* Scale down all heading previews because they are way too big to be presented in the UI.
|
|
93
|
+
Preserve the relative scale, though. */
|
|
94
|
+
.document-editor
|
|
95
|
+
.ck-heading-dropdown
|
|
96
|
+
.ck-list
|
|
97
|
+
.ck-button:not(.ck-heading_paragraph)
|
|
98
|
+
.ck-button__label {
|
|
99
|
+
transform: scale(0.8);
|
|
100
|
+
transform-origin: left;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/* Set the styles for "Heading 1". */
|
|
104
|
+
.document-editor .ck-content h2,
|
|
105
|
+
.document-editor .ck-heading-dropdown .ck-heading_heading1 .ck-button__label {
|
|
106
|
+
font-size: 2.18em;
|
|
107
|
+
font-weight: normal;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.document-editor .ck-content h2 {
|
|
111
|
+
line-height: 1.37em;
|
|
112
|
+
padding-top: 0.342em;
|
|
113
|
+
margin-bottom: 0.142em;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/* Set the styles for "Heading 2". */
|
|
117
|
+
.document-editor .ck-content h3,
|
|
118
|
+
.document-editor .ck-heading-dropdown .ck-heading_heading2 .ck-button__label {
|
|
119
|
+
font-size: 1.75em;
|
|
120
|
+
font-weight: normal;
|
|
121
|
+
color: hsl(203, 100%, 50%);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.document-editor .ck-heading-dropdown .ck-heading_heading2.ck-on .ck-button__label {
|
|
125
|
+
color: var(--ck-color-list-button-on-text);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/* Set the styles for "Heading 2". */
|
|
129
|
+
.document-editor .ck-content h3 {
|
|
130
|
+
line-height: 1.86em;
|
|
131
|
+
padding-top: 0.171em;
|
|
132
|
+
margin-bottom: 0.357em;
|
|
133
|
+
}
|
|
134
|
+
</style>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<v-runtime-template :template="template" />
|
|
4
|
+
</div>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script>
|
|
8
|
+
import VRuntimeTemplate from "v-runtime-template";
|
|
9
|
+
|
|
10
|
+
export default {
|
|
11
|
+
name: "HtmlPreview",
|
|
12
|
+
components: {
|
|
13
|
+
VRuntimeTemplate,
|
|
14
|
+
},
|
|
15
|
+
props: {
|
|
16
|
+
template: String,
|
|
17
|
+
},
|
|
18
|
+
data() {
|
|
19
|
+
return {
|
|
20
|
+
nome: "Fábio",
|
|
21
|
+
sobrenome: "Gomes de Ávila",
|
|
22
|
+
};
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
</script>
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<download-excel
|
|
4
|
+
:fields="coluna"
|
|
5
|
+
:data="dados"
|
|
6
|
+
:before-finish="exportacaoFinalizada"
|
|
7
|
+
worksheet="Planilha"
|
|
8
|
+
:name="`${nomeArquivo}.xls`"
|
|
9
|
+
>
|
|
10
|
+
<Botao
|
|
11
|
+
chave="exportarExcel"
|
|
12
|
+
:tipo="botao.tipo"
|
|
13
|
+
:titulo="botao.titulo"
|
|
14
|
+
classeIcone="fas fa-file-excel"
|
|
15
|
+
:tamanho="botao.tamanho"
|
|
16
|
+
/>
|
|
17
|
+
</download-excel>
|
|
18
|
+
</div>
|
|
19
|
+
</template>
|
|
20
|
+
|
|
21
|
+
<script>
|
|
22
|
+
import Botao from "@nixweb/nixloc-ui/src/component/forms/Botao";
|
|
23
|
+
|
|
24
|
+
import { mapState, mapGetters, mapActions, mapMutations } from "vuex";
|
|
25
|
+
|
|
26
|
+
export default {
|
|
27
|
+
name: "ExportarExcel",
|
|
28
|
+
props: {
|
|
29
|
+
botao: Object,
|
|
30
|
+
cabecalho: Array,
|
|
31
|
+
dados: Array,
|
|
32
|
+
},
|
|
33
|
+
components: {
|
|
34
|
+
Botao,
|
|
35
|
+
},
|
|
36
|
+
data() {
|
|
37
|
+
return {
|
|
38
|
+
json_meta: [
|
|
39
|
+
[
|
|
40
|
+
{
|
|
41
|
+
key: "charset",
|
|
42
|
+
value: "utf-8",
|
|
43
|
+
},
|
|
44
|
+
],
|
|
45
|
+
],
|
|
46
|
+
};
|
|
47
|
+
},
|
|
48
|
+
methods: {
|
|
49
|
+
...mapMutations("generic", ["removeCarregando"]),
|
|
50
|
+
exportacaoFinalizada() {
|
|
51
|
+
this.removeCarregando(["exportarExcel"]);
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
computed: {
|
|
55
|
+
coluna() {
|
|
56
|
+
var object = this.cabecalho.reduce(
|
|
57
|
+
(obj, item) => Object.assign(obj, { [item.titulo]: item.campo }),
|
|
58
|
+
{}
|
|
59
|
+
);
|
|
60
|
+
return object;
|
|
61
|
+
},
|
|
62
|
+
nomeArquivo() {
|
|
63
|
+
return this.$route.matched[0].props.default.relatorio;
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
};
|
|
67
|
+
</script>
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
:paginate-elements-by-height="1400"
|
|
17
17
|
:filename="nomeArquivo"
|
|
18
18
|
:pdf-quality="2"
|
|
19
|
-
:manual-pagination="
|
|
19
|
+
:manual-pagination="false"
|
|
20
20
|
:pdf-format="tamanhoPagina"
|
|
21
21
|
:pdf-orientation="orientacao"
|
|
22
22
|
pdf-content-width="100%"
|
|
@@ -51,7 +51,7 @@ import BarraRolagem from "../layout/BarraRolagem.vue";
|
|
|
51
51
|
import VueHtml2pdf from "vue-html2pdf";
|
|
52
52
|
|
|
53
53
|
export default {
|
|
54
|
-
name: "
|
|
54
|
+
name: "ExportarPDF",
|
|
55
55
|
components: { VueHtml2pdf, BarraRolagem, Carregando },
|
|
56
56
|
props: {
|
|
57
57
|
titulo: String,
|
|
@@ -76,7 +76,9 @@ export default {
|
|
|
76
76
|
this.carregando = false;
|
|
77
77
|
}
|
|
78
78
|
},
|
|
79
|
-
hasStartedGeneration() {
|
|
79
|
+
hasStartedGeneration() {
|
|
80
|
+
console.log("começou");
|
|
81
|
+
},
|
|
80
82
|
hasDownloaded() {
|
|
81
83
|
console.log("finalizou");
|
|
82
84
|
},
|
|
@@ -22,51 +22,15 @@ export default {
|
|
|
22
22
|
props: {
|
|
23
23
|
nomeEvento: String,
|
|
24
24
|
},
|
|
25
|
-
|
|
26
|
-
return {
|
|
27
|
-
tags: [],
|
|
28
|
-
};
|
|
29
|
-
},
|
|
25
|
+
|
|
30
26
|
computed: {
|
|
31
|
-
...mapGetters("relatorio", ["
|
|
27
|
+
...mapGetters("relatorio", ["tags"]),
|
|
32
28
|
...mapGetters("generic", ["mostrarModal", "evento"]),
|
|
33
29
|
},
|
|
34
30
|
methods: {
|
|
35
31
|
...mapMutations("relatorio", ["removeFiltroSelecionado"]),
|
|
36
32
|
},
|
|
37
33
|
watch: {
|
|
38
|
-
filtroSelecionado: {
|
|
39
|
-
handler(filtro) {
|
|
40
|
-
let self = this;
|
|
41
|
-
this.tags = [];
|
|
42
|
-
filtro.children.forEach(function (value) {
|
|
43
|
-
let valor = "";
|
|
44
|
-
let type = value.query.type;
|
|
45
|
-
|
|
46
|
-
if (type == "custom-component" && value.query.label == "Período") {
|
|
47
|
-
valor = `${value.query.value[0]} - ${value.query.value[1]}`;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
if (type == "text" || type == "numeric") {
|
|
51
|
-
valor = `${value.query.operator} "${value.query.value}"`;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
if (type == "checkbox") {
|
|
55
|
-
value.query.choices.forEach(function (opcoes) {
|
|
56
|
-
value.query.value.forEach(function (value) {
|
|
57
|
-
if (opcoes.value == value) {
|
|
58
|
-
valor += `${opcoes.label},`;
|
|
59
|
-
}
|
|
60
|
-
});
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
let tag = { id: value.query.id, titulo: value.query.label, valor: valor };
|
|
65
|
-
if (value.query.value != null) self.tags.push(tag);
|
|
66
|
-
});
|
|
67
|
-
},
|
|
68
|
-
deep: true,
|
|
69
|
-
},
|
|
70
34
|
evento: {
|
|
71
35
|
handler(evento) {
|
|
72
36
|
if (evento.nome == "tagRemovida") {
|
|
@@ -127,36 +127,40 @@
|
|
|
127
127
|
<b-row>
|
|
128
128
|
<b-col sm="6">
|
|
129
129
|
<div class="lado-a-lado">
|
|
130
|
-
<
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
tamanho="pequeno"
|
|
136
|
-
:clique="obterTodos"
|
|
130
|
+
<ExportarExcel
|
|
131
|
+
:botao="{ tipo: 'editar', titulo: 'Excel', tamanho: 'pequeno' }"
|
|
132
|
+
nomeArquivo="Auditoria"
|
|
133
|
+
:cabecalho="conteudo.cabecalhoTabela"
|
|
134
|
+
:dados="conteudo.dados"
|
|
137
135
|
/>
|
|
138
136
|
</div>
|
|
139
137
|
<div class="lado-a-lado">
|
|
140
|
-
<
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
138
|
+
<div>
|
|
139
|
+
<Botao
|
|
140
|
+
v-print="'#printMe'"
|
|
141
|
+
chave="aplicaFiltro"
|
|
142
|
+
tipo="editar"
|
|
143
|
+
titulo="Imprimir"
|
|
144
|
+
classeIcone="fas fa-print"
|
|
145
|
+
tamanho="pequeno"
|
|
146
|
+
:clique="aplicarFiltro"
|
|
147
|
+
/>
|
|
148
|
+
</div>
|
|
148
149
|
</div>
|
|
149
150
|
</b-col>
|
|
150
151
|
<b-col sm="6">
|
|
151
152
|
<Registro :totalRegistro="conteudo.totalRegistros" />
|
|
152
153
|
</b-col>
|
|
153
154
|
</b-row>
|
|
154
|
-
<BarraRolagem :alturaMinima="
|
|
155
|
-
<
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
155
|
+
<BarraRolagem :alturaMinima="400" :alturaMaxima="600">
|
|
156
|
+
<div id="printMe">
|
|
157
|
+
<CabecalhoImpressao />
|
|
158
|
+
<Tabela
|
|
159
|
+
:cabecalhoTabela="conteudo.cabecalhoTabela"
|
|
160
|
+
:dados="conteudo.dados"
|
|
161
|
+
:mostrarChecks="modeloLista.mostrarChecks"
|
|
162
|
+
/>
|
|
163
|
+
</div>
|
|
160
164
|
</BarraRolagem>
|
|
161
165
|
</div>
|
|
162
166
|
<div class="div-sem-dados" v-if="nenhumDadoRetornado">
|
|
@@ -176,7 +180,9 @@
|
|
|
176
180
|
import Alerta from "@nixweb/nixloc-ui/src/component/layout/Alerta";
|
|
177
181
|
import Modal from "@nixweb/nixloc-ui/src/component/forms/Modal";
|
|
178
182
|
import Botao from "@nixweb/nixloc-ui/src/component/forms/Botao";
|
|
183
|
+
import ExportarExcel from "@nixweb/nixloc-ui/src/component/shared/ExportarExcel";
|
|
179
184
|
import Tabela from "../shared/Tabela.vue";
|
|
185
|
+
import CabecalhoImpressao from "../shared/CabecalhoImpressao.vue";
|
|
180
186
|
import Registro from "../shared/Registro.vue";
|
|
181
187
|
import Painel from "@nixweb/nixloc-ui/src/component/layout/Painel.vue";
|
|
182
188
|
import BarraRolagem from "@nixweb/nixloc-ui/src/component/layout/BarraRolagem.vue";
|
|
@@ -185,11 +191,15 @@ import Progresso from "@nixweb/nixloc-ui/src/component/shared/Progresso";
|
|
|
185
191
|
import Rodape from "@nixweb/nixloc-ui/src/component/shared/query-builder/Rodape.vue";
|
|
186
192
|
import Tags from "@nixweb/nixloc-ui/src/component/shared/query-builder/Tags.vue";
|
|
187
193
|
import RelatorioAdicionarModificar from "@nixweb/nixloc-ui/src/component/template/RelatorioAdicionarModificar.vue";
|
|
194
|
+
import print from "vue-print-nb";
|
|
188
195
|
|
|
189
196
|
import { mapState, mapGetters, mapActions, mapMutations } from "vuex";
|
|
190
197
|
|
|
191
198
|
export default {
|
|
192
199
|
name: "ModeloRelatorioView",
|
|
200
|
+
directives: {
|
|
201
|
+
print,
|
|
202
|
+
},
|
|
193
203
|
props: {
|
|
194
204
|
modeloLista: Object,
|
|
195
205
|
campo: Array,
|
|
@@ -208,6 +218,8 @@ export default {
|
|
|
208
218
|
Progresso,
|
|
209
219
|
Tags,
|
|
210
220
|
RelatorioAdicionarModificar,
|
|
221
|
+
ExportarExcel,
|
|
222
|
+
CabecalhoImpressao,
|
|
211
223
|
},
|
|
212
224
|
data() {
|
|
213
225
|
return {
|
|
@@ -223,6 +235,7 @@ export default {
|
|
|
223
235
|
btnDesativado: true,
|
|
224
236
|
carregando: false,
|
|
225
237
|
nenhumDadoRetornado: false,
|
|
238
|
+
teste: this.router,
|
|
226
239
|
};
|
|
227
240
|
},
|
|
228
241
|
mounted() {
|
|
@@ -312,7 +312,7 @@ export default {
|
|
|
312
312
|
return false;
|
|
313
313
|
})
|
|
314
314
|
},
|
|
315
|
-
|
|
315
|
+
getFileApi: async function (context, params) {
|
|
316
316
|
context.commit('limpaMetodoExecutadoApi');
|
|
317
317
|
return axios.post(params.url, params.obj, {
|
|
318
318
|
headers: new Token().tokenHeaders(), responseType: "arraybuffer",
|
|
@@ -17,6 +17,7 @@ export default {
|
|
|
17
17
|
opcoesValorInicial: [],
|
|
18
18
|
consulta: [],
|
|
19
19
|
resumo: [],
|
|
20
|
+
tags: []
|
|
20
21
|
},
|
|
21
22
|
getters: {
|
|
22
23
|
cabecalhoTabela: (state) => {
|
|
@@ -49,9 +50,9 @@ export default {
|
|
|
49
50
|
});
|
|
50
51
|
|
|
51
52
|
// se não tiver salvo, reseta o filtro que estava armazenado
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
/* if (tamanhoValorInicial == 0)
|
|
54
|
+
state.filtroSelecionado.children = [];*/
|
|
55
|
+
|
|
55
56
|
return state.opcoes;
|
|
56
57
|
},
|
|
57
58
|
filtroObrigatorio: (state) => {
|
|
@@ -113,6 +114,37 @@ export default {
|
|
|
113
114
|
|
|
114
115
|
return { consulta, resumo };
|
|
115
116
|
},
|
|
117
|
+
tags: (state) => {
|
|
118
|
+
state.tags = [];
|
|
119
|
+
state.filtroSelecionado.children.forEach(function (value) {
|
|
120
|
+
let valor = "";
|
|
121
|
+
let type = value.query.type;
|
|
122
|
+
|
|
123
|
+
if (value.query.value) {
|
|
124
|
+
if (type == "custom-component" && value.query.label == "Período") {
|
|
125
|
+
valor = `${value.query.value[0]} - ${value.query.value[1]}`;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
if (type == "text" || type == "numeric") {
|
|
129
|
+
valor = `${value.query.operator} "${value.query.value}"`;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
if (type == "checkbox") {
|
|
133
|
+
value.query.choices.forEach(function (opcoes) {
|
|
134
|
+
value.query.value.forEach(function (value) {
|
|
135
|
+
if (opcoes.value == value) {
|
|
136
|
+
valor += `${opcoes.label},`;
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
let tag = { id: value.query.id, titulo: value.query.label, valor: valor };
|
|
143
|
+
if (value.query.value != null) state.tags.push(tag);
|
|
144
|
+
}
|
|
145
|
+
});
|
|
146
|
+
return state.tags;
|
|
147
|
+
}
|
|
116
148
|
},
|
|
117
149
|
mutations: {
|
|
118
150
|
insereRelatorio: (state, obj) => {
|