yahee-components 0.0.21 → 0.0.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.
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as oe, toRefs as re, ref as u, openBlock as i, createBlock as f, unref as e, withCtx as t, createElementVNode as C, createVNode as o, withKeys as se, createSlots as ne, createElementBlock as T, Fragment as _, renderList as I, createTextVNode as S, toDisplayString as v, createCommentVNode as P } from "vue";
|
|
2
2
|
import y from "../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/lodash.js";
|
|
3
|
-
import { ElConfigProvider as
|
|
3
|
+
import { ElConfigProvider as ue, ElInput as K, ElIcon as ie, ElSelect as G, ElOption as U, ElCheckbox as ce, ElLink as de, ElDialog as pe, ElButton as L, ElForm as me, ElRow as E, ElFormItem as N } from "element-plus";
|
|
4
4
|
import "element-plus/theme-chalk/src/base.scss";
|
|
5
5
|
import "element-plus/theme-chalk/src/input.scss";
|
|
6
6
|
import "element-plus/theme-chalk/src/checkbox.scss";
|
|
@@ -18,9 +18,9 @@ import "element-plus/theme-chalk/src/row.scss";
|
|
|
18
18
|
import "element-plus/theme-chalk/src/button.scss";
|
|
19
19
|
import "element-plus/theme-chalk/src/link.scss";
|
|
20
20
|
import "element-plus/theme-chalk/src/config-provider.scss";
|
|
21
|
-
import { Search as
|
|
22
|
-
import
|
|
23
|
-
const
|
|
21
|
+
import { Search as he } from "@element-plus/icons-vue";
|
|
22
|
+
import fe from "../node_modules/.pnpm/element-plus@2.8.3_vue@3.5.12_typescript@5.6.2_/node_modules/element-plus/es/locale/lang/zh-cn.js";
|
|
23
|
+
const ve = { class: "yahee-comporehensive-search" }, ye = { class: "search-type-checkbox" }, Ce = { class: "dialog-footer" }, ze = /* @__PURE__ */ oe({
|
|
24
24
|
name: "YaheeComprehensiveSearch",
|
|
25
25
|
__name: "comprehensive-search",
|
|
26
26
|
props: {
|
|
@@ -37,54 +37,55 @@ const ye = { class: "yahee-comporehensive-search" }, Ce = { class: "search-type-
|
|
|
37
37
|
searchItem: { default: () => ({}) }
|
|
38
38
|
},
|
|
39
39
|
emits: ["filterChangeGrandson"],
|
|
40
|
-
setup(
|
|
41
|
-
const
|
|
42
|
-
dealSearch:
|
|
43
|
-
defaultSearch:
|
|
44
|
-
pasteFormat:
|
|
45
|
-
options:
|
|
46
|
-
showPatchSearch:
|
|
47
|
-
specialOptions:
|
|
48
|
-
showWithinFilterCheckbox:
|
|
49
|
-
placeholderText:
|
|
50
|
-
normalOptions:
|
|
51
|
-
showSelect:
|
|
40
|
+
setup(R, { emit: W }) {
|
|
41
|
+
const z = fe, p = W, D = R, {
|
|
42
|
+
dealSearch: q,
|
|
43
|
+
defaultSearch: H,
|
|
44
|
+
pasteFormat: b,
|
|
45
|
+
options: w,
|
|
46
|
+
showPatchSearch: A,
|
|
47
|
+
specialOptions: F,
|
|
48
|
+
showWithinFilterCheckbox: J,
|
|
49
|
+
placeholderText: X,
|
|
50
|
+
normalOptions: Y,
|
|
51
|
+
showSelect: $,
|
|
52
52
|
searchItem: r
|
|
53
|
-
} =
|
|
53
|
+
} = re(D), g = u(H.value), c = u(""), m = u(!1), V = u(!1), h = u(!1), x = u(null), s = u({ searchType: "WHOLE_SEARCH", searchContent: "" }), j = {
|
|
54
54
|
selectedSearchType: [{ required: !0, message: "请输入查询类型", trigger: "blur" }],
|
|
55
55
|
searchContent: [{ required: !0, message: "请输入查询内容", trigger: "blur" }]
|
|
56
|
-
},
|
|
56
|
+
}, M = () => {
|
|
57
57
|
h.value = !0;
|
|
58
|
-
},
|
|
58
|
+
}, B = () => {
|
|
59
59
|
h.value = !1;
|
|
60
|
-
},
|
|
60
|
+
}, Q = () => {
|
|
61
61
|
m.value || (delete r.value.simpleSearch, p("filterChangeGrandson", r.value));
|
|
62
|
-
},
|
|
63
|
-
|
|
64
|
-
},
|
|
65
|
-
const a = { ...
|
|
66
|
-
return y.map(
|
|
62
|
+
}, Z = () => r.value, k = () => {
|
|
63
|
+
c.value ? le() : p("filterChangeGrandson", Z());
|
|
64
|
+
}, ee = (d, l) => {
|
|
65
|
+
const a = { ...d };
|
|
66
|
+
return y.map(F.value, (n) => n.key).includes(l.filterKey) ? F.value.forEach((n) => delete a[n.key]) : delete a[l.filterKey], a;
|
|
67
67
|
};
|
|
68
|
-
function
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
68
|
+
function O(d) {
|
|
69
|
+
y.forEach(d, (l) => {
|
|
70
|
+
ee(r.value, l);
|
|
71
|
+
const { checkedValues: a, filterKey: n } = l;
|
|
72
|
+
y.isEmpty(a) || (Y.value.includes(n) ? r.value[n] = a[0] : r.value[n] = a);
|
|
72
73
|
}), p("filterChangeGrandson", r.value), console.log(`searchItem - ${JSON.stringify(r.value)}`), console.log("displayFilter filterChange end");
|
|
73
74
|
}
|
|
74
|
-
const
|
|
75
|
-
m.value ?
|
|
75
|
+
const le = () => {
|
|
76
|
+
m.value ? O([
|
|
76
77
|
{
|
|
77
78
|
filterKey: "simpleSearch",
|
|
78
|
-
checkedValues:
|
|
79
|
+
checkedValues: c.value
|
|
79
80
|
}
|
|
80
81
|
]) : p("filterChangeGrandson", {
|
|
81
|
-
simpleSearch:
|
|
82
|
+
simpleSearch: c.value
|
|
82
83
|
});
|
|
84
|
+
}, ae = () => {
|
|
85
|
+
q.value(g.value, c.value);
|
|
83
86
|
}, te = () => {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
B.value.validate((n) => {
|
|
87
|
-
n && (V.value = !0, m.value ? T([
|
|
87
|
+
x.value.validate((d) => {
|
|
88
|
+
d && (V.value = !0, m.value ? O([
|
|
88
89
|
{
|
|
89
90
|
filterKey: "putSearch",
|
|
90
91
|
checkedValues: s.value.searchContent
|
|
@@ -94,23 +95,23 @@ const ye = { class: "yahee-comporehensive-search" }, Ce = { class: "search-type-
|
|
|
94
95
|
}), h.value = !1, V.value = !1);
|
|
95
96
|
});
|
|
96
97
|
};
|
|
97
|
-
return (
|
|
98
|
+
return (d, l) => (i(), f(e(ue), { locale: e(z) }, {
|
|
98
99
|
default: t(() => [
|
|
99
|
-
C("div",
|
|
100
|
-
o(e(
|
|
101
|
-
modelValue:
|
|
102
|
-
"onUpdate:modelValue": l[1] || (l[1] = (a) =>
|
|
103
|
-
placeholder: e(
|
|
100
|
+
C("div", ve, [
|
|
101
|
+
o(e(K), {
|
|
102
|
+
modelValue: c.value,
|
|
103
|
+
"onUpdate:modelValue": l[1] || (l[1] = (a) => c.value = a),
|
|
104
|
+
placeholder: e(X),
|
|
104
105
|
class: "input-with-select",
|
|
105
106
|
clearable: "",
|
|
106
107
|
maxlength: "30",
|
|
107
108
|
onChange: k,
|
|
108
|
-
onKeyup:
|
|
109
|
-
onPaste: e(
|
|
110
|
-
onClear:
|
|
111
|
-
},
|
|
109
|
+
onKeyup: se(k, ["enter"]),
|
|
110
|
+
onPaste: e(b),
|
|
111
|
+
onClear: ae
|
|
112
|
+
}, ne({
|
|
112
113
|
append: t(() => [
|
|
113
|
-
o(e(
|
|
114
|
+
o(e(ie), {
|
|
114
115
|
size: "12",
|
|
115
116
|
color: "#3366cc",
|
|
116
117
|
style: { cursor: "pointer" },
|
|
@@ -118,24 +119,24 @@ const ye = { class: "yahee-comporehensive-search" }, Ce = { class: "search-type-
|
|
|
118
119
|
onClick: k
|
|
119
120
|
}, {
|
|
120
121
|
default: t(() => [
|
|
121
|
-
o(e(
|
|
122
|
+
o(e(he))
|
|
122
123
|
]),
|
|
123
124
|
_: 1
|
|
124
125
|
})
|
|
125
126
|
]),
|
|
126
127
|
_: 2
|
|
127
128
|
}, [
|
|
128
|
-
e(
|
|
129
|
+
e($) ? {
|
|
129
130
|
name: "prepend",
|
|
130
131
|
fn: t(() => [
|
|
131
|
-
o(e(
|
|
132
|
-
modelValue:
|
|
133
|
-
"onUpdate:modelValue": l[0] || (l[0] = (a) =>
|
|
132
|
+
o(e(G), {
|
|
133
|
+
modelValue: g.value,
|
|
134
|
+
"onUpdate:modelValue": l[0] || (l[0] = (a) => g.value = a),
|
|
134
135
|
size: "small",
|
|
135
136
|
class: "custom-select"
|
|
136
137
|
}, {
|
|
137
138
|
default: t(() => [
|
|
138
|
-
(
|
|
139
|
+
(i(!0), T(_, null, I(e(w), (a) => (i(), f(e(U), {
|
|
139
140
|
key: a.label,
|
|
140
141
|
label: a.label,
|
|
141
142
|
value: a.value
|
|
@@ -147,85 +148,85 @@ const ye = { class: "yahee-comporehensive-search" }, Ce = { class: "search-type-
|
|
|
147
148
|
key: "0"
|
|
148
149
|
} : void 0
|
|
149
150
|
]), 1032, ["modelValue", "placeholder", "onPaste"]),
|
|
150
|
-
C("div",
|
|
151
|
-
e(
|
|
151
|
+
C("div", ye, [
|
|
152
|
+
e(J) ? (i(), f(e(ce), {
|
|
152
153
|
key: 0,
|
|
153
154
|
modelValue: m.value,
|
|
154
155
|
"onUpdate:modelValue": l[2] || (l[2] = (a) => m.value = a),
|
|
155
|
-
onChange:
|
|
156
|
+
onChange: Q
|
|
156
157
|
}, {
|
|
157
158
|
default: t(() => l[6] || (l[6] = [
|
|
158
|
-
|
|
159
|
+
S(v("在筛选条件内查询"))
|
|
159
160
|
])),
|
|
160
161
|
_: 1
|
|
161
|
-
}, 8, ["modelValue"])) :
|
|
162
|
-
e(
|
|
162
|
+
}, 8, ["modelValue"])) : P("", !0),
|
|
163
|
+
e(A) ? (i(), f(e(de), {
|
|
163
164
|
key: 1,
|
|
164
165
|
type: "primary",
|
|
165
|
-
onClick:
|
|
166
|
+
onClick: M
|
|
166
167
|
}, {
|
|
167
168
|
default: t(() => l[7] || (l[7] = [
|
|
168
|
-
|
|
169
|
+
S(v("批量查询"))
|
|
169
170
|
])),
|
|
170
171
|
_: 1
|
|
171
|
-
})) :
|
|
172
|
+
})) : P("", !0)
|
|
172
173
|
])
|
|
173
174
|
]),
|
|
174
|
-
o(e(
|
|
175
|
+
o(e(pe), {
|
|
175
176
|
modelValue: h.value,
|
|
176
177
|
"onUpdate:modelValue": l[5] || (l[5] = (a) => h.value = a),
|
|
177
178
|
title: "批量查询",
|
|
178
179
|
width: "30%",
|
|
179
|
-
"before-close":
|
|
180
|
+
"before-close": B,
|
|
180
181
|
"append-to-body": !0,
|
|
181
182
|
draggable: ""
|
|
182
183
|
}, {
|
|
183
184
|
footer: t(() => [
|
|
184
|
-
C("div",
|
|
185
|
-
o(e(
|
|
185
|
+
C("div", Ce, [
|
|
186
|
+
o(e(L), {
|
|
186
187
|
type: "primary",
|
|
187
188
|
loading: V.value,
|
|
188
|
-
onClick:
|
|
189
|
+
onClick: te
|
|
189
190
|
}, {
|
|
190
191
|
default: t(() => l[9] || (l[9] = [
|
|
191
|
-
|
|
192
|
+
S(v("确认"))
|
|
192
193
|
])),
|
|
193
194
|
_: 1
|
|
194
195
|
}, 8, ["loading"]),
|
|
195
|
-
o(e(
|
|
196
|
+
o(e(L), { onClick: B }, {
|
|
196
197
|
default: t(() => l[10] || (l[10] = [
|
|
197
|
-
|
|
198
|
+
S(v("关闭"))
|
|
198
199
|
])),
|
|
199
200
|
_: 1
|
|
200
201
|
})
|
|
201
202
|
])
|
|
202
203
|
]),
|
|
203
204
|
default: t(() => [
|
|
204
|
-
o(e(
|
|
205
|
+
o(e(me), {
|
|
205
206
|
ref_key: "batchSearchFormRef",
|
|
206
|
-
ref:
|
|
207
|
+
ref: x,
|
|
207
208
|
model: s.value,
|
|
208
|
-
rules:
|
|
209
|
+
rules: j
|
|
209
210
|
}, {
|
|
210
211
|
default: t(() => [
|
|
211
|
-
o(e(
|
|
212
|
+
o(e(E), { class: "row-class" }, {
|
|
212
213
|
default: t(() => l[8] || (l[8] = [
|
|
213
214
|
C("span", null, v("综合搜索"), -1)
|
|
214
215
|
])),
|
|
215
216
|
_: 1
|
|
216
217
|
}),
|
|
217
|
-
o(e(
|
|
218
|
+
o(e(E), { class: "row-class" }, {
|
|
218
219
|
default: t(() => [
|
|
219
|
-
o(e(
|
|
220
|
+
o(e(N), { prop: "searchType" }, {
|
|
220
221
|
default: t(() => [
|
|
221
|
-
o(e(
|
|
222
|
+
o(e(G), {
|
|
222
223
|
modelValue: s.value.searchType,
|
|
223
224
|
"onUpdate:modelValue": l[3] || (l[3] = (a) => s.value.searchType = a),
|
|
224
225
|
size: "small",
|
|
225
226
|
class: "custom-select"
|
|
226
227
|
}, {
|
|
227
228
|
default: t(() => [
|
|
228
|
-
(
|
|
229
|
+
(i(!0), T(_, null, I(e(w), (a) => (i(), f(e(U), {
|
|
229
230
|
key: a.label,
|
|
230
231
|
label: a.label,
|
|
231
232
|
value: a.value
|
|
@@ -239,20 +240,20 @@ const ye = { class: "yahee-comporehensive-search" }, Ce = { class: "search-type-
|
|
|
239
240
|
]),
|
|
240
241
|
_: 1
|
|
241
242
|
}),
|
|
242
|
-
o(e(
|
|
243
|
+
o(e(E), { class: "row-class" }, {
|
|
243
244
|
default: t(() => [
|
|
244
|
-
o(e(
|
|
245
|
+
o(e(N), {
|
|
245
246
|
prop: "searchContent",
|
|
246
247
|
style: { width: "100%" }
|
|
247
248
|
}, {
|
|
248
249
|
default: t(() => [
|
|
249
|
-
o(e(
|
|
250
|
+
o(e(K), {
|
|
250
251
|
modelValue: s.value.searchContent,
|
|
251
252
|
"onUpdate:modelValue": l[4] || (l[4] = (a) => s.value.searchContent = a),
|
|
252
253
|
placeholder: "请输入批量查询内容,从EXCEL复制可自动替换为`,`",
|
|
253
254
|
type: "textarea",
|
|
254
255
|
rows: 5,
|
|
255
|
-
onPaste: e(
|
|
256
|
+
onPaste: e(b)
|
|
256
257
|
}, null, 8, ["modelValue", "onPaste"])
|
|
257
258
|
]),
|
|
258
259
|
_: 1
|
|
@@ -272,5 +273,5 @@ const ye = { class: "yahee-comporehensive-search" }, Ce = { class: "search-type-
|
|
|
272
273
|
}
|
|
273
274
|
});
|
|
274
275
|
export {
|
|
275
|
-
|
|
276
|
+
ze as default
|
|
276
277
|
};
|