@nixweb/nixloc-ui 0.0.125 → 0.0.128
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/docs/src/component/template/ViewTemplateReportPreview.drawio +210 -0
- package/package.json +79 -77
- package/src/App.vue +13 -13
- package/src/component/forms/Button.vue +170 -169
- package/src/component/forms/CheckboxGroup.vue +72 -63
- package/src/component/forms/CheckboxSimple.vue +46 -27
- package/src/component/forms/Color.vue +38 -38
- package/src/component/forms/DateTime.vue +167 -177
- package/src/component/forms/Dropdown.vue +218 -224
- package/src/component/forms/EditorHtml.vue +126 -123
- package/src/component/forms/FileUpload.vue +185 -189
- package/src/component/forms/ImageUpload.vue +230 -0
- package/src/component/forms/IncrementDecrement.vue +101 -0
- package/src/component/forms/InputDecimal.vue +142 -137
- package/src/component/forms/InputNumber.vue +154 -149
- package/src/component/forms/InputPassword.vue +135 -135
- package/src/component/forms/InputText.vue +162 -157
- package/src/component/forms/Modal.vue +65 -60
- package/src/component/forms/RadioGroup.vue +50 -50
- package/src/component/forms/Select.vue +349 -337
- package/src/component/forms/SelectStatic.vue +127 -120
- package/src/component/forms/Slider.vue +18 -18
- package/src/component/forms/TextArea.vue +126 -126
- package/src/component/layout/Alert.vue +92 -92
- package/src/component/layout/Badge.vue +103 -103
- package/src/component/layout/FixedBar.vue +100 -68
- package/src/component/layout/Header.vue +38 -35
- package/src/component/layout/LoadingFullPage.vue +27 -27
- package/src/component/layout/Menu.vue +210 -214
- package/src/component/layout/Molded.vue +28 -27
- package/src/component/layout/Panel.vue +140 -142
- package/src/component/layout/Popover.vue +126 -126
- package/src/component/layout/ScrollBar.vue +42 -43
- package/src/component/layout/Tab.vue +135 -0
- package/src/component/layout/Tag.vue +3 -3
- package/src/component/layout/Wizard.vue +211 -213
- package/src/component/rental/DisplayPeriodRent.vue +81 -0
- package/src/component/rental/DisplayTotalization.vue +47 -0
- package/src/component/shared/Collapse.vue +131 -131
- package/src/component/shared/Confirmation.vue +2 -2
- package/src/component/shared/DocumentEditor.vue +1 -1
- package/src/component/shared/DocumentPreview.vue +1 -1
- package/src/component/shared/DocumentPublic.vue +34 -0
- package/src/component/shared/ExportExcel.vue +1 -8
- package/src/component/shared/ExportPDF.vue +116 -116
- package/src/component/shared/{HeaderPrint.vue → HeaderReport.vue} +4 -4
- package/src/component/shared/HorizontalFilter.vue +59 -59
- package/src/component/shared/Loading.vue +107 -107
- package/src/component/shared/LoadingMoreButton.vue +23 -23
- package/src/component/shared/Messages.vue +81 -83
- package/src/component/shared/PDFViewer.vue +22 -22
- package/src/component/shared/Pagination.vue +52 -53
- package/src/component/shared/{LegendaParametro.vue → ParameterLegend.vue} +22 -26
- package/src/component/shared/ProgressBar.vue +22 -21
- package/src/component/shared/QueryButton.vue +66 -66
- package/src/component/shared/Report.vue +187 -0
- package/src/component/shared/SaveCancel.vue +26 -5
- package/src/component/shared/Search.vue +154 -154
- package/src/component/shared/SelectOption.vue +146 -0
- package/src/component/shared/Table.vue +163 -243
- package/src/component/shared/TableButton.vue +36 -36
- package/src/component/shared/TableDraggable.vue +127 -0
- package/src/component/shared/TableItem.vue +177 -0
- package/src/component/shared/TableTotalRecords.vue +9 -10
- package/src/component/shared/TableTotalization.vue +47 -47
- package/src/component/shared/Tip.vue +42 -42
- package/src/component/shared/Toast.vue +54 -54
- package/src/component/shared/TotalizationReport.vue +59 -0
- package/src/component/shared/VerticalFilter.vue +97 -145
- package/src/component/shared/query-builder/AddRule.vue +181 -187
- package/src/component/shared/query-builder/ConvertToOdata.js +34 -43
- package/src/component/shared/query-builder/DynamicComponent.vue +21 -16
- package/src/component/shared/query-builder/DynamicComponentList.vue +73 -0
- package/src/component/shared/query-builder/Fields.vue +29 -63
- package/src/component/shared/query-builder/QueryBuilder.vue +69 -69
- package/src/component/shared/query-builder/Rules.vue +2 -14
- package/src/component/shared/query-builder/SelectRule.vue +15 -15
- package/src/component/shared/query-builder/Tags.vue +24 -8
- package/src/component/shared/query-builder/utilities.js +21 -21
- package/src/component/template/{ListViewWithHandlerData.vue → ListViewWithDataHandler.vue} +260 -231
- package/src/component/template/{AddEditReport.vue → ReportCreateUpdate.vue} +40 -22
- package/src/component/template/ViewTemplateConfiguration.vue +64 -69
- package/src/component/template/ViewTemplateDocumentView.vue +22 -25
- package/src/component/template/ViewTemplateReportList.vue +39 -57
- package/src/component/template/ViewTemplateReportPreview.vue +270 -341
- package/src/component/template/ViewTemplateReportPreviewCOPIASEGURANCA.vue +497 -0
- package/src/component/template/ViewTemplateSelectOption.vue +60 -0
- package/src/component/template/ViewTemplateWithSalveCancel.vue +32 -32
- package/src/component/template/ViewTemplateWithTable.vue +56 -49
- package/src/component/template/model/Report.js +2 -2
- package/src/component/value-objects/Address.js +11 -0
- package/src/component/value-objects/{Endereco.vue → Address.vue} +39 -40
- package/src/component/value-objects/{DadosContato.js → Contact.js} +2 -2
- package/src/component/value-objects/{DadosContato.vue → Contact.vue} +24 -17
- package/src/component/value-objects/Person.js +10 -0
- package/src/component/value-objects/{DadosPessoa.vue → Person.vue} +50 -35
- package/src/config/axios.js +9 -9
- package/src/config/dicas.js +14 -14
- package/src/config/router.js +13 -13
- package/src/config/token.js +14 -14
- package/src/main.js +23 -23
- package/src/store/modules/generic.js +512 -488
- package/src/store/modules/report.js +156 -127
- package/src/store/modules/user.js +6 -0
- package/src/store/modules/validation.js +38 -38
- package/src/store/store.js +13 -13
- package/docs/src/component/template/ModeloRelatorioView.drawio +0 -160
- package/src/component/shared/query-builder/ListDynamicComponent.vue +0 -42
- package/src/component/shared/query-builder/Totalization.vue +0 -38
- package/src/component/value-objects/DadosPessoa.js +0 -10
- package/src/component/value-objects/Endereco.js +0 -11
|
@@ -1,145 +1,97 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<div
|
|
4
|
-
class="molded-button"
|
|
5
|
-
:class="{ fechado: !showFilter, aberto: showFilter }"
|
|
6
|
-
v-show="!showFilter"
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
.
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
z-index: 999;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
.molded-button {
|
|
102
|
-
font-size: 18px;
|
|
103
|
-
background: #ffffff;
|
|
104
|
-
border: solid 1px #dbdfe9;
|
|
105
|
-
border-radius: 5px;
|
|
106
|
-
color: #577696;
|
|
107
|
-
height: 40px;
|
|
108
|
-
width: 80px;
|
|
109
|
-
line-height: 32px;
|
|
110
|
-
padding-top: 3px;
|
|
111
|
-
padding-right: 35px;
|
|
112
|
-
text-align: center;
|
|
113
|
-
position: fixed;
|
|
114
|
-
top: 160px;
|
|
115
|
-
cursor: pointer;
|
|
116
|
-
z-index: 999;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
.button-recolher {
|
|
120
|
-
padding-left: 12px;
|
|
121
|
-
padding-right: 418px;
|
|
122
|
-
right: -38px;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
.aberto {
|
|
126
|
-
right: 365px;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
.fechado {
|
|
130
|
-
right: -38px;
|
|
131
|
-
color: #577696;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
.slide-fade-enter-active {
|
|
135
|
-
transition: all 0.2s ease;
|
|
136
|
-
}
|
|
137
|
-
.slide-fade-leave-active {
|
|
138
|
-
transition: all 0.2s cubic-bezier(1, 0.5, 0.8, 1);
|
|
139
|
-
}
|
|
140
|
-
.slide-fade-enter,
|
|
141
|
-
.slide-fade-leave-to {
|
|
142
|
-
transform: translateX(200px);
|
|
143
|
-
opacity: 0;
|
|
144
|
-
}
|
|
145
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<div
|
|
4
|
+
class="molded-button"
|
|
5
|
+
:class="{ fechado: !showFilter, aberto: showFilter }"
|
|
6
|
+
v-show="!showFilter"
|
|
7
|
+
>
|
|
8
|
+
<i class="fas fa-arrow-circle-left"></i>
|
|
9
|
+
</div>
|
|
10
|
+
|
|
11
|
+
<transition name="slide-fade">
|
|
12
|
+
<div
|
|
13
|
+
class="molded-button button-recolher"
|
|
14
|
+
v-show="showFilter"
|
|
15
|
+
@click="showFilter = false"
|
|
16
|
+
>
|
|
17
|
+
<i class="fas fa-arrow-circle-right"></i>
|
|
18
|
+
</div>
|
|
19
|
+
</transition>
|
|
20
|
+
|
|
21
|
+
<transition name="slide-fade"> </transition>
|
|
22
|
+
</div>
|
|
23
|
+
</template>
|
|
24
|
+
|
|
25
|
+
<script>
|
|
26
|
+
import { mapMutations } from "vuex";
|
|
27
|
+
|
|
28
|
+
export default {
|
|
29
|
+
components: {},
|
|
30
|
+
data() {
|
|
31
|
+
return {
|
|
32
|
+
showFilter: false,
|
|
33
|
+
};
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
</script>
|
|
37
|
+
|
|
38
|
+
<style scoped>
|
|
39
|
+
.molded {
|
|
40
|
+
background: white;
|
|
41
|
+
border-left: solid 1px #dbdee0;
|
|
42
|
+
font-size: 13px;
|
|
43
|
+
height: 100%;
|
|
44
|
+
width: 350px;
|
|
45
|
+
right: 0px;
|
|
46
|
+
padding: 10px;
|
|
47
|
+
position: fixed;
|
|
48
|
+
-webkit-box-shadow: 20px 20px 20px 20px rgba(124, 125, 129, 0.53);
|
|
49
|
+
box-shadow: 20px 20px 20px 20px rgba(124, 125, 129, 0.53);
|
|
50
|
+
z-index: 999;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.molded-button {
|
|
54
|
+
font-size: 18px;
|
|
55
|
+
background: #ffffff;
|
|
56
|
+
border: solid 1px #dbdfe9;
|
|
57
|
+
border-radius: 5px;
|
|
58
|
+
color: #577696;
|
|
59
|
+
height: 40px;
|
|
60
|
+
width: 80px;
|
|
61
|
+
line-height: 32px;
|
|
62
|
+
padding-top: 3px;
|
|
63
|
+
padding-right: 35px;
|
|
64
|
+
text-align: center;
|
|
65
|
+
position: fixed;
|
|
66
|
+
top: 160px;
|
|
67
|
+
cursor: pointer;
|
|
68
|
+
z-index: 999;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.button-recolher {
|
|
72
|
+
padding-left: 12px;
|
|
73
|
+
padding-right: 418px;
|
|
74
|
+
right: -38px;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.aberto {
|
|
78
|
+
right: 365px;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.fechado {
|
|
82
|
+
right: -38px;
|
|
83
|
+
color: #577696;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.slide-fade-enter-active {
|
|
87
|
+
transition: all 0.2s ease;
|
|
88
|
+
}
|
|
89
|
+
.slide-fade-leave-active {
|
|
90
|
+
transition: all 0.2s cubic-bezier(1, 0.5, 0.8, 1);
|
|
91
|
+
}
|
|
92
|
+
.slide-fade-enter,
|
|
93
|
+
.slide-fade-leave-to {
|
|
94
|
+
transform: translateX(200px);
|
|
95
|
+
opacity: 0;
|
|
96
|
+
}
|
|
97
|
+
</style>
|
|
@@ -1,187 +1,181 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div
|
|
3
|
-
<div class="vqb-group
|
|
4
|
-
<div class="
|
|
5
|
-
<div class="
|
|
6
|
-
<
|
|
7
|
-
<b-
|
|
8
|
-
<
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
<
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
<
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
import
|
|
36
|
-
import
|
|
37
|
-
|
|
38
|
-
import
|
|
39
|
-
|
|
40
|
-
import { mapGetters, mapMutations } from "vuex";
|
|
41
|
-
|
|
42
|
-
export default {
|
|
43
|
-
name: "AddRule",
|
|
44
|
-
components: {
|
|
45
|
-
SelectRule,
|
|
46
|
-
DynamicComponent,
|
|
47
|
-
RadioGroup,
|
|
48
|
-
|
|
49
|
-
},
|
|
50
|
-
props: {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
this.
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
this.
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
},
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
.
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
border-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
.vue-query-builder .vqb-group.depth-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
.vue-query-builder .vqb-group.depth-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
.vue-query-builder .
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
@media (min-width: 768px) {
|
|
183
|
-
.vue-query-builder .vqb-rule.form-inline .form-group {
|
|
184
|
-
display: block;
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<div class="vqb-group card">
|
|
4
|
+
<div class="vqb-group-body card-body">
|
|
5
|
+
<div class="rule-actions form-inline">
|
|
6
|
+
<div class="div-custom">
|
|
7
|
+
<b-row>
|
|
8
|
+
<b-col sm="6">
|
|
9
|
+
<SelectRule :options="rules" class="select" v-model="selectedRule" />
|
|
10
|
+
</b-col>
|
|
11
|
+
<b-col sm="3">
|
|
12
|
+
<RadioGroup
|
|
13
|
+
:options="[
|
|
14
|
+
{ text: 'e', value: 'and' },
|
|
15
|
+
{ text: 'ou', value: 'or' },
|
|
16
|
+
]"
|
|
17
|
+
v-model="andOr"
|
|
18
|
+
/>
|
|
19
|
+
</b-col>
|
|
20
|
+
<b-col sm="3">
|
|
21
|
+
<button type="button" class="btn btn-secondary" @click="add">
|
|
22
|
+
+ Adicionar
|
|
23
|
+
</button>
|
|
24
|
+
</b-col>
|
|
25
|
+
</b-row>
|
|
26
|
+
</div>
|
|
27
|
+
</div>
|
|
28
|
+
</div>
|
|
29
|
+
</div>
|
|
30
|
+
<DynamicComponentList />
|
|
31
|
+
</div>
|
|
32
|
+
</template>
|
|
33
|
+
|
|
34
|
+
<script>
|
|
35
|
+
import SelectRule from "./SelectRule.vue";
|
|
36
|
+
import DynamicComponent from "./DynamicComponent.vue";
|
|
37
|
+
import RadioGroup from "@nixweb/nixloc-ui/src/component/forms/RadioGroup.vue";
|
|
38
|
+
import DynamicComponentList from "@nixweb/nixloc-ui/src/component/shared/query-builder/DynamicComponentList.vue";
|
|
39
|
+
|
|
40
|
+
import { mapGetters, mapMutations } from "vuex";
|
|
41
|
+
|
|
42
|
+
export default {
|
|
43
|
+
name: "AddRule",
|
|
44
|
+
components: {
|
|
45
|
+
SelectRule,
|
|
46
|
+
DynamicComponent,
|
|
47
|
+
RadioGroup,
|
|
48
|
+
DynamicComponentList,
|
|
49
|
+
},
|
|
50
|
+
props: {
|
|
51
|
+
rules: Array,
|
|
52
|
+
},
|
|
53
|
+
data() {
|
|
54
|
+
return {
|
|
55
|
+
selectedRule: this.rules[0],
|
|
56
|
+
andOr: "or",
|
|
57
|
+
duplicate: [],
|
|
58
|
+
};
|
|
59
|
+
},
|
|
60
|
+
computed: {
|
|
61
|
+
...mapGetters("generic", ["event"]),
|
|
62
|
+
},
|
|
63
|
+
methods: {
|
|
64
|
+
...mapMutations("generic", ["addNotifications"]),
|
|
65
|
+
...mapMutations("report", ["addSelectedRules"]),
|
|
66
|
+
add() {
|
|
67
|
+
this.selectedRule.andOr = this.andOr;
|
|
68
|
+
this.addRule();
|
|
69
|
+
},
|
|
70
|
+
addRule() {
|
|
71
|
+
let obj = this.mountObject();
|
|
72
|
+
|
|
73
|
+
if (!this.verifyIfExist(obj.name)) {
|
|
74
|
+
this.addSelectedRules(obj);
|
|
75
|
+
if (obj.notDuplicate) this.duplicate.push(obj);
|
|
76
|
+
} else {
|
|
77
|
+
var error = {
|
|
78
|
+
property: "ERRO QUERY BUILDER",
|
|
79
|
+
message: `Não é possível adicionar o filter ${obj.title} 2 vezes!`,
|
|
80
|
+
};
|
|
81
|
+
this.addNotifications([error]);
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
mountObject() {
|
|
85
|
+
let obj = {
|
|
86
|
+
id: this.generateId(),
|
|
87
|
+
name: this.selectedRule.name,
|
|
88
|
+
title: this.selectedRule.title,
|
|
89
|
+
typeField: this.selectedRule.typeField,
|
|
90
|
+
type: this.selectedRule.type,
|
|
91
|
+
options: this.selectedRule.options,
|
|
92
|
+
props: this.selectedRule.props,
|
|
93
|
+
classCss: this.selectedRule.classCss,
|
|
94
|
+
icon: this.selectedRule.icon,
|
|
95
|
+
operators: this.selectedRule.operators,
|
|
96
|
+
operator: null,
|
|
97
|
+
andOr: this.selectedRule.andOr,
|
|
98
|
+
isRequired: this.selectedRule.isRequired,
|
|
99
|
+
notDuplicate: this.selectedRule.notDuplicate,
|
|
100
|
+
value: null,
|
|
101
|
+
};
|
|
102
|
+
return obj;
|
|
103
|
+
},
|
|
104
|
+
generateId() {
|
|
105
|
+
return Math.random()
|
|
106
|
+
.toString(36)
|
|
107
|
+
.replace(/[^a-z]+/g, "")
|
|
108
|
+
.substr(0, 5);
|
|
109
|
+
},
|
|
110
|
+
verifyIfExist(name) {
|
|
111
|
+
var hasRule = this.duplicate.find((rule) => {
|
|
112
|
+
return rule.name === name;
|
|
113
|
+
});
|
|
114
|
+
if (hasRule) return true;
|
|
115
|
+
return false;
|
|
116
|
+
},
|
|
117
|
+
},
|
|
118
|
+
watch: {
|
|
119
|
+
event: {
|
|
120
|
+
handler(event) {
|
|
121
|
+
// se a tag ou a rule que está selecionada foi removida, é necessário remove tambem do array "duplicate" para liberar e adicionar novamente.
|
|
122
|
+
if (event.name == "tagRemoved" || event.name == "selectedRuleRemoved") {
|
|
123
|
+
var duplicate = this.duplicate.filter((item) => {
|
|
124
|
+
return item.id != event.data.id;
|
|
125
|
+
});
|
|
126
|
+
this.duplicate = duplicate;
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
deep: true,
|
|
130
|
+
},
|
|
131
|
+
},
|
|
132
|
+
};
|
|
133
|
+
</script>
|
|
134
|
+
|
|
135
|
+
<style>
|
|
136
|
+
.title-option {
|
|
137
|
+
padding: 10px;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.div-custom {
|
|
141
|
+
width: 100%;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.vue-query-builder .vqb-group .rule-actions {
|
|
145
|
+
margin-bottom: 20px;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.vue-query-builder .vqb-rule {
|
|
149
|
+
margin-top: 15px;
|
|
150
|
+
margin-bottom: 15px;
|
|
151
|
+
background-color: #f5f5f5;
|
|
152
|
+
border-color: #ddd;
|
|
153
|
+
padding: 15px;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.vue-query-builder .vqb-group.depth-1 .vqb-rule,
|
|
157
|
+
.vue-query-builder .vqb-group.depth-2 {
|
|
158
|
+
border-left: 2px solid #8bc34a;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.vue-query-builder .vqb-group.depth-2 .vqb-rule,
|
|
162
|
+
.vue-query-builder .vqb-group.depth-3 {
|
|
163
|
+
border-left: 2px solid #00bcd4;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.vue-query-builder .vqb-group.depth-3 .vqb-rule,
|
|
167
|
+
.vue-query-builder .vqb-group.depth-4 {
|
|
168
|
+
border-left: 2px solid #ff5722;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.vue-query-builder .close {
|
|
172
|
+
opacity: 1;
|
|
173
|
+
color: rgb(150, 150, 150);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
@media (min-width: 768px) {
|
|
177
|
+
.vue-query-builder .vqb-rule.form-inline .form-group {
|
|
178
|
+
display: block;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
</style>
|