free-fe-core-modules 0.0.1
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/README.md +7 -0
- package/components/.gitkeep +0 -0
- package/components/Basic/BreadCrumbs.vue +87 -0
- package/components/Basic/EIcon.vue +84 -0
- package/components/Basic/LeveledMenus.vue +92 -0
- package/components/Basic/SummaryHead.vue +312 -0
- package/components/Dialog/BasicDialog.vue +442 -0
- package/components/Dialog/index.js +38 -0
- package/components/Dialog/index1.js +49 -0
- package/components/FloatingWindow/index.vue +140 -0
- package/components/SelectLocales/index.vue +47 -0
- package/components/SlidingCarousel/index.vue +86 -0
- package/components/SlidingNews/index.vue +138 -0
- package/components/StickyButtons/index.vue +98 -0
- package/components/ThemeSwitch/index.vue +77 -0
- package/field-components/Display/index.js +3 -0
- package/field-components/Fields/AgreementCheck.vue +161 -0
- package/field-components/Fields/ApiCall.vue +139 -0
- package/field-components/Fields/Boolean.vue +112 -0
- package/field-components/Fields/Category.vue +33 -0
- package/field-components/Fields/Check.vue +131 -0
- package/field-components/Fields/Customize.vue +103 -0
- package/field-components/Fields/Date.vue +142 -0
- package/field-components/Fields/DateRange.vue +199 -0
- package/field-components/Fields/DynamicList.vue +575 -0
- package/field-components/Fields/FieldEditor.vue +379 -0
- package/field-components/Fields/File.vue +382 -0
- package/field-components/Fields/FileList.vue +405 -0
- package/field-components/Fields/FileListCombined.vue +142 -0
- package/field-components/Fields/FixedList.vue +372 -0
- package/field-components/Fields/Image.vue +328 -0
- package/field-components/Fields/ImageList.vue +285 -0
- package/field-components/Fields/ImageListCombined.vue +76 -0
- package/field-components/Fields/InputFieldList.vue +299 -0
- package/field-components/Fields/Labels.vue +182 -0
- package/field-components/Fields/MixedTable.vue +367 -0
- package/field-components/Fields/Number.vue +247 -0
- package/field-components/Fields/Password.vue +79 -0
- package/field-components/Fields/Permission.vue +83 -0
- package/field-components/Fields/PermissionEditor.vue +205 -0
- package/field-components/Fields/QueryFilters.vue +162 -0
- package/field-components/Fields/RadioList.vue +81 -0
- package/field-components/Fields/Rich.vue +369 -0
- package/field-components/Fields/Search.vue +499 -0
- package/field-components/Fields/Select.vue +376 -0
- package/field-components/Fields/SelectionChain.vue +198 -0
- package/field-components/Fields/Separator.vue +26 -0
- package/field-components/Fields/SingleList.vue +125 -0
- package/field-components/Fields/Static.vue +22 -0
- package/field-components/Fields/String.vue +185 -0
- package/field-components/Fields/Text.vue +89 -0
- package/field-components/Fields/Time.vue +160 -0
- package/field-components/Fields/TimeRange.vue +348 -0
- package/field-components/Fields/UltimateFile.vue +100 -0
- package/field-components/Fields/Year.vue +124 -0
- package/field-components/Fields/YearRange.vue +188 -0
- package/field-components/Fields/components/FieldTypeOptions.vue +248 -0
- package/field-components/Fields/index.js +117 -0
- package/field-components/components/FieldComponents.vue +246 -0
- package/field-components/index.js +13 -0
- package/field-components/style.sass +11 -0
- package/free-fields/AutoHide.js +66 -0
- package/free-fields/CenterContent.js +15 -0
- package/free-fields/Draggable.js +30 -0
- package/free-fields/Droppable.js +114 -0
- package/free-fields/EditableString.js +63 -0
- package/free-fields/FieldCategory.js +83 -0
- package/free-fields/FieldTypeSelect.js +94 -0
- package/free-fields/fieldEditors/arrayEditor.js +3 -0
- package/free-fields/fieldEditors/boolEditor.js +22 -0
- package/free-fields/fieldEditors/dateEditor.js +23 -0
- package/free-fields/fieldEditors/datetimeEditor.js +23 -0
- package/free-fields/fieldEditors/index.js +21 -0
- package/free-fields/fieldEditors/jsonEditor.js +371 -0
- package/free-fields/fieldEditors/labeledField.js +74 -0
- package/free-fields/fieldEditors/numberEditor.js +51 -0
- package/free-fields/fieldEditors/objectEditor.js +3 -0
- package/free-fields/fieldEditors/selectEditor.js +0 -0
- package/free-fields/fieldEditors/stringEditor.js +49 -0
- package/free-fields/fieldEditors/textEditor.js +50 -0
- package/free-fields/fieldEditors/timeEditor.js +23 -0
- package/free-fields/index.js +402 -0
- package/i18n/en-us/index.js +73 -0
- package/i18n/fields/en-us/index.js +9 -0
- package/i18n/fields/zh-cn/index.js +9 -0
- package/i18n/zh-cn/index.js +73 -0
- package/index.js +367 -0
- package/package.json +11 -0
- package/router/dict/api.js +18 -0
- package/router/dict/data.js +48 -0
- package/router/dict/index.js +7 -0
- package/router/error/api.js +14 -0
- package/router/error/data.js +33 -0
- package/router/error/index.js +9 -0
- package/router/index.js +13 -0
- package/router/menu/api.js +24 -0
- package/router/menu/data.js +85 -0
- package/router/menu/index.js +7 -0
- package/router/system/api.js +10 -0
- package/router/system/data.js +46 -0
- package/router/system/index.js +7 -0
- package/stores/index.js +17 -0
- package/stores/module-mourning/actions.js +3 -0
- package/stores/module-mourning/getters.js +1 -0
- package/stores/module-mourning/index.js +11 -0
- package/stores/module-mourning/state.js +3 -0
- package/stores/mourning.js +3 -0
- package/view/dict/index.vue +284 -0
- package/view/error/list.vue +197 -0
- package/view/menu/index.vue +332 -0
- package/view/mourning/mourning.vue +45 -0
- package/view/system/index.vue +149 -0
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<span class="input-field-year-range simple-field">
|
|
3
|
+
<span v-if="Field.ReadOnly">
|
|
4
|
+
<span
|
|
5
|
+
:class="`field-label field-label-readonly ${(Field.Label && Field.Label.trim().length)
|
|
6
|
+
? '' : 'field-label-empty'} ${Field.Required ? 'required' : ''}`"
|
|
7
|
+
v-if="Field.Label"
|
|
8
|
+
>
|
|
9
|
+
<q-tooltip v-if="Field.Description" anchor="top right">{{Field.Description}}</q-tooltip>
|
|
10
|
+
{{Field.Label || ''}}
|
|
11
|
+
<span v-if="Field.Required" class="required-mark">*</span>
|
|
12
|
+
</span>
|
|
13
|
+
<span class="readonly-content">{{fieldData}}</span>
|
|
14
|
+
</span>
|
|
15
|
+
<span v-else class="row items-center no-wrap">
|
|
16
|
+
<q-select
|
|
17
|
+
v-model="range.min"
|
|
18
|
+
hide-bottom-space
|
|
19
|
+
:options="minYearOptions"
|
|
20
|
+
:readonly="Field.ReadOnly"
|
|
21
|
+
v-bind="$attrs"
|
|
22
|
+
@input="rangeChanged"
|
|
23
|
+
:ref="`input_field_validator_first`"
|
|
24
|
+
>
|
|
25
|
+
<template v-slot:before v-if="typeof Field.Label !== 'undefined'">
|
|
26
|
+
<span
|
|
27
|
+
:class="`field-label ${(Field.Label && Field.Label.trim().length)
|
|
28
|
+
? '' : 'field-label-empty'} ${Field.Required ? 'required' : ''}`"
|
|
29
|
+
>
|
|
30
|
+
<q-tooltip v-if="Field.Description" anchor="top right">{{Field.Description}}</q-tooltip>
|
|
31
|
+
{{Field.Label || ''}}
|
|
32
|
+
<span v-if="Field.Required" class="required-mark">*</span>
|
|
33
|
+
</span>
|
|
34
|
+
</template>
|
|
35
|
+
</q-select>
|
|
36
|
+
<span class="input-field-range-separator">{{`${Field.Separator || '~'}`}}</span>
|
|
37
|
+
<q-select
|
|
38
|
+
v-model="range.max"
|
|
39
|
+
hide-bottom-space
|
|
40
|
+
:options="maxYearOptions"
|
|
41
|
+
:readonly="Field.ReadOnly"
|
|
42
|
+
@input="rangeChanged"
|
|
43
|
+
v-bind="$attrs"
|
|
44
|
+
:ref="`input_field_validator_second`"
|
|
45
|
+
/>
|
|
46
|
+
</span>
|
|
47
|
+
|
|
48
|
+
<slot name="warning"></slot>
|
|
49
|
+
</span>
|
|
50
|
+
</template>
|
|
51
|
+
|
|
52
|
+
<script>
|
|
53
|
+
import { defineComponent } from 'vue';
|
|
54
|
+
import mixins from 'free-fe-mixins';
|
|
55
|
+
|
|
56
|
+
export default defineComponent({
|
|
57
|
+
name: 'InputFieldYearRange',
|
|
58
|
+
mixins: [mixins.InputFieldMixin],
|
|
59
|
+
fieldInfo: {
|
|
60
|
+
Category: 'DateTime',
|
|
61
|
+
Label: '年份范围',
|
|
62
|
+
Value: 'YearRange',
|
|
63
|
+
Extra: [
|
|
64
|
+
{
|
|
65
|
+
Type: 'String',
|
|
66
|
+
Label: '最小值',
|
|
67
|
+
Name: 'MinValue',
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
Type: 'String',
|
|
71
|
+
Label: '最大值',
|
|
72
|
+
Name: 'MaxValue',
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
Type: 'Boolean',
|
|
76
|
+
Label: '最大至“现在”',
|
|
77
|
+
Name: 'Info.TillNow',
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
Type: 'Boolean',
|
|
81
|
+
Label: '最小从“现在”',
|
|
82
|
+
Name: 'Info.FromNow',
|
|
83
|
+
},
|
|
84
|
+
],
|
|
85
|
+
Description: '',
|
|
86
|
+
},
|
|
87
|
+
data() {
|
|
88
|
+
return {
|
|
89
|
+
range: {
|
|
90
|
+
min: '',
|
|
91
|
+
max: '',
|
|
92
|
+
},
|
|
93
|
+
};
|
|
94
|
+
},
|
|
95
|
+
watch: {
|
|
96
|
+
fieldData() {
|
|
97
|
+
const yl = (this.fieldData || '').split(this.Field.Separator || '~');
|
|
98
|
+
[this.range.min, this.range.max] = yl;
|
|
99
|
+
|
|
100
|
+
// if (!this.range.min) {
|
|
101
|
+
// this.$set(this.range, 'min', Number(this.Field.MinValue) || 1900);
|
|
102
|
+
// }
|
|
103
|
+
// if (!this.range.max) {
|
|
104
|
+
// this.$set(this.range, 'max', Number(this.Field.MaxValue)
|
|
105
|
+
// || (this.Field.TillNow ? Date.now().year : 2050));
|
|
106
|
+
// }
|
|
107
|
+
},
|
|
108
|
+
range() {
|
|
109
|
+
if (this.range.min && this.range.max) return;
|
|
110
|
+
this.fieldData = [this.range.min, this.range.max].join(
|
|
111
|
+
this.Field.Separator || '~',
|
|
112
|
+
);
|
|
113
|
+
this.$emit('input');
|
|
114
|
+
},
|
|
115
|
+
},
|
|
116
|
+
created() {
|
|
117
|
+
// if (!this.range.min) {
|
|
118
|
+
// this.$set(this.range, 'min', Number(this.Field.MinValue) || 1900);
|
|
119
|
+
// }
|
|
120
|
+
// if (!this.range.max) {
|
|
121
|
+
// this.$set(this.range, 'max', Number(this.Field.MaxValue)
|
|
122
|
+
// || (this.Field.TillNow ? Date.now().year : 2050));
|
|
123
|
+
// }
|
|
124
|
+
},
|
|
125
|
+
computed: {
|
|
126
|
+
minYearOptions() {
|
|
127
|
+
if (this.Field.Options && Array.isArray(this.Field.Options)) {
|
|
128
|
+
return this.Field.Options;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
let minYear = 1900;
|
|
132
|
+
let maxYear = Date.now().year;
|
|
133
|
+
|
|
134
|
+
if (this.Field.MinValue && Number(this.Field.MinValue)) {
|
|
135
|
+
minYear = Number(this.Field.MinValue);
|
|
136
|
+
}
|
|
137
|
+
if (this.Field.MaxValue && Number(this.Field.MaxValue)) {
|
|
138
|
+
maxYear = Number(this.Field.MaxValue);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
if (this.range.max && this.range.max < maxYear.toString()) {
|
|
142
|
+
maxYear = Number(this.range.max) - 1;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
const options = [];
|
|
146
|
+
for (let i = minYear; i <= maxYear; i += 1) {
|
|
147
|
+
options.push(i.toString());
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
return options;
|
|
151
|
+
},
|
|
152
|
+
maxYearOptions() {
|
|
153
|
+
if (this.Field.Options && Array.isArray(this.Field.Options)) {
|
|
154
|
+
return this.Field.Options;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
let minYear = 1900;
|
|
158
|
+
let maxYear = Date.now().year;
|
|
159
|
+
|
|
160
|
+
if (this.Field.MinValue && Number(this.Field.MinValue)) {
|
|
161
|
+
minYear = Number(this.Field.MinValue);
|
|
162
|
+
}
|
|
163
|
+
if (this.Field.MaxValue && Number(this.Field.MaxValue)) {
|
|
164
|
+
maxYear = Number(this.Field.MaxValue);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
if (this.range.min && this.range.min > minYear.toString()) {
|
|
168
|
+
minYear = Number(this.range.min) + 1;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
const options = [];
|
|
172
|
+
for (let i = minYear; i <= maxYear; i += 1) {
|
|
173
|
+
options.push(i.toString());
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
return options;
|
|
177
|
+
},
|
|
178
|
+
},
|
|
179
|
+
methods: {
|
|
180
|
+
rangeChanged() {
|
|
181
|
+
this.fieldData = [this.range.min, this.range.max].join(
|
|
182
|
+
this.Field.Separator || '~',
|
|
183
|
+
);
|
|
184
|
+
this.$emit('input');
|
|
185
|
+
},
|
|
186
|
+
},
|
|
187
|
+
});
|
|
188
|
+
</script>
|
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<span v-if="Field" class="simple-field input-field-field-type-options row items-center no-wrap">
|
|
3
|
+
<q-input
|
|
4
|
+
:value="optionLabel"
|
|
5
|
+
hide-bottom-space
|
|
6
|
+
readonly
|
|
7
|
+
v-bind="$attrs"
|
|
8
|
+
:ref="`input_field_validator_date`"
|
|
9
|
+
>
|
|
10
|
+
<template v-slot:before>
|
|
11
|
+
<span
|
|
12
|
+
:class="
|
|
13
|
+
`field-label ${
|
|
14
|
+
Field.Label && Field.Label.trim().length
|
|
15
|
+
? ''
|
|
16
|
+
: 'field-label-empty'
|
|
17
|
+
} ${Field.Required ? 'required' : ''}`
|
|
18
|
+
"
|
|
19
|
+
v-if="typeof Field.Label !== 'undefined'"
|
|
20
|
+
>
|
|
21
|
+
<q-tooltip v-if="Field.Description" anchor="top right">
|
|
22
|
+
{{
|
|
23
|
+
Field.Description
|
|
24
|
+
}}
|
|
25
|
+
</q-tooltip>
|
|
26
|
+
{{ Field.Label || '' }}
|
|
27
|
+
<span v-if="Field.Required" class="required-mark">*</span>
|
|
28
|
+
</span>
|
|
29
|
+
</template>
|
|
30
|
+
<q-popup-proxy ref="qTypeProxy" transition-show="scale" transition-hide="scale">
|
|
31
|
+
<div class="row input-field-field-type-options-content" style="max-height: 320px">
|
|
32
|
+
<q-card class="full-height" style="min-width: 500px">
|
|
33
|
+
<q-separator />
|
|
34
|
+
<q-splitter v-model="splitter" style="height: 300px">
|
|
35
|
+
<template v-slot:before>
|
|
36
|
+
<q-tabs v-model="leftTab" vertical active-bg-color="grey-4">
|
|
37
|
+
<q-tab
|
|
38
|
+
v-for="(category, index) in categoryList"
|
|
39
|
+
:key="index"
|
|
40
|
+
ripple
|
|
41
|
+
:name="category"
|
|
42
|
+
:label="$t(`fieldCategory${category}`)"
|
|
43
|
+
></q-tab>
|
|
44
|
+
</q-tabs>
|
|
45
|
+
</template>
|
|
46
|
+
|
|
47
|
+
<template v-slot:after>
|
|
48
|
+
<q-tab-panels
|
|
49
|
+
v-model="leftTab"
|
|
50
|
+
animated
|
|
51
|
+
transition-prev="slide-down"
|
|
52
|
+
transition-next="slide-up"
|
|
53
|
+
class="full-height"
|
|
54
|
+
>
|
|
55
|
+
<q-tab-panel
|
|
56
|
+
v-for="(category, index) in categoryList"
|
|
57
|
+
:key="index"
|
|
58
|
+
:name="category"
|
|
59
|
+
class="row full-height"
|
|
60
|
+
style="width: 800px;"
|
|
61
|
+
>
|
|
62
|
+
<q-list class="col full-height scroll" style="max-width: 180px">
|
|
63
|
+
<q-item
|
|
64
|
+
v-for="(option, index) in categoryFields(category)"
|
|
65
|
+
:key="index"
|
|
66
|
+
clickable
|
|
67
|
+
v-ripple
|
|
68
|
+
:active="fieldData === option.Value"
|
|
69
|
+
@click="typeChanged(option)"
|
|
70
|
+
>
|
|
71
|
+
<q-item-section>
|
|
72
|
+
<q-item-label>{{ option.Label }}</q-item-label>
|
|
73
|
+
</q-item-section>
|
|
74
|
+
</q-item>
|
|
75
|
+
</q-list>
|
|
76
|
+
<q-card
|
|
77
|
+
class="col full-height scroll"
|
|
78
|
+
flat
|
|
79
|
+
style="min-width: 500px; margin-bottom: 10px; border: 1px solid grey"
|
|
80
|
+
>
|
|
81
|
+
<q-card-section>
|
|
82
|
+
<free-field
|
|
83
|
+
v-for="(field, index)
|
|
84
|
+
in (Array.isArray(demoField) ? demoField : [demoField])"
|
|
85
|
+
:key="index"
|
|
86
|
+
:Field="field"
|
|
87
|
+
:values="demoData"
|
|
88
|
+
></free-field>
|
|
89
|
+
</q-card-section>
|
|
90
|
+
<q-card-section></q-card-section>
|
|
91
|
+
</q-card>
|
|
92
|
+
</q-tab-panel>
|
|
93
|
+
</q-tab-panels>
|
|
94
|
+
</template>
|
|
95
|
+
</q-splitter>
|
|
96
|
+
</q-card>
|
|
97
|
+
</div>
|
|
98
|
+
</q-popup-proxy>
|
|
99
|
+
<template v-slot:append>
|
|
100
|
+
<q-icon name="event" class="cursor-pointer"></q-icon>
|
|
101
|
+
</template>
|
|
102
|
+
</q-input>
|
|
103
|
+
</span>
|
|
104
|
+
</template>
|
|
105
|
+
|
|
106
|
+
<script>
|
|
107
|
+
import { defineComponent } from 'vue';
|
|
108
|
+
import mixins from 'free-fe-mixins';
|
|
109
|
+
|
|
110
|
+
export default defineComponent({
|
|
111
|
+
name: 'FieldTypeOptions',
|
|
112
|
+
mixins: [mixins.InputFieldMixin],
|
|
113
|
+
emits: ['updateOptions'],
|
|
114
|
+
data() {
|
|
115
|
+
return {
|
|
116
|
+
leftTab: 'Static',
|
|
117
|
+
splitter: 10,
|
|
118
|
+
testData: {
|
|
119
|
+
Type: 'String',
|
|
120
|
+
Label: 'Label',
|
|
121
|
+
Name: 'value',
|
|
122
|
+
Required: true,
|
|
123
|
+
value: 'test value',
|
|
124
|
+
Options: [
|
|
125
|
+
{
|
|
126
|
+
Label: 'Option one',
|
|
127
|
+
Value: 'test value',
|
|
128
|
+
},
|
|
129
|
+
],
|
|
130
|
+
Warning: 'This is some warning message.',
|
|
131
|
+
Description: 'This is some description',
|
|
132
|
+
Tips: [
|
|
133
|
+
{
|
|
134
|
+
Text: 'this is some tip',
|
|
135
|
+
},
|
|
136
|
+
],
|
|
137
|
+
},
|
|
138
|
+
optionLabel: '',
|
|
139
|
+
fieldCategory: [],
|
|
140
|
+
};
|
|
141
|
+
},
|
|
142
|
+
computed: {
|
|
143
|
+
demoField() {
|
|
144
|
+
if (!this.Field || !this.Field.Options) return [];// this.testData;
|
|
145
|
+
|
|
146
|
+
const f = this.Field.Options.find((o) => o.Value === this.fieldData);
|
|
147
|
+
|
|
148
|
+
if (f && f.fieldInfo && f.fieldInfo.demoField) {
|
|
149
|
+
return f.demoField;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
return [];// { ...this.testData, Type: this.fieldData };
|
|
153
|
+
},
|
|
154
|
+
demoData() {
|
|
155
|
+
if (!this.Field || !this.Field.Options) return {};// this.testData;
|
|
156
|
+
|
|
157
|
+
const f = this.Field.Options.find((o) => o.Value === this.fieldData);
|
|
158
|
+
|
|
159
|
+
if (f && f.fieldInfo && f.fieldInfo.demoData) {
|
|
160
|
+
return f.demoData;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
return {};// this.testData;
|
|
164
|
+
},
|
|
165
|
+
categoryList() {
|
|
166
|
+
return this.fieldCategory.map((fc) => fc.Name);
|
|
167
|
+
},
|
|
168
|
+
categoryFields() {
|
|
169
|
+
return (c) => {
|
|
170
|
+
const cat = this.fieldCategory.find((fc) => fc.Name === c);
|
|
171
|
+
if (cat) return cat.Fields || [];
|
|
172
|
+
return [];
|
|
173
|
+
};
|
|
174
|
+
},
|
|
175
|
+
},
|
|
176
|
+
async created() {
|
|
177
|
+
this.getTypeOptions();
|
|
178
|
+
this.getFieldOptionLabel();
|
|
179
|
+
},
|
|
180
|
+
methods: {
|
|
181
|
+
async getTypeOptions() {
|
|
182
|
+
const typeOptions = [];
|
|
183
|
+
for (let i = 0; i < Object.keys(this.ctx.FieldComponents).length; i += 1) {
|
|
184
|
+
const fk = Object.keys(this.ctx.FieldComponents)[i];
|
|
185
|
+
let fc = this.ctx.FieldComponents[fk];
|
|
186
|
+
|
|
187
|
+
if (typeof fc === 'function') {
|
|
188
|
+
// eslint-disable-next-line no-await-in-loop
|
|
189
|
+
fc = await fc();
|
|
190
|
+
fc = fc.default || fc;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
if (fc && fc.fieldInfo) {
|
|
194
|
+
typeOptions.push(fc.fieldInfo);
|
|
195
|
+
|
|
196
|
+
if (fc.fieldInfo.Value === this.fieldData) {
|
|
197
|
+
this.optionLabel = fc.fieldInfo.Label;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
// category
|
|
201
|
+
const info = fc.fieldInfo;
|
|
202
|
+
if (info.Category) {
|
|
203
|
+
if (this.fieldCategory.findIndex((cl) => cl.Name === info.Category) < 0) {
|
|
204
|
+
this.fieldCategory.push({ Name: info.Category, Fields: [info] });
|
|
205
|
+
} else {
|
|
206
|
+
const c = this.fieldCategory.find((cat) => cat.Name === info.Category);
|
|
207
|
+
if (c) {
|
|
208
|
+
c.Fields = c.Fields || [];
|
|
209
|
+
c.Fields.push(info);
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
} else if (this.fieldCategory.findIndex((cl) => cl.Name === 'Others') < 0) {
|
|
213
|
+
this.fieldCategory.push({ Name: 'Others', Fields: [info] });
|
|
214
|
+
} else {
|
|
215
|
+
const c = this.fieldCategory.find((cat) => cat.Name === 'Others');
|
|
216
|
+
if (c) {
|
|
217
|
+
c.Fields = c.Fields || [];
|
|
218
|
+
c.Fields.push(info);
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
this.$emit('updateOptions', { Name: this.Field.Name, Options: typeOptions });
|
|
225
|
+
},
|
|
226
|
+
getFieldOptionLabel() {
|
|
227
|
+
const opt = this.Field.Options.find((op) => op.Value === this.fieldData);
|
|
228
|
+
if (opt) this.optionLabel = opt.Label;
|
|
229
|
+
},
|
|
230
|
+
typeChanged(option) {
|
|
231
|
+
this.fieldData = option.Value;
|
|
232
|
+
if (option.DataType) this.data.DataType = option.DataType;
|
|
233
|
+
|
|
234
|
+
this.$emit('input');
|
|
235
|
+
this.getFieldOptionLabel();
|
|
236
|
+
},
|
|
237
|
+
},
|
|
238
|
+
});
|
|
239
|
+
</script>
|
|
240
|
+
|
|
241
|
+
<style lang="sass">
|
|
242
|
+
.input-field-field-type-options
|
|
243
|
+
.q-field__control
|
|
244
|
+
padding: 0 8px
|
|
245
|
+
.input-field-field-type-options-content
|
|
246
|
+
.q-panel
|
|
247
|
+
overflow: hidden
|
|
248
|
+
</style>
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import fStatic from './Static.vue';
|
|
2
|
+
import fSelect from './Select.vue';
|
|
3
|
+
import fString from './String.vue';
|
|
4
|
+
import fPassword from './Password.vue';
|
|
5
|
+
import fCategory from './Category.vue';
|
|
6
|
+
import fCheck from './Check.vue';
|
|
7
|
+
import fLabels from './Labels.vue';
|
|
8
|
+
import fNumber from './Number.vue';
|
|
9
|
+
import fPermission from './Permission.vue';
|
|
10
|
+
import fSearch from './Search.vue';
|
|
11
|
+
import fText from './Text.vue';
|
|
12
|
+
import fTime from './Time.vue';
|
|
13
|
+
import fTimeRange from './TimeRange.vue';
|
|
14
|
+
import fDate from './Date.vue';
|
|
15
|
+
import fDateRange from './DateRange.vue';
|
|
16
|
+
import fYear from './Year.vue';
|
|
17
|
+
import fYearRange from './YearRange.vue';
|
|
18
|
+
import fRadioList from './RadioList.vue';
|
|
19
|
+
import fBoolean from './Boolean.vue';
|
|
20
|
+
import fFile from './File.vue';
|
|
21
|
+
import fFileList from './FileList.vue';
|
|
22
|
+
import fImage from './Image.vue';
|
|
23
|
+
import fImageList from './ImageList.vue';
|
|
24
|
+
import fFixedList from './FixedList.vue';
|
|
25
|
+
import fDynamicList from './DynamicList.vue';
|
|
26
|
+
import fSingleList from './SingleList.vue';
|
|
27
|
+
import fSelectChain from './SelectionChain.vue';
|
|
28
|
+
import fRich from './Rich.vue';
|
|
29
|
+
import fFieldEditor from './FieldEditor.vue';
|
|
30
|
+
import fFieldList from './InputFieldList.vue';
|
|
31
|
+
import fMixedTable from './MixedTable.vue';
|
|
32
|
+
import fCustomize from './Customize.vue';
|
|
33
|
+
import fAgreementCheck from './AgreementCheck.vue';
|
|
34
|
+
import fSeparator from './Separator.vue';
|
|
35
|
+
import fQueryFilters from './QueryFilters.vue';
|
|
36
|
+
import fFileListCombined from './FileListCombined.vue';
|
|
37
|
+
import fImageListCombined from './ImageListCombined.vue';
|
|
38
|
+
import fApiCall from './ApiCall.vue';
|
|
39
|
+
|
|
40
|
+
export default {
|
|
41
|
+
Static: fStatic,
|
|
42
|
+
Select: fSelect,
|
|
43
|
+
String: fString,
|
|
44
|
+
Password: fPassword,
|
|
45
|
+
Category: fCategory,
|
|
46
|
+
Check: fCheck,
|
|
47
|
+
Labels: fLabels,
|
|
48
|
+
Number: fNumber,
|
|
49
|
+
Permission: fPermission,
|
|
50
|
+
Search: fSearch,
|
|
51
|
+
Text: fText,
|
|
52
|
+
Time: fTime,
|
|
53
|
+
TimeRange: fTimeRange,
|
|
54
|
+
Date: fDate,
|
|
55
|
+
DateRange: fDateRange,
|
|
56
|
+
Year: fYear,
|
|
57
|
+
YearRange: fYearRange,
|
|
58
|
+
RadioList: fRadioList,
|
|
59
|
+
Boolean: fBoolean,
|
|
60
|
+
File: fFile,
|
|
61
|
+
FileList: fFileList,
|
|
62
|
+
Image: fImage,
|
|
63
|
+
ImageList: fImageList,
|
|
64
|
+
FixedList: fFixedList,
|
|
65
|
+
DynamicList: fDynamicList,
|
|
66
|
+
SingleList: fSingleList,
|
|
67
|
+
SelectionChain: fSelectChain,
|
|
68
|
+
Rich: fRich,
|
|
69
|
+
FieldEditor: fFieldEditor,
|
|
70
|
+
FieldList: fFieldList,
|
|
71
|
+
MixedTable: fMixedTable,
|
|
72
|
+
Customize: fCustomize,
|
|
73
|
+
AgreementCheck: fAgreementCheck,
|
|
74
|
+
Separator: fSeparator,
|
|
75
|
+
QueryFilters: fQueryFilters,
|
|
76
|
+
FileListCombined: fFileListCombined,
|
|
77
|
+
ImageListCombined: fImageListCombined,
|
|
78
|
+
ApiCall: fApiCall,
|
|
79
|
+
// Static: () => import('./Static.vue'),
|
|
80
|
+
// Select: () => import('./Select.vue'),
|
|
81
|
+
// String: () => import('./String.vue'),
|
|
82
|
+
// Password: () => import('./Password.vue'),
|
|
83
|
+
// Category: () => import('./Category.vue'),
|
|
84
|
+
// Check: () => import('./Check.vue'),
|
|
85
|
+
// Labels: () => import('./Labels.vue'),
|
|
86
|
+
// Number: () => import('./Number.vue'),
|
|
87
|
+
// Permission: () => import('./Permission.vue'),
|
|
88
|
+
// Search: () => import('./Search.vue'),
|
|
89
|
+
// Text: () => import('./Text.vue'),
|
|
90
|
+
// Time: () => import('./Time.vue'),
|
|
91
|
+
// TimeRange: () => import('./TimeRange.vue'),
|
|
92
|
+
// Date: () => import('./Date.vue'),
|
|
93
|
+
// DateRange: () => import('./DateRange.vue'),
|
|
94
|
+
// Year: () => import('./Year.vue'),
|
|
95
|
+
// YearRange: () => import('./YearRange.vue'),
|
|
96
|
+
// RadioList: () => import('./RadioList.vue'),
|
|
97
|
+
// Boolean: () => import('./Boolean.vue'),
|
|
98
|
+
// File: () => import('./File.vue'),
|
|
99
|
+
// FileList: () => import('./FileList.vue'),
|
|
100
|
+
// Image: () => import('./Image.vue'),
|
|
101
|
+
// ImageList: () => import('./ImageList.vue'),
|
|
102
|
+
// FixedList: () => import('./FixedList.vue'),
|
|
103
|
+
// DynamicList: () => import('./DynamicList.vue'),
|
|
104
|
+
// SingleList: () => import('./SingleList.vue'),
|
|
105
|
+
// SelectionChain: () => import('./SelectionChain.vue'),
|
|
106
|
+
// Rich: () => import('./Rich.vue'),
|
|
107
|
+
// FieldEditor: () => import('./FieldEditor.vue'),
|
|
108
|
+
// FieldList: () => import('./InputFieldList.vue'),
|
|
109
|
+
// MixedTable: () => import('./MixedTable.vue'),
|
|
110
|
+
// Customize: () => import('./Customize.vue'),
|
|
111
|
+
// AgreementCheck: () => import('./AgreementCheck.vue'),
|
|
112
|
+
// Separator: () => import('./Separator.vue'),
|
|
113
|
+
// QueryFilters: () => import('./QueryFilters.vue'),
|
|
114
|
+
// FileListCombined: () => import('./FileListCombined.vue'),
|
|
115
|
+
// ImageListCombined: () => import('./ImageListCombined.vue'),
|
|
116
|
+
// ApiCall: () => import('./ApiCall.vue'),
|
|
117
|
+
};
|