vue3-curd 1.0.21 → 1.0.23
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/dist/style.css +1 -1
- package/dist/vue3-curd.es.js +1068 -1024
- package/dist/vue3-curd.es.js.map +1 -1
- package/dist/vue3-curd.umd.js +1 -1
- package/dist/vue3-curd.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/vue3-curd.es.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { ElTag as
|
|
2
|
-
import { defineComponent as pe, computed as J, createElementBlock as T, openBlock as s, normalizeClass as
|
|
3
|
-
import { createTypes as
|
|
4
|
-
import { PictureFilled as
|
|
5
|
-
import
|
|
6
|
-
import { compressAccurately as
|
|
7
|
-
import { defineStore as
|
|
1
|
+
import { ElTag as ia, ElImage as Re, ElIcon as Pe, ElTable as at, ElTableColumn as tt, ElCheckbox as da, ElSwitch as pa, ElTooltip as lt, ElButton as De, ElLoadingDirective as ot, ElPagination as rt, ElUpload as je, ElLink as nt, ElDialog as fa, ElInput as He, ElForm as ha, ElRow as ma, ElCol as ya, ElFormItem as ga, ElInputNumber as st, ElSelect as ba, ElOption as va, ElDatePicker as ka, ElCheckboxGroup as ct, ElRadioGroup as ut, ElRadio as it, ElTreeSelect as _a, ElColorPicker as dt, ElCard as wa, ElLoading as Va, ElMessage as we, ElMessageBox as _e, ElNotification as Ee } from "element-plus/es";
|
|
2
|
+
import { defineComponent as pe, computed as J, createElementBlock as T, openBlock as s, normalizeClass as Fe, unref as o, createElementVNode as re, toDisplayString as M, Fragment as B, renderList as Q, createBlock as f, createCommentVNode as Z, withCtx as b, createTextVNode as z, ref as x, watch as Ve, normalizeStyle as fe, createVNode as R, getCurrentInstance as he, toRaw as Ie, onMounted as Ne, resolveDirective as Sa, withDirectives as de, renderSlot as xe, withModifiers as pt, nextTick as Le, TransitionGroup as ft, useCssVars as ht, resolveComponent as mt, isRef as $e, vShow as yt, reactive as gt, createSlots as ze, withKeys as Ze, normalizeProps as ea, guardReactiveProps as aa } from "vue";
|
|
3
|
+
import { createTypes as bt } from "vue-types";
|
|
4
|
+
import { PictureFilled as Be, Picture as Ue } from "@element-plus/icons-vue";
|
|
5
|
+
import vt from "axios";
|
|
6
|
+
import { compressAccurately as kt } from "image-conversion";
|
|
7
|
+
import { defineStore as $a } from "pinia";
|
|
8
8
|
import "@vueup/vue-quill/dist/vue-quill.snow.css";
|
|
9
|
-
import { Quill as
|
|
10
|
-
import { useI18n as
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
const oe =
|
|
9
|
+
import { Quill as _t, QuillEditor as wt } from "@vueup/vue-quill";
|
|
10
|
+
import { useI18n as Da } from "vue-i18n";
|
|
11
|
+
import Vt from "dayjs";
|
|
12
|
+
import St from "file-saver";
|
|
13
|
+
const oe = bt({
|
|
14
14
|
func: void 0,
|
|
15
15
|
bool: void 0,
|
|
16
16
|
string: void 0,
|
|
17
17
|
number: void 0,
|
|
18
18
|
object: void 0,
|
|
19
19
|
integer: void 0
|
|
20
|
-
}),
|
|
20
|
+
}), $t = ["xlink:href", "fill"], Dt = /* @__PURE__ */ pe({
|
|
21
21
|
__name: "index",
|
|
22
22
|
props: {
|
|
23
23
|
iconClass: oe.string.isRequired,
|
|
@@ -26,14 +26,14 @@ const oe = yt({
|
|
|
26
26
|
},
|
|
27
27
|
setup(e) {
|
|
28
28
|
const l = e, t = J(() => `#icon-${l.iconClass}`), a = J(() => l.className ? `svg-icon ${l.className}` : "svg-icon");
|
|
29
|
-
return (c,
|
|
30
|
-
class:
|
|
29
|
+
return (c, r) => (s(), T("svg", {
|
|
30
|
+
class: Fe(o(a)),
|
|
31
31
|
"aria-hidden": "true"
|
|
32
32
|
}, [
|
|
33
33
|
re("use", {
|
|
34
|
-
"xlink:href":
|
|
34
|
+
"xlink:href": o(t),
|
|
35
35
|
fill: e.color
|
|
36
|
-
}, null, 8,
|
|
36
|
+
}, null, 8, $t)
|
|
37
37
|
], 2));
|
|
38
38
|
}
|
|
39
39
|
}), be = (e, l) => {
|
|
@@ -41,7 +41,7 @@ const oe = yt({
|
|
|
41
41
|
for (const [a, c] of l)
|
|
42
42
|
t[a] = c;
|
|
43
43
|
return t;
|
|
44
|
-
},
|
|
44
|
+
}, Ke = /* @__PURE__ */ be(Dt, [["__scopeId", "data-v-ed552a8d"]]), Ca = /* @__PURE__ */ pe({
|
|
45
45
|
__name: "index",
|
|
46
46
|
props: {
|
|
47
47
|
options: {
|
|
@@ -63,23 +63,23 @@ const oe = yt({
|
|
|
63
63
|
const a = l.value;
|
|
64
64
|
if (a === "" || a === null || typeof a > "u")
|
|
65
65
|
return "";
|
|
66
|
-
const c = (
|
|
66
|
+
const c = (r) => {
|
|
67
67
|
var y;
|
|
68
|
-
const i = (y = l.options) == null ? void 0 : y.find((
|
|
68
|
+
const i = (y = l.options) == null ? void 0 : y.find((h) => h.value == r || h.label == r);
|
|
69
69
|
return (i == null ? void 0 : i.label) ?? "";
|
|
70
70
|
};
|
|
71
71
|
if (Array.isArray(a))
|
|
72
|
-
return a.map((
|
|
72
|
+
return a.map((r) => c(r)).filter(Boolean).join(l.separator);
|
|
73
73
|
if (typeof a == "string") {
|
|
74
|
-
let
|
|
75
|
-
if (a.indexOf(",") > -1 ?
|
|
76
|
-
return
|
|
74
|
+
let r = [];
|
|
75
|
+
if (a.indexOf(",") > -1 ? r = a.split(",") : a.indexOf("、") > -1 && (r = a.split("、")), r.length > 0)
|
|
76
|
+
return r.map((i) => c(i)).filter(Boolean).join(l.separator);
|
|
77
77
|
}
|
|
78
78
|
return c(a) || a;
|
|
79
79
|
});
|
|
80
|
-
return (a, c) => (s(), T("span", null, M(
|
|
80
|
+
return (a, c) => (s(), T("span", null, M(o(t)), 1));
|
|
81
81
|
}
|
|
82
|
-
}),
|
|
82
|
+
}), Ct = /* @__PURE__ */ pe({
|
|
83
83
|
__name: "index",
|
|
84
84
|
props: {
|
|
85
85
|
options: {
|
|
@@ -98,75 +98,75 @@ const oe = yt({
|
|
|
98
98
|
return "";
|
|
99
99
|
if (Array.isArray(a)) {
|
|
100
100
|
const c = [];
|
|
101
|
-
return l.options.map((
|
|
102
|
-
(a.indexOf(
|
|
101
|
+
return l.options.map((r) => {
|
|
102
|
+
(a.indexOf(r.value) > -1 || a.indexOf(r.label) > -1) && c.push(r);
|
|
103
103
|
}), c;
|
|
104
104
|
} else if (typeof a == "string") {
|
|
105
105
|
let c = [];
|
|
106
106
|
if (a.indexOf(",") > -1 ? c = a.split(",") : a.indexOf("、") > -1 && (c = a.split("、")), c.length > 0) {
|
|
107
|
-
const
|
|
107
|
+
const r = [];
|
|
108
108
|
return l.options.map((i) => {
|
|
109
|
-
(c.indexOf(i.value) > -1 || c.indexOf(i.label) > -1) &&
|
|
110
|
-
}),
|
|
109
|
+
(c.indexOf(i.value) > -1 || c.indexOf(i.label) > -1) && r.push(i);
|
|
110
|
+
}), r;
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
113
|
return l.options.find((c) => c.value == a || c.label == a) || a;
|
|
114
114
|
});
|
|
115
115
|
return (a, c) => {
|
|
116
|
-
const
|
|
117
|
-
return Array.isArray(
|
|
118
|
-
i.label ? (s(),
|
|
116
|
+
const r = ia;
|
|
117
|
+
return Array.isArray(o(t)) ? (s(!0), T(B, { key: 0 }, Q(o(t), (i) => (s(), T(B, null, [
|
|
118
|
+
i.label ? (s(), f(r, {
|
|
119
119
|
"disable-transitions": !0,
|
|
120
120
|
key: i.value,
|
|
121
121
|
type: i.elTagType || "primary"
|
|
122
122
|
}, {
|
|
123
123
|
default: b(() => [
|
|
124
|
-
|
|
124
|
+
z(M(i.label), 1)
|
|
125
125
|
]),
|
|
126
126
|
_: 2
|
|
127
127
|
}, 1032, ["type"])) : Z("", !0)
|
|
128
|
-
], 64))), 256)) : (s(), T(
|
|
129
|
-
|
|
128
|
+
], 64))), 256)) : (s(), T(B, { key: 1 }, [
|
|
129
|
+
o(t).label ? (s(), f(r, {
|
|
130
130
|
"disable-transitions": !0,
|
|
131
|
-
key:
|
|
132
|
-
type:
|
|
131
|
+
key: o(t).value,
|
|
132
|
+
type: o(t).elTagType || "primary"
|
|
133
133
|
}, {
|
|
134
134
|
default: b(() => [
|
|
135
|
-
|
|
135
|
+
z(M(o(t).label), 1)
|
|
136
136
|
]),
|
|
137
137
|
_: 1
|
|
138
138
|
}, 8, ["type"])) : Z("", !0)
|
|
139
139
|
], 64));
|
|
140
140
|
};
|
|
141
141
|
}
|
|
142
|
-
}),
|
|
143
|
-
let
|
|
144
|
-
const
|
|
145
|
-
const e =
|
|
142
|
+
}), Ta = /* @__PURE__ */ be(Ct, [["__scopeId", "data-v-9a5060d2"]]);
|
|
143
|
+
let Ae = null, Ea = () => ({}), We = "";
|
|
144
|
+
const Tt = () => {
|
|
145
|
+
const e = vt.create({ baseURL: We, timeout: 5e4 });
|
|
146
146
|
return e.interceptors.response.use(
|
|
147
147
|
(l) => l.data,
|
|
148
148
|
(l) => Promise.reject(l)
|
|
149
149
|
), e;
|
|
150
|
-
}, ke = () => (
|
|
151
|
-
|
|
152
|
-
},
|
|
153
|
-
|
|
154
|
-
},
|
|
155
|
-
|
|
150
|
+
}, ke = () => (Ae || (Ae = Tt()), Ae), Et = (e) => {
|
|
151
|
+
Ae = e;
|
|
152
|
+
}, qe = () => Ea(), Ut = (e) => {
|
|
153
|
+
Ea = e;
|
|
154
|
+
}, Qe = () => We, At = (e) => {
|
|
155
|
+
We = e || "";
|
|
156
156
|
};
|
|
157
|
-
function
|
|
157
|
+
function Ge(e) {
|
|
158
158
|
return ke()({
|
|
159
159
|
url: "/resource/oss/listByIds/" + e,
|
|
160
160
|
method: "get"
|
|
161
161
|
});
|
|
162
162
|
}
|
|
163
|
-
function
|
|
163
|
+
function Ua(e) {
|
|
164
164
|
return ke()({
|
|
165
165
|
url: "/resource/oss/" + e,
|
|
166
166
|
method: "delete"
|
|
167
167
|
});
|
|
168
168
|
}
|
|
169
|
-
const
|
|
169
|
+
const Pt = { class: "image-slot" }, Ot = { key: 1 }, It = /* @__PURE__ */ pe({
|
|
170
170
|
__name: "index",
|
|
171
171
|
props: {
|
|
172
172
|
modelValue: [String, Object, Array, Number],
|
|
@@ -180,11 +180,11 @@ const Ut = { class: "image-slot" }, At = { key: 1 }, Ot = /* @__PURE__ */ pe({
|
|
|
180
180
|
}
|
|
181
181
|
},
|
|
182
182
|
setup(e) {
|
|
183
|
-
const l = e, t =
|
|
183
|
+
const l = e, t = x(""), a = J(() => t.value ? t.value.split(",")[0] : void 0), c = J(() => {
|
|
184
184
|
if (!t.value) return;
|
|
185
185
|
const i = t.value.split(","), y = [];
|
|
186
|
-
return i.forEach((
|
|
187
|
-
}),
|
|
186
|
+
return i.forEach((h) => y.push(h)), y;
|
|
187
|
+
}), r = J(() => {
|
|
188
188
|
const i = l.width;
|
|
189
189
|
return typeof i == "string" ? i : `${i}px`;
|
|
190
190
|
});
|
|
@@ -194,39 +194,39 @@ const Ut = { class: "image-slot" }, At = { key: 1 }, Ot = /* @__PURE__ */ pe({
|
|
|
194
194
|
}), Ve(() => l.modelValue, async (i) => {
|
|
195
195
|
if (i) {
|
|
196
196
|
let y;
|
|
197
|
-
Array.isArray(i) ? y = i : y = (await
|
|
197
|
+
Array.isArray(i) ? y = i : y = (await Ge(i)).data, t.value = y.map((h) => h.url).join(",");
|
|
198
198
|
} else t.value = "";
|
|
199
199
|
}, { immediate: !0, deep: !0 }), (i, y) => {
|
|
200
|
-
const
|
|
200
|
+
const h = Pe, V = Re;
|
|
201
201
|
return s(), T("div", null, [
|
|
202
|
-
|
|
202
|
+
o(a) ? (s(), f(V, {
|
|
203
203
|
key: 0,
|
|
204
|
-
src: `${
|
|
204
|
+
src: `${o(a)}`,
|
|
205
205
|
fit: "scale-down",
|
|
206
206
|
loading: "lazy",
|
|
207
|
-
style: fe(`width:${r
|
|
208
|
-
"preview-src-list":
|
|
207
|
+
style: fe(`width:${o(r)};height:${o(r)};`),
|
|
208
|
+
"preview-src-list": o(c),
|
|
209
209
|
"preview-teleported": ""
|
|
210
210
|
}, {
|
|
211
211
|
error: b(() => [
|
|
212
|
-
re("div",
|
|
213
|
-
|
|
212
|
+
re("div", Pt, [
|
|
213
|
+
R(h, null, {
|
|
214
214
|
default: b(() => [
|
|
215
|
-
|
|
215
|
+
R(o(Be))
|
|
216
216
|
]),
|
|
217
217
|
_: 1
|
|
218
218
|
})
|
|
219
219
|
])
|
|
220
220
|
]),
|
|
221
221
|
_: 1
|
|
222
|
-
}, 8, ["src", "style", "preview-src-list"])) : (s(), T("div",
|
|
222
|
+
}, 8, ["src", "style", "preview-src-list"])) : (s(), T("div", Ot, [
|
|
223
223
|
re("div", {
|
|
224
224
|
class: "image-slot",
|
|
225
|
-
style: fe(`width:${r
|
|
225
|
+
style: fe(`width:${o(r)};height:${o(r)};`)
|
|
226
226
|
}, [
|
|
227
|
-
|
|
227
|
+
R(h, null, {
|
|
228
228
|
default: b(() => [
|
|
229
|
-
|
|
229
|
+
R(o(Be))
|
|
230
230
|
]),
|
|
231
231
|
_: 1
|
|
232
232
|
})
|
|
@@ -235,7 +235,7 @@ const Ut = { class: "image-slot" }, At = { key: 1 }, Ot = /* @__PURE__ */ pe({
|
|
|
235
235
|
]);
|
|
236
236
|
};
|
|
237
237
|
}
|
|
238
|
-
}),
|
|
238
|
+
}), Aa = /* @__PURE__ */ be(It, [["__scopeId", "data-v-dc163acb"]]), xt = { class: "image-slot" }, Lt = /* @__PURE__ */ pe({
|
|
239
239
|
__name: "index",
|
|
240
240
|
props: {
|
|
241
241
|
data: {
|
|
@@ -257,81 +257,81 @@ const Ut = { class: "image-slot" }, At = { key: 1 }, Ot = /* @__PURE__ */ pe({
|
|
|
257
257
|
), a = J(
|
|
258
258
|
() => typeof l.height == "string" ? l.height : `${l.height}px`
|
|
259
259
|
);
|
|
260
|
-
return (c,
|
|
261
|
-
const i =
|
|
260
|
+
return (c, r) => {
|
|
261
|
+
const i = Pe, y = Re, h = Ke;
|
|
262
262
|
return s(), T("span", null, [
|
|
263
|
-
[".jpg", ".png", ".jpeg"].indexOf(e.data.fileSuffix) > -1 ? (s(),
|
|
263
|
+
[".jpg", ".png", ".jpeg"].indexOf(e.data.fileSuffix) > -1 ? (s(), f(y, {
|
|
264
264
|
key: 0,
|
|
265
265
|
src: e.data.url,
|
|
266
266
|
fit: "cover",
|
|
267
267
|
"preview-src-list": [e.data.url],
|
|
268
|
-
style: fe(`width:${
|
|
268
|
+
style: fe(`width:${o(t)};height:${o(a)};`),
|
|
269
269
|
"preview-teleported": ""
|
|
270
270
|
}, {
|
|
271
271
|
error: b(() => [
|
|
272
|
-
re("div",
|
|
273
|
-
|
|
272
|
+
re("div", xt, [
|
|
273
|
+
R(i, null, {
|
|
274
274
|
default: b(() => [
|
|
275
|
-
|
|
275
|
+
R(o(Be))
|
|
276
276
|
]),
|
|
277
277
|
_: 1
|
|
278
278
|
})
|
|
279
279
|
])
|
|
280
280
|
]),
|
|
281
281
|
_: 1
|
|
282
|
-
}, 8, ["src", "preview-src-list", "style"])) : [".xls", ".xlsx", ".csv"].indexOf(e.data.fileSuffix) > -1 ? (s(), h
|
|
282
|
+
}, 8, ["src", "preview-src-list", "style"])) : [".xls", ".xlsx", ".csv"].indexOf(e.data.fileSuffix) > -1 ? (s(), f(h, {
|
|
283
283
|
key: 1,
|
|
284
284
|
"icon-class": "excel",
|
|
285
|
-
style: fe(`width:${
|
|
286
|
-
}, null, 8, ["style"])) : [".doc", ".docx"].indexOf(e.data.fileSuffix) > -1 ? (s(), h
|
|
285
|
+
style: fe(`width:${o(t)};height:${o(a)};`)
|
|
286
|
+
}, null, 8, ["style"])) : [".doc", ".docx"].indexOf(e.data.fileSuffix) > -1 ? (s(), f(h, {
|
|
287
287
|
key: 2,
|
|
288
288
|
"icon-class": "word",
|
|
289
|
-
style: fe(`width:${
|
|
290
|
-
}, null, 8, ["style"])) : [".pdf"].indexOf(e.data.fileSuffix) > -1 ? (s(), h
|
|
289
|
+
style: fe(`width:${o(t)};height:${o(a)};`)
|
|
290
|
+
}, null, 8, ["style"])) : [".pdf"].indexOf(e.data.fileSuffix) > -1 ? (s(), f(h, {
|
|
291
291
|
key: 3,
|
|
292
292
|
"icon-class": "pdf",
|
|
293
|
-
style: fe(`width:${
|
|
294
|
-
}, null, 8, ["style"])) : [".tet"].indexOf(e.data.fileSuffix) > -1 ? (s(), h
|
|
293
|
+
style: fe(`width:${o(t)};height:${o(a)};`)
|
|
294
|
+
}, null, 8, ["style"])) : [".tet"].indexOf(e.data.fileSuffix) > -1 ? (s(), f(h, {
|
|
295
295
|
key: 4,
|
|
296
296
|
"icon-class": "tet",
|
|
297
|
-
style: fe(`width:${
|
|
298
|
-
}, null, 8, ["style"])) : [".zip"].indexOf(e.data.fileSuffix) > -1 ? (s(), h
|
|
297
|
+
style: fe(`width:${o(t)};height:${o(a)};`)
|
|
298
|
+
}, null, 8, ["style"])) : [".zip"].indexOf(e.data.fileSuffix) > -1 ? (s(), f(h, {
|
|
299
299
|
key: 5,
|
|
300
300
|
"icon-class": "zip",
|
|
301
|
-
style: fe(`width:${
|
|
302
|
-
}, null, 8, ["style"])) : (s(), h
|
|
301
|
+
style: fe(`width:${o(t)};height:${o(a)};`)
|
|
302
|
+
}, null, 8, ["style"])) : (s(), f(h, {
|
|
303
303
|
key: 6,
|
|
304
304
|
"icon-class": "unknown",
|
|
305
|
-
style: fe(`width:${
|
|
305
|
+
style: fe(`width:${o(t)};height:${o(a)};`)
|
|
306
306
|
}, null, 8, ["style"]))
|
|
307
307
|
]);
|
|
308
308
|
};
|
|
309
309
|
}
|
|
310
|
-
}),
|
|
310
|
+
}), Pa = /* @__PURE__ */ be(Lt, [["__scopeId", "data-v-a3763021"]]), Oa = {
|
|
311
311
|
bool: [
|
|
312
312
|
{ label: "是", value: "1" },
|
|
313
313
|
{ label: "否", value: "0" },
|
|
314
314
|
{ label: "是", value: "True" },
|
|
315
315
|
{ label: "否", value: "False" }
|
|
316
316
|
]
|
|
317
|
-
},
|
|
317
|
+
}, zt = [
|
|
318
318
|
{ prop: "createTime", width: "165px" },
|
|
319
319
|
{ prop: "createBy", width: "100px" },
|
|
320
320
|
{ prop: "orderNum", width: "80px" },
|
|
321
321
|
{ prop: "sort", width: "80px" },
|
|
322
322
|
{ prop: "code", width: "120px" },
|
|
323
323
|
{ prop: "updateTime", width: "165px" }
|
|
324
|
-
],
|
|
324
|
+
], Bt = [10, 15, 20, 30, 50, 100], ta = {
|
|
325
325
|
pageSize: 15,
|
|
326
326
|
pageNum: 1,
|
|
327
327
|
total: 0,
|
|
328
328
|
orderByColumn: "",
|
|
329
329
|
isAsc: ""
|
|
330
|
-
},
|
|
330
|
+
}, Oe = {
|
|
331
331
|
FULL: "total, sizes, prev, pager, next",
|
|
332
332
|
SIMPLE: "total"
|
|
333
|
-
},
|
|
334
|
-
function
|
|
333
|
+
}, la = 30, Yt = 28;
|
|
334
|
+
function Ye(e) {
|
|
335
335
|
if (!e) return {};
|
|
336
336
|
const l = {};
|
|
337
337
|
for (const t in e) {
|
|
@@ -340,26 +340,26 @@ function ze(e) {
|
|
|
340
340
|
}
|
|
341
341
|
return l;
|
|
342
342
|
}
|
|
343
|
-
function
|
|
343
|
+
function Mt(e) {
|
|
344
344
|
if (e.width) return String(e.width);
|
|
345
|
-
const l =
|
|
345
|
+
const l = zt.find((t) => t.prop === e.prop);
|
|
346
346
|
return l ? l.width : e.prop.includes("time") ? "100px" : "auto";
|
|
347
347
|
}
|
|
348
|
-
function
|
|
348
|
+
function Rt(e, l) {
|
|
349
349
|
if (!l.prop) return "";
|
|
350
350
|
let t;
|
|
351
|
-
if (l.prop.includes(".") ? t = l.prop.split(".").reduce((c,
|
|
351
|
+
if (l.prop.includes(".") ? t = l.prop.split(".").reduce((c, r) => c == null ? void 0 : c[r], e) : t = e[l.prop], t != null) {
|
|
352
352
|
const a = l.prefix || "", c = l.suffix || "";
|
|
353
353
|
return `${a}${t}${c}`;
|
|
354
354
|
}
|
|
355
355
|
return "";
|
|
356
356
|
}
|
|
357
|
-
function
|
|
357
|
+
function jt(e) {
|
|
358
358
|
e.forEach((l) => {
|
|
359
359
|
l.form || (l.form = { order: 100 }), l.form.order == null && (l.form.order = 100), !l.form.type && l.type && (l.form.type = l.type), !l.form.prop && l.prop && (l.form.prop = l.prop), l.search && !l.search.dictType && l.dictType && (l.search.dictType = l.dictType), !l.form.dictType && l.dictType && (l.form.dictType = l.dictType), !l.form.inactiveValue && l.inactiveValue && (l.form.inactiveValue = l.inactiveValue), !l.form.activeValue && l.activeValue && (l.form.activeValue = l.activeValue), l.form.type === "checkbox" && (l.label = ""), l.search && (l.search.prop = l.search.prop ?? l.prop);
|
|
360
360
|
});
|
|
361
361
|
}
|
|
362
|
-
function
|
|
362
|
+
function Ht(e) {
|
|
363
363
|
e.forEach((l) => {
|
|
364
364
|
if (!l.form) return;
|
|
365
365
|
const t = l.form.rules || [];
|
|
@@ -370,29 +370,29 @@ function Rt(e) {
|
|
|
370
370
|
}), l.form.rules = t.length > 0 ? t : void 0;
|
|
371
371
|
});
|
|
372
372
|
}
|
|
373
|
-
function
|
|
373
|
+
function Ia(e, l = "order") {
|
|
374
374
|
return [...e].sort((t, a) => {
|
|
375
|
-
const c = (y,
|
|
376
|
-
const V =
|
|
375
|
+
const c = (y, h) => {
|
|
376
|
+
const V = h.split(".");
|
|
377
377
|
let p = y;
|
|
378
|
-
for (const
|
|
379
|
-
p = p == null ? void 0 : p[
|
|
378
|
+
for (const j of V)
|
|
379
|
+
p = p == null ? void 0 : p[j];
|
|
380
380
|
return p ?? 100;
|
|
381
|
-
},
|
|
382
|
-
return
|
|
381
|
+
}, r = c(t, l), i = c(a, l);
|
|
382
|
+
return r - i;
|
|
383
383
|
});
|
|
384
384
|
}
|
|
385
|
-
function
|
|
385
|
+
function Ft(e, l, t) {
|
|
386
386
|
return e.filter((a) => !(a.canEdit === !1 || t && a.canUpdate === !1 || !t && a.canCreate === !1));
|
|
387
387
|
}
|
|
388
|
-
function
|
|
388
|
+
function Nt(e, l) {
|
|
389
389
|
if (!l.show) return !0;
|
|
390
390
|
for (const t in l.show)
|
|
391
391
|
if (l.show[t].includes(e[t]))
|
|
392
392
|
return !0;
|
|
393
393
|
return !1;
|
|
394
394
|
}
|
|
395
|
-
function
|
|
395
|
+
function Kt(e, l) {
|
|
396
396
|
if (!l.disable && !l.enable) return !1;
|
|
397
397
|
for (const t in l.disable)
|
|
398
398
|
if (l.disable[t].includes(e[t]))
|
|
@@ -402,14 +402,14 @@ function Ft(e, l) {
|
|
|
402
402
|
return !0;
|
|
403
403
|
return !1;
|
|
404
404
|
}
|
|
405
|
-
function
|
|
405
|
+
function Wt(e, l, t, a) {
|
|
406
406
|
l && l[0] && l[1] && (e[t] = `${l[0]},${l[1]}`, a == null || a.addDateRange(e, l, t));
|
|
407
407
|
}
|
|
408
|
-
function
|
|
409
|
-
const { proxy: l } = he(), t =
|
|
410
|
-
...
|
|
411
|
-
pageSize: e.initialPageSize ??
|
|
412
|
-
}),
|
|
408
|
+
function qt(e) {
|
|
409
|
+
const { proxy: l } = he(), t = x([]), a = x(!1), c = x([]), r = x({}), i = x(), y = x({
|
|
410
|
+
...ta,
|
|
411
|
+
pageSize: e.initialPageSize ?? ta.pageSize
|
|
412
|
+
}), h = x(Bt), V = x(Oe.FULL), p = async () => {
|
|
413
413
|
var U;
|
|
414
414
|
if (!e.listApi) {
|
|
415
415
|
e.data ? t.value = Array.isArray(e.data) ? e.data : ((U = e.data) == null ? void 0 : U.value) || [] : t.value = [];
|
|
@@ -417,42 +417,42 @@ function Kt(e) {
|
|
|
417
417
|
}
|
|
418
418
|
a.value = !0;
|
|
419
419
|
try {
|
|
420
|
-
const k = await
|
|
420
|
+
const k = await j(null), E = await e.listApi(k);
|
|
421
421
|
e.afterQuery && await e.afterQuery(E);
|
|
422
|
-
let
|
|
423
|
-
e.treeProps && (
|
|
422
|
+
let P = E.rows || E.data;
|
|
423
|
+
e.treeProps && (P = l == null ? void 0 : l.handleTree(E.data, e.rowKey)), t.value = P, y.value.total = E.total;
|
|
424
424
|
const W = E.total / y.value.pageSize <= 1;
|
|
425
|
-
V.value = W ?
|
|
425
|
+
V.value = W ? Oe.SIMPLE : Oe.FULL, l == null || l.$forceUpdate();
|
|
426
426
|
} catch (k) {
|
|
427
427
|
console.error("Query failed:", k);
|
|
428
428
|
} finally {
|
|
429
429
|
a.value = !1;
|
|
430
430
|
}
|
|
431
|
-
},
|
|
432
|
-
U && (
|
|
431
|
+
}, j = async (U) => {
|
|
432
|
+
U && (r.value = Ye(U));
|
|
433
433
|
let k = e.queryParams || {};
|
|
434
434
|
if (e.beforeQuery) {
|
|
435
435
|
const E = await e.beforeQuery({});
|
|
436
436
|
k = {
|
|
437
437
|
...y.value,
|
|
438
438
|
...k,
|
|
439
|
-
...
|
|
439
|
+
...r.value,
|
|
440
440
|
...E
|
|
441
441
|
};
|
|
442
442
|
} else
|
|
443
443
|
k = {
|
|
444
444
|
...y.value,
|
|
445
445
|
...k,
|
|
446
|
-
...
|
|
446
|
+
...r.value
|
|
447
447
|
};
|
|
448
448
|
return k;
|
|
449
449
|
}, D = (U) => {
|
|
450
|
-
U && (
|
|
451
|
-
},
|
|
450
|
+
U && (r.value = Ye(U)), p();
|
|
451
|
+
}, H = (U) => {
|
|
452
452
|
y.value.pageNum = U, p();
|
|
453
|
-
},
|
|
453
|
+
}, I = (U) => {
|
|
454
454
|
y.value.pageSize = U, p();
|
|
455
|
-
},
|
|
455
|
+
}, F = (U) => {
|
|
456
456
|
U.order && (y.value.orderByColumn = U.prop, y.value.isAsc = U.order), p();
|
|
457
457
|
}, X = (U) => {
|
|
458
458
|
c.value = U, e.selectionChange && e.selectionChange(U);
|
|
@@ -468,73 +468,73 @@ function Kt(e) {
|
|
|
468
468
|
loading: a,
|
|
469
469
|
multipleSelection: c,
|
|
470
470
|
pageOptions: y,
|
|
471
|
-
listSize:
|
|
471
|
+
listSize: h,
|
|
472
472
|
pagingLayout: V,
|
|
473
473
|
defaultSort: i,
|
|
474
474
|
executeQuery: p,
|
|
475
|
-
getQueryParams:
|
|
475
|
+
getQueryParams: j,
|
|
476
476
|
refreshTable: D,
|
|
477
|
-
handlePageChange:
|
|
478
|
-
handleSizeChange:
|
|
479
|
-
handleSortChange:
|
|
477
|
+
handlePageChange: H,
|
|
478
|
+
handleSizeChange: I,
|
|
479
|
+
handleSortChange: F,
|
|
480
480
|
handleSelectionChange: X,
|
|
481
481
|
initData: async () => {
|
|
482
482
|
ee(), await p();
|
|
483
483
|
}
|
|
484
484
|
};
|
|
485
485
|
}
|
|
486
|
-
function
|
|
487
|
-
const { proxy: e } = he(), l = async (
|
|
488
|
-
for (const i of
|
|
486
|
+
function xa() {
|
|
487
|
+
const { proxy: e } = he(), l = async (r) => {
|
|
488
|
+
for (const i of r)
|
|
489
489
|
if (i.type === "dictTag" || i.type === "dictText") {
|
|
490
490
|
const y = await (e == null ? void 0 : e.useOneDict(i.dictType));
|
|
491
|
-
i.data =
|
|
491
|
+
i.data = Ie(y);
|
|
492
492
|
} else if (i.type === "commonDictTag" || i.type === "commonDictText") {
|
|
493
493
|
const y = await (e == null ? void 0 : e.useOneCommonDict(i.dictType));
|
|
494
|
-
i.data =
|
|
494
|
+
i.data = Ie(y);
|
|
495
495
|
}
|
|
496
|
-
}, t = async (
|
|
497
|
-
if (!
|
|
498
|
-
switch (
|
|
496
|
+
}, t = async (r) => {
|
|
497
|
+
if (!r.search) return;
|
|
498
|
+
switch (r.search.type) {
|
|
499
499
|
case "selectApi":
|
|
500
|
-
|
|
500
|
+
r.search.api ? await a(r) : console.error(`${r.prop}中search对象未设置api参数`);
|
|
501
501
|
break;
|
|
502
502
|
case "treeSelectApi":
|
|
503
|
-
|
|
503
|
+
r.search.api ? await c(r) : console.error(`${r.prop}中search对象未设置api参数`);
|
|
504
504
|
break;
|
|
505
505
|
case "selectCommonDict":
|
|
506
|
-
|
|
506
|
+
r.search.data = await (e == null ? void 0 : e.useOneCommonDict(r.search.dictType));
|
|
507
507
|
break;
|
|
508
508
|
case "selectDict":
|
|
509
|
-
|
|
509
|
+
r.search.data = await (e == null ? void 0 : e.useOneDict(r.search.dictType));
|
|
510
510
|
break;
|
|
511
511
|
}
|
|
512
|
-
}, a = async (
|
|
512
|
+
}, a = async (r) => {
|
|
513
513
|
var y;
|
|
514
|
-
if (!((y =
|
|
514
|
+
if (!((y = r.search) != null && y.api)) return;
|
|
515
515
|
const i = {
|
|
516
516
|
pageNum: 1,
|
|
517
517
|
pageSize: 1e3,
|
|
518
|
-
filedName:
|
|
519
|
-
...
|
|
518
|
+
filedName: r.prop,
|
|
519
|
+
...r.search.apiParams || {}
|
|
520
520
|
};
|
|
521
521
|
try {
|
|
522
|
-
const
|
|
523
|
-
|
|
524
|
-
} catch (
|
|
525
|
-
console.error(`Failed to load API data for ${
|
|
522
|
+
const h = await r.search.api(i);
|
|
523
|
+
r.search.data = h.data || h.rows;
|
|
524
|
+
} catch (h) {
|
|
525
|
+
console.error(`Failed to load API data for ${r.prop}:`, h);
|
|
526
526
|
}
|
|
527
|
-
}, c = async (
|
|
527
|
+
}, c = async (r) => {
|
|
528
528
|
var i;
|
|
529
|
-
if ((i =
|
|
529
|
+
if ((i = r.search) != null && i.api)
|
|
530
530
|
try {
|
|
531
|
-
const y = await
|
|
532
|
-
if (
|
|
533
|
-
const V = (
|
|
534
|
-
|
|
531
|
+
const y = await r.search.api({ pageNum: 1, pageSize: 1e3 });
|
|
532
|
+
if (r.search.data = y.data || y.rows || y, r.search.data && Array.isArray(r.search.data)) {
|
|
533
|
+
const V = (r.search.props || { value: "id", label: "label", children: "children" }).value || "id";
|
|
534
|
+
r.search.defaultExpandedKeys = r.search.data.map((p) => p[V]);
|
|
535
535
|
}
|
|
536
536
|
} catch (y) {
|
|
537
|
-
console.error(`Failed to load tree API data for ${
|
|
537
|
+
console.error(`Failed to load tree API data for ${r.prop}:`, y);
|
|
538
538
|
}
|
|
539
539
|
};
|
|
540
540
|
return {
|
|
@@ -543,35 +543,35 @@ function Ia() {
|
|
|
543
543
|
initSelectApi: a
|
|
544
544
|
};
|
|
545
545
|
}
|
|
546
|
-
let
|
|
547
|
-
const
|
|
548
|
-
e.hasPermi && (
|
|
549
|
-
},
|
|
546
|
+
let Je = () => !0, La = () => !0;
|
|
547
|
+
const Qt = (e) => {
|
|
548
|
+
e.hasPermi && (Je = e.hasPermi), e.hasRoles && (La = e.hasRoles);
|
|
549
|
+
}, Me = (e) => {
|
|
550
550
|
if (e == null) return !0;
|
|
551
551
|
const l = Array.isArray(e) ? e : [e];
|
|
552
|
-
return l.length === 0 ? !0 :
|
|
553
|
-
},
|
|
552
|
+
return l.length === 0 ? !0 : Je(l);
|
|
553
|
+
}, Gt = {
|
|
554
554
|
mounted(e, l) {
|
|
555
555
|
var a;
|
|
556
556
|
const { value: t } = l;
|
|
557
|
-
t != null && Array.isArray(t) && t.length > 0 && (
|
|
557
|
+
t != null && Array.isArray(t) && t.length > 0 && (Je(t) || (a = e.parentNode) == null || a.removeChild(e));
|
|
558
558
|
}
|
|
559
|
-
},
|
|
559
|
+
}, Jt = {
|
|
560
560
|
mounted(e, l) {
|
|
561
561
|
var a;
|
|
562
562
|
const { value: t } = l;
|
|
563
|
-
t != null && Array.isArray(t) && t.length > 0 && (
|
|
563
|
+
t != null && Array.isArray(t) && t.length > 0 && (La(t) || (a = e.parentNode) == null || a.removeChild(e));
|
|
564
564
|
}
|
|
565
|
-
},
|
|
565
|
+
}, Xt = {
|
|
566
566
|
key: 2,
|
|
567
567
|
class: "image-style"
|
|
568
|
-
},
|
|
568
|
+
}, Zt = {
|
|
569
569
|
key: 3,
|
|
570
570
|
class: "image-style"
|
|
571
|
-
},
|
|
571
|
+
}, el = {
|
|
572
572
|
key: 8,
|
|
573
573
|
class: "color-cell"
|
|
574
|
-
},
|
|
574
|
+
}, al = { style: { margin: "20px 0px" } }, tl = /* @__PURE__ */ pe({
|
|
575
575
|
__name: "curdTable",
|
|
576
576
|
props: {
|
|
577
577
|
dataSource: {},
|
|
@@ -579,216 +579,260 @@ const Wt = (e) => {
|
|
|
579
579
|
},
|
|
580
580
|
emits: ["actionEvent", "selectionChange", "rowClick"],
|
|
581
581
|
setup(e, { expose: l, emit: t }) {
|
|
582
|
-
const { proxy: a } = he(), c = t,
|
|
583
|
-
listData:
|
|
582
|
+
const { proxy: a } = he(), c = t, r = e, i = J(() => r.dataSource.maxHeight ?? r.maxHeight), y = x(), {
|
|
583
|
+
listData: h,
|
|
584
584
|
loading: V,
|
|
585
585
|
multipleSelection: p,
|
|
586
|
-
pageOptions:
|
|
586
|
+
pageOptions: j,
|
|
587
587
|
listSize: D,
|
|
588
|
-
pagingLayout:
|
|
589
|
-
defaultSort:
|
|
590
|
-
refreshTable:
|
|
588
|
+
pagingLayout: H,
|
|
589
|
+
defaultSort: I,
|
|
590
|
+
refreshTable: F,
|
|
591
591
|
handlePageChange: X,
|
|
592
592
|
handleSizeChange: ee,
|
|
593
593
|
handleSortChange: $,
|
|
594
594
|
handleSelectionChange: U,
|
|
595
595
|
initData: k,
|
|
596
596
|
getQueryParams: E
|
|
597
|
-
} =
|
|
598
|
-
(w) => w.action !== "create" && w.action !== "back" && (!w.position || w.position === "table") &&
|
|
597
|
+
} = qt(r.dataSource), { initColumnDicts: P } = xa(), W = x(Oa), S = (w) => w == null ? void 0 : w[r.dataSource.rowKey], d = J(() => r.dataSource.actions ? r.dataSource.actions.filter(
|
|
598
|
+
(w) => w.action !== "create" && w.action !== "back" && (!w.position || w.position === "table") && Me(w.permission)
|
|
599
599
|
) : []), C = (w) => {
|
|
600
|
-
var
|
|
601
|
-
return !((
|
|
600
|
+
var K;
|
|
601
|
+
return !((K = r.dataSource.disabledCheckedRowKeys) != null && K.includes(S(w)));
|
|
602
602
|
}, A = J(() => {
|
|
603
|
-
const w =
|
|
603
|
+
const w = r.dataSource.actionColumnWidth;
|
|
604
604
|
if (w != null && w !== "")
|
|
605
605
|
return typeof w == "number" ? `${w}px` : w;
|
|
606
|
-
let
|
|
607
|
-
return
|
|
608
|
-
}),
|
|
606
|
+
let K = d.value.length * Yt;
|
|
607
|
+
return K < la && (K = la), `${K + 40}px`;
|
|
608
|
+
}), N = (w, K) => Nt(w, K), G = (w, K) => Kt(w, K), se = (w) => Mt(w), _ = (w) => Me(w == null ? void 0 : w.permission), L = (w) => {
|
|
609
609
|
var ae;
|
|
610
|
-
const
|
|
611
|
-
return
|
|
612
|
-
}, q = (w,
|
|
610
|
+
const K = w.align || r.dataSource.align;
|
|
611
|
+
return K || (((ae = w.label) == null ? void 0 : ae.indexOf("時間")) > -1 || !1 || w.type == "dictTag" || w.type == "image" || w.type == "switch" ? "center" : "left");
|
|
612
|
+
}, q = (w, K) => {
|
|
613
613
|
const ae = a == null ? void 0 : a.useDict(w.dictType)[w.dictType];
|
|
614
614
|
if (ae != null) {
|
|
615
|
-
const
|
|
616
|
-
return
|
|
615
|
+
const te = K[w.prop], le = ae.filter((ge) => ge.value == te);
|
|
616
|
+
return le.length == 0 ? "" : le[0].label;
|
|
617
617
|
} else console.error(w.dictType + " 字典不存在");
|
|
618
|
-
}, Y = (w,
|
|
618
|
+
}, Y = (w, K) => {
|
|
619
619
|
const ae = W.value[w.dictType];
|
|
620
620
|
if (ae != null) {
|
|
621
|
-
const
|
|
622
|
-
return
|
|
621
|
+
const te = K[w.prop], le = ae.find((ge) => ge.value == te);
|
|
622
|
+
return le == null ? "" : le.label;
|
|
623
623
|
} else console.error(w.dictType + " 字典不存在");
|
|
624
|
-
}, ne = (w,
|
|
624
|
+
}, ne = (w, K) => {
|
|
625
625
|
if (w.data != null) {
|
|
626
|
-
const ae =
|
|
627
|
-
return
|
|
626
|
+
const ae = K[w.prop], te = w.data.find((le) => le.value == ae);
|
|
627
|
+
return te == null ? "" : te.label;
|
|
628
628
|
} else console.error("未配置data屬性");
|
|
629
|
-
}, ue = (w,
|
|
629
|
+
}, ue = (w, K) => {
|
|
630
630
|
if (w.data != null) {
|
|
631
|
-
const ae =
|
|
632
|
-
return
|
|
631
|
+
const ae = K[w.prop], te = w.data.find((le) => le.value == ae);
|
|
632
|
+
return te == null ? "info" : te.tagType;
|
|
633
633
|
} else console.error("未配置data屬性");
|
|
634
|
-
}, me = (w,
|
|
635
|
-
const
|
|
636
|
-
U(
|
|
637
|
-
}, ye = (w,
|
|
638
|
-
var
|
|
639
|
-
return (
|
|
640
|
-
}, u = (w,
|
|
641
|
-
var
|
|
642
|
-
if (!
|
|
643
|
-
await
|
|
634
|
+
}, me = (w, K) => Rt(w, K), ce = (w) => {
|
|
635
|
+
const K = Array.isArray(w) ? w : [];
|
|
636
|
+
U(K), c("selectionChange", K);
|
|
637
|
+
}, ye = (w, K, ae) => {
|
|
638
|
+
var te, le;
|
|
639
|
+
return (le = (te = r.dataSource).rowClick) == null ? void 0 : le.call(te, w, K, ae);
|
|
640
|
+
}, u = (w, K) => c("actionEvent", w, K), m = () => p.value, n = async () => {
|
|
641
|
+
var K, ae;
|
|
642
|
+
if (!r.dataSource.showSelection || !((K = r.dataSource.checkedRowKeys) != null && K.length)) return;
|
|
643
|
+
await Le();
|
|
644
644
|
const w = y.value;
|
|
645
645
|
if (w != null && w.toggleRowSelection)
|
|
646
|
-
for (const
|
|
647
|
-
const
|
|
648
|
-
if (
|
|
649
|
-
const ge = String(
|
|
650
|
-
(ae =
|
|
646
|
+
for (const te of h.value) {
|
|
647
|
+
const le = S(te);
|
|
648
|
+
if (le == null) continue;
|
|
649
|
+
const ge = String(le);
|
|
650
|
+
(ae = r.dataSource.checkedRowKeys) != null && ae.includes(ge) && w.toggleRowSelection(te, !0);
|
|
651
651
|
}
|
|
652
652
|
}, g = async () => {
|
|
653
|
-
var
|
|
654
|
-
if (!
|
|
655
|
-
await
|
|
653
|
+
var K, ae;
|
|
654
|
+
if (!r.dataSource.showSelection || !((K = r.dataSource.disabledCheckedRowKeys) != null && K.length)) return;
|
|
655
|
+
await Le();
|
|
656
656
|
const w = y.value;
|
|
657
657
|
if (w != null && w.toggleRowSelection)
|
|
658
|
-
for (const
|
|
659
|
-
const
|
|
660
|
-
if (
|
|
661
|
-
const ge = String(
|
|
662
|
-
(ae =
|
|
658
|
+
for (const te of h.value) {
|
|
659
|
+
const le = S(te);
|
|
660
|
+
if (le == null) continue;
|
|
661
|
+
const ge = String(le);
|
|
662
|
+
(ae = r.dataSource.disabledCheckedRowKeys) != null && ae.includes(ge) && w.toggleRowSelection(te, !0);
|
|
663
663
|
}
|
|
664
|
-
},
|
|
665
|
-
await
|
|
664
|
+
}, Xe = async () => {
|
|
665
|
+
await P(r.dataSource.columns), await k(), await g(), await n();
|
|
666
666
|
};
|
|
667
|
-
return
|
|
668
|
-
const ae =
|
|
667
|
+
return Ne(() => Xe()), l({ refreshTable: F, getSelection: m, initData: Xe, getQueryParams: E }), (w, K) => {
|
|
668
|
+
const ae = tt, te = Pe, le = Re, ge = da, Wa = pa, Se = ia, qa = Ta, Qa = Ca, Ga = Ke, Ce = De, Ja = lt, Xa = at, Za = rt, Te = Sa("hasPermi"), et = ot;
|
|
669
669
|
return s(), T("div", null, [
|
|
670
|
-
de((s(),
|
|
670
|
+
de((s(), f(Xa, {
|
|
671
671
|
ref_key: "curdTableRef",
|
|
672
672
|
ref: y,
|
|
673
|
-
data:
|
|
674
|
-
"row-key":
|
|
673
|
+
data: o(h),
|
|
674
|
+
"row-key": r.dataSource.rowKey,
|
|
675
675
|
"element-loading-text": w.$t("數據加載中..."),
|
|
676
676
|
stripe: "",
|
|
677
|
-
"tree-props":
|
|
678
|
-
"default-sort":
|
|
677
|
+
"tree-props": r.dataSource.treeProps,
|
|
678
|
+
"default-sort": o(I),
|
|
679
679
|
onSelectionChange: ce,
|
|
680
|
-
onSortChange:
|
|
680
|
+
onSortChange: o($),
|
|
681
681
|
onRowClick: ye,
|
|
682
|
-
"default-expand-all":
|
|
683
|
-
"max-height":
|
|
682
|
+
"default-expand-all": r.dataSource.treeDefaultExpandAll ?? !1,
|
|
683
|
+
"max-height": o(i),
|
|
684
684
|
"highlight-current-row": ""
|
|
685
685
|
}, {
|
|
686
686
|
empty: b(() => [
|
|
687
|
-
re("div",
|
|
687
|
+
re("div", al, M(w.$t("未查詢到數據")), 1)
|
|
688
688
|
]),
|
|
689
689
|
default: b(() => [
|
|
690
|
-
|
|
690
|
+
r.dataSource.showSelection ? (s(), f(ae, {
|
|
691
691
|
key: 0,
|
|
692
692
|
type: "selection",
|
|
693
693
|
width: "60",
|
|
694
694
|
selectable: C,
|
|
695
695
|
align: "center"
|
|
696
696
|
})) : Z("", !0),
|
|
697
|
-
|
|
697
|
+
r.dataSource.showIndex ? (s(), f(ae, {
|
|
698
698
|
key: 1,
|
|
699
699
|
type: "index",
|
|
700
700
|
width: "70",
|
|
701
701
|
align: "center",
|
|
702
702
|
label: "序號"
|
|
703
703
|
})) : Z("", !0),
|
|
704
|
-
(s(!0), T(
|
|
704
|
+
(s(!0), T(B, null, Q(r.dataSource.columns, (v) => (s(), T(B, {
|
|
705
705
|
key: v.prop || v.key
|
|
706
706
|
}, [
|
|
707
|
-
v.width !== 0 && _(v) ? (s(),
|
|
707
|
+
v.width !== 0 && _(v) ? (s(), f(ae, {
|
|
708
708
|
key: 0,
|
|
709
709
|
label: v.label,
|
|
710
710
|
width: se(v),
|
|
711
711
|
"min-width": v.minWidth,
|
|
712
712
|
prop: v.prop,
|
|
713
|
-
align:
|
|
713
|
+
align: L(v),
|
|
714
714
|
sortable: v.sort ? "custom" : !1,
|
|
715
715
|
"show-overflow-tooltip": v.showOverflowTooltip || !0,
|
|
716
716
|
fixed: v.fixed
|
|
717
717
|
}, {
|
|
718
|
-
default: b(({ row:
|
|
719
|
-
v.slot ?
|
|
718
|
+
default: b(({ row: O }) => [
|
|
719
|
+
v.slot ? xe(w.$slots, v.slot, {
|
|
720
720
|
key: 0,
|
|
721
|
-
row:
|
|
721
|
+
row: O,
|
|
722
722
|
column: v,
|
|
723
|
-
value:
|
|
724
|
-
}, void 0, !0) : v.type === "image" &&
|
|
723
|
+
value: O[v.prop]
|
|
724
|
+
}, void 0, !0) : v.type === "image" && O[v.prop] ? (s(), f(Aa, {
|
|
725
725
|
key: 1,
|
|
726
|
-
modelValue:
|
|
727
|
-
"onUpdate:modelValue": (ie) =>
|
|
726
|
+
modelValue: O[v.prop],
|
|
727
|
+
"onUpdate:modelValue": (ie) => O[v.prop] = ie,
|
|
728
728
|
class: "image-preview",
|
|
729
729
|
width: 24,
|
|
730
730
|
height: 24
|
|
731
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue"])) : v.type === "networkImage" ? (s(), T("view",
|
|
732
|
-
|
|
733
|
-
|
|
731
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue"])) : v.type === "networkImage" ? (s(), T("view", Xt, [
|
|
732
|
+
O[v.prop] ? (s(), f(le, {
|
|
733
|
+
key: 0,
|
|
734
|
+
src: O[v.prop],
|
|
734
735
|
fit: "cover",
|
|
735
|
-
style: { height: "24px" }
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
736
|
+
style: { height: "24px", cursor: "pointer" },
|
|
737
|
+
"preview-src-list": [O[v.prop]],
|
|
738
|
+
"preview-teleported": !0,
|
|
739
|
+
"hide-on-click-modal": ""
|
|
740
|
+
}, {
|
|
741
|
+
error: b(() => [
|
|
742
|
+
R(te, { class: "image-fallback" }, {
|
|
743
|
+
default: b(() => [
|
|
744
|
+
R(o(Ue))
|
|
745
|
+
]),
|
|
746
|
+
_: 1
|
|
747
|
+
})
|
|
748
|
+
]),
|
|
749
|
+
_: 2
|
|
750
|
+
}, 1032, ["src", "preview-src-list"])) : (s(), f(te, {
|
|
751
|
+
key: 1,
|
|
752
|
+
class: "image-fallback"
|
|
753
|
+
}, {
|
|
754
|
+
default: b(() => [
|
|
755
|
+
R(o(Ue))
|
|
756
|
+
]),
|
|
757
|
+
_: 1
|
|
758
|
+
}))
|
|
759
|
+
])) : v.type === "imageUrl" ? (s(), T("view", Zt, [
|
|
760
|
+
O[v.prop] ? (s(), f(le, {
|
|
761
|
+
key: 0,
|
|
762
|
+
src: O[v.prop],
|
|
740
763
|
fit: "cover",
|
|
741
|
-
style: { height: "24px" }
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
764
|
+
style: { height: "24px", cursor: "pointer" },
|
|
765
|
+
"preview-src-list": [O[v.prop]],
|
|
766
|
+
"preview-teleported": !0,
|
|
767
|
+
"hide-on-click-modal": ""
|
|
768
|
+
}, {
|
|
769
|
+
error: b(() => [
|
|
770
|
+
R(te, { class: "image-fallback" }, {
|
|
771
|
+
default: b(() => [
|
|
772
|
+
R(o(Ue))
|
|
773
|
+
]),
|
|
774
|
+
_: 1
|
|
775
|
+
})
|
|
776
|
+
]),
|
|
777
|
+
_: 2
|
|
778
|
+
}, 1032, ["src", "preview-src-list"])) : (s(), f(te, {
|
|
779
|
+
key: 1,
|
|
780
|
+
class: "image-fallback"
|
|
781
|
+
}, {
|
|
782
|
+
default: b(() => [
|
|
783
|
+
R(o(Ue))
|
|
784
|
+
]),
|
|
785
|
+
_: 1
|
|
786
|
+
}))
|
|
787
|
+
])) : v.type === "date" ? (s(), T(B, { key: 4 }, [
|
|
788
|
+
z(M(w.parseTime(O[v.prop], "{y}-{m}-{d}")), 1)
|
|
789
|
+
], 64)) : v.type === "timestamp" ? (s(), T(B, { key: 5 }, [
|
|
790
|
+
z(M(w.parseTime(O[v.prop])), 1)
|
|
791
|
+
], 64)) : v.type === "bool" ? (s(), f(ge, {
|
|
748
792
|
key: 6,
|
|
749
|
-
modelValue:
|
|
750
|
-
"onUpdate:modelValue": (ie) =>
|
|
751
|
-
onClick:
|
|
793
|
+
modelValue: O[v.prop],
|
|
794
|
+
"onUpdate:modelValue": (ie) => O[v.prop] = ie,
|
|
795
|
+
onClick: K[0] || (K[0] = pt(() => {
|
|
752
796
|
}, ["stop", "prevent"]))
|
|
753
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue"])) : v.type === "switch" ? (s(),
|
|
797
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue"])) : v.type === "switch" ? (s(), f(Wa, {
|
|
754
798
|
key: 7,
|
|
755
|
-
modelValue:
|
|
756
|
-
"onUpdate:modelValue": (ie) =>
|
|
799
|
+
modelValue: O[v.prop],
|
|
800
|
+
"onUpdate:modelValue": (ie) => O[v.prop] = ie,
|
|
757
801
|
"active-value": v.activeValue || "0",
|
|
758
802
|
"inactive-value": v.inactiveValue || "1",
|
|
759
803
|
size: "small",
|
|
760
804
|
"before-change": () => !1
|
|
761
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "active-value", "inactive-value"])) : v.type === "color" ? (s(), T("div",
|
|
805
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "active-value", "inactive-value"])) : v.type === "color" ? (s(), T("div", el, [
|
|
762
806
|
re("div", {
|
|
763
807
|
class: "color-cell-item",
|
|
764
|
-
style: fe({ backgroundColor:
|
|
808
|
+
style: fe({ backgroundColor: O[v.prop] || "#ffffff" })
|
|
765
809
|
}, null, 4)
|
|
766
|
-
])) : v.type === "fromDict" ? (s(), T(
|
|
767
|
-
|
|
768
|
-
], 64)) : v.type === "fromDataTag" ? (s(),
|
|
810
|
+
])) : v.type === "fromDict" ? (s(), T(B, { key: 9 }, [
|
|
811
|
+
z(M(q(v, O)), 1)
|
|
812
|
+
], 64)) : v.type === "fromDataTag" ? (s(), f(Se, {
|
|
769
813
|
key: 10,
|
|
770
|
-
type: ue(v,
|
|
814
|
+
type: ue(v, O),
|
|
771
815
|
effect: v.tagEffect ?? "light",
|
|
772
816
|
class: "el-column-tag"
|
|
773
817
|
}, {
|
|
774
818
|
default: b(() => [
|
|
775
|
-
|
|
819
|
+
z(M(ne(v, O)), 1)
|
|
776
820
|
]),
|
|
777
821
|
_: 2
|
|
778
|
-
}, 1032, ["type", "effect"])) : v.type === "localDict" ? (s(),
|
|
822
|
+
}, 1032, ["type", "effect"])) : v.type === "localDict" ? (s(), f(Se, {
|
|
779
823
|
key: 11,
|
|
780
824
|
type: v.tagType || "info",
|
|
781
825
|
effect: v.tagEffect || "light",
|
|
782
826
|
class: "el-column-tag"
|
|
783
827
|
}, {
|
|
784
828
|
default: b(() => [
|
|
785
|
-
|
|
829
|
+
z(M(Y(
|
|
786
830
|
v,
|
|
787
|
-
|
|
831
|
+
O
|
|
788
832
|
)), 1)
|
|
789
833
|
]),
|
|
790
834
|
_: 2
|
|
791
|
-
}, 1032, ["type", "effect"])) : v.type === "tag" ? (s(),
|
|
835
|
+
}, 1032, ["type", "effect"])) : v.type === "tag" ? (s(), f(Se, {
|
|
792
836
|
key: 12,
|
|
793
837
|
type: v.tagType || "info",
|
|
794
838
|
effect: v.tagEffect || "light",
|
|
@@ -796,10 +840,10 @@ const Wt = (e) => {
|
|
|
796
840
|
plain: ""
|
|
797
841
|
}, {
|
|
798
842
|
default: b(() => [
|
|
799
|
-
|
|
843
|
+
z(M(O[v.prop]), 1)
|
|
800
844
|
]),
|
|
801
845
|
_: 2
|
|
802
|
-
}, 1032, ["type", "effect"])) : v.type === "tagArrayObj" ? (s(!0), T(
|
|
846
|
+
}, 1032, ["type", "effect"])) : v.type === "tagArrayObj" ? (s(!0), T(B, { key: 13 }, Q(O[v.prop], (ie) => (s(), f(Se, {
|
|
803
847
|
type: v.tagType || "info",
|
|
804
848
|
effect: v.tagEffect || "light",
|
|
805
849
|
class: "el-column-tag",
|
|
@@ -807,10 +851,10 @@ const Wt = (e) => {
|
|
|
807
851
|
plain: ""
|
|
808
852
|
}, {
|
|
809
853
|
default: b(() => [
|
|
810
|
-
|
|
854
|
+
z(M(ie[v.displayField]), 1)
|
|
811
855
|
]),
|
|
812
856
|
_: 2
|
|
813
|
-
}, 1032, ["type", "effect"]))), 128)) : v.type === "tags" ? (s(!0), T(
|
|
857
|
+
}, 1032, ["type", "effect"]))), 128)) : v.type === "tags" ? (s(!0), T(B, { key: 14 }, Q(O[v.prop], (ie) => (s(), f(Se, {
|
|
814
858
|
type: v.tagType || "info",
|
|
815
859
|
effect: v.tagEffect || "light",
|
|
816
860
|
class: "el-column-tag",
|
|
@@ -818,83 +862,83 @@ const Wt = (e) => {
|
|
|
818
862
|
plain: ""
|
|
819
863
|
}, {
|
|
820
864
|
default: b(() => [
|
|
821
|
-
|
|
865
|
+
z(M(ie[v.tagLabel]), 1)
|
|
822
866
|
]),
|
|
823
867
|
_: 2
|
|
824
|
-
}, 1032, ["type", "effect"]))), 128)) : v.type === "dictTag" || v.type === "commonDictTag" ? (s(),
|
|
868
|
+
}, 1032, ["type", "effect"]))), 128)) : v.type === "dictTag" || v.type === "commonDictTag" ? (s(), f(qa, {
|
|
825
869
|
key: 15,
|
|
826
870
|
options: v.data || [],
|
|
827
|
-
value:
|
|
828
|
-
}, null, 8, ["options", "value"])) : v.type === "dictText" || v.type === "commonDictText" ? (s(),
|
|
871
|
+
value: O[v.prop]
|
|
872
|
+
}, null, 8, ["options", "value"])) : v.type === "dictText" || v.type === "commonDictText" ? (s(), f(Qa, {
|
|
829
873
|
key: 16,
|
|
830
874
|
options: v.data || [],
|
|
831
|
-
value:
|
|
832
|
-
}, null, 8, ["options", "value"])) : v.type === "svg" ? (s(),
|
|
875
|
+
value: O[v.prop]
|
|
876
|
+
}, null, 8, ["options", "value"])) : v.type === "svg" ? (s(), f(Ga, {
|
|
833
877
|
key: 17,
|
|
834
|
-
"icon-class":
|
|
835
|
-
}, null, 8, ["icon-class"])) : v.type === "ossFile" ? (s(),
|
|
878
|
+
"icon-class": O.icon
|
|
879
|
+
}, null, 8, ["icon-class"])) : v.type === "ossFile" ? (s(), f(Pa, {
|
|
836
880
|
key: 18,
|
|
837
|
-
data:
|
|
881
|
+
data: O,
|
|
838
882
|
width: 32,
|
|
839
883
|
height: 32
|
|
840
|
-
}, null, 8, ["data"])) : (s(), T(
|
|
841
|
-
|
|
884
|
+
}, null, 8, ["data"])) : (s(), T(B, { key: 19 }, [
|
|
885
|
+
z(M(me(O, v)), 1)
|
|
842
886
|
], 64))
|
|
843
887
|
]),
|
|
844
888
|
_: 2
|
|
845
889
|
}, 1032, ["label", "width", "min-width", "prop", "align", "sortable", "show-overflow-tooltip", "fixed"])) : Z("", !0)
|
|
846
890
|
], 64))), 128)),
|
|
847
|
-
|
|
891
|
+
o(d).length > 0 ? (s(), f(ae, {
|
|
848
892
|
key: 2,
|
|
849
893
|
align: "center",
|
|
850
894
|
fixed: "right",
|
|
851
895
|
label: w.$t("操作"),
|
|
852
|
-
width:
|
|
896
|
+
width: o(A)
|
|
853
897
|
}, {
|
|
854
898
|
default: b(({ row: v }) => [
|
|
855
|
-
(s(!0), T(
|
|
856
|
-
content:
|
|
899
|
+
(s(!0), T(B, null, Q(o(d), (O) => (s(), f(Ja, {
|
|
900
|
+
content: O.text,
|
|
857
901
|
placement: "top",
|
|
858
|
-
key:
|
|
902
|
+
key: O.action
|
|
859
903
|
}, {
|
|
860
904
|
default: b(() => [
|
|
861
|
-
|
|
862
|
-
|
|
905
|
+
N(v, O) ? (s(), T(B, { key: 0 }, [
|
|
906
|
+
O.action === "update" ? de((s(), f(Ce, {
|
|
863
907
|
key: 0,
|
|
864
908
|
link: "",
|
|
865
909
|
type: "primary",
|
|
866
910
|
icon: "Edit",
|
|
867
|
-
onClick: (ie) => u(
|
|
868
|
-
disabled: G(v,
|
|
911
|
+
onClick: (ie) => u(O, v),
|
|
912
|
+
disabled: G(v, O)
|
|
869
913
|
}, null, 8, ["onClick", "disabled"])), [
|
|
870
|
-
[Te,
|
|
871
|
-
]) :
|
|
914
|
+
[Te, O.permission || null]
|
|
915
|
+
]) : O.action === "delete" ? de((s(), f(Ce, {
|
|
872
916
|
key: 1,
|
|
873
917
|
link: "",
|
|
874
918
|
type: "primary",
|
|
875
919
|
icon: "Delete",
|
|
876
|
-
onClick: (ie) => u(
|
|
877
|
-
disabled: G(v,
|
|
920
|
+
onClick: (ie) => u(O, v),
|
|
921
|
+
disabled: G(v, O)
|
|
878
922
|
}, null, 8, ["onClick", "disabled"])), [
|
|
879
|
-
[Te,
|
|
880
|
-
]) :
|
|
923
|
+
[Te, O.permission || null]
|
|
924
|
+
]) : O.action === "view" || O.action === "viewDetail" ? de((s(), f(Ce, {
|
|
881
925
|
key: 2,
|
|
882
926
|
link: "",
|
|
883
927
|
type: "primary",
|
|
884
928
|
icon: "View",
|
|
885
|
-
onClick: (ie) => u(
|
|
886
|
-
disabled: G(v,
|
|
929
|
+
onClick: (ie) => u(O, v),
|
|
930
|
+
disabled: G(v, O)
|
|
887
931
|
}, null, 8, ["onClick", "disabled"])), [
|
|
888
|
-
[Te,
|
|
889
|
-
]) : de((s(),
|
|
932
|
+
[Te, O.permission || null]
|
|
933
|
+
]) : de((s(), f(Ce, {
|
|
890
934
|
key: 3,
|
|
891
935
|
link: "",
|
|
892
936
|
type: "primary",
|
|
893
|
-
icon:
|
|
894
|
-
onClick: (ie) => u(
|
|
895
|
-
disabled: G(v,
|
|
937
|
+
icon: O.icon,
|
|
938
|
+
onClick: (ie) => u(O, v),
|
|
939
|
+
disabled: G(v, O)
|
|
896
940
|
}, null, 8, ["icon", "onClick", "disabled"])), [
|
|
897
|
-
[Te,
|
|
941
|
+
[Te, O.permission || null]
|
|
898
942
|
])
|
|
899
943
|
], 64)) : Z("", !0)
|
|
900
944
|
]),
|
|
@@ -906,28 +950,28 @@ const Wt = (e) => {
|
|
|
906
950
|
]),
|
|
907
951
|
_: 3
|
|
908
952
|
}, 8, ["data", "row-key", "element-loading-text", "tree-props", "default-sort", "onSortChange", "default-expand-all", "max-height"])), [
|
|
909
|
-
[
|
|
953
|
+
[et, o(V)]
|
|
910
954
|
]),
|
|
911
|
-
|
|
955
|
+
r.dataSource.paging !== !1 ? (s(), f(Za, {
|
|
912
956
|
key: 0,
|
|
913
957
|
class: "paging",
|
|
914
958
|
background: "",
|
|
915
|
-
layout:
|
|
916
|
-
onSizeChange:
|
|
917
|
-
onCurrentChange:
|
|
918
|
-
"page-size":
|
|
919
|
-
"current-page":
|
|
920
|
-
"onUpdate:currentPage":
|
|
921
|
-
total:
|
|
922
|
-
"page-sizes":
|
|
959
|
+
layout: o(H),
|
|
960
|
+
onSizeChange: o(ee),
|
|
961
|
+
onCurrentChange: o(X),
|
|
962
|
+
"page-size": o(j).pageSize,
|
|
963
|
+
"current-page": o(j).pageNum,
|
|
964
|
+
"onUpdate:currentPage": K[1] || (K[1] = (v) => o(j).pageNum = v),
|
|
965
|
+
total: o(j).total,
|
|
966
|
+
"page-sizes": o(D)
|
|
923
967
|
}, null, 8, ["layout", "onSizeChange", "onCurrentChange", "page-size", "current-page", "total", "page-sizes"])) : Z("", !0)
|
|
924
968
|
]);
|
|
925
969
|
};
|
|
926
970
|
}
|
|
927
|
-
}),
|
|
971
|
+
}), oa = /* @__PURE__ */ be(tl, [["__scopeId", "data-v-082d5d56"]]), ll = { class: "upload-file" }, ol = {
|
|
928
972
|
key: 0,
|
|
929
973
|
class: "el-upload__tip"
|
|
930
|
-
},
|
|
974
|
+
}, rl = { style: { color: "#f56c6c" } }, nl = { style: { color: "#f56c6c" } }, sl = { class: "el-icon-document" }, cl = { class: "ele-upload-list__item-content-action" }, ul = /* @__PURE__ */ pe({
|
|
931
975
|
__name: "index",
|
|
932
976
|
props: {
|
|
933
977
|
modelValue: [String, Object, Array],
|
|
@@ -944,111 +988,111 @@ const Wt = (e) => {
|
|
|
944
988
|
},
|
|
945
989
|
emits: ["update:modelValue"],
|
|
946
990
|
setup(e, { emit: l }) {
|
|
947
|
-
const t = e, { proxy: a } = he(), c = l,
|
|
991
|
+
const t = e, { proxy: a } = he(), c = l, r = x(0), i = x([]), y = Qe(), h = x(y + "/resource/oss/upload"), V = x(qe()), p = x([]), j = J(
|
|
948
992
|
() => t.showTip && (t.fileType || t.fileSize)
|
|
949
|
-
), D =
|
|
993
|
+
), D = x();
|
|
950
994
|
Ve(() => t.modelValue, async (E) => {
|
|
951
995
|
if (E) {
|
|
952
996
|
if (!t.showFileList) return;
|
|
953
|
-
let
|
|
954
|
-
Array.isArray(E) ? W = E : W = (await
|
|
997
|
+
let P = 1, W = [];
|
|
998
|
+
Array.isArray(E) ? W = E : W = (await Ge(E)).data.map((d) => ({ name: d.originalName, url: d.url, ossId: d.ossId })), p.value = W.map((S) => (S = { name: S.name, url: S.url, ossId: S.ossId }, S.uid = S.uid || (/* @__PURE__ */ new Date()).getTime() + P++, S));
|
|
955
999
|
} else
|
|
956
1000
|
return p.value = [], [];
|
|
957
1001
|
}, { deep: !0, immediate: !0 });
|
|
958
|
-
const
|
|
1002
|
+
const H = (E) => {
|
|
959
1003
|
if (t.fileType.length) {
|
|
960
|
-
const
|
|
1004
|
+
const P = E.name.split("."), W = P[P.length - 1];
|
|
961
1005
|
if (!(t.fileType.indexOf(W) >= 0))
|
|
962
1006
|
return a == null || a.$modal.msgError(`文件格式不正確, 請上傳${t.fileType.join("/")}格式文件!`), !1;
|
|
963
1007
|
}
|
|
964
|
-
return t.fileSize && !(E.size / 1024 / 1024 < t.fileSize) ? (a == null || a.$modal.msgError(`上傳文件大小不超過 ${t.fileSize} MB!`), !1) : (a == null || a.$modal.loading("正在上傳文件,請稍等..."),
|
|
965
|
-
},
|
|
1008
|
+
return t.fileSize && !(E.size / 1024 / 1024 < t.fileSize) ? (a == null || a.$modal.msgError(`上傳文件大小不超過 ${t.fileSize} MB!`), !1) : (a == null || a.$modal.loading("正在上傳文件,請稍等..."), r.value++, !0);
|
|
1009
|
+
}, I = () => {
|
|
966
1010
|
a == null || a.$modal.msgError(`上傳文件數量不能超過 ${t.limit} 个!`);
|
|
967
|
-
},
|
|
1011
|
+
}, F = () => {
|
|
968
1012
|
a == null || a.$modal.msgError("上傳文件失敗");
|
|
969
|
-
}, X = (E,
|
|
1013
|
+
}, X = (E, P) => {
|
|
970
1014
|
var W;
|
|
971
|
-
E.code === 200 ? (i.value.push({ name: E.data.fileName, url: E.data.url, ossId: E.data.ossId }), $()) : (
|
|
1015
|
+
E.code === 200 ? (i.value.push({ name: E.data.fileName, url: E.data.url, ossId: E.data.ossId }), $()) : (r.value--, a == null || a.$modal.closeLoading(), a == null || a.$modal.msgError(E.msg), (W = D.value) == null || W.handleRemove(P), $());
|
|
972
1016
|
}, ee = (E) => {
|
|
973
|
-
const
|
|
974
|
-
|
|
1017
|
+
const P = p.value[E].ossId;
|
|
1018
|
+
Ua(P), p.value.splice(E, 1), c("update:modelValue", k(p.value));
|
|
975
1019
|
}, $ = () => {
|
|
976
|
-
|
|
977
|
-
}, U = (E) => E.lastIndexOf("/") > -1 ? E.slice(E.lastIndexOf("/") + 1) : E, k = (E,
|
|
1020
|
+
r.value > 0 && i.value.length === r.value && (p.value = p.value.filter((E) => E.url !== void 0).concat(i.value), i.value = [], r.value = 0, c("update:modelValue", k(p.value)), a == null || a.$modal.closeLoading());
|
|
1021
|
+
}, U = (E) => E.lastIndexOf("/") > -1 ? E.slice(E.lastIndexOf("/") + 1) : E, k = (E, P) => {
|
|
978
1022
|
let W = "";
|
|
979
|
-
return
|
|
980
|
-
S.ossId && (W += S.ossId +
|
|
1023
|
+
return P = P || ",", E.forEach((S) => {
|
|
1024
|
+
S.ossId && (W += S.ossId + P);
|
|
981
1025
|
}), W != "" ? W.substring(0, W.length - 1) : "";
|
|
982
1026
|
};
|
|
983
|
-
return (E,
|
|
984
|
-
const W = De, S =
|
|
985
|
-
return s(), T("div",
|
|
986
|
-
|
|
1027
|
+
return (E, P) => {
|
|
1028
|
+
const W = De, S = je, d = nt;
|
|
1029
|
+
return s(), T("div", ll, [
|
|
1030
|
+
R(S, {
|
|
987
1031
|
multiple: "",
|
|
988
|
-
action:
|
|
989
|
-
"before-upload":
|
|
990
|
-
"file-list":
|
|
1032
|
+
action: o(h),
|
|
1033
|
+
"before-upload": H,
|
|
1034
|
+
"file-list": o(p),
|
|
991
1035
|
limit: e.limit,
|
|
992
|
-
"on-error":
|
|
993
|
-
"on-exceed":
|
|
1036
|
+
"on-error": F,
|
|
1037
|
+
"on-exceed": I,
|
|
994
1038
|
"on-success": X,
|
|
995
1039
|
"show-file-list": !1,
|
|
996
|
-
headers:
|
|
1040
|
+
headers: o(V),
|
|
997
1041
|
class: "upload-file-uploader",
|
|
998
1042
|
ref_key: "fileUploadRef",
|
|
999
1043
|
ref: D
|
|
1000
1044
|
}, {
|
|
1001
1045
|
default: b(() => [
|
|
1002
|
-
|
|
1003
|
-
default: b(() =>
|
|
1004
|
-
|
|
1046
|
+
R(W, { type: "primary" }, {
|
|
1047
|
+
default: b(() => P[0] || (P[0] = [
|
|
1048
|
+
z("选取文件")
|
|
1005
1049
|
])),
|
|
1006
1050
|
_: 1
|
|
1007
1051
|
})
|
|
1008
1052
|
]),
|
|
1009
1053
|
_: 1
|
|
1010
1054
|
}, 8, ["action", "file-list", "limit", "headers"]),
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
e.fileSize ? (s(), T(
|
|
1014
|
-
|
|
1015
|
-
re("b",
|
|
1055
|
+
o(j) ? (s(), T("div", ol, [
|
|
1056
|
+
P[3] || (P[3] = z(" 請上傳 ")),
|
|
1057
|
+
e.fileSize ? (s(), T(B, { key: 0 }, [
|
|
1058
|
+
P[1] || (P[1] = z(" 大小不超過 ")),
|
|
1059
|
+
re("b", rl, M(e.fileSize) + "MB", 1)
|
|
1016
1060
|
], 64)) : Z("", !0),
|
|
1017
|
-
e.fileType ? (s(), T(
|
|
1018
|
-
|
|
1019
|
-
re("b",
|
|
1061
|
+
e.fileType ? (s(), T(B, { key: 1 }, [
|
|
1062
|
+
P[2] || (P[2] = z(" 格式為 ")),
|
|
1063
|
+
re("b", nl, M(e.fileType.join("/")), 1)
|
|
1020
1064
|
], 64)) : Z("", !0),
|
|
1021
|
-
|
|
1065
|
+
P[4] || (P[4] = z(" 的文件 "))
|
|
1022
1066
|
])) : Z("", !0),
|
|
1023
|
-
e.showFileList ? (s(),
|
|
1067
|
+
e.showFileList ? (s(), f(ft, {
|
|
1024
1068
|
key: 1,
|
|
1025
1069
|
class: "upload-file-list el-upload-list el-upload-list--text",
|
|
1026
1070
|
name: "el-fade-in-linear",
|
|
1027
1071
|
tag: "ul"
|
|
1028
1072
|
}, {
|
|
1029
1073
|
default: b(() => [
|
|
1030
|
-
(s(!0), T(
|
|
1074
|
+
(s(!0), T(B, null, Q(o(p), (C, A) => (s(), T("li", {
|
|
1031
1075
|
key: C.uid,
|
|
1032
1076
|
class: "el-upload-list__item ele-upload-list__item-content"
|
|
1033
1077
|
}, [
|
|
1034
|
-
|
|
1078
|
+
R(d, {
|
|
1035
1079
|
href: `${C.url}`,
|
|
1036
1080
|
underline: !1,
|
|
1037
1081
|
target: "_blank"
|
|
1038
1082
|
}, {
|
|
1039
1083
|
default: b(() => [
|
|
1040
|
-
re("span",
|
|
1084
|
+
re("span", sl, M(U(C.name)), 1)
|
|
1041
1085
|
]),
|
|
1042
1086
|
_: 2
|
|
1043
1087
|
}, 1032, ["href"]),
|
|
1044
|
-
re("div",
|
|
1045
|
-
|
|
1088
|
+
re("div", cl, [
|
|
1089
|
+
R(d, {
|
|
1046
1090
|
underline: !1,
|
|
1047
|
-
onClick: (
|
|
1091
|
+
onClick: (N) => ee(A),
|
|
1048
1092
|
type: "danger"
|
|
1049
1093
|
}, {
|
|
1050
|
-
default: b(() =>
|
|
1051
|
-
|
|
1094
|
+
default: b(() => P[5] || (P[5] = [
|
|
1095
|
+
z("删除")
|
|
1052
1096
|
])),
|
|
1053
1097
|
_: 2
|
|
1054
1098
|
}, 1032, ["onClick"])
|
|
@@ -1060,10 +1104,10 @@ const Wt = (e) => {
|
|
|
1060
1104
|
]);
|
|
1061
1105
|
};
|
|
1062
1106
|
}
|
|
1063
|
-
}),
|
|
1107
|
+
}), za = /* @__PURE__ */ be(ul, [["__scopeId", "data-v-027e6121"]]), il = {
|
|
1064
1108
|
key: 0,
|
|
1065
1109
|
class: "el-upload__tip"
|
|
1066
|
-
},
|
|
1110
|
+
}, dl = { style: { color: "#f56c6c" } }, pl = { style: { color: "#f56c6c" } }, fl = { style: { color: "#f56c6c" } }, hl = ["src"], ml = /* @__PURE__ */ pe({
|
|
1067
1111
|
__name: "index",
|
|
1068
1112
|
props: {
|
|
1069
1113
|
modelValue: {
|
|
@@ -1095,16 +1139,16 @@ const Wt = (e) => {
|
|
|
1095
1139
|
},
|
|
1096
1140
|
emits: ["update:modelValue"],
|
|
1097
1141
|
setup(e, { emit: l }) {
|
|
1098
|
-
|
|
1142
|
+
ht((S) => ({
|
|
1099
1143
|
"9d14746a": t.height
|
|
1100
1144
|
}));
|
|
1101
|
-
const t = e, { proxy: a } = he(), c = l,
|
|
1145
|
+
const t = e, { proxy: a } = he(), c = l, r = x(0), i = x([]), y = x(""), h = x(!1), V = Qe(), p = x(V + "/resource/oss/upload"), j = x(qe()), D = x([]), H = J(() => t.isShowTip && (t.fileType || t.fileSize || t.imageSize)), I = x(), F = J(() => t.fileType.map((S) => `.${S}`).join(","));
|
|
1102
1146
|
Ve(
|
|
1103
1147
|
() => t.modelValue,
|
|
1104
1148
|
async (S) => {
|
|
1105
1149
|
if (S) {
|
|
1106
1150
|
let d = [];
|
|
1107
|
-
Array.isArray(S) ? d = S : d = (await
|
|
1151
|
+
Array.isArray(S) ? d = S : d = (await Ge(S)).data, D.value = d.map((C) => {
|
|
1108
1152
|
let A;
|
|
1109
1153
|
return typeof C == "string" ? A = { name: C, url: C } : A = { name: C.ossId, url: C.url, ossId: C.ossId }, A;
|
|
1110
1154
|
});
|
|
@@ -1127,26 +1171,26 @@ const Wt = (e) => {
|
|
|
1127
1171
|
if (t.fileSize && !(S.size / 1024 / 1024 < t.fileSize))
|
|
1128
1172
|
return a == null || a.$modal.msgError(`上傳圖片大小不能超過 ${t.fileSize} MB!`), !1;
|
|
1129
1173
|
if (t.compressSupport && S.size / 1024 > t.compressTargetSize)
|
|
1130
|
-
return a == null || a.$modal.loading("正在上傳圖片,請稍候..."),
|
|
1131
|
-
a == null || a.$modal.loading("正在上傳圖片,請稍候..."),
|
|
1174
|
+
return a == null || a.$modal.loading("正在上傳圖片,請稍候..."), r.value++, kt(S, t.compressTargetSize);
|
|
1175
|
+
a == null || a.$modal.loading("正在上傳圖片,請稍候..."), r.value++;
|
|
1132
1176
|
}, ee = () => {
|
|
1133
1177
|
a == null || a.$modal.msgError(`上傳文件數量不能超過 ${t.limit} 個!`);
|
|
1134
1178
|
}, $ = (S, d) => {
|
|
1135
1179
|
var C;
|
|
1136
|
-
S.code === 200 ? (i.value.push({ name: S.data.fileName, url: S.data.url, ossId: S.data.ossId }), k()) : (
|
|
1180
|
+
S.code === 200 ? (i.value.push({ name: S.data.fileName, url: S.data.url, ossId: S.data.ossId }), k()) : (r.value--, a == null || a.$modal.closeLoading(), a == null || a.$modal.msgError(S.msg), (C = I.value) == null || C.handleRemove(d), k());
|
|
1137
1181
|
}, U = (S) => {
|
|
1138
1182
|
const d = D.value.map((C) => C.name).indexOf(S.name);
|
|
1139
|
-
if (d > -1 && i.value.length ===
|
|
1183
|
+
if (d > -1 && i.value.length === r.value) {
|
|
1140
1184
|
const C = D.value[d].ossId;
|
|
1141
|
-
return
|
|
1185
|
+
return Ua(C), D.value.splice(d, 1), c("update:modelValue", W(D.value)), !1;
|
|
1142
1186
|
}
|
|
1143
1187
|
return !0;
|
|
1144
1188
|
}, k = () => {
|
|
1145
|
-
|
|
1189
|
+
r.value > 0 && i.value.length === r.value && (D.value = D.value.filter((S) => S.url !== void 0).concat(i.value), i.value = [], r.value = 0, c("update:modelValue", W(D.value)), a == null || a.$modal.closeLoading());
|
|
1146
1190
|
}, E = () => {
|
|
1147
1191
|
a == null || a.$modal.msgError("上傳圖片失敗"), a == null || a.$modal.closeLoading();
|
|
1148
|
-
},
|
|
1149
|
-
y.value = S.url,
|
|
1192
|
+
}, P = (S) => {
|
|
1193
|
+
y.value = S.url, h.value = !0;
|
|
1150
1194
|
}, W = (S, d) => {
|
|
1151
1195
|
let C = "";
|
|
1152
1196
|
d = d || ",";
|
|
@@ -1155,178 +1199,178 @@ const Wt = (e) => {
|
|
|
1155
1199
|
return C != "" ? C.substring(0, C.length - 1) : "";
|
|
1156
1200
|
};
|
|
1157
1201
|
return (S, d) => {
|
|
1158
|
-
const C =
|
|
1202
|
+
const C = mt("plus"), A = Pe, N = je, G = fa;
|
|
1159
1203
|
return s(), T("div", null, [
|
|
1160
|
-
|
|
1204
|
+
R(N, {
|
|
1161
1205
|
ref_key: "imageUploadRef",
|
|
1162
|
-
ref:
|
|
1206
|
+
ref: I,
|
|
1163
1207
|
multiple: "",
|
|
1164
|
-
action:
|
|
1208
|
+
action: o(p),
|
|
1165
1209
|
"list-type": "picture-card",
|
|
1166
1210
|
"on-success": $,
|
|
1167
1211
|
"before-upload": X,
|
|
1168
1212
|
limit: e.limit,
|
|
1169
|
-
accept:
|
|
1213
|
+
accept: o(F),
|
|
1170
1214
|
"on-error": E,
|
|
1171
1215
|
"on-exceed": ee,
|
|
1172
1216
|
"before-remove": U,
|
|
1173
1217
|
"show-file-list": !0,
|
|
1174
|
-
headers:
|
|
1175
|
-
"file-list":
|
|
1176
|
-
"on-preview":
|
|
1177
|
-
class:
|
|
1218
|
+
headers: o(j),
|
|
1219
|
+
"file-list": o(D),
|
|
1220
|
+
"on-preview": P,
|
|
1221
|
+
class: Fe({ hide: o(D).length >= e.limit })
|
|
1178
1222
|
}, {
|
|
1179
1223
|
default: b(() => [
|
|
1180
|
-
|
|
1224
|
+
R(A, { class: "avatar-uploader-icon" }, {
|
|
1181
1225
|
default: b(() => [
|
|
1182
|
-
|
|
1226
|
+
R(C)
|
|
1183
1227
|
]),
|
|
1184
1228
|
_: 1
|
|
1185
1229
|
})
|
|
1186
1230
|
]),
|
|
1187
1231
|
_: 1
|
|
1188
1232
|
}, 8, ["action", "limit", "accept", "headers", "file-list", "class"]),
|
|
1189
|
-
|
|
1190
|
-
d[4] || (d[4] =
|
|
1191
|
-
e.fileSize ? (s(), T(
|
|
1192
|
-
d[1] || (d[1] =
|
|
1193
|
-
re("b",
|
|
1233
|
+
o(H) ? (s(), T("div", il, [
|
|
1234
|
+
d[4] || (d[4] = z(" 請上傳 ")),
|
|
1235
|
+
e.fileSize ? (s(), T(B, { key: 0 }, [
|
|
1236
|
+
d[1] || (d[1] = z(" 大小不超過 ")),
|
|
1237
|
+
re("b", dl, M(e.fileSize) + "MB", 1)
|
|
1194
1238
|
], 64)) : Z("", !0),
|
|
1195
|
-
e.fileType ? (s(), T(
|
|
1196
|
-
e.fileSize ? (s(), T(
|
|
1197
|
-
|
|
1239
|
+
e.fileType ? (s(), T(B, { key: 1 }, [
|
|
1240
|
+
e.fileSize ? (s(), T(B, { key: 0 }, [
|
|
1241
|
+
z("、")
|
|
1198
1242
|
], 64)) : Z("", !0),
|
|
1199
|
-
d[2] || (d[2] =
|
|
1200
|
-
re("b",
|
|
1243
|
+
d[2] || (d[2] = z("格式為 ")),
|
|
1244
|
+
re("b", pl, M(e.fileType.join("/")), 1)
|
|
1201
1245
|
], 64)) : Z("", !0),
|
|
1202
|
-
e.imageSize ? (s(), T(
|
|
1203
|
-
e.fileSize || e.fileType ? (s(), T(
|
|
1204
|
-
|
|
1246
|
+
e.imageSize ? (s(), T(B, { key: 2 }, [
|
|
1247
|
+
e.fileSize || e.fileType ? (s(), T(B, { key: 0 }, [
|
|
1248
|
+
z("。")
|
|
1205
1249
|
], 64)) : Z("", !0),
|
|
1206
|
-
d[3] || (d[3] =
|
|
1207
|
-
re("b",
|
|
1250
|
+
d[3] || (d[3] = z("建議尺寸 ")),
|
|
1251
|
+
re("b", fl, M(e.imageSize), 1)
|
|
1208
1252
|
], 64)) : Z("", !0),
|
|
1209
|
-
d[5] || (d[5] =
|
|
1253
|
+
d[5] || (d[5] = z(" 的文件 "))
|
|
1210
1254
|
])) : Z("", !0),
|
|
1211
|
-
|
|
1212
|
-
modelValue:
|
|
1213
|
-
"onUpdate:modelValue": d[0] || (d[0] = (se) => $e(
|
|
1255
|
+
R(G, {
|
|
1256
|
+
modelValue: o(h),
|
|
1257
|
+
"onUpdate:modelValue": d[0] || (d[0] = (se) => $e(h) ? h.value = se : null),
|
|
1214
1258
|
title: "預覽",
|
|
1215
1259
|
width: "800px",
|
|
1216
1260
|
"append-to-body": ""
|
|
1217
1261
|
}, {
|
|
1218
1262
|
default: b(() => [
|
|
1219
1263
|
re("img", {
|
|
1220
|
-
src:
|
|
1264
|
+
src: o(y),
|
|
1221
1265
|
style: { display: "block", "max-width": "100%", margin: "0 auto" }
|
|
1222
|
-
}, null, 8,
|
|
1266
|
+
}, null, 8, hl)
|
|
1223
1267
|
]),
|
|
1224
1268
|
_: 1
|
|
1225
1269
|
}, 8, ["modelValue"])
|
|
1226
1270
|
]);
|
|
1227
1271
|
};
|
|
1228
1272
|
}
|
|
1229
|
-
}),
|
|
1273
|
+
}), Ba = /* @__PURE__ */ be(ml, [["__scopeId", "data-v-c17cf859"]]), yl = (e) => ke()({
|
|
1230
1274
|
url: "/app/translation/getByName",
|
|
1231
1275
|
method: "post",
|
|
1232
1276
|
headers: {
|
|
1233
1277
|
repeatSubmit: !1
|
|
1234
1278
|
},
|
|
1235
1279
|
data: { name: e }
|
|
1236
|
-
}),
|
|
1280
|
+
}), gl = (e) => ke()({
|
|
1237
1281
|
url: "/app/translation/batchAdd",
|
|
1238
1282
|
method: "post",
|
|
1239
1283
|
data: e
|
|
1240
|
-
}),
|
|
1241
|
-
const e =
|
|
1284
|
+
}), ra = $a("translation", () => {
|
|
1285
|
+
const e = x([]);
|
|
1242
1286
|
return {
|
|
1243
1287
|
translation: e,
|
|
1244
1288
|
getTranslation: (c) => {
|
|
1245
1289
|
if (c == null && c == "")
|
|
1246
1290
|
return null;
|
|
1247
1291
|
try {
|
|
1248
|
-
for (let
|
|
1249
|
-
if (e.value[
|
|
1250
|
-
return e.value[
|
|
1292
|
+
for (let r = 0; r < e.value.length; r++)
|
|
1293
|
+
if (e.value[r].key == c)
|
|
1294
|
+
return e.value[r].value;
|
|
1251
1295
|
} catch {
|
|
1252
1296
|
return null;
|
|
1253
1297
|
}
|
|
1254
1298
|
return null;
|
|
1255
1299
|
},
|
|
1256
|
-
setTranslation: (c,
|
|
1300
|
+
setTranslation: (c, r) => {
|
|
1257
1301
|
c !== null && c !== "" && e.value.push({
|
|
1258
1302
|
key: c,
|
|
1259
|
-
value:
|
|
1303
|
+
value: r
|
|
1260
1304
|
});
|
|
1261
1305
|
},
|
|
1262
1306
|
clearTranslation: () => {
|
|
1263
1307
|
e.value = [];
|
|
1264
1308
|
}
|
|
1265
1309
|
};
|
|
1266
|
-
}),
|
|
1267
|
-
const l =
|
|
1310
|
+
}), bl = async (e) => {
|
|
1311
|
+
const l = x({}), t = ra().getTranslation(e);
|
|
1268
1312
|
if (t)
|
|
1269
1313
|
l.value[e] = t;
|
|
1270
1314
|
else {
|
|
1271
|
-
const { data: a } = await
|
|
1272
|
-
l.value[e] = a,
|
|
1315
|
+
const { data: a } = await yl(e);
|
|
1316
|
+
l.value[e] = a, ra().setTranslation(e, a);
|
|
1273
1317
|
}
|
|
1274
1318
|
return l.value;
|
|
1275
|
-
},
|
|
1319
|
+
}, vl = { style: { width: "100%" } }, kl = { style: { "margin-bottom": "2px" } }, Ya = /* @__PURE__ */ pe({
|
|
1276
1320
|
__name: "index",
|
|
1277
1321
|
props: ["modelValue", "placeholder", "disabled", "type", "rows", "showWordLimit", "maxlength"],
|
|
1278
1322
|
emits: ["update:modelValue", "focus"],
|
|
1279
1323
|
setup(e, { expose: l, emit: t }) {
|
|
1280
|
-
const a = t, c = e,
|
|
1281
|
-
|
|
1282
|
-
}, V = async (
|
|
1283
|
-
|
|
1324
|
+
const a = t, c = e, r = x([{ name: "繁體", id: "zhHk", selected: !0, text: "" }, { name: "簡體", id: "zhCn", selected: !1, text: "" }, { name: "英文", id: "enUs", selected: !1, text: "" }]), i = x(!1), y = x(!1), h = (I, F) => {
|
|
1325
|
+
I.text = F, I.id == "zhHk" && a("update:modelValue", F);
|
|
1326
|
+
}, V = async (I) => {
|
|
1327
|
+
I.id == "zhHk" && await p();
|
|
1284
1328
|
}, p = async () => {
|
|
1285
1329
|
if (i.value) return;
|
|
1286
|
-
const
|
|
1287
|
-
if (
|
|
1330
|
+
const I = r.value[0].text;
|
|
1331
|
+
if (I != "") {
|
|
1288
1332
|
i.value = !0;
|
|
1289
|
-
const
|
|
1290
|
-
if (i.value = !1,
|
|
1291
|
-
for (let X = 0; X <
|
|
1292
|
-
if (!
|
|
1293
|
-
const ee =
|
|
1294
|
-
ee.text =
|
|
1333
|
+
const F = await bl(I);
|
|
1334
|
+
if (i.value = !1, F[I] != null) {
|
|
1335
|
+
for (let X = 0; X < r.value.length; X++)
|
|
1336
|
+
if (!r.value[X].text) {
|
|
1337
|
+
const ee = r.value[X];
|
|
1338
|
+
ee.text = F[I][ee.id];
|
|
1295
1339
|
}
|
|
1296
1340
|
}
|
|
1297
1341
|
}
|
|
1298
|
-
},
|
|
1299
|
-
|
|
1342
|
+
}, j = async (I) => {
|
|
1343
|
+
r.value.map((F) => F.selected = !1), I.selected = !0;
|
|
1300
1344
|
}, D = () => {
|
|
1301
|
-
const
|
|
1302
|
-
return
|
|
1303
|
-
},
|
|
1304
|
-
return Ve(() => c.modelValue, (
|
|
1305
|
-
if (
|
|
1306
|
-
const
|
|
1307
|
-
|
|
1345
|
+
const I = { name: r.value[0].text };
|
|
1346
|
+
return r.value.forEach((F) => I[F.id] = F.text), I;
|
|
1347
|
+
}, H = () => a("focus");
|
|
1348
|
+
return Ve(() => c.modelValue, (I) => {
|
|
1349
|
+
if (I) {
|
|
1350
|
+
const F = r.value.filter((X) => X.selected)[0];
|
|
1351
|
+
F.text = I, y.value || p(), y.value = !0;
|
|
1308
1352
|
}
|
|
1309
1353
|
}, {
|
|
1310
1354
|
immediate: !0,
|
|
1311
1355
|
deep: !0
|
|
1312
|
-
}), l({ getTranslate: D }), (
|
|
1313
|
-
const X = De, ee =
|
|
1314
|
-
return s(), T("div",
|
|
1315
|
-
re("div",
|
|
1316
|
-
(s(!0), T(
|
|
1356
|
+
}), l({ getTranslate: D }), (I, F) => {
|
|
1357
|
+
const X = De, ee = He;
|
|
1358
|
+
return s(), T("div", vl, [
|
|
1359
|
+
re("div", kl, [
|
|
1360
|
+
(s(!0), T(B, null, Q(o(r), ($) => (s(), f(X, {
|
|
1317
1361
|
size: "small",
|
|
1318
1362
|
key: $.id,
|
|
1319
1363
|
type: $.selected ? "primary" : "default",
|
|
1320
|
-
onClick: (U) =>
|
|
1364
|
+
onClick: (U) => j($),
|
|
1321
1365
|
style: { "margin-right": "-8px" }
|
|
1322
1366
|
}, {
|
|
1323
1367
|
default: b(() => [
|
|
1324
|
-
|
|
1368
|
+
z(M($.name), 1)
|
|
1325
1369
|
]),
|
|
1326
1370
|
_: 2
|
|
1327
1371
|
}, 1032, ["type", "onClick"]))), 128))
|
|
1328
1372
|
]),
|
|
1329
|
-
(s(!0), T(
|
|
1373
|
+
(s(!0), T(B, null, Q(o(r), ($) => de((s(), f(ee, {
|
|
1330
1374
|
key: $.id,
|
|
1331
1375
|
modelValue: $.text,
|
|
1332
1376
|
"onUpdate:modelValue": (U) => $.text = U,
|
|
@@ -1336,16 +1380,16 @@ const Wt = (e) => {
|
|
|
1336
1380
|
rows: c.rows,
|
|
1337
1381
|
"show-word-limit": c.showWordLimit,
|
|
1338
1382
|
maxlength: c.maxlength,
|
|
1339
|
-
onInput: (U) =>
|
|
1383
|
+
onInput: (U) => h($, U),
|
|
1340
1384
|
onBlur: (U) => V($),
|
|
1341
|
-
onFocus:
|
|
1385
|
+
onFocus: F[0] || (F[0] = (U) => H())
|
|
1342
1386
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "type", "placeholder", "disabled", "rows", "show-word-limit", "maxlength", "onInput", "onBlur"])), [
|
|
1343
|
-
[
|
|
1387
|
+
[yt, $.selected]
|
|
1344
1388
|
])), 128))
|
|
1345
1389
|
]);
|
|
1346
1390
|
};
|
|
1347
1391
|
}
|
|
1348
|
-
}),
|
|
1392
|
+
}), _l = { class: "editor" }, Ma = /* @__PURE__ */ pe({
|
|
1349
1393
|
__name: "index",
|
|
1350
1394
|
props: {
|
|
1351
1395
|
/* 编辑器的内容 */
|
|
@@ -1363,10 +1407,10 @@ const Wt = (e) => {
|
|
|
1363
1407
|
},
|
|
1364
1408
|
emits: ["update:modelValue"],
|
|
1365
1409
|
setup(e) {
|
|
1366
|
-
const l = e, { proxy: t } = he(), a =
|
|
1367
|
-
headers:
|
|
1368
|
-
url:
|
|
1369
|
-
}), c =
|
|
1410
|
+
const l = e, { proxy: t } = he(), a = gt({
|
|
1411
|
+
headers: qe(),
|
|
1412
|
+
url: Qe() + "/resource/oss/upload"
|
|
1413
|
+
}), c = x(), r = x(), i = x({
|
|
1370
1414
|
theme: "snow",
|
|
1371
1415
|
bounds: document.body,
|
|
1372
1416
|
debug: "warn",
|
|
@@ -1397,7 +1441,7 @@ const Wt = (e) => {
|
|
|
1397
1441
|
],
|
|
1398
1442
|
handlers: {
|
|
1399
1443
|
image: (D) => {
|
|
1400
|
-
D ?
|
|
1444
|
+
D ? r.value.click() : _t.format("image", !0);
|
|
1401
1445
|
}
|
|
1402
1446
|
}
|
|
1403
1447
|
}
|
|
@@ -1407,64 +1451,64 @@ const Wt = (e) => {
|
|
|
1407
1451
|
}), y = J(() => {
|
|
1408
1452
|
const D = {};
|
|
1409
1453
|
return l.minHeight && (D.minHeight = `${l.minHeight}px`), l.height && (D.height = `${l.height}px`), D;
|
|
1410
|
-
}),
|
|
1454
|
+
}), h = x("");
|
|
1411
1455
|
Ve(
|
|
1412
1456
|
() => l.modelValue,
|
|
1413
1457
|
(D) => {
|
|
1414
|
-
D !==
|
|
1458
|
+
D !== h.value && (h.value = D || "<p></p>");
|
|
1415
1459
|
},
|
|
1416
1460
|
{ immediate: !0 }
|
|
1417
1461
|
);
|
|
1418
1462
|
const V = (D) => {
|
|
1419
1463
|
if (D.code === 200) {
|
|
1420
|
-
const
|
|
1421
|
-
|
|
1464
|
+
const H = Ie(c.value).getQuill(), I = H.selection.savedRange.index;
|
|
1465
|
+
H.insertEmbed(I, "image", D.data.url), H.setSelection(I + 1), t == null || t.$modal.closeLoading();
|
|
1422
1466
|
} else
|
|
1423
1467
|
t == null || t.$modal.msgError("图片插入失败"), t == null || t.$modal.closeLoading();
|
|
1424
|
-
}, p = (D) => ["image/jpeg", "image/jpg", "image/png", "image/svg"].includes(D.type) ? l.fileSize && !(D.size / 1024 / 1024 < l.fileSize) ? (t == null || t.$modal.msgError(`上传文件大小不能超过 ${l.fileSize} MB!`), !1) : (t == null || t.$modal.loading("正在上传文件,请稍候..."), !0) : (t == null || t.$modal.msgError("图片格式错误!"), !1),
|
|
1468
|
+
}, p = (D) => ["image/jpeg", "image/jpg", "image/png", "image/svg"].includes(D.type) ? l.fileSize && !(D.size / 1024 / 1024 < l.fileSize) ? (t == null || t.$modal.msgError(`上传文件大小不能超过 ${l.fileSize} MB!`), !1) : (t == null || t.$modal.loading("正在上传文件,请稍候..."), !0) : (t == null || t.$modal.msgError("图片格式错误!"), !1), j = (D) => {
|
|
1425
1469
|
t == null || t.$modal.msgError("上传文件失败");
|
|
1426
1470
|
};
|
|
1427
|
-
return (D,
|
|
1428
|
-
const
|
|
1429
|
-
return s(), T(
|
|
1471
|
+
return (D, H) => {
|
|
1472
|
+
const I = je;
|
|
1473
|
+
return s(), T(B, null, [
|
|
1430
1474
|
re("div", null, [
|
|
1431
|
-
e.type === "url" ? (s(),
|
|
1475
|
+
e.type === "url" ? (s(), f(I, {
|
|
1432
1476
|
key: 0,
|
|
1433
|
-
action:
|
|
1477
|
+
action: o(a).url,
|
|
1434
1478
|
"before-upload": p,
|
|
1435
1479
|
"on-success": V,
|
|
1436
|
-
"on-error":
|
|
1480
|
+
"on-error": j,
|
|
1437
1481
|
class: "editor-img-uploader",
|
|
1438
1482
|
name: "file",
|
|
1439
1483
|
"show-file-list": !1,
|
|
1440
|
-
headers:
|
|
1484
|
+
headers: o(a).headers
|
|
1441
1485
|
}, {
|
|
1442
1486
|
default: b(() => [
|
|
1443
1487
|
re("i", {
|
|
1444
1488
|
ref_key: "uploadRef",
|
|
1445
|
-
ref:
|
|
1489
|
+
ref: r
|
|
1446
1490
|
}, null, 512)
|
|
1447
1491
|
]),
|
|
1448
1492
|
_: 1
|
|
1449
1493
|
}, 8, ["action", "headers"])) : Z("", !0)
|
|
1450
1494
|
]),
|
|
1451
|
-
re("div",
|
|
1452
|
-
|
|
1495
|
+
re("div", _l, [
|
|
1496
|
+
R(o(wt), {
|
|
1453
1497
|
ref_key: "quillEditorRef",
|
|
1454
1498
|
ref: c,
|
|
1455
|
-
content:
|
|
1456
|
-
"onUpdate:content":
|
|
1499
|
+
content: o(h),
|
|
1500
|
+
"onUpdate:content": H[0] || (H[0] = (F) => $e(h) ? h.value = F : null),
|
|
1457
1501
|
"content-type": "html",
|
|
1458
|
-
options:
|
|
1459
|
-
style: fe(
|
|
1460
|
-
onTextChange:
|
|
1502
|
+
options: o(i),
|
|
1503
|
+
style: fe(o(y)),
|
|
1504
|
+
onTextChange: H[1] || (H[1] = (F) => D.$emit("update:modelValue", o(h)))
|
|
1461
1505
|
}, null, 8, ["content", "options", "style"])
|
|
1462
1506
|
])
|
|
1463
1507
|
], 64);
|
|
1464
1508
|
};
|
|
1465
1509
|
}
|
|
1466
1510
|
});
|
|
1467
|
-
function
|
|
1511
|
+
function wl(e, l) {
|
|
1468
1512
|
if (arguments.length === 0 || !e)
|
|
1469
1513
|
return null;
|
|
1470
1514
|
const t = l || "{y}-{m}-{d} {h}:{i}:{s}";
|
|
@@ -1479,15 +1523,15 @@ function kl(e, l) {
|
|
|
1479
1523
|
s: a.getSeconds(),
|
|
1480
1524
|
a: a.getDay()
|
|
1481
1525
|
};
|
|
1482
|
-
return t.replace(/{(y|m|d|h|i|s|a)+}/g, (
|
|
1526
|
+
return t.replace(/{(y|m|d|h|i|s|a)+}/g, (r, i) => {
|
|
1483
1527
|
let y = c[i];
|
|
1484
|
-
return i === "a" ? ["日", "一", "二", "三", "四", "五", "六"][y] : (
|
|
1528
|
+
return i === "a" ? ["日", "一", "二", "三", "四", "五", "六"][y] : (r.length > 0 && y < 10 && (y = "0" + y), y || 0);
|
|
1485
1529
|
});
|
|
1486
1530
|
}
|
|
1487
|
-
const
|
|
1531
|
+
const Vl = (e, l, t) => {
|
|
1488
1532
|
const a = e;
|
|
1489
1533
|
return a.params = typeof a.params == "object" && a.params !== null && !Array.isArray(a.params) ? a.params : {}, l = Array.isArray(l) ? l : [], l[0] && l[0].length == 10 && (l[0] = l[0] + " 00:00:00", l[1] = l[1] + " 23:59:59"), typeof t > "u" ? (a.params.beginTime = l[0], a.params.endTime = l[1]) : (t = t.charAt(0).toUpperCase() + t.slice(1), a.params["begin" + t] = l[0], a.params["end" + t] = l[1]), a;
|
|
1490
|
-
},
|
|
1534
|
+
}, Sl = (e, l) => {
|
|
1491
1535
|
if (l === void 0)
|
|
1492
1536
|
return "";
|
|
1493
1537
|
const t = [];
|
|
@@ -1495,58 +1539,58 @@ const _l = (e, l, t) => {
|
|
|
1495
1539
|
if (e[a].value == "" + l)
|
|
1496
1540
|
return t.push(e[a].label), !0;
|
|
1497
1541
|
}), t.length === 0 && t.push(l), t.join("");
|
|
1498
|
-
},
|
|
1542
|
+
}, $l = (e, l, t) => {
|
|
1499
1543
|
if (l === void 0 || l.length === 0)
|
|
1500
1544
|
return "";
|
|
1501
1545
|
Array.isArray(l) && (l = l.join(","));
|
|
1502
|
-
const a = [], c = t === void 0 ? "," : t,
|
|
1546
|
+
const a = [], c = t === void 0 ? "," : t, r = l.split(c);
|
|
1503
1547
|
return Object.keys(l.split(c)).some((i) => {
|
|
1504
1548
|
let y = !1;
|
|
1505
|
-
Object.keys(e).some((
|
|
1506
|
-
e[
|
|
1507
|
-
}), y || a.push(
|
|
1549
|
+
Object.keys(e).some((h) => {
|
|
1550
|
+
e[h].value == "" + r[i] && (a.push(e[h].label + c), y = !0);
|
|
1551
|
+
}), y || a.push(r[i] + c);
|
|
1508
1552
|
}), a.join("").substring(0, a.join("").length - 1);
|
|
1509
|
-
},
|
|
1553
|
+
}, Dl = (e, l, t, a) => {
|
|
1510
1554
|
const c = {
|
|
1511
1555
|
id: l || "id",
|
|
1512
1556
|
parentId: t || "parentId",
|
|
1513
1557
|
childrenList: a || "children"
|
|
1514
|
-
},
|
|
1558
|
+
}, r = {}, i = [];
|
|
1515
1559
|
for (const y of e) {
|
|
1516
|
-
const
|
|
1517
|
-
|
|
1560
|
+
const h = y[c.id];
|
|
1561
|
+
r[h] = y, y[c.childrenList] || (y[c.childrenList] = []);
|
|
1518
1562
|
}
|
|
1519
1563
|
for (const y of e) {
|
|
1520
|
-
const
|
|
1564
|
+
const h = y[c.parentId], V = r[h];
|
|
1521
1565
|
V ? V[c.childrenList].push(y) : i.push(y);
|
|
1522
1566
|
}
|
|
1523
1567
|
return i;
|
|
1524
|
-
},
|
|
1568
|
+
}, Cl = (e) => {
|
|
1525
1569
|
let l = "";
|
|
1526
1570
|
for (const t of Object.keys(e)) {
|
|
1527
1571
|
const a = e[t], c = encodeURIComponent(t) + "=";
|
|
1528
1572
|
if (a !== null && a !== "" && typeof a < "u")
|
|
1529
1573
|
if (typeof a == "object") {
|
|
1530
|
-
for (const
|
|
1531
|
-
if (a[
|
|
1532
|
-
const i = t + "[" +
|
|
1533
|
-
l += y + encodeURIComponent(a[
|
|
1574
|
+
for (const r of Object.keys(a))
|
|
1575
|
+
if (a[r] !== null && a[r] !== "" && typeof a[r] < "u") {
|
|
1576
|
+
const i = t + "[" + r + "]", y = encodeURIComponent(i) + "=";
|
|
1577
|
+
l += y + encodeURIComponent(a[r]) + "&";
|
|
1534
1578
|
}
|
|
1535
1579
|
} else
|
|
1536
1580
|
l += c + encodeURIComponent(a) + "&";
|
|
1537
1581
|
}
|
|
1538
1582
|
return l;
|
|
1539
|
-
},
|
|
1583
|
+
}, Tl = (e) => e.type !== "application/json", Ra = (e) => {
|
|
1540
1584
|
if (!e && typeof e != "object")
|
|
1541
1585
|
throw new Error("error arguments", "deepClone");
|
|
1542
1586
|
const l = e.constructor === Array ? [] : {};
|
|
1543
1587
|
return Object.keys(e).forEach((t) => {
|
|
1544
|
-
e[t] && typeof e[t] == "object" ? l[t] =
|
|
1588
|
+
e[t] && typeof e[t] == "object" ? l[t] = Ra(e[t]) : l[t] = e[t];
|
|
1545
1589
|
}), l;
|
|
1546
1590
|
};
|
|
1547
|
-
function
|
|
1548
|
-
const { proxy: t } = he(), a =
|
|
1549
|
-
const V =
|
|
1591
|
+
function El(e, l) {
|
|
1592
|
+
const { proxy: t } = he(), a = x({}), c = async (h) => {
|
|
1593
|
+
const V = h.form;
|
|
1550
1594
|
if (!V) return "";
|
|
1551
1595
|
switch (V.type) {
|
|
1552
1596
|
case "checkboxGroup":
|
|
@@ -1556,8 +1600,8 @@ function Cl(e, l) {
|
|
|
1556
1600
|
if (V.api) {
|
|
1557
1601
|
const p = await V.api({ pageNum: 1, pageSize: 1e3, ...V.apiParams });
|
|
1558
1602
|
if (V.data = p.rows || p.data, V.data && Array.isArray(V.data) && !Array.isArray(V.defaultExpandedKeys) && V.autoExpandFirstLevel !== !1) {
|
|
1559
|
-
const
|
|
1560
|
-
V.defaultExpandedKeys = V.data.map((
|
|
1603
|
+
const j = V.props || { value: "id" }, D = V.valueKey || j.value || "id";
|
|
1604
|
+
V.defaultExpandedKeys = V.data.map((H) => H[D]);
|
|
1561
1605
|
}
|
|
1562
1606
|
}
|
|
1563
1607
|
return "";
|
|
@@ -1582,63 +1626,63 @@ function Cl(e, l) {
|
|
|
1582
1626
|
default:
|
|
1583
1627
|
return "";
|
|
1584
1628
|
}
|
|
1585
|
-
},
|
|
1629
|
+
}, r = async (h) => {
|
|
1586
1630
|
var D;
|
|
1587
1631
|
let V = {};
|
|
1588
|
-
const p = e.columns,
|
|
1589
|
-
for (const
|
|
1590
|
-
const
|
|
1591
|
-
V[
|
|
1632
|
+
const p = e.columns, j = h !== void 0 ? h : l;
|
|
1633
|
+
for (const H of p) {
|
|
1634
|
+
const I = ((D = H.form) == null ? void 0 : D.prop) || H.prop;
|
|
1635
|
+
V[I] = await c(H);
|
|
1592
1636
|
}
|
|
1593
|
-
if (
|
|
1594
|
-
const
|
|
1595
|
-
V = { ...V, ...
|
|
1637
|
+
if (j && typeof j == "object") {
|
|
1638
|
+
const H = Ra(j);
|
|
1639
|
+
V = { ...V, ...H };
|
|
1596
1640
|
}
|
|
1597
1641
|
e.initEditData && e.initEditData(V), e.beforeInitEdit && e.beforeInitEdit(V), i(V), a.value = V;
|
|
1598
|
-
}, i = (
|
|
1642
|
+
}, i = (h) => {
|
|
1599
1643
|
e.columns.forEach((p) => {
|
|
1600
|
-
var
|
|
1601
|
-
const
|
|
1602
|
-
switch (
|
|
1644
|
+
var H, I, F, X, ee;
|
|
1645
|
+
const j = (H = p.form) == null ? void 0 : H.type, D = ((I = p.form) == null ? void 0 : I.prop) || p.prop;
|
|
1646
|
+
switch (j) {
|
|
1603
1647
|
case "checkboxCommonDict":
|
|
1604
|
-
Array.isArray(
|
|
1648
|
+
Array.isArray(h[D]) && (h[D] = h[D].map((k) => k[p.form.value] || k));
|
|
1605
1649
|
break;
|
|
1606
1650
|
case "selectDict":
|
|
1607
1651
|
case "radioDict":
|
|
1608
1652
|
case "switch":
|
|
1609
|
-
|
|
1653
|
+
h[D] = h[D] || ((F = p.form) == null ? void 0 : F.defaultValue);
|
|
1610
1654
|
break;
|
|
1611
1655
|
case "daterange":
|
|
1612
1656
|
case "timerange":
|
|
1613
1657
|
const $ = (X = p.form) == null ? void 0 : X.rangeBeginProp, U = (ee = p.form) == null ? void 0 : ee.rangeEndProp;
|
|
1614
|
-
$ && U &&
|
|
1658
|
+
$ && U && h[$] && h[U] ? h[D] = [h[$], h[U]] : typeof h[D] == "string" && h[D].includes(",") ? h[D] = h[D].split(",") : (!h[D] || !Array.isArray(h[D])) && (h[D] = h[D] || []);
|
|
1615
1659
|
break;
|
|
1616
1660
|
}
|
|
1617
1661
|
});
|
|
1618
1662
|
};
|
|
1619
1663
|
return {
|
|
1620
1664
|
formData: a,
|
|
1621
|
-
initFormData:
|
|
1622
|
-
prepareSaveData: async (
|
|
1623
|
-
const V = { ...a.value, ...
|
|
1665
|
+
initFormData: r,
|
|
1666
|
+
prepareSaveData: async (h) => {
|
|
1667
|
+
const V = { ...a.value, ...h };
|
|
1624
1668
|
if (e.columns.forEach((p) => {
|
|
1625
|
-
var
|
|
1626
|
-
const
|
|
1627
|
-
if ((
|
|
1628
|
-
const ee = V[D], $ = (
|
|
1669
|
+
var H, I, F, X;
|
|
1670
|
+
const j = (H = p.form) == null ? void 0 : H.type, D = ((I = p.form) == null ? void 0 : I.prop) || p.prop;
|
|
1671
|
+
if ((j === "daterange" || j === "timerange") && Array.isArray(V[D])) {
|
|
1672
|
+
const ee = V[D], $ = (F = p.form) == null ? void 0 : F.rangeBeginProp, U = (X = p.form) == null ? void 0 : X.rangeEndProp;
|
|
1629
1673
|
$ && U && ee.length >= 2 && (V[$] = ee[0], V[U] = ee[1]);
|
|
1630
1674
|
}
|
|
1631
1675
|
}), delete V.orderByColumn, delete V.isAsc, e.beforeSave) {
|
|
1632
1676
|
const p = await e.beforeSave(V);
|
|
1633
1677
|
if (p === !1) return !1;
|
|
1634
|
-
p && typeof p == "object" ? Object.assign(
|
|
1678
|
+
p && typeof p == "object" ? Object.assign(h, p) : Object.assign(h, V);
|
|
1635
1679
|
} else
|
|
1636
|
-
Object.assign(
|
|
1680
|
+
Object.assign(h, V);
|
|
1637
1681
|
return !0;
|
|
1638
1682
|
}
|
|
1639
1683
|
};
|
|
1640
1684
|
}
|
|
1641
|
-
const
|
|
1685
|
+
const Ul = { key: 20 }, Al = { class: "color-picker-tips" }, Pl = /* @__PURE__ */ pe({
|
|
1642
1686
|
__name: "curdEdit",
|
|
1643
1687
|
props: {
|
|
1644
1688
|
dataSource: {},
|
|
@@ -1648,28 +1692,28 @@ const Tl = { key: 20 }, El = { class: "color-picker-tips" }, Ul = /* @__PURE__ *
|
|
|
1648
1692
|
},
|
|
1649
1693
|
emits: ["close", "actionEvent"],
|
|
1650
1694
|
setup(e, { emit: l }) {
|
|
1651
|
-
const { t } =
|
|
1695
|
+
const { t } = Da(), { proxy: a } = he(), c = e, r = x(!1), i = x(), y = l, h = x(), V = x(Oa), { formData: p, initFormData: j, prepareSaveData: D } = El(
|
|
1652
1696
|
c.dataSource,
|
|
1653
1697
|
c.editData
|
|
1654
|
-
),
|
|
1655
|
-
const E = !!c.editData[c.dataSource.rowKey],
|
|
1656
|
-
return
|
|
1657
|
-
}),
|
|
1698
|
+
), H = J(() => {
|
|
1699
|
+
const E = !!c.editData[c.dataSource.rowKey], P = Ft(c.dataSource.columns, E, E);
|
|
1700
|
+
return Ia(P, "form.order");
|
|
1701
|
+
}), I = J(() => c.dataSource.formInline || !1), F = (k) => {
|
|
1658
1702
|
if (Array.isArray(k.defaultExpandedKeys))
|
|
1659
1703
|
return k.defaultExpandedKeys;
|
|
1660
1704
|
if (k.autoExpandFirstLevel === !1)
|
|
1661
1705
|
return [];
|
|
1662
|
-
const E = k.data || [],
|
|
1706
|
+
const E = k.data || [], P = k.props || { value: "id" }, W = k.valueKey || P.value || "id";
|
|
1663
1707
|
return Array.isArray(E) ? E.map((S) => S[W]).filter((S) => S !== void 0) : [];
|
|
1664
|
-
}, X = () =>
|
|
1708
|
+
}, X = () => Ht(c.dataSource.columns), ee = () => {
|
|
1665
1709
|
var k;
|
|
1666
|
-
(k =
|
|
1667
|
-
var
|
|
1710
|
+
(k = h.value) == null || k.validate(async (E) => {
|
|
1711
|
+
var P, W, S, d, C;
|
|
1668
1712
|
if (!E) return !1;
|
|
1669
1713
|
try {
|
|
1670
1714
|
const A = { ...c.dataSource.queryParams || {} };
|
|
1671
1715
|
if (await D(A) === !1) return !1;
|
|
1672
|
-
c.editData[c.dataSource.rowKey] ? await ((W = (
|
|
1716
|
+
c.editData[c.dataSource.rowKey] ? await ((W = (P = c.dataSource).updateApi) == null ? void 0 : W.call(P, A)) : await ((d = (S = c.dataSource).addApi) == null ? void 0 : d.call(S, A)), await $(), U(!0), a == null || a.$modal.msgSuccess(t("數據存儲成功")), (C = h.value) == null || C.resetFields();
|
|
1673
1717
|
} catch (A) {
|
|
1674
1718
|
console.error("Save failed:", A);
|
|
1675
1719
|
}
|
|
@@ -1679,70 +1723,70 @@ const Tl = { key: 20 }, El = { class: "color-picker-tips" }, Ul = /* @__PURE__ *
|
|
|
1679
1723
|
const k = i.value;
|
|
1680
1724
|
if (k != null) {
|
|
1681
1725
|
const E = [];
|
|
1682
|
-
for (let
|
|
1683
|
-
const W = k[
|
|
1726
|
+
for (let P = 0; P < k.length; P++) {
|
|
1727
|
+
const W = k[P].getTranslate();
|
|
1684
1728
|
E.push(W);
|
|
1685
1729
|
}
|
|
1686
|
-
await
|
|
1730
|
+
await gl(E);
|
|
1687
1731
|
}
|
|
1688
1732
|
}, U = (k = !1) => {
|
|
1689
1733
|
var E;
|
|
1690
|
-
(E =
|
|
1734
|
+
(E = h.value) == null || E.resetFields(), y("close", k);
|
|
1691
1735
|
};
|
|
1692
1736
|
return Ve(() => c.modelValue, (k) => {
|
|
1693
|
-
k && (X(),
|
|
1737
|
+
k && (X(), j(c.editData)), r.value = k;
|
|
1694
1738
|
}), (k, E) => {
|
|
1695
|
-
const
|
|
1696
|
-
return s(),
|
|
1739
|
+
const P = st, W = va, S = ba, d = ka, C = Ba, A = za, N = He, G = da, se = ct, _ = pa, L = it, q = ut, Y = _a, ne = dt, ue = ga, me = ya, ce = ma, ye = ha, u = De, m = fa;
|
|
1740
|
+
return s(), f(m, {
|
|
1697
1741
|
title: c.action.title || c.action.text,
|
|
1698
|
-
modelValue: r
|
|
1699
|
-
"onUpdate:modelValue": E[1] || (E[1] = (n) => $e(
|
|
1742
|
+
modelValue: o(r),
|
|
1743
|
+
"onUpdate:modelValue": E[1] || (E[1] = (n) => $e(r) ? r.value = n : null),
|
|
1700
1744
|
onClose: U,
|
|
1701
1745
|
"destroy-on-close": "",
|
|
1702
1746
|
"append-to-bod": "",
|
|
1703
|
-
width: c.action.width || (
|
|
1747
|
+
width: c.action.width || (o(I) ? 750 : 550),
|
|
1704
1748
|
class: "curdEditDialog"
|
|
1705
1749
|
}, {
|
|
1706
1750
|
footer: b(() => [
|
|
1707
1751
|
re("div", null, [
|
|
1708
|
-
|
|
1752
|
+
R(u, {
|
|
1709
1753
|
onClick: E[0] || (E[0] = (n) => U(!1))
|
|
1710
1754
|
}, {
|
|
1711
1755
|
default: b(() => [
|
|
1712
|
-
|
|
1756
|
+
z(M(k.$t("關閉")), 1)
|
|
1713
1757
|
]),
|
|
1714
1758
|
_: 1
|
|
1715
1759
|
}),
|
|
1716
|
-
|
|
1760
|
+
R(u, {
|
|
1717
1761
|
type: "primary",
|
|
1718
1762
|
onClick: ee
|
|
1719
1763
|
}, {
|
|
1720
1764
|
default: b(() => [
|
|
1721
|
-
|
|
1765
|
+
z(M(k.$t("存儲")), 1)
|
|
1722
1766
|
]),
|
|
1723
1767
|
_: 1
|
|
1724
1768
|
})
|
|
1725
1769
|
])
|
|
1726
1770
|
]),
|
|
1727
1771
|
default: b(() => [
|
|
1728
|
-
|
|
1729
|
-
model:
|
|
1772
|
+
R(ye, {
|
|
1773
|
+
model: o(p),
|
|
1730
1774
|
ref_key: "curdFormRef",
|
|
1731
|
-
ref:
|
|
1775
|
+
ref: h,
|
|
1732
1776
|
"label-width": c.action.labelWidth || c.dataSource.formLabelWidth || "auto",
|
|
1733
1777
|
"label-position": c.action.labelPosition || "right",
|
|
1734
1778
|
class: "p-l-3 p-r-3"
|
|
1735
1779
|
}, {
|
|
1736
1780
|
default: b(() => [
|
|
1737
|
-
|
|
1781
|
+
R(ce, { gutter: 20 }, {
|
|
1738
1782
|
default: b(() => [
|
|
1739
|
-
(s(!0), T(
|
|
1740
|
-
span: n.form.inline === !1 ? 24 :
|
|
1783
|
+
(s(!0), T(B, null, Q(o(H), (n) => (s(), f(me, {
|
|
1784
|
+
span: n.form.inline === !1 ? 24 : o(I) ? 12 : 24,
|
|
1741
1785
|
key: n.prop,
|
|
1742
1786
|
class: "el-p"
|
|
1743
1787
|
}, {
|
|
1744
1788
|
default: b(() => [
|
|
1745
|
-
|
|
1789
|
+
R(ue, {
|
|
1746
1790
|
prop: n.form.prop || n.prop,
|
|
1747
1791
|
label: n.label,
|
|
1748
1792
|
name: n.form.prop || n.prop,
|
|
@@ -1750,104 +1794,104 @@ const Tl = { key: 20 }, El = { class: "color-picker-tips" }, Ul = /* @__PURE__ *
|
|
|
1750
1794
|
required: n.form.required
|
|
1751
1795
|
}, {
|
|
1752
1796
|
default: b(() => [
|
|
1753
|
-
n.form.type === "number" ? (s(),
|
|
1797
|
+
n.form.type === "number" ? (s(), f(P, {
|
|
1754
1798
|
key: 0,
|
|
1755
|
-
modelValue:
|
|
1756
|
-
"onUpdate:modelValue": (g) =>
|
|
1799
|
+
modelValue: o(p)[n.form.prop || n.prop],
|
|
1800
|
+
"onUpdate:modelValue": (g) => o(p)[n.form.prop || n.prop] = g,
|
|
1757
1801
|
style: { width: "100%" },
|
|
1758
1802
|
min: n.form.min,
|
|
1759
1803
|
max: n.form.max,
|
|
1760
1804
|
placeholder: k.$t("請輸入")
|
|
1761
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "min", "max", "placeholder"])) : n.form.type === "select" ? (s(),
|
|
1805
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "min", "max", "placeholder"])) : n.form.type === "select" ? (s(), f(S, {
|
|
1762
1806
|
key: 1,
|
|
1763
1807
|
multiple: n.form.multiple,
|
|
1764
1808
|
style: { width: "100%" },
|
|
1765
|
-
modelValue:
|
|
1766
|
-
"onUpdate:modelValue": (g) =>
|
|
1809
|
+
modelValue: o(p)[n.form.prop || n.prop],
|
|
1810
|
+
"onUpdate:modelValue": (g) => o(p)[n.form.prop || n.prop] = g,
|
|
1767
1811
|
placeholder: k.$t("請選擇"),
|
|
1768
1812
|
filterable: n.form.filterable ?? !0
|
|
1769
1813
|
}, {
|
|
1770
1814
|
default: b(() => [
|
|
1771
|
-
(s(!0), T(
|
|
1815
|
+
(s(!0), T(B, null, Q(n.form.data, (g) => (s(), f(W, {
|
|
1772
1816
|
key: g[n.form.value] || g.value,
|
|
1773
1817
|
label: g[n.form.label] || g.label,
|
|
1774
1818
|
value: g[n.form.value] || g.value
|
|
1775
1819
|
}, null, 8, ["label", "value"]))), 128))
|
|
1776
1820
|
]),
|
|
1777
1821
|
_: 2
|
|
1778
|
-
}, 1032, ["multiple", "modelValue", "onUpdate:modelValue", "placeholder", "filterable"])) : n.form.type === "selectDict" ? (s(),
|
|
1822
|
+
}, 1032, ["multiple", "modelValue", "onUpdate:modelValue", "placeholder", "filterable"])) : n.form.type === "selectDict" ? (s(), f(S, {
|
|
1779
1823
|
key: 2,
|
|
1780
1824
|
multiple: n.form.multiple,
|
|
1781
1825
|
style: { width: "100%" },
|
|
1782
|
-
modelValue:
|
|
1783
|
-
"onUpdate:modelValue": (g) =>
|
|
1826
|
+
modelValue: o(p)[n.form.prop || n.prop],
|
|
1827
|
+
"onUpdate:modelValue": (g) => o(p)[n.form.prop || n.prop] = g,
|
|
1784
1828
|
placeholder: k.$t("請選擇"),
|
|
1785
1829
|
filterable: n.form.filterable ?? !0
|
|
1786
1830
|
}, {
|
|
1787
1831
|
default: b(() => [
|
|
1788
|
-
(s(!0), T(
|
|
1832
|
+
(s(!0), T(B, null, Q(n.form.data, (g) => (s(), f(W, {
|
|
1789
1833
|
key: g[n.form.value] || g.value,
|
|
1790
1834
|
label: g[n.form.label] || g.label,
|
|
1791
1835
|
value: g[n.form.value] || g.value
|
|
1792
1836
|
}, null, 8, ["label", "value"]))), 128))
|
|
1793
1837
|
]),
|
|
1794
1838
|
_: 2
|
|
1795
|
-
}, 1032, ["multiple", "modelValue", "onUpdate:modelValue", "placeholder", "filterable"])) : n.form.type === "selectCommonDict" ? (s(),
|
|
1839
|
+
}, 1032, ["multiple", "modelValue", "onUpdate:modelValue", "placeholder", "filterable"])) : n.form.type === "selectCommonDict" ? (s(), f(S, {
|
|
1796
1840
|
key: 3,
|
|
1797
1841
|
multiple: n.form.multiple,
|
|
1798
1842
|
style: { width: "100%" },
|
|
1799
|
-
modelValue:
|
|
1800
|
-
"onUpdate:modelValue": (g) =>
|
|
1843
|
+
modelValue: o(p)[n.form.prop || n.prop],
|
|
1844
|
+
"onUpdate:modelValue": (g) => o(p)[n.form.prop || n.prop] = g,
|
|
1801
1845
|
placeholder: k.$t("請選擇"),
|
|
1802
1846
|
filterable: n.form.filterable ?? !0
|
|
1803
1847
|
}, {
|
|
1804
1848
|
default: b(() => [
|
|
1805
|
-
(s(!0), T(
|
|
1849
|
+
(s(!0), T(B, null, Q(n.form.data, (g) => (s(), f(W, {
|
|
1806
1850
|
key: g.value,
|
|
1807
1851
|
label: g.label,
|
|
1808
1852
|
value: g.value
|
|
1809
1853
|
}, null, 8, ["label", "value"]))), 128))
|
|
1810
1854
|
]),
|
|
1811
1855
|
_: 2
|
|
1812
|
-
}, 1032, ["multiple", "modelValue", "onUpdate:modelValue", "placeholder", "filterable"])) : n.form.type === "selectApi" ? (s(),
|
|
1856
|
+
}, 1032, ["multiple", "modelValue", "onUpdate:modelValue", "placeholder", "filterable"])) : n.form.type === "selectApi" ? (s(), f(S, {
|
|
1813
1857
|
key: 4,
|
|
1814
1858
|
multiple: n.form.multiple,
|
|
1815
1859
|
style: { width: "100%" },
|
|
1816
|
-
modelValue:
|
|
1817
|
-
"onUpdate:modelValue": (g) =>
|
|
1860
|
+
modelValue: o(p)[n.form.prop || n.prop],
|
|
1861
|
+
"onUpdate:modelValue": (g) => o(p)[n.form.prop || n.prop] = g,
|
|
1818
1862
|
placeholder: k.$t("請選擇"),
|
|
1819
1863
|
filterable: n.form.filterable ?? !0
|
|
1820
1864
|
}, {
|
|
1821
1865
|
default: b(() => [
|
|
1822
|
-
(s(!0), T(
|
|
1866
|
+
(s(!0), T(B, null, Q(n.form.data, (g) => (s(), f(W, {
|
|
1823
1867
|
key: g[n.form.value],
|
|
1824
1868
|
label: g[n.form.label],
|
|
1825
1869
|
value: g[n.form.value]
|
|
1826
1870
|
}, null, 8, ["label", "value"]))), 128))
|
|
1827
1871
|
]),
|
|
1828
1872
|
_: 2
|
|
1829
|
-
}, 1032, ["multiple", "modelValue", "onUpdate:modelValue", "placeholder", "filterable"])) : n.form.type === "date" ? (s(),
|
|
1873
|
+
}, 1032, ["multiple", "modelValue", "onUpdate:modelValue", "placeholder", "filterable"])) : n.form.type === "date" ? (s(), f(d, {
|
|
1830
1874
|
key: 5,
|
|
1831
1875
|
format: "YYYY-MM-DD",
|
|
1832
1876
|
"value-format": "YYYY-MM-DD",
|
|
1833
|
-
modelValue:
|
|
1834
|
-
"onUpdate:modelValue": (g) =>
|
|
1877
|
+
modelValue: o(p)[n.form.prop || n.prop],
|
|
1878
|
+
"onUpdate:modelValue": (g) => o(p)[n.form.prop || n.prop] = g,
|
|
1835
1879
|
type: "date",
|
|
1836
1880
|
placeholder: k.$t("請選擇日期"),
|
|
1837
1881
|
style: { width: "100%" }
|
|
1838
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])) : n.form.type === "datetime" ? (s(),
|
|
1882
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])) : n.form.type === "datetime" ? (s(), f(d, {
|
|
1839
1883
|
key: 6,
|
|
1840
1884
|
format: "YYYY-MM-DD HH:mm:ss",
|
|
1841
1885
|
"value-format": "YYYY-MM-DD HH:mm:ss",
|
|
1842
|
-
modelValue:
|
|
1843
|
-
"onUpdate:modelValue": (g) =>
|
|
1886
|
+
modelValue: o(p)[n.form.prop || n.prop],
|
|
1887
|
+
"onUpdate:modelValue": (g) => o(p)[n.form.prop || n.prop] = g,
|
|
1844
1888
|
type: "datetime",
|
|
1845
1889
|
placeholder: k.$t("請選擇日期時間"),
|
|
1846
1890
|
style: { width: "100%" }
|
|
1847
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])) : n.form.type === "daterange" ? (s(),
|
|
1891
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])) : n.form.type === "daterange" ? (s(), f(d, {
|
|
1848
1892
|
key: 7,
|
|
1849
|
-
modelValue:
|
|
1850
|
-
"onUpdate:modelValue": (g) =>
|
|
1893
|
+
modelValue: o(p)[n.form.prop || n.prop],
|
|
1894
|
+
"onUpdate:modelValue": (g) => o(p)[n.form.prop || n.prop] = g,
|
|
1851
1895
|
type: "daterange",
|
|
1852
1896
|
format: "YYYY-MM-DD",
|
|
1853
1897
|
"value-format": "YYYY-MM-DD",
|
|
@@ -1855,10 +1899,10 @@ const Tl = { key: 20 }, El = { class: "color-picker-tips" }, Ul = /* @__PURE__ *
|
|
|
1855
1899
|
"start-placeholder": k.$t("開始日期"),
|
|
1856
1900
|
"end-placeholder": k.$t("結束日期"),
|
|
1857
1901
|
style: { width: "100%" }
|
|
1858
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "range-separator", "start-placeholder", "end-placeholder"])) : n.form.type === "timerange" ? (s(),
|
|
1902
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "range-separator", "start-placeholder", "end-placeholder"])) : n.form.type === "timerange" ? (s(), f(d, {
|
|
1859
1903
|
key: 8,
|
|
1860
|
-
modelValue:
|
|
1861
|
-
"onUpdate:modelValue": (g) =>
|
|
1904
|
+
modelValue: o(p)[n.form.prop || n.prop],
|
|
1905
|
+
"onUpdate:modelValue": (g) => o(p)[n.form.prop || n.prop] = g,
|
|
1862
1906
|
type: "datetimerange",
|
|
1863
1907
|
format: "YYYY-MM-DD HH:mm",
|
|
1864
1908
|
"value-format": "YYYY-MM-DD HH:mm:ss",
|
|
@@ -1866,183 +1910,183 @@ const Tl = { key: 20 }, El = { class: "color-picker-tips" }, Ul = /* @__PURE__ *
|
|
|
1866
1910
|
"start-placeholder": k.$t("開始時間"),
|
|
1867
1911
|
"end-placeholder": k.$t("結束時間"),
|
|
1868
1912
|
style: { width: "100%" }
|
|
1869
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "range-separator", "start-placeholder", "end-placeholder"])) : n.form.type === "image" ? (s(),
|
|
1913
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "range-separator", "start-placeholder", "end-placeholder"])) : n.form.type === "image" ? (s(), f(C, {
|
|
1870
1914
|
key: 9,
|
|
1871
1915
|
limit: n.form.limit || 1,
|
|
1872
|
-
modelValue:
|
|
1873
|
-
"onUpdate:modelValue": (g) =>
|
|
1874
|
-
}, null, 8, ["limit", "modelValue", "onUpdate:modelValue"])) : n.form.type === "file" ? (s(),
|
|
1916
|
+
modelValue: o(p)[n.form.prop || n.prop],
|
|
1917
|
+
"onUpdate:modelValue": (g) => o(p)[n.form.prop || n.prop] = g
|
|
1918
|
+
}, null, 8, ["limit", "modelValue", "onUpdate:modelValue"])) : n.form.type === "file" ? (s(), f(A, {
|
|
1875
1919
|
key: 10,
|
|
1876
1920
|
limit: n.form.limit || 1,
|
|
1877
|
-
modelValue:
|
|
1878
|
-
"onUpdate:modelValue": (g) =>
|
|
1921
|
+
modelValue: o(p)[n.form.prop || n.prop],
|
|
1922
|
+
"onUpdate:modelValue": (g) => o(p)[n.form.prop || n.prop] = g,
|
|
1879
1923
|
fileType: n.form.fileType,
|
|
1880
1924
|
fileSize: n.form.fileSize
|
|
1881
|
-
}, null, 8, ["limit", "modelValue", "onUpdate:modelValue", "fileType", "fileSize"])) : n.form.type === "password" ? (s(),
|
|
1925
|
+
}, null, 8, ["limit", "modelValue", "onUpdate:modelValue", "fileType", "fileSize"])) : n.form.type === "password" ? (s(), f(N, {
|
|
1882
1926
|
key: 11,
|
|
1883
1927
|
"auto-complete": "new-password",
|
|
1884
|
-
modelValue:
|
|
1885
|
-
"onUpdate:modelValue": (g) =>
|
|
1928
|
+
modelValue: o(p)[n.form.prop || n.prop],
|
|
1929
|
+
"onUpdate:modelValue": (g) => o(p)[n.form.prop || n.prop] = g,
|
|
1886
1930
|
type: "password",
|
|
1887
1931
|
placeholder: k.$t("請輸入")
|
|
1888
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])) : n.form.type === "checkboxGroup" ? (s(),
|
|
1932
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])) : n.form.type === "checkboxGroup" ? (s(), f(se, {
|
|
1889
1933
|
key: 12,
|
|
1890
|
-
modelValue:
|
|
1891
|
-
"onUpdate:modelValue": (g) =>
|
|
1934
|
+
modelValue: o(p)[n.form.prop || n.prop],
|
|
1935
|
+
"onUpdate:modelValue": (g) => o(p)[n.form.prop || n.prop] = g
|
|
1892
1936
|
}, {
|
|
1893
1937
|
default: b(() => [
|
|
1894
|
-
(s(!0), T(
|
|
1938
|
+
(s(!0), T(B, null, Q(n.form.list, (g) => (s(), f(G, {
|
|
1895
1939
|
key: g[n.form.value],
|
|
1896
1940
|
label: g[n.form.label],
|
|
1897
1941
|
value: g[n.form.value]
|
|
1898
1942
|
}, null, 8, ["label", "value"]))), 128))
|
|
1899
1943
|
]),
|
|
1900
1944
|
_: 2
|
|
1901
|
-
}, 1032, ["modelValue", "onUpdate:modelValue"])) : n.form.type === "checkboxCommonDict" ? (s(),
|
|
1945
|
+
}, 1032, ["modelValue", "onUpdate:modelValue"])) : n.form.type === "checkboxCommonDict" ? (s(), f(se, {
|
|
1902
1946
|
key: 13,
|
|
1903
|
-
modelValue:
|
|
1904
|
-
"onUpdate:modelValue": (g) =>
|
|
1947
|
+
modelValue: o(p)[n.form.prop || n.prop],
|
|
1948
|
+
"onUpdate:modelValue": (g) => o(p)[n.form.prop || n.prop] = g
|
|
1905
1949
|
}, {
|
|
1906
1950
|
default: b(() => [
|
|
1907
|
-
(s(!0), T(
|
|
1951
|
+
(s(!0), T(B, null, Q(n.form.data, (g) => (s(), f(G, {
|
|
1908
1952
|
label: g.value,
|
|
1909
1953
|
key: g.value,
|
|
1910
1954
|
value: g.value
|
|
1911
1955
|
}, {
|
|
1912
1956
|
default: b(() => [
|
|
1913
|
-
|
|
1957
|
+
z(M(g.label), 1)
|
|
1914
1958
|
]),
|
|
1915
1959
|
_: 2
|
|
1916
1960
|
}, 1032, ["label", "value"]))), 128))
|
|
1917
1961
|
]),
|
|
1918
1962
|
_: 2
|
|
1919
|
-
}, 1032, ["modelValue", "onUpdate:modelValue"])) : n.form.type === "switch" ? (s(),
|
|
1963
|
+
}, 1032, ["modelValue", "onUpdate:modelValue"])) : n.form.type === "switch" ? (s(), f(_, {
|
|
1920
1964
|
key: 14,
|
|
1921
|
-
modelValue:
|
|
1922
|
-
"onUpdate:modelValue": (g) =>
|
|
1965
|
+
modelValue: o(p)[n.form.prop || n.prop],
|
|
1966
|
+
"onUpdate:modelValue": (g) => o(p)[n.form.prop || n.prop] = g,
|
|
1923
1967
|
"active-value": n.form.activeValue || "0",
|
|
1924
1968
|
"inactive-value": n.form.inactiveValue || "1"
|
|
1925
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "active-value", "inactive-value"])) : n.form.type === "radioDict" ? (s(),
|
|
1969
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "active-value", "inactive-value"])) : n.form.type === "radioDict" ? (s(), f(q, {
|
|
1926
1970
|
key: 15,
|
|
1927
|
-
modelValue:
|
|
1928
|
-
"onUpdate:modelValue": (g) =>
|
|
1971
|
+
modelValue: o(p)[n.form.prop || n.prop],
|
|
1972
|
+
"onUpdate:modelValue": (g) => o(p)[n.form.prop || n.prop] = g
|
|
1929
1973
|
}, {
|
|
1930
1974
|
default: b(() => [
|
|
1931
|
-
(s(!0), T(
|
|
1975
|
+
(s(!0), T(B, null, Q(n.form.data, (g) => (s(), f(L, {
|
|
1932
1976
|
key: g.value,
|
|
1933
1977
|
value: g.value
|
|
1934
1978
|
}, {
|
|
1935
1979
|
default: b(() => [
|
|
1936
|
-
|
|
1980
|
+
z(M(g.label), 1)
|
|
1937
1981
|
]),
|
|
1938
1982
|
_: 2
|
|
1939
1983
|
}, 1032, ["value"]))), 128))
|
|
1940
1984
|
]),
|
|
1941
1985
|
_: 2
|
|
1942
|
-
}, 1032, ["modelValue", "onUpdate:modelValue"])) : n.form.type === "treeSelectApi" ? (s(),
|
|
1986
|
+
}, 1032, ["modelValue", "onUpdate:modelValue"])) : n.form.type === "treeSelectApi" ? (s(), f(Y, {
|
|
1943
1987
|
key: 16,
|
|
1944
|
-
modelValue:
|
|
1945
|
-
"onUpdate:modelValue": (g) =>
|
|
1988
|
+
modelValue: o(p)[n.form.prop || n.prop],
|
|
1989
|
+
"onUpdate:modelValue": (g) => o(p)[n.form.prop || n.prop] = g,
|
|
1946
1990
|
data: n.form.data,
|
|
1947
1991
|
props: n.form.props,
|
|
1948
1992
|
"value-key": n.form.valueKey,
|
|
1949
|
-
"default-expanded-keys":
|
|
1993
|
+
"default-expanded-keys": F(n.form),
|
|
1950
1994
|
filterable: n.form.filterable ?? !0,
|
|
1951
1995
|
placeholder: k.$t("請選擇"),
|
|
1952
1996
|
"check-strictly": ""
|
|
1953
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "data", "props", "value-key", "default-expanded-keys", "filterable", "placeholder"])) : n.form.type === "radioCommonDict" ? (s(),
|
|
1997
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "data", "props", "value-key", "default-expanded-keys", "filterable", "placeholder"])) : n.form.type === "radioCommonDict" ? (s(), f(q, {
|
|
1954
1998
|
key: 17,
|
|
1955
|
-
modelValue:
|
|
1956
|
-
"onUpdate:modelValue": (g) =>
|
|
1999
|
+
modelValue: o(p)[n.form.prop || n.prop],
|
|
2000
|
+
"onUpdate:modelValue": (g) => o(p)[n.form.prop || n.prop] = g
|
|
1957
2001
|
}, {
|
|
1958
2002
|
default: b(() => [
|
|
1959
|
-
(s(!0), T(
|
|
2003
|
+
(s(!0), T(B, null, Q(n.form.data, (g) => (s(), f(L, {
|
|
1960
2004
|
key: g.value,
|
|
1961
2005
|
label: g.value
|
|
1962
2006
|
}, {
|
|
1963
2007
|
default: b(() => [
|
|
1964
|
-
|
|
2008
|
+
z(M(g.label), 1)
|
|
1965
2009
|
]),
|
|
1966
2010
|
_: 2
|
|
1967
2011
|
}, 1032, ["label"]))), 128))
|
|
1968
2012
|
]),
|
|
1969
2013
|
_: 2
|
|
1970
|
-
}, 1032, ["modelValue", "onUpdate:modelValue"])) : n.form.type === "radioLocalDict" ? (s(),
|
|
2014
|
+
}, 1032, ["modelValue", "onUpdate:modelValue"])) : n.form.type === "radioLocalDict" ? (s(), f(q, {
|
|
1971
2015
|
key: 18,
|
|
1972
|
-
modelValue:
|
|
1973
|
-
"onUpdate:modelValue": (g) =>
|
|
2016
|
+
modelValue: o(p)[n.form.prop || n.prop],
|
|
2017
|
+
"onUpdate:modelValue": (g) => o(p)[n.form.prop || n.prop] = g
|
|
1974
2018
|
}, {
|
|
1975
2019
|
default: b(() => [
|
|
1976
|
-
(s(!0), T(
|
|
2020
|
+
(s(!0), T(B, null, Q(o(V)[n.form.dictType], (g) => (s(), f(L, {
|
|
1977
2021
|
key: g.value,
|
|
1978
2022
|
label: g.value
|
|
1979
2023
|
}, {
|
|
1980
2024
|
default: b(() => [
|
|
1981
|
-
|
|
2025
|
+
z(M(g.label), 1)
|
|
1982
2026
|
]),
|
|
1983
2027
|
_: 2
|
|
1984
2028
|
}, 1032, ["label"]))), 128))
|
|
1985
2029
|
]),
|
|
1986
2030
|
_: 2
|
|
1987
|
-
}, 1032, ["modelValue", "onUpdate:modelValue"])) : n.form.type === "checkbox" ? (s(),
|
|
2031
|
+
}, 1032, ["modelValue", "onUpdate:modelValue"])) : n.form.type === "checkbox" ? (s(), f(G, {
|
|
1988
2032
|
key: 19,
|
|
1989
2033
|
label: n.label,
|
|
1990
|
-
modelValue:
|
|
1991
|
-
"onUpdate:modelValue": (g) =>
|
|
1992
|
-
}, null, 8, ["label", "modelValue", "onUpdate:modelValue"])) : n.form.type === "color" ? (s(), T("div",
|
|
1993
|
-
|
|
1994
|
-
modelValue:
|
|
1995
|
-
"onUpdate:modelValue": (g) =>
|
|
2034
|
+
modelValue: o(p)[n.form.prop || n.prop],
|
|
2035
|
+
"onUpdate:modelValue": (g) => o(p)[n.form.prop || n.prop] = g
|
|
2036
|
+
}, null, 8, ["label", "modelValue", "onUpdate:modelValue"])) : n.form.type === "color" ? (s(), T("div", Ul, [
|
|
2037
|
+
R(ne, {
|
|
2038
|
+
modelValue: o(p)[n.form.prop || n.prop],
|
|
2039
|
+
"onUpdate:modelValue": (g) => o(p)[n.form.prop || n.prop] = g
|
|
1996
2040
|
}, null, 8, ["modelValue", "onUpdate:modelValue"]),
|
|
1997
|
-
re("span",
|
|
1998
|
-
])) : n.form.type === "inputNumber" ? (s(),
|
|
2041
|
+
re("span", Al, M(k.$t("需点击选择器中的确定按钮")), 1)
|
|
2042
|
+
])) : n.form.type === "inputNumber" ? (s(), f(P, {
|
|
1999
2043
|
key: 21,
|
|
2000
2044
|
min: n.form.min || 0,
|
|
2001
|
-
modelValue:
|
|
2002
|
-
"onUpdate:modelValue": (g) =>
|
|
2045
|
+
modelValue: o(p)[n.form.prop || n.prop],
|
|
2046
|
+
"onUpdate:modelValue": (g) => o(p)[n.form.prop || n.prop] = g,
|
|
2003
2047
|
step: 1
|
|
2004
|
-
}, null, 8, ["min", "modelValue", "onUpdate:modelValue"])) : n.form.type === "richtext" ? (s(),
|
|
2048
|
+
}, null, 8, ["min", "modelValue", "onUpdate:modelValue"])) : n.form.type === "richtext" ? (s(), f(Ma, {
|
|
2005
2049
|
key: 22,
|
|
2006
|
-
modelValue:
|
|
2007
|
-
"onUpdate:modelValue": (g) =>
|
|
2050
|
+
modelValue: o(p)[n.form.prop || n.prop],
|
|
2051
|
+
"onUpdate:modelValue": (g) => o(p)[n.form.prop || n.prop] = g,
|
|
2008
2052
|
height: n.form.max || 320,
|
|
2009
2053
|
"min-height": n.form.min || 220
|
|
2010
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "height", "min-height"])) : (s(), T(
|
|
2011
|
-
n.form.translate === !0 ? (s(),
|
|
2054
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "height", "min-height"])) : (s(), T(B, { key: 23 }, [
|
|
2055
|
+
n.form.translate === !0 ? (s(), f(Ya, {
|
|
2012
2056
|
ref_for: !0,
|
|
2013
2057
|
ref_key: "translateInputRef",
|
|
2014
2058
|
ref: i,
|
|
2015
|
-
key:
|
|
2016
|
-
modelValue:
|
|
2017
|
-
"onUpdate:modelValue": (g) =>
|
|
2059
|
+
key: o(p)[k.dataSource.rowKey],
|
|
2060
|
+
modelValue: o(p)[n.form.prop || n.prop],
|
|
2061
|
+
"onUpdate:modelValue": (g) => o(p)[n.form.prop || n.prop] = g,
|
|
2018
2062
|
disabled: n.form.disabled || !1,
|
|
2019
2063
|
type: n.form.type,
|
|
2020
2064
|
placeholder: k.$t("請輸入"),
|
|
2021
2065
|
rows: n.form.rows || 3,
|
|
2022
2066
|
"show-word-limit": n.form.showWordLimit || !1,
|
|
2023
2067
|
maxlength: n.form.limit || -1
|
|
2024
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "disabled", "type", "placeholder", "rows", "show-word-limit", "maxlength"])) : (s(),
|
|
2068
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "disabled", "type", "placeholder", "rows", "show-word-limit", "maxlength"])) : (s(), f(N, {
|
|
2025
2069
|
key: 1,
|
|
2026
|
-
modelValue:
|
|
2027
|
-
"onUpdate:modelValue": (g) =>
|
|
2070
|
+
modelValue: o(p)[n.form.prop || n.prop],
|
|
2071
|
+
"onUpdate:modelValue": (g) => o(p)[n.form.prop || n.prop] = g,
|
|
2028
2072
|
disabled: n.form.disabled || !1,
|
|
2029
2073
|
type: n.form.type,
|
|
2030
2074
|
placeholder: k.$t("請輸入"),
|
|
2031
2075
|
rows: n.form.rows || 3,
|
|
2032
2076
|
"show-word-limit": n.form.showWordLimit || !1,
|
|
2033
2077
|
maxlength: n.form.limit || -1
|
|
2034
|
-
},
|
|
2078
|
+
}, ze({ _: 2 }, [
|
|
2035
2079
|
n.form.suffix ? {
|
|
2036
2080
|
name: "suffix",
|
|
2037
2081
|
fn: b(() => [
|
|
2038
|
-
|
|
2082
|
+
z(M(n.form.suffix), 1)
|
|
2039
2083
|
]),
|
|
2040
2084
|
key: "0"
|
|
2041
2085
|
} : void 0,
|
|
2042
2086
|
n.form.prefix ? {
|
|
2043
2087
|
name: "prefix",
|
|
2044
2088
|
fn: b(() => [
|
|
2045
|
-
|
|
2089
|
+
z(M(n.form.prefix), 1)
|
|
2046
2090
|
]),
|
|
2047
2091
|
key: "1"
|
|
2048
2092
|
} : void 0
|
|
@@ -2065,14 +2109,14 @@ const Tl = { key: 20 }, El = { class: "color-picker-tips" }, Ul = /* @__PURE__ *
|
|
|
2065
2109
|
}, 8, ["title", "modelValue", "width"]);
|
|
2066
2110
|
};
|
|
2067
2111
|
}
|
|
2068
|
-
}),
|
|
2112
|
+
}), na = /* @__PURE__ */ be(Pl, [["__scopeId", "data-v-03727126"]]), Ol = {
|
|
2069
2113
|
key: 1,
|
|
2070
2114
|
class: "curd-search-card",
|
|
2071
2115
|
style: { "margin-bottom": "0px !important" }
|
|
2072
|
-
},
|
|
2116
|
+
}, Il = {
|
|
2073
2117
|
key: 2,
|
|
2074
2118
|
class: "curd-search-card"
|
|
2075
|
-
},
|
|
2119
|
+
}, xl = /* @__PURE__ */ pe({
|
|
2076
2120
|
__name: "curdSearch",
|
|
2077
2121
|
props: {
|
|
2078
2122
|
dataSource: {},
|
|
@@ -2080,98 +2124,98 @@ const Tl = { key: 20 }, El = { class: "color-picker-tips" }, Ul = /* @__PURE__ *
|
|
|
2080
2124
|
},
|
|
2081
2125
|
emits: ["actionEvent"],
|
|
2082
2126
|
setup(e, { expose: l, emit: t }) {
|
|
2083
|
-
const { t: a } =
|
|
2127
|
+
const { t: a } = Da(), { proxy: c } = he(), r = t, i = e, y = J(() => {
|
|
2084
2128
|
const d = i.dataSource.actions;
|
|
2085
2129
|
return d == null ? [] : d.filter((A) => A.position === "top" || A.action === "create" || A.action === "back").map((A) => {
|
|
2086
|
-
const
|
|
2087
|
-
return
|
|
2130
|
+
const N = { ...A };
|
|
2131
|
+
return N.action === "create" ? (N.cssType = "primary", N.icon = "Plus") : N.action === "back" && (N.icon = "ArrowLeft"), N;
|
|
2088
2132
|
});
|
|
2089
|
-
}),
|
|
2133
|
+
}), h = J(() => y.value.find((d) => d.action === "create") ?? null), V = J(() => {
|
|
2090
2134
|
var d;
|
|
2091
2135
|
return ((d = i.dataSource.actions) == null ? void 0 : d.find((C) => C.action === "delete")) ?? null;
|
|
2092
|
-
}), p = J(() => y.value.filter((d) => d.action !== "create")),
|
|
2093
|
-
|
|
2094
|
-
}, D = J(() => i.dataSource.searchColumnsPerRow ?? 4),
|
|
2136
|
+
}), p = J(() => y.value.filter((d) => d.action !== "create")), j = (d) => {
|
|
2137
|
+
r("actionEvent", d);
|
|
2138
|
+
}, D = J(() => i.dataSource.searchColumnsPerRow ?? 4), H = J(() => Math.floor(24 / D.value)), I = J(() => i.dataSource.showSearchCard ?? !0), F = J(() => {
|
|
2095
2139
|
if (i.dataSource.searchActionColSpan != null)
|
|
2096
2140
|
return i.dataSource.searchActionColSpan;
|
|
2097
|
-
const d = U.value.length % D.value, A = 24 - (d === 0 ? D.value : d) *
|
|
2141
|
+
const d = U.value.length % D.value, A = 24 - (d === 0 ? D.value : d) * H.value;
|
|
2098
2142
|
return A <= 0 ? 24 : A;
|
|
2099
|
-
}), X = J(() => U.value.length % D.value === 0 ? "15px !important" : "0px !important"), { initSearchDicts: ee } =
|
|
2100
|
-
|
|
2143
|
+
}), X = J(() => U.value.length % D.value === 0 ? "15px !important" : "0px !important"), { initSearchDicts: ee } = xa(), $ = x({}), U = x([]), k = () => {
|
|
2144
|
+
r("actionEvent", { action: "filter" });
|
|
2101
2145
|
}, E = async () => {
|
|
2102
2146
|
try {
|
|
2103
|
-
let d =
|
|
2147
|
+
let d = P();
|
|
2104
2148
|
if (d = { ...i.dataSource.queryParams || {}, ...d }, i.dataSource.beforeExport && await i.dataSource.beforeExport(d) === !1)
|
|
2105
2149
|
return;
|
|
2106
|
-
const C =
|
|
2150
|
+
const C = Vt().format("YYYYMMDDHHmmss");
|
|
2107
2151
|
let A = i.dataSource.exportFileName ? `${i.dataSource.exportFileName}` : "export";
|
|
2108
2152
|
A += `_${C}.xlsx`, c == null || c.download(i.dataSource.exportUrl, d, A);
|
|
2109
2153
|
} catch (d) {
|
|
2110
2154
|
console.error("Export failed:", d), c == null || c.$modal.msgError(a("導出失敗"));
|
|
2111
2155
|
}
|
|
2112
|
-
},
|
|
2156
|
+
}, P = () => {
|
|
2113
2157
|
const d = { ...$.value };
|
|
2114
2158
|
return U.value.forEach((C) => {
|
|
2115
|
-
var A,
|
|
2116
|
-
if (((A = C.search) == null ? void 0 : A.type) === "daterange" || ((
|
|
2159
|
+
var A, N;
|
|
2160
|
+
if (((A = C.search) == null ? void 0 : A.type) === "daterange" || ((N = C.search) == null ? void 0 : N.type) === "timerange") {
|
|
2117
2161
|
const G = d[C.search.prop];
|
|
2118
|
-
G && G[0] && G[1] &&
|
|
2162
|
+
G && G[0] && G[1] && Wt(d, G, C.search.prop, c), delete d[C.search.prop];
|
|
2119
2163
|
}
|
|
2120
|
-
}),
|
|
2164
|
+
}), Ye(d);
|
|
2121
2165
|
}, W = async () => {
|
|
2122
|
-
await S(),
|
|
2166
|
+
await S(), r("actionEvent", { action: "filter" }, {});
|
|
2123
2167
|
}, S = async () => {
|
|
2124
2168
|
const d = i.dataSource.columns.filter(
|
|
2125
|
-
(A) => A.search &&
|
|
2169
|
+
(A) => A.search && Me(A.search.permission ?? A.permission)
|
|
2126
2170
|
);
|
|
2127
|
-
U.value =
|
|
2128
|
-
d.map((A,
|
|
2171
|
+
U.value = Ia(
|
|
2172
|
+
d.map((A, N) => (A.search.order || (A.search.order = N + 100), A)),
|
|
2129
2173
|
"search.order"
|
|
2130
|
-
), await
|
|
2174
|
+
), await Le();
|
|
2131
2175
|
const C = {};
|
|
2132
2176
|
for (let A = 0; A < d.length; A++) {
|
|
2133
|
-
const
|
|
2134
|
-
if (!
|
|
2135
|
-
const G =
|
|
2136
|
-
se === "daterange" || se === "timerange" ? C[G] =
|
|
2177
|
+
const N = d[A];
|
|
2178
|
+
if (!N.search) continue;
|
|
2179
|
+
const G = N.search.prop || "", se = N.search.type || "";
|
|
2180
|
+
se === "daterange" || se === "timerange" ? C[G] = N.search.default ? N.search.default.split(",") : [] : ((se === "selectApi" || se === "treeSelectApi" || se === "selectDict") && await ee(N), C[G] = N.search.default);
|
|
2137
2181
|
}
|
|
2138
2182
|
$.value = C;
|
|
2139
2183
|
};
|
|
2140
|
-
return
|
|
2184
|
+
return Ne(() => S()), l({ initData: S, getQueryParams: P }), (d, C) => {
|
|
2141
2185
|
var ye;
|
|
2142
|
-
const A =
|
|
2143
|
-
return
|
|
2186
|
+
const A = ka, N = va, G = ba, se = _a, _ = He, L = ga, q = ya, Y = De, ne = ma, ue = ha, me = wa, ce = Sa("hasPermi");
|
|
2187
|
+
return o(U).length > 0 && o(I) ? (s(), f(me, {
|
|
2144
2188
|
key: 0,
|
|
2145
2189
|
class: "curd-search-card",
|
|
2146
2190
|
shadow: "hover",
|
|
2147
2191
|
style: { "margin-bottom": "12px !important" },
|
|
2148
|
-
"body-style": { paddingTop: "18px !important", paddingBottom:
|
|
2192
|
+
"body-style": { paddingTop: "18px !important", paddingBottom: o(X) }
|
|
2149
2193
|
}, {
|
|
2150
2194
|
default: b(() => [
|
|
2151
|
-
|
|
2152
|
-
model:
|
|
2195
|
+
R(ue, {
|
|
2196
|
+
model: o($),
|
|
2153
2197
|
inline: !0,
|
|
2154
2198
|
"label-width": i.dataSource.searchLabelWidth || 68
|
|
2155
2199
|
}, {
|
|
2156
2200
|
default: b(() => [
|
|
2157
|
-
|
|
2201
|
+
R(ne, { gutter: 20 }, {
|
|
2158
2202
|
default: b(() => [
|
|
2159
|
-
(s(!0), T(
|
|
2160
|
-
span:
|
|
2203
|
+
(s(!0), T(B, null, Q(o(U), (u) => (s(), f(q, {
|
|
2204
|
+
span: o(H),
|
|
2161
2205
|
key: u.search.prop
|
|
2162
2206
|
}, {
|
|
2163
2207
|
default: b(() => [
|
|
2164
|
-
|
|
2208
|
+
R(L, {
|
|
2165
2209
|
label: u.label,
|
|
2166
2210
|
name: u.search.prop,
|
|
2167
2211
|
style: { width: "100%" },
|
|
2168
2212
|
"label-width": u.search.labelWidth
|
|
2169
2213
|
}, {
|
|
2170
2214
|
default: b(() => [
|
|
2171
|
-
u.search.type === "daterange" ? (s(),
|
|
2215
|
+
u.search.type === "daterange" ? (s(), f(A, {
|
|
2172
2216
|
key: 0,
|
|
2173
|
-
modelValue:
|
|
2174
|
-
"onUpdate:modelValue": (m) =>
|
|
2217
|
+
modelValue: o($)[u.search.prop],
|
|
2218
|
+
"onUpdate:modelValue": (m) => o($)[u.search.prop] = m,
|
|
2175
2219
|
type: "daterange",
|
|
2176
2220
|
format: "YYYY-MM-DD",
|
|
2177
2221
|
"value-format": "YYYY-MM-DD",
|
|
@@ -2181,10 +2225,10 @@ const Tl = { key: 20 }, El = { class: "color-picker-tips" }, Ul = /* @__PURE__ *
|
|
|
2181
2225
|
style: { width: "100%" },
|
|
2182
2226
|
clearable: "",
|
|
2183
2227
|
onChange: k
|
|
2184
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "range-separator", "start-placeholder", "end-placeholder"])) : u.search.type === "timerange" ? (s(),
|
|
2228
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "range-separator", "start-placeholder", "end-placeholder"])) : u.search.type === "timerange" ? (s(), f(A, {
|
|
2185
2229
|
key: 1,
|
|
2186
|
-
modelValue:
|
|
2187
|
-
"onUpdate:modelValue": (m) =>
|
|
2230
|
+
modelValue: o($)[u.search.prop],
|
|
2231
|
+
"onUpdate:modelValue": (m) => o($)[u.search.prop] = m,
|
|
2188
2232
|
type: "datetimerange",
|
|
2189
2233
|
format: "YYYY-MM-DD HH:mm",
|
|
2190
2234
|
"value-format": "YYYY-MM-DD HH:mm:ss",
|
|
@@ -2194,10 +2238,10 @@ const Tl = { key: 20 }, El = { class: "color-picker-tips" }, Ul = /* @__PURE__ *
|
|
|
2194
2238
|
style: { width: "100%" },
|
|
2195
2239
|
clearable: "",
|
|
2196
2240
|
onChange: k
|
|
2197
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "range-separator", "start-placeholder", "end-placeholder"])) : u.search.type === "selectApi" ? (s(),
|
|
2241
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "range-separator", "start-placeholder", "end-placeholder"])) : u.search.type === "selectApi" ? (s(), f(G, {
|
|
2198
2242
|
key: 2,
|
|
2199
|
-
modelValue:
|
|
2200
|
-
"onUpdate:modelValue": (m) =>
|
|
2243
|
+
modelValue: o($)[u.search.prop],
|
|
2244
|
+
"onUpdate:modelValue": (m) => o($)[u.search.prop] = m,
|
|
2201
2245
|
placeholder: d.$t("請選擇"),
|
|
2202
2246
|
style: { width: "100%" },
|
|
2203
2247
|
clearable: "",
|
|
@@ -2205,17 +2249,17 @@ const Tl = { key: 20 }, El = { class: "color-picker-tips" }, Ul = /* @__PURE__ *
|
|
|
2205
2249
|
filterable: u.search.filterable ?? !0
|
|
2206
2250
|
}, {
|
|
2207
2251
|
default: b(() => [
|
|
2208
|
-
(s(!0), T(
|
|
2252
|
+
(s(!0), T(B, null, Q(u.search.data, (m) => (s(), f(N, {
|
|
2209
2253
|
key: m[u.search.value],
|
|
2210
2254
|
label: m[u.search.label],
|
|
2211
2255
|
value: m[u.search.value]
|
|
2212
2256
|
}, null, 8, ["label", "value"]))), 128))
|
|
2213
2257
|
]),
|
|
2214
2258
|
_: 2
|
|
2215
|
-
}, 1032, ["modelValue", "onUpdate:modelValue", "placeholder", "filterable"])) : u.search.type === "selectData" ? (s(),
|
|
2259
|
+
}, 1032, ["modelValue", "onUpdate:modelValue", "placeholder", "filterable"])) : u.search.type === "selectData" ? (s(), f(G, {
|
|
2216
2260
|
key: 3,
|
|
2217
|
-
modelValue:
|
|
2218
|
-
"onUpdate:modelValue": (m) =>
|
|
2261
|
+
modelValue: o($)[u.search.prop],
|
|
2262
|
+
"onUpdate:modelValue": (m) => o($)[u.search.prop] = m,
|
|
2219
2263
|
placeholder: d.$t("請選擇"),
|
|
2220
2264
|
style: { width: "100%" },
|
|
2221
2265
|
clearable: "",
|
|
@@ -2223,17 +2267,17 @@ const Tl = { key: 20 }, El = { class: "color-picker-tips" }, Ul = /* @__PURE__ *
|
|
|
2223
2267
|
filterable: u.search.filterable ?? !0
|
|
2224
2268
|
}, {
|
|
2225
2269
|
default: b(() => [
|
|
2226
|
-
(s(!0), T(
|
|
2270
|
+
(s(!0), T(B, null, Q(u.search.data, (m) => (s(), f(N, {
|
|
2227
2271
|
key: m[u.search.value],
|
|
2228
2272
|
label: m[u.search.label],
|
|
2229
2273
|
value: m[u.search.value]
|
|
2230
2274
|
}, null, 8, ["label", "value"]))), 128))
|
|
2231
2275
|
]),
|
|
2232
2276
|
_: 2
|
|
2233
|
-
}, 1032, ["modelValue", "onUpdate:modelValue", "placeholder", "filterable"])) : u.search.type === "selectDict" ? (s(),
|
|
2277
|
+
}, 1032, ["modelValue", "onUpdate:modelValue", "placeholder", "filterable"])) : u.search.type === "selectDict" ? (s(), f(G, {
|
|
2234
2278
|
key: 4,
|
|
2235
|
-
modelValue:
|
|
2236
|
-
"onUpdate:modelValue": (m) =>
|
|
2279
|
+
modelValue: o($)[u.search.prop],
|
|
2280
|
+
"onUpdate:modelValue": (m) => o($)[u.search.prop] = m,
|
|
2237
2281
|
placeholder: d.$t("請選擇"),
|
|
2238
2282
|
style: { width: "100%" },
|
|
2239
2283
|
clearable: "",
|
|
@@ -2241,17 +2285,17 @@ const Tl = { key: 20 }, El = { class: "color-picker-tips" }, Ul = /* @__PURE__ *
|
|
|
2241
2285
|
filterable: u.search.filterable ?? !0
|
|
2242
2286
|
}, {
|
|
2243
2287
|
default: b(() => [
|
|
2244
|
-
(s(!0), T(
|
|
2288
|
+
(s(!0), T(B, null, Q(u.search.data || [], (m) => (s(), f(N, {
|
|
2245
2289
|
key: m[u.search.value] || m.value,
|
|
2246
2290
|
label: m[u.search.label] || m.label,
|
|
2247
2291
|
value: m[u.search.value] || m.value
|
|
2248
2292
|
}, null, 8, ["label", "value"]))), 128))
|
|
2249
2293
|
]),
|
|
2250
2294
|
_: 2
|
|
2251
|
-
}, 1032, ["modelValue", "onUpdate:modelValue", "placeholder", "filterable"])) : u.search.type === "selectCommonDict" ? (s(),
|
|
2295
|
+
}, 1032, ["modelValue", "onUpdate:modelValue", "placeholder", "filterable"])) : u.search.type === "selectCommonDict" ? (s(), f(G, {
|
|
2252
2296
|
key: 5,
|
|
2253
|
-
modelValue:
|
|
2254
|
-
"onUpdate:modelValue": (m) =>
|
|
2297
|
+
modelValue: o($)[u.search.prop],
|
|
2298
|
+
"onUpdate:modelValue": (m) => o($)[u.search.prop] = m,
|
|
2255
2299
|
placeholder: d.$t("請選擇"),
|
|
2256
2300
|
style: { width: "100%" },
|
|
2257
2301
|
clearable: "",
|
|
@@ -2259,17 +2303,17 @@ const Tl = { key: 20 }, El = { class: "color-picker-tips" }, Ul = /* @__PURE__ *
|
|
|
2259
2303
|
filterable: u.search.filterable ?? !0
|
|
2260
2304
|
}, {
|
|
2261
2305
|
default: b(() => [
|
|
2262
|
-
(s(!0), T(
|
|
2306
|
+
(s(!0), T(B, null, Q(u.search.data || [], (m) => (s(), f(N, {
|
|
2263
2307
|
key: m[u.search.value] || m.value,
|
|
2264
2308
|
label: m[u.search.label] || m.label,
|
|
2265
2309
|
value: m[u.search.value] || m.value
|
|
2266
2310
|
}, null, 8, ["label", "value"]))), 128))
|
|
2267
2311
|
]),
|
|
2268
2312
|
_: 2
|
|
2269
|
-
}, 1032, ["modelValue", "onUpdate:modelValue", "placeholder", "filterable"])) : u.search.type === "treeSelectApi" ? (s(),
|
|
2313
|
+
}, 1032, ["modelValue", "onUpdate:modelValue", "placeholder", "filterable"])) : u.search.type === "treeSelectApi" ? (s(), f(se, {
|
|
2270
2314
|
key: 6,
|
|
2271
|
-
modelValue:
|
|
2272
|
-
"onUpdate:modelValue": (m) =>
|
|
2315
|
+
modelValue: o($)[u.search.prop],
|
|
2316
|
+
"onUpdate:modelValue": (m) => o($)[u.search.prop] = m,
|
|
2273
2317
|
data: u.search.data,
|
|
2274
2318
|
props: u.search.props,
|
|
2275
2319
|
"value-key": u.search.valueKey,
|
|
@@ -2279,22 +2323,22 @@ const Tl = { key: 20 }, El = { class: "color-picker-tips" }, Ul = /* @__PURE__ *
|
|
|
2279
2323
|
"check-strictly": "",
|
|
2280
2324
|
clearable: "",
|
|
2281
2325
|
onChange: k
|
|
2282
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "data", "props", "value-key", "default-expanded-keys", "placeholder"])) : u.search.type === "number" ? (s(),
|
|
2326
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "data", "props", "value-key", "default-expanded-keys", "placeholder"])) : u.search.type === "number" ? (s(), f(_, {
|
|
2283
2327
|
key: 7,
|
|
2284
2328
|
type: "number",
|
|
2285
|
-
modelValue:
|
|
2286
|
-
"onUpdate:modelValue": (m) =>
|
|
2329
|
+
modelValue: o($)[u.search.prop],
|
|
2330
|
+
"onUpdate:modelValue": (m) => o($)[u.search.prop] = m,
|
|
2287
2331
|
placeholder: d.$t("請輸入"),
|
|
2288
2332
|
style: { width: "100%" },
|
|
2289
2333
|
clearable: ""
|
|
2290
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])) : (s(),
|
|
2334
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])) : (s(), f(_, {
|
|
2291
2335
|
key: 8,
|
|
2292
2336
|
type: "text",
|
|
2293
|
-
modelValue:
|
|
2294
|
-
"onUpdate:modelValue": (m) =>
|
|
2337
|
+
modelValue: o($)[u.search.prop],
|
|
2338
|
+
"onUpdate:modelValue": (m) => o($)[u.search.prop] = m,
|
|
2295
2339
|
style: { width: "100%" },
|
|
2296
2340
|
placeholder: d.$t("請輸入"),
|
|
2297
|
-
onKeyup:
|
|
2341
|
+
onKeyup: Ze(k, ["enter"]),
|
|
2298
2342
|
clearable: ""
|
|
2299
2343
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"]))
|
|
2300
2344
|
]),
|
|
@@ -2303,58 +2347,58 @@ const Tl = { key: 20 }, El = { class: "color-picker-tips" }, Ul = /* @__PURE__ *
|
|
|
2303
2347
|
]),
|
|
2304
2348
|
_: 2
|
|
2305
2349
|
}, 1032, ["span"]))), 128)),
|
|
2306
|
-
|
|
2350
|
+
R(q, { span: o(F) }, {
|
|
2307
2351
|
default: b(() => {
|
|
2308
2352
|
var u;
|
|
2309
2353
|
return [
|
|
2310
|
-
|
|
2354
|
+
R(Y, {
|
|
2311
2355
|
onClick: k,
|
|
2312
2356
|
plain: ""
|
|
2313
2357
|
}, {
|
|
2314
2358
|
default: b(() => [
|
|
2315
|
-
|
|
2359
|
+
z(M(d.$t("查詢")), 1)
|
|
2316
2360
|
]),
|
|
2317
2361
|
_: 1
|
|
2318
2362
|
}),
|
|
2319
|
-
|
|
2363
|
+
R(Y, {
|
|
2320
2364
|
onClick: W,
|
|
2321
2365
|
plain: ""
|
|
2322
2366
|
}, {
|
|
2323
2367
|
default: b(() => [
|
|
2324
|
-
|
|
2368
|
+
z(M(d.$t("清空")), 1)
|
|
2325
2369
|
]),
|
|
2326
2370
|
_: 1
|
|
2327
2371
|
}),
|
|
2328
|
-
|
|
2372
|
+
o(h) ? de((s(), f(Y, {
|
|
2329
2373
|
key: 0,
|
|
2330
|
-
type:
|
|
2331
|
-
icon:
|
|
2374
|
+
type: o(h).cssType,
|
|
2375
|
+
icon: o(h).icon,
|
|
2332
2376
|
plain: "",
|
|
2333
|
-
onClick: C[0] || (C[0] = (m) =>
|
|
2377
|
+
onClick: C[0] || (C[0] = (m) => j(o(h)))
|
|
2334
2378
|
}, {
|
|
2335
2379
|
default: b(() => [
|
|
2336
|
-
|
|
2380
|
+
z(M(d.$t(o(h).text || "新增")), 1)
|
|
2337
2381
|
]),
|
|
2338
2382
|
_: 1
|
|
2339
2383
|
}, 8, ["type", "icon"])), [
|
|
2340
|
-
[ce,
|
|
2384
|
+
[ce, o(h).permission || null]
|
|
2341
2385
|
]) : Z("", !0),
|
|
2342
|
-
i.dataSource.showBatchDeleteButton ? de((s(),
|
|
2386
|
+
i.dataSource.showBatchDeleteButton ? de((s(), f(Y, {
|
|
2343
2387
|
key: 1,
|
|
2344
2388
|
type: "danger",
|
|
2345
2389
|
icon: "Delete",
|
|
2346
2390
|
plain: "",
|
|
2347
2391
|
disabled: d.selectedCount === 0,
|
|
2348
|
-
onClick: C[1] || (C[1] = (m) =>
|
|
2392
|
+
onClick: C[1] || (C[1] = (m) => r("actionEvent", { action: "batchDelete" }))
|
|
2349
2393
|
}, {
|
|
2350
2394
|
default: b(() => [
|
|
2351
|
-
|
|
2395
|
+
z(M(d.$t("批量刪除")), 1)
|
|
2352
2396
|
]),
|
|
2353
2397
|
_: 1
|
|
2354
2398
|
}, 8, ["disabled"])), [
|
|
2355
|
-
[ce, ((u =
|
|
2399
|
+
[ce, ((u = o(V)) == null ? void 0 : u.permission) || null]
|
|
2356
2400
|
]) : Z("", !0),
|
|
2357
|
-
i.dataSource.exportUrl ? (s(),
|
|
2401
|
+
i.dataSource.exportUrl ? (s(), f(Y, {
|
|
2358
2402
|
key: 2,
|
|
2359
2403
|
type: "primary",
|
|
2360
2404
|
icon: "Download",
|
|
@@ -2362,19 +2406,19 @@ const Tl = { key: 20 }, El = { class: "color-picker-tips" }, Ul = /* @__PURE__ *
|
|
|
2362
2406
|
onClick: E
|
|
2363
2407
|
}, {
|
|
2364
2408
|
default: b(() => [
|
|
2365
|
-
|
|
2409
|
+
z(M(i.dataSource.exportButtonName || d.$t("導出")), 1)
|
|
2366
2410
|
]),
|
|
2367
2411
|
_: 1
|
|
2368
2412
|
})) : Z("", !0),
|
|
2369
|
-
(s(!0), T(
|
|
2413
|
+
(s(!0), T(B, null, Q(o(p), (m) => de((s(), f(Y, {
|
|
2370
2414
|
key: m.text,
|
|
2371
|
-
onClick: (n) =>
|
|
2415
|
+
onClick: (n) => j(m),
|
|
2372
2416
|
type: m.cssType,
|
|
2373
2417
|
icon: m.icon,
|
|
2374
2418
|
plain: ""
|
|
2375
2419
|
}, {
|
|
2376
2420
|
default: b(() => [
|
|
2377
|
-
|
|
2421
|
+
z(M(d.$t(m.text)), 1)
|
|
2378
2422
|
]),
|
|
2379
2423
|
_: 2
|
|
2380
2424
|
}, 1032, ["onClick", "type", "icon"])), [
|
|
@@ -2392,31 +2436,31 @@ const Tl = { key: 20 }, El = { class: "color-picker-tips" }, Ul = /* @__PURE__ *
|
|
|
2392
2436
|
}, 8, ["model", "label-width"])
|
|
2393
2437
|
]),
|
|
2394
2438
|
_: 1
|
|
2395
|
-
}, 8, ["body-style"])) :
|
|
2396
|
-
|
|
2397
|
-
model:
|
|
2439
|
+
}, 8, ["body-style"])) : o(U).length > 0 && !o(I) ? (s(), T("div", Ol, [
|
|
2440
|
+
R(ue, {
|
|
2441
|
+
model: o($),
|
|
2398
2442
|
inline: !0,
|
|
2399
2443
|
"label-width": i.dataSource.searchLabelWidth || 68
|
|
2400
2444
|
}, {
|
|
2401
2445
|
default: b(() => [
|
|
2402
|
-
|
|
2446
|
+
R(ne, { gutter: 20 }, {
|
|
2403
2447
|
default: b(() => [
|
|
2404
|
-
(s(!0), T(
|
|
2405
|
-
span:
|
|
2448
|
+
(s(!0), T(B, null, Q(o(U), (u) => (s(), f(q, {
|
|
2449
|
+
span: o(H),
|
|
2406
2450
|
key: u.search.prop
|
|
2407
2451
|
}, {
|
|
2408
2452
|
default: b(() => [
|
|
2409
|
-
|
|
2453
|
+
R(L, {
|
|
2410
2454
|
label: u.label,
|
|
2411
2455
|
name: u.search.prop,
|
|
2412
2456
|
style: { width: "100%" },
|
|
2413
2457
|
"label-width": u.search.labelWidth
|
|
2414
2458
|
}, {
|
|
2415
2459
|
default: b(() => [
|
|
2416
|
-
u.search.type === "daterange" ? (s(),
|
|
2460
|
+
u.search.type === "daterange" ? (s(), f(A, {
|
|
2417
2461
|
key: 0,
|
|
2418
|
-
modelValue:
|
|
2419
|
-
"onUpdate:modelValue": (m) =>
|
|
2462
|
+
modelValue: o($)[u.search.prop],
|
|
2463
|
+
"onUpdate:modelValue": (m) => o($)[u.search.prop] = m,
|
|
2420
2464
|
type: "daterange",
|
|
2421
2465
|
format: "YYYY-MM-DD",
|
|
2422
2466
|
"value-format": "YYYY-MM-DD",
|
|
@@ -2426,10 +2470,10 @@ const Tl = { key: 20 }, El = { class: "color-picker-tips" }, Ul = /* @__PURE__ *
|
|
|
2426
2470
|
style: { width: "100%" },
|
|
2427
2471
|
clearable: "",
|
|
2428
2472
|
onChange: k
|
|
2429
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "range-separator", "start-placeholder", "end-placeholder"])) : u.search.type === "timerange" ? (s(),
|
|
2473
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "range-separator", "start-placeholder", "end-placeholder"])) : u.search.type === "timerange" ? (s(), f(A, {
|
|
2430
2474
|
key: 1,
|
|
2431
|
-
modelValue:
|
|
2432
|
-
"onUpdate:modelValue": (m) =>
|
|
2475
|
+
modelValue: o($)[u.search.prop],
|
|
2476
|
+
"onUpdate:modelValue": (m) => o($)[u.search.prop] = m,
|
|
2433
2477
|
type: "datetimerange",
|
|
2434
2478
|
format: "YYYY-MM-DD HH:mm",
|
|
2435
2479
|
"value-format": "YYYY-MM-DD HH:mm:ss",
|
|
@@ -2439,10 +2483,10 @@ const Tl = { key: 20 }, El = { class: "color-picker-tips" }, Ul = /* @__PURE__ *
|
|
|
2439
2483
|
style: { width: "100%" },
|
|
2440
2484
|
clearable: "",
|
|
2441
2485
|
onChange: k
|
|
2442
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "range-separator", "start-placeholder", "end-placeholder"])) : u.search.type === "selectApi" ? (s(),
|
|
2486
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "range-separator", "start-placeholder", "end-placeholder"])) : u.search.type === "selectApi" ? (s(), f(G, {
|
|
2443
2487
|
key: 2,
|
|
2444
|
-
modelValue:
|
|
2445
|
-
"onUpdate:modelValue": (m) =>
|
|
2488
|
+
modelValue: o($)[u.search.prop],
|
|
2489
|
+
"onUpdate:modelValue": (m) => o($)[u.search.prop] = m,
|
|
2446
2490
|
placeholder: d.$t("請選擇"),
|
|
2447
2491
|
style: { width: "100%" },
|
|
2448
2492
|
clearable: "",
|
|
@@ -2450,17 +2494,17 @@ const Tl = { key: 20 }, El = { class: "color-picker-tips" }, Ul = /* @__PURE__ *
|
|
|
2450
2494
|
filterable: u.search.filterable ?? !0
|
|
2451
2495
|
}, {
|
|
2452
2496
|
default: b(() => [
|
|
2453
|
-
(s(!0), T(
|
|
2497
|
+
(s(!0), T(B, null, Q(u.search.data, (m) => (s(), f(N, {
|
|
2454
2498
|
key: m[u.search.value],
|
|
2455
2499
|
label: m[u.search.label],
|
|
2456
2500
|
value: m[u.search.value]
|
|
2457
2501
|
}, null, 8, ["label", "value"]))), 128))
|
|
2458
2502
|
]),
|
|
2459
2503
|
_: 2
|
|
2460
|
-
}, 1032, ["modelValue", "onUpdate:modelValue", "placeholder", "filterable"])) : u.search.type === "selectData" ? (s(),
|
|
2504
|
+
}, 1032, ["modelValue", "onUpdate:modelValue", "placeholder", "filterable"])) : u.search.type === "selectData" ? (s(), f(G, {
|
|
2461
2505
|
key: 3,
|
|
2462
|
-
modelValue:
|
|
2463
|
-
"onUpdate:modelValue": (m) =>
|
|
2506
|
+
modelValue: o($)[u.search.prop],
|
|
2507
|
+
"onUpdate:modelValue": (m) => o($)[u.search.prop] = m,
|
|
2464
2508
|
placeholder: d.$t("請選擇"),
|
|
2465
2509
|
style: { width: "100%" },
|
|
2466
2510
|
clearable: "",
|
|
@@ -2468,17 +2512,17 @@ const Tl = { key: 20 }, El = { class: "color-picker-tips" }, Ul = /* @__PURE__ *
|
|
|
2468
2512
|
filterable: u.search.filterable ?? !0
|
|
2469
2513
|
}, {
|
|
2470
2514
|
default: b(() => [
|
|
2471
|
-
(s(!0), T(
|
|
2515
|
+
(s(!0), T(B, null, Q(u.search.data, (m) => (s(), f(N, {
|
|
2472
2516
|
key: m[u.search.value],
|
|
2473
2517
|
label: m[u.search.label],
|
|
2474
2518
|
value: m[u.search.value]
|
|
2475
2519
|
}, null, 8, ["label", "value"]))), 128))
|
|
2476
2520
|
]),
|
|
2477
2521
|
_: 2
|
|
2478
|
-
}, 1032, ["modelValue", "onUpdate:modelValue", "placeholder", "filterable"])) : u.search.type === "selectDict" ? (s(),
|
|
2522
|
+
}, 1032, ["modelValue", "onUpdate:modelValue", "placeholder", "filterable"])) : u.search.type === "selectDict" ? (s(), f(G, {
|
|
2479
2523
|
key: 4,
|
|
2480
|
-
modelValue:
|
|
2481
|
-
"onUpdate:modelValue": (m) =>
|
|
2524
|
+
modelValue: o($)[u.search.prop],
|
|
2525
|
+
"onUpdate:modelValue": (m) => o($)[u.search.prop] = m,
|
|
2482
2526
|
placeholder: d.$t("請選擇"),
|
|
2483
2527
|
style: { width: "100%" },
|
|
2484
2528
|
clearable: "",
|
|
@@ -2486,17 +2530,17 @@ const Tl = { key: 20 }, El = { class: "color-picker-tips" }, Ul = /* @__PURE__ *
|
|
|
2486
2530
|
filterable: u.search.filterable ?? !0
|
|
2487
2531
|
}, {
|
|
2488
2532
|
default: b(() => [
|
|
2489
|
-
(s(!0), T(
|
|
2533
|
+
(s(!0), T(B, null, Q(u.search.data || [], (m) => (s(), f(N, {
|
|
2490
2534
|
key: m[u.search.value] || m.value,
|
|
2491
2535
|
label: m[u.search.label] || m.label,
|
|
2492
2536
|
value: m[u.search.value] || m.value
|
|
2493
2537
|
}, null, 8, ["label", "value"]))), 128))
|
|
2494
2538
|
]),
|
|
2495
2539
|
_: 2
|
|
2496
|
-
}, 1032, ["modelValue", "onUpdate:modelValue", "placeholder", "filterable"])) : u.search.type === "selectCommonDict" ? (s(),
|
|
2540
|
+
}, 1032, ["modelValue", "onUpdate:modelValue", "placeholder", "filterable"])) : u.search.type === "selectCommonDict" ? (s(), f(G, {
|
|
2497
2541
|
key: 5,
|
|
2498
|
-
modelValue:
|
|
2499
|
-
"onUpdate:modelValue": (m) =>
|
|
2542
|
+
modelValue: o($)[u.search.prop],
|
|
2543
|
+
"onUpdate:modelValue": (m) => o($)[u.search.prop] = m,
|
|
2500
2544
|
placeholder: d.$t("請選擇"),
|
|
2501
2545
|
style: { width: "100%" },
|
|
2502
2546
|
clearable: "",
|
|
@@ -2504,17 +2548,17 @@ const Tl = { key: 20 }, El = { class: "color-picker-tips" }, Ul = /* @__PURE__ *
|
|
|
2504
2548
|
filterable: u.search.filterable ?? !0
|
|
2505
2549
|
}, {
|
|
2506
2550
|
default: b(() => [
|
|
2507
|
-
(s(!0), T(
|
|
2551
|
+
(s(!0), T(B, null, Q(u.search.data || [], (m) => (s(), f(N, {
|
|
2508
2552
|
key: m[u.search.value] || m.value,
|
|
2509
2553
|
label: m[u.search.label] || m.label,
|
|
2510
2554
|
value: m[u.search.value] || m.value
|
|
2511
2555
|
}, null, 8, ["label", "value"]))), 128))
|
|
2512
2556
|
]),
|
|
2513
2557
|
_: 2
|
|
2514
|
-
}, 1032, ["modelValue", "onUpdate:modelValue", "placeholder", "filterable"])) : u.search.type === "treeSelectApi" ? (s(),
|
|
2558
|
+
}, 1032, ["modelValue", "onUpdate:modelValue", "placeholder", "filterable"])) : u.search.type === "treeSelectApi" ? (s(), f(se, {
|
|
2515
2559
|
key: 6,
|
|
2516
|
-
modelValue:
|
|
2517
|
-
"onUpdate:modelValue": (m) =>
|
|
2560
|
+
modelValue: o($)[u.search.prop],
|
|
2561
|
+
"onUpdate:modelValue": (m) => o($)[u.search.prop] = m,
|
|
2518
2562
|
data: u.search.data,
|
|
2519
2563
|
props: u.search.props,
|
|
2520
2564
|
"value-key": u.search.valueKey,
|
|
@@ -2524,22 +2568,22 @@ const Tl = { key: 20 }, El = { class: "color-picker-tips" }, Ul = /* @__PURE__ *
|
|
|
2524
2568
|
"check-strictly": "",
|
|
2525
2569
|
clearable: "",
|
|
2526
2570
|
onChange: k
|
|
2527
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "data", "props", "value-key", "default-expanded-keys", "placeholder"])) : u.search.type === "number" ? (s(),
|
|
2571
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "data", "props", "value-key", "default-expanded-keys", "placeholder"])) : u.search.type === "number" ? (s(), f(_, {
|
|
2528
2572
|
key: 7,
|
|
2529
2573
|
type: "number",
|
|
2530
|
-
modelValue:
|
|
2531
|
-
"onUpdate:modelValue": (m) =>
|
|
2574
|
+
modelValue: o($)[u.search.prop],
|
|
2575
|
+
"onUpdate:modelValue": (m) => o($)[u.search.prop] = m,
|
|
2532
2576
|
placeholder: d.$t("請輸入"),
|
|
2533
2577
|
style: { width: "100%" },
|
|
2534
2578
|
clearable: ""
|
|
2535
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])) : (s(),
|
|
2579
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])) : (s(), f(_, {
|
|
2536
2580
|
key: 8,
|
|
2537
2581
|
type: "text",
|
|
2538
|
-
modelValue:
|
|
2539
|
-
"onUpdate:modelValue": (m) =>
|
|
2582
|
+
modelValue: o($)[u.search.prop],
|
|
2583
|
+
"onUpdate:modelValue": (m) => o($)[u.search.prop] = m,
|
|
2540
2584
|
style: { width: "100%" },
|
|
2541
2585
|
placeholder: d.$t("請輸入"),
|
|
2542
|
-
onKeyup:
|
|
2586
|
+
onKeyup: Ze(k, ["enter"]),
|
|
2543
2587
|
clearable: ""
|
|
2544
2588
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"]))
|
|
2545
2589
|
]),
|
|
@@ -2548,58 +2592,58 @@ const Tl = { key: 20 }, El = { class: "color-picker-tips" }, Ul = /* @__PURE__ *
|
|
|
2548
2592
|
]),
|
|
2549
2593
|
_: 2
|
|
2550
2594
|
}, 1032, ["span"]))), 128)),
|
|
2551
|
-
|
|
2595
|
+
R(q, { span: o(F) }, {
|
|
2552
2596
|
default: b(() => {
|
|
2553
2597
|
var u;
|
|
2554
2598
|
return [
|
|
2555
|
-
|
|
2599
|
+
R(Y, {
|
|
2556
2600
|
onClick: k,
|
|
2557
2601
|
plain: ""
|
|
2558
2602
|
}, {
|
|
2559
2603
|
default: b(() => [
|
|
2560
|
-
|
|
2604
|
+
z(M(d.$t("查詢")), 1)
|
|
2561
2605
|
]),
|
|
2562
2606
|
_: 1
|
|
2563
2607
|
}),
|
|
2564
|
-
|
|
2608
|
+
R(Y, {
|
|
2565
2609
|
onClick: W,
|
|
2566
2610
|
plain: ""
|
|
2567
2611
|
}, {
|
|
2568
2612
|
default: b(() => [
|
|
2569
|
-
|
|
2613
|
+
z(M(d.$t("清空")), 1)
|
|
2570
2614
|
]),
|
|
2571
2615
|
_: 1
|
|
2572
2616
|
}),
|
|
2573
|
-
|
|
2617
|
+
o(h) ? de((s(), f(Y, {
|
|
2574
2618
|
key: 0,
|
|
2575
|
-
type:
|
|
2576
|
-
icon:
|
|
2619
|
+
type: o(h).cssType,
|
|
2620
|
+
icon: o(h).icon,
|
|
2577
2621
|
plain: "",
|
|
2578
|
-
onClick: C[2] || (C[2] = (m) =>
|
|
2622
|
+
onClick: C[2] || (C[2] = (m) => j(o(h)))
|
|
2579
2623
|
}, {
|
|
2580
2624
|
default: b(() => [
|
|
2581
|
-
|
|
2625
|
+
z(M(d.$t(o(h).text || "新增")), 1)
|
|
2582
2626
|
]),
|
|
2583
2627
|
_: 1
|
|
2584
2628
|
}, 8, ["type", "icon"])), [
|
|
2585
|
-
[ce,
|
|
2629
|
+
[ce, o(h).permission || null]
|
|
2586
2630
|
]) : Z("", !0),
|
|
2587
|
-
i.dataSource.showBatchDeleteButton ? de((s(),
|
|
2631
|
+
i.dataSource.showBatchDeleteButton ? de((s(), f(Y, {
|
|
2588
2632
|
key: 1,
|
|
2589
2633
|
type: "danger",
|
|
2590
2634
|
icon: "Delete",
|
|
2591
2635
|
plain: "",
|
|
2592
2636
|
disabled: d.selectedCount === 0,
|
|
2593
|
-
onClick: C[3] || (C[3] = (m) =>
|
|
2637
|
+
onClick: C[3] || (C[3] = (m) => r("actionEvent", { action: "batchDelete" }))
|
|
2594
2638
|
}, {
|
|
2595
2639
|
default: b(() => [
|
|
2596
|
-
|
|
2640
|
+
z(M(d.$t("批量刪除")), 1)
|
|
2597
2641
|
]),
|
|
2598
2642
|
_: 1
|
|
2599
2643
|
}, 8, ["disabled"])), [
|
|
2600
|
-
[ce, ((u =
|
|
2644
|
+
[ce, ((u = o(V)) == null ? void 0 : u.permission) || null]
|
|
2601
2645
|
]) : Z("", !0),
|
|
2602
|
-
i.dataSource.exportUrl ? (s(),
|
|
2646
|
+
i.dataSource.exportUrl ? (s(), f(Y, {
|
|
2603
2647
|
key: 2,
|
|
2604
2648
|
type: "primary",
|
|
2605
2649
|
icon: "Download",
|
|
@@ -2607,19 +2651,19 @@ const Tl = { key: 20 }, El = { class: "color-picker-tips" }, Ul = /* @__PURE__ *
|
|
|
2607
2651
|
onClick: E
|
|
2608
2652
|
}, {
|
|
2609
2653
|
default: b(() => [
|
|
2610
|
-
|
|
2654
|
+
z(M(d.$t("導出")), 1)
|
|
2611
2655
|
]),
|
|
2612
2656
|
_: 1
|
|
2613
2657
|
})) : Z("", !0),
|
|
2614
|
-
(s(!0), T(
|
|
2658
|
+
(s(!0), T(B, null, Q(o(p), (m) => de((s(), f(Y, {
|
|
2615
2659
|
key: m.text,
|
|
2616
|
-
onClick: (n) =>
|
|
2660
|
+
onClick: (n) => j(m),
|
|
2617
2661
|
type: m.cssType,
|
|
2618
2662
|
icon: m.icon,
|
|
2619
2663
|
plain: ""
|
|
2620
2664
|
}, {
|
|
2621
2665
|
default: b(() => [
|
|
2622
|
-
|
|
2666
|
+
z(M(d.$t(m.text)), 1)
|
|
2623
2667
|
]),
|
|
2624
2668
|
_: 2
|
|
2625
2669
|
}, 1032, ["onClick", "type", "icon"])), [
|
|
@@ -2635,37 +2679,37 @@ const Tl = { key: 20 }, El = { class: "color-picker-tips" }, Ul = /* @__PURE__ *
|
|
|
2635
2679
|
]),
|
|
2636
2680
|
_: 1
|
|
2637
2681
|
}, 8, ["model", "label-width"])
|
|
2638
|
-
])) :
|
|
2639
|
-
|
|
2682
|
+
])) : o(y).length > 0 ? (s(), T("div", Il, [
|
|
2683
|
+
o(h) ? de((s(), f(Y, {
|
|
2640
2684
|
key: 0,
|
|
2641
|
-
type:
|
|
2642
|
-
icon:
|
|
2685
|
+
type: o(h).cssType,
|
|
2686
|
+
icon: o(h).icon,
|
|
2643
2687
|
plain: "",
|
|
2644
|
-
onClick: C[4] || (C[4] = (u) =>
|
|
2688
|
+
onClick: C[4] || (C[4] = (u) => j(o(h)))
|
|
2645
2689
|
}, {
|
|
2646
2690
|
default: b(() => [
|
|
2647
|
-
|
|
2691
|
+
z(M(o(h).text || d.$t("新增")), 1)
|
|
2648
2692
|
]),
|
|
2649
2693
|
_: 1
|
|
2650
2694
|
}, 8, ["type", "icon"])), [
|
|
2651
|
-
[ce,
|
|
2695
|
+
[ce, o(h).permission || null]
|
|
2652
2696
|
]) : Z("", !0),
|
|
2653
|
-
i.dataSource.showBatchDeleteButton ? de((s(),
|
|
2697
|
+
i.dataSource.showBatchDeleteButton ? de((s(), f(Y, {
|
|
2654
2698
|
key: 1,
|
|
2655
2699
|
type: "danger",
|
|
2656
2700
|
icon: "Delete",
|
|
2657
2701
|
plain: "",
|
|
2658
2702
|
disabled: d.selectedCount === 0,
|
|
2659
|
-
onClick: C[5] || (C[5] = (u) =>
|
|
2703
|
+
onClick: C[5] || (C[5] = (u) => r("actionEvent", { action: "batchDelete" }))
|
|
2660
2704
|
}, {
|
|
2661
2705
|
default: b(() => [
|
|
2662
|
-
|
|
2706
|
+
z(M(d.$t("批量刪除")), 1)
|
|
2663
2707
|
]),
|
|
2664
2708
|
_: 1
|
|
2665
2709
|
}, 8, ["disabled"])), [
|
|
2666
|
-
[ce, ((ye =
|
|
2710
|
+
[ce, ((ye = o(V)) == null ? void 0 : ye.permission) || null]
|
|
2667
2711
|
]) : Z("", !0),
|
|
2668
|
-
i.dataSource.exportUrl ? (s(),
|
|
2712
|
+
i.dataSource.exportUrl ? (s(), f(Y, {
|
|
2669
2713
|
key: 2,
|
|
2670
2714
|
type: "primary",
|
|
2671
2715
|
icon: "Download",
|
|
@@ -2673,19 +2717,19 @@ const Tl = { key: 20 }, El = { class: "color-picker-tips" }, Ul = /* @__PURE__ *
|
|
|
2673
2717
|
onClick: E
|
|
2674
2718
|
}, {
|
|
2675
2719
|
default: b(() => [
|
|
2676
|
-
|
|
2720
|
+
z(M(i.dataSource.exportButtonName || d.$t("導出")), 1)
|
|
2677
2721
|
]),
|
|
2678
2722
|
_: 1
|
|
2679
2723
|
})) : Z("", !0),
|
|
2680
|
-
(s(!0), T(
|
|
2724
|
+
(s(!0), T(B, null, Q(o(p), (u) => de((s(), f(Y, {
|
|
2681
2725
|
key: u.text,
|
|
2682
|
-
onClick: (m) =>
|
|
2726
|
+
onClick: (m) => j(u),
|
|
2683
2727
|
type: u.cssType,
|
|
2684
2728
|
icon: u.icon,
|
|
2685
2729
|
plain: ""
|
|
2686
2730
|
}, {
|
|
2687
2731
|
default: b(() => [
|
|
2688
|
-
|
|
2732
|
+
z(M(d.$t(u.text)), 1)
|
|
2689
2733
|
]),
|
|
2690
2734
|
_: 2
|
|
2691
2735
|
}, 1032, ["onClick", "type", "icon"])), [
|
|
@@ -2694,7 +2738,7 @@ const Tl = { key: 20 }, El = { class: "color-picker-tips" }, Ul = /* @__PURE__ *
|
|
|
2694
2738
|
])) : Z("", !0);
|
|
2695
2739
|
};
|
|
2696
2740
|
}
|
|
2697
|
-
}),
|
|
2741
|
+
}), Ll = /* @__PURE__ */ be(xl, [["__scopeId", "data-v-fbfbd6fe"]]), ja = {
|
|
2698
2742
|
// ============ 搜索欄 ============
|
|
2699
2743
|
查詢: "查询",
|
|
2700
2744
|
清空: "清空",
|
|
@@ -2727,7 +2771,7 @@ const Tl = { key: 20 }, El = { class: "color-picker-tips" }, Ul = /* @__PURE__ *
|
|
|
2727
2771
|
請先勾選要刪除的數據: "请先勾选要删除的数据",
|
|
2728
2772
|
數據存儲成功: "数据存储成功",
|
|
2729
2773
|
導出失敗: "导出失败"
|
|
2730
|
-
},
|
|
2774
|
+
}, Ha = {
|
|
2731
2775
|
// ============ 搜索欄 ============
|
|
2732
2776
|
查詢: "查詢",
|
|
2733
2777
|
清空: "清空",
|
|
@@ -2760,7 +2804,7 @@ const Tl = { key: 20 }, El = { class: "color-picker-tips" }, Ul = /* @__PURE__ *
|
|
|
2760
2804
|
請先勾選要刪除的數據: "請先勾選要刪除的數據",
|
|
2761
2805
|
數據存儲成功: "數據存儲成功",
|
|
2762
2806
|
導出失敗: "導出失敗"
|
|
2763
|
-
},
|
|
2807
|
+
}, Fa = {
|
|
2764
2808
|
// ============ Search bar ============
|
|
2765
2809
|
查詢: "Search",
|
|
2766
2810
|
清空: "Clear",
|
|
@@ -2794,31 +2838,31 @@ const Tl = { key: 20 }, El = { class: "color-picker-tips" }, Ul = /* @__PURE__ *
|
|
|
2794
2838
|
數據存儲成功: "Data saved successfully",
|
|
2795
2839
|
導出失敗: "Export failed"
|
|
2796
2840
|
};
|
|
2797
|
-
let
|
|
2798
|
-
const
|
|
2799
|
-
zh_CN:
|
|
2800
|
-
zh_HK:
|
|
2801
|
-
en_US:
|
|
2841
|
+
let sa = !1;
|
|
2842
|
+
const zl = {
|
|
2843
|
+
zh_CN: ja,
|
|
2844
|
+
zh_HK: Ha,
|
|
2845
|
+
en_US: Fa
|
|
2802
2846
|
};
|
|
2803
|
-
function
|
|
2804
|
-
if (!
|
|
2847
|
+
function Bl() {
|
|
2848
|
+
if (!sa)
|
|
2805
2849
|
try {
|
|
2806
2850
|
const e = he();
|
|
2807
2851
|
if (!e) return;
|
|
2808
2852
|
const t = e.appContext.app.config.globalProperties.$i18n;
|
|
2809
2853
|
if (t) {
|
|
2810
2854
|
const a = t.global || t;
|
|
2811
|
-
for (const [c,
|
|
2812
|
-
if (a && typeof a.mergeLocaleMessage == "function" && a.mergeLocaleMessage(c,
|
|
2855
|
+
for (const [c, r] of Object.entries(zl))
|
|
2856
|
+
if (a && typeof a.mergeLocaleMessage == "function" && a.mergeLocaleMessage(c, r), a && a.messages) {
|
|
2813
2857
|
const i = a.messages[c] || {};
|
|
2814
|
-
a.messages[c] = { ...
|
|
2858
|
+
a.messages[c] = { ...r, ...i };
|
|
2815
2859
|
}
|
|
2816
|
-
|
|
2860
|
+
sa = !0;
|
|
2817
2861
|
}
|
|
2818
2862
|
} catch {
|
|
2819
2863
|
}
|
|
2820
2864
|
}
|
|
2821
|
-
const
|
|
2865
|
+
const Yl = { key: 1 }, Ml = /* @__PURE__ */ pe({
|
|
2822
2866
|
__name: "index",
|
|
2823
2867
|
props: {
|
|
2824
2868
|
dataSource: {},
|
|
@@ -2829,15 +2873,15 @@ const zl = { key: 1 }, Bl = /* @__PURE__ */ pe({
|
|
|
2829
2873
|
},
|
|
2830
2874
|
emits: ["actionEvent", "beforeQuery"],
|
|
2831
2875
|
setup(e, { expose: l, emit: t }) {
|
|
2832
|
-
const { proxy: a } = he(), c = t,
|
|
2833
|
-
() =>
|
|
2834
|
-
), y =
|
|
2835
|
-
const _ = (
|
|
2876
|
+
const { proxy: a } = he(), c = t, r = e, i = J(
|
|
2877
|
+
() => r.dataSource.maxHeight != null ? void 0 : r.maxHeight
|
|
2878
|
+
), y = x(!1), h = x({}), V = x({}), p = x(), j = x(), D = x(0), H = J(() => {
|
|
2879
|
+
const _ = (r.dataSource.columns || []).map((L) => L.slot).filter((L) => !!L);
|
|
2836
2880
|
return Array.from(new Set(_));
|
|
2837
|
-
}),
|
|
2881
|
+
}), I = (_) => {
|
|
2838
2882
|
D.value = Array.isArray(_) ? _.length : 0;
|
|
2839
|
-
},
|
|
2840
|
-
y.value = !1,
|
|
2883
|
+
}, F = (_ = !1) => {
|
|
2884
|
+
y.value = !1, h.value = {}, _ === !0 && X();
|
|
2841
2885
|
}, X = () => {
|
|
2842
2886
|
var _;
|
|
2843
2887
|
return (_ = p.value) == null ? void 0 : _.refreshTable();
|
|
@@ -2846,45 +2890,45 @@ const zl = { key: 1 }, Bl = /* @__PURE__ */ pe({
|
|
|
2846
2890
|
return await ((_ = p.value) == null ? void 0 : _.initData());
|
|
2847
2891
|
}, $ = () => {
|
|
2848
2892
|
var _;
|
|
2849
|
-
return (_ =
|
|
2850
|
-
}, U = async (_,
|
|
2851
|
-
let q =
|
|
2852
|
-
|
|
2853
|
-
}, k = (_,
|
|
2893
|
+
return (_ = j.value) == null ? void 0 : _.initData();
|
|
2894
|
+
}, U = async (_, L) => {
|
|
2895
|
+
let q = L;
|
|
2896
|
+
r.dataSource.beforeAction && (q = await r.dataSource.beforeAction(_, L)), k(_, q);
|
|
2897
|
+
}, k = (_, L) => {
|
|
2854
2898
|
if (typeof _.action == "function") {
|
|
2855
|
-
_.action(
|
|
2899
|
+
_.action(L);
|
|
2856
2900
|
return;
|
|
2857
2901
|
}
|
|
2858
2902
|
const Y = {
|
|
2859
|
-
update: () => E(_,
|
|
2860
|
-
delete: () =>
|
|
2903
|
+
update: () => E(_, L),
|
|
2904
|
+
delete: () => P(_, L),
|
|
2861
2905
|
batchDelete: () => W(),
|
|
2862
|
-
create: () => S(_,
|
|
2863
|
-
view: () => C(_,
|
|
2906
|
+
create: () => S(_, L),
|
|
2907
|
+
view: () => C(_, L),
|
|
2864
2908
|
filter: () => A(),
|
|
2865
2909
|
back: () => se()
|
|
2866
2910
|
}[_.action];
|
|
2867
|
-
Y ? Y() : c("actionEvent", _,
|
|
2868
|
-
}, E = async (_,
|
|
2869
|
-
|
|
2870
|
-
},
|
|
2911
|
+
Y ? Y() : c("actionEvent", _, L);
|
|
2912
|
+
}, E = async (_, L) => {
|
|
2913
|
+
r.dataSource.beforeUpdate && await r.dataSource.beforeUpdate(L) === !1 || (h.value = L, V.value = _, y.value = !0);
|
|
2914
|
+
}, P = async (_, L) => {
|
|
2871
2915
|
var q, Y, ne;
|
|
2872
2916
|
try {
|
|
2873
|
-
if (
|
|
2917
|
+
if (r.dataSource.beforeDelete && await r.dataSource.beforeDelete(L) === !1)
|
|
2874
2918
|
return;
|
|
2875
|
-
const ue =
|
|
2919
|
+
const ue = L[r.dataSource.rowKey];
|
|
2876
2920
|
if (!ue) {
|
|
2877
2921
|
a == null || a.$modal.msgError(a == null ? void 0 : a.$t("rowKey参数不正确"));
|
|
2878
2922
|
return;
|
|
2879
2923
|
}
|
|
2880
2924
|
const me = _.confirm || _.confirmText || (a == null ? void 0 : a.$t("確認刪除此數據嗎?"));
|
|
2881
|
-
await (a == null ? void 0 : a.$modal.confirm(me)), await ((Y = (q =
|
|
2925
|
+
await (a == null ? void 0 : a.$modal.confirm(me)), await ((Y = (q = r.dataSource).deleteApi) == null ? void 0 : Y.call(q, ue)), a == null || a.$modal.msgSuccess(a == null ? void 0 : a.$t("刪除成功")), (ne = p.value) == null || ne.refreshTable();
|
|
2882
2926
|
} catch (ue) {
|
|
2883
2927
|
ue !== "cancel" && console.error("Delete failed:", ue);
|
|
2884
2928
|
}
|
|
2885
2929
|
}, W = async () => {
|
|
2886
2930
|
var q, Y, ne, ue, me;
|
|
2887
|
-
if (!
|
|
2931
|
+
if (!r.dataSource.deleteApi) {
|
|
2888
2932
|
a == null || a.$modal.msgError(a == null ? void 0 : a.$t("deleteApi 方法未設置"));
|
|
2889
2933
|
return;
|
|
2890
2934
|
}
|
|
@@ -2894,20 +2938,20 @@ const zl = { key: 1 }, Bl = /* @__PURE__ */ pe({
|
|
|
2894
2938
|
return;
|
|
2895
2939
|
}
|
|
2896
2940
|
await (a == null ? void 0 : a.$modal.confirm(a == null ? void 0 : a.$t("確認刪除選中的 {count} 條數據嗎?", { count: _.length })));
|
|
2897
|
-
const
|
|
2941
|
+
const L = [];
|
|
2898
2942
|
for (const ce of _) {
|
|
2899
|
-
if (
|
|
2943
|
+
if (r.dataSource.beforeDelete && await r.dataSource.beforeDelete(ce) === !1)
|
|
2900
2944
|
continue;
|
|
2901
|
-
const ye = ce[
|
|
2902
|
-
ye != null &&
|
|
2945
|
+
const ye = ce[r.dataSource.rowKey];
|
|
2946
|
+
ye != null && L.push(ye);
|
|
2903
2947
|
}
|
|
2904
|
-
|
|
2905
|
-
}, S = async (_,
|
|
2906
|
-
|
|
2948
|
+
L.length && (await ((ue = (ne = r.dataSource).deleteApi) == null ? void 0 : ue.call(ne, L)), a == null || a.$modal.msgSuccess(a == null ? void 0 : a.$t("刪除成功")), (me = p.value) == null || me.refreshTable());
|
|
2949
|
+
}, S = async (_, L) => {
|
|
2950
|
+
r.dataSource.beforeCreate && await r.dataSource.beforeCreate(L || {}) === !1 || (h.value = L || {}, V.value = _, y.value = !0);
|
|
2907
2951
|
}, d = async (_ = {}) => {
|
|
2908
|
-
const
|
|
2952
|
+
const L = _ && (Object.prototype.hasOwnProperty.call(_, "data") || Object.prototype.hasOwnProperty.call(_, "title") || Object.prototype.hasOwnProperty.call(_, "text") || Object.prototype.hasOwnProperty.call(_, "width") || Object.prototype.hasOwnProperty.call(_, "labelWidth") || Object.prototype.hasOwnProperty.call(_, "labelPosition")), q = L ? _.data || {} : _ || {}, Y = {
|
|
2909
2953
|
action: "create",
|
|
2910
|
-
...
|
|
2954
|
+
...L ? {
|
|
2911
2955
|
title: _.title,
|
|
2912
2956
|
text: _.text,
|
|
2913
2957
|
width: _.width,
|
|
@@ -2916,128 +2960,128 @@ const zl = { key: 1 }, Bl = /* @__PURE__ */ pe({
|
|
|
2916
2960
|
} : {}
|
|
2917
2961
|
};
|
|
2918
2962
|
await S(Y, q);
|
|
2919
|
-
}, C = (_,
|
|
2963
|
+
}, C = (_, L) => {
|
|
2920
2964
|
let q = _.url;
|
|
2921
2965
|
const Y = _.pm;
|
|
2922
|
-
if (Y &&
|
|
2966
|
+
if (Y && L[Y]) {
|
|
2923
2967
|
const ne = q.includes("?") ? "&" : "?";
|
|
2924
|
-
q += `${ne}${Y}=${
|
|
2968
|
+
q += `${ne}${Y}=${L[Y]}`;
|
|
2925
2969
|
}
|
|
2926
2970
|
a == null || a.$router.push(q);
|
|
2927
2971
|
}, A = () => {
|
|
2928
|
-
var
|
|
2929
|
-
const _ = (
|
|
2972
|
+
var L, q;
|
|
2973
|
+
const _ = (L = j.value) == null ? void 0 : L.getQueryParams();
|
|
2930
2974
|
(q = p.value) == null || q.refreshTable(_ || {});
|
|
2931
|
-
},
|
|
2975
|
+
}, N = () => {
|
|
2932
2976
|
var _;
|
|
2933
|
-
return (_ =
|
|
2977
|
+
return (_ = j.value) == null ? void 0 : _.getQueryParams();
|
|
2934
2978
|
}, G = () => {
|
|
2935
2979
|
var _;
|
|
2936
2980
|
return (_ = p.value) == null ? void 0 : _.getSelection();
|
|
2937
2981
|
}, se = () => a == null ? void 0 : a.$router.back();
|
|
2938
|
-
return
|
|
2939
|
-
|
|
2940
|
-
}), l({ refreshTable: X, initSearch: $, initTable: ee, openCreate: d, getQueryParams:
|
|
2941
|
-
const q =
|
|
2982
|
+
return Ne(() => {
|
|
2983
|
+
Bl(), jt(r.dataSource.columns);
|
|
2984
|
+
}), l({ refreshTable: X, initSearch: $, initTable: ee, openCreate: d, getQueryParams: N, getSelection: G }), (_, L) => {
|
|
2985
|
+
const q = wa;
|
|
2942
2986
|
return s(), T("div", {
|
|
2943
|
-
class:
|
|
2987
|
+
class: Fe({ "p-3": _.showPadding })
|
|
2944
2988
|
}, [
|
|
2945
|
-
|
|
2946
|
-
dataSource:
|
|
2947
|
-
selectedCount:
|
|
2989
|
+
R(Ll, {
|
|
2990
|
+
dataSource: r.dataSource,
|
|
2991
|
+
selectedCount: o(D),
|
|
2948
2992
|
ref_key: "curdSearchRef",
|
|
2949
|
-
ref:
|
|
2993
|
+
ref: j,
|
|
2950
2994
|
onActionEvent: U
|
|
2951
2995
|
}, null, 8, ["dataSource", "selectedCount"]),
|
|
2952
|
-
_.showCard ? (s(),
|
|
2996
|
+
_.showCard ? (s(), f(q, {
|
|
2953
2997
|
key: 0,
|
|
2954
|
-
"body-style": { paddingBottom:
|
|
2998
|
+
"body-style": { paddingBottom: r.dataSource.paging === !1 ? "20px" : "0px" },
|
|
2955
2999
|
shadow: "hover"
|
|
2956
3000
|
}, {
|
|
2957
3001
|
default: b(() => [
|
|
2958
|
-
|
|
3002
|
+
R(oa, {
|
|
2959
3003
|
ref_key: "curdTableRef",
|
|
2960
3004
|
ref: p,
|
|
2961
3005
|
onActionEvent: U,
|
|
2962
|
-
onSelectionChange:
|
|
2963
|
-
dataSource:
|
|
2964
|
-
maxHeight:
|
|
2965
|
-
},
|
|
2966
|
-
Q(
|
|
3006
|
+
onSelectionChange: I,
|
|
3007
|
+
dataSource: r.dataSource,
|
|
3008
|
+
maxHeight: o(i)
|
|
3009
|
+
}, ze({ _: 2 }, [
|
|
3010
|
+
Q(o(H), (Y) => ({
|
|
2967
3011
|
name: Y,
|
|
2968
3012
|
fn: b((ne) => [
|
|
2969
|
-
|
|
3013
|
+
xe(_.$slots, Y, ea(aa(ne)))
|
|
2970
3014
|
])
|
|
2971
3015
|
}))
|
|
2972
3016
|
]), 1032, ["dataSource", "maxHeight"]),
|
|
2973
|
-
|
|
2974
|
-
onClose:
|
|
2975
|
-
modelValue:
|
|
2976
|
-
"onUpdate:modelValue":
|
|
2977
|
-
dataSource:
|
|
2978
|
-
action:
|
|
2979
|
-
editData:
|
|
3017
|
+
R(na, {
|
|
3018
|
+
onClose: F,
|
|
3019
|
+
modelValue: o(y),
|
|
3020
|
+
"onUpdate:modelValue": L[0] || (L[0] = (Y) => $e(y) ? y.value = Y : null),
|
|
3021
|
+
dataSource: r.dataSource,
|
|
3022
|
+
action: o(V),
|
|
3023
|
+
editData: o(h)
|
|
2980
3024
|
}, null, 8, ["modelValue", "dataSource", "action", "editData"])
|
|
2981
3025
|
]),
|
|
2982
3026
|
_: 3
|
|
2983
|
-
}, 8, ["body-style"])) : (s(), T("div",
|
|
2984
|
-
|
|
3027
|
+
}, 8, ["body-style"])) : (s(), T("div", Yl, [
|
|
3028
|
+
R(oa, {
|
|
2985
3029
|
ref_key: "curdTableRef",
|
|
2986
3030
|
ref: p,
|
|
2987
3031
|
onActionEvent: U,
|
|
2988
|
-
onSelectionChange:
|
|
2989
|
-
dataSource:
|
|
2990
|
-
maxHeight:
|
|
2991
|
-
},
|
|
2992
|
-
Q(
|
|
3032
|
+
onSelectionChange: I,
|
|
3033
|
+
dataSource: r.dataSource,
|
|
3034
|
+
maxHeight: o(i)
|
|
3035
|
+
}, ze({ _: 2 }, [
|
|
3036
|
+
Q(o(H), (Y) => ({
|
|
2993
3037
|
name: Y,
|
|
2994
3038
|
fn: b((ne) => [
|
|
2995
|
-
|
|
3039
|
+
xe(_.$slots, Y, ea(aa(ne)))
|
|
2996
3040
|
])
|
|
2997
3041
|
}))
|
|
2998
3042
|
]), 1032, ["dataSource", "maxHeight"]),
|
|
2999
|
-
|
|
3000
|
-
onClose:
|
|
3001
|
-
modelValue:
|
|
3002
|
-
"onUpdate:modelValue":
|
|
3003
|
-
dataSource:
|
|
3004
|
-
action:
|
|
3005
|
-
editData:
|
|
3043
|
+
R(na, {
|
|
3044
|
+
onClose: F,
|
|
3045
|
+
modelValue: o(y),
|
|
3046
|
+
"onUpdate:modelValue": L[1] || (L[1] = (Y) => $e(y) ? y.value = Y : null),
|
|
3047
|
+
dataSource: r.dataSource,
|
|
3048
|
+
action: o(V),
|
|
3049
|
+
editData: o(h)
|
|
3006
3050
|
}, null, 8, ["modelValue", "dataSource", "action", "editData"])
|
|
3007
3051
|
]))
|
|
3008
3052
|
], 2);
|
|
3009
3053
|
};
|
|
3010
3054
|
}
|
|
3011
|
-
}),
|
|
3055
|
+
}), ca = {
|
|
3012
3056
|
401: "认证失败,无法访问系统资源",
|
|
3013
3057
|
403: "当前操作没有权限",
|
|
3014
3058
|
404: "访问资源不存在",
|
|
3015
3059
|
default: "系统未知错误,请反馈给管理员"
|
|
3016
3060
|
};
|
|
3017
|
-
function
|
|
3018
|
-
const a =
|
|
3061
|
+
function Rl(e, l, t) {
|
|
3062
|
+
const a = Va.service({
|
|
3019
3063
|
text: "正在下載數據,請稍後",
|
|
3020
3064
|
background: "rgba(0, 0, 0, 0.7)"
|
|
3021
3065
|
});
|
|
3022
3066
|
return ke().post(e, l, {
|
|
3023
|
-
transformRequest: [(c) =>
|
|
3067
|
+
transformRequest: [(c) => Cl(c)],
|
|
3024
3068
|
headers: { "Content-Type": "application/x-www-form-urlencoded" },
|
|
3025
3069
|
responseType: "blob"
|
|
3026
3070
|
}).then(async (c) => {
|
|
3027
|
-
if (
|
|
3071
|
+
if (Tl(c)) {
|
|
3028
3072
|
const i = new Blob([c]);
|
|
3029
|
-
|
|
3073
|
+
St.saveAs(i, t);
|
|
3030
3074
|
} else {
|
|
3031
|
-
const i = await new Blob([c]).text(), y = JSON.parse(i),
|
|
3032
|
-
we.error(
|
|
3075
|
+
const i = await new Blob([c]).text(), y = JSON.parse(i), h = ca[y.code] || y.msg || ca.default;
|
|
3076
|
+
we.error(h);
|
|
3033
3077
|
}
|
|
3034
3078
|
a.close();
|
|
3035
3079
|
}).catch((c) => {
|
|
3036
3080
|
console.error(c), we.error("下载文件出现错误,请联系管理员!"), a.close();
|
|
3037
3081
|
});
|
|
3038
3082
|
}
|
|
3039
|
-
let
|
|
3040
|
-
const
|
|
3083
|
+
let ua;
|
|
3084
|
+
const jl = {
|
|
3041
3085
|
// 消息提示
|
|
3042
3086
|
msg(e) {
|
|
3043
3087
|
we.info(e);
|
|
@@ -3106,7 +3150,7 @@ const Ml = {
|
|
|
3106
3150
|
},
|
|
3107
3151
|
// 打开遮罩层
|
|
3108
3152
|
loading(e) {
|
|
3109
|
-
|
|
3153
|
+
ua = Va.service({
|
|
3110
3154
|
lock: !0,
|
|
3111
3155
|
text: e,
|
|
3112
3156
|
background: "rgba(0, 0, 0, 0.7)"
|
|
@@ -3114,40 +3158,40 @@ const Ml = {
|
|
|
3114
3158
|
},
|
|
3115
3159
|
// 关闭遮罩层
|
|
3116
3160
|
closeLoading() {
|
|
3117
|
-
|
|
3161
|
+
ua.close();
|
|
3118
3162
|
}
|
|
3119
3163
|
};
|
|
3120
|
-
function
|
|
3164
|
+
function Na(e) {
|
|
3121
3165
|
return ke()({
|
|
3122
3166
|
url: "/system/dict/data/type/" + e,
|
|
3123
3167
|
method: "get"
|
|
3124
3168
|
});
|
|
3125
3169
|
}
|
|
3126
|
-
function
|
|
3170
|
+
function Ka(e) {
|
|
3127
3171
|
return ke()({
|
|
3128
3172
|
url: "/system/common/dict/data/type/" + e,
|
|
3129
3173
|
method: "get"
|
|
3130
3174
|
});
|
|
3131
3175
|
}
|
|
3132
|
-
const ve =
|
|
3133
|
-
const e =
|
|
3176
|
+
const ve = $a("dict", () => {
|
|
3177
|
+
const e = x(/* @__PURE__ */ new Map());
|
|
3134
3178
|
return {
|
|
3135
3179
|
dict: e,
|
|
3136
|
-
getDict: (
|
|
3137
|
-
setDict: (
|
|
3138
|
-
if (!
|
|
3180
|
+
getDict: (r) => r && e.value.get(r) || null,
|
|
3181
|
+
setDict: (r, i) => {
|
|
3182
|
+
if (!r)
|
|
3139
3183
|
return !1;
|
|
3140
3184
|
try {
|
|
3141
|
-
return e.value.set(
|
|
3185
|
+
return e.value.set(r, i), !0;
|
|
3142
3186
|
} catch (y) {
|
|
3143
3187
|
return console.error("Error in setDict:", y), !1;
|
|
3144
3188
|
}
|
|
3145
3189
|
},
|
|
3146
|
-
removeDict: (
|
|
3147
|
-
if (!
|
|
3190
|
+
removeDict: (r) => {
|
|
3191
|
+
if (!r)
|
|
3148
3192
|
return !1;
|
|
3149
3193
|
try {
|
|
3150
|
-
return e.value.delete(
|
|
3194
|
+
return e.value.delete(r);
|
|
3151
3195
|
} catch (i) {
|
|
3152
3196
|
return console.error("Error in removeDict:", i), !1;
|
|
3153
3197
|
}
|
|
@@ -3156,127 +3200,127 @@ const ve = Sa("dict", () => {
|
|
|
3156
3200
|
e.value.clear();
|
|
3157
3201
|
}
|
|
3158
3202
|
};
|
|
3159
|
-
}),
|
|
3160
|
-
const l =
|
|
3203
|
+
}), Hl = (...e) => {
|
|
3204
|
+
const l = x({});
|
|
3161
3205
|
return e.forEach(async (t) => {
|
|
3162
3206
|
l.value[t] = [];
|
|
3163
3207
|
const a = ve().getDict(t);
|
|
3164
|
-
a ? l.value[t] = a : await
|
|
3208
|
+
a ? l.value[t] = a : await Na(t).then((c) => {
|
|
3165
3209
|
l.value[t] = c.data.map(
|
|
3166
|
-
(
|
|
3210
|
+
(r) => ({ label: r.dictLabel, value: r.dictValue, elTagType: r.listClass, elTagClass: r.cssClass })
|
|
3167
3211
|
), ve().setDict(t, l.value[t]);
|
|
3168
3212
|
});
|
|
3169
3213
|
}), l.value;
|
|
3170
|
-
},
|
|
3214
|
+
}, Fl = async (e) => {
|
|
3171
3215
|
const l = ve().getDict(e);
|
|
3172
3216
|
if (l && l.length > 0) return l;
|
|
3173
3217
|
{
|
|
3174
|
-
const a = (await
|
|
3218
|
+
const a = (await Na(e)).data.map(
|
|
3175
3219
|
(c) => ({ label: c.dictLabel, value: c.dictValue, elTagType: c.listClass, elTagClass: c.cssClass, remark: c.remark })
|
|
3176
3220
|
);
|
|
3177
3221
|
return ve().setDict(e, a), a;
|
|
3178
3222
|
}
|
|
3179
|
-
},
|
|
3180
|
-
const l =
|
|
3223
|
+
}, Nl = (...e) => {
|
|
3224
|
+
const l = x({});
|
|
3181
3225
|
return e.forEach(async (t) => {
|
|
3182
3226
|
l.value[t] = [];
|
|
3183
3227
|
const a = ve().getDict(t);
|
|
3184
|
-
a && a.length > 0 ? l.value[t] = a : await
|
|
3228
|
+
a && a.length > 0 ? l.value[t] = a : await Ka(t).then((c) => {
|
|
3185
3229
|
l.value[t] = c.data.map(
|
|
3186
|
-
(
|
|
3230
|
+
(r) => ({ label: r.dictLabel, value: r.dictValue, elTagType: r.listClass, elTagClass: r.cssClass, remark: r.remark })
|
|
3187
3231
|
), ve().setDict(t, l.value[t]);
|
|
3188
3232
|
});
|
|
3189
3233
|
}), l.value;
|
|
3190
|
-
},
|
|
3234
|
+
}, Kl = async (e) => {
|
|
3191
3235
|
const l = ve().getDict(e);
|
|
3192
3236
|
if (l && l.length > 0) return l;
|
|
3193
3237
|
{
|
|
3194
|
-
const a = (await
|
|
3238
|
+
const a = (await Ka(e)).data.map((c) => ({ label: c.dictLabel, value: c.dictValue, elTagType: c.listClass, elTagClass: c.cssClass }));
|
|
3195
3239
|
return ve().setDict(e, a), a;
|
|
3196
3240
|
}
|
|
3197
|
-
},
|
|
3241
|
+
}, Wl = {
|
|
3198
3242
|
beforeMount(e, { value: l, arg: t }) {
|
|
3199
3243
|
if (t === "callback")
|
|
3200
3244
|
e.$copyCallback = l;
|
|
3201
3245
|
else {
|
|
3202
3246
|
e.$copyValue = l;
|
|
3203
3247
|
const a = () => {
|
|
3204
|
-
|
|
3248
|
+
ql(e.$copyValue), e.$copyCallback && e.$copyCallback(e.$copyValue);
|
|
3205
3249
|
};
|
|
3206
3250
|
e.addEventListener("click", a), e.$destroyCopy = () => e.removeEventListener("click", a);
|
|
3207
3251
|
}
|
|
3208
3252
|
}
|
|
3209
3253
|
};
|
|
3210
|
-
function
|
|
3254
|
+
function ql(e, { target: l = document.body } = {}) {
|
|
3211
3255
|
const t = document.createElement("textarea"), a = document.activeElement;
|
|
3212
3256
|
t.value = e, t.setAttribute("readonly", ""), t.style.contain = "strict", t.style.position = "absolute", t.style.left = "-9999px", t.style.fontSize = "12pt";
|
|
3213
3257
|
const c = document.getSelection();
|
|
3214
|
-
let
|
|
3215
|
-
c && (
|
|
3258
|
+
let r;
|
|
3259
|
+
c && (r = (c == null ? void 0 : c.rangeCount) > 0 && c.getRangeAt(0)), l.append(t), t.select(), t.selectionStart = 0, t.selectionEnd = e.length;
|
|
3216
3260
|
let i = !1;
|
|
3217
3261
|
try {
|
|
3218
3262
|
i = document.execCommand("copy");
|
|
3219
3263
|
} catch (y) {
|
|
3220
3264
|
console.error(y);
|
|
3221
3265
|
}
|
|
3222
|
-
return t.remove(),
|
|
3266
|
+
return t.remove(), r && (c == null || c.removeAllRanges(), c == null || c.addRange(r)), a && a.focus(), i;
|
|
3223
3267
|
}
|
|
3224
|
-
const
|
|
3225
|
-
zh_CN:
|
|
3226
|
-
zh_HK:
|
|
3227
|
-
en_US:
|
|
3228
|
-
},
|
|
3229
|
-
Curd:
|
|
3230
|
-
DictTag:
|
|
3231
|
-
DictText:
|
|
3232
|
-
SvgIcon:
|
|
3233
|
-
OssImagePreview:
|
|
3234
|
-
OssFile:
|
|
3235
|
-
Editor:
|
|
3236
|
-
TranslateInput:
|
|
3237
|
-
ImageUpload:
|
|
3238
|
-
FileUpload:
|
|
3239
|
-
},
|
|
3240
|
-
l.baseUrl != null &&
|
|
3268
|
+
const Ql = {
|
|
3269
|
+
zh_CN: ja,
|
|
3270
|
+
zh_HK: Ha,
|
|
3271
|
+
en_US: Fa
|
|
3272
|
+
}, Gl = {
|
|
3273
|
+
Curd: Ml,
|
|
3274
|
+
DictTag: Ta,
|
|
3275
|
+
DictText: Ca,
|
|
3276
|
+
SvgIcon: Ke,
|
|
3277
|
+
OssImagePreview: Aa,
|
|
3278
|
+
OssFile: Pa,
|
|
3279
|
+
Editor: Ma,
|
|
3280
|
+
TranslateInput: Ya,
|
|
3281
|
+
ImageUpload: Ba,
|
|
3282
|
+
FileUpload: za
|
|
3283
|
+
}, Jl = (e, l = {}) => {
|
|
3284
|
+
l.baseUrl != null && At(l.baseUrl), l.request && Et(l.request), l.globalHeaders && Ut(l.globalHeaders), (l.hasPermi || l.hasRoles) && Qt(l);
|
|
3241
3285
|
try {
|
|
3242
3286
|
const a = e.config.globalProperties.$i18n;
|
|
3243
3287
|
if (a) {
|
|
3244
3288
|
const c = a.global || a;
|
|
3245
|
-
for (const [
|
|
3246
|
-
if (c && typeof c.mergeLocaleMessage == "function" && c.mergeLocaleMessage(
|
|
3247
|
-
const y = c.messages[
|
|
3248
|
-
c.messages[
|
|
3289
|
+
for (const [r, i] of Object.entries(Ql))
|
|
3290
|
+
if (c && typeof c.mergeLocaleMessage == "function" && c.mergeLocaleMessage(r, i), c && c.messages) {
|
|
3291
|
+
const y = c.messages[r] || {};
|
|
3292
|
+
c.messages[r] = { ...i, ...y };
|
|
3249
3293
|
}
|
|
3250
3294
|
}
|
|
3251
3295
|
} catch {
|
|
3252
3296
|
}
|
|
3253
|
-
for (const [a, c] of Object.entries(
|
|
3297
|
+
for (const [a, c] of Object.entries(Gl))
|
|
3254
3298
|
e.component(a, c);
|
|
3255
3299
|
const t = e.config.globalProperties;
|
|
3256
|
-
t.$modal =
|
|
3257
|
-
},
|
|
3300
|
+
t.$modal = jl, t.download = Rl, t.useDict = Hl, t.useOneDict = Fl, t.useOneCommonDict = Kl, t.useCommonDict = Nl, t.parseTime = wl, t.addDateRange = Vl, t.handleTree = Dl, t.selectDictLabel = Sl, t.selectDictLabels = $l, e.directive("hasPermi", Gt), e.directive("hasRoles", Jt), e.directive("copyText", Wl);
|
|
3301
|
+
}, io = { install: Jl };
|
|
3258
3302
|
export {
|
|
3259
|
-
|
|
3260
|
-
|
|
3261
|
-
|
|
3262
|
-
|
|
3263
|
-
|
|
3264
|
-
|
|
3265
|
-
|
|
3266
|
-
|
|
3267
|
-
|
|
3268
|
-
|
|
3269
|
-
|
|
3270
|
-
|
|
3271
|
-
|
|
3272
|
-
|
|
3303
|
+
Ml as Curd,
|
|
3304
|
+
Ta as DictTag,
|
|
3305
|
+
Ca as DictText,
|
|
3306
|
+
Ma as Editor,
|
|
3307
|
+
za as FileUpload,
|
|
3308
|
+
Ba as ImageUpload,
|
|
3309
|
+
Pa as OssFile,
|
|
3310
|
+
Aa as OssImagePreview,
|
|
3311
|
+
Ke as SvgIcon,
|
|
3312
|
+
Ya as TranslateInput,
|
|
3313
|
+
io as default,
|
|
3314
|
+
Rl as download,
|
|
3315
|
+
Qe as getBaseUrl,
|
|
3316
|
+
qe as getGlobalHeaders,
|
|
3273
3317
|
ke as getRequest,
|
|
3274
|
-
|
|
3275
|
-
|
|
3276
|
-
|
|
3277
|
-
|
|
3278
|
-
|
|
3279
|
-
|
|
3280
|
-
|
|
3318
|
+
Me as hasPermission,
|
|
3319
|
+
Jl as install,
|
|
3320
|
+
Ql as messages,
|
|
3321
|
+
At as setBaseUrl,
|
|
3322
|
+
Ut as setGlobalHeaders,
|
|
3323
|
+
Qt as setPermissionChecker,
|
|
3324
|
+
Et as setRequest
|
|
3281
3325
|
};
|
|
3282
3326
|
//# sourceMappingURL=vue3-curd.es.js.map
|