general-basic-form 2.0.26 → 2.0.28
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/README.md +527 -527
- package/dist/index.d.ts +16 -16
- package/dist/index.js +175 -169
- package/dist/index.umd.cjs +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as k, inject as g, resolveComponent as p, openBlock as
|
|
1
|
+
import { defineComponent as k, inject as g, resolveComponent as p, openBlock as o, createBlock as i, mergeProps as b, withKeys as Z, createSlots as K, renderList as q, withCtx as y, resolveDynamicComponent as M, createCommentVNode as h, ref as v, unref as d, resolveDirective as G, withDirectives as D, createElementBlock as z, createVNode as Q, createElementVNode as J, computed as T, onBeforeUnmount as ee, normalizeStyle as te, createTextVNode as I, toDisplayString as x, h as ne, normalizeProps as oe, guardReactiveProps as re, Fragment as L, provide as A, renderSlot as O, vShow as ae, watch as se } from "vue";
|
|
2
2
|
import { useRoute as le } from "vue-router";
|
|
3
|
-
const
|
|
3
|
+
const W = {
|
|
4
4
|
placeholder: "请输入",
|
|
5
5
|
style: "width: 200px",
|
|
6
6
|
clearable: !0
|
|
@@ -9,7 +9,7 @@ const H = {
|
|
|
9
9
|
"start-placeholder": "开始日期",
|
|
10
10
|
"end-placeholder": "结束日期",
|
|
11
11
|
type: "daterange"
|
|
12
|
-
},
|
|
12
|
+
}, H = {
|
|
13
13
|
placeholder: "请选择",
|
|
14
14
|
filterable: !0,
|
|
15
15
|
clearable: !0,
|
|
@@ -17,8 +17,8 @@ const H = {
|
|
|
17
17
|
}, ue = k({
|
|
18
18
|
components: {
|
|
19
19
|
InputArchive: (e) => {
|
|
20
|
-
const { templateEle:
|
|
21
|
-
return
|
|
20
|
+
const { templateEle: n } = e;
|
|
21
|
+
return n();
|
|
22
22
|
}
|
|
23
23
|
},
|
|
24
24
|
props: {
|
|
@@ -26,13 +26,13 @@ const H = {
|
|
|
26
26
|
// null就是any
|
|
27
27
|
},
|
|
28
28
|
setup() {
|
|
29
|
-
const e = g("queryParams", {}),
|
|
30
|
-
return { queryParams: e, getList:
|
|
29
|
+
const e = g("queryParams", {}), n = g("getList"), t = g("size");
|
|
30
|
+
return { queryParams: e, getList: n, size: t };
|
|
31
31
|
},
|
|
32
32
|
data() {
|
|
33
33
|
return {
|
|
34
34
|
inputSetting: {
|
|
35
|
-
...
|
|
35
|
+
...W,
|
|
36
36
|
...this.item.inputSetting
|
|
37
37
|
}
|
|
38
38
|
};
|
|
@@ -54,24 +54,24 @@ const H = {
|
|
|
54
54
|
// console.log(val);
|
|
55
55
|
// },
|
|
56
56
|
// },
|
|
57
|
-
}), w = (e,
|
|
57
|
+
}), w = (e, n) => {
|
|
58
58
|
const t = e.__vccOpts || e;
|
|
59
|
-
for (const [u,
|
|
60
|
-
t[u] =
|
|
59
|
+
for (const [u, a] of n)
|
|
60
|
+
t[u] = a;
|
|
61
61
|
return t;
|
|
62
62
|
};
|
|
63
|
-
function ce(e,
|
|
63
|
+
function ce(e, n, t, u, a, s) {
|
|
64
64
|
const l = p("el-input");
|
|
65
|
-
return
|
|
65
|
+
return o(), i(l, b({
|
|
66
66
|
onKeydown: Z(e.getList, ["enter"]),
|
|
67
67
|
modelValue: e.queryParams[e.item.prop],
|
|
68
|
-
"onUpdate:modelValue":
|
|
68
|
+
"onUpdate:modelValue": n[0] || (n[0] = (r) => e.queryParams[e.item.prop] = r),
|
|
69
69
|
size: e.size
|
|
70
70
|
}, e.inputSetting), K({ _: 2 }, [
|
|
71
|
-
|
|
71
|
+
q(e.item.template, (r, m) => ({
|
|
72
72
|
name: m,
|
|
73
73
|
fn: y(() => [
|
|
74
|
-
r ? (
|
|
74
|
+
r ? (o(), i(M(e.currentInputComponent()), {
|
|
75
75
|
key: m,
|
|
76
76
|
templateEle: r
|
|
77
77
|
}, null, 8, ["templateEle"])) : h("", !0)
|
|
@@ -85,17 +85,17 @@ const j = /* @__PURE__ */ w(ue, [["render", ce]]), pe = /* @__PURE__ */ k({
|
|
|
85
85
|
item: {}
|
|
86
86
|
},
|
|
87
87
|
setup(e) {
|
|
88
|
-
const { item:
|
|
89
|
-
...
|
|
90
|
-
...
|
|
88
|
+
const { item: n } = e, t = g("queryParams", {}), u = g("size"), a = v({
|
|
89
|
+
...W,
|
|
90
|
+
...n.inputSetting
|
|
91
91
|
});
|
|
92
|
-
return (
|
|
92
|
+
return (s, l) => {
|
|
93
93
|
const r = p("el-input-number");
|
|
94
|
-
return
|
|
95
|
-
modelValue: d(t)[
|
|
96
|
-
"onUpdate:modelValue": l[0] || (l[0] = (m) => d(t)[
|
|
94
|
+
return o(), i(r, b({
|
|
95
|
+
modelValue: d(t)[s.item.prop],
|
|
96
|
+
"onUpdate:modelValue": l[0] || (l[0] = (m) => d(t)[s.item.prop] = m),
|
|
97
97
|
size: d(u)
|
|
98
|
-
},
|
|
98
|
+
}, a.value), null, 16, ["modelValue", "size"]);
|
|
99
99
|
};
|
|
100
100
|
}
|
|
101
101
|
}), X = Symbol(), de = { class: "input-graphic-verification" }, me = ["src"], _e = /* @__PURE__ */ k({
|
|
@@ -104,81 +104,81 @@ const j = /* @__PURE__ */ w(ue, [["render", ce]]), pe = /* @__PURE__ */ k({
|
|
|
104
104
|
item: {}
|
|
105
105
|
},
|
|
106
106
|
setup(e) {
|
|
107
|
-
const { item:
|
|
108
|
-
} } =
|
|
109
|
-
u && !
|
|
107
|
+
const { item: n } = e, { graphicSrc: t = "", getGraphic: u = () => {
|
|
108
|
+
} } = n, { formLoading: a, updateFormLoading: s } = g(X), l = async () => {
|
|
109
|
+
u && !a.value && await u();
|
|
110
110
|
};
|
|
111
111
|
return (r, m) => {
|
|
112
112
|
const _ = G("loading");
|
|
113
|
-
return D((
|
|
113
|
+
return D((o(), z("div", de, [
|
|
114
114
|
Q(j, {
|
|
115
115
|
item: r.item,
|
|
116
116
|
class: "input"
|
|
117
117
|
}, null, 8, ["item"]),
|
|
118
|
-
|
|
118
|
+
J("img", {
|
|
119
119
|
class: "graphic",
|
|
120
120
|
onClick: l,
|
|
121
121
|
src: d(t)
|
|
122
122
|
}, null, 8, me)
|
|
123
123
|
])), [
|
|
124
|
-
[_, d(
|
|
124
|
+
[_, d(a)]
|
|
125
125
|
]);
|
|
126
126
|
};
|
|
127
127
|
}
|
|
128
128
|
});
|
|
129
|
-
const fe = /* @__PURE__ */ w(_e, [["__scopeId", "data-v-
|
|
129
|
+
const fe = /* @__PURE__ */ w(_e, [["__scopeId", "data-v-c12a4b84"]]), B = "获取验证码", ye = 60, he = /* @__PURE__ */ k({
|
|
130
130
|
__name: "verification-button",
|
|
131
131
|
props: {
|
|
132
132
|
getSmscode: { type: Function }
|
|
133
133
|
},
|
|
134
134
|
setup(e) {
|
|
135
|
-
const { getSmscode:
|
|
136
|
-
u && (clearInterval(u.value), u.value = null, t.value =
|
|
135
|
+
const { getSmscode: n } = e, t = v(B), u = v(null), a = T(() => t.value === B), s = () => {
|
|
136
|
+
u && (clearInterval(u.value), u.value = null, t.value = B);
|
|
137
137
|
}, l = async () => {
|
|
138
|
-
if (t.value ===
|
|
138
|
+
if (t.value === B)
|
|
139
139
|
if (t.value = ye, u.value = setInterval(() => {
|
|
140
140
|
if (Number(t.value) <= 0 || !t.value) {
|
|
141
|
-
|
|
141
|
+
s();
|
|
142
142
|
return;
|
|
143
143
|
} else
|
|
144
144
|
t.value = Number(t.value) - 1;
|
|
145
|
-
}, 1e3),
|
|
146
|
-
await
|
|
145
|
+
}, 1e3), n)
|
|
146
|
+
await n() === !1 && s();
|
|
147
147
|
else
|
|
148
148
|
return;
|
|
149
149
|
};
|
|
150
150
|
return ee(() => {
|
|
151
|
-
|
|
151
|
+
s();
|
|
152
152
|
}), (r, m) => {
|
|
153
153
|
const _ = p("el-button");
|
|
154
|
-
return
|
|
154
|
+
return o(), i(_, {
|
|
155
155
|
class: "verifiaction-button",
|
|
156
156
|
style: te({
|
|
157
|
-
color:
|
|
158
|
-
cursor:
|
|
157
|
+
color: a.value ? "var(--color-primary, #409EFF)" : "var(--text-color-placeholder, #A8ABB2)",
|
|
158
|
+
cursor: a.value ? "pointer" : "default"
|
|
159
159
|
}),
|
|
160
160
|
onClick: l
|
|
161
161
|
}, {
|
|
162
162
|
default: y(() => [
|
|
163
|
-
I(x(
|
|
163
|
+
I(x(a.value ? B : t.value + "s"), 1)
|
|
164
164
|
]),
|
|
165
165
|
_: 1
|
|
166
166
|
}, 8, ["style"]);
|
|
167
167
|
};
|
|
168
168
|
}
|
|
169
169
|
});
|
|
170
|
-
const ve = /* @__PURE__ */ w(he, [["__scopeId", "data-v-
|
|
170
|
+
const ve = /* @__PURE__ */ w(he, [["__scopeId", "data-v-a6c3916a"]]), ge = /* @__PURE__ */ k({
|
|
171
171
|
__name: "index",
|
|
172
172
|
props: {
|
|
173
173
|
item: {}
|
|
174
174
|
},
|
|
175
175
|
setup(e) {
|
|
176
|
-
const { item:
|
|
176
|
+
const { item: n } = e, t = n;
|
|
177
177
|
return t.template = {
|
|
178
178
|
append: () => ne(ve, {
|
|
179
179
|
getSmscode: t.getSmscode
|
|
180
180
|
})
|
|
181
|
-
}, (u,
|
|
181
|
+
}, (u, a) => (o(), i(j, {
|
|
182
182
|
item: d(t),
|
|
183
183
|
class: "input"
|
|
184
184
|
}, null, 8, ["item"]));
|
|
@@ -186,8 +186,8 @@ const ve = /* @__PURE__ */ w(he, [["__scopeId", "data-v-4074e137"]]), ge = /* @_
|
|
|
186
186
|
}), be = k({
|
|
187
187
|
components: {
|
|
188
188
|
slotArchive: (e) => {
|
|
189
|
-
const { templateEle:
|
|
190
|
-
return
|
|
189
|
+
const { templateEle: n } = e;
|
|
190
|
+
return n();
|
|
191
191
|
}
|
|
192
192
|
},
|
|
193
193
|
props: {
|
|
@@ -209,13 +209,13 @@ const ve = /* @__PURE__ */ w(he, [["__scopeId", "data-v-4074e137"]]), ge = /* @_
|
|
|
209
209
|
}
|
|
210
210
|
}
|
|
211
211
|
});
|
|
212
|
-
function ke(e,
|
|
212
|
+
function ke(e, n, t, u, a, s) {
|
|
213
213
|
const l = p("el-divider");
|
|
214
|
-
return
|
|
215
|
-
|
|
214
|
+
return o(), i(l, oe(re(e.dividerSetting)), K({ _: 2 }, [
|
|
215
|
+
q(e.item.template, (r, m) => ({
|
|
216
216
|
name: m,
|
|
217
217
|
fn: y(() => [
|
|
218
|
-
r ? (
|
|
218
|
+
r ? (o(), i(M(e.currentInputComponent()), {
|
|
219
219
|
key: m,
|
|
220
220
|
templateEle: r
|
|
221
221
|
}, null, 8, ["templateEle"])) : h("", !0)
|
|
@@ -229,24 +229,24 @@ const Se = /* @__PURE__ */ w(be, [["render", ke]]), ze = /* @__PURE__ */ k({
|
|
|
229
229
|
item: {}
|
|
230
230
|
},
|
|
231
231
|
setup(e) {
|
|
232
|
-
const { item:
|
|
233
|
-
...
|
|
234
|
-
}),
|
|
235
|
-
...
|
|
232
|
+
const { item: n } = e, t = g("queryParams", {}), u = g("size"), a = v({
|
|
233
|
+
...n.radioSetting
|
|
234
|
+
}), s = v({
|
|
235
|
+
...n.radioGroupSetting
|
|
236
236
|
});
|
|
237
237
|
return (l, r) => {
|
|
238
238
|
const m = p("el-radio"), _ = p("el-radio-group");
|
|
239
|
-
return
|
|
239
|
+
return o(), i(_, b({
|
|
240
240
|
modelValue: d(t)[l.item.prop],
|
|
241
241
|
"onUpdate:modelValue": r[0] || (r[0] = (f) => d(t)[l.item.prop] = f),
|
|
242
242
|
size: d(u)
|
|
243
|
-
},
|
|
243
|
+
}, s.value), {
|
|
244
244
|
default: y(() => [
|
|
245
|
-
(
|
|
245
|
+
(o(!0), z(L, null, q(l.item.option || [], (f) => (o(), i(m, b({
|
|
246
246
|
size: d(u),
|
|
247
247
|
label: f.label,
|
|
248
248
|
key: f.label
|
|
249
|
-
},
|
|
249
|
+
}, a.value), {
|
|
250
250
|
default: y(() => [
|
|
251
251
|
I(x(f.value), 1)
|
|
252
252
|
]),
|
|
@@ -263,24 +263,24 @@ const Se = /* @__PURE__ */ w(be, [["render", ke]]), ze = /* @__PURE__ */ k({
|
|
|
263
263
|
item: {}
|
|
264
264
|
},
|
|
265
265
|
setup(e) {
|
|
266
|
-
const { item:
|
|
267
|
-
...
|
|
268
|
-
}),
|
|
269
|
-
...
|
|
266
|
+
const { item: n } = e, t = g("queryParams", {}), u = g("size"), a = v({
|
|
267
|
+
...n.checkboxSetting
|
|
268
|
+
}), s = v({
|
|
269
|
+
...n.checkboxGroupSetting
|
|
270
270
|
});
|
|
271
271
|
return (l, r) => {
|
|
272
272
|
const m = p("el-checkbox"), _ = p("el-checkbox-group");
|
|
273
|
-
return
|
|
273
|
+
return o(), i(_, b({
|
|
274
274
|
modelValue: d(t)[l.item.prop],
|
|
275
275
|
"onUpdate:modelValue": r[0] || (r[0] = (f) => d(t)[l.item.prop] = f),
|
|
276
276
|
size: d(u)
|
|
277
|
-
},
|
|
277
|
+
}, s.value), {
|
|
278
278
|
default: y(() => [
|
|
279
|
-
(
|
|
279
|
+
(o(!0), z(L, null, q(l.item.option || [], (f) => (o(), i(m, b({
|
|
280
280
|
size: d(u),
|
|
281
281
|
label: f.label,
|
|
282
282
|
key: f.label
|
|
283
|
-
},
|
|
283
|
+
}, a.value), {
|
|
284
284
|
default: y(() => [
|
|
285
285
|
I(x(f.value), 1)
|
|
286
286
|
]),
|
|
@@ -297,38 +297,38 @@ const Se = /* @__PURE__ */ w(be, [["render", ke]]), ze = /* @__PURE__ */ k({
|
|
|
297
297
|
item: {}
|
|
298
298
|
},
|
|
299
299
|
setup(e) {
|
|
300
|
-
const { item:
|
|
300
|
+
const { item: n } = e, t = g("queryParams", {}), u = g("size"), a = v({
|
|
301
301
|
...ie,
|
|
302
|
-
...
|
|
302
|
+
...n.datePackerSetting
|
|
303
303
|
});
|
|
304
|
-
return (
|
|
304
|
+
return (s, l) => {
|
|
305
305
|
const r = p("el-date-picker");
|
|
306
|
-
return
|
|
307
|
-
modelValue: d(t)[
|
|
308
|
-
"onUpdate:modelValue": l[0] || (l[0] = (m) => d(t)[
|
|
306
|
+
return o(), i(r, b({
|
|
307
|
+
modelValue: d(t)[s.item.prop],
|
|
308
|
+
"onUpdate:modelValue": l[0] || (l[0] = (m) => d(t)[s.item.prop] = m),
|
|
309
309
|
size: d(u)
|
|
310
|
-
},
|
|
310
|
+
}, a.value), null, 16, ["modelValue", "size"]);
|
|
311
311
|
};
|
|
312
312
|
}
|
|
313
|
-
}),
|
|
313
|
+
}), qe = /* @__PURE__ */ k({
|
|
314
314
|
__name: "index",
|
|
315
315
|
props: {
|
|
316
316
|
item: {}
|
|
317
317
|
},
|
|
318
318
|
setup(e) {
|
|
319
|
-
const { item:
|
|
320
|
-
...
|
|
321
|
-
...
|
|
319
|
+
const { item: n } = e, t = g("queryParams", {}), u = g("size"), a = v({
|
|
320
|
+
...H,
|
|
321
|
+
...n.selectSetting
|
|
322
322
|
});
|
|
323
|
-
return (
|
|
323
|
+
return (s, l) => {
|
|
324
324
|
const r = p("el-option"), m = p("el-select");
|
|
325
|
-
return
|
|
326
|
-
modelValue: d(t)[
|
|
327
|
-
"onUpdate:modelValue": l[0] || (l[0] = (_) => d(t)[
|
|
325
|
+
return o(), i(m, b({
|
|
326
|
+
modelValue: d(t)[s.item.prop],
|
|
327
|
+
"onUpdate:modelValue": l[0] || (l[0] = (_) => d(t)[s.item.prop] = _),
|
|
328
328
|
size: d(u)
|
|
329
|
-
},
|
|
329
|
+
}, a.value), {
|
|
330
330
|
default: y(() => [
|
|
331
|
-
(
|
|
331
|
+
(o(!0), z(L, null, q(s.item.option || [], (_) => (o(), i(r, {
|
|
332
332
|
key: _.value,
|
|
333
333
|
label: _.label,
|
|
334
334
|
value: _.value
|
|
@@ -338,24 +338,24 @@ const Se = /* @__PURE__ */ w(be, [["render", ke]]), ze = /* @__PURE__ */ k({
|
|
|
338
338
|
}, 16, ["modelValue", "size"]);
|
|
339
339
|
};
|
|
340
340
|
}
|
|
341
|
-
}),
|
|
341
|
+
}), Ve = /* @__PURE__ */ k({
|
|
342
342
|
__name: "index",
|
|
343
343
|
props: {
|
|
344
344
|
item: {}
|
|
345
345
|
},
|
|
346
346
|
setup(e) {
|
|
347
|
-
const { item:
|
|
348
|
-
...
|
|
349
|
-
...
|
|
347
|
+
const { item: n } = e, t = g("queryParams", {}), u = g("size"), a = v({
|
|
348
|
+
...H,
|
|
349
|
+
...n.selectSetting
|
|
350
350
|
});
|
|
351
|
-
return (
|
|
351
|
+
return (s, l) => {
|
|
352
352
|
const r = p("el-cascader");
|
|
353
|
-
return
|
|
354
|
-
modelValue: d(t)[
|
|
355
|
-
"onUpdate:modelValue": l[0] || (l[0] = (m) => d(t)[
|
|
353
|
+
return o(), i(r, b({
|
|
354
|
+
modelValue: d(t)[s.item.prop],
|
|
355
|
+
"onUpdate:modelValue": l[0] || (l[0] = (m) => d(t)[s.item.prop] = m),
|
|
356
356
|
size: d(u),
|
|
357
|
-
options:
|
|
358
|
-
},
|
|
357
|
+
options: s.item.options || []
|
|
358
|
+
}, a.value), null, 16, ["modelValue", "size", "options"]);
|
|
359
359
|
};
|
|
360
360
|
}
|
|
361
361
|
}), Ie = k({
|
|
@@ -369,8 +369,8 @@ const Se = /* @__PURE__ */ w(be, [["render", ke]]), ze = /* @__PURE__ */ k({
|
|
|
369
369
|
Radio: ze,
|
|
370
370
|
Checkbox: $e,
|
|
371
371
|
DatePicker: Pe,
|
|
372
|
-
Select:
|
|
373
|
-
Cascader:
|
|
372
|
+
Select: qe,
|
|
373
|
+
Cascader: Ve
|
|
374
374
|
},
|
|
375
375
|
props: {
|
|
376
376
|
showSearch: {
|
|
@@ -433,41 +433,47 @@ const Se = /* @__PURE__ */ w(be, [["render", ke]]), ze = /* @__PURE__ */ k({
|
|
|
433
433
|
};
|
|
434
434
|
},
|
|
435
435
|
setup(e) {
|
|
436
|
-
const { size:
|
|
437
|
-
...t ? {} :
|
|
436
|
+
const { size: n, noUrlParameters: t, getList: u } = e, a = le(), s = v({
|
|
437
|
+
...t ? {} : a == null ? void 0 : a.query
|
|
438
438
|
});
|
|
439
439
|
return A(
|
|
440
440
|
/* 注入名 */
|
|
441
441
|
"queryParams",
|
|
442
442
|
/* 值 */
|
|
443
|
-
|
|
443
|
+
s
|
|
444
444
|
), A(
|
|
445
445
|
/* 注入名 */
|
|
446
446
|
"size",
|
|
447
447
|
/* 值 */
|
|
448
|
-
|
|
448
|
+
n
|
|
449
449
|
), A(
|
|
450
450
|
/* 注入名 */
|
|
451
451
|
"getList",
|
|
452
452
|
/* 值 */
|
|
453
453
|
u
|
|
454
454
|
), {
|
|
455
|
-
queryParams:
|
|
455
|
+
queryParams: s
|
|
456
456
|
};
|
|
457
457
|
},
|
|
458
458
|
watch: {
|
|
459
459
|
formData: {
|
|
460
|
-
handler(e) {
|
|
461
|
-
this.queryParams = {
|
|
460
|
+
handler(e, n) {
|
|
461
|
+
JSON.stringify(e) !== JSON.stringify(n) && (this.queryParams = {
|
|
462
462
|
...this.noUrlParameters ? {} : this.queryParams,
|
|
463
463
|
...e
|
|
464
|
-
};
|
|
464
|
+
});
|
|
465
465
|
},
|
|
466
466
|
// watch 默认是懒执行的:仅当数据源变化时,才会执行回调。但在某些场景中,我们希望在创建侦听器时,立即执行一遍回调。举例来说,我们想请求一些初始数据,然后在相关状态更改时重新请求数据。
|
|
467
467
|
// https://cn.vuejs.org/guide/essentials/watchers.html#deep-watchers
|
|
468
468
|
immediate: !0
|
|
469
469
|
// deep: true,
|
|
470
470
|
},
|
|
471
|
+
queryParams: {
|
|
472
|
+
handler(e) {
|
|
473
|
+
this.$emit("update:newFormData", e);
|
|
474
|
+
},
|
|
475
|
+
deep: !0
|
|
476
|
+
},
|
|
471
477
|
loading(e) {
|
|
472
478
|
this.formLoading !== e && (this.formLoading = e);
|
|
473
479
|
},
|
|
@@ -490,33 +496,33 @@ const Se = /* @__PURE__ */ w(be, [["render", ke]]), ze = /* @__PURE__ */ k({
|
|
|
490
496
|
/** 搜索按钮操作 */
|
|
491
497
|
handleQuery() {
|
|
492
498
|
var t;
|
|
493
|
-
const e = { page: 1, limit: 10 },
|
|
499
|
+
const e = { page: 1, limit: 10 }, n = {
|
|
494
500
|
...(t = this.$route) == null ? void 0 : t.query,
|
|
495
501
|
...this.queryParams,
|
|
496
502
|
...e
|
|
497
503
|
};
|
|
498
504
|
this.noUrlParameters || this.$router.push({
|
|
499
|
-
query: { ...
|
|
505
|
+
query: { ...n }
|
|
500
506
|
}), this.getList({
|
|
501
|
-
...
|
|
507
|
+
...n
|
|
502
508
|
});
|
|
503
509
|
},
|
|
504
510
|
/** 重置按钮操作 */
|
|
505
511
|
async resetQuery() {
|
|
506
|
-
var
|
|
512
|
+
var n;
|
|
507
513
|
this.$refs.queryFormRef.resetFields();
|
|
508
514
|
const e = { page: 1 };
|
|
509
515
|
this.noUrlParameters || await this.$router.push({
|
|
510
516
|
query: { ...e }
|
|
511
517
|
}), this.queryParams = {
|
|
512
|
-
...this.noUrlParameters ? {} : (
|
|
518
|
+
...this.noUrlParameters ? {} : (n = this.$route) == null ? void 0 : n.query
|
|
513
519
|
}, this.afterReset(), this.handleQuery();
|
|
514
520
|
}
|
|
515
521
|
}
|
|
516
522
|
});
|
|
517
|
-
function Le(e,
|
|
518
|
-
const l = p("Input"), r = p("Radio"), m = p("Select"), _ = p("Divider"), f = p("Cascader"), C = p("Checkbox"), U = p("DatePicker"),
|
|
519
|
-
return D((
|
|
523
|
+
function Le(e, n, t, u, a, s) {
|
|
524
|
+
const l = p("Input"), r = p("Radio"), m = p("Select"), _ = p("Divider"), f = p("Cascader"), C = p("Checkbox"), U = p("DatePicker"), N = p("InputNumber"), F = p("InputMobileVerification"), R = p("InputGraphicVerification"), S = p("el-form-item"), V = p("el-button"), P = p("el-form"), E = G("loading");
|
|
525
|
+
return D((o(), i(P, b({
|
|
520
526
|
model: e.queryParams,
|
|
521
527
|
ref: "queryFormRef",
|
|
522
528
|
inline: "",
|
|
@@ -524,51 +530,51 @@ function Le(e, o, t, u, s, a) {
|
|
|
524
530
|
"label-width": e.labelWidth
|
|
525
531
|
}, e.$attrs), {
|
|
526
532
|
default: y(() => [
|
|
527
|
-
(
|
|
533
|
+
(o(!0), z(L, null, q(e.formItem, (c) => (o(), i(S, {
|
|
528
534
|
label: c.label,
|
|
529
535
|
prop: c.prop,
|
|
530
536
|
key: c.prop,
|
|
531
537
|
rules: c.rules
|
|
532
538
|
}, {
|
|
533
539
|
default: y(() => [
|
|
534
|
-
c.type === "input" ? (
|
|
540
|
+
c.type === "input" ? (o(), i(l, {
|
|
535
541
|
key: 0,
|
|
536
542
|
item: c
|
|
537
543
|
}, null, 8, ["item"])) : h("", !0),
|
|
538
|
-
c.type === "radio" ? (
|
|
544
|
+
c.type === "radio" ? (o(), i(r, {
|
|
539
545
|
key: 1,
|
|
540
546
|
item: c
|
|
541
547
|
}, null, 8, ["item"])) : h("", !0),
|
|
542
|
-
c.type === "select" ? (
|
|
548
|
+
c.type === "select" ? (o(), i(m, {
|
|
543
549
|
key: 2,
|
|
544
550
|
item: c
|
|
545
551
|
}, null, 8, ["item"])) : h("", !0),
|
|
546
|
-
c.type === "divider" ? (
|
|
552
|
+
c.type === "divider" ? (o(), i(_, {
|
|
547
553
|
key: 3,
|
|
548
554
|
item: c
|
|
549
555
|
}, null, 8, ["item"])) : h("", !0),
|
|
550
|
-
c.type === "cascader" ? (
|
|
556
|
+
c.type === "cascader" ? (o(), i(f, {
|
|
551
557
|
key: 4,
|
|
552
558
|
item: c
|
|
553
559
|
}, null, 8, ["item"])) : h("", !0),
|
|
554
|
-
c.type === "checkbox" ? (
|
|
560
|
+
c.type === "checkbox" ? (o(), i(C, {
|
|
555
561
|
key: 5,
|
|
556
562
|
item: c
|
|
557
563
|
}, null, 8, ["item"])) : h("", !0),
|
|
558
|
-
c.type === "date-picker" ? (
|
|
564
|
+
c.type === "date-picker" ? (o(), i(U, {
|
|
559
565
|
key: 6,
|
|
560
566
|
item: c
|
|
561
567
|
}, null, 8, ["item"])) : h("", !0),
|
|
562
|
-
c.type === "input-number" ? (
|
|
568
|
+
c.type === "input-number" ? (o(), i(N, {
|
|
563
569
|
key: 7,
|
|
564
570
|
item: c
|
|
565
571
|
}, null, 8, ["item"])) : h("", !0),
|
|
566
572
|
c.type === "form-item-slot" ? O(e.$slots, c.name, { key: 8 }) : h("", !0),
|
|
567
|
-
c.type === "input-mobile-verification" ? (
|
|
573
|
+
c.type === "input-mobile-verification" ? (o(), i(F, {
|
|
568
574
|
key: 9,
|
|
569
575
|
item: c
|
|
570
576
|
}, null, 8, ["item"])) : h("", !0),
|
|
571
|
-
c.type === "input-graphic-verification" ? (
|
|
577
|
+
c.type === "input-graphic-verification" ? (o(), i(R, {
|
|
572
578
|
item: c,
|
|
573
579
|
key: c.key
|
|
574
580
|
}, null, 8, ["item"])) : h("", !0)
|
|
@@ -576,9 +582,9 @@ function Le(e, o, t, u, s, a) {
|
|
|
576
582
|
_: 2
|
|
577
583
|
}, 1032, ["label", "prop", "rules"]))), 128)),
|
|
578
584
|
O(e.$slots, "default"),
|
|
579
|
-
e.formOnly ? h("", !0) : (
|
|
585
|
+
e.formOnly ? h("", !0) : (o(), i(S, { key: 0 }, {
|
|
580
586
|
default: y(() => [
|
|
581
|
-
D((
|
|
587
|
+
D((o(), i(V, {
|
|
582
588
|
type: "primary",
|
|
583
589
|
size: e.size,
|
|
584
590
|
onClick: e.handleQuery
|
|
@@ -588,9 +594,9 @@ function Le(e, o, t, u, s, a) {
|
|
|
588
594
|
]),
|
|
589
595
|
_: 1
|
|
590
596
|
}, 8, ["size", "onClick"])), [
|
|
591
|
-
[
|
|
597
|
+
[E, e.formLoading]
|
|
592
598
|
]),
|
|
593
|
-
Q(
|
|
599
|
+
Q(V, {
|
|
594
600
|
size: e.size,
|
|
595
601
|
onClick: e.resetQuery
|
|
596
602
|
}, {
|
|
@@ -606,10 +612,10 @@ function Le(e, o, t, u, s, a) {
|
|
|
606
612
|
]),
|
|
607
613
|
_: 3
|
|
608
614
|
}, 16, ["model", "label-width"])), [
|
|
609
|
-
[
|
|
615
|
+
[ae, e.showSearch]
|
|
610
616
|
]);
|
|
611
617
|
}
|
|
612
|
-
const Ce = /* @__PURE__ */ w(Ie, [["render", Le]]), De = ["infinite-scroll-disabled"], xe = ["infinite-scroll-disabled"], we = { class: "checkbox" },
|
|
618
|
+
const Ce = /* @__PURE__ */ w(Ie, [["render", Le]]), De = ["infinite-scroll-disabled"], xe = ["infinite-scroll-disabled"], we = { class: "checkbox" }, Fe = /* @__PURE__ */ k({
|
|
613
619
|
__name: "InfiniteScrollList",
|
|
614
620
|
props: {
|
|
615
621
|
search: {
|
|
@@ -637,52 +643,52 @@ const Ce = /* @__PURE__ */ w(Ie, [["render", Le]]), De = ["infinite-scroll-disab
|
|
|
637
643
|
required: !1
|
|
638
644
|
}
|
|
639
645
|
},
|
|
640
|
-
setup(e, { expose:
|
|
641
|
-
const t = e, { search: u, id:
|
|
646
|
+
setup(e, { expose: n }) {
|
|
647
|
+
const t = e, { search: u, id: a, name: s, extra: l } = t, r = v([]), m = v(1), _ = v(!1), f = v([]), C = v(!1), U = (S, V) => {
|
|
642
648
|
const { i: P } = S;
|
|
643
649
|
return l(P);
|
|
644
650
|
};
|
|
645
|
-
|
|
651
|
+
se(
|
|
646
652
|
() => t.defaultSelection,
|
|
647
|
-
(S = [],
|
|
648
|
-
f.value = S.map((P) => typeof P == "object" ? P[
|
|
653
|
+
(S = [], V = []) => {
|
|
654
|
+
f.value = S.map((P) => typeof P == "object" ? P[a] : P);
|
|
649
655
|
},
|
|
650
656
|
{ immediate: !0 }
|
|
651
657
|
);
|
|
652
|
-
const
|
|
658
|
+
const N = () => {
|
|
653
659
|
m.value = 1, r.value = [], f.value = [], _.value = !1;
|
|
654
|
-
},
|
|
660
|
+
}, F = async () => {
|
|
655
661
|
if (C.value || _.value)
|
|
656
662
|
return;
|
|
657
663
|
C.value = !0;
|
|
658
664
|
const S = await u(m.value);
|
|
659
665
|
S && S.length > 0 ? (r.value = [...r.value, ...S], m.value += 1) : _.value = !0, C.value = !1;
|
|
660
|
-
},
|
|
661
|
-
() => r.value.filter((S) => f.value.includes(S[
|
|
666
|
+
}, R = T(
|
|
667
|
+
() => r.value.filter((S) => f.value.includes(S[a]))
|
|
662
668
|
) || {};
|
|
663
|
-
return
|
|
664
|
-
const P = p("el-checkbox"),
|
|
665
|
-
return t.checkbox ? D((
|
|
669
|
+
return n({ reset: N, loadList: F, selectInfo: R, list: r, ifbottom: _ }), (S, V) => {
|
|
670
|
+
const P = p("el-checkbox"), E = p("el-checkbox-group"), c = G("infinite-scroll"), Y = G("loading");
|
|
671
|
+
return t.checkbox ? D((o(), i(E, b({
|
|
666
672
|
key: 0,
|
|
667
673
|
modelValue: f.value,
|
|
668
|
-
"onUpdate:modelValue":
|
|
674
|
+
"onUpdate:modelValue": V[0] || (V[0] = ($) => f.value = $)
|
|
669
675
|
}, t), {
|
|
670
676
|
default: y(() => [
|
|
671
|
-
D((
|
|
677
|
+
D((o(), z("ul", {
|
|
672
678
|
class: "list",
|
|
673
679
|
"infinite-scroll-disabled": _.value
|
|
674
680
|
}, [
|
|
675
|
-
(
|
|
676
|
-
key: $[d(
|
|
681
|
+
(o(!0), z(L, null, q(r.value, ($) => (o(), z("li", {
|
|
682
|
+
key: $[d(a)],
|
|
677
683
|
class: "list-item"
|
|
678
684
|
}, [
|
|
679
685
|
Q(P, {
|
|
680
|
-
label: $[d(
|
|
686
|
+
label: $[d(a)],
|
|
681
687
|
class: "checkbox"
|
|
682
688
|
}, {
|
|
683
689
|
default: y(() => [
|
|
684
|
-
I(x($[d(
|
|
685
|
-
t.extra ? (
|
|
690
|
+
I(x($[d(s)]) + " ", 1),
|
|
691
|
+
t.extra ? (o(), i(U, {
|
|
686
692
|
key: 0,
|
|
687
693
|
i: $
|
|
688
694
|
}, null, 8, ["i"])) : h("", !0)
|
|
@@ -691,36 +697,36 @@ const Ce = /* @__PURE__ */ w(Ie, [["render", Le]]), De = ["infinite-scroll-disab
|
|
|
691
697
|
}, 1032, ["label"])
|
|
692
698
|
]))), 128))
|
|
693
699
|
], 8, De)), [
|
|
694
|
-
[c,
|
|
700
|
+
[c, F]
|
|
695
701
|
])
|
|
696
702
|
]),
|
|
697
703
|
_: 1
|
|
698
704
|
}, 16, ["modelValue"])), [
|
|
699
705
|
[Y, C.value]
|
|
700
|
-
]) : D((
|
|
706
|
+
]) : D((o(), z("ul", b({
|
|
701
707
|
key: 1,
|
|
702
708
|
class: "list",
|
|
703
709
|
"infinite-scroll-disabled": _.value
|
|
704
710
|
}, t), [
|
|
705
|
-
(
|
|
706
|
-
key: $[d(
|
|
711
|
+
(o(!0), z(L, null, q(r.value, ($) => (o(), z("li", {
|
|
712
|
+
key: $[d(a)],
|
|
707
713
|
class: "list-item"
|
|
708
714
|
}, [
|
|
709
|
-
|
|
710
|
-
I(x($[d(
|
|
711
|
-
t.extra ? (
|
|
715
|
+
J("div", we, [
|
|
716
|
+
I(x($[d(s)]) + " ", 1),
|
|
717
|
+
t.extra ? (o(), i(U, {
|
|
712
718
|
key: 0,
|
|
713
719
|
i: $
|
|
714
720
|
}, null, 8, ["i"])) : h("", !0)
|
|
715
721
|
])
|
|
716
722
|
]))), 128))
|
|
717
723
|
], 16, xe)), [
|
|
718
|
-
[c,
|
|
724
|
+
[c, F]
|
|
719
725
|
]);
|
|
720
726
|
};
|
|
721
727
|
}
|
|
722
728
|
});
|
|
723
|
-
const
|
|
729
|
+
const Be = /* @__PURE__ */ w(Fe, [["__scopeId", "data-v-93a94a39"]]), Ue = { key: 1 }, Ge = /* @__PURE__ */ k({
|
|
724
730
|
__name: "Descriptions",
|
|
725
731
|
props: {
|
|
726
732
|
formData: {
|
|
@@ -733,32 +739,32 @@ const Fe = /* @__PURE__ */ w(Be, [["__scopeId", "data-v-6bf38adc"]]), Ue = { key
|
|
|
733
739
|
}
|
|
734
740
|
},
|
|
735
741
|
setup(e) {
|
|
736
|
-
const
|
|
737
|
-
const { i:
|
|
742
|
+
const n = e, t = (u, a) => {
|
|
743
|
+
const { i: s, render: l, formData: r } = u;
|
|
738
744
|
return l({
|
|
739
745
|
row: r,
|
|
740
|
-
$index:
|
|
746
|
+
$index: s
|
|
741
747
|
});
|
|
742
748
|
};
|
|
743
|
-
return (u,
|
|
744
|
-
const
|
|
745
|
-
return
|
|
749
|
+
return (u, a) => {
|
|
750
|
+
const s = p("el-descriptions-item"), l = p("el-descriptions");
|
|
751
|
+
return o(), i(l, b({
|
|
746
752
|
column: 1,
|
|
747
753
|
border: "",
|
|
748
754
|
class: "form-width"
|
|
749
|
-
},
|
|
755
|
+
}, n), {
|
|
750
756
|
default: y(() => [
|
|
751
|
-
(
|
|
757
|
+
(o(!0), z(L, null, q(n.formItem, (r, m) => (o(), i(s, b({
|
|
752
758
|
key: r.prop,
|
|
753
759
|
label: r.label
|
|
754
760
|
}, r.descriptionsItemProps), {
|
|
755
761
|
default: y(() => [
|
|
756
|
-
r.render ? (
|
|
762
|
+
r.render ? (o(), i(t, {
|
|
757
763
|
key: 0,
|
|
758
764
|
i: m,
|
|
759
765
|
render: r.render,
|
|
760
766
|
formData: e.formData
|
|
761
|
-
}, null, 8, ["i", "render", "formData"])) : (
|
|
767
|
+
}, null, 8, ["i", "render", "formData"])) : (o(), z("span", Ue, x(e.formData[r.prop]), 1))
|
|
762
768
|
]),
|
|
763
769
|
_: 2
|
|
764
770
|
}, 1040, ["label"]))), 128))
|
|
@@ -767,9 +773,9 @@ const Fe = /* @__PURE__ */ w(Be, [["__scopeId", "data-v-6bf38adc"]]), Ue = { key
|
|
|
767
773
|
}, 16);
|
|
768
774
|
};
|
|
769
775
|
}
|
|
770
|
-
}),
|
|
776
|
+
}), Ee = Ce, Ae = Be, Oe = Ge;
|
|
771
777
|
export {
|
|
772
778
|
Oe as VDescriptions,
|
|
773
|
-
|
|
779
|
+
Ee as VGeneralBasicForm,
|
|
774
780
|
Ae as VInfiniteScrollList
|
|
775
781
|
};
|