cnhis-design-vue 3.1.21-beta.3 → 3.1.21-beta.4

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 (117) hide show
  1. package/README.md +123 -123
  2. package/es/components/big-table/index.d.ts +1 -1
  3. package/es/components/big-table/src/BigTable.vue.d.ts +1 -1
  4. package/es/components/big-table/src/BigTable.vue_vue_type_script_setup_true_lang.js +3 -2
  5. package/es/components/button-print/index.d.ts +1 -1
  6. package/es/components/button-print/src/ButtonPrint.vue.d.ts +1 -1
  7. package/es/components/button-print/src/components/IdentityVerification.vue.d.ts +1 -1
  8. package/es/components/drag-layout/index.d.ts +1 -1
  9. package/es/components/drag-layout/src/DragLayout.vue.d.ts +1 -1
  10. package/es/components/form-config/index.d.ts +2 -2
  11. package/es/components/form-config/src/FormConfig.vue.d.ts +2 -2
  12. package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +1 -1
  13. package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +1 -1
  14. package/es/components/form-render/index.d.ts +1 -1
  15. package/es/components/form-render/src/FormRender.js +1 -1
  16. package/es/components/form-render/src/FormRender.vue.d.ts +1 -1
  17. package/es/components/form-render/src/components/renderer/inputGroup.d.ts +1 -1
  18. package/es/components/{form-table → form-render}/src/hooks/useNuiThemeOverrides.d.ts +0 -0
  19. package/es/components/{form-table → form-render}/src/hooks/useNuiThemeOverrides.js +0 -0
  20. package/es/components/{form-table → form-render}/src/hooks/useNuiThemeOverrides2.js +0 -0
  21. package/es/components/index.d.ts +1 -2
  22. package/es/components/index.js +0 -1
  23. package/es/components/index2.js +0 -3
  24. package/es/components/info-header/index.d.ts +4 -4
  25. package/es/components/info-header/src/HiddenContent.vue.d.ts +2 -2
  26. package/es/components/info-header/src/InfoEllipsis.vue.d.ts +1 -1
  27. package/es/components/info-header/src/InfoHeader.vue.d.ts +4 -4
  28. package/es/components/scale-view/index.d.ts +1 -1
  29. package/es/components/scale-view/src/ScaleView.vue.d.ts +1 -1
  30. package/es/components/scale-view/src/components/formitem/text-over-tooltip/TextOverTooltip.vue.d.ts +1 -1
  31. package/es/components/scale-view/src/hooks/use-component.d.ts +2 -2
  32. package/es/components/select-label/index.d.ts +4 -4
  33. package/es/components/select-label/src/LabelFormContent.vue.d.ts +2 -2
  34. package/es/components/select-label/src/SelectLabel.vue.d.ts +2 -2
  35. package/es/components/select-person/index.d.ts +1 -1
  36. package/es/components/select-person/src/SelectPerson.vue.d.ts +1 -1
  37. package/es/components/shortcut-setter/index.d.ts +1 -1
  38. package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +1 -1
  39. package/es/components/steps-wheel/index.d.ts +1 -1
  40. package/es/components/steps-wheel/src/StepsWheel.vue.d.ts +1 -1
  41. package/es/components/time-line/index.d.ts +1 -1
  42. package/es/components/time-line/src/TimeLine.vue.d.ts +1 -1
  43. package/es/shared/components/TextOverTooltip/TextOverTooltip.vue.d.ts +1 -1
  44. package/package.json +2 -2
  45. package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
  46. package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +0 -1
  47. package/es/components/bpmn-workflow/types/ModelingModule.d.ts +0 -1
  48. package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +0 -1
  49. package/es/components/fabric-chart/src/utils/index.d.ts +0 -6823
  50. package/es/components/form-table/index.d.ts +0 -4019
  51. package/es/components/form-table/index.js +0 -1
  52. package/es/components/form-table/index2.js +0 -10
  53. package/es/components/form-table/src/FormTable.js +0 -474
  54. package/es/components/form-table/src/FormTable.vue.d.ts +0 -4019
  55. package/es/components/form-table/src/components/index.d.ts +0 -3778
  56. package/es/components/form-table/src/components/index.js +0 -1
  57. package/es/components/form-table/src/components/index2.js +0 -40
  58. package/es/components/form-table/src/components/table-age.js +0 -235
  59. package/es/components/form-table/src/components/table-age.vue.d.ts +0 -318
  60. package/es/components/form-table/src/components/table-date-picker.js +0 -179
  61. package/es/components/form-table/src/components/table-date-picker.vue.d.ts +0 -250
  62. package/es/components/form-table/src/components/table-digital.js +0 -141
  63. package/es/components/form-table/src/components/table-digital.vue.d.ts +0 -261
  64. package/es/components/form-table/src/components/table-input-password.js +0 -141
  65. package/es/components/form-table/src/components/table-input-password.vue.d.ts +0 -304
  66. package/es/components/form-table/src/components/table-input.js +0 -127
  67. package/es/components/form-table/src/components/table-input.vue.d.ts +0 -261
  68. package/es/components/form-table/src/components/table-month-picker.js +0 -104
  69. package/es/components/form-table/src/components/table-month-picker.vue.d.ts +0 -193
  70. package/es/components/form-table/src/components/table-search-more.js +0 -6
  71. package/es/components/form-table/src/components/table-search-more.vue.d.ts +0 -392
  72. package/es/components/form-table/src/components/table-search-more.vue_vue_type_script_setup_true_lang.js +0 -276
  73. package/es/components/form-table/src/components/table-search.js +0 -6
  74. package/es/components/form-table/src/components/table-search.vue.d.ts +0 -386
  75. package/es/components/form-table/src/components/table-search.vue_vue_type_script_setup_true_lang.js +0 -276
  76. package/es/components/form-table/src/components/table-select-multiple.js +0 -164
  77. package/es/components/form-table/src/components/table-select-multiple.vue.d.ts +0 -235
  78. package/es/components/form-table/src/components/table-select.js +0 -159
  79. package/es/components/form-table/src/components/table-select.vue.d.ts +0 -234
  80. package/es/components/form-table/src/components/table-textarea.js +0 -157
  81. package/es/components/form-table/src/components/table-textarea.vue.d.ts +0 -320
  82. package/es/components/form-table/src/components/table-time-picker.js +0 -150
  83. package/es/components/form-table/src/components/table-time-picker.vue.d.ts +0 -246
  84. package/es/components/form-table/src/components/table-tree-select.js +0 -285
  85. package/es/components/form-table/src/components/table-tree-select.vue.d.ts +0 -349
  86. package/es/components/form-table/src/components/text-over-tooltip.js +0 -64
  87. package/es/components/form-table/src/components/text-over-tooltip.vue.d.ts +0 -70
  88. package/es/components/form-table/src/configs/index.d.ts +0 -35
  89. package/es/components/form-table/src/configs/index.js +0 -1
  90. package/es/components/form-table/src/configs/index2.js +0 -67
  91. package/es/components/form-table/src/hooks/index.d.ts +0 -5
  92. package/es/components/form-table/src/hooks/index.js +0 -5
  93. package/es/components/form-table/src/hooks/useBoundDate.d.ts +0 -21
  94. package/es/components/form-table/src/hooks/useBoundDate.js +0 -1
  95. package/es/components/form-table/src/hooks/useBoundDate2.js +0 -414
  96. package/es/components/form-table/src/hooks/useDateType.d.ts +0 -17
  97. package/es/components/form-table/src/hooks/useDateType.js +0 -1
  98. package/es/components/form-table/src/hooks/useDateType2.js +0 -160
  99. package/es/components/form-table/src/hooks/useFormCommon.d.ts +0 -14
  100. package/es/components/form-table/src/hooks/useFormCommon.js +0 -1
  101. package/es/components/form-table/src/hooks/useFormCommon2.js +0 -101
  102. package/es/components/form-table/src/hooks/useFormEvent.d.ts +0 -9
  103. package/es/components/form-table/src/hooks/useFormEvent.js +0 -1
  104. package/es/components/form-table/src/hooks/useFormEvent2.js +0 -68
  105. package/es/components/form-table/src/hooks/useItemDefault.d.ts +0 -53
  106. package/es/components/form-table/src/hooks/useItemDefault.js +0 -1
  107. package/es/components/form-table/src/hooks/useItemDefault2.js +0 -218
  108. package/es/components/form-table/src/hooks/useSearch.d.ts +0 -165
  109. package/es/components/form-table/src/hooks/useSearch.js +0 -1
  110. package/es/components/form-table/src/hooks/useSearch2.js +0 -1154
  111. package/es/components/form-table/src/hooks/useValidate.d.ts +0 -24
  112. package/es/components/form-table/src/hooks/useValidate.js +0 -1
  113. package/es/components/form-table/src/hooks/useValidate2.js +0 -480
  114. package/es/components/form-table/src/types/index.d.ts +0 -11
  115. package/es/components/form-table/src/types/index.js +0 -1
  116. package/es/components/form-table/style/index.css +0 -1
  117. package/es/shared/utils/tapable/index.d.ts +0 -139
