@nixweb/nixloc-ui 0.0.119 → 0.0.122
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/ModeloRelatorioView.drawio +160 -0
- package/docs/src/store/modulos/relatorio.drawio +37 -0
- package/package.json +77 -75
- package/public/index.html +2 -4
- package/public/styles/app.css +1 -2
- package/src/component/forms/{Botao.vue → Button.vue} +53 -57
- package/src/component/forms/CheckboxGroup.vue +63 -0
- package/src/component/forms/{CheckboxUnico.vue → CheckboxSimple.vue} +6 -6
- package/src/component/forms/{Cor.vue → Color.vue} +9 -9
- package/src/component/forms/DateTime.vue +53 -53
- package/src/component/forms/{BotaoDropdown.vue → Dropdown.vue} +50 -50
- package/src/component/forms/EditorHtml.vue +123 -0
- package/src/component/forms/FileUpload.vue +189 -0
- package/src/component/forms/InputDecimal.vue +137 -0
- package/src/component/forms/InputNumber.vue +149 -0
- package/src/component/forms/InputPassword.vue +135 -0
- package/src/component/forms/InputText.vue +157 -0
- package/src/component/forms/Modal.vue +15 -15
- package/src/component/forms/RadioGroup.vue +50 -0
- package/src/component/forms/Select.vue +337 -0
- package/src/component/forms/SelectStatic.vue +120 -0
- package/src/component/forms/TextArea.vue +126 -0
- package/src/component/forms/Toggle.vue +13 -13
- package/src/component/layout/{Conta.vue → Account.vue} +28 -28
- package/src/component/layout/{Alerta.vue → Alert.vue} +22 -22
- package/src/component/layout/Badge.vue +23 -23
- package/src/component/layout/{BarraFixa.vue → FixedBar.vue} +16 -16
- package/src/component/layout/{CarregandoTelaInteira.vue → LoadingFullPage.vue} +3 -3
- package/src/component/layout/Menu.vue +66 -66
- package/src/component/layout/{Moldura.vue → Molded.vue} +4 -4
- package/src/component/layout/Panel.vue +142 -0
- package/src/component/layout/Popover.vue +1 -1
- package/src/component/layout/{BarraRolagem.vue → Scrollbar.vue} +9 -11
- package/src/component/layout/Tag.vue +9 -9
- package/src/component/layout/Topo.vue +1 -1
- package/src/component/layout/Wizard.vue +3 -3
- package/src/component/shared/BotaoCarregarMais.vue +9 -9
- package/src/component/shared/BotaoConsulta.vue +9 -9
- package/src/component/shared/CabecalhoImpressao.vue +6 -6
- package/src/component/shared/CodigoEditor.vue +16 -16
- package/src/component/shared/Confirmacao.vue +28 -28
- package/src/component/shared/Dica.vue +10 -10
- package/src/component/shared/DocumentoEditor.vue +3 -3
- package/src/component/shared/DocumentoPreview.vue +2 -2
- package/src/component/shared/EsconderMostrar.vue +26 -26
- package/src/component/shared/ExportarExcel.vue +14 -14
- package/src/component/shared/ExportarPDF.vue +10 -10
- package/src/component/shared/FiltroHorizontal.vue +19 -19
- package/src/component/shared/LegendaParametro.vue +17 -17
- package/src/component/shared/{Carregando.vue → Loading.vue} +11 -11
- package/src/component/shared/Messages.vue +83 -0
- package/src/component/shared/Paginacao.vue +10 -10
- package/src/component/shared/Progresso.vue +2 -2
- package/src/component/shared/Registro.vue +2 -2
- package/src/component/shared/ResumoTabela.vue +6 -6
- package/src/component/shared/SalvarCancelar.vue +26 -26
- package/src/component/shared/{Pesquisa.vue → Search.vue} +36 -36
- package/src/component/shared/Tabela.vue +49 -49
- package/src/component/shared/TabelaBotao.vue +13 -13
- package/src/component/shared/Toast.vue +7 -7
- package/src/component/shared/{FiltroVertical.vue → VerticalFilter.vue} +14 -14
- package/src/component/shared/construtor-consulta/AdicionaFiltro.vue +191 -0
- package/src/component/shared/construtor-consulta/Campo.vue +127 -0
- package/src/component/shared/construtor-consulta/ComponenteDinamico.vue +109 -0
- package/src/component/shared/construtor-consulta/ConstrutorConsulta.vue +70 -0
- package/src/component/shared/construtor-consulta/ConverteParaOdata.js +80 -0
- package/src/component/shared/construtor-consulta/EscolherFiltro.vue +96 -0
- package/src/component/shared/{query-builder → construtor-consulta}/Filtro.vue +11 -16
- package/src/component/shared/construtor-consulta/ListaComponenteDinamico.vue +41 -0
- package/src/component/shared/{query-builder → construtor-consulta}/Rodape.vue +9 -9
- package/src/component/shared/{query-builder → construtor-consulta}/Tags.vue +7 -7
- package/src/component/shared/{query-builder → construtor-consulta}/utilities.js +0 -0
- package/src/component/template/ModeloAdicionarModificarView.vue +11 -11
- package/src/component/template/ModeloDocumentoView.vue +79 -79
- package/src/component/template/ModeloLista.vue +66 -66
- package/src/component/template/ModeloRelatorioListaView.vue +71 -68
- package/src/component/template/ModeloRelatorioView.vue +218 -200
- package/src/component/template/ModeloSubView.vue +13 -13
- package/src/component/template/ModeloView.vue +17 -17
- package/src/component/template/Relatorio.js +1 -5
- package/src/component/template/RelatorioAdicionarModificar.vue +44 -44
- package/src/component/value-objects/DadosContato.vue +27 -27
- package/src/component/value-objects/DadosPessoa.js +1 -1
- package/src/component/value-objects/DadosPessoa.vue +52 -52
- package/src/component/value-objects/Endereco.js +1 -1
- package/src/component/value-objects/Endereco.vue +83 -83
- package/src/config/dicas.js +1 -1
- package/src/config/token.js +2 -2
- package/src/store/modules/generic.js +489 -0
- package/src/store/modules/report.js +246 -0
- package/src/store/modules/user.js +38 -0
- package/src/store/modules/validation.js +39 -0
- package/src/store/store.js +4 -4
- package/public/js/menu.js +0 -11
- package/public/styles/menu.css +0 -1399
- package/src/component/forms/ArquivoUpload.vue +0 -199
- package/src/component/forms/CheckboxMultiplo.vue +0 -63
- package/src/component/forms/Decimal.vue +0 -137
- package/src/component/forms/Escolher.vue +0 -324
- package/src/component/forms/EscolherEstatico.vue +0 -139
- package/src/component/forms/Numero.vue +0 -153
- package/src/component/forms/Opcoes.vue +0 -51
- package/src/component/forms/Senha.vue +0 -139
- package/src/component/forms/Texto.vue +0 -161
- package/src/component/forms/TextoArea.vue +0 -126
- package/src/component/forms/TextoEditor.vue +0 -123
- package/src/component/layout/Painel.vue +0 -142
- package/src/component/shared/Mensagem.vue +0 -86
- package/src/component/shared/query-builder/Campo.vue +0 -116
- package/src/component/shared/query-builder/ConverteParaOdata.js +0 -73
- package/src/component/shared/query-builder/QueryBuilder.vue +0 -164
- package/src/component/shared/query-builder/components/CustomSelect.vue +0 -115
- package/src/component/shared/query-builder/components/QueryBuilderChildren.vue +0 -46
- package/src/component/shared/query-builder/components/QueryBuilderGroup.vue +0 -151
- package/src/component/shared/query-builder/components/QueryBuilderRule.vue +0 -81
- package/src/component/shared/query-builder/layouts/Bootstrap/BootstrapGroup.vue +0 -120
- package/src/component/shared/query-builder/layouts/Bootstrap/BootstrapRule.vue +0 -171
- package/src/component/shared/query-builder/main.js +0 -81
- package/src/store/modulos/generic.js +0 -494
- package/src/store/modulos/relatorio.js +0 -201
- package/src/store/modulos/usuario.js +0 -38
- package/src/store/modulos/validation.js +0 -39
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
|
-
<
|
|
4
|
-
|
|
5
|
-
nomeEvento="
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
<Button
|
|
4
|
+
key="loadingMore"
|
|
5
|
+
nomeEvento="loadingMore"
|
|
6
|
+
type="warning"
|
|
7
|
+
title="Carregar mais..."
|
|
8
|
+
classIcon="fas fa-redo"
|
|
9
|
+
size="medium"
|
|
10
10
|
/>
|
|
11
11
|
</div>
|
|
12
12
|
</template>
|
|
13
13
|
<script>
|
|
14
|
-
import
|
|
14
|
+
import Button from "../forms/Button.vue";
|
|
15
15
|
export default {
|
|
16
16
|
name: "BotaoCarregarMais",
|
|
17
|
-
components: {
|
|
17
|
+
components: { Button },
|
|
18
18
|
data() {
|
|
19
19
|
return {};
|
|
20
20
|
},
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
|
-
<div class="alinhamento" v-for="item in
|
|
3
|
+
<div class="alinhamento" v-for="item in items" :key="item.title">
|
|
4
4
|
<button
|
|
5
5
|
:class="{
|
|
6
6
|
'botao-consulta': true,
|
|
7
7
|
}"
|
|
8
8
|
@click="executar(item.valor)"
|
|
9
9
|
>
|
|
10
|
-
<span class="
|
|
11
|
-
<span class="
|
|
10
|
+
<span class="icon"> <i :class="item.classIcon"></i></span>
|
|
11
|
+
<span class="title">{{ item.title }}</span>
|
|
12
12
|
</button>
|
|
13
13
|
</div>
|
|
14
14
|
</div>
|
|
@@ -16,17 +16,17 @@
|
|
|
16
16
|
<script>
|
|
17
17
|
export default {
|
|
18
18
|
name: "BotaoConsulta",
|
|
19
|
-
props: ["
|
|
19
|
+
props: ["items", "value", "clicked"],
|
|
20
20
|
data() {
|
|
21
21
|
return {
|
|
22
|
-
|
|
22
|
+
currentValue: 0,
|
|
23
23
|
};
|
|
24
24
|
},
|
|
25
25
|
methods: {
|
|
26
26
|
executar(valor) {
|
|
27
|
-
this.
|
|
27
|
+
this.currentValue = valor;
|
|
28
28
|
this.$emit("input", valor);
|
|
29
|
-
if (this.
|
|
29
|
+
if (this.clicked) this.clicked();
|
|
30
30
|
},
|
|
31
31
|
},
|
|
32
32
|
};
|
|
@@ -52,11 +52,11 @@ export default {
|
|
|
52
52
|
border: none;
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
.
|
|
55
|
+
.icon {
|
|
56
56
|
font-size: 13px;
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
-
.
|
|
59
|
+
.title {
|
|
60
60
|
font-size: 16px;
|
|
61
61
|
}
|
|
62
62
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="div-cabecalho somente-impressao">
|
|
3
|
-
<div class="
|
|
4
|
-
<div class="
|
|
5
|
-
<span>{{ tag.
|
|
3
|
+
<div class="title">{{ nomeArquivo }}</div>
|
|
4
|
+
<div class="side-by-side div-tag" v-for="tag in tags" :key="tag.id">
|
|
5
|
+
<span>{{ tag.title }}</span> <span>{{ tag.valor }}</span>
|
|
6
6
|
<span>,</span>
|
|
7
7
|
</div>
|
|
8
8
|
</div>
|
|
@@ -14,9 +14,9 @@ import { mapGetters, mapMutations } from "vuex";
|
|
|
14
14
|
export default {
|
|
15
15
|
name: "CabecalhoImpressao",
|
|
16
16
|
computed: {
|
|
17
|
-
...mapGetters("
|
|
17
|
+
...mapGetters("report", ["tags"]),
|
|
18
18
|
nomeArquivo() {
|
|
19
|
-
return this.$route.matched[0].props.default.
|
|
19
|
+
return this.$route.matched[0].props.default.report;
|
|
20
20
|
},
|
|
21
21
|
},
|
|
22
22
|
};
|
|
@@ -30,7 +30,7 @@ export default {
|
|
|
30
30
|
margin-right: 10px;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
.
|
|
33
|
+
.title {
|
|
34
34
|
font-size: 18px;
|
|
35
35
|
}
|
|
36
36
|
</style>
|
|
@@ -22,13 +22,13 @@
|
|
|
22
22
|
<div class="aplicar">
|
|
23
23
|
<b-row>
|
|
24
24
|
<b-col class="text-right">
|
|
25
|
-
<
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
:
|
|
25
|
+
<Button
|
|
26
|
+
key="aplicarCodigo"
|
|
27
|
+
type="primary"
|
|
28
|
+
title="Aplicar"
|
|
29
|
+
classIcon="far fa-code"
|
|
30
|
+
size="small"
|
|
31
|
+
:clicked="aplicar"
|
|
32
32
|
/>
|
|
33
33
|
</b-col>
|
|
34
34
|
</b-row>
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
|
|
39
39
|
<script>
|
|
40
40
|
import AceEditor from "vuejs-ace-editor";
|
|
41
|
-
import
|
|
41
|
+
import Button from "@nixweb/nixloc-ui/src/component/forms/Button";
|
|
42
42
|
|
|
43
43
|
import { mapMutations } from "vuex";
|
|
44
44
|
|
|
@@ -46,7 +46,7 @@ export default {
|
|
|
46
46
|
name: "CodigoEditor",
|
|
47
47
|
components: {
|
|
48
48
|
AceEditor,
|
|
49
|
-
|
|
49
|
+
Button,
|
|
50
50
|
},
|
|
51
51
|
data() {
|
|
52
52
|
return {
|
|
@@ -59,7 +59,7 @@ export default {
|
|
|
59
59
|
return this.$store.state.generic.documentoHtml;
|
|
60
60
|
},
|
|
61
61
|
set(value) {
|
|
62
|
-
this.
|
|
62
|
+
this.updateDocumentHtml(value);
|
|
63
63
|
},
|
|
64
64
|
},
|
|
65
65
|
},
|
|
@@ -68,14 +68,14 @@ export default {
|
|
|
68
68
|
},
|
|
69
69
|
methods: {
|
|
70
70
|
...mapMutations("generic", [
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
"
|
|
71
|
+
"updateDocumentHtml",
|
|
72
|
+
"hideModal",
|
|
73
|
+
"removeLoading",
|
|
74
74
|
]),
|
|
75
75
|
aplicar() {
|
|
76
|
-
this.
|
|
77
|
-
this.
|
|
78
|
-
this.
|
|
76
|
+
this.updateDocumentHtml(this.codigo);
|
|
77
|
+
this.hideModal("codigo");
|
|
78
|
+
this.removeLoading(["aplicarCodigo"]);
|
|
79
79
|
},
|
|
80
80
|
editorInit: function () {
|
|
81
81
|
require("brace/ext/language_tools"); //language extension prerequsite...
|
|
@@ -4,26 +4,26 @@
|
|
|
4
4
|
<slot></slot>
|
|
5
5
|
</div>
|
|
6
6
|
<Modal
|
|
7
|
-
:
|
|
8
|
-
:
|
|
9
|
-
:
|
|
10
|
-
v-show="mostrarModal(`confirmacao${
|
|
7
|
+
:title="title"
|
|
8
|
+
:width="450"
|
|
9
|
+
:height="250"
|
|
10
|
+
v-show="mostrarModal(`confirmacao${data.id}`)"
|
|
11
11
|
>
|
|
12
12
|
<b-col sm="12">
|
|
13
13
|
<div class="div-botao text-center">
|
|
14
|
-
<
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
:
|
|
14
|
+
<Button
|
|
15
|
+
key="confirmacaoNao"
|
|
16
|
+
type="edit"
|
|
17
|
+
title="cancelar"
|
|
18
|
+
size="small"
|
|
19
|
+
:clicked="cancelar"
|
|
20
20
|
/>
|
|
21
|
-
<
|
|
22
|
-
|
|
23
|
-
:
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
:
|
|
21
|
+
<Button
|
|
22
|
+
key="confirmacaoSim"
|
|
23
|
+
:type="type"
|
|
24
|
+
title="Sim, confirmar"
|
|
25
|
+
size="medium"
|
|
26
|
+
:clicked="confirmar"
|
|
27
27
|
/>
|
|
28
28
|
</div>
|
|
29
29
|
</b-col>
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
</template>
|
|
33
33
|
|
|
34
34
|
<script>
|
|
35
|
-
import
|
|
35
|
+
import Button from "@nixweb/nixloc-ui/src/component/forms/Button";
|
|
36
36
|
import Modal from "@nixweb/nixloc-ui/src/component/forms/Modal";
|
|
37
37
|
|
|
38
38
|
import { mapGetters, mapMutations } from "vuex";
|
|
@@ -40,31 +40,31 @@ import { mapGetters, mapMutations } from "vuex";
|
|
|
40
40
|
export default {
|
|
41
41
|
name: "Confirmacao",
|
|
42
42
|
components: {
|
|
43
|
-
|
|
43
|
+
Button,
|
|
44
44
|
Modal,
|
|
45
45
|
},
|
|
46
46
|
props: {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
47
|
+
title: String,
|
|
48
|
+
type: String,
|
|
49
|
+
data: Object,
|
|
50
50
|
confirmado: Function,
|
|
51
51
|
},
|
|
52
52
|
methods: {
|
|
53
|
-
...mapMutations("generic", ["abrirModal", "
|
|
53
|
+
...mapMutations("generic", ["abrirModal", "hideModal", "removeLoading"]),
|
|
54
54
|
executar() {
|
|
55
|
-
this.abrirModal(`confirmacao${this.
|
|
55
|
+
this.abrirModal(`confirmacao${this.data.id}`);
|
|
56
56
|
},
|
|
57
57
|
confirmar() {
|
|
58
58
|
let self = this;
|
|
59
59
|
setTimeout(function () {
|
|
60
|
-
if (self.confirmado) self.confirmado(self.
|
|
61
|
-
self.
|
|
62
|
-
self.
|
|
60
|
+
if (self.confirmado) self.confirmado(self.data);
|
|
61
|
+
self.removeLoading(["confirmacaoSim"]);
|
|
62
|
+
self.hideModal();
|
|
63
63
|
}, 200);
|
|
64
64
|
},
|
|
65
65
|
cancelar() {
|
|
66
|
-
this.
|
|
67
|
-
this.
|
|
66
|
+
this.removeLoading(["confirmacaoNao"]);
|
|
67
|
+
this.hideModal();
|
|
68
68
|
},
|
|
69
69
|
},
|
|
70
70
|
computed: {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<span class="dica" v-if="
|
|
2
|
+
<span class="dica" v-if="title">
|
|
3
3
|
<i
|
|
4
4
|
class="fal fa-exclamation-circle"
|
|
5
|
-
:title="
|
|
6
|
-
v-b-popover.hover.top="
|
|
5
|
+
:title="title"
|
|
6
|
+
v-b-popover.hover.top="description"
|
|
7
7
|
></i>
|
|
8
8
|
</span>
|
|
9
9
|
</template>
|
|
@@ -13,20 +13,20 @@ import { mapGetters } from "vuex";
|
|
|
13
13
|
export default {
|
|
14
14
|
name: "Dica",
|
|
15
15
|
props: {
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
field: String,
|
|
17
|
+
formName: String,
|
|
18
18
|
},
|
|
19
19
|
data() {
|
|
20
20
|
return {
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
title: "",
|
|
22
|
+
description: "",
|
|
23
23
|
};
|
|
24
24
|
},
|
|
25
25
|
mounted() {
|
|
26
|
-
let dica = this.dica({
|
|
26
|
+
let dica = this.dica({ field: this.field, formName: this.formName });
|
|
27
27
|
if (dica) {
|
|
28
|
-
this.
|
|
29
|
-
this.
|
|
28
|
+
this.title = dica.title;
|
|
29
|
+
this.description = dica.description;
|
|
30
30
|
}
|
|
31
31
|
},
|
|
32
32
|
computed: {
|
|
@@ -39,18 +39,18 @@ export default {
|
|
|
39
39
|
return this.$store.state.generic.documentoHtml;
|
|
40
40
|
},
|
|
41
41
|
set(value) {
|
|
42
|
-
this.
|
|
42
|
+
this.updateDocumentHtml(value);
|
|
43
43
|
},
|
|
44
44
|
},
|
|
45
45
|
},
|
|
46
46
|
methods: {
|
|
47
|
-
...mapMutations("generic", ["
|
|
47
|
+
...mapMutations("generic", ["updateDocumentHtml", "addEvent"]),
|
|
48
48
|
onReady(editor) {
|
|
49
49
|
const toolbarContainer = document.querySelector(".document-editor__toolbar");
|
|
50
50
|
toolbarContainer.appendChild(editor.ui.view.toolbar.element);
|
|
51
51
|
},
|
|
52
52
|
modificou() {
|
|
53
|
-
this.
|
|
53
|
+
this.addEvent({ nome: "documentoEditorFocus" });
|
|
54
54
|
},
|
|
55
55
|
},
|
|
56
56
|
};
|
|
@@ -26,9 +26,9 @@ export default {
|
|
|
26
26
|
},
|
|
27
27
|
},
|
|
28
28
|
computed: {
|
|
29
|
-
...mapGetters("generic", ["
|
|
29
|
+
...mapGetters("generic", ["groupBy"]),
|
|
30
30
|
produtoAgrupado() {
|
|
31
|
-
return this.
|
|
31
|
+
return this.groupBy({ array: this.d.produto, key: "pGp" });
|
|
32
32
|
},
|
|
33
33
|
},
|
|
34
34
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
|
-
<div class="linha-seta" v-if="
|
|
4
|
-
<div class="seta" @click="
|
|
3
|
+
<div class="linha-seta" v-if="type == 'seta'">
|
|
4
|
+
<div class="seta" @click="show" v-if="!mostrarCollapse">
|
|
5
5
|
<b-row>
|
|
6
6
|
<b-col sm="6" class="text-left">
|
|
7
|
-
<span class="
|
|
7
|
+
<span class="title">{{ title }}</span>
|
|
8
8
|
</b-col>
|
|
9
9
|
<b-col sm="6" class="text-right">
|
|
10
10
|
<i class="far fa-plus"></i>
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
<div class="seta" @click="esconder" v-if="mostrarCollapse">
|
|
15
15
|
<b-row>
|
|
16
16
|
<b-col sm="6" class="text-left">
|
|
17
|
-
<span class="
|
|
17
|
+
<span class="title">{{ title }}</span>
|
|
18
18
|
</b-col>
|
|
19
19
|
<b-col sm="6" class="text-right">
|
|
20
20
|
<i class="far fa-minus"></i>
|
|
@@ -25,17 +25,17 @@
|
|
|
25
25
|
<b-collapse id="collapse-4" v-model="mostrarCollapse" class="mt-2">
|
|
26
26
|
<slot></slot>
|
|
27
27
|
</b-collapse>
|
|
28
|
-
<div v-if="
|
|
28
|
+
<div v-if="type == 'botao'">
|
|
29
29
|
<b-row>
|
|
30
30
|
<b-col sm="12">
|
|
31
31
|
<div class="text-center">
|
|
32
|
-
<
|
|
32
|
+
<Button
|
|
33
33
|
v-if="!mostrarCollapse"
|
|
34
|
-
:
|
|
35
|
-
:
|
|
36
|
-
:
|
|
37
|
-
|
|
38
|
-
:
|
|
34
|
+
:title="botaoMostrar.title"
|
|
35
|
+
:classIcon="botaoMostrar.icon"
|
|
36
|
+
:type="botaoMostrar.type"
|
|
37
|
+
size="small"
|
|
38
|
+
:clicked="show"
|
|
39
39
|
/>
|
|
40
40
|
</div>
|
|
41
41
|
</b-col>
|
|
@@ -43,14 +43,14 @@
|
|
|
43
43
|
<b-row>
|
|
44
44
|
<b-col>
|
|
45
45
|
<div class="text-center">
|
|
46
|
-
<
|
|
46
|
+
<Button
|
|
47
47
|
v-if="mostrarCollapse"
|
|
48
|
-
|
|
49
|
-
:
|
|
50
|
-
:
|
|
51
|
-
:
|
|
52
|
-
|
|
53
|
-
:
|
|
48
|
+
key="esconderCollapse"
|
|
49
|
+
:title="botaoEsconder.title"
|
|
50
|
+
:classIcon="botaoEsconder.icon"
|
|
51
|
+
:type="botaoEsconder.type"
|
|
52
|
+
size="small"
|
|
53
|
+
:clicked="esconder"
|
|
54
54
|
/>
|
|
55
55
|
</div>
|
|
56
56
|
</b-col>
|
|
@@ -60,21 +60,21 @@
|
|
|
60
60
|
</template>
|
|
61
61
|
|
|
62
62
|
<script>
|
|
63
|
-
import
|
|
63
|
+
import Button from "../forms/Button.vue";
|
|
64
64
|
|
|
65
65
|
import { mapMutations } from "vuex";
|
|
66
66
|
|
|
67
67
|
export default {
|
|
68
|
-
components: {
|
|
68
|
+
components: { Button },
|
|
69
69
|
name: "EsconderMostrar",
|
|
70
70
|
props: {
|
|
71
71
|
botaoMostrar: Object,
|
|
72
72
|
botaoEsconder: Object,
|
|
73
|
-
|
|
73
|
+
type: {
|
|
74
74
|
type: String,
|
|
75
75
|
default: "botao",
|
|
76
76
|
},
|
|
77
|
-
|
|
77
|
+
title: String,
|
|
78
78
|
iniciarAberto: {
|
|
79
79
|
type: Boolean,
|
|
80
80
|
default: false,
|
|
@@ -89,8 +89,8 @@ export default {
|
|
|
89
89
|
this.mostrarCollapse = this.iniciarAberto;
|
|
90
90
|
},
|
|
91
91
|
methods: {
|
|
92
|
-
...mapMutations("generic", ["
|
|
93
|
-
|
|
92
|
+
...mapMutations("generic", ["removeLoading"]),
|
|
93
|
+
show() {
|
|
94
94
|
let self = this;
|
|
95
95
|
setTimeout(function () {
|
|
96
96
|
self.mostrarCollapse = true;
|
|
@@ -105,7 +105,7 @@ export default {
|
|
|
105
105
|
this.removeCarregandoBotao();
|
|
106
106
|
},
|
|
107
107
|
removeCarregandoBotao() {
|
|
108
|
-
this.
|
|
108
|
+
this.removeLoading(["mostrarCollapse", "esconderCollapse"]);
|
|
109
109
|
},
|
|
110
110
|
},
|
|
111
111
|
};
|
|
@@ -118,7 +118,7 @@ export default {
|
|
|
118
118
|
margin-bottom: 10px;
|
|
119
119
|
}
|
|
120
120
|
|
|
121
|
-
.
|
|
121
|
+
.title {
|
|
122
122
|
font-size: 16px;
|
|
123
123
|
margin-left: 5px;
|
|
124
124
|
}
|
|
@@ -2,24 +2,24 @@
|
|
|
2
2
|
<div>
|
|
3
3
|
<download-excel
|
|
4
4
|
:fields="coluna"
|
|
5
|
-
:data="
|
|
5
|
+
:data="data"
|
|
6
6
|
:before-finish="exportacaoFinalizada"
|
|
7
7
|
worksheet="Planilha"
|
|
8
8
|
:name="`${nomeArquivo}.xls`"
|
|
9
9
|
>
|
|
10
|
-
<
|
|
11
|
-
|
|
12
|
-
:
|
|
13
|
-
:
|
|
14
|
-
|
|
15
|
-
:
|
|
10
|
+
<Button
|
|
11
|
+
key="exportarExcel"
|
|
12
|
+
:type="botao.type"
|
|
13
|
+
:title="botao.title"
|
|
14
|
+
classIcon="fas fa-file-excel"
|
|
15
|
+
:size="botao.size"
|
|
16
16
|
/>
|
|
17
17
|
</download-excel>
|
|
18
18
|
</div>
|
|
19
19
|
</template>
|
|
20
20
|
|
|
21
21
|
<script>
|
|
22
|
-
import
|
|
22
|
+
import Button from "@nixweb/nixloc-ui/src/component/forms/Button";
|
|
23
23
|
|
|
24
24
|
import { mapState, mapGetters, mapActions, mapMutations } from "vuex";
|
|
25
25
|
|
|
@@ -28,10 +28,10 @@ export default {
|
|
|
28
28
|
props: {
|
|
29
29
|
botao: Object,
|
|
30
30
|
cabecalho: Array,
|
|
31
|
-
|
|
31
|
+
data: Array,
|
|
32
32
|
},
|
|
33
33
|
components: {
|
|
34
|
-
|
|
34
|
+
Button,
|
|
35
35
|
},
|
|
36
36
|
data() {
|
|
37
37
|
return {
|
|
@@ -46,21 +46,21 @@ export default {
|
|
|
46
46
|
};
|
|
47
47
|
},
|
|
48
48
|
methods: {
|
|
49
|
-
...mapMutations("generic", ["
|
|
49
|
+
...mapMutations("generic", ["removeLoading"]),
|
|
50
50
|
exportacaoFinalizada() {
|
|
51
|
-
this.
|
|
51
|
+
this.removeLoading(["exportarExcel"]);
|
|
52
52
|
},
|
|
53
53
|
},
|
|
54
54
|
computed: {
|
|
55
55
|
coluna() {
|
|
56
56
|
var object = this.cabecalho.reduce(
|
|
57
|
-
(obj, item) => Object.assign(obj, { [item.
|
|
57
|
+
(obj, item) => Object.assign(obj, { [item.title]: item.field }),
|
|
58
58
|
{}
|
|
59
59
|
);
|
|
60
60
|
return object;
|
|
61
61
|
},
|
|
62
62
|
nomeArquivo() {
|
|
63
|
-
return this.$route.matched[0].props.default.
|
|
63
|
+
return this.$route.matched[0].props.default.report;
|
|
64
64
|
},
|
|
65
65
|
},
|
|
66
66
|
};
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
<div v-show="carregando" class="full-width">
|
|
4
4
|
<Carregando
|
|
5
5
|
:centralizado="true"
|
|
6
|
-
:
|
|
7
|
-
:
|
|
8
|
-
|
|
6
|
+
:width="70"
|
|
7
|
+
:height="70"
|
|
8
|
+
message="Por favor aguarde, estamos gerando a impressão..."
|
|
9
9
|
/>
|
|
10
10
|
</div>
|
|
11
11
|
<vue-html2pdf
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
>
|
|
29
29
|
<section slot="pdf-content">
|
|
30
30
|
<section class="pdf-item">
|
|
31
|
-
<BarraRolagem :
|
|
32
|
-
<div id="
|
|
31
|
+
<BarraRolagem :height="alturaBarraRolagem">
|
|
32
|
+
<div id="height">
|
|
33
33
|
<slot></slot>
|
|
34
34
|
</div>
|
|
35
35
|
</BarraRolagem>
|
|
@@ -46,15 +46,15 @@
|
|
|
46
46
|
</template>
|
|
47
47
|
|
|
48
48
|
<script>
|
|
49
|
-
import Carregando from "./
|
|
50
|
-
import BarraRolagem from "../layout/
|
|
49
|
+
import Carregando from "./Loading.vue";
|
|
50
|
+
import BarraRolagem from "../layout/Scrollbar.vue";
|
|
51
51
|
import VueHtml2pdf from "vue-html2pdf";
|
|
52
52
|
|
|
53
53
|
export default {
|
|
54
54
|
name: "ExportarPDF",
|
|
55
55
|
components: { VueHtml2pdf, BarraRolagem, Carregando },
|
|
56
56
|
props: {
|
|
57
|
-
|
|
57
|
+
title: String,
|
|
58
58
|
nomeArquivo: String,
|
|
59
59
|
tamanhoPagina: String,
|
|
60
60
|
orientacao: String,
|
|
@@ -83,7 +83,7 @@ export default {
|
|
|
83
83
|
console.log("finalizou");
|
|
84
84
|
},
|
|
85
85
|
gerarRelatorio() {
|
|
86
|
-
const listElm = document.querySelector("#
|
|
86
|
+
const listElm = document.querySelector("#height");
|
|
87
87
|
this.alturaBarraRolagem = listElm.scrollHeight;
|
|
88
88
|
this.carregando = true;
|
|
89
89
|
let self = this;
|
|
@@ -100,7 +100,7 @@ export default {
|
|
|
100
100
|
margin-bottom: 20px;
|
|
101
101
|
}
|
|
102
102
|
|
|
103
|
-
.
|
|
103
|
+
.title {
|
|
104
104
|
font-size: 20px;
|
|
105
105
|
}
|
|
106
106
|
|