@dhccmobile/vue3-lo-form 0.1.0

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.
Files changed (160) hide show
  1. package/.eslintrc.js +29 -0
  2. package/README.md +62 -0
  3. package/babel.config.js +3 -0
  4. package/dist/demo.html +10 -0
  5. package/dist/vue3-lo-form.common.js +119725 -0
  6. package/dist/vue3-lo-form.common.js.map +1 -0
  7. package/dist/vue3-lo-form.css +1 -0
  8. package/dist/vue3-lo-form.umd.js +119735 -0
  9. package/dist/vue3-lo-form.umd.js.map +1 -0
  10. package/dist/vue3-lo-form.umd.min.js +38 -0
  11. package/dist/vue3-lo-form.umd.min.js.map +1 -0
  12. package/package.json +61 -0
  13. package/public/favicon.ico +0 -0
  14. package/public/index.html +17 -0
  15. package/src/App.vue +715 -0
  16. package/src/components/form/DvForm.vue +586 -0
  17. package/src/components/form/DvFormLayout.vue +1568 -0
  18. package/src/components/form/StretchText.vue +77 -0
  19. package/src/components/index.ts +3 -0
  20. package/src/constants/config/form-template.config.ts +32 -0
  21. package/src/constants/config/form.config.ts +4 -0
  22. package/src/constants/config/storage.config.ts +4 -0
  23. package/src/constants/encode-assets/icons.ts +0 -0
  24. package/src/constants/encode-assets/svg.ts +9 -0
  25. package/src/constants/enum/builtIn-label.enum.ts +5 -0
  26. package/src/constants/enum/cache-type.enum.ts +7 -0
  27. package/src/constants/enum/control-format-type.enum.ts +9 -0
  28. package/src/constants/enum/dynamic-option-type.enum.ts +6 -0
  29. package/src/constants/enum/form-bus-attr.enum.ts +8 -0
  30. package/src/constants/enum/form-field-class.enum.ts +7 -0
  31. package/src/constants/enum/form-field-type.enum.ts +25 -0
  32. package/src/constants/enum/form-type.enum.ts +5 -0
  33. package/src/constants/enum/index.ts +19 -0
  34. package/src/constants/enum/lateral-arrangement.enum.ts +9 -0
  35. package/src/constants/enum/money-unit.enum.ts +6 -0
  36. package/src/constants/enum/option-type.enum.ts +5 -0
  37. package/src/constants/enum/submitted-type.enum.ts +12 -0
  38. package/src/constants/enum/support-upload-type.enum.ts +5 -0
  39. package/src/constants/enum/switch.enum.ts +5 -0
  40. package/src/constants/enum/upload-type.enum.ts +17 -0
  41. package/src/constants/enum/validate-rules.enum.ts +25 -0
  42. package/src/constants/enum/validate-status.enum.ts +8 -0
  43. package/src/constants/enum/vertical-arrangement.enum.ts +7 -0
  44. package/src/constants/enum/zoom-type.ts +6 -0
  45. package/src/constants/index.ts +3 -0
  46. package/src/core/FormApi.ts +865 -0
  47. package/src/core/index.ts +1 -0
  48. package/src/domain/AbstractControl.ts +6 -0
  49. package/src/domain/Control.ts +14 -0
  50. package/src/domain/CustomFormat.ts +6 -0
  51. package/src/domain/DesForm.ts +48 -0
  52. package/src/domain/DesFormControl.ts +223 -0
  53. package/src/domain/DesFormLayout.ts +51 -0
  54. package/src/domain/FieldChangeHistory.ts +9 -0
  55. package/src/domain/FormConfig.ts +12 -0
  56. package/src/domain/FormControl.ts +125 -0
  57. package/src/domain/FormEnum.ts +9 -0
  58. package/src/domain/FormGroup.ts +42 -0
  59. package/src/domain/FormRestfulResponse.ts +6 -0
  60. package/src/domain/ProvideInjectData.ts +9 -0
  61. package/src/domain/SysDictDetail.ts +25 -0
  62. package/src/domain/SysDictInfo.ts +31 -0
  63. package/src/domain/SysDictTreeDetail.ts +43 -0
  64. package/src/domain/index.ts +12 -0
  65. package/src/filtres/amount-capitalization.filter.ts +136 -0
  66. package/src/filtres/extract-options.filter.ts +53 -0
  67. package/src/filtres/generate-grid-column-end.filter.ts +22 -0
  68. package/src/filtres/generate-grid-template-columns.filter.ts +24 -0
  69. package/src/filtres/switch-enum-convert.filter.ts +18 -0
  70. package/src/filtres/zoom-multiple.filter.ts +32 -0
  71. package/src/index.ts +67 -0
  72. package/src/main.ts +17 -0
  73. package/src/services/api.service.ts +73 -0
  74. package/src/services/clean-local-forage.service.ts +58 -0
  75. package/src/services/dict-local-forage.service.ts +58 -0
  76. package/src/services/form-bean-utils.service.ts +41 -0
  77. package/src/services/form-local-forage.service.ts +59 -0
  78. package/src/services/form-tools.service.ts +497 -0
  79. package/src/services/form-tree-node-convert.service.ts +216 -0
  80. package/src/services/form-validate.service.ts +103 -0
  81. package/src/services/index.ts +9 -0
  82. package/src/services/router.service.ts +96 -0
  83. package/src/services/validate-generator.service.ts +710 -0
  84. package/src/shims-vue.d.ts +6 -0
  85. package/src/store/dict.store.ts +63 -0
  86. package/src/store/form.store.ts +32 -0
  87. package/src/store/index.ts +2 -0
  88. package/src/styles/index.scss +167 -0
  89. package/src/types/vfForm.ts +11 -0
  90. package/tsconfig.json +40 -0
  91. package/types/components/index.d.ts +3 -0
  92. package/types/constants/config/form-template.config.d.ts +30 -0
  93. package/types/constants/config/form.config.d.ts +4 -0
  94. package/types/constants/config/storage.config.d.ts +4 -0
  95. package/types/constants/encode-assets/icons.d.ts +0 -0
  96. package/types/constants/encode-assets/svg.d.ts +5 -0
  97. package/types/constants/enum/builtIn-label.enum.d.ts +7 -0
  98. package/types/constants/enum/cache-type.enum.d.ts +15 -0
  99. package/types/constants/enum/control-format-type.enum.d.ts +23 -0
  100. package/types/constants/enum/dynamic-option-type.enum.d.ts +11 -0
  101. package/types/constants/enum/form-bus-attr.enum.d.ts +19 -0
  102. package/types/constants/enum/form-field-class.enum.d.ts +18 -0
  103. package/types/constants/enum/form-field-type.enum.d.ts +111 -0
  104. package/types/constants/enum/form-type.enum.d.ts +11 -0
  105. package/types/constants/enum/index.d.ts +19 -0
  106. package/types/constants/enum/lateral-arrangement.enum.d.ts +23 -0
  107. package/types/constants/enum/money-unit.enum.d.ts +15 -0
  108. package/types/constants/enum/option-type.enum.d.ts +11 -0
  109. package/types/constants/enum/submitted-type.enum.d.ts +35 -0
  110. package/types/constants/enum/support-upload-type.enum.d.ts +11 -0
  111. package/types/constants/enum/switch.enum.d.ts +11 -0
  112. package/types/constants/enum/upload-type.enum.d.ts +59 -0
  113. package/types/constants/enum/validate-rules.enum.d.ts +2 -0
  114. package/types/constants/enum/validate-status.enum.d.ts +2 -0
  115. package/types/constants/enum/vertical-arrangement.enum.d.ts +21 -0
  116. package/types/constants/enum/zoom-type.d.ts +15 -0
  117. package/types/constants/index.d.ts +3 -0
  118. package/types/core/FormApi.d.ts +326 -0
  119. package/types/core/index.d.ts +1 -0
  120. package/types/domain/AbstractControl.d.ts +5 -0
  121. package/types/domain/Control.d.ts +13 -0
  122. package/types/domain/CustomFormat.d.ts +5 -0
  123. package/types/domain/DesForm.d.ts +32 -0
  124. package/types/domain/DesFormControl.d.ts +148 -0
  125. package/types/domain/DesFormLayout.d.ts +33 -0
  126. package/types/domain/FieldChangeHistory.d.ts +9 -0
  127. package/types/domain/FormConfig.d.ts +12 -0
  128. package/types/domain/FormControl.d.ts +60 -0
  129. package/types/domain/FormEnum.d.ts +10 -0
  130. package/types/domain/FormGroup.d.ts +27 -0
  131. package/types/domain/FormRestfulResponse.d.ts +6 -0
  132. package/types/domain/ProvideInjectData.d.ts +9 -0
  133. package/types/domain/SysDictDetail.d.ts +16 -0
  134. package/types/domain/SysDictInfo.d.ts +20 -0
  135. package/types/domain/SysDictTreeDetail.d.ts +28 -0
  136. package/types/domain/index.d.ts +12 -0
  137. package/types/filtres/amount-capitalization.filter.d.ts +7 -0
  138. package/types/filtres/extract-options.filter.d.ts +13 -0
  139. package/types/filtres/generate-grid-column-end.filter.d.ts +11 -0
  140. package/types/filtres/generate-grid-template-columns.filter.d.ts +11 -0
  141. package/types/filtres/switch-enum-convert.filter.d.ts +2 -0
  142. package/types/filtres/zoom-multiple.filter.d.ts +3 -0
  143. package/types/index.d.ts +12 -0
  144. package/types/main.d.ts +2 -0
  145. package/types/services/api.service.d.ts +25 -0
  146. package/types/services/clean-local-forage.service.d.ts +28 -0
  147. package/types/services/dict-local-forage.service.d.ts +28 -0
  148. package/types/services/form-bean-utils.service.d.ts +23 -0
  149. package/types/services/form-local-forage.service.d.ts +28 -0
  150. package/types/services/form-tools.service.d.ts +109 -0
  151. package/types/services/form-tree-node-convert.service.d.ts +94 -0
  152. package/types/services/form-validate.service.d.ts +32 -0
  153. package/types/services/index.d.ts +9 -0
  154. package/types/services/router.service.d.ts +40 -0
  155. package/types/services/validate-generator.service.d.ts +154 -0
  156. package/types/store/dict.store.d.ts +29 -0
  157. package/types/store/form.store.d.ts +17 -0
  158. package/types/store/index.d.ts +2 -0
  159. package/types/types/vfForm.d.ts +10 -0
  160. package/vue.config.js +29 -0
