@qynpm/ui 1.0.46 → 1.0.47
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/CHANGELOG.md +8 -0
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +3 -3
- package/dist/qy-legacy-selection-dialog/index.cjs +2 -2
- package/dist/qy-legacy-selection-dialog/index.mjs +2 -2
- package/dist/qy-selection-dialog/index.cjs +2 -2
- package/dist/qy-selection-dialog/index.mjs +2 -2
- package/dist/shared/{index-DwHM9eYc.cjs → index-BJZjXeoT.cjs} +1 -1
- package/dist/shared/index-BxGP8OkE.cjs +1 -0
- package/dist/shared/{index-PM5yNugz.mjs → index-CbSGTE1S.mjs} +211 -206
- package/dist/shared/{index-VtM0GmfU.mjs → index-DAU1WtID.mjs} +1 -1
- package/package.json +2 -1
- package/dist/shared/index-CZs0V4ze.cjs +0 -1
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { ElLoadingDirective as
|
|
2
|
-
import { defineComponent as
|
|
3
|
-
import { ElButton as
|
|
4
|
-
import { _ as
|
|
5
|
-
import { S as
|
|
6
|
-
import { T as
|
|
7
|
-
import { T as
|
|
8
|
-
import { _ as
|
|
9
|
-
const
|
|
1
|
+
import { ElLoadingDirective as Ee } from "element-plus/es";
|
|
2
|
+
import { defineComponent as Me, useAttrs as $e, useSlots as De, getCurrentInstance as Ue, ref as b, watch as D, onBeforeUnmount as Ne, reactive as je, computed as g, nextTick as Ie, openBlock as c, createBlock as h, withCtx as i, createElementVNode as F, renderSlot as V, createElementBlock as O, Fragment as Qe, renderList as Le, createTextVNode as w, toDisplayString as Je, createCommentVNode as v, createVNode as d, unref as u, mergeProps as ie, withKeys as Ge, withModifiers as He, withDirectives as We } from "vue";
|
|
3
|
+
import { ElButton as C, ElForm as Xe, ElFormItem as U, ElInput as ue, ElTable as Ye, ElTableColumn as Ze, ElPagination as et, ElMessage as W } from "element-plus";
|
|
4
|
+
import { _ as se } from "./index.vue_vue_type_style_index_0_lang-BLRxKB-e.mjs";
|
|
5
|
+
import { S as tt } from "./index-B7j9BtSm.mjs";
|
|
6
|
+
import { T as ce } from "./index-CGH2ROZV.mjs";
|
|
7
|
+
import { T as at } from "./index-BAOV5iYx.mjs";
|
|
8
|
+
import { _ as lt } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
|
|
9
|
+
const ot = { class: "qy-selection-dialog" }, nt = { class: "qy-selection-dialog__main" }, rt = {
|
|
10
10
|
key: 0,
|
|
11
11
|
class: "qy-selection-dialog__selected"
|
|
12
|
-
},
|
|
12
|
+
}, it = { class: "qy-selection-dialog__selected-tags" }, ut = {
|
|
13
13
|
key: 0,
|
|
14
14
|
class: "qy-selection-dialog__selected-actions"
|
|
15
|
-
},
|
|
15
|
+
}, st = {
|
|
16
16
|
key: 1,
|
|
17
17
|
class: "qy-selection-dialog__search-row"
|
|
18
|
-
},
|
|
18
|
+
}, ct = {
|
|
19
19
|
key: 0,
|
|
20
20
|
class: "qy-selection-dialog__toolbar"
|
|
21
|
-
},
|
|
21
|
+
}, dt = {
|
|
22
22
|
key: 2,
|
|
23
23
|
class: "qy-selection-dialog__pagination"
|
|
24
|
-
},
|
|
24
|
+
}, yt = { class: "qy-selection-dialog__paste-actions" }, ft = /* @__PURE__ */ Me({
|
|
25
25
|
name: "QySelectionDialog",
|
|
26
26
|
inheritAttrs: !1,
|
|
27
27
|
__name: "index",
|
|
@@ -60,94 +60,96 @@ const at = { class: "qy-selection-dialog" }, lt = { class: "qy-selection-dialog_
|
|
|
60
60
|
pageSizes: { default: () => [10, 20, 50, 100] }
|
|
61
61
|
},
|
|
62
62
|
emits: ["update:modelValue", "update:open", "error", "selection-change", "confirm", "submit", "cancel", "close", "append", "loaded"],
|
|
63
|
-
setup(f, { expose:
|
|
64
|
-
const a = f, p =
|
|
65
|
-
let T =
|
|
63
|
+
setup(f, { expose: de, emit: ye }) {
|
|
64
|
+
const a = f, p = ye, fe = $e(), X = De(), N = Ue(), S = b(null), q = b([]), r = b([]);
|
|
65
|
+
let T = !1, Y = 0;
|
|
66
|
+
const R = b([]), _ = b(!1);
|
|
67
|
+
let x = 0, j = 0, E = !1;
|
|
66
68
|
function I() {
|
|
67
|
-
|
|
69
|
+
x += 1, j += 1, _.value = !1;
|
|
68
70
|
}
|
|
69
|
-
|
|
70
|
-
|
|
71
|
+
D(() => a.open, I, { flush: "sync" }), Ne(() => {
|
|
72
|
+
E = !0, I();
|
|
71
73
|
});
|
|
72
74
|
function B(e) {
|
|
73
|
-
return !
|
|
75
|
+
return !E && a.open && e === x;
|
|
74
76
|
}
|
|
75
|
-
const Q = b(0),
|
|
77
|
+
const Q = b(0), P = b(!1), M = b(""), n = je({
|
|
76
78
|
category: [],
|
|
77
79
|
type: "",
|
|
78
80
|
page: 1,
|
|
79
81
|
pageSize: 10,
|
|
80
82
|
...a.searchKey ? { [a.searchKey]: "" } : {},
|
|
81
83
|
...a.queryParams
|
|
82
|
-
}),
|
|
84
|
+
}), k = g(() => a.selectionMode ? a.selectionMode : a.selection === "multi" ? "multiple" : a.selection), Z = g(() => a.mainKey || a.rowKey), pe = g(() => a.tagName || a.labelKey), ee = g(() => a.typeOptions.length ? a.typeOptions : a.type || []), ge = g(() => ({
|
|
83
85
|
...a.typeSelectionProps,
|
|
84
86
|
...a.typeSelectProps
|
|
85
|
-
})), L = g(() => a.tableProps || {}),
|
|
86
|
-
() => a.showSearch || !!
|
|
87
|
-
),
|
|
88
|
-
() =>
|
|
89
|
-
),
|
|
90
|
-
function
|
|
91
|
-
const e = (
|
|
87
|
+
})), L = g(() => a.tableProps || {}), ve = g(
|
|
88
|
+
() => a.showSearch || !!fe["search-visible"]
|
|
89
|
+
), te = g(() => a.showAppend || a.append), me = g(
|
|
90
|
+
() => te.value || !!X.toolbar || !!X.bar
|
|
91
|
+
), ae = g(() => a.fetchMethod || a.query), J = g(() => he() ? a.modelValue : a.selected);
|
|
92
|
+
function he() {
|
|
93
|
+
const e = (N == null ? void 0 : N.vnode.props) || {};
|
|
92
94
|
return Object.prototype.hasOwnProperty.call(e, "modelValue") || Object.prototype.hasOwnProperty.call(e, "model-value") || Object.prototype.hasOwnProperty.call(e, "onUpdate:modelValue");
|
|
93
95
|
}
|
|
94
|
-
|
|
96
|
+
D(
|
|
95
97
|
[() => a.modelValue, () => a.selected, () => a.open],
|
|
96
98
|
() => {
|
|
97
|
-
a.open && (r.value = K(J.value),
|
|
99
|
+
a.open && (r.value = K(J.value), z());
|
|
98
100
|
},
|
|
99
101
|
{ immediate: !0, deep: !0 }
|
|
100
|
-
),
|
|
102
|
+
), D(
|
|
101
103
|
[() => a.categoryOptions, () => a.category],
|
|
102
104
|
(e) => {
|
|
103
105
|
if (Array.isArray(a.category) && a.category.length) {
|
|
104
|
-
|
|
106
|
+
R.value = a.category;
|
|
105
107
|
return;
|
|
106
108
|
}
|
|
107
|
-
|
|
109
|
+
R.value = a.categoryOptions || [];
|
|
108
110
|
},
|
|
109
111
|
{ immediate: !0 }
|
|
110
|
-
),
|
|
111
|
-
e || (
|
|
112
|
+
), D(P, (e) => {
|
|
113
|
+
e || (M.value = "");
|
|
112
114
|
});
|
|
113
|
-
async function
|
|
114
|
-
const e = ++
|
|
115
|
+
async function we() {
|
|
116
|
+
const e = ++x;
|
|
115
117
|
r.value = K(J.value);
|
|
116
118
|
try {
|
|
117
|
-
await
|
|
119
|
+
await Se(e);
|
|
118
120
|
} catch (t) {
|
|
119
121
|
B(e) && p("error", t);
|
|
120
122
|
return;
|
|
121
123
|
}
|
|
122
|
-
B(e) && (await A(), B(e) &&
|
|
124
|
+
B(e) && (await A(), B(e) && z());
|
|
123
125
|
}
|
|
124
|
-
async function
|
|
126
|
+
async function Se(e) {
|
|
125
127
|
const t = a.categoryFetchMethod || (typeof a.category == "function" ? a.category : null);
|
|
126
128
|
if (!t) return;
|
|
127
129
|
const o = await t();
|
|
128
|
-
B(e) && (
|
|
130
|
+
B(e) && (R.value = Pe(o));
|
|
129
131
|
}
|
|
130
132
|
async function A() {
|
|
131
|
-
if (!
|
|
132
|
-
const e =
|
|
133
|
-
|
|
133
|
+
if (!ae.value || !a.open || E) return;
|
|
134
|
+
const e = x, t = ++j, o = () => B(e) && t === j;
|
|
135
|
+
_.value = !0;
|
|
134
136
|
try {
|
|
135
|
-
const l = await
|
|
137
|
+
const l = await ae.value(ke());
|
|
136
138
|
if (!o()) return;
|
|
137
|
-
const
|
|
139
|
+
const y = a.responseFormatter ? await a.responseFormatter(l) : l;
|
|
138
140
|
if (!o()) return;
|
|
139
|
-
const { rows:
|
|
140
|
-
return
|
|
141
|
+
const { rows: re, total: xe } = qe(y);
|
|
142
|
+
return T = !0, q.value = re, Q.value = xe, p("loaded", re), z(), y;
|
|
141
143
|
} catch (l) {
|
|
142
144
|
o() && p("error", l);
|
|
143
145
|
} finally {
|
|
144
|
-
o() && (
|
|
146
|
+
o() && (_.value = !1);
|
|
145
147
|
}
|
|
146
148
|
}
|
|
147
|
-
function
|
|
149
|
+
function m() {
|
|
148
150
|
return n.page = 1, A();
|
|
149
151
|
}
|
|
150
|
-
function
|
|
152
|
+
function be() {
|
|
151
153
|
return n.page = 1, A();
|
|
152
154
|
}
|
|
153
155
|
function G() {
|
|
@@ -160,10 +162,10 @@ const at = { class: "qy-selection-dialog" }, lt = { class: "qy-selection-dialog_
|
|
|
160
162
|
...a.queryParams
|
|
161
163
|
}), A();
|
|
162
164
|
}
|
|
163
|
-
function
|
|
165
|
+
function Ce() {
|
|
164
166
|
p("append");
|
|
165
167
|
}
|
|
166
|
-
function
|
|
168
|
+
function qe(e) {
|
|
167
169
|
if (Array.isArray(e))
|
|
168
170
|
return { rows: e, total: e.length };
|
|
169
171
|
const t = e == null ? void 0 : e.data;
|
|
@@ -172,83 +174,86 @@ const at = { class: "qy-selection-dialog" }, lt = { class: "qy-selection-dialog_
|
|
|
172
174
|
const o = (e == null ? void 0 : e.records) || (e == null ? void 0 : e.rows) || (t == null ? void 0 : t.records) || [], l = (e == null ? void 0 : e.total) ?? (t == null ? void 0 : t.total) ?? o.length;
|
|
173
175
|
return { rows: o, total: l };
|
|
174
176
|
}
|
|
175
|
-
function
|
|
177
|
+
function Pe(e) {
|
|
176
178
|
const t = (e == null ? void 0 : e.data) ?? e;
|
|
177
179
|
if (!Array.isArray(t)) return [];
|
|
178
180
|
if (typeof a.categoryFormatter == "function")
|
|
179
181
|
return a.categoryFormatter(t);
|
|
180
182
|
if (Array.isArray(a.categoryFormatter)) {
|
|
181
183
|
const [o, l] = a.categoryFormatter;
|
|
182
|
-
return t.map((
|
|
183
|
-
...
|
|
184
|
-
label:
|
|
185
|
-
value:
|
|
186
|
-
children: Array.isArray(
|
|
184
|
+
return t.map((y) => ({
|
|
185
|
+
...y,
|
|
186
|
+
label: y[o],
|
|
187
|
+
value: y[l],
|
|
188
|
+
children: Array.isArray(y.children) ? le(y.children, o, l) : y.children
|
|
187
189
|
}));
|
|
188
190
|
}
|
|
189
191
|
return t;
|
|
190
192
|
}
|
|
191
|
-
function
|
|
193
|
+
function le(e, t, o) {
|
|
192
194
|
return e.map((l) => ({
|
|
193
195
|
...l,
|
|
194
196
|
label: l[t],
|
|
195
197
|
value: l[o],
|
|
196
|
-
children: Array.isArray(l.children) ?
|
|
198
|
+
children: Array.isArray(l.children) ? le(l.children, t, o) : l.children
|
|
197
199
|
}));
|
|
198
200
|
}
|
|
199
|
-
function
|
|
201
|
+
function ke() {
|
|
200
202
|
const e = { ...a.queryParams, ...n };
|
|
201
|
-
return a.searchKey && (e[a.searchKey] = String(e[a.searchKey] || "").trim()), e.category =
|
|
203
|
+
return a.searchKey && (e[a.searchKey] = String(e[a.searchKey] || "").trim()), e.category = Ae(), e;
|
|
202
204
|
}
|
|
203
|
-
function
|
|
205
|
+
function Ae() {
|
|
204
206
|
if (Object.prototype.hasOwnProperty.call(a.queryParams, "category"))
|
|
205
207
|
return a.queryParams.category;
|
|
206
208
|
const e = n.category;
|
|
207
209
|
return Array.isArray(e) ? e : e ? [e] : [];
|
|
208
210
|
}
|
|
209
|
-
function
|
|
211
|
+
function Ke(e) {
|
|
210
212
|
var t, o;
|
|
211
|
-
if (
|
|
212
|
-
if (
|
|
213
|
-
r.value = [e], (t =
|
|
213
|
+
if (k.value !== "none") {
|
|
214
|
+
if (k.value === "single") {
|
|
215
|
+
r.value = [e], (t = S.value) == null || t.setCurrentRow(e), $();
|
|
214
216
|
return;
|
|
215
217
|
}
|
|
216
|
-
Re(e) && ((o =
|
|
218
|
+
Re(e) && ((o = S.value) == null || o.toggleRowSelection(e, !H(e)));
|
|
217
219
|
}
|
|
218
220
|
}
|
|
219
|
-
function
|
|
220
|
-
if (
|
|
221
|
-
const t = new Set(
|
|
221
|
+
function Ve(e) {
|
|
222
|
+
if (k.value !== "multiple" || T) return;
|
|
223
|
+
const t = new Set(q.value.map(s)), o = new Set(e.map(s));
|
|
222
224
|
r.value = r.value.filter(
|
|
223
|
-
(l) => !t.has(
|
|
224
|
-
), e.forEach((l) => {
|
|
225
|
-
|
|
226
|
-
}),
|
|
225
|
+
(l) => !t.has(s(l)) || o.has(s(l))
|
|
226
|
+
), e.filter((l) => t.has(s(l))).forEach((l) => {
|
|
227
|
+
H(l) || r.value.push(l);
|
|
228
|
+
}), $();
|
|
227
229
|
}
|
|
228
|
-
function
|
|
229
|
-
var o, l;
|
|
230
|
+
function Oe(e) {
|
|
230
231
|
r.value = r.value.filter(
|
|
231
|
-
(
|
|
232
|
-
);
|
|
233
|
-
const t = C.value.find((d) => c(d) === c(e));
|
|
234
|
-
t && (q.value === "multiple" ? (o = m.value) == null || o.toggleRowSelection(t, !1) : (l = m.value) == null || l.setCurrentRow()), M();
|
|
232
|
+
(t) => s(t) !== s(e)
|
|
233
|
+
), z(), $();
|
|
235
234
|
}
|
|
236
|
-
function
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
if (
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
235
|
+
function z() {
|
|
236
|
+
const e = ++Y;
|
|
237
|
+
T = !0, Ie(() => {
|
|
238
|
+
if (e === Y)
|
|
239
|
+
try {
|
|
240
|
+
if (!S.value || !a.open || E) return;
|
|
241
|
+
if (k.value === "single") {
|
|
242
|
+
const [o] = r.value, l = q.value.find(
|
|
243
|
+
(y) => o && s(y) === s(o)
|
|
244
|
+
);
|
|
245
|
+
S.value.setCurrentRow(l);
|
|
246
|
+
return;
|
|
247
|
+
}
|
|
248
|
+
if (k.value !== "multiple") return;
|
|
249
|
+
const t = new Set(r.value.map(s));
|
|
250
|
+
S.value.clearSelection(), q.value.forEach((o) => {
|
|
251
|
+
var l;
|
|
252
|
+
t.has(s(o)) && ((l = S.value) == null || l.toggleRowSelection(o, !0));
|
|
253
|
+
});
|
|
254
|
+
} finally {
|
|
255
|
+
T = !1;
|
|
246
256
|
}
|
|
247
|
-
q.value === "multiple" && C.value.forEach((t) => {
|
|
248
|
-
var o;
|
|
249
|
-
(o = m.value) == null || o.toggleRowSelection(t, E(t));
|
|
250
|
-
});
|
|
251
|
-
}
|
|
252
257
|
});
|
|
253
258
|
}
|
|
254
259
|
function Re(e) {
|
|
@@ -256,200 +261,200 @@ const at = { class: "qy-selection-dialog" }, lt = { class: "qy-selection-dialog_
|
|
|
256
261
|
const t = (o = L.value) == null ? void 0 : o.selectable;
|
|
257
262
|
return typeof t == "function" ? t(e) !== !1 : !0;
|
|
258
263
|
}
|
|
259
|
-
function
|
|
260
|
-
return r.value.some((t) =>
|
|
264
|
+
function H(e) {
|
|
265
|
+
return r.value.some((t) => s(t) === s(e));
|
|
261
266
|
}
|
|
262
|
-
function
|
|
263
|
-
return
|
|
267
|
+
function s(e) {
|
|
268
|
+
return oe(e, Z.value);
|
|
264
269
|
}
|
|
265
|
-
function
|
|
266
|
-
return
|
|
270
|
+
function Be(e) {
|
|
271
|
+
return oe(e, pe.value) ?? s(e);
|
|
267
272
|
}
|
|
268
|
-
function
|
|
273
|
+
function oe(e, t) {
|
|
269
274
|
if (!(!e || !t))
|
|
270
275
|
return t.split(".").reduce((o, l) => o == null ? void 0 : o[l], e);
|
|
271
276
|
}
|
|
272
|
-
function
|
|
277
|
+
function $() {
|
|
273
278
|
const e = K(r.value);
|
|
274
279
|
p("selection-change", e);
|
|
275
280
|
}
|
|
276
|
-
function
|
|
281
|
+
function ze() {
|
|
277
282
|
const e = K(r.value);
|
|
278
283
|
p("update:modelValue", e), p("confirm", e), p("submit", { selection: e, rows: e, query: { ...n } });
|
|
279
284
|
}
|
|
280
|
-
function
|
|
281
|
-
(e === "escape" || e === "overlay") &&
|
|
285
|
+
function Fe(e) {
|
|
286
|
+
(e === "escape" || e === "overlay") && ne();
|
|
282
287
|
}
|
|
283
|
-
function
|
|
288
|
+
function ne() {
|
|
284
289
|
I(), r.value = K(J.value), p("update:open", !1), p("cancel"), p("close");
|
|
285
290
|
}
|
|
286
|
-
async function
|
|
291
|
+
async function Te() {
|
|
287
292
|
var t;
|
|
288
293
|
const e = JSON.stringify(r.value);
|
|
289
|
-
await ((t = navigator.clipboard) == null ? void 0 : t.writeText(e)),
|
|
294
|
+
await ((t = navigator.clipboard) == null ? void 0 : t.writeText(e)), W.success("复制成功");
|
|
290
295
|
}
|
|
291
|
-
function
|
|
296
|
+
function _e() {
|
|
292
297
|
try {
|
|
293
|
-
const e = JSON.parse(
|
|
298
|
+
const e = JSON.parse(M.value);
|
|
294
299
|
if (!Array.isArray(e)) {
|
|
295
|
-
|
|
300
|
+
W.error("粘贴内容需要是数组");
|
|
296
301
|
return;
|
|
297
302
|
}
|
|
298
303
|
e.forEach((t) => {
|
|
299
|
-
|
|
300
|
-
}),
|
|
304
|
+
H(t) || r.value.push(t);
|
|
305
|
+
}), P.value = !1, $(), z();
|
|
301
306
|
} catch (e) {
|
|
302
|
-
|
|
307
|
+
W.error(`粘贴错误: ${(e == null ? void 0 : e.message) || "内容格式错误"}`);
|
|
303
308
|
}
|
|
304
309
|
}
|
|
305
310
|
function K(e = []) {
|
|
306
311
|
return e.map((t) => ({ ...t }));
|
|
307
312
|
}
|
|
308
|
-
return
|
|
309
|
-
search:
|
|
313
|
+
return de({
|
|
314
|
+
search: m,
|
|
310
315
|
handleSearch: A,
|
|
311
|
-
handleQuerySearch:
|
|
316
|
+
handleQuerySearch: m,
|
|
312
317
|
resetSearch: G,
|
|
313
|
-
getTableRef: () =>
|
|
314
|
-
getTableData: () =>
|
|
318
|
+
getTableRef: () => S.value,
|
|
319
|
+
getTableData: () => q.value,
|
|
315
320
|
getSelection: () => K(r.value)
|
|
316
321
|
}), (e, t) => {
|
|
317
|
-
const o =
|
|
318
|
-
return
|
|
322
|
+
const o = Ee;
|
|
323
|
+
return c(), h(se, {
|
|
319
324
|
open: f.open,
|
|
320
325
|
title: f.title,
|
|
321
326
|
width: f.width,
|
|
322
|
-
onOpened:
|
|
323
|
-
onConfirm:
|
|
324
|
-
onCancel:
|
|
325
|
-
onClose:
|
|
327
|
+
onOpened: we,
|
|
328
|
+
onConfirm: ze,
|
|
329
|
+
onCancel: ne,
|
|
330
|
+
onClose: Fe
|
|
326
331
|
}, {
|
|
327
332
|
default: i(() => [
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
f.showSelected ? (
|
|
332
|
-
t[12] || (t[12] =
|
|
333
|
-
|
|
334
|
-
(
|
|
335
|
-
key:
|
|
333
|
+
F("div", ot, [
|
|
334
|
+
V(e.$slots, "side", {}, void 0, !0),
|
|
335
|
+
F("div", nt, [
|
|
336
|
+
f.showSelected ? (c(), O("div", rt, [
|
|
337
|
+
t[12] || (t[12] = F("span", { class: "qy-selection-dialog__selected-label" }, "已选项", -1)),
|
|
338
|
+
F("div", it, [
|
|
339
|
+
(c(!0), O(Qe, null, Le(r.value, (l) => (c(), h(ce, {
|
|
340
|
+
key: s(l),
|
|
336
341
|
closable: "",
|
|
337
342
|
class: "qy-selection-dialog__selected-tag",
|
|
338
|
-
onClose: (
|
|
343
|
+
onClose: (y) => Oe(l)
|
|
339
344
|
}, {
|
|
340
345
|
default: i(() => [
|
|
341
|
-
|
|
346
|
+
w(Je(Be(l)), 1)
|
|
342
347
|
]),
|
|
343
348
|
_: 2
|
|
344
349
|
}, 1032, ["onClose"]))), 128)),
|
|
345
|
-
r.value.length ? v("", !0) : (
|
|
350
|
+
r.value.length ? v("", !0) : (c(), h(ce, {
|
|
346
351
|
key: 0,
|
|
347
352
|
tone: "info"
|
|
348
353
|
}, {
|
|
349
354
|
default: i(() => [...t[9] || (t[9] = [
|
|
350
|
-
|
|
355
|
+
w("无", -1)
|
|
351
356
|
])]),
|
|
352
357
|
_: 1
|
|
353
358
|
}))
|
|
354
359
|
]),
|
|
355
|
-
f.showCopyPaste ? (
|
|
356
|
-
|
|
360
|
+
f.showCopyPaste ? (c(), O("div", ut, [
|
|
361
|
+
d(u(C), {
|
|
357
362
|
size: "small",
|
|
358
|
-
onClick:
|
|
363
|
+
onClick: Te
|
|
359
364
|
}, {
|
|
360
365
|
default: i(() => [...t[10] || (t[10] = [
|
|
361
|
-
|
|
366
|
+
w("复制", -1)
|
|
362
367
|
])]),
|
|
363
368
|
_: 1
|
|
364
369
|
}),
|
|
365
|
-
|
|
370
|
+
d(u(C), {
|
|
366
371
|
size: "small",
|
|
367
|
-
onClick: t[0] || (t[0] = (l) =>
|
|
372
|
+
onClick: t[0] || (t[0] = (l) => P.value = !0)
|
|
368
373
|
}, {
|
|
369
374
|
default: i(() => [...t[11] || (t[11] = [
|
|
370
|
-
|
|
375
|
+
w("粘贴", -1)
|
|
371
376
|
])]),
|
|
372
377
|
_: 1
|
|
373
378
|
})
|
|
374
379
|
])) : v("", !0)
|
|
375
380
|
])) : v("", !0),
|
|
376
|
-
|
|
377
|
-
|
|
381
|
+
ve.value ? (c(), O("div", st, [
|
|
382
|
+
d(u(Xe), {
|
|
378
383
|
class: "qy-selection-dialog__search",
|
|
379
384
|
inline: "",
|
|
380
385
|
model: n
|
|
381
386
|
}, {
|
|
382
387
|
default: i(() => [
|
|
383
|
-
|
|
388
|
+
V(e.$slots, "search", {
|
|
384
389
|
query: n,
|
|
385
|
-
search:
|
|
390
|
+
search: m,
|
|
386
391
|
reset: G
|
|
387
392
|
}, () => [
|
|
388
|
-
|
|
393
|
+
R.value.length ? (c(), h(u(U), {
|
|
389
394
|
key: 0,
|
|
390
395
|
label: "分类"
|
|
391
396
|
}, {
|
|
392
397
|
default: i(() => [
|
|
393
|
-
|
|
398
|
+
d(at, {
|
|
394
399
|
modelValue: n.category,
|
|
395
400
|
"onUpdate:modelValue": t[1] || (t[1] = (l) => n.category = l),
|
|
396
401
|
class: "qy-selection-dialog__category",
|
|
397
|
-
options:
|
|
402
|
+
options: R.value,
|
|
398
403
|
clearable: "",
|
|
399
404
|
filterable: "",
|
|
400
405
|
"check-strictly": "",
|
|
401
406
|
"render-after-expand": !1,
|
|
402
|
-
onChange:
|
|
407
|
+
onChange: m
|
|
403
408
|
}, null, 8, ["modelValue", "options"])
|
|
404
409
|
]),
|
|
405
410
|
_: 1
|
|
406
411
|
})) : v("", !0),
|
|
407
|
-
|
|
412
|
+
ee.value.length ? (c(), h(u(U), {
|
|
408
413
|
key: 1,
|
|
409
414
|
label: "类型"
|
|
410
415
|
}, {
|
|
411
416
|
default: i(() => [
|
|
412
|
-
|
|
417
|
+
d(tt, ie({
|
|
413
418
|
modelValue: n.type,
|
|
414
419
|
"onUpdate:modelValue": t[2] || (t[2] = (l) => n.type = l),
|
|
415
420
|
class: "qy-selection-dialog__type",
|
|
416
|
-
options:
|
|
421
|
+
options: ee.value,
|
|
417
422
|
placeholder: "请选择类型",
|
|
418
423
|
clearable: ""
|
|
419
|
-
},
|
|
424
|
+
}, ge.value, { onChange: m }), null, 16, ["modelValue", "options"])
|
|
420
425
|
]),
|
|
421
426
|
_: 1
|
|
422
427
|
})) : v("", !0),
|
|
423
|
-
f.searchKey ? (
|
|
428
|
+
f.searchKey ? (c(), h(u(U), {
|
|
424
429
|
key: 2,
|
|
425
430
|
label: "搜索"
|
|
426
431
|
}, {
|
|
427
432
|
default: i(() => [
|
|
428
|
-
|
|
433
|
+
d(u(ue), {
|
|
429
434
|
modelValue: n[f.searchKey],
|
|
430
435
|
"onUpdate:modelValue": t[3] || (t[3] = (l) => n[f.searchKey] = l),
|
|
431
436
|
clearable: "",
|
|
432
437
|
placeholder: "请输入",
|
|
433
438
|
class: "qy-selection-dialog__search-input",
|
|
434
|
-
onKeydown:
|
|
439
|
+
onKeydown: Ge(He(m, ["prevent"]), ["enter"])
|
|
435
440
|
}, null, 8, ["modelValue", "onKeydown"])
|
|
436
441
|
]),
|
|
437
442
|
_: 1
|
|
438
443
|
})) : v("", !0),
|
|
439
|
-
|
|
444
|
+
d(u(U), null, {
|
|
440
445
|
default: i(() => [
|
|
441
|
-
|
|
446
|
+
d(u(C), {
|
|
442
447
|
type: "primary",
|
|
443
|
-
onClick:
|
|
448
|
+
onClick: m
|
|
444
449
|
}, {
|
|
445
450
|
default: i(() => [...t[13] || (t[13] = [
|
|
446
|
-
|
|
451
|
+
w("查询", -1)
|
|
447
452
|
])]),
|
|
448
453
|
_: 1
|
|
449
454
|
}),
|
|
450
|
-
|
|
455
|
+
d(u(C), { onClick: G }, {
|
|
451
456
|
default: i(() => [...t[14] || (t[14] = [
|
|
452
|
-
|
|
457
|
+
w("重置", -1)
|
|
453
458
|
])]),
|
|
454
459
|
_: 1
|
|
455
460
|
})
|
|
@@ -460,59 +465,59 @@ const at = { class: "qy-selection-dialog" }, lt = { class: "qy-selection-dialog_
|
|
|
460
465
|
]),
|
|
461
466
|
_: 3
|
|
462
467
|
}, 8, ["model"]),
|
|
463
|
-
|
|
464
|
-
|
|
468
|
+
me.value ? (c(), O("div", ct, [
|
|
469
|
+
te.value ? (c(), h(u(C), {
|
|
465
470
|
key: 0,
|
|
466
471
|
type: "primary",
|
|
467
|
-
onClick:
|
|
472
|
+
onClick: Ce
|
|
468
473
|
}, {
|
|
469
474
|
default: i(() => [...t[15] || (t[15] = [
|
|
470
|
-
|
|
475
|
+
w(" 新增 ", -1)
|
|
471
476
|
])]),
|
|
472
477
|
_: 1
|
|
473
478
|
})) : v("", !0),
|
|
474
|
-
|
|
479
|
+
V(e.$slots, "toolbar", {
|
|
475
480
|
query: n,
|
|
476
|
-
search:
|
|
481
|
+
search: m
|
|
477
482
|
}, void 0, !0),
|
|
478
|
-
|
|
483
|
+
V(e.$slots, "bar", {
|
|
479
484
|
query: n,
|
|
480
|
-
search:
|
|
485
|
+
search: m
|
|
481
486
|
}, void 0, !0)
|
|
482
487
|
])) : v("", !0)
|
|
483
488
|
])) : v("", !0),
|
|
484
|
-
|
|
489
|
+
We((c(), h(u(Ye), ie({
|
|
485
490
|
ref_key: "tableRef",
|
|
486
|
-
ref:
|
|
487
|
-
data:
|
|
488
|
-
"row-key":
|
|
491
|
+
ref: S,
|
|
492
|
+
data: q.value,
|
|
493
|
+
"row-key": Z.value,
|
|
489
494
|
border: "",
|
|
490
495
|
"highlight-current-row": "",
|
|
491
496
|
"max-height": "550px"
|
|
492
497
|
}, L.value, {
|
|
493
|
-
onSelectionChange:
|
|
494
|
-
onRowClick:
|
|
498
|
+
onSelectionChange: Ve,
|
|
499
|
+
onRowClick: Ke
|
|
495
500
|
}), {
|
|
496
501
|
default: i(() => {
|
|
497
502
|
var l;
|
|
498
503
|
return [
|
|
499
|
-
|
|
504
|
+
k.value === "multiple" ? (c(), h(u(Ze), {
|
|
500
505
|
key: 0,
|
|
501
506
|
type: "selection",
|
|
502
507
|
"reserve-selection": "",
|
|
503
508
|
width: "42",
|
|
504
509
|
selectable: (l = L.value) == null ? void 0 : l.selectable
|
|
505
510
|
}, null, 8, ["selectable"])) : v("", !0),
|
|
506
|
-
|
|
507
|
-
|
|
511
|
+
V(e.$slots, "columns", {}, void 0, !0),
|
|
512
|
+
V(e.$slots, "cols", {}, void 0, !0)
|
|
508
513
|
];
|
|
509
514
|
}),
|
|
510
515
|
_: 3
|
|
511
516
|
}, 16, ["data", "row-key"])), [
|
|
512
|
-
[o,
|
|
517
|
+
[o, _.value]
|
|
513
518
|
]),
|
|
514
|
-
f.showPagination && Q.value > 0 ? (
|
|
515
|
-
|
|
519
|
+
f.showPagination && Q.value > 0 ? (c(), O("div", dt, [
|
|
520
|
+
d(u(et), {
|
|
516
521
|
"current-page": n.page,
|
|
517
522
|
"onUpdate:currentPage": t[4] || (t[4] = (l) => n.page = l),
|
|
518
523
|
"page-size": n.pageSize,
|
|
@@ -520,41 +525,41 @@ const at = { class: "qy-selection-dialog" }, lt = { class: "qy-selection-dialog_
|
|
|
520
525
|
total: Q.value,
|
|
521
526
|
"page-sizes": f.pageSizes,
|
|
522
527
|
layout: "total, sizes, prev, pager, next, jumper",
|
|
523
|
-
onSizeChange:
|
|
528
|
+
onSizeChange: be,
|
|
524
529
|
onCurrentChange: A
|
|
525
530
|
}, null, 8, ["current-page", "page-size", "total", "page-sizes"])
|
|
526
531
|
])) : v("", !0)
|
|
527
532
|
])
|
|
528
533
|
]),
|
|
529
|
-
|
|
530
|
-
open:
|
|
534
|
+
d(se, {
|
|
535
|
+
open: P.value,
|
|
531
536
|
title: "粘贴数据",
|
|
532
537
|
"show-footer": !1,
|
|
533
538
|
width: "560px",
|
|
534
|
-
"onUpdate:open": t[8] || (t[8] = (l) =>
|
|
539
|
+
"onUpdate:open": t[8] || (t[8] = (l) => P.value = l)
|
|
535
540
|
}, {
|
|
536
541
|
default: i(() => [
|
|
537
|
-
|
|
538
|
-
modelValue:
|
|
539
|
-
"onUpdate:modelValue": t[6] || (t[6] = (l) =>
|
|
542
|
+
d(u(ue), {
|
|
543
|
+
modelValue: M.value,
|
|
544
|
+
"onUpdate:modelValue": t[6] || (t[6] = (l) => M.value = l),
|
|
540
545
|
type: "textarea",
|
|
541
546
|
rows: 8
|
|
542
547
|
}, null, 8, ["modelValue"]),
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
onClick: t[7] || (t[7] = (l) =>
|
|
548
|
+
F("div", yt, [
|
|
549
|
+
d(u(C), {
|
|
550
|
+
onClick: t[7] || (t[7] = (l) => P.value = !1)
|
|
546
551
|
}, {
|
|
547
552
|
default: i(() => [...t[16] || (t[16] = [
|
|
548
|
-
|
|
553
|
+
w("取消", -1)
|
|
549
554
|
])]),
|
|
550
555
|
_: 1
|
|
551
556
|
}),
|
|
552
|
-
|
|
557
|
+
d(u(C), {
|
|
553
558
|
type: "primary",
|
|
554
|
-
onClick:
|
|
559
|
+
onClick: _e
|
|
555
560
|
}, {
|
|
556
561
|
default: i(() => [...t[17] || (t[17] = [
|
|
557
|
-
|
|
562
|
+
w("确认", -1)
|
|
558
563
|
])]),
|
|
559
564
|
_: 1
|
|
560
565
|
})
|
|
@@ -567,7 +572,7 @@ const at = { class: "qy-selection-dialog" }, lt = { class: "qy-selection-dialog_
|
|
|
567
572
|
}, 8, ["open", "title", "width"]);
|
|
568
573
|
};
|
|
569
574
|
}
|
|
570
|
-
}),
|
|
575
|
+
}), Ct = /* @__PURE__ */ lt(ft, [["__scopeId", "data-v-125cb10b"]]);
|
|
571
576
|
export {
|
|
572
|
-
|
|
577
|
+
Ct as C
|
|
573
578
|
};
|