cnhis-design-vue 3.3.3-beta.19 → 3.3.3-beta.22
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 +87 -87
- package/es/components/base-search/index.d.ts +3 -0
- package/es/components/base-search/src/index.vue.d.ts +3 -0
- package/es/components/callback/src/components/render/popupMaps.d.ts +13 -0
- package/es/components/classification/index.d.ts +56 -6
- package/es/components/classification/src/components/search-filter/index.vue.d.ts +56 -6
- package/es/components/classification/src/components/set-classification/index.vue.d.ts +56 -6
- package/es/components/classification/src/components/table-modal/index.vue.d.ts +0 -3
- package/es/components/classification/src/index.vue.d.ts +56 -6
- package/es/components/field-editor/index.d.ts +13 -0
- package/es/components/field-editor/src/FieldEditor.vue.d.ts +13 -0
- package/es/components/field-set/src/FieldColor.vue.d.ts +4 -4
- package/es/components/field-set/src/FieldFilter.vue.d.ts +4 -4
- package/es/components/field-set/src/FieldSet.vue.d.ts +5 -5
- package/es/components/field-set/src/components/table-row.vue.d.ts +4 -4
- package/es/components/form-config/index.d.ts +39 -0
- package/es/components/form-config/src/FormConfig.vue.d.ts +39 -0
- package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +13 -0
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +13 -0
- package/es/components/form-config/src/components/FormConfigEventSetting.vue.d.ts +13 -0
- package/es/components/form-render/index.d.ts +13 -0
- package/es/components/form-render/src/FormRender.vue.d.ts +13 -0
- package/es/components/form-render/src/FormRender.vue2.js +4 -0
- package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +13 -0
- package/es/components/form-render/src/hooks/useBusinessBinding.d.ts +12 -3
- package/es/components/form-render/src/hooks/useBusinessBinding.js +7 -7
- package/es/components/form-render/src/hooks/useFormContext.js +1 -1
- package/es/components/form-render/src/utils/business.d.ts +3 -1
- package/es/components/form-render/src/utils/business.js +7 -1
- package/es/components/iho-chat/index.d.ts +18 -1
- package/es/components/iho-chat/src/Index.vue.d.ts +18 -1
- package/es/components/iho-chat/src/components/ChatFooter.vue.d.ts +2 -1
- package/es/components/iho-chat/src/components/ChatFooter.vue2.js +14 -9
- package/es/components/iho-chat/src/components/ChatHeader.vue2.js +3 -2
- package/es/components/iho-chat/src/components/MultipleVideo.vue.d.ts +16 -0
- package/es/components/iho-chat/src/components/MultipleVideo.vue2.js +112 -53
- package/es/components/iho-chat/src/components/PersonProfile.vue2.js +1 -1
- package/es/components/iho-chat/src/hooks/index.d.ts +1 -0
- package/es/components/iho-chat/src/hooks/index.js +1 -0
- package/es/components/iho-chat/src/hooks/useDraggable.d.ts +25 -0
- package/es/components/iho-chat/src/hooks/useDraggable.js +151 -0
- package/es/components/iho-chat/style/index.css +1 -1
- package/es/components/index.css +1 -1
- package/es/components/info-header/index.d.ts +26 -0
- package/es/components/info-header/src/InfoHeader.vue.d.ts +26 -0
- package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +13 -0
- package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +13 -0
- package/es/components/quick-search/index.d.ts +2 -0
- package/es/components/quick-search/src/index.vue.d.ts +2 -0
- package/es/components/select-person/src/SelectPerson.vue2.js +2 -1
- package/es/components/shortcut-setter/index.d.ts +13 -0
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +13 -0
- package/es/components/table-filter/src/components/bi-filter/ValueCfg.vue.d.ts +1 -0
- package/es/components/table-filter/src/components/bi-filter/components/SelectFilter.vue.d.ts +1 -0
- package/es/components/table-filter/src/components/bi-filter/components/index.d.ts +1 -0
- package/es/components/table-filter/src/components/bi-filter/index.vue.d.ts +1 -0
- package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.d.ts +54 -6
- package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue2.js +26 -10
- package/es/components/table-filter/src/components/classify-filter/components/Date.vue.d.ts +17 -2
- package/es/components/table-filter/src/components/classify-filter/components/Date.vue2.js +37 -2
- package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue.d.ts +18 -2
- package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue2.js +44 -1
- package/es/components/table-filter/src/components/classify-filter/components/SelectFilter.vue.d.ts +1 -0
- package/es/components/table-filter/src/components/classify-filter/components/index.d.ts +36 -4
- package/es/components/table-filter/src/components/classify-filter/hooks/useFilterConditions.js +2 -1
- package/es/components/table-filter/src/components/classify-filter/index.vue.d.ts +55 -6
- package/es/components/table-filter/src/components/classify-filter/index.vue2.js +6 -3
- package/es/components/table-filter/src/components/render-widget/components/DateInner.vue.d.ts +1 -1
- package/es/components/table-filter/src/components/render-widget/components/DateOut.vue2.js +12 -1
- package/es/components/table-filter/src/components/render-widget/components/DateQuickBtn/index.vue.d.ts +1 -1
- package/es/components/table-filter/src/components/render-widget/components/DateQuickBtn/index.vue2.js +25 -6
- package/es/components/table-filter/src/components/render-widget/components/DateRangeInner.vue.d.ts +1 -1
- package/es/components/table-filter/src/components/render-widget/components/DateRangeOut.vue2.js +12 -1
- package/es/components/table-filter/src/components/render-widget/components/index.d.ts +2 -2
- package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +2 -2
- package/es/components/table-filter/src/hooks/useAdvanced.d.ts +2 -0
- package/es/components/table-filter/src/hooks/useAdvanced.js +20 -3
- package/es/components/table-filter/src/hooks/useRenderWidget.js +4 -0
- package/es/components/table-filter/src/tool/date.d.ts +3 -0
- package/es/components/table-filter/src/tool/date.js +139 -0
- package/es/components/table-filter/src/tool/transformData.d.ts +1 -0
- package/es/components/table-filter/src/tool/transformData.js +11 -8
- package/es/components/table-filter/src/types/enums.d.ts +1 -0
- package/es/components/table-filter/src/types/enums.js +2 -1
- package/es/components/table-filter/src/types/index.d.ts +12 -0
- package/es/env.d.ts +25 -25
- package/es/shared/package.json.js +1 -1
- package/package.json +2 -2
@@ -73,6 +73,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
73
73
|
value: string;
|
74
74
|
isAccurateSearch?: boolean | undefined;
|
75
75
|
accurateSearchKey?: string | undefined;
|
76
|
+
customDate?: string | undefined;
|
76
77
|
}[];
|
77
78
|
};
|
78
79
|
loading: import("vue").Ref<boolean>;
|
@@ -138,6 +139,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
138
139
|
isAccurate: {
|
139
140
|
type: BooleanConstructor;
|
140
141
|
};
|
142
|
+
customDate: {
|
143
|
+
type: StringConstructor;
|
144
|
+
default: null;
|
145
|
+
};
|
141
146
|
}, {
|
142
147
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
143
148
|
paramCfg: {
|
@@ -155,15 +160,21 @@ declare const _default: import("vue").DefineComponent<{
|
|
155
160
|
isAccurate: {
|
156
161
|
type: BooleanConstructor;
|
157
162
|
};
|
163
|
+
customDate: {
|
164
|
+
type: StringConstructor;
|
165
|
+
default: null;
|
166
|
+
};
|
158
167
|
}>> & {
|
159
168
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
160
169
|
"onUpdate:isAccurate"?: ((...args: any[]) => any) | undefined;
|
161
170
|
"onUpdate:presetVal"?: ((...args: any[]) => any) | undefined;
|
171
|
+
"onUpdate:customDate"?: ((...args: any[]) => any) | undefined;
|
162
172
|
}>>;
|
163
|
-
emit: (event: "update:modelValue" | "update:isAccurate" | "update:presetVal", ...args: any[]) => void;
|
173
|
+
emit: (event: "update:modelValue" | "update:isAccurate" | "update:presetVal" | "update:customDate", ...args: any[]) => void;
|
164
174
|
valueCp: import("vue").WritableComputedRef<any>;
|
165
175
|
presetValCp: import("vue").WritableComputedRef<string>;
|
166
176
|
isAccurateCp: import("vue").WritableComputedRef<boolean>;
|
177
|
+
customDateCp: import("vue").WritableComputedRef<string>;
|
167
178
|
widgetType: import("vue").ComputedRef<any>;
|
168
179
|
Date: import("vue").DefineComponent<{
|
169
180
|
componentCfg: {
|
@@ -181,6 +192,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
181
192
|
type: StringConstructor;
|
182
193
|
default: null;
|
183
194
|
};
|
195
|
+
customDate: {
|
196
|
+
type: StringConstructor;
|
197
|
+
default: null;
|
198
|
+
};
|
184
199
|
}, {
|
185
200
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
186
201
|
componentCfg: {
|
@@ -198,11 +213,16 @@ declare const _default: import("vue").DefineComponent<{
|
|
198
213
|
type: StringConstructor;
|
199
214
|
default: null;
|
200
215
|
};
|
216
|
+
customDate: {
|
217
|
+
type: StringConstructor;
|
218
|
+
default: null;
|
219
|
+
};
|
201
220
|
}>> & {
|
202
221
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
203
222
|
"onUpdate:presetVal"?: ((...args: any[]) => any) | undefined;
|
223
|
+
"onUpdate:customDate"?: ((...args: any[]) => any) | undefined;
|
204
224
|
}>>;
|
205
|
-
emit: (event: "update:modelValue" | "update:presetVal", ...args: any[]) => void;
|
225
|
+
emit: (event: "update:modelValue" | "update:presetVal" | "update:customDate", ...args: any[]) => void;
|
206
226
|
valueCp: import("vue").WritableComputedRef<any>;
|
207
227
|
presetValCp: import("vue").WritableComputedRef<string>;
|
208
228
|
dateType: any;
|
@@ -380,7 +400,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
380
400
|
NEXT_YEAR: string;
|
381
401
|
LAST_YEAR: string;
|
382
402
|
};
|
383
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "update:presetVal")[], "update:modelValue" | "update:presetVal", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
403
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "update:presetVal" | "update:customDate")[], "update:modelValue" | "update:presetVal" | "update:customDate", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
384
404
|
componentCfg: {
|
385
405
|
type: ObjectConstructor;
|
386
406
|
};
|
@@ -396,13 +416,19 @@ declare const _default: import("vue").DefineComponent<{
|
|
396
416
|
type: StringConstructor;
|
397
417
|
default: null;
|
398
418
|
};
|
419
|
+
customDate: {
|
420
|
+
type: StringConstructor;
|
421
|
+
default: null;
|
422
|
+
};
|
399
423
|
}>> & {
|
400
424
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
401
425
|
"onUpdate:presetVal"?: ((...args: any[]) => any) | undefined;
|
426
|
+
"onUpdate:customDate"?: ((...args: any[]) => any) | undefined;
|
402
427
|
}, {
|
403
428
|
modelValue: string | number | unknown[];
|
404
429
|
paramCfg: Record<string, any>;
|
405
430
|
presetVal: string;
|
431
|
+
customDate: string;
|
406
432
|
}>;
|
407
433
|
InputFilter: import("vue").DefineComponent<{
|
408
434
|
paramCfg: {
|
@@ -532,6 +558,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
532
558
|
SELECT_TIME: string;
|
533
559
|
PAST_TIME: string;
|
534
560
|
FUTURE_TIME: string;
|
561
|
+
CUSTOM_TIME: string;
|
535
562
|
};
|
536
563
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
537
564
|
paramCfg: {
|
@@ -866,6 +893,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
866
893
|
type: StringConstructor;
|
867
894
|
default: null;
|
868
895
|
};
|
896
|
+
customDate: {
|
897
|
+
type: StringConstructor;
|
898
|
+
default: null;
|
899
|
+
};
|
869
900
|
}, {
|
870
901
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
871
902
|
paramCfg: {
|
@@ -880,11 +911,16 @@ declare const _default: import("vue").DefineComponent<{
|
|
880
911
|
type: StringConstructor;
|
881
912
|
default: null;
|
882
913
|
};
|
914
|
+
customDate: {
|
915
|
+
type: StringConstructor;
|
916
|
+
default: null;
|
917
|
+
};
|
883
918
|
}>> & {
|
884
919
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
885
920
|
"onUpdate:presetVal"?: ((...args: any[]) => any) | undefined;
|
921
|
+
"onUpdate:customDate"?: ((...args: any[]) => any) | undefined;
|
886
922
|
}>>;
|
887
|
-
emit: (event: "update:modelValue" | "update:presetVal", ...args: any[]) => void;
|
923
|
+
emit: (event: "update:modelValue" | "update:presetVal" | "update:customDate", ...args: any[]) => void;
|
888
924
|
startDate: import("vue").Ref<any>;
|
889
925
|
endDate: import("vue").Ref<any>;
|
890
926
|
valueFormat: import("vue").ComputedRef<string>;
|
@@ -905,6 +941,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
905
941
|
value: string;
|
906
942
|
}[]>;
|
907
943
|
presetValCp: import("vue").WritableComputedRef<string>;
|
944
|
+
customDateCp: import("vue").WritableComputedRef<string>;
|
908
945
|
handleChange: (val: any, type: "start" | "end") => void;
|
909
946
|
isStartDateDisabled: (ts: number) => boolean;
|
910
947
|
timeStartDisabled: (ts: number) => {
|
@@ -1080,7 +1117,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
1080
1117
|
NEXT_YEAR: string;
|
1081
1118
|
LAST_YEAR: string;
|
1082
1119
|
};
|
1083
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "update:presetVal")[], "update:modelValue" | "update:presetVal", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
1120
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "update:presetVal" | "update:customDate")[], "update:modelValue" | "update:presetVal" | "update:customDate", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
1084
1121
|
paramCfg: {
|
1085
1122
|
type: ObjectConstructor;
|
1086
1123
|
default: null;
|
@@ -1093,13 +1130,19 @@ declare const _default: import("vue").DefineComponent<{
|
|
1093
1130
|
type: StringConstructor;
|
1094
1131
|
default: null;
|
1095
1132
|
};
|
1133
|
+
customDate: {
|
1134
|
+
type: StringConstructor;
|
1135
|
+
default: null;
|
1136
|
+
};
|
1096
1137
|
}>> & {
|
1097
1138
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
1098
1139
|
"onUpdate:presetVal"?: ((...args: any[]) => any) | undefined;
|
1140
|
+
"onUpdate:customDate"?: ((...args: any[]) => any) | undefined;
|
1099
1141
|
}, {
|
1100
1142
|
modelValue: string | number | unknown[];
|
1101
1143
|
paramCfg: Record<string, any>;
|
1102
1144
|
presetVal: string;
|
1145
|
+
customDate: string;
|
1103
1146
|
}>;
|
1104
1147
|
SelectLabel: import("vue").DefineComponent<{
|
1105
1148
|
paramCfg: {
|
@@ -1226,7 +1269,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
1226
1269
|
SELECTTREE: string;
|
1227
1270
|
SELECTTREEDYNAMIC: string;
|
1228
1271
|
};
|
1229
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "update:isAccurate" | "update:presetVal")[], "update:modelValue" | "update:isAccurate" | "update:presetVal", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
1272
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "update:isAccurate" | "update:presetVal" | "update:customDate")[], "update:modelValue" | "update:isAccurate" | "update:presetVal" | "update:customDate", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
1230
1273
|
paramCfg: {
|
1231
1274
|
type: ObjectConstructor;
|
1232
1275
|
default: null;
|
@@ -1242,15 +1285,21 @@ declare const _default: import("vue").DefineComponent<{
|
|
1242
1285
|
isAccurate: {
|
1243
1286
|
type: BooleanConstructor;
|
1244
1287
|
};
|
1288
|
+
customDate: {
|
1289
|
+
type: StringConstructor;
|
1290
|
+
default: null;
|
1291
|
+
};
|
1245
1292
|
}>> & {
|
1246
1293
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
1247
1294
|
"onUpdate:isAccurate"?: ((...args: any[]) => any) | undefined;
|
1248
1295
|
"onUpdate:presetVal"?: ((...args: any[]) => any) | undefined;
|
1296
|
+
"onUpdate:customDate"?: ((...args: any[]) => any) | undefined;
|
1249
1297
|
}, {
|
1250
1298
|
modelValue: string | number | unknown[];
|
1251
1299
|
paramCfg: Record<string, any>;
|
1252
1300
|
presetVal: string;
|
1253
1301
|
isAccurate: boolean;
|
1302
|
+
customDate: string;
|
1254
1303
|
}>;
|
1255
1304
|
ConditionEnums: {
|
1256
1305
|
NULL: string;
|
@@ -200,9 +200,10 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
200
200
|
key,
|
201
201
|
condition,
|
202
202
|
value,
|
203
|
-
presetVal
|
203
|
+
presetVal,
|
204
|
+
customDate
|
204
205
|
}) => {
|
205
|
-
return !key || !condition || condition === ConditionEnums.EQUAL && !value && !presetVal;
|
206
|
+
return !key || !condition || condition === ConditionEnums.EQUAL && !value && !presetVal && !customDate;
|
206
207
|
});
|
207
208
|
if (isEmpty) {
|
208
209
|
$message.warning(function() {
|
@@ -397,8 +398,10 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
397
398
|
"onUpdate:presetVal": ($event) => item.presetVal = $event,
|
398
399
|
isAccurate: item.isAccurateSearch,
|
399
400
|
"onUpdate:isAccurate": ($event) => item.isAccurateSearch = $event,
|
401
|
+
customDate: item.customDate,
|
402
|
+
"onUpdate:customDate": ($event) => item.customDate = $event,
|
400
403
|
"param-cfg": unref(getParamCfg)(item.key)
|
401
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "presetVal", "onUpdate:presetVal", "isAccurate", "onUpdate:isAccurate", "param-cfg"])) : createCommentVNode("v-if", true), createVNode(unref(NTooltip), {
|
404
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "presetVal", "onUpdate:presetVal", "isAccurate", "onUpdate:isAccurate", "customDate", "onUpdate:customDate", "param-cfg"])) : createCommentVNode("v-if", true), createVNode(unref(NTooltip), {
|
402
405
|
title: function() {
|
403
406
|
var _a, _b, _c;
|
404
407
|
try {
|
package/es/components/table-filter/src/components/render-widget/components/DateInner.vue.d.ts
CHANGED
@@ -254,7 +254,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
254
254
|
optionSetting: import("vue").ComputedRef<any>;
|
255
255
|
isRange: import("vue").ComputedRef<any>;
|
256
256
|
initData: () => void;
|
257
|
-
handleRadioClick: (
|
257
|
+
handleRadioClick: (date: any) => void;
|
258
258
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("clickQuickBtn" | "changeRadioValue")[], "clickQuickBtn" | "changeRadioValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
259
259
|
componentCfg: {
|
260
260
|
type: PropType<AnyObject>;
|
@@ -6,6 +6,7 @@ import { WidgetOptionEnums } from '../../../types/enums.js';
|
|
6
6
|
import { DateExtraOptions, DateExtraMap } from '../helpers/dateExtraMap.js';
|
7
7
|
import { setDateDisabled, setTimeDisabled } from '../helpers/dateDisabled.js';
|
8
8
|
import { presetValToTimestamp } from '../helpers/presetValToTimestamp.js';
|
9
|
+
import { parseDateShortcuts } from '../../../tool/date.js';
|
9
10
|
|
10
11
|
var _sfc_main = /* @__PURE__ */ defineComponent({
|
11
12
|
__name: "DateOut",
|
@@ -85,13 +86,23 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
85
86
|
return setTimeDisabled(ts, optionSetting.value);
|
86
87
|
}
|
87
88
|
function init() {
|
88
|
-
var _a, _b;
|
89
|
+
var _a, _b, _c;
|
89
90
|
const {
|
90
91
|
originType
|
91
92
|
} = (_a = props.componentCfg) == null ? void 0 : _a.widgetCfg;
|
92
93
|
const type = `${originType}_${optionSetting.value || WidgetOptionEnums.ALL}`;
|
93
94
|
const shortOptions = (_b = DateExtraOptions[DateExtraMap[type]]) != null ? _b : [];
|
94
95
|
let optionsObj = {};
|
96
|
+
if (optionSetting.value === WidgetOptionEnums.CUSTOM_TIME) {
|
97
|
+
const shortList = parseDateShortcuts((_c = props.componentCfg) == null ? void 0 : _c.widgetCfg);
|
98
|
+
if ((shortList == null ? void 0 : shortList.length) > 0) {
|
99
|
+
shortList.forEach((item) => {
|
100
|
+
optionsObj[item.name] = item == null ? void 0 : item.timestamp[0];
|
101
|
+
});
|
102
|
+
}
|
103
|
+
rangeShortcuts.value = optionsObj;
|
104
|
+
return;
|
105
|
+
}
|
95
106
|
shortOptions.forEach(({
|
96
107
|
label,
|
97
108
|
value
|
@@ -43,7 +43,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
43
43
|
optionSetting: import("vue").ComputedRef<any>;
|
44
44
|
isRange: import("vue").ComputedRef<any>;
|
45
45
|
initData: () => void;
|
46
|
-
handleRadioClick: (
|
46
|
+
handleRadioClick: (date: any) => void;
|
47
47
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("clickQuickBtn" | "changeRadioValue")[], "clickQuickBtn" | "changeRadioValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
48
48
|
componentCfg: {
|
49
49
|
type: PropType<AnyObject>;
|
@@ -3,6 +3,7 @@ import { WidgetDateOptionEnums } from '../../helpers/enums.js';
|
|
3
3
|
import { widgetDateValOptions } from '../../helpers/dateExtraMap.js';
|
4
4
|
import { formatDateRangeInfo, presetValToTimestamp } from '../../helpers/presetValToTimestamp.js';
|
5
5
|
import { WidgetOptionEnums } from '../../../../types/enums.js';
|
6
|
+
import { parseDateShortcuts } from '../../../../tool/date.js';
|
6
7
|
|
7
8
|
const _hoisted_1 = {
|
8
9
|
class: "radio-date-group"
|
@@ -42,18 +43,36 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
42
43
|
return (_a = props.componentCfg) == null ? void 0 : _a.rangeFilter;
|
43
44
|
});
|
44
45
|
function initData() {
|
45
|
-
var _a, _b;
|
46
|
+
var _a, _b, _c;
|
46
47
|
const {
|
47
48
|
originType
|
48
49
|
} = (_a = props.componentCfg) == null ? void 0 : _a.widgetCfg;
|
49
50
|
const optSetting = optionSetting.value || WidgetOptionEnums.ALL;
|
50
51
|
const typeStr = `${originType}_${optSetting}${isRange.value ? "_RANGE" : ""}`;
|
52
|
+
if (optionSetting.value === WidgetOptionEnums.CUSTOM_TIME) {
|
53
|
+
const shortList = parseDateShortcuts((_b = props.componentCfg) == null ? void 0 : _b.widgetCfg);
|
54
|
+
if ((shortList == null ? void 0 : shortList.length) > 0) {
|
55
|
+
dateList.value = shortList.map((item) => {
|
56
|
+
return {
|
57
|
+
...item,
|
58
|
+
con: item.name
|
59
|
+
};
|
60
|
+
});
|
61
|
+
}
|
62
|
+
return;
|
63
|
+
}
|
51
64
|
const useType = WidgetDateOptionEnums[typeStr];
|
52
|
-
dateList.value = (
|
65
|
+
dateList.value = (_c = widgetDateValOptions[useType]) != null ? _c : [];
|
53
66
|
}
|
54
|
-
function handleRadioClick(
|
67
|
+
function handleRadioClick(date) {
|
68
|
+
if (optionSetting.value === WidgetOptionEnums.CUSTOM_TIME) {
|
69
|
+
const realDate = isRange.value ? `${date.parseValue[0]} ~ ${date.parseValue[1]}` : date.parseValue[0];
|
70
|
+
emit("clickQuickBtn", realDate);
|
71
|
+
emit("changeRadioValue", date.name);
|
72
|
+
return;
|
73
|
+
}
|
55
74
|
let resultDate = null;
|
56
|
-
const quickBtnVal = props.radioValue === value ? "" : value;
|
75
|
+
const quickBtnVal = props.radioValue === (date == null ? void 0 : date.value) ? "" : date.value;
|
57
76
|
if (quickBtnVal) {
|
58
77
|
resultDate = isRange.value ? formatDateRangeInfo(quickBtnVal, props.dateFormat, optionSetting.value) : presetValToTimestamp(quickBtnVal, props.dateFormat);
|
59
78
|
}
|
@@ -66,8 +85,8 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
66
85
|
return openBlock(), createElementBlock("span", {
|
67
86
|
key: date.con,
|
68
87
|
class: normalizeClass(["radio-date-item", __props.radioValue === date.con ? "radio-date-item-active" : ""]),
|
69
|
-
onClick: ($event) => handleRadioClick(date
|
70
|
-
}, toDisplayString(date.title), 11, _hoisted_2);
|
88
|
+
onClick: ($event) => handleRadioClick(date)
|
89
|
+
}, toDisplayString(date.title || date.name), 11, _hoisted_2);
|
71
90
|
}), 128))]);
|
72
91
|
};
|
73
92
|
}
|
package/es/components/table-filter/src/components/render-widget/components/DateRangeInner.vue.d.ts
CHANGED
@@ -272,7 +272,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
272
272
|
optionSetting: import("vue").ComputedRef<any>;
|
273
273
|
isRange: import("vue").ComputedRef<any>;
|
274
274
|
initData: () => void;
|
275
|
-
handleRadioClick: (
|
275
|
+
handleRadioClick: (date: any) => void;
|
276
276
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("clickQuickBtn" | "changeRadioValue")[], "clickQuickBtn" | "changeRadioValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
277
277
|
componentCfg: {
|
278
278
|
type: PropType<AnyObject>;
|
package/es/components/table-filter/src/components/render-widget/components/DateRangeOut.vue2.js
CHANGED
@@ -6,6 +6,7 @@ import { WidgetOptionEnums } from '../../../types/enums.js';
|
|
6
6
|
import { DateExtraOptions, DateExtraMap } from '../helpers/dateExtraMap.js';
|
7
7
|
import { formatDateRangeInfo } from '../helpers/presetValToTimestamp.js';
|
8
8
|
import { setDateDisabled, setTimeDisabled } from '../helpers/dateDisabled.js';
|
9
|
+
import { parseDateShortcuts } from '../../../tool/date.js';
|
9
10
|
|
10
11
|
var _sfc_main = /* @__PURE__ */ defineComponent({
|
11
12
|
__name: "DateRangeOut",
|
@@ -98,13 +99,23 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
98
99
|
return setTimeDisabled(ts, optionSetting.value);
|
99
100
|
}
|
100
101
|
function init() {
|
101
|
-
var _a, _b;
|
102
|
+
var _a, _b, _c;
|
102
103
|
const {
|
103
104
|
originType
|
104
105
|
} = (_a = props.componentCfg) == null ? void 0 : _a.widgetCfg;
|
105
106
|
const type = `${originType}_${optionSetting.value || WidgetOptionEnums.ALL}_RANGE`;
|
106
107
|
const shortOptions = (_b = DateExtraOptions[DateExtraMap[type]]) != null ? _b : [];
|
107
108
|
let optionsObj = {};
|
109
|
+
if (optionSetting.value === WidgetOptionEnums.CUSTOM_TIME) {
|
110
|
+
const shortList = parseDateShortcuts((_c = props.componentCfg) == null ? void 0 : _c.widgetCfg);
|
111
|
+
if ((shortList == null ? void 0 : shortList.length) > 0) {
|
112
|
+
shortList.forEach((item) => {
|
113
|
+
optionsObj[item.name] = item == null ? void 0 : item.timestamp;
|
114
|
+
});
|
115
|
+
}
|
116
|
+
rangeShortcuts.value = optionsObj;
|
117
|
+
return;
|
118
|
+
}
|
108
119
|
shortOptions.forEach(({
|
109
120
|
label,
|
110
121
|
value
|
@@ -359,7 +359,7 @@ declare const DateInner: import("vue").DefineComponent<{
|
|
359
359
|
optionSetting: import("vue").ComputedRef<any>;
|
360
360
|
isRange: import("vue").ComputedRef<any>;
|
361
361
|
initData: () => void;
|
362
|
-
handleRadioClick: (
|
362
|
+
handleRadioClick: (date: any) => void;
|
363
363
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("clickQuickBtn" | "changeRadioValue")[], "clickQuickBtn" | "changeRadioValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
364
364
|
componentCfg: {
|
365
365
|
type: import("vue").PropType<import("../../../../../../shared/types").AnyObject>;
|
@@ -921,7 +921,7 @@ declare const DateRangeInner: import("vue").DefineComponent<{
|
|
921
921
|
optionSetting: import("vue").ComputedRef<any>;
|
922
922
|
isRange: import("vue").ComputedRef<any>;
|
923
923
|
initData: () => void;
|
924
|
-
handleRadioClick: (
|
924
|
+
handleRadioClick: (date: any) => void;
|
925
925
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("clickQuickBtn" | "changeRadioValue")[], "clickQuickBtn" | "changeRadioValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
926
926
|
componentCfg: {
|
927
927
|
type: import("vue").PropType<import("../../../../../../shared/types").AnyObject>;
|
@@ -674,7 +674,7 @@ export declare const WidgetCfgMaps: Map<string, {
|
|
674
674
|
optionSetting: import("vue").ComputedRef<any>;
|
675
675
|
isRange: import("vue").ComputedRef<any>;
|
676
676
|
initData: () => void;
|
677
|
-
handleRadioClick: (
|
677
|
+
handleRadioClick: (date: any) => void;
|
678
678
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("clickQuickBtn" | "changeRadioValue")[], "clickQuickBtn" | "changeRadioValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
679
679
|
componentCfg: {
|
680
680
|
type: import("vue").PropType<import("../../../../../shared/types").AnyObject>;
|
@@ -1264,7 +1264,7 @@ export declare const WidgetCfgMaps: Map<string, {
|
|
1264
1264
|
optionSetting: import("vue").ComputedRef<any>;
|
1265
1265
|
isRange: import("vue").ComputedRef<any>;
|
1266
1266
|
initData: () => void;
|
1267
|
-
handleRadioClick: (
|
1267
|
+
handleRadioClick: (date: any) => void;
|
1268
1268
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("clickQuickBtn" | "changeRadioValue")[], "clickQuickBtn" | "changeRadioValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
1269
1269
|
componentCfg: {
|
1270
1270
|
type: import("vue").PropType<import("../../../../../shared/types").AnyObject>;
|
@@ -19,6 +19,7 @@ export default function useAdvanced(): {
|
|
19
19
|
defaultValue: any;
|
20
20
|
defValueUnit: any;
|
21
21
|
optionSetting: string | undefined;
|
22
|
+
dateShortcuts: any[] | undefined;
|
22
23
|
multiple: boolean;
|
23
24
|
manualMapping: boolean | null | undefined;
|
24
25
|
showWholeOption: boolean | undefined;
|
@@ -42,6 +43,7 @@ export default function useAdvanced(): {
|
|
42
43
|
accurateSearch: any;
|
43
44
|
extendKey: string;
|
44
45
|
extendType: string;
|
46
|
+
dateShortcuts: any[];
|
45
47
|
}[];
|
46
48
|
getCacheDef: (item: ISearchType, cacheList: string[]) => string | string[];
|
47
49
|
transformClassifyChild: (conObjList: any, searchFieldList: any[]) => any;
|
@@ -2,6 +2,8 @@ import { WidgetOptionEnums, WidgetTypeEnums, selectModeEnums, WidgetValEnums } f
|
|
2
2
|
import { isString } from 'lodash-es';
|
3
3
|
import { formatDateRangeInfo, presetValToTimestamp } from '../components/render-widget/helpers/presetValToTimestamp.js';
|
4
4
|
import { DatePresetValEnums } from '../components/render-widget/enums.js';
|
5
|
+
import { parseDateShortcuts } from '../tool/date.js';
|
6
|
+
import moment from 'moment';
|
5
7
|
|
6
8
|
const advanceOptionSettingMap = {
|
7
9
|
[WidgetOptionEnums.RADIO]: "0",
|
@@ -14,7 +16,7 @@ const advanceOptionSettingMap = {
|
|
14
16
|
const limitValue = 10;
|
15
17
|
function useAdvanced() {
|
16
18
|
function transformDataToFieldCfg(advancedFilterCfg) {
|
17
|
-
var _a, _b;
|
19
|
+
var _a, _b, _c;
|
18
20
|
return {
|
19
21
|
title: advancedFilterCfg.title,
|
20
22
|
alias: advancedFilterCfg.customTitle,
|
@@ -26,7 +28,8 @@ function useAdvanced() {
|
|
26
28
|
advanceColWidth: advancedFilterCfg.width,
|
27
29
|
accurateSearch: advancedFilterCfg.accurateSearch ? advancedFilterCfg.accurateSearch : {},
|
28
30
|
extendKey: (_a = advancedFilterCfg.extendKey) != null ? _a : "",
|
29
|
-
extendType: (_b = advancedFilterCfg.extendType) != null ? _b : ""
|
31
|
+
extendType: (_b = advancedFilterCfg.extendType) != null ? _b : "",
|
32
|
+
dateShortcuts: (_c = advancedFilterCfg.dateShortcuts) != null ? _c : []
|
30
33
|
};
|
31
34
|
}
|
32
35
|
function transformData(advancedFilterData, extendData) {
|
@@ -45,7 +48,8 @@ function useAdvanced() {
|
|
45
48
|
optionType,
|
46
49
|
filterExplicit,
|
47
50
|
rangeFilter,
|
48
|
-
componentProps
|
51
|
+
componentProps,
|
52
|
+
dateShortcuts
|
49
53
|
} = item;
|
50
54
|
const settingObj = {};
|
51
55
|
const cfg = transformDataToFieldCfg(item);
|
@@ -103,6 +107,7 @@ function useAdvanced() {
|
|
103
107
|
defaultValue: defVal,
|
104
108
|
defValueUnit: defValUnit,
|
105
109
|
optionSetting: optionType,
|
110
|
+
dateShortcuts,
|
106
111
|
multiple: optionType === WidgetOptionEnums.MULTIPLE || widgetType === WidgetTypeEnums.SELECTLABEL,
|
107
112
|
manualMapping: optionInfo == null ? void 0 : optionInfo.manualMapping,
|
108
113
|
showWholeOption: optionInfo == null ? void 0 : optionInfo.showWholeOption,
|
@@ -138,6 +143,7 @@ function useAdvanced() {
|
|
138
143
|
let collectExtendKeys = [];
|
139
144
|
if (conObjList && conObjList.length > 0) {
|
140
145
|
conObjList.forEach((conObj) => {
|
146
|
+
var _a;
|
141
147
|
const curKey = conObj.field_key;
|
142
148
|
let curValue = "";
|
143
149
|
const curQuickSearchObj = searchFieldList.find((quickSearchObj) => quickSearchObj.name === curKey);
|
@@ -153,6 +159,17 @@ function useAdvanced() {
|
|
153
159
|
curValue = curQuickSearchObj.rangeFilter ? formatDateRangeInfo(conObj.unit, "YYYY-MM-DD HH:mm:ss", curQuickSearchObj.optionType) : presetValToTimestamp(conObj.unit, "YYYY-MM-DD HH:mm:ss");
|
154
160
|
}
|
155
161
|
}
|
162
|
+
if (conObj.customDate && conObj.unit === DatePresetValEnums.CUSTOM) {
|
163
|
+
const type = curQuickSearchObj.type === WidgetTypeEnums.DATE ? "YYYY-MM-DD" : "YYYY-MM-DD HH:mm:ss";
|
164
|
+
const shortList = parseDateShortcuts(curQuickSearchObj);
|
165
|
+
if (shortList == null ? void 0 : shortList.length) {
|
166
|
+
const curShort = shortList.find((item) => item.name === conObj.customDate);
|
167
|
+
if ((_a = curShort == null ? void 0 : curShort.parseValue) == null ? void 0 : _a.length) {
|
168
|
+
const dateList = curShort == null ? void 0 : curShort.parseValue.map((item) => moment(item).format(type));
|
169
|
+
curValue = curQuickSearchObj.type === WidgetTypeEnums.DATE ? dateList[0] : `${dateList[0]} ~ ${dateList[1]}`;
|
170
|
+
}
|
171
|
+
}
|
172
|
+
}
|
156
173
|
if (curQuickSearchObj == null ? void 0 : curQuickSearchObj.extendKey) {
|
157
174
|
if (!transObj[curQuickSearchObj.extendKey])
|
158
175
|
transObj[curQuickSearchObj.extendKey] = [];
|
@@ -58,6 +58,7 @@ function useRenderWidget() {
|
|
58
58
|
return isRender;
|
59
59
|
}
|
60
60
|
function getRenderSearchConObj(cfg) {
|
61
|
+
var _a;
|
61
62
|
const isRender = isRenderFunc(cfg);
|
62
63
|
if (!isRender)
|
63
64
|
return null;
|
@@ -77,6 +78,9 @@ function useRenderWidget() {
|
|
77
78
|
value: val.length > 0 ? val : null,
|
78
79
|
unit
|
79
80
|
};
|
81
|
+
if (((_a = cfg == null ? void 0 : cfg.widgetCfg) == null ? void 0 : _a.optionSetting) === WidgetOptionEnums.CUSTOM_TIME) {
|
82
|
+
obj.unit = "";
|
83
|
+
}
|
80
84
|
if (cfg.accurateSearch.switchEnable) {
|
81
85
|
obj.isAccurateSearch = cfg.isAccurateSearchVal;
|
82
86
|
obj.accurateSearchKey = cfg.accurateSearch.searchKey;
|