@nixweb/nixloc-ui 0.0.121 → 0.0.124
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 +2 -2
- package/docs/src/store/modulos/relatorio.drawio +2 -2
- package/package.json +77 -77
- package/public/styles/app.css +1 -1
- 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} +8 -8
- package/src/component/forms/{Cor.vue → Color.vue} +9 -9
- package/src/component/forms/DateTime.vue +55 -55
- package/src/component/forms/{BotaoDropdown.vue → Dropdown.vue} +58 -58
- 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/{Topo.vue → Header.vue} +5 -5
- 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 +15 -15
- package/src/component/layout/Wizard.vue +3 -3
- package/src/component/shared/{CodigoEditor.vue → CodeEditor.vue} +25 -25
- package/src/component/shared/Collapse.vue +131 -0
- package/src/component/shared/Confirmation.vue +80 -0
- package/src/component/shared/{DocumentoEditor.vue → DocumentEditor.vue} +10 -16
- package/src/component/shared/{DocumentoPreview.vue → DocumentPreview.vue} +2 -2
- package/src/component/shared/ExportExcel.vue +67 -0
- package/src/component/shared/{ExportarPDF.vue → ExportPDF.vue} +18 -18
- package/src/component/shared/HeaderPrint.vue +36 -0
- package/src/component/shared/HorizontalFilter.vue +59 -0
- package/src/component/shared/LegendaParametro.vue +22 -22
- package/src/component/shared/{Carregando.vue → Loading.vue} +16 -16
- package/src/component/shared/LoadingMoreButton.vue +23 -0
- package/src/component/shared/Messages.vue +83 -0
- package/src/component/shared/{Paginacao.vue → Pagination.vue} +12 -12
- package/src/component/shared/ProgressBar.vue +21 -0
- package/src/component/shared/{BotaoConsulta.vue → QueryButton.vue} +16 -16
- package/src/component/shared/SaveCancel.vue +56 -0
- package/src/component/shared/{Pesquisa.vue → Search.vue} +46 -46
- package/src/component/shared/Table.vue +243 -0
- package/src/component/shared/TableButton.vue +36 -0
- package/src/component/shared/{Registro.vue → TableTotalRecords.vue} +7 -7
- package/src/component/shared/{ResumoTabela.vue → TableTotalization.vue} +12 -8
- package/src/component/shared/Tip.vue +42 -0
- package/src/component/shared/Toast.vue +7 -7
- package/src/component/shared/{FiltroVertical.vue → VerticalFilter.vue} +24 -24
- package/src/component/shared/query-builder/AddRule.vue +187 -0
- package/src/component/shared/query-builder/ConvertToOdata.js +80 -0
- package/src/component/shared/query-builder/DynamicComponent.vue +107 -0
- package/src/component/shared/query-builder/Fields.vue +127 -0
- package/src/component/shared/query-builder/ListDynamicComponent.vue +42 -0
- package/src/component/shared/query-builder/QueryBuilder.vue +25 -120
- package/src/component/shared/query-builder/{Filtro.vue → Rules.vue} +13 -18
- package/src/component/shared/query-builder/SelectRule.vue +96 -0
- package/src/component/shared/query-builder/Tags.vue +14 -14
- package/src/component/shared/query-builder/{Rodape.vue → Totalization.vue} +10 -10
- package/src/component/template/AddEditReport.vue +106 -0
- package/src/component/template/ListViewWithHandlerData.vue +231 -0
- package/src/component/template/ViewTemplateConfiguration.vue +69 -0
- package/src/component/template/ViewTemplateDocumentView.vue +227 -0
- package/src/component/template/ViewTemplateReportList.vue +230 -0
- package/src/component/template/ViewTemplateReportPreview.vue +500 -0
- package/src/component/template/ViewTemplateWithSalveCancel.vue +32 -0
- package/src/component/template/ViewTemplateWithTable.vue +49 -0
- package/src/component/template/model/Report.js +6 -0
- package/src/component/value-objects/DadosContato.vue +34 -35
- package/src/component/value-objects/DadosPessoa.vue +58 -58
- package/src/component/value-objects/Endereco.vue +96 -97
- 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/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 -335
- 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/BotaoCarregarMais.vue +0 -23
- package/src/component/shared/CabecalhoImpressao.vue +0 -36
- package/src/component/shared/Confirmacao.vue +0 -80
- package/src/component/shared/Dica.vue +0 -42
- package/src/component/shared/EsconderMostrar.vue +0 -131
- package/src/component/shared/ExportarExcel.vue +0 -67
- package/src/component/shared/FiltroHorizontal.vue +0 -59
- package/src/component/shared/Mensagem.vue +0 -86
- package/src/component/shared/Progresso.vue +0 -21
- package/src/component/shared/SalvarCancelar.vue +0 -56
- package/src/component/shared/Tabela.vue +0 -275
- package/src/component/shared/TabelaBotao.vue +0 -36
- package/src/component/shared/query-builder/Campo.vue +0 -116
- package/src/component/shared/query-builder/ConverteParaOdata.js +0 -77
- 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 -187
- package/src/component/shared/query-builder/main.js +0 -81
- package/src/component/template/ModeloAdicionarModificarView.vue +0 -32
- package/src/component/template/ModeloDocumentoView.vue +0 -227
- package/src/component/template/ModeloLista.vue +0 -231
- package/src/component/template/ModeloRelatorioListaView.vue +0 -227
- package/src/component/template/ModeloRelatorioView.vue +0 -489
- package/src/component/template/ModeloSubView.vue +0 -69
- package/src/component/template/ModeloView.vue +0 -49
- package/src/component/template/Relatorio.js +0 -10
- package/src/component/template/RelatorioAdicionarModificar.vue +0 -106
- package/src/store/modulos/generic.js +0 -494
- package/src/store/modulos/relatorio.js +0 -204
- package/src/store/modulos/usuario.js +0 -38
- package/src/store/modulos/validation.js +0 -39
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<div :class="{ 'g-div-molded': showMolded }">
|
|
4
|
+
<b-row>
|
|
5
|
+
<b-col sm="12"
|
|
6
|
+
><div>
|
|
7
|
+
<HorizontalFilter v-if="showHorizontalFilter">
|
|
8
|
+
<div slot="content-filter-horizontal">
|
|
9
|
+
<slot name="content-filter-horizontal"></slot>
|
|
10
|
+
</div>
|
|
11
|
+
</HorizontalFilter></div
|
|
12
|
+
></b-col>
|
|
13
|
+
</b-row>
|
|
14
|
+
<b-row>
|
|
15
|
+
<b-col sm="6">
|
|
16
|
+
<TableTotalization :totalization="content.totalization" />
|
|
17
|
+
</b-col>
|
|
18
|
+
<b-col sm="6">
|
|
19
|
+
<TableTotalRecords :totalRecords="content.totalRecords" />
|
|
20
|
+
</b-col>
|
|
21
|
+
</b-row>
|
|
22
|
+
<FixedBar posicao="topo" v-show="selected.length > 0">
|
|
23
|
+
<div>
|
|
24
|
+
<Button
|
|
25
|
+
v-if="buttonRemove"
|
|
26
|
+
key="remove"
|
|
27
|
+
:title="`Remover ${selected.length}`"
|
|
28
|
+
type="danger"
|
|
29
|
+
size="small"
|
|
30
|
+
:clicked="removeSelected"
|
|
31
|
+
/>
|
|
32
|
+
<slot name="content-buttons-table-header"></slot>
|
|
33
|
+
</div>
|
|
34
|
+
</FixedBar>
|
|
35
|
+
<Table
|
|
36
|
+
:header="templateList.headerTable"
|
|
37
|
+
:data="content.data"
|
|
38
|
+
:showChecks="templateList.showChecks"
|
|
39
|
+
>
|
|
40
|
+
<div slot="content-buttons-table">
|
|
41
|
+
<slot name="content-buttons-table"></slot>
|
|
42
|
+
</div>
|
|
43
|
+
</Table>
|
|
44
|
+
</div>
|
|
45
|
+
<br />
|
|
46
|
+
<Pagination key="templateList" :totalRecords="content.totalRecords" />
|
|
47
|
+
</div>
|
|
48
|
+
</template>
|
|
49
|
+
|
|
50
|
+
<script>
|
|
51
|
+
import Pagination from "../shared/Pagination.vue";
|
|
52
|
+
import Table from "../shared/Table.vue";
|
|
53
|
+
import Button from "../forms/Button.vue";
|
|
54
|
+
import FixedBar from "../layout/FixedBar.vue";
|
|
55
|
+
import TableTotalRecords from "../shared/TableTotalRecords.vue";
|
|
56
|
+
import TableTotalization from "../shared/TableTotalization.vue";
|
|
57
|
+
import HorizontalFilter from "../shared/HorizontalFilter.vue";
|
|
58
|
+
|
|
59
|
+
import { mapState, mapGetters, mapActions, mapMutations } from "vuex";
|
|
60
|
+
|
|
61
|
+
export default {
|
|
62
|
+
name: "ListViewWithHandlerData",
|
|
63
|
+
props: {
|
|
64
|
+
templateList: Object,
|
|
65
|
+
propsParam: Object,
|
|
66
|
+
showMolded: {
|
|
67
|
+
type: Boolean,
|
|
68
|
+
default: true,
|
|
69
|
+
},
|
|
70
|
+
showHorizontalFilter: {
|
|
71
|
+
type: Boolean,
|
|
72
|
+
default: true,
|
|
73
|
+
},
|
|
74
|
+
buttonRemove: {
|
|
75
|
+
type: Boolean,
|
|
76
|
+
default: true,
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
components: {
|
|
80
|
+
HorizontalFilter,
|
|
81
|
+
TableTotalization,
|
|
82
|
+
TableTotalRecords,
|
|
83
|
+
FixedBar,
|
|
84
|
+
Button,
|
|
85
|
+
Table,
|
|
86
|
+
Pagination,
|
|
87
|
+
},
|
|
88
|
+
data() {
|
|
89
|
+
return {
|
|
90
|
+
content: {
|
|
91
|
+
data: [],
|
|
92
|
+
totalRecords: 0,
|
|
93
|
+
},
|
|
94
|
+
baseParams: {
|
|
95
|
+
search: undefined,
|
|
96
|
+
filter: "contem",
|
|
97
|
+
currentPage: 1,
|
|
98
|
+
totalPerPage: 10,
|
|
99
|
+
},
|
|
100
|
+
paramsFilter: [],
|
|
101
|
+
dynamicFilter: {},
|
|
102
|
+
};
|
|
103
|
+
},
|
|
104
|
+
created() {
|
|
105
|
+
// o carregamento inicial getAll() é feito pela mudança no paginationKey
|
|
106
|
+
},
|
|
107
|
+
mounted() {
|
|
108
|
+
this.updatePagination({
|
|
109
|
+
key: "templateList",
|
|
110
|
+
totalPerPage: this.baseParams.totalPerPage,
|
|
111
|
+
});
|
|
112
|
+
},
|
|
113
|
+
beforeDestroy() {
|
|
114
|
+
let search = { content: "", filter: { content: "contem", id: "contem" } };
|
|
115
|
+
this.updateSearch(search);
|
|
116
|
+
},
|
|
117
|
+
computed: {
|
|
118
|
+
...mapState("generic", [
|
|
119
|
+
"selected",
|
|
120
|
+
"methodExecutedApi",
|
|
121
|
+
"search",
|
|
122
|
+
"executedSearch",
|
|
123
|
+
"clearedSearch",
|
|
124
|
+
"totalPerPage",
|
|
125
|
+
"selectStatic",
|
|
126
|
+
]),
|
|
127
|
+
...mapGetters("generic", ["pagination"]),
|
|
128
|
+
paginationKey: function () {
|
|
129
|
+
return this.pagination("templateList");
|
|
130
|
+
},
|
|
131
|
+
},
|
|
132
|
+
methods: {
|
|
133
|
+
...mapActions("generic", ["getApi", "deleteAllApi"]),
|
|
134
|
+
...mapMutations("generic", [
|
|
135
|
+
"removeLoading",
|
|
136
|
+
"addSelected",
|
|
137
|
+
"updatePagination",
|
|
138
|
+
"updateSearch",
|
|
139
|
+
]),
|
|
140
|
+
getAll() {
|
|
141
|
+
let obj = { ...this.baseParams, ...this.dynamicFilter, ...this.propsParam };
|
|
142
|
+
let params = { url: this.templateList.urlGetApi, obj: obj };
|
|
143
|
+
this.getApi(params).then((response) => {
|
|
144
|
+
this.content = response.content;
|
|
145
|
+
this.removeLoading(["panel", "modeloSubView", "search", "clean"]);
|
|
146
|
+
});
|
|
147
|
+
},
|
|
148
|
+
removeSelected() {
|
|
149
|
+
let params = {
|
|
150
|
+
url: this.templateList.urlRemoverTodosApi,
|
|
151
|
+
selected: this.selected,
|
|
152
|
+
};
|
|
153
|
+
this.deleteAllApi(params).then(() => {
|
|
154
|
+
this.removeLoading(["remove"]);
|
|
155
|
+
this.addSelected([]);
|
|
156
|
+
});
|
|
157
|
+
},
|
|
158
|
+
limpaParams() {
|
|
159
|
+
this.baseParams.currentPage = 1;
|
|
160
|
+
},
|
|
161
|
+
},
|
|
162
|
+
watch: {
|
|
163
|
+
methodExecutedApi: function (value) {
|
|
164
|
+
if (
|
|
165
|
+
value === "postApi" ||
|
|
166
|
+
value === "putApi" ||
|
|
167
|
+
value === "deleteAllApi" ||
|
|
168
|
+
value === "deleteAllApiErro"
|
|
169
|
+
) {
|
|
170
|
+
this.getAll();
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
executedSearch: function () {
|
|
174
|
+
this.baseParams.search = this.search.content;
|
|
175
|
+
this.baseParams.filter = this.search.filter.id;
|
|
176
|
+
this.limpaParams();
|
|
177
|
+
this.getAll();
|
|
178
|
+
},
|
|
179
|
+
clearedSearch: function () {
|
|
180
|
+
this.baseParams.search = "";
|
|
181
|
+
this.baseParams.filter = "";
|
|
182
|
+
this.limpaParams();
|
|
183
|
+
this.getAll();
|
|
184
|
+
},
|
|
185
|
+
paginationKey: {
|
|
186
|
+
handler(value) {
|
|
187
|
+
this.limpaParams();
|
|
188
|
+
this.baseParams.currentPage = value.currentPage;
|
|
189
|
+
this.getAll();
|
|
190
|
+
},
|
|
191
|
+
deep: true,
|
|
192
|
+
},
|
|
193
|
+
selectStatic: {
|
|
194
|
+
handler(value) {
|
|
195
|
+
let fieldTarget = value.fieldTarget;
|
|
196
|
+
let obj = { key: fieldTarget, valor: value.valor };
|
|
197
|
+
this.paramsFilter.push(obj);
|
|
198
|
+
|
|
199
|
+
var result = {};
|
|
200
|
+
for (var i = 0; i < this.paramsFilter.length; i++) {
|
|
201
|
+
let key = this.paramsFilter[i].key;
|
|
202
|
+
let valor = this.paramsFilter[i].valor;
|
|
203
|
+
|
|
204
|
+
if (key == "periodo") {
|
|
205
|
+
result["inicio"] = valor.inicio;
|
|
206
|
+
result["fim"] = valor.fim;
|
|
207
|
+
} else {
|
|
208
|
+
result[key] = valor;
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
this.dynamicFilter = result;
|
|
213
|
+
|
|
214
|
+
this.updatePagination({
|
|
215
|
+
key: "templateList",
|
|
216
|
+
totalPerPage: this.dynamicFilter.totalPerPage,
|
|
217
|
+
});
|
|
218
|
+
|
|
219
|
+
this.getAll();
|
|
220
|
+
},
|
|
221
|
+
deep: true,
|
|
222
|
+
},
|
|
223
|
+
},
|
|
224
|
+
};
|
|
225
|
+
</script>
|
|
226
|
+
|
|
227
|
+
<style scoped>
|
|
228
|
+
.div-button-excluir {
|
|
229
|
+
padding-bottom: 10px;
|
|
230
|
+
}
|
|
231
|
+
</style>
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<Loading :center="false" v-show="carregando('modeloSubView')" />
|
|
4
|
+
<div v-show="!carregando('modeloSubView')">
|
|
5
|
+
<slot name="content-buttons"></slot>
|
|
6
|
+
<div v-if="showSearch">
|
|
7
|
+
<Search />
|
|
8
|
+
<br />
|
|
9
|
+
</div>
|
|
10
|
+
|
|
11
|
+
<ListViewWithHandlerData
|
|
12
|
+
:templateList="templateList"
|
|
13
|
+
:propsParam="propsParam"
|
|
14
|
+
:showMolded="false"
|
|
15
|
+
:showHorizontalFilter="showHorizontalFilter"
|
|
16
|
+
:buttonRemove="buttonRemove"
|
|
17
|
+
>
|
|
18
|
+
<div slot="content-buttons-table-header">
|
|
19
|
+
<slot name="content-buttons-table-header"></slot>
|
|
20
|
+
</div>
|
|
21
|
+
<div slot="content-filter-horizontal">
|
|
22
|
+
<slot name="content-filter-horizontal"></slot>
|
|
23
|
+
</div>
|
|
24
|
+
<div slot="content-buttons-table">
|
|
25
|
+
<slot name="content-buttons-table"></slot>
|
|
26
|
+
</div>
|
|
27
|
+
</ListViewWithHandlerData>
|
|
28
|
+
</div>
|
|
29
|
+
</div>
|
|
30
|
+
</template>
|
|
31
|
+
|
|
32
|
+
<script>
|
|
33
|
+
import Search from "../shared/Search.vue";
|
|
34
|
+
import Loading from "../shared/Loading.vue";
|
|
35
|
+
|
|
36
|
+
import ListViewWithHandlerData from "@nixweb/nixloc-ui/src/component/template/ListViewWithHandlerData.vue";
|
|
37
|
+
|
|
38
|
+
import { mapGetters, mapMutations } from "vuex";
|
|
39
|
+
|
|
40
|
+
export default {
|
|
41
|
+
name: "ViewTemplateConfiguration",
|
|
42
|
+
components: { Search, Loading, ListViewWithHandlerData },
|
|
43
|
+
props: {
|
|
44
|
+
templateList: Object,
|
|
45
|
+
propsParam: Object,
|
|
46
|
+
showSearch: {
|
|
47
|
+
type: Boolean,
|
|
48
|
+
default: true,
|
|
49
|
+
},
|
|
50
|
+
showHorizontalFilter: {
|
|
51
|
+
type: Boolean,
|
|
52
|
+
default: true,
|
|
53
|
+
},
|
|
54
|
+
buttonRemove: {
|
|
55
|
+
type: Boolean,
|
|
56
|
+
default: true,
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
computed: {
|
|
60
|
+
...mapGetters("generic", ["carregando"]),
|
|
61
|
+
},
|
|
62
|
+
created() {
|
|
63
|
+
this.addLoading("modeloSubView");
|
|
64
|
+
},
|
|
65
|
+
methods: {
|
|
66
|
+
...mapMutations("generic", ["addLoading"]),
|
|
67
|
+
},
|
|
68
|
+
};
|
|
69
|
+
</script>
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<Panel
|
|
4
|
+
:module="panel.module"
|
|
5
|
+
:title="panel.title"
|
|
6
|
+
:showFilter="panel.showFilter"
|
|
7
|
+
:showSearch="panel.showSearch"
|
|
8
|
+
:showButtons="panel.showButtons"
|
|
9
|
+
>
|
|
10
|
+
<div slot="content-main">
|
|
11
|
+
<div>
|
|
12
|
+
<div class="div-top">
|
|
13
|
+
<Molded>
|
|
14
|
+
<b-row>
|
|
15
|
+
<b-col sm="6">
|
|
16
|
+
<div class="side-by-side">
|
|
17
|
+
<Button
|
|
18
|
+
key="saveDocument"
|
|
19
|
+
type="success"
|
|
20
|
+
title="Salvar"
|
|
21
|
+
classIcon="fas fa-save"
|
|
22
|
+
:disabled="isDisabled"
|
|
23
|
+
size="small"
|
|
24
|
+
:clicked="saveDocument"
|
|
25
|
+
/>
|
|
26
|
+
</div>
|
|
27
|
+
<div class="side-by-side">
|
|
28
|
+
<Button
|
|
29
|
+
v-if="id"
|
|
30
|
+
key="saveAs"
|
|
31
|
+
type="success"
|
|
32
|
+
title="Fazer uma cópia"
|
|
33
|
+
classIcon="fas fa-clone"
|
|
34
|
+
size="small"
|
|
35
|
+
:clicked="saveAs"
|
|
36
|
+
/>
|
|
37
|
+
</div>
|
|
38
|
+
</b-col>
|
|
39
|
+
<b-col class="text-right" sm="6">
|
|
40
|
+
<div class="side-by-side">
|
|
41
|
+
<Button
|
|
42
|
+
key="showModalLegend"
|
|
43
|
+
type="info"
|
|
44
|
+
classIcon="fas fa-book-reader"
|
|
45
|
+
size="small"
|
|
46
|
+
:clicked="showModalLegend"
|
|
47
|
+
/>
|
|
48
|
+
</div>
|
|
49
|
+
<div class="side-by-side">
|
|
50
|
+
<Button
|
|
51
|
+
key="showModalCode"
|
|
52
|
+
type="info"
|
|
53
|
+
classIcon="far fa-code"
|
|
54
|
+
size="small"
|
|
55
|
+
:clicked="showModalCode"
|
|
56
|
+
/>
|
|
57
|
+
</div>
|
|
58
|
+
<div class="side-by-side">
|
|
59
|
+
<Button
|
|
60
|
+
key="showModalPreview"
|
|
61
|
+
type="info"
|
|
62
|
+
title="Visualizar"
|
|
63
|
+
classIcon="far fa-eye"
|
|
64
|
+
size="small"
|
|
65
|
+
:clicked="showModalPreview"
|
|
66
|
+
/>
|
|
67
|
+
</div>
|
|
68
|
+
</b-col>
|
|
69
|
+
</b-row>
|
|
70
|
+
</Molded>
|
|
71
|
+
</div>
|
|
72
|
+
<Modal title="Salvar" :width="500" v-show="showModal('saveDocument')">
|
|
73
|
+
<slot></slot>
|
|
74
|
+
</Modal>
|
|
75
|
+
<Modal title="Parâmetros" :width="1100" v-if="showModal('legenda')">
|
|
76
|
+
<LegendaParametro v-if="modal.open" :legenda="legenda" />
|
|
77
|
+
</Modal>
|
|
78
|
+
<Modal title="Editor de Código" :width="900" v-if="showModal('code')">
|
|
79
|
+
<CodeEditor v-if="modal.open" />
|
|
80
|
+
</Modal>
|
|
81
|
+
<Modal title="Visualizar" :width="1200" v-if="showModal('preview')">
|
|
82
|
+
<div v-if="modal.open">
|
|
83
|
+
<b-row>
|
|
84
|
+
<b-col class="text-center">
|
|
85
|
+
<Button
|
|
86
|
+
v-print="'#printMe'"
|
|
87
|
+
key="print"
|
|
88
|
+
type="edit"
|
|
89
|
+
title="Imprimir"
|
|
90
|
+
classIcon="fas fa-print"
|
|
91
|
+
size="small"
|
|
92
|
+
:clicked="print"
|
|
93
|
+
/>
|
|
94
|
+
</b-col>
|
|
95
|
+
</b-row>
|
|
96
|
+
<br />
|
|
97
|
+
<ScrollBar :minHeight="500" :maxHeight="500">
|
|
98
|
+
<div>
|
|
99
|
+
<div class="a4">
|
|
100
|
+
<div id="printMe">
|
|
101
|
+
<DocumentPreview :template="documentoPreview" :d="data" />
|
|
102
|
+
</div>
|
|
103
|
+
</div>
|
|
104
|
+
</div>
|
|
105
|
+
</ScrollBar>
|
|
106
|
+
</div>
|
|
107
|
+
</Modal>
|
|
108
|
+
<div class="div-editor">
|
|
109
|
+
<DocumentEditor />
|
|
110
|
+
</div>
|
|
111
|
+
</div>
|
|
112
|
+
</div>
|
|
113
|
+
</Panel>
|
|
114
|
+
</div>
|
|
115
|
+
</template>
|
|
116
|
+
|
|
117
|
+
<script>
|
|
118
|
+
import Panel from "@nixweb/nixloc-ui/src/component/layout/Panel";
|
|
119
|
+
|
|
120
|
+
import DocumentEditor from "@nixweb/nixloc-ui/src/component/shared/DocumentEditor.vue";
|
|
121
|
+
import DocumentPreview from "@nixweb/nixloc-ui/src/component/shared/DocumentPreview.vue";
|
|
122
|
+
import CodeEditor from "@nixweb/nixloc-ui/src/component/shared/CodeEditor.vue";
|
|
123
|
+
import LegendaParametro from "@nixweb/nixloc-ui/src/component/shared/LegendaParametro.vue";
|
|
124
|
+
import Molded from "@nixweb/nixloc-ui/src/component/layout/Molded";
|
|
125
|
+
import Button from "@nixweb/nixloc-ui/src/component/forms/Button";
|
|
126
|
+
import Modal from "@nixweb/nixloc-ui/src/component/forms/Modal";
|
|
127
|
+
import ScrollBar from "@nixweb/nixloc-ui/src/component/layout/ScrollBar.vue";
|
|
128
|
+
|
|
129
|
+
import print from "vue-print-nb";
|
|
130
|
+
|
|
131
|
+
import { mapState, mapGetters, mapMutations } from "vuex";
|
|
132
|
+
|
|
133
|
+
export default {
|
|
134
|
+
name: "ViewTemplateDocumentView",
|
|
135
|
+
directives: {
|
|
136
|
+
print,
|
|
137
|
+
},
|
|
138
|
+
components: {
|
|
139
|
+
Panel,
|
|
140
|
+
DocumentEditor,
|
|
141
|
+
DocumentPreview,
|
|
142
|
+
CodeEditor,
|
|
143
|
+
LegendaParametro,
|
|
144
|
+
Molded,
|
|
145
|
+
Button,
|
|
146
|
+
Modal,
|
|
147
|
+
ScrollBar,
|
|
148
|
+
},
|
|
149
|
+
props: {
|
|
150
|
+
panel: Object,
|
|
151
|
+
data: Object,
|
|
152
|
+
legenda: Array,
|
|
153
|
+
},
|
|
154
|
+
data() {
|
|
155
|
+
return {
|
|
156
|
+
id: this.$route.params.id,
|
|
157
|
+
isDisabled: true,
|
|
158
|
+
};
|
|
159
|
+
},
|
|
160
|
+
computed: {
|
|
161
|
+
...mapState("generic", ["modal", "documentHtml"]),
|
|
162
|
+
...mapGetters("generic", ["showModal", "event", "documentoPreview"]),
|
|
163
|
+
},
|
|
164
|
+
methods: {
|
|
165
|
+
...mapMutations("generic", [
|
|
166
|
+
"showModal",
|
|
167
|
+
"hideModal",
|
|
168
|
+
"removeLoading",
|
|
169
|
+
"addEvent",
|
|
170
|
+
]),
|
|
171
|
+
saveDocument() {
|
|
172
|
+
if (this.id) {
|
|
173
|
+
this.addEvent({ nome: "saveDocument" });
|
|
174
|
+
} else {
|
|
175
|
+
this.showModal("saveDocument");
|
|
176
|
+
this.removeLoading(["saveDocument"]);
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
saveAs() {
|
|
180
|
+
this.addEvent({ nome: "saveAs" });
|
|
181
|
+
},
|
|
182
|
+
showModalLegend() {
|
|
183
|
+
this.showModal("legenda");
|
|
184
|
+
this.removeLoading(["showModalLegend"]);
|
|
185
|
+
},
|
|
186
|
+
showModalCode() {
|
|
187
|
+
this.showModal("code");
|
|
188
|
+
this.removeLoading(["showModalCode"]);
|
|
189
|
+
},
|
|
190
|
+
showModalPreview() {
|
|
191
|
+
this.showModal("preview");
|
|
192
|
+
this.removeLoading(["showModalPreview"]);
|
|
193
|
+
},
|
|
194
|
+
print() {
|
|
195
|
+
this.removeLoading(["print"]);
|
|
196
|
+
},
|
|
197
|
+
},
|
|
198
|
+
watch: {
|
|
199
|
+
event: {
|
|
200
|
+
handler(event) {
|
|
201
|
+
if (event.nome == "documentoEditorModificado") this.isDisabled = true;
|
|
202
|
+
if (event.nome == "documentEditorChanged") this.isDisabled = false;
|
|
203
|
+
},
|
|
204
|
+
deep: true,
|
|
205
|
+
},
|
|
206
|
+
},
|
|
207
|
+
};
|
|
208
|
+
</script>
|
|
209
|
+
<style scoped>
|
|
210
|
+
.div-top {
|
|
211
|
+
margin-top: 30px;
|
|
212
|
+
}
|
|
213
|
+
.div-editor {
|
|
214
|
+
margin-top: 25px;
|
|
215
|
+
}
|
|
216
|
+
.a4 {
|
|
217
|
+
max-width: 1140px;
|
|
218
|
+
min-height: 21cm;
|
|
219
|
+
padding: 20px;
|
|
220
|
+
border: 1px hsl(0, 0%, 82.7%) solid;
|
|
221
|
+
border-radius: var(--ck-border-radius);
|
|
222
|
+
background: white;
|
|
223
|
+
box-shadow: 0 0 5px hsl(0deg 0% 0% / 10%);
|
|
224
|
+
margin: 0 auto;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
</style>
|