@@ -0,0 +1,11 @@
1
+ declare const OptionType: {
2
+ Fixed: {
3
+ code: string;
4
+ name: string;
5
+ };
6
+ Dynamic: {
7
+ code: string;
8
+ name: string;
9
+ };
10
+ };
11
+ export { OptionType };
@@ -0,0 +1,35 @@
1
+ declare const SubmittedType: {
2
+ EAST: {
3
+ code: string;
4
+ name: string;
5
+ };
6
+ CITIC: {
7
+ code: string;
8
+ name: string;
9
+ };
10
+ TOTAL_ELEMENTS: {
11
+ code: string;
12
+ name: string;
13
+ };
14
+ PBC_CAPITAL_DECLARATION: {
15
+ code: string;
16
+ name: string;
17
+ };
18
+ ENTERPRISE_CREDIT_REFERENCE: {
19
+ code: string;
20
+ name: string;
21
+ };
22
+ OTOHAF_SUBMISSION: {
23
+ code: string;
24
+ name: string;
25
+ };
26
+ EAST_F: {
27
+ code: string;
28
+ name: string;
29
+ };
30
+ PERSONAL_CREDIT: {
31
+ code: string;
32
+ name: string;
33
+ };
34
+ };
35
+ export { SubmittedType };
@@ -0,0 +1,11 @@
1
+ declare const SupportUploadType: {
2
+ Arbitrarily: {
3
+ code: string;
4
+ name: string;
5
+ };
6
+ Custom: {
7
+ code: string;
8
+ name: string;
9
+ };
10
+ };
11
+ export { SupportUploadType };
@@ -0,0 +1,11 @@
1
+ declare const Switch: {
2
+ Disable: {
3
+ code: string;
4
+ name: string;
5
+ };
6
+ Enable: {
7
+ code: string;
8
+ name: string;
9
+ };
10
+ };
11
+ export { Switch };
@@ -0,0 +1,59 @@
1
+ declare const UploadType: {
2
+ Jpeg: {
3
+ code: string;
4
+ name: string;
5
+ };
6
+ Png: {
7
+ code: string;
8
+ name: string;
9
+ };
10
+ Gif: {
11
+ code: string;
12
+ name: string;
13
+ };
14
+ Bmp: {
15
+ code: string;
16
+ name: string;
17
+ };
18
+ Doc: {
19
+ code: string;
20
+ name: string;
21
+ };
22
+ html: {
23
+ code: string;
24
+ name: string;
25
+ };
26
+ Mp3: {
27
+ code: string;
28
+ name: string;
29
+ };
30
+ Mp4: {
31
+ code: string;
32
+ name: string;
33
+ };
34
+ Pdf: {
35
+ code: string;
36
+ name: string;
37
+ };
38
+ Ppt: {
39
+ code: string;
40
+ name: string;
41
+ };
42
+ Xls: {
43
+ code: string;
44
+ name: string;
45
+ };
46
+ Xml: {
47
+ code: string;
48
+ name: string;
49
+ };
50
+ Zip: {
51
+ code: string;
52
+ name: string;
53
+ };
54
+ Wps: {
55
+ code: string;
56
+ name: string;
57
+ };
58
+ };
59
+ export { UploadType };
@@ -0,0 +1,2 @@
1
+ declare const ValidateRules: any;
2
+ export { ValidateRules };
@@ -0,0 +1,2 @@
1
+ declare const ValidateStatus: any;
2
+ export { ValidateStatus };
@@ -0,0 +1,21 @@
1
+ declare const VerticalArrangement: {
2
+ AlignRight: {
3
+ code: string;
4
+ name: string;
5
+ value: string;
6
+ textAlign: string;
7
+ };
8
+ AlignTop: {
9
+ code: string;
10
+ name: string;
11
+ value: string;
12
+ textAlign: string;
13
+ };
14
+ AlignLeft: {
15
+ code: string;
16
+ name: string;
17
+ value: string;
18
+ textAlign: string;
19
+ };
20
+ };
21
+ export { VerticalArrangement };
@@ -0,0 +1,15 @@
1
+ declare const ZoomType: {
2
+ enlarge: {
3
+ code: string;
4
+ name: string;
5
+ };
6
+ narrow: {
7
+ code: string;
8
+ name: string;
9
+ };
10
+ automatic: {
11
+ code: string;
12
+ name: string;
13
+ };
14
+ };
15
+ export { ZoomType };
@@ -0,0 +1,3 @@
1
+ export * from "./config/form-template.config";
2
+ export * from "./encode-assets/svg";
3
+ export * from "./enum/index";
@@ -0,0 +1,326 @@
1
+ import { AbstractControl } from "@/domain/AbstractControl";
2
+ import { Validate, ValidateReport } from "../domain/FormControl";
3
+ import moment from "moment";
4
+ import { CustomFormat, FieldChangeHistory } from "../domain";
5
+ import { Rule } from "../services/validate-generator.service";
6
+ import { MathJsStatic } from "mathjs";
7
+ import { Vue } from "vue-property-decorator";
8
+ export declare type FormatType = "default" | "ebtrust";
9
+ export declare enum Attribute {
10
+ IsHideControl = "isHideControl",
11
+ IsRequiredValidate = "isRequiredValidate",
12
+ FormFieldDescribe = "formFieldDescribe",
13
+ FieldDefaultValue = "fieldDefaultValue",
14
+ TitleWidth = "titleWidth",
15
+ IsBoldTitle = "isBoldTitle",
16
+ IsHideTitle = "isHideTitle",
17
+ TitleColor = "titleColor",
18
+ Placeholder = "placeholder",
19
+ Tips = "tips",
20
+ IsNotEdit = "isNotEdit",
21
+ BindingPrefix = "bindingPrefix",
22
+ BindingSuffix = "bindingSuffix",
23
+ BuiltInFrontLabel = "builtInFrontLabel",
24
+ BuiltInPostLabel = "builtInPostLabel",
25
+ ControlWidth = "controlWidth",
26
+ IsPasswordBox = "isPasswordBox",
27
+ InitRowHeight = "initRowHeight",
28
+ IsFixedRowHeight = "isFixedRowHeight",
29
+ FormatType = "formatType",
30
+ MinValue = "minValue",
31
+ MaxValue = "maxValue",
32
+ Step = "step",
33
+ DecimalPlaces = "decimalPlaces",
34
+ ThousandthPercentileFormat = "thousandthPercentileFormat",
35
+ Unit = "unit",
36
+ ZoomType = "zoomType",
37
+ ZoomMultiple = "zoomMultiple",
38
+ IsShowCapitalization = "isShowCapitalization",
39
+ IsLineFeedDisplay = "isLineFeedDisplay",
40
+ IsOptionType = "isOptionType",
41
+ OptionConfig = "optionConfig",
42
+ DateFormat = "dateFormat",
43
+ TimeFormat = "timeFormat",
44
+ IsSupportMultiple = "isSupportMultiple",
45
+ MaxUploadNumber = "maxUploadNumber",
46
+ LimitSize = "limitSize",
47
+ SupportUploadType = "supportUploadType",
48
+ CustomUploadType = "customUploadType",
49
+ ExtendUploadType = "extendUploadType",
50
+ AttachmentExtendProperties = "attachmentExtendProperties",
51
+ IsMultipleChoice = "isMultipleChoice",
52
+ IsSearchable = "isSearchable",
53
+ CanAddEntry = "canAddEntry",
54
+ IsClearButton = "isClearButton",
55
+ OnOpeningValue = "onOpeningValue",
56
+ WhenClosedValue = "whenClosedValue",
57
+ OnOpeningText = "onOpeningText",
58
+ WhenClosedText = "whenClosedText",
59
+ CustomFieldName = "customFieldName",
60
+ TextFold = "textFold",
61
+ HiddenDropdown = "hiddenDropdown",
62
+ BusAttr = "busAttr",
63
+ EnableAutoComplete = "enableAutoComplete",
64
+ AutoCompleteOptions = "autoCompleteOptions"
65
+ }
66
+ /**
67
+ * @description: 表单基础类,聚合常用api
68
+ * @author ChenRui
69
+ * @date 2020/11/28 23:27
70
+ */
71
+ export declare class FormApi {
72
+ id?: any;
73
+ dvForm: Vue | any;
74
+ edit: boolean | undefined;
75
+ formatType: FormatType;
76
+ momentUtil: typeof moment;
77
+ apiMetaRefresh: any;
78
+ [key: string]: any;
79
+ /**
80
+ * @description: 获取表单对象
81
+ * @author ChenRui
82
+ * @date 2020/11/28 23:29
83
+ */
84
+ constructor(options?: {
85
+ id?: any;
86
+ dvForm?: Vue;
87
+ edit?: boolean;
88
+ formatType?: FormatType;
89
+ });
90
+ get mathjs(): MathJsStatic;
91
+ /**
92
+ * @description: 获取表单值
93
+ * @author ChenRui
94
+ * @date 2021/2/4 10:36
95
+ */
96
+ get formData(): any;
97
+ /**
98
+ * @description: 编码表单对象
99
+ * @author ChenRui
100
+ * @date 2021/4/25 16:41
101
+ */
102
+ get encodedFormData(): any;
103
+ /**
104
+ * @description: 设置表单值
105
+ * @author ChenRui
106
+ * @date 2021/2/4 10:37
107
+ */
108
+ setFormData(srcData: any, isDefault?: boolean, validate?: boolean): void;
109
+ /**
110
+ * @description: 获取控件对象
111
+ * @author ChenRui
112
+ * @date 2021/1/29 10:08
113
+ */
114
+ getControl(key: string, control?: AbstractControl, showError?: boolean): AbstractControl | any;
115
+ /**
116
+ * @description: 获取值
117
+ * @author ChenRui
118
+ * @date 2021/1/29 14:57
119
+ */
120
+ getValue(key: string): any;
121
+ /**
122
+ * @description: 设置值
123
+ * @author ChenRui
124
+ * @date 2021/1/29 16:23
125
+ */
126
+ setValue(key: string, val: any, isDefault?: boolean, validate?: boolean): void;
127
+ /**
128
+ * @description: 重置表单
129
+ * @author ChenRui
130
+ * @date 2021/2/22 17:40
131
+ */
132
+ resetValue(): void;
133
+ /**
134
+ * @description: 获取文本内容
135
+ * @author ChenRui
136
+ * @date 2021/1/29 15:03
137
+ */
138
+ getText(key: string): any;
139
+ /**
140
+ * @description: 获取可选项
141
+ * @author ChenRui
142
+ * @date 2021/1/29 16:11
143
+ */
144
+ getOptions(key: string): any[];
145
+ /**
146
+ * @description: 设置可选项
147
+ * @author ChenRui
148
+ * @date 2021/1/29 16:15
149
+ */
150
+ setOptions(key: string, data: any[], defaultVal?: any): void;
151
+ /**
152
+ * @description: 获取常规属性
153
+ * @author ChenRui
154
+ * @date 2021/1/29 17:21
155
+ */
156
+ getAttribute(key: string, attribute: Attribute): any;
157
+ /**
158
+ * @description: 设置常规属性
159
+ * @author ChenRui
160
+ * @date 2021/1/29 17:21
161
+ */
162
+ setAttribute(key: string, attribute: Attribute, data: any): void;
163
+ /**
164
+ * @description: 根据name获取校验
165
+ * @author ChenRui
166
+ * @date 2021/1/30 11:46
167
+ */
168
+ getValidate(key: string, name: string): any;
169
+ /**
170
+ * @description: 移除校验
171
+ * @author ChenRui
172
+ * @date 2021/4/1 21:30
173
+ */
174
+ removeValidate(key: string, validateName: string): void;
175
+ /**
176
+ * @description: 移除所有校验
177
+ * @author ChenRui
178
+ * @date 2021/4/1 21:48
179
+ */
180
+ removeAllValidates(key: string): void;
181
+ /**
182
+ * @description: 获取校验集合
183
+ * @author ChenRui
184
+ * @date 2021/1/30 11:40
185
+ */
186
+ getValidates(key: string): Validate[];
187
+ /**
188
+ * @Description: 设置必输校验
189
+ * @author GuoXuHui
190
+ * @date 2022-05-25
191
+ * @time 10:09
192
+ */
193
+ setRequiredValidate(key: string, data: boolean): void;
194
+ /**
195
+ * @description: 设置校验
196
+ * @author ChenRui
197
+ * @date 2021/1/30 11:54
198
+ */
199
+ setValidate(key: string, validate: Validate | Validate[] | Rule, isCover?: boolean): void;
200
+ /**
201
+ * @description: 校验提示
202
+ * @author ChenRui
203
+ * @date 2021/8/18 17:40
204
+ */
205
+ validateTips(scrollView?: any): boolean;
206
+ /**
207
+ * @description: 全局校验报告
208
+ * @author ChenRui
209
+ * @date 2021/2/5 11:48
210
+ */
211
+ validateReport(formGroup?: AbstractControl, validateReports?: ValidateReport[], refreshFeedback?: boolean): ValidateReport[];
212
+ /**
213
+ * @description: 表单全局校验
214
+ * @author ChenRui
215
+ * @date 2021/2/5 14:11
216
+ */
217
+ validate(refreshFeedback?: boolean): boolean;
218
+ /**
219
+ * @description: 刷新校验
220
+ * @author ChenRui
221
+ * @date 2021/6/4 19:32
222
+ */
223
+ refreshValidate(key: string): void;
224
+ /**
225
+ * @description: 重置表单校验
226
+ * @author ChenRui
227
+ * @date 2022/4/6 11:51
228
+ */
229
+ resetFormValidateState(): void;
230
+ /**
231
+ * @description: 设置格式化显示和输出函数
232
+ * @author ChenRui
233
+ * @date 2021/2/4 19:44
234
+ */
235
+ setFormatDisplayAndOutput(key: string, customFormat: CustomFormat): void;
236
+ /**
237
+ * @description: 刷新数据
238
+ * @author ChenRui
239
+ * @date 2021/2/4 20:22
240
+ */
241
+ refreshAndUpdateData(): void;
242
+ /**
243
+ * @description: 获取控件dom对象
244
+ * @author ChenRui
245
+ * @date 2021/2/26 17:12
246
+ */
247
+ getControlEl(key: string): any;
248
+ /**
249
+ * @description: 检查是否包含上传控件
250
+ * @author ChenRui
251
+ * @date 2021/4/23 11:30
252
+ */
253
+ checkHasUploadControl(abstractControl: AbstractControl): boolean;
254
+ /**
255
+ * @description: json格式转表单格式
256
+ * @author ChenRui
257
+ * @date 2020/8/28 15:20
258
+ */
259
+ jsonToFormData(params: any): FormData;
260
+ /**
261
+ * @description: 设置变更历史记录
262
+ * @author ChenRui
263
+ * @date 2021/4/25 15:55
264
+ */
265
+ setFieldChangeHistory(fieldChangeHistory: FieldChangeHistory): void;
266
+ /**
267
+ * @description: 隐藏布局
268
+ * @author ChenRui
269
+ * @date 2021/11/16 0:01
270
+ */
271
+ hideLayout(layoutName: string, mark?: boolean): void;
272
+ /**
273
+ * @description: 设置表单值
274
+ * @author ChenRui
275
+ * @date 2021/8/16 9:29
276
+ */
277
+ private setFormDataInner;
278
+ /**
279
+ * @description: 设置控件值
280
+ * @author ChenRui
281
+ * @date 2021/4/13 12:50
282
+ */
283
+ private setControlValue;
284
+ /**
285
+ * @description: 设置控件可选项
286
+ * @author ChenRui
287
+ * @date 2021/4/13 15:09
288
+ */
289
+ private setControlOptions;
290
+ /**
291
+ * @description: 设置控件常规属性
292
+ * @author ChenRui
293
+ * @date 2021/4/13 15:11
294
+ */
295
+ private setControlAttribute;
296
+ /**
297
+ * @description: 设置校验内部函数
298
+ * @author ChenRui
299
+ * @date 2021/7/19 17:51
300
+ */
301
+ private setValidateInner;
302
+ /**
303
+ * @description: 生成数据信息
304
+ * @author ChenRui
305
+ * @date 2021/1/29 10:06
306
+ */
307
+ private generateData;
308
+ /**
309
+ * @description: 数据解码输出
310
+ * @author ChenRui
311
+ * @date 2021/5/29 23:03
312
+ */
313
+ private decodeData;
314
+ /**
315
+ * @description: 获取当前日期字符串
316
+ * @author ChenRui
317
+ * @date 2021/2/4 11:43
318
+ */
319
+ private nowDateStr;
320
+ /**
321
+ * @description: uuid生成器
322
+ * @author ChenRui
323
+ * @date 2021/7/20 11:14
324
+ */
325
+ private getUuid;
326
+ }
@@ -0,0 +1 @@
1
+ export * from "./FormApi";
@@ -0,0 +1,5 @@
1
+ export declare abstract class AbstractControl {
2
+ value: any;
3
+ [key: string]: any;
4
+ abstract get(path: Array<string | number> | string): AbstractControl | null;
5
+ }
@@ -0,0 +1,13 @@
1
+ import { DesFormControl } from "./DesFormControl";
2
+ import { DesFormLayout } from "./DesFormLayout";
3
+ import { FormControl } from "./FormControl";
4
+ export interface Control {
5
+ code: string;
6
+ name: string;
7
+ type: string;
8
+ active: boolean;
9
+ order?: number;
10
+ subControls?: Control[];
11
+ formControl?: FormControl;
12
+ controlAttr: Partial<DesFormControl> | Partial<DesFormLayout>;
13
+ }
@@ -0,0 +1,5 @@
1
+ import { DesFormControl } from "./DesFormControl";
2
+ export interface CustomFormat {
3
+ display?: (val: any, desFormControl: DesFormControl) => any;
4
+ output?: (val: any, desFormControl: DesFormControl) => any;
5
+ }
@@ -0,0 +1,32 @@
1
+ import { DesFormLayout } from "./DesFormLayout";
2
+ import { Control } from "./Control";
3
+ import { FormGroup } from "./FormGroup";
4
+ export declare class DesForm {
5
+ formId: string;
6
+ appId: string;
7
+ domainClassId: string;
8
+ objectId: string;
9
+ formType: string;
10
+ formName: string;
11
+ formAlias: string;
12
+ formDescribe: string;
13
+ useState: string;
14
+ desFormLayouts: DesFormLayout[];
15
+ controls: Control[];
16
+ formGroup: FormGroup | undefined;
17
+ [key: string]: any;
18
+ constructor(options?: {
19
+ formId?: string;
20
+ appId?: string;
21
+ domainClassId?: string;
22
+ objectId?: string;
23
+ formType?: string;
24
+ formName?: string;
25
+ formAlias?: string;
26
+ formDescribe?: string;
27
+ useState?: string;
28
+ controls?: Control[];
29
+ formGroup?: FormGroup;
30
+ desFormLayouts?: DesFormLayout[];
31
+ });
32
+ }