cnhis-design-vue 3.1.46-beta.0 → 3.1.46-beta.10
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/base-search/index.d.ts +17 -8
- package/es/components/base-search/src/index.vue.d.ts +17 -8
- package/es/components/base-search/src/index.vue2.js +1 -1
- package/es/components/base-search/style/index.css +1 -1
- package/es/components/button-print/src/utils/print.js +1 -1
- package/es/components/classification/index.d.ts +219 -18
- package/es/components/classification/src/components/search-filter/index.vue.d.ts +219 -18
- package/es/components/classification/src/components/search-filter/index.vue2.js +1 -1
- package/es/components/classification/src/components/set-classification/index.vue.d.ts +219 -18
- package/es/components/classification/src/index.vue.d.ts +219 -18
- package/es/components/fabric-chart/src/FabricChart.vue2.js +1 -1
- package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcess.js +1 -1
- package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcessChart.js +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useSurgicalAnesthesiaChart.js +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useTop.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useCenter.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useTemperatureChart.js +1 -1
- package/es/components/fabric-chart/src/hooks/useCumputedPoint.js +1 -1
- package/es/components/fabric-chart/src/utils/index.d.ts +1 -0
- package/es/components/fabric-chart/src/utils/index.js +1 -1
- package/es/components/form-render/src/components/renderer/radio_checkbox.js +1 -1
- package/es/components/iho-table/src/hooks/tapHooks/useSetupHooks.d.ts +1 -1
- package/es/components/iho-table/src/hooks/tapHooks/useSetupHooks.js +1 -1
- package/es/components/index.css +1 -1
- package/es/components/index.d.ts +2 -1
- package/es/components/index.js +1 -1
- package/es/components/quick-search/index.d.ts +21 -7
- package/es/components/quick-search/src/index.vue.d.ts +21 -7
- package/es/components/quick-search/src/index.vue2.js +1 -1
- package/es/components/quick-search/style/index.css +1 -1
- package/es/components/table-export-field/index.d.ts +967 -0
- package/es/components/table-export-field/index.js +1 -0
- package/es/components/table-export-field/src/components/ExportModal.vue.d.ts +192 -0
- package/es/components/table-export-field/src/components/ExportModal.vue.js +1 -0
- package/es/components/table-export-field/src/components/ExportModal.vue2.js +1 -0
- package/es/components/table-export-field/src/components/SaveProjectModal.vue.d.ts +687 -0
- package/es/components/table-export-field/src/components/SaveProjectModal.vue.js +1 -0
- package/es/components/table-export-field/src/components/SaveProjectModal.vue2.js +1 -0
- package/es/components/table-export-field/src/constants/index.d.ts +3 -0
- package/es/components/table-export-field/src/constants/index.js +1 -0
- package/es/components/table-export-field/src/hooks/useAsyncData.d.ts +6 -0
- package/es/components/table-export-field/src/hooks/useAsyncData.js +1 -0
- package/es/components/table-export-field/src/index.vue.d.ts +968 -0
- package/es/components/table-export-field/src/index.vue.js +1 -0
- package/es/components/table-export-field/src/index.vue2.js +1 -0
- package/es/components/table-export-field/src/types/index.d.ts +6 -0
- package/es/components/table-export-field/src/types/index.js +1 -0
- package/es/components/table-export-field/style/index.css +1 -0
- package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.d.ts +219 -17
- package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue2.js +1 -1
- package/es/components/table-filter/src/components/classify-filter/components/Date.vue.d.ts +17 -1
- package/es/components/table-filter/src/components/classify-filter/components/Date.vue2.js +1 -1
- package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue.d.ts +19 -0
- package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue2.js +1 -1
- package/es/components/table-filter/src/components/classify-filter/components/SelectDynamic.vue.d.ts +178 -11
- package/es/components/table-filter/src/components/classify-filter/components/SelectDynamic.vue2.js +1 -1
- package/es/components/table-filter/src/components/classify-filter/components/SelectFilter.vue.d.ts +1 -5
- package/es/components/table-filter/src/components/classify-filter/components/SelectFilter.vue2.js +1 -1
- package/es/components/table-filter/src/components/classify-filter/components/SelectLabel.vue.d.ts +2 -1
- package/es/components/table-filter/src/components/classify-filter/components/SelectLabel.vue2.js +1 -1
- package/es/components/table-filter/src/components/classify-filter/components/index.d.ts +217 -17
- package/es/components/table-filter/src/components/classify-filter/hooks/useFilterConditions.js +1 -1
- package/es/components/table-filter/src/components/classify-filter/index.vue.d.ts +219 -17
- package/es/components/table-filter/src/components/classify-filter/index.vue2.js +1 -1
- package/es/components/table-filter/src/components/render-widget/components/DateInner.vue.d.ts +231 -0
- package/es/components/table-filter/src/components/render-widget/components/DateInner.vue.js +1 -0
- package/es/components/table-filter/src/components/render-widget/components/DateInner.vue2.js +1 -0
- package/es/components/table-filter/src/components/render-widget/components/{Date.vue.d.ts → DateOut.vue.d.ts} +21 -2
- package/es/components/table-filter/src/components/render-widget/components/DateOut.vue.js +1 -0
- package/es/components/table-filter/src/components/render-widget/components/DateOut.vue2.js +1 -0
- package/es/components/table-filter/src/components/render-widget/components/DateQuickBtn/index.vue.d.ts +71 -0
- package/es/components/table-filter/src/components/render-widget/components/DateQuickBtn/index.vue.js +1 -0
- package/es/components/table-filter/src/components/render-widget/components/DateQuickBtn/index.vue2.js +1 -0
- package/es/components/table-filter/src/components/render-widget/components/DateRangeInner.vue.d.ts +117 -8
- package/es/components/table-filter/src/components/render-widget/components/DateRangeInner.vue2.js +1 -1
- package/es/components/table-filter/src/components/render-widget/components/DateRangeOut.vue.d.ts +13 -9
- package/es/components/table-filter/src/components/render-widget/components/DateRangeOut.vue2.js +1 -1
- package/es/components/table-filter/src/components/render-widget/components/LabelInner.vue.d.ts +8 -6
- package/es/components/table-filter/src/components/render-widget/components/LabelInner.vue2.js +1 -1
- package/es/components/table-filter/src/components/render-widget/components/LabelOut.vue.d.ts +7 -6
- package/es/components/table-filter/src/components/render-widget/components/LabelOut.vue2.js +1 -1
- package/es/components/table-filter/src/components/render-widget/components/Select.vue.d.ts +19 -25
- package/es/components/table-filter/src/components/render-widget/components/Select.vue2.js +1 -1
- package/es/components/table-filter/src/components/render-widget/components/SelectDynamic.vue.d.ts +223 -0
- package/es/components/table-filter/src/components/render-widget/components/SelectDynamic.vue.js +1 -0
- package/es/components/table-filter/src/components/render-widget/components/SelectDynamic.vue2.js +1 -0
- package/es/components/table-filter/src/components/render-widget/components/SelectDynamicOption/index.vue.d.ts +158 -0
- package/es/components/table-filter/src/components/render-widget/components/SelectDynamicOption/index.vue.js +1 -0
- package/es/components/table-filter/src/components/render-widget/components/SelectDynamicOption/index.vue2.js +1 -0
- package/es/components/table-filter/src/components/render-widget/components/index.d.ts +611 -36
- package/es/components/table-filter/src/components/render-widget/components/index.js +1 -1
- package/es/components/table-filter/src/components/render-widget/enums.d.ts +10 -3
- package/es/components/table-filter/src/components/render-widget/enums.js +1 -1
- package/es/components/table-filter/src/components/render-widget/helpers/dateDisabled.d.ts +27 -0
- package/es/components/table-filter/src/components/render-widget/helpers/dateDisabled.js +1 -0
- package/es/components/table-filter/src/components/render-widget/helpers/dateExtraMap.d.ts +55 -0
- package/es/components/table-filter/src/components/render-widget/helpers/dateExtraMap.js +1 -0
- package/es/components/table-filter/src/components/render-widget/helpers/enums.d.ts +56 -0
- package/es/components/table-filter/src/components/render-widget/helpers/enums.js +1 -0
- package/es/components/table-filter/src/components/render-widget/helpers/presetValToTimestamp.d.ts +2 -6
- package/es/components/table-filter/src/components/render-widget/helpers/presetValToTimestamp.js +1 -1
- package/es/components/table-filter/src/components/render-widget/helpers/selectExtraMap.d.ts +4 -0
- package/es/components/table-filter/src/components/render-widget/helpers/selectExtraMap.js +1 -0
- package/es/components/table-filter/src/components/render-widget/helpers/setDefaultValue.d.ts +4 -0
- package/es/components/table-filter/src/components/render-widget/helpers/setDefaultValue.js +1 -0
- package/es/components/table-filter/src/components/render-widget/index.vue.d.ts +4 -3
- 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 +639 -35
- package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.js +1 -1
- package/es/components/table-filter/src/constants/index.d.ts +3 -1
- package/es/components/table-filter/src/constants/index.js +1 -1
- package/es/components/table-filter/src/hooks/useAdvanced.d.ts +9 -4
- package/es/components/table-filter/src/hooks/useAdvanced.js +1 -1
- package/es/components/table-filter/src/hooks/useAsyncData.d.ts +4 -0
- package/es/components/table-filter/src/hooks/useAsyncData.js +1 -0
- package/es/components/table-filter/src/hooks/useRenderWidget.d.ts +3 -3
- package/es/components/table-filter/src/hooks/useRenderWidget.js +1 -1
- package/es/components/table-filter/src/tool/baseOptions.d.ts +0 -8
- package/es/components/table-filter/src/tool/baseOptions.js +1 -1
- package/es/components/table-filter/src/tool/transformData.d.ts +0 -1
- package/es/components/table-filter/src/tool/transformData.js +1 -1
- package/es/components/table-filter/src/types/enums.d.ts +3 -0
- package/es/components/table-filter/src/types/enums.js +1 -1
- package/es/components/table-filter/src/types/index.d.ts +7 -0
- package/es/shared/package.json.js +1 -1
- package/es/shared/utils/fabricjs/index.js +1 -1
- package/package.json +2 -2
- package/es/components/table-filter/src/components/render-widget/basicData.d.ts +0 -4
- package/es/components/table-filter/src/components/render-widget/basicData.js +0 -1
- package/es/components/table-filter/src/components/render-widget/components/Date.vue.js +0 -1
- package/es/components/table-filter/src/components/render-widget/components/Date.vue2.js +0 -1
- package/es/components/table-filter/src/tool/generateDefOptions.d.ts +0 -7
- package/es/components/table-filter/src/tool/generateDefOptions.js +0 -1
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { PropType } from 'vue';
|
|
2
|
+
import { AnyObject } from '../../../../../../../es/shared/types';
|
|
2
3
|
declare type ITypeDate = 'date' | 'datetime';
|
|
3
4
|
declare const _default: import("vue").DefineComponent<{
|
|
5
|
+
componentCfg: {
|
|
6
|
+
type: PropType<AnyObject>;
|
|
7
|
+
};
|
|
4
8
|
type: {
|
|
5
9
|
type: PropType<ITypeDate>;
|
|
6
10
|
default: string;
|
|
@@ -23,6 +27,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
23
27
|
};
|
|
24
28
|
}, {
|
|
25
29
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
30
|
+
componentCfg: {
|
|
31
|
+
type: PropType<AnyObject>;
|
|
32
|
+
};
|
|
26
33
|
type: {
|
|
27
34
|
type: PropType<ITypeDate>;
|
|
28
35
|
default: string;
|
|
@@ -48,9 +55,18 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
48
55
|
}>>;
|
|
49
56
|
emit: (event: "update:value", ...args: any[]) => void;
|
|
50
57
|
valueCp: import("vue").Ref<any>;
|
|
58
|
+
rangeShortcuts: import("vue").Ref<any>;
|
|
51
59
|
dateFormat: import("vue").ComputedRef<string>;
|
|
60
|
+
optionSetting: import("vue").ComputedRef<any>;
|
|
52
61
|
handleChange: (val: any) => void;
|
|
53
|
-
|
|
62
|
+
isDateDisabled: (ts: number) => boolean;
|
|
63
|
+
timeDisabled: (ts: number) => {
|
|
64
|
+
isHourDisabled(hour: number): boolean | undefined;
|
|
65
|
+
isMinuteDisabled(minute: number, hour: number | null): boolean | undefined;
|
|
66
|
+
isSecondDisabled(second: number, minute: number | null, hour: number | null): boolean | undefined;
|
|
67
|
+
};
|
|
68
|
+
init: () => void;
|
|
69
|
+
CDatePicker: import("../../../../../../../es/shared/types").SFCWithInstall<import("vue").DefineComponent<{
|
|
54
70
|
updateUnchangedValue: {
|
|
55
71
|
type: BooleanConstructor;
|
|
56
72
|
};
|
|
@@ -69,7 +85,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
69
85
|
type: FunctionConstructor;
|
|
70
86
|
};
|
|
71
87
|
}>> & {}>>;
|
|
72
|
-
datePickerRef: import("vue").Ref<
|
|
88
|
+
datePickerRef: import("vue").Ref<AnyObject | null>;
|
|
73
89
|
panelInstRef: import("vue").Ref<null>;
|
|
74
90
|
isDateTime: import("vue").ComputedRef<boolean>;
|
|
75
91
|
formatRef: import("vue").ComputedRef<string>;
|
|
@@ -90,6 +106,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
90
106
|
updateUnchangedValue: boolean;
|
|
91
107
|
}>>;
|
|
92
108
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:value"[], "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
109
|
+
componentCfg: {
|
|
110
|
+
type: PropType<AnyObject>;
|
|
111
|
+
};
|
|
93
112
|
type: {
|
|
94
113
|
type: PropType<ITypeDate>;
|
|
95
114
|
default: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"./DateOut.vue2.js";import t from"../../../../../../_virtual/_plugin-vue_export-helper.js";var r=t(e,[["__file","DateOut.vue"]]);export{r as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{defineComponent as e,ref as t,computed as a,watch as l,openBlock as r,createBlock as o,unref as u}from"vue";import p from"../../../../../date-picker/index.js";import n from"moment";import{isString as i}from"lodash-es";import{WidgetOptionEnums as m}from"../../../types/enums.js";import{DateExtraOptions as d,DateExtraMap as s}from"../helpers/dateExtraMap.js";import{setDateDisabled as v,setTimeDisabled as f}from"../helpers/dateDisabled.js";import{presetValToTimestamp as c}from"../helpers/presetValToTimestamp.js";var y=e({__name:"DateOut",props:{componentCfg:{type:Object},type:{type:String,default:"date"},clearable:{type:Boolean,default:!1},valueFormat:{type:String,default:"yyyy-MM-dd"},placeholder:{type:String,default:"请输入"},value:{type:String,default:""}},emits:["update:value"],setup(e,{emit:y}){const g=e,h=t(),b=t(),Y=a((()=>{let e="";switch(g.type){case"date":e="YYYY-MM-DD";break;case"datetime":e="YYYY-MM-DD HH:mm:ss"}return e})),M=a((()=>{var e;return null==(e=g.componentCfg)?void 0:e.widgetCfg.optionSetting}));function j(e){h.value=e;const t=e?n(e).format(Y.value):e;y("update:value",t)}function D(e){return v(e,M.value)}function C(e){return f(e,M.value)}return l((()=>g.value),(e=>{e&&i(e)?h.value=n(e).valueOf():h.value=null}),{immediate:!0}),function(){var e,t;const{originType:a}=null==(e=g.componentCfg)?void 0:e.widgetCfg,l=`${a}_${M.value||m.ALL}`,r=null!=(t=d[s[l]])?t:[];let o={};r.forEach((({label:e,value:t})=>{const a=c(t,Y.value,!0);a&&(o[e]=a.valueOf())})),b.value=o}(),(t,a)=>(r(),o(u(p),{to:"body",type:e.type,clearable:e.clearable,valueFormat:e.valueFormat,placeholder:e.placeholder,value:h.value,"default-time":"00:00:00","is-date-disabled":D,"is-time-disabled":C,shortcuts:b.value,"onUpdate:value":j},null,8,["type","clearable","valueFormat","placeholder","value","shortcuts"]))}});export{y as default};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import { AnyObject } from '../../../../../../../../es/shared/types';
|
|
3
|
+
declare type ITypeDate = 'date' | 'datetime';
|
|
4
|
+
declare const _default: import("vue").DefineComponent<{
|
|
5
|
+
componentCfg: {
|
|
6
|
+
type: PropType<AnyObject>;
|
|
7
|
+
};
|
|
8
|
+
type: {
|
|
9
|
+
type: PropType<ITypeDate>;
|
|
10
|
+
default: string;
|
|
11
|
+
};
|
|
12
|
+
dateFormat: {
|
|
13
|
+
type: StringConstructor;
|
|
14
|
+
default: string;
|
|
15
|
+
};
|
|
16
|
+
radioValue: {
|
|
17
|
+
type: StringConstructor;
|
|
18
|
+
default: string;
|
|
19
|
+
};
|
|
20
|
+
}, {
|
|
21
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
22
|
+
componentCfg: {
|
|
23
|
+
type: PropType<AnyObject>;
|
|
24
|
+
};
|
|
25
|
+
type: {
|
|
26
|
+
type: PropType<ITypeDate>;
|
|
27
|
+
default: string;
|
|
28
|
+
};
|
|
29
|
+
dateFormat: {
|
|
30
|
+
type: StringConstructor;
|
|
31
|
+
default: string;
|
|
32
|
+
};
|
|
33
|
+
radioValue: {
|
|
34
|
+
type: StringConstructor;
|
|
35
|
+
default: string;
|
|
36
|
+
};
|
|
37
|
+
}>> & {
|
|
38
|
+
onClickQuickBtn?: ((...args: any[]) => any) | undefined;
|
|
39
|
+
onChangeRadioValue?: ((...args: any[]) => any) | undefined;
|
|
40
|
+
}>>;
|
|
41
|
+
emit: (event: "clickQuickBtn" | "changeRadioValue", ...args: any[]) => void;
|
|
42
|
+
dateList: import("vue").Ref<any[]>;
|
|
43
|
+
optionSetting: import("vue").ComputedRef<any>;
|
|
44
|
+
isRange: import("vue").ComputedRef<any>;
|
|
45
|
+
initData: () => void;
|
|
46
|
+
handleRadioClick: (value: string) => void;
|
|
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
|
+
componentCfg: {
|
|
49
|
+
type: PropType<AnyObject>;
|
|
50
|
+
};
|
|
51
|
+
type: {
|
|
52
|
+
type: PropType<ITypeDate>;
|
|
53
|
+
default: string;
|
|
54
|
+
};
|
|
55
|
+
dateFormat: {
|
|
56
|
+
type: StringConstructor;
|
|
57
|
+
default: string;
|
|
58
|
+
};
|
|
59
|
+
radioValue: {
|
|
60
|
+
type: StringConstructor;
|
|
61
|
+
default: string;
|
|
62
|
+
};
|
|
63
|
+
}>> & {
|
|
64
|
+
onClickQuickBtn?: ((...args: any[]) => any) | undefined;
|
|
65
|
+
onChangeRadioValue?: ((...args: any[]) => any) | undefined;
|
|
66
|
+
}, {
|
|
67
|
+
type: ITypeDate;
|
|
68
|
+
dateFormat: string;
|
|
69
|
+
radioValue: string;
|
|
70
|
+
}>;
|
|
71
|
+
export default _default;
|
package/es/components/table-filter/src/components/render-widget/components/DateQuickBtn/index.vue.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"./index.vue2.js";import r from"../../../../../../../_virtual/_plugin-vue_export-helper.js";var i=r(e,[["__file","index.vue"]]);export{i as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{defineComponent as e,ref as t,computed as a,openBlock as o,createElementBlock as n,Fragment as i,renderList as r,normalizeClass as l,toDisplayString as u}from"vue";import{WidgetDateOptionEnums as p}from"../../helpers/enums.js";import{widgetDateValOptions as c}from"../../helpers/dateExtraMap.js";import{formatDateRangeInfo as d,presetValToTimestamp as m}from"../../helpers/presetValToTimestamp.js";import{WidgetOptionEnums as s}from"../../../../types/enums.js";const f={class:"radio-date-group"},g=["onClick"];var v=e({__name:"index",props:{componentCfg:{type:Object},type:{type:String,default:"date"},dateFormat:{type:String,default:"YYYY-MM-DD"},radioValue:{type:String,default:""}},emits:["clickQuickBtn","changeRadioValue"],setup(e,{emit:v}){const y=e,C=t([]),k=a((()=>{var e;return null==(e=y.componentCfg)?void 0:e.widgetCfg.optionSetting})),V=a((()=>{var e;return null==(e=y.componentCfg)?void 0:e.rangeFilter}));return function(){var e,t;const{originType:a}=null==(e=y.componentCfg)?void 0:e.widgetCfg,o=`${a}_${k.value||s.ALL}${V.value?"_RANGE":""}`,n=p[o];C.value=null!=(t=c[n])?t:[]}(),(t,a)=>(o(),n("div",f,[(o(!0),n(i,null,r(C.value,(t=>(o(),n("span",{key:t.con,class:l(["radio-date-item",e.radioValue===t.con?"radio-date-item-active":""]),onClick:e=>function(e){let t=null;const a=y.radioValue===e?"":e;a&&(t=V.value?d(a,y.dateFormat,k.value):m(a,y.dateFormat)),v("clickQuickBtn",t),v("changeRadioValue",a)}(t.con)},u(t.title),11,g)))),128))]))}});export{v as default};
|
package/es/components/table-filter/src/components/render-widget/components/DateRangeInner.vue.d.ts
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { PropType } from 'vue';
|
|
2
|
+
import { AnyObject } from '../../../../../../../es/shared/types';
|
|
2
3
|
declare type ITypeDate = 'date' | 'datetime';
|
|
3
4
|
declare const _default: import("vue").DefineComponent<{
|
|
5
|
+
componentCfg: {
|
|
6
|
+
type: PropType<AnyObject>;
|
|
7
|
+
};
|
|
4
8
|
type: {
|
|
5
9
|
type: PropType<ITypeDate>;
|
|
6
10
|
default: string;
|
|
@@ -25,8 +29,15 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
25
29
|
type: StringConstructor;
|
|
26
30
|
default: string;
|
|
27
31
|
};
|
|
32
|
+
unit: {
|
|
33
|
+
type: StringConstructor;
|
|
34
|
+
default: string;
|
|
35
|
+
};
|
|
28
36
|
}, {
|
|
29
37
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
38
|
+
componentCfg: {
|
|
39
|
+
type: PropType<AnyObject>;
|
|
40
|
+
};
|
|
30
41
|
type: {
|
|
31
42
|
type: PropType<ITypeDate>;
|
|
32
43
|
default: string;
|
|
@@ -51,24 +62,46 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
51
62
|
type: StringConstructor;
|
|
52
63
|
default: string;
|
|
53
64
|
};
|
|
65
|
+
unit: {
|
|
66
|
+
type: StringConstructor;
|
|
67
|
+
default: string;
|
|
68
|
+
};
|
|
54
69
|
}>> & {
|
|
55
70
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
71
|
+
"onUpdate:unit"?: ((...args: any[]) => any) | undefined;
|
|
56
72
|
}>>;
|
|
57
|
-
emit: (event: "update:value", ...args: any[]) => void;
|
|
58
|
-
dateList: import("vue").Ref<any[]>;
|
|
73
|
+
emit: (event: "update:unit" | "update:value", ...args: any[]) => void;
|
|
59
74
|
isShowDateRange: import("vue").Ref<boolean>;
|
|
60
|
-
radioValue: import("vue").Ref<string>;
|
|
61
75
|
startDate: import("vue").Ref<any>;
|
|
62
76
|
endDate: import("vue").Ref<any>;
|
|
77
|
+
radioValue: import("vue").ComputedRef<string>;
|
|
78
|
+
optionSetting: import("vue").ComputedRef<any>;
|
|
79
|
+
onlyRadio: import("vue").ComputedRef<boolean>;
|
|
80
|
+
isPastTime: import("vue").ComputedRef<boolean>;
|
|
81
|
+
isFutureTime: import("vue").ComputedRef<boolean>;
|
|
63
82
|
dateFormat: import("vue").ComputedRef<string>;
|
|
64
83
|
showTabStr: import("vue").ComputedRef<string>;
|
|
65
|
-
|
|
66
|
-
|
|
84
|
+
startDefault: import("vue").ComputedRef<string>;
|
|
85
|
+
endDefault: import("vue").ComputedRef<string>;
|
|
86
|
+
handleClickQuickBtn: (result: string) => void;
|
|
87
|
+
changeRadioValue: (value: string) => void;
|
|
88
|
+
changeDateShowType: () => void;
|
|
67
89
|
handleChange: (val: any, type: 'start' | 'end') => void;
|
|
68
90
|
isStartDateDisabled: (ts: number) => boolean;
|
|
91
|
+
timeStartDisabled: (ts: number) => {
|
|
92
|
+
isHourDisabled(hour: number): boolean | 0;
|
|
93
|
+
isMinuteDisabled(minute: number, hour: number | null): boolean | 0;
|
|
94
|
+
isSecondDisabled(second: number, minute: number | null, hour: number | null): boolean | 0;
|
|
95
|
+
};
|
|
69
96
|
isEndDateDisabled: (ts: number) => boolean;
|
|
97
|
+
timeEndDisabled: (ts: number) => {
|
|
98
|
+
isHourDisabled(hour: number): boolean | 0;
|
|
99
|
+
isMinuteDisabled(minute: number, hour: number | null): boolean | 0;
|
|
100
|
+
isSecondDisabled(second: number, minute: number | null, hour: number | null): boolean | 0;
|
|
101
|
+
};
|
|
102
|
+
init: () => void;
|
|
70
103
|
NButton: any;
|
|
71
|
-
CDatePicker: import("
|
|
104
|
+
CDatePicker: import("../../../../../../../es/shared/types").SFCWithInstall<import("vue").DefineComponent<{
|
|
72
105
|
updateUnchangedValue: {
|
|
73
106
|
type: BooleanConstructor;
|
|
74
107
|
};
|
|
@@ -87,7 +120,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
87
120
|
type: FunctionConstructor;
|
|
88
121
|
};
|
|
89
122
|
}>> & {}>>;
|
|
90
|
-
datePickerRef: import("vue").Ref<
|
|
123
|
+
datePickerRef: import("vue").Ref<AnyObject | null>;
|
|
91
124
|
panelInstRef: import("vue").Ref<null>;
|
|
92
125
|
isDateTime: import("vue").ComputedRef<boolean>;
|
|
93
126
|
formatRef: import("vue").ComputedRef<string>;
|
|
@@ -107,7 +140,77 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
107
140
|
}>>, {
|
|
108
141
|
updateUnchangedValue: boolean;
|
|
109
142
|
}>>;
|
|
110
|
-
|
|
143
|
+
DateQuickBtn: import("vue").DefineComponent<{
|
|
144
|
+
componentCfg: {
|
|
145
|
+
type: PropType<AnyObject>;
|
|
146
|
+
};
|
|
147
|
+
type: {
|
|
148
|
+
type: PropType<"date" | "datetime">;
|
|
149
|
+
default: string;
|
|
150
|
+
};
|
|
151
|
+
dateFormat: {
|
|
152
|
+
type: StringConstructor;
|
|
153
|
+
default: string;
|
|
154
|
+
};
|
|
155
|
+
radioValue: {
|
|
156
|
+
type: StringConstructor;
|
|
157
|
+
default: string;
|
|
158
|
+
};
|
|
159
|
+
}, {
|
|
160
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
161
|
+
componentCfg: {
|
|
162
|
+
type: PropType<AnyObject>;
|
|
163
|
+
};
|
|
164
|
+
type: {
|
|
165
|
+
type: PropType<"date" | "datetime">;
|
|
166
|
+
default: string;
|
|
167
|
+
};
|
|
168
|
+
dateFormat: {
|
|
169
|
+
type: StringConstructor;
|
|
170
|
+
default: string;
|
|
171
|
+
};
|
|
172
|
+
radioValue: {
|
|
173
|
+
type: StringConstructor;
|
|
174
|
+
default: string;
|
|
175
|
+
};
|
|
176
|
+
}>> & {
|
|
177
|
+
onClickQuickBtn?: ((...args: any[]) => any) | undefined;
|
|
178
|
+
onChangeRadioValue?: ((...args: any[]) => any) | undefined;
|
|
179
|
+
}>>;
|
|
180
|
+
emit: (event: "clickQuickBtn" | "changeRadioValue", ...args: any[]) => void;
|
|
181
|
+
dateList: import("vue").Ref<any[]>;
|
|
182
|
+
optionSetting: import("vue").ComputedRef<any>;
|
|
183
|
+
isRange: import("vue").ComputedRef<any>;
|
|
184
|
+
initData: () => void;
|
|
185
|
+
handleRadioClick: (value: string) => void;
|
|
186
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("clickQuickBtn" | "changeRadioValue")[], "clickQuickBtn" | "changeRadioValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
187
|
+
componentCfg: {
|
|
188
|
+
type: PropType<AnyObject>;
|
|
189
|
+
};
|
|
190
|
+
type: {
|
|
191
|
+
type: PropType<"date" | "datetime">;
|
|
192
|
+
default: string;
|
|
193
|
+
};
|
|
194
|
+
dateFormat: {
|
|
195
|
+
type: StringConstructor;
|
|
196
|
+
default: string;
|
|
197
|
+
};
|
|
198
|
+
radioValue: {
|
|
199
|
+
type: StringConstructor;
|
|
200
|
+
default: string;
|
|
201
|
+
};
|
|
202
|
+
}>> & {
|
|
203
|
+
onClickQuickBtn?: ((...args: any[]) => any) | undefined;
|
|
204
|
+
onChangeRadioValue?: ((...args: any[]) => any) | undefined;
|
|
205
|
+
}, {
|
|
206
|
+
type: "date" | "datetime";
|
|
207
|
+
dateFormat: string;
|
|
208
|
+
radioValue: string;
|
|
209
|
+
}>;
|
|
210
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:unit" | "update:value")[], "update:unit" | "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
211
|
+
componentCfg: {
|
|
212
|
+
type: PropType<AnyObject>;
|
|
213
|
+
};
|
|
111
214
|
type: {
|
|
112
215
|
type: PropType<ITypeDate>;
|
|
113
216
|
default: string;
|
|
@@ -132,11 +235,17 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
132
235
|
type: StringConstructor;
|
|
133
236
|
default: string;
|
|
134
237
|
};
|
|
238
|
+
unit: {
|
|
239
|
+
type: StringConstructor;
|
|
240
|
+
default: string;
|
|
241
|
+
};
|
|
135
242
|
}>> & {
|
|
136
243
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
244
|
+
"onUpdate:unit"?: ((...args: any[]) => any) | undefined;
|
|
137
245
|
}, {
|
|
138
246
|
type: ITypeDate;
|
|
139
247
|
value: string;
|
|
248
|
+
unit: string;
|
|
140
249
|
clearable: boolean;
|
|
141
250
|
startPlaceholder: string;
|
|
142
251
|
endPlaceholder: string;
|
package/es/components/table-filter/src/components/render-widget/components/DateRangeInner.vue2.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,ref as a,computed as
|
|
1
|
+
import{defineComponent as e,ref as a,computed as t,watch as l,openBlock as u,createElementBlock as r,unref as n,createBlock as i,createCommentVNode as d,normalizeClass as o,withCtx as v,createTextVNode as c,toDisplayString as m,createVNode as s,createElementVNode as p}from"vue";import{NButton as f}from"naive-ui";import y from"../../../../../date-picker/index.js";import g from"moment";import{isString as b}from"lodash-es";import{WidgetOptionEnums as h}from"../../../types/enums.js";import{dateDisabledCollect as k,isStartDateRangeDisabled as C,isTimeStartRangeDisabled as F,isEndDateRangeDisabled as M,isTimeEndRangeDisabled as S}from"../helpers/dateDisabled.js";import T from"./DateQuickBtn/index.vue.js";const Y={class:"render-widget-date-range"},D={key:2,class:"date-detail-range"},E=p("span",{class:"divider"},null,-1);var _=e({__name:"DateRangeInner",props:{componentCfg:{type:Object},type:{type:String,default:"date"},clearable:{type:Boolean,default:!1},valueFormat:{type:String,default:"yyyy-MM-dd"},startPlaceholder:{type:String,default:"起始"},endPlaceholder:{type:String,default:"截止"},value:{type:String,default:""},unit:{type:String,default:""}},emits:["update:value","update:unit"],setup(e,{emit:p}){const _=e,j=a(!1),w=a(),P=a(),I=t((()=>_.unit)),U=t((()=>{var e;return null==(e=_.componentCfg)?void 0:e.widgetCfg.optionSetting})),x=t((()=>U.value!==h.SELECT_TIME)),B=t((()=>U.value===h.PAST_TIME)),O=t((()=>U.value===h.FUTURE_TIME)),R=t((()=>{let e="";switch(_.type){case"date":e="YYYY-MM-DD";break;case"datetime":e="YYYY-MM-DD HH:mm:ss"}return e})),V=t((()=>{let e="";switch(_.type){case"date":e="选择日期";break;case"datetime":e="选择时间"}return e})),H=t((()=>O.value?k.curTime:"00:00:00")),Q=t((()=>B.value?k.curTime:"23:59:59"));function $(e){p("update:value",e)}function A(e){p("update:unit",e)}function L(){x.value&&(j.value=!j.value)}function q(e,a){switch(a){case"start":w.value=e;break;case"end":P.value=e}const t=w.value?g(w.value).format(R.value):null,l=P.value?g(P.value).format(R.value):null;p("update:value",t||l?`${null!=t?t:""} ~ ${null!=l?l:""}`:"")}function z(e){return C(e,U.value,P.value)}function G(e){return F(e,U.value,P.value)}function J(e){return M(e,U.value,w.value)}function K(e){return S(e,U.value,w.value)}return l((()=>_.value),(e=>{if(e&&b(e)&&e.includes("~")){const[a,t]=e.split("~");return a.trim()&&(w.value=g(a.trim()).valueOf()),void(t.trim()&&(P.value=g(t.trim()).valueOf()))}w.value=P.value=null,p("update:unit","")}),{immediate:!0}),x.value||(j.value=!0),(a,t)=>(u(),r("div",Y,[n(x)&&!j.value?(u(),i(T,{key:0,componentCfg:e.componentCfg,type:e.type,dateFormat:n(R),radioValue:n(I),onClickQuickBtn:$,onChangeRadioValue:A},null,8,["componentCfg","type","dateFormat","radioValue"])):d("v-if",!0),n(x)?(u(),i(n(f),{key:1,secondary:"",class:o(j.value?"select-date-right":"select-date-left"),onClick:L},{default:v((()=>[c(m(n(V)),1)])),_:1},8,["class"])):d("v-if",!0),d(' default-time="23:59:59" '),!n(x)||j.value?(u(),r("div",D,[s(n(y),{type:e.type,to:"body","default-time":n(H),clearable:e.clearable,valueFormat:e.valueFormat,placeholder:e.startPlaceholder,value:w.value,"is-date-disabled":z,"is-time-disabled":G,"onUpdate:value":t[0]||(t[0]=e=>q(e,"start"))},null,8,["type","default-time","clearable","valueFormat","placeholder","value"]),E,s(n(y),{type:e.type,to:"body","default-time":n(Q),clearable:e.clearable,valueFormat:e.valueFormat,placeholder:e.endPlaceholder,value:P.value,"is-date-disabled":J,"is-time-disabled":K,"onUpdate:value":t[1]||(t[1]=e=>q(e,"end"))},null,8,["type","default-time","clearable","valueFormat","placeholder","value"])])):d("v-if",!0)]))}});export{_ as default};
|
package/es/components/table-filter/src/components/render-widget/components/DateRangeOut.vue.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { PropType } from 'vue';
|
|
2
|
+
import { AnyObject } from '../../../../../../../es/shared/types';
|
|
2
3
|
declare type ITypeDate = 'daterange' | 'datetimerange';
|
|
3
4
|
declare const _default: import("vue").DefineComponent<{
|
|
4
5
|
type: {
|
|
@@ -56,15 +57,18 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
56
57
|
}>>;
|
|
57
58
|
emit: (event: "update:value", ...args: any[]) => void;
|
|
58
59
|
valueCp: import("vue").Ref<any>;
|
|
60
|
+
rangeShortcuts: import("vue").Ref<any>;
|
|
59
61
|
dateFormat: import("vue").ComputedRef<string>;
|
|
60
|
-
|
|
61
|
-
今天: number[];
|
|
62
|
-
昨天: number[];
|
|
63
|
-
近一周: number[];
|
|
64
|
-
近一月: number[];
|
|
65
|
-
};
|
|
62
|
+
optionSetting: import("vue").ComputedRef<any>;
|
|
66
63
|
handleChange: (val: any) => void;
|
|
67
|
-
|
|
64
|
+
isDateDisabled: (ts: number) => boolean;
|
|
65
|
+
timeDisabled: (ts: number) => {
|
|
66
|
+
isHourDisabled(hour: number): boolean | undefined;
|
|
67
|
+
isMinuteDisabled(minute: number, hour: number | null): boolean | undefined;
|
|
68
|
+
isSecondDisabled(second: number, minute: number | null, hour: number | null): boolean | undefined;
|
|
69
|
+
};
|
|
70
|
+
init: () => void;
|
|
71
|
+
CDatePicker: import("../../../../../../../es/shared/types").SFCWithInstall<import("vue").DefineComponent<{
|
|
68
72
|
updateUnchangedValue: {
|
|
69
73
|
type: BooleanConstructor;
|
|
70
74
|
};
|
|
@@ -83,7 +87,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
83
87
|
type: FunctionConstructor;
|
|
84
88
|
};
|
|
85
89
|
}>> & {}>>;
|
|
86
|
-
datePickerRef: import("vue").Ref<
|
|
90
|
+
datePickerRef: import("vue").Ref<AnyObject | null>;
|
|
87
91
|
panelInstRef: import("vue").Ref<null>;
|
|
88
92
|
isDateTime: import("vue").ComputedRef<boolean>;
|
|
89
93
|
formatRef: import("vue").ComputedRef<string>;
|
|
@@ -133,9 +137,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
133
137
|
}, {
|
|
134
138
|
type: ITypeDate;
|
|
135
139
|
value: string;
|
|
140
|
+
componentCfg: Record<string, any>;
|
|
136
141
|
clearable: boolean;
|
|
137
142
|
startPlaceholder: string;
|
|
138
143
|
endPlaceholder: string;
|
|
139
|
-
componentCfg: Record<string, any>;
|
|
140
144
|
}>;
|
|
141
145
|
export default _default;
|
package/es/components/table-filter/src/components/render-widget/components/DateRangeOut.vue2.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,ref as
|
|
1
|
+
import{defineComponent as e,ref as t,computed as a,watch as l,openBlock as r,createBlock as o,unref as u}from"vue";import n from"../../../../../date-picker/index.js";import i from"moment";import{isString as s}from"lodash-es";import{WidgetOptionEnums as d}from"../../../types/enums.js";import{DateExtraOptions as p,DateExtraMap as m}from"../helpers/dateExtraMap.js";import{formatDateRangeInfo as c}from"../helpers/presetValToTimestamp.js";import{setDateDisabled as f,setTimeDisabled as v}from"../helpers/dateDisabled.js";var g=e({__name:"DateRangeOut",props:{type:{type:String,default:"daterange"},clearable:{type:Boolean,default:!1},startPlaceholder:{type:String,default:"起始"},endPlaceholder:{type:String,default:"截止"},componentCfg:{type:Object,default:()=>({})},value:{type:String,default:""}},emits:["update:value"],setup(e,{emit:g}){const h=e,y=t(),b=t(),P=a((()=>{let e="";switch(h.type){case"daterange":e="YYYY-MM-DD";break;case"datetimerange":e="YYYY-MM-DD HH:mm:ss"}return e})),Y=a((()=>{var e;return null==(e=h.componentCfg)?void 0:e.widgetCfg.optionSetting}));function j(e){if(e){const[t,a]=e,l=`${i(t).format(P.value)} ~ ${i(a).format(P.value)}`;g("update:value",l)}else g("update:value",e)}function D(e){return f(e,Y.value)}function O(e){return v(e,Y.value)}return l((()=>h.value),(e=>{if(e&&s(e)&&e.includes("~")){const[t,a]=e.split("~");y.value=[i(t.trim()).valueOf(),i(a.trim()).valueOf()]}else y.value=null}),{immediate:!0}),function(){var e,t;const{originType:a}=null==(e=h.componentCfg)?void 0:e.widgetCfg,l=`${a}_${Y.value||d.ALL}_RANGE`,r=null!=(t=p[m[l]])?t:[];let o={};r.forEach((({label:e,value:t})=>{const a=c(t,P.value,Y.value,!0);if(a){const[t,l]=a;o[e]=[t.valueOf(),l.valueOf()]}})),b.value=o}(),(t,a)=>(r(),o(u(n),{to:"body",type:e.type,clearable:e.clearable,startPlaceholder:e.startPlaceholder,endPlaceholder:e.endPlaceholder,value:y.value,"is-date-disabled":D,"is-time-disabled":O,shortcuts:b.value,"onUpdate:value":j},null,8,["type","clearable","startPlaceholder","endPlaceholder","value","shortcuts"]))}});export{g as default};
|
package/es/components/table-filter/src/components/render-widget/components/LabelInner.vue.d.ts
CHANGED
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
import { PropType } from 'vue';
|
|
2
|
-
import { IFilterCategoryLabelItemType, IhoFilterTabLabelItemType
|
|
2
|
+
import { IFilterCategoryLabelItemType, IhoFilterTabLabelItemType } from '../../../../../../../es/components/table-filter/src/types';
|
|
3
|
+
import { AnyObject } from '../../../../../../../es/shared/types';
|
|
3
4
|
declare const _default: import("vue").DefineComponent<{
|
|
4
5
|
componentCfg: {
|
|
5
|
-
type: PropType<
|
|
6
|
+
type: PropType<AnyObject>;
|
|
6
7
|
};
|
|
7
8
|
value: {
|
|
8
9
|
type: StringConstructor;
|
|
9
10
|
default: string;
|
|
10
11
|
};
|
|
11
12
|
}, {
|
|
12
|
-
|
|
13
|
+
getDynamicLabelData: (params: any, filterApiConfig: any) => Promise<any>;
|
|
14
|
+
message: import("naive-ui").MessageApi;
|
|
13
15
|
baseActiveColor: string;
|
|
14
16
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
15
17
|
componentCfg: {
|
|
16
|
-
type: PropType<
|
|
18
|
+
type: PropType<AnyObject>;
|
|
17
19
|
};
|
|
18
20
|
value: {
|
|
19
21
|
type: StringConstructor;
|
|
@@ -25,7 +27,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
25
27
|
emit: (event: "update:value", ...args: any[]) => void;
|
|
26
28
|
selectedList: import("vue").Ref<string[]>;
|
|
27
29
|
tagList: import("vue").Ref<never[]>;
|
|
28
|
-
filterApiConfig:
|
|
30
|
+
filterApiConfig: AnyObject;
|
|
29
31
|
categoryList: import("vue").ComputedRef<IFilterCategoryLabelItemType[]>;
|
|
30
32
|
onResize: (el: HTMLElement, categoryItem: IFilterCategoryLabelItemType) => void;
|
|
31
33
|
handleLabelUpfold: (categoryItem: IFilterCategoryLabelItemType) => void;
|
|
@@ -48,7 +50,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
48
50
|
};
|
|
49
51
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:value"[], "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
50
52
|
componentCfg: {
|
|
51
|
-
type: PropType<
|
|
53
|
+
type: PropType<AnyObject>;
|
|
52
54
|
};
|
|
53
55
|
value: {
|
|
54
56
|
type: StringConstructor;
|
package/es/components/table-filter/src/components/render-widget/components/LabelInner.vue2.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,ref as l,inject as t,watch as
|
|
1
|
+
import{defineComponent as e,ref as l,inject as t,watch as a,computed as o,openBlock as s,createElementBlock as n,Fragment as i,renderList as c,unref as r,createElementVNode as d,toDisplayString as u,normalizeClass as p,withDirectives as f,createBlock as m,normalizeStyle as b,withCtx as v,createVNode as h,withModifiers as y,createCommentVNode as g}from"vue";import{useMessage as k,NTag as S,NTooltip as w,NIcon as C}from"naive-ui";import{ChevronUpCircleOutline as x,ChevronDownCircleOutline as U}from"@vicons/ionicons5";import L from"../../../directive/resize.js";import j from"../../../hooks/useAsyncData.js";import{InjectionFilterApiConfig as T}from"../../../constants/index.js";import{isString as B}from"lodash-es";const _={class:"label-attr-filter-container"},z={class:"edit-f-label"},D={class:"label-f-content"},I={key:0,class:"label-f-unfold-btn"},A=["onClick"],H=d("span",null,"收起",-1),N=d("span",null,"展开",-1);var O=e({__name:"LabelInner",props:{componentCfg:{type:Object},value:{type:String,default:""}},emits:["update:value"],setup(e,{emit:O}){const $=e,{getDynamicLabelData:q}=j(),E=k(),F="rgb(85, 133, 245)",G=l([]),J=l([]),K=t(T);a((()=>$.value),(e=>{const l=e&&B(e)?e.split("|#|"):[];G.value=l}),{immediate:!0});const M=o((()=>J.value&&J.value.length>0?J.value.map((e=>(e.labelList.map((e=>{e.isSelect=G.value.includes(e.labelShowText)})),e))):[])),P=e=>e.isSelect?{background:e.backgroundColor||F,borderColor:e.backgroundColor||F}:{};return(async()=>{try{const{widgetCfg:e={}}=$.componentCfg,{classifyStr:l=""}=e;let t=await q({classifyStr:l},K);if(t){const{list:e=[]}=t;J.value=e}}catch(e){E.error(`获取标签数据请求失败:${e}`),console.log(e)}})(),(e,l)=>(s(),n("div",_,[(s(!0),n(i,null,c(r(M),(e=>(s(),n("div",{class:"edit-labels-content",key:e.classifyId},[d("span",z,u(e.classifyName)+":",1),d("div",{class:p(["edit-f-content",{"label-select-height":!e.isUnfold&&e.labelList&&e.isShowBtn}])},[f((s(),n("div",D,[(s(!0),n(i,null,c(e.labelList,(e=>(s(),m(r(S),{checkable:"",key:e.labelCode,checked:e.isSelect,"onUpdate:checked":l=>((e,l)=>{if(l.isSelect=e,e)G.value.push(l.labelShowText);else{const e=G.value.findIndex((e=>e===l.labelShowText));e>-1&&G.value.splice(e,1)}O("update:value",G.value.join("|#|"))})(l,e),style:b(P(e))},{default:v((()=>[h(r(w),{placement:"top-start",duration:0},{trigger:v((()=>[d("span",null,u(e.labelShowText),1)])),default:v((()=>[d("span",null,u(e.labelShowText),1)])),_:2},1024)])),_:2},1032,["checked","onUpdate:checked","style"])))),128))])),[[r(L),l=>((e,l)=>{let t=e.offsetHeight||0;t&&(t>80?l.isShowBtn=!0:(l.isShowBtn=!1,l.isUnfold=!1))})(l,e)]])],2),e.labelList&&e.isShowBtn?(s(),n("div",I,[d("span",{class:"operate-btn",onClick:y((l=>(e=>{e.isUnfold=!e.isUnfold})(e)),["stop"])},[e.isUnfold?(s(),n(i,{key:0},[H,h(r(C),{component:r(x),size:"16"},null,8,["component"])],64)):(s(),n(i,{key:1},[N,h(r(C),{component:r(U),size:"16"},null,8,["component"])],64))],8,A)])):g("v-if",!0)])))),128))]))}});export{O as default};
|
package/es/components/table-filter/src/components/render-widget/components/LabelOut.vue.d.ts
CHANGED
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
import { PropType } from 'vue';
|
|
2
2
|
import { SelectOption } from 'naive-ui';
|
|
3
|
-
import {
|
|
3
|
+
import { AnyObject } from '../../../../../../../es/shared/types';
|
|
4
4
|
declare const _default: import("vue").DefineComponent<{
|
|
5
5
|
componentCfg: {
|
|
6
|
-
type: PropType<
|
|
6
|
+
type: PropType<AnyObject>;
|
|
7
7
|
};
|
|
8
8
|
value: {
|
|
9
9
|
type: StringConstructor;
|
|
10
10
|
default: string;
|
|
11
11
|
};
|
|
12
12
|
}, {
|
|
13
|
-
|
|
13
|
+
getDynamicLabelData: (params: any, filterApiConfig: any) => Promise<any>;
|
|
14
14
|
$attrs: {
|
|
15
15
|
[x: string]: unknown;
|
|
16
16
|
};
|
|
17
|
+
message: import("naive-ui").MessageApi;
|
|
17
18
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
18
19
|
componentCfg: {
|
|
19
|
-
type: PropType<
|
|
20
|
+
type: PropType<AnyObject>;
|
|
20
21
|
};
|
|
21
22
|
value: {
|
|
22
23
|
type: StringConstructor;
|
|
@@ -27,14 +28,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
27
28
|
}>>;
|
|
28
29
|
emit: (event: "update:value", ...args: any[]) => void;
|
|
29
30
|
tagList: import("vue").Ref<never[]>;
|
|
30
|
-
filterApiConfig:
|
|
31
|
+
filterApiConfig: AnyObject;
|
|
31
32
|
valueCp: import("vue").WritableComputedRef<string[]>;
|
|
32
33
|
optionList: import("vue").ComputedRef<SelectOption[]>;
|
|
33
34
|
initTagList: () => Promise<void>;
|
|
34
35
|
NSelect: any;
|
|
35
36
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:value"[], "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
36
37
|
componentCfg: {
|
|
37
|
-
type: PropType<
|
|
38
|
+
type: PropType<AnyObject>;
|
|
38
39
|
};
|
|
39
40
|
value: {
|
|
40
41
|
type: StringConstructor;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,useAttrs as t,ref as
|
|
1
|
+
import{defineComponent as e,useAttrs as t,ref as a,inject as l,computed as o,openBlock as u,createBlock as s,unref as n,mergeProps as r,isRef as i}from"vue";import{useMessage as p,NSelect as c}from"naive-ui";import v from"../../../hooks/useAsyncData.js";import{InjectionFilterApiConfig as f}from"../../../constants/index.js";var m=e({__name:"LabelOut",props:{componentCfg:{type:Object},value:{type:String,default:""}},emits:["update:value"],setup(e,{emit:m}){const h=e,{getDynamicLabelData:b}=v(),d=t(),g=p(),y=a([]),S=l(f),w=o({set(e){const t=e?e.join("|#|"):e;m("update:value",t)},get:()=>h.value?h.value.split("|#|"):[]}),x=o((()=>{if(y.value&&y.value.length>0){let e=[],t=[];return y.value.forEach((a=>{a.labelList.forEach((a=>{e.includes(a.labelShowText)||(e.push(a.labelShowText),t.push({label:a.labelShowText,value:a.labelShowText}))}))})),t}return[]}));return(async()=>{try{const{widgetCfg:e={}}=h.componentCfg,{classifyStr:t=""}=e;let a=await b({classifyStr:t},S);if(a){const{list:e=[]}=a;y.value=e}}catch(e){g.error(`获取标签数据请求失败:${e}`),console.log(e)}})(),(e,t)=>(u(),s(n(c),r({to:"body"},n(d),{value:n(w),"onUpdate:value":t[0]||(t[0]=e=>i(w)?w.value=e:null),options:n(x)}),null,16,["value","options"]))}});export{m as default};
|
|
@@ -1,45 +1,39 @@
|
|
|
1
|
-
import { SelectOption } from 'naive-ui';
|
|
2
1
|
declare const _default: import("vue").DefineComponent<{
|
|
3
2
|
value: {
|
|
4
3
|
type: (ArrayConstructor | NumberConstructor | StringConstructor)[];
|
|
5
4
|
};
|
|
5
|
+
componentCfg: {
|
|
6
|
+
type: ObjectConstructor;
|
|
7
|
+
};
|
|
6
8
|
}, {
|
|
9
|
+
$attrs: {
|
|
10
|
+
[x: string]: unknown;
|
|
11
|
+
};
|
|
7
12
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
8
13
|
value: {
|
|
9
14
|
type: (ArrayConstructor | NumberConstructor | StringConstructor)[];
|
|
10
15
|
};
|
|
16
|
+
componentCfg: {
|
|
17
|
+
type: ObjectConstructor;
|
|
18
|
+
};
|
|
11
19
|
}>> & {
|
|
12
20
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
13
|
-
onChangeInitState?: ((...args: any[]) => any) | undefined;
|
|
14
21
|
}>>;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
isRemote: import("vue").Ref<boolean>;
|
|
22
|
-
isLoading: import("vue").Ref<boolean>;
|
|
23
|
-
filterApiConfig: import("../../../../..").AnyObject;
|
|
24
|
-
valueCp: import("vue").WritableComputedRef<unknown>;
|
|
25
|
-
searchOptions: (keyword: string) => Promise<any>;
|
|
26
|
-
_handleSearch: (query: string) => Promise<void>;
|
|
27
|
-
handleSearch: (query: string) => Promise<void>;
|
|
28
|
-
handleInitData: () => Promise<void>;
|
|
29
|
-
renderLabel: (option: SelectOption) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
30
|
-
[key: string]: any;
|
|
31
|
-
}>;
|
|
32
|
-
renderTag: ({ option, handleClose }: any) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
33
|
-
[key: string]: any;
|
|
34
|
-
}>;
|
|
35
|
-
init: () => Promise<void>;
|
|
22
|
+
emit: (event: "update:value", ...args: any[]) => void;
|
|
23
|
+
valueCp: import("vue").ComputedRef<string | number | unknown[] | undefined>;
|
|
24
|
+
isMultiple: import("vue").ComputedRef<unknown>;
|
|
25
|
+
isShowWhole: import("vue").ComputedRef<any>;
|
|
26
|
+
optionList: import("vue").ComputedRef<any>;
|
|
27
|
+
handleUpdate: (val: any) => void;
|
|
36
28
|
NSelect: any;
|
|
37
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
|
29
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:value"[], "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
38
30
|
value: {
|
|
39
31
|
type: (ArrayConstructor | NumberConstructor | StringConstructor)[];
|
|
40
32
|
};
|
|
33
|
+
componentCfg: {
|
|
34
|
+
type: ObjectConstructor;
|
|
35
|
+
};
|
|
41
36
|
}>> & {
|
|
42
37
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
43
|
-
onChangeInitState?: ((...args: any[]) => any) | undefined;
|
|
44
38
|
}, {}>;
|
|
45
39
|
export default _default;
|