cnhis-design-vue 3.1.41-release.6 → 3.1.42-beta.0
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/annotation-edit/src/AnnotationEdit.js +1 -1
- package/es/components/annotation-edit/style/index.css +1 -1
- package/es/components/base-search/index.d.ts +293 -0
- package/es/components/base-search/index.js +1 -0
- package/es/components/{table-filter/src/base-search-com/BaseSearch.vue.d.ts → base-search/src/index.vue.d.ts} +26 -91
- package/es/components/base-search/src/index.vue.js +1 -0
- package/es/components/base-search/style/iconfont.ttf +0 -0
- package/es/components/base-search/style/index.css +1 -0
- package/es/components/big-table/index.d.ts +4 -3
- package/es/components/big-table/src/BigTable.vue.d.ts +4 -3
- package/es/components/big-table/src/BigTable.vue2.js +1 -1
- package/es/components/big-table/style/index.css +1 -1
- package/es/components/button-print/index.d.ts +7 -6
- package/es/components/button-print/src/ButtonPrint.vue.d.ts +7 -6
- package/es/components/button-print/src/ButtonPrint.vue2.js +1 -1
- package/es/components/button-print/src/api.d.ts +3 -0
- package/es/components/button-print/src/api.js +1 -0
- package/es/components/button-print/src/components/EditFormat.vue.d.ts +4 -4
- package/es/components/button-print/src/components/IdentityVerification.vue.d.ts +4 -4
- package/es/components/button-print/src/utils/print.js +1 -1
- package/es/components/classification/index.d.ts +995 -0
- package/es/components/classification/index.js +1 -0
- package/es/components/{table-filter → classification}/src/components/search-filter/index.vue.d.ts +10 -93
- package/es/components/classification/src/components/search-filter/index.vue.js +1 -0
- package/es/components/{table-filter → classification}/src/components/set-classification/index.vue.d.ts +5 -130
- package/es/components/classification/src/components/set-classification/index.vue.js +1 -0
- package/es/components/{table-filter → classification}/src/components/table-modal/index.vue.d.ts +0 -42
- package/es/components/classification/src/components/table-modal/index.vue.js +1 -0
- package/es/components/classification/src/const/index.d.ts +2 -0
- package/es/components/classification/src/const/index.js +1 -0
- package/es/components/{table-filter/src/classification/Classification-com.vue.d.ts → classification/src/index.vue.d.ts} +57 -291
- package/es/components/classification/src/index.vue.js +1 -0
- package/es/components/classification/style/iconfont.ttf +0 -0
- package/es/components/classification/style/index.css +1 -0
- package/es/components/config-provider/index.d.ts +14 -0
- package/es/components/config-provider/index.js +1 -0
- package/es/components/config-provider/src/ConfigProvider.d.ts +14 -0
- package/es/components/config-provider/src/ConfigProvider.js +1 -0
- package/es/components/config-provider/src/interface.d.ts +19 -0
- package/es/components/config-provider/src/interface.js +1 -0
- package/es/components/config-provider/src/utils/index.d.ts +2 -0
- package/es/components/config-provider/src/utils/index.js +1 -0
- package/es/components/date-picker/index.d.ts +20 -0
- package/es/components/date-picker/index.js +1 -0
- package/es/components/date-picker/src/DatePicker.vue.d.ts +20 -0
- package/es/components/date-picker/src/DatePicker.vue.js +1 -0
- package/es/components/fabric-chart/index.d.ts +2 -2
- package/es/components/fabric-chart/src/FabricChart.vue.d.ts +2 -2
- package/es/components/fabric-chart/src/hooks/useBirthProcess.js +1 -1
- package/es/components/fabric-chart/src/hooks/useBirthProcessChart.js +1 -1
- package/es/components/fabric-chart/src/hooks/useLeft.js +1 -1
- package/es/components/field-set/index.d.ts +2 -2
- package/es/components/field-set/src/FieldSet.vue.d.ts +2 -2
- package/es/components/form-config/index.d.ts +46 -37
- package/es/components/form-config/src/FormConfig.vue.d.ts +46 -37
- package/es/components/form-config/src/FormConfig.vue.js +1 -1
- package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +16 -16
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +19 -19
- package/es/components/form-config/src/components/FormConfigMaterialItem.d.ts +9 -1
- package/es/components/form-config/src/components/FormConfigMaterialItem.js +1 -1
- package/es/components/form-config/src/components/renderer/DefaultNode.vue.d.ts +33 -6
- package/es/components/form-config/src/components/renderer/DefaultNode.vue.js +1 -1
- package/es/components/form-config/style/index.css +1 -1
- package/es/components/form-render/index.d.ts +16 -16
- package/es/components/form-render/src/FormRender.vue.d.ts +16 -16
- package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +16 -16
- package/es/components/form-render/src/FormRenderWrapper.vue.js +1 -1
- package/es/components/form-render/src/components/renderer/complex.d.ts +1 -1
- package/es/components/form-render/src/components/renderer/lineBar/FormCollapse.vue.d.ts +1 -1
- package/es/components/form-render/src/components/renderer/lineBar/index.d.ts +1 -1
- package/es/components/form-render/src/components/renderer/radio&checkbox.d.ts +2 -2
- package/es/components/form-render/src/components/renderer/radio_checkbox.js +1 -1
- package/es/components/form-render/src/components/renderer/select.js +1 -1
- package/es/components/form-render/src/hooks/useFieldListAdaptor.d.ts +1 -1
- package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
- package/es/components/form-render/src/hooks/useFormRenderOptions.d.ts +4 -2
- package/es/components/form-render/src/hooks/useFormRenderOptions.js +1 -1
- package/es/components/form-render/style/index.css +1 -1
- package/es/components/iho-table/index.d.ts +3 -0
- package/es/components/iho-table/src/IhoTable.vue.d.ts +3 -0
- package/es/components/iho-table/src/IhoTable.vue.js +1 -1
- package/es/components/iho-table/src/constants/index.d.ts +4 -4
- package/es/components/iho-table/src/constants/index.js +1 -1
- package/es/components/iho-table/src/plugins/defaultConfigPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.d.ts +20 -7
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue.d.ts +18 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/labelRendererPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/pictureRendererPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/seqRendererPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/virtualTreePlugin/index.js +1 -1
- package/es/components/iho-table/src/types/index.d.ts +1 -0
- package/es/components/iho-table/src/utils/index.d.ts +1 -0
- package/es/components/iho-table/src/utils/index.js +1 -1
- package/es/components/iho-table/style/index.css +1 -1
- package/es/components/index.css +1 -1
- package/es/components/index.d.ts +8 -2
- package/es/components/index.js +1 -1
- package/es/components/info-header/index.d.ts +3799 -156
- package/es/components/info-header/src/InfoHeader.vue.d.ts +3800 -156
- package/es/components/info-header/src/InfoHeader.vue.js +1 -1
- package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.d.ts +1842 -0
- package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.js +1 -0
- package/es/components/info-header/src/components/infoDescription/DescriptionList.vue.d.ts +1972 -0
- package/es/components/info-header/src/components/infoDescription/DescriptionList.vue.js +1 -0
- package/es/components/info-header/src/components/infoDescription/HiddenContent.vue.d.ts +2 -2
- package/es/components/info-header/src/components/infoDescription/InfoEllipsis.vue.d.ts +1 -1
- package/es/components/info-header/src/components/infoDescription/InfoEllipsis.vue.js +1 -1
- package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +2669 -139
- package/es/components/info-header/src/components/infoDescription/index.vue.js +1 -1
- package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +745 -0
- package/es/components/info-header/src/components/patientInfo/index.vue.js +1 -1
- package/es/components/info-header/src/constants/index.d.ts +4 -0
- package/es/components/info-header/src/constants/index.js +1 -0
- package/es/components/info-header/src/hooks/useThemeOverrides.d.ts +4 -0
- package/es/components/info-header/src/hooks/useThemeOverrides.js +1 -0
- package/es/components/info-header/src/types/index.d.ts +17 -3
- package/es/components/info-header/style/index.css +1 -1
- package/es/components/keyboard/index.d.ts +4 -2
- package/es/components/keyboard/src/Keyboard.vue.d.ts +4 -2
- package/es/components/keyboard/src/Keyboard.vue.js +1 -1
- package/es/components/keyboard/src/constants/index.d.ts +2 -0
- package/es/components/keyboard/src/constants/index.js +1 -0
- package/es/components/keyboard/style/index.css +1 -1
- package/es/components/quick-search/index.d.ts +713 -0
- package/es/components/quick-search/index.js +1 -0
- package/es/components/{table-filter/src/quick-search/QuickSearch.vue.d.ts → quick-search/src/index.vue.d.ts} +31 -120
- package/es/components/quick-search/src/index.vue.js +1 -0
- package/es/components/quick-search/style/index.css +1 -0
- package/es/components/recommend-search/index.d.ts +2 -2
- package/es/components/recommend-search/src/RecommendSearch.vue.d.ts +2 -2
- package/es/components/recommend-search/src/components/RecommendSelect.vue.d.ts +1 -1
- package/es/components/scale-view/src/components/formitem/sign-com.d.ts +1 -1
- package/es/components/scale-view/src/components/formitem/standard-modal.d.ts +1 -1
- package/es/components/scale-view/src/hooks/use-component.d.ts +69 -116
- package/es/components/search-cascader/index.d.ts +2 -2
- package/es/components/search-cascader/src/SearchCascader.vue.d.ts +2 -2
- package/es/components/search-cascader/src/components/SearchMenu.d.ts +1 -1
- package/es/components/select-label/index.d.ts +70 -169
- package/es/components/select-label/src/LabelFormContent.vue.d.ts +1 -53
- package/es/components/select-label/src/LabelFormContent.vue.js +1 -1
- package/es/components/select-label/src/SelectLabel.vue.d.ts +70 -116
- package/es/components/select-label/src/SelectLabel.vue2.js +1 -1
- package/es/components/select-label/src/components/label-classify.vue.js +1 -1
- package/es/components/select-label/style/iconfont.ttf +0 -0
- package/es/components/select-label/style/index.css +1 -1
- package/es/components/select-person/index.d.ts +1 -1
- package/es/components/select-person/src/SelectPerson.vue.d.ts +1 -1
- package/es/components/shortcut-setter/index.d.ts +17 -17
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +17 -17
- package/es/components/steps-wheel/index.d.ts +1 -0
- package/es/components/steps-wheel/src/StepsWheel.vue.d.ts +1 -0
- package/es/components/steps-wheel/src/StepsWheel.vue.js +1 -1
- package/es/components/steps-wheel/src/constants/index.d.ts +2 -0
- package/es/components/steps-wheel/src/constants/index.js +1 -0
- package/es/components/steps-wheel/style/index.css +1 -1
- package/es/components/table-filter/index.d.ts +0 -2385
- package/es/components/table-filter/index.js +1 -1
- package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.d.ts +1 -0
- package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.js +1 -1
- package/es/components/table-filter/src/components/classify-filter/index.vue.d.ts +1 -42
- package/es/components/table-filter/src/components/classify-filter/index.vue.js +1 -1
- package/es/components/table-filter/src/components/render-widget/components/CheckboxGroup.vue.d.ts +1 -1
- package/es/components/table-filter/src/components/render-widget/enums.d.ts +0 -8
- package/es/components/table-filter/src/components/render-widget/enums.js +1 -1
- package/es/components/table-filter/src/components/render-widget/index.vue.d.ts +2 -1
- package/es/components/table-filter/src/components/render-widget/index.vue.js +1 -1
- package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +1 -1
- package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.js +1 -1
- package/es/components/table-filter/src/hooks/useAdvanced.d.ts +4 -1
- package/es/components/table-filter/src/hooks/useAdvanced.js +1 -1
- package/es/components/table-filter/src/hooks/useMixins.d.ts +1 -54
- package/es/components/table-filter/src/hooks/useMixins.js +1 -1
- package/es/components/table-filter/src/hooks/useRenderWidget.js +1 -1
- package/es/components/table-filter/src/tool/generateDefOptions.js +1 -1
- package/es/components/table-filter/src/tool/transformData.d.ts +1 -37
- package/es/components/table-filter/src/tool/transformData.js +1 -1
- package/es/components/table-filter/src/types/enums.d.ts +1 -0
- package/es/components/table-filter/src/types/enums.js +1 -1
- package/es/components/table-filter/src/types/index.d.ts +13 -169
- package/es/components/time-picker/index.d.ts +18 -0
- package/es/components/time-picker/index.js +1 -0
- package/es/components/time-picker/src/TimePicker.vue.d.ts +18 -0
- package/es/components/time-picker/src/TimePicker.vue.js +1 -0
- package/es/shared/mixins/index.d.ts +1 -0
- package/es/shared/mixins/index.js +1 -0
- package/es/shared/mixins/useTheme.d.ts +3 -0
- package/es/shared/mixins/useTheme.js +1 -0
- package/es/shared/utils/index.d.ts +1 -0
- package/es/shared/utils/index.js +1 -1
- package/package.json +64 -64
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/timeUtils.d.ts +0 -2
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/timeUtils.js +0 -1
- package/es/components/table-filter/src/base-search-com/BaseSearch.vue.js +0 -1
- package/es/components/table-filter/src/classification/Classification-com.vue.js +0 -1
- package/es/components/table-filter/src/components/search-filter/index.vue.js +0 -1
- package/es/components/table-filter/src/components/set-classification/index.vue.js +0 -1
- package/es/components/table-filter/src/components/table-modal/index.vue.js +0 -1
- package/es/components/table-filter/src/const/index.d.ts +0 -5
- package/es/components/table-filter/src/const/index.js +0 -1
- package/es/components/table-filter/src/hooks/useTableSearchCon.d.ts +0 -8
- package/es/components/table-filter/src/hooks/useTableSearchCon.js +0 -1
- package/es/components/table-filter/src/hooks/useWordBookutils.d.ts +0 -12
- package/es/components/table-filter/src/hooks/useWordBookutils.js +0 -1
- package/es/components/table-filter/src/quick-search/QuickSearch.vue.js +0 -1
- package/es/components/table-filter/src/tool/time-domain.d.ts +0 -39
- package/es/components/table-filter/src/tool/time-domain.js +0 -1
- package/es/components/table-filter/src/tool/utils.d.ts +0 -4
- package/es/components/table-filter/src/tool/utils.js +0 -1
- package/es/components/table-filter/style/index.css +0 -1
- /package/es/components/{table-filter → base-search}/src/directive/resize.d.ts +0 -0
- /package/es/components/{table-filter → base-search}/src/directive/resize.js +0 -0
- /package/es/components/{table-filter → base-search}/src/tool/resizeSensor.d.ts +0 -0
- /package/es/components/{table-filter → base-search}/src/tool/resizeSensor.js +0 -0
- /package/es/components/{table-filter → classification}/src/directive/flexibleResize.d.ts +0 -0
- /package/es/components/{table-filter → classification}/src/directive/flexibleResize.js +0 -0
- /package/es/components/table-filter/src/tool/{options.d.ts → baseOptions.d.ts} +0 -0
- /package/es/components/table-filter/src/tool/{options.js → baseOptions.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import"./src/hooks/useAdvanced.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,computed as l,openBlock as a,createElementBlock as t,unref as u,createBlock as
|
|
1
|
+
import{defineComponent as e,computed as l,openBlock as a,createElementBlock as t,unref as u,createBlock as o,isRef as r,createCommentVNode as p,Fragment as n,createVNode as v}from"vue";import{NInputNumber as i,NInput as m,NSelect as s,NDatePicker as f}from"naive-ui";import{WidgetTypeEnums as d,WidgetValEnums as y,WidgetOptionEnums as g}from"../../types/enums.js";import{generateDefOptionsInApi as T}from"../../tool/generateDefOptions.js";import c from"../../../../../_virtual/plugin-vue_export-helper.js";const C={class:"value-cfg_wrapper"};var U=c(e({__name:"ValueCfg",props:{paramCfg:{type:Object,default:null},modelValue:{type:[String,Number,Array],default:null},presetVal:{type:String,default:null}},emits:["update:modelValue","update:presetVal"],setup(e,{emit:c}){const U=e,E=l({set(e){c("update:modelValue",e)},get:()=>U.modelValue}),V=l({set(e){c("update:presetVal",e)},get:()=>U.presetVal}),_=l((()=>{var e;return null==(e=U.paramCfg)?void 0:e.type})),b=l((()=>{var e;return null==(e=U.paramCfg)?void 0:e.optionSetting})),M=l((()=>{var e;return null==(e=U.paramCfg)?void 0:e.mappingConfig})),x=l((()=>{const e=T(_.value,M.value).slice(0);return _.value!==d.DATE&&_.value!==d.DATE_TIME||e.unshift({label:"自定义输入",value:y.CUSTOM}),e}));return(e,l)=>(a(),t("div",C,[u(_)===u(d).INPUT_NUMBER?(a(),o(u(i),{key:0,class:"form-item",value:u(E),"onUpdate:value":l[0]||(l[0]=e=>r(E)?E.value=e:null)},null,8,["value"])):p("v-if",!0),u(_)===u(d).INPUT?(a(),o(u(m),{key:1,value:u(E),"onUpdate:value":l[1]||(l[1]=e=>r(E)?E.value=e:null),maxlength:"255",clearable:""},null,8,["value"])):p("v-if",!0),u(_)===u(d).SELECT?(a(),o(u(s),{key:2,style:{width:"120px"},class:"form-item",value:u(E),"onUpdate:value":l[2]||(l[2]=e=>r(E)?E.value=e:null),to:"body",filterable:"",options:u(x),multiple:u(b)===u(g).MULTIPLE,maxTagCount:1},null,8,["value","options","multiple"])):p("v-if",!0),u(_)===u(d).DATE||u(_)===u(d).DATE_TIME?(a(),t(n,{key:3},[v(u(s),{style:{width:"120px"},class:"form-item",to:"body",value:u(V),"onUpdate:value":l[3]||(l[3]=e=>r(V)?V.value=e:null),options:u(x)},null,8,["value","options"]),u(V)===u(y).CUSTOM?(a(),o(u(f),{key:0,class:"form-item",type:u(_).toLowerCase(),format:"yyyy-MM-dd HH:mm:ss","formatted-value":u(E),"onUpdate:formatted-value":l[4]||(l[4]=e=>r(E)?E.value=e:null),to:"body"},null,8,["type","formatted-value"])):p("v-if",!0)],64)):p("v-if",!0)]))}}),[["__file","ValueCfg.vue"]]);export{U as default};
|
|
@@ -118,48 +118,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
118
118
|
AddOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
119
119
|
AddCircleSharp: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
120
120
|
CloseOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
121
|
-
SvgIcon: import("vue").DefineComponent<{
|
|
122
|
-
iconClass: {
|
|
123
|
-
type: StringConstructor;
|
|
124
|
-
required: true;
|
|
125
|
-
default: string;
|
|
126
|
-
};
|
|
127
|
-
title: {
|
|
128
|
-
type: StringConstructor;
|
|
129
|
-
required: false;
|
|
130
|
-
default: string;
|
|
131
|
-
};
|
|
132
|
-
className: {
|
|
133
|
-
type: StringConstructor;
|
|
134
|
-
required: false;
|
|
135
|
-
};
|
|
136
|
-
}, {
|
|
137
|
-
props: {
|
|
138
|
-
iconClass: string;
|
|
139
|
-
title: string;
|
|
140
|
-
className?: string | undefined;
|
|
141
|
-
};
|
|
142
|
-
iconName: import("vue").ComputedRef<string>;
|
|
143
|
-
svgClass: import("vue").ComputedRef<string>;
|
|
144
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
145
|
-
iconClass: {
|
|
146
|
-
type: StringConstructor;
|
|
147
|
-
required: true;
|
|
148
|
-
default: string;
|
|
149
|
-
};
|
|
150
|
-
title: {
|
|
151
|
-
type: StringConstructor;
|
|
152
|
-
required: false;
|
|
153
|
-
default: string;
|
|
154
|
-
};
|
|
155
|
-
className: {
|
|
156
|
-
type: StringConstructor;
|
|
157
|
-
required: false;
|
|
158
|
-
};
|
|
159
|
-
}>>, {
|
|
160
|
-
title: string;
|
|
161
|
-
iconClass: string;
|
|
162
|
-
}>;
|
|
163
121
|
ValueCfg: import("vue").DefineComponent<{
|
|
164
122
|
paramCfg: {
|
|
165
123
|
type: ObjectConstructor;
|
|
@@ -211,6 +169,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
211
169
|
SELECT: string;
|
|
212
170
|
DATE: string;
|
|
213
171
|
DATE_TIME: string;
|
|
172
|
+
CHECKBOX_GROUP: string;
|
|
214
173
|
};
|
|
215
174
|
WidgetValEnums: {
|
|
216
175
|
CUSTOM: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,useAttrs as a,reactive as
|
|
1
|
+
import{defineComponent as e,useAttrs as a,reactive as t,ref as l,toRef as i,openBlock as o,createElementBlock as n,createVNode as s,unref as d,withCtx as r,createElementVNode as p,createCommentVNode as c,Fragment as u,renderList as y,normalizeClass as m,toDisplayString as v,createBlock as f,withDirectives as g,createTextVNode as C,vShow as h}from"vue";import{useMessage as k,NSpin as b,NInput as A,NIcon as L,NButton as _,NSelect as w,NTooltip as U}from"naive-ui";import{CloseOutline as N,AddOutline as x,AddCircleSharp as V}from"@vicons/ionicons5";import D from"./ValueCfg.vue.js";import{DataTypeEnums as B,ConditionEnums as I}from"../../types/enums.js";import{useDisplayCategory as j}from"./hooks/useDisplayCategory.js";import{useFilterConditions as S}from"./hooks/useFilterConditions.js";import{conditionOptions as F}from"./helpers/options.js";import z from"../../../../../_virtual/plugin-vue_export-helper.js";const O={class:"searchConditionByApi_wrapper"},P={class:"class-filter-content"},q={key:0,class:"item-name"},E=p("span",{class:"label"},"筛选分类名称:",-1),R={key:1,class:"quickSearch-content"},J=p("span",{class:"label"},"父类名称:",-1),K=["onDblclick","onClick"],M={key:0,class:"s-content"},Q={key:2,class:"item-name"},G=p("span",{class:"label"}," 过滤条件: ",-1),H=p("span",null,"添加",-1),T={class:"select-item-list"},W={class:"index-span"},X=["onClick"];var Y=z(e({__name:"index",props:{actionList_prop:{type:Object,default:()=>({})},conditionList:{type:Array,default:()=>[]},tableId:{type:String,default:""},searchFieldList:{type:Array,default:()=>[]},showItemName:{type:Boolean,default:!0},hideAddBtn:{type:Boolean,default:!1}},emits:["saveAdd","cancelSaveAdd"],setup(e,{expose:z,emit:Y}){const Z=e,$=k(),ee=a(),ae=t({className:"",displayCategory:"",filterConditions:[]}),te=l(!1),{State:le,isEnableAddDisplayCategory:ie,editDisplayCategory:oe,handleDisplayCategorySelect:ne,handleDisplayCategoryRemove:se,handleDisplayCategoryAdd:de,handlerBlur:re,initDisplayCategories:pe}=j(i(ae,"displayCategory"),{conditionList:Z.conditionList},$),{State:ce,paramOptions:ue,addFilterCondition:ye,delFilterCondition:me,updateKey:ve,updateCondition:fe,getParamCfg:ge,initFilterConditions:Ce,getRawFilterConditions:he}=S(i(ae,"filterConditions"),Z.searchFieldList,B.API);function ke(){ae.className="",ae.displayCategory="",ae.filterConditions=[]}async function be(){var e;try{if(ke(),te.value=!0,pe(ee.displayCategoryList,Z.actionList_prop.displayCategory||"custom"),Z.actionList_prop){ae.className=Z.actionList_prop.name,await Ce(Z.tableId,null!=(e=Z.actionList_prop.conObj)?e:[]);ae.filterConditions.length<1&&ue.value&&ue.value.length>0&&ye()}}finally{te.value=!1}}return be(),z({handleInitConditions:be,saveAdd:function(){new Promise((e=>{ae.className||!Z.showItemName?0!==ae.filterConditions.length?ae.filterConditions.some((({key:e,condition:a,value:t,presetVal:l})=>!e||!a||a===I.EQUAL&&!t&&!l))?$.warning("请补充完整条件内容"):e(!0):$.warning("请至少添加一个条件"):$.warning("请输入分类名称")})).then((()=>{let e;var a;"edit"===Z.actionList_prop.from&&(a=Z.actionList_prop.displayCategory,e=null==Z?void 0:Z.conditionList.find((e=>e.displayCategory===a)));const t={displayCategory:ae.displayCategory,name:ae.className||"",conObj:he()},l={id:e?e.sid:"",tableId:Z.tableId,setting:JSON.stringify(t)};Y("saveAdd",l,!1)}))},cancelSaveAdd:function(){ke(),Y("cancelSaveAdd")},addAction:ye,checkActionList:function(){return ae.filterConditions.every((e=>!e.field_key))}}),(a,t)=>(o(),n("div",O,[s(d(b),{show:te.value},{default:r((()=>[p("div",P,[e.showItemName?(o(),n("div",q,[E,s(d(A),{value:ae.className,"onUpdate:value":t[0]||(t[0]=e=>ae.className=e),placeholder:"请输入分类名称",style:{width:"250px"},maxlength:"10"},null,8,["value"])])):c("v-if",!0),e.showItemName?(o(),n("div",R,[J,(o(!0),n(u,null,y(d(le).displayCategories,((e,a)=>(o(),n("div",{class:m(["edit-tag",{"edit-tag-select":e.value===ae.displayCategory&&e.disabled}]),key:a,onDblclick:a=>d(oe)(a,e),onClick:a=>function(e){ne(e)}(e)},[e.disabled?(o(),n("div",M,[p("span",null,v(e.value),1)])):(o(),f(d(A),{key:1,style:{width:"100px"},disabled:e.disabled,onBlur:()=>e.disabled=!0,value:e.value,"onUpdate:value":a=>e.value=a,maxlength:10},null,8,["disabled","onBlur","value","onUpdate:value"])),s(d(L),{component:d(N),class:"anticon-close",size:"20",onClick:t=>d(se)(a,e)},null,8,["component","onClick"])],42,K)))),128)),d(ie)?(o(),n(u,{key:0},[g(s(d(_),{class:"ant-btn",icon:"plus",dashed:"",onClick:d(de)},{default:r((()=>[s(d(L),{component:d(x),size:"20"},null,8,["component"]),C(" "+v("添加父类"))])),_:1},8,["onClick"]),[[h,!d(le).showAdd]]),g(s(d(A),{class:"edit-tag",value:d(le).addDisplayCategory,"onUpdate:value":t[1]||(t[1]=e=>d(le).addDisplayCategory=e),valueModifiers:{trim:!0},style:{width:"100px"},onBlur:d(re),maxLength:10},null,8,["value","onBlur"]),[[h,d(le).showAdd]])],64)):c("v-if",!0)])):c("v-if",!0),e.hideAddBtn?c("v-if",!0):(o(),n("div",Q,[G,p("span",{class:"addAction",onClick:t[2]||(t[2]=(...e)=>d(ye)&&d(ye)(...e)),style:{cursor:"pointer"}},[s(d(L),{component:d(V),class:"blue",size:"18"},null,8,["component"]),H])])),p("ul",T,[(o(!0),n(u,null,y(ae.filterConditions,((e,a)=>(o(),n("li",{key:a},[p("span",W,v(a+1)+" ",1),c(" 选择 field_key "),s(d(w),{class:"form-item",placeholder:"请选择",value:e.key,to:"body",filterable:"",options:d(ue),"onUpdate:value":e=>d(ve)(a,e)},null,8,["value","options","onUpdate:value"]),c(" 选择 关系 "),e.key?(o(),f(d(w),{key:0,class:"form-item",placeholder:"请选择",value:e.condition,to:"body",filterable:"",options:d(F),"onUpdate:value":e=>d(fe)(a,e)},null,8,["value","options","onUpdate:value"])):c("v-if",!0),c(" 自定义 "),e.key&&e.condition&&e.condition!==d(I).NULL?(o(),f(D,{key:1,modelValue:e.value,"onUpdate:modelValue":a=>e.value=a,presetVal:e.presetVal,"onUpdate:presetVal":a=>e.presetVal=a,"param-cfg":d(ge)(e.key)},null,8,["modelValue","onUpdate:modelValue","presetVal","onUpdate:presetVal","param-cfg"])):c("v-if",!0),s(d(U),{title:"删除",trigger:"hover"},{trigger:r((()=>[p("i",{onClick:e=>d(me)(a),class:"iconfont-table-filter delete-item-icon icon-table-filter-menzhenyishengzhananniuqingchu"},null,8,X)])),default:r((()=>[C(" 删除 ")])),_:2},1024)])))),128))])])])),_:1},8,["show"])]))}}),[["__file","index.vue"]]);export{Y as default};
|
package/es/components/table-filter/src/components/render-widget/components/CheckboxGroup.vue.d.ts
CHANGED
|
@@ -98,7 +98,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
98
98
|
}>> & {
|
|
99
99
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
100
100
|
}, {
|
|
101
|
-
value: string | number | unknown[];
|
|
102
101
|
multiple: boolean;
|
|
102
|
+
value: string | number | unknown[];
|
|
103
103
|
}>;
|
|
104
104
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const T={
|
|
1
|
+
const T={CUSTOM:"CUSTOM",NOW:"NOW",TODAY:"TODAY",TODAY_START:"TODAY_START",TODAY_END:"TODAY_END",TOMORROW:"TOMORROW",TOMORROW_START:"TOMORROW_START",TOMORROW_END:"TOMORROW_END",YESTERDAY:"YESTERDAY",YESTERDAY_START:"YESTERDAY_START",YESTERDAY_END:"YESTERDAY_END",WEEK_START:"THIS_WEEK_START",WEEK_END:"THIS_WEEK_END",MONTH_START:"THIS_MONTH_START",MONTH_END:"THIS_MONTH_END"};export{T as DatePresetValEnums};
|
|
@@ -18,7 +18,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
18
18
|
[key: string]: any;
|
|
19
19
|
}> | null;
|
|
20
20
|
handleUpdate(val: any, widgetType: any, defValueUnit: any): void;
|
|
21
|
-
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
21
|
+
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "outFilterChange")[], "update:modelValue" | "outFilterChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
22
22
|
cfg: {
|
|
23
23
|
type: ObjectConstructor;
|
|
24
24
|
required: true;
|
|
@@ -28,5 +28,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
28
28
|
};
|
|
29
29
|
}>> & {
|
|
30
30
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
31
|
+
onOutFilterChange?: ((...args: any[]) => any) | undefined;
|
|
31
32
|
}, {}>;
|
|
32
33
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,h as t}from"vue";import{WidgetTypeEnums as i}from"
|
|
1
|
+
import{defineComponent as e,h as t}from"vue";import{WidgetTypeEnums as i}from"../../types/enums.js";import{WidgetCfgMaps as r,formatItemData as a}from"./widgetCfgMaps.js";import l from"moment";import s from"../../../../../_virtual/plugin-vue_export-helper.js";const n=[i.DATE,i.DATE_TIME,i.CHECKBOX_GROUP];var o=s(e({props:{cfg:{type:Object,required:!0},modelValue:{type:[Array,String,Number]}},emits:["update:modelValue","outFilterChange"],computed:{valueCp(){const{widgetType:e}=this.cfg;return[i.DATE,i.DATE_TIME].includes(e)?this.cfg.value?l(this.cfg.value).valueOf():null:this.cfg.value}},data:()=>({initialProps:{}}),methods:{search(){this.$emit("outFilterChange")},getEleWidth(e){const{widgetType:t}=e;if(!n.includes(t))return`${e.advanceColWidth||200}px`},initComponentProps(e){const{widgetType:t,alias:i,title:a,placeholder:l,widgetCfg:s}=e,{props:n,handlerProps:o}=r.get(t);let p={...n};o&&(p=o(p,{...s,title:i||a})),l&&(p.placeholder=l),this.initialProps=p,p.value&&(this.valueCp=p.value)},generateWidget(e){const{widgetType:i}=e,{defValueUnit:a}=e.widgetCfg||{};if(!r.has(i))return null;const{value:l}=e,{component:s,style:n,eventsBySearch:o=[]}=r.get(i),p={...this.initialProps,value:l},u=o.reduce(((e,t)=>{const{name:i,handler:r}=t;let a=this.search;return r&&(a=e=>{r(e,this.search,p)}),{...e,[`on${i}`]:a}}),{});return t(s,{...n,...p,style:{width:this.getEleWidth(e)},value:this.valueCp,"onUpdate:value":e=>this.handleUpdate(e,i,a),...u})},handleUpdate(e,t,i){const r=a(e,t);this.$emit("update:modelValue",r)}},created(){this.initComponentProps(this.cfg)},render(){return this.generateWidget(this.cfg)}}),[["__file","index.vue"]]);export{o as default};
|
|
@@ -178,8 +178,8 @@ export declare const WidgetCfgMaps: Map<string, {
|
|
|
178
178
|
}>> & {
|
|
179
179
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
180
180
|
}, {
|
|
181
|
-
value: string | number | unknown[];
|
|
182
181
|
multiple: boolean;
|
|
182
|
+
value: string | number | unknown[];
|
|
183
183
|
}>;
|
|
184
184
|
props: {
|
|
185
185
|
clearable?: undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{WidgetTypeEnums as e
|
|
1
|
+
import{WidgetTypeEnums as e}from"../../types/enums.js";import{DatePresetValEnums as l}from"./enums.js";import{NInputNumber as t,NInput as a,NDatePicker as o}from"naive-ui";import r from"./components/CheckboxGroup.vue.js";import p from"./components/Select.vue.js";import s from"moment";import{presetValToTimestamp as n}from"./helpers/presetValToTimestamp.js";const m=e=>null==e?null:e,u=new Map([[e.INPUT_NUMBER,{component:t,props:{clearable:!0},eventsBySearch:[{name:"keydown",handler(e,l){"Enter"===e.key&&(console.log("点击keyup>>>>>",l),l())}}],handlerProps:(e,{title:l}={})=>({...e,placeholder:`输入${l}`}),setDefaultValue:m}],[e.INPUT,{component:a,props:{clearable:!0},eventsBySearch:[{name:"keydown",handler(e,l){"Enter"===e.key&&l()}}],handlerProps:(e,{title:l}={})=>({...e,placeholder:`搜索${l}`}),setDefaultValue:m}],[e.SELECT,{component:p,props:{clearable:!0,options:[],filterable:!0,multiple:!1},eventsBySearch:[{name:"change",handler(e,l,t){const{multiple:a}=t;a&&l()}}],handlerProps(e,{valueList:l,multiple:t,title:a}={}){const o={...e,placeholder:`请选择${a}`};return Array.isArray(l)&&(o.options=l.map((({value:e,label:l})=>({value:e,label:l})))),t&&(o.multiple=!0),o},setDefaultValue:m}],[e.DATE,{component:o,props:{type:"date",clearable:!0,valueFormat:"yyyy-MM-dd"},handlerProps:(e,{title:l}={})=>({...e,placeholder:`请选择${l}`}),setDefaultValue:(e,t)=>t&&t!==l.CUSTOM?n(t,"YYYY-MM-DD HH:mm:ss"):e}],[e.DATE_TIME,{component:o,props:{type:"datetime",clearable:!0,valueFormat:"yyyy-MM-dd HH:mm:ss"},handlerProps:(e,{title:l}={})=>({...e,placeholder:`请选择${l}`}),setDefaultValue:(e,t)=>t&&t!==l.CUSTOM?n(t,"YYYY-MM-DD HH:mm:ss"):e}],[e.CHECKBOX_GROUP,{component:r,props:{},style:{"line-height":"32px"},handlerProps(e,{valueList:l,multiple:t}={}){const a={...e,multiple:t};return Array.isArray(l)&&(a.options=l.map((({value:e,label:l})=>({value:e,label:l})))),a},setDefaultValue:m}]]),i=(l,t)=>!l||t!==e.DATE&&t!==e.DATE_TIME?l:s(l).format("YYYY-MM-DD HH:mm:ss");export{u as WidgetCfgMaps,i as formatItemData};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IApiServerType } from '../../../../../es/components/table-filter/src/types';
|
|
1
|
+
import { IApiServerType, ISearchType } from '../../../../../es/components/table-filter/src/types';
|
|
2
2
|
export default function useAdvanced(): {
|
|
3
3
|
transformData: (advancedFilterData: IApiServerType[]) => {
|
|
4
4
|
fieldType: string;
|
|
@@ -25,4 +25,7 @@ export default function useAdvanced(): {
|
|
|
25
25
|
placeholder: string | undefined;
|
|
26
26
|
advanceColWidth: string;
|
|
27
27
|
}[];
|
|
28
|
+
getCacheDef: (item: ISearchType, cacheList: string[]) => string | string[];
|
|
29
|
+
transformClassifyChild: (conObjList: any) => {};
|
|
30
|
+
transformParams: (paramsList: any) => {};
|
|
28
31
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{WidgetOptionEnums as
|
|
1
|
+
import{WidgetOptionEnums as e,WidgetTypeEnums as t}from"../types/enums.js";import{presetValToTimestamp as i}from"../components/render-widget/helpers/presetValToTimestamp.js";import{DatePresetValEnums as l}from"../components/render-widget/enums.js";const n={[e.RADIO]:"0",[e.MULTIPLE]:"1",[e.ALL]:"0",[e.SELECT_TIME]:"1",[e.PAST_TIME]:"2",[e.FUTURE_TIME]:"3"};function o(){return{transformData:function(i){return i.map((i=>{var l,o;const{optionInfo:a={list:[]},type:r,defaultValue:u,optionType:s,filterExplicit:d}=i,p={},c={title:(f=i).title,alias:f.customTitle,isShowSearch:f.isShowSearch?1:0,filterExplicit:f.filterExplicit?1:0,explicitRequired:f.explicitRequired?1:0,advanceOptionSetting:f.optionType?n[f.optionType]:"",placeholder:f.remark,advanceColWidth:String(f.width)};var f;let m,v,T=r;d?(m=r===t.SELECT&&s===e.MULTIPLE?null==u?void 0:u.valueList:null==(l=null==u?void 0:u.valueList)?void 0:l[0],v=null==u?void 0:u.unit):r===t.SELECT&&(null==a?void 0:a.list)&&(null==a?void 0:a.list.length)<10&&(T="CHECKBOX_GROUP");const g={isRender:!0,widgetType:T,valueList:null==(o=null==a?void 0:a.list)?void 0:o.map((({name:e,value:t})=>({value:t,label:e}))),defaultValue:m,defValueUnit:v,multiple:s===e.MULTIPLE};return{...c,fieldType:i.dataType,columnName:i.name,settingObj:p,setting:JSON.stringify(p),widgetCfg:g}}))},getCacheDef:function(e,i){const{widgetType:l,widgetCfg:n}=e;return l===t.SELECT&&n.multiple?i:i[0]},transformClassifyChild:function(e){const t={};return e&&e.length>0&&e.forEach((e=>{const n=e.field_key,o=e.value&&e.value.length>1?e.value:e.value.toString();if(t[n]=o,e.unit&&e.unit!==l.CUSTOM){const l=i(e.unit,"YYYY-MM-DD HH:mm:ss");t[n]=l}})),t},transformParams:function(e){const t={};return e&&e.length>0&&e.forEach((e=>{const i=e.field_key,l=e.value&&e.value.length>1?e.value:e.value.toString();t[i]=l})),t}}}export{o as default};
|
|
@@ -1,61 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ISearchType, IbtnType } from '../../../../../es/components/table-filter/src/types';
|
|
1
|
+
import { ISearchType } from '../../../../../es/components/table-filter/src/types';
|
|
3
2
|
export default function (): {
|
|
4
3
|
filterApiConfig: import("vue").Ref<{}>;
|
|
5
4
|
handleGetConfigApi: (params: any, key: string, config: {} | undefined, filterApiConfigVal: any) => Promise<any>;
|
|
6
|
-
$utils: {
|
|
7
|
-
/**
|
|
8
|
-
* 获取按钮自定义颜色
|
|
9
|
-
* @param {string} v
|
|
10
|
-
*/
|
|
11
|
-
getBtnStyle(v: IbtnType): {
|
|
12
|
-
'border-color': string;
|
|
13
|
-
color: string;
|
|
14
|
-
'background-color'?: undefined;
|
|
15
|
-
} | {
|
|
16
|
-
color: string;
|
|
17
|
-
'border-color'?: undefined;
|
|
18
|
-
'background-color'?: undefined;
|
|
19
|
-
} | {
|
|
20
|
-
'background-color': string;
|
|
21
|
-
'border-color': string;
|
|
22
|
-
color?: undefined;
|
|
23
|
-
};
|
|
24
|
-
/**
|
|
25
|
-
* @param: 获取按钮的操作对象
|
|
26
|
-
* @param {Object} row 行对象
|
|
27
|
-
* @param {Object} btn 按钮
|
|
28
|
-
*/
|
|
29
|
-
getRowOperatorIdSetting(row: any, btn: AnyObject): any;
|
|
30
|
-
getAlphafloat(a: any, alpha?: any): number;
|
|
31
|
-
hexToRGBA(hex: string, alpha?: any): "" | {
|
|
32
|
-
r: any;
|
|
33
|
-
g: any;
|
|
34
|
-
b: any;
|
|
35
|
-
a: number;
|
|
36
|
-
};
|
|
37
|
-
handleLabelColor(item: any, isSelect: boolean): {
|
|
38
|
-
color: string;
|
|
39
|
-
background: string;
|
|
40
|
-
borderColor: string;
|
|
41
|
-
};
|
|
42
|
-
/**
|
|
43
|
-
*
|
|
44
|
-
* 时间转换
|
|
45
|
-
* @param {type} type 时间戳类型
|
|
46
|
-
* @param {time} time 时间戳
|
|
47
|
-
*/
|
|
48
|
-
formatTime(type: string, time: any): string;
|
|
49
|
-
isJSON(str: any): boolean;
|
|
50
|
-
isArray(val: any): boolean;
|
|
51
|
-
isEmpty(val: any): boolean;
|
|
52
|
-
isString(val: any): boolean;
|
|
53
|
-
isPlainObject(val: any): boolean;
|
|
54
|
-
};
|
|
55
5
|
outQuickSearchFn: {
|
|
56
|
-
handleRequestedLabel(v: any): Promise<import("axios").AxiosResponse<any, any>>;
|
|
57
6
|
handlerInitSearchItem(arr: ISearchType[]): void;
|
|
58
|
-
handleSetLabelOptions(labelType: any, el: ISearchType): void;
|
|
59
|
-
getConObj(arr: any): any;
|
|
60
7
|
};
|
|
61
8
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ref as e}from"vue";import r from"
|
|
1
|
+
import{ref as e}from"vue";import r from"./useRenderWidget.js";const{initRenderWidgetCfg:t,getRenderSearchConObj:n}=r();function o(){const r=e({});return{filterApiConfig:r,handleGetConfigApi:async function(e,t,n={},o){try{o&&(r.value=o);const i=r.value[t]||null;if("function"==typeof i){const r=await i(e,n);return Promise.resolve(r)}return Promise.reject(new Error(`${t} Is not a function`))}catch(e){return Promise.reject(e)}},outQuickSearchFn:{handlerInitSearchItem(e){Array.isArray(e)&&e.forEach((e=>{t(e)}))}}}}export{o as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{WidgetCfgMaps as e}from"../components/render-widget/widgetCfgMaps.js";import{
|
|
1
|
+
import{WidgetCfgMaps as e}from"../components/render-widget/widgetCfgMaps.js";import{DatePresetValEnums as n}from"../components/render-widget/enums.js";import{WidgetTypeEnums as t}from"../types/enums.js";const r=[t.CHECKBOX_GROUP];function i(){function i(e){var n;return null==(n=e.widgetCfg)?void 0:n.isRender}function u(n){const{widgetType:t,defaultValue:r,defValueUnit:i}=n.widgetCfg||{},u=e.get(t);let l;if(u){const{setDefaultValue:e}=u;e&&(l=e(r,i))}return l}return{isRender:i,getDefValByRenderWidget:u,initRenderWidgetCfg:function(e){const n=i(e);if(!n)return n;const{widgetType:t}=e.widgetCfg||{};return e._frontId="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(e=>{const n=16*Math.random()|0;return("x"===e?n:3&n|8).toString(16)})),e.isRender=n,e.widgetType=t,e.con="EQ",r.includes(t)&&(e._isBlock=!0),e.value=u(e),n},getRenderSearchConObj:function(e){if(!i(e))return null;const{columnName:r,con:u,value:l,widgetType:o}=e;let d=null;[t.DATE,t.DATE_TIME].includes(o)&&(d=n.CUSTOM);const s=Array.isArray(l)?l:l?[l]:[];return{field_key:r,con:u,value:s.length>0?s:null,unit:d}},getDefValByRenderConObj:function(e,n){if(!i(n))return null;const{widgetType:r,multiple:u}=n.widgetCfg||{},{value:l}=e;return r!==t.SELECT&&r!==t.CHECKBOX_GROUP||!u?Array.isArray(l)?l[0]:l:Array.isArray(l)?l:l?[l]:[]},isExistDefValByRenderWidget:function(e){const{defaultValue:n,defValueUnit:t}=e.widgetCfg||{};return!(!n&&!t)},resetRenderWidgetValue:function(e){const n=i(e);return n?(e.value=null,n):n}}}export{i as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{WidgetTypeEnums as T,MappingMethodEnums as n,WidgetValEnums as E,DataTypeEnums as
|
|
1
|
+
import{WidgetTypeEnums as T,MappingMethodEnums as n,WidgetValEnums as E,DataTypeEnums as r,WidgetOptionEnums as t}from"../types/enums.js";import{widgetValOptions as i}from"./baseOptions.js";import{isNil as l}from"./transformData.js";const e=(e,p={mappingMethod:null,mapping:[]},o=null)=>{var u,_;if(l(e))return[];if(e===T.SELECT){const{mapping:T,mappingMethod:r}=p;if(T&&r)return r===n.DICT?[{label:"默认选中第一项",value:E.FIRST_VAL}]:T}let A=null!=(_=null==(u=i[r.SQL])?void 0:u[e])?_:[];if(o===t.FUTURE_TIME){const T=[E.TODAY,E.TOMORROW,E.THIS_WEEK,E.NEXT_WEEK,E.THIS_MONTH,E.NEXT_MONTH,E.THIS_QUARTER,E.NEXT_QUARTER,E.THIS_YEAR,E.NEXT_YEAR];A=A.filter((({value:n})=>T.includes(n)))}if(o===t.PAST_TIME){const T=[E.TODAY,E.YESTERDAY,E.THIS_WEEK,E.LAST_WEEK,E.THIS_MONTH,E.LAST_MONTH,E.THIS_QUARTER,E.LAST_QUARTER,E.THIS_YEAR,E.LAST_YEAR];A=A.filter((({value:n})=>T.includes(n)))}return A},p=(n,E={mappingMethod:null,mapping:[]})=>{var t,e;if(l(n))return[];if(n===T.SELECT){const{mapping:T}=E;return T}return null!=(e=null==(t=i[r.API])?void 0:t[n])?e:[]};export{p as generateDefOptionsInApi,e as generateDefOptionsInSql};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { IFilterConditionType } from '../../../../../es/components/table-filter/src/types';
|
|
2
|
+
export declare const isNil: (val: any) => boolean;
|
|
2
3
|
/**
|
|
3
4
|
* 高级筛选数据转换
|
|
4
5
|
*/
|
|
@@ -24,26 +25,6 @@ export declare const transformDataToFront: (dataType: string, rawData?: any[]) =
|
|
|
24
25
|
};
|
|
25
26
|
remark: any;
|
|
26
27
|
_rawData: any;
|
|
27
|
-
}[] | {
|
|
28
|
-
dataType: string;
|
|
29
|
-
fieldType: any;
|
|
30
|
-
title: any;
|
|
31
|
-
customTitle: any;
|
|
32
|
-
optionSetting: any;
|
|
33
|
-
openAdvancedFilter: any;
|
|
34
|
-
filterOutDisplay: any;
|
|
35
|
-
filterOutRequired: any;
|
|
36
|
-
width: any;
|
|
37
|
-
defValCfg: {
|
|
38
|
-
value: any;
|
|
39
|
-
presetVal: any;
|
|
40
|
-
};
|
|
41
|
-
mappingConfig: {
|
|
42
|
-
mappingMethod: null;
|
|
43
|
-
mapping: any;
|
|
44
|
-
};
|
|
45
|
-
remark: any;
|
|
46
|
-
_rawData: any;
|
|
47
28
|
}[];
|
|
48
29
|
export declare const transformDataToEnd: (data: IFilterConditionType[]) => ({
|
|
49
30
|
name: string | undefined;
|
|
@@ -65,23 +46,6 @@ export declare const transformDataToEnd: (data: IFilterConditionType[]) => ({
|
|
|
65
46
|
list: any;
|
|
66
47
|
};
|
|
67
48
|
remark: string | undefined;
|
|
68
|
-
} | {
|
|
69
|
-
name: string | undefined;
|
|
70
|
-
title: string;
|
|
71
|
-
customTitle: string;
|
|
72
|
-
type: string | undefined;
|
|
73
|
-
dataType: string | undefined;
|
|
74
|
-
isShowSearch: boolean;
|
|
75
|
-
filterExplicit: boolean;
|
|
76
|
-
explicitRequired: boolean;
|
|
77
|
-
width: string | undefined;
|
|
78
|
-
optionType: string | undefined;
|
|
79
|
-
defaultValue: {
|
|
80
|
-
valueList: any[];
|
|
81
|
-
unit: any;
|
|
82
|
-
};
|
|
83
|
-
optionInfo: any;
|
|
84
|
-
remark: string | undefined;
|
|
85
49
|
} | null)[];
|
|
86
50
|
export declare const transformConditions: (rawConditions: any, params: any[]) => any;
|
|
87
51
|
export declare const transformRawConditions: (conditions: any[]) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{DataTypeEnums as l,WidgetTypeEnums as e,WidgetOptionEnums as t
|
|
1
|
+
import{DataTypeEnums as l,WidgetTypeEnums as e,WidgetOptionEnums as t}from"../types/enums.js";const i=l=>null==l||null==l,a=(i,a=[])=>i===l.API?a.map((l=>{var a,n,u,p,o,r,d,v,y,m,s;const f=null!=(n=null==(a=l.optionInfo)?void 0:a.list)?n:[];return{dataType:i,p_name:l.name,p_type:l.dataType,title:l.title,customTitle:l.customTitle,type:l.type,optionSetting:l.optionType,openAdvancedFilter:l.isShowSearch,filterOutDisplay:l.filterExplicit,filterOutRequired:l.explicitRequired,width:l.width,defValCfg:{value:l.type===e.SELECT&&l.optionType===t.MULTIPLE?null!=(p=null==(u=l.defaultValue)?void 0:u.valueList)?p:[]:null!=(d=null==(r=null==(o=l.defaultValue)?void 0:o.valueList)?void 0:r[0])?d:null,presetVal:l.type===e.SELECT&&l.optionType===t.MULTIPLE?(null==(v=l.defaultValue)?void 0:v.unit)?[null==(y=l.defaultValue)?void 0:y.unit]:[]:null!=(s=null==(m=l.defaultValue)?void 0:m.unit)?s:null},mappingConfig:{mappingMethod:null,mapping:f.map((({name:l,value:e})=>({label:l,value:e})))},remark:l.remark,_rawData:l}})):[],n=e=>e.map((e=>{var t;const{title:i,customTitle:a,openAdvancedFilter:n,filterOutDisplay:u,filterOutRequired:p,width:o,optionSetting:r,defValCfg:d,mappingConfig:v,remark:y,_rawData:m}=e,{value:s,presetVal:f}=d,{mapping:c}=v;if(e.dataType===l.API){const{p_name:l,p_type:d,type:v}=e;return{...m,name:l,title:i,customTitle:a,type:v,dataType:d,isShowSearch:n,filterExplicit:u,explicitRequired:p,width:o,optionType:r,defaultValue:{valueList:Array.isArray(s)?s:s?[s]:[],unit:Array.isArray(f)?f[0]:f},optionInfo:{manualMapping:null==(t=null==m?void 0:m.optionInfo)?void 0:t.manualMapping,list:c.map((({label:l,value:e})=>({name:l,value:e})))},remark:y}}return null})).filter((l=>!!l)),u=(l,i)=>l.map((l=>{var a,n;const u=((l,e)=>e.find((e=>e.p_name===l)))(l.field_key,i);let p=l.value;p&&!Array.isArray(p)&&(p=[p]);const o=(null==u?void 0:u.type)===e.SELECT&&(null==u?void 0:u.optionSetting)===t.MULTIPLE?null!=p?p:[]:null!=(a=null==p?void 0:p[0])?a:null;return{key:l.field_key,condition:l.con,value:o,presetVal:null!=(n=l.unit)?n:null}})),p=l=>l.map((l=>({field_key:l.key,con:l.condition,value:Array.isArray(l.value)?l.value:l.value?[l.value]:[],unit:l.presetVal})));export{i as isNil,u as transformConditions,n as transformDataToEnd,a as transformDataToFront,p as transformRawConditions};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const T={TEXT:"TEXT",NUMBER:"NUMBER",DATE:"DATE",DATE_TIME:"DATETIME",TIME:"TIME",BOOLEAN:"BOOLEAN"},E={SQL:"SQL",API:"API"},A={MANUAL:"manual",DICT:"dict"},_={INPUT_NUMBER:"NUMBER",INPUT:"TEXT",SELECT:"SELECT",DATE:"DATE",DATE_TIME:"DATETIME"},R={RADIO:"SELECT_SINGLE",MULTIPLE:"SELECT_MULTIPLE",ALL:"DATETIME_WHOLE",SELECT_TIME:"DATETIME_SELECT",PAST_TIME:"DATETIME_PAST",FUTURE_TIME:"DATETIME_FUTURE"},S={CUSTOM:"CUSTOM",FIRST_VAL:"FIRST",NOW:"NOW",TODAY:"TODAY",TODAY_START:"TODAY_START",TODAY_END:"TODAY_END",TOMORROW:"TOMORROW",TOMORROW_START:"TOMORROW_START",TOMORROW_END:"TOMORROW_END",YESTERDAY:"YESTERDAY",YESTERDAY_START:"YESTERDAY_START",YESTERDAY_END:"YESTERDAY_END",THIS_WEEK:"THIS_WEEK",WEEK_START:"THIS_WEEK_START",WEEK_END:"THIS_WEEK_END",NEXT_WEEK:"NEXT_WEEK",LAST_WEEK:"LAST_WEEK",THIS_MONTH:"THIS_MONTH",MONTH_START:"THIS_MONTH_START",MONTH_END:"THIS_MONTH_END",NEXT_MONTH:"NEXT_MONTH",LAST_MONTH:"LAST_MONTH",THIS_QUARTER:"THIS_QUARTER",NEXT_QUARTER:"NEXT_QUARTER",LAST_QUARTER:"LAST_QUARTER",THIS_YEAR:"THIS_YEAR",NEXT_YEAR:"NEXT_YEAR",LAST_YEAR:"LAST_YEAR"},O={NULL:"NULL",EQUAL:"EQ"};export{O as ConditionEnums,E as DataTypeEnums,T as FieldTypeEnums,A as MappingMethodEnums,R as WidgetOptionEnums,_ as WidgetTypeEnums,S as WidgetValEnums};
|
|
1
|
+
const T={TEXT:"TEXT",NUMBER:"NUMBER",DATE:"DATE",DATE_TIME:"DATETIME",TIME:"TIME",BOOLEAN:"BOOLEAN"},E={SQL:"SQL",API:"API"},A={MANUAL:"manual",DICT:"dict"},_={INPUT_NUMBER:"NUMBER",INPUT:"TEXT",SELECT:"SELECT",DATE:"DATE",DATE_TIME:"DATETIME",CHECKBOX_GROUP:"CHECKBOX_GROUP"},R={RADIO:"SELECT_SINGLE",MULTIPLE:"SELECT_MULTIPLE",ALL:"DATETIME_WHOLE",SELECT_TIME:"DATETIME_SELECT",PAST_TIME:"DATETIME_PAST",FUTURE_TIME:"DATETIME_FUTURE"},S={CUSTOM:"CUSTOM",FIRST_VAL:"FIRST",NOW:"NOW",TODAY:"TODAY",TODAY_START:"TODAY_START",TODAY_END:"TODAY_END",TOMORROW:"TOMORROW",TOMORROW_START:"TOMORROW_START",TOMORROW_END:"TOMORROW_END",YESTERDAY:"YESTERDAY",YESTERDAY_START:"YESTERDAY_START",YESTERDAY_END:"YESTERDAY_END",THIS_WEEK:"THIS_WEEK",WEEK_START:"THIS_WEEK_START",WEEK_END:"THIS_WEEK_END",NEXT_WEEK:"NEXT_WEEK",LAST_WEEK:"LAST_WEEK",THIS_MONTH:"THIS_MONTH",MONTH_START:"THIS_MONTH_START",MONTH_END:"THIS_MONTH_END",NEXT_MONTH:"NEXT_MONTH",LAST_MONTH:"LAST_MONTH",THIS_QUARTER:"THIS_QUARTER",NEXT_QUARTER:"NEXT_QUARTER",LAST_QUARTER:"LAST_QUARTER",THIS_YEAR:"THIS_YEAR",NEXT_YEAR:"NEXT_YEAR",LAST_YEAR:"LAST_YEAR"},O={NULL:"NULL",EQUAL:"EQ"};export{O as ConditionEnums,E as DataTypeEnums,T as FieldTypeEnums,A as MappingMethodEnums,R as WidgetOptionEnums,_ as WidgetTypeEnums,S as WidgetValEnums};
|