@nixweb/nixloc-ui 0.0.91 → 0.0.94
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 +4 -2
- package/src/component/forms/EscolherEstatico.vue +0 -3
- package/src/component/layout/BarraRolagem.vue +9 -2
- package/src/component/layout/Menu.vue +16 -9
- package/src/component/layout/Moldura.vue +8 -3
- package/src/component/layout/Tag.vue +66 -0
- package/src/component/shared/FiltroHorizontal.vue +8 -2
- package/src/component/shared/Progresso.vue +14 -1
- package/src/component/shared/Tabela.vue +5 -15
- package/src/component/shared/query-builder/Campo.vue +116 -0
- package/src/component/shared/query-builder/ConverteParaOdata.js +73 -0
- package/src/component/shared/query-builder/Filtro.vue +85 -0
- package/src/component/shared/query-builder/QueryBuilder.vue +164 -0
- package/src/component/shared/query-builder/Rodape.vue +38 -0
- package/src/component/shared/query-builder/Tags.vue +84 -0
- package/src/component/shared/query-builder/components/CustomSelect.vue +115 -0
- package/src/component/shared/query-builder/components/QueryBuilderChildren.vue +46 -0
- package/src/component/shared/query-builder/components/QueryBuilderGroup.vue +151 -0
- package/src/component/shared/query-builder/components/QueryBuilderRule.vue +81 -0
- package/src/component/shared/query-builder/layouts/Bootstrap/BootstrapGroup.vue +120 -0
- package/src/component/shared/query-builder/layouts/Bootstrap/BootstrapRule.vue +171 -0
- package/src/component/shared/query-builder/main.js +81 -0
- package/src/component/shared/query-builder/utilities.js +22 -0
- package/src/component/template/ModeloRelatorioListaView.vue +153 -0
- package/src/component/template/ModeloRelatorioView.vue +455 -0
- package/src/store/modulos/generic.js +11 -0
- package/src/store/modulos/relatorio.js +149 -0
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<!-- eslint-disable vue/no-v-html -->
|
|
3
|
+
<div class="vqb-group card" :class="'depth-' + depth.toString()">
|
|
4
|
+
<div class="vqb-group-heading card-header" v-if="false">
|
|
5
|
+
<div class="match-type-container form-inline">
|
|
6
|
+
<label class="mr-2" for="vqb-match-type">
|
|
7
|
+
{{ labels.matchType }}
|
|
8
|
+
</label>
|
|
9
|
+
|
|
10
|
+
<select id="vqb-match-type" v-model="query.logicalOperator" class="form-control">
|
|
11
|
+
<option v-for="label in labels.matchTypes" :key="label.id" :value="label.id">
|
|
12
|
+
{{ label.label }}
|
|
13
|
+
</option>
|
|
14
|
+
</select>
|
|
15
|
+
|
|
16
|
+
<button
|
|
17
|
+
v-if="depth > 1"
|
|
18
|
+
type="button"
|
|
19
|
+
class="close ml-auto"
|
|
20
|
+
@click="remove"
|
|
21
|
+
v-html="labels.removeGroup"
|
|
22
|
+
></button>
|
|
23
|
+
</div>
|
|
24
|
+
</div>
|
|
25
|
+
|
|
26
|
+
<div class="vqb-group-body card-body">
|
|
27
|
+
<div class="rule-actions form-inline">
|
|
28
|
+
<div class="div-custom">
|
|
29
|
+
<b-row>
|
|
30
|
+
<b-col sm="6">
|
|
31
|
+
<CustomSelect :options="rules" class="select" v-model="selectedRule" />
|
|
32
|
+
</b-col>
|
|
33
|
+
<b-col sm="4">
|
|
34
|
+
<button type="button" class="btn btn-secondary mr-2" @click="addRule">
|
|
35
|
+
{{ labels.addRule }}
|
|
36
|
+
</button>
|
|
37
|
+
</b-col>
|
|
38
|
+
</b-row>
|
|
39
|
+
|
|
40
|
+
<!-- <button
|
|
41
|
+
v-if="depth < maxDepth"
|
|
42
|
+
type="button"
|
|
43
|
+
class="btn btn-secondary"
|
|
44
|
+
@click="addGroup"
|
|
45
|
+
>
|
|
46
|
+
{{ labels.addGroup }}
|
|
47
|
+
</button> -->
|
|
48
|
+
</div>
|
|
49
|
+
</div>
|
|
50
|
+
|
|
51
|
+
<query-builder-children v-bind="$props" />
|
|
52
|
+
</div>
|
|
53
|
+
</div>
|
|
54
|
+
</template>
|
|
55
|
+
|
|
56
|
+
<script>
|
|
57
|
+
import CustomSelect from "../../components/CustomSelect.vue";
|
|
58
|
+
import QueryBuilderGroup from "../../components/QueryBuilderGroup";
|
|
59
|
+
import QueryBuilderRule from "./BootstrapRule.vue";
|
|
60
|
+
|
|
61
|
+
export default {
|
|
62
|
+
name: "QueryBuilderGroup",
|
|
63
|
+
|
|
64
|
+
components: {
|
|
65
|
+
// eslint-disable-next-line vue/no-unused-components
|
|
66
|
+
QueryBuilderRule: QueryBuilderRule,
|
|
67
|
+
CustomSelect,
|
|
68
|
+
},
|
|
69
|
+
|
|
70
|
+
extends: QueryBuilderGroup,
|
|
71
|
+
};
|
|
72
|
+
</script>
|
|
73
|
+
|
|
74
|
+
<style>
|
|
75
|
+
.titulo-option {
|
|
76
|
+
padding: 10px;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.div-custom {
|
|
80
|
+
width: 100%;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.vue-query-builder .vqb-group .rule-actions {
|
|
84
|
+
margin-bottom: 20px;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.vue-query-builder .vqb-rule {
|
|
88
|
+
margin-top: 15px;
|
|
89
|
+
margin-bottom: 15px;
|
|
90
|
+
background-color: #f5f5f5;
|
|
91
|
+
border-color: #ddd;
|
|
92
|
+
padding: 15px;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.vue-query-builder .vqb-group.depth-1 .vqb-rule,
|
|
96
|
+
.vue-query-builder .vqb-group.depth-2 {
|
|
97
|
+
border-left: 2px solid #8bc34a;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.vue-query-builder .vqb-group.depth-2 .vqb-rule,
|
|
101
|
+
.vue-query-builder .vqb-group.depth-3 {
|
|
102
|
+
border-left: 2px solid #00bcd4;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.vue-query-builder .vqb-group.depth-3 .vqb-rule,
|
|
106
|
+
.vue-query-builder .vqb-group.depth-4 {
|
|
107
|
+
border-left: 2px solid #ff5722;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.vue-query-builder .close {
|
|
111
|
+
opacity: 1;
|
|
112
|
+
color: rgb(150, 150, 150);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
@media (min-width: 768px) {
|
|
116
|
+
.vue-query-builder .vqb-rule.form-inline .form-group {
|
|
117
|
+
display: block;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
</style>
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<!-- eslint-disable vue/no-v-html -->
|
|
3
|
+
<div class="vqb-rule card">
|
|
4
|
+
<div class="form-inline">
|
|
5
|
+
<label :class="rule.classeCss" class="mr-5">
|
|
6
|
+
<i :class="rule.icone"></i>
|
|
7
|
+
<span style="margin-left: 10px">{{ rule.label }} </span>
|
|
8
|
+
</label>
|
|
9
|
+
|
|
10
|
+
<!-- List of operands (optional) -->
|
|
11
|
+
<select
|
|
12
|
+
v-if="typeof rule.operands !== 'undefined'"
|
|
13
|
+
v-model="query.operand"
|
|
14
|
+
class="form-control mr-2"
|
|
15
|
+
>
|
|
16
|
+
<option v-for="operand in rule.operands" :key="operand">
|
|
17
|
+
{{ operand }}
|
|
18
|
+
</option>
|
|
19
|
+
</select>
|
|
20
|
+
|
|
21
|
+
<!-- List of operators (e.g. =, !=, >, <) -->
|
|
22
|
+
<select
|
|
23
|
+
v-if="typeof rule.operators !== 'undefined' && rule.operators.length > 1"
|
|
24
|
+
v-model="query.operator"
|
|
25
|
+
class="form-control mr-2"
|
|
26
|
+
>
|
|
27
|
+
<option v-for="operator in rule.operators" :key="operator" :value="operator">
|
|
28
|
+
{{ operator }}
|
|
29
|
+
</option>
|
|
30
|
+
</select>
|
|
31
|
+
|
|
32
|
+
<!-- Basic text input -->
|
|
33
|
+
<input
|
|
34
|
+
v-if="rule.inputType === 'text'"
|
|
35
|
+
v-model="query.value"
|
|
36
|
+
class="form-control"
|
|
37
|
+
type="text"
|
|
38
|
+
:placeholder="labels.textInputPlaceholder"
|
|
39
|
+
/>
|
|
40
|
+
|
|
41
|
+
<!-- Basic number input -->
|
|
42
|
+
<input
|
|
43
|
+
v-if="rule.inputType === 'number'"
|
|
44
|
+
v-model="query.value"
|
|
45
|
+
class="form-control"
|
|
46
|
+
type="number"
|
|
47
|
+
/>
|
|
48
|
+
|
|
49
|
+
<!-- Datepicker -->
|
|
50
|
+
<input
|
|
51
|
+
v-if="rule.inputType === 'date'"
|
|
52
|
+
v-model="query.value"
|
|
53
|
+
class="form-control"
|
|
54
|
+
type="date"
|
|
55
|
+
/>
|
|
56
|
+
|
|
57
|
+
<!-- Custom component input -->
|
|
58
|
+
<div v-if="isCustomComponent" class="vqb-custom-component-wrap">
|
|
59
|
+
<DateTime
|
|
60
|
+
v-if="rule.component == 'datetime'"
|
|
61
|
+
:format="rule.props.format"
|
|
62
|
+
:type="rule.props.type"
|
|
63
|
+
:range="rule.props.range"
|
|
64
|
+
:value="query.value"
|
|
65
|
+
@input="updateQuery"
|
|
66
|
+
/>
|
|
67
|
+
</div>
|
|
68
|
+
|
|
69
|
+
<!-- Checkbox input -->
|
|
70
|
+
<template v-if="rule.inputType === 'checkbox'">
|
|
71
|
+
<div
|
|
72
|
+
v-for="choice in rule.choices"
|
|
73
|
+
:key="choice.value"
|
|
74
|
+
class="form-check form-check-inline"
|
|
75
|
+
>
|
|
76
|
+
<input
|
|
77
|
+
:id="'depth' + depth + '-' + rule.id + '-' + index + '-' + choice.value"
|
|
78
|
+
v-model="query.value"
|
|
79
|
+
type="checkbox"
|
|
80
|
+
:value="choice.value"
|
|
81
|
+
class="form-check-input"
|
|
82
|
+
/>
|
|
83
|
+
<label
|
|
84
|
+
class="form-check-label"
|
|
85
|
+
:for="'depth' + depth + '-' + rule.id + '-' + index + '-' + choice.value"
|
|
86
|
+
>
|
|
87
|
+
{{ choice.label }}
|
|
88
|
+
</label>
|
|
89
|
+
</div>
|
|
90
|
+
</template>
|
|
91
|
+
|
|
92
|
+
<!-- Radio input -->
|
|
93
|
+
<template v-if="rule.inputType === 'radio'">
|
|
94
|
+
<div
|
|
95
|
+
v-for="choice in rule.choices"
|
|
96
|
+
:key="choice.value"
|
|
97
|
+
class="form-check form-check-inline"
|
|
98
|
+
>
|
|
99
|
+
<input
|
|
100
|
+
:id="'depth' + depth + '-' + rule.id + '-' + index + '-' + choice.value"
|
|
101
|
+
v-model="query.value"
|
|
102
|
+
:name="'depth' + depth + '-' + rule.id + '-' + index"
|
|
103
|
+
type="radio"
|
|
104
|
+
:value="choice.value"
|
|
105
|
+
class="form-check-input"
|
|
106
|
+
/>
|
|
107
|
+
<label
|
|
108
|
+
class="form-check-label"
|
|
109
|
+
:for="'depth' + depth + '-' + rule.id + '-' + index + '-' + choice.value"
|
|
110
|
+
>
|
|
111
|
+
{{ choice.label }}
|
|
112
|
+
</label>
|
|
113
|
+
</div>
|
|
114
|
+
</template>
|
|
115
|
+
|
|
116
|
+
<!-- Select without groups -->
|
|
117
|
+
<select
|
|
118
|
+
v-if="rule.inputType === 'select' && !hasOptionGroups"
|
|
119
|
+
v-model="query.value"
|
|
120
|
+
class="form-control"
|
|
121
|
+
:multiple="rule.type === 'multi-select'"
|
|
122
|
+
>
|
|
123
|
+
<option v-for="option in selectOptions" :key="option.value" :value="option.value">
|
|
124
|
+
{{ option.label }}
|
|
125
|
+
</option>
|
|
126
|
+
</select>
|
|
127
|
+
|
|
128
|
+
<!-- Select with groups -->
|
|
129
|
+
<select
|
|
130
|
+
v-if="rule.inputType === 'select' && hasOptionGroups"
|
|
131
|
+
v-model="query.value"
|
|
132
|
+
class="form-control"
|
|
133
|
+
:multiple="rule.type === 'multi-select'"
|
|
134
|
+
>
|
|
135
|
+
<optgroup
|
|
136
|
+
v-for="(option, option_key) in selectOptions"
|
|
137
|
+
:key="option_key"
|
|
138
|
+
:label="option_key"
|
|
139
|
+
>
|
|
140
|
+
<option
|
|
141
|
+
v-for="sub_option in option"
|
|
142
|
+
:key="sub_option.value"
|
|
143
|
+
:value="sub_option.value"
|
|
144
|
+
>
|
|
145
|
+
{{ sub_option.label }}
|
|
146
|
+
</option>
|
|
147
|
+
</optgroup>
|
|
148
|
+
</select>
|
|
149
|
+
|
|
150
|
+
<!-- Remove rule button -->
|
|
151
|
+
<button
|
|
152
|
+
type="button"
|
|
153
|
+
class="close ml-auto"
|
|
154
|
+
@click="remove"
|
|
155
|
+
v-html="labels.removeRule"
|
|
156
|
+
></button>
|
|
157
|
+
</div>
|
|
158
|
+
</div>
|
|
159
|
+
</template>
|
|
160
|
+
|
|
161
|
+
<script>
|
|
162
|
+
import QueryBuilderRule from "../../components/QueryBuilderRule";
|
|
163
|
+
import DateTime from "@nixweb/nixloc-ui/src/component/forms/DateTime";
|
|
164
|
+
|
|
165
|
+
export default {
|
|
166
|
+
extends: QueryBuilderRule,
|
|
167
|
+
components: {
|
|
168
|
+
DateTime,
|
|
169
|
+
},
|
|
170
|
+
};
|
|
171
|
+
</script>
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import Vue from 'vue'
|
|
2
|
+
import VueQueryBuilder from '@nixweb/nixloc-ui/src/component/shared/QueryBuilder/VueQueryBuilder.vue'
|
|
3
|
+
|
|
4
|
+
Vue.config.productionTip = false
|
|
5
|
+
|
|
6
|
+
let rules = [
|
|
7
|
+
{
|
|
8
|
+
type: "text",
|
|
9
|
+
id: "first-name",
|
|
10
|
+
label: "First Name",
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
type: "text",
|
|
14
|
+
id: "last-name",
|
|
15
|
+
label: "Last Name",
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
type: "radio",
|
|
19
|
+
id: "plan-type",
|
|
20
|
+
label: "Plan Type",
|
|
21
|
+
choices: [
|
|
22
|
+
{label: "Standard", value: "standard"},
|
|
23
|
+
{label: "Premium", value: "premium"}
|
|
24
|
+
]
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
type: "checkbox",
|
|
28
|
+
id: "sizes",
|
|
29
|
+
label: "Sizes",
|
|
30
|
+
choices: [
|
|
31
|
+
{label: "Small", value: "small"},
|
|
32
|
+
{label: "Medium", value: "medium"},
|
|
33
|
+
{label: "Large", value: "large"}
|
|
34
|
+
]
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
type: "text",
|
|
38
|
+
id: "date",
|
|
39
|
+
inputType:"date",
|
|
40
|
+
label: "Date",
|
|
41
|
+
operands: ['Start Date', 'End Date']
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
type: "select",
|
|
45
|
+
id: 'select',
|
|
46
|
+
label: 'Color',
|
|
47
|
+
operators: ['=', '<>'],
|
|
48
|
+
choices: [
|
|
49
|
+
{label: "red", value: 'Red'},
|
|
50
|
+
{label: "orange", value: 'Orange'},
|
|
51
|
+
{label: "yellow", value: 'Yellow'},
|
|
52
|
+
{label: "green", value: 'Green'},
|
|
53
|
+
{label: "blue", value: 'Blue'},
|
|
54
|
+
{label: "indigo", value: 'Indigo'},
|
|
55
|
+
{label: "violet", value: 'Violet'},
|
|
56
|
+
]
|
|
57
|
+
},
|
|
58
|
+
];
|
|
59
|
+
|
|
60
|
+
new Vue({
|
|
61
|
+
el: '#app',
|
|
62
|
+
|
|
63
|
+
components: { VueQueryBuilder },
|
|
64
|
+
|
|
65
|
+
data: {
|
|
66
|
+
rules: rules,
|
|
67
|
+
output: {},
|
|
68
|
+
},
|
|
69
|
+
|
|
70
|
+
computed: {
|
|
71
|
+
outputFormatted: function() {
|
|
72
|
+
return JSON.stringify(this.output, null, 2);
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
|
|
76
|
+
methods: {
|
|
77
|
+
updateQuery: function(value){
|
|
78
|
+
this.output = value;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
});
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns a depply cloned object without reference.
|
|
3
|
+
* Copied from Vue MultiSelect and Vuex.
|
|
4
|
+
* @type {Object}
|
|
5
|
+
*/
|
|
6
|
+
const deepClone = function (obj) {
|
|
7
|
+
if (Array.isArray(obj)) {
|
|
8
|
+
return obj.map(deepClone)
|
|
9
|
+
} else if (obj && typeof obj === 'object') {
|
|
10
|
+
var cloned = {}
|
|
11
|
+
var keys = Object.keys(obj)
|
|
12
|
+
for (var i = 0, l = keys.length; i < l; i++) {
|
|
13
|
+
var key = keys[i]
|
|
14
|
+
cloned[key] = deepClone(obj[key])
|
|
15
|
+
}
|
|
16
|
+
return cloned
|
|
17
|
+
} else {
|
|
18
|
+
return obj
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export default deepClone;
|
|
@@ -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>
|