yahee-components 0.0.98-beta-04 → 0.0.100
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/complex-search/batch-search-dialog.vue.js +7 -0
- package/es/complex-search/batch-search-dialog.vue2.js +159 -0
- package/es/complex-search/complex-search.vue.js +46 -143
- package/es/complex-search/complex-search.vue2.js +42 -148
- package/es/complex-search/props.js +2 -3
- package/es/complex-search/useComplexSearch.js +44 -0
- package/es/filter-container/filter-container.vue.js +37 -36
- package/es/filter-container/props.js +11 -0
- package/es/filter-container/style/index.css +1 -0
- package/es/filter-wrapper/filter-wrapper.vue.js +2 -2
- package/es/filter-wrapper/filter-wrapper.vue2.js +31 -30
- package/es/filter-wrapper/props.js +10 -0
- package/es/style.css +1 -0
- package/es/yahee-components.css +1 -1
- package/lib/filter-container/style/index.css +1 -0
- package/lib/style.css +1 -0
- package/package.json +1 -1
- package/types/src/complex-search/batch-search-dialog.vue.d.ts +2 -0
- package/types/src/complex-search/complex-search.vue.d.ts +137 -0
- package/types/src/complex-search/index.d.ts +141 -0
- package/types/src/complex-search/props.d.ts +6 -13
- package/types/src/complex-search/useComplexSearch.d.ts +16 -0
- package/types/src/filter-container/filter-container.vue.d.ts +3 -8
- package/types/src/filter-container/index.d.ts +67 -0
- package/types/src/filter-container/props.d.ts +11 -43
- package/types/src/filter-wrapper/filter-wrapper.vue.d.ts +4 -15
- package/types/src/filter-wrapper/index.d.ts +59 -0
- package/types/src/filter-wrapper/key.d.ts +20 -0
- package/types/src/filter-wrapper/props.d.ts +6 -43
- package/types/src/help-tag/help-tag.vue.d.ts +7 -7
- package/types/src/help-tag/index.d.ts +7 -7
- package/types/src/installs.d.ts +3481 -0
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import { defineComponent as S, ref as p, watch as V, resolveComponent as n, createBlock as m, openBlock as r, withCtx as a, createVNode as u, createElementBlock as g, Fragment as w, renderList as k, createElementVNode as W, createTextVNode as E } from "vue";
|
|
2
|
+
const D = { class: "dialog-footer" }, U = S({
|
|
3
|
+
name: "BatchSearchDialog"
|
|
4
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5
|
+
}), z = /* @__PURE__ */ S({
|
|
6
|
+
...U,
|
|
7
|
+
__name: "batch-search-dialog",
|
|
8
|
+
props: {
|
|
9
|
+
modelValue: { type: Boolean, default: !1 },
|
|
10
|
+
showSelect: { type: Boolean, default: !0 },
|
|
11
|
+
isBatchSelectSameWithInput: { type: Boolean, default: !0 },
|
|
12
|
+
inputOptions: { type: Array, default: () => [] },
|
|
13
|
+
batchOptions: { type: Array, default: () => [] },
|
|
14
|
+
defaultOptions: {
|
|
15
|
+
type: Array,
|
|
16
|
+
default: () => [{ value: "WHOLE_SEARCH", label: "综合搜索" }]
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
emits: ["update:modelValue", "confirm"],
|
|
20
|
+
setup(s, { emit: B }) {
|
|
21
|
+
const O = s, _ = B, c = p(!1), f = p(!1), v = p(), t = p({ searchType: "WHOLE_SEARCH", searchContent: "" }), x = {
|
|
22
|
+
searchContent: [{ required: !0, message: "请输入查询内容", trigger: "blur" }]
|
|
23
|
+
};
|
|
24
|
+
V(
|
|
25
|
+
() => O.modelValue,
|
|
26
|
+
(o) => {
|
|
27
|
+
c.value = o;
|
|
28
|
+
}
|
|
29
|
+
), V(c, (o) => {
|
|
30
|
+
_("update:modelValue", o);
|
|
31
|
+
});
|
|
32
|
+
const T = (o) => {
|
|
33
|
+
var i;
|
|
34
|
+
o.preventDefault();
|
|
35
|
+
const e = (i = o.clipboardData) == null ? void 0 : i.getData("text/plain"), d = e == null ? void 0 : e.replace(/[\n\r\t]+/g, ",");
|
|
36
|
+
d && (t.value.searchContent = t.value.searchContent ? `${t.value.searchContent},${d}` : d);
|
|
37
|
+
}, A = async () => {
|
|
38
|
+
var e;
|
|
39
|
+
if (!v.value) return;
|
|
40
|
+
await v.value.validate().catch(() => !1) && ((e = t.value.searchContent) != null && e.trim()) && (f.value = !0, _("confirm", { ...t.value, searchContent: t.value.searchContent.trim() }), h(), f.value = !1);
|
|
41
|
+
}, h = () => {
|
|
42
|
+
c.value = !1, t.value = { searchType: "WHOLE_SEARCH", searchContent: "" };
|
|
43
|
+
};
|
|
44
|
+
return (o, e) => {
|
|
45
|
+
const d = n("el-option"), i = n("el-select"), y = n("el-form-item"), C = n("el-row"), H = n("el-input"), L = n("el-form"), b = n("el-button"), R = n("el-dialog");
|
|
46
|
+
return r(), m(R, {
|
|
47
|
+
modelValue: c.value,
|
|
48
|
+
"onUpdate:modelValue": e[3] || (e[3] = (l) => c.value = l),
|
|
49
|
+
title: "批量查询",
|
|
50
|
+
width: "30%",
|
|
51
|
+
"before-close": h,
|
|
52
|
+
"append-to-body": !0,
|
|
53
|
+
draggable: ""
|
|
54
|
+
}, {
|
|
55
|
+
footer: a(() => [
|
|
56
|
+
W("div", D, [
|
|
57
|
+
u(b, {
|
|
58
|
+
type: "primary",
|
|
59
|
+
loading: f.value,
|
|
60
|
+
onClick: A
|
|
61
|
+
}, {
|
|
62
|
+
default: a(() => e[4] || (e[4] = [
|
|
63
|
+
E(" 确认 ")
|
|
64
|
+
])),
|
|
65
|
+
_: 1,
|
|
66
|
+
__: [4]
|
|
67
|
+
}, 8, ["loading"]),
|
|
68
|
+
u(b, { onClick: h }, {
|
|
69
|
+
default: a(() => e[5] || (e[5] = [
|
|
70
|
+
E("关闭")
|
|
71
|
+
])),
|
|
72
|
+
_: 1,
|
|
73
|
+
__: [5]
|
|
74
|
+
})
|
|
75
|
+
])
|
|
76
|
+
]),
|
|
77
|
+
default: a(() => [
|
|
78
|
+
u(L, {
|
|
79
|
+
ref_key: "formRef",
|
|
80
|
+
ref: v,
|
|
81
|
+
model: t.value,
|
|
82
|
+
rules: x
|
|
83
|
+
}, {
|
|
84
|
+
default: a(() => [
|
|
85
|
+
u(C, { class: "row-class" }, {
|
|
86
|
+
default: a(() => [
|
|
87
|
+
u(y, { prop: "searchType" }, {
|
|
88
|
+
default: a(() => [
|
|
89
|
+
s.showSelect ? (r(), m(i, {
|
|
90
|
+
key: 0,
|
|
91
|
+
modelValue: t.value.searchType,
|
|
92
|
+
"onUpdate:modelValue": e[0] || (e[0] = (l) => t.value.searchType = l),
|
|
93
|
+
size: "small",
|
|
94
|
+
style: { width: "100px", "background-color": "white" }
|
|
95
|
+
}, {
|
|
96
|
+
default: a(() => [
|
|
97
|
+
(r(!0), g(w, null, k(s.isBatchSelectSameWithInput ? s.inputOptions : s.batchOptions, (l) => (r(), m(d, {
|
|
98
|
+
key: l.label,
|
|
99
|
+
label: l.label,
|
|
100
|
+
value: l.value
|
|
101
|
+
}, null, 8, ["label", "value"]))), 128))
|
|
102
|
+
]),
|
|
103
|
+
_: 1
|
|
104
|
+
}, 8, ["modelValue"])) : (r(), m(i, {
|
|
105
|
+
key: 1,
|
|
106
|
+
modelValue: t.value.searchType,
|
|
107
|
+
"onUpdate:modelValue": e[1] || (e[1] = (l) => t.value.searchType = l),
|
|
108
|
+
size: "small",
|
|
109
|
+
style: { width: "95px" },
|
|
110
|
+
disabled: ""
|
|
111
|
+
}, {
|
|
112
|
+
default: a(() => [
|
|
113
|
+
(r(!0), g(w, null, k(s.defaultOptions, (l) => (r(), m(d, {
|
|
114
|
+
key: l.label,
|
|
115
|
+
label: l.label,
|
|
116
|
+
value: l.value
|
|
117
|
+
}, null, 8, ["label", "value"]))), 128))
|
|
118
|
+
]),
|
|
119
|
+
_: 1
|
|
120
|
+
}, 8, ["modelValue"]))
|
|
121
|
+
]),
|
|
122
|
+
_: 1
|
|
123
|
+
})
|
|
124
|
+
]),
|
|
125
|
+
_: 1
|
|
126
|
+
}),
|
|
127
|
+
u(C, { class: "row-class" }, {
|
|
128
|
+
default: a(() => [
|
|
129
|
+
u(y, {
|
|
130
|
+
prop: "searchContent",
|
|
131
|
+
style: { width: "100%" }
|
|
132
|
+
}, {
|
|
133
|
+
default: a(() => [
|
|
134
|
+
u(H, {
|
|
135
|
+
modelValue: t.value.searchContent,
|
|
136
|
+
"onUpdate:modelValue": e[2] || (e[2] = (l) => t.value.searchContent = l),
|
|
137
|
+
placeholder: "请输入批量查询内容,从EXCEL复制可自动替换为`,",
|
|
138
|
+
type: "textarea",
|
|
139
|
+
rows: 5,
|
|
140
|
+
onPaste: T
|
|
141
|
+
}, null, 8, ["modelValue"])
|
|
142
|
+
]),
|
|
143
|
+
_: 1
|
|
144
|
+
})
|
|
145
|
+
]),
|
|
146
|
+
_: 1
|
|
147
|
+
})
|
|
148
|
+
]),
|
|
149
|
+
_: 1
|
|
150
|
+
}, 8, ["model"])
|
|
151
|
+
]),
|
|
152
|
+
_: 1
|
|
153
|
+
}, 8, ["modelValue"]);
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
});
|
|
157
|
+
export {
|
|
158
|
+
z as default
|
|
159
|
+
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { resolveComponent as
|
|
1
|
+
import w from "./complex-search.vue2.js";
|
|
2
|
+
import { resolveComponent as n, createElementBlock as i, openBlock as a, Fragment as p, createElementVNode as d, createVNode as s, withKeys as v, createSlots as B, withCtx as t, renderList as h, createBlock as r, createCommentVNode as m, createTextVNode as S } from "vue";
|
|
3
3
|
/* empty css */
|
|
4
|
-
import
|
|
5
|
-
const
|
|
6
|
-
function
|
|
7
|
-
const
|
|
8
|
-
return
|
|
9
|
-
|
|
10
|
-
|
|
4
|
+
import g from "../_virtual/_plugin-vue_export-helper.js";
|
|
5
|
+
const O = { class: "yahee-complex-search" }, F = { class: "search-type-checkbox" };
|
|
6
|
+
function T(e, o, I, U, W, $) {
|
|
7
|
+
const u = n("el-option"), c = n("el-select"), f = n("Search"), b = n("el-icon"), V = n("el-input"), k = n("el-checkbox"), y = n("el-link"), C = n("BatchSearchDialog");
|
|
8
|
+
return a(), i(p, null, [
|
|
9
|
+
d("div", O, [
|
|
10
|
+
s(V, {
|
|
11
11
|
modelValue: e.putSearch,
|
|
12
12
|
"onUpdate:modelValue": o[2] || (o[2] = (l) => e.putSearch = l),
|
|
13
13
|
placeholder: e.placeholderText,
|
|
@@ -15,20 +15,20 @@ function W(e, o, E, N, $, K) {
|
|
|
15
15
|
clearable: "",
|
|
16
16
|
maxlength: "30",
|
|
17
17
|
onChange: e.handleSearch,
|
|
18
|
-
onKeyup:
|
|
18
|
+
onKeyup: v(e.handleSearch, ["enter"]),
|
|
19
19
|
onPaste: e.pasteFormatInput,
|
|
20
20
|
onClear: e.handleClear
|
|
21
|
-
},
|
|
22
|
-
append:
|
|
23
|
-
|
|
21
|
+
}, B({
|
|
22
|
+
append: t(() => [
|
|
23
|
+
s(b, {
|
|
24
24
|
size: "12",
|
|
25
25
|
color: "#3366cc",
|
|
26
26
|
style: { cursor: "pointer" },
|
|
27
27
|
class: "icon-cusor",
|
|
28
28
|
onClick: e.handleSearch
|
|
29
29
|
}, {
|
|
30
|
-
default:
|
|
31
|
-
|
|
30
|
+
default: t(() => [
|
|
31
|
+
s(f)
|
|
32
32
|
]),
|
|
33
33
|
_: 1
|
|
34
34
|
}, 8, ["onClick"])
|
|
@@ -37,15 +37,15 @@ function W(e, o, E, N, $, K) {
|
|
|
37
37
|
}, [
|
|
38
38
|
e.showSelect ? {
|
|
39
39
|
name: "prepend",
|
|
40
|
-
fn:
|
|
41
|
-
|
|
40
|
+
fn: t(() => [
|
|
41
|
+
s(c, {
|
|
42
42
|
modelValue: e.selectedSearchType,
|
|
43
43
|
"onUpdate:modelValue": o[0] || (o[0] = (l) => e.selectedSearchType = l),
|
|
44
44
|
size: "small",
|
|
45
45
|
class: "custom-select"
|
|
46
46
|
}, {
|
|
47
|
-
default:
|
|
48
|
-
(
|
|
47
|
+
default: t(() => [
|
|
48
|
+
(a(!0), i(p, null, h(e.options, (l) => (a(), r(u, {
|
|
49
49
|
key: l.label,
|
|
50
50
|
label: l.label,
|
|
51
51
|
value: l.value
|
|
@@ -57,16 +57,16 @@ function W(e, o, E, N, $, K) {
|
|
|
57
57
|
key: "0"
|
|
58
58
|
} : {
|
|
59
59
|
name: "prepend",
|
|
60
|
-
fn:
|
|
61
|
-
|
|
60
|
+
fn: t(() => [
|
|
61
|
+
s(c, {
|
|
62
62
|
modelValue: e.selectedSearchType,
|
|
63
63
|
"onUpdate:modelValue": o[1] || (o[1] = (l) => e.selectedSearchType = l),
|
|
64
64
|
size: "small",
|
|
65
65
|
class: "custom-select",
|
|
66
66
|
disabled: ""
|
|
67
67
|
}, {
|
|
68
|
-
default:
|
|
69
|
-
(
|
|
68
|
+
default: t(() => [
|
|
69
|
+
(a(!0), i(p, null, h(e.defaultOptions, (l) => (a(), r(u, {
|
|
70
70
|
key: l.label,
|
|
71
71
|
label: l.label,
|
|
72
72
|
value: l.value
|
|
@@ -78,142 +78,45 @@ function W(e, o, E, N, $, K) {
|
|
|
78
78
|
key: "1"
|
|
79
79
|
}
|
|
80
80
|
]), 1032, ["modelValue", "placeholder", "onChange", "onKeyup", "onPaste", "onClear"]),
|
|
81
|
-
|
|
82
|
-
e.showWithinFilterCheckbox ? (
|
|
81
|
+
d("div", F, [
|
|
82
|
+
e.showWithinFilterCheckbox ? (a(), r(k, {
|
|
83
83
|
key: 0,
|
|
84
84
|
modelValue: e.localIsWithinFilterOptions,
|
|
85
85
|
"onUpdate:modelValue": o[3] || (o[3] = (l) => e.localIsWithinFilterOptions = l),
|
|
86
86
|
onChange: e.searchWithinFilterOptions
|
|
87
87
|
}, {
|
|
88
|
-
default:
|
|
89
|
-
|
|
88
|
+
default: t(() => o[6] || (o[6] = [
|
|
89
|
+
S(" 在筛选条件内查询 ")
|
|
90
90
|
])),
|
|
91
91
|
_: 1,
|
|
92
|
-
__: [
|
|
93
|
-
}, 8, ["modelValue", "onChange"])) :
|
|
94
|
-
e.showPatchSearch ? (
|
|
92
|
+
__: [6]
|
|
93
|
+
}, 8, ["modelValue", "onChange"])) : m("", !0),
|
|
94
|
+
e.showPatchSearch ? (a(), r(y, {
|
|
95
95
|
key: 1,
|
|
96
96
|
type: "primary",
|
|
97
|
-
onClick: e.
|
|
97
|
+
onClick: o[4] || (o[4] = (l) => e.showBatchSearch = !0)
|
|
98
98
|
}, {
|
|
99
|
-
default:
|
|
100
|
-
|
|
99
|
+
default: t(() => o[7] || (o[7] = [
|
|
100
|
+
S(" 批量查询 ")
|
|
101
101
|
])),
|
|
102
102
|
_: 1,
|
|
103
|
-
__: [
|
|
104
|
-
}
|
|
103
|
+
__: [7]
|
|
104
|
+
})) : m("", !0)
|
|
105
105
|
])
|
|
106
106
|
]),
|
|
107
|
-
|
|
107
|
+
s(C, {
|
|
108
108
|
modelValue: e.showBatchSearch,
|
|
109
|
-
"onUpdate:modelValue": o[
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
"
|
|
113
|
-
"
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
b("div", P, [
|
|
118
|
-
t(k, {
|
|
119
|
-
type: "primary",
|
|
120
|
-
loading: e.confirmLoading,
|
|
121
|
-
onClick: e.confirmSearch
|
|
122
|
-
}, {
|
|
123
|
-
default: a(() => o[10] || (o[10] = [
|
|
124
|
-
c(h("确认"))
|
|
125
|
-
])),
|
|
126
|
-
_: 1,
|
|
127
|
-
__: [10]
|
|
128
|
-
}, 8, ["loading", "onClick"]),
|
|
129
|
-
t(k, { onClick: e.handleBatchSearchClose }, {
|
|
130
|
-
default: a(() => o[11] || (o[11] = [
|
|
131
|
-
c(h("关闭"))
|
|
132
|
-
])),
|
|
133
|
-
_: 1,
|
|
134
|
-
__: [11]
|
|
135
|
-
}, 8, ["onClick"])
|
|
136
|
-
])
|
|
137
|
-
]),
|
|
138
|
-
default: a(() => [
|
|
139
|
-
t(F, {
|
|
140
|
-
ref: "batchSearchFormRef",
|
|
141
|
-
model: e.batchSearchForm,
|
|
142
|
-
rules: e.rules
|
|
143
|
-
}, {
|
|
144
|
-
default: a(() => [
|
|
145
|
-
t(S, { class: "row-class" }, {
|
|
146
|
-
default: a(() => [
|
|
147
|
-
t(y, { prop: "searchType" }, {
|
|
148
|
-
default: a(() => [
|
|
149
|
-
e.showSelect ? (n(), s(p, {
|
|
150
|
-
key: 0,
|
|
151
|
-
modelValue: e.batchSearchForm.searchType,
|
|
152
|
-
"onUpdate:modelValue": o[4] || (o[4] = (l) => e.batchSearchForm.searchType = l),
|
|
153
|
-
size: "small",
|
|
154
|
-
style: { width: "100px", "background-color": "white" }
|
|
155
|
-
}, {
|
|
156
|
-
default: a(() => [
|
|
157
|
-
(n(!0), d(u, null, i(e.isBatchSelectOptionsSameWithInput ? e.options : e.batchOptions, (l) => (n(), s(m, {
|
|
158
|
-
key: l.label,
|
|
159
|
-
label: l.label,
|
|
160
|
-
value: l.value
|
|
161
|
-
}, null, 8, ["label", "value"]))), 128))
|
|
162
|
-
]),
|
|
163
|
-
_: 1
|
|
164
|
-
}, 8, ["modelValue"])) : (n(), s(p, {
|
|
165
|
-
key: 1,
|
|
166
|
-
modelValue: e.batchSearchForm.searchType,
|
|
167
|
-
"onUpdate:modelValue": o[5] || (o[5] = (l) => e.batchSearchForm.searchType = l),
|
|
168
|
-
size: "small",
|
|
169
|
-
style: { width: "95px", "background-color": "white" },
|
|
170
|
-
disabled: ""
|
|
171
|
-
}, {
|
|
172
|
-
default: a(() => [
|
|
173
|
-
(n(!0), d(u, null, i(e.defalutOptions, (l) => (n(), s(m, {
|
|
174
|
-
key: l.label,
|
|
175
|
-
label: l.label,
|
|
176
|
-
value: l.value
|
|
177
|
-
}, null, 8, ["label", "value"]))), 128))
|
|
178
|
-
]),
|
|
179
|
-
_: 1
|
|
180
|
-
}, 8, ["modelValue"]))
|
|
181
|
-
]),
|
|
182
|
-
_: 1
|
|
183
|
-
})
|
|
184
|
-
]),
|
|
185
|
-
_: 1
|
|
186
|
-
}),
|
|
187
|
-
t(S, { class: "row-class" }, {
|
|
188
|
-
default: a(() => [
|
|
189
|
-
t(y, {
|
|
190
|
-
prop: "searchContent",
|
|
191
|
-
style: { width: "100%" }
|
|
192
|
-
}, {
|
|
193
|
-
default: a(() => [
|
|
194
|
-
t(f, {
|
|
195
|
-
modelValue: e.batchSearchForm.searchContent,
|
|
196
|
-
"onUpdate:modelValue": o[6] || (o[6] = (l) => e.batchSearchForm.searchContent = l),
|
|
197
|
-
placeholder: "请输入批量查询内容,从EXCEL复制可自动替换为`,`",
|
|
198
|
-
type: "textarea",
|
|
199
|
-
rows: 5,
|
|
200
|
-
onPaste: e.pasteFormat
|
|
201
|
-
}, null, 8, ["modelValue", "onPaste"])
|
|
202
|
-
]),
|
|
203
|
-
_: 1
|
|
204
|
-
})
|
|
205
|
-
]),
|
|
206
|
-
_: 1
|
|
207
|
-
})
|
|
208
|
-
]),
|
|
209
|
-
_: 1
|
|
210
|
-
}, 8, ["model", "rules"])
|
|
211
|
-
]),
|
|
212
|
-
_: 1
|
|
213
|
-
}, 8, ["modelValue", "before-close"])
|
|
109
|
+
"onUpdate:modelValue": o[5] || (o[5] = (l) => e.showBatchSearch = l),
|
|
110
|
+
"show-select": e.showSelect,
|
|
111
|
+
"is-batch-select-same-with-input": e.isBatchSelectOptionsSameWithInput,
|
|
112
|
+
"input-options": e.options,
|
|
113
|
+
"batch-options": e.batchOptions,
|
|
114
|
+
"default-options": e.defaultOptions,
|
|
115
|
+
onConfirm: e.handleBatchSearchConfirm
|
|
116
|
+
}, null, 8, ["modelValue", "show-select", "is-batch-select-same-with-input", "input-options", "batch-options", "default-options", "onConfirm"])
|
|
214
117
|
], 64);
|
|
215
118
|
}
|
|
216
|
-
const
|
|
119
|
+
const D = /* @__PURE__ */ g(w, [["render", T], ["__scopeId", "data-v-c03e960b"]]);
|
|
217
120
|
export {
|
|
218
|
-
|
|
121
|
+
D as default
|
|
219
122
|
};
|
|
@@ -1,177 +1,71 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { defaultComplexSearchProps as
|
|
3
|
-
import {
|
|
4
|
-
import "
|
|
5
|
-
|
|
6
|
-
import "element-plus/theme-chalk/src/checkbox.scss";
|
|
7
|
-
import "element-plus/theme-chalk/src/tag.scss";
|
|
8
|
-
import "element-plus/theme-chalk/src/option.scss";
|
|
9
|
-
import "element-plus/theme-chalk/src/option-group.scss";
|
|
10
|
-
import "element-plus/theme-chalk/src/scrollbar.scss";
|
|
11
|
-
import "element-plus/theme-chalk/src/popper.scss";
|
|
12
|
-
import "element-plus/theme-chalk/src/select.scss";
|
|
13
|
-
import "element-plus/theme-chalk/src/dialog.scss";
|
|
14
|
-
import "element-plus/theme-chalk/src/overlay.scss";
|
|
15
|
-
import "element-plus/theme-chalk/src/form.scss";
|
|
16
|
-
import "element-plus/theme-chalk/src/form-item.scss";
|
|
17
|
-
import "element-plus/theme-chalk/src/row.scss";
|
|
18
|
-
import "element-plus/theme-chalk/src/button.scss";
|
|
19
|
-
import "element-plus/theme-chalk/src/link.scss";
|
|
20
|
-
import { Search as q } from "@element-plus/icons-vue";
|
|
21
|
-
const se = w({
|
|
1
|
+
import { defineComponent as p, ref as u } from "vue";
|
|
2
|
+
import { defaultComplexSearchProps as e } from "./props.js";
|
|
3
|
+
import { useComplexSearch as f } from "./useComplexSearch.js";
|
|
4
|
+
import d from "./batch-search-dialog.vue.js";
|
|
5
|
+
const F = p({
|
|
22
6
|
name: "YaheeComplexSearch",
|
|
23
7
|
components: {
|
|
24
|
-
|
|
25
|
-
ElCheckbox: P,
|
|
26
|
-
ElSelect: k,
|
|
27
|
-
ElDialog: D,
|
|
28
|
-
ElIcon: _,
|
|
29
|
-
ElForm: L,
|
|
30
|
-
ElFormItem: R,
|
|
31
|
-
ElRow: A,
|
|
32
|
-
ElButton: x,
|
|
33
|
-
ElOption: H,
|
|
34
|
-
ElLink: g,
|
|
35
|
-
Search: q
|
|
8
|
+
BatchSearchDialog: d
|
|
36
9
|
},
|
|
37
10
|
props: {
|
|
38
|
-
defaultSearch: {
|
|
39
|
-
type: String,
|
|
40
|
-
default: a().defaultSearch
|
|
41
|
-
},
|
|
11
|
+
defaultSearch: { type: String, default: e().defaultSearch },
|
|
42
12
|
options: {
|
|
43
13
|
type: Array,
|
|
44
|
-
default:
|
|
45
|
-
},
|
|
46
|
-
placeholderText: {
|
|
47
|
-
type: String,
|
|
48
|
-
default: a().placeholderText
|
|
49
|
-
},
|
|
50
|
-
showPatchSearch: {
|
|
51
|
-
type: Boolean,
|
|
52
|
-
default: a().showPatchSearch
|
|
14
|
+
default: e().options
|
|
53
15
|
},
|
|
16
|
+
placeholderText: { type: String, default: e().placeholderText },
|
|
17
|
+
showPatchSearch: { type: Boolean, default: e().showPatchSearch },
|
|
54
18
|
showWithinFilterCheckbox: {
|
|
55
19
|
type: Boolean,
|
|
56
|
-
default:
|
|
57
|
-
},
|
|
58
|
-
isWithinFilterOptions: {
|
|
59
|
-
type: Boolean,
|
|
60
|
-
default: !1
|
|
61
|
-
},
|
|
62
|
-
specialOptions: {
|
|
63
|
-
type: Array,
|
|
64
|
-
default: a().specialOptions
|
|
65
|
-
},
|
|
66
|
-
normalOptions: {
|
|
67
|
-
type: Array,
|
|
68
|
-
default: a().normalOptions
|
|
69
|
-
},
|
|
70
|
-
showSelect: {
|
|
71
|
-
type: Boolean,
|
|
72
|
-
default: a().showSelect
|
|
20
|
+
default: e().showWithinFilterCheckbox
|
|
73
21
|
},
|
|
22
|
+
isWithinFilterOptions: { type: Boolean, default: !1 },
|
|
23
|
+
showSelect: { type: Boolean, default: e().showSelect },
|
|
74
24
|
searchItem: {
|
|
75
25
|
type: Object,
|
|
76
|
-
default:
|
|
26
|
+
default: e().searchItem
|
|
77
27
|
},
|
|
78
28
|
isBatchSelectOptionsSameWithInput: {
|
|
79
29
|
type: Boolean,
|
|
80
|
-
default:
|
|
30
|
+
default: e().isBatchSelectOptionsSameWithInput
|
|
81
31
|
},
|
|
82
32
|
batchOptions: {
|
|
83
33
|
type: Array,
|
|
84
|
-
default:
|
|
34
|
+
default: e().batchOptions
|
|
85
35
|
}
|
|
86
36
|
},
|
|
87
37
|
emits: ["update:isWithinFilterOptions", "search"],
|
|
88
|
-
setup(
|
|
89
|
-
const {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
{ deep: !0 }
|
|
98
|
-
), f(
|
|
99
|
-
() => c.isWithinFilterOptions,
|
|
100
|
-
(e) => {
|
|
101
|
-
o.value = e;
|
|
102
|
-
}
|
|
103
|
-
), f(o, (e) => {
|
|
104
|
-
i("update:isWithinFilterOptions", e);
|
|
105
|
-
});
|
|
106
|
-
const C = () => {
|
|
107
|
-
i("search", {
|
|
108
|
-
putSearch: s.value || "",
|
|
109
|
-
searchType: h.value,
|
|
110
|
-
isWithinFilterOptions: o.value
|
|
111
|
-
});
|
|
112
|
-
}, E = () => {
|
|
113
|
-
s.value = "", i("search", {
|
|
114
|
-
putSearch: "",
|
|
115
|
-
searchType: h.value,
|
|
116
|
-
isWithinFilterOptions: o.value
|
|
117
|
-
});
|
|
118
|
-
}, W = () => {
|
|
119
|
-
i("update:isWithinFilterOptions", o.value);
|
|
120
|
-
}, F = () => {
|
|
121
|
-
p.value = !0;
|
|
122
|
-
}, I = () => {
|
|
123
|
-
p.value = !1, r.value = { searchType: "WHOLE_SEARCH", searchContent: "" };
|
|
124
|
-
}, T = (e) => {
|
|
125
|
-
const t = d(e);
|
|
126
|
-
t !== null && (s.value = t, setTimeout(() => {
|
|
127
|
-
i("search", {
|
|
128
|
-
putSearch: s.value || "",
|
|
129
|
-
searchType: h.value,
|
|
130
|
-
isWithinFilterOptions: o.value
|
|
131
|
-
});
|
|
132
|
-
}, 50));
|
|
133
|
-
}, b = (e) => {
|
|
134
|
-
const t = d(e);
|
|
135
|
-
if (t) {
|
|
136
|
-
const l = r.value.searchContent || "";
|
|
137
|
-
r.value.searchContent = l ? `${l},${t}` : t;
|
|
138
|
-
}
|
|
139
|
-
}, d = (e) => {
|
|
140
|
-
var l;
|
|
141
|
-
e.preventDefault();
|
|
142
|
-
const t = (l = e.clipboardData) == null ? void 0 : l.getData("text/plain");
|
|
143
|
-
return t == null ? void 0 : t.replace(/[\n\r\t]+/g, ",");
|
|
144
|
-
};
|
|
38
|
+
setup(h, { emit: t }) {
|
|
39
|
+
const {
|
|
40
|
+
selectedSearchType: i,
|
|
41
|
+
putSearch: r,
|
|
42
|
+
localIsWithinFilterOptions: a,
|
|
43
|
+
handleSearch: l,
|
|
44
|
+
handleClear: n,
|
|
45
|
+
pasteFormatInput: s
|
|
46
|
+
} = f(h, t), c = u(!1);
|
|
145
47
|
return {
|
|
146
|
-
selectedSearchType:
|
|
147
|
-
putSearch:
|
|
148
|
-
localIsWithinFilterOptions:
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
handleClear: E,
|
|
160
|
-
pasteFormatInput: T,
|
|
161
|
-
confirmSearch: () => {
|
|
162
|
-
m.value && m.value.validate((t) => {
|
|
163
|
-
var l;
|
|
164
|
-
t && ((l = r.value.searchContent) != null && l.trim()) && (u.value = !0, i("search", {
|
|
165
|
-
putSearch: r.value.searchContent.trim(),
|
|
166
|
-
searchType: r.value.searchType,
|
|
167
|
-
isWithinFilterOptions: o.value
|
|
168
|
-
}), r.value = { searchType: "WHOLE_SEARCH", searchContent: "" }, p.value = !1, u.value = !1);
|
|
48
|
+
selectedSearchType: i,
|
|
49
|
+
putSearch: r,
|
|
50
|
+
localIsWithinFilterOptions: a,
|
|
51
|
+
showBatchSearch: c,
|
|
52
|
+
defaultOptions: [{ value: "WHOLE_SEARCH", label: "综合搜索" }],
|
|
53
|
+
handleSearch: l,
|
|
54
|
+
handleClear: n,
|
|
55
|
+
pasteFormatInput: s,
|
|
56
|
+
handleBatchSearchConfirm: (o) => {
|
|
57
|
+
t("search", {
|
|
58
|
+
putSearch: o.searchContent,
|
|
59
|
+
searchType: o.searchType,
|
|
60
|
+
isWithinFilterOptions: a.value
|
|
169
61
|
});
|
|
170
62
|
},
|
|
171
|
-
|
|
63
|
+
searchWithinFilterOptions: () => {
|
|
64
|
+
t("update:isWithinFilterOptions", a.value);
|
|
65
|
+
}
|
|
172
66
|
};
|
|
173
67
|
}
|
|
174
68
|
});
|
|
175
69
|
export {
|
|
176
|
-
|
|
70
|
+
F as default
|
|
177
71
|
};
|
|
@@ -7,12 +7,11 @@ function e() {
|
|
|
7
7
|
placeholderText: "",
|
|
8
8
|
showPatchSearch: !1,
|
|
9
9
|
showWithinFilterCheckbox: !0,
|
|
10
|
-
specialOptions: () => [],
|
|
11
|
-
normalOptions: () => [],
|
|
12
10
|
showSelect: !1,
|
|
13
11
|
searchItem: () => ({}),
|
|
14
12
|
isBatchSelectOptionsSameWithInput: !0,
|
|
15
|
-
batchOptions: () => []
|
|
13
|
+
batchOptions: () => [],
|
|
14
|
+
isWithinFilterOptions: !1
|
|
16
15
|
};
|
|
17
16
|
}
|
|
18
17
|
export {
|