@nixweb/nixloc-ui 0.0.89 → 0.0.92
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/Tabela.vue +37 -5
- package/src/component/template/ModeloLista.vue +1 -1
- package/src/component/template/ModeloRelatorioListaView.vue +153 -0
- package/src/component/template/ModeloSubView.vue +69 -0
- package/src/component/template/ModeloConfiguracaoView.vue +0 -54
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;
|
|
@@ -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: #0c63c0;
|
|
262
|
+
font-size: 15px;
|
|
263
|
+
font-weight: 400;
|
|
241
264
|
cursor: pointer;
|
|
242
265
|
}
|
|
243
266
|
|
|
267
|
+
.link:hover {
|
|
268
|
+
text-decoration: underline;
|
|
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;
|
|
@@ -142,7 +142,7 @@ export default {
|
|
|
142
142
|
let params = { url: this.modeloLista.urlGetApi, obj: obj };
|
|
143
143
|
this.getApi(params).then((response) => {
|
|
144
144
|
this.conteudo = response.conteudo;
|
|
145
|
-
this.removeCarregando(["painel", "pesquisar", "limpar"]);
|
|
145
|
+
this.removeCarregando(["painel", "modeloSubView", "pesquisar", "limpar"]);
|
|
146
146
|
});
|
|
147
147
|
},
|
|
148
148
|
removerSelecionados() {
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<Painel
|
|
4
|
+
:modulo="painel.modulo"
|
|
5
|
+
:titulo="painel.titulo"
|
|
6
|
+
:mostrarFiltroVertical="painel.mostrarFiltroVertical"
|
|
7
|
+
:mostrarPesquisa="painel.mostrarPesquisa"
|
|
8
|
+
:mostrarBotoes="painel.mostrarBotoes"
|
|
9
|
+
>
|
|
10
|
+
<div slot="conteudo-principal">
|
|
11
|
+
<b-row>
|
|
12
|
+
<!-- <b-col xs="12" sm="12" md="12" lg="5" xl="5">
|
|
13
|
+
<div><i class="fas fa-star icone-favorito"></i> Favoritos</div>
|
|
14
|
+
<hr />
|
|
15
|
+
<div class="div-moldura" v-for="relatorio in favoritos">
|
|
16
|
+
<div>
|
|
17
|
+
<Moldura :bordaArredondada="12">
|
|
18
|
+
<b-row>
|
|
19
|
+
<b-col sm="10" @click="navegarPara(relatorio.nomeRota)">
|
|
20
|
+
<div>{{ relatorio.nome }}</div>
|
|
21
|
+
</b-col>
|
|
22
|
+
<b-col sm="2">
|
|
23
|
+
<div class="text-right">
|
|
24
|
+
<i class="fas fa-times-circle icone-remover"></i>
|
|
25
|
+
</div>
|
|
26
|
+
</b-col>
|
|
27
|
+
</b-row>
|
|
28
|
+
</Moldura>
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
31
|
+
</b-col> -->
|
|
32
|
+
<b-col xs="12" sm="12" md="12" lg="5" xl="5">
|
|
33
|
+
<div><i class="fas fa-list-ul"></i> Todos</div>
|
|
34
|
+
<hr />
|
|
35
|
+
<div class="div-moldura" v-for="relatorio in todos">
|
|
36
|
+
<div>
|
|
37
|
+
<Moldura :bordaArredondada="12">
|
|
38
|
+
<b-row>
|
|
39
|
+
<b-col sm="1">
|
|
40
|
+
<i class="fas fa-file-alt icone-report"></i>
|
|
41
|
+
</b-col>
|
|
42
|
+
<b-col sm="10" @click="navegarPara(relatorio.nomeRota)">
|
|
43
|
+
<div class="lado-a-lado">{{ relatorio.nome }}</div>
|
|
44
|
+
</b-col>
|
|
45
|
+
<!-- <b-col sm="2">
|
|
46
|
+
<div class="text-right">
|
|
47
|
+
<i class="fas fa-plus-circle icone-favorito"></i>
|
|
48
|
+
</div>
|
|
49
|
+
</b-col>-->
|
|
50
|
+
</b-row>
|
|
51
|
+
</Moldura>
|
|
52
|
+
</div>
|
|
53
|
+
</div>
|
|
54
|
+
</b-col>
|
|
55
|
+
</b-row>
|
|
56
|
+
</div>
|
|
57
|
+
</Painel>
|
|
58
|
+
</div>
|
|
59
|
+
</template>
|
|
60
|
+
|
|
61
|
+
<script>
|
|
62
|
+
import Painel from "@nixweb/nixloc-ui/src/component/layout/Painel.vue";
|
|
63
|
+
import Moldura from "@nixweb/nixloc-ui/src/component/layout/Moldura";
|
|
64
|
+
|
|
65
|
+
import { mapState, mapGetters, mapActions, mapMutations } from "vuex";
|
|
66
|
+
|
|
67
|
+
export default {
|
|
68
|
+
name: "ModeloRelatorioListaView",
|
|
69
|
+
components: { Painel, Moldura },
|
|
70
|
+
props: {
|
|
71
|
+
painel: Object,
|
|
72
|
+
relatorios: Object,
|
|
73
|
+
},
|
|
74
|
+
data() {
|
|
75
|
+
return {
|
|
76
|
+
todos: [],
|
|
77
|
+
};
|
|
78
|
+
},
|
|
79
|
+
computed: {
|
|
80
|
+
...mapState("generic", ["pesquisa", "buscouPesquisa", "limpouPesquisa"]),
|
|
81
|
+
},
|
|
82
|
+
mounted() {
|
|
83
|
+
this.removeCarregando(["painel"]);
|
|
84
|
+
this.todos = this.relatorios;
|
|
85
|
+
},
|
|
86
|
+
methods: {
|
|
87
|
+
...mapMutations("generic", ["removeCarregando"]),
|
|
88
|
+
navegarPara(nomeRota) {
|
|
89
|
+
this.$router.push({
|
|
90
|
+
name: nomeRota,
|
|
91
|
+
});
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
watch: {
|
|
95
|
+
buscouPesquisa: function () {
|
|
96
|
+
let filtro = [];
|
|
97
|
+
let self = this;
|
|
98
|
+
setTimeout(function () {
|
|
99
|
+
self.todos.forEach(function (item) {
|
|
100
|
+
if (self.pesquisa.filtro.conteudo == "igual") {
|
|
101
|
+
if (item.nome == self.pesquisa.conteudo) filtro.push(item);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
if (self.pesquisa.filtro.conteudo == "contem") {
|
|
105
|
+
if (item.nome.includes(self.pesquisa.conteudo)) filtro.push(item);
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
self.todos = filtro;
|
|
110
|
+
|
|
111
|
+
self.removeCarregando(["pesquisar", "limpar"]);
|
|
112
|
+
}, 300);
|
|
113
|
+
},
|
|
114
|
+
limpouPesquisa: function () {
|
|
115
|
+
let self = this;
|
|
116
|
+
setTimeout(function () {
|
|
117
|
+
self.todos = self.relatorios;
|
|
118
|
+
self.removeCarregando(["pesquisar", "limpar"]);
|
|
119
|
+
}, 300);
|
|
120
|
+
},
|
|
121
|
+
},
|
|
122
|
+
};
|
|
123
|
+
</script>
|
|
124
|
+
|
|
125
|
+
<style scoped>
|
|
126
|
+
.icone-favorito {
|
|
127
|
+
color: orange;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.icone-remover {
|
|
131
|
+
color: red;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.icone-report {
|
|
135
|
+
font-size: 30px;
|
|
136
|
+
opacity: 0.2;
|
|
137
|
+
color: #577696;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.div-moldura {
|
|
141
|
+
margin-bottom: 10px;
|
|
142
|
+
cursor: pointer;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.div-moldura:hover {
|
|
146
|
+
background-color: #fafafc;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.descricao {
|
|
150
|
+
font-size: 13.5px;
|
|
151
|
+
color: rgb(117, 117, 117);
|
|
152
|
+
}
|
|
153
|
+
</style>
|
|
@@ -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,54 +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
|
-
:propsParam="propsParam"
|
|
12
|
-
:mostrarMoldura="false"
|
|
13
|
-
:mostrarFiltroHorizontal="mostrarFiltroHorizontal"
|
|
14
|
-
:botaoExcluir="botaoExcluir"
|
|
15
|
-
>
|
|
16
|
-
<div slot="conteudo-botoes-tabela-cabecalho">
|
|
17
|
-
<slot name="conteudo-botoes-tabela-cabecalho"></slot>
|
|
18
|
-
</div>
|
|
19
|
-
<div slot="conteudo-filtro-horizontal">
|
|
20
|
-
<slot name="conteudo-filtro-horizontal"></slot>
|
|
21
|
-
</div>
|
|
22
|
-
<div slot="conteudo-botoes-tabela">
|
|
23
|
-
<slot name="conteudo-botoes-tabela"></slot>
|
|
24
|
-
</div>
|
|
25
|
-
</ModeloLista>
|
|
26
|
-
</div>
|
|
27
|
-
</template>
|
|
28
|
-
|
|
29
|
-
<script>
|
|
30
|
-
import Pesquisa from "../shared/Pesquisa.vue";
|
|
31
|
-
|
|
32
|
-
import ModeloLista from "@nixweb/nixloc-ui/src/component/template/ModeloLista.vue";
|
|
33
|
-
|
|
34
|
-
export default {
|
|
35
|
-
name: "ModeloView",
|
|
36
|
-
components: { Pesquisa, ModeloLista },
|
|
37
|
-
props: {
|
|
38
|
-
modeloLista: Object,
|
|
39
|
-
propsParam: Object,
|
|
40
|
-
mostrarPesquisa: {
|
|
41
|
-
type: Boolean,
|
|
42
|
-
default: true,
|
|
43
|
-
},
|
|
44
|
-
mostrarFiltroHorizontal: {
|
|
45
|
-
type: Boolean,
|
|
46
|
-
default: true,
|
|
47
|
-
},
|
|
48
|
-
botaoExcluir: {
|
|
49
|
-
type: Boolean,
|
|
50
|
-
default: true,
|
|
51
|
-
},
|
|
52
|
-
},
|
|
53
|
-
};
|
|
54
|
-
</script>
|