cnhis-design-vue 3.1.40-beta.1 → 3.1.40-beta.11
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 +12 -48
- package/es/components/form-config/index.d.ts +66 -148
- package/es/components/form-config/src/FormConfig.vue.d.ts +66 -148
- package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +33 -74
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +33 -74
- package/es/components/form-render/index.d.ts +33 -74
- package/es/components/form-render/src/FormRender.vue.d.ts +33 -74
- package/es/components/form-render/src/FormRender.vue.js +36 -20
- package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +33 -74
- package/es/components/form-render/src/components/renderer/formItem.js +8 -2
- package/es/components/form-render/src/components/renderer/searchCascade.js +1 -0
- package/es/components/form-render/src/components/renderer/select.js +1 -0
- package/es/components/form-render/src/hooks/useAnchor.d.ts +6 -3
- package/es/components/form-render/src/hooks/useAnchor.js +26 -26
- package/es/components/form-render/src/hooks/useAutoHidden.d.ts +4 -0
- package/es/components/form-render/src/hooks/useAutoHidden.js +43 -0
- package/es/components/form-render/src/hooks/useBusinessBinding.d.ts +7 -10
- package/es/components/form-render/src/hooks/useBusinessBinding.js +38 -36
- package/es/components/form-render/src/hooks/useFieldListAdaptor.js +10 -12
- package/es/components/form-render/src/hooks/useFormContext.d.ts +1 -2
- package/es/components/form-render/src/hooks/useFormContext.js +2 -2
- package/es/components/form-render/src/types/fieldItem.d.ts +1 -1
- package/es/components/iho-table/index.d.ts +121 -121
- package/es/components/iho-table/src/IhoTable.vue.d.ts +121 -121
- package/es/components/iho-table/src/constants/index.d.ts +2 -2
- package/es/components/iho-table/src/hooks/tapHooks/index.d.ts +59 -59
- package/es/components/iho-table/src/hooks/tapHooks/useEventHooks.d.ts +1 -1
- package/es/components/index.css +1 -1
- package/es/components/index.d.ts +3 -1
- package/es/components/index.js +6 -0
- package/es/components/info-header/index.d.ts +18 -3
- package/es/components/info-header/src/HiddenContent.vue.d.ts +2 -2
- package/es/components/info-header/src/InfoEllipsis.vue.d.ts +1 -1
- package/es/components/info-header/src/InfoHeader.vue.d.ts +18 -3
- package/es/components/info-header/src/InfoHeader.vue.js +33 -19
- package/es/components/keyboard/index.d.ts +20 -2
- package/es/components/keyboard/src/Keyboard.vue.d.ts +20 -2
- package/es/components/keyboard/src/components/InputNumber.vue.d.ts +19 -2
- package/es/components/keyboard/src/components/InputNumber.vue.js +15 -5
- package/es/components/keyboard/src/components/NumberPanel.vue.d.ts +20 -2
- package/es/components/keyboard/src/components/NumberPanel.vue.js +14 -10
- package/es/components/recommend-search/index.d.ts +14 -14
- package/es/components/recommend-search/src/RecommendSearch.vue.d.ts +14 -14
- package/es/components/recommend-search/src/components/BaseSearch.vue.d.ts +2 -2
- package/es/components/recommend-search/src/components/RecommendInput.vue.d.ts +4 -4
- package/es/components/recommend-search/src/components/RecommendSelect.vue.d.ts +4 -4
- package/es/components/scale-view/index.d.ts +4 -2
- package/es/components/scale-view/src/ScaleView.vue.d.ts +7 -2
- package/es/components/scale-view/src/ScaleView.vue.js +2 -1
- package/es/components/scale-view/src/components/formitem/standard-modal.d.ts +1 -1
- package/es/components/scale-view/src/components/formitem/text-over-tooltip/TextOverTooltip.vue.d.ts +1 -1
- package/es/components/shortcut-provider/index.d.ts +15 -1
- package/es/components/shortcut-provider/src/ShortcutProvider.vue.d.ts +15 -1
- package/es/components/shortcut-provider/src/ShortcutProvider.vue.js +7 -2
- package/es/components/shortcut-setter/index.d.ts +33 -74
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +33 -74
- package/es/components/steps-wheel/index.d.ts +1 -1
- package/es/components/steps-wheel/src/StepsWheel.vue.d.ts +1 -1
- package/es/components/table-filter/index.d.ts +8933 -0
- package/es/components/table-filter/index.js +21 -0
- package/es/components/table-filter/src/base-search-com/BaseSearch.vue.d.ts +3841 -0
- package/es/components/table-filter/src/base-search-com/BaseSearch.vue.js +2272 -0
- package/es/components/table-filter/src/classification/Classification-com.vue.d.ts +3198 -0
- package/es/components/table-filter/src/classification/Classification-com.vue.js +1315 -0
- package/es/components/table-filter/src/classification/search-class-name.vue.d.ts +71 -0
- package/es/components/table-filter/src/classification/search-class-name.vue.js +195 -0
- package/es/components/table-filter/src/classification/search-professional-model.vue.d.ts +1119 -0
- package/es/components/table-filter/src/classification/search-professional-model.vue.js +594 -0
- package/es/components/table-filter/src/components/age-com/index.vue.d.ts +119 -0
- package/es/components/table-filter/src/components/age-com/index.vue.js +185 -0
- package/es/components/table-filter/src/components/button-group/ButtonGroup.vue.d.ts +199 -0
- package/es/components/table-filter/src/components/button-group/ButtonGroup.vue.js +86 -0
- package/es/components/table-filter/src/components/button-icon/getBtnIcon.d.ts +2 -0
- package/es/components/table-filter/src/components/button-icon/getBtnIcon.js +30 -0
- package/es/components/table-filter/src/components/c-tree-select/tree-select.vue.d.ts +90 -0
- package/es/components/table-filter/src/components/c-tree-select/tree-select.vue.js +253 -0
- package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.d.ts +112 -0
- package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.js +114 -0
- package/es/components/table-filter/src/components/classify-filter/helpers/options.d.ts +4 -0
- package/es/components/table-filter/src/components/classify-filter/helpers/options.js +14 -0
- package/es/components/table-filter/src/components/classify-filter/hooks/useDisplayCategory.d.ts +20 -0
- package/es/components/table-filter/src/components/classify-filter/hooks/useDisplayCategory.js +87 -0
- package/es/components/table-filter/src/components/classify-filter/hooks/useFilterConditions.d.ts +59 -0
- package/es/components/table-filter/src/components/classify-filter/hooks/useFilterConditions.js +147 -0
- package/es/components/table-filter/src/components/classify-filter/index.vue.d.ts +278 -0
- package/es/components/table-filter/src/components/classify-filter/index.vue.js +304 -0
- package/es/components/table-filter/src/components/multi-select/multi-select.vue.d.ts +113 -0
- package/es/components/table-filter/src/components/multi-select/multi-select.vue.js +153 -0
- package/es/components/table-filter/src/components/out-quick-search/out-quick-search.vue.d.ts +266 -0
- package/es/components/table-filter/src/components/out-quick-search/out-quick-search.vue.js +310 -0
- package/es/components/table-filter/src/components/range-age/index.vue.d.ts +248 -0
- package/es/components/table-filter/src/components/range-age/index.vue.js +137 -0
- package/es/components/table-filter/src/components/render-widget/components/CheckboxGroup.vue.d.ts +104 -0
- package/es/components/table-filter/src/components/render-widget/components/CheckboxGroup.vue.js +64 -0
- package/es/components/table-filter/src/components/render-widget/components/Select.vue.d.ts +34 -0
- package/es/components/table-filter/src/components/render-widget/components/Select.vue.js +45 -0
- package/es/components/table-filter/src/components/render-widget/components/index.d.ts +3 -0
- package/es/components/table-filter/src/components/render-widget/components/index.js +2 -0
- package/es/components/table-filter/src/components/render-widget/enums.d.ts +25 -0
- package/es/components/table-filter/src/components/render-widget/enums.js +27 -0
- package/es/components/table-filter/src/components/render-widget/helpers/presetValToTimestamp.d.ts +1 -0
- package/es/components/table-filter/src/components/render-widget/helpers/presetValToTimestamp.js +70 -0
- package/es/components/table-filter/src/components/render-widget/index.vue.d.ts +32 -0
- package/es/components/table-filter/src/components/render-widget/index.vue.js +107 -0
- package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +199 -0
- package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.js +152 -0
- package/es/components/table-filter/src/components/search-condition/SearchCondition.vue.d.ts +789 -0
- package/es/components/table-filter/src/components/search-condition/SearchCondition.vue.js +1520 -0
- package/es/components/table-filter/src/components/search-condition/fieldTypeList.d.ts +18 -0
- package/es/components/table-filter/src/components/search-condition/fieldTypeList.js +171 -0
- package/es/components/table-filter/src/components/search-filter/SearchFilter.vue.d.ts +1217 -0
- package/es/components/table-filter/src/components/search-filter/SearchFilter.vue.js +199 -0
- package/es/components/table-filter/src/components/search-modal/set-classification.vue.d.ts +1624 -0
- package/es/components/table-filter/src/components/search-modal/set-classification.vue.js +241 -0
- package/es/components/table-filter/src/components/table-modal/TableModal.vue.d.ts +292 -0
- package/es/components/table-filter/src/components/table-modal/TableModal.vue.js +526 -0
- package/es/components/table-filter/src/const/dataOptions.d.ts +36 -0
- package/es/components/table-filter/src/const/dataOptions.js +107 -0
- package/es/components/table-filter/src/const/index.d.ts +5 -0
- package/es/components/table-filter/src/const/index.js +5 -0
- package/es/components/table-filter/src/directive/flexibleResize.d.ts +28 -0
- package/es/components/table-filter/src/directive/flexibleResize.js +157 -0
- package/es/components/table-filter/src/directive/preventReClick.d.ts +4 -0
- package/es/components/table-filter/src/directive/preventReClick.js +14 -0
- package/es/components/table-filter/src/directive/resize.d.ts +4 -0
- package/es/components/table-filter/src/directive/resize.js +12 -0
- package/es/components/table-filter/src/hooks/export.d.ts +1 -0
- package/es/components/table-filter/src/hooks/export.js +1 -0
- package/es/components/table-filter/src/hooks/useAdvanced.d.ts +28 -0
- package/es/components/table-filter/src/hooks/useAdvanced.js +64 -0
- package/es/components/table-filter/src/hooks/useMixins.d.ts +60 -0
- package/es/components/table-filter/src/hooks/useMixins.js +532 -0
- package/es/components/table-filter/src/hooks/useRenderWidget.d.ts +15 -0
- package/es/components/table-filter/src/hooks/useRenderWidget.js +94 -0
- package/es/components/table-filter/src/hooks/useTableSearchCon.d.ts +8 -0
- package/es/components/table-filter/src/hooks/useTableSearchCon.js +131 -0
- package/es/components/table-filter/src/hooks/useWordBookutils.d.ts +12 -0
- package/es/components/table-filter/src/hooks/useWordBookutils.js +91 -0
- package/es/components/table-filter/src/quick-search/QuickSearch.vue.d.ts +1942 -0
- package/es/components/table-filter/src/quick-search/QuickSearch.vue.js +2038 -0
- package/es/components/table-filter/src/tool/generateDefOptions.d.ts +14 -0
- package/es/components/table-filter/src/tool/generateDefOptions.js +65 -0
- package/es/components/table-filter/src/tool/getWidgetType.d.ts +1 -0
- package/es/components/table-filter/src/tool/getWidgetType.js +27 -0
- package/es/components/table-filter/src/tool/options.d.ts +18 -0
- package/es/components/table-filter/src/tool/options.js +200 -0
- package/es/components/table-filter/src/tool/resizeSensor.d.ts +16 -0
- package/es/components/table-filter/src/tool/resizeSensor.js +123 -0
- package/es/components/table-filter/src/tool/time-domain.d.ts +39 -0
- package/es/components/table-filter/src/tool/time-domain.js +100 -0
- package/es/components/table-filter/src/tool/transformData.d.ts +92 -0
- package/es/components/table-filter/src/tool/transformData.js +169 -0
- package/es/components/table-filter/src/tool/utils.d.ts +4 -0
- package/es/components/table-filter/src/tool/utils.js +29 -0
- package/es/components/table-filter/src/types/enums.d.ts +65 -0
- package/es/components/table-filter/src/types/enums.js +67 -0
- package/es/components/table-filter/src/types/index.d.ts +483 -0
- package/es/components/table-filter/src/types/index.js +1 -0
- package/es/components/table-filter/src/types/tool.d.ts +7 -0
- package/es/components/table-filter/src/types/tool.js +1 -0
- package/es/components/table-filter/style/index.css +1 -0
- package/es/shared/assets/img/failure.js +1 -1
- package/es/shared/assets/img/failure.png.js +1 -1
- package/es/shared/assets/img/icon-asc.js +1 -1
- package/es/shared/assets/img/icon-desc.js +1 -1
- package/es/shared/assets/img/no-permission.js +1 -1
- package/es/shared/assets/img/no-permission.png.js +1 -1
- package/es/shared/assets/img/nodata.js +1 -1
- package/es/shared/assets/img/nodata.png.js +1 -1
- package/es/shared/assets/img/notfound.js +1 -1
- package/es/shared/assets/img/notfound.png.js +1 -1
- package/es/shared/assets/img/qr.js +1 -1
- package/es/shared/assets/img/qr.png.js +1 -1
- package/es/shared/assets/img/success.js +1 -1
- package/es/shared/assets/img/success.png.js +1 -1
- package/es/shared/assets/img/video.js +1 -1
- package/es/shared/assets/img/video.png.js +1 -1
- package/es/shared/assets/img/video_default_cover.js +1 -1
- package/es/shared/assets/img/video_default_cover.png.js +1 -1
- package/es/shared/assets/img/video_hover.js +1 -1
- package/es/shared/assets/img/video_play_hover.js +1 -1
- package/es/shared/assets/img/xb_big.js +1 -1
- package/es/shared/assets/img/xb_big.png.js +1 -1
- package/es/shared/assets/img/xb_small.js +1 -1
- package/es/shared/assets/img/xb_small.png.js +1 -1
- package/es/shared/components/TextOverTooltip/TextOverTooltip.vue.d.ts +1 -1
- package/es/shared/utils/utilExpand.js +66 -0
- package/package.json +3 -3
|
@@ -0,0 +1,532 @@
|
|
|
1
|
+
import { ref } from 'vue';
|
|
2
|
+
import moment from 'moment';
|
|
3
|
+
import timeDomain from '../tool/time-domain.js';
|
|
4
|
+
import useRenderWidget from './useRenderWidget.js';
|
|
5
|
+
import useTableSearchCon from './useTableSearchCon.js';
|
|
6
|
+
import axios from 'axios';
|
|
7
|
+
import XEUtils from 'xe-utils';
|
|
8
|
+
|
|
9
|
+
const { initRenderWidgetCfg, getRenderSearchConObj } = useRenderWidget();
|
|
10
|
+
const { getSearchDefValueByLimit } = useTableSearchCon();
|
|
11
|
+
const EVALUATEList = [
|
|
12
|
+
{
|
|
13
|
+
label: "\u4E00\u661F",
|
|
14
|
+
value: "1",
|
|
15
|
+
isSelect: false
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
label: "\u4E8C\u661F",
|
|
19
|
+
value: "2",
|
|
20
|
+
isSelect: false
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
label: "\u4E09\u661F",
|
|
24
|
+
value: "3",
|
|
25
|
+
isSelect: false
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
label: "\u56DB\u661F",
|
|
29
|
+
value: "4",
|
|
30
|
+
isSelect: false
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
label: "\u4E94\u661F",
|
|
34
|
+
value: "5",
|
|
35
|
+
isSelect: false
|
|
36
|
+
}
|
|
37
|
+
];
|
|
38
|
+
function useMixins() {
|
|
39
|
+
const filterApiConfig = ref({});
|
|
40
|
+
async function handleGetConfigApi(params, key, config = {}, filterApiConfigVal) {
|
|
41
|
+
try {
|
|
42
|
+
if (filterApiConfigVal) {
|
|
43
|
+
filterApiConfig.value = filterApiConfigVal;
|
|
44
|
+
}
|
|
45
|
+
const fn = filterApiConfig.value[key] || null;
|
|
46
|
+
if (typeof fn === "function") {
|
|
47
|
+
const res = await fn(params, config);
|
|
48
|
+
return Promise.resolve(res);
|
|
49
|
+
} else {
|
|
50
|
+
return Promise.reject(new Error(`${key} Is not a function`));
|
|
51
|
+
}
|
|
52
|
+
} catch (error) {
|
|
53
|
+
return Promise.reject(error);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
const $utils = {
|
|
57
|
+
getBtnStyle(v) {
|
|
58
|
+
if (v.showStyle == "white_bg") {
|
|
59
|
+
return {
|
|
60
|
+
"border-color": v.color,
|
|
61
|
+
color: v.color
|
|
62
|
+
};
|
|
63
|
+
} else if (v.showStyle == "none_bg") {
|
|
64
|
+
return {
|
|
65
|
+
color: v.color
|
|
66
|
+
};
|
|
67
|
+
} else if (v.showStyle == "only_icon") {
|
|
68
|
+
return {
|
|
69
|
+
"background-color": v.color,
|
|
70
|
+
"border-color": v.color
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
return {
|
|
74
|
+
"background-color": v.color,
|
|
75
|
+
"border-color": v.color
|
|
76
|
+
};
|
|
77
|
+
},
|
|
78
|
+
getRowOperatorIdSetting(row = {}, btn) {
|
|
79
|
+
if (row.operatorColumn) {
|
|
80
|
+
const rowOperatorId = row.operatorColumn.find((v) => v.includes(btn.sid));
|
|
81
|
+
if (btn.setting && typeof rowOperatorId === "string" && rowOperatorId.includes("###")) {
|
|
82
|
+
const [btnId, objId] = rowOperatorId.split("###");
|
|
83
|
+
if (btnId && objId) {
|
|
84
|
+
const settingObj = JSON.parse(btn.setting);
|
|
85
|
+
if (Array.isArray(settingObj)) {
|
|
86
|
+
const f = settingObj.find((s) => s.obj_id == objId);
|
|
87
|
+
if (f) {
|
|
88
|
+
const copyBtn2 = JSON.parse(JSON.stringify(btn));
|
|
89
|
+
copyBtn2.settingObj = {
|
|
90
|
+
...f
|
|
91
|
+
};
|
|
92
|
+
copyBtn2.setting = JSON.stringify(f);
|
|
93
|
+
return copyBtn2;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
const copyBtn = JSON.parse(JSON.stringify(btn));
|
|
100
|
+
if (this.isJSON(copyBtn.setting)) {
|
|
101
|
+
const btnSetting = JSON.parse(copyBtn.setting);
|
|
102
|
+
if (Array.isArray(btnSetting)) {
|
|
103
|
+
const settingObj = btnSetting[0] || {};
|
|
104
|
+
copyBtn.settingObj = {
|
|
105
|
+
...settingObj
|
|
106
|
+
};
|
|
107
|
+
copyBtn.setting = JSON.stringify(settingObj);
|
|
108
|
+
return copyBtn;
|
|
109
|
+
} else {
|
|
110
|
+
return copyBtn;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
return btn;
|
|
114
|
+
},
|
|
115
|
+
getAlphafloat(a, alpha) {
|
|
116
|
+
if (typeof a !== "undefined") {
|
|
117
|
+
return parseFloat((a / 256).toFixed(2));
|
|
118
|
+
}
|
|
119
|
+
if (typeof alpha !== "undefined") {
|
|
120
|
+
if (1 < alpha && alpha <= 100) {
|
|
121
|
+
return parseFloat((alpha / 100).toFixed(2));
|
|
122
|
+
}
|
|
123
|
+
if (0 <= alpha && alpha <= 1) {
|
|
124
|
+
return parseFloat(alpha.toFixed(2));
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
return 1;
|
|
128
|
+
},
|
|
129
|
+
hexToRGBA(hex, alpha) {
|
|
130
|
+
const isValidHex = (hex2) => /^#([A-Fa-f0-9]{3,4}){1,2}$/.test(hex2);
|
|
131
|
+
const getChunksFromString = (st, chunkSize2) => st.match(new RegExp(`.{${chunkSize2}}`, "g"));
|
|
132
|
+
const convertHexUnitTo256 = (hexStr) => parseInt(hexStr.repeat(2 / hexStr.length), 16);
|
|
133
|
+
if (!isValidHex(hex)) {
|
|
134
|
+
console.log("Invalid HEX");
|
|
135
|
+
return "";
|
|
136
|
+
}
|
|
137
|
+
const chunkSize = Math.floor((hex.length - 1) / 3);
|
|
138
|
+
const hexArr = getChunksFromString(hex.slice(1), chunkSize);
|
|
139
|
+
const [r, g, b, a] = hexArr.map(convertHexUnitTo256);
|
|
140
|
+
return {
|
|
141
|
+
r,
|
|
142
|
+
g,
|
|
143
|
+
b,
|
|
144
|
+
a: this.getAlphafloat(a, alpha)
|
|
145
|
+
};
|
|
146
|
+
},
|
|
147
|
+
handleLabelColor(item, isSelect) {
|
|
148
|
+
var _a;
|
|
149
|
+
let tempColor = "#5585f5";
|
|
150
|
+
const oldColorMap = {
|
|
151
|
+
blue: "#0000ff",
|
|
152
|
+
sky: "#87ceeb",
|
|
153
|
+
azure: "#f0ffff",
|
|
154
|
+
palegreen: "#98fb98",
|
|
155
|
+
yellow: "#ffff00",
|
|
156
|
+
darkorange: "#ff8c00",
|
|
157
|
+
magenta: "#ff00ff",
|
|
158
|
+
purple: "#800080",
|
|
159
|
+
maroon: "#800000",
|
|
160
|
+
orange: "#ffa500",
|
|
161
|
+
green: "#008000",
|
|
162
|
+
red: "#ff0000",
|
|
163
|
+
grey: "#808080"
|
|
164
|
+
};
|
|
165
|
+
if ((_a = item == null ? void 0 : item.color) == null ? void 0 : _a.includes("-")) {
|
|
166
|
+
const str = item.color.split("-")[1];
|
|
167
|
+
tempColor = oldColorMap[str] || "#5585f5";
|
|
168
|
+
} else {
|
|
169
|
+
tempColor = item.color || "#5585f5";
|
|
170
|
+
}
|
|
171
|
+
const tempRgba = this.hexToRGBA(tempColor) || {
|
|
172
|
+
r: 85,
|
|
173
|
+
g: 133,
|
|
174
|
+
b: 245,
|
|
175
|
+
a: 1
|
|
176
|
+
};
|
|
177
|
+
if (isSelect) {
|
|
178
|
+
return {
|
|
179
|
+
color: "#fff",
|
|
180
|
+
background: `rgba(${tempRgba.r}, ${tempRgba.g}, ${tempRgba.b})`,
|
|
181
|
+
borderColor: `rgba(${tempRgba.r}, ${tempRgba.g}, ${tempRgba.b})`
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
if (item.isSelect) {
|
|
185
|
+
return {
|
|
186
|
+
color: "#fff",
|
|
187
|
+
background: `rgba(${tempRgba.r}, ${tempRgba.g}, ${tempRgba.b})`,
|
|
188
|
+
borderColor: `rgba(${tempRgba.r}, ${tempRgba.g}, ${tempRgba.b})`
|
|
189
|
+
};
|
|
190
|
+
} else {
|
|
191
|
+
const isSys = !(item.isPublic && item.isPublic == 1);
|
|
192
|
+
const color = isSys ? "rgba(28, 28, 28, 1)" : "rgba(33, 33, 33, 0.6)";
|
|
193
|
+
return {
|
|
194
|
+
color,
|
|
195
|
+
background: "rgba(250, 250, 250, 1)",
|
|
196
|
+
borderColor: "rgba(213, 213, 213, 0.8)"
|
|
197
|
+
};
|
|
198
|
+
}
|
|
199
|
+
},
|
|
200
|
+
formatTime(type, time) {
|
|
201
|
+
let format = "";
|
|
202
|
+
if (!time)
|
|
203
|
+
return "";
|
|
204
|
+
switch (type) {
|
|
205
|
+
case "DATE":
|
|
206
|
+
format = "yyyy-MM-dd";
|
|
207
|
+
break;
|
|
208
|
+
case "DATETIME":
|
|
209
|
+
format = "yyyy-MM-dd HH:mm:ss";
|
|
210
|
+
break;
|
|
211
|
+
case "TIME":
|
|
212
|
+
format = "HH:mm:ss";
|
|
213
|
+
break;
|
|
214
|
+
case "MOUTH":
|
|
215
|
+
format = "MM-dd";
|
|
216
|
+
break;
|
|
217
|
+
case "DATETIMESTR":
|
|
218
|
+
format = "yyyy\u5E74M\u6708dd\u65E5 HH:mm";
|
|
219
|
+
break;
|
|
220
|
+
case "MOUTHTIME":
|
|
221
|
+
format = "M\u6708d\u65E5 HH:mm";
|
|
222
|
+
break;
|
|
223
|
+
case "HM":
|
|
224
|
+
format = " HH:mm";
|
|
225
|
+
break;
|
|
226
|
+
}
|
|
227
|
+
return moment(time).format(format);
|
|
228
|
+
},
|
|
229
|
+
isJSON(str) {
|
|
230
|
+
if (typeof str == "string") {
|
|
231
|
+
try {
|
|
232
|
+
const obj = JSON.parse(str);
|
|
233
|
+
if (typeof obj == "object" && obj) {
|
|
234
|
+
return true;
|
|
235
|
+
} else {
|
|
236
|
+
return false;
|
|
237
|
+
}
|
|
238
|
+
} catch (e) {
|
|
239
|
+
return false;
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
return false;
|
|
243
|
+
},
|
|
244
|
+
isArray(val) {
|
|
245
|
+
return Array.isArray(val);
|
|
246
|
+
},
|
|
247
|
+
isEmpty(val) {
|
|
248
|
+
for (const key in val) {
|
|
249
|
+
return false;
|
|
250
|
+
}
|
|
251
|
+
return true;
|
|
252
|
+
},
|
|
253
|
+
isString(val) {
|
|
254
|
+
return typeof val === "string";
|
|
255
|
+
},
|
|
256
|
+
isPlainObject(val) {
|
|
257
|
+
return typeof val === "object";
|
|
258
|
+
}
|
|
259
|
+
};
|
|
260
|
+
const outQuickSearchFn = {
|
|
261
|
+
handleRequestedLabel(v) {
|
|
262
|
+
const params = { type: v, pageSize: 1e4 };
|
|
263
|
+
return axios.get("/label/list", { params });
|
|
264
|
+
},
|
|
265
|
+
handlerInitSearchItem(arr, searchFieldLimit) {
|
|
266
|
+
if (!Array.isArray(arr))
|
|
267
|
+
return;
|
|
268
|
+
arr.forEach((el) => {
|
|
269
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
270
|
+
if (initRenderWidgetCfg(el))
|
|
271
|
+
return;
|
|
272
|
+
el.setting = typeof el.setting == "string" ? JSON.parse(el.setting) : el.setting;
|
|
273
|
+
const attr = ((_a = el == null ? void 0 : el.settingObj) == null ? void 0 : _a.attr) || "";
|
|
274
|
+
const isPreciseSearch = ((_b = el == null ? void 0 : el.settingObj) == null ? void 0 : _b.isPreciseSearch) || "";
|
|
275
|
+
const showSetting = ((_c = el == null ? void 0 : el.setting) == null ? void 0 : _c.showSetting) || [];
|
|
276
|
+
const textCon = el.fieldType == "TEXT" && isPreciseSearch == 1 ? "EQ" : "CL";
|
|
277
|
+
const advanceOptionSetting = el.advanceOptionSetting;
|
|
278
|
+
const wordbookId = (_e = (_d = el == null ? void 0 : el.setting) == null ? void 0 : _d.wordbook) == null ? void 0 : _e.id;
|
|
279
|
+
if (showSetting == null ? void 0 : showSetting.length) {
|
|
280
|
+
let tvalue = [];
|
|
281
|
+
const df = el.explicitDefaultVal;
|
|
282
|
+
if (df) {
|
|
283
|
+
if (df == "firstOption") {
|
|
284
|
+
tvalue = String(advanceOptionSetting) === "0" ? 0 : [0];
|
|
285
|
+
} else {
|
|
286
|
+
if (String(advanceOptionSetting) === "0") {
|
|
287
|
+
const index = showSetting.findIndex((v) => v.change_text == df);
|
|
288
|
+
if (index > -1)
|
|
289
|
+
tvalue = index;
|
|
290
|
+
} else {
|
|
291
|
+
if (Array.isArray(tvalue)) {
|
|
292
|
+
const dfs = df.split(",");
|
|
293
|
+
dfs.forEach((d) => {
|
|
294
|
+
const index = showSetting.findIndex((v) => v.change_text == d);
|
|
295
|
+
if (index > -1)
|
|
296
|
+
tvalue.push(index);
|
|
297
|
+
});
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
el.con = "CONVERT";
|
|
303
|
+
el.com = "SelectMui";
|
|
304
|
+
el.comType = "SelectMui";
|
|
305
|
+
el.value = tvalue;
|
|
306
|
+
const labelList = (_f = el.setting) == null ? void 0 : _f.showSetting.map((i) => {
|
|
307
|
+
i.labelName = i.change_text;
|
|
308
|
+
return i;
|
|
309
|
+
});
|
|
310
|
+
el.labelList = labelList;
|
|
311
|
+
} else if (!$utils.isEmpty((_g = el.setting) == null ? void 0 : _g.wordbook) && wordbookId) {
|
|
312
|
+
const isTree = "tree" === ((_i = (_h = el == null ? void 0 : el.setting) == null ? void 0 : _h.wordbook) == null ? void 0 : _i.showType);
|
|
313
|
+
const comType = isTree ? "treeSelect" : "SelectMuiWordBook";
|
|
314
|
+
const defVal = isTree ? [] : [];
|
|
315
|
+
el.con = "QUOTE";
|
|
316
|
+
el.com = "SelectMui";
|
|
317
|
+
el.comType = comType;
|
|
318
|
+
el.value = defVal;
|
|
319
|
+
el.dataSource = [];
|
|
320
|
+
el.searchPageConfig = {
|
|
321
|
+
keyword: void 0,
|
|
322
|
+
isRequest: false,
|
|
323
|
+
page: 1,
|
|
324
|
+
total: 1,
|
|
325
|
+
hasNextPage: false
|
|
326
|
+
};
|
|
327
|
+
} else {
|
|
328
|
+
if (["MONEY", "PERCENTAGE", "AGE", "NUMBER"].includes(attr) || el.fieldType == "NUMBER") {
|
|
329
|
+
el.con = "BIGANDLESS";
|
|
330
|
+
el.com = "Number";
|
|
331
|
+
el.lessValue = "";
|
|
332
|
+
el.bigValue = "";
|
|
333
|
+
if (attr == "AGE" && el.fieldType != "NUMBER") {
|
|
334
|
+
el.AGEAttr = true;
|
|
335
|
+
el.inputUnit = "\u5C81";
|
|
336
|
+
}
|
|
337
|
+
if (el.fieldType == "NUMBER" && attr == "PERCENTAGE") {
|
|
338
|
+
el.inputUnit = "%";
|
|
339
|
+
}
|
|
340
|
+
} else if (["BIRTHDAY", "DATE", "TASKDATE"].includes(attr) || ["DATETIME", "DATE"].includes((el == null ? void 0 : el.fieldType) || "")) {
|
|
341
|
+
let value = getSearchDefValueByLimit(el, searchFieldLimit) || [];
|
|
342
|
+
if (el.explicitDefaultVal) {
|
|
343
|
+
const t = timeDomain.getTimeDomain(el.explicitDefaultVal);
|
|
344
|
+
if (t.length > 0) {
|
|
345
|
+
value = t;
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
el.con = "IN";
|
|
349
|
+
el.com = "DatePicker";
|
|
350
|
+
el.value = value;
|
|
351
|
+
if (attr === "BIRTHDAY") {
|
|
352
|
+
el.showFormat = "MM-DD";
|
|
353
|
+
el.showTime = false;
|
|
354
|
+
} else if (["TODAY", "TOMORROW", "YESTERDAY"].includes((el == null ? void 0 : el.explicitDefaultVal) || "")) {
|
|
355
|
+
const [v] = value;
|
|
356
|
+
el.showFormat = "YYYY-MM-DD";
|
|
357
|
+
el.showTime = false;
|
|
358
|
+
el.com = "DayPicker";
|
|
359
|
+
el.value = v || moment();
|
|
360
|
+
} else {
|
|
361
|
+
el.showFormat = "YYYY-MM-DD HH:mm:ss";
|
|
362
|
+
el.showTime = true;
|
|
363
|
+
}
|
|
364
|
+
} else if (["LABEL", "EVALUATE"].includes(attr)) {
|
|
365
|
+
el.con = "CL";
|
|
366
|
+
el.com = "SelectMui";
|
|
367
|
+
el.value = [];
|
|
368
|
+
if (attr == "EVALUATE") {
|
|
369
|
+
const list = EVALUATEList.map((i) => {
|
|
370
|
+
i.labelName = i.label;
|
|
371
|
+
return i;
|
|
372
|
+
});
|
|
373
|
+
el.labelList = list;
|
|
374
|
+
} else {
|
|
375
|
+
this.handleSetLabelOptions((_j = el.setting) == null ? void 0 : _j.labelType, el);
|
|
376
|
+
}
|
|
377
|
+
} else if ("PASSWORD" === attr) {
|
|
378
|
+
el.con = el.fieldType === "NUMBER" ? "EQ" : textCon;
|
|
379
|
+
el.comAttr = "PASSWORD";
|
|
380
|
+
el.PASSWORDTYPE = true;
|
|
381
|
+
el.value = "";
|
|
382
|
+
el.com = "Text";
|
|
383
|
+
} else if (["DURATION"].includes(attr)) {
|
|
384
|
+
el.con = "EQ";
|
|
385
|
+
el.value = "";
|
|
386
|
+
el.com = "Text";
|
|
387
|
+
el.attr = "DURATION";
|
|
388
|
+
} else {
|
|
389
|
+
el.con = textCon;
|
|
390
|
+
el.isPreciseSearch = isPreciseSearch == 1;
|
|
391
|
+
el.value = "";
|
|
392
|
+
el.com = "Text";
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
});
|
|
396
|
+
},
|
|
397
|
+
handleSetLabelOptions(labelType, el) {
|
|
398
|
+
this.handleRequestedLabel(labelType || "").then(({ data }) => {
|
|
399
|
+
if (data.result === "SUCCESS") {
|
|
400
|
+
const labelList = data.map.rows || [];
|
|
401
|
+
el.labelList = labelList;
|
|
402
|
+
}
|
|
403
|
+
}).catch((err) => console.log(err));
|
|
404
|
+
},
|
|
405
|
+
getConObj(arr) {
|
|
406
|
+
if (!Array.isArray(arr)) {
|
|
407
|
+
return [];
|
|
408
|
+
}
|
|
409
|
+
const conObj = [];
|
|
410
|
+
arr.forEach((item) => {
|
|
411
|
+
var _a, _b, _c;
|
|
412
|
+
const renderConObj = getRenderSearchConObj(item);
|
|
413
|
+
if (renderConObj) {
|
|
414
|
+
conObj.push(renderConObj);
|
|
415
|
+
return;
|
|
416
|
+
}
|
|
417
|
+
const temp = {
|
|
418
|
+
field_key: item.columnName,
|
|
419
|
+
con: item.con,
|
|
420
|
+
value: "",
|
|
421
|
+
limit_date: "",
|
|
422
|
+
start_val: item.start_val || "",
|
|
423
|
+
end_val: item.end_val || "",
|
|
424
|
+
unit: item.unit || "",
|
|
425
|
+
id: item.id
|
|
426
|
+
};
|
|
427
|
+
if (item.com === "Text" && item.value) {
|
|
428
|
+
temp.value = item.value;
|
|
429
|
+
conObj.push(temp);
|
|
430
|
+
}
|
|
431
|
+
const advanceOptionSetting = item.advanceOptionSetting;
|
|
432
|
+
if (item.com === "SelectMui" && XEUtils.anyNotEmpty(item.value)) {
|
|
433
|
+
const single = String(advanceOptionSetting) === "0";
|
|
434
|
+
if (single) {
|
|
435
|
+
if (!Array.isArray(item.value)) {
|
|
436
|
+
item.value = [item.value];
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
const hasArr = Array.isArray(item.value) && item.value.length > 0;
|
|
440
|
+
if (item.comType == "SelectMuiWordBook" && hasArr) {
|
|
441
|
+
temp.value = item.value.join("|#|");
|
|
442
|
+
} else if (item.comType == "treeSelect") {
|
|
443
|
+
let value = item.value;
|
|
444
|
+
if (typeof value === "string") {
|
|
445
|
+
[value] = value.split("<&=&>");
|
|
446
|
+
} else if (Array.isArray(value)) {
|
|
447
|
+
value = value.map((v) => {
|
|
448
|
+
const [k] = typeof v === "string" ? v.split("<&=&>") : [];
|
|
449
|
+
return k;
|
|
450
|
+
});
|
|
451
|
+
value = value.join("|#|");
|
|
452
|
+
}
|
|
453
|
+
temp.value = value;
|
|
454
|
+
} else {
|
|
455
|
+
if (hasArr) {
|
|
456
|
+
if (item.con == "CONVERT") {
|
|
457
|
+
let value = [];
|
|
458
|
+
value = item.value.map((i) => {
|
|
459
|
+
return item.labelList[i].filter;
|
|
460
|
+
});
|
|
461
|
+
temp.value = value;
|
|
462
|
+
} else {
|
|
463
|
+
let value = [];
|
|
464
|
+
value = item.value.map((i) => {
|
|
465
|
+
return item.labelList[i].labelName;
|
|
466
|
+
});
|
|
467
|
+
temp.value = value.join("|#|");
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
conObj.push(temp);
|
|
472
|
+
}
|
|
473
|
+
if (item.com === "DatePicker" && item.value.length) {
|
|
474
|
+
const start_val = item.value[0].format(item.showFormat);
|
|
475
|
+
const end_val = item.value[1].format(item.showFormat);
|
|
476
|
+
if (item.settingObj.attr === "BIRTHDAY") {
|
|
477
|
+
temp.limit_date = `${start_val}~${end_val}`;
|
|
478
|
+
} else {
|
|
479
|
+
temp.start_val = start_val;
|
|
480
|
+
temp.end_val = end_val;
|
|
481
|
+
}
|
|
482
|
+
conObj.push(temp);
|
|
483
|
+
}
|
|
484
|
+
if (item.com === "DayPicker" && item.value) {
|
|
485
|
+
const start_val = item.value.startOf("day").format("YYYY-MM-DD HH:mm:ss");
|
|
486
|
+
const end_val = item.value.endOf("day").format("YYYY-MM-DD HH:mm:ss");
|
|
487
|
+
if (item.settingObj.attr === "BIRTHDAY") {
|
|
488
|
+
temp.limit_date = `${start_val}~${end_val}`;
|
|
489
|
+
} else {
|
|
490
|
+
temp.start_val = start_val;
|
|
491
|
+
temp.end_val = end_val;
|
|
492
|
+
}
|
|
493
|
+
conObj.push(temp);
|
|
494
|
+
}
|
|
495
|
+
if (item.AGEAttr) {
|
|
496
|
+
temp.value = "";
|
|
497
|
+
temp.con = "IN";
|
|
498
|
+
const start_val = Number(item.lessValue) * 365;
|
|
499
|
+
const end_val = Number(item.bigValue) * 365;
|
|
500
|
+
if ((start_val || start_val === 0) && end_val) {
|
|
501
|
+
temp.start_val = start_val;
|
|
502
|
+
temp.end_val = end_val;
|
|
503
|
+
conObj.push(JSON.parse(JSON.stringify(temp)));
|
|
504
|
+
}
|
|
505
|
+
} else if (item.com === "Number") {
|
|
506
|
+
let lessValue = (_a = item.lessValue) != null ? _a : "";
|
|
507
|
+
let bigValue = (_b = item.bigValue) != null ? _b : "";
|
|
508
|
+
if (lessValue || bigValue) {
|
|
509
|
+
if (((_c = item.settingObj) == null ? void 0 : _c.attr) === "PERCENTAGE") {
|
|
510
|
+
lessValue = (lessValue || lessValue === 0) && Number(lessValue) / 100 || "";
|
|
511
|
+
bigValue = (bigValue || bigValue === 0) && Number(bigValue) / 100;
|
|
512
|
+
}
|
|
513
|
+
temp.value = `${lessValue}~${bigValue}`;
|
|
514
|
+
}
|
|
515
|
+
temp.con = "EQ";
|
|
516
|
+
conObj.push(JSON.parse(JSON.stringify(temp)));
|
|
517
|
+
}
|
|
518
|
+
if (item.com === "SelectQuote" && item.value.length) {
|
|
519
|
+
temp.value = item.value.join("|#|");
|
|
520
|
+
conObj.push(temp);
|
|
521
|
+
}
|
|
522
|
+
});
|
|
523
|
+
const res = conObj.filter(
|
|
524
|
+
(item) => item.value || item.limit_date || item.start_val || item.end_val
|
|
525
|
+
);
|
|
526
|
+
return res;
|
|
527
|
+
}
|
|
528
|
+
};
|
|
529
|
+
return { filterApiConfig, handleGetConfigApi, $utils, outQuickSearchFn };
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
export { useMixins as default };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ISearchType, ISearchConfigType } from '../../../../../es/components/table-filter/src/types';
|
|
2
|
+
export default function (): {
|
|
3
|
+
isRender: (cfg: ISearchType) => any;
|
|
4
|
+
getDefValByRenderWidget: (cfg: ISearchType) => any;
|
|
5
|
+
initRenderWidgetCfg: (cfg: ISearchType) => any;
|
|
6
|
+
getRenderSearchConObj: (cfg: ISearchType) => {
|
|
7
|
+
field_key: string;
|
|
8
|
+
con: string | undefined;
|
|
9
|
+
value: any[] | null;
|
|
10
|
+
unit: null;
|
|
11
|
+
} | null;
|
|
12
|
+
getDefValByRenderConObj: (conObj: ISearchConfigType, cfg: ISearchType) => any;
|
|
13
|
+
isExistDefValByRenderWidget: (cfg: ISearchType) => boolean;
|
|
14
|
+
resetRenderWidgetValue: (cfg: ISearchType) => any;
|
|
15
|
+
};
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { WidgetCfgMaps } from '../components/render-widget/widgetCfgMaps.js';
|
|
2
|
+
import { WidgetTypeEnums, DatePresetValEnums } from '../components/render-widget/enums.js';
|
|
3
|
+
|
|
4
|
+
function randomkey() {
|
|
5
|
+
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (c) => {
|
|
6
|
+
const r = Math.random() * 16 | 0;
|
|
7
|
+
const v = c === "x" ? r : r & 3 | 8;
|
|
8
|
+
return v.toString(16);
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
const BlockEle = [WidgetTypeEnums.CHECKBOX_GROUP];
|
|
12
|
+
function useRenderWidget() {
|
|
13
|
+
function isRenderFunc(cfg) {
|
|
14
|
+
var _a;
|
|
15
|
+
return (_a = cfg.widgetCfg) == null ? void 0 : _a.isRender;
|
|
16
|
+
}
|
|
17
|
+
function getDefValByRenderWidget(cfg) {
|
|
18
|
+
const { widgetType, defaultValue, defValueUnit } = cfg.widgetCfg || {};
|
|
19
|
+
const Widget = WidgetCfgMaps.get(widgetType);
|
|
20
|
+
let defVal;
|
|
21
|
+
if (Widget) {
|
|
22
|
+
const { setDefaultValue } = Widget;
|
|
23
|
+
if (setDefaultValue)
|
|
24
|
+
defVal = setDefaultValue(defaultValue, defValueUnit);
|
|
25
|
+
}
|
|
26
|
+
return defVal;
|
|
27
|
+
}
|
|
28
|
+
function initRenderWidgetCfg(cfg) {
|
|
29
|
+
const isRender = isRenderFunc(cfg);
|
|
30
|
+
if (!isRender)
|
|
31
|
+
return isRender;
|
|
32
|
+
const { widgetType } = cfg.widgetCfg || {};
|
|
33
|
+
cfg._frontId = randomkey();
|
|
34
|
+
cfg.isRender = isRender;
|
|
35
|
+
cfg.widgetType = widgetType;
|
|
36
|
+
cfg.con = "EQ";
|
|
37
|
+
if (BlockEle.includes(widgetType)) {
|
|
38
|
+
cfg._isBlock = true;
|
|
39
|
+
}
|
|
40
|
+
cfg.value = getDefValByRenderWidget(cfg);
|
|
41
|
+
return isRender;
|
|
42
|
+
}
|
|
43
|
+
function getRenderSearchConObj(cfg) {
|
|
44
|
+
const isRender = isRenderFunc(cfg);
|
|
45
|
+
if (!isRender)
|
|
46
|
+
return null;
|
|
47
|
+
const { columnName, con, value, widgetType } = cfg;
|
|
48
|
+
let unit = null;
|
|
49
|
+
const dateWidgetTypes = [WidgetTypeEnums.DATE, WidgetTypeEnums.DATE_TIME];
|
|
50
|
+
if (dateWidgetTypes.includes(widgetType)) {
|
|
51
|
+
unit = DatePresetValEnums.CUSTOM;
|
|
52
|
+
}
|
|
53
|
+
const val = Array.isArray(value) ? value : value ? [value] : [];
|
|
54
|
+
return {
|
|
55
|
+
field_key: columnName,
|
|
56
|
+
con,
|
|
57
|
+
value: val.length > 0 ? val : null,
|
|
58
|
+
unit
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
function getDefValByRenderConObj(conObj, cfg) {
|
|
62
|
+
const isRender = isRenderFunc(cfg);
|
|
63
|
+
if (!isRender)
|
|
64
|
+
return null;
|
|
65
|
+
const { widgetType, multiple } = cfg.widgetCfg || {};
|
|
66
|
+
const { value } = conObj;
|
|
67
|
+
if ((widgetType === WidgetTypeEnums.SELECT || widgetType === WidgetTypeEnums.CHECKBOX_GROUP) && multiple) {
|
|
68
|
+
return Array.isArray(value) ? value : value ? [value] : [];
|
|
69
|
+
}
|
|
70
|
+
return !Array.isArray(value) ? value : value[0];
|
|
71
|
+
}
|
|
72
|
+
function isExistDefValByRenderWidget(cfg) {
|
|
73
|
+
const { defaultValue, defValueUnit } = cfg.widgetCfg || {};
|
|
74
|
+
return !!(defaultValue || defValueUnit);
|
|
75
|
+
}
|
|
76
|
+
function resetRenderWidgetValue(cfg) {
|
|
77
|
+
const isRender = isRenderFunc(cfg);
|
|
78
|
+
if (!isRender)
|
|
79
|
+
return isRender;
|
|
80
|
+
cfg.value = void 0;
|
|
81
|
+
return isRender;
|
|
82
|
+
}
|
|
83
|
+
return {
|
|
84
|
+
isRender: isRenderFunc,
|
|
85
|
+
getDefValByRenderWidget,
|
|
86
|
+
initRenderWidgetCfg,
|
|
87
|
+
getRenderSearchConObj,
|
|
88
|
+
getDefValByRenderConObj,
|
|
89
|
+
isExistDefValByRenderWidget,
|
|
90
|
+
resetRenderWidgetValue
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export { useRenderWidget as default };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import moment from 'moment';
|
|
2
|
+
import 'moment/locale/zh-cn';
|
|
3
|
+
import { ISearchType } from '../../../../../es/components/table-filter/src/types';
|
|
4
|
+
export default function (): {
|
|
5
|
+
validConObj: (conObj: any, fieldList: ISearchType[], fieldSearchLimit: any) => any;
|
|
6
|
+
getSearchDefValueByLimit: (field: ISearchType, searchLimit?: any) => "" | moment.Moment[];
|
|
7
|
+
formatSearchLimit: (limitList: any, freeze?: boolean) => any;
|
|
8
|
+
};
|