yahee-components 0.0.50 → 0.0.51
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.
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as oe, mergeDefaults as re, toRefs as se, ref as n, createBlock as d, openBlock as s, unref as l, withCtx as t, createElementVNode as x, createVNode as o, withKeys as ue, createSlots as ne, createElementBlock as y, Fragment as b, renderList as g, createCommentVNode as G, createTextVNode as C, toDisplayString as V } from "vue";
|
|
2
2
|
import T from "../_virtual/lodash.js";
|
|
3
|
-
import { defaultComplexSearchProps as
|
|
4
|
-
import { ElConfigProvider as ie, ElInput as
|
|
3
|
+
import { defaultComplexSearchProps as ce } from "./props.js";
|
|
4
|
+
import { ElConfigProvider as ie, ElInput as L, ElIcon as de, ElSelect as k, ElOption as S, ElCheckbox as pe, ElLink as me, ElDialog as he, ElForm as fe, ElRow as R, ElFormItem as W, ElButton as D } from "element-plus";
|
|
5
5
|
import "element-plus/theme-chalk/src/base.scss";
|
|
6
6
|
import "element-plus/theme-chalk/src/input.scss";
|
|
7
7
|
import "element-plus/theme-chalk/src/checkbox.scss";
|
|
@@ -19,12 +19,12 @@ import "element-plus/theme-chalk/src/row.scss";
|
|
|
19
19
|
import "element-plus/theme-chalk/src/button.scss";
|
|
20
20
|
import "element-plus/theme-chalk/src/link.scss";
|
|
21
21
|
import "element-plus/theme-chalk/src/config-provider.scss";
|
|
22
|
-
import { Search as
|
|
23
|
-
import
|
|
24
|
-
const
|
|
22
|
+
import { Search as ve } from "@element-plus/icons-vue";
|
|
23
|
+
import ye from "../node_modules/.pnpm/element-plus@2.9.7_vue@3.5.13_typescript@5.8.3_/node_modules/element-plus/es/locale/lang/zh-cn.js";
|
|
24
|
+
const be = { class: "yahee-complex-search" }, ge = { class: "search-type-checkbox" }, Ce = { class: "dialog-footer" }, He = /* @__PURE__ */ oe({
|
|
25
25
|
name: "YaheeComplexSearch",
|
|
26
26
|
__name: "complex-search",
|
|
27
|
-
props: /* @__PURE__ */
|
|
27
|
+
props: /* @__PURE__ */ re({
|
|
28
28
|
pasteFormat: { type: Function },
|
|
29
29
|
defaultSearch: {},
|
|
30
30
|
options: {},
|
|
@@ -35,63 +35,68 @@ const ye = { class: "yahee-complex-search" }, be = { class: "search-type-checkbo
|
|
|
35
35
|
normalOptions: {},
|
|
36
36
|
showSelect: { type: Boolean },
|
|
37
37
|
searchItem: {}
|
|
38
|
-
},
|
|
38
|
+
}, ce()),
|
|
39
39
|
emits: ["filterChangeGrandson"],
|
|
40
|
-
setup(
|
|
41
|
-
const
|
|
42
|
-
defaultSearch:
|
|
40
|
+
setup(N, { emit: q }) {
|
|
41
|
+
const H = ye, m = q, A = N, {
|
|
42
|
+
defaultSearch: X,
|
|
43
43
|
pasteFormat: F,
|
|
44
44
|
options: B,
|
|
45
|
-
showPatchSearch:
|
|
45
|
+
showPatchSearch: Y,
|
|
46
46
|
specialOptions: P,
|
|
47
|
-
showWithinFilterCheckbox:
|
|
48
|
-
placeholderText:
|
|
49
|
-
normalOptions:
|
|
47
|
+
showWithinFilterCheckbox: j,
|
|
48
|
+
placeholderText: J,
|
|
49
|
+
normalOptions: M,
|
|
50
50
|
showSelect: K,
|
|
51
|
-
searchItem:
|
|
52
|
-
} =
|
|
51
|
+
searchItem: c
|
|
52
|
+
} = se(A), u = n(X.value || "integrated"), h = n(""), f = n(!1), E = n(!1), v = n(!1), O = n(null), r = n({ searchType: "integrated", searchContent: "" }), Q = {
|
|
53
53
|
selectedSearchType: [{ required: !0, message: "请输入查询类型", trigger: "blur" }],
|
|
54
54
|
searchContent: [{ required: !0, message: "请输入查询内容", trigger: "blur" }]
|
|
55
|
-
}, U = [
|
|
55
|
+
}, U = n("WHOLE_SEARCH"), _ = [
|
|
56
56
|
{
|
|
57
57
|
value: "integrated",
|
|
58
58
|
label: "综合搜索"
|
|
59
59
|
}
|
|
60
|
-
],
|
|
60
|
+
], Z = () => {
|
|
61
61
|
v.value = !0;
|
|
62
62
|
}, I = () => {
|
|
63
63
|
v.value = !1;
|
|
64
|
-
},
|
|
65
|
-
f.value || (delete
|
|
66
|
-
},
|
|
67
|
-
h.value ?
|
|
68
|
-
},
|
|
64
|
+
}, $ = () => {
|
|
65
|
+
f.value || (delete c.value.putSearch, m("filterChangeGrandson", c.value, u.value));
|
|
66
|
+
}, ee = () => c.value, w = () => {
|
|
67
|
+
h.value ? ae() : m("filterChangeGrandson", ee(), u.value);
|
|
68
|
+
}, le = (p, a) => {
|
|
69
69
|
const e = { ...p };
|
|
70
70
|
return T.map(P.value, (i) => i.key).includes(a.filterKey) ? P.value.forEach((i) => delete e[i.key]) : delete e[a.filterKey], e;
|
|
71
71
|
};
|
|
72
|
-
function
|
|
72
|
+
function z(p) {
|
|
73
73
|
T.forEach(p, (a) => {
|
|
74
|
-
|
|
74
|
+
le(c.value, a);
|
|
75
75
|
const { checkedValues: e, filterKey: i } = a;
|
|
76
|
-
T.isEmpty(e) || (
|
|
77
|
-
}), m("filterChangeGrandson",
|
|
76
|
+
T.isEmpty(e) || (M.value.includes(i) ? c.value[i] = e[0] : c.value[i] = e);
|
|
77
|
+
}), m("filterChangeGrandson", c.value, u.value);
|
|
78
78
|
}
|
|
79
|
-
const
|
|
80
|
-
f.value ?
|
|
79
|
+
const ae = () => {
|
|
80
|
+
f.value ? z([
|
|
81
81
|
{
|
|
82
82
|
filterKey: "putSearch",
|
|
83
83
|
checkedValues: h.value
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
filterKey: "searchType",
|
|
87
|
+
checkedValues: U.value
|
|
84
88
|
}
|
|
85
89
|
]) : m(
|
|
86
90
|
"filterChangeGrandson",
|
|
87
91
|
{
|
|
88
|
-
putSearch: h.value
|
|
92
|
+
putSearch: h.value,
|
|
93
|
+
searchType: U.value
|
|
89
94
|
},
|
|
90
95
|
u.value
|
|
91
96
|
);
|
|
92
|
-
},
|
|
97
|
+
}, te = () => {
|
|
93
98
|
O.value.validate((p) => {
|
|
94
|
-
p && (
|
|
99
|
+
p && (E.value = !0, f.value ? z([
|
|
95
100
|
{
|
|
96
101
|
filterKey: "putSearch",
|
|
97
102
|
checkedValues: r.value.searchContent
|
|
@@ -107,33 +112,33 @@ const ye = { class: "yahee-complex-search" }, be = { class: "search-type-checkbo
|
|
|
107
112
|
searchType: r.value.searchType
|
|
108
113
|
},
|
|
109
114
|
u.value
|
|
110
|
-
), v.value = !1,
|
|
115
|
+
), v.value = !1, E.value = !1);
|
|
111
116
|
});
|
|
112
117
|
};
|
|
113
|
-
return (p, a) => (s(), d(l(ie), { locale: l(
|
|
118
|
+
return (p, a) => (s(), d(l(ie), { locale: l(H) }, {
|
|
114
119
|
default: t(() => [
|
|
115
|
-
x("div",
|
|
116
|
-
o(l(
|
|
120
|
+
x("div", be, [
|
|
121
|
+
o(l(L), {
|
|
117
122
|
modelValue: h.value,
|
|
118
123
|
"onUpdate:modelValue": a[2] || (a[2] = (e) => h.value = e),
|
|
119
|
-
placeholder: l(
|
|
124
|
+
placeholder: l(J),
|
|
120
125
|
class: "input-with-select",
|
|
121
126
|
clearable: "",
|
|
122
127
|
maxlength: "30",
|
|
123
|
-
onChange:
|
|
124
|
-
onKeyup:
|
|
128
|
+
onChange: w,
|
|
129
|
+
onKeyup: ue(w, ["enter"]),
|
|
125
130
|
onPaste: l(F)
|
|
126
|
-
},
|
|
131
|
+
}, ne({
|
|
127
132
|
append: t(() => [
|
|
128
|
-
o(l(
|
|
133
|
+
o(l(de), {
|
|
129
134
|
size: "12",
|
|
130
135
|
color: "#3366cc",
|
|
131
136
|
style: { cursor: "pointer" },
|
|
132
137
|
class: "icon-cusor",
|
|
133
|
-
onClick:
|
|
138
|
+
onClick: w
|
|
134
139
|
}, {
|
|
135
140
|
default: t(() => [
|
|
136
|
-
o(l(
|
|
141
|
+
o(l(ve))
|
|
137
142
|
]),
|
|
138
143
|
_: 1
|
|
139
144
|
})
|
|
@@ -171,7 +176,7 @@ const ye = { class: "yahee-complex-search" }, be = { class: "search-type-checkbo
|
|
|
171
176
|
disabled: ""
|
|
172
177
|
}, {
|
|
173
178
|
default: t(() => [
|
|
174
|
-
(s(), y(b, null, g(
|
|
179
|
+
(s(), y(b, null, g(_, (e) => o(l(S), {
|
|
175
180
|
key: e.label,
|
|
176
181
|
label: e.label,
|
|
177
182
|
value: e.value
|
|
@@ -183,31 +188,31 @@ const ye = { class: "yahee-complex-search" }, be = { class: "search-type-checkbo
|
|
|
183
188
|
key: "1"
|
|
184
189
|
}
|
|
185
190
|
]), 1032, ["modelValue", "placeholder", "onPaste"]),
|
|
186
|
-
x("div",
|
|
187
|
-
l(
|
|
191
|
+
x("div", ge, [
|
|
192
|
+
l(j) ? (s(), d(l(pe), {
|
|
188
193
|
key: 0,
|
|
189
194
|
modelValue: f.value,
|
|
190
195
|
"onUpdate:modelValue": a[3] || (a[3] = (e) => f.value = e),
|
|
191
|
-
onChange:
|
|
196
|
+
onChange: $
|
|
192
197
|
}, {
|
|
193
198
|
default: t(() => a[8] || (a[8] = [
|
|
194
199
|
C(V("在筛选条件内查询"))
|
|
195
200
|
])),
|
|
196
201
|
_: 1
|
|
197
|
-
}, 8, ["modelValue"])) :
|
|
198
|
-
l(
|
|
202
|
+
}, 8, ["modelValue"])) : G("", !0),
|
|
203
|
+
l(Y) ? (s(), d(l(me), {
|
|
199
204
|
key: 1,
|
|
200
205
|
type: "primary",
|
|
201
|
-
onClick:
|
|
206
|
+
onClick: Z
|
|
202
207
|
}, {
|
|
203
208
|
default: t(() => a[9] || (a[9] = [
|
|
204
209
|
C(V("批量查询"))
|
|
205
210
|
])),
|
|
206
211
|
_: 1
|
|
207
|
-
})) :
|
|
212
|
+
})) : G("", !0)
|
|
208
213
|
])
|
|
209
214
|
]),
|
|
210
|
-
o(l(
|
|
215
|
+
o(l(he), {
|
|
211
216
|
modelValue: v.value,
|
|
212
217
|
"onUpdate:modelValue": a[7] || (a[7] = (e) => v.value = e),
|
|
213
218
|
title: "批量查询",
|
|
@@ -217,18 +222,18 @@ const ye = { class: "yahee-complex-search" }, be = { class: "search-type-checkbo
|
|
|
217
222
|
draggable: ""
|
|
218
223
|
}, {
|
|
219
224
|
footer: t(() => [
|
|
220
|
-
x("div",
|
|
221
|
-
o(l(
|
|
225
|
+
x("div", Ce, [
|
|
226
|
+
o(l(D), {
|
|
222
227
|
type: "primary",
|
|
223
|
-
loading:
|
|
224
|
-
onClick:
|
|
228
|
+
loading: E.value,
|
|
229
|
+
onClick: te
|
|
225
230
|
}, {
|
|
226
231
|
default: t(() => a[10] || (a[10] = [
|
|
227
232
|
C(V("确认"))
|
|
228
233
|
])),
|
|
229
234
|
_: 1
|
|
230
235
|
}, 8, ["loading"]),
|
|
231
|
-
o(l(
|
|
236
|
+
o(l(D), { onClick: I }, {
|
|
232
237
|
default: t(() => a[11] || (a[11] = [
|
|
233
238
|
C(V("关闭"))
|
|
234
239
|
])),
|
|
@@ -237,16 +242,16 @@ const ye = { class: "yahee-complex-search" }, be = { class: "search-type-checkbo
|
|
|
237
242
|
])
|
|
238
243
|
]),
|
|
239
244
|
default: t(() => [
|
|
240
|
-
o(l(
|
|
245
|
+
o(l(fe), {
|
|
241
246
|
ref_key: "batchSearchFormRef",
|
|
242
247
|
ref: O,
|
|
243
248
|
model: r.value,
|
|
244
|
-
rules:
|
|
249
|
+
rules: Q
|
|
245
250
|
}, {
|
|
246
251
|
default: t(() => [
|
|
247
|
-
o(l(
|
|
252
|
+
o(l(R), { class: "row-class" }, {
|
|
248
253
|
default: t(() => [
|
|
249
|
-
o(l(
|
|
254
|
+
o(l(W), { prop: "searchType" }, {
|
|
250
255
|
default: t(() => [
|
|
251
256
|
l(K) ? (s(), d(l(k), {
|
|
252
257
|
key: 0,
|
|
@@ -272,7 +277,7 @@ const ye = { class: "yahee-complex-search" }, be = { class: "search-type-checkbo
|
|
|
272
277
|
disabled: ""
|
|
273
278
|
}, {
|
|
274
279
|
default: t(() => [
|
|
275
|
-
(s(), y(b, null, g(
|
|
280
|
+
(s(), y(b, null, g(_, (e) => o(l(S), {
|
|
276
281
|
key: e.label,
|
|
277
282
|
label: e.label,
|
|
278
283
|
value: e.value
|
|
@@ -286,14 +291,14 @@ const ye = { class: "yahee-complex-search" }, be = { class: "search-type-checkbo
|
|
|
286
291
|
]),
|
|
287
292
|
_: 1
|
|
288
293
|
}),
|
|
289
|
-
o(l(
|
|
294
|
+
o(l(R), { class: "row-class" }, {
|
|
290
295
|
default: t(() => [
|
|
291
|
-
o(l(
|
|
296
|
+
o(l(W), {
|
|
292
297
|
prop: "searchContent",
|
|
293
298
|
style: { width: "100%" }
|
|
294
299
|
}, {
|
|
295
300
|
default: t(() => [
|
|
296
|
-
o(l(
|
|
301
|
+
o(l(L), {
|
|
297
302
|
modelValue: r.value.searchContent,
|
|
298
303
|
"onUpdate:modelValue": a[6] || (a[6] = (e) => r.value.searchContent = e),
|
|
299
304
|
placeholder: "请输入批量查询内容,从EXCEL复制可自动替换为`,`",
|
|
@@ -319,5 +324,5 @@ const ye = { class: "yahee-complex-search" }, be = { class: "search-type-checkbo
|
|
|
319
324
|
}
|
|
320
325
|
});
|
|
321
326
|
export {
|
|
322
|
-
|
|
327
|
+
He as default
|
|
323
328
|
};
|