@@ -1,24 +0,0 @@
1
- import { AnyObject, Func } from '../../../../../es/shared/types';
2
- import { MessageInstance, ValidateFunc, ValidateInfo } from '../../../../../es/components/form-table/src/types';
3
- export declare function useValidate(context: {
4
- message: MessageInstance;
5
- }): {
6
- handleGetRules: (value: any, item: AnyObject, hideMessage?: boolean) => ValidateInfo;
7
- handlerSetIdCarInfoValidate: (value: any, item: AnyObject, callback: Func) => void;
8
- getInputCheck: (validate?: string) => {
9
- pattern: RegExp;
10
- message: string;
11
- } | undefined;
12
- getCustomRegular: (item: AnyObject) => {
13
- pattern: RegExp;
14
- message: any;
15
- } | null;
16
- checkDigital: ValidateFunc;
17
- checkAgeJson: ValidateFunc;
18
- checkAge: ValidateFunc;
19
- checkMultipleChoice: ValidateFunc;
20
- checkLength: ValidateFunc;
21
- checkinputBlank: ValidateFunc;
22
- checkSearchCascade: ValidateFunc;
23
- checkMultipleTree: ValidateFunc;
24
- };
@@ -1 +0,0 @@
1
- export { useValidate } from './useValidate2.js';
@@ -1,480 +0,0 @@
1
- function useValidate(context) {
2
- function handleGetRules(value, item, hideMessage = false) {
3
- let res = {
4
- validate: true,
5
- errorMsg: void 0
6
- };
7
- const { validate = {}, is_null } = item;
8
- let { vali_obj } = validate;
9
- if (item.lineBarCheck || item.is_hide_field) {
10
- return res;
11
- }
12
- let errorMsg = `\u8BF7\u8F93\u5165${item.name}`;
13
- switch (item.html_type) {
14
- case "INPUT":
15
- case "TEXTAREA":
16
- if (item.is_null == 0 && !value) {
17
- !hideMessage && context.message.error(errorMsg);
18
- res = {
19
- validate: false,
20
- errorMsg
21
- };
22
- return res;
23
- }
24
- if (vali_obj != "mobile") {
25
- checkLength(value, item, (msg) => {
26
- if (msg) {
27
- !hideMessage && context.message.error(msg);
28
- res = {
29
- validate: false,
30
- errorMsg: msg
31
- };
32
- return res;
33
- }
34
- });
35
- }
36
- if (["integer", "number"].includes(vali_obj)) {
37
- const rule = getInputCheck(vali_obj);
38
- if (rule) {
39
- let { pattern, message } = rule;
40
- let res2 = pattern.test(value);
41
- if (!res2) {
42
- !hideMessage && context.message.error(message);
43
- res2 = {
44
- validate: false,
45
- errorMsg: message
46
- };
47
- return res2;
48
- }
49
- }
50
- }
51
- if (vali_obj == "id_card" && value) {
52
- handlerSetIdCarInfoValidate(value, item, (msg) => {
53
- if (msg) {
54
- !hideMessage && context.message.error(msg);
55
- res = {
56
- validate: false,
57
- errorMsg: msg
58
- };
59
- return res;
60
- }
61
- });
62
- }
63
- if (vali_obj == "regular" && item.html_type == "INPUT") {
64
- let rule = getCustomRegular(item);
65
- if (value && rule) {
66
- let { pattern, message } = rule;
67
- let res2 = pattern.test(value);
68
- if (!res2) {
69
- !hideMessage && context.message.error(message);
70
- res2 = {
71
- validate: false,
72
- errorMsg: message
73
- };
74
- return res2;
75
- }
76
- }
77
- } else {
78
- checkinputBlank(value, item, (msg) => {
79
- if (msg) {
80
- !hideMessage && context.message.error(msg);
81
- res = {
82
- validate: false,
83
- errorMsg: msg
84
- };
85
- return res;
86
- }
87
- });
88
- }
89
- break;
90
- case "DIGITAL":
91
- checkDigital(value, item, (msg) => {
92
- if (msg) {
93
- !hideMessage && context.message.error(msg);
94
- res = {
95
- validate: false,
96
- errorMsg: msg
97
- };
98
- return res;
99
- }
100
- });
101
- break;
102
- case "AGE_JSON":
103
- checkAgeJson(value, item, (msg) => {
104
- if (msg) {
105
- !hideMessage && context.message.error(msg);
106
- res = {
107
- validate: false,
108
- errorMsg: msg
109
- };
110
- return res;
111
- }
112
- });
113
- break;
114
- case "AGE":
115
- if (item.is_null == 0 && !value) {
116
- !hideMessage && context.message.error(errorMsg);
117
- res = {
118
- validate: false,
119
- errorMsg
120
- };
121
- return res;
122
- }
123
- checkAge(value, item, (msg) => {
124
- if (msg) {
125
- !hideMessage && context.message.error(msg);
126
- res = {
127
- validate: false,
128
- errorMsg: msg
129
- };
130
- return res;
131
- }
132
- });
133
- break;
134
- case "CHECKBOX_BLOCK":
135
- case "CHECKBOX":
136
- case "SEARCH_MORE":
137
- if (item.is_null == 0 && (!value || !value.length)) {
138
- !hideMessage && context.message.error(`\u8BF7\u9009\u62E9${item.name}`);
139
- res = {
140
- validate: false,
141
- errorMsg: `\u8BF7\u9009\u62E9${item.name}`
142
- };
143
- return res;
144
- }
145
- checkMultipleChoice(value, item, (msg) => {
146
- if (msg) {
147
- !hideMessage && context.message.error(msg);
148
- res = {
149
- validate: false,
150
- errorMsg: msg
151
- };
152
- return res;
153
- }
154
- });
155
- break;
156
- case "SELECT":
157
- if (String(item.multi_select) === "0") {
158
- checkMultipleChoice(value, item, (msg) => {
159
- if (msg) {
160
- !hideMessage && context.message.error(msg);
161
- res = {
162
- validate: false,
163
- errorMsg: msg
164
- };
165
- return res;
166
- }
167
- });
168
- }
169
- break;
170
- case "SEARCH_TREE":
171
- checkMultipleTree(value, item, (msg) => {
172
- if (msg) {
173
- !hideMessage && context.message.error(msg);
174
- res = {
175
- validate: false,
176
- errorMsg: msg
177
- };
178
- return res;
179
- }
180
- });
181
- break;
182
- default:
183
- if (item.is_null == 0 && !value) {
184
- !hideMessage && context.message.error(`\u8BF7\u9009\u62E9${item.name}`);
185
- res = {
186
- validate: false,
187
- errorMsg: `\u8BF7\u9009\u62E9${item.name}`
188
- };
189
- return res;
190
- }
191
- break;
192
- }
193
- if (validate && vali_obj == "mobile" && !validate.phone_idcard_type && is_null == 0) {
194
- let res2 = /(^[0-9]{11,11}$)/.test(value);
195
- if (!res2) {
196
- !hideMessage && context.message.error("\u8BF7\u6B63\u786E\u8F93\u5165\u624B\u673A\u53F7");
197
- res2 = {
198
- validate: false,
199
- errorMsg: "\u8BF7\u6B63\u786E\u8F93\u5165\u624B\u673A\u53F7"
200
- };
201
- return res2;
202
- }
203
- }
204
- return res;
205
- }
206
- function handlerSetIdCarInfoValidate(value, item, callback) {
207
- try {
208
- const { validate = {} } = item || {};
209
- if (validate.vali_obj == "id_card") {
210
- const pat = /^\d{6}(((19|20)\d{2}(0[1-9]|1[0-2])(0[1-9]|[1-2][0-9]|3[0-1])\d{3}([0-9]|x|X))|(\d{2}(0[1-9]|1[0-2])(0[1-9]|[1-2][0-9]|3[0-1])\d{3}))$/;
211
- if (!pat.test(value)) {
212
- callback("\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u8EAB\u4EFD\u8BC1\u53F7\u7801");
213
- return;
214
- }
215
- }
216
- callback();
217
- } catch (error) {
218
- console.log(error, "------handlerSetIdCarInfoValidate");
219
- callback();
220
- }
221
- }
222
- const checkDigital = (value, item, callback) => {
223
- try {
224
- const { validate, is_null, decimal_length, alias, name } = item;
225
- const { min_value, max_value } = validate || {};
226
- let showName = alias || name;
227
- if (isNaN(+value)) {
228
- callback("\u53EA\u80FD\u8F93\u5165\u6570\u5B57");
229
- return;
230
- }
231
- if (is_null == 0 && !value && value != 0) {
232
- callback(`\u8BF7\u8F93\u5165${showName}\u6709\u6548\u8303\u56F4`);
233
- return;
234
- }
235
- if (!value && value !== 0) {
236
- if (is_null == 0) {
237
- callback(`\u8BF7\u8F93\u5165${showName}\u6709\u6548\u8303\u56F4`);
238
- } else {
239
- callback();
240
- }
241
- return;
242
- }
243
- const decimalLen = decimal_length || validate.decimal_length;
244
- const valList = (value + "").trim().split(".");
245
- if (decimalLen && decimalLen != 0) {
246
- if (valList[1] && valList[1].length > decimalLen) {
247
- callback("\u5C0F\u6570\u6700\u591A" + decimalLen + "\u4F4D");
248
- return;
249
- }
250
- } else {
251
- const flag = /^-?[0-9]+$/.test(value);
252
- if (!flag) {
253
- callback("\u8BF7\u8F93\u5165\u6574\u6570");
254
- return;
255
- }
256
- }
257
- let max = +value > +max_value, min = +min_value > +value;
258
- if ((min_value || max_value) && (value || value == 0)) {
259
- if ((min_value || String(min_value) === "0") && max_value && (max || min)) {
260
- callback(`\u8BF7\u8F93\u5165${min_value}~${max_value}`);
261
- } else if (min_value && min) {
262
- callback(`\u8BF7\u8F93\u5165${showName}\u6709\u6548\u8303\u56F4`);
263
- } else if (max_value && max) {
264
- callback(`\u8BF7\u8F93\u5165${showName}\u6709\u6548\u8303\u56F4`);
265
- }
266
- callback();
267
- return;
268
- }
269
- callback();
270
- } catch (error) {
271
- console.log(error, "------checkAgeJson");
272
- callback();
273
- }
274
- };
275
- const checkAgeJson = (value, item, callback) => {
276
- try {
277
- const { is_null, alias, name } = item;
278
- const { year, month, day, days } = value;
279
- const c = (val) => String(val) === "0" || val > 0;
280
- const checkval = () => !(c(year) || c(month) || c(day));
281
- if (is_null == 0) {
282
- if (checkval()) {
283
- callback(`\u8BF7\u8F93\u5165${alias || name}`);
284
- return;
285
- } else if (days > 73e3) {
286
- callback(`\u8D85\u51FA\u5E74\u9F84\u8303\u56F40~200\u5C81`);
287
- return;
288
- }
289
- }
290
- callback();
291
- } catch (error) {
292
- console.log(error, "------checkAgeJson");
293
- callback();
294
- }
295
- };
296
- const checkAge = (value, item, callback) => {
297
- try {
298
- let { is_null, name, alias } = item;
299
- if (!value && is_null == 0) {
300
- callback(`${alias || name}\u4E0D\u80FD\u4E3A\u7A7A`);
301
- return;
302
- }
303
- callback();
304
- } catch (error) {
305
- console.log(error, "------checkMultipleChoice");
306
- callback();
307
- }
308
- };
309
- const checkMultipleChoice = (value, item, callback) => {
310
- try {
311
- const { multi_select, multi_select_value, is_null, alias, name } = item;
312
- if (Array.isArray(value)) {
313
- if (is_null == 0) {
314
- if (value.length === 0) {
315
- callback();
316
- return;
317
- }
318
- }
319
- if (is_null == 1 && value.length === 0) {
320
- callback();
321
- return;
322
- }
323
- if (multi_select_value) {
324
- if (value.length > multi_select_value) {
325
- callback(`\u6700\u591A\u53EA\u80FD\u9009\u62E9${multi_select_value}\u9879`);
326
- }
327
- }
328
- }
329
- callback();
330
- } catch (error) {
331
- console.log(error, "------checkMultipleChoice");
332
- callback();
333
- }
334
- };
335
- const checkLength = (value, item, callback) => {
336
- try {
337
- console.log(value, "---value---checkLength");
338
- const { validate = {}, is_null, html_type } = item || {};
339
- let { min_length, max_length } = validate || {};
340
- let curval = value + "";
341
- if (html_type === "INPUT") {
342
- max_length = max_length ? +max_length : 300;
343
- } else if (html_type === "TEXTAREA") {
344
- max_length = max_length ? +max_length : 500;
345
- } else if (html_type === "RICH_TEXT") {
346
- const div = document.createElement("div");
347
- div.innerHTML = value;
348
- curval = div.innerText;
349
- }
350
- const strlen = curval.length;
351
- let max = strlen > max_length, min = min_length > strlen;
352
- if (is_null == 0 && !value && value != 0) {
353
- callback(`\u8BF7\u8F93\u5165${min_length || 0}-${max_length}\u4E2A\u5B57\u7B26`);
354
- return;
355
- }
356
- if (is_null == 1 && !value) {
357
- callback();
358
- return;
359
- }
360
- if ((min_length || String(min_length) === "0") && max_length && (max || min)) {
361
- callback(`\u8BF7\u8F93\u5165${min_length || 0}-${max_length}\u4E2A\u5B57\u7B26`);
362
- } else if (min_length && min) {
363
- callback(`\u81F3\u5C11\u8F93\u5165${min_length}\u4E2A\u5B57\u7B26`);
364
- } else if (max_length && max) {
365
- callback(`\u6700\u591A\u53EA\u80FD\u8F93\u5165${max_length}\u4E2A\u5B57\u7B26`);
366
- }
367
- callback();
368
- } catch (error) {
369
- console.log(error, "------checkLength");
370
- callback();
371
- }
372
- };
373
- function getInputCheck(validate) {
374
- if (!validate)
375
- return;
376
- const isInteger = validate == "integer";
377
- return {
378
- pattern: isInteger ? /^-?[0-9]+$/ : /^(-?[0-9]+)(\.[0-9]+)?$/,
379
- message: isInteger ? "\u53EA\u80FD\u8F93\u5165\u6574\u6570" : "\u53EA\u80FD\u8F93\u5165\u6574\u6570\u548C\u5C0F\u6570"
380
- };
381
- }
382
- function getCustomRegular(item) {
383
- try {
384
- const { validate = {}, regular_expression, regular_error_tip } = item;
385
- let regStr = regular_expression || (validate == null ? void 0 : validate.regular_expression);
386
- let tip = regular_error_tip || (validate == null ? void 0 : validate.regular_error_tip);
387
- if (!regStr) {
388
- console.log(`${item.name}\u6B63\u5219\u9519\u8BEF\uFF1A`, regStr);
389
- return null;
390
- }
391
- const reg = new RegExp(regStr);
392
- return {
393
- pattern: reg,
394
- message: tip || "\u8BF7\u8F93\u5165\u6709\u6548\u683C\u5F0F"
395
- };
396
- } catch (error) {
397
- return null;
398
- }
399
- }
400
- const checkinputBlank = (value, item, callback) => {
401
- try {
402
- const { is_null, delete_before_after_spaces } = item;
403
- if (typeof value === "string" && delete_before_after_spaces == 1) {
404
- let val = value.trim();
405
- if (!val && is_null == 0) {
406
- callback(`\u4E0D\u53EF\u4E3A\u7A7A`);
407
- return;
408
- }
409
- }
410
- callback();
411
- } catch (error) {
412
- console.log(error, "------checkinputBlank");
413
- callback();
414
- }
415
- };
416
- const checkSearchCascade = (value, item, callback) => {
417
- try {
418
- let curval = value;
419
- const { is_null, name } = item;
420
- if (!Array.isArray(curval)) {
421
- callback();
422
- return;
423
- }
424
- curval = curval == null ? void 0 : curval.filter(Boolean);
425
- let len = (curval == null ? void 0 : curval.length) || 0;
426
- if (is_null == 1 && len === 0) {
427
- callback();
428
- return;
429
- } else if (is_null == 0 && (!curval || len === 0)) {
430
- callback(`\u8BF7\u9009${name}`);
431
- }
432
- callback();
433
- } catch (error) {
434
- console.log(error, "------checkSearchCascade");
435
- callback();
436
- }
437
- };
438
- const checkMultipleTree = (value, item, callback) => {
439
- try {
440
- let { is_null, name, alias, val_key, multi_select_value, multi_select, max_length } = item;
441
- let selectedKey = `${val_key}_${name}`;
442
- if (Array.isArray(value)) {
443
- if (is_null == 0) {
444
- if (!value.length) {
445
- callback();
446
- return;
447
- }
448
- }
449
- if (is_null == 1 && !value.length) {
450
- callback();
451
- return;
452
- }
453
- if (max_length && Number(max_length)) {
454
- if (value.length > +max_length) {
455
- callback(`${alias || name} \u6700\u591A\u53EA\u80FD\u9009\u62E9${max_length}\u9879`);
456
- }
457
- }
458
- }
459
- callback();
460
- } catch (error) {
461
- callback();
462
- }
463
- };
464
- return {
465
- handleGetRules,
466
- handlerSetIdCarInfoValidate,
467
- getInputCheck,
468
- getCustomRegular,
469
- checkDigital,
470
- checkAgeJson,
471
- checkAge,
472
- checkMultipleChoice,
473
- checkLength,
474
- checkinputBlank,
475
- checkSearchCascade,
476
- checkMultipleTree
477
- };
478
- }
479
-
480
- export { useValidate };
@@ -1,11 +0,0 @@
1
- import { AnyObject, Func } from '../../../../../es/shared/types';
2
- import { PropType } from 'vue';
3
- export declare type PropObject = PropType<AnyObject>;
4
- export declare type MessageInstance = Record<'success' | 'error' | 'warning' | 'info', Func>;
5
- export interface ValidateInfo {
6
- validate: boolean;
7
- errorMsg?: string;
8
- }
9
- export interface ValidateFunc {
10
- (value: any, item: AnyObject, callback: Func): void;
11
- }
@@ -1 +0,0 @@
1
- .table-form-age-error,.table-form-age-error .n-select-selection--single,.table-form-age-error .table-age-input{border-color:red!important}.table-date-picker{min-width:unset!important;width:100%}.table-date-picker-error .n-input{border-color:red!important}.text-over-tooltip-components{display:inline-block;max-width:100%}.text-over-tooltip-components .ellipsis{color:#35393c;font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.text-over-tooltip-components .ellipsis i{font-style:normal;white-space:nowrap;word-break:keep-all}.text-over-tooltip-components .fs20{color:green;font-size:20px;font-weight:600;line-height:22px}.text-over-tooltip-components .fs12{color:orange;font-size:12px;font-weight:400;line-height:14px}.ant-input-group{display:table!important}.ant-input-group .n-input-number{width:100%}.ant-input-group .n-input-number.table-error-digital,.ant-input-group .n-input-number.table-error-digital input{border-color:red!important}.table-digital-com .n-input-group-addon{max-width:52px}.table-digital-com .n-input-group-addon .text-over-tooltip-components{display:inline}.table-error-input,.table-error-input input{border-color:red!important}.table-input-com .n-input-group-addon{max-width:52px}.table-input-com .n-input-group-addon .text-over-tooltip-components{display:inline}.table-month-picker{width:100%}.table-month-picker-error .n-input{border-color:red!important}.table-default-select .title-line{color:#000;font-size:14px;font-weight:700}.table-default-select .select-content-item{padding:0 5px}.table-default-select .n-select-dropdown-menu-item-selected{color:#5585f5}.tableItem-search-more-select .title-line{color:#000;font-size:14px;font-weight:700}.tableItem-search-more-select .select-content-item{padding:0 5px}.tableItem-search-more-select .n-select-dropdown-menu-item-selected{color:#5585f5}.table-error-textarea .n-input,.table-select-error .n-select-selection{border-color:red!important}.table-time-picker{width:100%}.table-time-picker-error .n-input{border-color:red!important}.formTable-page-disabled--detail .vxe-table .vxe-cell .form-table-item{align-items:center;display:flex;height:31px;justify-content:center}.formTable-page-disabled--detail .vxe-table .vxe-cell .ant-select-disabled .ant-select-selection{background:transparent;border:0!important}.formTable-page-disabled--detail .vxe-table .vxe-cell .ant-select-disabled .ant-select-arrow{display:none}.formTable-page-disabled--detail .vxe-table .vxe-cell .ant-select-disabled .ant-select-selection-selected-value{color:#606266}.formTable-page-disabled--detail .vxe-table .vxe-cell .DATE-container .ant-input{background-color:transparent;border:0!important;padding:0;text-align:center}.formTable-page-disabled--detail .vxe-table .vxe-cell .DATE-container .ant-calendar-picker-icon{display:none}.formTable-page-disabled--detail .vxe-table .vxe-cell .SELECT-container .ant-select-selection{max-width:100%}.formTable-page{max-height:350px;min-height:100px;width:100%}.formTable-page .vxe-table.vxe-table--render-default .vxe-body--column:not(.col--ellipsis),.formTable-page .vxe-table.vxe-table--render-default .vxe-footer--column:not(.col--ellipsis),.formTable-page .vxe-table.vxe-table--render-default .vxe-header--column:not(.col--ellipsis){padding:0}.formTable-page .vxe-table .vxe-table--body-wrapper::-webkit-scrollbar{height:10px;width:10px}.formTable-page .vxe-table .vxe-table--empty-content{height:100%;max-height:100%}.formTable-page .vxe-table .vxe-table--empty-content>div{align-items:center;display:flex;height:100%;justify-content:center;max-height:100%}.formTable-page .vxe-table .vxe-cell{height:unset;justify-content:center;line-height:unset;max-height:unset;min-height:32px;padding:9px 10px;text-overflow:inherit!important;width:100%}.formTable-page .vxe-table .vxe-cell .tableItem-select{width:100%}.formTable-page .vxe-table .vxe-cell textarea{height:100%;line-height:20px;resize:none}.formTable-page .vxe-table .vxe-cell .select-content{width:100%}.formTable-page .vxe-table .vxe-cell .table-form-age{display:flex;line-height:unset;width:100%}.formTable-page .vxe-table .vxe-cell .table-form-age .table-age-input{flex:1}.formTable-page .vxe-table .vxe-cell .table-form-age .table-age-select .ant-select-selection__placeholder{font-size:12px}.formTable-page .vxe-table .vxe-cell .span-required{color:red}.formTable-page .vxe-table .vxe-body--column.col--ellipsis,.formTable-page .vxe-table .vxe-editable .vxe-body--column,.formTable-page .vxe-table .vxe-footer--column.col--ellipsis,.formTable-page .vxe-table .vxe-header--column.col--ellipsis{height:40px}.formTable-page .vxe-table .span-remark-icon{color:#337ab7;margin-left:6px}
@@ -1,139 +0,0 @@
1
- type FixedSizeArray<T extends number, U> = T extends 0
2
- ? void[]
3
- : ReadonlyArray<U> & {
4
- 0: U;
5
- length: T;
6
- };
7
- type Measure<T extends number> = T extends 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 ? T : never;
8
- type Append<T extends any[], U> = {
9
- 0: [U];
10
- 1: [T[0], U];
11
- 2: [T[0], T[1], U];
12
- 3: [T[0], T[1], T[2], U];
13
- 4: [T[0], T[1], T[2], T[3], U];
14
- 5: [T[0], T[1], T[2], T[3], T[4], U];
15
- 6: [T[0], T[1], T[2], T[3], T[4], T[5], U];
16
- 7: [T[0], T[1], T[2], T[3], T[4], T[5], T[6], U];
17
- 8: [T[0], T[1], T[2], T[3], T[4], T[5], T[6], T[7], U];
18
- }[Measure<T['length']>];
19
- type AsArray<T> = T extends any[] ? T : [T];
20
-
21
- declare class UnsetAdditionalOptions {
22
- _UnsetAdditionalOptions: true;
23
- }
24
- type IfSet<X> = X extends UnsetAdditionalOptions ? {} : X;
25
-
26
- type Callback<E, T> = (error: E | null, result?: T) => void;
27
- type InnerCallback<E, T> = (error?: E | null | false, result?: T) => void;
28
-
29
- type FullTap = Tap & {
30
- type: 'sync' | 'async' | 'promise';
31
- fn: Function;
32
- };
33
-
34
- type Tap = TapOptions & {
35
- name: string;
36
- };
37
-
38
- type TapOptions = {
39
- before?: string;
40
- stage?: number;
41
- };
42
-
43
- interface HookInterceptor<T, R, AdditionalOptions = UnsetAdditionalOptions> {
44
- name?: string;
45
- tap?: (tap: FullTap & IfSet<AdditionalOptions>) => void;
46
- call?: (...args: any[]) => void;
47
- loop?: (...args: any[]) => void;
48
- error?: (err: Error) => void;
49
- result?: (result: R) => void;
50
- done?: () => void;
51
- register?: (tap: FullTap & IfSet<AdditionalOptions>) => FullTap & IfSet<AdditionalOptions>;
52
- }
53
-
54
- type ArgumentNames<T extends any[]> = FixedSizeArray<T['length'], string>;
55
-
56
- declare class Hook<T, R, AdditionalOptions = UnsetAdditionalOptions> {
57
- constructor(args?: ArgumentNames<AsArray<T>>, name?: string);
58
- name: string | undefined;
59
- taps: FullTap[];
60
- intercept(interceptor: HookInterceptor<T, R, AdditionalOptions>): void;
61
- isUsed(): boolean;
62
- callAsync(...args: Append<AsArray<T>, Callback<Error, R>>): void;
63
- promise(...args: AsArray<T>): Promise<R>;
64
- tap(options: string | (Tap & IfSet<AdditionalOptions>), fn: (...args: AsArray<T>) => R): void;
65
- withOptions(options: TapOptions & IfSet<AdditionalOptions>): Omit<this, 'call' | 'callAsync' | 'promise'>;
66
- }
67
-
68
- export class SyncHook<T, R = void, AdditionalOptions = UnsetAdditionalOptions> extends Hook<T, R, AdditionalOptions> {
69
- call(...args: AsArray<T>): R;
70
- }
71
-
72
- export class SyncBailHook<T, R, AdditionalOptions = UnsetAdditionalOptions> extends SyncHook<T, R, AdditionalOptions> {}
73
- export class SyncLoopHook<T, AdditionalOptions = UnsetAdditionalOptions> extends SyncHook<T, void, AdditionalOptions> {}
74
- export class SyncWaterfallHook<T, AdditionalOptions = UnsetAdditionalOptions> extends SyncHook<
75
- T,
76
- AsArray<T>[0],
77
- AdditionalOptions
78
- > {}
79
-
80
- declare class AsyncHook<T, R, AdditionalOptions = UnsetAdditionalOptions> extends Hook<T, R, AdditionalOptions> {
81
- tapAsync(
82
- options: string | (Tap & IfSet<AdditionalOptions>),
83
- fn: (...args: Append<AsArray<T>, InnerCallback<Error, R>>) => void
84
- ): void;
85
- tapPromise(options: string | (Tap & IfSet<AdditionalOptions>), fn: (...args: AsArray<T>) => Promise<R>): void;
86
- }
87
-
88
- export class AsyncParallelHook<T, AdditionalOptions = UnsetAdditionalOptions> extends AsyncHook<
89
- T,
90
- void,
91
- AdditionalOptions
92
- > {}
93
- export class AsyncParallelBailHook<T, R, AdditionalOptions = UnsetAdditionalOptions> extends AsyncHook<
94
- T,
95
- R,
96
- AdditionalOptions
97
- > {}
98
- export class AsyncSeriesHook<T, AdditionalOptions = UnsetAdditionalOptions> extends AsyncHook<
99
- T,
100
- void,
101
- AdditionalOptions
102
- > {}
103
- export class AsyncSeriesBailHook<T, R, AdditionalOptions = UnsetAdditionalOptions> extends AsyncHook<
104
- T,
105
- R,
106
- AdditionalOptions
107
- > {}
108
- export class AsyncSeriesLoopHook<T, AdditionalOptions = UnsetAdditionalOptions> extends AsyncHook<
109
- T,
110
- void,
111
- AdditionalOptions
112
- > {}
113
- export class AsyncSeriesWaterfallHook<T, AdditionalOptions = UnsetAdditionalOptions> extends AsyncHook<
114
- T,
115
- AsArray<T>[0],
116
- AdditionalOptions
117
- > {}
118
-
119
- type HookFactory<H> = (key: any, hook?: H) => H;
120
-
121
- interface HookMapInterceptor<H> {
122
- factory?: HookFactory<H>;
123
- }
124
-
125
- export class HookMap<H> {
126
- constructor(factory: HookFactory<H>, name?: string);
127
- name: string | undefined;
128
- get(key: any): H | undefined;
129
- for(key: any): H;
130
- intercept(interceptor: HookMapInterceptor<H>): void;
131
- }
132
-
133
- export class MultiHook<H> {
134
- constructor(hooks: H[], name?: string);
135
- name: string | undefined;
136
- tap(options: string | Tap, fn?: Function): void;
137
- tapAsync(options: string | Tap, fn?: Function): void;
138
- tapPromise(options: string | Tap, fn?: Function): void;
139
- }