@nixweb/nixloc-ui 0.0.61 → 0.0.64
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/EscolherEstatico.vue +5 -1
- package/src/component/forms/Numero.vue +18 -15
- package/src/component/forms/Opcoes.vue +8 -0
- package/src/component/layout/Menu.vue +3 -4
- package/src/component/layout/Painel.vue +2 -2
- package/src/component/shared/Pesquisa.vue +33 -14
- package/src/component/template/ModeloLista.vue +7 -3
- package/src/store/modulos/generic.js +2 -1
package/package.json
CHANGED
|
@@ -60,6 +60,10 @@ export default {
|
|
|
60
60
|
type: Boolean,
|
|
61
61
|
default: false,
|
|
62
62
|
},
|
|
63
|
+
somenteConsulta: {
|
|
64
|
+
type: Boolean,
|
|
65
|
+
default: false,
|
|
66
|
+
},
|
|
63
67
|
dados: Array,
|
|
64
68
|
value: Object,
|
|
65
69
|
},
|
|
@@ -84,7 +88,7 @@ export default {
|
|
|
84
88
|
aoSelecionar(value) {
|
|
85
89
|
this.$emit("input", value);
|
|
86
90
|
let obj = { campoAlvo: this.campoAlvo, valor: value.id };
|
|
87
|
-
this.insereFiltro(obj);
|
|
91
|
+
if (!this.somenteConsulta) this.insereFiltro(obj);
|
|
88
92
|
},
|
|
89
93
|
aoPesquisar(value) {},
|
|
90
94
|
rotulo(value) {
|
|
@@ -11,20 +11,9 @@
|
|
|
11
11
|
class="requerido glyphicon fas fa-exclamation-triangle"
|
|
12
12
|
></i>
|
|
13
13
|
<slot v-else></slot>
|
|
14
|
-
<!-- <vue-numeric
|
|
15
|
-
class="form-control"
|
|
16
|
-
v-on:keyup.enter.native="apertouEnter"
|
|
17
|
-
:class="{ 'is-invalid': notificacoes.length > 0 && formSujo }"
|
|
18
|
-
:placeholder="placeholder"
|
|
19
|
-
:disabled="desabilitado"
|
|
20
|
-
separator="."
|
|
21
|
-
v-bind:precision="1"
|
|
22
|
-
v-model="valor"
|
|
23
|
-
></vue-numeric>-->
|
|
24
14
|
<input
|
|
25
15
|
class="form-control"
|
|
26
16
|
type="number"
|
|
27
|
-
v-int
|
|
28
17
|
v-model="valor"
|
|
29
18
|
@keyup.enter.prevent="apertouEnter"
|
|
30
19
|
/>
|
|
@@ -40,13 +29,12 @@
|
|
|
40
29
|
|
|
41
30
|
<script>
|
|
42
31
|
import Dica from "../shared/Dica.vue";
|
|
43
|
-
import VueNumeric from "vue-numeric";
|
|
44
32
|
|
|
45
33
|
import { mapState, mapMutations } from "vuex";
|
|
46
34
|
|
|
47
35
|
export default {
|
|
48
36
|
name: "Numero",
|
|
49
|
-
components: { Dica
|
|
37
|
+
components: { Dica },
|
|
50
38
|
props: {
|
|
51
39
|
titulo: String,
|
|
52
40
|
campo: String,
|
|
@@ -54,6 +42,10 @@ export default {
|
|
|
54
42
|
desabilitado: Boolean,
|
|
55
43
|
formNome: String,
|
|
56
44
|
requerido: Boolean,
|
|
45
|
+
tipo: {
|
|
46
|
+
type: String,
|
|
47
|
+
default: "float",
|
|
48
|
+
},
|
|
57
49
|
value: Number,
|
|
58
50
|
alterou: Function,
|
|
59
51
|
enter: Function,
|
|
@@ -72,7 +64,11 @@ export default {
|
|
|
72
64
|
},
|
|
73
65
|
|
|
74
66
|
methods: {
|
|
75
|
-
...mapMutations("validation", [
|
|
67
|
+
...mapMutations("validation", [
|
|
68
|
+
"insereValidacao",
|
|
69
|
+
"removeValidacao",
|
|
70
|
+
"insereFormSujo",
|
|
71
|
+
]),
|
|
76
72
|
valida() {
|
|
77
73
|
this.notificacoes = [];
|
|
78
74
|
if (this.value == 0) return;
|
|
@@ -96,7 +92,14 @@ export default {
|
|
|
96
92
|
valor() {
|
|
97
93
|
this.valida();
|
|
98
94
|
this.formSujo = true;
|
|
99
|
-
this
|
|
95
|
+
this.insereFormSujo(true);
|
|
96
|
+
|
|
97
|
+
let valor;
|
|
98
|
+
if (this.tipo === "int") valor = parseInt(this.valor);
|
|
99
|
+
if (this.tipo === "float") valor = parseFloat(this.valor);
|
|
100
|
+
|
|
101
|
+
this.valor = valor;
|
|
102
|
+
this.$emit("input", valor);
|
|
100
103
|
},
|
|
101
104
|
notificacoes() {
|
|
102
105
|
let self = this;
|
|
@@ -16,6 +16,9 @@
|
|
|
16
16
|
|
|
17
17
|
<script>
|
|
18
18
|
import Dica from "../shared/Dica.vue";
|
|
19
|
+
|
|
20
|
+
import { mapState, mapMutations } from "vuex";
|
|
21
|
+
|
|
19
22
|
export default {
|
|
20
23
|
components: { Dica },
|
|
21
24
|
name: "Opcoes",
|
|
@@ -25,12 +28,16 @@ export default {
|
|
|
25
28
|
selecionado: this.value,
|
|
26
29
|
};
|
|
27
30
|
},
|
|
31
|
+
methods: {
|
|
32
|
+
...mapMutations("validation", ["insereFormSujo"]),
|
|
33
|
+
},
|
|
28
34
|
watch: {
|
|
29
35
|
value() {
|
|
30
36
|
this.selecionado = this.value;
|
|
31
37
|
},
|
|
32
38
|
selecionado() {
|
|
33
39
|
this.$emit("input", this.selecionado);
|
|
40
|
+
this.insereFormSujo(true);
|
|
34
41
|
if (this.alterou) this.alterou();
|
|
35
42
|
},
|
|
36
43
|
},
|
|
@@ -41,3 +48,4 @@ export default {
|
|
|
41
48
|
margin-top: 5px;
|
|
42
49
|
}
|
|
43
50
|
</style>
|
|
51
|
+
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
:class="sessaoDestaque('home')"
|
|
9
9
|
>
|
|
10
10
|
<div class="div-icone lado-a-lado" :style="'background-color:' + corBase">
|
|
11
|
-
<i class="
|
|
11
|
+
<i class="fas fa-chart-area icone" aria-hidden="true"></i>
|
|
12
12
|
</div>
|
|
13
13
|
<div class="lado-a-lado titulo">Dashboard</div>
|
|
14
14
|
</a>
|
|
@@ -133,7 +133,7 @@ export default {
|
|
|
133
133
|
.div-icone {
|
|
134
134
|
width: 30px;
|
|
135
135
|
height: 30px;
|
|
136
|
-
|
|
136
|
+
text-align: center;
|
|
137
137
|
padding-top: 3px;
|
|
138
138
|
border-radius: 8px;
|
|
139
139
|
}
|
|
@@ -147,6 +147,5 @@ export default {
|
|
|
147
147
|
margin-left: 15px;
|
|
148
148
|
}
|
|
149
149
|
|
|
150
|
-
|
|
151
|
-
}
|
|
150
|
+
|
|
152
151
|
</style>
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
</div>
|
|
33
33
|
</div>
|
|
34
34
|
<br v-show="mostrarBotoes || mostrarPesquisa" />
|
|
35
|
-
<div
|
|
36
|
-
<div
|
|
35
|
+
<div v-show="mostrarBotoes || mostrarPesquisa">
|
|
36
|
+
<div>
|
|
37
37
|
<div v-show="mostrarPesquisa"><Pesquisa /></div>
|
|
38
38
|
</div>
|
|
39
39
|
</div>
|
|
@@ -1,16 +1,30 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<b-row>
|
|
3
|
-
<b-col xs="12" sm="12" md="12" lg="
|
|
4
|
-
<
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
3
|
+
<b-col xs="12" sm="12" md="12" lg="5" xl="5">
|
|
4
|
+
<div class="margem">
|
|
5
|
+
<input
|
|
6
|
+
type="text"
|
|
7
|
+
name="pesquisar"
|
|
8
|
+
placeholder="Pesquisar ..."
|
|
9
|
+
@keyup="verificaLimpaPesquisa()"
|
|
10
|
+
@keyup.enter.prevent="buscaPesquisa()"
|
|
11
|
+
v-model="pesquisa.conteudo"
|
|
12
|
+
/>
|
|
13
|
+
</div>
|
|
14
|
+
</b-col>
|
|
15
|
+
<b-col xs="12" sm="12" md="12" lg="2" xl="2">
|
|
16
|
+
<EscolherEstatico
|
|
17
|
+
campoAlvo="filtro"
|
|
18
|
+
:somenteConsulta="true"
|
|
19
|
+
:valorInicial="{ conteudo: 'Contém', id: 'contem' }"
|
|
20
|
+
v-model="pesquisa.filtro"
|
|
21
|
+
:dados="[
|
|
22
|
+
{ conteudo: 'Contém', id: 'contem' },
|
|
23
|
+
{ conteudo: 'Igual', id: 'igual' },
|
|
24
|
+
]"
|
|
11
25
|
/>
|
|
12
26
|
</b-col>
|
|
13
|
-
<b-col xs="
|
|
27
|
+
<b-col xs="4" sm="4" md="4" lg="4" xl="4">
|
|
14
28
|
<div class="div-botao">
|
|
15
29
|
<Botao
|
|
16
30
|
chave="pesquisar"
|
|
@@ -35,11 +49,12 @@
|
|
|
35
49
|
|
|
36
50
|
<script>
|
|
37
51
|
import Botao from "../forms/Botao";
|
|
52
|
+
import EscolherEstatico from "../forms/EscolherEstatico.vue";
|
|
38
53
|
|
|
39
54
|
import { mapMutations } from "vuex";
|
|
40
55
|
|
|
41
56
|
export default {
|
|
42
|
-
components: { Botao },
|
|
57
|
+
components: { Botao, EscolherEstatico },
|
|
43
58
|
name: "Pesquisa",
|
|
44
59
|
computed: {
|
|
45
60
|
pesquisa: {
|
|
@@ -62,10 +77,11 @@ export default {
|
|
|
62
77
|
},
|
|
63
78
|
limpaPesquisa() {
|
|
64
79
|
this.limpouPesquisa();
|
|
65
|
-
|
|
80
|
+
let pesquisa = { conteudo: "", filtro: { conteudo: "contem", id: "contem" } };
|
|
81
|
+
this.atualizaCampoPesquisa(pesquisa);
|
|
66
82
|
},
|
|
67
83
|
verificaLimpaPesquisa() {
|
|
68
|
-
if (this.pesquisa.length == 0) this.limpouPesquisa();
|
|
84
|
+
if (this.pesquisa.conteudo.length == 0) this.limpouPesquisa();
|
|
69
85
|
},
|
|
70
86
|
},
|
|
71
87
|
};
|
|
@@ -82,8 +98,12 @@ export default {
|
|
|
82
98
|
display: inline-block;
|
|
83
99
|
}
|
|
84
100
|
|
|
101
|
+
.margem {
|
|
102
|
+
padding-top: 25px;
|
|
103
|
+
}
|
|
104
|
+
|
|
85
105
|
.div-botao {
|
|
86
|
-
|
|
106
|
+
padding-top: 25px;
|
|
87
107
|
}
|
|
88
108
|
|
|
89
109
|
::placeholder {
|
|
@@ -105,7 +125,6 @@ input[type="text"] {
|
|
|
105
125
|
transition: background-color 0.1s ease-in 0s, border 0.1s ease-in 0s;
|
|
106
126
|
}
|
|
107
127
|
|
|
108
|
-
/* When the input field gets focus, change its width to 100% */
|
|
109
128
|
input[type="text"]:focus {
|
|
110
129
|
outline: none;
|
|
111
130
|
}
|
|
@@ -84,6 +84,7 @@ export default {
|
|
|
84
84
|
},
|
|
85
85
|
baseParams: {
|
|
86
86
|
pesquisa: undefined,
|
|
87
|
+
filtro: "contem",
|
|
87
88
|
paginaAtual: 1,
|
|
88
89
|
totalPorPagina: 10,
|
|
89
90
|
},
|
|
@@ -101,7 +102,8 @@ export default {
|
|
|
101
102
|
});
|
|
102
103
|
},
|
|
103
104
|
beforeDestroy() {
|
|
104
|
-
|
|
105
|
+
let pesquisa = { conteudo: "", filtro: { conteudo: "contem", id: "contem" } };
|
|
106
|
+
this.atualizaCampoPesquisa(pesquisa);
|
|
105
107
|
},
|
|
106
108
|
computed: {
|
|
107
109
|
...mapState("generic", [
|
|
@@ -150,17 +152,19 @@ export default {
|
|
|
150
152
|
},
|
|
151
153
|
watch: {
|
|
152
154
|
metodoExecutadoApi: function (value) {
|
|
153
|
-
if (value
|
|
155
|
+
if (value === "deleteAllApi" || value === "deleteAllApiErro") {
|
|
154
156
|
this.obterTodos();
|
|
155
157
|
}
|
|
156
158
|
},
|
|
157
159
|
buscouPesquisa: function () {
|
|
158
|
-
this.baseParams.pesquisa = this.pesquisa;
|
|
160
|
+
this.baseParams.pesquisa = this.pesquisa.conteudo;
|
|
161
|
+
this.baseParams.filtro = this.pesquisa.filtro.id;
|
|
159
162
|
this.limpaParams();
|
|
160
163
|
this.obterTodos();
|
|
161
164
|
},
|
|
162
165
|
limpouPesquisa: function () {
|
|
163
166
|
this.baseParams.pesquisa = "";
|
|
167
|
+
this.baseParams.filtro = "";
|
|
164
168
|
this.limpaParams();
|
|
165
169
|
this.obterTodos();
|
|
166
170
|
},
|
|
@@ -28,7 +28,7 @@ export default {
|
|
|
28
28
|
tipo: undefined,
|
|
29
29
|
},
|
|
30
30
|
ids: undefined,
|
|
31
|
-
pesquisa:
|
|
31
|
+
pesquisa: { conteudo: "", filtro: { conteudo: "contem", id: "contem" } },
|
|
32
32
|
EscolherEstatico: { dataHora: undefined, campoAlvo: undefined, valor: undefined },
|
|
33
33
|
buscouPesquisa: false,
|
|
34
34
|
limpouPesquisa: false,
|
|
@@ -256,6 +256,7 @@ export default {
|
|
|
256
256
|
return response.data;
|
|
257
257
|
} else {
|
|
258
258
|
context.commit('insereNotificacao', response.data.notificacoes)
|
|
259
|
+
context.commit('insereMetodoExecutadoApi', 'deleteAllApiErro');
|
|
259
260
|
context.commit('insereToast', 'deleteApiErro');
|
|
260
261
|
return response.data;
|
|
261
262
|
}
|