@dhccmobile/vue3-lo-form 2.0.0 → 2.0.2
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 +77 -70
- package/dist/demo.html +1 -10
- package/dist/vue3-lo-form.common.js +8704 -6939
- package/dist/vue3-lo-form.common.js.map +1 -1
- package/dist/vue3-lo-form.css +1 -1
- package/dist/vue3-lo-form.umd.js +8715 -6949
- package/dist/vue3-lo-form.umd.js.map +1 -1
- package/dist/vue3-lo-form.umd.min.js +1 -1
- package/dist/vue3-lo-form.umd.min.js.map +1 -1
- package/package.json +72 -65
- package/src/App.vue +741 -741
- package/src/components/form/DvForm.vue +642 -642
- package/src/components/form/DvFormLayout.vue +1592 -1569
- package/src/components/form/StretchText.vue +90 -90
- package/src/components/index.ts +3 -3
- package/src/constants/config/form-template.config.ts +32 -32
- package/src/constants/config/form.config.ts +4 -4
- package/src/constants/config/storage.config.ts +4 -4
- package/src/constants/encode-assets/svg.ts +11 -11
- package/src/constants/enum/builtIn-label.enum.ts +5 -5
- package/src/constants/enum/cache-type.enum.ts +7 -7
- package/src/constants/enum/control-format-type.enum.ts +9 -9
- package/src/constants/enum/dynamic-option-type.enum.ts +6 -6
- package/src/constants/enum/form-bus-attr.enum.ts +8 -8
- package/src/constants/enum/form-field-class.enum.ts +7 -7
- package/src/constants/enum/form-field-type.enum.ts +25 -25
- package/src/constants/enum/form-type.enum.ts +5 -5
- package/src/constants/enum/index.ts +19 -19
- package/src/constants/enum/lateral-arrangement.enum.ts +9 -9
- package/src/constants/enum/money-unit.enum.ts +6 -6
- package/src/constants/enum/option-type.enum.ts +5 -5
- package/src/constants/enum/submitted-type.enum.ts +32 -32
- package/src/constants/enum/support-upload-type.enum.ts +5 -5
- package/src/constants/enum/switch.enum.ts +5 -5
- package/src/constants/enum/upload-type.enum.ts +17 -17
- package/src/constants/enum/validate-rules.enum.ts +25 -25
- package/src/constants/enum/validate-status.enum.ts +8 -8
- package/src/constants/enum/vertical-arrangement.enum.ts +7 -7
- package/src/constants/enum/zoom-type.ts +6 -6
- package/src/constants/index.ts +3 -3
- package/src/core/FormApi.ts +1238 -1238
- package/src/core/index.ts +1 -1
- package/src/domain/AbstractControl.ts +6 -6
- package/src/domain/Control.ts +14 -14
- package/src/domain/CustomFormat.ts +6 -6
- package/src/domain/DesForm.ts +48 -48
- package/src/domain/DesFormControl.ts +241 -241
- package/src/domain/DesFormLayout.ts +51 -51
- package/src/domain/FieldChangeHistory.ts +9 -9
- package/src/domain/FormConfig.ts +16 -15
- package/src/domain/FormControl.ts +125 -125
- package/src/domain/FormEnum.ts +9 -9
- package/src/domain/FormGroup.ts +42 -42
- package/src/domain/FormRestfulResponse.ts +6 -6
- package/src/domain/ProvideInjectData.ts +10 -10
- package/src/domain/SysDictDetail.ts +38 -38
- package/src/domain/SysDictInfo.ts +40 -40
- package/src/domain/SysDictTreeDetail.ts +52 -52
- package/src/domain/index.ts +12 -12
- package/src/filtres/amount-capitalization.filter.ts +154 -154
- package/src/filtres/extract-options.filter.ts +53 -53
- package/src/filtres/generate-grid-column-end.filter.ts +22 -22
- package/src/filtres/generate-grid-template-columns.filter.ts +24 -24
- package/src/filtres/switch-enum-convert.filter.ts +18 -18
- package/src/filtres/zoom-multiple.filter.ts +32 -32
- package/src/index.ts +74 -73
- package/src/main.ts +17 -17
- package/src/services/api.service.ts +73 -73
- package/src/services/clean-local-forage.service.ts +58 -58
- package/src/services/date-format.service.ts +74 -74
- package/src/services/dict-local-forage.service.ts +58 -58
- package/src/services/form-bean-utils.service.ts +41 -41
- package/src/services/form-local-forage.service.ts +59 -59
- package/src/services/form-tools.service.ts +739 -739
- package/src/services/form-tree-node-convert.service.ts +240 -240
- package/src/services/form-validate.service.ts +103 -103
- package/src/services/index.ts +9 -9
- package/src/services/router.service.ts +96 -96
- package/src/services/validate-generator.service.ts +710 -710
- package/src/shims-vue.d.ts +6 -6
- package/src/store/dict.store.ts +63 -63
- package/src/store/form.store.ts +32 -32
- package/src/store/index.ts +2 -2
- package/src/styles/datePicker.scss +125 -125
- package/src/styles/index.scss +195 -195
- package/src/styles/theme1.scss +277 -277
- package/src/styles/theme2.scss +376 -376
- package/src/styles/themes.scss +9 -9
- package/src/types/vfForm.ts +11 -11
- package/types/components/index.d.ts +3 -3
- package/types/constants/config/form-template.config.d.ts +30 -30
- package/types/constants/config/form.config.d.ts +4 -4
- package/types/constants/config/storage.config.d.ts +4 -4
- package/types/constants/encode-assets/svg.d.ts +5 -5
- package/types/constants/enum/builtIn-label.enum.d.ts +7 -7
- package/types/constants/enum/cache-type.enum.d.ts +15 -15
- package/types/constants/enum/control-format-type.enum.d.ts +23 -23
- package/types/constants/enum/dynamic-option-type.enum.d.ts +11 -11
- package/types/constants/enum/form-bus-attr.enum.d.ts +19 -19
- package/types/constants/enum/form-field-class.enum.d.ts +18 -18
- package/types/constants/enum/form-field-type.enum.d.ts +111 -111
- package/types/constants/enum/form-type.enum.d.ts +11 -11
- package/types/constants/enum/index.d.ts +19 -19
- package/types/constants/enum/lateral-arrangement.enum.d.ts +23 -23
- package/types/constants/enum/money-unit.enum.d.ts +15 -15
- package/types/constants/enum/option-type.enum.d.ts +11 -11
- package/types/constants/enum/submitted-type.enum.d.ts +115 -115
- package/types/constants/enum/support-upload-type.enum.d.ts +11 -11
- package/types/constants/enum/switch.enum.d.ts +11 -11
- package/types/constants/enum/upload-type.enum.d.ts +59 -59
- package/types/constants/enum/validate-rules.enum.d.ts +2 -2
- package/types/constants/enum/validate-status.enum.d.ts +2 -2
- package/types/constants/enum/vertical-arrangement.enum.d.ts +21 -21
- package/types/constants/enum/zoom-type.d.ts +15 -15
- package/types/constants/index.d.ts +3 -3
- package/types/core/FormApi.d.ts +376 -376
- package/types/core/index.d.ts +1 -1
- package/types/domain/AbstractControl.d.ts +5 -5
- package/types/domain/Control.d.ts +13 -13
- package/types/domain/CustomFormat.d.ts +5 -5
- package/types/domain/DesForm.d.ts +32 -32
- package/types/domain/DesFormControl.d.ts +160 -160
- package/types/domain/DesFormLayout.d.ts +33 -33
- package/types/domain/FieldChangeHistory.d.ts +9 -9
- package/types/domain/FormConfig.d.ts +16 -15
- package/types/domain/FormControl.d.ts +60 -60
- package/types/domain/FormEnum.d.ts +10 -10
- package/types/domain/FormGroup.d.ts +27 -27
- package/types/domain/FormRestfulResponse.d.ts +6 -6
- package/types/domain/ProvideInjectData.d.ts +10 -10
- package/types/domain/SysDictDetail.d.ts +24 -24
- package/types/domain/SysDictInfo.d.ts +26 -26
- package/types/domain/SysDictTreeDetail.d.ts +34 -34
- package/types/domain/index.d.ts +12 -12
- package/types/filtres/amount-capitalization.filter.d.ts +7 -7
- package/types/filtres/extract-options.filter.d.ts +13 -13
- package/types/filtres/generate-grid-column-end.filter.d.ts +11 -11
- package/types/filtres/generate-grid-template-columns.filter.d.ts +11 -11
- package/types/filtres/switch-enum-convert.filter.d.ts +2 -2
- package/types/filtres/zoom-multiple.filter.d.ts +3 -3
- package/types/index.d.ts +13 -13
- package/types/main.d.ts +2 -2
- package/types/services/api.service.d.ts +25 -25
- package/types/services/clean-local-forage.service.d.ts +28 -28
- package/types/services/date-format.service.d.ts +21 -21
- package/types/services/dict-local-forage.service.d.ts +28 -28
- package/types/services/form-bean-utils.service.d.ts +23 -23
- package/types/services/form-local-forage.service.d.ts +28 -28
- package/types/services/form-tools.service.d.ts +153 -153
- package/types/services/form-tree-node-convert.service.d.ts +104 -104
- package/types/services/form-validate.service.d.ts +32 -32
- package/types/services/index.d.ts +9 -9
- package/types/services/router.service.d.ts +40 -40
- package/types/services/validate-generator.service.d.ts +154 -154
- package/types/store/dict.store.d.ts +29 -29
- package/types/store/form.store.d.ts +17 -17
- package/types/store/index.d.ts +2 -2
- package/types/types/vfForm.d.ts +10 -10
- package/.env.local.bak +0 -6
- package/.eslintrc.js +0 -28
- package/babel.config.js +0 -3
- package/public/favicon.ico +0 -0
- package/public/index.html +0 -17
- package/public/js/pinyin.ts +0 -101
- package/tsconfig.json +0 -40
- package/vue.config.js +0 -38
package/types/core/FormApi.d.ts
CHANGED
|
@@ -1,376 +1,376 @@
|
|
|
1
|
-
import { AbstractControl } from "@/domain/AbstractControl";
|
|
2
|
-
import { Validate, ValidateReport } from "../domain/FormControl";
|
|
3
|
-
import { CustomFormat, FieldChangeHistory } from "../domain";
|
|
4
|
-
import { Rule } from "../services/validate-generator.service";
|
|
5
|
-
import { MathJsStatic } from "mathjs";
|
|
6
|
-
import { Vue } from "vue-property-decorator";
|
|
7
|
-
export declare type FormatType = "default" | "ebtrust";
|
|
8
|
-
export declare enum Attribute {
|
|
9
|
-
IsHideControl = "isHideControl",
|
|
10
|
-
IsRequiredValidate = "isRequiredValidate",
|
|
11
|
-
FormFieldDescribe = "formFieldDescribe",
|
|
12
|
-
FieldDefaultValue = "fieldDefaultValue",
|
|
13
|
-
TitleWidth = "titleWidth",
|
|
14
|
-
IsBoldTitle = "isBoldTitle",
|
|
15
|
-
IsHideTitle = "isHideTitle",
|
|
16
|
-
TitleColor = "titleColor",
|
|
17
|
-
Placeholder = "placeholder",
|
|
18
|
-
Tips = "tips",
|
|
19
|
-
IsNotEdit = "isNotEdit",
|
|
20
|
-
BindingPrefix = "bindingPrefix",
|
|
21
|
-
BindingSuffix = "bindingSuffix",
|
|
22
|
-
BuiltInFrontLabel = "builtInFrontLabel",
|
|
23
|
-
BuiltInPostLabel = "builtInPostLabel",
|
|
24
|
-
ControlWidth = "controlWidth",
|
|
25
|
-
IsPasswordBox = "isPasswordBox",
|
|
26
|
-
InitRowHeight = "initRowHeight",
|
|
27
|
-
IsFixedRowHeight = "isFixedRowHeight",
|
|
28
|
-
FormatType = "formatType",
|
|
29
|
-
MinValue = "minValue",
|
|
30
|
-
MaxValue = "maxValue",
|
|
31
|
-
Step = "step",
|
|
32
|
-
DecimalPlaces = "decimalPlaces",
|
|
33
|
-
ThousandthPercentileFormat = "thousandthPercentileFormat",
|
|
34
|
-
Unit = "unit",
|
|
35
|
-
ZoomType = "zoomType",
|
|
36
|
-
ZoomMultiple = "zoomMultiple",
|
|
37
|
-
IsShowCapitalization = "isShowCapitalization",
|
|
38
|
-
IsLineFeedDisplay = "isLineFeedDisplay",
|
|
39
|
-
IsOptionType = "isOptionType",
|
|
40
|
-
OptionConfig = "optionConfig",
|
|
41
|
-
DateFormat = "dateFormat",
|
|
42
|
-
TimeFormat = "timeFormat",
|
|
43
|
-
IsSupportMultiple = "isSupportMultiple",
|
|
44
|
-
MaxUploadNumber = "maxUploadNumber",
|
|
45
|
-
LimitSize = "limitSize",
|
|
46
|
-
SupportUploadType = "supportUploadType",
|
|
47
|
-
CustomUploadType = "customUploadType",
|
|
48
|
-
ExtendUploadType = "extendUploadType",
|
|
49
|
-
AttachmentExtendProperties = "attachmentExtendProperties",
|
|
50
|
-
IsMultipleChoice = "isMultipleChoice",
|
|
51
|
-
IsSearchable = "isSearchable",
|
|
52
|
-
CanAddEntry = "canAddEntry",
|
|
53
|
-
IsClearButton = "isClearButton",
|
|
54
|
-
OnOpeningValue = "onOpeningValue",
|
|
55
|
-
WhenClosedValue = "whenClosedValue",
|
|
56
|
-
OnOpeningText = "onOpeningText",
|
|
57
|
-
WhenClosedText = "whenClosedText",
|
|
58
|
-
CustomFieldName = "customFieldName",
|
|
59
|
-
TextFold = "textFold",
|
|
60
|
-
HiddenDropdown = "hiddenDropdown",
|
|
61
|
-
BusAttr = "busAttr",
|
|
62
|
-
EnableAutoComplete = "enableAutoComplete",
|
|
63
|
-
AutoCompleteOptions = "autoCompleteOptions",
|
|
64
|
-
IsTreeOpen = "isTreeOpen",
|
|
65
|
-
CheckboxStyle = "checkboxStyle",
|
|
66
|
-
ItemWidth = "itemWidth",
|
|
67
|
-
ChangeOnSelect = "changeOnSelect",
|
|
68
|
-
TextareaRows = "textareaRows",
|
|
69
|
-
IsShowHoliday = "isShowHoliday"
|
|
70
|
-
}
|
|
71
|
-
/**
|
|
72
|
-
* @description: 表单基础类,聚合常用api
|
|
73
|
-
* @author ChenRui
|
|
74
|
-
* @date 2020/11/28 23:27
|
|
75
|
-
*/
|
|
76
|
-
export declare class FormApi {
|
|
77
|
-
id?: any;
|
|
78
|
-
dvForm: Vue | any;
|
|
79
|
-
edit: boolean | undefined;
|
|
80
|
-
formatType: FormatType;
|
|
81
|
-
apiMetaRefresh: any;
|
|
82
|
-
[key: string]: any;
|
|
83
|
-
oldVal: any;
|
|
84
|
-
/**
|
|
85
|
-
* @description: 获取表单对象
|
|
86
|
-
* @author ChenRui
|
|
87
|
-
* @date 2020/11/28 23:29
|
|
88
|
-
*/
|
|
89
|
-
constructor(options?: {
|
|
90
|
-
id?: any;
|
|
91
|
-
dvForm?: Vue;
|
|
92
|
-
edit?: boolean;
|
|
93
|
-
formatType?: FormatType;
|
|
94
|
-
});
|
|
95
|
-
get mathjs(): MathJsStatic;
|
|
96
|
-
/**
|
|
97
|
-
* @description: 获取表单值
|
|
98
|
-
* @author ChenRui
|
|
99
|
-
* @date 2021/2/4 10:36
|
|
100
|
-
*/
|
|
101
|
-
get formData(): any;
|
|
102
|
-
/**
|
|
103
|
-
* @Description 获取表单全部值
|
|
104
|
-
* @Author JiangTao
|
|
105
|
-
* @Date 2023-12-22 下午 02:50
|
|
106
|
-
*/
|
|
107
|
-
get formAllData(): any;
|
|
108
|
-
/**
|
|
109
|
-
* @description: 编码表单对象
|
|
110
|
-
* @author ChenRui
|
|
111
|
-
* @date 2021/4/25 16:41
|
|
112
|
-
*/
|
|
113
|
-
get encodedFormData(): any;
|
|
114
|
-
/**
|
|
115
|
-
* @description: 设置表单值
|
|
116
|
-
* @author ChenRui
|
|
117
|
-
* @date 2021/2/4 10:37
|
|
118
|
-
*/
|
|
119
|
-
setFormData(srcData: any, isDefault?: boolean, validate?: boolean, oldVal?: any): void;
|
|
120
|
-
/**
|
|
121
|
-
* @description: 获取控件对象
|
|
122
|
-
* @author ChenRui
|
|
123
|
-
* @date 2021/1/29 10:08
|
|
124
|
-
*/
|
|
125
|
-
getControl(key: string, control?: AbstractControl, showError?: boolean): AbstractControl | any;
|
|
126
|
-
/**
|
|
127
|
-
* @description: 获取值
|
|
128
|
-
* @author ChenRui
|
|
129
|
-
* @date 2021/1/29 14:57
|
|
130
|
-
*/
|
|
131
|
-
getValue(key: string): any;
|
|
132
|
-
/**
|
|
133
|
-
* @description: 设置值
|
|
134
|
-
* @author ChenRui
|
|
135
|
-
* @date 2021/1/29 16:23
|
|
136
|
-
*/
|
|
137
|
-
setValue(key: string, val: any, isDefault?: boolean, validate?: boolean): void;
|
|
138
|
-
/**
|
|
139
|
-
* @description: 重置表单
|
|
140
|
-
* @author ChenRui
|
|
141
|
-
* @date 2021/2/22 17:40
|
|
142
|
-
*/
|
|
143
|
-
resetValue(): void;
|
|
144
|
-
/**
|
|
145
|
-
* @description: 获取文本内容
|
|
146
|
-
* @author ChenRui
|
|
147
|
-
* @date 2021/1/29 15:03
|
|
148
|
-
*/
|
|
149
|
-
getText(key: string): any;
|
|
150
|
-
/**
|
|
151
|
-
* @description: 获取可选项
|
|
152
|
-
* @author ChenRui
|
|
153
|
-
* @date 2021/1/29 16:11
|
|
154
|
-
*/
|
|
155
|
-
getOptions(key: string): any[];
|
|
156
|
-
/**
|
|
157
|
-
* @description: 设置可选项
|
|
158
|
-
* @author ChenRui
|
|
159
|
-
* @date 2021/1/29 16:15
|
|
160
|
-
*/
|
|
161
|
-
setOptions(key: string, data: any[], defaultVal?: any): void;
|
|
162
|
-
/**
|
|
163
|
-
* @description: 获取常规属性
|
|
164
|
-
* @author ChenRui
|
|
165
|
-
* @date 2021/1/29 17:21
|
|
166
|
-
*/
|
|
167
|
-
getAttribute(key: string, attribute: Attribute): any;
|
|
168
|
-
/**
|
|
169
|
-
* @description: 设置常规属性
|
|
170
|
-
* @author ChenRui
|
|
171
|
-
* @date 2021/1/29 17:21
|
|
172
|
-
*/
|
|
173
|
-
setAttribute(key: string, attribute: Attribute, data: any): void;
|
|
174
|
-
/**
|
|
175
|
-
* @description: 根据name获取校验
|
|
176
|
-
* @author ChenRui
|
|
177
|
-
* @date 2021/1/30 11:46
|
|
178
|
-
*/
|
|
179
|
-
getValidate(key: string, name: string): any;
|
|
180
|
-
/**
|
|
181
|
-
* @description: 移除校验
|
|
182
|
-
* @author ChenRui
|
|
183
|
-
* @date 2021/4/1 21:30
|
|
184
|
-
*/
|
|
185
|
-
removeValidate(key: string, validateName: string): void;
|
|
186
|
-
/**
|
|
187
|
-
* @description: 移除所有校验
|
|
188
|
-
* @author ChenRui
|
|
189
|
-
* @date 2021/4/1 21:48
|
|
190
|
-
*/
|
|
191
|
-
removeAllValidates(key: string): void;
|
|
192
|
-
/**
|
|
193
|
-
* @description: 获取校验集合
|
|
194
|
-
* @author ChenRui
|
|
195
|
-
* @date 2021/1/30 11:40
|
|
196
|
-
*/
|
|
197
|
-
getValidates(key: string): Validate[];
|
|
198
|
-
/**
|
|
199
|
-
* @Description: 设置必输校验
|
|
200
|
-
* @author GuoXuHui
|
|
201
|
-
* @date 2022-05-25
|
|
202
|
-
* @time 10:09
|
|
203
|
-
*/
|
|
204
|
-
setRequiredValidate(key: string, data: boolean): void;
|
|
205
|
-
/**
|
|
206
|
-
* @description: 设置校验
|
|
207
|
-
* @author ChenRui
|
|
208
|
-
* @date 2021/1/30 11:54
|
|
209
|
-
*/
|
|
210
|
-
setValidate(key: string, validate: Validate | Validate[] | Rule, isCover?: boolean): void;
|
|
211
|
-
/**
|
|
212
|
-
* @description: 校验提示
|
|
213
|
-
* @author ChenRui
|
|
214
|
-
* @date 2021/8/18 17:40
|
|
215
|
-
*/
|
|
216
|
-
validateTips(scrollView?: any): boolean;
|
|
217
|
-
/**
|
|
218
|
-
* @description: 全局校验报告
|
|
219
|
-
* @author ChenRui
|
|
220
|
-
* @date 2021/2/5 11:48
|
|
221
|
-
*/
|
|
222
|
-
validateReport(formGroup?: AbstractControl, validateReports?: ValidateReport[], refreshFeedback?: boolean): ValidateReport[];
|
|
223
|
-
/**
|
|
224
|
-
* @description: 表单全局校验
|
|
225
|
-
* @author ChenRui
|
|
226
|
-
* @date 2021/2/5 14:11
|
|
227
|
-
*/
|
|
228
|
-
validate(refreshFeedback?: boolean): boolean;
|
|
229
|
-
/**
|
|
230
|
-
* @description: 刷新校验
|
|
231
|
-
* @author ChenRui
|
|
232
|
-
* @date 2021/6/4 19:32
|
|
233
|
-
*/
|
|
234
|
-
refreshValidate(key: string): void;
|
|
235
|
-
/**
|
|
236
|
-
* @description: 重置表单校验
|
|
237
|
-
* @author ChenRui
|
|
238
|
-
* @date 2022/4/6 11:51
|
|
239
|
-
*/
|
|
240
|
-
resetFormValidateState(): void;
|
|
241
|
-
/**
|
|
242
|
-
* @description: 设置格式化显示和输出函数
|
|
243
|
-
* @author ChenRui
|
|
244
|
-
* @date 2021/2/4 19:44
|
|
245
|
-
*/
|
|
246
|
-
setFormatDisplayAndOutput(key: string, customFormat: CustomFormat): void;
|
|
247
|
-
/**
|
|
248
|
-
* @description: 刷新数据
|
|
249
|
-
* @author ChenRui
|
|
250
|
-
* @date 2021/2/4 20:22
|
|
251
|
-
*/
|
|
252
|
-
refreshAndUpdateData(): void;
|
|
253
|
-
/**
|
|
254
|
-
* @description: 获取控件dom对象
|
|
255
|
-
* @author ChenRui
|
|
256
|
-
* @date 2021/2/26 17:12
|
|
257
|
-
*/
|
|
258
|
-
getControlEl(key: string): any;
|
|
259
|
-
/**
|
|
260
|
-
* @description: 检查是否包含上传控件
|
|
261
|
-
* @author ChenRui
|
|
262
|
-
* @date 2021/4/23 11:30
|
|
263
|
-
*/
|
|
264
|
-
checkHasUploadControl(abstractControl: AbstractControl): boolean;
|
|
265
|
-
/**
|
|
266
|
-
* @description: json格式转表单格式
|
|
267
|
-
* @author ChenRui
|
|
268
|
-
* @date 2020/8/28 15:20
|
|
269
|
-
*/
|
|
270
|
-
jsonToFormData(params: any): FormData;
|
|
271
|
-
/**
|
|
272
|
-
* @description: 设置变更历史记录
|
|
273
|
-
* @author ChenRui
|
|
274
|
-
* @date 2021/4/25 15:55
|
|
275
|
-
*/
|
|
276
|
-
setFieldChangeHistory(fieldChangeHistory: FieldChangeHistory): void;
|
|
277
|
-
/**
|
|
278
|
-
* @description: 隐藏布局
|
|
279
|
-
* @author ChenRui
|
|
280
|
-
* @date 2021/11/16 0:01
|
|
281
|
-
*/
|
|
282
|
-
hideLayout(layoutName: string, mark?: boolean): void;
|
|
283
|
-
/**
|
|
284
|
-
* @description: 设置表单值
|
|
285
|
-
* @author ChenRui
|
|
286
|
-
* @date 2021/8/16 9:29
|
|
287
|
-
*/
|
|
288
|
-
private setFormDataInner;
|
|
289
|
-
/**
|
|
290
|
-
* @description: 设置控件值
|
|
291
|
-
* @author ChenRui
|
|
292
|
-
* @date 2021/4/13 12:50
|
|
293
|
-
*/
|
|
294
|
-
private setControlValue;
|
|
295
|
-
/**
|
|
296
|
-
* @description: 设置控件可选项
|
|
297
|
-
* @author ChenRui
|
|
298
|
-
* @date 2021/4/13 15:09
|
|
299
|
-
*/
|
|
300
|
-
private setControlOptions;
|
|
301
|
-
/**
|
|
302
|
-
* @description: 设置控件常规属性
|
|
303
|
-
* @author ChenRui
|
|
304
|
-
* @date 2021/4/13 15:11
|
|
305
|
-
*/
|
|
306
|
-
private setControlAttribute;
|
|
307
|
-
/**
|
|
308
|
-
* @description: 设置校验内部函数
|
|
309
|
-
* @author ChenRui
|
|
310
|
-
* @date 2021/7/19 17:51
|
|
311
|
-
*/
|
|
312
|
-
private setValidateInner;
|
|
313
|
-
/**
|
|
314
|
-
* @description: 生成数据信息
|
|
315
|
-
* @author ChenRui
|
|
316
|
-
* @date 2021/1/29 10:06
|
|
317
|
-
*/
|
|
318
|
-
private generateData;
|
|
319
|
-
/**
|
|
320
|
-
* @description: 数据解码输出
|
|
321
|
-
* @author ChenRui
|
|
322
|
-
* @date 2021/5/29 23:03
|
|
323
|
-
*/
|
|
324
|
-
private decodeData;
|
|
325
|
-
/**
|
|
326
|
-
* @description: 获取当前日期字符串
|
|
327
|
-
* @author ChenRui
|
|
328
|
-
* @date 2021/2/4 11:43
|
|
329
|
-
*/
|
|
330
|
-
private nowDateStr;
|
|
331
|
-
/**
|
|
332
|
-
* @description: uuid生成器
|
|
333
|
-
* @author ChenRui
|
|
334
|
-
* @date 2021/7/20 11:14
|
|
335
|
-
*/
|
|
336
|
-
private getUuid;
|
|
337
|
-
/**
|
|
338
|
-
* @Description: 对比新旧表单值
|
|
339
|
-
* @author lzs
|
|
340
|
-
* @date 2022/9/3
|
|
341
|
-
* @time 21:49
|
|
342
|
-
*/
|
|
343
|
-
private contrast;
|
|
344
|
-
/**
|
|
345
|
-
* @Description: 获取表单值更改信息
|
|
346
|
-
* @author lzs
|
|
347
|
-
* @date 2022/10/11
|
|
348
|
-
* @time 09:53
|
|
349
|
-
*/
|
|
350
|
-
getChangedInfo(control: any, oldValue: any, newValue: any): boolean;
|
|
351
|
-
/**
|
|
352
|
-
* @Description: 翻译字典项
|
|
353
|
-
* @author lzs
|
|
354
|
-
* @date 2022/9/6
|
|
355
|
-
* @time 11:54
|
|
356
|
-
*/
|
|
357
|
-
translateDictionaries(control: any, key: any, value: any): string;
|
|
358
|
-
/**
|
|
359
|
-
* @Description 根据报送类型返回需要隐藏的表单字段
|
|
360
|
-
* @Author JiangTao
|
|
361
|
-
* @Date 2024-01-30 上午 09:33
|
|
362
|
-
*/
|
|
363
|
-
getFormSubmittedType(form: any, code: any): void;
|
|
364
|
-
/**
|
|
365
|
-
* @Description 筛选报送类型字段数据处理
|
|
366
|
-
* @Author JiangTao
|
|
367
|
-
* @Date 2024-01-30 下午 08:50
|
|
368
|
-
*/
|
|
369
|
-
private handleSubmittedData;
|
|
370
|
-
/**
|
|
371
|
-
* @Description 获取报送类型枚举(数组)
|
|
372
|
-
* @Author JiangTao
|
|
373
|
-
* @Date 2024-01-30 下午 03:30
|
|
374
|
-
*/
|
|
375
|
-
getSubmittedType(): any;
|
|
376
|
-
}
|
|
1
|
+
import { AbstractControl } from "@/domain/AbstractControl";
|
|
2
|
+
import { Validate, ValidateReport } from "../domain/FormControl";
|
|
3
|
+
import { CustomFormat, FieldChangeHistory } from "../domain";
|
|
4
|
+
import { Rule } from "../services/validate-generator.service";
|
|
5
|
+
import { MathJsStatic } from "mathjs";
|
|
6
|
+
import { Vue } from "vue-property-decorator";
|
|
7
|
+
export declare type FormatType = "default" | "ebtrust";
|
|
8
|
+
export declare enum Attribute {
|
|
9
|
+
IsHideControl = "isHideControl",
|
|
10
|
+
IsRequiredValidate = "isRequiredValidate",
|
|
11
|
+
FormFieldDescribe = "formFieldDescribe",
|
|
12
|
+
FieldDefaultValue = "fieldDefaultValue",
|
|
13
|
+
TitleWidth = "titleWidth",
|
|
14
|
+
IsBoldTitle = "isBoldTitle",
|
|
15
|
+
IsHideTitle = "isHideTitle",
|
|
16
|
+
TitleColor = "titleColor",
|
|
17
|
+
Placeholder = "placeholder",
|
|
18
|
+
Tips = "tips",
|
|
19
|
+
IsNotEdit = "isNotEdit",
|
|
20
|
+
BindingPrefix = "bindingPrefix",
|
|
21
|
+
BindingSuffix = "bindingSuffix",
|
|
22
|
+
BuiltInFrontLabel = "builtInFrontLabel",
|
|
23
|
+
BuiltInPostLabel = "builtInPostLabel",
|
|
24
|
+
ControlWidth = "controlWidth",
|
|
25
|
+
IsPasswordBox = "isPasswordBox",
|
|
26
|
+
InitRowHeight = "initRowHeight",
|
|
27
|
+
IsFixedRowHeight = "isFixedRowHeight",
|
|
28
|
+
FormatType = "formatType",
|
|
29
|
+
MinValue = "minValue",
|
|
30
|
+
MaxValue = "maxValue",
|
|
31
|
+
Step = "step",
|
|
32
|
+
DecimalPlaces = "decimalPlaces",
|
|
33
|
+
ThousandthPercentileFormat = "thousandthPercentileFormat",
|
|
34
|
+
Unit = "unit",
|
|
35
|
+
ZoomType = "zoomType",
|
|
36
|
+
ZoomMultiple = "zoomMultiple",
|
|
37
|
+
IsShowCapitalization = "isShowCapitalization",
|
|
38
|
+
IsLineFeedDisplay = "isLineFeedDisplay",
|
|
39
|
+
IsOptionType = "isOptionType",
|
|
40
|
+
OptionConfig = "optionConfig",
|
|
41
|
+
DateFormat = "dateFormat",
|
|
42
|
+
TimeFormat = "timeFormat",
|
|
43
|
+
IsSupportMultiple = "isSupportMultiple",
|
|
44
|
+
MaxUploadNumber = "maxUploadNumber",
|
|
45
|
+
LimitSize = "limitSize",
|
|
46
|
+
SupportUploadType = "supportUploadType",
|
|
47
|
+
CustomUploadType = "customUploadType",
|
|
48
|
+
ExtendUploadType = "extendUploadType",
|
|
49
|
+
AttachmentExtendProperties = "attachmentExtendProperties",
|
|
50
|
+
IsMultipleChoice = "isMultipleChoice",
|
|
51
|
+
IsSearchable = "isSearchable",
|
|
52
|
+
CanAddEntry = "canAddEntry",
|
|
53
|
+
IsClearButton = "isClearButton",
|
|
54
|
+
OnOpeningValue = "onOpeningValue",
|
|
55
|
+
WhenClosedValue = "whenClosedValue",
|
|
56
|
+
OnOpeningText = "onOpeningText",
|
|
57
|
+
WhenClosedText = "whenClosedText",
|
|
58
|
+
CustomFieldName = "customFieldName",
|
|
59
|
+
TextFold = "textFold",
|
|
60
|
+
HiddenDropdown = "hiddenDropdown",
|
|
61
|
+
BusAttr = "busAttr",
|
|
62
|
+
EnableAutoComplete = "enableAutoComplete",
|
|
63
|
+
AutoCompleteOptions = "autoCompleteOptions",
|
|
64
|
+
IsTreeOpen = "isTreeOpen",
|
|
65
|
+
CheckboxStyle = "checkboxStyle",
|
|
66
|
+
ItemWidth = "itemWidth",
|
|
67
|
+
ChangeOnSelect = "changeOnSelect",
|
|
68
|
+
TextareaRows = "textareaRows",
|
|
69
|
+
IsShowHoliday = "isShowHoliday"
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* @description: 表单基础类,聚合常用api
|
|
73
|
+
* @author ChenRui
|
|
74
|
+
* @date 2020/11/28 23:27
|
|
75
|
+
*/
|
|
76
|
+
export declare class FormApi {
|
|
77
|
+
id?: any;
|
|
78
|
+
dvForm: Vue | any;
|
|
79
|
+
edit: boolean | undefined;
|
|
80
|
+
formatType: FormatType;
|
|
81
|
+
apiMetaRefresh: any;
|
|
82
|
+
[key: string]: any;
|
|
83
|
+
oldVal: any;
|
|
84
|
+
/**
|
|
85
|
+
* @description: 获取表单对象
|
|
86
|
+
* @author ChenRui
|
|
87
|
+
* @date 2020/11/28 23:29
|
|
88
|
+
*/
|
|
89
|
+
constructor(options?: {
|
|
90
|
+
id?: any;
|
|
91
|
+
dvForm?: Vue;
|
|
92
|
+
edit?: boolean;
|
|
93
|
+
formatType?: FormatType;
|
|
94
|
+
});
|
|
95
|
+
get mathjs(): MathJsStatic;
|
|
96
|
+
/**
|
|
97
|
+
* @description: 获取表单值
|
|
98
|
+
* @author ChenRui
|
|
99
|
+
* @date 2021/2/4 10:36
|
|
100
|
+
*/
|
|
101
|
+
get formData(): any;
|
|
102
|
+
/**
|
|
103
|
+
* @Description 获取表单全部值
|
|
104
|
+
* @Author JiangTao
|
|
105
|
+
* @Date 2023-12-22 下午 02:50
|
|
106
|
+
*/
|
|
107
|
+
get formAllData(): any;
|
|
108
|
+
/**
|
|
109
|
+
* @description: 编码表单对象
|
|
110
|
+
* @author ChenRui
|
|
111
|
+
* @date 2021/4/25 16:41
|
|
112
|
+
*/
|
|
113
|
+
get encodedFormData(): any;
|
|
114
|
+
/**
|
|
115
|
+
* @description: 设置表单值
|
|
116
|
+
* @author ChenRui
|
|
117
|
+
* @date 2021/2/4 10:37
|
|
118
|
+
*/
|
|
119
|
+
setFormData(srcData: any, isDefault?: boolean, validate?: boolean, oldVal?: any): void;
|
|
120
|
+
/**
|
|
121
|
+
* @description: 获取控件对象
|
|
122
|
+
* @author ChenRui
|
|
123
|
+
* @date 2021/1/29 10:08
|
|
124
|
+
*/
|
|
125
|
+
getControl(key: string, control?: AbstractControl, showError?: boolean): AbstractControl | any;
|
|
126
|
+
/**
|
|
127
|
+
* @description: 获取值
|
|
128
|
+
* @author ChenRui
|
|
129
|
+
* @date 2021/1/29 14:57
|
|
130
|
+
*/
|
|
131
|
+
getValue(key: string): any;
|
|
132
|
+
/**
|
|
133
|
+
* @description: 设置值
|
|
134
|
+
* @author ChenRui
|
|
135
|
+
* @date 2021/1/29 16:23
|
|
136
|
+
*/
|
|
137
|
+
setValue(key: string, val: any, isDefault?: boolean, validate?: boolean): void;
|
|
138
|
+
/**
|
|
139
|
+
* @description: 重置表单
|
|
140
|
+
* @author ChenRui
|
|
141
|
+
* @date 2021/2/22 17:40
|
|
142
|
+
*/
|
|
143
|
+
resetValue(): void;
|
|
144
|
+
/**
|
|
145
|
+
* @description: 获取文本内容
|
|
146
|
+
* @author ChenRui
|
|
147
|
+
* @date 2021/1/29 15:03
|
|
148
|
+
*/
|
|
149
|
+
getText(key: string): any;
|
|
150
|
+
/**
|
|
151
|
+
* @description: 获取可选项
|
|
152
|
+
* @author ChenRui
|
|
153
|
+
* @date 2021/1/29 16:11
|
|
154
|
+
*/
|
|
155
|
+
getOptions(key: string): any[];
|
|
156
|
+
/**
|
|
157
|
+
* @description: 设置可选项
|
|
158
|
+
* @author ChenRui
|
|
159
|
+
* @date 2021/1/29 16:15
|
|
160
|
+
*/
|
|
161
|
+
setOptions(key: string, data: any[], defaultVal?: any): void;
|
|
162
|
+
/**
|
|
163
|
+
* @description: 获取常规属性
|
|
164
|
+
* @author ChenRui
|
|
165
|
+
* @date 2021/1/29 17:21
|
|
166
|
+
*/
|
|
167
|
+
getAttribute(key: string, attribute: Attribute): any;
|
|
168
|
+
/**
|
|
169
|
+
* @description: 设置常规属性
|
|
170
|
+
* @author ChenRui
|
|
171
|
+
* @date 2021/1/29 17:21
|
|
172
|
+
*/
|
|
173
|
+
setAttribute(key: string, attribute: Attribute, data: any): void;
|
|
174
|
+
/**
|
|
175
|
+
* @description: 根据name获取校验
|
|
176
|
+
* @author ChenRui
|
|
177
|
+
* @date 2021/1/30 11:46
|
|
178
|
+
*/
|
|
179
|
+
getValidate(key: string, name: string): any;
|
|
180
|
+
/**
|
|
181
|
+
* @description: 移除校验
|
|
182
|
+
* @author ChenRui
|
|
183
|
+
* @date 2021/4/1 21:30
|
|
184
|
+
*/
|
|
185
|
+
removeValidate(key: string, validateName: string): void;
|
|
186
|
+
/**
|
|
187
|
+
* @description: 移除所有校验
|
|
188
|
+
* @author ChenRui
|
|
189
|
+
* @date 2021/4/1 21:48
|
|
190
|
+
*/
|
|
191
|
+
removeAllValidates(key: string): void;
|
|
192
|
+
/**
|
|
193
|
+
* @description: 获取校验集合
|
|
194
|
+
* @author ChenRui
|
|
195
|
+
* @date 2021/1/30 11:40
|
|
196
|
+
*/
|
|
197
|
+
getValidates(key: string): Validate[];
|
|
198
|
+
/**
|
|
199
|
+
* @Description: 设置必输校验
|
|
200
|
+
* @author GuoXuHui
|
|
201
|
+
* @date 2022-05-25
|
|
202
|
+
* @time 10:09
|
|
203
|
+
*/
|
|
204
|
+
setRequiredValidate(key: string, data: boolean): void;
|
|
205
|
+
/**
|
|
206
|
+
* @description: 设置校验
|
|
207
|
+
* @author ChenRui
|
|
208
|
+
* @date 2021/1/30 11:54
|
|
209
|
+
*/
|
|
210
|
+
setValidate(key: string, validate: Validate | Validate[] | Rule, isCover?: boolean): void;
|
|
211
|
+
/**
|
|
212
|
+
* @description: 校验提示
|
|
213
|
+
* @author ChenRui
|
|
214
|
+
* @date 2021/8/18 17:40
|
|
215
|
+
*/
|
|
216
|
+
validateTips(scrollView?: any): boolean;
|
|
217
|
+
/**
|
|
218
|
+
* @description: 全局校验报告
|
|
219
|
+
* @author ChenRui
|
|
220
|
+
* @date 2021/2/5 11:48
|
|
221
|
+
*/
|
|
222
|
+
validateReport(formGroup?: AbstractControl, validateReports?: ValidateReport[], refreshFeedback?: boolean): ValidateReport[];
|
|
223
|
+
/**
|
|
224
|
+
* @description: 表单全局校验
|
|
225
|
+
* @author ChenRui
|
|
226
|
+
* @date 2021/2/5 14:11
|
|
227
|
+
*/
|
|
228
|
+
validate(refreshFeedback?: boolean): boolean;
|
|
229
|
+
/**
|
|
230
|
+
* @description: 刷新校验
|
|
231
|
+
* @author ChenRui
|
|
232
|
+
* @date 2021/6/4 19:32
|
|
233
|
+
*/
|
|
234
|
+
refreshValidate(key: string): void;
|
|
235
|
+
/**
|
|
236
|
+
* @description: 重置表单校验
|
|
237
|
+
* @author ChenRui
|
|
238
|
+
* @date 2022/4/6 11:51
|
|
239
|
+
*/
|
|
240
|
+
resetFormValidateState(): void;
|
|
241
|
+
/**
|
|
242
|
+
* @description: 设置格式化显示和输出函数
|
|
243
|
+
* @author ChenRui
|
|
244
|
+
* @date 2021/2/4 19:44
|
|
245
|
+
*/
|
|
246
|
+
setFormatDisplayAndOutput(key: string, customFormat: CustomFormat): void;
|
|
247
|
+
/**
|
|
248
|
+
* @description: 刷新数据
|
|
249
|
+
* @author ChenRui
|
|
250
|
+
* @date 2021/2/4 20:22
|
|
251
|
+
*/
|
|
252
|
+
refreshAndUpdateData(): void;
|
|
253
|
+
/**
|
|
254
|
+
* @description: 获取控件dom对象
|
|
255
|
+
* @author ChenRui
|
|
256
|
+
* @date 2021/2/26 17:12
|
|
257
|
+
*/
|
|
258
|
+
getControlEl(key: string): any;
|
|
259
|
+
/**
|
|
260
|
+
* @description: 检查是否包含上传控件
|
|
261
|
+
* @author ChenRui
|
|
262
|
+
* @date 2021/4/23 11:30
|
|
263
|
+
*/
|
|
264
|
+
checkHasUploadControl(abstractControl: AbstractControl): boolean;
|
|
265
|
+
/**
|
|
266
|
+
* @description: json格式转表单格式
|
|
267
|
+
* @author ChenRui
|
|
268
|
+
* @date 2020/8/28 15:20
|
|
269
|
+
*/
|
|
270
|
+
jsonToFormData(params: any): FormData;
|
|
271
|
+
/**
|
|
272
|
+
* @description: 设置变更历史记录
|
|
273
|
+
* @author ChenRui
|
|
274
|
+
* @date 2021/4/25 15:55
|
|
275
|
+
*/
|
|
276
|
+
setFieldChangeHistory(fieldChangeHistory: FieldChangeHistory): void;
|
|
277
|
+
/**
|
|
278
|
+
* @description: 隐藏布局
|
|
279
|
+
* @author ChenRui
|
|
280
|
+
* @date 2021/11/16 0:01
|
|
281
|
+
*/
|
|
282
|
+
hideLayout(layoutName: string, mark?: boolean): void;
|
|
283
|
+
/**
|
|
284
|
+
* @description: 设置表单值
|
|
285
|
+
* @author ChenRui
|
|
286
|
+
* @date 2021/8/16 9:29
|
|
287
|
+
*/
|
|
288
|
+
private setFormDataInner;
|
|
289
|
+
/**
|
|
290
|
+
* @description: 设置控件值
|
|
291
|
+
* @author ChenRui
|
|
292
|
+
* @date 2021/4/13 12:50
|
|
293
|
+
*/
|
|
294
|
+
private setControlValue;
|
|
295
|
+
/**
|
|
296
|
+
* @description: 设置控件可选项
|
|
297
|
+
* @author ChenRui
|
|
298
|
+
* @date 2021/4/13 15:09
|
|
299
|
+
*/
|
|
300
|
+
private setControlOptions;
|
|
301
|
+
/**
|
|
302
|
+
* @description: 设置控件常规属性
|
|
303
|
+
* @author ChenRui
|
|
304
|
+
* @date 2021/4/13 15:11
|
|
305
|
+
*/
|
|
306
|
+
private setControlAttribute;
|
|
307
|
+
/**
|
|
308
|
+
* @description: 设置校验内部函数
|
|
309
|
+
* @author ChenRui
|
|
310
|
+
* @date 2021/7/19 17:51
|
|
311
|
+
*/
|
|
312
|
+
private setValidateInner;
|
|
313
|
+
/**
|
|
314
|
+
* @description: 生成数据信息
|
|
315
|
+
* @author ChenRui
|
|
316
|
+
* @date 2021/1/29 10:06
|
|
317
|
+
*/
|
|
318
|
+
private generateData;
|
|
319
|
+
/**
|
|
320
|
+
* @description: 数据解码输出
|
|
321
|
+
* @author ChenRui
|
|
322
|
+
* @date 2021/5/29 23:03
|
|
323
|
+
*/
|
|
324
|
+
private decodeData;
|
|
325
|
+
/**
|
|
326
|
+
* @description: 获取当前日期字符串
|
|
327
|
+
* @author ChenRui
|
|
328
|
+
* @date 2021/2/4 11:43
|
|
329
|
+
*/
|
|
330
|
+
private nowDateStr;
|
|
331
|
+
/**
|
|
332
|
+
* @description: uuid生成器
|
|
333
|
+
* @author ChenRui
|
|
334
|
+
* @date 2021/7/20 11:14
|
|
335
|
+
*/
|
|
336
|
+
private getUuid;
|
|
337
|
+
/**
|
|
338
|
+
* @Description: 对比新旧表单值
|
|
339
|
+
* @author lzs
|
|
340
|
+
* @date 2022/9/3
|
|
341
|
+
* @time 21:49
|
|
342
|
+
*/
|
|
343
|
+
private contrast;
|
|
344
|
+
/**
|
|
345
|
+
* @Description: 获取表单值更改信息
|
|
346
|
+
* @author lzs
|
|
347
|
+
* @date 2022/10/11
|
|
348
|
+
* @time 09:53
|
|
349
|
+
*/
|
|
350
|
+
getChangedInfo(control: any, oldValue: any, newValue: any): boolean;
|
|
351
|
+
/**
|
|
352
|
+
* @Description: 翻译字典项
|
|
353
|
+
* @author lzs
|
|
354
|
+
* @date 2022/9/6
|
|
355
|
+
* @time 11:54
|
|
356
|
+
*/
|
|
357
|
+
translateDictionaries(control: any, key: any, value: any): string;
|
|
358
|
+
/**
|
|
359
|
+
* @Description 根据报送类型返回需要隐藏的表单字段
|
|
360
|
+
* @Author JiangTao
|
|
361
|
+
* @Date 2024-01-30 上午 09:33
|
|
362
|
+
*/
|
|
363
|
+
getFormSubmittedType(form: any, code: any): void;
|
|
364
|
+
/**
|
|
365
|
+
* @Description 筛选报送类型字段数据处理
|
|
366
|
+
* @Author JiangTao
|
|
367
|
+
* @Date 2024-01-30 下午 08:50
|
|
368
|
+
*/
|
|
369
|
+
private handleSubmittedData;
|
|
370
|
+
/**
|
|
371
|
+
* @Description 获取报送类型枚举(数组)
|
|
372
|
+
* @Author JiangTao
|
|
373
|
+
* @Date 2024-01-30 下午 03:30
|
|
374
|
+
*/
|
|
375
|
+
getSubmittedType(): any;
|
|
376
|
+
}
|