cnhis-design-vue 3.1.54-beta.20 → 3.1.54-beta.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/components/chat-sdk/src/chatSDK.d.ts +12 -0
- package/es/components/chat-sdk/src/chatSDK.js +1 -1
- package/es/components/classification/index.d.ts +498 -1
- package/es/components/classification/src/components/search-filter/index.vue.d.ts +485 -1
- 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 +485 -1
- package/es/components/classification/src/index.vue.d.ts +498 -1
- package/es/components/classification/src/index.vue2.js +1 -1
- package/es/components/classification/style/index.css +1 -1
- package/es/components/form-config/index.d.ts +45 -45
- package/es/components/form-config/src/FormConfig.vue.d.ts +45 -45
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +15 -15
- package/es/components/form-config/src/components/FormConfigEventSetting.vue.d.ts +5 -5
- package/es/components/index.css +1 -1
- package/es/components/quick-search/style/index.css +1 -1
- package/es/components/shortcut-setter/index.d.ts +5 -5
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +5 -5
- package/es/components/table-filter/src/components/bi-filter/ValueCfg.vue.d.ts +332 -0
- package/es/components/table-filter/src/components/bi-filter/ValueCfg.vue.js +1 -0
- package/es/components/table-filter/src/components/bi-filter/ValueCfg.vue2.js +1 -0
- package/es/components/table-filter/src/components/bi-filter/components/Date.vue.d.ts +127 -0
- package/es/components/table-filter/src/components/bi-filter/components/Date.vue.js +1 -0
- package/es/components/table-filter/src/components/bi-filter/components/Date.vue2.js +1 -0
- package/es/components/table-filter/src/components/bi-filter/components/InputFilter.vue.d.ts +41 -0
- package/es/components/table-filter/src/components/bi-filter/components/InputFilter.vue.js +1 -0
- package/es/components/table-filter/src/components/bi-filter/components/InputFilter.vue2.js +1 -0
- package/es/components/table-filter/src/components/bi-filter/components/InputNumber.vue.d.ts +28 -0
- package/es/components/table-filter/src/components/bi-filter/components/InputNumber.vue.js +1 -0
- package/es/components/table-filter/src/components/bi-filter/components/InputNumber.vue2.js +1 -0
- package/es/components/table-filter/src/components/bi-filter/components/SelectFilter.vue.d.ts +51 -0
- package/es/components/table-filter/src/components/bi-filter/components/SelectFilter.vue.js +1 -0
- package/es/components/table-filter/src/components/bi-filter/components/SelectFilter.vue2.js +1 -0
- package/es/components/table-filter/src/components/bi-filter/components/index.d.ts +244 -0
- package/es/components/table-filter/src/components/bi-filter/components/index.js +1 -0
- package/es/components/table-filter/src/components/bi-filter/helpers/options.d.ts +14 -0
- package/es/components/table-filter/src/components/bi-filter/helpers/options.js +1 -0
- package/es/components/table-filter/src/components/bi-filter/hooks/useBiConditions.d.ts +13 -0
- package/es/components/table-filter/src/components/bi-filter/hooks/useBiConditions.js +1 -0
- package/es/components/table-filter/src/components/bi-filter/index.vue.d.ts +486 -0
- package/es/components/table-filter/src/components/bi-filter/index.vue.js +1 -0
- package/es/components/table-filter/src/components/bi-filter/index.vue2.js +1 -0
- package/es/components/table-filter/src/constants/index.d.ts +1 -0
- package/es/components/table-filter/src/constants/index.js +1 -1
- package/es/shared/package.json.js +1 -1
- package/package.json +3 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{defineComponent as e,computed as u,openBlock as l,createBlock as a,unref as t,isRef as m}from"vue";import{NInputNumber as r}from"naive-ui";var o=e({__name:"InputNumber",props:{modelValue:{type:[String,Number,Array],default:null}},emits:["update:modelValue"],setup(e,{emit:o}){const p=e,n=u({set(e){o("update:modelValue",e)},get:()=>p.modelValue});return(e,u)=>(l(),a(t(r),{class:"form-item",value:t(n),"onUpdate:value":u[0]||(u[0]=e=>m(n)?n.value=e:null)},null,8,["value"]))}});export{o as default};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{
|
|
2
|
+
paramCfg: {
|
|
3
|
+
type: ObjectConstructor;
|
|
4
|
+
default: null;
|
|
5
|
+
};
|
|
6
|
+
modelValue: {
|
|
7
|
+
type: (ArrayConstructor | NumberConstructor | StringConstructor)[];
|
|
8
|
+
default: null;
|
|
9
|
+
};
|
|
10
|
+
}, {
|
|
11
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
12
|
+
paramCfg: {
|
|
13
|
+
type: ObjectConstructor;
|
|
14
|
+
default: null;
|
|
15
|
+
};
|
|
16
|
+
modelValue: {
|
|
17
|
+
type: (ArrayConstructor | NumberConstructor | StringConstructor)[];
|
|
18
|
+
default: null;
|
|
19
|
+
};
|
|
20
|
+
}>> & {
|
|
21
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
22
|
+
}>>;
|
|
23
|
+
emit: (event: "update:modelValue", ...args: any[]) => void;
|
|
24
|
+
valueCp: import("vue").WritableComputedRef<any>;
|
|
25
|
+
optionSetting: import("vue").ComputedRef<any>;
|
|
26
|
+
widgetOptions: import("vue").ComputedRef<any>;
|
|
27
|
+
NSelect: any;
|
|
28
|
+
WidgetOptionEnums: {
|
|
29
|
+
RADIO: string;
|
|
30
|
+
MULTIPLE: string;
|
|
31
|
+
ALL: string;
|
|
32
|
+
SELECT_TIME: string;
|
|
33
|
+
PAST_TIME: string;
|
|
34
|
+
FUTURE_TIME: string;
|
|
35
|
+
};
|
|
36
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
37
|
+
paramCfg: {
|
|
38
|
+
type: ObjectConstructor;
|
|
39
|
+
default: null;
|
|
40
|
+
};
|
|
41
|
+
modelValue: {
|
|
42
|
+
type: (ArrayConstructor | NumberConstructor | StringConstructor)[];
|
|
43
|
+
default: null;
|
|
44
|
+
};
|
|
45
|
+
}>> & {
|
|
46
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
47
|
+
}, {
|
|
48
|
+
modelValue: string | number | unknown[];
|
|
49
|
+
paramCfg: Record<string, any>;
|
|
50
|
+
}>;
|
|
51
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"./SelectFilter.vue2.js";import r from"../../../../../../_virtual/_plugin-vue_export-helper.js";var t=r(e,[["__file","SelectFilter.vue"]]);export{t as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{defineComponent as e,computed as t,openBlock as l,createBlock as a,unref as u,isRef as o}from"vue";import{NSelect as p}from"naive-ui";import{WidgetOptionEnums as r}from"../../../types/enums.js";var m=e({__name:"SelectFilter",props:{paramCfg:{type:Object,default:null},modelValue:{type:[String,Number,Array],default:null}},emits:["update:modelValue"],setup(e,{emit:m}){const n=e,i=t({set(e){m("update:modelValue",e)},get:()=>n.modelValue}),d=t((()=>{var e;return null==(e=n.paramCfg)?void 0:e.optionSetting})),s=t((()=>{var e;const t=null==(e=n.paramCfg)?void 0:e.mappingConfig;return t&&(null==t?void 0:t.mapping)?t.mapping:[]}));return(e,t)=>(l(),a(u(p),{style:{width:"200px"},class:"form-item",value:u(i),"onUpdate:value":t[0]||(t[0]=e=>o(i)?i.value=e:null),to:"body",filterable:"",options:u(s),multiple:u(d)===u(r).MULTIPLE,maxTagCount:1},null,8,["value","options","multiple"]))}});export{m as default};
|
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
declare const Date: import("vue").DefineComponent<{
|
|
2
|
+
componentCfg: {
|
|
3
|
+
type: ObjectConstructor;
|
|
4
|
+
};
|
|
5
|
+
paramCfg: {
|
|
6
|
+
type: ObjectConstructor;
|
|
7
|
+
default: null;
|
|
8
|
+
};
|
|
9
|
+
modelValue: {
|
|
10
|
+
type: (ArrayConstructor | NumberConstructor | StringConstructor)[];
|
|
11
|
+
default: null;
|
|
12
|
+
};
|
|
13
|
+
}, {
|
|
14
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
15
|
+
componentCfg: {
|
|
16
|
+
type: ObjectConstructor;
|
|
17
|
+
};
|
|
18
|
+
paramCfg: {
|
|
19
|
+
type: ObjectConstructor;
|
|
20
|
+
default: null;
|
|
21
|
+
};
|
|
22
|
+
modelValue: {
|
|
23
|
+
type: (ArrayConstructor | NumberConstructor | StringConstructor)[];
|
|
24
|
+
default: null;
|
|
25
|
+
};
|
|
26
|
+
}>> & {
|
|
27
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
28
|
+
}>>;
|
|
29
|
+
emit: (event: "update:modelValue", ...args: any[]) => void;
|
|
30
|
+
valueCp: import("vue").WritableComputedRef<any>;
|
|
31
|
+
dateType: any;
|
|
32
|
+
valueFormat: import("vue").ComputedRef<string>;
|
|
33
|
+
compType: import("vue").ComputedRef<any>;
|
|
34
|
+
CDatePicker: import("../../../../..").SFCWithInstall<import("vue").DefineComponent<{
|
|
35
|
+
updateUnchangedValue: {
|
|
36
|
+
type: BooleanConstructor;
|
|
37
|
+
};
|
|
38
|
+
onConfirm: {
|
|
39
|
+
type: FunctionConstructor;
|
|
40
|
+
};
|
|
41
|
+
formattedValue: {
|
|
42
|
+
type: import("vue").PropType<(string | [string, string]) | null | undefined>;
|
|
43
|
+
};
|
|
44
|
+
placeholder: {
|
|
45
|
+
type: StringConstructor;
|
|
46
|
+
};
|
|
47
|
+
allowedInvalidValue: {
|
|
48
|
+
type: StringConstructor;
|
|
49
|
+
};
|
|
50
|
+
}, {
|
|
51
|
+
attrs: {
|
|
52
|
+
[x: string]: unknown;
|
|
53
|
+
};
|
|
54
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
55
|
+
updateUnchangedValue: {
|
|
56
|
+
type: BooleanConstructor;
|
|
57
|
+
};
|
|
58
|
+
onConfirm: {
|
|
59
|
+
type: FunctionConstructor;
|
|
60
|
+
};
|
|
61
|
+
formattedValue: {
|
|
62
|
+
type: import("vue").PropType<(string | [string, string]) | null | undefined>;
|
|
63
|
+
};
|
|
64
|
+
placeholder: {
|
|
65
|
+
type: StringConstructor;
|
|
66
|
+
};
|
|
67
|
+
allowedInvalidValue: {
|
|
68
|
+
type: StringConstructor;
|
|
69
|
+
};
|
|
70
|
+
}>> & {
|
|
71
|
+
"onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
|
|
72
|
+
}>>;
|
|
73
|
+
emit: (event: "update:formatted-value", ...args: any[]) => void;
|
|
74
|
+
datePickerRef: import("vue").Ref<import("../../../../..").AnyObject | null>;
|
|
75
|
+
panelInstRef: import("vue").Ref<null>;
|
|
76
|
+
placeholderRef: import("vue").Ref<any>;
|
|
77
|
+
currentFormattedValue: import("vue").WritableComputedRef<(string | [string, string]) | null | undefined>;
|
|
78
|
+
isDateTime: import("vue").ComputedRef<boolean>;
|
|
79
|
+
formatRef: import("vue").ComputedRef<string>;
|
|
80
|
+
panelFormatRef: import("vue").ComputedRef<string | [string, string]>;
|
|
81
|
+
focus: () => any;
|
|
82
|
+
blur: () => any;
|
|
83
|
+
handleConfirm: (target: HTMLInputElement) => void;
|
|
84
|
+
onUpdateShow: (show: boolean) => void;
|
|
85
|
+
onConfirm: (...args: any[]) => Promise<void>;
|
|
86
|
+
isAllowedInvalidValue: (value: (string | [string, string]) | null | undefined) => boolean | "" | undefined;
|
|
87
|
+
NDatePicker: any;
|
|
88
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:formatted-value"[], "update:formatted-value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
89
|
+
updateUnchangedValue: {
|
|
90
|
+
type: BooleanConstructor;
|
|
91
|
+
};
|
|
92
|
+
onConfirm: {
|
|
93
|
+
type: FunctionConstructor;
|
|
94
|
+
};
|
|
95
|
+
formattedValue: {
|
|
96
|
+
type: import("vue").PropType<(string | [string, string]) | null | undefined>;
|
|
97
|
+
};
|
|
98
|
+
placeholder: {
|
|
99
|
+
type: StringConstructor;
|
|
100
|
+
};
|
|
101
|
+
allowedInvalidValue: {
|
|
102
|
+
type: StringConstructor;
|
|
103
|
+
};
|
|
104
|
+
}>> & {
|
|
105
|
+
"onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
|
|
106
|
+
}, {
|
|
107
|
+
updateUnchangedValue: boolean;
|
|
108
|
+
}>>;
|
|
109
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
110
|
+
componentCfg: {
|
|
111
|
+
type: ObjectConstructor;
|
|
112
|
+
};
|
|
113
|
+
paramCfg: {
|
|
114
|
+
type: ObjectConstructor;
|
|
115
|
+
default: null;
|
|
116
|
+
};
|
|
117
|
+
modelValue: {
|
|
118
|
+
type: (ArrayConstructor | NumberConstructor | StringConstructor)[];
|
|
119
|
+
default: null;
|
|
120
|
+
};
|
|
121
|
+
}>> & {
|
|
122
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
123
|
+
}, {
|
|
124
|
+
modelValue: string | number | unknown[];
|
|
125
|
+
paramCfg: Record<string, any>;
|
|
126
|
+
}>;
|
|
127
|
+
declare const InputFilter: import("vue").DefineComponent<{
|
|
128
|
+
paramCfg: {
|
|
129
|
+
type: ObjectConstructor;
|
|
130
|
+
default: null;
|
|
131
|
+
};
|
|
132
|
+
modelValue: {
|
|
133
|
+
type: (ArrayConstructor | NumberConstructor | StringConstructor)[];
|
|
134
|
+
default: null;
|
|
135
|
+
};
|
|
136
|
+
}, {
|
|
137
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
138
|
+
paramCfg: {
|
|
139
|
+
type: ObjectConstructor;
|
|
140
|
+
default: null;
|
|
141
|
+
};
|
|
142
|
+
modelValue: {
|
|
143
|
+
type: (ArrayConstructor | NumberConstructor | StringConstructor)[];
|
|
144
|
+
default: null;
|
|
145
|
+
};
|
|
146
|
+
}>> & {
|
|
147
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
148
|
+
}>>;
|
|
149
|
+
emit: (event: "update:modelValue", ...args: any[]) => void;
|
|
150
|
+
valueCp: import("vue").WritableComputedRef<any>;
|
|
151
|
+
NInput: any;
|
|
152
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
153
|
+
paramCfg: {
|
|
154
|
+
type: ObjectConstructor;
|
|
155
|
+
default: null;
|
|
156
|
+
};
|
|
157
|
+
modelValue: {
|
|
158
|
+
type: (ArrayConstructor | NumberConstructor | StringConstructor)[];
|
|
159
|
+
default: null;
|
|
160
|
+
};
|
|
161
|
+
}>> & {
|
|
162
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
163
|
+
}, {
|
|
164
|
+
modelValue: string | number | unknown[];
|
|
165
|
+
paramCfg: Record<string, any>;
|
|
166
|
+
}>;
|
|
167
|
+
declare const InputNumber: import("vue").DefineComponent<{
|
|
168
|
+
modelValue: {
|
|
169
|
+
type: (ArrayConstructor | NumberConstructor | StringConstructor)[];
|
|
170
|
+
default: null;
|
|
171
|
+
};
|
|
172
|
+
}, {
|
|
173
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
174
|
+
modelValue: {
|
|
175
|
+
type: (ArrayConstructor | NumberConstructor | StringConstructor)[];
|
|
176
|
+
default: null;
|
|
177
|
+
};
|
|
178
|
+
}>> & {
|
|
179
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
180
|
+
}>>;
|
|
181
|
+
emit: (event: "update:modelValue", ...args: any[]) => void;
|
|
182
|
+
valueCp: import("vue").WritableComputedRef<any>;
|
|
183
|
+
NInputNumber: any;
|
|
184
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
185
|
+
modelValue: {
|
|
186
|
+
type: (ArrayConstructor | NumberConstructor | StringConstructor)[];
|
|
187
|
+
default: null;
|
|
188
|
+
};
|
|
189
|
+
}>> & {
|
|
190
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
191
|
+
}, {
|
|
192
|
+
modelValue: string | number | unknown[];
|
|
193
|
+
}>;
|
|
194
|
+
declare const SelectFilter: import("vue").DefineComponent<{
|
|
195
|
+
paramCfg: {
|
|
196
|
+
type: ObjectConstructor;
|
|
197
|
+
default: null;
|
|
198
|
+
};
|
|
199
|
+
modelValue: {
|
|
200
|
+
type: (ArrayConstructor | NumberConstructor | StringConstructor)[];
|
|
201
|
+
default: null;
|
|
202
|
+
};
|
|
203
|
+
}, {
|
|
204
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
205
|
+
paramCfg: {
|
|
206
|
+
type: ObjectConstructor;
|
|
207
|
+
default: null;
|
|
208
|
+
};
|
|
209
|
+
modelValue: {
|
|
210
|
+
type: (ArrayConstructor | NumberConstructor | StringConstructor)[];
|
|
211
|
+
default: null;
|
|
212
|
+
};
|
|
213
|
+
}>> & {
|
|
214
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
215
|
+
}>>;
|
|
216
|
+
emit: (event: "update:modelValue", ...args: any[]) => void;
|
|
217
|
+
valueCp: import("vue").WritableComputedRef<any>;
|
|
218
|
+
optionSetting: import("vue").ComputedRef<any>;
|
|
219
|
+
widgetOptions: import("vue").ComputedRef<any>;
|
|
220
|
+
NSelect: any;
|
|
221
|
+
WidgetOptionEnums: {
|
|
222
|
+
RADIO: string;
|
|
223
|
+
MULTIPLE: string;
|
|
224
|
+
ALL: string;
|
|
225
|
+
SELECT_TIME: string;
|
|
226
|
+
PAST_TIME: string;
|
|
227
|
+
FUTURE_TIME: string;
|
|
228
|
+
};
|
|
229
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
230
|
+
paramCfg: {
|
|
231
|
+
type: ObjectConstructor;
|
|
232
|
+
default: null;
|
|
233
|
+
};
|
|
234
|
+
modelValue: {
|
|
235
|
+
type: (ArrayConstructor | NumberConstructor | StringConstructor)[];
|
|
236
|
+
default: null;
|
|
237
|
+
};
|
|
238
|
+
}>> & {
|
|
239
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
240
|
+
}, {
|
|
241
|
+
modelValue: string | number | unknown[];
|
|
242
|
+
paramCfg: Record<string, any>;
|
|
243
|
+
}>;
|
|
244
|
+
export { Date, InputFilter, InputNumber, SelectFilter };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{defineAsyncComponent as t}from"vue";const e=t((()=>import("./Date.vue.js"))),r=t((()=>import("./InputFilter.vue.js"))),o=t((()=>import("./InputNumber.vue.js"))),p=t((()=>import("./SelectFilter.vue.js")));export{e as Date,r as InputFilter,o as InputNumber,p as SelectFilter};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare const filterConditionTypeOptions: {
|
|
2
|
+
type: string;
|
|
3
|
+
options: {
|
|
4
|
+
label: string;
|
|
5
|
+
value: string;
|
|
6
|
+
}[];
|
|
7
|
+
}[];
|
|
8
|
+
export declare const typeMappingOptions: {
|
|
9
|
+
TEXT: string;
|
|
10
|
+
SELECT: string;
|
|
11
|
+
NUMBER: string;
|
|
12
|
+
DATE: string;
|
|
13
|
+
DATETIME: string;
|
|
14
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{WidgetTypeEnums as l}from"../../../types/enums.js";const e=[{label:"为空",value:"NULL"},{label:"不为空",value:"NOT_NULL"},{label:"等于",value:"IN"},{label:"今天",value:"TODAY"},{label:"明天",value:"TOMORROW"},{label:"昨天",value:"YESTERDAY"},{label:"本周",value:"THIS_WEEK"},{label:"下周",value:"NEXT_WEEK"},{label:"上周",value:"UP_WEEK"},{label:"本月",value:"THIS_MONTH"},{label:"下月",value:"NEXT_MONTH"},{label:"上月",value:"UP_MONTH"},{label:"本季度",value:"THIS_SEASON"},{label:"下季度",value:"NEXT_SEASON"},{label:"上季度",value:"UP_SEASON"},{label:"本年",value:"THIS_YEAR"},{label:"下年",value:"NEXT_YEAR"},{label:"上年",value:"UP_YEAR"},{label:"大于",value:"BIG"},{label:"小于",value:"LESS"},{label:"大于等于",value:"BIGEQ"},{label:"小于等于",value:"LESSEQ"}],a=[{type:"DATE",options:e},{type:"DATETIME",options:e},{type:"TEXT",options:[{label:"为空",value:"NULL"},{label:"不为空",value:"NOT_NULL"},{label:"包含",value:"CL"},{label:"不包含",value:"NC"},{label:"等于",value:"EQ"},{label:"不等于",value:"NEQ"}]},{type:"NUMBER",options:[{label:"为空",value:"NULL"},{label:"不为空",value:"NOT_NULL"},{label:"等于",value:"EQ"},{label:"大于",value:"BIG"},{label:"小于",value:"LESS"}]}],E={TEXT:l.INPUT,SELECT:l.INPUT,NUMBER:l.INPUT_NUMBER,DATE:l.DATE,DATETIME:l.DATE_TIME};export{a as filterConditionTypeOptions,E as typeMappingOptions};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
import { ISearchConfigType } from '../../../../../../../es/components/table-filter/src/types';
|
|
3
|
+
export declare const useBiConditions: (filterConditions: Ref, selectList: any, dataType: string) => {
|
|
4
|
+
State: any;
|
|
5
|
+
paramOptions: import("vue").ComputedRef<any>;
|
|
6
|
+
addFilterCondition: () => void;
|
|
7
|
+
delFilterCondition: (index: number) => void;
|
|
8
|
+
updateKey: (index: number, val: any) => void;
|
|
9
|
+
updateCondition: (index: number, val: any) => void;
|
|
10
|
+
getParamCfg: (key: string) => any;
|
|
11
|
+
initFilterConditions: (tableId: string, rawConditions: ISearchConfigType[]) => Promise<void>;
|
|
12
|
+
getRawFilterConditions: () => any;
|
|
13
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{reactive as e,computed as t}from"vue";import{WidgetTypeEnums as i,ConditionEnums as n}from"../../../types/enums.js";import{transformDataToFront as a}from"../../../tool/transformData.js";import{typeMappingOptions as o,filterConditionTypeOptions as l}from"../helpers/options.js";import{DatePresetValEnums as r}from"../../render-widget/enums.js";import{presetValToTimestamp as p}from"../../render-widget/helpers/presetValToTimestamp.js";const s=(s,d,u)=>{const f=e({params:[]}),m=t((()=>f.params.map((({p_name:e,title:t})=>({label:t||e,value:e}))))),c=e=>f.params.find((t=>t.p_name===e)),y=e=>{e.con=e.value="";[i.DATE,i.DATE_TIME].includes(e.fieldType)&&(e.value=null)};return{State:f,paramOptions:m,addFilterCondition:()=>{s.value.push({fieldId:"",fieldType:"",con:"",value:"",biTypeOptions:[]})},delFilterCondition:e=>{s.value.splice(e,1)},updateKey:(e,t)=>{const i=s.value[e];i&&(y(i),i.fieldId=t,(e=>{const t=c(e.fieldId)._rawData.type,i=o[t];if(!i)return!1;e.fieldType=i;const n=l.find((e=>e.type===i));n&&(e.biTypeOptions=n.options)})(i))},updateCondition:(e,t)=>{const i=s.value[e];i&&(y(i),i.con=t)},getParamCfg:c,initFilterConditions:async(e,t)=>{const m=await(async e=>{try{return a(u,d)}catch(e){return[]}})();f.params=m,s.value=(e=>e.map((e=>{if(e.field_key){const t=c(e.field_key)._rawData.type;if(!o[t])return null;const a=o[t];e.unit&&e.unit!==r.CUSTOM&&(a===i.DATE&&(e.value=p(e.unit,"YYYY-MM-DD")),a===i.DATE_TIME&&(e.value=p(e.unit,"YYYY-MM-DD HH:mm:ss")));const s=[i.DATE,i.DATE_TIME];e.con=e.con===n.EQUAL&&s.includes(a)?"IN":e.con;let d=[];const u=l.find((e=>e.type===a));return u&&(d=u.options),{fieldId:e.field_key,fieldType:a,biTypeOptions:d,con:e.con,value:Array.isArray(e.value)?e.value.join(","):e.value}}return e})).filter((e=>null!=e)))(t)},getRawFilterConditions:()=>s.value.map((e=>({fieldId:e.fieldId,fieldType:e.fieldType,con:e.con,value:e.value})))}};export{s as useBiConditions};
|