@nixweb/nixloc-ui 0.0.90 → 0.0.93

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nixweb/nixloc-ui",
3
- "version": "0.0.90",
3
+ "version": "0.0.93",
4
4
  "description": "Componentes UI",
5
5
  "author": "Fábio Ávila <fabio@nixweb.com.br>",
6
6
  "private": false,
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div class="moldura">
2
+ <div class="moldura" :style="'border-radius:' + bordaArredondada + 'px'">
3
3
  <slot></slot>
4
4
  </div>
5
5
  </template>
@@ -7,13 +7,18 @@
7
7
  <script>
8
8
  export default {
9
9
  name: "Moldura",
10
+ props: {
11
+ bordaArredondada: {
12
+ type: Number,
13
+ default: 3,
14
+ },
15
+ },
10
16
  };
11
17
  </script>
12
18
  <style scoped>
13
19
  .moldura {
14
20
  border: 1px solid #dbdfe9;
15
- background-color: white;
16
- border-radius: 3px;
21
+ background-color: transparent;
17
22
  padding: 15px;
18
23
  }
19
24
  </style>
@@ -258,14 +258,14 @@ tr:hover {
258
258
  }
259
259
 
260
260
  .link {
261
- color: #0057A9;
262
- font-size: 14px;
261
+ color: #0c63c0;
262
+ font-size: 15px;
263
263
  font-weight: 400;
264
264
  cursor: pointer;
265
265
  }
266
266
 
267
267
  .link:hover {
268
- font-size: 14.5px;
268
+ text-decoration: underline;
269
269
  transition: 0.1s;
270
270
  }
271
271
 
@@ -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>