cnhis-design-vue 3.1.46-beta.0 → 3.1.46-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +87 -87
- package/es/components/base-search/index.d.ts +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/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
- package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +1 -0
- package/es/components/bpmn-workflow/types/ModelingModule.d.ts +1 -0
- package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +1 -0
- 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/form-render/src/components/renderer/radio_checkbox.js +1 -1
- package/es/components/index.css +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/scale-view/src/ScaleView.vue2.js +1 -1
- package/es/components/select-label/src/LabelFormContent.vue2.js +1 -1
- package/es/components/select-person/src/SearchMultiple.vue.d.ts +0 -6
- 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/env.d.ts +25 -25
- package/es/shared/assets/img/failure.png.js +1 -1
- package/es/shared/assets/img/no-permission.png.js +1 -1
- package/es/shared/assets/img/nodata.png.js +1 -1
- package/es/shared/assets/img/notfound.png.js +1 -1
- package/es/shared/assets/img/qr.png.js +1 -1
- package/es/shared/assets/img/success.png.js +1 -1
- package/es/shared/assets/img/video.png.js +1 -1
- package/es/shared/assets/img/video_default_cover.png.js +1 -1
- package/es/shared/assets/img/xb_big.png.js +1 -1
- package/es/shared/assets/img/xb_small.png.js +1 -1
- package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +86 -0
- package/es/shared/package.json.js +1 -1
- package/es/shared/utils/fabricjs/index.d.ts +6823 -0
- package/es/shared/utils/tapable/index.d.ts +139 -0
- 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 +1 @@
|
|
|
1
|
-
import{defineComponent as e,useAttrs as
|
|
1
|
+
import{defineComponent as e,useAttrs as t,computed as u,openBlock as r,createBlock as o,unref as n,mergeProps as a}from"vue";import{NSelect as l}from"naive-ui";import{WholeSelectObj as i}from"../helpers/selectExtraMap.js";import{WidgetValEnums as p}from"../../../types/enums.js";var s=e({__name:"Select",props:{value:{type:[Array,String,Number]},componentCfg:{type:Object}},emits:["update:value"],setup(e,{emit:s}){const m=e,v=t(),c=u((()=>m.value)),f=u((()=>v.multiple)),d=u((()=>{const{widgetCfg:e}=m.componentCfg,{showWholeOption:t=!1}=e;return t})),g=u((()=>{const{widgetCfg:e}=m.componentCfg,{valueList:t=[]}=e;if(d.value){return[i,...t]}return t}));function y(e){if(d.value&&f.value&&Array.isArray(e)&&e.includes(p.WHOLE)){const t=e.slice(-1);if(t.includes(p.WHOLE))return void s("update:value",t);const u=e.filter((e=>e!==p.WHOLE));s("update:value",u)}else s("update:value",e)}return(e,t)=>(r(),o(n(l),a(n(v),{options:n(g),value:n(c),"onUpdate:value":y}),null,16,["options","value"]))}});export{s as default};
|
package/es/components/table-filter/src/components/render-widget/components/SelectDynamic.vue.d.ts
ADDED
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{
|
|
2
|
+
value: {
|
|
3
|
+
type: (ArrayConstructor | NumberConstructor | StringConstructor)[];
|
|
4
|
+
};
|
|
5
|
+
componentCfg: {
|
|
6
|
+
type: ObjectConstructor;
|
|
7
|
+
};
|
|
8
|
+
}, {
|
|
9
|
+
message: import("naive-ui").MessageApi;
|
|
10
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
11
|
+
value: {
|
|
12
|
+
type: (ArrayConstructor | NumberConstructor | StringConstructor)[];
|
|
13
|
+
};
|
|
14
|
+
componentCfg: {
|
|
15
|
+
type: ObjectConstructor;
|
|
16
|
+
};
|
|
17
|
+
}>> & {
|
|
18
|
+
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
19
|
+
}>>;
|
|
20
|
+
getDynamicSelectData: (params: any, filterApiConfig: any) => Promise<any>;
|
|
21
|
+
$attrs: {
|
|
22
|
+
[x: string]: unknown;
|
|
23
|
+
};
|
|
24
|
+
emit: (event: "update:value", ...args: any[]) => void;
|
|
25
|
+
isLoading: import("vue").Ref<boolean>;
|
|
26
|
+
filterApiConfig: import("../../../../..").AnyObject;
|
|
27
|
+
searchFilterList: import("vue").Ref<import("../../../../..").AnyObject[]>;
|
|
28
|
+
curPage: import("vue").Ref<number>;
|
|
29
|
+
fieldTitleList: import("vue").Ref<any>;
|
|
30
|
+
selectOptions: import("vue").Ref<any[]>;
|
|
31
|
+
baseOptionList: import("vue").Ref<any[]>;
|
|
32
|
+
keywordVal: import("vue").Ref<any>;
|
|
33
|
+
totalPage: import("vue").Ref<number>;
|
|
34
|
+
menuProps: {
|
|
35
|
+
class: string;
|
|
36
|
+
};
|
|
37
|
+
isMultiple: import("vue").ComputedRef<unknown>;
|
|
38
|
+
dynamicOptionInfos: import("vue").ComputedRef<any>;
|
|
39
|
+
isShowWhole: import("vue").ComputedRef<any>;
|
|
40
|
+
isLastPage: import("vue").ComputedRef<boolean>;
|
|
41
|
+
valueCp: import("vue").ComputedRef<string | number | any[] | null>;
|
|
42
|
+
isInitRequest: import("vue").ComputedRef<boolean>;
|
|
43
|
+
setOptionActive: (selectIds: string[]) => void;
|
|
44
|
+
handleUpdateSelect: (value: string[] | null) => void;
|
|
45
|
+
handleUpdatePage: (page: number) => Promise<void>;
|
|
46
|
+
getOptionsData: (keyword: string, curPage: number) => Promise<void>;
|
|
47
|
+
isWhole: (value: string) => boolean;
|
|
48
|
+
_handleSearch: (query: string) => Promise<void>;
|
|
49
|
+
handleSearch: (query: string) => Promise<void>;
|
|
50
|
+
handleInitData: () => Promise<void>;
|
|
51
|
+
handleClear: () => Promise<void>;
|
|
52
|
+
handleUpdateShow: (show: boolean) => void;
|
|
53
|
+
renderTag: ({ option, handleClose }: any) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
54
|
+
[key: string]: any;
|
|
55
|
+
}>;
|
|
56
|
+
init: () => void;
|
|
57
|
+
NSelect: any;
|
|
58
|
+
SelectDynamicOption: import("vue").DefineComponent<{
|
|
59
|
+
dynamicOptionInfo: {
|
|
60
|
+
type: import("vue").PropType<import("../../../../..").AnyObject>;
|
|
61
|
+
default: () => {};
|
|
62
|
+
};
|
|
63
|
+
fieldTitleList: {
|
|
64
|
+
type: import("vue").PropType<import("../../../../..").AnyObject[]>;
|
|
65
|
+
default: () => never[];
|
|
66
|
+
};
|
|
67
|
+
optionList: {
|
|
68
|
+
type: import("vue").PropType<import("../../../../..").AnyObject[]>;
|
|
69
|
+
default: () => never[];
|
|
70
|
+
};
|
|
71
|
+
isMultiple: {
|
|
72
|
+
type: BooleanConstructor;
|
|
73
|
+
default: boolean;
|
|
74
|
+
};
|
|
75
|
+
curPage: {
|
|
76
|
+
type: NumberConstructor;
|
|
77
|
+
default: number;
|
|
78
|
+
};
|
|
79
|
+
isLastPage: {
|
|
80
|
+
type: BooleanConstructor;
|
|
81
|
+
default: boolean;
|
|
82
|
+
};
|
|
83
|
+
isShowWhole: {
|
|
84
|
+
type: BooleanConstructor;
|
|
85
|
+
default: boolean;
|
|
86
|
+
};
|
|
87
|
+
}, {
|
|
88
|
+
selectMinWidth: number;
|
|
89
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
90
|
+
dynamicOptionInfo: {
|
|
91
|
+
type: import("vue").PropType<import("../../../../..").AnyObject>;
|
|
92
|
+
default: () => {};
|
|
93
|
+
};
|
|
94
|
+
fieldTitleList: {
|
|
95
|
+
type: import("vue").PropType<import("../../../../..").AnyObject[]>;
|
|
96
|
+
default: () => never[];
|
|
97
|
+
};
|
|
98
|
+
optionList: {
|
|
99
|
+
type: import("vue").PropType<import("../../../../..").AnyObject[]>;
|
|
100
|
+
default: () => never[];
|
|
101
|
+
};
|
|
102
|
+
isMultiple: {
|
|
103
|
+
type: BooleanConstructor;
|
|
104
|
+
default: boolean;
|
|
105
|
+
};
|
|
106
|
+
curPage: {
|
|
107
|
+
type: NumberConstructor;
|
|
108
|
+
default: number;
|
|
109
|
+
};
|
|
110
|
+
isLastPage: {
|
|
111
|
+
type: BooleanConstructor;
|
|
112
|
+
default: boolean;
|
|
113
|
+
};
|
|
114
|
+
isShowWhole: {
|
|
115
|
+
type: BooleanConstructor;
|
|
116
|
+
default: boolean;
|
|
117
|
+
};
|
|
118
|
+
}>> & {
|
|
119
|
+
onUpdateSelect?: ((...args: any[]) => any) | undefined;
|
|
120
|
+
onUpdatePage?: ((...args: any[]) => any) | undefined;
|
|
121
|
+
}>>;
|
|
122
|
+
emit: (event: "updateSelect" | "updatePage", ...args: any[]) => void;
|
|
123
|
+
dragEndWidth: import("vue").Ref<number>;
|
|
124
|
+
showKeys: import("vue").ComputedRef<any>;
|
|
125
|
+
titleList: import("vue").ComputedRef<string[]>;
|
|
126
|
+
handleSelect: (option: any) => void;
|
|
127
|
+
searchByPage: (onePage: number) => void;
|
|
128
|
+
changeWidth: ({ distance }: any) => void;
|
|
129
|
+
saveWidth: () => void;
|
|
130
|
+
NEmpty: any;
|
|
131
|
+
NButtonGroup: any;
|
|
132
|
+
NButton: any;
|
|
133
|
+
NIcon: any;
|
|
134
|
+
NPopover: any;
|
|
135
|
+
vFlexibleResize: {
|
|
136
|
+
mounted(el: any, { value }: any): void;
|
|
137
|
+
beforeUnmount(el: any): void;
|
|
138
|
+
};
|
|
139
|
+
WidgetValEnums: {
|
|
140
|
+
CUSTOM: string;
|
|
141
|
+
FIRST_VAL: string;
|
|
142
|
+
WHOLE: string;
|
|
143
|
+
NOW: string;
|
|
144
|
+
TODAY: string;
|
|
145
|
+
TODAY_START: string;
|
|
146
|
+
TODAY_END: string;
|
|
147
|
+
TOMORROW: string;
|
|
148
|
+
TOMORROW_START: string;
|
|
149
|
+
TOMORROW_END: string;
|
|
150
|
+
YESTERDAY: string;
|
|
151
|
+
YESTERDAY_START: string;
|
|
152
|
+
YESTERDAY_END: string;
|
|
153
|
+
THIS_WEEK: string;
|
|
154
|
+
WEEK_START: string;
|
|
155
|
+
WEEK_END: string;
|
|
156
|
+
NEXT_WEEK: string;
|
|
157
|
+
LAST_WEEK: string;
|
|
158
|
+
THIS_MONTH: string;
|
|
159
|
+
MONTH_START: string;
|
|
160
|
+
MONTH_END: string;
|
|
161
|
+
NEXT_MONTH: string;
|
|
162
|
+
LAST_MONTH: string;
|
|
163
|
+
THIS_QUARTER: string;
|
|
164
|
+
NEXT_QUARTER: string;
|
|
165
|
+
LAST_QUARTER: string;
|
|
166
|
+
THIS_YEAR: string;
|
|
167
|
+
NEXT_YEAR: string;
|
|
168
|
+
LAST_YEAR: string;
|
|
169
|
+
};
|
|
170
|
+
ArrowBack: 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<{}>>, {}>;
|
|
171
|
+
ArrowForward: 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<{}>>, {}>;
|
|
172
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("updateSelect" | "updatePage")[], "updateSelect" | "updatePage", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
173
|
+
dynamicOptionInfo: {
|
|
174
|
+
type: import("vue").PropType<import("../../../../..").AnyObject>;
|
|
175
|
+
default: () => {};
|
|
176
|
+
};
|
|
177
|
+
fieldTitleList: {
|
|
178
|
+
type: import("vue").PropType<import("../../../../..").AnyObject[]>;
|
|
179
|
+
default: () => never[];
|
|
180
|
+
};
|
|
181
|
+
optionList: {
|
|
182
|
+
type: import("vue").PropType<import("../../../../..").AnyObject[]>;
|
|
183
|
+
default: () => never[];
|
|
184
|
+
};
|
|
185
|
+
isMultiple: {
|
|
186
|
+
type: BooleanConstructor;
|
|
187
|
+
default: boolean;
|
|
188
|
+
};
|
|
189
|
+
curPage: {
|
|
190
|
+
type: NumberConstructor;
|
|
191
|
+
default: number;
|
|
192
|
+
};
|
|
193
|
+
isLastPage: {
|
|
194
|
+
type: BooleanConstructor;
|
|
195
|
+
default: boolean;
|
|
196
|
+
};
|
|
197
|
+
isShowWhole: {
|
|
198
|
+
type: BooleanConstructor;
|
|
199
|
+
default: boolean;
|
|
200
|
+
};
|
|
201
|
+
}>> & {
|
|
202
|
+
onUpdateSelect?: ((...args: any[]) => any) | undefined;
|
|
203
|
+
onUpdatePage?: ((...args: any[]) => any) | undefined;
|
|
204
|
+
}, {
|
|
205
|
+
dynamicOptionInfo: import("../../../../..").AnyObject;
|
|
206
|
+
fieldTitleList: import("../../../../..").AnyObject[];
|
|
207
|
+
optionList: import("../../../../..").AnyObject[];
|
|
208
|
+
isMultiple: boolean;
|
|
209
|
+
curPage: number;
|
|
210
|
+
isLastPage: boolean;
|
|
211
|
+
isShowWhole: boolean;
|
|
212
|
+
}>;
|
|
213
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:value"[], "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
214
|
+
value: {
|
|
215
|
+
type: (ArrayConstructor | NumberConstructor | StringConstructor)[];
|
|
216
|
+
};
|
|
217
|
+
componentCfg: {
|
|
218
|
+
type: ObjectConstructor;
|
|
219
|
+
};
|
|
220
|
+
}>> & {
|
|
221
|
+
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
222
|
+
}, {}>;
|
|
223
|
+
export default _default;
|
package/es/components/table-filter/src/components/render-widget/components/SelectDynamic.vue.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"./SelectDynamic.vue2.js";import r from"../../../../../../_virtual/_plugin-vue_export-helper.js";var t=r(e,[["__file","SelectDynamic.vue"]]);export{t as default};
|
package/es/components/table-filter/src/components/render-widget/components/SelectDynamic.vue2.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{defineComponent as e,useAttrs as a,ref as l,inject as t,computed as n,openBlock as u,createBlock as o,unref as i,mergeProps as r,isRef as s,withCtx as c,createVNode as v,h as p}from"vue";import{useMessage as f,NSelect as m,NTag as d}from"naive-ui";import{useDebounceFn as y}from"@vueuse/core";import g from"../../../hooks/useAsyncData.js";import{judgmentVariable as h}from"../helpers/setDefaultValue.js";import{WholeSelectObj as w}from"../helpers/selectExtraMap.js";import{WidgetValEnums as O}from"../../../types/enums.js";import{InjectionFilterApiConfig as S,InjectionFilterSearchConfig as b}from"../../../constants/index.js";import j from"./SelectDynamicOption/index.vue.js";import{isEqual as C,cloneDeep as A}from"lodash-es";var L=e({__name:"SelectDynamic",props:{value:{type:[Array,String,Number]},componentCfg:{type:Object}},emits:["update:value"],setup(e,{emit:L}){const P=e,k=f(),{getDynamicSelectData:x}=g(),D=a(),E=l(!1),I=t(S),K=t(b),N=l(1),T=l(),U=l([w]),W=l([]),M=l(),$=l(0),_={class:"select-dynamic-popover"},J=n((()=>D.multiple)),F=n((()=>{const{widgetCfg:e}=P.componentCfg,{dynamicOptionInfo:a={}}=e;return a})),H=n((()=>{const{widgetCfg:e}=P.componentCfg,{showWholeOption:a=!1}=e;return a&&1===N.value})),V=n((()=>$.value>0&&N.value>=$.value)),q=n((()=>{var e;if(Array.isArray(P.value)&&P.value.length>0){const e=P.value;if(B(e),!J.value&&1==e.length){const a=U.value.find((a=>a.value===e[0]));return JSON.stringify(a)}return U.value.filter((a=>e.includes(a.value)))}return B([]),null!=(e=P.value)?e:null})),z=n((()=>{if(Object.keys(F.value).length>0){const{defaultParams:e=[]}=F.value;return!h(e)}return!0}));function B(e){U.value.forEach((a=>{a.actived=!1,Array.isArray(e)&&e.includes(a.value)&&(a.actived=!0)}))}function G(e){const{widgetCfg:a}=P.componentCfg,{linkageFieldKeys:l=[]}=a;C(P.value,e)||(l.forEach((e=>{const a=K.value.find((a=>a.columnName===e));a&&a.value&&(a.value=null)})),L("update:value",e))}async function Q(e){N.value=e,await R(M.value,N.value)}async function R(e,a){try{if(Object.keys(F.value).length>0){const{autograph:l,dataSourceId:t,dataSourceType:n,filterKeys:u,defaultParams:o=[],showKeys:i,valueKey:r}=F.value;let s={wordbookId:t,autograph:l,wordbookType:n,fieldKeys:u,page:a};u.length>0&&(s[u[0]]=e),E.value=!0;if(h(o)){const e=o.map((e=>e.value)).filter((e=>e.includes("${")));e.map((e=>e.match(/\$\{(.+?)\}/)[1])).forEach((e=>{const a=K.value.find((a=>a.columnName===e));a&&a.value&&a.value!==O.WHOLE&&(s[e]=a.value)}))}let c=await x(s,I);if(c){const{fieldList:e=[],rows:a=[],total:l=0}=c.map,t=a.map((e=>({...e,label:e[i[0]],value:e[r]}))),n=A(t);H.value&&t.unshift(w),T.value=null!=e?e:[],U.value=null!=t?t:[],W.value=n,$.value=l}}}catch(e){k.error(`异步数据源下拉框数据请求失败:${e}`),console.log(e)}finally{E.value=!1}}const X=y((async e=>{await async function(e){M.value=e.trim(),N.value=1,await R(M.value,N.value)}(e)}),300);async function Y(){Object.keys(F.value).length>0&&I&&await R("",N.value)}async function Z(){L("update:value",null),await Y()}function ee(e){e&&Y()}function ae({option:e,handleClose:a}){if(J.value){const l=e.value;return p(d,{style:{padding:"0 8px"},closable:!0,onClose:e=>{if(e.stopPropagation(),a(),Array.isArray(P.value)&&P.value.length>0){const e=P.value,a=e.indexOf(l.value);if(a>-1){const l=e.splice(0,a);L("update:value",l.length>0?l:null)}}}},{default:()=>p("div",l.label)})}const l=e.value?JSON.parse(e.value):{label:""};return p("div",l.label)}return z.value&&Y(),(e,a)=>(u(),o(i(m),r(i(D),{value:i(q),"onUpdate:value":a[0]||(a[0]=e=>s(q)?q.value=e:null),remote:"",loading:E.value,"render-tag":ae,"menu-props":_,onSearch:i(X),onClear:Z,"onUpdate:show":ee}),{empty:c((()=>[v(j,r(i(D),{dynamicOptionInfo:i(F),fieldTitleList:T.value,optionList:U.value,isMultiple:i(J),curPage:N.value,isLastPage:i(V),isShowWhole:i(H),onUpdateSelect:G,onUpdatePage:Q}),null,16,["dynamicOptionInfo","fieldTitleList","optionList","isMultiple","curPage","isLastPage","isShowWhole"])])),_:1},16,["value","loading","onSearch"]))}});export{L as default};
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import { AnyObject } from '../../../../../../../../es/shared/types';
|
|
3
|
+
declare const _default: import("vue").DefineComponent<{
|
|
4
|
+
dynamicOptionInfo: {
|
|
5
|
+
type: PropType<AnyObject>;
|
|
6
|
+
default: () => {};
|
|
7
|
+
};
|
|
8
|
+
fieldTitleList: {
|
|
9
|
+
type: PropType<AnyObject[]>;
|
|
10
|
+
default: () => never[];
|
|
11
|
+
};
|
|
12
|
+
optionList: {
|
|
13
|
+
type: PropType<AnyObject[]>;
|
|
14
|
+
default: () => never[];
|
|
15
|
+
};
|
|
16
|
+
isMultiple: {
|
|
17
|
+
type: BooleanConstructor;
|
|
18
|
+
default: boolean;
|
|
19
|
+
};
|
|
20
|
+
curPage: {
|
|
21
|
+
type: NumberConstructor;
|
|
22
|
+
default: number;
|
|
23
|
+
};
|
|
24
|
+
isLastPage: {
|
|
25
|
+
type: BooleanConstructor;
|
|
26
|
+
default: boolean;
|
|
27
|
+
};
|
|
28
|
+
isShowWhole: {
|
|
29
|
+
type: BooleanConstructor;
|
|
30
|
+
default: boolean;
|
|
31
|
+
};
|
|
32
|
+
}, {
|
|
33
|
+
selectMinWidth: number;
|
|
34
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
35
|
+
dynamicOptionInfo: {
|
|
36
|
+
type: PropType<AnyObject>;
|
|
37
|
+
default: () => {};
|
|
38
|
+
};
|
|
39
|
+
fieldTitleList: {
|
|
40
|
+
type: PropType<AnyObject[]>;
|
|
41
|
+
default: () => never[];
|
|
42
|
+
};
|
|
43
|
+
optionList: {
|
|
44
|
+
type: PropType<AnyObject[]>;
|
|
45
|
+
default: () => never[];
|
|
46
|
+
};
|
|
47
|
+
isMultiple: {
|
|
48
|
+
type: BooleanConstructor;
|
|
49
|
+
default: boolean;
|
|
50
|
+
};
|
|
51
|
+
curPage: {
|
|
52
|
+
type: NumberConstructor;
|
|
53
|
+
default: number;
|
|
54
|
+
};
|
|
55
|
+
isLastPage: {
|
|
56
|
+
type: BooleanConstructor;
|
|
57
|
+
default: boolean;
|
|
58
|
+
};
|
|
59
|
+
isShowWhole: {
|
|
60
|
+
type: BooleanConstructor;
|
|
61
|
+
default: boolean;
|
|
62
|
+
};
|
|
63
|
+
}>> & {
|
|
64
|
+
onUpdateSelect?: ((...args: any[]) => any) | undefined;
|
|
65
|
+
onUpdatePage?: ((...args: any[]) => any) | undefined;
|
|
66
|
+
}>>;
|
|
67
|
+
emit: (event: "updateSelect" | "updatePage", ...args: any[]) => void;
|
|
68
|
+
dragEndWidth: import("vue").Ref<number>;
|
|
69
|
+
showKeys: import("vue").ComputedRef<any>;
|
|
70
|
+
titleList: import("vue").ComputedRef<string[]>;
|
|
71
|
+
handleSelect: (option: any) => void;
|
|
72
|
+
searchByPage: (onePage: number) => void;
|
|
73
|
+
changeWidth: ({ distance }: any) => void;
|
|
74
|
+
saveWidth: () => void;
|
|
75
|
+
NEmpty: any;
|
|
76
|
+
NButtonGroup: any;
|
|
77
|
+
NButton: any;
|
|
78
|
+
NIcon: any;
|
|
79
|
+
NPopover: any;
|
|
80
|
+
vFlexibleResize: {
|
|
81
|
+
mounted(el: any, { value }: any): void;
|
|
82
|
+
beforeUnmount(el: any): void;
|
|
83
|
+
};
|
|
84
|
+
WidgetValEnums: {
|
|
85
|
+
CUSTOM: string;
|
|
86
|
+
FIRST_VAL: string;
|
|
87
|
+
WHOLE: string;
|
|
88
|
+
NOW: string;
|
|
89
|
+
TODAY: string;
|
|
90
|
+
TODAY_START: string;
|
|
91
|
+
TODAY_END: string;
|
|
92
|
+
TOMORROW: string;
|
|
93
|
+
TOMORROW_START: string;
|
|
94
|
+
TOMORROW_END: string;
|
|
95
|
+
YESTERDAY: string;
|
|
96
|
+
YESTERDAY_START: string;
|
|
97
|
+
YESTERDAY_END: string;
|
|
98
|
+
THIS_WEEK: string;
|
|
99
|
+
WEEK_START: string;
|
|
100
|
+
WEEK_END: string;
|
|
101
|
+
NEXT_WEEK: string;
|
|
102
|
+
LAST_WEEK: string;
|
|
103
|
+
THIS_MONTH: string;
|
|
104
|
+
MONTH_START: string;
|
|
105
|
+
MONTH_END: string;
|
|
106
|
+
NEXT_MONTH: string;
|
|
107
|
+
LAST_MONTH: string;
|
|
108
|
+
THIS_QUARTER: string;
|
|
109
|
+
NEXT_QUARTER: string;
|
|
110
|
+
LAST_QUARTER: string;
|
|
111
|
+
THIS_YEAR: string;
|
|
112
|
+
NEXT_YEAR: string;
|
|
113
|
+
LAST_YEAR: string;
|
|
114
|
+
};
|
|
115
|
+
ArrowBack: 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<{}>>, {}>;
|
|
116
|
+
ArrowForward: 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<{}>>, {}>;
|
|
117
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("updateSelect" | "updatePage")[], "updateSelect" | "updatePage", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
118
|
+
dynamicOptionInfo: {
|
|
119
|
+
type: PropType<AnyObject>;
|
|
120
|
+
default: () => {};
|
|
121
|
+
};
|
|
122
|
+
fieldTitleList: {
|
|
123
|
+
type: PropType<AnyObject[]>;
|
|
124
|
+
default: () => never[];
|
|
125
|
+
};
|
|
126
|
+
optionList: {
|
|
127
|
+
type: PropType<AnyObject[]>;
|
|
128
|
+
default: () => never[];
|
|
129
|
+
};
|
|
130
|
+
isMultiple: {
|
|
131
|
+
type: BooleanConstructor;
|
|
132
|
+
default: boolean;
|
|
133
|
+
};
|
|
134
|
+
curPage: {
|
|
135
|
+
type: NumberConstructor;
|
|
136
|
+
default: number;
|
|
137
|
+
};
|
|
138
|
+
isLastPage: {
|
|
139
|
+
type: BooleanConstructor;
|
|
140
|
+
default: boolean;
|
|
141
|
+
};
|
|
142
|
+
isShowWhole: {
|
|
143
|
+
type: BooleanConstructor;
|
|
144
|
+
default: boolean;
|
|
145
|
+
};
|
|
146
|
+
}>> & {
|
|
147
|
+
onUpdateSelect?: ((...args: any[]) => any) | undefined;
|
|
148
|
+
onUpdatePage?: ((...args: any[]) => any) | undefined;
|
|
149
|
+
}, {
|
|
150
|
+
dynamicOptionInfo: AnyObject;
|
|
151
|
+
fieldTitleList: AnyObject[];
|
|
152
|
+
optionList: AnyObject[];
|
|
153
|
+
isMultiple: boolean;
|
|
154
|
+
curPage: number;
|
|
155
|
+
isLastPage: boolean;
|
|
156
|
+
isShowWhole: boolean;
|
|
157
|
+
}>;
|
|
158
|
+
export default _default;
|
|
@@ -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 i,withDirectives as a,openBlock as n,createElementBlock as l,normalizeStyle as o,createBlock as s,unref as c,Fragment as u,renderList as d,toDisplayString as p,createCommentVNode as r,createElementVNode as v,normalizeClass as m,withCtx as f,createTextVNode as y,createVNode as h}from"vue";import{NEmpty as g,NPopover as L,NButtonGroup as k,NButton as b,NIcon as E}from"naive-ui";import P from"../../../../../../classification/src/directive/flexibleResize.js";import{WidgetValEnums as O}from"../../../../types/enums.js";import{ArrowBack as W,ArrowForward as _}from"@vicons/ionicons5";const x={key:0,class:"dynamic-header"},M={class:"dynamic-content"},S=["onClick"],C={key:0,class:"content"},j={class:"content"},w={class:"dynamic-pagination"};var z=e({__name:"index",props:{dynamicOptionInfo:{type:Object,default:()=>({})},fieldTitleList:{type:Array,default:()=>[]},optionList:{type:Array,default:()=>[]},isMultiple:{type:Boolean,default:!1},curPage:{type:Number,default:1},isLastPage:{type:Boolean,default:!1},isShowWhole:{type:Boolean,default:!1}},emits:["updateSelect","updatePage"],setup(e,{emit:z}){const B=e,H=t(200),A=i((()=>{var e,t;return null!=(t=null==(e=B.dynamicOptionInfo)?void 0:e.showKeys)?t:[]})),I=i((()=>A.value&&A.value.length>0?A.value.map((e=>{let t="";return B.fieldTitleList.forEach((i=>{i.columnName===e&&(t=i.title)})),t})):[]));function N(e){const t=B.curPage+e;z("updatePage",t)}function R({distance:e}){const t=H.value+e;H.value=Math.min(Math.max(t,200),1e3)}function T(){}return(t,i)=>a((n(),l("div",{class:"select-dynamic-options",style:o({minWidth:H.value+"px",position:"relative"})},[0===e.optionList.length?(n(),s(c(g),{key:0,description:"无数据"})):(n(),l(u,{key:1},[c(I)&&c(I).length>1?(n(),l("div",x,[(n(!0),l(u,null,d(c(I),(e=>(n(),l("span",{key:e,class:"name"},p(e),1)))),128))])):r("v-if",!0),v("ul",M,[(n(!0),l(u,null,d(e.optionList,(t=>(n(),l("li",{class:m(t.actived?"actived":""),key:t.value,onClick:e=>function(e){var t,i,a;if(!B.isMultiple||e.value===O.WHOLE)return null==(t=B.optionList)||t.forEach((e=>{e.actived=!1})),e.actived=!0,void z("updateSelect",[e.value]);null==(i=B.optionList)||i.forEach((e=>{e.value===O.WHOLE&&(e.actived=!1)})),e.actived?e.actived=!1:e.actived=!0;const n=null==(a=B.optionList)?void 0:a.filter((e=>e.actived)).map((e=>e.value));z("updateSelect",n)}(t)},[e.isShowWhole&&t.value===c(O).WHOLE?(n(),l("span",C,p(t.label),1)):(n(!0),l(u,{key:1},d(c(A),(e=>(n(),s(c(L),{key:e,trigger:"hover",duration:0},{trigger:f((()=>[v("span",j,p(t[e]),1)])),default:f((()=>[y(" "+p(t[e]),1)])),_:2},1024)))),128))],10,S)))),128))]),v("div",w,[h(c(k),null,{default:f((()=>[h(c(b),{onClick:i[0]||(i[0]=e=>N(-1)),disabled:e.curPage<=1},{icon:f((()=>[h(c(E),{component:c(W),size:"16"},null,8,["component"])])),default:f((()=>[y(" 上一页 ")])),_:1},8,["disabled"]),h(c(b),{"icon-placement":"right",onClick:i[1]||(i[1]=e=>N(1)),disabled:e.isLastPage},{icon:f((()=>[h(c(E),{component:c(_),size:"16"},null,8,["component"])])),default:f((()=>[y(" 下一页 ")])),_:1},8,["disabled"])])),_:1})])],64))],4)),[[c(P),{mode:"VR",onMove:R,onEnd:T}]])}});export{z as default};
|