yahee-components 0.0.48 → 0.0.49
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 te, mergeDefaults as oe, toRefs as re, ref as
|
|
2
|
-
import
|
|
1
|
+
import { defineComponent as te, mergeDefaults as oe, toRefs as re, ref as c, createBlock as d, openBlock as s, unref as l, withCtx as t, createElementVNode as x, createVNode as o, withKeys as se, createSlots as ue, createElementBlock as y, Fragment as b, renderList as g, createCommentVNode as z, createTextVNode as C, toDisplayString as V } from "vue";
|
|
2
|
+
import T from "../_virtual/lodash.js";
|
|
3
3
|
import { defaultComplexSearchProps as ne } from "./props.js";
|
|
4
|
-
import { ElConfigProvider as ie, ElInput as G, ElIcon as
|
|
4
|
+
import { ElConfigProvider as ie, ElInput as G, ElIcon as ce, ElSelect as k, ElOption as S, ElCheckbox as de, ElLink as pe, ElDialog as me, ElForm as he, ElRow as D, ElFormItem as L, ElButton as N } 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";
|
|
@@ -38,43 +38,43 @@ const ye = { class: "yahee-complex-search" }, be = { class: "search-type-checkbo
|
|
|
38
38
|
}, ne()),
|
|
39
39
|
emits: ["filterChangeGrandson"],
|
|
40
40
|
setup(R, { emit: W }) {
|
|
41
|
-
const q = ve,
|
|
41
|
+
const q = ve, m = W, X = R, {
|
|
42
42
|
defaultSearch: Y,
|
|
43
|
-
pasteFormat:
|
|
43
|
+
pasteFormat: F,
|
|
44
44
|
options: B,
|
|
45
45
|
showPatchSearch: j,
|
|
46
46
|
specialOptions: P,
|
|
47
47
|
showWithinFilterCheckbox: A,
|
|
48
48
|
placeholderText: H,
|
|
49
49
|
normalOptions: J,
|
|
50
|
-
showSelect:
|
|
50
|
+
showSelect: K,
|
|
51
51
|
searchItem: n
|
|
52
|
-
} = re(X),
|
|
52
|
+
} = re(X), u = c(Y.value || "integrated"), h = c(""), f = c(!1), w = c(!1), v = c(!1), O = c(null), r = c({ searchType: "integrated", searchContent: "" }), M = {
|
|
53
53
|
selectedSearchType: [{ required: !0, message: "请输入查询类型", trigger: "blur" }],
|
|
54
54
|
searchContent: [{ required: !0, message: "请输入查询内容", trigger: "blur" }]
|
|
55
|
-
},
|
|
55
|
+
}, U = [
|
|
56
56
|
{
|
|
57
57
|
value: "integrated",
|
|
58
58
|
label: "综合搜索"
|
|
59
59
|
}
|
|
60
60
|
], Q = () => {
|
|
61
61
|
v.value = !0;
|
|
62
|
-
},
|
|
62
|
+
}, I = () => {
|
|
63
63
|
v.value = !1;
|
|
64
64
|
}, Z = () => {
|
|
65
|
-
f.value || (delete n.value.putSearch,
|
|
65
|
+
f.value || (delete n.value.putSearch, m("filterChangeGrandson", n.value, u.value));
|
|
66
66
|
}, $ = () => n.value, E = () => {
|
|
67
|
-
h.value ? le() :
|
|
68
|
-
}, ee = (
|
|
69
|
-
const e = { ...
|
|
70
|
-
return
|
|
67
|
+
h.value ? le() : m("filterChangeGrandson", $(), u.value);
|
|
68
|
+
}, ee = (p, a) => {
|
|
69
|
+
const e = { ...p };
|
|
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 _(
|
|
73
|
-
|
|
72
|
+
function _(p) {
|
|
73
|
+
T.forEach(p, (a) => {
|
|
74
74
|
ee(n.value, a);
|
|
75
75
|
const { checkedValues: e, filterKey: i } = a;
|
|
76
|
-
|
|
77
|
-
}),
|
|
76
|
+
T.isEmpty(e) || (J.value.includes(i) ? n.value[i] = e[0] : n.value[i] = e);
|
|
77
|
+
}), m("filterChangeGrandson", n.value, u.value);
|
|
78
78
|
}
|
|
79
79
|
const le = () => {
|
|
80
80
|
f.value ? _([
|
|
@@ -82,30 +82,35 @@ const ye = { class: "yahee-complex-search" }, be = { class: "search-type-checkbo
|
|
|
82
82
|
filterKey: "putSearch",
|
|
83
83
|
checkedValues: h.value
|
|
84
84
|
}
|
|
85
|
-
]) :
|
|
85
|
+
]) : m(
|
|
86
86
|
"filterChangeGrandson",
|
|
87
87
|
{
|
|
88
88
|
putSearch: h.value
|
|
89
89
|
},
|
|
90
|
-
|
|
90
|
+
u.value
|
|
91
91
|
);
|
|
92
92
|
}, ae = () => {
|
|
93
|
-
|
|
94
|
-
|
|
93
|
+
O.value.validate((p) => {
|
|
94
|
+
p && (w.value = !0, f.value ? _([
|
|
95
95
|
{
|
|
96
96
|
filterKey: "putSearch",
|
|
97
|
-
checkedValues:
|
|
97
|
+
checkedValues: r.value.searchContent
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
filterKey: "searchType",
|
|
101
|
+
checkedValues: r.value.searchType
|
|
98
102
|
}
|
|
99
|
-
]) :
|
|
103
|
+
]) : m(
|
|
100
104
|
"filterChangeGrandson",
|
|
101
105
|
{
|
|
102
|
-
putSearch:
|
|
106
|
+
putSearch: r.value.searchContent,
|
|
107
|
+
searchType: r.value.searchType
|
|
103
108
|
},
|
|
104
|
-
|
|
109
|
+
u.value
|
|
105
110
|
), v.value = !1, w.value = !1);
|
|
106
111
|
});
|
|
107
112
|
};
|
|
108
|
-
return (
|
|
113
|
+
return (p, a) => (s(), d(l(ie), { locale: l(q) }, {
|
|
109
114
|
default: t(() => [
|
|
110
115
|
x("div", ye, [
|
|
111
116
|
o(l(G), {
|
|
@@ -117,10 +122,10 @@ const ye = { class: "yahee-complex-search" }, be = { class: "search-type-checkbo
|
|
|
117
122
|
maxlength: "30",
|
|
118
123
|
onChange: E,
|
|
119
124
|
onKeyup: se(E, ["enter"]),
|
|
120
|
-
onPaste: l(
|
|
125
|
+
onPaste: l(F)
|
|
121
126
|
}, ue({
|
|
122
127
|
append: t(() => [
|
|
123
|
-
o(l(
|
|
128
|
+
o(l(ce), {
|
|
124
129
|
size: "12",
|
|
125
130
|
color: "#3366cc",
|
|
126
131
|
style: { cursor: "pointer" },
|
|
@@ -135,17 +140,17 @@ const ye = { class: "yahee-complex-search" }, be = { class: "search-type-checkbo
|
|
|
135
140
|
]),
|
|
136
141
|
_: 2
|
|
137
142
|
}, [
|
|
138
|
-
l(
|
|
143
|
+
l(K) ? {
|
|
139
144
|
name: "prepend",
|
|
140
145
|
fn: t(() => [
|
|
141
146
|
o(l(k), {
|
|
142
|
-
modelValue:
|
|
143
|
-
"onUpdate:modelValue": a[0] || (a[0] = (e) =>
|
|
147
|
+
modelValue: u.value,
|
|
148
|
+
"onUpdate:modelValue": a[0] || (a[0] = (e) => u.value = e),
|
|
144
149
|
size: "small",
|
|
145
150
|
class: "custom-select"
|
|
146
151
|
}, {
|
|
147
152
|
default: t(() => [
|
|
148
|
-
(
|
|
153
|
+
(s(!0), y(b, null, g(l(B), (e) => (s(), d(l(S), {
|
|
149
154
|
key: e.label,
|
|
150
155
|
label: e.label,
|
|
151
156
|
value: e.value
|
|
@@ -159,14 +164,14 @@ const ye = { class: "yahee-complex-search" }, be = { class: "search-type-checkbo
|
|
|
159
164
|
name: "prepend",
|
|
160
165
|
fn: t(() => [
|
|
161
166
|
o(l(k), {
|
|
162
|
-
modelValue:
|
|
163
|
-
"onUpdate:modelValue": a[1] || (a[1] = (e) =>
|
|
167
|
+
modelValue: u.value,
|
|
168
|
+
"onUpdate:modelValue": a[1] || (a[1] = (e) => u.value = e),
|
|
164
169
|
size: "small",
|
|
165
170
|
class: "custom-select",
|
|
166
171
|
disabled: ""
|
|
167
172
|
}, {
|
|
168
173
|
default: t(() => [
|
|
169
|
-
(
|
|
174
|
+
(s(), y(b, null, g(U, (e) => o(l(S), {
|
|
170
175
|
key: e.label,
|
|
171
176
|
label: e.label,
|
|
172
177
|
value: e.value
|
|
@@ -179,7 +184,7 @@ const ye = { class: "yahee-complex-search" }, be = { class: "search-type-checkbo
|
|
|
179
184
|
}
|
|
180
185
|
]), 1032, ["modelValue", "placeholder", "onPaste"]),
|
|
181
186
|
x("div", be, [
|
|
182
|
-
l(A) ? (
|
|
187
|
+
l(A) ? (s(), d(l(de), {
|
|
183
188
|
key: 0,
|
|
184
189
|
modelValue: f.value,
|
|
185
190
|
"onUpdate:modelValue": a[3] || (a[3] = (e) => f.value = e),
|
|
@@ -190,7 +195,7 @@ const ye = { class: "yahee-complex-search" }, be = { class: "search-type-checkbo
|
|
|
190
195
|
])),
|
|
191
196
|
_: 1
|
|
192
197
|
}, 8, ["modelValue"])) : z("", !0),
|
|
193
|
-
l(j) ? (
|
|
198
|
+
l(j) ? (s(), d(l(pe), {
|
|
194
199
|
key: 1,
|
|
195
200
|
type: "primary",
|
|
196
201
|
onClick: Q
|
|
@@ -202,12 +207,12 @@ const ye = { class: "yahee-complex-search" }, be = { class: "search-type-checkbo
|
|
|
202
207
|
})) : z("", !0)
|
|
203
208
|
])
|
|
204
209
|
]),
|
|
205
|
-
o(l(
|
|
210
|
+
o(l(me), {
|
|
206
211
|
modelValue: v.value,
|
|
207
212
|
"onUpdate:modelValue": a[7] || (a[7] = (e) => v.value = e),
|
|
208
213
|
title: "批量查询",
|
|
209
214
|
width: "30%",
|
|
210
|
-
"before-close":
|
|
215
|
+
"before-close": I,
|
|
211
216
|
"append-to-body": !0,
|
|
212
217
|
draggable: ""
|
|
213
218
|
}, {
|
|
@@ -223,7 +228,7 @@ const ye = { class: "yahee-complex-search" }, be = { class: "search-type-checkbo
|
|
|
223
228
|
])),
|
|
224
229
|
_: 1
|
|
225
230
|
}, 8, ["loading"]),
|
|
226
|
-
o(l(N), { onClick:
|
|
231
|
+
o(l(N), { onClick: I }, {
|
|
227
232
|
default: t(() => a[11] || (a[11] = [
|
|
228
233
|
C(V("关闭"))
|
|
229
234
|
])),
|
|
@@ -234,8 +239,8 @@ const ye = { class: "yahee-complex-search" }, be = { class: "search-type-checkbo
|
|
|
234
239
|
default: t(() => [
|
|
235
240
|
o(l(he), {
|
|
236
241
|
ref_key: "batchSearchFormRef",
|
|
237
|
-
ref:
|
|
238
|
-
model:
|
|
242
|
+
ref: O,
|
|
243
|
+
model: r.value,
|
|
239
244
|
rules: M
|
|
240
245
|
}, {
|
|
241
246
|
default: t(() => [
|
|
@@ -243,31 +248,31 @@ const ye = { class: "yahee-complex-search" }, be = { class: "search-type-checkbo
|
|
|
243
248
|
default: t(() => [
|
|
244
249
|
o(l(L), { prop: "searchType" }, {
|
|
245
250
|
default: t(() => [
|
|
246
|
-
l(
|
|
251
|
+
l(K) ? (s(), d(l(k), {
|
|
247
252
|
key: 0,
|
|
248
|
-
modelValue:
|
|
249
|
-
"onUpdate:modelValue": a[4] || (a[4] = (e) =>
|
|
253
|
+
modelValue: r.value.searchType,
|
|
254
|
+
"onUpdate:modelValue": a[4] || (a[4] = (e) => r.value.searchType = e),
|
|
250
255
|
size: "small",
|
|
251
256
|
style: { width: "95px", "background-color": "white" }
|
|
252
257
|
}, {
|
|
253
258
|
default: t(() => [
|
|
254
|
-
(
|
|
259
|
+
(s(!0), y(b, null, g(l(B), (e) => (s(), d(l(S), {
|
|
255
260
|
key: e.label,
|
|
256
261
|
label: e.label,
|
|
257
262
|
value: e.value
|
|
258
263
|
}, null, 8, ["label", "value"]))), 128))
|
|
259
264
|
]),
|
|
260
265
|
_: 1
|
|
261
|
-
}, 8, ["modelValue"])) : (
|
|
266
|
+
}, 8, ["modelValue"])) : (s(), d(l(k), {
|
|
262
267
|
key: 1,
|
|
263
|
-
modelValue:
|
|
264
|
-
"onUpdate:modelValue": a[5] || (a[5] = (e) =>
|
|
268
|
+
modelValue: r.value.searchType,
|
|
269
|
+
"onUpdate:modelValue": a[5] || (a[5] = (e) => r.value.searchType = e),
|
|
265
270
|
size: "small",
|
|
266
271
|
style: { width: "95px", "background-color": "white" },
|
|
267
272
|
disabled: ""
|
|
268
273
|
}, {
|
|
269
274
|
default: t(() => [
|
|
270
|
-
(
|
|
275
|
+
(s(), y(b, null, g(U, (e) => o(l(S), {
|
|
271
276
|
key: e.label,
|
|
272
277
|
label: e.label,
|
|
273
278
|
value: e.value
|
|
@@ -289,12 +294,12 @@ const ye = { class: "yahee-complex-search" }, be = { class: "search-type-checkbo
|
|
|
289
294
|
}, {
|
|
290
295
|
default: t(() => [
|
|
291
296
|
o(l(G), {
|
|
292
|
-
modelValue:
|
|
293
|
-
"onUpdate:modelValue": a[6] || (a[6] = (e) =>
|
|
297
|
+
modelValue: r.value.searchContent,
|
|
298
|
+
"onUpdate:modelValue": a[6] || (a[6] = (e) => r.value.searchContent = e),
|
|
294
299
|
placeholder: "请输入批量查询内容,从EXCEL复制可自动替换为`,`",
|
|
295
300
|
type: "textarea",
|
|
296
301
|
rows: 5,
|
|
297
|
-
onPaste: l(
|
|
302
|
+
onPaste: l(F)
|
|
298
303
|
}, null, 8, ["modelValue", "onPaste"])
|
|
299
304
|
]),
|
|
300
305
|
_: 1
|