@nixweb/nixloc-ui 0.0.88 → 0.0.91
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 +1 -1
- package/src/component/forms/Botao.vue +1 -1
- package/src/component/layout/Menu.vue +46 -27
- package/src/component/shared/SalvarCancelar.vue +7 -1
- package/src/component/shared/Tabela.vue +37 -5
- package/src/component/template/ModeloLista.vue +6 -5
- package/src/component/template/ModeloSubView.vue +69 -0
- package/src/component/template/ModeloConfiguracaoView.vue +0 -52
package/package.json
CHANGED
|
@@ -7,32 +7,32 @@
|
|
|
7
7
|
</div>
|
|
8
8
|
</li>
|
|
9
9
|
<li>
|
|
10
|
-
<
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
<
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
10
|
+
<div :class="{ 'menu-ativo': menuAtivo == 'Dashboard' }">
|
|
11
|
+
<a
|
|
12
|
+
href="#"
|
|
13
|
+
@click.prevent="navegarPara({ nomeRota: 'dashboard', modulo: 'Dashboard' })"
|
|
14
|
+
:class="sessaoDestaque('home')"
|
|
15
|
+
>
|
|
16
|
+
<div class="div-icone lado-a-lado">
|
|
17
|
+
<i class="fas fa-chart-area icone-dash" :style="'color:' + corBase"></i>
|
|
18
|
+
</div>
|
|
19
|
+
<div class="titulo">Dashboard</div>
|
|
20
|
+
</a>
|
|
21
|
+
</div>
|
|
20
22
|
</li>
|
|
21
|
-
|
|
22
23
|
<li v-for="(item, index) in menuFiltro(true)" :key="index">
|
|
23
|
-
<
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
<
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
</a>
|
|
24
|
+
<div :class="{ 'menu-ativo': menuAtivo == item.modulo }">
|
|
25
|
+
<a
|
|
26
|
+
href="#"
|
|
27
|
+
@click.prevent="abrirSubMenu(item.modulo)"
|
|
28
|
+
:class="sessaoDestaque(item.modulo)"
|
|
29
|
+
>
|
|
30
|
+
<div class="div-icone lado-a-lado">
|
|
31
|
+
<i :class="item.icone" class="icone" :style="'color:' + corBase"></i>
|
|
32
|
+
</div>
|
|
33
|
+
<div class="titulo">{{ item.titulo }}</div>
|
|
34
|
+
</a>
|
|
35
|
+
</div>
|
|
36
36
|
</li>
|
|
37
37
|
</ul>
|
|
38
38
|
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
<a
|
|
56
56
|
v-else
|
|
57
57
|
href="#"
|
|
58
|
-
@click.prevent="navegarPara(item
|
|
58
|
+
@click.prevent="navegarPara(item)"
|
|
59
59
|
:class="classeSubMenu(item.titulo)"
|
|
60
60
|
>
|
|
61
61
|
<b-row>
|
|
@@ -81,12 +81,17 @@ export default {
|
|
|
81
81
|
type: String,
|
|
82
82
|
default: "#4680A5",
|
|
83
83
|
},
|
|
84
|
+
corBaseAtivo: {
|
|
85
|
+
type: String,
|
|
86
|
+
default: "#d98621",
|
|
87
|
+
},
|
|
84
88
|
urlImagem: String,
|
|
85
89
|
},
|
|
86
90
|
data() {
|
|
87
91
|
return {
|
|
88
92
|
modulo: "",
|
|
89
93
|
subMenuPrimeiroNivel: false,
|
|
94
|
+
menuAtivo: "Dashboard",
|
|
90
95
|
};
|
|
91
96
|
},
|
|
92
97
|
methods: {
|
|
@@ -110,9 +115,9 @@ export default {
|
|
|
110
115
|
"context-menu__link--active": this.activeSubMenu === subMenuName,
|
|
111
116
|
};
|
|
112
117
|
},
|
|
113
|
-
navegarPara(
|
|
118
|
+
navegarPara(item) {
|
|
114
119
|
this.$router.push({
|
|
115
|
-
name: nomeRota,
|
|
120
|
+
name: item.nomeRota,
|
|
116
121
|
});
|
|
117
122
|
this.fecharSubMenu();
|
|
118
123
|
},
|
|
@@ -135,6 +140,14 @@ export default {
|
|
|
135
140
|
computed: {
|
|
136
141
|
...mapState("usuario", ["menu"]),
|
|
137
142
|
},
|
|
143
|
+
watch: {
|
|
144
|
+
$route: {
|
|
145
|
+
handler: function (router) {
|
|
146
|
+
this.menuAtivo = router.matched[0].props.default.modulo;
|
|
147
|
+
},
|
|
148
|
+
deep: true,
|
|
149
|
+
},
|
|
150
|
+
},
|
|
138
151
|
};
|
|
139
152
|
</script>
|
|
140
153
|
|
|
@@ -144,6 +157,12 @@ export default {
|
|
|
144
157
|
z-index: 1000;
|
|
145
158
|
}
|
|
146
159
|
|
|
160
|
+
.menu-ativo {
|
|
161
|
+
border-left: 3px solid #d98621;
|
|
162
|
+
color: #d98621 ;
|
|
163
|
+
background-color: #FAFAFC;
|
|
164
|
+
}
|
|
165
|
+
|
|
147
166
|
.div-logo {
|
|
148
167
|
padding-top: 5px;
|
|
149
168
|
padding-bottom: 15px;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
|
-
<BarraFixa posicao="rodape" v-show="formSujo">
|
|
3
|
+
<BarraFixa posicao="rodape" v-show="formSujo && !modal.abrir">
|
|
4
4
|
<div>
|
|
5
5
|
<Botao
|
|
6
6
|
chave="cancelarSalvarCancelar"
|
|
@@ -37,6 +37,7 @@ export default {
|
|
|
37
37
|
computed: {
|
|
38
38
|
...mapState("validation", ["formSujo"]),
|
|
39
39
|
...mapGetters("validation", ["formValido"]),
|
|
40
|
+
...mapState("generic", ["modal"]),
|
|
40
41
|
},
|
|
41
42
|
methods: {
|
|
42
43
|
...mapMutations("validation", ["insereFormSujo"]),
|
|
@@ -46,5 +47,10 @@ export default {
|
|
|
46
47
|
this.removeCarregando(["cancelarSalvarCancelar"]);
|
|
47
48
|
},
|
|
48
49
|
},
|
|
50
|
+
watch: {
|
|
51
|
+
"modal.abrir": function (valor) {
|
|
52
|
+
this.insereFormSujo(false);
|
|
53
|
+
},
|
|
54
|
+
},
|
|
49
55
|
};
|
|
50
56
|
</script>
|
|
@@ -97,6 +97,9 @@
|
|
|
97
97
|
>
|
|
98
98
|
<TabelaBotao :obj="obj" :linha="linha" />
|
|
99
99
|
</div>
|
|
100
|
+
<div class="link" v-if="obj.tipo === 'link'" @click="navegarPara(obj, linha)">
|
|
101
|
+
<span> {{ linha[obj.campo] }}</span>
|
|
102
|
+
</div>
|
|
100
103
|
</td>
|
|
101
104
|
</tr>
|
|
102
105
|
</tbody>
|
|
@@ -143,7 +146,7 @@ export default {
|
|
|
143
146
|
},
|
|
144
147
|
},
|
|
145
148
|
methods: {
|
|
146
|
-
...mapMutations("generic", ["adicionaSelecao"]),
|
|
149
|
+
...mapMutations("generic", ["adicionaSelecao", "insereEvento"]),
|
|
147
150
|
...mapActions("generic", ["pdfApi"]),
|
|
148
151
|
selecionar() {
|
|
149
152
|
this.adicionaSelecao([]);
|
|
@@ -188,7 +191,21 @@ export default {
|
|
|
188
191
|
};
|
|
189
192
|
this.pdfApi(params).then((response) => {});
|
|
190
193
|
},
|
|
194
|
+
navegarPara(obj, linha) {
|
|
195
|
+
if (obj.nomeRota) {
|
|
196
|
+
this.$router.push({
|
|
197
|
+
name: obj.nomeRota,
|
|
198
|
+
params: { id: linha.id },
|
|
199
|
+
});
|
|
200
|
+
} else {
|
|
201
|
+
this.insereEvento({
|
|
202
|
+
nome: obj.nomeEvento,
|
|
203
|
+
dados: linha,
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
},
|
|
191
207
|
},
|
|
208
|
+
|
|
192
209
|
beforeDestroy() {
|
|
193
210
|
this.adicionaSelecao([]);
|
|
194
211
|
},
|
|
@@ -214,10 +231,15 @@ table tbody tr td {
|
|
|
214
231
|
width: 30px;
|
|
215
232
|
}
|
|
216
233
|
|
|
234
|
+
tr:hover {
|
|
235
|
+
background-color: #fafafc;
|
|
236
|
+
}
|
|
237
|
+
|
|
217
238
|
.titulo-cabecalho {
|
|
218
239
|
font-size: 14px;
|
|
219
240
|
color: #757d8c;
|
|
220
|
-
font-weight:
|
|
241
|
+
font-weight: 400;
|
|
242
|
+
text-transform: uppercase;
|
|
221
243
|
}
|
|
222
244
|
|
|
223
245
|
.tabela-numero {
|
|
@@ -235,12 +257,22 @@ table tbody tr td {
|
|
|
235
257
|
min-width: 100px;
|
|
236
258
|
}
|
|
237
259
|
|
|
238
|
-
.
|
|
239
|
-
|
|
240
|
-
|
|
260
|
+
.link {
|
|
261
|
+
color: #0057A9;
|
|
262
|
+
font-size: 14px;
|
|
263
|
+
font-weight: 400;
|
|
241
264
|
cursor: pointer;
|
|
242
265
|
}
|
|
243
266
|
|
|
267
|
+
.link:hover {
|
|
268
|
+
font-size: 14.5px;
|
|
269
|
+
transition: 0.1s;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
.icone-link:hover {
|
|
273
|
+
font-size: 12.5px;
|
|
274
|
+
}
|
|
275
|
+
|
|
244
276
|
.receita {
|
|
245
277
|
font-size: 14px;
|
|
246
278
|
color: darkblue;
|
|
@@ -62,6 +62,7 @@ export default {
|
|
|
62
62
|
name: "ModeloLista",
|
|
63
63
|
props: {
|
|
64
64
|
modeloLista: Object,
|
|
65
|
+
propsParam: Object,
|
|
65
66
|
mostrarMoldura: {
|
|
66
67
|
type: Boolean,
|
|
67
68
|
default: true,
|
|
@@ -97,7 +98,7 @@ export default {
|
|
|
97
98
|
totalPorPagina: 10,
|
|
98
99
|
},
|
|
99
100
|
paramsFiltro: [],
|
|
100
|
-
|
|
101
|
+
filtroDinamico: {},
|
|
101
102
|
};
|
|
102
103
|
},
|
|
103
104
|
created() {
|
|
@@ -137,11 +138,11 @@ export default {
|
|
|
137
138
|
"atualizaCampoPesquisa",
|
|
138
139
|
]),
|
|
139
140
|
obterTodos() {
|
|
140
|
-
let obj = { ...this.baseParams, ...this.
|
|
141
|
+
let obj = { ...this.baseParams, ...this.filtroDinamico, ...this.propsParam };
|
|
141
142
|
let params = { url: this.modeloLista.urlGetApi, obj: obj };
|
|
142
143
|
this.getApi(params).then((response) => {
|
|
143
144
|
this.conteudo = response.conteudo;
|
|
144
|
-
this.removeCarregando(["painel", "pesquisar", "limpar"]);
|
|
145
|
+
this.removeCarregando(["painel", "modeloSubView", "pesquisar", "limpar"]);
|
|
145
146
|
});
|
|
146
147
|
},
|
|
147
148
|
removerSelecionados() {
|
|
@@ -208,11 +209,11 @@ export default {
|
|
|
208
209
|
}
|
|
209
210
|
}
|
|
210
211
|
|
|
211
|
-
this.
|
|
212
|
+
this.filtroDinamico = result;
|
|
212
213
|
|
|
213
214
|
this.atualizaPaginacao({
|
|
214
215
|
chave: "modeloLista",
|
|
215
|
-
totalPorPagina: this.
|
|
216
|
+
totalPorPagina: this.filtroDinamico.totalPorPagina,
|
|
216
217
|
});
|
|
217
218
|
|
|
218
219
|
this.obterTodos();
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<Carregando :centralizado="false" v-show="carregando('modeloSubView')" />
|
|
4
|
+
<div v-show="!carregando('modeloSubView')">
|
|
5
|
+
<slot name="conteudo-botoes"></slot>
|
|
6
|
+
<div v-if="mostrarPesquisa">
|
|
7
|
+
<Pesquisa />
|
|
8
|
+
<br />
|
|
9
|
+
</div>
|
|
10
|
+
|
|
11
|
+
<ModeloLista
|
|
12
|
+
:modeloLista="modeloLista"
|
|
13
|
+
:propsParam="propsParam"
|
|
14
|
+
:mostrarMoldura="false"
|
|
15
|
+
:mostrarFiltroHorizontal="mostrarFiltroHorizontal"
|
|
16
|
+
:botaoExcluir="botaoExcluir"
|
|
17
|
+
>
|
|
18
|
+
<div slot="conteudo-botoes-tabela-cabecalho">
|
|
19
|
+
<slot name="conteudo-botoes-tabela-cabecalho"></slot>
|
|
20
|
+
</div>
|
|
21
|
+
<div slot="conteudo-filtro-horizontal">
|
|
22
|
+
<slot name="conteudo-filtro-horizontal"></slot>
|
|
23
|
+
</div>
|
|
24
|
+
<div slot="conteudo-botoes-tabela">
|
|
25
|
+
<slot name="conteudo-botoes-tabela"></slot>
|
|
26
|
+
</div>
|
|
27
|
+
</ModeloLista>
|
|
28
|
+
</div>
|
|
29
|
+
</div>
|
|
30
|
+
</template>
|
|
31
|
+
|
|
32
|
+
<script>
|
|
33
|
+
import Pesquisa from "../shared/Pesquisa.vue";
|
|
34
|
+
import Carregando from "../shared/Carregando.vue";
|
|
35
|
+
|
|
36
|
+
import ModeloLista from "@nixweb/nixloc-ui/src/component/template/ModeloLista.vue";
|
|
37
|
+
|
|
38
|
+
import { mapState, mapGetters, mapMutations } from "vuex";
|
|
39
|
+
|
|
40
|
+
export default {
|
|
41
|
+
name: "ModeloView",
|
|
42
|
+
components: { Pesquisa, Carregando, ModeloLista },
|
|
43
|
+
props: {
|
|
44
|
+
modeloLista: Object,
|
|
45
|
+
propsParam: Object,
|
|
46
|
+
mostrarPesquisa: {
|
|
47
|
+
type: Boolean,
|
|
48
|
+
default: true,
|
|
49
|
+
},
|
|
50
|
+
mostrarFiltroHorizontal: {
|
|
51
|
+
type: Boolean,
|
|
52
|
+
default: true,
|
|
53
|
+
},
|
|
54
|
+
botaoExcluir: {
|
|
55
|
+
type: Boolean,
|
|
56
|
+
default: true,
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
computed: {
|
|
60
|
+
...mapGetters("generic", ["carregando"]),
|
|
61
|
+
},
|
|
62
|
+
created() {
|
|
63
|
+
this.insereCarregando("modeloSubView");
|
|
64
|
+
},
|
|
65
|
+
methods: {
|
|
66
|
+
...mapMutations("generic", ["insereCarregando"]),
|
|
67
|
+
},
|
|
68
|
+
};
|
|
69
|
+
</script>
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<slot name="conteudo-botoes"></slot>
|
|
4
|
-
<div v-if="mostrarPesquisa">
|
|
5
|
-
<Pesquisa />
|
|
6
|
-
<br />
|
|
7
|
-
</div>
|
|
8
|
-
|
|
9
|
-
<ModeloLista
|
|
10
|
-
:modeloLista="modeloLista"
|
|
11
|
-
:mostrarMoldura="false"
|
|
12
|
-
:mostrarFiltroHorizontal="mostrarFiltroHorizontal"
|
|
13
|
-
:botaoExcluir="botaoExcluir"
|
|
14
|
-
>
|
|
15
|
-
<div slot="conteudo-botoes-tabela-cabecalho">
|
|
16
|
-
<slot name="conteudo-botoes-tabela-cabecalho"></slot>
|
|
17
|
-
</div>
|
|
18
|
-
<div slot="conteudo-filtro-horizontal">
|
|
19
|
-
<slot name="conteudo-filtro-horizontal"></slot>
|
|
20
|
-
</div>
|
|
21
|
-
<div slot="conteudo-botoes-tabela">
|
|
22
|
-
<slot name="conteudo-botoes-tabela"></slot>
|
|
23
|
-
</div>
|
|
24
|
-
</ModeloLista>
|
|
25
|
-
</div>
|
|
26
|
-
</template>
|
|
27
|
-
|
|
28
|
-
<script>
|
|
29
|
-
import Pesquisa from "../shared/Pesquisa.vue";
|
|
30
|
-
|
|
31
|
-
import ModeloLista from "@nixweb/nixloc-ui/src/component/template/ModeloLista.vue";
|
|
32
|
-
|
|
33
|
-
export default {
|
|
34
|
-
name: "ModeloView",
|
|
35
|
-
components: { Pesquisa, ModeloLista },
|
|
36
|
-
props: {
|
|
37
|
-
modeloLista: Object,
|
|
38
|
-
mostrarPesquisa: {
|
|
39
|
-
type: Boolean,
|
|
40
|
-
default: true,
|
|
41
|
-
},
|
|
42
|
-
mostrarFiltroHorizontal: {
|
|
43
|
-
type: Boolean,
|
|
44
|
-
default: true,
|
|
45
|
-
},
|
|
46
|
-
botaoExcluir: {
|
|
47
|
-
type: Boolean,
|
|
48
|
-
default: true,
|
|
49
|
-
},
|
|
50
|
-
},
|
|
51
|
-
};
|
|
52
|
-
</script>
|