@xinlian-frontend/lui 0.0.1-beta.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -0
- package/assets/style.css +1 -0
- package/components/ApprovalSteps/index.d.ts +11 -0
- package/components/ApprovalSteps/index.vue.d.ts +10 -0
- package/components/ApprovalSteps/privite-type.d.ts +381 -0
- package/components/ApprovalSteps/type.d.ts +61 -0
- package/components/FilePreview/file-preview.vue.d.ts +6 -0
- package/components/FilePreview/index.d.ts +7 -0
- package/components/button/button.vue.d.ts +3 -0
- package/components/button/index.d.ts +4 -0
- package/components/button/type.d.ts +1 -0
- package/components/detail-layout/detail-layout.vue.d.ts +42 -0
- package/components/detail-layout/index.d.ts +2 -0
- package/components/detail-layout/type.d.ts +9 -0
- package/components/drawer/index.d.ts +107 -0
- package/components/drawer/index.vue.d.ts +51 -0
- package/components/drawer/type.d.ts +1 -0
- package/components/error-page/404.vue.d.ts +3 -0
- package/components/error-page/index.d.ts +4 -0
- package/components/filter-panel/filter-panel.vue.d.ts +36 -0
- package/components/filter-panel/index.d.ts +79 -0
- package/components/filter-panel/type.d.ts +28 -0
- package/components/fixed-footer/fixed-footer.vue.d.ts +13 -0
- package/components/fixed-footer/index.d.ts +2 -0
- package/components/form-footer/form-footer.vue.d.ts +13 -0
- package/components/form-footer/index.d.ts +15 -0
- package/components/form-footer/type.d.ts +36 -0
- package/components/form-section-page/form-section-page.vue.d.ts +13 -0
- package/components/form-section-page/index.d.ts +3 -0
- package/components/form-submit-page/form-submit-page-card.vue.d.ts +22 -0
- package/components/form-submit-page/form-submit-page.vue.d.ts +79 -0
- package/components/form-submit-page/index.d.ts +4 -0
- package/components/info-layout/index.d.ts +50 -0
- package/components/info-layout/info-layout.vue.d.ts +28 -0
- package/components/info-layout/type.d.ts +6 -0
- package/components/modal/index.d.ts +44 -0
- package/components/modal/index.vue.d.ts +25 -0
- package/components/page-table/index.d.ts +204 -0
- package/components/page-table/page-table.vue.d.ts +95 -0
- package/components/page-table/setting.vue.d.ts +10 -0
- package/components/page-table/type.d.ts +19 -0
- package/components/role-tree/index.d.ts +23 -0
- package/components/role-tree/role-tree-item.vue.d.ts +17 -0
- package/components/role-tree/role-tree.vue.d.ts +21 -0
- package/components/role-tree/type.d.ts +13 -0
- package/components/second-bar/SecondBar.vue.d.ts +16 -0
- package/components/second-bar/index.d.ts +22 -0
- package/components/section-block/index.d.ts +2 -0
- package/components/section-block/section-block.vue.d.ts +31 -0
- package/components/sign-status-flow/index.d.ts +12 -0
- package/components/sign-status-flow/sign-status-flow.vue.d.ts +9 -0
- package/components/sign-status-flow/type.d.ts +8 -0
- package/components/upload-file/constant.d.ts +18 -0
- package/components/upload-file/index.d.ts +170 -0
- package/components/upload-file/service.d.ts +4 -0
- package/components/upload-file/type.d.ts +8 -0
- package/components/upload-file/upload-file.vue.d.ts +48 -0
- package/components/upload-file/upload-image.vue.d.ts +46 -0
- package/exported-components.d.ts +19 -0
- package/index.d.ts +2 -0
- package/l-ui.es.js +3823 -0
- package/package.json +32 -0
- package/type.d.ts +9 -0
- package/utils/index.d.ts +3 -0
- package/vue-office-docx.js +5857 -0
- package/vue-office-excel.js +64323 -0
- package/vue-office-pdf.js +2012 -0
package/l-ui.es.js
ADDED
|
@@ -0,0 +1,3823 @@
|
|
|
1
|
+
import { defineComponent as ee, ref as R, createElementBlock as _, openBlock as c, createBlock as B, createVNode as P, Teleport as cn, createCommentVNode as L, unref as g, withCtx as C, Fragment as X, renderList as oe, toDisplayString as Y, createTextVNode as W, nextTick as He, computed as ce, createElementVNode as I, normalizeClass as Z, normalizeStyle as fn, onMounted as nt, onActivated as jn, onDeactivated as Xn, renderSlot as z, createSlots as Ke, mergeProps as xe, useCssVars as pn, withModifiers as hn, withKeys as Wn, watch as Oe, onUnmounted as Gn, normalizeProps as Pt, guardReactiveProps as At, onBeforeUnmount as qn, watchEffect as Jn, isRef as mn, resolveDynamicComponent as Qn, resolveComponent as ye, withDirectives as Zn, vShow as eo, mergeDefaults as gn, useAttrs as to } from "vue";
|
|
2
|
+
import { FileTextOutlined as no, RedoOutlined as vn, FullscreenExitOutlined as oo, FullscreenOutlined as ao, CloseOutlined as lo, SearchOutlined as io, MoreOutlined as ro } from "@ant-design/icons-vue";
|
|
3
|
+
import { Image as Xt, Modal as yn, Button as le, Empty as bn, Spin as Yt, PageHeader as so, Descriptions as uo, DescriptionsItem as co, Card as _n, Tabs as wn, TabPane as kn, Drawer as fo, Result as po, Form as Sn, FormItem as ho, Input as mo, Select as go, SelectOption as vo, RangePicker as Wt, Alert as yo, Table as Tn, message as En, theme as bo, ConfigProvider as _o, Tooltip as lt, Pagination as wo, Checkbox as Gt, CheckboxGroup as ko, Tag as So, Upload as Ot } from "ant-design-vue";
|
|
4
|
+
import { q as To } from "./vue-office-docx.js";
|
|
5
|
+
import { V as Eo } from "./vue-office-excel.js";
|
|
6
|
+
import { J as xo } from "./vue-office-pdf.js";
|
|
7
|
+
import { useRouter as $o } from "vue-router";
|
|
8
|
+
import { useVModel as tt, useDraggable as Co, useFullscreen as Do, useDebounceFn as qt, useDateFormat as Jt } from "@vueuse/core";
|
|
9
|
+
function pe(e, t) {
|
|
10
|
+
return e.install = (n) => {
|
|
11
|
+
for (const o of [e, ...Object.values({})])
|
|
12
|
+
n.component(o.name, o);
|
|
13
|
+
}, e;
|
|
14
|
+
}
|
|
15
|
+
const Io = { class: "file-preview-wrapper" }, No = ["src"], Po = {
|
|
16
|
+
key: 4,
|
|
17
|
+
class: "no-preview"
|
|
18
|
+
}, Ao = /* @__PURE__ */ ee({
|
|
19
|
+
__name: "file-preview",
|
|
20
|
+
setup(e, { expose: t }) {
|
|
21
|
+
const n = R(!1), o = R(""), a = R(""), l = R([]), r = R(!1), i = R(!1), s = ["png", "jpg", "jpeg", "gif", "bmp", "webp"], u = ["mp4", "webm", "ogg", "avi", "mov", "wmv", "flv", "mkv"], f = (m) => s.includes(m), d = (m) => u.includes(m);
|
|
22
|
+
function E(m) {
|
|
23
|
+
var D;
|
|
24
|
+
if (!m) return "";
|
|
25
|
+
const b = ((D = m.split("?")[0]) == null ? void 0 : D.split("#")[0]) ?? "", y = b.lastIndexOf(".");
|
|
26
|
+
return y === -1 ? "" : b.slice(y + 1).toLowerCase();
|
|
27
|
+
}
|
|
28
|
+
function w(m, b) {
|
|
29
|
+
const y = (b || E(m)).toLowerCase();
|
|
30
|
+
a.value = y, o.value = m, f(y) ? (l.value = [m], r.value = !0, He(() => {
|
|
31
|
+
i.value = !0;
|
|
32
|
+
}), n.value = !1) : (l.value = [], r.value = !1, i.value = !1, n.value = !0);
|
|
33
|
+
}
|
|
34
|
+
function k() {
|
|
35
|
+
console.log("close"), n.value = !1, o.value = "", a.value = "";
|
|
36
|
+
}
|
|
37
|
+
function x() {
|
|
38
|
+
r.value = !1, i.value = !1, l.value = [], o.value = "", a.value = "";
|
|
39
|
+
}
|
|
40
|
+
return t({
|
|
41
|
+
showDialog: w
|
|
42
|
+
}), (m, b) => (c(), _("div", Io, [
|
|
43
|
+
(c(), B(cn, { to: "body" }, [
|
|
44
|
+
r.value ? (c(), B(g(Xt).PreviewGroup, {
|
|
45
|
+
key: 0,
|
|
46
|
+
preview: {
|
|
47
|
+
visible: i.value,
|
|
48
|
+
onVisibleChange: (y) => {
|
|
49
|
+
i.value = y, y || x();
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}, {
|
|
53
|
+
default: C(() => [
|
|
54
|
+
(c(!0), _(X, null, oe(l.value, (y, D) => (c(), B(g(Xt), {
|
|
55
|
+
key: `${y}-${D}`,
|
|
56
|
+
src: y,
|
|
57
|
+
preview: { visible: i.value },
|
|
58
|
+
style: { position: "fixed", top: "-9999px", left: "-9999px", width: "1px", height: "1px", opacity: "0", "pointer-events": "none", "z-index": "-1" }
|
|
59
|
+
}, null, 8, ["src", "preview"]))), 128))
|
|
60
|
+
]),
|
|
61
|
+
_: 1
|
|
62
|
+
}, 8, ["preview"])) : L("", !0)
|
|
63
|
+
])),
|
|
64
|
+
P(g(yn), {
|
|
65
|
+
open: n.value,
|
|
66
|
+
"onUpdate:open": b[0] || (b[0] = (y) => n.value = y),
|
|
67
|
+
title: "文件预览",
|
|
68
|
+
"mask-closable": !1,
|
|
69
|
+
width: 1e3,
|
|
70
|
+
onOk: k,
|
|
71
|
+
onCancel: k
|
|
72
|
+
}, {
|
|
73
|
+
footer: C(() => [
|
|
74
|
+
P(g(le), { onClick: k }, {
|
|
75
|
+
default: C(() => [...b[1] || (b[1] = [
|
|
76
|
+
W("关闭", -1)
|
|
77
|
+
])]),
|
|
78
|
+
_: 1
|
|
79
|
+
})
|
|
80
|
+
]),
|
|
81
|
+
default: C(() => [
|
|
82
|
+
a.value === "pdf" ? (c(), B(g(xo), {
|
|
83
|
+
key: 0,
|
|
84
|
+
src: o.value
|
|
85
|
+
}, null, 8, ["src"])) : ["doc", "docx"].includes(a.value) ? (c(), B(g(To), {
|
|
86
|
+
key: 1,
|
|
87
|
+
src: o.value,
|
|
88
|
+
style: { border: "none", "box-shadow": "none" }
|
|
89
|
+
}, null, 8, ["src"])) : ["xls", "xlsx"].includes(a.value) ? (c(), B(g(Eo), {
|
|
90
|
+
key: 2,
|
|
91
|
+
src: o.value,
|
|
92
|
+
style: { border: "none", "box-shadow": "none" }
|
|
93
|
+
}, null, 8, ["src"])) : d(a.value) ? (c(), _("video", {
|
|
94
|
+
key: 3,
|
|
95
|
+
src: o.value,
|
|
96
|
+
controls: "",
|
|
97
|
+
style: { width: "100%" }
|
|
98
|
+
}, " 您的浏览器不支持视频播放 ", 8, No)) : (c(), _("div", Po, "暂不支持预览该文件类型:" + Y(a.value || "未知类型"), 1))
|
|
99
|
+
]),
|
|
100
|
+
_: 1
|
|
101
|
+
}, 8, ["open"])
|
|
102
|
+
]));
|
|
103
|
+
}
|
|
104
|
+
}), ae = (e, t) => {
|
|
105
|
+
const n = e.__vccOpts || e;
|
|
106
|
+
for (const [o, a] of t)
|
|
107
|
+
n[o] = a;
|
|
108
|
+
return n;
|
|
109
|
+
}, Vt = /* @__PURE__ */ ae(Ao, [["__scopeId", "data-v-99840b60"]]), Oo = pe(Vt), Fo = {
|
|
110
|
+
PENDING: "待审批",
|
|
111
|
+
RUNNING: "审批中",
|
|
112
|
+
PASS: "已通过",
|
|
113
|
+
REFUSE: "已驳回",
|
|
114
|
+
REVOKED: "已撤销",
|
|
115
|
+
DELETED: "已删除"
|
|
116
|
+
};
|
|
117
|
+
var J = /* @__PURE__ */ ((e) => (e.AfterAdd = "afterAdd", e.Agree = "agree", e.BeforeAdd = "beforeAdd", e.Cancel = "cancel", e.Candidate = "candidate", e.Cc = "cc", e.Comment = "comment", e.Complete = "complete", e.Delegate = "delegate", e.Fallback = "fallback", e.Forward = "forward", e.Pass = "pass", e.Reject = "reject", e.Revise = "revise", e.Revoke = "revoke", e.Startup = "startup", e.Terminate = "terminate", e.Warning = "warning", e.Withdraw = "withdraw", e))(J || {});
|
|
118
|
+
const Ro = { class: "l-approval-steps" }, Lo = { class: "step-group__rail" }, Mo = { class: "step-group__body" }, Bo = { class: "parent-head" }, Yo = { class: "parent-head__main" }, Vo = { class: "parent-head__title" }, Uo = {
|
|
119
|
+
key: 0,
|
|
120
|
+
class: "parent-head__time"
|
|
121
|
+
}, zo = {
|
|
122
|
+
key: 0,
|
|
123
|
+
class: "parent-desc"
|
|
124
|
+
}, Ho = {
|
|
125
|
+
key: 1,
|
|
126
|
+
class: "parent-desc"
|
|
127
|
+
}, Ko = { class: "child-row__marker" }, jo = { class: "child-row__panel" }, Xo = { class: "child-head" }, Wo = { class: "child-head__main" }, Go = { class: "child-head__name" }, qo = {
|
|
128
|
+
key: 0,
|
|
129
|
+
class: "child-head__dept"
|
|
130
|
+
}, Jo = {
|
|
131
|
+
key: 0,
|
|
132
|
+
class: "child-head__time"
|
|
133
|
+
}, Qo = {
|
|
134
|
+
key: 0,
|
|
135
|
+
class: "child-remark"
|
|
136
|
+
}, Zo = {
|
|
137
|
+
key: 1,
|
|
138
|
+
class: "child-files"
|
|
139
|
+
}, ea = ["onClick"], ta = { class: "child-file-card__text" }, na = /* @__PURE__ */ ee({
|
|
140
|
+
name: "LApprovalSteps",
|
|
141
|
+
__name: "index",
|
|
142
|
+
props: {
|
|
143
|
+
nodes: { default: () => [] }
|
|
144
|
+
},
|
|
145
|
+
setup(e) {
|
|
146
|
+
const t = e, n = {
|
|
147
|
+
[J.Agree]: "同意",
|
|
148
|
+
[J.Pass]: "通过",
|
|
149
|
+
[J.Reject]: "驳回",
|
|
150
|
+
[J.Complete]: "完成",
|
|
151
|
+
[J.Cancel]: "取消",
|
|
152
|
+
[J.Revoke]: "撤回",
|
|
153
|
+
[J.Withdraw]: "撤回",
|
|
154
|
+
[J.Terminate]: "终止",
|
|
155
|
+
[J.Comment]: "评论",
|
|
156
|
+
[J.Cc]: "抄送",
|
|
157
|
+
[J.Delegate]: "委托",
|
|
158
|
+
[J.Forward]: "转办",
|
|
159
|
+
[J.Fallback]: "退回",
|
|
160
|
+
[J.Revise]: "修订",
|
|
161
|
+
[J.Startup]: "发起流程"
|
|
162
|
+
}, o = R();
|
|
163
|
+
function a(p) {
|
|
164
|
+
var N;
|
|
165
|
+
(N = o.value) == null || N.showDialog(p.url);
|
|
166
|
+
}
|
|
167
|
+
function l(p) {
|
|
168
|
+
var v, h;
|
|
169
|
+
return (((v = p.approvalRoleName) == null ? void 0 : v.trim()) || ((h = p.nodeName) == null ? void 0 : h.trim()) || "审").charAt(0);
|
|
170
|
+
}
|
|
171
|
+
function r(p) {
|
|
172
|
+
var N, v;
|
|
173
|
+
return ((N = p.enterpriseName) == null ? void 0 : N.trim()) || ((v = p.nodeName) == null ? void 0 : v.trim()) || "-";
|
|
174
|
+
}
|
|
175
|
+
function i(p) {
|
|
176
|
+
return p.updateTime || p.createTime || "";
|
|
177
|
+
}
|
|
178
|
+
function s(p) {
|
|
179
|
+
const v = (t.nodes[p] || {}).nodeStatus || "";
|
|
180
|
+
return v === "PENDING" ? "is-dotted" : v === "PASS" ? "is-solid" : v === "RUNNING" ? "is-solid-to-dotted" : v === "REFUSE" || v === "REVOKED" || v === "DELETED" ? "is-solid" : "is-pending";
|
|
181
|
+
}
|
|
182
|
+
function u(p) {
|
|
183
|
+
const N = p.nodeStatus || "";
|
|
184
|
+
return N === "PENDING" ? "is-pending" : N === "RUNNING" ? "is-active" : N === "PASS" || N === "REVOKED" || N === "DELETED" || N === "REFUSE" ? "is-done" : "is-pending";
|
|
185
|
+
}
|
|
186
|
+
function f(p) {
|
|
187
|
+
const N = p.nodeStatus || "";
|
|
188
|
+
return N === "PASS" ? "is-success" : N === "RUNNING" ? "is-processing" : N === "REFUSE" ? "is-danger" : "is-pending";
|
|
189
|
+
}
|
|
190
|
+
function d(p, N) {
|
|
191
|
+
if (N) return { label: "审批中", kind: "processing" };
|
|
192
|
+
if (p == null) return { label: "待审批", kind: "pending" };
|
|
193
|
+
const v = n[p] || String(p);
|
|
194
|
+
return p === J.Reject || p === J.Terminate || p === J.Cancel ? { label: v, kind: "danger" } : p === J.Agree || p === J.Pass || p === J.Complete ? { label: v, kind: "success" } : { label: v, kind: "success" };
|
|
195
|
+
}
|
|
196
|
+
function E(p) {
|
|
197
|
+
var N, v;
|
|
198
|
+
return ((v = (N = p == null ? void 0 : p.deptInfo) == null ? void 0 : N.name) == null ? void 0 : v.trim()) || "";
|
|
199
|
+
}
|
|
200
|
+
function w(p) {
|
|
201
|
+
return p ? [...p.files ?? [], ...p.images ?? []] : [];
|
|
202
|
+
}
|
|
203
|
+
function k(p) {
|
|
204
|
+
var H, K, A, j, re;
|
|
205
|
+
const N = ((K = (H = p.source) == null ? void 0 : H.name) == null ? void 0 : K.trim()) || ((j = (A = p.target) == null ? void 0 : A.name) == null ? void 0 : j.trim()) || "-", v = E(p.source) || E(p.target) || "", { label: h, kind: $ } = d(p.result, p.isFuture), S = p.comment;
|
|
206
|
+
return {
|
|
207
|
+
name: N,
|
|
208
|
+
dept: v,
|
|
209
|
+
statusLabel: h,
|
|
210
|
+
statusKind: $,
|
|
211
|
+
remark: (re = S == null ? void 0 : S.text) == null ? void 0 : re.trim(),
|
|
212
|
+
attachments: w(S),
|
|
213
|
+
time: p.endTime || p.startTime
|
|
214
|
+
};
|
|
215
|
+
}
|
|
216
|
+
function x(p) {
|
|
217
|
+
var j, re, Ie, be;
|
|
218
|
+
const N = p.map((Se) => {
|
|
219
|
+
var _e, Fe;
|
|
220
|
+
return ((Fe = (_e = Se.assignee) == null ? void 0 : _e.name) == null ? void 0 : Fe.trim()) || "-";
|
|
221
|
+
}).join(" / "), v = p[0], h = ((Ie = (re = (j = v.depts) == null ? void 0 : j[0]) == null ? void 0 : re.name) == null ? void 0 : Ie.trim()) || E(v.assignee) || "", { label: $, kind: S } = d(v.result, v.isFuture), H = v.comment, K = [...new Set(p.map((Se) => {
|
|
222
|
+
var _e, Fe;
|
|
223
|
+
return (Fe = (_e = Se.comment) == null ? void 0 : _e.text) == null ? void 0 : Fe.trim();
|
|
224
|
+
}).filter(Boolean))], A = p.flatMap((Se) => w(Se.comment));
|
|
225
|
+
return {
|
|
226
|
+
name: N,
|
|
227
|
+
dept: h,
|
|
228
|
+
statusLabel: $,
|
|
229
|
+
statusKind: S,
|
|
230
|
+
remark: K.join("; ") || ((be = H == null ? void 0 : H.text) == null ? void 0 : be.trim()),
|
|
231
|
+
attachments: A,
|
|
232
|
+
time: v.endTime || v.createTime
|
|
233
|
+
};
|
|
234
|
+
}
|
|
235
|
+
function m(p) {
|
|
236
|
+
const N = p.subInstRecordList ?? [], v = [];
|
|
237
|
+
for (const h of N)
|
|
238
|
+
v.push(...b(h));
|
|
239
|
+
return v;
|
|
240
|
+
}
|
|
241
|
+
function b(p) {
|
|
242
|
+
const N = p.recordItems;
|
|
243
|
+
if (N != null && N.length) return N.map(k);
|
|
244
|
+
const v = p.actualUsers;
|
|
245
|
+
return v != null && v.length ? [x(v)] : [];
|
|
246
|
+
}
|
|
247
|
+
function y(p, N) {
|
|
248
|
+
return p.id ?? p.subInstId ?? N;
|
|
249
|
+
}
|
|
250
|
+
const D = ce(() => t.nodes.map((p, N) => {
|
|
251
|
+
if (N !== t.nodes.length - 1 || p.nodeStatus === "PENDING") return null;
|
|
252
|
+
const v = m(p);
|
|
253
|
+
return v.length === 0 ? null : `${36 + v.length * 16}px`;
|
|
254
|
+
}));
|
|
255
|
+
return (p, N) => {
|
|
256
|
+
var v;
|
|
257
|
+
return c(), _("div", Ro, [
|
|
258
|
+
(v = e.nodes) != null && v.length ? (c(!0), _(X, { key: 0 }, oe(e.nodes, (h, $) => (c(), _("div", {
|
|
259
|
+
key: y(h, $),
|
|
260
|
+
class: "step-group"
|
|
261
|
+
}, [
|
|
262
|
+
I("div", Lo, [
|
|
263
|
+
$ > 0 ? (c(), _("div", {
|
|
264
|
+
key: 0,
|
|
265
|
+
class: Z(["rail-segment", s($)])
|
|
266
|
+
}, null, 2)) : L("", !0),
|
|
267
|
+
I("div", {
|
|
268
|
+
class: Z(["rail-node", u(h)])
|
|
269
|
+
}, Y(l(h)), 3),
|
|
270
|
+
$ < e.nodes.length - 1 || $ === e.nodes.length - 1 && h.nodeStatus !== "PENDING" && m(h).length > 0 ? (c(), _("div", {
|
|
271
|
+
key: 1,
|
|
272
|
+
class: Z(["rail-segment rail-segment--after", [s($), D.value[$] ? "rail-segment--fixed-height" : ""]]),
|
|
273
|
+
style: fn(D.value[$] ? { height: D.value[$] } : {})
|
|
274
|
+
}, null, 6)) : L("", !0)
|
|
275
|
+
]),
|
|
276
|
+
I("div", Mo, [
|
|
277
|
+
I("div", Bo, [
|
|
278
|
+
I("div", Yo, [
|
|
279
|
+
I("span", Vo, Y(r(h)), 1),
|
|
280
|
+
I("span", {
|
|
281
|
+
class: Z(["parent-head__tag", f(h)])
|
|
282
|
+
}, Y(g(Fo)[h.nodeStatus] || "待审批"), 3)
|
|
283
|
+
]),
|
|
284
|
+
i(h) ? (c(), _("span", Uo, Y(i(h)), 1)) : L("", !0)
|
|
285
|
+
]),
|
|
286
|
+
h.nodeStatusDesc ? (c(), _("p", zo, Y(h.nodeStatusDesc), 1)) : h.remark ? (c(), _("p", Ho, Y(h.remark), 1)) : L("", !0),
|
|
287
|
+
(c(!0), _(X, null, oe(m(h), (S, H) => {
|
|
288
|
+
var K;
|
|
289
|
+
return c(), _("div", {
|
|
290
|
+
key: H,
|
|
291
|
+
class: "child-row"
|
|
292
|
+
}, [
|
|
293
|
+
I("div", Ko, [
|
|
294
|
+
I("span", {
|
|
295
|
+
class: Z(["child-row__branch", {
|
|
296
|
+
"is-solid": S.statusKind === "success" || S.statusKind === "danger",
|
|
297
|
+
"is-dotted": S.statusKind === "pending" && s($) === "is-dotted"
|
|
298
|
+
}])
|
|
299
|
+
}, null, 2),
|
|
300
|
+
I("span", {
|
|
301
|
+
class: Z(["child-row__dot", {
|
|
302
|
+
"is-before": S.statusKind === "pending" && s($) === "is-dotted"
|
|
303
|
+
}])
|
|
304
|
+
}, null, 2)
|
|
305
|
+
]),
|
|
306
|
+
I("div", jo, [
|
|
307
|
+
I("div", Xo, [
|
|
308
|
+
I("div", Wo, [
|
|
309
|
+
I("span", Go, Y(S.name), 1),
|
|
310
|
+
S.dept ? (c(), _("span", qo, Y(S.dept), 1)) : L("", !0),
|
|
311
|
+
I("span", {
|
|
312
|
+
class: Z(["child-head__tag", {
|
|
313
|
+
"is-success": S.statusKind === "success",
|
|
314
|
+
"is-processing": S.statusKind === "processing",
|
|
315
|
+
"is-pending": S.statusKind === "pending",
|
|
316
|
+
"is-danger": S.statusKind === "danger"
|
|
317
|
+
}])
|
|
318
|
+
}, Y(S.statusLabel), 3)
|
|
319
|
+
]),
|
|
320
|
+
S.time ? (c(), _("span", Jo, Y(S.time), 1)) : L("", !0)
|
|
321
|
+
]),
|
|
322
|
+
S.remark ? (c(), _("div", Qo, Y(S.remark || "暂无评论"), 1)) : L("", !0),
|
|
323
|
+
(K = S.attachments) != null && K.length ? (c(), _("div", Zo, [
|
|
324
|
+
(c(!0), _(X, null, oe(S.attachments, (A, j) => (c(), _("div", {
|
|
325
|
+
key: j,
|
|
326
|
+
class: "child-file-card",
|
|
327
|
+
onClick: (re) => a(A)
|
|
328
|
+
}, [
|
|
329
|
+
P(g(no), { class: "child-file-card__icon" }),
|
|
330
|
+
I("span", ta, Y(A.name), 1)
|
|
331
|
+
], 8, ea))), 128))
|
|
332
|
+
])) : L("", !0)
|
|
333
|
+
])
|
|
334
|
+
]);
|
|
335
|
+
}), 128))
|
|
336
|
+
])
|
|
337
|
+
]))), 128)) : (c(), B(g(bn), {
|
|
338
|
+
key: 1,
|
|
339
|
+
description: "暂无流程日志"
|
|
340
|
+
})),
|
|
341
|
+
P(g(Oo), {
|
|
342
|
+
ref_key: "filePreviewRef",
|
|
343
|
+
ref: o
|
|
344
|
+
}, null, 512)
|
|
345
|
+
]);
|
|
346
|
+
};
|
|
347
|
+
}
|
|
348
|
+
}), oa = /* @__PURE__ */ ae(na, [["__scopeId", "data-v-897fc289"]]), Wi = pe(oa), aa = { class: "l-fixed-footer" }, la = /* @__PURE__ */ ee({
|
|
349
|
+
name: "LFixedFooter",
|
|
350
|
+
__name: "fixed-footer",
|
|
351
|
+
setup(e) {
|
|
352
|
+
const t = R(), n = R(!0);
|
|
353
|
+
return nt(() => {
|
|
354
|
+
t.value = document.querySelector("#smartAdminMain");
|
|
355
|
+
}), jn(() => {
|
|
356
|
+
n.value = !0;
|
|
357
|
+
}), Xn(() => {
|
|
358
|
+
n.value = !1;
|
|
359
|
+
}), (o, a) => t.value && n.value ? (c(), B(cn, {
|
|
360
|
+
key: 0,
|
|
361
|
+
to: t.value
|
|
362
|
+
}, [
|
|
363
|
+
I("div", aa, [
|
|
364
|
+
z(o.$slots, "footer", {}, void 0, !0)
|
|
365
|
+
])
|
|
366
|
+
], 8, ["to"])) : L("", !0);
|
|
367
|
+
}
|
|
368
|
+
}), ia = /* @__PURE__ */ ae(la, [["__scopeId", "data-v-65057ac3"]]), ra = {
|
|
369
|
+
key: 0,
|
|
370
|
+
class: "l-detail-layout__header"
|
|
371
|
+
}, sa = /* @__PURE__ */ ee({
|
|
372
|
+
name: "LDetailLayout",
|
|
373
|
+
__name: "detail-layout",
|
|
374
|
+
props: {
|
|
375
|
+
title: {},
|
|
376
|
+
descriptions: {},
|
|
377
|
+
headerColumn: { default: 3 },
|
|
378
|
+
tabs: {},
|
|
379
|
+
defaultActiveKey: { default: "" },
|
|
380
|
+
tabSize: { default: "small" },
|
|
381
|
+
loading: { type: Boolean, default: !1 },
|
|
382
|
+
loadingTip: { default: "加载中..." }
|
|
383
|
+
},
|
|
384
|
+
emits: ["tabChange"],
|
|
385
|
+
setup(e, { emit: t }) {
|
|
386
|
+
const n = e, o = t, a = ce({
|
|
387
|
+
get: () => n.defaultActiveKey || (n.tabs.length > 0 ? n.tabs[0].key : ""),
|
|
388
|
+
set: (i) => {
|
|
389
|
+
o("tabChange", i);
|
|
390
|
+
}
|
|
391
|
+
});
|
|
392
|
+
function l(i) {
|
|
393
|
+
const s = String(i);
|
|
394
|
+
a.value = s, o("tabChange", s);
|
|
395
|
+
}
|
|
396
|
+
function r(i) {
|
|
397
|
+
return i == null || i === "" ? "--" : String(i);
|
|
398
|
+
}
|
|
399
|
+
return (i, s) => (c(), B(g(Yt), {
|
|
400
|
+
spinning: e.loading,
|
|
401
|
+
tip: e.loadingTip
|
|
402
|
+
}, {
|
|
403
|
+
default: C(() => {
|
|
404
|
+
var u;
|
|
405
|
+
return [
|
|
406
|
+
(u = e.descriptions) != null && u.length ? (c(), _("div", ra, [
|
|
407
|
+
P(g(so), { title: e.title }, Ke({
|
|
408
|
+
default: C(() => [
|
|
409
|
+
I("div", null, [
|
|
410
|
+
P(g(uo), {
|
|
411
|
+
size: "small",
|
|
412
|
+
column: e.headerColumn
|
|
413
|
+
}, {
|
|
414
|
+
default: C(() => [
|
|
415
|
+
(c(!0), _(X, null, oe(e.descriptions, (f, d) => (c(), B(g(co), {
|
|
416
|
+
key: d,
|
|
417
|
+
label: f.label,
|
|
418
|
+
span: f.span ?? 1
|
|
419
|
+
}, {
|
|
420
|
+
default: C(() => [
|
|
421
|
+
i.$slots[`description-${f.label}`] ? z(i.$slots, `description-${f.label}`, {
|
|
422
|
+
key: 0,
|
|
423
|
+
item: f
|
|
424
|
+
}, void 0, !0) : (c(), _(X, { key: 1 }, [
|
|
425
|
+
W(Y(r(f.value)), 1)
|
|
426
|
+
], 64))
|
|
427
|
+
]),
|
|
428
|
+
_: 2
|
|
429
|
+
}, 1032, ["label", "span"]))), 128))
|
|
430
|
+
]),
|
|
431
|
+
_: 3
|
|
432
|
+
}, 8, ["column"])
|
|
433
|
+
])
|
|
434
|
+
]),
|
|
435
|
+
_: 2
|
|
436
|
+
}, [
|
|
437
|
+
i.$slots.extra ? {
|
|
438
|
+
name: "extra",
|
|
439
|
+
fn: C(() => [
|
|
440
|
+
z(i.$slots, "extra", {}, void 0, !0)
|
|
441
|
+
]),
|
|
442
|
+
key: "0"
|
|
443
|
+
} : void 0
|
|
444
|
+
]), 1032, ["title"])
|
|
445
|
+
])) : L("", !0),
|
|
446
|
+
s[1] || (s[1] = I("br", null, null, -1)),
|
|
447
|
+
P(g(_n), {
|
|
448
|
+
class: Z(["l-detail-layout__tabs-card", { "mb-100px": i.$slots.footer }]),
|
|
449
|
+
size: e.tabSize
|
|
450
|
+
}, {
|
|
451
|
+
default: C(() => [
|
|
452
|
+
P(g(wn), {
|
|
453
|
+
"active-key": a.value,
|
|
454
|
+
"onUpdate:activeKey": s[0] || (s[0] = (f) => a.value = f),
|
|
455
|
+
onChange: l
|
|
456
|
+
}, {
|
|
457
|
+
default: C(() => [
|
|
458
|
+
(c(!0), _(X, null, oe(e.tabs, (f) => (c(), B(g(kn), {
|
|
459
|
+
key: f.key,
|
|
460
|
+
tab: f.label
|
|
461
|
+
}, {
|
|
462
|
+
default: C(() => [
|
|
463
|
+
z(i.$slots, `tab-${f.key}`, {}, void 0, !0)
|
|
464
|
+
]),
|
|
465
|
+
_: 2
|
|
466
|
+
}, 1032, ["tab"]))), 128))
|
|
467
|
+
]),
|
|
468
|
+
_: 3
|
|
469
|
+
}, 8, ["active-key"])
|
|
470
|
+
]),
|
|
471
|
+
_: 3
|
|
472
|
+
}, 8, ["class", "size"]),
|
|
473
|
+
i.$slots.footer ? (c(), B(g(ia), { key: 1 }, {
|
|
474
|
+
footer: C(() => [
|
|
475
|
+
z(i.$slots, "footer", {}, void 0, !0)
|
|
476
|
+
]),
|
|
477
|
+
_: 3
|
|
478
|
+
})) : L("", !0)
|
|
479
|
+
];
|
|
480
|
+
}),
|
|
481
|
+
_: 3
|
|
482
|
+
}, 8, ["spinning", "tip"]));
|
|
483
|
+
}
|
|
484
|
+
}), Gi = /* @__PURE__ */ ae(sa, [["__scopeId", "data-v-9f5352d2"]]), ua = {
|
|
485
|
+
key: 0,
|
|
486
|
+
class: "loading"
|
|
487
|
+
}, da = { class: "extra" }, ca = { class: "title" }, fa = /* @__PURE__ */ ee({
|
|
488
|
+
name: "LDrawer",
|
|
489
|
+
__name: "index",
|
|
490
|
+
props: {
|
|
491
|
+
mask: { type: Boolean, default: !0 },
|
|
492
|
+
placement: { default: "right" },
|
|
493
|
+
width: { default: "75%" },
|
|
494
|
+
title: {},
|
|
495
|
+
loading: { type: Boolean },
|
|
496
|
+
disabledNext: { type: Boolean },
|
|
497
|
+
disabledPrev: { type: Boolean },
|
|
498
|
+
showRefresh: { type: Boolean },
|
|
499
|
+
page: { type: Boolean }
|
|
500
|
+
},
|
|
501
|
+
emits: ["prev", "next", "refresh", "close"],
|
|
502
|
+
setup(e, { expose: t, emit: n }) {
|
|
503
|
+
const o = e, a = n, l = R(!1), r = R(o.width), i = R(!1);
|
|
504
|
+
function s() {
|
|
505
|
+
i.value = !1, a("close");
|
|
506
|
+
}
|
|
507
|
+
return t({
|
|
508
|
+
open() {
|
|
509
|
+
i.value = !0;
|
|
510
|
+
},
|
|
511
|
+
close: s,
|
|
512
|
+
visable: i
|
|
513
|
+
}), (u, f) => (c(), B(g(fo), xe({
|
|
514
|
+
open: i.value,
|
|
515
|
+
"onUpdate:open": f[3] || (f[3] = (d) => i.value = d),
|
|
516
|
+
placement: e.placement,
|
|
517
|
+
push: { distance: 0 },
|
|
518
|
+
width: r.value,
|
|
519
|
+
closable: !1,
|
|
520
|
+
style: { "background-color": "#f5f5f5" },
|
|
521
|
+
"root-class-name": `l-drawer l-drawer${e.mask ? "" : " l-hide-mask"}`
|
|
522
|
+
}, u.$attrs, { onClose: s }), Ke({
|
|
523
|
+
extra: C(() => [
|
|
524
|
+
I("div", da, [
|
|
525
|
+
z(u.$slots, "extra", {}, void 0, !0),
|
|
526
|
+
e.showRefresh ? (c(), B(g(vn), {
|
|
527
|
+
key: 0,
|
|
528
|
+
class: "icon",
|
|
529
|
+
type: "md-refresh",
|
|
530
|
+
onClick: f[0] || (f[0] = (d) => u.$emit("refresh"))
|
|
531
|
+
})) : L("", !0),
|
|
532
|
+
l.value ? (c(), B(g(oo), {
|
|
533
|
+
key: 1,
|
|
534
|
+
class: "icon",
|
|
535
|
+
onClick: f[1] || (f[1] = () => {
|
|
536
|
+
r.value = e.width, l.value = !1;
|
|
537
|
+
})
|
|
538
|
+
})) : (c(), B(g(ao), {
|
|
539
|
+
key: 2,
|
|
540
|
+
class: "icon",
|
|
541
|
+
onClick: f[2] || (f[2] = () => {
|
|
542
|
+
r.value = "100%", l.value = !0;
|
|
543
|
+
})
|
|
544
|
+
})),
|
|
545
|
+
P(g(lo), {
|
|
546
|
+
class: "icon",
|
|
547
|
+
onClick: s
|
|
548
|
+
})
|
|
549
|
+
])
|
|
550
|
+
]),
|
|
551
|
+
default: C(() => [
|
|
552
|
+
e.loading ? (c(), _("div", ua, [
|
|
553
|
+
P(g(Yt))
|
|
554
|
+
])) : z(u.$slots, "default", { key: 1 }, void 0, !0),
|
|
555
|
+
u.$slots.title ? z(u.$slots, "title", { key: 2 }, void 0, !0) : L("", !0)
|
|
556
|
+
]),
|
|
557
|
+
_: 2
|
|
558
|
+
}, [
|
|
559
|
+
u.$slots.footer ? {
|
|
560
|
+
name: "footer",
|
|
561
|
+
fn: C(() => [
|
|
562
|
+
z(u.$slots, "footer", {}, void 0, !0)
|
|
563
|
+
]),
|
|
564
|
+
key: "0"
|
|
565
|
+
} : void 0,
|
|
566
|
+
u.$slots.title ? void 0 : {
|
|
567
|
+
name: "title",
|
|
568
|
+
fn: C(() => [
|
|
569
|
+
I("div", ca, [
|
|
570
|
+
W(Y(e.title) + " ", 1),
|
|
571
|
+
z(u.$slots, "title-extra", {}, void 0, !0)
|
|
572
|
+
])
|
|
573
|
+
]),
|
|
574
|
+
key: "1"
|
|
575
|
+
}
|
|
576
|
+
]), 1040, ["open", "placement", "width", "root-class-name"]));
|
|
577
|
+
}
|
|
578
|
+
}), pa = /* @__PURE__ */ ae(fa, [["__scopeId", "data-v-65c0ec46"]]), qi = pe(pa), ha = /* @__PURE__ */ ee({
|
|
579
|
+
name: "LPageNotFound",
|
|
580
|
+
__name: "404",
|
|
581
|
+
setup(e) {
|
|
582
|
+
const t = $o();
|
|
583
|
+
function n() {
|
|
584
|
+
t.push({ path: "/" });
|
|
585
|
+
}
|
|
586
|
+
return (o, a) => (c(), B(g(po), {
|
|
587
|
+
status: "404",
|
|
588
|
+
title: "对不起,您访问的内容不存在!"
|
|
589
|
+
}, {
|
|
590
|
+
extra: C(() => [
|
|
591
|
+
P(g(le), {
|
|
592
|
+
type: "primary",
|
|
593
|
+
onClick: n
|
|
594
|
+
}, {
|
|
595
|
+
default: C(() => [...a[0] || (a[0] = [
|
|
596
|
+
W("返回首页", -1)
|
|
597
|
+
])]),
|
|
598
|
+
_: 1
|
|
599
|
+
})
|
|
600
|
+
]),
|
|
601
|
+
_: 1
|
|
602
|
+
}));
|
|
603
|
+
}
|
|
604
|
+
}), Ji = pe(ha), ma = ["title"], ga = { class: "l-filter-panel__actions" }, va = /* @__PURE__ */ ee({
|
|
605
|
+
name: "LFilterPanel",
|
|
606
|
+
__name: "filter-panel",
|
|
607
|
+
props: {
|
|
608
|
+
modelValue: {},
|
|
609
|
+
filterItems: { default: () => [] },
|
|
610
|
+
labelWidth: { default: "80px" },
|
|
611
|
+
collapsible: { type: Boolean, default: !1 },
|
|
612
|
+
card: { type: Boolean, default: !0 },
|
|
613
|
+
collapsedRows: { default: 1 },
|
|
614
|
+
searchText: { default: "查询" },
|
|
615
|
+
resetText: { default: "重置" },
|
|
616
|
+
expandText: { default: "展开" },
|
|
617
|
+
collapseText: { default: "收起" }
|
|
618
|
+
},
|
|
619
|
+
emits: ["update:modelValue", "search", "reset", "toggle"],
|
|
620
|
+
setup(e, { emit: t }) {
|
|
621
|
+
pn((k) => ({
|
|
622
|
+
v6d3848de: k.labelWidth
|
|
623
|
+
}));
|
|
624
|
+
const n = e, o = t, a = {
|
|
625
|
+
date: "YYYY-MM-DD",
|
|
626
|
+
daterange: "YYYY-MM-DD",
|
|
627
|
+
datetime: "YYYY-MM-DD HH:mm:ss",
|
|
628
|
+
datetimerange: "YYYY-MM-DD HH:mm:ss"
|
|
629
|
+
}, l = tt(n, "modelValue", o), r = R(!1), i = ce(
|
|
630
|
+
() => typeof n.labelWidth == "number" ? `${n.labelWidth}px` : n.labelWidth
|
|
631
|
+
), s = R(), u = ce(() => r.value ? n.collapseText : n.expandText);
|
|
632
|
+
function f() {
|
|
633
|
+
Object.keys(l.value).forEach((k) => {
|
|
634
|
+
l.value[k] === "" && (l.value[k] = void 0);
|
|
635
|
+
}), o("search");
|
|
636
|
+
}
|
|
637
|
+
const d = ce(() => n.filterItems.filter((k) => !k.hide));
|
|
638
|
+
function E() {
|
|
639
|
+
var k;
|
|
640
|
+
(k = s.value) == null || k.resetFields(), He(() => {
|
|
641
|
+
o("reset");
|
|
642
|
+
});
|
|
643
|
+
}
|
|
644
|
+
function w() {
|
|
645
|
+
r.value = !r.value, o("toggle", r.value);
|
|
646
|
+
}
|
|
647
|
+
return (k, x) => (c(), _("section", {
|
|
648
|
+
class: Z(["l-filter-panel", { card: e.card }]),
|
|
649
|
+
style: { "padding-left": "0px" }
|
|
650
|
+
}, [
|
|
651
|
+
I("div", {
|
|
652
|
+
class: Z(["l-filter-panel__content", { hide: !r.value }])
|
|
653
|
+
}, [
|
|
654
|
+
P(g(Sn), {
|
|
655
|
+
ref_key: "formRef",
|
|
656
|
+
ref: s,
|
|
657
|
+
class: "l-filter-panel__form",
|
|
658
|
+
model: g(l),
|
|
659
|
+
"label-width": i.value,
|
|
660
|
+
"label-position": "left",
|
|
661
|
+
onSubmit: x[3] || (x[3] = hn(() => {
|
|
662
|
+
}, ["prevent"]))
|
|
663
|
+
}, {
|
|
664
|
+
default: C(() => [
|
|
665
|
+
(c(!0), _(X, null, oe(d.value, (m) => (c(), B(g(ho), {
|
|
666
|
+
key: m.key,
|
|
667
|
+
name: m.key,
|
|
668
|
+
class: "l-filter-panel__form-item"
|
|
669
|
+
}, {
|
|
670
|
+
label: C(() => [
|
|
671
|
+
I("div", {
|
|
672
|
+
class: "label-overflow",
|
|
673
|
+
title: m.label
|
|
674
|
+
}, Y(m.label), 9, ma)
|
|
675
|
+
]),
|
|
676
|
+
default: C(() => [
|
|
677
|
+
k.$slots[`filter-${m.key}`] ? z(k.$slots, `filter-${m.key}`, {
|
|
678
|
+
key: 0,
|
|
679
|
+
item: m
|
|
680
|
+
}, void 0, !0) : m.type === "input" || !m.type ? (c(), B(g(mo), {
|
|
681
|
+
key: 1,
|
|
682
|
+
value: g(l)[m.key],
|
|
683
|
+
"onUpdate:value": (b) => g(l)[m.key] = b,
|
|
684
|
+
"allow-clear": "",
|
|
685
|
+
placeholder: m.placeholder || "请输入",
|
|
686
|
+
onKeyup: x[0] || (x[0] = Wn((b) => f(), ["enter"])),
|
|
687
|
+
onChange: (b) => !g(l)[m.key] && f()
|
|
688
|
+
}, null, 8, ["value", "onUpdate:value", "placeholder", "onChange"])) : m.type === "select" ? (c(), B(g(go), {
|
|
689
|
+
key: 2,
|
|
690
|
+
value: g(l)[m.key],
|
|
691
|
+
"onUpdate:value": (b) => g(l)[m.key] = b,
|
|
692
|
+
"allow-clear": "",
|
|
693
|
+
"show-search": "",
|
|
694
|
+
placeholder: m.placeholder || "请选择",
|
|
695
|
+
mode: m.multiple ? "multiple" : void 0,
|
|
696
|
+
"option-filter-prop": "label",
|
|
697
|
+
onChange: () => {
|
|
698
|
+
var b;
|
|
699
|
+
(b = m.change) == null || b.call(m), f();
|
|
700
|
+
}
|
|
701
|
+
}, {
|
|
702
|
+
default: C(() => [
|
|
703
|
+
(c(!0), _(X, null, oe(m.options, (b) => (c(), B(g(vo), {
|
|
704
|
+
key: b.value,
|
|
705
|
+
label: b.label,
|
|
706
|
+
value: b.value
|
|
707
|
+
}, {
|
|
708
|
+
default: C(() => [
|
|
709
|
+
W(Y(b.label), 1)
|
|
710
|
+
]),
|
|
711
|
+
_: 2
|
|
712
|
+
}, 1032, ["label", "value"]))), 128))
|
|
713
|
+
]),
|
|
714
|
+
_: 2
|
|
715
|
+
}, 1032, ["value", "onUpdate:value", "placeholder", "mode", "onChange"])) : m.type === "daterange" ? (c(), B(g(Wt), {
|
|
716
|
+
key: 3,
|
|
717
|
+
value: g(l)[m.key],
|
|
718
|
+
"onUpdate:value": (b) => g(l)[m.key] = b,
|
|
719
|
+
"allow-clear": "",
|
|
720
|
+
type: m.type,
|
|
721
|
+
placeholder: [m.startPlaceholder || "开始日期", m.endPlaceholder || "结束日期"],
|
|
722
|
+
"value-format": a[m.type],
|
|
723
|
+
style: { width: "100%" },
|
|
724
|
+
onChange: x[1] || (x[1] = (b) => f())
|
|
725
|
+
}, null, 8, ["value", "onUpdate:value", "type", "placeholder", "value-format"])) : m.type === "datetimerange" ? (c(), B(g(Wt), {
|
|
726
|
+
key: 4,
|
|
727
|
+
value: g(l)[m.key],
|
|
728
|
+
"onUpdate:value": (b) => g(l)[m.key] = b,
|
|
729
|
+
"allow-clear": "",
|
|
730
|
+
type: m.type,
|
|
731
|
+
placeholder: [m.startPlaceholder || "开始日期", m.endPlaceholder || "结束日期"],
|
|
732
|
+
"value-format": a[m.type],
|
|
733
|
+
"show-time": "",
|
|
734
|
+
style: { width: "100%" },
|
|
735
|
+
onChange: x[2] || (x[2] = (b) => f())
|
|
736
|
+
}, null, 8, ["value", "onUpdate:value", "type", "placeholder", "value-format"])) : L("", !0)
|
|
737
|
+
]),
|
|
738
|
+
_: 2
|
|
739
|
+
}, 1032, ["name"]))), 128))
|
|
740
|
+
]),
|
|
741
|
+
_: 3
|
|
742
|
+
}, 8, ["model", "label-width"])
|
|
743
|
+
], 2),
|
|
744
|
+
I("div", ga, [
|
|
745
|
+
P(g(le), {
|
|
746
|
+
type: "primary",
|
|
747
|
+
onClick: f
|
|
748
|
+
}, {
|
|
749
|
+
default: C(() => [
|
|
750
|
+
P(g(io)),
|
|
751
|
+
W(" " + Y(n.searchText), 1)
|
|
752
|
+
]),
|
|
753
|
+
_: 1
|
|
754
|
+
}),
|
|
755
|
+
P(g(le), { onClick: E }, {
|
|
756
|
+
default: C(() => [
|
|
757
|
+
P(g(vn)),
|
|
758
|
+
W(" " + Y(n.resetText), 1)
|
|
759
|
+
]),
|
|
760
|
+
_: 1
|
|
761
|
+
}),
|
|
762
|
+
d.value.length > 3 ? (c(), B(g(le), {
|
|
763
|
+
key: 0,
|
|
764
|
+
link: "",
|
|
765
|
+
onClick: w
|
|
766
|
+
}, {
|
|
767
|
+
default: C(() => [
|
|
768
|
+
P(g(ro)),
|
|
769
|
+
W(" " + Y(u.value), 1)
|
|
770
|
+
]),
|
|
771
|
+
_: 1
|
|
772
|
+
})) : L("", !0)
|
|
773
|
+
])
|
|
774
|
+
], 2));
|
|
775
|
+
}
|
|
776
|
+
}), ya = /* @__PURE__ */ ae(va, [["__scopeId", "data-v-7b9f532e"]]), ba = pe(ya), _a = { class: "l-form-submit-page-wrap" }, wa = { class: "pb-74px" }, ka = { class: "l-form-section-page__main" }, Sa = ["id"], Ta = { class: "l-form-section-page__title" }, Ea = { class: "l-form-section-page__title-text" }, xa = {
|
|
777
|
+
key: 0,
|
|
778
|
+
class: "l-form-section-page__desc"
|
|
779
|
+
}, $a = { class: "l-form-section-page__body" }, Ca = {
|
|
780
|
+
key: 0,
|
|
781
|
+
class: "l-form-section-page__anchor"
|
|
782
|
+
}, Da = { class: "l-form-section-page__anchor-inner" }, Ia = ["onClick"], Na = "l-form-submit-page-layout-variant", Pa = "l-form-section-page__card-", Aa = /* @__PURE__ */ ee({
|
|
783
|
+
name: "LFormSubmitPage",
|
|
784
|
+
__name: "form-submit-page",
|
|
785
|
+
props: {
|
|
786
|
+
model: {},
|
|
787
|
+
rules: {},
|
|
788
|
+
layout: { default: "horizontal" },
|
|
789
|
+
variant: { default: "section" },
|
|
790
|
+
showLayoutSwitch: { type: Boolean, default: !0 },
|
|
791
|
+
sections: {},
|
|
792
|
+
showRightNav: { type: Boolean, default: !0 },
|
|
793
|
+
showSave: { type: Boolean, default: !0 },
|
|
794
|
+
showSubmit: { type: Boolean, default: !0 },
|
|
795
|
+
submitLoading: { type: Boolean, default: !1 },
|
|
796
|
+
saveLoading: { type: Boolean, default: !1 },
|
|
797
|
+
cancelText: { default: "取消" },
|
|
798
|
+
saveText: { default: "保存" },
|
|
799
|
+
submitText: { default: "提交" }
|
|
800
|
+
},
|
|
801
|
+
emits: ["cancel", "save", "submit", "update:variant"],
|
|
802
|
+
setup(e, { expose: t }) {
|
|
803
|
+
const n = e;
|
|
804
|
+
function o() {
|
|
805
|
+
const h = localStorage.getItem(Na);
|
|
806
|
+
if (h === "card" || h === "section") return h;
|
|
807
|
+
}
|
|
808
|
+
const a = R(
|
|
809
|
+
n.showLayoutSwitch ? o() ?? n.variant : n.variant
|
|
810
|
+
);
|
|
811
|
+
Oe(
|
|
812
|
+
() => n.variant,
|
|
813
|
+
(h) => {
|
|
814
|
+
n.showLayoutSwitch || (a.value = h);
|
|
815
|
+
},
|
|
816
|
+
{ immediate: !0 }
|
|
817
|
+
);
|
|
818
|
+
const l = ce(
|
|
819
|
+
() => n.showLayoutSwitch ? a.value : n.variant
|
|
820
|
+
), r = ce(() => l.value === "section"), i = ce(() => {
|
|
821
|
+
var h;
|
|
822
|
+
return !!((h = n.sections) != null && h.length);
|
|
823
|
+
}), s = ce(() => r.value ? { span: 3 } : { span: 6 }), u = ce(() => r.value ? { span: 13 } : { span: 10 }), f = R(), d = R(), E = R("");
|
|
824
|
+
function w(h) {
|
|
825
|
+
if (!h) return !1;
|
|
826
|
+
if (h === window) {
|
|
827
|
+
const S = window.scrollY || document.documentElement.scrollTop || document.body.scrollTop || 0, H = window.innerHeight, K = document.documentElement.scrollHeight || document.body.scrollHeight || 0;
|
|
828
|
+
return S + H >= K - 10;
|
|
829
|
+
}
|
|
830
|
+
const $ = h;
|
|
831
|
+
return $.scrollTop + $.clientHeight >= $.scrollHeight - 10;
|
|
832
|
+
}
|
|
833
|
+
function k(h) {
|
|
834
|
+
return `${Pa}${h}`;
|
|
835
|
+
}
|
|
836
|
+
function x(h) {
|
|
837
|
+
if (!h) return null;
|
|
838
|
+
let $ = h.parentElement;
|
|
839
|
+
for (; $ && $ !== document.body; ) {
|
|
840
|
+
const { overflowY: S } = getComputedStyle($);
|
|
841
|
+
if (S === "auto" || S === "scroll" || S === "overlay") return $;
|
|
842
|
+
$ = $.parentElement;
|
|
843
|
+
}
|
|
844
|
+
return window;
|
|
845
|
+
}
|
|
846
|
+
function m(h) {
|
|
847
|
+
var $;
|
|
848
|
+
E.value = h, ($ = document.getElementById(k(h))) == null || $.scrollIntoView({ behavior: "smooth", block: "start" });
|
|
849
|
+
}
|
|
850
|
+
function b() {
|
|
851
|
+
const h = n.sections;
|
|
852
|
+
if (!(h != null && h.length)) return;
|
|
853
|
+
if (w(D)) {
|
|
854
|
+
E.value = h[h.length - 1].key;
|
|
855
|
+
return;
|
|
856
|
+
}
|
|
857
|
+
let $ = -1;
|
|
858
|
+
h.forEach((S, H) => {
|
|
859
|
+
const K = document.getElementById(k(S.key));
|
|
860
|
+
if (!K) return;
|
|
861
|
+
K.getBoundingClientRect().top >= 0 && $ === -1 && ($ = H);
|
|
862
|
+
}), $ === -1 ? E.value = h[h.length - 1].key : E.value = h[$].key;
|
|
863
|
+
}
|
|
864
|
+
let y, D = null;
|
|
865
|
+
function p() {
|
|
866
|
+
y && cancelAnimationFrame(y), y = requestAnimationFrame(b);
|
|
867
|
+
}
|
|
868
|
+
function N() {
|
|
869
|
+
D = x(d.value ?? null), D == null || D.addEventListener("scroll", p, { passive: !0 });
|
|
870
|
+
}
|
|
871
|
+
function v() {
|
|
872
|
+
D == null || D.removeEventListener("scroll", p), D = null;
|
|
873
|
+
}
|
|
874
|
+
return nt(() => {
|
|
875
|
+
var h;
|
|
876
|
+
r.value && ((h = n.sections) != null && h.length) && (E.value = n.sections[0].key, He(() => {
|
|
877
|
+
b(), N();
|
|
878
|
+
}));
|
|
879
|
+
}), Gn(() => {
|
|
880
|
+
r.value && (v(), y && cancelAnimationFrame(y));
|
|
881
|
+
}), Oe(
|
|
882
|
+
() => [l.value, n.sections],
|
|
883
|
+
([h, $]) => {
|
|
884
|
+
h === "section" && ($ != null && $.length) && (E.value = $[0].key, He(b));
|
|
885
|
+
},
|
|
886
|
+
{ immediate: !0 }
|
|
887
|
+
), t({
|
|
888
|
+
get formRef() {
|
|
889
|
+
return f.value;
|
|
890
|
+
},
|
|
891
|
+
/**
|
|
892
|
+
* 手动滚动到第一个校验错误的表单项
|
|
893
|
+
* 解决 scroll-to-first-error 在复杂布局下失效的问题
|
|
894
|
+
*/
|
|
895
|
+
scrollToFirstError() {
|
|
896
|
+
var $;
|
|
897
|
+
if (!f.value) return;
|
|
898
|
+
const h = ($ = f.value.$el) == null ? void 0 : $.querySelector(".ant-form-item-has-error");
|
|
899
|
+
if (h) {
|
|
900
|
+
const S = x(d.value) || window, H = h.getBoundingClientRect();
|
|
901
|
+
let K = 0;
|
|
902
|
+
if (S === window)
|
|
903
|
+
K = window.scrollY + H.top - 100, window.scrollTo({ top: K, behavior: "smooth" });
|
|
904
|
+
else {
|
|
905
|
+
const A = S.getBoundingClientRect();
|
|
906
|
+
K = S.scrollTop + H.top - A.top - 100, S.scrollTo({ top: K, behavior: "smooth" });
|
|
907
|
+
}
|
|
908
|
+
}
|
|
909
|
+
}
|
|
910
|
+
}), (h, $) => (c(), _("div", _a, [
|
|
911
|
+
I("div", wa, [
|
|
912
|
+
I("div", {
|
|
913
|
+
ref_key: "rootRef",
|
|
914
|
+
ref: d,
|
|
915
|
+
class: "l-form-section-page"
|
|
916
|
+
}, [
|
|
917
|
+
I("div", ka, [
|
|
918
|
+
P(g(Sn), xe({
|
|
919
|
+
ref_key: "formRef",
|
|
920
|
+
ref: f,
|
|
921
|
+
model: e.model,
|
|
922
|
+
rules: e.rules,
|
|
923
|
+
"label-col": s.value,
|
|
924
|
+
"wrapper-col": u.value,
|
|
925
|
+
layout: e.layout
|
|
926
|
+
}, h.$attrs, { "scroll-to-first-error": "" }), {
|
|
927
|
+
default: C(() => [
|
|
928
|
+
i.value ? (c(!0), _(X, { key: 0 }, oe(e.sections, (S) => (c(), _("div", {
|
|
929
|
+
id: k(S.key),
|
|
930
|
+
key: S.key,
|
|
931
|
+
class: "l-form-section-page__card"
|
|
932
|
+
}, [
|
|
933
|
+
I("div", Ta, [
|
|
934
|
+
$[0] || ($[0] = I("span", { class: "l-form-section-page__bar" }, null, -1)),
|
|
935
|
+
I("span", Ea, Y(S.title), 1),
|
|
936
|
+
S.desc ? (c(), _("span", xa, Y(S.desc), 1)) : L("", !0)
|
|
937
|
+
]),
|
|
938
|
+
I("div", $a, [
|
|
939
|
+
z(h.$slots, `card-${S.key}`, {}, void 0, !0)
|
|
940
|
+
])
|
|
941
|
+
], 8, Sa))), 128)) : z(h.$slots, "default", { key: 1 }, void 0, !0)
|
|
942
|
+
]),
|
|
943
|
+
_: 3
|
|
944
|
+
}, 16, ["model", "rules", "label-col", "wrapper-col", "layout"])
|
|
945
|
+
]),
|
|
946
|
+
i.value && e.showRightNav ? (c(), _("aside", Ca, [
|
|
947
|
+
I("div", Da, [
|
|
948
|
+
(c(!0), _(X, null, oe(e.sections, (S) => (c(), _("a", {
|
|
949
|
+
key: S.key,
|
|
950
|
+
class: Z(["l-form-section-page__anchor-item", { "is-active": E.value === S.key }]),
|
|
951
|
+
onClick: hn((H) => m(S.key), ["prevent"])
|
|
952
|
+
}, Y(S.title), 11, Ia))), 128))
|
|
953
|
+
])
|
|
954
|
+
])) : L("", !0)
|
|
955
|
+
], 512)
|
|
956
|
+
])
|
|
957
|
+
]));
|
|
958
|
+
}
|
|
959
|
+
}), Oa = /* @__PURE__ */ ae(Aa, [["__scopeId", "data-v-7bfdb12f"]]), Fa = /* @__PURE__ */ ee({
|
|
960
|
+
name: "LFormSectionPage",
|
|
961
|
+
__name: "form-section-page",
|
|
962
|
+
setup(e) {
|
|
963
|
+
return (t, n) => (c(), B(Oa, xe({ variant: "section" }, t.$attrs), Ke({ _: 2 }, [
|
|
964
|
+
oe(t.$slots, (o, a) => ({
|
|
965
|
+
name: a,
|
|
966
|
+
fn: C((l) => [
|
|
967
|
+
z(t.$slots, a, Pt(At(l || {})), void 0, !0)
|
|
968
|
+
])
|
|
969
|
+
}))
|
|
970
|
+
]), 1040));
|
|
971
|
+
}
|
|
972
|
+
}), Ra = /* @__PURE__ */ ae(Fa, [["__scopeId", "data-v-5bec1cd0"]]), Qi = pe(Ra), La = /* @__PURE__ */ ee({
|
|
973
|
+
name: "LFormSubmitPageCard",
|
|
974
|
+
__name: "form-submit-page-card",
|
|
975
|
+
props: {
|
|
976
|
+
title: { default: "" },
|
|
977
|
+
cardClass: { default: "mb-4" }
|
|
978
|
+
},
|
|
979
|
+
setup(e) {
|
|
980
|
+
return (t, n) => (c(), B(g(_n), {
|
|
981
|
+
title: e.title,
|
|
982
|
+
class: Z(["l-card", e.cardClass])
|
|
983
|
+
}, {
|
|
984
|
+
default: C(() => [
|
|
985
|
+
z(t.$slots, "default", {}, void 0, !0)
|
|
986
|
+
]),
|
|
987
|
+
_: 3
|
|
988
|
+
}, 8, ["title", "class"]));
|
|
989
|
+
}
|
|
990
|
+
}), Zi = /* @__PURE__ */ ae(La, [["__scopeId", "data-v-caf69e1c"]]), Ma = { class: "l-info-layout" }, Ba = ["id"], Ya = { class: "title-top" }, Va = {
|
|
991
|
+
key: 0,
|
|
992
|
+
class: "text"
|
|
993
|
+
}, Ua = {
|
|
994
|
+
key: 1,
|
|
995
|
+
class: "text"
|
|
996
|
+
}, za = {
|
|
997
|
+
key: 0,
|
|
998
|
+
class: "info"
|
|
999
|
+
}, Ha = { class: "footer" }, Ka = {
|
|
1000
|
+
key: 0,
|
|
1001
|
+
class: "menu"
|
|
1002
|
+
}, ja = /* @__PURE__ */ ee({
|
|
1003
|
+
name: "LInfoLayout",
|
|
1004
|
+
__name: "info-layout",
|
|
1005
|
+
props: {
|
|
1006
|
+
items: {},
|
|
1007
|
+
showMenu: { type: Boolean, default: !0 }
|
|
1008
|
+
},
|
|
1009
|
+
emits: ["update:items"],
|
|
1010
|
+
setup(e, { emit: t }) {
|
|
1011
|
+
const n = e, o = t, a = R(n.items[0].value), l = tt(n, "items", o), r = R(null);
|
|
1012
|
+
let i = !1, s;
|
|
1013
|
+
function u() {
|
|
1014
|
+
var w;
|
|
1015
|
+
i = !0, (w = document.getElementById(`lINfo${a.value}`)) == null || w.scrollIntoView({ behavior: "smooth" }), s && window.clearTimeout(s), s = window.setTimeout(() => {
|
|
1016
|
+
i = !1;
|
|
1017
|
+
}, 400);
|
|
1018
|
+
}
|
|
1019
|
+
function f(w, k) {
|
|
1020
|
+
let x = 0, m = w;
|
|
1021
|
+
for (; m && m !== k; )
|
|
1022
|
+
x += m.offsetTop, m = m.offsetParent;
|
|
1023
|
+
return x;
|
|
1024
|
+
}
|
|
1025
|
+
function d() {
|
|
1026
|
+
if (i)
|
|
1027
|
+
return;
|
|
1028
|
+
const w = r.value;
|
|
1029
|
+
if (!w)
|
|
1030
|
+
return;
|
|
1031
|
+
const k = w.scrollTop, x = l.value.filter((D) => !D.hide);
|
|
1032
|
+
let m = x[0];
|
|
1033
|
+
w.scrollTop + w.clientHeight >= w.scrollHeight - 10 ? m = x[x.length - 1] : x.forEach((D) => {
|
|
1034
|
+
const p = document.getElementById(`lINfo${D.value}`);
|
|
1035
|
+
if (!p)
|
|
1036
|
+
return;
|
|
1037
|
+
f(p, w) - 100 <= k && (m = D);
|
|
1038
|
+
}), m && m.value !== a.value && (a.value = m.value);
|
|
1039
|
+
}
|
|
1040
|
+
function E() {
|
|
1041
|
+
d();
|
|
1042
|
+
}
|
|
1043
|
+
return nt(() => {
|
|
1044
|
+
var w;
|
|
1045
|
+
(w = r.value) == null || w.addEventListener("scroll", E, { passive: !0 });
|
|
1046
|
+
}), qn(() => {
|
|
1047
|
+
var w;
|
|
1048
|
+
(w = r.value) == null || w.removeEventListener("scroll", E);
|
|
1049
|
+
}), (w, k) => (c(), _("div", Ma, [
|
|
1050
|
+
I("div", {
|
|
1051
|
+
ref_key: "contentRef",
|
|
1052
|
+
ref: r,
|
|
1053
|
+
class: "content"
|
|
1054
|
+
}, [
|
|
1055
|
+
(c(!0), _(X, null, oe(g(l).filter((x) => !x.hide), (x, m) => (c(), _("div", {
|
|
1056
|
+
id: `lINfo${x.value}`,
|
|
1057
|
+
key: m,
|
|
1058
|
+
class: "item"
|
|
1059
|
+
}, [
|
|
1060
|
+
I("div", Ya, [
|
|
1061
|
+
w.$slots[`title-${x.value}`] ? (c(), _("div", Va, [
|
|
1062
|
+
z(w.$slots, `title-${x.value}`, {}, void 0, !0)
|
|
1063
|
+
])) : (c(), _("div", Ua, Y(x.label), 1))
|
|
1064
|
+
]),
|
|
1065
|
+
x.show ? (c(), _("div", za, [
|
|
1066
|
+
z(w.$slots, x.value, {}, void 0, !0)
|
|
1067
|
+
])) : L("", !0)
|
|
1068
|
+
], 8, Ba))), 128)),
|
|
1069
|
+
I("div", Ha, [
|
|
1070
|
+
z(w.$slots, "footer", {}, void 0, !0)
|
|
1071
|
+
])
|
|
1072
|
+
], 512),
|
|
1073
|
+
e.showMenu ? (c(), _("div", Ka, [
|
|
1074
|
+
P(g(wn), {
|
|
1075
|
+
"active-key": a.value,
|
|
1076
|
+
"onUpdate:activeKey": k[0] || (k[0] = (x) => a.value = x),
|
|
1077
|
+
"tab-position": "right",
|
|
1078
|
+
style: { height: "200px" },
|
|
1079
|
+
onTabChange: u
|
|
1080
|
+
}, {
|
|
1081
|
+
default: C(() => [
|
|
1082
|
+
(c(!0), _(X, null, oe(e.items.filter((x) => !x.hide), (x, m) => (c(), B(g(kn), {
|
|
1083
|
+
key: m,
|
|
1084
|
+
label: x.label,
|
|
1085
|
+
name: x.value
|
|
1086
|
+
}, null, 8, ["label", "name"]))), 128))
|
|
1087
|
+
]),
|
|
1088
|
+
_: 1
|
|
1089
|
+
}, 8, ["active-key"])
|
|
1090
|
+
])) : L("", !0)
|
|
1091
|
+
]));
|
|
1092
|
+
}
|
|
1093
|
+
}), Xa = /* @__PURE__ */ ae(ja, [["__scopeId", "data-v-073ecdc0"]]), er = pe(Xa), Wa = { class: "l-modal" }, Ga = { key: 1 }, qa = /* @__PURE__ */ ee({
|
|
1094
|
+
name: "LModal",
|
|
1095
|
+
__name: "index",
|
|
1096
|
+
props: {
|
|
1097
|
+
modelValue: { type: Boolean },
|
|
1098
|
+
title: {}
|
|
1099
|
+
},
|
|
1100
|
+
emits: ["update:modelValue"],
|
|
1101
|
+
setup(e, { emit: t }) {
|
|
1102
|
+
const n = e, o = t, a = R(), l = tt(n, "modelValue", o), { x: r, y: i, isDragging: s } = Co(a), u = R(0), f = R(0), d = R(!1), E = R(0), w = R(0), k = R(0), x = R(0), m = R({ left: 0, right: 0, top: 0, bottom: 0 });
|
|
1103
|
+
Oe([r, i], () => {
|
|
1104
|
+
var y;
|
|
1105
|
+
if (!d.value) {
|
|
1106
|
+
u.value = r.value, f.value = i.value;
|
|
1107
|
+
const D = document.body.getBoundingClientRect(), p = (y = a.value) == null ? void 0 : y.getBoundingClientRect();
|
|
1108
|
+
m.value.right = D.width - p.width, m.value.bottom = D.height - p.height, k.value = E.value, x.value = w.value;
|
|
1109
|
+
}
|
|
1110
|
+
d.value = !0;
|
|
1111
|
+
}), Oe(s, () => {
|
|
1112
|
+
s || (d.value = !1);
|
|
1113
|
+
}), Jn(() => {
|
|
1114
|
+
d.value && (E.value = k.value + Math.min(Math.max(m.value.left, r.value), m.value.right) - u.value, w.value = x.value + Math.min(Math.max(m.value.top, i.value), m.value.bottom) - f.value);
|
|
1115
|
+
});
|
|
1116
|
+
const b = ce(() => ({
|
|
1117
|
+
transform: `translate(${E.value}px, ${w.value}px)`
|
|
1118
|
+
}));
|
|
1119
|
+
return (y, D) => (c(), B(g(yn), xe({
|
|
1120
|
+
open: g(l),
|
|
1121
|
+
"onUpdate:open": D[0] || (D[0] = (p) => mn(l) ? l.value = p : null),
|
|
1122
|
+
"wrap-style": { overflow: "hidden" }
|
|
1123
|
+
}, y.$attrs, {
|
|
1124
|
+
"wrap-class-name": "l-modal",
|
|
1125
|
+
"cancel-text": "取消",
|
|
1126
|
+
"ok-text": "确定"
|
|
1127
|
+
}), Ke({
|
|
1128
|
+
title: C(() => [
|
|
1129
|
+
I("div", {
|
|
1130
|
+
ref_key: "modalTitleRef",
|
|
1131
|
+
ref: a,
|
|
1132
|
+
style: { width: "100%", cursor: "move" }
|
|
1133
|
+
}, [
|
|
1134
|
+
y.$slots.title ? z(y.$slots, "title", { key: 0 }, void 0, !0) : (c(), _("span", Ga, Y(e.title), 1))
|
|
1135
|
+
], 512)
|
|
1136
|
+
]),
|
|
1137
|
+
modalRender: C(({ originVNode: p }) => [
|
|
1138
|
+
I("div", {
|
|
1139
|
+
style: fn(b.value)
|
|
1140
|
+
}, [
|
|
1141
|
+
(c(), B(Qn(p)))
|
|
1142
|
+
], 4)
|
|
1143
|
+
]),
|
|
1144
|
+
default: C(() => [
|
|
1145
|
+
I("div", Wa, [
|
|
1146
|
+
z(y.$slots, "default", {}, void 0, !0)
|
|
1147
|
+
])
|
|
1148
|
+
]),
|
|
1149
|
+
_: 2
|
|
1150
|
+
}, [
|
|
1151
|
+
y.$slots.footer ? {
|
|
1152
|
+
name: "footer",
|
|
1153
|
+
fn: C(() => [
|
|
1154
|
+
z(y.$slots, "footer", {}, void 0, !0)
|
|
1155
|
+
]),
|
|
1156
|
+
key: "0"
|
|
1157
|
+
} : void 0
|
|
1158
|
+
]), 1040, ["open"]));
|
|
1159
|
+
}
|
|
1160
|
+
}), Ja = /* @__PURE__ */ ae(qa, [["__scopeId", "data-v-f0bb5f5e"]]), Qt = pe(Ja);
|
|
1161
|
+
function Zt(e, t) {
|
|
1162
|
+
var r, i;
|
|
1163
|
+
const o = `; ${e}`.split(`; ${t}=`);
|
|
1164
|
+
if (o.length === 2) return (i = (r = o.pop()) == null ? void 0 : r.split(";").shift()) == null ? void 0 : i.trim();
|
|
1165
|
+
const a = t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), l = e.match(new RegExp(`(?:^|;\\s*)${a}=([^;]*)`));
|
|
1166
|
+
return l ? l[1].trim() : void 0;
|
|
1167
|
+
}
|
|
1168
|
+
function Qa(e, t = ".le365.com.cn") {
|
|
1169
|
+
const n = Zt(document.cookie, e);
|
|
1170
|
+
if (n != null) return n;
|
|
1171
|
+
const o = `${e}@${t.replace(/^\./, "")}`;
|
|
1172
|
+
return Zt(document.cookie, o);
|
|
1173
|
+
}
|
|
1174
|
+
const xn = "Admin-Token";
|
|
1175
|
+
function Za(e = xn) {
|
|
1176
|
+
return {
|
|
1177
|
+
Authorization: `Bearer ${el(e)}`,
|
|
1178
|
+
clientid: void 0
|
|
1179
|
+
};
|
|
1180
|
+
}
|
|
1181
|
+
function el(e = xn) {
|
|
1182
|
+
return Qa(e);
|
|
1183
|
+
}
|
|
1184
|
+
function tl(e, t) {
|
|
1185
|
+
if (e == null)
|
|
1186
|
+
return "--";
|
|
1187
|
+
const n = Number(e);
|
|
1188
|
+
return Number.isNaN(n) ? "--" : n.toFixed(2).replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
|
1189
|
+
}
|
|
1190
|
+
const nl = {
|
|
1191
|
+
// Options.jsx
|
|
1192
|
+
items_per_page: "条/页",
|
|
1193
|
+
jump_to: "跳至",
|
|
1194
|
+
jump_to_confirm: "确定",
|
|
1195
|
+
page: "页",
|
|
1196
|
+
// Pagination.jsx
|
|
1197
|
+
prev_page: "上一页",
|
|
1198
|
+
next_page: "下一页",
|
|
1199
|
+
prev_5: "向前 5 页",
|
|
1200
|
+
next_5: "向后 5 页",
|
|
1201
|
+
prev_3: "向前 3 页",
|
|
1202
|
+
next_3: "向后 3 页"
|
|
1203
|
+
};
|
|
1204
|
+
function mt() {
|
|
1205
|
+
return mt = Object.assign ? Object.assign.bind() : function(e) {
|
|
1206
|
+
for (var t = 1; t < arguments.length; t++) {
|
|
1207
|
+
var n = arguments[t];
|
|
1208
|
+
for (var o in n) ({}).hasOwnProperty.call(n, o) && (e[o] = n[o]);
|
|
1209
|
+
}
|
|
1210
|
+
return e;
|
|
1211
|
+
}, mt.apply(null, arguments);
|
|
1212
|
+
}
|
|
1213
|
+
const ol = {
|
|
1214
|
+
locale: "zh_CN",
|
|
1215
|
+
today: "今天",
|
|
1216
|
+
now: "此刻",
|
|
1217
|
+
backToToday: "返回今天",
|
|
1218
|
+
ok: "确定",
|
|
1219
|
+
timeSelect: "选择时间",
|
|
1220
|
+
dateSelect: "选择日期",
|
|
1221
|
+
weekSelect: "选择周",
|
|
1222
|
+
clear: "清除",
|
|
1223
|
+
month: "月",
|
|
1224
|
+
year: "年",
|
|
1225
|
+
previousMonth: "上个月 (翻页上键)",
|
|
1226
|
+
nextMonth: "下个月 (翻页下键)",
|
|
1227
|
+
monthSelect: "选择月份",
|
|
1228
|
+
yearSelect: "选择年份",
|
|
1229
|
+
decadeSelect: "选择年代",
|
|
1230
|
+
yearFormat: "YYYY年",
|
|
1231
|
+
dayFormat: "D日",
|
|
1232
|
+
dateFormat: "YYYY年M月D日",
|
|
1233
|
+
dateTimeFormat: "YYYY年M月D日 HH时mm分ss秒",
|
|
1234
|
+
previousYear: "上一年 (Control键加左方向键)",
|
|
1235
|
+
nextYear: "下一年 (Control键加右方向键)",
|
|
1236
|
+
previousDecade: "上一年代",
|
|
1237
|
+
nextDecade: "下一年代",
|
|
1238
|
+
previousCentury: "上一世纪",
|
|
1239
|
+
nextCentury: "下一世纪"
|
|
1240
|
+
}, $n = {
|
|
1241
|
+
placeholder: "请选择时间",
|
|
1242
|
+
rangePlaceholder: ["开始时间", "结束时间"]
|
|
1243
|
+
}, Ft = {
|
|
1244
|
+
lang: mt({
|
|
1245
|
+
placeholder: "请选择日期",
|
|
1246
|
+
yearPlaceholder: "请选择年份",
|
|
1247
|
+
quarterPlaceholder: "请选择季度",
|
|
1248
|
+
monthPlaceholder: "请选择月份",
|
|
1249
|
+
weekPlaceholder: "请选择周",
|
|
1250
|
+
rangePlaceholder: ["开始日期", "结束日期"],
|
|
1251
|
+
rangeYearPlaceholder: ["开始年份", "结束年份"],
|
|
1252
|
+
rangeMonthPlaceholder: ["开始月份", "结束月份"],
|
|
1253
|
+
rangeQuarterPlaceholder: ["开始季度", "结束季度"],
|
|
1254
|
+
rangeWeekPlaceholder: ["开始周", "结束周"]
|
|
1255
|
+
}, ol),
|
|
1256
|
+
timePickerLocale: mt({}, $n)
|
|
1257
|
+
};
|
|
1258
|
+
Ft.lang.ok = "确定";
|
|
1259
|
+
const he = "${label}不是一个有效的${type}", al = {
|
|
1260
|
+
locale: "zh-cn",
|
|
1261
|
+
Pagination: nl,
|
|
1262
|
+
DatePicker: Ft,
|
|
1263
|
+
TimePicker: $n,
|
|
1264
|
+
Calendar: Ft,
|
|
1265
|
+
// locales for all components
|
|
1266
|
+
global: {
|
|
1267
|
+
placeholder: "请选择"
|
|
1268
|
+
},
|
|
1269
|
+
Table: {
|
|
1270
|
+
filterTitle: "筛选",
|
|
1271
|
+
filterConfirm: "确定",
|
|
1272
|
+
filterReset: "重置",
|
|
1273
|
+
filterEmptyText: "无筛选项",
|
|
1274
|
+
filterCheckall: "全选",
|
|
1275
|
+
filterSearchPlaceholder: "在筛选项中搜索",
|
|
1276
|
+
selectAll: "全选当页",
|
|
1277
|
+
selectInvert: "反选当页",
|
|
1278
|
+
selectNone: "清空所有",
|
|
1279
|
+
selectionAll: "全选所有",
|
|
1280
|
+
sortTitle: "排序",
|
|
1281
|
+
expand: "展开行",
|
|
1282
|
+
collapse: "关闭行",
|
|
1283
|
+
triggerDesc: "点击降序",
|
|
1284
|
+
triggerAsc: "点击升序",
|
|
1285
|
+
cancelSort: "取消排序"
|
|
1286
|
+
},
|
|
1287
|
+
Tour: {
|
|
1288
|
+
Next: "下一步",
|
|
1289
|
+
Previous: "上一步",
|
|
1290
|
+
Finish: "结束导览"
|
|
1291
|
+
},
|
|
1292
|
+
Modal: {
|
|
1293
|
+
okText: "确定",
|
|
1294
|
+
cancelText: "取消",
|
|
1295
|
+
justOkText: "知道了"
|
|
1296
|
+
},
|
|
1297
|
+
Popconfirm: {
|
|
1298
|
+
cancelText: "取消",
|
|
1299
|
+
okText: "确定"
|
|
1300
|
+
},
|
|
1301
|
+
Transfer: {
|
|
1302
|
+
searchPlaceholder: "请输入搜索内容",
|
|
1303
|
+
itemUnit: "项",
|
|
1304
|
+
itemsUnit: "项",
|
|
1305
|
+
remove: "删除",
|
|
1306
|
+
selectCurrent: "全选当页",
|
|
1307
|
+
removeCurrent: "删除当页",
|
|
1308
|
+
selectAll: "全选所有",
|
|
1309
|
+
removeAll: "删除全部",
|
|
1310
|
+
selectInvert: "反选当页"
|
|
1311
|
+
},
|
|
1312
|
+
Upload: {
|
|
1313
|
+
uploading: "文件上传中",
|
|
1314
|
+
removeFile: "删除文件",
|
|
1315
|
+
uploadError: "上传错误",
|
|
1316
|
+
previewFile: "预览文件",
|
|
1317
|
+
downloadFile: "下载文件"
|
|
1318
|
+
},
|
|
1319
|
+
Empty: {
|
|
1320
|
+
description: "暂无数据"
|
|
1321
|
+
},
|
|
1322
|
+
Icon: {
|
|
1323
|
+
icon: "图标"
|
|
1324
|
+
},
|
|
1325
|
+
Text: {
|
|
1326
|
+
edit: "编辑",
|
|
1327
|
+
copy: "复制",
|
|
1328
|
+
copied: "复制成功",
|
|
1329
|
+
expand: "展开"
|
|
1330
|
+
},
|
|
1331
|
+
PageHeader: {
|
|
1332
|
+
back: "返回"
|
|
1333
|
+
},
|
|
1334
|
+
Form: {
|
|
1335
|
+
optional: "(可选)",
|
|
1336
|
+
defaultValidateMessages: {
|
|
1337
|
+
default: "字段验证错误${label}",
|
|
1338
|
+
required: "请输入${label}",
|
|
1339
|
+
enum: "${label}必须是其中一个[${enum}]",
|
|
1340
|
+
whitespace: "${label}不能为空字符",
|
|
1341
|
+
date: {
|
|
1342
|
+
format: "${label}日期格式无效",
|
|
1343
|
+
parse: "${label}不能转换为日期",
|
|
1344
|
+
invalid: "${label}是一个无效日期"
|
|
1345
|
+
},
|
|
1346
|
+
types: {
|
|
1347
|
+
string: he,
|
|
1348
|
+
method: he,
|
|
1349
|
+
array: he,
|
|
1350
|
+
object: he,
|
|
1351
|
+
number: he,
|
|
1352
|
+
date: he,
|
|
1353
|
+
boolean: he,
|
|
1354
|
+
integer: he,
|
|
1355
|
+
float: he,
|
|
1356
|
+
regexp: he,
|
|
1357
|
+
email: he,
|
|
1358
|
+
url: he,
|
|
1359
|
+
hex: he
|
|
1360
|
+
},
|
|
1361
|
+
string: {
|
|
1362
|
+
len: "${label}须为${len}个字符",
|
|
1363
|
+
min: "${label}最少${min}个字符",
|
|
1364
|
+
max: "${label}最多${max}个字符",
|
|
1365
|
+
range: "${label}须在${min}-${max}字符之间"
|
|
1366
|
+
},
|
|
1367
|
+
number: {
|
|
1368
|
+
len: "${label}必须等于${len}",
|
|
1369
|
+
min: "${label}最小值为${min}",
|
|
1370
|
+
max: "${label}最大值为${max}",
|
|
1371
|
+
range: "${label}须在${min}-${max}之间"
|
|
1372
|
+
},
|
|
1373
|
+
array: {
|
|
1374
|
+
len: "须为${len}个${label}",
|
|
1375
|
+
min: "最少${min}个${label}",
|
|
1376
|
+
max: "最多${max}个${label}",
|
|
1377
|
+
range: "${label}数量须在${min}-${max}之间"
|
|
1378
|
+
},
|
|
1379
|
+
pattern: {
|
|
1380
|
+
mismatch: "${label}与模式不匹配${pattern}"
|
|
1381
|
+
}
|
|
1382
|
+
}
|
|
1383
|
+
},
|
|
1384
|
+
Image: {
|
|
1385
|
+
preview: "预览"
|
|
1386
|
+
},
|
|
1387
|
+
QRCode: {
|
|
1388
|
+
expired: "二维码已过期",
|
|
1389
|
+
refresh: "点击刷新",
|
|
1390
|
+
scanned: "已扫描"
|
|
1391
|
+
}
|
|
1392
|
+
};
|
|
1393
|
+
/**!
|
|
1394
|
+
* Sortable 1.15.6
|
|
1395
|
+
* @author RubaXa <trash@rubaxa.org>
|
|
1396
|
+
* @author owenm <owen23355@gmail.com>
|
|
1397
|
+
* @license MIT
|
|
1398
|
+
*/
|
|
1399
|
+
function en(e, t) {
|
|
1400
|
+
var n = Object.keys(e);
|
|
1401
|
+
if (Object.getOwnPropertySymbols) {
|
|
1402
|
+
var o = Object.getOwnPropertySymbols(e);
|
|
1403
|
+
t && (o = o.filter(function(a) {
|
|
1404
|
+
return Object.getOwnPropertyDescriptor(e, a).enumerable;
|
|
1405
|
+
})), n.push.apply(n, o);
|
|
1406
|
+
}
|
|
1407
|
+
return n;
|
|
1408
|
+
}
|
|
1409
|
+
function Ee(e) {
|
|
1410
|
+
for (var t = 1; t < arguments.length; t++) {
|
|
1411
|
+
var n = arguments[t] != null ? arguments[t] : {};
|
|
1412
|
+
t % 2 ? en(Object(n), !0).forEach(function(o) {
|
|
1413
|
+
ll(e, o, n[o]);
|
|
1414
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : en(Object(n)).forEach(function(o) {
|
|
1415
|
+
Object.defineProperty(e, o, Object.getOwnPropertyDescriptor(n, o));
|
|
1416
|
+
});
|
|
1417
|
+
}
|
|
1418
|
+
return e;
|
|
1419
|
+
}
|
|
1420
|
+
function dt(e) {
|
|
1421
|
+
"@babel/helpers - typeof";
|
|
1422
|
+
return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? dt = function(t) {
|
|
1423
|
+
return typeof t;
|
|
1424
|
+
} : dt = function(t) {
|
|
1425
|
+
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
1426
|
+
}, dt(e);
|
|
1427
|
+
}
|
|
1428
|
+
function ll(e, t, n) {
|
|
1429
|
+
return t in e ? Object.defineProperty(e, t, {
|
|
1430
|
+
value: n,
|
|
1431
|
+
enumerable: !0,
|
|
1432
|
+
configurable: !0,
|
|
1433
|
+
writable: !0
|
|
1434
|
+
}) : e[t] = n, e;
|
|
1435
|
+
}
|
|
1436
|
+
function Ce() {
|
|
1437
|
+
return Ce = Object.assign || function(e) {
|
|
1438
|
+
for (var t = 1; t < arguments.length; t++) {
|
|
1439
|
+
var n = arguments[t];
|
|
1440
|
+
for (var o in n)
|
|
1441
|
+
Object.prototype.hasOwnProperty.call(n, o) && (e[o] = n[o]);
|
|
1442
|
+
}
|
|
1443
|
+
return e;
|
|
1444
|
+
}, Ce.apply(this, arguments);
|
|
1445
|
+
}
|
|
1446
|
+
function il(e, t) {
|
|
1447
|
+
if (e == null) return {};
|
|
1448
|
+
var n = {}, o = Object.keys(e), a, l;
|
|
1449
|
+
for (l = 0; l < o.length; l++)
|
|
1450
|
+
a = o[l], !(t.indexOf(a) >= 0) && (n[a] = e[a]);
|
|
1451
|
+
return n;
|
|
1452
|
+
}
|
|
1453
|
+
function rl(e, t) {
|
|
1454
|
+
if (e == null) return {};
|
|
1455
|
+
var n = il(e, t), o, a;
|
|
1456
|
+
if (Object.getOwnPropertySymbols) {
|
|
1457
|
+
var l = Object.getOwnPropertySymbols(e);
|
|
1458
|
+
for (a = 0; a < l.length; a++)
|
|
1459
|
+
o = l[a], !(t.indexOf(o) >= 0) && Object.prototype.propertyIsEnumerable.call(e, o) && (n[o] = e[o]);
|
|
1460
|
+
}
|
|
1461
|
+
return n;
|
|
1462
|
+
}
|
|
1463
|
+
var sl = "1.15.6";
|
|
1464
|
+
function $e(e) {
|
|
1465
|
+
if (typeof window < "u" && window.navigator)
|
|
1466
|
+
return !!/* @__PURE__ */ navigator.userAgent.match(e);
|
|
1467
|
+
}
|
|
1468
|
+
var De = $e(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), ot = $e(/Edge/i), tn = $e(/firefox/i), qe = $e(/safari/i) && !$e(/chrome/i) && !$e(/android/i), Ut = $e(/iP(ad|od|hone)/i), Cn = $e(/chrome/i) && $e(/android/i), Dn = {
|
|
1469
|
+
capture: !1,
|
|
1470
|
+
passive: !1
|
|
1471
|
+
};
|
|
1472
|
+
function U(e, t, n) {
|
|
1473
|
+
e.addEventListener(t, n, !De && Dn);
|
|
1474
|
+
}
|
|
1475
|
+
function V(e, t, n) {
|
|
1476
|
+
e.removeEventListener(t, n, !De && Dn);
|
|
1477
|
+
}
|
|
1478
|
+
function gt(e, t) {
|
|
1479
|
+
if (t) {
|
|
1480
|
+
if (t[0] === ">" && (t = t.substring(1)), e)
|
|
1481
|
+
try {
|
|
1482
|
+
if (e.matches)
|
|
1483
|
+
return e.matches(t);
|
|
1484
|
+
if (e.msMatchesSelector)
|
|
1485
|
+
return e.msMatchesSelector(t);
|
|
1486
|
+
if (e.webkitMatchesSelector)
|
|
1487
|
+
return e.webkitMatchesSelector(t);
|
|
1488
|
+
} catch {
|
|
1489
|
+
return !1;
|
|
1490
|
+
}
|
|
1491
|
+
return !1;
|
|
1492
|
+
}
|
|
1493
|
+
}
|
|
1494
|
+
function In(e) {
|
|
1495
|
+
return e.host && e !== document && e.host.nodeType ? e.host : e.parentNode;
|
|
1496
|
+
}
|
|
1497
|
+
function ke(e, t, n, o) {
|
|
1498
|
+
if (e) {
|
|
1499
|
+
n = n || document;
|
|
1500
|
+
do {
|
|
1501
|
+
if (t != null && (t[0] === ">" ? e.parentNode === n && gt(e, t) : gt(e, t)) || o && e === n)
|
|
1502
|
+
return e;
|
|
1503
|
+
if (e === n) break;
|
|
1504
|
+
} while (e = In(e));
|
|
1505
|
+
}
|
|
1506
|
+
return null;
|
|
1507
|
+
}
|
|
1508
|
+
var nn = /\s+/g;
|
|
1509
|
+
function me(e, t, n) {
|
|
1510
|
+
if (e && t)
|
|
1511
|
+
if (e.classList)
|
|
1512
|
+
e.classList[n ? "add" : "remove"](t);
|
|
1513
|
+
else {
|
|
1514
|
+
var o = (" " + e.className + " ").replace(nn, " ").replace(" " + t + " ", " ");
|
|
1515
|
+
e.className = (o + (n ? " " + t : "")).replace(nn, " ");
|
|
1516
|
+
}
|
|
1517
|
+
}
|
|
1518
|
+
function O(e, t, n) {
|
|
1519
|
+
var o = e && e.style;
|
|
1520
|
+
if (o) {
|
|
1521
|
+
if (n === void 0)
|
|
1522
|
+
return document.defaultView && document.defaultView.getComputedStyle ? n = document.defaultView.getComputedStyle(e, "") : e.currentStyle && (n = e.currentStyle), t === void 0 ? n : n[t];
|
|
1523
|
+
!(t in o) && t.indexOf("webkit") === -1 && (t = "-webkit-" + t), o[t] = n + (typeof n == "string" ? "" : "px");
|
|
1524
|
+
}
|
|
1525
|
+
}
|
|
1526
|
+
function ze(e, t) {
|
|
1527
|
+
var n = "";
|
|
1528
|
+
if (typeof e == "string")
|
|
1529
|
+
n = e;
|
|
1530
|
+
else
|
|
1531
|
+
do {
|
|
1532
|
+
var o = O(e, "transform");
|
|
1533
|
+
o && o !== "none" && (n = o + " " + n);
|
|
1534
|
+
} while (!t && (e = e.parentNode));
|
|
1535
|
+
var a = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
|
|
1536
|
+
return a && new a(n);
|
|
1537
|
+
}
|
|
1538
|
+
function Nn(e, t, n) {
|
|
1539
|
+
if (e) {
|
|
1540
|
+
var o = e.getElementsByTagName(t), a = 0, l = o.length;
|
|
1541
|
+
if (n)
|
|
1542
|
+
for (; a < l; a++)
|
|
1543
|
+
n(o[a], a);
|
|
1544
|
+
return o;
|
|
1545
|
+
}
|
|
1546
|
+
return [];
|
|
1547
|
+
}
|
|
1548
|
+
function Te() {
|
|
1549
|
+
var e = document.scrollingElement;
|
|
1550
|
+
return e || document.documentElement;
|
|
1551
|
+
}
|
|
1552
|
+
function ne(e, t, n, o, a) {
|
|
1553
|
+
if (!(!e.getBoundingClientRect && e !== window)) {
|
|
1554
|
+
var l, r, i, s, u, f, d;
|
|
1555
|
+
if (e !== window && e.parentNode && e !== Te() ? (l = e.getBoundingClientRect(), r = l.top, i = l.left, s = l.bottom, u = l.right, f = l.height, d = l.width) : (r = 0, i = 0, s = window.innerHeight, u = window.innerWidth, f = window.innerHeight, d = window.innerWidth), (t || n) && e !== window && (a = a || e.parentNode, !De))
|
|
1556
|
+
do
|
|
1557
|
+
if (a && a.getBoundingClientRect && (O(a, "transform") !== "none" || n && O(a, "position") !== "static")) {
|
|
1558
|
+
var E = a.getBoundingClientRect();
|
|
1559
|
+
r -= E.top + parseInt(O(a, "border-top-width")), i -= E.left + parseInt(O(a, "border-left-width")), s = r + l.height, u = i + l.width;
|
|
1560
|
+
break;
|
|
1561
|
+
}
|
|
1562
|
+
while (a = a.parentNode);
|
|
1563
|
+
if (o && e !== window) {
|
|
1564
|
+
var w = ze(a || e), k = w && w.a, x = w && w.d;
|
|
1565
|
+
w && (r /= x, i /= k, d /= k, f /= x, s = r + f, u = i + d);
|
|
1566
|
+
}
|
|
1567
|
+
return {
|
|
1568
|
+
top: r,
|
|
1569
|
+
left: i,
|
|
1570
|
+
bottom: s,
|
|
1571
|
+
right: u,
|
|
1572
|
+
width: d,
|
|
1573
|
+
height: f
|
|
1574
|
+
};
|
|
1575
|
+
}
|
|
1576
|
+
}
|
|
1577
|
+
function on(e, t, n) {
|
|
1578
|
+
for (var o = Ae(e, !0), a = ne(e)[t]; o; ) {
|
|
1579
|
+
var l = ne(o)[n], r = void 0;
|
|
1580
|
+
if (r = a >= l, !r) return o;
|
|
1581
|
+
if (o === Te()) break;
|
|
1582
|
+
o = Ae(o, !1);
|
|
1583
|
+
}
|
|
1584
|
+
return !1;
|
|
1585
|
+
}
|
|
1586
|
+
function je(e, t, n, o) {
|
|
1587
|
+
for (var a = 0, l = 0, r = e.children; l < r.length; ) {
|
|
1588
|
+
if (r[l].style.display !== "none" && r[l] !== F.ghost && (o || r[l] !== F.dragged) && ke(r[l], n.draggable, e, !1)) {
|
|
1589
|
+
if (a === t)
|
|
1590
|
+
return r[l];
|
|
1591
|
+
a++;
|
|
1592
|
+
}
|
|
1593
|
+
l++;
|
|
1594
|
+
}
|
|
1595
|
+
return null;
|
|
1596
|
+
}
|
|
1597
|
+
function zt(e, t) {
|
|
1598
|
+
for (var n = e.lastElementChild; n && (n === F.ghost || O(n, "display") === "none" || t && !gt(n, t)); )
|
|
1599
|
+
n = n.previousElementSibling;
|
|
1600
|
+
return n || null;
|
|
1601
|
+
}
|
|
1602
|
+
function ve(e, t) {
|
|
1603
|
+
var n = 0;
|
|
1604
|
+
if (!e || !e.parentNode)
|
|
1605
|
+
return -1;
|
|
1606
|
+
for (; e = e.previousElementSibling; )
|
|
1607
|
+
e.nodeName.toUpperCase() !== "TEMPLATE" && e !== F.clone && (!t || gt(e, t)) && n++;
|
|
1608
|
+
return n;
|
|
1609
|
+
}
|
|
1610
|
+
function an(e) {
|
|
1611
|
+
var t = 0, n = 0, o = Te();
|
|
1612
|
+
if (e)
|
|
1613
|
+
do {
|
|
1614
|
+
var a = ze(e), l = a.a, r = a.d;
|
|
1615
|
+
t += e.scrollLeft * l, n += e.scrollTop * r;
|
|
1616
|
+
} while (e !== o && (e = e.parentNode));
|
|
1617
|
+
return [t, n];
|
|
1618
|
+
}
|
|
1619
|
+
function ul(e, t) {
|
|
1620
|
+
for (var n in e)
|
|
1621
|
+
if (e.hasOwnProperty(n)) {
|
|
1622
|
+
for (var o in t)
|
|
1623
|
+
if (t.hasOwnProperty(o) && t[o] === e[n][o]) return Number(n);
|
|
1624
|
+
}
|
|
1625
|
+
return -1;
|
|
1626
|
+
}
|
|
1627
|
+
function Ae(e, t) {
|
|
1628
|
+
if (!e || !e.getBoundingClientRect) return Te();
|
|
1629
|
+
var n = e, o = !1;
|
|
1630
|
+
do
|
|
1631
|
+
if (n.clientWidth < n.scrollWidth || n.clientHeight < n.scrollHeight) {
|
|
1632
|
+
var a = O(n);
|
|
1633
|
+
if (n.clientWidth < n.scrollWidth && (a.overflowX == "auto" || a.overflowX == "scroll") || n.clientHeight < n.scrollHeight && (a.overflowY == "auto" || a.overflowY == "scroll")) {
|
|
1634
|
+
if (!n.getBoundingClientRect || n === document.body) return Te();
|
|
1635
|
+
if (o || t) return n;
|
|
1636
|
+
o = !0;
|
|
1637
|
+
}
|
|
1638
|
+
}
|
|
1639
|
+
while (n = n.parentNode);
|
|
1640
|
+
return Te();
|
|
1641
|
+
}
|
|
1642
|
+
function dl(e, t) {
|
|
1643
|
+
if (e && t)
|
|
1644
|
+
for (var n in t)
|
|
1645
|
+
t.hasOwnProperty(n) && (e[n] = t[n]);
|
|
1646
|
+
return e;
|
|
1647
|
+
}
|
|
1648
|
+
function St(e, t) {
|
|
1649
|
+
return Math.round(e.top) === Math.round(t.top) && Math.round(e.left) === Math.round(t.left) && Math.round(e.height) === Math.round(t.height) && Math.round(e.width) === Math.round(t.width);
|
|
1650
|
+
}
|
|
1651
|
+
var Je;
|
|
1652
|
+
function Pn(e, t) {
|
|
1653
|
+
return function() {
|
|
1654
|
+
if (!Je) {
|
|
1655
|
+
var n = arguments, o = this;
|
|
1656
|
+
n.length === 1 ? e.call(o, n[0]) : e.apply(o, n), Je = setTimeout(function() {
|
|
1657
|
+
Je = void 0;
|
|
1658
|
+
}, t);
|
|
1659
|
+
}
|
|
1660
|
+
};
|
|
1661
|
+
}
|
|
1662
|
+
function cl() {
|
|
1663
|
+
clearTimeout(Je), Je = void 0;
|
|
1664
|
+
}
|
|
1665
|
+
function An(e, t, n) {
|
|
1666
|
+
e.scrollLeft += t, e.scrollTop += n;
|
|
1667
|
+
}
|
|
1668
|
+
function On(e) {
|
|
1669
|
+
var t = window.Polymer, n = window.jQuery || window.Zepto;
|
|
1670
|
+
return t && t.dom ? t.dom(e).cloneNode(!0) : n ? n(e).clone(!0)[0] : e.cloneNode(!0);
|
|
1671
|
+
}
|
|
1672
|
+
function Fn(e, t, n) {
|
|
1673
|
+
var o = {};
|
|
1674
|
+
return Array.from(e.children).forEach(function(a) {
|
|
1675
|
+
var l, r, i, s;
|
|
1676
|
+
if (!(!ke(a, t.draggable, e, !1) || a.animated || a === n)) {
|
|
1677
|
+
var u = ne(a);
|
|
1678
|
+
o.left = Math.min((l = o.left) !== null && l !== void 0 ? l : 1 / 0, u.left), o.top = Math.min((r = o.top) !== null && r !== void 0 ? r : 1 / 0, u.top), o.right = Math.max((i = o.right) !== null && i !== void 0 ? i : -1 / 0, u.right), o.bottom = Math.max((s = o.bottom) !== null && s !== void 0 ? s : -1 / 0, u.bottom);
|
|
1679
|
+
}
|
|
1680
|
+
}), o.width = o.right - o.left, o.height = o.bottom - o.top, o.x = o.left, o.y = o.top, o;
|
|
1681
|
+
}
|
|
1682
|
+
var fe = "Sortable" + (/* @__PURE__ */ new Date()).getTime();
|
|
1683
|
+
function fl() {
|
|
1684
|
+
var e = [], t;
|
|
1685
|
+
return {
|
|
1686
|
+
captureAnimationState: function() {
|
|
1687
|
+
if (e = [], !!this.options.animation) {
|
|
1688
|
+
var o = [].slice.call(this.el.children);
|
|
1689
|
+
o.forEach(function(a) {
|
|
1690
|
+
if (!(O(a, "display") === "none" || a === F.ghost)) {
|
|
1691
|
+
e.push({
|
|
1692
|
+
target: a,
|
|
1693
|
+
rect: ne(a)
|
|
1694
|
+
});
|
|
1695
|
+
var l = Ee({}, e[e.length - 1].rect);
|
|
1696
|
+
if (a.thisAnimationDuration) {
|
|
1697
|
+
var r = ze(a, !0);
|
|
1698
|
+
r && (l.top -= r.f, l.left -= r.e);
|
|
1699
|
+
}
|
|
1700
|
+
a.fromRect = l;
|
|
1701
|
+
}
|
|
1702
|
+
});
|
|
1703
|
+
}
|
|
1704
|
+
},
|
|
1705
|
+
addAnimationState: function(o) {
|
|
1706
|
+
e.push(o);
|
|
1707
|
+
},
|
|
1708
|
+
removeAnimationState: function(o) {
|
|
1709
|
+
e.splice(ul(e, {
|
|
1710
|
+
target: o
|
|
1711
|
+
}), 1);
|
|
1712
|
+
},
|
|
1713
|
+
animateAll: function(o) {
|
|
1714
|
+
var a = this;
|
|
1715
|
+
if (!this.options.animation) {
|
|
1716
|
+
clearTimeout(t), typeof o == "function" && o();
|
|
1717
|
+
return;
|
|
1718
|
+
}
|
|
1719
|
+
var l = !1, r = 0;
|
|
1720
|
+
e.forEach(function(i) {
|
|
1721
|
+
var s = 0, u = i.target, f = u.fromRect, d = ne(u), E = u.prevFromRect, w = u.prevToRect, k = i.rect, x = ze(u, !0);
|
|
1722
|
+
x && (d.top -= x.f, d.left -= x.e), u.toRect = d, u.thisAnimationDuration && St(E, d) && !St(f, d) && // Make sure animatingRect is on line between toRect & fromRect
|
|
1723
|
+
(k.top - d.top) / (k.left - d.left) === (f.top - d.top) / (f.left - d.left) && (s = hl(k, E, w, a.options)), St(d, f) || (u.prevFromRect = f, u.prevToRect = d, s || (s = a.options.animation), a.animate(u, k, d, s)), s && (l = !0, r = Math.max(r, s), clearTimeout(u.animationResetTimer), u.animationResetTimer = setTimeout(function() {
|
|
1724
|
+
u.animationTime = 0, u.prevFromRect = null, u.fromRect = null, u.prevToRect = null, u.thisAnimationDuration = null;
|
|
1725
|
+
}, s), u.thisAnimationDuration = s);
|
|
1726
|
+
}), clearTimeout(t), l ? t = setTimeout(function() {
|
|
1727
|
+
typeof o == "function" && o();
|
|
1728
|
+
}, r) : typeof o == "function" && o(), e = [];
|
|
1729
|
+
},
|
|
1730
|
+
animate: function(o, a, l, r) {
|
|
1731
|
+
if (r) {
|
|
1732
|
+
O(o, "transition", ""), O(o, "transform", "");
|
|
1733
|
+
var i = ze(this.el), s = i && i.a, u = i && i.d, f = (a.left - l.left) / (s || 1), d = (a.top - l.top) / (u || 1);
|
|
1734
|
+
o.animatingX = !!f, o.animatingY = !!d, O(o, "transform", "translate3d(" + f + "px," + d + "px,0)"), this.forRepaintDummy = pl(o), O(o, "transition", "transform " + r + "ms" + (this.options.easing ? " " + this.options.easing : "")), O(o, "transform", "translate3d(0,0,0)"), typeof o.animated == "number" && clearTimeout(o.animated), o.animated = setTimeout(function() {
|
|
1735
|
+
O(o, "transition", ""), O(o, "transform", ""), o.animated = !1, o.animatingX = !1, o.animatingY = !1;
|
|
1736
|
+
}, r);
|
|
1737
|
+
}
|
|
1738
|
+
}
|
|
1739
|
+
};
|
|
1740
|
+
}
|
|
1741
|
+
function pl(e) {
|
|
1742
|
+
return e.offsetWidth;
|
|
1743
|
+
}
|
|
1744
|
+
function hl(e, t, n, o) {
|
|
1745
|
+
return Math.sqrt(Math.pow(t.top - e.top, 2) + Math.pow(t.left - e.left, 2)) / Math.sqrt(Math.pow(t.top - n.top, 2) + Math.pow(t.left - n.left, 2)) * o.animation;
|
|
1746
|
+
}
|
|
1747
|
+
var Be = [], Tt = {
|
|
1748
|
+
initializeByDefault: !0
|
|
1749
|
+
}, at = {
|
|
1750
|
+
mount: function(t) {
|
|
1751
|
+
for (var n in Tt)
|
|
1752
|
+
Tt.hasOwnProperty(n) && !(n in t) && (t[n] = Tt[n]);
|
|
1753
|
+
Be.forEach(function(o) {
|
|
1754
|
+
if (o.pluginName === t.pluginName)
|
|
1755
|
+
throw "Sortable: Cannot mount plugin ".concat(t.pluginName, " more than once");
|
|
1756
|
+
}), Be.push(t);
|
|
1757
|
+
},
|
|
1758
|
+
pluginEvent: function(t, n, o) {
|
|
1759
|
+
var a = this;
|
|
1760
|
+
this.eventCanceled = !1, o.cancel = function() {
|
|
1761
|
+
a.eventCanceled = !0;
|
|
1762
|
+
};
|
|
1763
|
+
var l = t + "Global";
|
|
1764
|
+
Be.forEach(function(r) {
|
|
1765
|
+
n[r.pluginName] && (n[r.pluginName][l] && n[r.pluginName][l](Ee({
|
|
1766
|
+
sortable: n
|
|
1767
|
+
}, o)), n.options[r.pluginName] && n[r.pluginName][t] && n[r.pluginName][t](Ee({
|
|
1768
|
+
sortable: n
|
|
1769
|
+
}, o)));
|
|
1770
|
+
});
|
|
1771
|
+
},
|
|
1772
|
+
initializePlugins: function(t, n, o, a) {
|
|
1773
|
+
Be.forEach(function(i) {
|
|
1774
|
+
var s = i.pluginName;
|
|
1775
|
+
if (!(!t.options[s] && !i.initializeByDefault)) {
|
|
1776
|
+
var u = new i(t, n, t.options);
|
|
1777
|
+
u.sortable = t, u.options = t.options, t[s] = u, Ce(o, u.defaults);
|
|
1778
|
+
}
|
|
1779
|
+
});
|
|
1780
|
+
for (var l in t.options)
|
|
1781
|
+
if (t.options.hasOwnProperty(l)) {
|
|
1782
|
+
var r = this.modifyOption(t, l, t.options[l]);
|
|
1783
|
+
typeof r < "u" && (t.options[l] = r);
|
|
1784
|
+
}
|
|
1785
|
+
},
|
|
1786
|
+
getEventProperties: function(t, n) {
|
|
1787
|
+
var o = {};
|
|
1788
|
+
return Be.forEach(function(a) {
|
|
1789
|
+
typeof a.eventProperties == "function" && Ce(o, a.eventProperties.call(n[a.pluginName], t));
|
|
1790
|
+
}), o;
|
|
1791
|
+
},
|
|
1792
|
+
modifyOption: function(t, n, o) {
|
|
1793
|
+
var a;
|
|
1794
|
+
return Be.forEach(function(l) {
|
|
1795
|
+
t[l.pluginName] && l.optionListeners && typeof l.optionListeners[n] == "function" && (a = l.optionListeners[n].call(t[l.pluginName], o));
|
|
1796
|
+
}), a;
|
|
1797
|
+
}
|
|
1798
|
+
};
|
|
1799
|
+
function ml(e) {
|
|
1800
|
+
var t = e.sortable, n = e.rootEl, o = e.name, a = e.targetEl, l = e.cloneEl, r = e.toEl, i = e.fromEl, s = e.oldIndex, u = e.newIndex, f = e.oldDraggableIndex, d = e.newDraggableIndex, E = e.originalEvent, w = e.putSortable, k = e.extraEventProperties;
|
|
1801
|
+
if (t = t || n && n[fe], !!t) {
|
|
1802
|
+
var x, m = t.options, b = "on" + o.charAt(0).toUpperCase() + o.substr(1);
|
|
1803
|
+
window.CustomEvent && !De && !ot ? x = new CustomEvent(o, {
|
|
1804
|
+
bubbles: !0,
|
|
1805
|
+
cancelable: !0
|
|
1806
|
+
}) : (x = document.createEvent("Event"), x.initEvent(o, !0, !0)), x.to = r || n, x.from = i || n, x.item = a || n, x.clone = l, x.oldIndex = s, x.newIndex = u, x.oldDraggableIndex = f, x.newDraggableIndex = d, x.originalEvent = E, x.pullMode = w ? w.lastPutMode : void 0;
|
|
1807
|
+
var y = Ee(Ee({}, k), at.getEventProperties(o, t));
|
|
1808
|
+
for (var D in y)
|
|
1809
|
+
x[D] = y[D];
|
|
1810
|
+
n && n.dispatchEvent(x), m[b] && m[b].call(t, x);
|
|
1811
|
+
}
|
|
1812
|
+
}
|
|
1813
|
+
var gl = ["evt"], de = function(t, n) {
|
|
1814
|
+
var o = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, a = o.evt, l = rl(o, gl);
|
|
1815
|
+
at.pluginEvent.bind(F)(t, n, Ee({
|
|
1816
|
+
dragEl: T,
|
|
1817
|
+
parentEl: Q,
|
|
1818
|
+
ghostEl: M,
|
|
1819
|
+
rootEl: G,
|
|
1820
|
+
nextEl: Me,
|
|
1821
|
+
lastDownEl: ct,
|
|
1822
|
+
cloneEl: q,
|
|
1823
|
+
cloneHidden: Pe,
|
|
1824
|
+
dragStarted: Xe,
|
|
1825
|
+
putSortable: ie,
|
|
1826
|
+
activeSortable: F.active,
|
|
1827
|
+
originalEvent: a,
|
|
1828
|
+
oldIndex: Ue,
|
|
1829
|
+
oldDraggableIndex: Qe,
|
|
1830
|
+
newIndex: ge,
|
|
1831
|
+
newDraggableIndex: Ne,
|
|
1832
|
+
hideGhostForTarget: Bn,
|
|
1833
|
+
unhideGhostForTarget: Yn,
|
|
1834
|
+
cloneNowHidden: function() {
|
|
1835
|
+
Pe = !0;
|
|
1836
|
+
},
|
|
1837
|
+
cloneNowShown: function() {
|
|
1838
|
+
Pe = !1;
|
|
1839
|
+
},
|
|
1840
|
+
dispatchSortableEvent: function(i) {
|
|
1841
|
+
ue({
|
|
1842
|
+
sortable: n,
|
|
1843
|
+
name: i,
|
|
1844
|
+
originalEvent: a
|
|
1845
|
+
});
|
|
1846
|
+
}
|
|
1847
|
+
}, l));
|
|
1848
|
+
};
|
|
1849
|
+
function ue(e) {
|
|
1850
|
+
ml(Ee({
|
|
1851
|
+
putSortable: ie,
|
|
1852
|
+
cloneEl: q,
|
|
1853
|
+
targetEl: T,
|
|
1854
|
+
rootEl: G,
|
|
1855
|
+
oldIndex: Ue,
|
|
1856
|
+
oldDraggableIndex: Qe,
|
|
1857
|
+
newIndex: ge,
|
|
1858
|
+
newDraggableIndex: Ne
|
|
1859
|
+
}, e));
|
|
1860
|
+
}
|
|
1861
|
+
var T, Q, M, G, Me, ct, q, Pe, Ue, ge, Qe, Ne, it, ie, Ve = !1, vt = !1, yt = [], Re, we, Et, xt, ln, rn, Xe, Ye, Ze, et = !1, rt = !1, ft, se, $t = [], Rt = !1, bt = [], kt = typeof document < "u", st = Ut, sn = ot || De ? "cssFloat" : "float", vl = kt && !Cn && !Ut && "draggable" in document.createElement("div"), Rn = function() {
|
|
1862
|
+
if (kt) {
|
|
1863
|
+
if (De)
|
|
1864
|
+
return !1;
|
|
1865
|
+
var e = document.createElement("x");
|
|
1866
|
+
return e.style.cssText = "pointer-events:auto", e.style.pointerEvents === "auto";
|
|
1867
|
+
}
|
|
1868
|
+
}(), Ln = function(t, n) {
|
|
1869
|
+
var o = O(t), a = parseInt(o.width) - parseInt(o.paddingLeft) - parseInt(o.paddingRight) - parseInt(o.borderLeftWidth) - parseInt(o.borderRightWidth), l = je(t, 0, n), r = je(t, 1, n), i = l && O(l), s = r && O(r), u = i && parseInt(i.marginLeft) + parseInt(i.marginRight) + ne(l).width, f = s && parseInt(s.marginLeft) + parseInt(s.marginRight) + ne(r).width;
|
|
1870
|
+
if (o.display === "flex")
|
|
1871
|
+
return o.flexDirection === "column" || o.flexDirection === "column-reverse" ? "vertical" : "horizontal";
|
|
1872
|
+
if (o.display === "grid")
|
|
1873
|
+
return o.gridTemplateColumns.split(" ").length <= 1 ? "vertical" : "horizontal";
|
|
1874
|
+
if (l && i.float && i.float !== "none") {
|
|
1875
|
+
var d = i.float === "left" ? "left" : "right";
|
|
1876
|
+
return r && (s.clear === "both" || s.clear === d) ? "vertical" : "horizontal";
|
|
1877
|
+
}
|
|
1878
|
+
return l && (i.display === "block" || i.display === "flex" || i.display === "table" || i.display === "grid" || u >= a && o[sn] === "none" || r && o[sn] === "none" && u + f > a) ? "vertical" : "horizontal";
|
|
1879
|
+
}, yl = function(t, n, o) {
|
|
1880
|
+
var a = o ? t.left : t.top, l = o ? t.right : t.bottom, r = o ? t.width : t.height, i = o ? n.left : n.top, s = o ? n.right : n.bottom, u = o ? n.width : n.height;
|
|
1881
|
+
return a === i || l === s || a + r / 2 === i + u / 2;
|
|
1882
|
+
}, bl = function(t, n) {
|
|
1883
|
+
var o;
|
|
1884
|
+
return yt.some(function(a) {
|
|
1885
|
+
var l = a[fe].options.emptyInsertThreshold;
|
|
1886
|
+
if (!(!l || zt(a))) {
|
|
1887
|
+
var r = ne(a), i = t >= r.left - l && t <= r.right + l, s = n >= r.top - l && n <= r.bottom + l;
|
|
1888
|
+
if (i && s)
|
|
1889
|
+
return o = a;
|
|
1890
|
+
}
|
|
1891
|
+
}), o;
|
|
1892
|
+
}, Mn = function(t) {
|
|
1893
|
+
function n(l, r) {
|
|
1894
|
+
return function(i, s, u, f) {
|
|
1895
|
+
var d = i.options.group.name && s.options.group.name && i.options.group.name === s.options.group.name;
|
|
1896
|
+
if (l == null && (r || d))
|
|
1897
|
+
return !0;
|
|
1898
|
+
if (l == null || l === !1)
|
|
1899
|
+
return !1;
|
|
1900
|
+
if (r && l === "clone")
|
|
1901
|
+
return l;
|
|
1902
|
+
if (typeof l == "function")
|
|
1903
|
+
return n(l(i, s, u, f), r)(i, s, u, f);
|
|
1904
|
+
var E = (r ? i : s).options.group.name;
|
|
1905
|
+
return l === !0 || typeof l == "string" && l === E || l.join && l.indexOf(E) > -1;
|
|
1906
|
+
};
|
|
1907
|
+
}
|
|
1908
|
+
var o = {}, a = t.group;
|
|
1909
|
+
(!a || dt(a) != "object") && (a = {
|
|
1910
|
+
name: a
|
|
1911
|
+
}), o.name = a.name, o.checkPull = n(a.pull, !0), o.checkPut = n(a.put), o.revertClone = a.revertClone, t.group = o;
|
|
1912
|
+
}, Bn = function() {
|
|
1913
|
+
!Rn && M && O(M, "display", "none");
|
|
1914
|
+
}, Yn = function() {
|
|
1915
|
+
!Rn && M && O(M, "display", "");
|
|
1916
|
+
};
|
|
1917
|
+
kt && !Cn && document.addEventListener("click", function(e) {
|
|
1918
|
+
if (vt)
|
|
1919
|
+
return e.preventDefault(), e.stopPropagation && e.stopPropagation(), e.stopImmediatePropagation && e.stopImmediatePropagation(), vt = !1, !1;
|
|
1920
|
+
}, !0);
|
|
1921
|
+
var Le = function(t) {
|
|
1922
|
+
if (T) {
|
|
1923
|
+
t = t.touches ? t.touches[0] : t;
|
|
1924
|
+
var n = bl(t.clientX, t.clientY);
|
|
1925
|
+
if (n) {
|
|
1926
|
+
var o = {};
|
|
1927
|
+
for (var a in t)
|
|
1928
|
+
t.hasOwnProperty(a) && (o[a] = t[a]);
|
|
1929
|
+
o.target = o.rootEl = n, o.preventDefault = void 0, o.stopPropagation = void 0, n[fe]._onDragOver(o);
|
|
1930
|
+
}
|
|
1931
|
+
}
|
|
1932
|
+
}, _l = function(t) {
|
|
1933
|
+
T && T.parentNode[fe]._isOutsideThisEl(t.target);
|
|
1934
|
+
};
|
|
1935
|
+
function F(e, t) {
|
|
1936
|
+
if (!(e && e.nodeType && e.nodeType === 1))
|
|
1937
|
+
throw "Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));
|
|
1938
|
+
this.el = e, this.options = t = Ce({}, t), e[fe] = this;
|
|
1939
|
+
var n = {
|
|
1940
|
+
group: null,
|
|
1941
|
+
sort: !0,
|
|
1942
|
+
disabled: !1,
|
|
1943
|
+
store: null,
|
|
1944
|
+
handle: null,
|
|
1945
|
+
draggable: /^[uo]l$/i.test(e.nodeName) ? ">li" : ">*",
|
|
1946
|
+
swapThreshold: 1,
|
|
1947
|
+
// percentage; 0 <= x <= 1
|
|
1948
|
+
invertSwap: !1,
|
|
1949
|
+
// invert always
|
|
1950
|
+
invertedSwapThreshold: null,
|
|
1951
|
+
// will be set to same as swapThreshold if default
|
|
1952
|
+
removeCloneOnHide: !0,
|
|
1953
|
+
direction: function() {
|
|
1954
|
+
return Ln(e, this.options);
|
|
1955
|
+
},
|
|
1956
|
+
ghostClass: "sortable-ghost",
|
|
1957
|
+
chosenClass: "sortable-chosen",
|
|
1958
|
+
dragClass: "sortable-drag",
|
|
1959
|
+
ignore: "a, img",
|
|
1960
|
+
filter: null,
|
|
1961
|
+
preventOnFilter: !0,
|
|
1962
|
+
animation: 0,
|
|
1963
|
+
easing: null,
|
|
1964
|
+
setData: function(r, i) {
|
|
1965
|
+
r.setData("Text", i.textContent);
|
|
1966
|
+
},
|
|
1967
|
+
dropBubble: !1,
|
|
1968
|
+
dragoverBubble: !1,
|
|
1969
|
+
dataIdAttr: "data-id",
|
|
1970
|
+
delay: 0,
|
|
1971
|
+
delayOnTouchOnly: !1,
|
|
1972
|
+
touchStartThreshold: (Number.parseInt ? Number : window).parseInt(window.devicePixelRatio, 10) || 1,
|
|
1973
|
+
forceFallback: !1,
|
|
1974
|
+
fallbackClass: "sortable-fallback",
|
|
1975
|
+
fallbackOnBody: !1,
|
|
1976
|
+
fallbackTolerance: 0,
|
|
1977
|
+
fallbackOffset: {
|
|
1978
|
+
x: 0,
|
|
1979
|
+
y: 0
|
|
1980
|
+
},
|
|
1981
|
+
// Disabled on Safari: #1571; Enabled on Safari IOS: #2244
|
|
1982
|
+
supportPointer: F.supportPointer !== !1 && "PointerEvent" in window && (!qe || Ut),
|
|
1983
|
+
emptyInsertThreshold: 5
|
|
1984
|
+
};
|
|
1985
|
+
at.initializePlugins(this, e, n);
|
|
1986
|
+
for (var o in n)
|
|
1987
|
+
!(o in t) && (t[o] = n[o]);
|
|
1988
|
+
Mn(t);
|
|
1989
|
+
for (var a in this)
|
|
1990
|
+
a.charAt(0) === "_" && typeof this[a] == "function" && (this[a] = this[a].bind(this));
|
|
1991
|
+
this.nativeDraggable = t.forceFallback ? !1 : vl, this.nativeDraggable && (this.options.touchStartThreshold = 1), t.supportPointer ? U(e, "pointerdown", this._onTapStart) : (U(e, "mousedown", this._onTapStart), U(e, "touchstart", this._onTapStart)), this.nativeDraggable && (U(e, "dragover", this), U(e, "dragenter", this)), yt.push(this.el), t.store && t.store.get && this.sort(t.store.get(this) || []), Ce(this, fl());
|
|
1992
|
+
}
|
|
1993
|
+
F.prototype = /** @lends Sortable.prototype */
|
|
1994
|
+
{
|
|
1995
|
+
constructor: F,
|
|
1996
|
+
_isOutsideThisEl: function(t) {
|
|
1997
|
+
!this.el.contains(t) && t !== this.el && (Ye = null);
|
|
1998
|
+
},
|
|
1999
|
+
_getDirection: function(t, n) {
|
|
2000
|
+
return typeof this.options.direction == "function" ? this.options.direction.call(this, t, n, T) : this.options.direction;
|
|
2001
|
+
},
|
|
2002
|
+
_onTapStart: function(t) {
|
|
2003
|
+
if (t.cancelable) {
|
|
2004
|
+
var n = this, o = this.el, a = this.options, l = a.preventOnFilter, r = t.type, i = t.touches && t.touches[0] || t.pointerType && t.pointerType === "touch" && t, s = (i || t).target, u = t.target.shadowRoot && (t.path && t.path[0] || t.composedPath && t.composedPath()[0]) || s, f = a.filter;
|
|
2005
|
+
if (Cl(o), !T && !(/mousedown|pointerdown/.test(r) && t.button !== 0 || a.disabled) && !u.isContentEditable && !(!this.nativeDraggable && qe && s && s.tagName.toUpperCase() === "SELECT") && (s = ke(s, a.draggable, o, !1), !(s && s.animated) && ct !== s)) {
|
|
2006
|
+
if (Ue = ve(s), Qe = ve(s, a.draggable), typeof f == "function") {
|
|
2007
|
+
if (f.call(this, t, s, this)) {
|
|
2008
|
+
ue({
|
|
2009
|
+
sortable: n,
|
|
2010
|
+
rootEl: u,
|
|
2011
|
+
name: "filter",
|
|
2012
|
+
targetEl: s,
|
|
2013
|
+
toEl: o,
|
|
2014
|
+
fromEl: o
|
|
2015
|
+
}), de("filter", n, {
|
|
2016
|
+
evt: t
|
|
2017
|
+
}), l && t.preventDefault();
|
|
2018
|
+
return;
|
|
2019
|
+
}
|
|
2020
|
+
} else if (f && (f = f.split(",").some(function(d) {
|
|
2021
|
+
if (d = ke(u, d.trim(), o, !1), d)
|
|
2022
|
+
return ue({
|
|
2023
|
+
sortable: n,
|
|
2024
|
+
rootEl: d,
|
|
2025
|
+
name: "filter",
|
|
2026
|
+
targetEl: s,
|
|
2027
|
+
fromEl: o,
|
|
2028
|
+
toEl: o
|
|
2029
|
+
}), de("filter", n, {
|
|
2030
|
+
evt: t
|
|
2031
|
+
}), !0;
|
|
2032
|
+
}), f)) {
|
|
2033
|
+
l && t.preventDefault();
|
|
2034
|
+
return;
|
|
2035
|
+
}
|
|
2036
|
+
a.handle && !ke(u, a.handle, o, !1) || this._prepareDragStart(t, i, s);
|
|
2037
|
+
}
|
|
2038
|
+
}
|
|
2039
|
+
},
|
|
2040
|
+
_prepareDragStart: function(t, n, o) {
|
|
2041
|
+
var a = this, l = a.el, r = a.options, i = l.ownerDocument, s;
|
|
2042
|
+
if (o && !T && o.parentNode === l) {
|
|
2043
|
+
var u = ne(o);
|
|
2044
|
+
if (G = l, T = o, Q = T.parentNode, Me = T.nextSibling, ct = o, it = r.group, F.dragged = T, Re = {
|
|
2045
|
+
target: T,
|
|
2046
|
+
clientX: (n || t).clientX,
|
|
2047
|
+
clientY: (n || t).clientY
|
|
2048
|
+
}, ln = Re.clientX - u.left, rn = Re.clientY - u.top, this._lastX = (n || t).clientX, this._lastY = (n || t).clientY, T.style["will-change"] = "all", s = function() {
|
|
2049
|
+
if (de("delayEnded", a, {
|
|
2050
|
+
evt: t
|
|
2051
|
+
}), F.eventCanceled) {
|
|
2052
|
+
a._onDrop();
|
|
2053
|
+
return;
|
|
2054
|
+
}
|
|
2055
|
+
a._disableDelayedDragEvents(), !tn && a.nativeDraggable && (T.draggable = !0), a._triggerDragStart(t, n), ue({
|
|
2056
|
+
sortable: a,
|
|
2057
|
+
name: "choose",
|
|
2058
|
+
originalEvent: t
|
|
2059
|
+
}), me(T, r.chosenClass, !0);
|
|
2060
|
+
}, r.ignore.split(",").forEach(function(f) {
|
|
2061
|
+
Nn(T, f.trim(), Ct);
|
|
2062
|
+
}), U(i, "dragover", Le), U(i, "mousemove", Le), U(i, "touchmove", Le), r.supportPointer ? (U(i, "pointerup", a._onDrop), !this.nativeDraggable && U(i, "pointercancel", a._onDrop)) : (U(i, "mouseup", a._onDrop), U(i, "touchend", a._onDrop), U(i, "touchcancel", a._onDrop)), tn && this.nativeDraggable && (this.options.touchStartThreshold = 4, T.draggable = !0), de("delayStart", this, {
|
|
2063
|
+
evt: t
|
|
2064
|
+
}), r.delay && (!r.delayOnTouchOnly || n) && (!this.nativeDraggable || !(ot || De))) {
|
|
2065
|
+
if (F.eventCanceled) {
|
|
2066
|
+
this._onDrop();
|
|
2067
|
+
return;
|
|
2068
|
+
}
|
|
2069
|
+
r.supportPointer ? (U(i, "pointerup", a._disableDelayedDrag), U(i, "pointercancel", a._disableDelayedDrag)) : (U(i, "mouseup", a._disableDelayedDrag), U(i, "touchend", a._disableDelayedDrag), U(i, "touchcancel", a._disableDelayedDrag)), U(i, "mousemove", a._delayedDragTouchMoveHandler), U(i, "touchmove", a._delayedDragTouchMoveHandler), r.supportPointer && U(i, "pointermove", a._delayedDragTouchMoveHandler), a._dragStartTimer = setTimeout(s, r.delay);
|
|
2070
|
+
} else
|
|
2071
|
+
s();
|
|
2072
|
+
}
|
|
2073
|
+
},
|
|
2074
|
+
_delayedDragTouchMoveHandler: function(t) {
|
|
2075
|
+
var n = t.touches ? t.touches[0] : t;
|
|
2076
|
+
Math.max(Math.abs(n.clientX - this._lastX), Math.abs(n.clientY - this._lastY)) >= Math.floor(this.options.touchStartThreshold / (this.nativeDraggable && window.devicePixelRatio || 1)) && this._disableDelayedDrag();
|
|
2077
|
+
},
|
|
2078
|
+
_disableDelayedDrag: function() {
|
|
2079
|
+
T && Ct(T), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents();
|
|
2080
|
+
},
|
|
2081
|
+
_disableDelayedDragEvents: function() {
|
|
2082
|
+
var t = this.el.ownerDocument;
|
|
2083
|
+
V(t, "mouseup", this._disableDelayedDrag), V(t, "touchend", this._disableDelayedDrag), V(t, "touchcancel", this._disableDelayedDrag), V(t, "pointerup", this._disableDelayedDrag), V(t, "pointercancel", this._disableDelayedDrag), V(t, "mousemove", this._delayedDragTouchMoveHandler), V(t, "touchmove", this._delayedDragTouchMoveHandler), V(t, "pointermove", this._delayedDragTouchMoveHandler);
|
|
2084
|
+
},
|
|
2085
|
+
_triggerDragStart: function(t, n) {
|
|
2086
|
+
n = n || t.pointerType == "touch" && t, !this.nativeDraggable || n ? this.options.supportPointer ? U(document, "pointermove", this._onTouchMove) : n ? U(document, "touchmove", this._onTouchMove) : U(document, "mousemove", this._onTouchMove) : (U(T, "dragend", this), U(G, "dragstart", this._onDragStart));
|
|
2087
|
+
try {
|
|
2088
|
+
document.selection ? pt(function() {
|
|
2089
|
+
document.selection.empty();
|
|
2090
|
+
}) : window.getSelection().removeAllRanges();
|
|
2091
|
+
} catch {
|
|
2092
|
+
}
|
|
2093
|
+
},
|
|
2094
|
+
_dragStarted: function(t, n) {
|
|
2095
|
+
if (Ve = !1, G && T) {
|
|
2096
|
+
de("dragStarted", this, {
|
|
2097
|
+
evt: n
|
|
2098
|
+
}), this.nativeDraggable && U(document, "dragover", _l);
|
|
2099
|
+
var o = this.options;
|
|
2100
|
+
!t && me(T, o.dragClass, !1), me(T, o.ghostClass, !0), F.active = this, t && this._appendGhost(), ue({
|
|
2101
|
+
sortable: this,
|
|
2102
|
+
name: "start",
|
|
2103
|
+
originalEvent: n
|
|
2104
|
+
});
|
|
2105
|
+
} else
|
|
2106
|
+
this._nulling();
|
|
2107
|
+
},
|
|
2108
|
+
_emulateDragOver: function() {
|
|
2109
|
+
if (we) {
|
|
2110
|
+
this._lastX = we.clientX, this._lastY = we.clientY, Bn();
|
|
2111
|
+
for (var t = document.elementFromPoint(we.clientX, we.clientY), n = t; t && t.shadowRoot && (t = t.shadowRoot.elementFromPoint(we.clientX, we.clientY), t !== n); )
|
|
2112
|
+
n = t;
|
|
2113
|
+
if (T.parentNode[fe]._isOutsideThisEl(t), n)
|
|
2114
|
+
do {
|
|
2115
|
+
if (n[fe]) {
|
|
2116
|
+
var o = void 0;
|
|
2117
|
+
if (o = n[fe]._onDragOver({
|
|
2118
|
+
clientX: we.clientX,
|
|
2119
|
+
clientY: we.clientY,
|
|
2120
|
+
target: t,
|
|
2121
|
+
rootEl: n
|
|
2122
|
+
}), o && !this.options.dragoverBubble)
|
|
2123
|
+
break;
|
|
2124
|
+
}
|
|
2125
|
+
t = n;
|
|
2126
|
+
} while (n = In(n));
|
|
2127
|
+
Yn();
|
|
2128
|
+
}
|
|
2129
|
+
},
|
|
2130
|
+
_onTouchMove: function(t) {
|
|
2131
|
+
if (Re) {
|
|
2132
|
+
var n = this.options, o = n.fallbackTolerance, a = n.fallbackOffset, l = t.touches ? t.touches[0] : t, r = M && ze(M, !0), i = M && r && r.a, s = M && r && r.d, u = st && se && an(se), f = (l.clientX - Re.clientX + a.x) / (i || 1) + (u ? u[0] - $t[0] : 0) / (i || 1), d = (l.clientY - Re.clientY + a.y) / (s || 1) + (u ? u[1] - $t[1] : 0) / (s || 1);
|
|
2133
|
+
if (!F.active && !Ve) {
|
|
2134
|
+
if (o && Math.max(Math.abs(l.clientX - this._lastX), Math.abs(l.clientY - this._lastY)) < o)
|
|
2135
|
+
return;
|
|
2136
|
+
this._onDragStart(t, !0);
|
|
2137
|
+
}
|
|
2138
|
+
if (M) {
|
|
2139
|
+
r ? (r.e += f - (Et || 0), r.f += d - (xt || 0)) : r = {
|
|
2140
|
+
a: 1,
|
|
2141
|
+
b: 0,
|
|
2142
|
+
c: 0,
|
|
2143
|
+
d: 1,
|
|
2144
|
+
e: f,
|
|
2145
|
+
f: d
|
|
2146
|
+
};
|
|
2147
|
+
var E = "matrix(".concat(r.a, ",").concat(r.b, ",").concat(r.c, ",").concat(r.d, ",").concat(r.e, ",").concat(r.f, ")");
|
|
2148
|
+
O(M, "webkitTransform", E), O(M, "mozTransform", E), O(M, "msTransform", E), O(M, "transform", E), Et = f, xt = d, we = l;
|
|
2149
|
+
}
|
|
2150
|
+
t.cancelable && t.preventDefault();
|
|
2151
|
+
}
|
|
2152
|
+
},
|
|
2153
|
+
_appendGhost: function() {
|
|
2154
|
+
if (!M) {
|
|
2155
|
+
var t = this.options.fallbackOnBody ? document.body : G, n = ne(T, !0, st, !0, t), o = this.options;
|
|
2156
|
+
if (st) {
|
|
2157
|
+
for (se = t; O(se, "position") === "static" && O(se, "transform") === "none" && se !== document; )
|
|
2158
|
+
se = se.parentNode;
|
|
2159
|
+
se !== document.body && se !== document.documentElement ? (se === document && (se = Te()), n.top += se.scrollTop, n.left += se.scrollLeft) : se = Te(), $t = an(se);
|
|
2160
|
+
}
|
|
2161
|
+
M = T.cloneNode(!0), me(M, o.ghostClass, !1), me(M, o.fallbackClass, !0), me(M, o.dragClass, !0), O(M, "transition", ""), O(M, "transform", ""), O(M, "box-sizing", "border-box"), O(M, "margin", 0), O(M, "top", n.top), O(M, "left", n.left), O(M, "width", n.width), O(M, "height", n.height), O(M, "opacity", "0.8"), O(M, "position", st ? "absolute" : "fixed"), O(M, "zIndex", "100000"), O(M, "pointerEvents", "none"), F.ghost = M, t.appendChild(M), O(M, "transform-origin", ln / parseInt(M.style.width) * 100 + "% " + rn / parseInt(M.style.height) * 100 + "%");
|
|
2162
|
+
}
|
|
2163
|
+
},
|
|
2164
|
+
_onDragStart: function(t, n) {
|
|
2165
|
+
var o = this, a = t.dataTransfer, l = o.options;
|
|
2166
|
+
if (de("dragStart", this, {
|
|
2167
|
+
evt: t
|
|
2168
|
+
}), F.eventCanceled) {
|
|
2169
|
+
this._onDrop();
|
|
2170
|
+
return;
|
|
2171
|
+
}
|
|
2172
|
+
de("setupClone", this), F.eventCanceled || (q = On(T), q.removeAttribute("id"), q.draggable = !1, q.style["will-change"] = "", this._hideClone(), me(q, this.options.chosenClass, !1), F.clone = q), o.cloneId = pt(function() {
|
|
2173
|
+
de("clone", o), !F.eventCanceled && (o.options.removeCloneOnHide || G.insertBefore(q, T), o._hideClone(), ue({
|
|
2174
|
+
sortable: o,
|
|
2175
|
+
name: "clone"
|
|
2176
|
+
}));
|
|
2177
|
+
}), !n && me(T, l.dragClass, !0), n ? (vt = !0, o._loopId = setInterval(o._emulateDragOver, 50)) : (V(document, "mouseup", o._onDrop), V(document, "touchend", o._onDrop), V(document, "touchcancel", o._onDrop), a && (a.effectAllowed = "move", l.setData && l.setData.call(o, a, T)), U(document, "drop", o), O(T, "transform", "translateZ(0)")), Ve = !0, o._dragStartId = pt(o._dragStarted.bind(o, n, t)), U(document, "selectstart", o), Xe = !0, window.getSelection().removeAllRanges(), qe && O(document.body, "user-select", "none");
|
|
2178
|
+
},
|
|
2179
|
+
// Returns true - if no further action is needed (either inserted or another condition)
|
|
2180
|
+
_onDragOver: function(t) {
|
|
2181
|
+
var n = this.el, o = t.target, a, l, r, i = this.options, s = i.group, u = F.active, f = it === s, d = i.sort, E = ie || u, w, k = this, x = !1;
|
|
2182
|
+
if (Rt) return;
|
|
2183
|
+
function m(_e, Fe) {
|
|
2184
|
+
de(_e, k, Ee({
|
|
2185
|
+
evt: t,
|
|
2186
|
+
isOwner: f,
|
|
2187
|
+
axis: w ? "vertical" : "horizontal",
|
|
2188
|
+
revert: r,
|
|
2189
|
+
dragRect: a,
|
|
2190
|
+
targetRect: l,
|
|
2191
|
+
canSort: d,
|
|
2192
|
+
fromSortable: E,
|
|
2193
|
+
target: o,
|
|
2194
|
+
completed: y,
|
|
2195
|
+
onMove: function(jt, Kn) {
|
|
2196
|
+
return ut(G, n, T, a, jt, ne(jt), t, Kn);
|
|
2197
|
+
},
|
|
2198
|
+
changed: D
|
|
2199
|
+
}, Fe));
|
|
2200
|
+
}
|
|
2201
|
+
function b() {
|
|
2202
|
+
m("dragOverAnimationCapture"), k.captureAnimationState(), k !== E && E.captureAnimationState();
|
|
2203
|
+
}
|
|
2204
|
+
function y(_e) {
|
|
2205
|
+
return m("dragOverCompleted", {
|
|
2206
|
+
insertion: _e
|
|
2207
|
+
}), _e && (f ? u._hideClone() : u._showClone(k), k !== E && (me(T, ie ? ie.options.ghostClass : u.options.ghostClass, !1), me(T, i.ghostClass, !0)), ie !== k && k !== F.active ? ie = k : k === F.active && ie && (ie = null), E === k && (k._ignoreWhileAnimating = o), k.animateAll(function() {
|
|
2208
|
+
m("dragOverAnimationComplete"), k._ignoreWhileAnimating = null;
|
|
2209
|
+
}), k !== E && (E.animateAll(), E._ignoreWhileAnimating = null)), (o === T && !T.animated || o === n && !o.animated) && (Ye = null), !i.dragoverBubble && !t.rootEl && o !== document && (T.parentNode[fe]._isOutsideThisEl(t.target), !_e && Le(t)), !i.dragoverBubble && t.stopPropagation && t.stopPropagation(), x = !0;
|
|
2210
|
+
}
|
|
2211
|
+
function D() {
|
|
2212
|
+
ge = ve(T), Ne = ve(T, i.draggable), ue({
|
|
2213
|
+
sortable: k,
|
|
2214
|
+
name: "change",
|
|
2215
|
+
toEl: n,
|
|
2216
|
+
newIndex: ge,
|
|
2217
|
+
newDraggableIndex: Ne,
|
|
2218
|
+
originalEvent: t
|
|
2219
|
+
});
|
|
2220
|
+
}
|
|
2221
|
+
if (t.preventDefault !== void 0 && t.cancelable && t.preventDefault(), o = ke(o, i.draggable, n, !0), m("dragOver"), F.eventCanceled) return x;
|
|
2222
|
+
if (T.contains(t.target) || o.animated && o.animatingX && o.animatingY || k._ignoreWhileAnimating === o)
|
|
2223
|
+
return y(!1);
|
|
2224
|
+
if (vt = !1, u && !i.disabled && (f ? d || (r = Q !== G) : ie === this || (this.lastPutMode = it.checkPull(this, u, T, t)) && s.checkPut(this, u, T, t))) {
|
|
2225
|
+
if (w = this._getDirection(t, o) === "vertical", a = ne(T), m("dragOverValid"), F.eventCanceled) return x;
|
|
2226
|
+
if (r)
|
|
2227
|
+
return Q = G, b(), this._hideClone(), m("revert"), F.eventCanceled || (Me ? G.insertBefore(T, Me) : G.appendChild(T)), y(!0);
|
|
2228
|
+
var p = zt(n, i.draggable);
|
|
2229
|
+
if (!p || Tl(t, w, this) && !p.animated) {
|
|
2230
|
+
if (p === T)
|
|
2231
|
+
return y(!1);
|
|
2232
|
+
if (p && n === t.target && (o = p), o && (l = ne(o)), ut(G, n, T, a, o, l, t, !!o) !== !1)
|
|
2233
|
+
return b(), p && p.nextSibling ? n.insertBefore(T, p.nextSibling) : n.appendChild(T), Q = n, D(), y(!0);
|
|
2234
|
+
} else if (p && Sl(t, w, this)) {
|
|
2235
|
+
var N = je(n, 0, i, !0);
|
|
2236
|
+
if (N === T)
|
|
2237
|
+
return y(!1);
|
|
2238
|
+
if (o = N, l = ne(o), ut(G, n, T, a, o, l, t, !1) !== !1)
|
|
2239
|
+
return b(), n.insertBefore(T, N), Q = n, D(), y(!0);
|
|
2240
|
+
} else if (o.parentNode === n) {
|
|
2241
|
+
l = ne(o);
|
|
2242
|
+
var v = 0, h, $ = T.parentNode !== n, S = !yl(T.animated && T.toRect || a, o.animated && o.toRect || l, w), H = w ? "top" : "left", K = on(o, "top", "top") || on(T, "top", "top"), A = K ? K.scrollTop : void 0;
|
|
2243
|
+
Ye !== o && (h = l[H], et = !1, rt = !S && i.invertSwap || $), v = El(t, o, l, w, S ? 1 : i.swapThreshold, i.invertedSwapThreshold == null ? i.swapThreshold : i.invertedSwapThreshold, rt, Ye === o);
|
|
2244
|
+
var j;
|
|
2245
|
+
if (v !== 0) {
|
|
2246
|
+
var re = ve(T);
|
|
2247
|
+
do
|
|
2248
|
+
re -= v, j = Q.children[re];
|
|
2249
|
+
while (j && (O(j, "display") === "none" || j === M));
|
|
2250
|
+
}
|
|
2251
|
+
if (v === 0 || j === o)
|
|
2252
|
+
return y(!1);
|
|
2253
|
+
Ye = o, Ze = v;
|
|
2254
|
+
var Ie = o.nextElementSibling, be = !1;
|
|
2255
|
+
be = v === 1;
|
|
2256
|
+
var Se = ut(G, n, T, a, o, l, t, be);
|
|
2257
|
+
if (Se !== !1)
|
|
2258
|
+
return (Se === 1 || Se === -1) && (be = Se === 1), Rt = !0, setTimeout(kl, 30), b(), be && !Ie ? n.appendChild(T) : o.parentNode.insertBefore(T, be ? Ie : o), K && An(K, 0, A - K.scrollTop), Q = T.parentNode, h !== void 0 && !rt && (ft = Math.abs(h - ne(o)[H])), D(), y(!0);
|
|
2259
|
+
}
|
|
2260
|
+
if (n.contains(T))
|
|
2261
|
+
return y(!1);
|
|
2262
|
+
}
|
|
2263
|
+
return !1;
|
|
2264
|
+
},
|
|
2265
|
+
_ignoreWhileAnimating: null,
|
|
2266
|
+
_offMoveEvents: function() {
|
|
2267
|
+
V(document, "mousemove", this._onTouchMove), V(document, "touchmove", this._onTouchMove), V(document, "pointermove", this._onTouchMove), V(document, "dragover", Le), V(document, "mousemove", Le), V(document, "touchmove", Le);
|
|
2268
|
+
},
|
|
2269
|
+
_offUpEvents: function() {
|
|
2270
|
+
var t = this.el.ownerDocument;
|
|
2271
|
+
V(t, "mouseup", this._onDrop), V(t, "touchend", this._onDrop), V(t, "pointerup", this._onDrop), V(t, "pointercancel", this._onDrop), V(t, "touchcancel", this._onDrop), V(document, "selectstart", this);
|
|
2272
|
+
},
|
|
2273
|
+
_onDrop: function(t) {
|
|
2274
|
+
var n = this.el, o = this.options;
|
|
2275
|
+
if (ge = ve(T), Ne = ve(T, o.draggable), de("drop", this, {
|
|
2276
|
+
evt: t
|
|
2277
|
+
}), Q = T && T.parentNode, ge = ve(T), Ne = ve(T, o.draggable), F.eventCanceled) {
|
|
2278
|
+
this._nulling();
|
|
2279
|
+
return;
|
|
2280
|
+
}
|
|
2281
|
+
Ve = !1, rt = !1, et = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), Lt(this.cloneId), Lt(this._dragStartId), this.nativeDraggable && (V(document, "drop", this), V(n, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), qe && O(document.body, "user-select", ""), O(T, "transform", ""), t && (Xe && (t.cancelable && t.preventDefault(), !o.dropBubble && t.stopPropagation()), M && M.parentNode && M.parentNode.removeChild(M), (G === Q || ie && ie.lastPutMode !== "clone") && q && q.parentNode && q.parentNode.removeChild(q), T && (this.nativeDraggable && V(T, "dragend", this), Ct(T), T.style["will-change"] = "", Xe && !Ve && me(T, ie ? ie.options.ghostClass : this.options.ghostClass, !1), me(T, this.options.chosenClass, !1), ue({
|
|
2282
|
+
sortable: this,
|
|
2283
|
+
name: "unchoose",
|
|
2284
|
+
toEl: Q,
|
|
2285
|
+
newIndex: null,
|
|
2286
|
+
newDraggableIndex: null,
|
|
2287
|
+
originalEvent: t
|
|
2288
|
+
}), G !== Q ? (ge >= 0 && (ue({
|
|
2289
|
+
rootEl: Q,
|
|
2290
|
+
name: "add",
|
|
2291
|
+
toEl: Q,
|
|
2292
|
+
fromEl: G,
|
|
2293
|
+
originalEvent: t
|
|
2294
|
+
}), ue({
|
|
2295
|
+
sortable: this,
|
|
2296
|
+
name: "remove",
|
|
2297
|
+
toEl: Q,
|
|
2298
|
+
originalEvent: t
|
|
2299
|
+
}), ue({
|
|
2300
|
+
rootEl: Q,
|
|
2301
|
+
name: "sort",
|
|
2302
|
+
toEl: Q,
|
|
2303
|
+
fromEl: G,
|
|
2304
|
+
originalEvent: t
|
|
2305
|
+
}), ue({
|
|
2306
|
+
sortable: this,
|
|
2307
|
+
name: "sort",
|
|
2308
|
+
toEl: Q,
|
|
2309
|
+
originalEvent: t
|
|
2310
|
+
})), ie && ie.save()) : ge !== Ue && ge >= 0 && (ue({
|
|
2311
|
+
sortable: this,
|
|
2312
|
+
name: "update",
|
|
2313
|
+
toEl: Q,
|
|
2314
|
+
originalEvent: t
|
|
2315
|
+
}), ue({
|
|
2316
|
+
sortable: this,
|
|
2317
|
+
name: "sort",
|
|
2318
|
+
toEl: Q,
|
|
2319
|
+
originalEvent: t
|
|
2320
|
+
})), F.active && ((ge == null || ge === -1) && (ge = Ue, Ne = Qe), ue({
|
|
2321
|
+
sortable: this,
|
|
2322
|
+
name: "end",
|
|
2323
|
+
toEl: Q,
|
|
2324
|
+
originalEvent: t
|
|
2325
|
+
}), this.save()))), this._nulling();
|
|
2326
|
+
},
|
|
2327
|
+
_nulling: function() {
|
|
2328
|
+
de("nulling", this), G = T = Q = M = Me = q = ct = Pe = Re = we = Xe = ge = Ne = Ue = Qe = Ye = Ze = ie = it = F.dragged = F.ghost = F.clone = F.active = null, bt.forEach(function(t) {
|
|
2329
|
+
t.checked = !0;
|
|
2330
|
+
}), bt.length = Et = xt = 0;
|
|
2331
|
+
},
|
|
2332
|
+
handleEvent: function(t) {
|
|
2333
|
+
switch (t.type) {
|
|
2334
|
+
case "drop":
|
|
2335
|
+
case "dragend":
|
|
2336
|
+
this._onDrop(t);
|
|
2337
|
+
break;
|
|
2338
|
+
case "dragenter":
|
|
2339
|
+
case "dragover":
|
|
2340
|
+
T && (this._onDragOver(t), wl(t));
|
|
2341
|
+
break;
|
|
2342
|
+
case "selectstart":
|
|
2343
|
+
t.preventDefault();
|
|
2344
|
+
break;
|
|
2345
|
+
}
|
|
2346
|
+
},
|
|
2347
|
+
/**
|
|
2348
|
+
* Serializes the item into an array of string.
|
|
2349
|
+
* @returns {String[]}
|
|
2350
|
+
*/
|
|
2351
|
+
toArray: function() {
|
|
2352
|
+
for (var t = [], n, o = this.el.children, a = 0, l = o.length, r = this.options; a < l; a++)
|
|
2353
|
+
n = o[a], ke(n, r.draggable, this.el, !1) && t.push(n.getAttribute(r.dataIdAttr) || $l(n));
|
|
2354
|
+
return t;
|
|
2355
|
+
},
|
|
2356
|
+
/**
|
|
2357
|
+
* Sorts the elements according to the array.
|
|
2358
|
+
* @param {String[]} order order of the items
|
|
2359
|
+
*/
|
|
2360
|
+
sort: function(t, n) {
|
|
2361
|
+
var o = {}, a = this.el;
|
|
2362
|
+
this.toArray().forEach(function(l, r) {
|
|
2363
|
+
var i = a.children[r];
|
|
2364
|
+
ke(i, this.options.draggable, a, !1) && (o[l] = i);
|
|
2365
|
+
}, this), n && this.captureAnimationState(), t.forEach(function(l) {
|
|
2366
|
+
o[l] && (a.removeChild(o[l]), a.appendChild(o[l]));
|
|
2367
|
+
}), n && this.animateAll();
|
|
2368
|
+
},
|
|
2369
|
+
/**
|
|
2370
|
+
* Save the current sorting
|
|
2371
|
+
*/
|
|
2372
|
+
save: function() {
|
|
2373
|
+
var t = this.options.store;
|
|
2374
|
+
t && t.set && t.set(this);
|
|
2375
|
+
},
|
|
2376
|
+
/**
|
|
2377
|
+
* For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree.
|
|
2378
|
+
* @param {HTMLElement} el
|
|
2379
|
+
* @param {String} [selector] default: `options.draggable`
|
|
2380
|
+
* @returns {HTMLElement|null}
|
|
2381
|
+
*/
|
|
2382
|
+
closest: function(t, n) {
|
|
2383
|
+
return ke(t, n || this.options.draggable, this.el, !1);
|
|
2384
|
+
},
|
|
2385
|
+
/**
|
|
2386
|
+
* Set/get option
|
|
2387
|
+
* @param {string} name
|
|
2388
|
+
* @param {*} [value]
|
|
2389
|
+
* @returns {*}
|
|
2390
|
+
*/
|
|
2391
|
+
option: function(t, n) {
|
|
2392
|
+
var o = this.options;
|
|
2393
|
+
if (n === void 0)
|
|
2394
|
+
return o[t];
|
|
2395
|
+
var a = at.modifyOption(this, t, n);
|
|
2396
|
+
typeof a < "u" ? o[t] = a : o[t] = n, t === "group" && Mn(o);
|
|
2397
|
+
},
|
|
2398
|
+
/**
|
|
2399
|
+
* Destroy
|
|
2400
|
+
*/
|
|
2401
|
+
destroy: function() {
|
|
2402
|
+
de("destroy", this);
|
|
2403
|
+
var t = this.el;
|
|
2404
|
+
t[fe] = null, V(t, "mousedown", this._onTapStart), V(t, "touchstart", this._onTapStart), V(t, "pointerdown", this._onTapStart), this.nativeDraggable && (V(t, "dragover", this), V(t, "dragenter", this)), Array.prototype.forEach.call(t.querySelectorAll("[draggable]"), function(n) {
|
|
2405
|
+
n.removeAttribute("draggable");
|
|
2406
|
+
}), this._onDrop(), this._disableDelayedDragEvents(), yt.splice(yt.indexOf(this.el), 1), this.el = t = null;
|
|
2407
|
+
},
|
|
2408
|
+
_hideClone: function() {
|
|
2409
|
+
if (!Pe) {
|
|
2410
|
+
if (de("hideClone", this), F.eventCanceled) return;
|
|
2411
|
+
O(q, "display", "none"), this.options.removeCloneOnHide && q.parentNode && q.parentNode.removeChild(q), Pe = !0;
|
|
2412
|
+
}
|
|
2413
|
+
},
|
|
2414
|
+
_showClone: function(t) {
|
|
2415
|
+
if (t.lastPutMode !== "clone") {
|
|
2416
|
+
this._hideClone();
|
|
2417
|
+
return;
|
|
2418
|
+
}
|
|
2419
|
+
if (Pe) {
|
|
2420
|
+
if (de("showClone", this), F.eventCanceled) return;
|
|
2421
|
+
T.parentNode == G && !this.options.group.revertClone ? G.insertBefore(q, T) : Me ? G.insertBefore(q, Me) : G.appendChild(q), this.options.group.revertClone && this.animate(T, q), O(q, "display", ""), Pe = !1;
|
|
2422
|
+
}
|
|
2423
|
+
}
|
|
2424
|
+
};
|
|
2425
|
+
function wl(e) {
|
|
2426
|
+
e.dataTransfer && (e.dataTransfer.dropEffect = "move"), e.cancelable && e.preventDefault();
|
|
2427
|
+
}
|
|
2428
|
+
function ut(e, t, n, o, a, l, r, i) {
|
|
2429
|
+
var s, u = e[fe], f = u.options.onMove, d;
|
|
2430
|
+
return window.CustomEvent && !De && !ot ? s = new CustomEvent("move", {
|
|
2431
|
+
bubbles: !0,
|
|
2432
|
+
cancelable: !0
|
|
2433
|
+
}) : (s = document.createEvent("Event"), s.initEvent("move", !0, !0)), s.to = t, s.from = e, s.dragged = n, s.draggedRect = o, s.related = a || t, s.relatedRect = l || ne(t), s.willInsertAfter = i, s.originalEvent = r, e.dispatchEvent(s), f && (d = f.call(u, s, r)), d;
|
|
2434
|
+
}
|
|
2435
|
+
function Ct(e) {
|
|
2436
|
+
e.draggable = !1;
|
|
2437
|
+
}
|
|
2438
|
+
function kl() {
|
|
2439
|
+
Rt = !1;
|
|
2440
|
+
}
|
|
2441
|
+
function Sl(e, t, n) {
|
|
2442
|
+
var o = ne(je(n.el, 0, n.options, !0)), a = Fn(n.el, n.options, M), l = 10;
|
|
2443
|
+
return t ? e.clientX < a.left - l || e.clientY < o.top && e.clientX < o.right : e.clientY < a.top - l || e.clientY < o.bottom && e.clientX < o.left;
|
|
2444
|
+
}
|
|
2445
|
+
function Tl(e, t, n) {
|
|
2446
|
+
var o = ne(zt(n.el, n.options.draggable)), a = Fn(n.el, n.options, M), l = 10;
|
|
2447
|
+
return t ? e.clientX > a.right + l || e.clientY > o.bottom && e.clientX > o.left : e.clientY > a.bottom + l || e.clientX > o.right && e.clientY > o.top;
|
|
2448
|
+
}
|
|
2449
|
+
function El(e, t, n, o, a, l, r, i) {
|
|
2450
|
+
var s = o ? e.clientY : e.clientX, u = o ? n.height : n.width, f = o ? n.top : n.left, d = o ? n.bottom : n.right, E = !1;
|
|
2451
|
+
if (!r) {
|
|
2452
|
+
if (i && ft < u * a) {
|
|
2453
|
+
if (!et && (Ze === 1 ? s > f + u * l / 2 : s < d - u * l / 2) && (et = !0), et)
|
|
2454
|
+
E = !0;
|
|
2455
|
+
else if (Ze === 1 ? s < f + ft : s > d - ft)
|
|
2456
|
+
return -Ze;
|
|
2457
|
+
} else if (s > f + u * (1 - a) / 2 && s < d - u * (1 - a) / 2)
|
|
2458
|
+
return xl(t);
|
|
2459
|
+
}
|
|
2460
|
+
return E = E || r, E && (s < f + u * l / 2 || s > d - u * l / 2) ? s > f + u / 2 ? 1 : -1 : 0;
|
|
2461
|
+
}
|
|
2462
|
+
function xl(e) {
|
|
2463
|
+
return ve(T) < ve(e) ? 1 : -1;
|
|
2464
|
+
}
|
|
2465
|
+
function $l(e) {
|
|
2466
|
+
for (var t = e.tagName + e.className + e.src + e.href + e.textContent, n = t.length, o = 0; n--; )
|
|
2467
|
+
o += t.charCodeAt(n);
|
|
2468
|
+
return o.toString(36);
|
|
2469
|
+
}
|
|
2470
|
+
function Cl(e) {
|
|
2471
|
+
bt.length = 0;
|
|
2472
|
+
for (var t = e.getElementsByTagName("input"), n = t.length; n--; ) {
|
|
2473
|
+
var o = t[n];
|
|
2474
|
+
o.checked && bt.push(o);
|
|
2475
|
+
}
|
|
2476
|
+
}
|
|
2477
|
+
function pt(e) {
|
|
2478
|
+
return setTimeout(e, 0);
|
|
2479
|
+
}
|
|
2480
|
+
function Lt(e) {
|
|
2481
|
+
return clearTimeout(e);
|
|
2482
|
+
}
|
|
2483
|
+
kt && U(document, "touchmove", function(e) {
|
|
2484
|
+
(F.active || Ve) && e.cancelable && e.preventDefault();
|
|
2485
|
+
});
|
|
2486
|
+
F.utils = {
|
|
2487
|
+
on: U,
|
|
2488
|
+
off: V,
|
|
2489
|
+
css: O,
|
|
2490
|
+
find: Nn,
|
|
2491
|
+
is: function(t, n) {
|
|
2492
|
+
return !!ke(t, n, t, !1);
|
|
2493
|
+
},
|
|
2494
|
+
extend: dl,
|
|
2495
|
+
throttle: Pn,
|
|
2496
|
+
closest: ke,
|
|
2497
|
+
toggleClass: me,
|
|
2498
|
+
clone: On,
|
|
2499
|
+
index: ve,
|
|
2500
|
+
nextTick: pt,
|
|
2501
|
+
cancelNextTick: Lt,
|
|
2502
|
+
detectDirection: Ln,
|
|
2503
|
+
getChild: je,
|
|
2504
|
+
expando: fe
|
|
2505
|
+
};
|
|
2506
|
+
F.get = function(e) {
|
|
2507
|
+
return e[fe];
|
|
2508
|
+
};
|
|
2509
|
+
F.mount = function() {
|
|
2510
|
+
for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
|
|
2511
|
+
t[n] = arguments[n];
|
|
2512
|
+
t[0].constructor === Array && (t = t[0]), t.forEach(function(o) {
|
|
2513
|
+
if (!o.prototype || !o.prototype.constructor)
|
|
2514
|
+
throw "Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(o));
|
|
2515
|
+
o.utils && (F.utils = Ee(Ee({}, F.utils), o.utils)), at.mount(o);
|
|
2516
|
+
});
|
|
2517
|
+
};
|
|
2518
|
+
F.create = function(e, t) {
|
|
2519
|
+
return new F(e, t);
|
|
2520
|
+
};
|
|
2521
|
+
F.version = sl;
|
|
2522
|
+
var te = [], We, Mt, Bt = !1, Dt, It, _t, Ge;
|
|
2523
|
+
function Dl() {
|
|
2524
|
+
function e() {
|
|
2525
|
+
this.defaults = {
|
|
2526
|
+
scroll: !0,
|
|
2527
|
+
forceAutoScrollFallback: !1,
|
|
2528
|
+
scrollSensitivity: 30,
|
|
2529
|
+
scrollSpeed: 10,
|
|
2530
|
+
bubbleScroll: !0
|
|
2531
|
+
};
|
|
2532
|
+
for (var t in this)
|
|
2533
|
+
t.charAt(0) === "_" && typeof this[t] == "function" && (this[t] = this[t].bind(this));
|
|
2534
|
+
}
|
|
2535
|
+
return e.prototype = {
|
|
2536
|
+
dragStarted: function(n) {
|
|
2537
|
+
var o = n.originalEvent;
|
|
2538
|
+
this.sortable.nativeDraggable ? U(document, "dragover", this._handleAutoScroll) : this.options.supportPointer ? U(document, "pointermove", this._handleFallbackAutoScroll) : o.touches ? U(document, "touchmove", this._handleFallbackAutoScroll) : U(document, "mousemove", this._handleFallbackAutoScroll);
|
|
2539
|
+
},
|
|
2540
|
+
dragOverCompleted: function(n) {
|
|
2541
|
+
var o = n.originalEvent;
|
|
2542
|
+
!this.options.dragOverBubble && !o.rootEl && this._handleAutoScroll(o);
|
|
2543
|
+
},
|
|
2544
|
+
drop: function() {
|
|
2545
|
+
this.sortable.nativeDraggable ? V(document, "dragover", this._handleAutoScroll) : (V(document, "pointermove", this._handleFallbackAutoScroll), V(document, "touchmove", this._handleFallbackAutoScroll), V(document, "mousemove", this._handleFallbackAutoScroll)), un(), ht(), cl();
|
|
2546
|
+
},
|
|
2547
|
+
nulling: function() {
|
|
2548
|
+
_t = Mt = We = Bt = Ge = Dt = It = null, te.length = 0;
|
|
2549
|
+
},
|
|
2550
|
+
_handleFallbackAutoScroll: function(n) {
|
|
2551
|
+
this._handleAutoScroll(n, !0);
|
|
2552
|
+
},
|
|
2553
|
+
_handleAutoScroll: function(n, o) {
|
|
2554
|
+
var a = this, l = (n.touches ? n.touches[0] : n).clientX, r = (n.touches ? n.touches[0] : n).clientY, i = document.elementFromPoint(l, r);
|
|
2555
|
+
if (_t = n, o || this.options.forceAutoScrollFallback || ot || De || qe) {
|
|
2556
|
+
Nt(n, this.options, i, o);
|
|
2557
|
+
var s = Ae(i, !0);
|
|
2558
|
+
Bt && (!Ge || l !== Dt || r !== It) && (Ge && un(), Ge = setInterval(function() {
|
|
2559
|
+
var u = Ae(document.elementFromPoint(l, r), !0);
|
|
2560
|
+
u !== s && (s = u, ht()), Nt(n, a.options, u, o);
|
|
2561
|
+
}, 10), Dt = l, It = r);
|
|
2562
|
+
} else {
|
|
2563
|
+
if (!this.options.bubbleScroll || Ae(i, !0) === Te()) {
|
|
2564
|
+
ht();
|
|
2565
|
+
return;
|
|
2566
|
+
}
|
|
2567
|
+
Nt(n, this.options, Ae(i, !1), !1);
|
|
2568
|
+
}
|
|
2569
|
+
}
|
|
2570
|
+
}, Ce(e, {
|
|
2571
|
+
pluginName: "scroll",
|
|
2572
|
+
initializeByDefault: !0
|
|
2573
|
+
});
|
|
2574
|
+
}
|
|
2575
|
+
function ht() {
|
|
2576
|
+
te.forEach(function(e) {
|
|
2577
|
+
clearInterval(e.pid);
|
|
2578
|
+
}), te = [];
|
|
2579
|
+
}
|
|
2580
|
+
function un() {
|
|
2581
|
+
clearInterval(Ge);
|
|
2582
|
+
}
|
|
2583
|
+
var Nt = Pn(function(e, t, n, o) {
|
|
2584
|
+
if (t.scroll) {
|
|
2585
|
+
var a = (e.touches ? e.touches[0] : e).clientX, l = (e.touches ? e.touches[0] : e).clientY, r = t.scrollSensitivity, i = t.scrollSpeed, s = Te(), u = !1, f;
|
|
2586
|
+
Mt !== n && (Mt = n, ht(), We = t.scroll, f = t.scrollFn, We === !0 && (We = Ae(n, !0)));
|
|
2587
|
+
var d = 0, E = We;
|
|
2588
|
+
do {
|
|
2589
|
+
var w = E, k = ne(w), x = k.top, m = k.bottom, b = k.left, y = k.right, D = k.width, p = k.height, N = void 0, v = void 0, h = w.scrollWidth, $ = w.scrollHeight, S = O(w), H = w.scrollLeft, K = w.scrollTop;
|
|
2590
|
+
w === s ? (N = D < h && (S.overflowX === "auto" || S.overflowX === "scroll" || S.overflowX === "visible"), v = p < $ && (S.overflowY === "auto" || S.overflowY === "scroll" || S.overflowY === "visible")) : (N = D < h && (S.overflowX === "auto" || S.overflowX === "scroll"), v = p < $ && (S.overflowY === "auto" || S.overflowY === "scroll"));
|
|
2591
|
+
var A = N && (Math.abs(y - a) <= r && H + D < h) - (Math.abs(b - a) <= r && !!H), j = v && (Math.abs(m - l) <= r && K + p < $) - (Math.abs(x - l) <= r && !!K);
|
|
2592
|
+
if (!te[d])
|
|
2593
|
+
for (var re = 0; re <= d; re++)
|
|
2594
|
+
te[re] || (te[re] = {});
|
|
2595
|
+
(te[d].vx != A || te[d].vy != j || te[d].el !== w) && (te[d].el = w, te[d].vx = A, te[d].vy = j, clearInterval(te[d].pid), (A != 0 || j != 0) && (u = !0, te[d].pid = setInterval((function() {
|
|
2596
|
+
o && this.layer === 0 && F.active._onTouchMove(_t);
|
|
2597
|
+
var Ie = te[this.layer].vy ? te[this.layer].vy * i : 0, be = te[this.layer].vx ? te[this.layer].vx * i : 0;
|
|
2598
|
+
typeof f == "function" && f.call(F.dragged.parentNode[fe], be, Ie, e, _t, te[this.layer].el) !== "continue" || An(te[this.layer].el, be, Ie);
|
|
2599
|
+
}).bind({
|
|
2600
|
+
layer: d
|
|
2601
|
+
}), 24))), d++;
|
|
2602
|
+
} while (t.bubbleScroll && E !== s && (E = Ae(E, !1)));
|
|
2603
|
+
Bt = u;
|
|
2604
|
+
}
|
|
2605
|
+
}, 30), Vn = function(t) {
|
|
2606
|
+
var n = t.originalEvent, o = t.putSortable, a = t.dragEl, l = t.activeSortable, r = t.dispatchSortableEvent, i = t.hideGhostForTarget, s = t.unhideGhostForTarget;
|
|
2607
|
+
if (n) {
|
|
2608
|
+
var u = o || l;
|
|
2609
|
+
i();
|
|
2610
|
+
var f = n.changedTouches && n.changedTouches.length ? n.changedTouches[0] : n, d = document.elementFromPoint(f.clientX, f.clientY);
|
|
2611
|
+
s(), u && !u.el.contains(d) && (r("spill"), this.onSpill({
|
|
2612
|
+
dragEl: a,
|
|
2613
|
+
putSortable: o
|
|
2614
|
+
}));
|
|
2615
|
+
}
|
|
2616
|
+
};
|
|
2617
|
+
function Ht() {
|
|
2618
|
+
}
|
|
2619
|
+
Ht.prototype = {
|
|
2620
|
+
startIndex: null,
|
|
2621
|
+
dragStart: function(t) {
|
|
2622
|
+
var n = t.oldDraggableIndex;
|
|
2623
|
+
this.startIndex = n;
|
|
2624
|
+
},
|
|
2625
|
+
onSpill: function(t) {
|
|
2626
|
+
var n = t.dragEl, o = t.putSortable;
|
|
2627
|
+
this.sortable.captureAnimationState(), o && o.captureAnimationState();
|
|
2628
|
+
var a = je(this.sortable.el, this.startIndex, this.options);
|
|
2629
|
+
a ? this.sortable.el.insertBefore(n, a) : this.sortable.el.appendChild(n), this.sortable.animateAll(), o && o.animateAll();
|
|
2630
|
+
},
|
|
2631
|
+
drop: Vn
|
|
2632
|
+
};
|
|
2633
|
+
Ce(Ht, {
|
|
2634
|
+
pluginName: "revertOnSpill"
|
|
2635
|
+
});
|
|
2636
|
+
function Kt() {
|
|
2637
|
+
}
|
|
2638
|
+
Kt.prototype = {
|
|
2639
|
+
onSpill: function(t) {
|
|
2640
|
+
var n = t.dragEl, o = t.putSortable, a = o || this.sortable;
|
|
2641
|
+
a.captureAnimationState(), n.parentNode && n.parentNode.removeChild(n), a.animateAll();
|
|
2642
|
+
},
|
|
2643
|
+
drop: Vn
|
|
2644
|
+
};
|
|
2645
|
+
Ce(Kt, {
|
|
2646
|
+
pluginName: "removeOnSpill"
|
|
2647
|
+
});
|
|
2648
|
+
F.mount(new Dl());
|
|
2649
|
+
F.mount(Kt, Ht);
|
|
2650
|
+
const Il = {
|
|
2651
|
+
key: 0,
|
|
2652
|
+
class: "smart-table-operate"
|
|
2653
|
+
}, Nl = /* @__PURE__ */ ee({
|
|
2654
|
+
__name: "setting",
|
|
2655
|
+
emits: ["change"],
|
|
2656
|
+
setup(e, { expose: t, emit: n }) {
|
|
2657
|
+
const o = n, a = R(!1), l = R([]), r = R(!1), i = R([]), s = R([]), u = [
|
|
2658
|
+
{
|
|
2659
|
+
title: "列",
|
|
2660
|
+
dataIndex: "title"
|
|
2661
|
+
},
|
|
2662
|
+
{
|
|
2663
|
+
title: "宽度(像素)",
|
|
2664
|
+
dataIndex: "width",
|
|
2665
|
+
width: 150
|
|
2666
|
+
},
|
|
2667
|
+
{
|
|
2668
|
+
title: "操作",
|
|
2669
|
+
dataIndex: "operate",
|
|
2670
|
+
width: 150,
|
|
2671
|
+
rowDrag: !0
|
|
2672
|
+
}
|
|
2673
|
+
];
|
|
2674
|
+
async function f() {
|
|
2675
|
+
await He();
|
|
2676
|
+
const b = document.querySelector("#smartTableColumnModalTable tbody");
|
|
2677
|
+
F.create(b, {
|
|
2678
|
+
animation: 300,
|
|
2679
|
+
dragClass: "smart-ghost-class",
|
|
2680
|
+
// 设置拖拽样式类名
|
|
2681
|
+
ghostClass: "smart-ghost-class",
|
|
2682
|
+
// 设置拖拽停靠样式类名
|
|
2683
|
+
chosenClass: "smart-ghost-class",
|
|
2684
|
+
// 设置选中样式类名
|
|
2685
|
+
handle: ".handle",
|
|
2686
|
+
onEnd({ newIndex: y, oldIndex: D }) {
|
|
2687
|
+
y !== D && w(D, y);
|
|
2688
|
+
}
|
|
2689
|
+
});
|
|
2690
|
+
}
|
|
2691
|
+
function d(b) {
|
|
2692
|
+
const y = b - 1;
|
|
2693
|
+
y < 0 || l.value[y].fixed || w(b, y);
|
|
2694
|
+
}
|
|
2695
|
+
function E(b) {
|
|
2696
|
+
const y = b + 1;
|
|
2697
|
+
y >= l.value.length || l.value[y].fixed || w(b, y);
|
|
2698
|
+
}
|
|
2699
|
+
function w(b, y) {
|
|
2700
|
+
const D = l.value.splice(b, 1)[0];
|
|
2701
|
+
l.value.splice(y, 0, D);
|
|
2702
|
+
}
|
|
2703
|
+
function k(b) {
|
|
2704
|
+
i.value = b;
|
|
2705
|
+
}
|
|
2706
|
+
function x() {
|
|
2707
|
+
Qt.confirm({
|
|
2708
|
+
title: "确定要恢复默认吗?",
|
|
2709
|
+
content: "确定恢复默认后,该信息将不可恢复",
|
|
2710
|
+
okText: "确定恢复",
|
|
2711
|
+
okType: "danger",
|
|
2712
|
+
onOk() {
|
|
2713
|
+
En.success("恢复默认成功"), l.value = JSON.parse(JSON.stringify(s.value));
|
|
2714
|
+
},
|
|
2715
|
+
cancelText: "取消",
|
|
2716
|
+
onCancel() {
|
|
2717
|
+
}
|
|
2718
|
+
});
|
|
2719
|
+
}
|
|
2720
|
+
async function m() {
|
|
2721
|
+
o(
|
|
2722
|
+
"change",
|
|
2723
|
+
// eslint-disable-next-line ts/ban-ts-comment
|
|
2724
|
+
// @ts-ignore
|
|
2725
|
+
l.value.map((b) => ({
|
|
2726
|
+
...b,
|
|
2727
|
+
visible: i.value.includes(b.dataIndex)
|
|
2728
|
+
}))
|
|
2729
|
+
), r.value = !1;
|
|
2730
|
+
}
|
|
2731
|
+
return t({
|
|
2732
|
+
open(b) {
|
|
2733
|
+
r.value = !0, l.value = JSON.parse(JSON.stringify(b)), s.value = JSON.parse(JSON.stringify(b)), i.value = l.value.filter((y) => y.visible !== !1).map((y) => y.dataIndex), f();
|
|
2734
|
+
}
|
|
2735
|
+
}), (b, y) => {
|
|
2736
|
+
const D = ye("smile-outlined"), p = ye("pushpin-outlined"), N = ye("drag-outlined"), v = ye("a-input-number");
|
|
2737
|
+
return c(), B(g(Qt), {
|
|
2738
|
+
modelValue: r.value,
|
|
2739
|
+
"onUpdate:modelValue": y[1] || (y[1] = (h) => r.value = h),
|
|
2740
|
+
width: 800,
|
|
2741
|
+
title: "设置列",
|
|
2742
|
+
"destroy-on-close": !0,
|
|
2743
|
+
closable: !1
|
|
2744
|
+
}, {
|
|
2745
|
+
footer: C(() => [
|
|
2746
|
+
P(g(le), {
|
|
2747
|
+
onClick: y[0] || (y[0] = (h) => r.value = !1)
|
|
2748
|
+
}, {
|
|
2749
|
+
default: C(() => [...y[7] || (y[7] = [
|
|
2750
|
+
W("取消", -1)
|
|
2751
|
+
])]),
|
|
2752
|
+
_: 1
|
|
2753
|
+
}),
|
|
2754
|
+
P(g(le), {
|
|
2755
|
+
type: "primary",
|
|
2756
|
+
loading: a.value,
|
|
2757
|
+
onClick: m
|
|
2758
|
+
}, {
|
|
2759
|
+
default: C(() => [...y[8] || (y[8] = [
|
|
2760
|
+
W("保存", -1)
|
|
2761
|
+
])]),
|
|
2762
|
+
_: 1
|
|
2763
|
+
}, 8, ["loading"]),
|
|
2764
|
+
P(g(le), {
|
|
2765
|
+
loading: a.value,
|
|
2766
|
+
danger: "",
|
|
2767
|
+
onClick: x
|
|
2768
|
+
}, {
|
|
2769
|
+
default: C(() => [...y[9] || (y[9] = [
|
|
2770
|
+
W("恢复默认", -1)
|
|
2771
|
+
])]),
|
|
2772
|
+
_: 1
|
|
2773
|
+
}, 8, ["loading"])
|
|
2774
|
+
]),
|
|
2775
|
+
default: C(() => [
|
|
2776
|
+
I("div", null, [
|
|
2777
|
+
P(g(yo), {
|
|
2778
|
+
type: "info",
|
|
2779
|
+
"show-icon": "",
|
|
2780
|
+
style: { "margin-bottom": "12px" }
|
|
2781
|
+
}, {
|
|
2782
|
+
icon: C(() => [
|
|
2783
|
+
P(D)
|
|
2784
|
+
]),
|
|
2785
|
+
message: C(() => [
|
|
2786
|
+
y[2] || (y[2] = W(" 可以通过拖拽行直接修改顺序哦;( ", -1)),
|
|
2787
|
+
P(p),
|
|
2788
|
+
y[3] || (y[3] = W("为固定列,不可拖拽 )", -1))
|
|
2789
|
+
]),
|
|
2790
|
+
_: 1
|
|
2791
|
+
}),
|
|
2792
|
+
P(g(Tn), {
|
|
2793
|
+
id: "smartTableColumnModalTable",
|
|
2794
|
+
"row-key": "dataIndex",
|
|
2795
|
+
"row-class-name": "column-row",
|
|
2796
|
+
columns: u,
|
|
2797
|
+
"data-source": l.value,
|
|
2798
|
+
"row-selection": {
|
|
2799
|
+
checkStrictly: !1,
|
|
2800
|
+
selectedRowKeys: i.value,
|
|
2801
|
+
onChange: k
|
|
2802
|
+
},
|
|
2803
|
+
pagination: !1,
|
|
2804
|
+
size: "small",
|
|
2805
|
+
bordered: ""
|
|
2806
|
+
}, {
|
|
2807
|
+
bodyCell: C(({ text: h, record: $, index: S, column: H }) => [
|
|
2808
|
+
H.dataIndex === "title" ? (c(), B(g(le), {
|
|
2809
|
+
key: 0,
|
|
2810
|
+
type: "text",
|
|
2811
|
+
class: Z($.fixed ? "" : "handle"),
|
|
2812
|
+
size: "small",
|
|
2813
|
+
style: { width: "100%", "text-align": "left" }
|
|
2814
|
+
}, {
|
|
2815
|
+
icon: C(() => [
|
|
2816
|
+
$.fixed ? (c(), B(p, { key: 1 })) : (c(), B(N, { key: 0 }))
|
|
2817
|
+
]),
|
|
2818
|
+
default: C(() => [
|
|
2819
|
+
W(" " + Y(h), 1)
|
|
2820
|
+
]),
|
|
2821
|
+
_: 2
|
|
2822
|
+
}, 1032, ["class"])) : L("", !0),
|
|
2823
|
+
H.dataIndex === "width" ? (c(), _(X, { key: 1 }, [
|
|
2824
|
+
P(v, {
|
|
2825
|
+
value: $.width,
|
|
2826
|
+
"onUpdate:value": (K) => $.width = K,
|
|
2827
|
+
style: { width: "90px", "margin-left": "10px", "margin-right": "3px" },
|
|
2828
|
+
size: "small"
|
|
2829
|
+
}, null, 8, ["value", "onUpdate:value"]),
|
|
2830
|
+
y[4] || (y[4] = W("px ", -1))
|
|
2831
|
+
], 64)) : L("", !0),
|
|
2832
|
+
H.dataIndex === "operate" ? (c(), _(X, { key: 2 }, [
|
|
2833
|
+
$.fixed ? L("", !0) : (c(), _("div", Il, [
|
|
2834
|
+
S > 0 ? (c(), B(g(le), {
|
|
2835
|
+
key: 0,
|
|
2836
|
+
type: "link",
|
|
2837
|
+
class: "handle",
|
|
2838
|
+
size: "small",
|
|
2839
|
+
onClick: (K) => d(S)
|
|
2840
|
+
}, {
|
|
2841
|
+
default: C(() => [...y[5] || (y[5] = [
|
|
2842
|
+
W(" 上移 ", -1)
|
|
2843
|
+
])]),
|
|
2844
|
+
_: 1
|
|
2845
|
+
}, 8, ["onClick"])) : L("", !0),
|
|
2846
|
+
S !== l.value.length - 1 ? (c(), B(g(le), {
|
|
2847
|
+
key: 1,
|
|
2848
|
+
type: "link",
|
|
2849
|
+
class: "handle",
|
|
2850
|
+
size: "small",
|
|
2851
|
+
onClick: (K) => E(S)
|
|
2852
|
+
}, {
|
|
2853
|
+
default: C(() => [...y[6] || (y[6] = [
|
|
2854
|
+
W(" 下移", -1)
|
|
2855
|
+
])]),
|
|
2856
|
+
_: 1
|
|
2857
|
+
}, 8, ["onClick"])) : L("", !0)
|
|
2858
|
+
]))
|
|
2859
|
+
], 64)) : L("", !0)
|
|
2860
|
+
]),
|
|
2861
|
+
_: 1
|
|
2862
|
+
}, 8, ["data-source", "row-selection"])
|
|
2863
|
+
])
|
|
2864
|
+
]),
|
|
2865
|
+
_: 1
|
|
2866
|
+
}, 8, ["modelValue"]);
|
|
2867
|
+
};
|
|
2868
|
+
}
|
|
2869
|
+
}), Pl = /* @__PURE__ */ ae(Nl, [["__scopeId", "data-v-357f44e4"]]), Al = {
|
|
2870
|
+
key: 0,
|
|
2871
|
+
class: "l-page-table__filter"
|
|
2872
|
+
}, Ol = {
|
|
2873
|
+
key: 0,
|
|
2874
|
+
class: "l-page-table__action"
|
|
2875
|
+
}, Fl = {
|
|
2876
|
+
key: 0,
|
|
2877
|
+
class: "icons"
|
|
2878
|
+
}, Rl = { key: 0 }, Ll = {
|
|
2879
|
+
key: 0,
|
|
2880
|
+
class: "bodycell"
|
|
2881
|
+
}, Ml = {
|
|
2882
|
+
key: 1,
|
|
2883
|
+
class: "l-page-table__page"
|
|
2884
|
+
}, Bl = /* @__PURE__ */ ee({
|
|
2885
|
+
__name: "page-table",
|
|
2886
|
+
props: {
|
|
2887
|
+
data: {},
|
|
2888
|
+
columns: {},
|
|
2889
|
+
filterItems: { default: () => [] },
|
|
2890
|
+
autoSearch: { type: Boolean, default: !0 },
|
|
2891
|
+
showFilter: { type: Boolean, default: !0 },
|
|
2892
|
+
showRefresh: { type: Boolean, default: !0 },
|
|
2893
|
+
showAction: { type: Boolean, default: !0 },
|
|
2894
|
+
showRadio: { type: Boolean },
|
|
2895
|
+
showSelection: { type: Boolean },
|
|
2896
|
+
showPage: { type: Boolean, default: !0 },
|
|
2897
|
+
showSetting: { type: Boolean, default: !0 },
|
|
2898
|
+
radioSelected: {},
|
|
2899
|
+
selectionSelected: {},
|
|
2900
|
+
condition: { default: () => ({}) },
|
|
2901
|
+
page: { default: () => ({
|
|
2902
|
+
total: 0,
|
|
2903
|
+
pageSize: 10,
|
|
2904
|
+
pageNum: 1
|
|
2905
|
+
}) },
|
|
2906
|
+
refreshLoading: { type: Boolean, default: !1 },
|
|
2907
|
+
card: { type: Boolean, default: !0 },
|
|
2908
|
+
bordered: { type: Boolean, default: !0 },
|
|
2909
|
+
rowKey: { default: "id" },
|
|
2910
|
+
rowSelection: {}
|
|
2911
|
+
},
|
|
2912
|
+
emits: ["refresh", "reset", "update:page", "update:condition", "update:sortInfo", "update:columns", "update:selection-selected", "update:radio-selected"],
|
|
2913
|
+
setup(e, { expose: t, emit: n }) {
|
|
2914
|
+
pn((v) => ({
|
|
2915
|
+
v7a909fa3: g(r).colorBgContainer,
|
|
2916
|
+
v71b74b48: g(r).colorBgLayout
|
|
2917
|
+
}));
|
|
2918
|
+
const o = e, a = n, { useToken: l } = bo, { token: r } = l(), i = R(), s = R(), { isFullscreen: u, toggle: f } = Do(s), d = R(), E = R(!1), w = tt(o, "page", a), k = tt(o, "condition", a);
|
|
2919
|
+
function x(v) {
|
|
2920
|
+
return v == null || v === "" || Array.isArray(v) && v.length === 0;
|
|
2921
|
+
}
|
|
2922
|
+
const m = (v) => {
|
|
2923
|
+
const { text: h, column: $ } = v;
|
|
2924
|
+
if (x(h))
|
|
2925
|
+
return "--";
|
|
2926
|
+
switch ($ == null ? void 0 : $.formatType) {
|
|
2927
|
+
case "Date":
|
|
2928
|
+
return Jt(h, "YYYY-MM-DD").value || "--";
|
|
2929
|
+
case "DateTime":
|
|
2930
|
+
return Jt(h, "YYYY-MM-DD HH:mm:ss").value || "--";
|
|
2931
|
+
case "Money":
|
|
2932
|
+
return tl(h) || "--";
|
|
2933
|
+
default:
|
|
2934
|
+
return h;
|
|
2935
|
+
}
|
|
2936
|
+
}, b = ce(() => o.columns.filter((v) => v.visible !== !1 && v.promission !== !1).map((v) => ({
|
|
2937
|
+
minWidth: 100,
|
|
2938
|
+
ellipsis: v.ellipsis ?? !0,
|
|
2939
|
+
customRender: v.customRender || m,
|
|
2940
|
+
...v
|
|
2941
|
+
}))), y = ce(() => {
|
|
2942
|
+
if (o.showRadio)
|
|
2943
|
+
return {
|
|
2944
|
+
type: "radio",
|
|
2945
|
+
selectedRowKeys: o.radioSelected ? [o.radioSelected] : [],
|
|
2946
|
+
onChange: (v) => {
|
|
2947
|
+
a("update:radio-selected", v[0] || "");
|
|
2948
|
+
}
|
|
2949
|
+
};
|
|
2950
|
+
if (o.showSelection)
|
|
2951
|
+
return {
|
|
2952
|
+
selectedRowKeys: o.selectionSelected || [],
|
|
2953
|
+
onChange: (v) => {
|
|
2954
|
+
a("update:selection-selected", v);
|
|
2955
|
+
}
|
|
2956
|
+
};
|
|
2957
|
+
}), D = qt(() => {
|
|
2958
|
+
E.value = !0, a(
|
|
2959
|
+
"refresh",
|
|
2960
|
+
// 搜索完成后执行的回调函数
|
|
2961
|
+
() => {
|
|
2962
|
+
E.value = !1;
|
|
2963
|
+
}
|
|
2964
|
+
);
|
|
2965
|
+
}), p = qt(() => {
|
|
2966
|
+
w.value.pageNum = 1, He(() => {
|
|
2967
|
+
D();
|
|
2968
|
+
});
|
|
2969
|
+
});
|
|
2970
|
+
function N(v) {
|
|
2971
|
+
a("update:columns", v);
|
|
2972
|
+
}
|
|
2973
|
+
return nt(() => {
|
|
2974
|
+
o.autoSearch && D();
|
|
2975
|
+
}), t({
|
|
2976
|
+
refresh: D,
|
|
2977
|
+
getRootTableRef() {
|
|
2978
|
+
return i.value;
|
|
2979
|
+
}
|
|
2980
|
+
}), (v, h) => {
|
|
2981
|
+
const $ = ye("fullscreen-exit-outlined"), S = ye("fullscreen-outlined"), H = ye("redo-outlined"), K = ye("setting-outlined");
|
|
2982
|
+
return c(), B(g(_o), { locale: g(al) }, {
|
|
2983
|
+
default: C(() => [
|
|
2984
|
+
I("div", {
|
|
2985
|
+
ref_key: "tableContainer",
|
|
2986
|
+
ref: s,
|
|
2987
|
+
class: Z(["l-page-table", { full: g(u) }])
|
|
2988
|
+
}, [
|
|
2989
|
+
e.showFilter ? (c(), _("div", Al, [
|
|
2990
|
+
P(g(ba), {
|
|
2991
|
+
modelValue: g(k),
|
|
2992
|
+
"onUpdate:modelValue": h[0] || (h[0] = (A) => mn(k) ? k.value = A : null),
|
|
2993
|
+
"filter-items": e.filterItems,
|
|
2994
|
+
card: e.card,
|
|
2995
|
+
onSearch: h[1] || (h[1] = (A) => g(p)()),
|
|
2996
|
+
onReset: h[2] || (h[2] = () => {
|
|
2997
|
+
a("reset"), g(p)();
|
|
2998
|
+
})
|
|
2999
|
+
}, Ke({ _: 2 }, [
|
|
3000
|
+
oe(e.filterItems.filter((A) => v.$slots[`filter-${A.key}`]), (A) => ({
|
|
3001
|
+
name: `filter-${A.key}`,
|
|
3002
|
+
fn: C(() => [
|
|
3003
|
+
z(v.$slots, `filter-${A.key}`, {}, void 0, !0)
|
|
3004
|
+
])
|
|
3005
|
+
}))
|
|
3006
|
+
]), 1032, ["modelValue", "filter-items", "card"])
|
|
3007
|
+
])) : L("", !0),
|
|
3008
|
+
I("div", {
|
|
3009
|
+
class: Z(["l-page-table__content", { card: e.card }])
|
|
3010
|
+
}, [
|
|
3011
|
+
e.showAction ? (c(), _("div", Ol, [
|
|
3012
|
+
I("div", null, [
|
|
3013
|
+
z(v.$slots, "action", {}, void 0, !0)
|
|
3014
|
+
]),
|
|
3015
|
+
e.showSetting ? (c(), _("div", Fl, [
|
|
3016
|
+
g(u) ? (c(), B(g(lt), {
|
|
3017
|
+
key: 0,
|
|
3018
|
+
title: "取消全屏"
|
|
3019
|
+
}, {
|
|
3020
|
+
default: C(() => [
|
|
3021
|
+
P(g(le), {
|
|
3022
|
+
type: "text",
|
|
3023
|
+
size: "small",
|
|
3024
|
+
onClick: h[3] || (h[3] = (A) => g(f)())
|
|
3025
|
+
}, {
|
|
3026
|
+
icon: C(() => [
|
|
3027
|
+
P($)
|
|
3028
|
+
]),
|
|
3029
|
+
_: 1
|
|
3030
|
+
})
|
|
3031
|
+
]),
|
|
3032
|
+
_: 1
|
|
3033
|
+
})) : (c(), B(g(lt), {
|
|
3034
|
+
key: 1,
|
|
3035
|
+
title: "全屏"
|
|
3036
|
+
}, {
|
|
3037
|
+
default: C(() => [
|
|
3038
|
+
P(g(le), {
|
|
3039
|
+
type: "text",
|
|
3040
|
+
size: "small",
|
|
3041
|
+
onClick: h[4] || (h[4] = (A) => g(f)())
|
|
3042
|
+
}, {
|
|
3043
|
+
icon: C(() => [
|
|
3044
|
+
P(S)
|
|
3045
|
+
]),
|
|
3046
|
+
_: 1
|
|
3047
|
+
})
|
|
3048
|
+
]),
|
|
3049
|
+
_: 1
|
|
3050
|
+
})),
|
|
3051
|
+
P(g(lt), { title: "刷新" }, {
|
|
3052
|
+
default: C(() => [
|
|
3053
|
+
P(g(le), {
|
|
3054
|
+
type: "text",
|
|
3055
|
+
size: "small",
|
|
3056
|
+
onClick: h[5] || (h[5] = (A) => g(D)())
|
|
3057
|
+
}, {
|
|
3058
|
+
icon: C(() => [
|
|
3059
|
+
P(H)
|
|
3060
|
+
]),
|
|
3061
|
+
_: 1
|
|
3062
|
+
})
|
|
3063
|
+
]),
|
|
3064
|
+
_: 1
|
|
3065
|
+
}),
|
|
3066
|
+
P(g(lt), { title: "列设置" }, {
|
|
3067
|
+
default: C(() => [
|
|
3068
|
+
P(g(le), {
|
|
3069
|
+
type: "text",
|
|
3070
|
+
size: "small",
|
|
3071
|
+
onClick: h[6] || (h[6] = (A) => {
|
|
3072
|
+
var j;
|
|
3073
|
+
return (j = d.value) == null ? void 0 : j.open(e.columns.filter((re) => re.promission !== !1));
|
|
3074
|
+
})
|
|
3075
|
+
}, {
|
|
3076
|
+
icon: C(() => [
|
|
3077
|
+
P(K)
|
|
3078
|
+
]),
|
|
3079
|
+
_: 1
|
|
3080
|
+
})
|
|
3081
|
+
]),
|
|
3082
|
+
_: 1
|
|
3083
|
+
})
|
|
3084
|
+
])) : L("", !0)
|
|
3085
|
+
])) : L("", !0),
|
|
3086
|
+
P(g(Tn), xe({
|
|
3087
|
+
ref_key: "tableRef",
|
|
3088
|
+
ref: i
|
|
3089
|
+
}, v.$attrs, {
|
|
3090
|
+
loading: E.value || e.refreshLoading,
|
|
3091
|
+
"data-source": e.data,
|
|
3092
|
+
columns: b.value,
|
|
3093
|
+
bordered: e.bordered,
|
|
3094
|
+
"row-key": e.rowKey,
|
|
3095
|
+
pagination: !1,
|
|
3096
|
+
"row-selection": e.rowSelection || y.value,
|
|
3097
|
+
size: "small"
|
|
3098
|
+
}), Ke({
|
|
3099
|
+
headerCell: C((A) => [
|
|
3100
|
+
(c(!0), _(X, null, oe(e.columns, (j) => (c(), _(X, {
|
|
3101
|
+
key: j.dataIndex
|
|
3102
|
+
}, [
|
|
3103
|
+
(A == null ? void 0 : A.column.dataIndex) === j.dataIndex ? (c(), _(X, { key: 0 }, [
|
|
3104
|
+
v.$slots[`${j.dataIndex}-header`] ? (c(), _("div", Rl, [
|
|
3105
|
+
z(v.$slots, `${j.dataIndex}-header`, xe({ ref_for: !0 }, A), void 0, !0)
|
|
3106
|
+
])) : j.require ? (c(), _(X, { key: 1 }, [
|
|
3107
|
+
h[10] || (h[10] = I("span", { class: "l-page-table__require" }, "*", -1)),
|
|
3108
|
+
W(Y(j.title), 1)
|
|
3109
|
+
], 64)) : L("", !0)
|
|
3110
|
+
], 64)) : L("", !0)
|
|
3111
|
+
], 64))), 128))
|
|
3112
|
+
]),
|
|
3113
|
+
bodyCell: C((A) => [
|
|
3114
|
+
(c(!0), _(X, null, oe(e.columns, (j) => (c(), _(X, {
|
|
3115
|
+
key: j.dataIndex
|
|
3116
|
+
}, [
|
|
3117
|
+
(A == null ? void 0 : A.column.dataIndex) === j.dataIndex ? (c(), _(X, { key: 0 }, [
|
|
3118
|
+
v.$slots[String(j.dataIndex)] ? (c(), _("div", Ll, [
|
|
3119
|
+
z(v.$slots, j.dataIndex, xe({ ref_for: !0 }, A), void 0, !0)
|
|
3120
|
+
])) : L("", !0)
|
|
3121
|
+
], 64)) : L("", !0)
|
|
3122
|
+
], 64))), 128))
|
|
3123
|
+
]),
|
|
3124
|
+
_: 2
|
|
3125
|
+
}, [
|
|
3126
|
+
v.$slots.expandedRowRender ? {
|
|
3127
|
+
name: "expandedRowRender",
|
|
3128
|
+
fn: C((A) => [
|
|
3129
|
+
z(v.$slots, "expandedRowRender", Pt(At(A)), void 0, !0)
|
|
3130
|
+
]),
|
|
3131
|
+
key: "0"
|
|
3132
|
+
} : void 0,
|
|
3133
|
+
v.$slots.expandColumnTitle ? {
|
|
3134
|
+
name: "expandColumnTitle",
|
|
3135
|
+
fn: C((A) => [
|
|
3136
|
+
z(v.$slots, "expandColumnTitle", Pt(At(A)), void 0, !0)
|
|
3137
|
+
]),
|
|
3138
|
+
key: "1"
|
|
3139
|
+
} : void 0,
|
|
3140
|
+
v.$slots.summary ? {
|
|
3141
|
+
name: "summary",
|
|
3142
|
+
fn: C(() => [
|
|
3143
|
+
z(v.$slots, "summary", {}, void 0, !0)
|
|
3144
|
+
]),
|
|
3145
|
+
key: "2"
|
|
3146
|
+
} : void 0
|
|
3147
|
+
]), 1040, ["loading", "data-source", "columns", "bordered", "row-key", "row-selection"]),
|
|
3148
|
+
e.showPage ? (c(), _("div", Ml, [
|
|
3149
|
+
P(g(wo), {
|
|
3150
|
+
current: g(w).pageNum,
|
|
3151
|
+
"onUpdate:current": h[7] || (h[7] = (A) => g(w).pageNum = A),
|
|
3152
|
+
"page-size": g(w).pageSize,
|
|
3153
|
+
"onUpdate:pageSize": h[8] || (h[8] = (A) => g(w).pageSize = A),
|
|
3154
|
+
total: g(w).total,
|
|
3155
|
+
"page-size-options": [5, 10, 20, 50, 100],
|
|
3156
|
+
"show-size-changer": "",
|
|
3157
|
+
"show-quick-jumper": "",
|
|
3158
|
+
"show-less-items": "",
|
|
3159
|
+
"show-total": (A) => `共 ${A} 条`,
|
|
3160
|
+
onChange: h[9] || (h[9] = (A) => g(D)())
|
|
3161
|
+
}, null, 8, ["current", "page-size", "total", "show-total"])
|
|
3162
|
+
])) : L("", !0),
|
|
3163
|
+
P(Pl, {
|
|
3164
|
+
ref_key: "columnSettingRef",
|
|
3165
|
+
ref: d,
|
|
3166
|
+
onChange: N
|
|
3167
|
+
}, null, 512)
|
|
3168
|
+
], 2)
|
|
3169
|
+
], 2)
|
|
3170
|
+
]),
|
|
3171
|
+
_: 3
|
|
3172
|
+
}, 8, ["locale"]);
|
|
3173
|
+
};
|
|
3174
|
+
}
|
|
3175
|
+
}), Yl = /* @__PURE__ */ ae(Bl, [["__scopeId", "data-v-8d57c521"]]), tr = pe(Yl), Vl = { class: "box" }, Ul = { class: "pt-8px pb-8px flex" }, zl = ["onClick"], Hl = {
|
|
3176
|
+
key: 1,
|
|
3177
|
+
class: "expand-icon-placeholder"
|
|
3178
|
+
}, Kl = { class: "flex flex-items-center h-20px" }, jl = {
|
|
3179
|
+
key: 0,
|
|
3180
|
+
src: "https://xinlian-prod.oss-cn-beijing.aliyuncs.com/rsp/folder_1773731297611.png?Expires=1805267297&OSSAccessKeyId=LTAI5tBLXUTe9F7AvtDMmiBQ&Signature=ANA2WjuY9aIAZsE3Q45ELcZ%2F4SA%3D",
|
|
3181
|
+
class: "w-16px mt--4px"
|
|
3182
|
+
}, Xl = { key: 1 }, Wl = {
|
|
3183
|
+
key: 0,
|
|
3184
|
+
src: "https://xinlian-prod.oss-cn-beijing.aliyuncs.com/rsp/folder_1773731297611.png?Expires=1805267297&OSSAccessKeyId=LTAI5tBLXUTe9F7AvtDMmiBQ&Signature=ANA2WjuY9aIAZsE3Q45ELcZ%2F4SA%3D",
|
|
3185
|
+
class: "w-16px mt--4px"
|
|
3186
|
+
}, Gl = {
|
|
3187
|
+
key: 0,
|
|
3188
|
+
class: "btnlist"
|
|
3189
|
+
}, ql = {
|
|
3190
|
+
key: 1,
|
|
3191
|
+
class: "h-22px mb-8px mr-16px line-height-22px"
|
|
3192
|
+
}, Jl = /* @__PURE__ */ ee({
|
|
3193
|
+
__name: "role-tree-item",
|
|
3194
|
+
props: {
|
|
3195
|
+
menu: {},
|
|
3196
|
+
isChild: { type: Boolean },
|
|
3197
|
+
indeterminateKeys: {},
|
|
3198
|
+
expandedKeys: {},
|
|
3199
|
+
showCheckbox: { type: Boolean, default: !1 }
|
|
3200
|
+
},
|
|
3201
|
+
emits: ["toggleExpand"],
|
|
3202
|
+
setup(e, { emit: t }) {
|
|
3203
|
+
const n = e, o = t;
|
|
3204
|
+
function a(i) {
|
|
3205
|
+
return !!(i.children && i.children.some((s) => s.menuType !== "F"));
|
|
3206
|
+
}
|
|
3207
|
+
function l(i) {
|
|
3208
|
+
o("toggleExpand", i);
|
|
3209
|
+
}
|
|
3210
|
+
function r(i) {
|
|
3211
|
+
return n.expandedKeys.has(i);
|
|
3212
|
+
}
|
|
3213
|
+
return (i, s) => {
|
|
3214
|
+
var f;
|
|
3215
|
+
const u = ye("role-tree-item", !0);
|
|
3216
|
+
return c(), _("div", {
|
|
3217
|
+
class: Z(["role-tree-item", { "child-menu": e.isChild }])
|
|
3218
|
+
}, [
|
|
3219
|
+
(c(!0), _(X, null, oe((f = e.menu) == null ? void 0 : f.filter((d) => d.menuType !== "F"), (d) => {
|
|
3220
|
+
var E, w;
|
|
3221
|
+
return c(), _("div", {
|
|
3222
|
+
key: d.id,
|
|
3223
|
+
class: "item"
|
|
3224
|
+
}, [
|
|
3225
|
+
I("div", Vl, [
|
|
3226
|
+
I("div", Ul, [
|
|
3227
|
+
a(d) ? (c(), _("span", {
|
|
3228
|
+
key: 0,
|
|
3229
|
+
class: "expand-icon",
|
|
3230
|
+
onClick: (k) => l(d.id)
|
|
3231
|
+
}, [
|
|
3232
|
+
I("img", {
|
|
3233
|
+
src: "https://xinlian-prod.oss-cn-beijing.aliyuncs.com/rsp/arrow_1773988582323.png?Expires=1805524582&OSSAccessKeyId=LTAI5tBLXUTe9F7AvtDMmiBQ&Signature=n4C0S%2Fl3ZD619ezg90YJB8UyN3M%3D",
|
|
3234
|
+
class: Z({ collapsed: !r(d.id) })
|
|
3235
|
+
}, null, 2)
|
|
3236
|
+
], 8, zl)) : (c(), _("span", Hl)),
|
|
3237
|
+
I("div", Kl, [
|
|
3238
|
+
e.showCheckbox ? (c(), B(g(Gt), {
|
|
3239
|
+
key: 0,
|
|
3240
|
+
value: d.id,
|
|
3241
|
+
indeterminate: e.indeterminateKeys.has(d.id)
|
|
3242
|
+
}, {
|
|
3243
|
+
default: C(() => [
|
|
3244
|
+
d.menuType === "M" ? (c(), _("img", jl)) : L("", !0),
|
|
3245
|
+
W(" " + Y(d.label || d.menuName), 1)
|
|
3246
|
+
]),
|
|
3247
|
+
_: 2
|
|
3248
|
+
}, 1032, ["value", "indeterminate"])) : (c(), _("span", Xl, [
|
|
3249
|
+
d.menuType === "M" ? (c(), _("img", Wl)) : L("", !0),
|
|
3250
|
+
W(" " + Y(d.label || d.menuName), 1)
|
|
3251
|
+
]))
|
|
3252
|
+
])
|
|
3253
|
+
]),
|
|
3254
|
+
(E = d.children) != null && E.some((k) => k.menuType === "F") ? (c(), _("div", Gl, [
|
|
3255
|
+
(c(!0), _(X, null, oe((w = d.children) == null ? void 0 : w.filter((k) => k.menuType === "F"), (k, x) => (c(), _(X, { key: x }, [
|
|
3256
|
+
e.showCheckbox ? (c(), B(g(Gt), {
|
|
3257
|
+
key: 0,
|
|
3258
|
+
value: k.id,
|
|
3259
|
+
class: "h-22px mb-8px"
|
|
3260
|
+
}, {
|
|
3261
|
+
default: C(() => [
|
|
3262
|
+
W(Y(k.label || d.menuName), 1)
|
|
3263
|
+
]),
|
|
3264
|
+
_: 2
|
|
3265
|
+
}, 1032, ["value"])) : (c(), _("span", ql, Y(k.label || d.menuName), 1))
|
|
3266
|
+
], 64))), 128))
|
|
3267
|
+
])) : L("", !0)
|
|
3268
|
+
]),
|
|
3269
|
+
d.children ? Zn((c(), B(u, {
|
|
3270
|
+
key: 0,
|
|
3271
|
+
menu: d.children,
|
|
3272
|
+
"indeterminate-keys": e.indeterminateKeys,
|
|
3273
|
+
"expanded-keys": e.expandedKeys,
|
|
3274
|
+
"show-checkbox": e.showCheckbox,
|
|
3275
|
+
"is-child": "",
|
|
3276
|
+
onToggleExpand: l
|
|
3277
|
+
}, null, 8, ["menu", "indeterminate-keys", "expanded-keys", "show-checkbox"])), [
|
|
3278
|
+
[eo, r(d.id)]
|
|
3279
|
+
]) : L("", !0)
|
|
3280
|
+
]);
|
|
3281
|
+
}), 128))
|
|
3282
|
+
], 2);
|
|
3283
|
+
};
|
|
3284
|
+
}
|
|
3285
|
+
}), Ql = /* @__PURE__ */ ae(Jl, [["__scopeId", "data-v-84c3531a"]]), Zl = { class: "tree-wrapper" }, ei = { class: "tree-header" }, ti = /* @__PURE__ */ ee({
|
|
3286
|
+
name: "LRoleTree",
|
|
3287
|
+
__name: "role-tree",
|
|
3288
|
+
props: {
|
|
3289
|
+
menu: {},
|
|
3290
|
+
modelValue: { default: () => [] },
|
|
3291
|
+
showCheckbox: { type: Boolean, default: !0 }
|
|
3292
|
+
},
|
|
3293
|
+
emits: ["update:modelValue"],
|
|
3294
|
+
setup(e, { expose: t, emit: n }) {
|
|
3295
|
+
const o = e, a = n, l = R([...o.modelValue]), r = R(/* @__PURE__ */ new Set()), i = R(/* @__PURE__ */ new Set());
|
|
3296
|
+
function s() {
|
|
3297
|
+
const m = /* @__PURE__ */ new Set();
|
|
3298
|
+
function b(y) {
|
|
3299
|
+
for (const D of y)
|
|
3300
|
+
D.children && D.children.length > 0 && (m.add(D.id), b(D.children));
|
|
3301
|
+
}
|
|
3302
|
+
b(o.menu), i.value = m;
|
|
3303
|
+
}
|
|
3304
|
+
function u() {
|
|
3305
|
+
i.value = /* @__PURE__ */ new Set();
|
|
3306
|
+
}
|
|
3307
|
+
function f(m) {
|
|
3308
|
+
i.value.has(m) ? i.value.delete(m) : i.value.add(m), i.value = new Set(i.value);
|
|
3309
|
+
}
|
|
3310
|
+
nt(() => {
|
|
3311
|
+
k();
|
|
3312
|
+
});
|
|
3313
|
+
function d(m) {
|
|
3314
|
+
const b = /* @__PURE__ */ new Map();
|
|
3315
|
+
function y(D) {
|
|
3316
|
+
for (const p of D)
|
|
3317
|
+
b.set(p.id, p), p.children && y(p.children);
|
|
3318
|
+
}
|
|
3319
|
+
return y(m), b;
|
|
3320
|
+
}
|
|
3321
|
+
function E(m) {
|
|
3322
|
+
const b = [];
|
|
3323
|
+
if (m.children)
|
|
3324
|
+
for (const y of m.children)
|
|
3325
|
+
y.menuType !== "F" && (b.push(y.id), b.push(...E(y)));
|
|
3326
|
+
return b;
|
|
3327
|
+
}
|
|
3328
|
+
function w(m, b, y) {
|
|
3329
|
+
function D(p) {
|
|
3330
|
+
if (!p.children || p.children.length === 0)
|
|
3331
|
+
return b.has(p.id) ? "all" : "none";
|
|
3332
|
+
const N = p.children.filter((S) => S.menuType !== "F");
|
|
3333
|
+
if (N.length === 0)
|
|
3334
|
+
return b.has(p.id) ? "all" : "none";
|
|
3335
|
+
const v = N.map((S) => D(S)), h = v.every((S) => S === "all"), $ = v.some((S) => S === "all" || S === "some");
|
|
3336
|
+
return h ? (b.add(p.id), y.delete(p.id), "all") : $ ? (b.delete(p.id), y.add(p.id), "some") : (b.delete(p.id), y.delete(p.id), "none");
|
|
3337
|
+
}
|
|
3338
|
+
for (const p of m)
|
|
3339
|
+
D(p);
|
|
3340
|
+
}
|
|
3341
|
+
function k() {
|
|
3342
|
+
const m = new Set(l.value), b = /* @__PURE__ */ new Set();
|
|
3343
|
+
w(o.menu, m, b), l.value = [...m], r.value = b;
|
|
3344
|
+
}
|
|
3345
|
+
Oe(
|
|
3346
|
+
() => o.modelValue,
|
|
3347
|
+
(m) => {
|
|
3348
|
+
l.value = [...m], k();
|
|
3349
|
+
}
|
|
3350
|
+
), Oe(
|
|
3351
|
+
() => o.menu,
|
|
3352
|
+
() => k()
|
|
3353
|
+
);
|
|
3354
|
+
function x(m) {
|
|
3355
|
+
const b = m.filter(($) => typeof $ != "boolean"), y = new Set(l.value), D = d(o.menu), p = b.filter(($) => !y.has($)), N = l.value.filter(($) => !new Set(b).has($)), v = new Set(b);
|
|
3356
|
+
for (const $ of p) {
|
|
3357
|
+
const S = D.get($);
|
|
3358
|
+
if (S && S.menuType !== "F")
|
|
3359
|
+
for (const H of E(S))
|
|
3360
|
+
v.add(H);
|
|
3361
|
+
}
|
|
3362
|
+
for (const $ of N) {
|
|
3363
|
+
const S = D.get($);
|
|
3364
|
+
if (S && S.menuType !== "F")
|
|
3365
|
+
for (const H of E(S))
|
|
3366
|
+
v.delete(H);
|
|
3367
|
+
}
|
|
3368
|
+
const h = /* @__PURE__ */ new Set();
|
|
3369
|
+
w(o.menu, v, h), l.value = [...v], r.value = h, a("update:modelValue", [...v, ...h]);
|
|
3370
|
+
}
|
|
3371
|
+
return t({
|
|
3372
|
+
expandAll: s,
|
|
3373
|
+
collapseAll: u
|
|
3374
|
+
}), (m, b) => (c(), _("div", Zl, [
|
|
3375
|
+
I("div", ei, [
|
|
3376
|
+
P(g(le), {
|
|
3377
|
+
type: "link",
|
|
3378
|
+
size: "small",
|
|
3379
|
+
onClick: s
|
|
3380
|
+
}, {
|
|
3381
|
+
default: C(() => [...b[0] || (b[0] = [
|
|
3382
|
+
W("展开全部", -1)
|
|
3383
|
+
])]),
|
|
3384
|
+
_: 1
|
|
3385
|
+
}),
|
|
3386
|
+
P(g(le), {
|
|
3387
|
+
type: "link",
|
|
3388
|
+
size: "small",
|
|
3389
|
+
onClick: u
|
|
3390
|
+
}, {
|
|
3391
|
+
default: C(() => [...b[1] || (b[1] = [
|
|
3392
|
+
W("收起全部", -1)
|
|
3393
|
+
])]),
|
|
3394
|
+
_: 1
|
|
3395
|
+
})
|
|
3396
|
+
]),
|
|
3397
|
+
P(g(ko), {
|
|
3398
|
+
value: l.value,
|
|
3399
|
+
class: "tree",
|
|
3400
|
+
onChange: x
|
|
3401
|
+
}, {
|
|
3402
|
+
default: C(() => [
|
|
3403
|
+
P(Ql, {
|
|
3404
|
+
menu: e.menu,
|
|
3405
|
+
"indeterminate-keys": r.value,
|
|
3406
|
+
"expanded-keys": i.value,
|
|
3407
|
+
"show-checkbox": e.showCheckbox,
|
|
3408
|
+
onToggleExpand: f
|
|
3409
|
+
}, null, 8, ["menu", "indeterminate-keys", "expanded-keys", "show-checkbox"])
|
|
3410
|
+
]),
|
|
3411
|
+
_: 1
|
|
3412
|
+
}, 8, ["value"])
|
|
3413
|
+
]));
|
|
3414
|
+
}
|
|
3415
|
+
}), ni = /* @__PURE__ */ ae(ti, [["__scopeId", "data-v-84a0e666"]]), nr = pe(ni), oi = { class: "tab-wrapper" }, ai = { class: "tab-bar" }, li = ["onClick"], ii = /* @__PURE__ */ ee({
|
|
3416
|
+
name: "LSecondBar",
|
|
3417
|
+
__name: "SecondBar",
|
|
3418
|
+
props: {
|
|
3419
|
+
modelValue: {},
|
|
3420
|
+
tabs: {}
|
|
3421
|
+
},
|
|
3422
|
+
emits: ["update:modelValue", "change"],
|
|
3423
|
+
setup(e, { emit: t }) {
|
|
3424
|
+
const n = e, o = t;
|
|
3425
|
+
function a(l) {
|
|
3426
|
+
l !== n.modelValue && (o("update:modelValue", l), o("change", l));
|
|
3427
|
+
}
|
|
3428
|
+
return (l, r) => (c(), _("div", oi, [
|
|
3429
|
+
I("div", ai, [
|
|
3430
|
+
(c(!0), _(X, null, oe(e.tabs, (i) => (c(), _("div", {
|
|
3431
|
+
key: i.value
|
|
3432
|
+
}, [
|
|
3433
|
+
I("div", {
|
|
3434
|
+
class: Z(["tab-item", { "is-active": i.value === e.modelValue }]),
|
|
3435
|
+
onClick: (s) => a(i.value)
|
|
3436
|
+
}, Y(i.label), 11, li)
|
|
3437
|
+
]))), 128))
|
|
3438
|
+
])
|
|
3439
|
+
]));
|
|
3440
|
+
}
|
|
3441
|
+
}), ri = /* @__PURE__ */ ae(ii, [["__scopeId", "data-v-33eae005"]]), or = pe(ri), si = {
|
|
3442
|
+
key: 0,
|
|
3443
|
+
class: "l-section-block__title"
|
|
3444
|
+
}, ui = { class: "l-section-block__text" }, di = {
|
|
3445
|
+
key: 0,
|
|
3446
|
+
class: "l-section-block__extra"
|
|
3447
|
+
}, ci = { class: "l-section-block__body" }, fi = /* @__PURE__ */ ee({
|
|
3448
|
+
name: "LSectionBlock",
|
|
3449
|
+
__name: "section-block",
|
|
3450
|
+
props: {
|
|
3451
|
+
title: { default: "" },
|
|
3452
|
+
blockClass: { default: void 0 },
|
|
3453
|
+
showHeader: { type: Boolean, default: !0 },
|
|
3454
|
+
loading: { type: Boolean }
|
|
3455
|
+
},
|
|
3456
|
+
setup(e) {
|
|
3457
|
+
return (t, n) => (c(), _("div", {
|
|
3458
|
+
class: Z(["l-section-block", e.blockClass])
|
|
3459
|
+
}, [
|
|
3460
|
+
e.showHeader ? (c(), _("div", si, [
|
|
3461
|
+
n[0] || (n[0] = I("span", { class: "l-section-block__bar" }, null, -1)),
|
|
3462
|
+
I("span", ui, [
|
|
3463
|
+
z(t.$slots, "title", {}, () => [
|
|
3464
|
+
W(Y(e.title), 1)
|
|
3465
|
+
], !0)
|
|
3466
|
+
]),
|
|
3467
|
+
t.$slots["header-extra"] ? (c(), _("div", di, [
|
|
3468
|
+
z(t.$slots, "header-extra", {}, void 0, !0)
|
|
3469
|
+
])) : L("", !0)
|
|
3470
|
+
])) : L("", !0),
|
|
3471
|
+
I("div", ci, [
|
|
3472
|
+
P(g(Yt), { spinning: e.loading }, {
|
|
3473
|
+
default: C(() => [
|
|
3474
|
+
z(t.$slots, "default", {}, void 0, !0)
|
|
3475
|
+
]),
|
|
3476
|
+
_: 3
|
|
3477
|
+
}, 8, ["spinning"])
|
|
3478
|
+
])
|
|
3479
|
+
], 2));
|
|
3480
|
+
}
|
|
3481
|
+
}), ar = /* @__PURE__ */ ae(fi, [["__scopeId", "data-v-4ef613d2"]]), pi = { class: "l-sign-status-flow" }, hi = { class: "l-sign-status-flow__content" }, mi = { class: "l-sign-status-flow__line-1" }, gi = ["title"], vi = ["title"], yi = {
|
|
3482
|
+
key: 0,
|
|
3483
|
+
class: "l-sign-status-flow__line-2"
|
|
3484
|
+
}, bi = /* @__PURE__ */ ee({
|
|
3485
|
+
name: "LSignStatusFlow",
|
|
3486
|
+
__name: "sign-status-flow",
|
|
3487
|
+
props: {
|
|
3488
|
+
items: { default: () => [] }
|
|
3489
|
+
},
|
|
3490
|
+
setup(e) {
|
|
3491
|
+
const t = e;
|
|
3492
|
+
function n(i) {
|
|
3493
|
+
const s = Number(i);
|
|
3494
|
+
return s === 2 ? "已签署" : s === 4 ? "已拒绝" : "待签署";
|
|
3495
|
+
}
|
|
3496
|
+
function o(i) {
|
|
3497
|
+
const s = Number(i);
|
|
3498
|
+
return s === 2 ? "success" : s === 4 ? "error" : "warning";
|
|
3499
|
+
}
|
|
3500
|
+
function a(i) {
|
|
3501
|
+
return Array.isArray(i) ? i.map((s, u) => ({
|
|
3502
|
+
id: String(s.id ?? u),
|
|
3503
|
+
signerName: s.psnName ?? "",
|
|
3504
|
+
enterpriseName: s.orgName ?? "",
|
|
3505
|
+
status: n(Number(s.signResult)),
|
|
3506
|
+
statusColor: o(Number(s.signResult)),
|
|
3507
|
+
operateTime: s.operateTime || ""
|
|
3508
|
+
})) : [];
|
|
3509
|
+
}
|
|
3510
|
+
function l(i) {
|
|
3511
|
+
return i === "已签署" ? "success" : i === "已拒绝" ? "error" : "warning";
|
|
3512
|
+
}
|
|
3513
|
+
const r = ce(() => a(t.items));
|
|
3514
|
+
return (i, s) => (c(), _("div", pi, [
|
|
3515
|
+
r.value.length ? (c(!0), _(X, { key: 0 }, oe(r.value, (u) => (c(), _("div", {
|
|
3516
|
+
key: u.id,
|
|
3517
|
+
class: "l-sign-status-flow__item"
|
|
3518
|
+
}, [
|
|
3519
|
+
s[0] || (s[0] = I("div", { class: "l-sign-status-flow__icon" }, "签", -1)),
|
|
3520
|
+
I("div", hi, [
|
|
3521
|
+
I("div", mi, [
|
|
3522
|
+
I("div", {
|
|
3523
|
+
class: "l-sign-status-flow__signer",
|
|
3524
|
+
title: u.signerName || "-"
|
|
3525
|
+
}, Y(u.signerName || "-"), 9, gi),
|
|
3526
|
+
P(g(So), {
|
|
3527
|
+
color: u.statusColor || l(u.status)
|
|
3528
|
+
}, {
|
|
3529
|
+
default: C(() => [
|
|
3530
|
+
W(Y(u.status || "待签署"), 1)
|
|
3531
|
+
]),
|
|
3532
|
+
_: 2
|
|
3533
|
+
}, 1032, ["color"])
|
|
3534
|
+
]),
|
|
3535
|
+
I("div", {
|
|
3536
|
+
class: "l-sign-status-flow__line-2",
|
|
3537
|
+
title: u.enterpriseName || "-"
|
|
3538
|
+
}, Y(u.enterpriseName || "-"), 9, vi),
|
|
3539
|
+
u.operateTime ? (c(), _("div", yi, " 签署时间:" + Y(u.operateTime), 1)) : L("", !0)
|
|
3540
|
+
])
|
|
3541
|
+
]))), 128)) : (c(), B(g(bn), { key: 1 }))
|
|
3542
|
+
]));
|
|
3543
|
+
}
|
|
3544
|
+
}), _i = /* @__PURE__ */ ae(bi, [["__scopeId", "data-v-92a1f504"]]), lr = pe(_i), Un = "/prod-api", wi = "/scf/common/file/upload", ki = "/scf/common/file/delete", zn = `${Un}${wi}`, Si = {
|
|
3545
|
+
USER_WEB: {
|
|
3546
|
+
upload: zn,
|
|
3547
|
+
delete: `${Un}${ki}`
|
|
3548
|
+
}
|
|
3549
|
+
}, Ti = {
|
|
3550
|
+
OP_MANAGE: "Op-Token",
|
|
3551
|
+
OP: "Op-Token",
|
|
3552
|
+
undefined: "Admin-Token"
|
|
3553
|
+
};
|
|
3554
|
+
var dn;
|
|
3555
|
+
const Hn = {
|
|
3556
|
+
action: ((dn = Si[void 0]) == null ? void 0 : dn.upload) ?? zn,
|
|
3557
|
+
headers: () => Za(Ti[void 0])
|
|
3558
|
+
};
|
|
3559
|
+
function wt(e) {
|
|
3560
|
+
const { response: t } = e;
|
|
3561
|
+
if (t != null && t.data) {
|
|
3562
|
+
const n = t.data;
|
|
3563
|
+
return {
|
|
3564
|
+
fileId: n.id,
|
|
3565
|
+
url: n.url,
|
|
3566
|
+
originalFileName: n.originalFileName
|
|
3567
|
+
};
|
|
3568
|
+
}
|
|
3569
|
+
return {
|
|
3570
|
+
fileId: e.uid,
|
|
3571
|
+
url: e.url,
|
|
3572
|
+
originalFileName: e.name ?? e.originalFileName
|
|
3573
|
+
};
|
|
3574
|
+
}
|
|
3575
|
+
const Ei = { class: "upload-file-col" }, xi = { key: 0 }, $i = { class: "inner" }, Ci = { class: "h-18!" }, Di = { class: "text" }, Ii = {
|
|
3576
|
+
key: 0,
|
|
3577
|
+
class: "upload-file-hint"
|
|
3578
|
+
}, Ni = /* @__PURE__ */ ee({
|
|
3579
|
+
name: "LUploadFile",
|
|
3580
|
+
inheritAttrs: !1,
|
|
3581
|
+
__name: "upload-file",
|
|
3582
|
+
props: /* @__PURE__ */ gn({
|
|
3583
|
+
type: {},
|
|
3584
|
+
readonly: { type: Boolean },
|
|
3585
|
+
accept: {},
|
|
3586
|
+
hint: {},
|
|
3587
|
+
modelValue: {},
|
|
3588
|
+
action: {},
|
|
3589
|
+
uploadText: {},
|
|
3590
|
+
headers: {},
|
|
3591
|
+
maxCount: {},
|
|
3592
|
+
maxSizeMb: {}
|
|
3593
|
+
}, {
|
|
3594
|
+
modelValue: () => [],
|
|
3595
|
+
accept: ".jpg,.png,.jpeg,.doc,.docx,.pdf,.xls,.xlsx",
|
|
3596
|
+
uploadText: "上传附件",
|
|
3597
|
+
...Hn,
|
|
3598
|
+
type: "normal",
|
|
3599
|
+
maxCount: 6
|
|
3600
|
+
}),
|
|
3601
|
+
emits: ["update:modelValue"],
|
|
3602
|
+
setup(e, { emit: t }) {
|
|
3603
|
+
const n = e, o = t, a = to(), l = R(), r = R([]);
|
|
3604
|
+
function i(f) {
|
|
3605
|
+
var d;
|
|
3606
|
+
(d = l.value) == null || d.showDialog(f.url);
|
|
3607
|
+
}
|
|
3608
|
+
Oe(
|
|
3609
|
+
() => n.modelValue,
|
|
3610
|
+
(f) => {
|
|
3611
|
+
r.value = f ? JSON.parse(
|
|
3612
|
+
JSON.stringify(
|
|
3613
|
+
f.map((d) => ({
|
|
3614
|
+
name: d.originalFileName,
|
|
3615
|
+
url: d.url || d.fileUrl,
|
|
3616
|
+
uid: d.fileId,
|
|
3617
|
+
status: "done"
|
|
3618
|
+
}))
|
|
3619
|
+
)
|
|
3620
|
+
) : [];
|
|
3621
|
+
},
|
|
3622
|
+
{
|
|
3623
|
+
deep: !0,
|
|
3624
|
+
immediate: !0
|
|
3625
|
+
}
|
|
3626
|
+
);
|
|
3627
|
+
function s(f) {
|
|
3628
|
+
if (f.file.status === "uploading")
|
|
3629
|
+
return;
|
|
3630
|
+
if (f.file.status === "removed") {
|
|
3631
|
+
const w = f.fileList.map((k) => wt(k));
|
|
3632
|
+
o("update:modelValue", w);
|
|
3633
|
+
return;
|
|
3634
|
+
}
|
|
3635
|
+
const d = f.file.response;
|
|
3636
|
+
if ((d == null ? void 0 : d.code) !== 200)
|
|
3637
|
+
return r.value.pop(), !1;
|
|
3638
|
+
const E = f.fileList.map((w) => wt(w));
|
|
3639
|
+
o("update:modelValue", E);
|
|
3640
|
+
}
|
|
3641
|
+
function u(f, d) {
|
|
3642
|
+
const E = Number(n.maxSizeMb);
|
|
3643
|
+
if (Number.isFinite(E) && E > 0 && Number((f == null ? void 0 : f.size) ?? 0) / 1024 / 1024 > E)
|
|
3644
|
+
return En.warning(`单个文件不超过${E}M,请重新选择`), Ot.LIST_IGNORE;
|
|
3645
|
+
const w = a.beforeUpload ?? a["before-upload"];
|
|
3646
|
+
return typeof w == "function" ? w(f, d) : !0;
|
|
3647
|
+
}
|
|
3648
|
+
return (f, d) => {
|
|
3649
|
+
const E = ye("plus-outlined"), w = ye("VerticalAlignTopOutlined");
|
|
3650
|
+
return c(), _("div", {
|
|
3651
|
+
class: Z(["upload-file-wrapper", { inlineType: e.type === "inline", normalType: e.type === "normal", readonly: e.readonly }])
|
|
3652
|
+
}, [
|
|
3653
|
+
I("div", Ei, [
|
|
3654
|
+
P(g(Ot), xe(f.$attrs, {
|
|
3655
|
+
"file-list": r.value,
|
|
3656
|
+
"onUpdate:fileList": d[0] || (d[0] = (k) => r.value = k),
|
|
3657
|
+
accept: e.accept,
|
|
3658
|
+
action: e.action,
|
|
3659
|
+
"max-count": e.maxCount,
|
|
3660
|
+
headers: e.headers,
|
|
3661
|
+
"before-upload": u,
|
|
3662
|
+
"show-upload-list": { showRemoveIcon: !e.readonly },
|
|
3663
|
+
onPreview: i,
|
|
3664
|
+
onChange: s
|
|
3665
|
+
}), {
|
|
3666
|
+
default: C(() => [
|
|
3667
|
+
e.readonly ? L("", !0) : (c(), _(X, { key: 0 }, [
|
|
3668
|
+
f.$slots.default ? z(f.$slots, "default", { key: 0 }, void 0, !0) : (c(), _(X, { key: 1 }, [
|
|
3669
|
+
e.type === "inline" ? (c(), _("div", xi, [
|
|
3670
|
+
I("div", null, [
|
|
3671
|
+
I("div", $i, [
|
|
3672
|
+
I("div", Ci, [
|
|
3673
|
+
P(E, { class: "icon" })
|
|
3674
|
+
]),
|
|
3675
|
+
I("div", Di, Y(e.uploadText), 1)
|
|
3676
|
+
])
|
|
3677
|
+
])
|
|
3678
|
+
])) : (c(), B(g(le), { key: 1 }, {
|
|
3679
|
+
default: C(() => [
|
|
3680
|
+
P(w),
|
|
3681
|
+
W(" " + Y(e.uploadText), 1)
|
|
3682
|
+
]),
|
|
3683
|
+
_: 1
|
|
3684
|
+
}))
|
|
3685
|
+
], 64))
|
|
3686
|
+
], 64))
|
|
3687
|
+
]),
|
|
3688
|
+
_: 3
|
|
3689
|
+
}, 16, ["file-list", "accept", "action", "max-count", "headers", "show-upload-list"])
|
|
3690
|
+
]),
|
|
3691
|
+
e.hint && !e.readonly ? (c(), _("div", Ii, Y(e.hint), 1)) : L("", !0),
|
|
3692
|
+
P(Vt, {
|
|
3693
|
+
ref_key: "filePreviewRef",
|
|
3694
|
+
ref: l
|
|
3695
|
+
}, null, 512)
|
|
3696
|
+
], 2);
|
|
3697
|
+
};
|
|
3698
|
+
}
|
|
3699
|
+
}), Pi = /* @__PURE__ */ ae(Ni, [["__scopeId", "data-v-ad40ee66"]]), Ai = { class: "upload-file-col" }, Oi = { key: 1 }, Fi = { style: { "margin-top": "8px" } }, Ri = {
|
|
3700
|
+
key: 0,
|
|
3701
|
+
class: "upload-file-hint"
|
|
3702
|
+
}, Li = /* @__PURE__ */ ee({
|
|
3703
|
+
name: "LUploadImage",
|
|
3704
|
+
/** 避免 customRequest 等非 prop 落到外层 div,须落到内部 a-upload 上才能生效并触发 change → emit */
|
|
3705
|
+
inheritAttrs: !1,
|
|
3706
|
+
__name: "upload-image",
|
|
3707
|
+
props: /* @__PURE__ */ gn({
|
|
3708
|
+
type: {},
|
|
3709
|
+
readonly: { type: Boolean },
|
|
3710
|
+
accept: {},
|
|
3711
|
+
hint: {},
|
|
3712
|
+
modelValue: {},
|
|
3713
|
+
action: {},
|
|
3714
|
+
uploadText: {},
|
|
3715
|
+
headers: {},
|
|
3716
|
+
maxCount: {}
|
|
3717
|
+
}, {
|
|
3718
|
+
modelValue: () => [],
|
|
3719
|
+
accept: "image/*,video/*",
|
|
3720
|
+
uploadText: "上传图片",
|
|
3721
|
+
...Hn,
|
|
3722
|
+
type: "normal",
|
|
3723
|
+
maxCount: 6
|
|
3724
|
+
}),
|
|
3725
|
+
emits: ["update:modelValue"],
|
|
3726
|
+
setup(e, { emit: t }) {
|
|
3727
|
+
const n = e, o = t, a = R([]), l = R();
|
|
3728
|
+
function r(s) {
|
|
3729
|
+
var u;
|
|
3730
|
+
(u = l.value) == null || u.showDialog(s.url);
|
|
3731
|
+
}
|
|
3732
|
+
Oe(
|
|
3733
|
+
() => n.modelValue,
|
|
3734
|
+
(s) => {
|
|
3735
|
+
a.value = s ? JSON.parse(
|
|
3736
|
+
JSON.stringify(
|
|
3737
|
+
s.map((u) => ({
|
|
3738
|
+
name: u.originalFileName,
|
|
3739
|
+
url: u.url || u.fileUrl,
|
|
3740
|
+
uid: u.fileId,
|
|
3741
|
+
status: "done"
|
|
3742
|
+
}))
|
|
3743
|
+
)
|
|
3744
|
+
) : [];
|
|
3745
|
+
},
|
|
3746
|
+
{
|
|
3747
|
+
deep: !0,
|
|
3748
|
+
immediate: !0
|
|
3749
|
+
}
|
|
3750
|
+
);
|
|
3751
|
+
function i(s) {
|
|
3752
|
+
if (s.file.status === "uploading")
|
|
3753
|
+
return;
|
|
3754
|
+
if (s.file.status === "removed") {
|
|
3755
|
+
const d = s.fileList.map((E) => wt(E));
|
|
3756
|
+
o("update:modelValue", d);
|
|
3757
|
+
return;
|
|
3758
|
+
}
|
|
3759
|
+
const u = s.file.response;
|
|
3760
|
+
if ((u == null ? void 0 : u.code) !== 200)
|
|
3761
|
+
return a.value.pop(), !1;
|
|
3762
|
+
const f = s.fileList.map((d) => wt(d));
|
|
3763
|
+
o("update:modelValue", f);
|
|
3764
|
+
}
|
|
3765
|
+
return (s, u) => {
|
|
3766
|
+
const f = ye("plus-outlined");
|
|
3767
|
+
return c(), _("div", {
|
|
3768
|
+
class: Z(["upload-file-wrapper", { inlineType: e.type === "inline", normalType: e.type === "normal", readonly: e.readonly }])
|
|
3769
|
+
}, [
|
|
3770
|
+
I("div", Ai, [
|
|
3771
|
+
P(g(Ot), xe(s.$attrs, {
|
|
3772
|
+
"file-list": a.value,
|
|
3773
|
+
"onUpdate:fileList": u[0] || (u[0] = (d) => a.value = d),
|
|
3774
|
+
"list-type": "picture-card",
|
|
3775
|
+
accept: e.accept,
|
|
3776
|
+
action: e.action,
|
|
3777
|
+
"max-count": e.maxCount,
|
|
3778
|
+
headers: e.headers,
|
|
3779
|
+
"show-upload-list": { showRemoveIcon: !e.readonly },
|
|
3780
|
+
onPreview: r,
|
|
3781
|
+
onChange: i
|
|
3782
|
+
}), {
|
|
3783
|
+
default: C(() => [
|
|
3784
|
+
a.value.length < e.maxCount && !e.readonly ? (c(), _(X, { key: 0 }, [
|
|
3785
|
+
s.$slots.default ? z(s.$slots, "default", { key: 0 }, void 0, !0) : (c(), _("div", Oi, [
|
|
3786
|
+
P(f),
|
|
3787
|
+
I("div", Fi, Y(e.uploadText), 1)
|
|
3788
|
+
]))
|
|
3789
|
+
], 64)) : L("", !0)
|
|
3790
|
+
]),
|
|
3791
|
+
_: 3
|
|
3792
|
+
}, 16, ["file-list", "accept", "action", "max-count", "headers", "show-upload-list"])
|
|
3793
|
+
]),
|
|
3794
|
+
e.hint && !e.readonly ? (c(), _("div", Ri, Y(e.hint), 1)) : L("", !0),
|
|
3795
|
+
P(Vt, {
|
|
3796
|
+
ref_key: "filePreviewRef",
|
|
3797
|
+
ref: l
|
|
3798
|
+
}, null, 512)
|
|
3799
|
+
], 2);
|
|
3800
|
+
};
|
|
3801
|
+
}
|
|
3802
|
+
}), Mi = /* @__PURE__ */ ae(Li, [["__scopeId", "data-v-e3fbddf7"]]), ir = pe(Pi), rr = pe(Mi);
|
|
3803
|
+
export {
|
|
3804
|
+
Wi as LApprovalSteps,
|
|
3805
|
+
Gi as LDetailLayout,
|
|
3806
|
+
qi as LDrawer,
|
|
3807
|
+
Oo as LFilePreview,
|
|
3808
|
+
ba as LFilterPanel,
|
|
3809
|
+
ia as LFixedFooter,
|
|
3810
|
+
Qi as LFormSectionPage,
|
|
3811
|
+
Oa as LFormSubmitPage,
|
|
3812
|
+
Zi as LFormSubmitPageCard,
|
|
3813
|
+
er as LInfoLayout,
|
|
3814
|
+
Qt as LModal,
|
|
3815
|
+
Ji as LPageNotFound,
|
|
3816
|
+
tr as LPageTable,
|
|
3817
|
+
nr as LRoleTree,
|
|
3818
|
+
or as LSecondBar,
|
|
3819
|
+
ar as LSectionBlock,
|
|
3820
|
+
lr as LSignStatusFlow,
|
|
3821
|
+
ir as LUploadFile,
|
|
3822
|
+
rr as LUploadImage
|
|
3823
|
+
};
|