cnhis-design-vue 3.3.3-release.0 → 3.3.3-release.12
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/es/components/audio-sdk/index.d.ts +18 -16
- package/es/components/audio-sdk/src/Index.vue.d.ts +18 -16
- package/es/components/audio-sdk/src/Index.vue2.js +47 -12
- package/es/components/audio-sdk/src/audioSDK.js +1 -1
- package/es/components/audio-sdk/src/components/recording-modal.vue.d.ts +6 -6
- package/es/components/audio-sdk/src/components/recording.vue.d.ts +6 -6
- package/es/components/audio-sdk/src/components/recording.vue2.js +17 -3
- 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/big-table/src/components/NoData.vue2.js +8 -1
- package/es/components/big-table/src/hooks/useTableParse.js +8 -1
- package/es/components/button-print/index.d.ts +9 -3
- package/es/components/button-print/src/ButtonPrint.vue.d.ts +9 -3
- package/es/components/button-print/src/ButtonPrint.vue2.js +6 -1
- package/es/components/button-print/src/components/NewPrintComponent.vue.d.ts +11 -4
- package/es/components/button-print/src/components/NewPrintComponent.vue2.js +113 -16
- package/es/components/button-print/src/components/OldPrintComponent.vue2.js +9 -3
- package/es/components/button-print/src/utils/print.d.ts +3 -3
- package/es/components/button-print/src/utils/print.js +36 -23
- package/es/components/button-print/style/index.css +1 -1
- package/es/components/callback/src/components/render/popupMaps.d.ts +18 -0
- package/es/components/card-reader-sdk-cn/src/henan/index.js +8 -1
- 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/index.vue.d.ts +56 -6
- package/es/components/date-picker/src/DatePicker.vue2.js +8 -1
- package/es/components/expand-field/index.d.ts +792 -1
- package/es/components/expand-field/src/components/FormItemPerson.vue.d.ts +792 -1
- package/es/components/expand-field/src/components/PersonModal.vue.d.ts +792 -1
- package/es/components/expand-field/src/components/form.vue.d.ts +792 -1
- package/es/components/expand-field/src/components/form.vue2.js +8 -1
- package/es/components/expand-field/src/index.vue.d.ts +792 -1
- package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcess.js +3 -1
- package/es/components/field-editor/index.d.ts +18 -0
- package/es/components/field-editor/src/FieldEditor.vue.d.ts +18 -0
- package/es/components/field-editor/src/FieldEditor.vue2.js +2 -1
- package/es/components/field-editor/src/fields.d.ts +1 -0
- package/es/components/field-editor/src/fields.js +6 -0
- package/es/components/field-set/src/FieldColor.vue.d.ts +10 -5
- package/es/components/field-set/src/FieldFilter.vue.d.ts +10 -5
- package/es/components/field-set/src/FieldSet.vue.d.ts +43 -6
- package/es/components/field-set/src/FieldSet.vue2.js +118 -69
- package/es/components/field-set/src/Index.vue2.js +8 -3
- package/es/components/field-set/src/TableStyle.vue2.js +2 -2
- package/es/components/field-set/src/components/table-row.vue.d.ts +6 -5
- package/es/components/field-set/src/components/table-row.vue2.js +21 -6
- package/es/components/field-set/src/constants/index.d.ts +1 -1
- package/es/components/field-set/src/types/index.d.ts +2 -0
- package/es/components/field-set/style/index.css +1 -1
- package/es/components/form-config/index.d.ts +102 -0
- package/es/components/form-config/src/FormConfig.vue.d.ts +102 -0
- package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +18 -0
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +63 -0
- package/es/components/form-config/src/components/FormConfigEdit.vue2.js +4 -4
- package/es/components/form-config/src/components/FormConfigEventSetting.vue.d.ts +18 -0
- package/es/components/form-config/src/components/FormConfigEventSetting.vue2.js +9 -2
- package/es/components/form-config/src/constants/index.d.ts +31 -1
- package/es/components/form-config/src/constants/index.js +150 -1
- package/es/components/form-config/src/hooks/useConfigurationField.d.ts +2 -2
- package/es/components/form-config/src/hooks/useConfigurationField.js +53 -6
- package/es/components/form-config/src/hooks/useLocale.d.ts +6 -0
- package/es/components/form-config/src/hooks/useLocale.js +34 -0
- package/es/components/form-config/src/types/index.d.ts +12 -0
- package/es/components/form-render/index.d.ts +18 -0
- package/es/components/form-render/src/FormRender.vue.d.ts +18 -0
- package/es/components/form-render/src/FormRender.vue2.js +5 -0
- package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +18 -0
- package/es/components/form-render/src/components/renderer/formItem.d.ts +2 -0
- package/es/components/form-render/src/components/renderer/formItem.js +17 -3
- package/es/components/form-render/src/components/renderer/levelSearchCascader/index.js +4 -2
- package/es/components/form-render/src/components/renderer/lineBar/FormCollapse.vue.d.ts +1 -0
- package/es/components/form-render/src/components/renderer/lineBar/index.d.ts +1 -0
- package/es/components/form-render/src/components/renderer/searchCascade.js +3 -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/useFieldListAdaptor.js +5 -2
- package/es/components/form-render/src/hooks/useFieldNormalize.d.ts +2 -0
- package/es/components/form-render/src/hooks/useFieldNormalize.js +15 -0
- package/es/components/form-render/src/hooks/useFormContext.js +1 -1
- package/es/components/form-render/src/hooks/useFormValidator.js +8 -1
- package/es/components/form-render/src/hooks/useLowCodeReactions.js +2 -1
- package/es/components/form-render/src/types/index.d.ts +1 -0
- 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 +861 -49
- package/es/components/iho-chat/src/Index.vue.d.ts +861 -49
- package/es/components/iho-chat/src/components/ChatAdd.vue.d.ts +24 -1
- package/es/components/iho-chat/src/components/ChatFile.vue.d.ts +181 -8
- package/es/components/iho-chat/src/components/ChatFile.vue2.js +51 -41
- package/es/components/iho-chat/src/components/ChatFooter.vue.d.ts +66 -6
- package/es/components/iho-chat/src/components/ChatFooter.vue2.js +154 -57
- package/es/components/iho-chat/src/components/ChatHeader.vue.d.ts +329 -15
- package/es/components/iho-chat/src/components/ChatHeader.vue2.js +21 -19
- package/es/components/iho-chat/src/components/ChatMain.vue.d.ts +235 -20
- package/es/components/iho-chat/src/components/ChatMain.vue2.js +298 -279
- package/es/components/iho-chat/src/components/ChatRecord.vue.d.ts +51 -5
- package/es/components/iho-chat/src/components/ChatRecord.vue2.js +3 -3
- package/es/components/iho-chat/src/components/ChatSearch.vue.d.ts +24 -1
- package/es/components/iho-chat/src/components/ChatSet.vue.d.ts +48 -2
- package/es/components/iho-chat/src/components/ContextMenu.js +34 -27
- package/es/components/iho-chat/src/components/ImageLightbox.vue.d.ts +104 -0
- package/es/components/iho-chat/src/components/ImageLightbox.vue.js +6 -0
- package/es/components/iho-chat/src/components/ImageLightbox.vue2.js +307 -0
- package/es/components/iho-chat/src/components/MessageEvent.vue.d.ts +24 -1
- package/es/components/iho-chat/src/components/MessageMergeForward.vue.d.ts +53 -6
- package/es/components/iho-chat/src/components/MessageMergeForward.vue2.js +3 -3
- package/es/components/iho-chat/src/components/MultipleVideo.vue.d.ts +64 -2
- package/es/components/iho-chat/src/components/MultipleVideo.vue2.js +112 -53
- package/es/components/iho-chat/src/components/PersonProfile.vue.d.ts +24 -1
- package/es/components/iho-chat/src/components/SelectLabel.vue.d.ts +1 -1
- package/es/components/iho-chat/src/components/SiderList.vue.d.ts +24 -1
- package/es/components/iho-chat/src/components/Video.vue.d.ts +24 -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/useData.d.ts +51 -4
- package/es/components/iho-chat/src/hooks/useData.js +2 -7
- package/es/components/iho-chat/src/hooks/useDraggable.d.ts +25 -0
- package/es/components/iho-chat/src/hooks/useDraggable.js +160 -0
- package/es/components/iho-chat/src/hooks/useVideo.d.ts +24 -1
- package/es/components/iho-chat/src/types/index.d.ts +37 -1
- package/es/components/iho-chat/src/utils/emoji.d.ts +1 -1
- package/es/components/iho-chat/src/utils/emoji.js +1 -1
- package/es/components/iho-chat/src/utils/index.d.ts +3 -3
- package/es/components/iho-chat/src/utils/index.js +27 -39
- package/es/components/iho-chat/style/index.css +1 -1
- package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue2.js +8 -1
- package/es/components/iho-table/src/plugins/headerPlugin/index.js +5 -2
- package/es/components/iho-table/src/plugins/highLightSetPlugin.js +2 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.js +1 -1
- package/es/components/index.css +1 -1
- package/es/components/info-header/index.d.ts +41 -0
- package/es/components/info-header/src/InfoHeader.vue.d.ts +41 -0
- package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.d.ts +1 -0
- package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue2.js +56 -22
- package/es/components/info-header/src/components/infoDescription/DescriptionList.vue.d.ts +1 -0
- package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +19 -0
- package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +18 -0
- package/es/components/info-header/src/components/patientInfo/index.vue2.js +16 -2
- 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/scale-view/index.d.ts +67 -17
- package/es/components/scale-view/src/ScaleView.vue.d.ts +70 -19
- package/es/components/scale-view/src/ScaleView.vue2.js +84 -10
- package/es/components/scale-view/src/components/AnswerParse.vue.d.ts +5 -0
- package/es/components/scale-view/src/components/AnswerParse.vue2.js +74 -8
- package/es/components/scale-view/src/components/EvaluateCountdown.vue.d.ts +10 -7
- package/es/components/scale-view/src/components/EvaluateCountdown.vue2.js +28 -4
- package/es/components/scale-view/src/components/EvaluatePage.vue.d.ts +10 -7
- package/es/components/scale-view/src/components/EvaluatePage.vue2.js +29 -8
- package/es/components/scale-view/src/components/NoData.vue2.js +9 -3
- package/es/components/scale-view/src/components/ScaleScore.d.ts +1 -1
- package/es/components/scale-view/src/components/ScaleScore.js +47 -4
- package/es/components/scale-view/src/components/formitem/r-checkbox.js +20 -2
- package/es/components/scale-view/src/components/formitem/r-radio.js +2 -0
- package/es/components/scale-view/src/components/formitem/r-sign.js +32 -4
- package/es/components/scale-view/src/components/formitem/r-upload.js +65 -7
- package/es/components/scale-view/src/components/formitem/sign-com.js +8 -1
- package/es/components/scale-view/src/hooks/scaleview-computed.js +20 -5
- package/es/components/scale-view/src/hooks/scaleview-init.js +24 -3
- package/es/components/scale-view/src/hooks/scaleview-methods.js +40 -5
- package/es/components/scale-view/src/hooks/scaleview-props.d.ts +8 -0
- package/es/components/scale-view/src/hooks/scaleview-props.js +8 -0
- package/es/components/scale-view/src/hooks/scaleview-submit.d.ts +2 -1
- package/es/components/scale-view/src/hooks/scaleview-submit.js +64 -8
- package/es/components/scale-view/src/hooks/scaleview-validate.d.ts +1 -1
- package/es/components/scale-view/src/hooks/scaleview-validate.js +157 -24
- package/es/components/scale-view/src/hooks/use-evaluate.js +16 -2
- package/es/components/scale-view/src/hooks/use-noData.js +33 -5
- package/es/components/scale-view/src/utils/judge-types.d.ts +2 -1
- package/es/components/scale-view/src/utils/judge-types.js +10 -10
- package/es/components/scale-view/src/utils/watch-form-change.d.ts +13 -0
- package/es/components/scale-view/src/utils/watch-form-change.js +71 -0
- package/es/components/scale-view/style/index.css +1 -1
- package/es/components/select-person/index.d.ts +792 -1
- package/es/components/select-person/src/SelectPerson.vue.d.ts +434 -341
- package/es/components/select-person/src/SelectPerson.vue2.js +521 -675
- package/es/components/select-person/src/SelectPersonRole.vue.d.ts +630 -0
- package/es/components/select-person/src/SelectPersonRole.vue.js +6 -0
- package/es/components/select-person/src/SelectPersonRole.vue2.js +942 -0
- package/es/components/select-person/src/components/GroupItem.vue.d.ts +19 -0
- package/es/components/select-person/src/components/GroupItem.vue.js +6 -0
- package/es/components/select-person/src/components/GroupItem.vue2.js +37 -0
- package/es/components/select-person/src/components/SearchGroupList.vue.d.ts +214 -0
- package/es/components/select-person/src/components/SearchGroupList.vue.js +6 -0
- package/es/components/select-person/src/components/SearchGroupList.vue2.js +145 -0
- package/es/components/select-person/src/components/SearchMultiple.vue2.js +1 -1
- package/es/components/select-person/src/components/SearchOrgAndStaff.vue2.js +21 -12
- package/es/components/select-person/src/components/TagItem.vue.d.ts +43 -0
- package/es/components/select-person/src/components/TagItem.vue.js +6 -0
- package/es/components/select-person/src/components/TagItem.vue2.js +40 -0
- package/es/components/select-person/src/index.vue.d.ts +793 -1
- package/es/components/select-person/src/index.vue2.js +21 -4
- package/es/components/select-person/src/types/index.d.ts +35 -0
- package/es/components/select-person/src/types/index.js +1 -0
- package/es/components/select-person/src/utils/index.d.ts +3 -0
- package/es/components/select-person/src/utils/index.js +29 -8
- package/es/components/select-person/style/index.css +1 -1
- package/es/components/shortcut-setter/index.d.ts +18 -0
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +18 -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/components/vod-chunk-upload/index.d.ts +3 -0
- package/es/components/vod-chunk-upload/src/chunk-upload-new.vue.d.ts +1 -29
- package/es/components/vod-chunk-upload/src/chunk-upload-new.vue2.js +109 -11
- package/es/components/vod-chunk-upload/src/hooks/upload-computed.js +15 -1
- package/es/components/vod-chunk-upload/src/hooks/upload-data.js +72 -9
- package/es/components/vod-chunk-upload/src/vod-chunk-upload/vod-chunk-upload.vue.d.ts +3 -0
- package/es/components/vod-chunk-upload/src/vod-chunk-upload/vod-chunk-upload.vue2.js +75 -9
- package/es/shared/hooks/selectHooks/useSearchContent.js +1 -1
- package/es/shared/hooks/useLevelSearchCascader.js +3 -3
- package/es/shared/package.json.js +1 -1
- package/package.json +4 -3
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 ===
|
75
|
+
const quickBtnVal = props.radioValue === (date == null ? void 0 : date.con) ? "" : date.con;
|
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;
|
@@ -0,0 +1,139 @@
|
|
1
|
+
import moment from 'moment';
|
2
|
+
|
3
|
+
function parseExpressions(expressions, format) {
|
4
|
+
if (!expressions || !Array.isArray(expressions)) {
|
5
|
+
console.warn("parseExpressions: \u8F93\u5165\u4E0D\u662F\u6570\u7EC4\uFF0C\u8FD4\u56DE\u7A7A\u503C");
|
6
|
+
return null;
|
7
|
+
}
|
8
|
+
return expressions.map((expr, index) => {
|
9
|
+
try {
|
10
|
+
if (expr === null || expr === void 0 || expr === "") {
|
11
|
+
console.warn(`parseExpressions: \u7D22\u5F15 ${index} \u7684\u8868\u8FBE\u5F0F\u4E3A\u7A7A\uFF0C\u8DF3\u8FC7`);
|
12
|
+
return null;
|
13
|
+
}
|
14
|
+
const exprStr = String(expr).trim();
|
15
|
+
const dateTimestamp = parseDateString(exprStr);
|
16
|
+
if (dateTimestamp !== null) {
|
17
|
+
return moment(Math.floor(dateTimestamp)).format(format);
|
18
|
+
}
|
19
|
+
const result = safeEval(exprStr);
|
20
|
+
if (!result)
|
21
|
+
return null;
|
22
|
+
if (typeof result === "number" && !isNaN(result)) {
|
23
|
+
return moment(Math.floor(result)).format(format);
|
24
|
+
} else {
|
25
|
+
console.warn(`parseExpressions: \u7D22\u5F15 ${index} \u7684\u8868\u8FBE\u5F0F "${exprStr}" \u6267\u884C\u7ED3\u679C\u4E0D\u662F\u6709\u6548\u6570\u5B57`);
|
26
|
+
return null;
|
27
|
+
}
|
28
|
+
} catch (error) {
|
29
|
+
console.error(`parseExpressions: \u89E3\u6790\u7D22\u5F15 ${index} \u7684\u8868\u8FBE\u5F0F\u65F6\u51FA\u9519:`, error == null ? void 0 : error.message);
|
30
|
+
return null;
|
31
|
+
}
|
32
|
+
}).filter(Boolean);
|
33
|
+
}
|
34
|
+
function isEffectiveTime(timestamp) {
|
35
|
+
return timestamp >= -22089888e5 && timestamp < 41024448e5;
|
36
|
+
}
|
37
|
+
function parseDateString(dateStr) {
|
38
|
+
if (/^\d+$/.test(dateStr)) {
|
39
|
+
const timestamp = parseInt(dateStr, 10);
|
40
|
+
return isEffectiveTime(timestamp) ? timestamp : null;
|
41
|
+
}
|
42
|
+
const datePatterns = [
|
43
|
+
/^(\d{4})-(\d{1,2})-(\d{1,2})\s+(\d{1,2}):(\d{1,2}):(\d{1,2})$/,
|
44
|
+
/^(\d{4})-(\d{1,2})-(\d{1,2})\s+(\d{1,2}):(\d{1,2})$/,
|
45
|
+
/^(\d{4})-(\d{1,2})-(\d{1,2})$/,
|
46
|
+
/^(\d{4})-(\d{1,2})$/,
|
47
|
+
/^(\d{4})$/,
|
48
|
+
/^(\d{1,2}):(\d{1,2}):(\d{1,2})$/,
|
49
|
+
/^(\d{1,2}):(\d{1,2})$/
|
50
|
+
];
|
51
|
+
for (let i = 0; i < datePatterns.length; i++) {
|
52
|
+
const pattern = datePatterns[i];
|
53
|
+
const match = dateStr.match(pattern);
|
54
|
+
if (match) {
|
55
|
+
let year, month, day, hour, minute, second;
|
56
|
+
if (i <= 4) {
|
57
|
+
year = parseInt(match[1], 10);
|
58
|
+
month = match[2] ? parseInt(match[2], 10) : 1;
|
59
|
+
day = match[3] ? parseInt(match[3], 10) : 1;
|
60
|
+
hour = match[4] ? parseInt(match[4], 10) : 0;
|
61
|
+
minute = match[5] ? parseInt(match[5], 10) : 0;
|
62
|
+
second = match[6] ? parseInt(match[6], 10) : 0;
|
63
|
+
} else {
|
64
|
+
const now = new Date();
|
65
|
+
year = now.getFullYear();
|
66
|
+
month = now.getMonth() + 1;
|
67
|
+
day = now.getDate();
|
68
|
+
hour = parseInt(match[1], 10);
|
69
|
+
minute = parseInt(match[2], 10);
|
70
|
+
second = match[3] ? parseInt(match[3], 10) : 0;
|
71
|
+
}
|
72
|
+
if (year < 1900 || year > 2100 || month < 1 || month > 12 || day < 1 || day > 31 || hour < 0 || hour > 23 || minute < 0 || minute > 59 || second < 0 || second > 59) {
|
73
|
+
return null;
|
74
|
+
}
|
75
|
+
try {
|
76
|
+
const date = new Date(year, month - 1, day, hour, minute, second);
|
77
|
+
if (date.getFullYear() === year && date.getMonth() === month - 1 && date.getDate() === day) {
|
78
|
+
return date.getTime();
|
79
|
+
}
|
80
|
+
} catch (error) {
|
81
|
+
return null;
|
82
|
+
}
|
83
|
+
}
|
84
|
+
}
|
85
|
+
return null;
|
86
|
+
}
|
87
|
+
function safeEval(expression) {
|
88
|
+
try {
|
89
|
+
const result = new Function("return " + expression)();
|
90
|
+
if (typeof result === "number" && !isNaN(result) && isFinite(result)) {
|
91
|
+
return isEffectiveTime(result) ? result : null;
|
92
|
+
} else {
|
93
|
+
console.warn(`safeEval: \u8868\u8FBE\u5F0F "${expression}" \u6267\u884C\u7ED3\u679C\u4E0D\u662F\u6709\u6548\u6570\u5B57`);
|
94
|
+
return null;
|
95
|
+
}
|
96
|
+
} catch (error) {
|
97
|
+
console.error(`safeEval: \u8868\u8FBE\u5F0F "${expression}" \u6267\u884C\u5931\u8D25:`, error == null ? void 0 : error.message);
|
98
|
+
return null;
|
99
|
+
}
|
100
|
+
}
|
101
|
+
function getTimestamp(list) {
|
102
|
+
if (!(list == null ? void 0 : list.length))
|
103
|
+
return [];
|
104
|
+
return list.map((v) => v === null ? null : new Date(v).getTime());
|
105
|
+
}
|
106
|
+
const parseDateShortcuts = (row) => {
|
107
|
+
const {
|
108
|
+
dateShortcuts,
|
109
|
+
optionSetting,
|
110
|
+
format = "YYYY-MM-DD HH:mm:ss"
|
111
|
+
} = row;
|
112
|
+
if (!(dateShortcuts == null ? void 0 : dateShortcuts.length))
|
113
|
+
return [];
|
114
|
+
return dateShortcuts == null ? void 0 : dateShortcuts.map((v) => {
|
115
|
+
const {
|
116
|
+
name,
|
117
|
+
expressions
|
118
|
+
} = v;
|
119
|
+
if (!name || !(expressions == null ? void 0 : expressions.length))
|
120
|
+
return null;
|
121
|
+
const resultExp = parseExpressions(expressions, format);
|
122
|
+
if (!(resultExp == null ? void 0 : resultExp.length)) {
|
123
|
+
return null;
|
124
|
+
}
|
125
|
+
if (expressions.length !== resultExp.length) {
|
126
|
+
console.warn("expressions\u4E2D\u5B58\u5728\u65E0\u6548\u503C");
|
127
|
+
return null;
|
128
|
+
}
|
129
|
+
return {
|
130
|
+
name,
|
131
|
+
value: JSON.stringify(expressions),
|
132
|
+
parseValue: resultExp,
|
133
|
+
unit: optionSetting,
|
134
|
+
timestamp: getTimestamp(resultExp)
|
135
|
+
};
|
136
|
+
}).filter(Boolean);
|
137
|
+
};
|
138
|
+
|
139
|
+
export { parseDateShortcuts };
|
@@ -1,9 +1,9 @@
|
|
1
|
-
import { DataTypeEnums, WidgetTypeEnums, WidgetOptionEnums } from '../types/enums.js';
|
1
|
+
import { DataTypeEnums, WidgetTypeEnums, WidgetOptionEnums, WidgetValEnums } from '../types/enums.js';
|
2
2
|
|
3
3
|
const transformDataToFront = (dataType, rawData = []) => {
|
4
4
|
if (dataType === DataTypeEnums.API) {
|
5
5
|
return rawData.map((data) => {
|
6
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o;
|
6
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p;
|
7
7
|
const optionList = (_b = (_a = data.optionInfo) == null ? void 0 : _a.list) != null ? _b : [];
|
8
8
|
let customType = data.type;
|
9
9
|
if (data.type === WidgetTypeEnums.LABEL) {
|
@@ -32,12 +32,13 @@ const transformDataToFront = (dataType, rawData = []) => {
|
|
32
32
|
type: customType,
|
33
33
|
optionSetting: data.optionType,
|
34
34
|
openAdvancedFilter: data.isShowSearch,
|
35
|
+
dateShortcuts: (_g = data.dateShortcuts) != null ? _g : [],
|
35
36
|
filterOutDisplay: data.filterExplicit,
|
36
37
|
filterOutRequired: data.explicitRequired,
|
37
38
|
width: data.width,
|
38
39
|
defValCfg: {
|
39
|
-
value: data.type === WidgetTypeEnums.SELECT && data.optionType === WidgetOptionEnums.MULTIPLE ? (
|
40
|
-
presetVal: data.type === WidgetTypeEnums.SELECT && data.optionType === WidgetOptionEnums.MULTIPLE ? ((
|
40
|
+
value: data.type === WidgetTypeEnums.SELECT && data.optionType === WidgetOptionEnums.MULTIPLE ? (_i = (_h = data.defaultValue) == null ? void 0 : _h.valueList) != null ? _i : [] : (_l = (_k = (_j = data.defaultValue) == null ? void 0 : _j.valueList) == null ? void 0 : _k[0]) != null ? _l : null,
|
41
|
+
presetVal: data.type === WidgetTypeEnums.SELECT && data.optionType === WidgetOptionEnums.MULTIPLE ? ((_m = data.defaultValue) == null ? void 0 : _m.unit) ? [(_n = data.defaultValue) == null ? void 0 : _n.unit] : [] : (_p = (_o = data.defaultValue) == null ? void 0 : _o.unit) != null ? _p : null
|
41
42
|
},
|
42
43
|
mappingConfig: {
|
43
44
|
mappingMethod: null,
|
@@ -124,7 +125,7 @@ const getParamCfg = (p_name, params) => {
|
|
124
125
|
};
|
125
126
|
const transformConditions = (rawConditions, params) => {
|
126
127
|
return rawConditions.map((item) => {
|
127
|
-
var _a, _b, _c;
|
128
|
+
var _a, _b, _c, _d;
|
128
129
|
const cfg = getParamCfg(item.field_key, params);
|
129
130
|
let val = item.value;
|
130
131
|
if (val && !Array.isArray(val)) {
|
@@ -139,7 +140,8 @@ const transformConditions = (rawConditions, params) => {
|
|
139
140
|
condition: item.con,
|
140
141
|
value,
|
141
142
|
presetVal: (_b = item.unit) != null ? _b : null,
|
142
|
-
|
143
|
+
customDate: (_c = item == null ? void 0 : item.customDate) != null ? _c : null,
|
144
|
+
dynamicBaseList: (_d = item == null ? void 0 : item.dynamicBaseList) != null ? _d : []
|
143
145
|
};
|
144
146
|
if (Object.keys(item).includes("isAccurateSearch")) {
|
145
147
|
obj.isAccurateSearch = item.isAccurateSearch;
|
@@ -154,8 +156,9 @@ const transformRawConditions = (conditions) => {
|
|
154
156
|
field_key: item.key,
|
155
157
|
con: item.condition,
|
156
158
|
value: Array.isArray(item.value) ? item.value : item.value ? [item.value] : [],
|
157
|
-
unit: item.presetVal,
|
158
|
-
dynamicBaseList: item.dynamicBaseList || []
|
159
|
+
unit: (item == null ? void 0 : item.customDate) ? WidgetValEnums.CUSTOM : item.presetVal,
|
160
|
+
dynamicBaseList: item.dynamicBaseList || [],
|
161
|
+
customDate: item == null ? void 0 : item.customDate
|
159
162
|
};
|
160
163
|
if (Object.keys(item).includes("isAccurateSearch")) {
|
161
164
|
obj.isAccurateSearch = item.isAccurateSearch;
|
@@ -44,7 +44,8 @@ const WidgetOptionEnums = {
|
|
44
44
|
ALL: "DATETIME_WHOLE",
|
45
45
|
SELECT_TIME: "DATETIME_SELECT",
|
46
46
|
PAST_TIME: "DATETIME_PAST",
|
47
|
-
FUTURE_TIME: "DATETIME_FUTURE"
|
47
|
+
FUTURE_TIME: "DATETIME_FUTURE",
|
48
|
+
CUSTOM_TIME: "DATETIME_CUSTOM"
|
48
49
|
};
|
49
50
|
const WidgetValEnums = {
|
50
51
|
CUSTOM: "CUSTOM",
|
@@ -93,6 +93,7 @@ export type ISearchConfigType = {
|
|
93
93
|
isAccurateSearch?: boolean;
|
94
94
|
accurateSearchKey?: string;
|
95
95
|
dynamicBaseList?: any[];
|
96
|
+
customDate?: string;
|
96
97
|
};
|
97
98
|
export type ITreeDataType = {
|
98
99
|
name: string;
|
@@ -148,6 +149,7 @@ export type IApiServerType = {
|
|
148
149
|
componentProps?: any;
|
149
150
|
extendKey?: string;
|
150
151
|
extendType?: string;
|
152
|
+
dateShortcuts?: any[];
|
151
153
|
};
|
152
154
|
export type dynamicOptionInfoType = {
|
153
155
|
filterKeys: string[];
|
@@ -212,6 +214,7 @@ export type IfilterConditionsType = {
|
|
212
214
|
value: string;
|
213
215
|
isAccurateSearch?: boolean;
|
214
216
|
accurateSearchKey?: string;
|
217
|
+
customDate?: string;
|
215
218
|
};
|
216
219
|
export type ISearchParamsType = {
|
217
220
|
field_key: string;
|
@@ -220,6 +223,7 @@ export type ISearchParamsType = {
|
|
220
223
|
unit: 'custom' | null;
|
221
224
|
widgetType?: string;
|
222
225
|
dynamicBaseList?: any[];
|
226
|
+
dateShortcuts?: any[];
|
223
227
|
isAccurateSearch?: boolean;
|
224
228
|
accurateSearchKey?: string;
|
225
229
|
};
|
@@ -243,3 +247,11 @@ export type IExtendConfigurationType = {
|
|
243
247
|
_filterApiConfig: any;
|
244
248
|
_selectCriticalNum?: number;
|
245
249
|
};
|
250
|
+
export type ICustomDateType = {
|
251
|
+
name: string;
|
252
|
+
label: string;
|
253
|
+
unit: string;
|
254
|
+
value: string;
|
255
|
+
parseValue: any[];
|
256
|
+
timestamp: number[];
|
257
|
+
};
|
@@ -101,6 +101,9 @@ declare const VodChunkUpload: SFCWithInstall<import("vue").DefineComponent<{
|
|
101
101
|
defaultFileList: import("vue").ComputedRef<never[]>;
|
102
102
|
isGuage: import("vue").ComputedRef<boolean>;
|
103
103
|
guageMaxSize: import("vue").ComputedRef<any>;
|
104
|
+
str1: string;
|
105
|
+
str2: string;
|
106
|
+
maxText: import("vue").ComputedRef<string>;
|
104
107
|
handleDefList: () => never[];
|
105
108
|
handleGetSubmitList: (list: any) => "" | undefined;
|
106
109
|
handleGetCoverUrl: (vodUrl: any) => string;
|
@@ -61,35 +61,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
61
61
|
count: number;
|
62
62
|
uploaderDom: any;
|
63
63
|
uploadBtnDom: import("vue").Ref<null>;
|
64
|
-
state:
|
65
|
-
spinning: boolean;
|
66
|
-
uploadConfig: {};
|
67
|
-
progress: number;
|
68
|
-
options: {
|
69
|
-
target: {};
|
70
|
-
chunkSize: number;
|
71
|
-
fileParameterName: string;
|
72
|
-
maxChunkRetries: number;
|
73
|
-
simultaneousUploads: number;
|
74
|
-
prioritizeFirstAndLastChunk: boolean;
|
75
|
-
forceChunkSize: boolean;
|
76
|
-
testChunks: boolean;
|
77
|
-
headers: {};
|
78
|
-
query: () => void;
|
79
|
-
processParams: {};
|
80
|
-
parseTimeRemaining: {};
|
81
|
-
processResponse: {};
|
82
|
-
};
|
83
|
-
attrs: {};
|
84
|
-
collapse: boolean;
|
85
|
-
configList: never[];
|
86
|
-
share: number;
|
87
|
-
baseUrl: string;
|
88
|
-
headers: {
|
89
|
-
Authorization: string;
|
90
|
-
};
|
91
|
-
withCredentials: boolean;
|
92
|
-
};
|
64
|
+
state: any;
|
93
65
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
94
66
|
propsCategoryMap: {
|
95
67
|
type: StringConstructor;
|