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,101 +0,0 @@
1
- import XEUtils from 'xe-utils';
2
- import 'moment';
3
-
4
- function useFormCommon({
5
- item,
6
- row,
7
- defaultValue,
8
- defaultFieldList
9
- }) {
10
- function handleSetFieldsValue(setObj = {}, target) {
11
- const setVal = { ...setObj };
12
- if (typeof setVal === "object") {
13
- let list = Object.entries(setVal || {});
14
- list.forEach((f) => {
15
- let [key, value] = f;
16
- if (!key)
17
- return;
18
- if (handleCheckKeyInform(key)) {
19
- row[key] = value;
20
- } else {
21
- if (item) {
22
- defaultValue[item.name] = value;
23
- } else {
24
- if (row[key]) {
25
- let name = row[key].name;
26
- name && (defaultValue[name] = value);
27
- }
28
- }
29
- }
30
- row[key] = value;
31
- });
32
- }
33
- }
34
- function handleCheckKeyInform(key) {
35
- let baserFormKeys = row;
36
- let keyList = Object.keys(baserFormKeys || {});
37
- return keyList.includes(key);
38
- }
39
- function handleGetTargetList(t = {}) {
40
- if (t.group) {
41
- return defaultFieldList.filter((v) => v.group == t.group);
42
- }
43
- return defaultFieldList || [];
44
- }
45
- function transformStr(item2) {
46
- const def = defaultValue[item2.name];
47
- const propsDef = def || def !== "" && def == 0 ? def : item2.default_val;
48
- let defVal = propsDef || propsDef == 0 ? propsDef : "";
49
- defVal = String(defVal);
50
- return defVal;
51
- }
52
- function handlerGetDateType(data) {
53
- let dateType;
54
- switch (data.html_type) {
55
- case "DATETIME-INPUT":
56
- dateType = "YYYY-MM-DD HH:mm:ss";
57
- break;
58
- case "DATE-INPUT":
59
- dateType = "YYYY-MM-DD";
60
- break;
61
- case "TIME-INPUT":
62
- dateType = "HH:mm:ss";
63
- break;
64
- case "DATE":
65
- data.date_format = data.date_format && data.date_format.replace(/yyyy/gi, "YYYY");
66
- dateType = (data.date_format || "YYYY-MM-DD").replace(/yyyy-MM-dd/gi, "YYYY-MM-DD").replace(/hh:mm:ss/gi, "HH:mm:ss").replace(/hh:mm/gi, "HH:mm");
67
- break;
68
- default:
69
- dateType = data.date_format || "YYYY-MM-DD";
70
- break;
71
- }
72
- return dateType;
73
- }
74
- function handleGetJsonStr(str) {
75
- let resObj = {};
76
- if (XEUtils.isJSON(str)) {
77
- resObj = JSON.parse(str);
78
- } else {
79
- resObj = typeof str === "string" ? {} : str;
80
- }
81
- if (resObj && !resObj.objs && resObj.value) {
82
- if (XEUtils.isJSON(resObj.value)) {
83
- resObj = JSON.parse(resObj.value);
84
- if (resObj.type === "jsonb") {
85
- resObj = handleGetJsonStr(resObj);
86
- }
87
- }
88
- }
89
- return resObj;
90
- }
91
- return {
92
- handleSetFieldsValue,
93
- handleCheckKeyInform,
94
- handleGetJsonStr,
95
- handlerGetDateType,
96
- transformStr,
97
- handleGetTargetList
98
- };
99
- }
100
-
101
- export { useFormCommon };
@@ -1,9 +0,0 @@
1
- import { AnyObject, Func } from '../../../../../es/shared/types';
2
- export declare function useFormEvent({ mainForm, row, userInfo }: {
3
- mainForm: AnyObject;
4
- row: AnyObject;
5
- userInfo: AnyObject;
6
- }, handleSetFieldsValue: Func): {
7
- handleGetOperationalKey: <T = string>(str: T) => T;
8
- handleOperational: (v: AnyObject) => Promise<void>;
9
- };
@@ -1 +0,0 @@
1
- export { useFormEvent } from './useFormEvent2.js';
@@ -1,68 +0,0 @@
1
- import XEUtils from 'xe-utils';
2
- import 'moment';
3
-
4
- function useFormEvent({ mainForm, row, userInfo }, handleSetFieldsValue) {
5
- async function handleOperational(v) {
6
- let curKey = v.val_key;
7
- const {
8
- operationalForm = []
9
- } = mainForm || {};
10
- setTimeout(async () => {
11
- var _a;
12
- let formValue = row;
13
- let obj = {
14
- table: formValue,
15
- form: formValue,
16
- sys: ((_a = userInfo == null ? void 0 : userInfo.map) == null ? void 0 : _a.sysParams) || {}
17
- };
18
- operationalForm.forEach((v) => {
19
- let itemRes;
20
- let operationalRule = XEUtils.handleSysParams(v.operationalRule, obj, 0);
21
- let operationFormParam = v.operationFormParam;
22
- let f = operationFormParam.find((v2) => v2.includes(curKey));
23
- if (!f)
24
- return;
25
- let operationalResult = handleGetOperationalKey(v.operationalResult);
26
- let targetValueStr = "itemRes=" + operationalRule;
27
- try {
28
- eval(targetValueStr);
29
- let operationalPrecision = +v.operationalPrecision;
30
- if (typeof itemRes === "number" && !isFinite(itemRes)) {
31
- itemRes = 0;
32
- }
33
- if (operationalPrecision && String(itemRes).includes(".")) {
34
- itemRes = itemRes.toFixed(operationalPrecision);
35
- }
36
- console.log(itemRes, "---itemRes");
37
- handleSetFieldsValue({
38
- [operationalResult]: itemRes
39
- });
40
- } catch (error) {
41
- console.log(error, "\u8BA1\u7B97\u51FA\u9519");
42
- }
43
- });
44
- }, 16);
45
- }
46
- function handleGetOperationalKey(str) {
47
- const getVal = (t, r) => {
48
- return t.replace(r, function(...args) {
49
- return args[1] || "";
50
- });
51
- };
52
- if (typeof str === "string") {
53
- if (str.includes("form.")) {
54
- str = getVal(str, /form.(.*?)/g);
55
- } else if (str.includes("sys.")) {
56
- str = getVal(str, /sys.(.*?)/g);
57
- } else if (str.includes("db.")) {
58
- str = getVal(str, /db.(.*?)/g);
59
- } else if (str.includes("table.")) {
60
- str = getVal(str, /table.(.*?)/g);
61
- }
62
- }
63
- return str;
64
- }
65
- return { handleGetOperationalKey, handleOperational };
66
- }
67
-
68
- export { useFormEvent };
@@ -1,53 +0,0 @@
1
- import { AnyObject, Func } from '../../../../../es/shared/types';
2
- import { MessageInstance } from '../../../../../es/components/form-table/src/types';
3
- export declare function useItemDefault({ message, props, emit }: {
4
- message: MessageInstance;
5
- props: Record<string, any>;
6
- emit: Func;
7
- }): {
8
- formTable: AnyObject;
9
- hasErr: import("vue").ComputedRef<any>;
10
- handleGetJsonStr: (str: string | AnyObject) => AnyObject;
11
- handleSetFieldsValue: (setObj?: AnyObject, target?: any) => void;
12
- handleGetUniqueKey: (id: string) => any;
13
- handleSysParams: (str: string) => string;
14
- defaultInit: () => void;
15
- handleTableBlur: (e?: AnyObject, config?: AnyObject) => void;
16
- handleFormParams: (str: string) => string;
17
- radioColor: () => (p: AnyObject, isOnlyRead?: boolean) => any;
18
- handleGetAgeUnit: (ageInfo?: AnyObject) => string | undefined;
19
- handleAgeToBirthDay: (val: number, f: string, item: AnyObject) => void;
20
- changeAgeSelect: (val: string, item: AnyObject) => void;
21
- handlerSetIdCarInfoValidate: (value: any, item: AnyObject, callback: Func<any[], any>) => void;
22
- getInputCheck: (validate?: string | undefined) => {
23
- pattern: RegExp;
24
- message: string;
25
- } | undefined;
26
- getCustomRegular: (item: AnyObject) => {
27
- pattern: RegExp;
28
- message: any;
29
- } | null;
30
- checkDigital: import("../../../../../es/components/form-table/src/types").ValidateFunc;
31
- checkAgeJson: import("../../../../../es/components/form-table/src/types").ValidateFunc;
32
- checkAge: import("../../../../../es/components/form-table/src/types").ValidateFunc;
33
- checkMultipleChoice: import("../../../../../es/components/form-table/src/types").ValidateFunc;
34
- checkLength: import("../../../../../es/components/form-table/src/types").ValidateFunc;
35
- checkinputBlank: import("../../../../../es/components/form-table/src/types").ValidateFunc;
36
- handlerGetDateType: (data: AnyObject) => any;
37
- checkSearchCascade: import("../../../../../es/components/form-table/src/types").ValidateFunc;
38
- checkMultipleTree: import("../../../../../es/components/form-table/src/types").ValidateFunc;
39
- handleDateClearBtn: (v: any, item: AnyObject) => void;
40
- handleStartDateEndDate: (item: AnyObject) => void;
41
- showTimePanel: (item: AnyObject) => boolean;
42
- momentLib: (date_format: string) => any;
43
- judgeTimeBoundary: (time: any, item: AnyObject) => void;
44
- setTimeValue: (time: any, item: AnyObject) => void;
45
- judgeTimeRange: (time: any, item: AnyObject) => AnyObject | undefined;
46
- isSameDate: (curDate: any, compareMin: any, compareMax: any) => AnyObject;
47
- setDefaultCurrent: (compareItem: AnyObject, currTime: any) => void;
48
- handleDefaultRimeRange: (time: any, item: AnyObject) => void;
49
- judgeMinMaxDateIsSameDate: (item: AnyObject) => boolean;
50
- handleDefaultTimeRange: (time: any, item: any, chooseDate?: any) => {};
51
- changeTimeDate: (time: any, minTime: any, maxTime: any, item: AnyObject) => {};
52
- setTimeRangeArr: (hMin: any, HMax: any, mMin: any, mMax: any, sMin: any, sMax: any) => Required<Partial<Record<"hArr" | "mArr" | "sArr", [any, any]>>>;
53
- };
@@ -1 +0,0 @@
1
- export { useItemDefault } from './useItemDefault2.js';
@@ -1,218 +0,0 @@
1
- import XEUtils from 'xe-utils';
2
- import moment from 'moment';
3
- import { inject, onMounted, nextTick, computed } from 'vue';
4
- import { useBoundDate } from './useBoundDate2.js';
5
- import { useFormCommon } from './useFormCommon2.js';
6
- import { useFormEvent } from './useFormEvent2.js';
7
- import { useValidate } from './useValidate2.js';
8
-
9
- function useItemDefault({
10
- message,
11
- props,
12
- emit: emit2
13
- }) {
14
- const {
15
- handleGetRules,
16
- handlerSetIdCarInfoValidate,
17
- getInputCheck,
18
- getCustomRegular,
19
- checkDigital,
20
- checkAgeJson,
21
- checkAge,
22
- checkMultipleChoice,
23
- checkLength,
24
- checkinputBlank,
25
- checkSearchCascade,
26
- checkMultipleTree
27
- } = useValidate({ message });
28
- const {
29
- handleSetFieldsValue,
30
- handleCheckKeyInform,
31
- handleGetJsonStr,
32
- handlerGetDateType,
33
- transformStr,
34
- handleGetTargetList
35
- } = useFormCommon(props);
36
- const { handleGetOperationalKey, handleOperational } = useFormEvent(props, handleSetFieldsValue);
37
- const {
38
- isBoundDate,
39
- handleDateClearBtn,
40
- handleStartDateEndDate,
41
- showTimePanel,
42
- momentLib,
43
- judgeTimeBoundary,
44
- setTimeValue,
45
- judgeTimeRange,
46
- isSameDate,
47
- setDefaultCurrent,
48
- handleDefaultRimeRange,
49
- judgeMinMaxDateIsSameDate,
50
- handleDefaultTimeRange,
51
- changeTimeDate,
52
- setTimeRangeArr
53
- } = useBoundDate(props, handlerGetDateType, handleSetFieldsValue);
54
- const formTable = inject("formTable", {});
55
- onMounted(async () => {
56
- await nextTick();
57
- defaultInit();
58
- });
59
- const hasErr = computed(() => {
60
- var _a;
61
- let key = `__${props.item.val_key}-errorMsg__`;
62
- return (_a = props.item) == null ? void 0 : _a[key];
63
- });
64
- function handleGetUniqueKey(id) {
65
- return props.cacheUniqueKey[id];
66
- }
67
- function handleSysParams(str) {
68
- var _a, _b;
69
- let p = {
70
- form: { ...props.defaultValue },
71
- sys: ((_b = (_a = props == null ? void 0 : props.userInfo) == null ? void 0 : _a.map) == null ? void 0 : _b.sysParams) || {},
72
- db: { ...props.dbParams || {} }
73
- };
74
- str = XEUtils.handleSysParams(str, p);
75
- if (!str && +str !== 0 || ["undefined", "null"].includes(str)) {
76
- str = "";
77
- }
78
- return str;
79
- }
80
- function defaultInit() {
81
- const { validate = {}, name, default_val, html_type } = props.item;
82
- let targetStr = props.defaultValue[name] || default_val;
83
- targetStr = handleSysParams(targetStr);
84
- let isInitBlur = targetStr || String(targetStr) === "0";
85
- if (html_type == "SEARCH_MORE") {
86
- isInitBlur = false;
87
- }
88
- if (["last_menstrual"].includes(validate.obj_type)) ; else if (["birthday"].includes(validate.obj_type)) ; else if (isInitBlur) {
89
- handleTableBlur({}, { eventType: "init" });
90
- }
91
- }
92
- function handleTableBlur(e, config = {}) {
93
- console.log("\u89E6\u53D1----handleTableBlur---handleTableBlur");
94
- const { validate, html_type, val_key } = props.item;
95
- let value = props.row[val_key];
96
- let { validate: isValidate, errorMsg } = handleGetRules(value, props.item);
97
- let key = `__${val_key}-errorMsg__`;
98
- let err = errorMsg;
99
- if (isValidate) {
100
- err = void 0;
101
- }
102
- if (props.item.attr === "startDate" || props.item.attr === "endDate") {
103
- isBoundDate(e, props.item);
104
- }
105
- if (["DIGITAL"].includes(html_type)) {
106
- handleOperational(props.item);
107
- }
108
- Reflect.set(props.item, key, err);
109
- emit2("tableBlur", props.item, props.row, config);
110
- e == null ? void 0 : e.preventDefault();
111
- e == null ? void 0 : e.stopPropagation();
112
- }
113
- function handleFormParams(str) {
114
- const { row } = props;
115
- if (!str)
116
- return "";
117
- return str.replace(/\${(.*?)\}/g, function() {
118
- var pKey = arguments[1];
119
- var pls = pKey.split("!");
120
- var plsList = pls.slice(1);
121
- var f = plsList.find((v) => v || +v === 0);
122
- return row[pls[0]] || f || "";
123
- });
124
- }
125
- function radioColor() {
126
- return function(p, isOnlyRead) {
127
- let def = isOnlyRead ? "#212121" : "rgba(0, 0, 0, 0.65)";
128
- return (p == null ? void 0 : p.color) || def;
129
- };
130
- }
131
- function handleGetAgeUnit(ageInfo = {}) {
132
- if (Object.keys(ageInfo || {}).length === 0) {
133
- return;
134
- }
135
- const list = ["year", "month", "day"];
136
- return list.find((v) => ageInfo[v] > 0) || "day";
137
- }
138
- function handleAgeToBirthDay(val, f, item) {
139
- const fn = (val2, key) => moment().subtract(val2, key);
140
- let curVal = fn(val, f);
141
- if (!Reflect.get(curVal, "_isAMomentObject"))
142
- return;
143
- let mapList = handleGetTargetList(item);
144
- let target = mapList.find((v) => v.validate && v.validate.obj_type == "birthday");
145
- if (target) {
146
- handleSetFieldsValue({
147
- [target.val_key]: curVal
148
- });
149
- }
150
- }
151
- function changeAgeSelect(val, item) {
152
- const values = val.toLowerCase();
153
- const matchAgeItem = props.defaultFieldList.find((v) => {
154
- var _a;
155
- return v.html_type == "AGE" && ((_a = v.validate) == null ? void 0 : _a.obj_type) == "age";
156
- });
157
- if (matchAgeItem && matchAgeItem.isFillAge) {
158
- const mapList = props.defaultFieldList;
159
- mapList.forEach((v) => {
160
- const { validate, html_type } = v;
161
- if (validate && validate.obj_type == "age" && html_type == "AGE") {
162
- item.ageRes = v.ageRes;
163
- handleSetFieldsValue({
164
- [v.val_key]: v.ageRes[values]
165
- });
166
- }
167
- });
168
- } else {
169
- handleSetFieldsValue({});
170
- }
171
- nextTick(() => {
172
- handleTableBlur();
173
- });
174
- }
175
- return {
176
- formTable,
177
- hasErr,
178
- handleGetJsonStr,
179
- handleSetFieldsValue,
180
- handleGetUniqueKey,
181
- handleSysParams,
182
- defaultInit,
183
- handleTableBlur,
184
- handleFormParams,
185
- radioColor,
186
- handleGetAgeUnit,
187
- handleAgeToBirthDay,
188
- changeAgeSelect,
189
- handlerSetIdCarInfoValidate,
190
- getInputCheck,
191
- getCustomRegular,
192
- checkDigital,
193
- checkAgeJson,
194
- checkAge,
195
- checkMultipleChoice,
196
- checkLength,
197
- checkinputBlank,
198
- handlerGetDateType,
199
- checkSearchCascade,
200
- checkMultipleTree,
201
- handleDateClearBtn,
202
- handleStartDateEndDate,
203
- showTimePanel,
204
- momentLib,
205
- judgeTimeBoundary,
206
- setTimeValue,
207
- judgeTimeRange,
208
- isSameDate,
209
- setDefaultCurrent,
210
- handleDefaultRimeRange,
211
- judgeMinMaxDateIsSameDate,
212
- handleDefaultTimeRange,
213
- changeTimeDate,
214
- setTimeRangeArr
215
- };
216
- }
217
-
218
- export { useItemDefault };
@@ -1,165 +0,0 @@
1
- import { AnyObject, Func } from '../../../../../es/shared/types';
2
- import { Ref } from 'vue';
3
- import { MessageInstance } from '../../../../../es/components/form-table/src/types';
4
- export declare function useSearch({ loadDataPrimary_key, optionsRequestSource, axios, $qs, dropdownHide, curAddBtnItem, message, Choose_to_complete, noAllow_check_mid_level, selsectVisible, baseForm, refs, $t, $_handleTracherLog, open, wrapperRef, props, emit }: {
5
- wrapperRef: Ref<HTMLElement | null>;
6
- refs: Array<HTMLElement>;
7
- baseForm: Ref<AnyObject>;
8
- curAddBtnItem: Ref;
9
- dropdownHide: Ref<boolean>;
10
- open: Ref<boolean>;
11
- $_handleTracherLog: Func;
12
- $t: Func;
13
- $qs: any;
14
- axios: any;
15
- loadDataPrimary_key: Ref;
16
- optionsRequestSource: Ref;
17
- message: MessageInstance;
18
- Choose_to_complete: Ref<boolean>;
19
- noAllow_check_mid_level: Ref<boolean>;
20
- selsectVisible: Ref<boolean>;
21
- props: AnyObject;
22
- emit: Func;
23
- }): {
24
- VNodes: {
25
- (props: any): import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
26
- [key: string]: any;
27
- }>;
28
- props: string[];
29
- };
30
- fetching: Ref<boolean>;
31
- timeout: any;
32
- curOptions: Ref<any[]>;
33
- selectedOptions: Ref<any[]>;
34
- levelNum: Ref<number>;
35
- cascaderInitLabel: Ref<boolean>;
36
- defList: Ref<any[]>;
37
- panelOpen: Ref<boolean>;
38
- searchAddObj: Ref<AnyObject>;
39
- searchPageConfig: Ref<{
40
- keyword: undefined;
41
- isFetching: boolean;
42
- isRequest: boolean;
43
- hasNextPage: boolean;
44
- page: number;
45
- total: number;
46
- }>;
47
- optionsMaxWidth: Ref<string>;
48
- cacheReqOptionsParams: Ref<string>;
49
- hotSearchConfig: Ref<{
50
- hotList: never[];
51
- latestList: never[];
52
- isRequest: boolean;
53
- isclose: boolean;
54
- }>;
55
- searchShowHotList: Ref<boolean>;
56
- showHotSearchConfig: import("vue").ComputedRef<true | 0>;
57
- showSearchEmpty: import("vue").ComputedRef<boolean>;
58
- selectIsOpen: import("vue").ComputedRef<boolean>;
59
- isnoPages: import("vue").ComputedRef<boolean>;
60
- init: () => void;
61
- hanldeInitSearchMoreVal: (i: any, v?: any) => Promise<void>;
62
- getSearchDefParams: (keyword: any, itemData?: any, other?: any) => {
63
- pageSize?: number | undefined;
64
- primaryKey?: any;
65
- levelKey?: any;
66
- wordbookId: any;
67
- autograph: any;
68
- wordbookType: any;
69
- preConObj: string | undefined;
70
- conObj: string | undefined;
71
- preSqlExpression: any;
72
- sqlExpression: any;
73
- fieldKeys: string | undefined;
74
- keyword: any;
75
- page: number;
76
- };
77
- getCascadeParams: (params: any, itemData: any, otherConfig: any, defFalg: any) => any;
78
- handleRowUnique: (rows: any, itemData: any, uniqueConfig?: any) => any;
79
- handleGetSearchDefVal: (defFalg: any, rowData: any, itemData: any, uniqueConfig?: any) => void;
80
- handleRequestedOptions: (itemData?: any, keyword?: any, defFalg?: any, otherConfig?: any) => Promise<any>;
81
- handleFreeEntry: (option?: any) => void;
82
- formatField: (value: any) => any;
83
- formatFieldValue: (value: any) => any;
84
- getTitleHeader: (fieldList: any, renderKey: any) => string;
85
- handleRequestedUniqueKey: (id: any) => Promise<unknown>;
86
- dealDictionatySearch: (val: any) => void;
87
- handleMultipleSearch: (val: any, itemData: any) => void;
88
- multipleSelect: (e: any, item: any) => void;
89
- multipleDeselect: (e: any, item: any) => void;
90
- handlerAddOptions: (data: any, item: any) => void;
91
- searchMoreOnChange: (value: any, item: any) => void;
92
- handleFormCascade: (list?: any, v?: any, level?: any) => void;
93
- hanldeGetCascadelabel: (v?: any, k?: any) => string;
94
- handleCascaderChange: (option: any, item: any) => void;
95
- handleCascaderFilter: (inputValue: any, path: any) => any;
96
- handleCascadeLoadData: (selectedOptions: any) => Promise<void>;
97
- handlerDropdownVisibleChange: (e: any, data: any) => void;
98
- hanlderGetSearchLabel: (config: any, v: any) => any;
99
- hanlderSendSelectLog: (item: any, value: any) => void;
100
- handleSearchSelect: (e: any, option: any, type?: any, eventConfig?: any) => void;
101
- handleSearchChangePage: (type?: any) => void;
102
- handleCalculateOptionsMaxWidth: () => void;
103
- handlerSearchOnFocus: (item: any) => void;
104
- handleQueryParams: (formData: any, queryParams: any) => {};
105
- hideHotSearch: Ref<boolean>;
106
- confirmSelect: ({ value, selectRow, myUniqueKey }: any) => void;
107
- hanldeRemoveDuplicates: (list?: any, config?: any) => any[];
108
- getFormValue: () => any;
109
- cancelOptionsRequest: () => void;
110
- getHotSearchConfig: () => void;
111
- handleSelectHotKeyword: (key: any) => void;
112
- hanldeClearLately: () => void;
113
- closeHotSearch: () => void;
114
- handleSearchTracher: (item: any, obj?: any) => void;
115
- hanldercheckOption: (data: any) => any;
116
- handleSearchScrollTop: (item: any) => void;
117
- handleCascaderTracher: () => void;
118
- handleSearchBlur: () => void;
119
- curMultipleSelected: Ref<any[]>;
120
- formTable: AnyObject;
121
- hasErr: import("vue").ComputedRef<any>;
122
- handleGetJsonStr: (str: string | AnyObject) => AnyObject;
123
- handleSetFieldsValue: (setObj?: AnyObject, target?: any) => void;
124
- handleGetUniqueKey: (id: string) => any;
125
- handleSysParams: (str: string) => string;
126
- defaultInit: () => void;
127
- handleTableBlur: (e?: AnyObject | undefined, config?: AnyObject) => void;
128
- handleFormParams: (str: string) => string;
129
- radioColor: () => (p: AnyObject, isOnlyRead?: boolean | undefined) => any;
130
- handleGetAgeUnit: (ageInfo?: AnyObject) => string | undefined;
131
- handleAgeToBirthDay: (val: number, f: string, item: AnyObject) => void;
132
- changeAgeSelect: (val: string, item: AnyObject) => void;
133
- handlerSetIdCarInfoValidate: (value: any, item: AnyObject, callback: Func<any[], any>) => void;
134
- getInputCheck: (validate?: string | undefined) => {
135
- pattern: RegExp;
136
- message: string;
137
- } | undefined;
138
- getCustomRegular: (item: AnyObject) => {
139
- pattern: RegExp;
140
- message: any;
141
- } | null;
142
- checkDigital: import("../../../../../es/components/form-table/src/types").ValidateFunc;
143
- checkAgeJson: import("../../../../../es/components/form-table/src/types").ValidateFunc;
144
- checkAge: import("../../../../../es/components/form-table/src/types").ValidateFunc;
145
- checkMultipleChoice: import("../../../../../es/components/form-table/src/types").ValidateFunc;
146
- checkLength: import("../../../../../es/components/form-table/src/types").ValidateFunc;
147
- checkinputBlank: import("../../../../../es/components/form-table/src/types").ValidateFunc;
148
- handlerGetDateType: (data: AnyObject) => any;
149
- checkSearchCascade: import("../../../../../es/components/form-table/src/types").ValidateFunc;
150
- checkMultipleTree: import("../../../../../es/components/form-table/src/types").ValidateFunc;
151
- handleDateClearBtn: (v: any, item: AnyObject) => void;
152
- handleStartDateEndDate: (item: AnyObject) => void;
153
- showTimePanel: (item: AnyObject) => boolean;
154
- momentLib: (date_format: string) => any;
155
- judgeTimeBoundary: (time: any, item: AnyObject) => void;
156
- setTimeValue: (time: any, item: AnyObject) => void;
157
- judgeTimeRange: (time: any, item: AnyObject) => AnyObject | undefined;
158
- isSameDate: (curDate: any, compareMin: any, compareMax: any) => AnyObject;
159
- setDefaultCurrent: (compareItem: AnyObject, currTime: any) => void;
160
- handleDefaultRimeRange: (time: any, item: AnyObject) => void;
161
- judgeMinMaxDateIsSameDate: (item: AnyObject) => boolean;
162
- handleDefaultTimeRange: (time: any, item: any, chooseDate?: any) => {};
163
- changeTimeDate: (time: any, minTime: any, maxTime: any, item: AnyObject) => {};
164
- setTimeRangeArr: (hMin: any, HMax: any, mMin: any, mMax: any, sMin: any, sMax: any) => Required<Partial<Record<"hArr" | "mArr" | "sArr", [any, any]>>>;
165
- };
@@ -1 +0,0 @@
1
- export { useSearch } from './useSearch2.js';