@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,169 +1,170 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="c-div-button">
|
|
3
|
-
<button
|
|
4
|
-
class="button"
|
|
5
|
-
:class="{
|
|
6
|
-
small: size === 'small',
|
|
7
|
-
medium: size === 'medium',
|
|
8
|
-
large: size === 'large',
|
|
9
|
-
primary: type === 'primary',
|
|
10
|
-
success: type === 'success',
|
|
11
|
-
warning: type === 'warning',
|
|
12
|
-
info: type === 'info',
|
|
13
|
-
edit: type === 'edit',
|
|
14
|
-
danger: type === 'danger',
|
|
15
|
-
disabled: disabled,
|
|
16
|
-
}"
|
|
17
|
-
:disabled="disabled"
|
|
18
|
-
@click="execute()"
|
|
19
|
-
>
|
|
20
|
-
<i class="title" :class="classIcon" v-if="!isLoading(this._key) && classIcon"></i>
|
|
21
|
-
<span v-if="!isLoading(this._key)">{{ title }}</span>
|
|
22
|
-
<vue-loading
|
|
23
|
-
v-if="isLoading(this._key)"
|
|
24
|
-
type="bubbles"
|
|
25
|
-
color="#fff"
|
|
26
|
-
:size="{ width: '26px', height: '26px' }"
|
|
27
|
-
></vue-loading>
|
|
28
|
-
</button>
|
|
29
|
-
</div>
|
|
30
|
-
</template>
|
|
31
|
-
|
|
32
|
-
<script>
|
|
33
|
-
import { mapGetters, mapMutations } from "vuex";
|
|
34
|
-
|
|
35
|
-
export default {
|
|
36
|
-
name: "Button",
|
|
37
|
-
props: {
|
|
38
|
-
_key: String,
|
|
39
|
-
title: String,
|
|
40
|
-
type: String,
|
|
41
|
-
size: String,
|
|
42
|
-
eventName: String,
|
|
43
|
-
eventData: Object,
|
|
44
|
-
classIcon: String,
|
|
45
|
-
disabled: Boolean,
|
|
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
|
-
border
|
|
80
|
-
|
|
81
|
-
font-
|
|
82
|
-
font-
|
|
83
|
-
|
|
84
|
-
-
|
|
85
|
-
-
|
|
86
|
-
box-shadow: 0px 10px 20px -6px
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
color: #
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
color: #
|
|
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
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<div class="c-div-button">
|
|
3
|
+
<button
|
|
4
|
+
class="button"
|
|
5
|
+
:class="{
|
|
6
|
+
small: size === 'small',
|
|
7
|
+
medium: size === 'medium',
|
|
8
|
+
large: size === 'large',
|
|
9
|
+
primary: type === 'primary',
|
|
10
|
+
success: type === 'success',
|
|
11
|
+
warning: type === 'warning',
|
|
12
|
+
info: type === 'info',
|
|
13
|
+
edit: type === 'edit',
|
|
14
|
+
danger: type === 'danger',
|
|
15
|
+
disabled: disabled,
|
|
16
|
+
}"
|
|
17
|
+
:disabled="disabled"
|
|
18
|
+
@click="execute()"
|
|
19
|
+
>
|
|
20
|
+
<i class="title" :class="classIcon" v-if="!isLoading(this._key) && classIcon"></i>
|
|
21
|
+
<span v-if="!isLoading(this._key)">{{ title }}</span>
|
|
22
|
+
<vue-loading
|
|
23
|
+
v-if="isLoading(this._key)"
|
|
24
|
+
type="bubbles"
|
|
25
|
+
color="#fff"
|
|
26
|
+
:size="{ width: '26px', height: '26px' }"
|
|
27
|
+
></vue-loading>
|
|
28
|
+
</button>
|
|
29
|
+
</div>
|
|
30
|
+
</template>
|
|
31
|
+
|
|
32
|
+
<script>
|
|
33
|
+
import { mapGetters, mapMutations } from "vuex";
|
|
34
|
+
|
|
35
|
+
export default {
|
|
36
|
+
name: "Button",
|
|
37
|
+
props: {
|
|
38
|
+
_key: String,
|
|
39
|
+
title: String,
|
|
40
|
+
type: String,
|
|
41
|
+
size: String,
|
|
42
|
+
eventName: String,
|
|
43
|
+
eventData: Object,
|
|
44
|
+
classIcon: String,
|
|
45
|
+
disabled: Boolean,
|
|
46
|
+
params: Object,
|
|
47
|
+
clicked: Function,
|
|
48
|
+
},
|
|
49
|
+
computed: {
|
|
50
|
+
...mapGetters("generic", ["isLoading"]),
|
|
51
|
+
},
|
|
52
|
+
methods: {
|
|
53
|
+
...mapMutations("generic", ["addLoading", "addEvent"]),
|
|
54
|
+
execute() {
|
|
55
|
+
if (this.eventName)
|
|
56
|
+
this.addEvent({
|
|
57
|
+
name: this.eventName,
|
|
58
|
+
data: this.eventData,
|
|
59
|
+
});
|
|
60
|
+
this.addLoading(this._key);
|
|
61
|
+
if (this.clicked) this.clicked(this.params);
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
};
|
|
65
|
+
</script>
|
|
66
|
+
<style scoped>
|
|
67
|
+
.c-div-button {
|
|
68
|
+
display: inline-block;
|
|
69
|
+
margin-left: 5px;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.title {
|
|
73
|
+
margin: 2px;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.button {
|
|
77
|
+
padding: 8px 12px;
|
|
78
|
+
cursor: pointer;
|
|
79
|
+
border: none;
|
|
80
|
+
border-radius: 40px !important;
|
|
81
|
+
font-size: 13px !important;
|
|
82
|
+
font-weight: normal;
|
|
83
|
+
font-style: normal !important;
|
|
84
|
+
letter-spacing: 1px !important;
|
|
85
|
+
-webkit-box-shadow: 0px 10px 20px -6px rgb(0 0 0 / 12%);
|
|
86
|
+
-moz-box-shadow: 0px 10px 20px -6px rgba(0, 0, 0, 0.12);
|
|
87
|
+
box-shadow: 0px 10px 20px -6px rgb(0 0 0 / 12%);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.small {
|
|
91
|
+
padding: 3px 7px;
|
|
92
|
+
font-size: 13px;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.medium {
|
|
96
|
+
padding: 7px 12px;
|
|
97
|
+
font-size: 14px;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.large {
|
|
101
|
+
padding: 10px 15px;
|
|
102
|
+
font-size: 14px;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.disabled {
|
|
106
|
+
background: #bbbbbb !important;
|
|
107
|
+
border-color: #bbbbbb !important;
|
|
108
|
+
color: #fff;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.primary {
|
|
112
|
+
background: #577696;
|
|
113
|
+
border-color: #577696;
|
|
114
|
+
color: #fff;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.primary:hover {
|
|
118
|
+
background: #355472;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.success {
|
|
122
|
+
color: #fff;
|
|
123
|
+
background: #94aa2a;
|
|
124
|
+
border-color: #94aa2a;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.success:hover {
|
|
128
|
+
background: #6d7e1c;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.info {
|
|
132
|
+
color: #fff;
|
|
133
|
+
border-color: #4ab4e2;
|
|
134
|
+
background: #4ab4e2;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.info:hover {
|
|
138
|
+
background: #3e90b3;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.edit {
|
|
142
|
+
color: #fff;
|
|
143
|
+
border-color: #7b7f83;
|
|
144
|
+
background: #7b7f83;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.edit:hover {
|
|
148
|
+
background: #595c5f;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.warning {
|
|
152
|
+
color: #fff;
|
|
153
|
+
border-color: #f1bc31;
|
|
154
|
+
background: #f1bc31;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.warning:hover {
|
|
158
|
+
background: #a37d1b;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.danger {
|
|
162
|
+
color: #fff;
|
|
163
|
+
border-color: #f0134d;
|
|
164
|
+
background: #f0134d;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.danger:hover {
|
|
168
|
+
background: #c70f40;
|
|
169
|
+
}
|
|
170
|
+
</style>
|
|
@@ -1,63 +1,72 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<b-form-group :label="title">
|
|
4
|
-
<b-form-checkbox-group
|
|
5
|
-
v-model="selected"
|
|
6
|
-
:options="options"
|
|
7
|
-
:stacked="stacked"
|
|
8
|
-
@click.native="execute"
|
|
9
|
-
></b-form-checkbox-group>
|
|
10
|
-
</b-form-group>
|
|
11
|
-
</div>
|
|
12
|
-
</template>
|
|
13
|
-
|
|
14
|
-
<script>
|
|
15
|
-
import { mapMutations } from "vuex";
|
|
16
|
-
|
|
17
|
-
export default {
|
|
18
|
-
name: "CheckboxGroup",
|
|
19
|
-
props: {
|
|
20
|
-
title: String,
|
|
21
|
-
options: Array,
|
|
22
|
-
params: Object,
|
|
23
|
-
changed: Function,
|
|
24
|
-
clicked: Function,
|
|
25
|
-
initialValue: Array,
|
|
26
|
-
value: Array,
|
|
27
|
-
stacked: {
|
|
28
|
-
type: Boolean,
|
|
29
|
-
default: false,
|
|
30
|
-
},
|
|
31
|
-
markFormDirty: {
|
|
32
|
-
type: Boolean,
|
|
33
|
-
default: true,
|
|
34
|
-
},
|
|
35
|
-
},
|
|
36
|
-
data() {
|
|
37
|
-
return {
|
|
38
|
-
selected: [],
|
|
39
|
-
};
|
|
40
|
-
},
|
|
41
|
-
mounted() {
|
|
42
|
-
this.selected = this.initialValue;
|
|
43
|
-
},
|
|
44
|
-
methods: {
|
|
45
|
-
...mapMutations("validation", ["updateFormDirty"]),
|
|
46
|
-
execute(event) {
|
|
47
|
-
if (this.markFormDirty) this.updateFormDirty(true);
|
|
48
|
-
this.$emit("input", this.selected);
|
|
49
|
-
let self = this;
|
|
50
|
-
setTimeout(function () {
|
|
51
|
-
// adicionado o pointerId para prevenir que não seja executado em duplicidade
|
|
52
|
-
if (self.clicked && event.pointerId === 1) self.clicked(self.params);
|
|
53
|
-
}, 100);
|
|
54
|
-
},
|
|
55
|
-
},
|
|
56
|
-
watch: {
|
|
57
|
-
selected
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<b-form-group :label="title">
|
|
4
|
+
<b-form-checkbox-group
|
|
5
|
+
v-model="selected"
|
|
6
|
+
:options="options"
|
|
7
|
+
:stacked="stacked"
|
|
8
|
+
@click.native="execute"
|
|
9
|
+
></b-form-checkbox-group>
|
|
10
|
+
</b-form-group>
|
|
11
|
+
</div>
|
|
12
|
+
</template>
|
|
13
|
+
|
|
14
|
+
<script>
|
|
15
|
+
import { mapMutations } from "vuex";
|
|
16
|
+
|
|
17
|
+
export default {
|
|
18
|
+
name: "CheckboxGroup",
|
|
19
|
+
props: {
|
|
20
|
+
title: String,
|
|
21
|
+
options: Array,
|
|
22
|
+
params: Object,
|
|
23
|
+
changed: Function,
|
|
24
|
+
clicked: Function,
|
|
25
|
+
initialValue: Array,
|
|
26
|
+
value: Array,
|
|
27
|
+
stacked: {
|
|
28
|
+
type: Boolean,
|
|
29
|
+
default: false,
|
|
30
|
+
},
|
|
31
|
+
markFormDirty: {
|
|
32
|
+
type: Boolean,
|
|
33
|
+
default: true,
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
data() {
|
|
37
|
+
return {
|
|
38
|
+
selected: [],
|
|
39
|
+
};
|
|
40
|
+
},
|
|
41
|
+
mounted() {
|
|
42
|
+
if (this.initialValue) this.selected = this.initialValue;
|
|
43
|
+
},
|
|
44
|
+
methods: {
|
|
45
|
+
...mapMutations("validation", ["updateFormDirty"]),
|
|
46
|
+
execute(event) {
|
|
47
|
+
if (this.markFormDirty) this.updateFormDirty(true);
|
|
48
|
+
this.$emit("input", this.selected);
|
|
49
|
+
let self = this;
|
|
50
|
+
setTimeout(function () {
|
|
51
|
+
// adicionado o pointerId para prevenir que não seja executado em duplicidade
|
|
52
|
+
if (self.clicked && event.pointerId === 1) self.clicked(self.params);
|
|
53
|
+
}, 100);
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
watch: {
|
|
57
|
+
selected: {
|
|
58
|
+
handler(value) {
|
|
59
|
+
this.$emit("input", value);
|
|
60
|
+
if (this.changed) this.changed(this.params);
|
|
61
|
+
},
|
|
62
|
+
deep: true,
|
|
63
|
+
},
|
|
64
|
+
initialValue: {
|
|
65
|
+
handler(value) {
|
|
66
|
+
if (this.initialValue) this.selected = this.initialValue;
|
|
67
|
+
},
|
|
68
|
+
deep: true,
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
};
|
|
72
|
+
</script>
|
|
@@ -1,27 +1,46 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<b-form-checkbox v-model="
|
|
4
|
-
{{ title }}
|
|
5
|
-
<Tip :field="field" :formName="formName" />
|
|
6
|
-
</b-form-checkbox>
|
|
7
|
-
</div>
|
|
8
|
-
</template>
|
|
9
|
-
|
|
10
|
-
<script>
|
|
11
|
-
import Tip from "../shared/Tip.vue";
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
value
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}
|
|
27
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<b-form-checkbox v-model="valueLocal" :value="true" :unchecked-value="false">
|
|
4
|
+
{{ title }}
|
|
5
|
+
<Tip :field="field" :formName="formName" />
|
|
6
|
+
</b-form-checkbox>
|
|
7
|
+
</div>
|
|
8
|
+
</template>
|
|
9
|
+
|
|
10
|
+
<script>
|
|
11
|
+
import Tip from "../shared/Tip.vue";
|
|
12
|
+
|
|
13
|
+
import { mapMutations } from "vuex";
|
|
14
|
+
|
|
15
|
+
export default {
|
|
16
|
+
components: { Tip },
|
|
17
|
+
name: "CheckboxSimple",
|
|
18
|
+
props: {
|
|
19
|
+
title: String,
|
|
20
|
+
formName: String,
|
|
21
|
+
field: String,
|
|
22
|
+
value: Boolean,
|
|
23
|
+
markFormDirty: {
|
|
24
|
+
type: Boolean,
|
|
25
|
+
default: true,
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
data() {
|
|
29
|
+
return {
|
|
30
|
+
valueLocal: false,
|
|
31
|
+
};
|
|
32
|
+
},
|
|
33
|
+
methods: {
|
|
34
|
+
...mapMutations("validation", ["updateFormDirty"]),
|
|
35
|
+
},
|
|
36
|
+
watch: {
|
|
37
|
+
value() {
|
|
38
|
+
this.valueLocal = this.value;
|
|
39
|
+
},
|
|
40
|
+
valueLocal() {
|
|
41
|
+
this.$emit("input", this.valueLocal);
|
|
42
|
+
if (this.markFormDirty) this.updateFormDirty(true);
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
};
|
|
46
|
+
</script>
|
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="form-group">
|
|
3
|
-
<div>
|
|
4
|
-
<span class="title">{{ title }} </span>
|
|
5
|
-
<compact-picker v-model.trim="color.hex" />
|
|
6
|
-
</div>
|
|
7
|
-
</div>
|
|
8
|
-
</template>
|
|
9
|
-
|
|
10
|
-
<script>
|
|
11
|
-
import { Chrome } from "vue-color";
|
|
12
|
-
|
|
13
|
-
export default {
|
|
14
|
-
name: "Color",
|
|
15
|
-
components: {
|
|
16
|
-
"compact-picker": Chrome,
|
|
17
|
-
},
|
|
18
|
-
props: {
|
|
19
|
-
title: String,
|
|
20
|
-
field: String,
|
|
21
|
-
formName: String,
|
|
22
|
-
value: String,
|
|
23
|
-
},
|
|
24
|
-
data() {
|
|
25
|
-
return {
|
|
26
|
-
color: { hex: "#40BF84" },
|
|
27
|
-
};
|
|
28
|
-
},
|
|
29
|
-
watch: {
|
|
30
|
-
value() {
|
|
31
|
-
this.color.hex = this.value;
|
|
32
|
-
},
|
|
33
|
-
"color.hex": function (value) {
|
|
34
|
-
if (value.hex) this.$emit("input", value.hex);
|
|
35
|
-
},
|
|
36
|
-
},
|
|
37
|
-
};
|
|
38
|
-
</script>
|
|
1
|
+
<template>
|
|
2
|
+
<div class="form-group">
|
|
3
|
+
<div>
|
|
4
|
+
<span class="title">{{ title }} </span>
|
|
5
|
+
<compact-picker v-model.trim="color.hex" />
|
|
6
|
+
</div>
|
|
7
|
+
</div>
|
|
8
|
+
</template>
|
|
9
|
+
|
|
10
|
+
<script>
|
|
11
|
+
import { Chrome } from "vue-color";
|
|
12
|
+
|
|
13
|
+
export default {
|
|
14
|
+
name: "Color",
|
|
15
|
+
components: {
|
|
16
|
+
"compact-picker": Chrome,
|
|
17
|
+
},
|
|
18
|
+
props: {
|
|
19
|
+
title: String,
|
|
20
|
+
field: String,
|
|
21
|
+
formName: String,
|
|
22
|
+
value: String,
|
|
23
|
+
},
|
|
24
|
+
data() {
|
|
25
|
+
return {
|
|
26
|
+
color: { hex: "#40BF84" },
|
|
27
|
+
};
|
|
28
|
+
},
|
|
29
|
+
watch: {
|
|
30
|
+
value() {
|
|
31
|
+
this.color.hex = this.value;
|
|
32
|
+
},
|
|
33
|
+
"color.hex": function (value) {
|
|
34
|
+
if (value.hex) this.$emit("input", value.hex);
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
</script>
|