@utogether/components 3.0.0-beta.7 → 3.0.0-beta.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components.css +1 -1
- package/dist/components.es.js +1193 -1193
- package/dist/components.umd.js +1 -1
- package/package.json +1 -1
package/dist/components.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as K, getCurrentInstance as
|
|
1
|
+
import { defineComponent as K, getCurrentInstance as we, computed as ue, resolveComponent as z, createBlock as ie, createElementBlock as L, createCommentVNode as te, openBlock as T, unref as oe, withCtx as Y, Fragment as ae, renderList as se, createTextVNode as rt, toDisplayString as G, createVNode as V, mergeProps as Ce, ref as P, reactive as xe, createElementVNode as $, onMounted as Fe, createSlots as Lt, toHandlers as ct, withDirectives as ve, vModelText as co, normalizeClass as De, renderSlot as Me, pushScopeId as At, popScopeId as Pt, normalizeStyle as ne, useAttrs as dt, nextTick as Re, onUnmounted as Bt, onBeforeMount as Ze, toRaw as Ot, useCssVars as Rt, resolveDirective as uo, withModifiers as Je, vShow as ke, createStaticVNode as fo, toRef as mo, watch as Ue, h as ye } from "vue";
|
|
2
2
|
import { useI18n as Te } from "vue-i18n";
|
|
3
3
|
import { throttle as nt, toDateString as ee, isEmpty as Ye, clone as de, isString as Ve, isFunction as at, isObject as po, timestamp as wt } from "xe-utils";
|
|
4
4
|
import { withInstall as fe, cookies as ge, useRender as Ut, storageLocal as Vt, warnMessage as qe, formatRules as Ne, formatItems as ut, successMessage as Qe, dbstorage as bt, i18nColums as zt, errorMessage as ho, formatGridItems as jt, iconSet as go, lunarCalendar as Ge } from "@utogether/utils";
|
|
@@ -29,79 +29,79 @@ const yo = {
|
|
|
29
29
|
},
|
|
30
30
|
emits: ["tap", "confirm", "cancel"],
|
|
31
31
|
setup(o, { emit: n }) {
|
|
32
|
-
const e = o, t =
|
|
33
|
-
const
|
|
32
|
+
const e = o, t = we().appContext.config.globalProperties.$hasAuthority, { t: l } = Te(), i = ue(() => {
|
|
33
|
+
const D = e == null ? void 0 : e.icon, S = /.*[\u4e00-\u9fa5]+.*$/.test(e.content);
|
|
34
34
|
return {
|
|
35
|
-
icon:
|
|
36
|
-
content:
|
|
35
|
+
icon: D,
|
|
36
|
+
content: S ? e.content : l(`message.btn.${e.content}`)
|
|
37
37
|
};
|
|
38
|
-
}), a = (
|
|
39
|
-
var
|
|
40
|
-
return (
|
|
38
|
+
}), a = () => {
|
|
39
|
+
var D, S, v;
|
|
40
|
+
return (D = e.content) != null && D.toLowerCase().includes("print") ? "ri-printer-line" : (S = e.content) != null && S.toLowerCase().includes("look") ? "ri-eye-line" : (v = e.content) != null && v.toLowerCase().includes("del") ? "ri-delete-bin-line" : "ri-edit-box-line";
|
|
41
41
|
}, c = nt(() => {
|
|
42
|
-
|
|
42
|
+
N("confirm");
|
|
43
43
|
}, 3e3), u = () => {
|
|
44
|
-
|
|
44
|
+
N("cancel");
|
|
45
45
|
}, p = nt(() => {
|
|
46
|
-
e.disabled || e.auth && !t(e.auth) ||
|
|
47
|
-
}, 3e3), d = nt((
|
|
48
|
-
|
|
49
|
-
}, 2e3),
|
|
50
|
-
return (
|
|
51
|
-
const
|
|
52
|
-
return
|
|
46
|
+
e.disabled || e.auth && !t(e.auth) || N("tap");
|
|
47
|
+
}, 3e3), d = nt((D) => {
|
|
48
|
+
D.disabled || D.auth && !t(D.auth) || N("tap");
|
|
49
|
+
}, 2e3), N = n;
|
|
50
|
+
return (D, S) => {
|
|
51
|
+
const v = z("vxe-button"), r = z("el-popconfirm");
|
|
52
|
+
return D.children.length ? (T(), ie(v, {
|
|
53
53
|
key: 0,
|
|
54
|
-
disabled:
|
|
55
|
-
status:
|
|
54
|
+
disabled: D.auth && !oe(t)(D.auth) || D.disabled,
|
|
55
|
+
status: D.status,
|
|
56
56
|
transfer: ""
|
|
57
57
|
}, {
|
|
58
58
|
default: Y(() => [
|
|
59
|
-
rt(G(
|
|
59
|
+
rt(G(i.value.content), 1)
|
|
60
60
|
]),
|
|
61
61
|
dropdowns: Y(() => [
|
|
62
|
-
(
|
|
63
|
-
key:
|
|
64
|
-
disabled:
|
|
65
|
-
status:
|
|
66
|
-
content:
|
|
67
|
-
icon: `${
|
|
68
|
-
mode:
|
|
69
|
-
onClick: (y) =>
|
|
62
|
+
(T(!0), L(ae, null, se(D.children, (M) => (T(), ie(v, {
|
|
63
|
+
key: M.code,
|
|
64
|
+
disabled: M.auth && !oe(t)(M.auth) || M.disabled,
|
|
65
|
+
status: M.status || "primary",
|
|
66
|
+
content: M.content,
|
|
67
|
+
icon: `${M.icon || a()} ri-1x`,
|
|
68
|
+
mode: M.mode || "button",
|
|
69
|
+
onClick: (y) => oe(d)(M)
|
|
70
70
|
}, null, 8, ["disabled", "status", "content", "icon", "mode", "onClick"]))), 128))
|
|
71
71
|
]),
|
|
72
72
|
_: 1
|
|
73
|
-
}, 8, ["disabled", "status"])) :
|
|
74
|
-
V(
|
|
75
|
-
"confirm-button-text":
|
|
76
|
-
"cancel-button-text":
|
|
73
|
+
}, 8, ["disabled", "status"])) : D.type === "pop" && !D.visible ? (T(), L("div", yo, [
|
|
74
|
+
V(r, Ce({
|
|
75
|
+
"confirm-button-text": D.$t("message.btn.confirm"),
|
|
76
|
+
"cancel-button-text": D.$t("message.btn.cancel"),
|
|
77
77
|
"icon-color": "#E6A23C",
|
|
78
78
|
teleported: !1,
|
|
79
|
-
title:
|
|
80
|
-
},
|
|
81
|
-
onConfirm:
|
|
79
|
+
title: D.title
|
|
80
|
+
}, D.confirmProps, {
|
|
81
|
+
onConfirm: oe(c),
|
|
82
82
|
onCancel: u
|
|
83
83
|
}), {
|
|
84
84
|
reference: Y(() => [
|
|
85
|
-
V(
|
|
86
|
-
disabled:
|
|
87
|
-
status:
|
|
88
|
-
type:
|
|
89
|
-
content:
|
|
90
|
-
icon: `${
|
|
91
|
-
loading:
|
|
85
|
+
V(v, {
|
|
86
|
+
disabled: D.auth && !oe(t)(D.auth) || D.disabled,
|
|
87
|
+
status: D.status,
|
|
88
|
+
type: D.type,
|
|
89
|
+
content: i.value.content,
|
|
90
|
+
icon: `${i.value.icon || a()} ri-1x`,
|
|
91
|
+
loading: D.loading
|
|
92
92
|
}, null, 8, ["disabled", "status", "type", "content", "icon", "loading"])
|
|
93
93
|
]),
|
|
94
94
|
_: 1
|
|
95
95
|
}, 16, ["confirm-button-text", "cancel-button-text", "title", "onConfirm"])
|
|
96
|
-
])) :
|
|
96
|
+
])) : D.visible ? te("", !0) : (T(), ie(v, {
|
|
97
97
|
key: 2,
|
|
98
|
-
disabled:
|
|
99
|
-
status:
|
|
98
|
+
disabled: D.auth && !oe(t)(D.auth) || D.disabled,
|
|
99
|
+
status: D.status,
|
|
100
100
|
mode: "button",
|
|
101
|
-
content:
|
|
102
|
-
icon: `${
|
|
103
|
-
loading:
|
|
104
|
-
onClick:
|
|
101
|
+
content: i.value.content,
|
|
102
|
+
icon: `${i.value.icon || a()} ri-1x`,
|
|
103
|
+
loading: D.loading,
|
|
104
|
+
onClick: oe(p)
|
|
105
105
|
}, null, 8, ["disabled", "status", "content", "icon", "loading", "onClick"]));
|
|
106
106
|
};
|
|
107
107
|
}
|
|
@@ -126,7 +126,7 @@ const yo = {
|
|
|
126
126
|
},
|
|
127
127
|
emits: ["clear", "change"],
|
|
128
128
|
setup(o, { emit: n }) {
|
|
129
|
-
const e = o, t =
|
|
129
|
+
const e = o, t = we().appContext.config.globalProperties.$serviceApi, l = 600, i = P(!1), a = P(l), c = P(""), u = xe({
|
|
130
130
|
loading: !1,
|
|
131
131
|
border: !0,
|
|
132
132
|
pagerConfig: {},
|
|
@@ -144,21 +144,21 @@ const yo = {
|
|
|
144
144
|
},
|
|
145
145
|
ajax: {
|
|
146
146
|
query: ({ page: h, form: g }) => {
|
|
147
|
-
const
|
|
148
|
-
let
|
|
147
|
+
const w = ge.get("kCookies_param") ? JSON.parse(ge.get("kCookies_param")) : {};
|
|
148
|
+
let C = Object.assign(
|
|
149
149
|
{},
|
|
150
150
|
g,
|
|
151
|
-
|
|
151
|
+
w,
|
|
152
152
|
e.defaultParams
|
|
153
153
|
);
|
|
154
|
-
if (
|
|
154
|
+
if (C.pageNum = (h == null ? void 0 : h.currentPage) || 1, C.pageSize = (h == null ? void 0 : h.pageSize) || 20, !e.readonly) {
|
|
155
155
|
const { field: k, displayName: I } = e;
|
|
156
|
-
|
|
156
|
+
C[I || k] = e.record[I || k];
|
|
157
157
|
}
|
|
158
|
-
return
|
|
158
|
+
return C = N(C), p.lovType !== "url" ? (C.lovCode = e.code, t.get(
|
|
159
159
|
"/upfm/v1/lovViewHeader/listBySql",
|
|
160
|
-
|
|
161
|
-
)) : t.get(p.lovUrl,
|
|
160
|
+
C
|
|
161
|
+
)) : t.get(p.lovUrl, C);
|
|
162
162
|
}
|
|
163
163
|
}
|
|
164
164
|
},
|
|
@@ -166,25 +166,25 @@ const yo = {
|
|
|
166
166
|
columns: []
|
|
167
167
|
});
|
|
168
168
|
let p, d = [];
|
|
169
|
-
const
|
|
170
|
-
(
|
|
171
|
-
).forEach((
|
|
172
|
-
|
|
173
|
-
h[
|
|
169
|
+
const N = (h) => (d.filter(
|
|
170
|
+
(w) => ["date", "month"].includes(w.fieldType) && w.isSearch
|
|
171
|
+
).forEach((w) => {
|
|
172
|
+
w.fieldType === "date" ? h[w.field] = ee(
|
|
173
|
+
h[w.field],
|
|
174
174
|
"yyyy-MM-dd 00:00:00"
|
|
175
|
-
) :
|
|
176
|
-
}), h),
|
|
177
|
-
const h = de(d, !0).filter((
|
|
175
|
+
) : w.fieldType === "month" && (h[w.field] = ee(h[w.field], "yyyy-MM"));
|
|
176
|
+
}), h), D = () => {
|
|
177
|
+
const h = de(d, !0).filter((C) => C.isSearch === "Y");
|
|
178
178
|
if (!h.length) return;
|
|
179
|
-
const g = h.length > 2,
|
|
180
|
-
field:
|
|
181
|
-
title:
|
|
179
|
+
const g = h.length > 2, w = h.sort((C, k) => C.seqNo - k.seqNo).map((C, k) => ({
|
|
180
|
+
field: C.colField,
|
|
181
|
+
title: C.colTitle,
|
|
182
182
|
span: 8,
|
|
183
183
|
folding: k > 1,
|
|
184
|
-
itemRender:
|
|
184
|
+
itemRender: r(C)
|
|
185
185
|
}));
|
|
186
|
-
|
|
187
|
-
},
|
|
186
|
+
S.collapseNode = g, g ? w.splice(2, 0, S) : w.push(S), u.formConfig.items = w;
|
|
187
|
+
}, S = {
|
|
188
188
|
span: 8,
|
|
189
189
|
align: "right",
|
|
190
190
|
collapseNode: !1,
|
|
@@ -211,56 +211,56 @@ const yo = {
|
|
|
211
211
|
}
|
|
212
212
|
]
|
|
213
213
|
}
|
|
214
|
-
},
|
|
214
|
+
}, v = Ut(), r = (h) => {
|
|
215
215
|
if (["date", "month"].includes(h.fieldType)) {
|
|
216
216
|
const g = h.fieldType === "date" ? "yyyy-MM-dd HH:mm:ss" : "yyyy-MM";
|
|
217
|
-
return
|
|
217
|
+
return v.renderDate({ type: h.fieldType, valueFormat: g });
|
|
218
218
|
} else if (h.fieldType === "dictCode")
|
|
219
|
-
return
|
|
219
|
+
return v.renderDict(h.dictCode);
|
|
220
220
|
return { name: "VxeInput" };
|
|
221
|
-
},
|
|
221
|
+
}, M = () => {
|
|
222
222
|
const h = de(d, !0).filter(
|
|
223
|
-
(
|
|
223
|
+
(w) => w.isCol === "Y"
|
|
224
224
|
), g = h.reduce(
|
|
225
|
-
(
|
|
225
|
+
(w, C) => w + +C.colWidth,
|
|
226
226
|
65
|
|
227
227
|
);
|
|
228
|
-
a.value = g < l ? l : g > 900 ? 900 : g, u.columns = h.sort((
|
|
229
|
-
const
|
|
228
|
+
a.value = g < l ? l : g > 900 ? 900 : g, u.columns = h.sort((w, C) => w.seqNo - C.seqNo).map((w) => {
|
|
229
|
+
const C = w.fieldType, k = ["formatDict", w.dictCode];
|
|
230
230
|
return {
|
|
231
|
-
field:
|
|
232
|
-
title:
|
|
233
|
-
minWidth:
|
|
234
|
-
formatter:
|
|
231
|
+
field: w.colField,
|
|
232
|
+
title: w.colTitle,
|
|
233
|
+
minWidth: w.colWidth,
|
|
234
|
+
formatter: C === "date" ? ["formatDate"] : w.fieldType === "dictCode" ? k : null
|
|
235
235
|
};
|
|
236
236
|
}), e.multiple ? u.columns.unshift({ type: "checkbox", width: 45, align: "center" }) : u.columns.unshift({ type: "radio", width: 45, align: "center" });
|
|
237
237
|
}, y = P(null), F = async () => {
|
|
238
238
|
u.loading = !0;
|
|
239
|
-
const h = "/upfm/v1/lovViewHeader/detailByViewCode", [g,
|
|
239
|
+
const h = "/upfm/v1/lovViewHeader/detailByViewCode", [g, w] = await ft(
|
|
240
240
|
t.get(h, { lovCode: e.code })
|
|
241
241
|
);
|
|
242
|
-
u.loading = !1, g && b(), c.value =
|
|
242
|
+
u.loading = !1, g && b(), c.value = w == null ? void 0 : w.lovTitle, d = w.lineList, p = w, e.autoLoad && y.value.commitProxy("query"), M(), D();
|
|
243
243
|
}, f = () => {
|
|
244
|
-
e.disabled || (F(),
|
|
245
|
-
},
|
|
244
|
+
e.disabled || (F(), i.value = !0);
|
|
245
|
+
}, _ = () => {
|
|
246
246
|
O("clear", "");
|
|
247
|
-
},
|
|
247
|
+
}, x = ({ row: h }) => {
|
|
248
248
|
const g = e.multiple ? [h] : h;
|
|
249
249
|
O("change", g, p.valueField), b();
|
|
250
250
|
}, m = () => {
|
|
251
251
|
const h = y.value, g = e.multiple ? h.getCheckboxRecords() : h.getRadioRecord();
|
|
252
252
|
!Ye(g) && O("change", g, p.valueField), b();
|
|
253
253
|
}, b = () => {
|
|
254
|
-
d.length = 0,
|
|
254
|
+
d.length = 0, i.value = !1;
|
|
255
255
|
}, E = ({ type: h }) => {
|
|
256
256
|
}, O = n;
|
|
257
257
|
return (h, g) => {
|
|
258
|
-
const
|
|
259
|
-
return
|
|
260
|
-
h.mode === "vxe" ? (
|
|
258
|
+
const w = z("vxe-grid"), C = z("vxe-button"), k = z("vxe-modal"), I = z("el-dialog"), U = z("vxe-input");
|
|
259
|
+
return T(), L("div", bo, [
|
|
260
|
+
h.mode === "vxe" ? (T(), ie(k, {
|
|
261
261
|
key: 0,
|
|
262
|
-
modelValue:
|
|
263
|
-
"onUpdate:modelValue": g[0] || (g[0] = (W) =>
|
|
262
|
+
modelValue: i.value,
|
|
263
|
+
"onUpdate:modelValue": g[0] || (g[0] = (W) => i.value = W),
|
|
264
264
|
width: a.value,
|
|
265
265
|
"destroy-on-close": !1,
|
|
266
266
|
title: c.value,
|
|
@@ -272,22 +272,22 @@ const yo = {
|
|
|
272
272
|
"before-hide-method": E
|
|
273
273
|
}, {
|
|
274
274
|
default: Y(() => [
|
|
275
|
-
V(
|
|
275
|
+
V(w, Ce({
|
|
276
276
|
ref_key: "xgrid",
|
|
277
277
|
ref: y
|
|
278
278
|
}, u, {
|
|
279
279
|
resizable: "",
|
|
280
|
-
onCellDblclick:
|
|
280
|
+
onCellDblclick: x
|
|
281
281
|
}), null, 16)
|
|
282
282
|
]),
|
|
283
283
|
footer: Y(() => [
|
|
284
|
-
V(
|
|
284
|
+
V(C, {
|
|
285
285
|
content: h.$t("message.btn.cancel"),
|
|
286
286
|
icon: "ri-close-line",
|
|
287
287
|
status: "warning",
|
|
288
288
|
onClick: b
|
|
289
289
|
}, null, 8, ["content"]),
|
|
290
|
-
V(
|
|
290
|
+
V(C, {
|
|
291
291
|
content: h.$t("message.btn.confirm"),
|
|
292
292
|
icon: "ri-save-3-line",
|
|
293
293
|
status: "primary",
|
|
@@ -295,10 +295,10 @@ const yo = {
|
|
|
295
295
|
}, null, 8, ["content"])
|
|
296
296
|
]),
|
|
297
297
|
_: 1
|
|
298
|
-
}, 8, ["modelValue", "width", "title", "transfer"])) : (
|
|
298
|
+
}, 8, ["modelValue", "width", "title", "transfer"])) : (T(), ie(I, {
|
|
299
299
|
key: 1,
|
|
300
|
-
modelValue:
|
|
301
|
-
"onUpdate:modelValue": g[1] || (g[1] = (W) =>
|
|
300
|
+
modelValue: i.value,
|
|
301
|
+
"onUpdate:modelValue": g[1] || (g[1] = (W) => i.value = W),
|
|
302
302
|
width: a.value,
|
|
303
303
|
"show-close": !1,
|
|
304
304
|
title: c.value,
|
|
@@ -309,23 +309,23 @@ const yo = {
|
|
|
309
309
|
}, {
|
|
310
310
|
default: Y(() => [
|
|
311
311
|
$("div", ko, [
|
|
312
|
-
V(
|
|
312
|
+
V(w, Ce({
|
|
313
313
|
ref_key: "xgrid",
|
|
314
314
|
ref: y
|
|
315
315
|
}, u, {
|
|
316
316
|
resizable: "",
|
|
317
|
-
onCellDblclick:
|
|
317
|
+
onCellDblclick: x
|
|
318
318
|
}), null, 16)
|
|
319
319
|
])
|
|
320
320
|
]),
|
|
321
321
|
footer: Y(() => [
|
|
322
|
-
V(
|
|
322
|
+
V(C, {
|
|
323
323
|
content: h.$t("message.cancel"),
|
|
324
324
|
icon: "ri-close-line",
|
|
325
325
|
status: "warning",
|
|
326
326
|
onClick: b
|
|
327
327
|
}, null, 8, ["content"]),
|
|
328
|
-
V(
|
|
328
|
+
V(C, {
|
|
329
329
|
content: h.$t("message.confirm"),
|
|
330
330
|
icon: "ri-save-3-line",
|
|
331
331
|
status: "primary",
|
|
@@ -344,7 +344,7 @@ const yo = {
|
|
|
344
344
|
type: "search",
|
|
345
345
|
size: "mini",
|
|
346
346
|
onSearchClick: f,
|
|
347
|
-
onClear:
|
|
347
|
+
onClear: _
|
|
348
348
|
}, null, 8, ["modelValue", "clearable", "disabled", "readonly", "placeholder"])
|
|
349
349
|
]);
|
|
350
350
|
};
|
|
@@ -356,8 +356,8 @@ async function $o(o, n) {
|
|
|
356
356
|
const t = await Mo(o);
|
|
357
357
|
let l = document.createElement("canvas");
|
|
358
358
|
l.width = t.naturalWidth, l.height = t.naturalHeight;
|
|
359
|
-
const
|
|
360
|
-
|
|
359
|
+
const i = l.getContext("2d");
|
|
360
|
+
i.drawImage(t, 0, 0, l.width, l.height), l = Wt(l, i, n), l.toBlob((a) => e(a));
|
|
361
361
|
} catch (t) {
|
|
362
362
|
s(t);
|
|
363
363
|
}
|
|
@@ -373,14 +373,14 @@ function Mo(o) {
|
|
|
373
373
|
});
|
|
374
374
|
}
|
|
375
375
|
const Wt = (o, n, e) => {
|
|
376
|
-
const s = e.content.split(","), { textAlign: t, fontSize: l, color:
|
|
377
|
-
n.font = `${l || 22}px Microsoft Yahei`, n.lineWidth = 1, n.fillStyle =
|
|
378
|
-
const
|
|
379
|
-
return s.forEach((
|
|
380
|
-
let
|
|
381
|
-
e.watermarkType === "1" ?
|
|
382
|
-
const
|
|
383
|
-
n.fillText(
|
|
376
|
+
const s = e.content.split(","), { textAlign: t, fontSize: l, color: i, fillOpacity: a, xAxis: c, yAxis: u } = e, p = o.width, d = o.height;
|
|
377
|
+
n.font = `${l || 22}px Microsoft Yahei`, n.lineWidth = 1, n.fillStyle = i || "rgba(255, 255, 255, 1)", n.textAlign = t || "left", n.textBaseline = "middle", n.globalAlpha = Number(a || 1);
|
|
378
|
+
const N = Number(c), D = Number(u);
|
|
379
|
+
return s.forEach((S, v) => {
|
|
380
|
+
let r = l;
|
|
381
|
+
e.watermarkType === "1" ? r = 18 : e.watermarkType === "2" && (r = 16);
|
|
382
|
+
const M = p - S.split("").length * Number(r);
|
|
383
|
+
n.fillText(S, N || M, D || d - Number(r) - v * 25);
|
|
384
384
|
}), o;
|
|
385
385
|
}, To = async (o, n) => {
|
|
386
386
|
let e = await So(o);
|
|
@@ -409,7 +409,7 @@ const Wt = (o, n, e) => {
|
|
|
409
409
|
showTitle: { type: Boolean, default: !0 }
|
|
410
410
|
},
|
|
411
411
|
setup(o) {
|
|
412
|
-
const n = o, e = P(null), s =
|
|
412
|
+
const n = o, e = P(null), s = we(), t = s.appContext.config.globalProperties.$serviceApi, l = s.appContext.config.globalProperties.$viewerApi, i = s.appContext.config.globalProperties.$url, a = s.appContext.config.globalProperties.$mode, c = "/ufil/v1/attachment", u = ["png", "jpg", "jpeg", "webp", "gif"];
|
|
413
413
|
let p;
|
|
414
414
|
const d = [
|
|
415
415
|
{ field: "fileName", title: "message.fileName" },
|
|
@@ -422,7 +422,7 @@ const Wt = (o, n, e) => {
|
|
|
422
422
|
slots: { default: "operate" },
|
|
423
423
|
width: 180
|
|
424
424
|
}
|
|
425
|
-
],
|
|
425
|
+
], N = [
|
|
426
426
|
"xlsx",
|
|
427
427
|
"xls",
|
|
428
428
|
"docx",
|
|
@@ -437,7 +437,7 @@ const Wt = (o, n, e) => {
|
|
|
437
437
|
"zip",
|
|
438
438
|
"rar",
|
|
439
439
|
"svg"
|
|
440
|
-
],
|
|
440
|
+
], D = xe({
|
|
441
441
|
border: !0,
|
|
442
442
|
loading: !1,
|
|
443
443
|
maxHeight: n.maxHeight,
|
|
@@ -451,17 +451,17 @@ const Wt = (o, n, e) => {
|
|
|
451
451
|
},
|
|
452
452
|
importConfig: {
|
|
453
453
|
remote: !0,
|
|
454
|
-
types:
|
|
454
|
+
types: N,
|
|
455
455
|
modes: ["insert"],
|
|
456
456
|
// 自定义服务端导入
|
|
457
457
|
async importMethod({ file: y }) {
|
|
458
458
|
const F = y.name.split(".").pop();
|
|
459
459
|
let f = y;
|
|
460
460
|
n.watermarkCode && p.watermarkTrigger === "upload" && u.includes(F) && (f = await $o(y, p));
|
|
461
|
-
const
|
|
462
|
-
|
|
461
|
+
const _ = new FormData(), x = e.value;
|
|
462
|
+
_.append("file", f);
|
|
463
463
|
const m = { "Content-Type": "multipart/form-data" };
|
|
464
|
-
return t.post("/ufil/file/uploadMultipart",
|
|
464
|
+
return t.post("/ufil/file/uploadMultipart", _, { headers: m }).then(async (b) => {
|
|
465
465
|
const E = {
|
|
466
466
|
realpath: b,
|
|
467
467
|
fileName: y.name,
|
|
@@ -470,7 +470,7 @@ const Wt = (o, n, e) => {
|
|
|
470
470
|
sourceTable: n.sourceTable,
|
|
471
471
|
sourceId: n.sourceId
|
|
472
472
|
};
|
|
473
|
-
await t.post(c, [E]),
|
|
473
|
+
await t.post(c, [E]), x.commitProxy("query");
|
|
474
474
|
}).catch(() => {
|
|
475
475
|
Ie.modal.message({
|
|
476
476
|
content: "导入失败,请检查数据是否正确!",
|
|
@@ -489,66 +489,66 @@ const Wt = (o, n, e) => {
|
|
|
489
489
|
}
|
|
490
490
|
},
|
|
491
491
|
columns: d
|
|
492
|
-
}),
|
|
492
|
+
}), S = async (y) => {
|
|
493
493
|
try {
|
|
494
|
-
|
|
494
|
+
D.loading = !0, await t.delete(c, [y]), e.value.commitProxy("query");
|
|
495
495
|
} finally {
|
|
496
|
-
|
|
496
|
+
D.loading = !1;
|
|
497
497
|
}
|
|
498
|
-
},
|
|
498
|
+
}, v = async () => {
|
|
499
499
|
const F = await t.get("/upms/v1/watermark/selectByCode", {
|
|
500
500
|
watermarkCode: n.watermarkCode
|
|
501
501
|
});
|
|
502
502
|
p = F == null ? void 0 : F.list[0], p.watermarkType === "1" ? p.content = ee(/* @__PURE__ */ new Date(), "yyyy-MM-dd") : p.watermarkType === "2" ? p.content = ee(/* @__PURE__ */ new Date(), "yyyy-MM-dd HH:mm:ss") : p.watermarkType === "0" && (p.content = "");
|
|
503
|
-
},
|
|
503
|
+
}, r = async () => {
|
|
504
504
|
const y = e.value.getData().filter((f) => u.includes(f.fileExtend)), F = [];
|
|
505
505
|
(p == null ? void 0 : p.watermarkTrigger) == "preview" ? await y.forEachSync(async (f) => {
|
|
506
|
-
const
|
|
507
|
-
F.push({ src:
|
|
506
|
+
const _ = `${i}/ufil${f.realpath}}`, x = await To(_, p);
|
|
507
|
+
F.push({ src: x, "data-source": x });
|
|
508
508
|
}) : y.forEach((f) => {
|
|
509
|
-
const
|
|
510
|
-
console.log(
|
|
509
|
+
const _ = `${i}/ufil${f.realpath}`;
|
|
510
|
+
console.log(_), F.push({ src: _, "data-source": _ });
|
|
511
511
|
}), l({ options: { toolbar: !0, url: "data-source" }, images: F });
|
|
512
|
-
},
|
|
513
|
-
const F =
|
|
512
|
+
}, M = (y) => {
|
|
513
|
+
const F = i + "/ufil" + y.realpath, f = document.createElement("a");
|
|
514
514
|
f.style.display = "none";
|
|
515
|
-
const
|
|
516
|
-
f.href = F, f.setAttribute("download",
|
|
515
|
+
const _ = y.fileName.split(".");
|
|
516
|
+
f.href = F, f.setAttribute("download", _[0]), document.body.appendChild(f), f.click(), document.body.removeChild(f);
|
|
517
517
|
};
|
|
518
518
|
return Array.prototype.forEachSync = async function(y) {
|
|
519
519
|
for (const [F, f] of Object.entries(this))
|
|
520
520
|
await y(f, F, this);
|
|
521
521
|
}, Fe(() => {
|
|
522
|
-
n.watermarkCode &&
|
|
522
|
+
n.watermarkCode && v();
|
|
523
523
|
}), (y, F) => {
|
|
524
|
-
const f = z("ut-divider"),
|
|
525
|
-
return
|
|
526
|
-
V(
|
|
524
|
+
const f = z("ut-divider"), _ = z("ut-button"), x = z("vxe-grid");
|
|
525
|
+
return T(), L("div", Eo, [
|
|
526
|
+
V(x, Ce({
|
|
527
527
|
ref_key: "xGrid",
|
|
528
528
|
ref: e
|
|
529
|
-
},
|
|
529
|
+
}, D), Lt({
|
|
530
530
|
operate: Y(({ row: m }) => [
|
|
531
531
|
$("div", No, [
|
|
532
|
-
V(
|
|
532
|
+
V(_, {
|
|
533
533
|
disabled: y.dataStatus === "detail",
|
|
534
534
|
auth: y.permissionPreFix + "Del",
|
|
535
535
|
status: "danger",
|
|
536
536
|
icon: "ri-delete-bin-5-fill",
|
|
537
537
|
content: "delete",
|
|
538
|
-
onTap: (b) =>
|
|
538
|
+
onTap: (b) => S(m)
|
|
539
539
|
}, null, 8, ["disabled", "auth", "onTap"]),
|
|
540
|
-
["png", "jpeg", "jpg"].includes(m.fileExtend) ? (
|
|
540
|
+
["png", "jpeg", "jpg"].includes(m.fileExtend) ? (T(), ie(_, {
|
|
541
541
|
key: 0,
|
|
542
542
|
auth: y.permissionPreFix + "Preview",
|
|
543
543
|
icon: "ri-search-line",
|
|
544
544
|
content: "preview",
|
|
545
|
-
onTap: F[0] || (F[0] = (b) =>
|
|
546
|
-
}, null, 8, ["auth"])) : (
|
|
545
|
+
onTap: F[0] || (F[0] = (b) => r())
|
|
546
|
+
}, null, 8, ["auth"])) : (T(), ie(_, {
|
|
547
547
|
key: 1,
|
|
548
548
|
auth: y.permissionPreFix + "Download",
|
|
549
549
|
icon: "ri-download-2-fill",
|
|
550
550
|
content: "download",
|
|
551
|
-
onTap: (b) =>
|
|
551
|
+
onTap: (b) => M(m)
|
|
552
552
|
}, null, 8, ["auth", "onTap"]))
|
|
553
553
|
])
|
|
554
554
|
]),
|
|
@@ -639,49 +639,49 @@ J.abs = function() {
|
|
|
639
639
|
return o.s = 1, o;
|
|
640
640
|
};
|
|
641
641
|
J.cmp = function(o) {
|
|
642
|
-
var n, e = this, s = e.c, t = (o = new e.constructor(o)).c, l = e.s,
|
|
643
|
-
if (!s[0] || !t[0]) return s[0] ? l : t[0] ? -
|
|
644
|
-
if (l !=
|
|
642
|
+
var n, e = this, s = e.c, t = (o = new e.constructor(o)).c, l = e.s, i = o.s, a = e.e, c = o.e;
|
|
643
|
+
if (!s[0] || !t[0]) return s[0] ? l : t[0] ? -i : 0;
|
|
644
|
+
if (l != i) return l;
|
|
645
645
|
if (n = l < 0, a != c) return a > c ^ n ? 1 : -1;
|
|
646
|
-
for (
|
|
646
|
+
for (i = (a = s.length) < (c = t.length) ? a : c, l = -1; ++l < i; )
|
|
647
647
|
if (s[l] != t[l]) return s[l] > t[l] ^ n ? 1 : -1;
|
|
648
648
|
return a == c ? 0 : a > c ^ n ? 1 : -1;
|
|
649
649
|
};
|
|
650
650
|
J.div = function(o) {
|
|
651
|
-
var n = this, e = n.constructor, s = n.c, t = (o = new e(o)).c, l = n.s == o.s ? 1 : -1,
|
|
652
|
-
if (
|
|
651
|
+
var n = this, e = n.constructor, s = n.c, t = (o = new e(o)).c, l = n.s == o.s ? 1 : -1, i = e.DP;
|
|
652
|
+
if (i !== ~~i || i < 0 || i > ze)
|
|
653
653
|
throw Error(et);
|
|
654
654
|
if (!t[0])
|
|
655
655
|
throw Error(Yt);
|
|
656
656
|
if (!s[0])
|
|
657
657
|
return o.s = l, o.c = [o.e = 0], o;
|
|
658
|
-
var a, c, u, p, d,
|
|
659
|
-
for (
|
|
658
|
+
var a, c, u, p, d, N = t.slice(), D = a = t.length, S = s.length, v = s.slice(0, a), r = v.length, M = o, y = M.c = [], F = 0, f = i + (M.e = n.e - o.e) + 1;
|
|
659
|
+
for (M.s = l, l = f < 0 ? 0 : f, N.unshift(0); r++ < a; ) v.push(0);
|
|
660
660
|
do {
|
|
661
661
|
for (u = 0; u < 10; u++) {
|
|
662
|
-
if (a != (
|
|
663
|
-
p = a >
|
|
662
|
+
if (a != (r = v.length))
|
|
663
|
+
p = a > r ? 1 : -1;
|
|
664
664
|
else
|
|
665
665
|
for (d = -1, p = 0; ++d < a; )
|
|
666
|
-
if (t[d] !=
|
|
667
|
-
p = t[d] >
|
|
666
|
+
if (t[d] != v[d]) {
|
|
667
|
+
p = t[d] > v[d] ? 1 : -1;
|
|
668
668
|
break;
|
|
669
669
|
}
|
|
670
670
|
if (p < 0) {
|
|
671
|
-
for (c =
|
|
672
|
-
if (
|
|
673
|
-
for (d =
|
|
674
|
-
--
|
|
671
|
+
for (c = r == a ? t : N; r; ) {
|
|
672
|
+
if (v[--r] < c[r]) {
|
|
673
|
+
for (d = r; d && !v[--d]; ) v[d] = 9;
|
|
674
|
+
--v[d], v[r] += 10;
|
|
675
675
|
}
|
|
676
|
-
|
|
676
|
+
v[r] -= c[r];
|
|
677
677
|
}
|
|
678
|
-
for (; !
|
|
678
|
+
for (; !v[0]; ) v.shift();
|
|
679
679
|
} else
|
|
680
680
|
break;
|
|
681
681
|
}
|
|
682
|
-
y[F++] = p ? u : ++u,
|
|
683
|
-
} while ((
|
|
684
|
-
return !y[0] && F != 1 && (y.shift(),
|
|
682
|
+
y[F++] = p ? u : ++u, v[0] && p ? v[r] = s[D] || 0 : v = [s[D]];
|
|
683
|
+
} while ((D++ < S || v[0] !== _e) && l--);
|
|
684
|
+
return !y[0] && F != 1 && (y.shift(), M.e--, f--), F > f && Ae(M, f, e.RM, v[0] !== _e), M;
|
|
685
685
|
};
|
|
686
686
|
J.eq = function(o) {
|
|
687
687
|
return this.cmp(o) === 0;
|
|
@@ -699,14 +699,14 @@ J.lte = function(o) {
|
|
|
699
699
|
return this.cmp(o) < 1;
|
|
700
700
|
};
|
|
701
701
|
J.minus = J.sub = function(o) {
|
|
702
|
-
var n, e, s, t, l = this,
|
|
702
|
+
var n, e, s, t, l = this, i = l.constructor, a = l.s, c = (o = new i(o)).s;
|
|
703
703
|
if (a != c)
|
|
704
704
|
return o.s = -c, l.plus(o);
|
|
705
|
-
var u = l.c.slice(), p = l.e, d = o.c,
|
|
705
|
+
var u = l.c.slice(), p = l.e, d = o.c, N = o.e;
|
|
706
706
|
if (!u[0] || !d[0])
|
|
707
|
-
return d[0] ? o.s = -c : u[0] ? o = new
|
|
708
|
-
if (a = p -
|
|
709
|
-
for ((t = a < 0) ? (a = -a, s = u) : (
|
|
707
|
+
return d[0] ? o.s = -c : u[0] ? o = new i(l) : o.s = 1, o;
|
|
708
|
+
if (a = p - N) {
|
|
709
|
+
for ((t = a < 0) ? (a = -a, s = u) : (N = p, s = d), s.reverse(), c = a; c--; ) s.push(0);
|
|
710
710
|
s.reverse();
|
|
711
711
|
} else
|
|
712
712
|
for (e = ((t = u.length < d.length) ? u : d).length, a = c = 0; c < e; c++)
|
|
@@ -724,8 +724,8 @@ J.minus = J.sub = function(o) {
|
|
|
724
724
|
}
|
|
725
725
|
for (; u[--c] === 0; ) u.pop();
|
|
726
726
|
for (; u[0] === 0; )
|
|
727
|
-
u.shift(), --
|
|
728
|
-
return u[0] || (o.s = 1, u = [
|
|
727
|
+
u.shift(), --N;
|
|
728
|
+
return u[0] || (o.s = 1, u = [N = 0]), o.c = u, o.e = N, o;
|
|
729
729
|
};
|
|
730
730
|
J.mod = function(o) {
|
|
731
731
|
var n, e = this, s = e.constructor, t = e.s, l = (o = new s(o)).s;
|
|
@@ -741,11 +741,11 @@ J.plus = J.add = function(o) {
|
|
|
741
741
|
var n, e, s, t = this, l = t.constructor;
|
|
742
742
|
if (o = new l(o), t.s != o.s)
|
|
743
743
|
return o.s = -o.s, t.minus(o);
|
|
744
|
-
var
|
|
744
|
+
var i = t.e, a = t.c, c = o.e, u = o.c;
|
|
745
745
|
if (!a[0] || !u[0])
|
|
746
746
|
return u[0] || (a[0] ? o = new l(t) : o.s = t.s), o;
|
|
747
|
-
if (a = a.slice(), n =
|
|
748
|
-
for (n > 0 ? (c =
|
|
747
|
+
if (a = a.slice(), n = i - c) {
|
|
748
|
+
for (n > 0 ? (c = i, s = u) : (n = -n, s = a), s.reverse(); n--; ) s.push(0);
|
|
749
749
|
s.reverse();
|
|
750
750
|
}
|
|
751
751
|
for (a.length - u.length < 0 && (s = u, u = a, a = s), n = u.length, e = 0; n; a[n] %= 10) e = (a[--n] = a[n] + u[n] + e) / 10 | 0;
|
|
@@ -772,23 +772,23 @@ J.round = function(o, n) {
|
|
|
772
772
|
return Ae(new this.constructor(this), o + this.e + 1, n);
|
|
773
773
|
};
|
|
774
774
|
J.sqrt = function() {
|
|
775
|
-
var o, n, e, s = this, t = s.constructor, l = s.s,
|
|
775
|
+
var o, n, e, s = this, t = s.constructor, l = s.s, i = s.e, a = new t("0.5");
|
|
776
776
|
if (!s.c[0]) return new t(s);
|
|
777
777
|
if (l < 0)
|
|
778
778
|
throw Error(He + "No square root");
|
|
779
|
-
l = Math.sqrt(s + ""), l === 0 || l === 1 / 0 ? (n = s.c.join(""), n.length +
|
|
779
|
+
l = Math.sqrt(s + ""), l === 0 || l === 1 / 0 ? (n = s.c.join(""), n.length + i & 1 || (n += "0"), l = Math.sqrt(n), i = ((i + 1) / 2 | 0) - (i < 0 || i & 1), o = new t((l == 1 / 0 ? "5e" : (l = l.toExponential()).slice(0, l.indexOf("e") + 1)) + i)) : o = new t(l + ""), i = o.e + (t.DP += 4);
|
|
780
780
|
do
|
|
781
781
|
e = o, o = a.times(e.plus(s.div(e)));
|
|
782
|
-
while (e.c.slice(0,
|
|
782
|
+
while (e.c.slice(0, i).join("") !== o.c.slice(0, i).join(""));
|
|
783
783
|
return Ae(o, (t.DP -= 4) + o.e + 1, t.RM);
|
|
784
784
|
};
|
|
785
785
|
J.times = J.mul = function(o) {
|
|
786
|
-
var n, e = this, s = e.constructor, t = e.c, l = (o = new s(o)).c,
|
|
786
|
+
var n, e = this, s = e.constructor, t = e.c, l = (o = new s(o)).c, i = t.length, a = l.length, c = e.e, u = o.e;
|
|
787
787
|
if (o.s = e.s == o.s ? 1 : -1, !t[0] || !l[0])
|
|
788
788
|
return o.c = [o.e = 0], o;
|
|
789
|
-
for (o.e = c + u,
|
|
789
|
+
for (o.e = c + u, i < a && (n = t, t = l, l = n, u = i, i = a, a = u), n = new Array(u = i + a); u--; ) n[u] = 0;
|
|
790
790
|
for (c = a; c--; ) {
|
|
791
|
-
for (a = 0, u =
|
|
791
|
+
for (a = 0, u = i + c; u > c; )
|
|
792
792
|
a = n[u] + l[c] * t[u - c - 1] + a, n[u--] = a % 10, a = a / 10 | 0;
|
|
793
793
|
n[u] = a;
|
|
794
794
|
}
|
|
@@ -854,20 +854,20 @@ const qo = ["onUpdate:modelValue"], Ho = { key: 3 }, Go = { key: 4 }, Xo = {
|
|
|
854
854
|
},
|
|
855
855
|
emits: ["close"],
|
|
856
856
|
setup(o, { emit: n }) {
|
|
857
|
-
const e = o, t =
|
|
858
|
-
let a =
|
|
857
|
+
const e = o, t = we().appContext.config.globalProperties.$serviceApi, { t: l } = Te(), i = P(!1);
|
|
858
|
+
let a = xe({
|
|
859
859
|
filename: "数据模板",
|
|
860
860
|
errorField: "errorMsg",
|
|
861
861
|
errListField: "list"
|
|
862
862
|
});
|
|
863
863
|
const c = Vt.getItem("kLov"), u = () => {
|
|
864
|
-
const
|
|
864
|
+
const C = e.columns.map((I) => (I.slots = { default: I.field }, I.title = I.field, I)), k = {
|
|
865
865
|
type: "checkbox",
|
|
866
866
|
width: 40,
|
|
867
867
|
align: "center",
|
|
868
868
|
fixed: "left"
|
|
869
869
|
};
|
|
870
|
-
return
|
|
870
|
+
return C.unshift(k), C;
|
|
871
871
|
}, p = P({ pageSize: 200, currentPage: 1, total: 0 }), d = [
|
|
872
872
|
"Sizes",
|
|
873
873
|
"PrevJump",
|
|
@@ -877,11 +877,11 @@ const qo = ["onUpdate:modelValue"], Ho = { key: 3 }, Go = { key: 4 }, Xo = {
|
|
|
877
877
|
"NextJump",
|
|
878
878
|
"FullJump",
|
|
879
879
|
"Total"
|
|
880
|
-
],
|
|
881
|
-
let
|
|
882
|
-
const
|
|
880
|
+
], N = window.innerHeight - 90, D = P();
|
|
881
|
+
let S = [];
|
|
882
|
+
const r = xe({
|
|
883
883
|
border: !0,
|
|
884
|
-
height:
|
|
884
|
+
height: N,
|
|
885
885
|
data: [],
|
|
886
886
|
importConfig: {
|
|
887
887
|
mode: "covering",
|
|
@@ -933,9 +933,9 @@ const qo = ["onUpdate:modelValue"], Ho = { key: 3 }, Go = { key: 4 }, Xo = {
|
|
|
933
933
|
]
|
|
934
934
|
},
|
|
935
935
|
columns: u()
|
|
936
|
-
}),
|
|
937
|
-
toolbarButtonClick({ code:
|
|
938
|
-
switch (
|
|
936
|
+
}), M = {
|
|
937
|
+
toolbarButtonClick({ code: C }) {
|
|
938
|
+
switch (C) {
|
|
939
939
|
case "import_plus": {
|
|
940
940
|
y();
|
|
941
941
|
break;
|
|
@@ -949,15 +949,15 @@ const qo = ["onUpdate:modelValue"], Ho = { key: 3 }, Go = { key: 4 }, Xo = {
|
|
|
949
949
|
break;
|
|
950
950
|
}
|
|
951
951
|
case "export_plus": {
|
|
952
|
-
|
|
952
|
+
x();
|
|
953
953
|
break;
|
|
954
954
|
}
|
|
955
955
|
}
|
|
956
956
|
},
|
|
957
|
-
toolbarToolClick({ code:
|
|
958
|
-
switch (
|
|
957
|
+
toolbarToolClick({ code: C }) {
|
|
958
|
+
switch (C) {
|
|
959
959
|
case "replay": {
|
|
960
|
-
|
|
960
|
+
w();
|
|
961
961
|
break;
|
|
962
962
|
}
|
|
963
963
|
case "question": {
|
|
@@ -967,44 +967,44 @@ const qo = ["onUpdate:modelValue"], Ho = { key: 3 }, Go = { key: 4 }, Xo = {
|
|
|
967
967
|
}
|
|
968
968
|
}
|
|
969
969
|
}, y = () => {
|
|
970
|
-
var
|
|
971
|
-
|
|
970
|
+
var C;
|
|
971
|
+
S = [], (C = D.value) == null || C.openImport();
|
|
972
972
|
};
|
|
973
|
-
function F(
|
|
974
|
-
|
|
973
|
+
function F(C) {
|
|
974
|
+
S = C.$table.getTableData().fullData, u().filter(
|
|
975
975
|
(I) => !I.type && I.mapField !== e.options.errorField
|
|
976
976
|
).forEach((I) => {
|
|
977
|
-
const U =
|
|
978
|
-
U !== -1 &&
|
|
977
|
+
const U = S.findIndex((W) => W[I.field] === I.field);
|
|
978
|
+
U !== -1 && S.splice(U, 1);
|
|
979
979
|
}), e.columns.forEach((I) => {
|
|
980
|
-
(I.dateFormatter || I.valueType === "number") &&
|
|
980
|
+
(I.dateFormatter || I.valueType === "number") && S.forEach((U) => {
|
|
981
981
|
I.dateFormatter ? U[I.field] = ee(
|
|
982
982
|
U[I.field],
|
|
983
983
|
I.dateFormatter || "yyyy-MM-dd HH:mm:ss"
|
|
984
984
|
) : U[I.field] = Yo(U[I.field]).toFixed(I.decimal || 6);
|
|
985
985
|
});
|
|
986
|
-
}), p.value.total =
|
|
986
|
+
}), p.value.total = S.length, f();
|
|
987
987
|
}
|
|
988
988
|
const f = () => {
|
|
989
|
-
const { currentPage:
|
|
990
|
-
|
|
991
|
-
(I, U) => U < k *
|
|
989
|
+
const { currentPage: C, pageSize: k } = p.value;
|
|
990
|
+
r.data = S.filter(
|
|
991
|
+
(I, U) => U < k * C && U >= k * (C - 1)
|
|
992
992
|
);
|
|
993
|
-
},
|
|
994
|
-
currentPage:
|
|
993
|
+
}, _ = ({
|
|
994
|
+
currentPage: C,
|
|
995
995
|
pageSize: k
|
|
996
996
|
}) => {
|
|
997
|
-
p.value.currentPage =
|
|
998
|
-
},
|
|
997
|
+
p.value.currentPage = C, p.value.pageSize = k, f();
|
|
998
|
+
}, x = () => {
|
|
999
999
|
var I;
|
|
1000
|
-
const
|
|
1000
|
+
const C = [];
|
|
1001
1001
|
if (e.templateData.length)
|
|
1002
|
-
|
|
1002
|
+
C.push(...e.templateData);
|
|
1003
1003
|
else {
|
|
1004
1004
|
const U = {};
|
|
1005
1005
|
u().filter((W) => W.type !== "checkbox").forEach((W) => {
|
|
1006
1006
|
U[W.field] = "案例";
|
|
1007
|
-
}),
|
|
1007
|
+
}), C.push(U);
|
|
1008
1008
|
}
|
|
1009
1009
|
const k = {
|
|
1010
1010
|
filename: a.filename,
|
|
@@ -1012,17 +1012,17 @@ const qo = ["onUpdate:modelValue"], Ho = { key: 3 }, Go = { key: 4 }, Xo = {
|
|
|
1012
1012
|
columns: u().filter(
|
|
1013
1013
|
(U) => U.mapField !== a.errorField && U.type !== "checkbox"
|
|
1014
1014
|
),
|
|
1015
|
-
data:
|
|
1015
|
+
data: C
|
|
1016
1016
|
};
|
|
1017
|
-
(I =
|
|
1017
|
+
(I = D.value) == null || I.exportData(k);
|
|
1018
1018
|
}, m = async () => {
|
|
1019
|
-
if (!
|
|
1019
|
+
if (!S.length)
|
|
1020
1020
|
return qe(l("message.importEmpty"));
|
|
1021
1021
|
if (await Ie.modal.confirm(l("message.importRecord")) === "confirm") {
|
|
1022
|
-
|
|
1022
|
+
r.loading = !0;
|
|
1023
1023
|
const { url: k } = e;
|
|
1024
|
-
O("toSave"), t.post(k,
|
|
1025
|
-
(I == null ? void 0 : I.status) === "error" || I != null && I.length ? (
|
|
1024
|
+
O("toSave"), t.post(k, S).then((I) => {
|
|
1025
|
+
(I == null ? void 0 : I.status) === "error" || I != null && I.length ? (i.value = !0, E(
|
|
1026
1026
|
I != null && I.length ? I : I[a.errListField || e.sourceList]
|
|
1027
1027
|
), Ie.modal.message({
|
|
1028
1028
|
content: l("message.importFailed"),
|
|
@@ -1030,53 +1030,53 @@ const qo = ["onUpdate:modelValue"], Ho = { key: 3 }, Go = { key: 4 }, Xo = {
|
|
|
1030
1030
|
})) : (Ie.modal.message({
|
|
1031
1031
|
content: l("message.importSuccess"),
|
|
1032
1032
|
status: "success"
|
|
1033
|
-
}),
|
|
1033
|
+
}), w());
|
|
1034
1034
|
}).finally(() => {
|
|
1035
|
-
|
|
1035
|
+
i.value = !1, r.loading = !1;
|
|
1036
1036
|
});
|
|
1037
1037
|
}
|
|
1038
1038
|
}, b = () => {
|
|
1039
1039
|
var k;
|
|
1040
|
-
const
|
|
1041
|
-
if (!(
|
|
1040
|
+
const C = (k = D.value) == null ? void 0 : k.getCheckboxRecords();
|
|
1041
|
+
if (!(C != null && C.length))
|
|
1042
1042
|
return Ie.modal.message({
|
|
1043
1043
|
content: l("message.selectedRecord"),
|
|
1044
1044
|
status: "warning"
|
|
1045
1045
|
});
|
|
1046
|
-
|
|
1047
|
-
const U =
|
|
1046
|
+
C.forEach((I) => {
|
|
1047
|
+
const U = S.findIndex(
|
|
1048
1048
|
(W) => W._X_ROW_KEY === I._X_ROW_KEY
|
|
1049
1049
|
);
|
|
1050
|
-
U !== -1 &&
|
|
1051
|
-
}),
|
|
1052
|
-
}, E = (
|
|
1053
|
-
p.value.total =
|
|
1054
|
-
}, O = (
|
|
1055
|
-
|
|
1056
|
-
if (
|
|
1050
|
+
U !== -1 && S.splice(U, 1);
|
|
1051
|
+
}), r.data = S;
|
|
1052
|
+
}, E = (C) => {
|
|
1053
|
+
p.value.total = C.length, S = C.map((k, I) => (k._X_ROW_KEY = I, k)), O("toShow"), f();
|
|
1054
|
+
}, O = (C) => {
|
|
1055
|
+
r.columns.forEach((k) => {
|
|
1056
|
+
if (C === "toSave") {
|
|
1057
1057
|
const I = ge.get("kCookies_param") ? JSON.parse(ge.get("kCookies_param")) : {};
|
|
1058
|
-
|
|
1058
|
+
S.forEach((U) => {
|
|
1059
1059
|
U[k.mapField] = U[k.field], Object.assign(U, I, e.defaultParams);
|
|
1060
1060
|
});
|
|
1061
1061
|
} else
|
|
1062
|
-
|
|
1062
|
+
S.forEach((I) => {
|
|
1063
1063
|
I[k.field] = I[k.mapField];
|
|
1064
1064
|
});
|
|
1065
1065
|
});
|
|
1066
1066
|
}, h = () => {
|
|
1067
1067
|
Ie.modal.alert(l("message.importTip"), l("message.udp.tip"));
|
|
1068
|
-
}, g = n,
|
|
1068
|
+
}, g = n, w = () => {
|
|
1069
1069
|
g("close");
|
|
1070
1070
|
};
|
|
1071
1071
|
return Fe(() => {
|
|
1072
1072
|
a = Object.assign(a, e.options);
|
|
1073
|
-
}), (
|
|
1073
|
+
}), (C, k) => {
|
|
1074
1074
|
const I = z("el-option"), U = z("el-select"), W = z("el-date-picker"), ce = z("vxe-pager"), he = z("vxe-grid");
|
|
1075
|
-
return
|
|
1076
|
-
V(he,
|
|
1075
|
+
return T(), L("div", null, [
|
|
1076
|
+
V(he, Ce({
|
|
1077
1077
|
ref_key: "xgrid",
|
|
1078
|
-
ref:
|
|
1079
|
-
},
|
|
1078
|
+
ref: D
|
|
1079
|
+
}, r, ct(M)), Lt({
|
|
1080
1080
|
pager: Y(() => [
|
|
1081
1081
|
V(ce, {
|
|
1082
1082
|
"current-page": p.value.currentPage,
|
|
@@ -1086,15 +1086,15 @@ const qo = ["onUpdate:modelValue"], Ho = { key: 3 }, Go = { key: 4 }, Xo = {
|
|
|
1086
1086
|
layouts: d,
|
|
1087
1087
|
"page-sizes": [200, 500, 1e3, 2e3, 5e3, 1e4],
|
|
1088
1088
|
total: p.value.total,
|
|
1089
|
-
onPageChange:
|
|
1089
|
+
onPageChange: _
|
|
1090
1090
|
}, null, 8, ["current-page", "page-size", "total"])
|
|
1091
1091
|
]),
|
|
1092
1092
|
_: 2
|
|
1093
1093
|
}, [
|
|
1094
|
-
|
|
1094
|
+
se(C.columns, (q) => ({
|
|
1095
1095
|
name: q.field,
|
|
1096
1096
|
fn: Y(({ row: Q }) => [
|
|
1097
|
-
q.dictCode && !q.disabled ? (
|
|
1097
|
+
q.dictCode && !q.disabled ? (T(), ie(U, {
|
|
1098
1098
|
key: 0,
|
|
1099
1099
|
modelValue: Q[q.field],
|
|
1100
1100
|
"onUpdate:modelValue": (R) => Q[q.field] = R,
|
|
@@ -1104,7 +1104,7 @@ const qo = ["onUpdate:modelValue"], Ho = { key: 3 }, Go = { key: 4 }, Xo = {
|
|
|
1104
1104
|
default: Y(() => {
|
|
1105
1105
|
var R;
|
|
1106
1106
|
return [
|
|
1107
|
-
(
|
|
1107
|
+
(T(!0), L(ae, null, se((R = oe(c)[q.dictCode]) == null ? void 0 : R.children, (A) => (T(), ie(I, {
|
|
1108
1108
|
key: A.dictCode,
|
|
1109
1109
|
value: A.dictCode,
|
|
1110
1110
|
label: A.dictName
|
|
@@ -1112,14 +1112,14 @@ const qo = ["onUpdate:modelValue"], Ho = { key: 3 }, Go = { key: 4 }, Xo = {
|
|
|
1112
1112
|
];
|
|
1113
1113
|
}),
|
|
1114
1114
|
_: 2
|
|
1115
|
-
}, 1032, ["modelValue", "onUpdate:modelValue"])) : ["date", "month", "datetime"].includes(q.dataType) && !q.disabled ? (
|
|
1115
|
+
}, 1032, ["modelValue", "onUpdate:modelValue"])) : ["date", "month", "datetime"].includes(q.dataType) && !q.disabled ? (T(), ie(W, {
|
|
1116
1116
|
key: 1,
|
|
1117
1117
|
modelValue: Q[q.field],
|
|
1118
1118
|
"onUpdate:modelValue": (R) => Q[q.field] = R,
|
|
1119
1119
|
modelModifiers: { trim: !0 },
|
|
1120
1120
|
type: q.dataType,
|
|
1121
1121
|
"value-format": "YYYY-MM-DD hh:mm:ss"
|
|
1122
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "type"])) : !q.da && !q.disabled ? ve((
|
|
1122
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "type"])) : !q.da && !q.disabled ? ve((T(), L("input", {
|
|
1123
1123
|
key: 2,
|
|
1124
1124
|
"onUpdate:modelValue": (R) => Q[q.field] = R,
|
|
1125
1125
|
class: "ut-input"
|
|
@@ -1130,7 +1130,7 @@ const qo = ["onUpdate:modelValue"], Ho = { key: 3 }, Go = { key: 4 }, Xo = {
|
|
|
1130
1130
|
void 0,
|
|
1131
1131
|
{ trim: !0 }
|
|
1132
1132
|
]
|
|
1133
|
-
]) :
|
|
1133
|
+
]) : i.value ? (T(), L("span", Go, G(Q[q.field]), 1)) : (T(), L("span", Ho, G(Q[q.field]), 1))
|
|
1134
1134
|
])
|
|
1135
1135
|
}))
|
|
1136
1136
|
]), 1040)
|
|
@@ -1142,33 +1142,33 @@ const qo = ["onUpdate:modelValue"], Ho = { key: 3 }, Go = { key: 4 }, Xo = {
|
|
|
1142
1142
|
for (const [s, t] of n)
|
|
1143
1143
|
e[s] = t;
|
|
1144
1144
|
return e;
|
|
1145
|
-
}, Jo = /* @__PURE__ */ Se(Ko, [["__scopeId", "data-v-cc57671c"]]), Qo = fe(Jo), Zo = { class: "ut-content" }, en = { key: 0 }, tn = { class: "ut-right-panel" }, on = { class: "ut-content-body" }, nn = {
|
|
1146
|
-
name: "UtContent"
|
|
1147
|
-
|
|
1148
|
-
...nn,
|
|
1145
|
+
}, Jo = /* @__PURE__ */ Se(Ko, [["__scopeId", "data-v-cc57671c"]]), Qo = fe(Jo), Zo = { class: "ut-content" }, en = { key: 0 }, tn = { class: "ut-right-panel" }, on = { class: "ut-content-body" }, nn = /* @__PURE__ */ K({
|
|
1146
|
+
name: "UtContent",
|
|
1147
|
+
__name: "content",
|
|
1149
1148
|
props: {
|
|
1150
|
-
title: { default: "" }
|
|
1149
|
+
title: { default: "" },
|
|
1150
|
+
showTop: { type: Boolean, default: !0 }
|
|
1151
1151
|
},
|
|
1152
1152
|
emits: ["close"],
|
|
1153
1153
|
setup(o, { emit: n }) {
|
|
1154
1154
|
const e = P(window.top === window.self), s = n, t = () => {
|
|
1155
1155
|
s("close");
|
|
1156
1156
|
};
|
|
1157
|
-
return (l,
|
|
1157
|
+
return (l, i) => {
|
|
1158
1158
|
const a = z("ut-button");
|
|
1159
|
-
return
|
|
1160
|
-
e.value ? (
|
|
1159
|
+
return T(), L("div", Zo, [
|
|
1160
|
+
l.showTop && e.value ? (T(), L("div", {
|
|
1161
1161
|
key: 0,
|
|
1162
|
-
class:
|
|
1162
|
+
class: De(["ut-content-top", l.title ? "justify-between" : "justify-end"])
|
|
1163
1163
|
}, [
|
|
1164
|
-
l.title ? (
|
|
1164
|
+
l.title ? (T(), L("span", en, G(l.title), 1)) : te("", !0),
|
|
1165
1165
|
$("div", tn, [
|
|
1166
1166
|
Me(l.$slots, "header", {}, void 0, !0),
|
|
1167
1167
|
V(a, {
|
|
1168
1168
|
status: "info",
|
|
1169
1169
|
icon: l.$attrs.icon || "ri-reply-line",
|
|
1170
1170
|
content: l.$attrs.content || "goback",
|
|
1171
|
-
onTap:
|
|
1171
|
+
onTap: i[0] || (i[0] = (c) => t())
|
|
1172
1172
|
}, null, 8, ["icon", "content"])
|
|
1173
1173
|
])
|
|
1174
1174
|
], 2)) : te("", !0),
|
|
@@ -1178,28 +1178,28 @@ const qo = ["onUpdate:modelValue"], Ho = { key: 3 }, Go = { key: 4 }, Xo = {
|
|
|
1178
1178
|
]);
|
|
1179
1179
|
};
|
|
1180
1180
|
}
|
|
1181
|
-
}),
|
|
1181
|
+
}), sn = /* @__PURE__ */ Se(nn, [["__scopeId", "data-v-a849e8a1"]]), ln = fe(sn), an = (o) => (At("data-v-c0562151"), o = o(), Pt(), o), rn = { class: "ut-divider-wrapper" }, cn = { class: "flex items-center" }, dn = /* @__PURE__ */ an(() => /* @__PURE__ */ $("span", { class: "ut-color-block" }, null, -1)), un = { class: "ut-divider-title" }, fn = { class: "mr-2" }, mn = {
|
|
1182
1182
|
name: "UtDivider"
|
|
1183
|
-
},
|
|
1184
|
-
...
|
|
1183
|
+
}, pn = /* @__PURE__ */ K({
|
|
1184
|
+
...mn,
|
|
1185
1185
|
props: {
|
|
1186
1186
|
title: { default: "分割线" }
|
|
1187
1187
|
},
|
|
1188
1188
|
setup(o) {
|
|
1189
|
-
return (n, e) => (
|
|
1190
|
-
$("div",
|
|
1191
|
-
|
|
1192
|
-
$("span",
|
|
1189
|
+
return (n, e) => (T(), L("div", rn, [
|
|
1190
|
+
$("div", cn, [
|
|
1191
|
+
dn,
|
|
1192
|
+
$("span", un, G(n.title), 1)
|
|
1193
1193
|
]),
|
|
1194
|
-
$("div",
|
|
1194
|
+
$("div", fn, [
|
|
1195
1195
|
Me(n.$slots, "operate", {}, void 0, !0)
|
|
1196
1196
|
])
|
|
1197
1197
|
]));
|
|
1198
1198
|
}
|
|
1199
|
-
}),
|
|
1199
|
+
}), hn = /* @__PURE__ */ Se(pn, [["__scopeId", "data-v-c0562151"]]), gn = fe(hn), vn = {
|
|
1200
1200
|
name: "UtDropdown"
|
|
1201
|
-
},
|
|
1202
|
-
...
|
|
1201
|
+
}, yn = /* @__PURE__ */ K({
|
|
1202
|
+
...vn,
|
|
1203
1203
|
props: {
|
|
1204
1204
|
trigger: { default: "hover" },
|
|
1205
1205
|
status: { default: "warning" },
|
|
@@ -1208,33 +1208,33 @@ const qo = ["onUpdate:modelValue"], Ho = { key: 3 }, Go = { key: 4 }, Xo = {
|
|
|
1208
1208
|
},
|
|
1209
1209
|
emits: ["command"],
|
|
1210
1210
|
setup(o, { emit: n }) {
|
|
1211
|
-
const { t: e } = Te(), s =
|
|
1211
|
+
const { t: e } = Te(), s = we(), t = s == null ? void 0 : s.appContext.config.globalProperties.$hasAuthority, l = (p) => {
|
|
1212
1212
|
p.auth && !t(p.auth) || p.disabled || u("command", p.code);
|
|
1213
|
-
},
|
|
1214
|
-
const { content: d, code:
|
|
1215
|
-
return /.*[\u4e00-\u9fa5]+.*$/.test(d) ? d : e("message.btn." + (d ||
|
|
1213
|
+
}, i = ["primary", "success", "warning"], a = (p) => {
|
|
1214
|
+
const { content: d, code: N } = p;
|
|
1215
|
+
return /.*[\u4e00-\u9fa5]+.*$/.test(d) ? d : e("message.btn." + (d || N || "edit"));
|
|
1216
1216
|
}, c = (p) => {
|
|
1217
|
-
var d,
|
|
1218
|
-
return (d = p.code) != null && d.toLowerCase().includes("print") ? "ri-printer-fill" : (
|
|
1217
|
+
var d, N;
|
|
1218
|
+
return (d = p.code) != null && d.toLowerCase().includes("print") ? "ri-printer-fill" : (N = p.code) != null && N.toLowerCase().includes("look") ? "ri-eye-fill" : "ri-edit-2-fill";
|
|
1219
1219
|
}, u = n;
|
|
1220
1220
|
return (p, d) => {
|
|
1221
|
-
const
|
|
1222
|
-
return
|
|
1221
|
+
const N = z("IconifyIconOffline"), D = z("el-icon"), S = z("vxe-button"), v = z("el-dropdown-item"), r = z("el-dropdown-menu"), M = z("el-dropdown");
|
|
1222
|
+
return T(), ie(M, {
|
|
1223
1223
|
trigger: p.trigger,
|
|
1224
1224
|
size: "small",
|
|
1225
1225
|
class: "ut-dropdown"
|
|
1226
1226
|
}, {
|
|
1227
1227
|
dropdown: Y(() => [
|
|
1228
|
-
V(
|
|
1228
|
+
V(r, { class: "ut-dropdown-menu" }, {
|
|
1229
1229
|
default: Y(() => [
|
|
1230
|
-
(
|
|
1230
|
+
(T(!0), L(ae, null, se(p.buttons, (y, F) => (T(), ie(v, {
|
|
1231
1231
|
key: y.code
|
|
1232
1232
|
}, {
|
|
1233
1233
|
default: Y(() => [
|
|
1234
|
-
y.visible !== !1 ? (
|
|
1234
|
+
y.visible !== !1 ? (T(), ie(S, {
|
|
1235
1235
|
key: 0,
|
|
1236
|
-
disabled: y.disabled || y.auth && !
|
|
1237
|
-
status: y.status ||
|
|
1236
|
+
disabled: y.disabled || y.auth && !oe(t)(y.auth),
|
|
1237
|
+
status: y.status || i[F],
|
|
1238
1238
|
content: a(y),
|
|
1239
1239
|
icon: y.icon || c(y),
|
|
1240
1240
|
onClick: (f) => l(y)
|
|
@@ -1247,15 +1247,15 @@ const qo = ["onUpdate:modelValue"], Ho = { key: 3 }, Go = { key: 4 }, Xo = {
|
|
|
1247
1247
|
})
|
|
1248
1248
|
]),
|
|
1249
1249
|
default: Y(() => [
|
|
1250
|
-
V(
|
|
1250
|
+
V(S, {
|
|
1251
1251
|
status: p.status,
|
|
1252
1252
|
disabled: p.disabled
|
|
1253
1253
|
}, {
|
|
1254
1254
|
default: Y(() => [
|
|
1255
1255
|
rt(G(p.$t("message.btn.more")) + " ", 1),
|
|
1256
|
-
V(
|
|
1256
|
+
V(D, { class: "el-icon--right" }, {
|
|
1257
1257
|
default: Y(() => [
|
|
1258
|
-
V(
|
|
1258
|
+
V(N, { icon: "ri:arrow-down-s-line" })
|
|
1259
1259
|
]),
|
|
1260
1260
|
_: 1
|
|
1261
1261
|
})
|
|
@@ -1267,10 +1267,10 @@ const qo = ["onUpdate:modelValue"], Ho = { key: 3 }, Go = { key: 4 }, Xo = {
|
|
|
1267
1267
|
}, 8, ["trigger"]);
|
|
1268
1268
|
};
|
|
1269
1269
|
}
|
|
1270
|
-
}),
|
|
1270
|
+
}), _n = fe(yn), wn = {
|
|
1271
1271
|
name: "UtForm"
|
|
1272
|
-
},
|
|
1273
|
-
...
|
|
1272
|
+
}, bn = /* @__PURE__ */ K({
|
|
1273
|
+
...wn,
|
|
1274
1274
|
props: {
|
|
1275
1275
|
record: { default: () => ({}) },
|
|
1276
1276
|
items: { default: () => [] },
|
|
@@ -1281,19 +1281,19 @@ const qo = ["onUpdate:modelValue"], Ho = { key: 3 }, Go = { key: 4 }, Xo = {
|
|
|
1281
1281
|
dataStatus: { default: "detail" }
|
|
1282
1282
|
},
|
|
1283
1283
|
setup(o, { expose: n }) {
|
|
1284
|
-
const e = o, s = P(void 0), { t } = Te(), l = ue(() => e.items.length ? Ne(e.items, t) : {}),
|
|
1284
|
+
const e = o, s = P(void 0), { t } = Te(), l = ue(() => e.items.length ? Ne(e.items, t) : {}), i = ue(() => e.items.length ? ut(e.items, e.dataStatus, 6) : e.items);
|
|
1285
1285
|
return n({
|
|
1286
1286
|
validateForm: (c) => {
|
|
1287
1287
|
s.value.validate(c);
|
|
1288
1288
|
}
|
|
1289
1289
|
}), (c, u) => {
|
|
1290
1290
|
const p = z("vxe-form");
|
|
1291
|
-
return
|
|
1291
|
+
return T(), L("div", null, [
|
|
1292
1292
|
V(p, {
|
|
1293
1293
|
ref_key: "xForm",
|
|
1294
1294
|
ref: s,
|
|
1295
1295
|
data: c.record,
|
|
1296
|
-
items:
|
|
1296
|
+
items: i.value,
|
|
1297
1297
|
rules: l.value,
|
|
1298
1298
|
loading: c.loading,
|
|
1299
1299
|
vertical: c.vertical,
|
|
@@ -1303,17 +1303,17 @@ const qo = ["onUpdate:modelValue"], Ho = { key: 3 }, Go = { key: 4 }, Xo = {
|
|
|
1303
1303
|
]);
|
|
1304
1304
|
};
|
|
1305
1305
|
}
|
|
1306
|
-
}),
|
|
1306
|
+
}), kn = fe(bn), Cn = "kSysConfig", kt = "kCookies_param", st = Vt.getItem(Cn), Ht = (o, n) => (o.forEach((e) => {
|
|
1307
1307
|
var s;
|
|
1308
1308
|
e.auth = n && n[e.code] || e.auth, e.name ? (st == null ? void 0 : st.i18nEnabled) === "Y" && !e.name.startsWith("message.") && (e.name = `message.btn.${e.name}`) : e.name = `message.btn.${e.code}`, (s = e.dropdowns) != null && s.length && Ht(e.dropdowns, n);
|
|
1309
1309
|
}), o), Gt = (o, n, e) => {
|
|
1310
1310
|
const s = { pageNum: 1, pageSize: 1e5 }, t = mt();
|
|
1311
1311
|
Object.assign(s, e, t, o.defaultParams || {});
|
|
1312
|
-
const l = Qt(s, o.items), { url:
|
|
1313
|
-
if (!
|
|
1314
|
-
const a = Ve(
|
|
1312
|
+
const l = Qt(s, o.items), { url: i } = o;
|
|
1313
|
+
if (!i) return null;
|
|
1314
|
+
const a = Ve(i) ? i : i.fetch || i.restful;
|
|
1315
1315
|
if (!a) return null;
|
|
1316
|
-
const c =
|
|
1316
|
+
const c = i.fetch ? "post" : "get";
|
|
1317
1317
|
return new Promise((u, p) => {
|
|
1318
1318
|
n[c](a, l).then((d) => {
|
|
1319
1319
|
u(d.list);
|
|
@@ -1322,11 +1322,11 @@ const qo = ["onUpdate:modelValue"], Ho = { key: 3 }, Go = { key: 4 }, Xo = {
|
|
|
1322
1322
|
});
|
|
1323
1323
|
});
|
|
1324
1324
|
}, Xt = (o, n, e, s, t) => {
|
|
1325
|
-
if (t) return
|
|
1325
|
+
if (t) return Tn();
|
|
1326
1326
|
for (const d in n)
|
|
1327
1327
|
n[d] && Ve(n[d]) && (n[d] = n[d].trim());
|
|
1328
|
-
const l = { pageNum: e.currentPage, pageSize: e.pageSize },
|
|
1329
|
-
Object.assign(l,
|
|
1328
|
+
const l = { pageNum: e.currentPage, pageSize: e.pageSize }, i = mt();
|
|
1329
|
+
Object.assign(l, i, n, o.defaultParams || {});
|
|
1330
1330
|
const a = Qt(l, o.items), { url: c } = o;
|
|
1331
1331
|
if (!c) return null;
|
|
1332
1332
|
const u = Ve(c) ? c : c.fetch || c.restful, p = c.fetch ? "post" : "get";
|
|
@@ -1341,7 +1341,7 @@ const qo = ["onUpdate:modelValue"], Ho = { key: 3 }, Go = { key: 4 }, Xo = {
|
|
|
1341
1341
|
}, Jt = (o, n, e) => {
|
|
1342
1342
|
const s = [], { url: t } = e;
|
|
1343
1343
|
if (!t) return null;
|
|
1344
|
-
const { insertRecords: l, updateRecords:
|
|
1344
|
+
const { insertRecords: l, updateRecords: i } = n;
|
|
1345
1345
|
if (!Ye(l)) {
|
|
1346
1346
|
const a = mt();
|
|
1347
1347
|
l.forEach((u) => {
|
|
@@ -1353,30 +1353,30 @@ const qo = ["onUpdate:modelValue"], Ho = { key: 3 }, Go = { key: 4 }, Xo = {
|
|
|
1353
1353
|
const c = Ve(t) ? t : t.add || t.restful;
|
|
1354
1354
|
c && s.push(o.post(c, l));
|
|
1355
1355
|
}
|
|
1356
|
-
if (!Ye(
|
|
1356
|
+
if (!Ye(i)) {
|
|
1357
1357
|
const a = Ve(t) ? t : t.save || t.restful, c = t.save ? "post" : "put";
|
|
1358
|
-
a && s.push(o[c](a,
|
|
1358
|
+
a && s.push(o[c](a, i));
|
|
1359
1359
|
}
|
|
1360
1360
|
return s;
|
|
1361
1361
|
}, Ct = "yyyy-MM-dd 00:00:00", xt = "yyyy-MM-dd 23:59:59", Qt = (o, n) => {
|
|
1362
1362
|
const e = n.filter(
|
|
1363
1363
|
(t) => {
|
|
1364
|
-
var l,
|
|
1365
|
-
return ((l = t.itemRender) == null ? void 0 : l.name) === "#SuDateRange" || ((a = (
|
|
1364
|
+
var l, i, a;
|
|
1365
|
+
return ((l = t.itemRender) == null ? void 0 : l.name) === "#SuDateRange" || ((a = (i = t.itemRender) == null ? void 0 : i.props) == null ? void 0 : a.multiple) || t.multiple;
|
|
1366
1366
|
}
|
|
1367
1367
|
);
|
|
1368
1368
|
if (Ye(e)) return o;
|
|
1369
1369
|
const s = de(o, !0);
|
|
1370
1370
|
return e.forEach((t) => {
|
|
1371
|
-
var l,
|
|
1372
|
-
if (t.multiple || (
|
|
1371
|
+
var l, i, a;
|
|
1372
|
+
if (t.multiple || (i = (l = t.itemRender) == null ? void 0 : l.props) != null && i.multiple)
|
|
1373
1373
|
s[t.field] = (a = s[t.field]) == null ? void 0 : a.join(",");
|
|
1374
1374
|
else {
|
|
1375
1375
|
const c = s[t.field];
|
|
1376
1376
|
c && t.toField ? (s[t.fromField] = ee(c[0], Ct), s[t.toField] = ee(c[1], xt)) : c && (s[`${t.field}From`] = ee(c[0], Ct), s[`${t.field}To`] = ee(c[1], xt)), delete s[t.field];
|
|
1377
1377
|
}
|
|
1378
1378
|
}), s;
|
|
1379
|
-
}, mt = () => ge.get(kt) ? JSON.parse(ge.get(kt)) : {},
|
|
1379
|
+
}, mt = () => ge.get(kt) ? JSON.parse(ge.get(kt)) : {}, xn = [
|
|
1380
1380
|
{
|
|
1381
1381
|
code: "insert_actived",
|
|
1382
1382
|
name: "add",
|
|
@@ -1396,7 +1396,7 @@ const qo = ["onUpdate:modelValue"], Ho = { key: 3 }, Go = { key: 4 }, Xo = {
|
|
|
1396
1396
|
icon: "vxe-icon-save",
|
|
1397
1397
|
auth: "edit"
|
|
1398
1398
|
}
|
|
1399
|
-
],
|
|
1399
|
+
], Dn = [
|
|
1400
1400
|
{
|
|
1401
1401
|
code: "add",
|
|
1402
1402
|
name: "add",
|
|
@@ -1411,7 +1411,7 @@ const qo = ["onUpdate:modelValue"], Ho = { key: 3 }, Go = { key: 4 }, Xo = {
|
|
|
1411
1411
|
icon: "vxe-icon-delete",
|
|
1412
1412
|
auth: "del"
|
|
1413
1413
|
}
|
|
1414
|
-
],
|
|
1414
|
+
], $n = [
|
|
1415
1415
|
{ field: "createdByName", width: 90, visible: !1 },
|
|
1416
1416
|
{ field: "creationDate", width: 140, visible: !1 },
|
|
1417
1417
|
{ field: "lastUpdatedByName", width: 90, visible: !1 },
|
|
@@ -1422,7 +1422,7 @@ const qo = ["onUpdate:modelValue"], Ho = { key: 3 }, Go = { key: 4 }, Xo = {
|
|
|
1422
1422
|
types: ["xlsx", "csv"],
|
|
1423
1423
|
modes: ["current", "selected", "all"],
|
|
1424
1424
|
useStyle: !0,
|
|
1425
|
-
sheetMethod: ({ worksheet: n }) => o.onSheetMethod ? o.onSheetMethod(n) :
|
|
1425
|
+
sheetMethod: ({ worksheet: n }) => o.onSheetMethod ? o.onSheetMethod(n) : Mn(n),
|
|
1426
1426
|
columnFilterMethod: ({ column: n }) => o.columnFilter ? !!o.columnFilter(n) : !["operate"].includes(n.field) && n.type !== "checkbox"
|
|
1427
1427
|
}, Zt = (o, n, e, s) => {
|
|
1428
1428
|
const t = {
|
|
@@ -1442,13 +1442,13 @@ const qo = ["onUpdate:modelValue"], Ho = { key: 3 }, Go = { key: 4 }, Xo = {
|
|
|
1442
1442
|
}, o;
|
|
1443
1443
|
}
|
|
1444
1444
|
let l = de(e.buttons || [], !0);
|
|
1445
|
-
(e.mode !== "form" ? de(
|
|
1445
|
+
(e.mode !== "form" ? de(xn, !0) : de(Dn, !0)).reverse().forEach((p) => {
|
|
1446
1446
|
!l.some((d) => d.code === p.code) && l.unshift(p), e.authPrefix && !["print", "export"].includes(p.auth) && (p.auth = e.authPrefix + p.auth.slice(0, 1).toLocaleUpperCase() + p.auth.slice(1).toLocaleLowerCase());
|
|
1447
1447
|
}), l = Ht(l, n.auth).filter((p) => {
|
|
1448
|
-
var
|
|
1448
|
+
var N;
|
|
1449
1449
|
const d = p.auth ? s(p.auth) : !0;
|
|
1450
|
-
return (
|
|
1451
|
-
(
|
|
1450
|
+
return (N = p.dropdowns) != null && N.length && (p.dropdowns = p.dropdowns.filter(
|
|
1451
|
+
(D) => !D.auth || D.auth && s(D.auth)
|
|
1452
1452
|
)), d;
|
|
1453
1453
|
});
|
|
1454
1454
|
const a = { trigger: "dblclick", mode: "row", showStatus: !0 };
|
|
@@ -1469,12 +1469,12 @@ const qo = ["onUpdate:modelValue"], Ho = { key: 3 }, Go = { key: 4 }, Xo = {
|
|
|
1469
1469
|
if (t === (e.index || 0))
|
|
1470
1470
|
return e.label || "合计";
|
|
1471
1471
|
if ((l = e.fields) != null && l.includes(s.property)) {
|
|
1472
|
-
const
|
|
1473
|
-
return
|
|
1472
|
+
const i = n.reduce((a, c) => a + Number(c[s.property] || 0), 0);
|
|
1473
|
+
return i && Number(i.toFixed(e.decimal || 2));
|
|
1474
1474
|
}
|
|
1475
1475
|
return "";
|
|
1476
1476
|
})
|
|
1477
|
-
], to = (o, n) => at(n.checkMethod) ? n.checkMethod(o) : !0,
|
|
1477
|
+
], to = (o, n) => at(n.checkMethod) ? n.checkMethod(o) : !0, Mn = (o) => {
|
|
1478
1478
|
o.eachRow((n, e) => {
|
|
1479
1479
|
n.font = { name: "微软雅黑", size: 9 }, n.border = {
|
|
1480
1480
|
top: { style: "thin" },
|
|
@@ -1492,7 +1492,7 @@ const qo = ["onUpdate:modelValue"], Ho = { key: 3 }, Go = { key: 4 }, Xo = {
|
|
|
1492
1492
|
color: { argb: "FFFFFFFF" }
|
|
1493
1493
|
});
|
|
1494
1494
|
});
|
|
1495
|
-
},
|
|
1495
|
+
}, Tn = () => new Promise((o) => {
|
|
1496
1496
|
setTimeout(() => {
|
|
1497
1497
|
o({ list: [
|
|
1498
1498
|
{ id: 1, name: "Test1", sex: "Man", age: 28, address: "Shenzhen" },
|
|
@@ -1508,33 +1508,33 @@ const qo = ["onUpdate:modelValue"], Ho = { key: 3 }, Go = { key: 4 }, Xo = {
|
|
|
1508
1508
|
const s = e.replace(/-(\w)/g, (t) => t.slice(1).toUpperCase());
|
|
1509
1509
|
n[s] = o[e];
|
|
1510
1510
|
}), n;
|
|
1511
|
-
}, tt = (o) => (At("data-v-e0162328"), o = o(), Pt(), o),
|
|
1511
|
+
}, tt = (o) => (At("data-v-e0162328"), o = o(), Pt(), o), Sn = { class: "w-full h-full" }, En = /* @__PURE__ */ tt(() => /* @__PURE__ */ $("span", null, "查询方案", -1)), In = { class: "pl-2 mr-5" }, Nn = /* @__PURE__ */ tt(() => /* @__PURE__ */ $("i", { class: "vxe-icon-question-circle-fill" }, null, -1)), Fn = /* @__PURE__ */ tt(() => /* @__PURE__ */ $("div", null, [
|
|
1512
1512
|
/* @__PURE__ */ $("div", { class: "text-sm" }, [
|
|
1513
1513
|
/* @__PURE__ */ $("div", null, "• 单击选中需要的查询方案,点击确定即可"),
|
|
1514
1514
|
/* @__PURE__ */ $("div", null, "• 专属否: 是否只有自己才能查询"),
|
|
1515
1515
|
/* @__PURE__ */ $("div", null, "• 仅方案创建人能够删除及更新方案")
|
|
1516
1516
|
])
|
|
1517
|
-
], -1)),
|
|
1517
|
+
], -1)), Ln = { class: "flex flex-wrap justify-between x-card" }, An = ["onClick"], Pn = {
|
|
1518
1518
|
style: { "border-bottom-width": "1px", "border-color": "rgb(229 231 235)" },
|
|
1519
1519
|
class: "flex items-center justify-between flex-1 w-full h-4 pb-2 pl-2 pr-2 mt-2"
|
|
1520
|
-
},
|
|
1520
|
+
}, Bn = { style: { "font-weight": "900", color: "rgb(6 95 70)" } }, On = { class: "flex" }, Rn = ["onClick"], Un = ["onClick"], Vn = {
|
|
1521
1521
|
class: "flex items-center w-full",
|
|
1522
1522
|
style: { color: "rgb(6 95 70)" }
|
|
1523
|
-
},
|
|
1523
|
+
}, zn = {
|
|
1524
1524
|
style: { width: "50%", "text-align": "right", overflow: "hidden", "white-space": "nowrap", "text-overflow": "ellipsis" },
|
|
1525
1525
|
class: "inline-block"
|
|
1526
|
-
},
|
|
1526
|
+
}, jn = {
|
|
1527
1527
|
style: { width: "50%", overflow: "hidden", "white-space": "nowrap", "text-overflow": "ellipsis" },
|
|
1528
1528
|
class: "inline-blocks"
|
|
1529
|
-
},
|
|
1529
|
+
}, Wn = {
|
|
1530
1530
|
key: 1,
|
|
1531
1531
|
class: "flex flex-wrap items-center justify-center card-content card2"
|
|
1532
|
-
},
|
|
1532
|
+
}, Yn = /* @__PURE__ */ tt(() => /* @__PURE__ */ $("i", {
|
|
1533
1533
|
style: { "font-size": "56px", color: "rgb(156 163 175)" },
|
|
1534
1534
|
class: "vxe-icon-add"
|
|
1535
|
-
}, null, -1)),
|
|
1536
|
-
|
|
1537
|
-
],
|
|
1535
|
+
}, null, -1)), qn = [
|
|
1536
|
+
Yn
|
|
1537
|
+
], Hn = { class: "flex items-center justify-end" }, Gn = { class: "flex items-center justify-end" }, lt = "/upfm/v1/queryConfig", Xn = /* @__PURE__ */ K({
|
|
1538
1538
|
__name: "SuSearch",
|
|
1539
1539
|
props: {
|
|
1540
1540
|
view: { default: "" },
|
|
@@ -1542,17 +1542,17 @@ const qo = ["onUpdate:modelValue"], Ho = { key: 3 }, Go = { key: 4 }, Xo = {
|
|
|
1542
1542
|
},
|
|
1543
1543
|
emits: ["close", "search"],
|
|
1544
1544
|
setup(o, { emit: n }) {
|
|
1545
|
-
const e = o, s =
|
|
1545
|
+
const e = o, s = we(), t = s.appContext.config.globalProperties.$serviceApi, l = s.appContext.config.globalProperties.$hasAuthority, i = Ut(), { t: a } = Te();
|
|
1546
1546
|
console.log("view ======", e.view);
|
|
1547
|
-
const c = P(null), u = P(""), p = P(!1), d = P(!1),
|
|
1548
|
-
let
|
|
1549
|
-
const f = P([]),
|
|
1547
|
+
const c = P(null), u = P(""), p = P(!1), d = P(!1), N = P(!1), D = P(!1), S = P(!0), v = P({}), r = ge.get("loginer");
|
|
1548
|
+
let M, y, F;
|
|
1549
|
+
const f = P([]), _ = ue(() => e.items.length ? Ne(m(), a) : {}), x = ue(() => e.items.length ? ut(m(), "update") : e.items), m = () => {
|
|
1550
1550
|
const A = [
|
|
1551
1551
|
{ field: "title", title: "方案名称", required: !0 },
|
|
1552
1552
|
{
|
|
1553
1553
|
field: "isPrivate",
|
|
1554
1554
|
title: "专属否",
|
|
1555
|
-
itemRender:
|
|
1555
|
+
itemRender: i.renderSwitch("Y")
|
|
1556
1556
|
}
|
|
1557
1557
|
];
|
|
1558
1558
|
return A.push(...de(e.items, !0)), A.filter((B) => B.field !== "dataFlat");
|
|
@@ -1561,50 +1561,50 @@ const qo = ["onUpdate:modelValue"], Ho = { key: 3 }, Go = { key: 4 }, Xo = {
|
|
|
1561
1561
|
const B = A.select;
|
|
1562
1562
|
f.value.forEach((j) => {
|
|
1563
1563
|
j.select = !1;
|
|
1564
|
-
}), A.select = !B,
|
|
1564
|
+
}), A.select = !B, S.value = B, y = B ? y : A, A.id === "add" && (S.value = !0, E());
|
|
1565
1565
|
}, E = () => {
|
|
1566
|
-
|
|
1566
|
+
v.value = { isPrivate: "Y", item: {} }, d.value = !0;
|
|
1567
1567
|
}, O = (A, B) => {
|
|
1568
|
-
|
|
1568
|
+
v.value = {
|
|
1569
1569
|
title: A.title,
|
|
1570
1570
|
isPrivate: A.isPrivate,
|
|
1571
1571
|
item: A,
|
|
1572
1572
|
...A.content
|
|
1573
|
-
},
|
|
1573
|
+
}, M = B, d.value = !0;
|
|
1574
1574
|
}, h = () => {
|
|
1575
1575
|
c.value.validate(async (A) => {
|
|
1576
1576
|
if (!A) {
|
|
1577
1577
|
const B = k();
|
|
1578
|
-
|
|
1578
|
+
D.value = !0;
|
|
1579
1579
|
const j = B.id ? "put" : "post", [H, Z] = await ft(t[j](lt, [B]));
|
|
1580
|
-
|
|
1580
|
+
D.value = !1, H || (Z[0].select = !1, Z[0].content = JSON.parse(Z[0].content), j === "post" ? f.value.splice(f.value.length - 1, 0, Z[0]) : f.value.splice(M, 1, Z[0]), F = de(f.value, !0), Qe(), d.value = !1);
|
|
1581
1581
|
}
|
|
1582
1582
|
});
|
|
1583
1583
|
}, g = () => {
|
|
1584
|
-
|
|
1584
|
+
N.value = !0;
|
|
1585
1585
|
const A = ge.get("kCookies_param") ? JSON.parse(ge.get("kCookies_param")) : {}, B = Object.assign(
|
|
1586
|
-
{ pageSize: 50, pageNum: 1, userName:
|
|
1586
|
+
{ pageSize: 50, pageNum: 1, userName: r, viewCode: e.view },
|
|
1587
1587
|
A
|
|
1588
1588
|
);
|
|
1589
1589
|
t.get(lt, B).then((j) => {
|
|
1590
1590
|
const H = j.list;
|
|
1591
1591
|
I(H), F = de(f.value, !0);
|
|
1592
1592
|
}).finally(() => {
|
|
1593
|
-
|
|
1593
|
+
N.value = !1;
|
|
1594
1594
|
});
|
|
1595
|
-
},
|
|
1596
|
-
R("search", y.content),
|
|
1597
|
-
},
|
|
1598
|
-
d.value ? (
|
|
1595
|
+
}, w = () => {
|
|
1596
|
+
R("search", y.content), C();
|
|
1597
|
+
}, C = () => {
|
|
1598
|
+
d.value ? (v.value = {}, d.value = !1) : (p.value = !1, R("close"));
|
|
1599
1599
|
}, k = () => {
|
|
1600
|
-
const A =
|
|
1601
|
-
...
|
|
1600
|
+
const A = v.value, { title: B, isPrivate: j } = A, H = ge.get("kCookies_param") ? JSON.parse(ge.get("kCookies_param")) : {}, Z = {
|
|
1601
|
+
...v.value.item,
|
|
1602
1602
|
...H,
|
|
1603
1603
|
title: B,
|
|
1604
1604
|
isPrivate: j,
|
|
1605
1605
|
viewCode: e.view,
|
|
1606
1606
|
content: "",
|
|
1607
|
-
userName:
|
|
1607
|
+
userName: r
|
|
1608
1608
|
};
|
|
1609
1609
|
delete A.title, delete A.isPrivate, delete A.item;
|
|
1610
1610
|
const re = {};
|
|
@@ -1617,7 +1617,7 @@ const qo = ["onUpdate:modelValue"], Ho = { key: 3 }, Go = { key: 4 }, Xo = {
|
|
|
1617
1617
|
}), A.push({ id: "add" }), f.value = A;
|
|
1618
1618
|
}, U = (A) => {
|
|
1619
1619
|
var j;
|
|
1620
|
-
return (j =
|
|
1620
|
+
return (j = x.value.find((H) => H.field === A)) == null ? void 0 : j.title;
|
|
1621
1621
|
}, W = (A, B) => {
|
|
1622
1622
|
var H, Z, re, me, Pe;
|
|
1623
1623
|
const j = (H = e.items) == null ? void 0 : H.find((X) => X.field === A);
|
|
@@ -1626,12 +1626,12 @@ const qo = ["onUpdate:modelValue"], Ho = { key: 3 }, Go = { key: 4 }, Xo = {
|
|
|
1626
1626
|
if (await Ie.modal.confirm(
|
|
1627
1627
|
`继续操作将删除查询方案【${A.title}】`
|
|
1628
1628
|
) === "confirm") {
|
|
1629
|
-
|
|
1629
|
+
N.value = !0;
|
|
1630
1630
|
const H = de(A, !0);
|
|
1631
1631
|
H.content = JSON.stringify(H.content), t.delete(lt, [H]).then(() => {
|
|
1632
1632
|
f.value.splice(B, 1), F = de(f.value, !0), Qe();
|
|
1633
1633
|
}).finally(() => {
|
|
1634
|
-
|
|
1634
|
+
N.value = !1;
|
|
1635
1635
|
});
|
|
1636
1636
|
}
|
|
1637
1637
|
}, he = () => {
|
|
@@ -1649,30 +1649,30 @@ const qo = ["onUpdate:modelValue"], Ho = { key: 3 }, Go = { key: 4 }, Xo = {
|
|
|
1649
1649
|
p.value = !0;
|
|
1650
1650
|
}), (A, B) => {
|
|
1651
1651
|
const j = z("el-popover"), H = z("el-scrollbar"), Z = z("vxe-input"), re = z("ut-button"), me = z("vxe-modal"), Pe = z("vxe-form");
|
|
1652
|
-
return
|
|
1652
|
+
return T(), L("div", Sn, [
|
|
1653
1653
|
V(me, {
|
|
1654
1654
|
modelValue: p.value,
|
|
1655
1655
|
"onUpdate:modelValue": B[4] || (B[4] = (X) => p.value = X),
|
|
1656
|
-
loading:
|
|
1656
|
+
loading: N.value,
|
|
1657
1657
|
width: "820",
|
|
1658
1658
|
height: "360",
|
|
1659
1659
|
"show-footer": "",
|
|
1660
|
-
onClose: B[5] || (B[5] = (X) =>
|
|
1660
|
+
onClose: B[5] || (B[5] = (X) => C())
|
|
1661
1661
|
}, {
|
|
1662
1662
|
title: Y(() => [
|
|
1663
1663
|
$("div", null, [
|
|
1664
|
-
|
|
1665
|
-
$("span",
|
|
1664
|
+
En,
|
|
1665
|
+
$("span", In, [
|
|
1666
1666
|
V(j, {
|
|
1667
1667
|
placement: "right",
|
|
1668
1668
|
width: 260,
|
|
1669
1669
|
trigger: "hover"
|
|
1670
1670
|
}, {
|
|
1671
1671
|
reference: Y(() => [
|
|
1672
|
-
|
|
1672
|
+
Nn
|
|
1673
1673
|
]),
|
|
1674
1674
|
default: Y(() => [
|
|
1675
|
-
|
|
1675
|
+
Fn
|
|
1676
1676
|
]),
|
|
1677
1677
|
_: 1
|
|
1678
1678
|
})
|
|
@@ -1680,32 +1680,32 @@ const qo = ["onUpdate:modelValue"], Ho = { key: 3 }, Go = { key: 4 }, Xo = {
|
|
|
1680
1680
|
])
|
|
1681
1681
|
]),
|
|
1682
1682
|
default: Y(() => [
|
|
1683
|
-
$("div",
|
|
1684
|
-
(
|
|
1683
|
+
$("div", Ln, [
|
|
1684
|
+
(T(!0), L(ae, null, se(f.value, (X, Ee) => (T(), L("div", {
|
|
1685
1685
|
key: X.id,
|
|
1686
1686
|
class: "card",
|
|
1687
|
-
style:
|
|
1688
|
-
onClick: (
|
|
1687
|
+
style: ne({ width: f.value.length === 1 ? "100%" : "" }),
|
|
1688
|
+
onClick: (be) => b(X)
|
|
1689
1689
|
}, [
|
|
1690
|
-
X.id !== "add" ? (
|
|
1690
|
+
X.id !== "add" ? (T(), L("div", {
|
|
1691
1691
|
key: 0,
|
|
1692
|
-
class:
|
|
1692
|
+
class: De(["flex flex-col justify-between card-content card2", { selectCard: X.select }])
|
|
1693
1693
|
}, [
|
|
1694
|
-
$("div",
|
|
1695
|
-
$("span",
|
|
1696
|
-
$("div",
|
|
1697
|
-
X.userName ===
|
|
1694
|
+
$("div", Pn, [
|
|
1695
|
+
$("span", Bn, G(X.title) + "(" + G(X.userName === oe(r) ? "自己" : X.userName) + ")", 1),
|
|
1696
|
+
$("div", On, [
|
|
1697
|
+
X.userName === oe(r) || oe(l)("fetch") ? (T(), L("div", {
|
|
1698
1698
|
key: 0,
|
|
1699
1699
|
class: "flex items-center justify-center",
|
|
1700
1700
|
style: { color: "#fff", "background-color": "rgb(29 78 216)", "border-radius": "8px", width: "16px", height: "16px", "margin-left": "12px" },
|
|
1701
|
-
onClick: (
|
|
1702
|
-
}, " ✔ ", 8,
|
|
1703
|
-
X.userName ===
|
|
1701
|
+
onClick: (be) => O(X, Ee)
|
|
1702
|
+
}, " ✔ ", 8, Rn)) : te("", !0),
|
|
1703
|
+
X.userName === oe(r) || oe(l)("fetch") ? (T(), L("div", {
|
|
1704
1704
|
key: 1,
|
|
1705
1705
|
class: "flex items-center justify-center",
|
|
1706
1706
|
style: { color: "#fff", "background-color": "rgb(185 28 28)", "border-radius": "8px", width: "16px", height: "16px", "margin-left": "12px" },
|
|
1707
|
-
onClick: (
|
|
1708
|
-
}, " × ", 8,
|
|
1707
|
+
onClick: (be) => ce(X, Ee)
|
|
1708
|
+
}, " × ", 8, Un)) : te("", !0)
|
|
1709
1709
|
])
|
|
1710
1710
|
]),
|
|
1711
1711
|
V(H, {
|
|
@@ -1713,25 +1713,25 @@ const qo = ["onUpdate:modelValue"], Ho = { key: 3 }, Go = { key: 4 }, Xo = {
|
|
|
1713
1713
|
class: "w-full overflow-y-auto"
|
|
1714
1714
|
}, {
|
|
1715
1715
|
default: Y(() => [
|
|
1716
|
-
(
|
|
1717
|
-
key:
|
|
1716
|
+
(T(!0), L(ae, null, se(X.content, (be, Be) => (T(), L("span", {
|
|
1717
|
+
key: be,
|
|
1718
1718
|
style: { "line-height": "2rem", height: "33.333%" },
|
|
1719
1719
|
class: "inline-block w-1/2"
|
|
1720
1720
|
}, [
|
|
1721
|
-
$("span",
|
|
1722
|
-
$("span",
|
|
1723
|
-
$("span",
|
|
1721
|
+
$("span", Vn, [
|
|
1722
|
+
$("span", zn, G(A.$t(U(Be))) + ":", 1),
|
|
1723
|
+
$("span", jn, G(W(Be, be)), 1)
|
|
1724
1724
|
])
|
|
1725
1725
|
]))), 128))
|
|
1726
1726
|
]),
|
|
1727
1727
|
_: 2
|
|
1728
1728
|
}, 1024)
|
|
1729
|
-
], 2)) : (
|
|
1730
|
-
], 12,
|
|
1729
|
+
], 2)) : (T(), L("div", Wn, qn))
|
|
1730
|
+
], 12, An))), 128))
|
|
1731
1731
|
])
|
|
1732
1732
|
]),
|
|
1733
1733
|
footer: Y(() => [
|
|
1734
|
-
$("div",
|
|
1734
|
+
$("div", Hn, [
|
|
1735
1735
|
V(Z, {
|
|
1736
1736
|
modelValue: u.value,
|
|
1737
1737
|
"onUpdate:modelValue": B[0] || (B[0] = (X) => u.value = X),
|
|
@@ -1751,13 +1751,13 @@ const qo = ["onUpdate:modelValue"], Ho = { key: 3 }, Go = { key: 4 }, Xo = {
|
|
|
1751
1751
|
content: "cancel",
|
|
1752
1752
|
status: "warning",
|
|
1753
1753
|
icon: "ri-close-line",
|
|
1754
|
-
onTap: B[2] || (B[2] = (X) =>
|
|
1754
|
+
onTap: B[2] || (B[2] = (X) => C())
|
|
1755
1755
|
}),
|
|
1756
1756
|
V(re, {
|
|
1757
|
-
disabled:
|
|
1757
|
+
disabled: S.value,
|
|
1758
1758
|
content: "confirm",
|
|
1759
1759
|
icon: "ri-save-3-line",
|
|
1760
|
-
onTap: B[3] || (B[3] = (X) =>
|
|
1760
|
+
onTap: B[3] || (B[3] = (X) => w())
|
|
1761
1761
|
}, null, 8, ["disabled"])
|
|
1762
1762
|
])
|
|
1763
1763
|
]),
|
|
@@ -1766,31 +1766,31 @@ const qo = ["onUpdate:modelValue"], Ho = { key: 3 }, Go = { key: 4 }, Xo = {
|
|
|
1766
1766
|
V(me, {
|
|
1767
1767
|
modelValue: d.value,
|
|
1768
1768
|
"onUpdate:modelValue": B[7] || (B[7] = (X) => d.value = X),
|
|
1769
|
-
loading:
|
|
1769
|
+
loading: D.value,
|
|
1770
1770
|
width: "360",
|
|
1771
1771
|
height: "420",
|
|
1772
1772
|
title: "查询方案新增",
|
|
1773
1773
|
"show-footer": "",
|
|
1774
|
-
onClose: B[8] || (B[8] = (X) =>
|
|
1774
|
+
onClose: B[8] || (B[8] = (X) => C())
|
|
1775
1775
|
}, {
|
|
1776
1776
|
default: Y(() => [
|
|
1777
1777
|
V(Pe, {
|
|
1778
1778
|
ref_key: "xForm",
|
|
1779
1779
|
ref: c,
|
|
1780
|
-
data:
|
|
1781
|
-
items:
|
|
1782
|
-
rules:
|
|
1780
|
+
data: v.value,
|
|
1781
|
+
items: x.value,
|
|
1782
|
+
rules: _.value,
|
|
1783
1783
|
"title-align": "right",
|
|
1784
1784
|
"title-width": 90
|
|
1785
1785
|
}, null, 8, ["data", "items", "rules"])
|
|
1786
1786
|
]),
|
|
1787
1787
|
footer: Y(() => [
|
|
1788
|
-
$("div",
|
|
1788
|
+
$("div", Gn, [
|
|
1789
1789
|
V(re, {
|
|
1790
1790
|
content: "cancel",
|
|
1791
1791
|
status: "warning",
|
|
1792
1792
|
icon: "ri-close-line",
|
|
1793
|
-
onTap: B[6] || (B[6] = (X) =>
|
|
1793
|
+
onTap: B[6] || (B[6] = (X) => C())
|
|
1794
1794
|
}),
|
|
1795
1795
|
V(re, {
|
|
1796
1796
|
content: "confirm",
|
|
@@ -1804,7 +1804,7 @@ const qo = ["onUpdate:modelValue"], Ho = { key: 3 }, Go = { key: 4 }, Xo = {
|
|
|
1804
1804
|
]);
|
|
1805
1805
|
};
|
|
1806
1806
|
}
|
|
1807
|
-
}),
|
|
1807
|
+
}), Kn = /* @__PURE__ */ Se(Xn, [["__scopeId", "data-v-e0162328"]]), Jn = { style: { width: "100%" } }, $t = "U_TABLE_COLUMNN_SORT", Qn = /* @__PURE__ */ K({
|
|
1808
1808
|
name: "UtGrid",
|
|
1809
1809
|
__name: "grid",
|
|
1810
1810
|
props: {
|
|
@@ -1823,31 +1823,31 @@ const qo = ["onUpdate:modelValue"], Ho = { key: 3 }, Go = { key: 4 }, Xo = {
|
|
|
1823
1823
|
setup(o, { expose: n, emit: e }) {
|
|
1824
1824
|
const s = pt(dt());
|
|
1825
1825
|
let t;
|
|
1826
|
-
const l = {},
|
|
1826
|
+
const l = {}, i = we(), a = i.appContext.config.globalProperties.$hasAuthority, c = i.appContext.config.globalProperties.$serviceApi, u = i.parent.type.name, p = i.appContext.config.globalProperties.$mode, d = o, { t: N } = Te(), D = P(null), S = P(!1), v = {
|
|
1827
1827
|
icon: "vxe-icon-setting",
|
|
1828
1828
|
name: "favorite",
|
|
1829
1829
|
events: {
|
|
1830
1830
|
click: (R, A) => {
|
|
1831
|
-
A.name === "favorite" && (
|
|
1831
|
+
A.name === "favorite" && (S.value = !0);
|
|
1832
1832
|
}
|
|
1833
1833
|
}
|
|
1834
|
-
},
|
|
1834
|
+
}, r = () => d.columns.length ? Ne(d.columns, N) : {}, M = () => {
|
|
1835
1835
|
const R = d.columns;
|
|
1836
1836
|
if (s.gridId) {
|
|
1837
|
-
const B =
|
|
1837
|
+
const B = $n.filter((H) => !R.some((Z) => Z.field === H.field)).map((H) => (s.format && ["lastUpdateDate", "creationDate"].includes(H.field) && (H.formatter = s.format, H.width = 90), H)), j = R.findIndex((H) => H.field === "operate");
|
|
1838
1838
|
j !== -1 ? R.splice(j, 0, ...B) : R.push(...B);
|
|
1839
1839
|
}
|
|
1840
1840
|
const A = s.gridId ? f(R) : R;
|
|
1841
1841
|
return zt(A);
|
|
1842
1842
|
};
|
|
1843
1843
|
bt.getItem($t).then((R) => {
|
|
1844
|
-
t = R, y.columns =
|
|
1844
|
+
t = R, y.columns = M();
|
|
1845
1845
|
});
|
|
1846
|
-
const y =
|
|
1846
|
+
const y = xe({
|
|
1847
1847
|
border: !0,
|
|
1848
1848
|
pagerConfig: { pageSize: s.pageSize || 20 },
|
|
1849
1849
|
editConfig: {},
|
|
1850
|
-
editRules:
|
|
1850
|
+
editRules: r(),
|
|
1851
1851
|
formConfig: {},
|
|
1852
1852
|
columnConfig: { useKey: !0 },
|
|
1853
1853
|
toolbarConfig: { enabled: !1 },
|
|
@@ -1871,11 +1871,11 @@ const qo = ["onUpdate:modelValue"], Ho = { key: 3 }, Go = { key: 4 }, Xo = {
|
|
|
1871
1871
|
save: ({ body: R }) => Promise.all(Jt(c, R, d))
|
|
1872
1872
|
}
|
|
1873
1873
|
},
|
|
1874
|
-
columns: s.gridId ? [] :
|
|
1874
|
+
columns: s.gridId ? [] : M(),
|
|
1875
1875
|
...s
|
|
1876
1876
|
}), F = () => d.items.length ? jt(
|
|
1877
1877
|
de(d.items, !0),
|
|
1878
|
-
u && d.url ?
|
|
1878
|
+
u && d.url ? v : u
|
|
1879
1879
|
) : d.items;
|
|
1880
1880
|
function f(R) {
|
|
1881
1881
|
const A = t ? t[s.gridId] : {};
|
|
@@ -1884,12 +1884,12 @@ const qo = ["onUpdate:modelValue"], Ho = { key: 3 }, Go = { key: 4 }, Xo = {
|
|
|
1884
1884
|
return B._sort = A[B.field] || H, l[B.field] = B._sort, B;
|
|
1885
1885
|
}).sort((B, j) => B._sort - j._sort) : R;
|
|
1886
1886
|
}
|
|
1887
|
-
const
|
|
1887
|
+
const _ = () => {
|
|
1888
1888
|
d.items.length && (y.formConfig = {
|
|
1889
1889
|
titleWidth: 100,
|
|
1890
1890
|
titleAlign: "right",
|
|
1891
1891
|
items: F(),
|
|
1892
|
-
rules: Ne(d.items,
|
|
1892
|
+
rules: Ne(d.items, N),
|
|
1893
1893
|
validConfig: { showMessage: !1 }
|
|
1894
1894
|
});
|
|
1895
1895
|
const R = Zt(y, d, s, a);
|
|
@@ -1904,20 +1904,20 @@ const qo = ["onUpdate:modelValue"], Ho = { key: 3 }, Go = { key: 4 }, Xo = {
|
|
|
1904
1904
|
height: "75%"
|
|
1905
1905
|
}
|
|
1906
1906
|
}), s.mergeFooter && (y.showFooter = !0, y.footerMethod = ({ columns: A, data: B }) => eo({ columns: A, data: B }, s.mergeFooter));
|
|
1907
|
-
},
|
|
1908
|
-
|
|
1909
|
-
}, m = () => (y.editRules =
|
|
1907
|
+
}, x = () => {
|
|
1908
|
+
D.value.commitProxy("query");
|
|
1909
|
+
}, m = () => (y.editRules = r(), D.value.refreshColumn()), b = () => {
|
|
1910
1910
|
y.loading = !0;
|
|
1911
1911
|
}, E = () => {
|
|
1912
1912
|
y.loading = !1;
|
|
1913
|
-
}, O = () => Ot(
|
|
1914
|
-
const A = d.columns[0].type, B = A === "radio" ?
|
|
1915
|
-
return A === "checkbox" && !B.length ? (qe(
|
|
1913
|
+
}, O = () => Ot(D.value), h = () => D.value.getTableData().fullData, g = (R = !1) => {
|
|
1914
|
+
const A = d.columns[0].type, B = A === "radio" ? D.value.getRadioRecord(R) : D.value.getCheckboxRecords(R);
|
|
1915
|
+
return A === "checkbox" && !B.length ? (qe(N("message.tip_selectedRecord")), []) : A === "radio" && !B ? (qe(N("message.tip_selectedRecord")), null) : B;
|
|
1916
1916
|
};
|
|
1917
|
-
let
|
|
1918
|
-
const
|
|
1919
|
-
const R =
|
|
1920
|
-
|
|
1917
|
+
let w;
|
|
1918
|
+
const C = () => {
|
|
1919
|
+
const R = D.value;
|
|
1920
|
+
w = vo.create(
|
|
1921
1921
|
R.$el.querySelector(
|
|
1922
1922
|
".body--wrapper>.vxe-table--header .vxe-header--row"
|
|
1923
1923
|
),
|
|
@@ -1926,13 +1926,13 @@ const qo = ["onUpdate:modelValue"], Ho = { key: 3 }, Go = { key: 4 }, Xo = {
|
|
|
1926
1926
|
handle: ".vxe-header--column",
|
|
1927
1927
|
onEnd: async (A) => {
|
|
1928
1928
|
const B = A.item, j = A.newIndex, H = A.oldIndex, { fullColumn: Z, tableColumn: re } = R.getTableColumn(), me = B.parentNode, Pe = Z[j], X = Z[H];
|
|
1929
|
-
let Ee = !1,
|
|
1930
|
-
if (Pe.fixed ? Ee = !1 : j === 0 || ["checkbox", "radio"].includes(X.type) ? (
|
|
1929
|
+
let Ee = !1, be = "固定列";
|
|
1930
|
+
if (Pe.fixed ? Ee = !1 : j === 0 || ["checkbox", "radio"].includes(X.type) ? (be = "勾选列", Ee = !0) : (X.field === "operate" || j === Z.length - 1) && (Ee = !0, be = "操作列"), Ee) {
|
|
1931
1931
|
const $e = me.children[H];
|
|
1932
1932
|
return j > H ? me.insertBefore(B, $e) : me.insertBefore(
|
|
1933
1933
|
B,
|
|
1934
1934
|
$e && $e.nextElementSibling
|
|
1935
|
-
), ho(
|
|
1935
|
+
), ho(be + "不允许拖动!");
|
|
1936
1936
|
}
|
|
1937
1937
|
const Be = R.getColumnIndex(re[H]), ot = R.getColumnIndex(re[j]), gt = Z.splice(Be, 1)[0];
|
|
1938
1938
|
Z.splice(ot, 0, gt);
|
|
@@ -1946,14 +1946,14 @@ const qo = ["onUpdate:modelValue"], Ho = { key: 3 }, Go = { key: 4 }, Xo = {
|
|
|
1946
1946
|
}
|
|
1947
1947
|
);
|
|
1948
1948
|
}, k = (R) => {
|
|
1949
|
-
|
|
1950
|
-
const { form: A } =
|
|
1951
|
-
Object.assign(A, R),
|
|
1949
|
+
S.value = !1;
|
|
1950
|
+
const { form: A } = D.value.getProxyInfo();
|
|
1951
|
+
Object.assign(A, R), x();
|
|
1952
1952
|
};
|
|
1953
1953
|
n({
|
|
1954
1954
|
getTableData: h,
|
|
1955
1955
|
getSelectRecords: g,
|
|
1956
|
-
refreshData:
|
|
1956
|
+
refreshData: x,
|
|
1957
1957
|
refreshColumn: m,
|
|
1958
1958
|
getInstance: O,
|
|
1959
1959
|
showLoading: b,
|
|
@@ -1976,43 +1976,43 @@ const qo = ["onUpdate:modelValue"], Ho = { key: 3 }, Go = { key: 4 }, Xo = {
|
|
|
1976
1976
|
let q;
|
|
1977
1977
|
Re(() => {
|
|
1978
1978
|
q = setTimeout(() => {
|
|
1979
|
-
|
|
1979
|
+
C();
|
|
1980
1980
|
}, 500);
|
|
1981
1981
|
}), Bt(() => {
|
|
1982
|
-
clearTimeout(q),
|
|
1982
|
+
clearTimeout(q), w && w.destroy();
|
|
1983
1983
|
}), Ze(() => {
|
|
1984
|
-
|
|
1984
|
+
_(), he();
|
|
1985
1985
|
});
|
|
1986
1986
|
const Q = e;
|
|
1987
1987
|
return (R, A) => {
|
|
1988
1988
|
const B = z("vxe-grid");
|
|
1989
|
-
return
|
|
1990
|
-
V(B,
|
|
1989
|
+
return T(), L("div", Jn, [
|
|
1990
|
+
V(B, Ce({
|
|
1991
1991
|
ref_key: "xgrid",
|
|
1992
|
-
ref:
|
|
1993
|
-
}, y, { class: "ut-grid-wrapper" }, ct(
|
|
1992
|
+
ref: D
|
|
1993
|
+
}, y, { class: "ut-grid-wrapper" }, ct(oe(s).events || {}), {
|
|
1994
1994
|
onToolbarButtonClick: I,
|
|
1995
1995
|
onToolbarToolClick: I,
|
|
1996
1996
|
onCellClick: U,
|
|
1997
1997
|
onCellDblclick: W,
|
|
1998
1998
|
onEditActivated: ce
|
|
1999
1999
|
}), null, 16),
|
|
2000
|
-
|
|
2000
|
+
S.value && d.url ? (T(), ie(Kn, {
|
|
2001
2001
|
key: 0,
|
|
2002
2002
|
items: R.items,
|
|
2003
|
-
view:
|
|
2003
|
+
view: oe(u),
|
|
2004
2004
|
onSearch: k,
|
|
2005
|
-
onClose: A[0] || (A[0] = (j) =>
|
|
2005
|
+
onClose: A[0] || (A[0] = (j) => S.value = !1)
|
|
2006
2006
|
}, null, 8, ["items", "view"])) : te("", !0)
|
|
2007
2007
|
]);
|
|
2008
2008
|
};
|
|
2009
2009
|
}
|
|
2010
|
-
}), oo = fe(
|
|
2010
|
+
}), oo = fe(Qn);
|
|
2011
2011
|
console.log(oo);
|
|
2012
|
-
const
|
|
2012
|
+
const Zn = {
|
|
2013
2013
|
name: "UtModalForm"
|
|
2014
|
-
},
|
|
2015
|
-
...
|
|
2014
|
+
}, es = /* @__PURE__ */ K({
|
|
2015
|
+
...Zn,
|
|
2016
2016
|
props: {
|
|
2017
2017
|
record: { default: () => ({}) },
|
|
2018
2018
|
formAttrs: { default: () => ({}) },
|
|
@@ -2027,41 +2027,41 @@ const es = {
|
|
|
2027
2027
|
},
|
|
2028
2028
|
emits: ["close", "confirm"],
|
|
2029
2029
|
setup(o, { expose: n, emit: e }) {
|
|
2030
|
-
const s = o, t = pt(dt()), l = P(!1), a =
|
|
2031
|
-
|
|
2030
|
+
const s = o, t = pt(dt()), l = P(!1), a = we().appContext.config.globalProperties.$serviceApi, c = ue(() => s.items.length ? Ne(s.items, p) : {}), u = ue(() => s.items.length ? ut(s.items, s.dataStatus) : s.items), { t: p } = Te(), d = P(!1), N = P(null), D = () => {
|
|
2031
|
+
N.value.validate(async (f) => {
|
|
2032
2032
|
if (!f) {
|
|
2033
|
-
const { record:
|
|
2034
|
-
if (
|
|
2035
|
-
|
|
2036
|
-
const b = t != null && t.dataProcessMethod ? t == null ? void 0 : t.dataProcessMethod(
|
|
2037
|
-
if (
|
|
2038
|
-
const [E, O] = await ft(a[m](
|
|
2033
|
+
const { record: _, url: x, method: m } = s;
|
|
2034
|
+
if (x) {
|
|
2035
|
+
S();
|
|
2036
|
+
const b = t != null && t.dataProcessMethod ? t == null ? void 0 : t.dataProcessMethod(_) : _;
|
|
2037
|
+
if (x) {
|
|
2038
|
+
const [E, O] = await ft(a[m](x, b));
|
|
2039
2039
|
E || (Qe(), F("confirm", O));
|
|
2040
2040
|
}
|
|
2041
|
-
|
|
2041
|
+
v(), M();
|
|
2042
2042
|
} else
|
|
2043
2043
|
F("confirm");
|
|
2044
2044
|
}
|
|
2045
2045
|
});
|
|
2046
|
-
},
|
|
2046
|
+
}, S = () => {
|
|
2047
2047
|
l.value = !0;
|
|
2048
|
-
},
|
|
2048
|
+
}, v = () => {
|
|
2049
2049
|
l.value = !1;
|
|
2050
|
-
},
|
|
2051
|
-
|
|
2052
|
-
},
|
|
2050
|
+
}, r = (f) => {
|
|
2051
|
+
N.value.validate(f);
|
|
2052
|
+
}, M = () => {
|
|
2053
2053
|
d.value = !1, F("close");
|
|
2054
2054
|
}, y = () => {
|
|
2055
2055
|
d.value = !0;
|
|
2056
2056
|
}, F = e;
|
|
2057
|
-
return n({ showLoading:
|
|
2057
|
+
return n({ showLoading: S, hiddenLoading: v, openModal: y, validateForm: r }), Ze(() => {
|
|
2058
2058
|
y();
|
|
2059
|
-
}), (f,
|
|
2060
|
-
const
|
|
2061
|
-
return
|
|
2062
|
-
V(b,
|
|
2059
|
+
}), (f, _) => {
|
|
2060
|
+
const x = z("vxe-form"), m = z("ut-button"), b = z("vxe-modal");
|
|
2061
|
+
return T(), L("div", null, [
|
|
2062
|
+
V(b, Ce({
|
|
2063
2063
|
modelValue: d.value,
|
|
2064
|
-
"onUpdate:modelValue":
|
|
2064
|
+
"onUpdate:modelValue": _[0] || (_[0] = (E) => d.value = E),
|
|
2065
2065
|
title: f.title,
|
|
2066
2066
|
width: f.width,
|
|
2067
2067
|
height: f.height,
|
|
@@ -2072,12 +2072,12 @@ const es = {
|
|
|
2072
2072
|
"min-height": "300",
|
|
2073
2073
|
"destroy-on-close": "",
|
|
2074
2074
|
resize: "",
|
|
2075
|
-
onClose:
|
|
2075
|
+
onClose: M
|
|
2076
2076
|
}), {
|
|
2077
2077
|
default: Y(() => [
|
|
2078
|
-
V(
|
|
2078
|
+
V(x, Ce({
|
|
2079
2079
|
ref_key: "xForm",
|
|
2080
|
-
ref:
|
|
2080
|
+
ref: N,
|
|
2081
2081
|
data: f.record,
|
|
2082
2082
|
items: u.value,
|
|
2083
2083
|
rules: c.value,
|
|
@@ -2090,13 +2090,13 @@ const es = {
|
|
|
2090
2090
|
status: "warning",
|
|
2091
2091
|
content: "cancel",
|
|
2092
2092
|
icon: "ri-close-line",
|
|
2093
|
-
onTap:
|
|
2093
|
+
onTap: M
|
|
2094
2094
|
}),
|
|
2095
2095
|
V(m, {
|
|
2096
2096
|
status: "u-cyan",
|
|
2097
2097
|
content: "confirm",
|
|
2098
2098
|
icon: "ri-save-3-line",
|
|
2099
|
-
onTap:
|
|
2099
|
+
onTap: D
|
|
2100
2100
|
})
|
|
2101
2101
|
]),
|
|
2102
2102
|
_: 1
|
|
@@ -2104,10 +2104,10 @@ const es = {
|
|
|
2104
2104
|
]);
|
|
2105
2105
|
};
|
|
2106
2106
|
}
|
|
2107
|
-
}),
|
|
2107
|
+
}), ts = fe(es), os = {
|
|
2108
2108
|
name: "UtModalGrid"
|
|
2109
|
-
},
|
|
2110
|
-
...
|
|
2109
|
+
}, ns = /* @__PURE__ */ K({
|
|
2110
|
+
...os,
|
|
2111
2111
|
props: {
|
|
2112
2112
|
checkMethod: {},
|
|
2113
2113
|
columns: { default: () => [] },
|
|
@@ -2129,10 +2129,10 @@ const es = {
|
|
|
2129
2129
|
},
|
|
2130
2130
|
emits: ["close", "confirm", "actived", "buttonClick"],
|
|
2131
2131
|
setup(o, { expose: n, emit: e }) {
|
|
2132
|
-
const s = pt(dt()), t = o, l = P(!1),
|
|
2132
|
+
const s = pt(dt()), t = o, l = P(!1), i = P(null), a = we(), c = a.appContext.config.globalProperties.$hasAuthority, u = a.appContext.config.globalProperties.$serviceApi, p = a.appContext.config.globalProperties.$mode, { t: d } = Te(), N = () => {
|
|
2133
2133
|
const h = t.columns.map((g) => (t.editable ? !g.type && !g.editRender && t.editable && g.editable && (g.editRender = { name: "VxeInput" }) : g.editRender = { enabled: !1 }, g));
|
|
2134
2134
|
return zt(h);
|
|
2135
|
-
},
|
|
2135
|
+
}, D = () => t.items.length ? jt(de(t.items, !0)) : t.items, S = () => t.columns.length ? Ne(t.columns, d) : {}, v = xe({
|
|
2136
2136
|
loading: !1,
|
|
2137
2137
|
border: !0,
|
|
2138
2138
|
pagerConfig: {},
|
|
@@ -2141,7 +2141,7 @@ const es = {
|
|
|
2141
2141
|
height: "auto",
|
|
2142
2142
|
editConfig: {},
|
|
2143
2143
|
rowConfig: { keyField: "_X_ROW_KEY" },
|
|
2144
|
-
editRules:
|
|
2144
|
+
editRules: S(),
|
|
2145
2145
|
proxyConfig: {
|
|
2146
2146
|
form: !0,
|
|
2147
2147
|
// 查询是需要启用表单代理
|
|
@@ -2157,70 +2157,70 @@ const es = {
|
|
|
2157
2157
|
checkMethod: ({ row: h }) => to(h, t),
|
|
2158
2158
|
checkRowKeys: t.checkRowKeys
|
|
2159
2159
|
},
|
|
2160
|
-
columns:
|
|
2161
|
-
}),
|
|
2160
|
+
columns: N()
|
|
2161
|
+
}), r = async () => {
|
|
2162
2162
|
let h = null;
|
|
2163
2163
|
const g = t.columns[0].type;
|
|
2164
|
-
if (g === "checkbox" ? h =
|
|
2164
|
+
if (g === "checkbox" ? h = i.value.getCheckboxRecords() : g === "radio" ? h = i.value.getRadioRecord() : h = i.value.getTableData().fullData, g === "checkbox" && !h.length && !t.addChild)
|
|
2165
2165
|
return qe(d("message.selectedRecord"));
|
|
2166
2166
|
if (g === "radio" && !h)
|
|
2167
2167
|
return qe(d("message.selectedRecord"));
|
|
2168
2168
|
if (at(s.beforeConfirm) && !s.beforeConfirm(h)) return;
|
|
2169
|
-
const { submitUrl:
|
|
2170
|
-
if (
|
|
2171
|
-
|
|
2172
|
-
let
|
|
2169
|
+
const { submitUrl: w } = t;
|
|
2170
|
+
if (w) {
|
|
2171
|
+
x();
|
|
2172
|
+
let C;
|
|
2173
2173
|
try {
|
|
2174
|
-
|
|
2174
|
+
C = await u.post(w, h);
|
|
2175
2175
|
} finally {
|
|
2176
|
-
|
|
2176
|
+
C && b("confirm", C), C && Qe(d("message.operateSuccess")), E(), m();
|
|
2177
2177
|
}
|
|
2178
2178
|
} else
|
|
2179
2179
|
E(), b("confirm", h);
|
|
2180
|
-
},
|
|
2181
|
-
|
|
2180
|
+
}, M = () => {
|
|
2181
|
+
i.value.commitProxy("query");
|
|
2182
2182
|
}, y = () => {
|
|
2183
|
-
|
|
2184
|
-
}, F = () => Ot(
|
|
2183
|
+
v.editRules = S(), i.value.refreshColumn();
|
|
2184
|
+
}, F = () => Ot(i.value), f = (h) => {
|
|
2185
2185
|
b("actived", h);
|
|
2186
|
-
},
|
|
2186
|
+
}, _ = ({ code: h }) => {
|
|
2187
2187
|
b("buttonClick", h);
|
|
2188
|
-
},
|
|
2189
|
-
|
|
2188
|
+
}, x = () => {
|
|
2189
|
+
v.loading = !0;
|
|
2190
2190
|
}, m = () => {
|
|
2191
|
-
|
|
2191
|
+
v.loading = !1;
|
|
2192
2192
|
}, b = e, E = () => {
|
|
2193
2193
|
at(s.beforeClose) && !s.beforeClose() || (l.value = !1, b("close"));
|
|
2194
2194
|
}, O = () => {
|
|
2195
|
-
t.items.length && (
|
|
2195
|
+
t.items.length && (v.formConfig = {
|
|
2196
2196
|
titleWidth: 100,
|
|
2197
2197
|
titleAlign: "right",
|
|
2198
|
-
items:
|
|
2198
|
+
items: D(),
|
|
2199
2199
|
rules: Ne(t.items, d),
|
|
2200
2200
|
validConfig: { showMessage: !1 }
|
|
2201
2201
|
});
|
|
2202
|
-
const h = Zt(
|
|
2203
|
-
Object.assign(
|
|
2202
|
+
const h = Zt(v, t, s, c);
|
|
2203
|
+
Object.assign(v, h), s.mergeFooter && (v.showFooter = !0, v.footerMethod = ({ columns: g, data: w }) => eo({ columns: g, data: w }, s.mergeFooter));
|
|
2204
2204
|
};
|
|
2205
2205
|
return n({
|
|
2206
|
-
refreshData:
|
|
2206
|
+
refreshData: M,
|
|
2207
2207
|
refreshColumn: y,
|
|
2208
2208
|
getInstance: F,
|
|
2209
|
-
showLoading:
|
|
2209
|
+
showLoading: x,
|
|
2210
2210
|
hiddenLoading: m,
|
|
2211
2211
|
onClose: E
|
|
2212
2212
|
}), Ze(() => {
|
|
2213
2213
|
l.value = !0, O();
|
|
2214
2214
|
}), (h, g) => {
|
|
2215
|
-
const
|
|
2216
|
-
return
|
|
2215
|
+
const w = z("vxe-grid"), C = z("ut-button"), k = z("vxe-modal");
|
|
2216
|
+
return T(), L("div", null, [
|
|
2217
2217
|
V(k, {
|
|
2218
2218
|
modelValue: l.value,
|
|
2219
2219
|
"onUpdate:modelValue": g[0] || (g[0] = (I) => l.value = I),
|
|
2220
2220
|
title: h.title,
|
|
2221
2221
|
width: h.width,
|
|
2222
2222
|
height: h.height,
|
|
2223
|
-
loading:
|
|
2223
|
+
loading: v.loading,
|
|
2224
2224
|
"show-footer": h.showFooter,
|
|
2225
2225
|
resize: "",
|
|
2226
2226
|
"destroy-on-close": "",
|
|
@@ -2228,27 +2228,27 @@ const es = {
|
|
|
2228
2228
|
}, {
|
|
2229
2229
|
default: Y(() => [
|
|
2230
2230
|
Me(h.$slots, "default"),
|
|
2231
|
-
V(
|
|
2231
|
+
V(w, Ce({
|
|
2232
2232
|
ref_key: "xGrid",
|
|
2233
|
-
ref:
|
|
2234
|
-
},
|
|
2233
|
+
ref: i
|
|
2234
|
+
}, v, { resizable: "" }, ct(oe(s).events || {}), {
|
|
2235
2235
|
onEditActivated: f,
|
|
2236
|
-
onToolbarButtonClick:
|
|
2237
|
-
onToolbarToolClick:
|
|
2236
|
+
onToolbarButtonClick: _,
|
|
2237
|
+
onToolbarToolClick: _
|
|
2238
2238
|
}), null, 16)
|
|
2239
2239
|
]),
|
|
2240
2240
|
footer: Y(() => [
|
|
2241
2241
|
Me(h.$slots, "bottom"),
|
|
2242
|
-
V(
|
|
2242
|
+
V(C, {
|
|
2243
2243
|
icon: "ri-close-line",
|
|
2244
2244
|
status: "warning",
|
|
2245
2245
|
content: "cancel",
|
|
2246
2246
|
onTap: E
|
|
2247
2247
|
}),
|
|
2248
|
-
V(
|
|
2248
|
+
V(C, {
|
|
2249
2249
|
icon: "ri-save-3-line",
|
|
2250
2250
|
content: "confirm",
|
|
2251
|
-
onTap:
|
|
2251
|
+
onTap: r
|
|
2252
2252
|
})
|
|
2253
2253
|
]),
|
|
2254
2254
|
_: 3
|
|
@@ -2256,12 +2256,11 @@ const es = {
|
|
|
2256
2256
|
]);
|
|
2257
2257
|
};
|
|
2258
2258
|
}
|
|
2259
|
-
}),
|
|
2260
|
-
...
|
|
2259
|
+
}), ss = fe(ns), ls = { class: "ut-upload-wrapper" }, as = /* @__PURE__ */ $("i", { class: "ri-add-line" }, null, -1), is = { name: "FormUpload" }, rs = /* @__PURE__ */ K({
|
|
2260
|
+
...is,
|
|
2261
2261
|
props: {
|
|
2262
2262
|
record: { default: () => ({}) },
|
|
2263
2263
|
field: { default: "" },
|
|
2264
|
-
baseUrl: {},
|
|
2265
2264
|
limit: { default: 1 },
|
|
2266
2265
|
beforeUpload: {},
|
|
2267
2266
|
onSuccess: {},
|
|
@@ -2270,54 +2269,55 @@ const es = {
|
|
|
2270
2269
|
emits: ["remove"],
|
|
2271
2270
|
setup(o, { emit: n }) {
|
|
2272
2271
|
Rt((S) => ({
|
|
2273
|
-
"
|
|
2272
|
+
"594e186a": c.value
|
|
2274
2273
|
}));
|
|
2275
|
-
const e = o,
|
|
2276
|
-
const
|
|
2274
|
+
const e = o, t = we().appContext.config.globalProperties.$url, l = ue(() => {
|
|
2275
|
+
const v = ge.get("authorized-token");
|
|
2277
2276
|
return {
|
|
2278
|
-
Authorization: "Bearer " + JSON.parse(
|
|
2277
|
+
Authorization: "Bearer " + JSON.parse(v).accessToken
|
|
2279
2278
|
};
|
|
2280
|
-
}),
|
|
2281
|
-
if (e.onSuccess)
|
|
2279
|
+
}), i = P([]), a = P(!1), c = P("flex"), u = (S) => e.beforeUpload ? e.beforeUpload(S) : (a.value = !0, !0), p = (S) => {
|
|
2280
|
+
if (a.value = !1, e.onSuccess)
|
|
2282
2281
|
return e.onSuccess(S);
|
|
2283
2282
|
{
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
Object.assign(e.record, { [C]: S.data }), r.value = e.limit > t.value.length ? "flex" : "none";
|
|
2283
|
+
const v = e.field;
|
|
2284
|
+
Object.assign(e.record, { [v]: S.data }), c.value = e.limit > i.value.length ? "flex" : "none";
|
|
2287
2285
|
}
|
|
2288
|
-
},
|
|
2289
|
-
|
|
2290
|
-
|
|
2286
|
+
}, d = (S, v) => {
|
|
2287
|
+
if (a.value = !1, e.onRemove)
|
|
2288
|
+
return e.onRemove(S, i);
|
|
2289
|
+
console.log(S, v), c.value = "flex", D("remove", S, i);
|
|
2290
|
+
}, N = () => {
|
|
2291
2291
|
console.log("....");
|
|
2292
|
-
},
|
|
2293
|
-
return (S,
|
|
2294
|
-
const
|
|
2295
|
-
return ve((
|
|
2296
|
-
V(
|
|
2297
|
-
"file-list":
|
|
2298
|
-
"onUpdate:fileList":
|
|
2299
|
-
action:
|
|
2292
|
+
}, D = n;
|
|
2293
|
+
return (S, v) => {
|
|
2294
|
+
const r = z("el-upload"), M = uo("spinning");
|
|
2295
|
+
return ve((T(), L("div", ls, [
|
|
2296
|
+
V(r, {
|
|
2297
|
+
"file-list": i.value,
|
|
2298
|
+
"onUpdate:fileList": v[0] || (v[0] = (y) => i.value = y),
|
|
2299
|
+
action: oe(t) + "/ufil/file/uploadMultipart",
|
|
2300
2300
|
"list-type": "picture-card",
|
|
2301
|
-
headers:
|
|
2302
|
-
"before-upload":
|
|
2303
|
-
"on-success":
|
|
2304
|
-
"on-preview":
|
|
2305
|
-
"on-remove":
|
|
2301
|
+
headers: l.value,
|
|
2302
|
+
"before-upload": u,
|
|
2303
|
+
"on-success": p,
|
|
2304
|
+
"on-preview": N,
|
|
2305
|
+
"on-remove": d
|
|
2306
2306
|
}, {
|
|
2307
2307
|
default: Y(() => [
|
|
2308
|
-
|
|
2308
|
+
as
|
|
2309
2309
|
]),
|
|
2310
2310
|
_: 1
|
|
2311
2311
|
}, 8, ["file-list", "action", "headers"])
|
|
2312
2312
|
])), [
|
|
2313
|
-
[
|
|
2313
|
+
[M, a.value]
|
|
2314
2314
|
]);
|
|
2315
2315
|
};
|
|
2316
2316
|
}
|
|
2317
|
-
}),
|
|
2317
|
+
}), cs = fe(rs), ds = { style: { cursor: "pointer" } }, us = {
|
|
2318
2318
|
key: 1,
|
|
2319
2319
|
class: "spot"
|
|
2320
|
-
},
|
|
2320
|
+
}, fs = { style: { overflow: "hidden" } }, ms = { key: 3 }, Mt = /* @__PURE__ */ K({
|
|
2321
2321
|
__name: "gante-table-row",
|
|
2322
2322
|
props: {
|
|
2323
2323
|
row: { default: () => ({}) },
|
|
@@ -2332,12 +2332,12 @@ const es = {
|
|
|
2332
2332
|
const s = (t, l) => l.time_mode && t[l.field] ? ee(t[l.field], "yyyy-MM-dd") : Number.isNaN(+t[l.field]) ? t[l.field] : Number(t[l.field]).toFixed(n.options.decimal);
|
|
2333
2333
|
return (t, l) => {
|
|
2334
2334
|
var a, c;
|
|
2335
|
-
const
|
|
2336
|
-
return
|
|
2335
|
+
const i = z("el-tooltip");
|
|
2336
|
+
return T(), L("div", null, [
|
|
2337
2337
|
$("div", {
|
|
2338
2338
|
ref: "cells",
|
|
2339
2339
|
class: "cell detail_click",
|
|
2340
|
-
style:
|
|
2340
|
+
style: ne({
|
|
2341
2341
|
width: t.column.width || t.column.minWidth ? (t.column.width || t.column.minWidth) + "px" : "80px",
|
|
2342
2342
|
padding: (t.column.shrink, "0 6px"),
|
|
2343
2343
|
paddingLeft: t.column.shrink && t.row.g_level === 1 ? "18px" : t.column.shrink ? (t.row.g_level + 1) * 8 + "px" : "",
|
|
@@ -2345,42 +2345,42 @@ const es = {
|
|
|
2345
2345
|
})
|
|
2346
2346
|
}, [
|
|
2347
2347
|
$("span", {
|
|
2348
|
-
style:
|
|
2348
|
+
style: ne({ color: t.row.color }),
|
|
2349
2349
|
class: "cell-value"
|
|
2350
2350
|
}, [
|
|
2351
|
-
t.column.shrink ? (
|
|
2351
|
+
t.column.shrink ? (T(), L("span", {
|
|
2352
2352
|
key: 0,
|
|
2353
2353
|
class: "trigger",
|
|
2354
2354
|
onClick: l[0] || (l[0] = Je((u) => e(), ["stop", "prevent"]))
|
|
2355
2355
|
}, [
|
|
2356
|
-
ve($("span",
|
|
2356
|
+
ve($("span", ds, [
|
|
2357
2357
|
$("span", {
|
|
2358
|
-
style:
|
|
2358
|
+
style: ne([{ display: "inline-block" }, { transform: t.row.open ? "" : "rotateZ(-90deg)" }]),
|
|
2359
2359
|
class: "open-icon"
|
|
2360
2360
|
}, null, 4)
|
|
2361
2361
|
], 512), [
|
|
2362
|
-
[
|
|
2362
|
+
[ke, (a = t.row[t.options.children]) == null ? void 0 : a.length]
|
|
2363
2363
|
])
|
|
2364
2364
|
])) : te("", !0),
|
|
2365
|
-
t.row.g_level && t.column.shrink && t.row[t.column.field] && !t.row[t.options.children] && !t.column.showFooter ? (
|
|
2366
|
-
t.column.showTooltip && ((c = t.row[t.column.field]) == null ? void 0 : c.length) > 12 ? (
|
|
2365
|
+
t.row.g_level && t.column.shrink && t.row[t.column.field] && !t.row[t.options.children] && !t.column.showFooter ? (T(), L("span", us)) : te("", !0),
|
|
2366
|
+
t.column.showTooltip && ((c = t.row[t.column.field]) == null ? void 0 : c.length) > 12 ? (T(), ie(i, {
|
|
2367
2367
|
key: 2,
|
|
2368
2368
|
effect: "dark",
|
|
2369
2369
|
content: t.row[t.column.field],
|
|
2370
2370
|
placement: "top-start"
|
|
2371
2371
|
}, {
|
|
2372
2372
|
default: Y(() => [
|
|
2373
|
-
$("span",
|
|
2373
|
+
$("span", fs, G(s(t.row, t.column)), 1)
|
|
2374
2374
|
]),
|
|
2375
2375
|
_: 1
|
|
2376
|
-
}, 8, ["content"])) : (
|
|
2376
|
+
}, 8, ["content"])) : (T(), L("span", ms, G(s(t.row, t.column)), 1))
|
|
2377
2377
|
], 4)
|
|
2378
2378
|
], 4)
|
|
2379
2379
|
]);
|
|
2380
2380
|
};
|
|
2381
2381
|
}
|
|
2382
2382
|
});
|
|
2383
|
-
function
|
|
2383
|
+
function ps(o) {
|
|
2384
2384
|
return { all: o = o || /* @__PURE__ */ new Map(), on: function(n, e) {
|
|
2385
2385
|
var s = o.get(n);
|
|
2386
2386
|
s ? s.push(e) : o.set(n, [e]);
|
|
@@ -2396,13 +2396,13 @@ function hs(o) {
|
|
|
2396
2396
|
});
|
|
2397
2397
|
} };
|
|
2398
2398
|
}
|
|
2399
|
-
const
|
|
2399
|
+
const le = ps(), hs = { class: "ut-gante-tbody" }, gs = ["onMouseenter", "onMouseleave", "onDblclick"], vs = {
|
|
2400
2400
|
key: 0,
|
|
2401
2401
|
class: "ut-gante-row ut-total-cell"
|
|
2402
|
-
},
|
|
2402
|
+
}, ys = { class: "ut-gante-row--contain" }, _s = {
|
|
2403
2403
|
name: "GanteTableCell"
|
|
2404
|
-
},
|
|
2405
|
-
...
|
|
2404
|
+
}, ws = /* @__PURE__ */ K({
|
|
2405
|
+
..._s,
|
|
2406
2406
|
props: {
|
|
2407
2407
|
columns: {},
|
|
2408
2408
|
tasks: { default: () => [] },
|
|
@@ -2422,35 +2422,35 @@ const se = hs(), gs = { class: "ut-gante-tbody" }, vs = ["onMouseenter", "onMous
|
|
|
2422
2422
|
c.is_hover = !0;
|
|
2423
2423
|
}, l = (a, c) => {
|
|
2424
2424
|
c.is_hover = !1;
|
|
2425
|
-
},
|
|
2426
|
-
|
|
2425
|
+
}, i = (a) => {
|
|
2426
|
+
le.emit("onGanteItemDblclick", a);
|
|
2427
2427
|
};
|
|
2428
2428
|
return (a, c) => {
|
|
2429
2429
|
var p;
|
|
2430
2430
|
const u = z("gante-table-cell", !0);
|
|
2431
|
-
return
|
|
2432
|
-
(
|
|
2431
|
+
return T(), L("div", hs, [
|
|
2432
|
+
(T(!0), L(ae, null, se(a.tasks, (d) => (T(), L("div", {
|
|
2433
2433
|
key: d.id,
|
|
2434
2434
|
class: "ut-gante-row"
|
|
2435
2435
|
}, [
|
|
2436
2436
|
$("div", {
|
|
2437
|
-
class:
|
|
2438
|
-
onMouseenter: (
|
|
2439
|
-
onMouseleave: (
|
|
2440
|
-
onDblclick: Je((
|
|
2437
|
+
class: De(["ut-gante-row--contain", { "gante-hover": d.is_hover }]),
|
|
2438
|
+
onMouseenter: (N) => t(N, d),
|
|
2439
|
+
onMouseleave: (N) => l(N, d),
|
|
2440
|
+
onDblclick: Je((N) => i(d), ["prevent"])
|
|
2441
2441
|
}, [
|
|
2442
|
-
(
|
|
2443
|
-
key:
|
|
2442
|
+
(T(!0), L(ae, null, se(a.columns, (N) => (T(), L("div", {
|
|
2443
|
+
key: N.field,
|
|
2444
2444
|
class: "ut-gante-column"
|
|
2445
2445
|
}, [
|
|
2446
2446
|
V(Mt, {
|
|
2447
2447
|
row: d,
|
|
2448
|
-
column:
|
|
2448
|
+
column: N,
|
|
2449
2449
|
options: a.options
|
|
2450
2450
|
}, null, 8, ["row", "column", "options"])
|
|
2451
2451
|
]))), 128))
|
|
2452
|
-
], 42,
|
|
2453
|
-
d[a.options.children] && d.open ? (
|
|
2452
|
+
], 42, gs),
|
|
2453
|
+
d[a.options.children] && d.open ? (T(), ie(u, {
|
|
2454
2454
|
key: 0,
|
|
2455
2455
|
tasks: d[a.options.children],
|
|
2456
2456
|
columns: a.columns,
|
|
@@ -2458,9 +2458,9 @@ const se = hs(), gs = { class: "ut-gante-tbody" }, vs = ["onMouseenter", "onMous
|
|
|
2458
2458
|
children: "Y"
|
|
2459
2459
|
}, null, 8, ["tasks", "columns", "options"])) : te("", !0)
|
|
2460
2460
|
]))), 128)),
|
|
2461
|
-
a.children !== "Y" && a.options.showFooter && ((p = a.tasks) != null && p.length) ? (
|
|
2462
|
-
$("div",
|
|
2463
|
-
(
|
|
2461
|
+
a.children !== "Y" && a.options.showFooter && ((p = a.tasks) != null && p.length) ? (T(), L("div", vs, [
|
|
2462
|
+
$("div", ys, [
|
|
2463
|
+
(T(!0), L(ae, null, se(a.columns, (d) => (T(), L("div", {
|
|
2464
2464
|
key: d.field,
|
|
2465
2465
|
class: "ut-gante-column"
|
|
2466
2466
|
}, [
|
|
@@ -2481,7 +2481,7 @@ const se = hs(), gs = { class: "ut-gante-tbody" }, vs = ["onMouseenter", "onMous
|
|
|
2481
2481
|
window.navigator.userAgent.indexOf("MSIE 8") > -1 ? (e += n.offsetLeft, s += n.offsetTop) : (e += n.offsetLeft + n.clientLeft, s += n.offsetTop + n.clientTop), n = n.offsetParent;
|
|
2482
2482
|
const t = {};
|
|
2483
2483
|
return t.x = e, t.y = s, t;
|
|
2484
|
-
},
|
|
2484
|
+
}, bs = { class: "gante-thead" }, ks = ["onMousedown"], Cs = { class: "gante-tbody" }, xs = /* @__PURE__ */ K({
|
|
2485
2485
|
__name: "gante-table",
|
|
2486
2486
|
props: {
|
|
2487
2487
|
columns: { default: () => [] },
|
|
@@ -2490,115 +2490,115 @@ const se = hs(), gs = { class: "ut-gante-tbody" }, vs = ["onMouseenter", "onMous
|
|
|
2490
2490
|
},
|
|
2491
2491
|
emits: ["onDragEnd"],
|
|
2492
2492
|
setup(o, { emit: n }) {
|
|
2493
|
-
const e = o, s = P(0), t = P(!1), l = P(0),
|
|
2493
|
+
const e = o, s = P(0), t = P(!1), l = P(0), i = P(null), a = ue(() => e.columns.filter((f) => f.showColumn !== "N"));
|
|
2494
2494
|
let c = 0, u = 0;
|
|
2495
2495
|
const p = { current_index: -1, mouseDown: !1 }, d = (f) => {
|
|
2496
|
-
let
|
|
2497
|
-
const
|
|
2498
|
-
(f.wheelDelta && f.wheelDelta < 0 || f.detail > 0) && (
|
|
2496
|
+
let _ = -200;
|
|
2497
|
+
const x = document.getElementsByClassName("ganteview")[0].scrollTop, m = document.getElementsByClassName("ganteview")[0];
|
|
2498
|
+
(f.wheelDelta && f.wheelDelta < 0 || f.detail > 0) && (_ = 200), N(x, x + _, 4, (b) => {
|
|
2499
2499
|
m.scrollTop = b;
|
|
2500
2500
|
});
|
|
2501
|
-
},
|
|
2502
|
-
if (f ==
|
|
2501
|
+
}, N = (f, _, x, m) => {
|
|
2502
|
+
if (f == _ || typeof f != "number")
|
|
2503
2503
|
return;
|
|
2504
|
-
|
|
2504
|
+
_ = _ || 0, x = x || 2;
|
|
2505
2505
|
const b = function() {
|
|
2506
|
-
if (f = f + (
|
|
2507
|
-
m(
|
|
2506
|
+
if (f = f + (_ - f) / x, Math.abs(f - _) <= 1) {
|
|
2507
|
+
m(_, !0);
|
|
2508
2508
|
return;
|
|
2509
2509
|
}
|
|
2510
2510
|
m(f, !1), window.requestAnimationFrame ? requestAnimationFrame(b) : setTimeout(b, 17);
|
|
2511
2511
|
};
|
|
2512
2512
|
b();
|
|
2513
2513
|
};
|
|
2514
|
-
function
|
|
2515
|
-
const
|
|
2514
|
+
function D(f) {
|
|
2515
|
+
const _ = document.getElementsByTagName("body")[0];
|
|
2516
2516
|
if (p.mouseDown) {
|
|
2517
|
-
const
|
|
2517
|
+
const x = Xe(i.value).x;
|
|
2518
2518
|
let m = f.clientX;
|
|
2519
2519
|
const b = document.getElementsByClassName("gante-table-box")[0];
|
|
2520
2520
|
b.scrollLeft && (m = m + b.scrollLeft);
|
|
2521
|
-
let E = m -
|
|
2521
|
+
let E = m - x + 3;
|
|
2522
2522
|
const O = e.columns[p.current_index].width || e.columns[p.current_index].minWidth;
|
|
2523
|
-
E - 30 <= c + 3 - O && (E = c + 3 - O + 30), s.value = E,
|
|
2523
|
+
E - 30 <= c + 3 - O && (E = c + 3 - O + 30), s.value = E, _.style.cursor = "col-resize";
|
|
2524
2524
|
}
|
|
2525
2525
|
}
|
|
2526
|
-
function
|
|
2526
|
+
function S(f, _) {
|
|
2527
2527
|
if (f.target.tagName === "SPAN" || f.target.tagName === "I")
|
|
2528
2528
|
return;
|
|
2529
|
-
const
|
|
2529
|
+
const x = Xe(i.value).x;
|
|
2530
2530
|
let m = f.target, b = f.clientX;
|
|
2531
2531
|
const E = document.getElementsByClassName("gante-table-box")[0];
|
|
2532
|
-
m.classList.contains("cell") && (m = m.parentNode), E.scrollLeft && (b = b + E.scrollLeft), c = b -
|
|
2532
|
+
m.classList.contains("cell") && (m = m.parentNode), E.scrollLeft && (b = b + E.scrollLeft), c = b - x, console.log("client_x", b), b > Xe(m).x + m.offsetWidth - 10 && (console.log("index", _), u = m.offsetWidth, t.value = !0, p.current_index = _, s.value = c + 3, p.mouseDown = !0, document.addEventListener("mousemove", D, { passive: !1 }), document.addEventListener("mouseup", v, { passive: !1 }));
|
|
2533
2533
|
}
|
|
2534
|
-
function
|
|
2534
|
+
function v() {
|
|
2535
2535
|
if (document.getElementsByTagName("body")[0].style.cursor = "", p.mouseDown && c) {
|
|
2536
2536
|
e.columns[p.current_index].width = u + (s.value - c), console.log("displayColums", a);
|
|
2537
2537
|
let f = 0;
|
|
2538
|
-
const
|
|
2538
|
+
const x = document.getElementsByClassName(
|
|
2539
2539
|
"gante-table-box"
|
|
2540
2540
|
)[0].offsetWidth;
|
|
2541
2541
|
if (a.value.forEach((m) => {
|
|
2542
2542
|
f += m.width || m.minWidth ? Number(m.width || m.minWidth) + 1 : 81;
|
|
2543
|
-
}, 0), console.log("[ str ] >", f), f <
|
|
2543
|
+
}, 0), console.log("[ str ] >", f), f < x) {
|
|
2544
2544
|
const m = e.options.tableWidth || 450, b = f + 2 <= m ? m : f + 2;
|
|
2545
2545
|
F("onDragEnd", b);
|
|
2546
2546
|
}
|
|
2547
|
-
p.mouseDown = !1, t.value = !1, c = 0, u = 0, p.current_index = -1, l.value++, document.removeEventListener("mousemove",
|
|
2547
|
+
p.mouseDown = !1, t.value = !1, c = 0, u = 0, p.current_index = -1, l.value++, document.removeEventListener("mousemove", D, !1), document.removeEventListener("mouseup", v, !1);
|
|
2548
2548
|
}
|
|
2549
2549
|
}
|
|
2550
|
-
function
|
|
2550
|
+
function r(f) {
|
|
2551
2551
|
if (f.target.tagName === "SPAN" || f.target.tagName === "I")
|
|
2552
2552
|
return;
|
|
2553
|
-
let
|
|
2554
|
-
const
|
|
2553
|
+
let _ = f.target;
|
|
2554
|
+
const x = document.getElementsByTagName("body")[0];
|
|
2555
2555
|
let m = f.clientX;
|
|
2556
2556
|
const b = document.getElementsByClassName("gante-table-box")[0];
|
|
2557
|
-
|
|
2557
|
+
_.classList.contains("cell") && (_ = f.target.parentNode), b.scrollLeft && (m = m + b.scrollLeft), m > Xe(_).x + _.offsetWidth - 10 ? x.style.cursor = "col-resize" : x.style.cursor = "";
|
|
2558
2558
|
}
|
|
2559
|
-
function
|
|
2559
|
+
function M() {
|
|
2560
2560
|
document.getElementsByTagName("body")[0].style.cursor = "";
|
|
2561
2561
|
}
|
|
2562
2562
|
const y = (f) => ({
|
|
2563
2563
|
width: f.width || f.minWidth ? (f.width || f.minWidth) + "px" : "80px",
|
|
2564
2564
|
textAlign: f.textAlign || e.options.textAlign || "center"
|
|
2565
2565
|
});
|
|
2566
|
-
|
|
2566
|
+
le.off("onDragEnd"), le.on("onDragEnd", () => {
|
|
2567
2567
|
l.value++;
|
|
2568
2568
|
});
|
|
2569
2569
|
const F = n;
|
|
2570
|
-
return (f,
|
|
2570
|
+
return (f, _) => (T(), L("div", {
|
|
2571
2571
|
ref_key: "gante_table",
|
|
2572
|
-
ref:
|
|
2572
|
+
ref: i,
|
|
2573
2573
|
class: "gante-table",
|
|
2574
2574
|
onMousewheelPassive: d,
|
|
2575
2575
|
"on:DOMMouseScrollPassive": d
|
|
2576
2576
|
}, [
|
|
2577
|
-
$("div",
|
|
2578
|
-
(
|
|
2579
|
-
key:
|
|
2577
|
+
$("div", bs, [
|
|
2578
|
+
(T(!0), L(ae, null, se(a.value, (x, m) => (T(), L("div", {
|
|
2579
|
+
key: x.field,
|
|
2580
2580
|
class: "gante-th",
|
|
2581
|
-
onMousedown: (b) =>
|
|
2582
|
-
onMousemove:
|
|
2583
|
-
onMouseout:
|
|
2581
|
+
onMousedown: (b) => S(b, m),
|
|
2582
|
+
onMousemove: r,
|
|
2583
|
+
onMouseout: M
|
|
2584
2584
|
}, [
|
|
2585
2585
|
$("div", {
|
|
2586
2586
|
class: "cell",
|
|
2587
|
-
style:
|
|
2587
|
+
style: ne(y(x))
|
|
2588
2588
|
}, [
|
|
2589
|
-
rt(G(
|
|
2590
|
-
|
|
2589
|
+
rt(G(x.label) + " ", 1),
|
|
2590
|
+
x.sort_type ? (T(), L("span", {
|
|
2591
2591
|
key: 0,
|
|
2592
|
-
class:
|
|
2593
|
-
ascend:
|
|
2594
|
-
descend:
|
|
2592
|
+
class: De([{
|
|
2593
|
+
ascend: x.sort_type == "asc",
|
|
2594
|
+
descend: x.sort_type == "desc"
|
|
2595
2595
|
}, "caret-wrapper"])
|
|
2596
2596
|
}, null, 2)) : te("", !0)
|
|
2597
2597
|
], 4)
|
|
2598
|
-
], 40,
|
|
2598
|
+
], 40, ks))), 128))
|
|
2599
2599
|
]),
|
|
2600
|
-
$("div",
|
|
2601
|
-
(
|
|
2600
|
+
$("div", Cs, [
|
|
2601
|
+
(T(), ie(ws, {
|
|
2602
2602
|
key: l.value,
|
|
2603
2603
|
tasks: f.data,
|
|
2604
2604
|
columns: a.value,
|
|
@@ -2607,19 +2607,19 @@ const se = hs(), gs = { class: "ut-gante-tbody" }, vs = ["onMouseenter", "onMous
|
|
|
2607
2607
|
]),
|
|
2608
2608
|
ve($("div", {
|
|
2609
2609
|
id: "gante-table-column-resize-proxy",
|
|
2610
|
-
style:
|
|
2610
|
+
style: ne({ left: s.value + "px" })
|
|
2611
2611
|
}, null, 4), [
|
|
2612
|
-
[
|
|
2612
|
+
[ke, t.value]
|
|
2613
2613
|
])
|
|
2614
2614
|
], 544));
|
|
2615
2615
|
}
|
|
2616
|
-
}),
|
|
2616
|
+
}), Ds = {
|
|
2617
2617
|
"data-drag": "true",
|
|
2618
2618
|
class: "ganter_drag_hover"
|
|
2619
|
-
},
|
|
2619
|
+
}, $s = {
|
|
2620
2620
|
name: "GanteTimelineItem"
|
|
2621
|
-
},
|
|
2622
|
-
|
|
2621
|
+
}, Ms = /* @__PURE__ */ K({
|
|
2622
|
+
...$s,
|
|
2623
2623
|
props: {
|
|
2624
2624
|
task: { default: () => ({}) },
|
|
2625
2625
|
columns: {},
|
|
@@ -2629,8 +2629,8 @@ const se = hs(), gs = { class: "ut-gante-tbody" }, vs = ["onMouseenter", "onMous
|
|
|
2629
2629
|
options: { default: () => ({}) }
|
|
2630
2630
|
},
|
|
2631
2631
|
setup(o) {
|
|
2632
|
-
const n = o, e =
|
|
2633
|
-
let t =
|
|
2632
|
+
const n = o, e = xe(n.task), s = P(!1);
|
|
2633
|
+
let t = xe({
|
|
2634
2634
|
startX: 0,
|
|
2635
2635
|
// 开始的位置
|
|
2636
2636
|
mouseDown: !1,
|
|
@@ -2653,97 +2653,97 @@ const se = hs(), gs = { class: "ut-gante-tbody" }, vs = ["onMouseenter", "onMous
|
|
|
2653
2653
|
// 结束时间的属性名
|
|
2654
2654
|
moveType: ""
|
|
2655
2655
|
// 拖动的方式 left: 拖动左边时间 right: 拖动右边时间 drag: 拖动整体
|
|
2656
|
-
}), l = 0,
|
|
2657
|
-
function a(
|
|
2658
|
-
|
|
2656
|
+
}), l = 0, i = !1;
|
|
2657
|
+
function a(r) {
|
|
2658
|
+
i = !0, l = requestAnimationFrame(() => {
|
|
2659
2659
|
c();
|
|
2660
|
-
let y =
|
|
2661
|
-
if (n.task &&
|
|
2662
|
-
let f = document.createElement("div"),
|
|
2663
|
-
f.setAttribute("class", "gante-toast"), document.getElementsByClassName("gante-toast")[0] && (f = document.getElementsByClassName("gante-toast")[0], f.style.display = "block",
|
|
2664
|
-
let
|
|
2660
|
+
let y = r.clientX + 15, F = r.clientY + 15;
|
|
2661
|
+
if (n.task && i) {
|
|
2662
|
+
let f = document.createElement("div"), _ = !0;
|
|
2663
|
+
f.setAttribute("class", "gante-toast"), document.getElementsByClassName("gante-toast")[0] && (f = document.getElementsByClassName("gante-toast")[0], f.style.display = "block", _ = !1);
|
|
2664
|
+
let x = "";
|
|
2665
2665
|
n.columns.filter(
|
|
2666
2666
|
(m) => m.showToast || m.time_mode === 1 || m.time_mode === 2
|
|
2667
2667
|
).forEach((m) => {
|
|
2668
|
-
|
|
2669
|
-
}), (f.innerHTML !=
|
|
2668
|
+
x += `<p>${m.label}: ${m.label ? m.time_mode ? v(e[m.field]) : e[m.field] || "" : ""}</p>`;
|
|
2669
|
+
}), (f.innerHTML != x || x == "") && (f.innerHTML = x), f.clientHeight + F > window.innerHeight && (r.clientY >= window.innerHeight - f.clientHeight ? F = r.clientY - 10 - f.clientHeight : F = window.innerHeight - f.clientHeight), f.clientWidth + y > window.innerWidth && (y = window.innerWidth - f.clientWidth), f.style.left = y + "px", f.style.top = F + "px", _ && document.getElementsByTagName("body")[0].appendChild(f);
|
|
2670
2670
|
}
|
|
2671
2671
|
});
|
|
2672
2672
|
}
|
|
2673
2673
|
function c() {
|
|
2674
|
-
|
|
2674
|
+
i && (s.value = !!n.options.resizable || !!e.resizable);
|
|
2675
2675
|
}
|
|
2676
2676
|
function u() {
|
|
2677
|
-
var
|
|
2678
|
-
t.mouseDown || (
|
|
2677
|
+
var r;
|
|
2678
|
+
t.mouseDown || (i = !1, s.value = !1, cancelAnimationFrame(l), ((r = document.getElementsByClassName("gante-toast")) == null ? void 0 : r.length) > 0 && (document.getElementsByClassName("gante-toast")[0].style.display = "none"));
|
|
2679
2679
|
}
|
|
2680
|
-
function p(
|
|
2680
|
+
function p(r, M) {
|
|
2681
2681
|
if (e) {
|
|
2682
2682
|
if (!n.options.parentDragEnabled && e[n.options.children])
|
|
2683
2683
|
return;
|
|
2684
|
-
t.mouseDown = !0, t.startX =
|
|
2684
|
+
t.mouseDown = !0, t.startX = r.clientX, t.moveType = M, t.start_width = e.width, t.start_left = e.left, n.columns.forEach((y) => {
|
|
2685
2685
|
e[y.field] && (y.time_mode === 1 ? (t.startAttr = y.field, t.start_time = e[y.field]) : y.time_mode === 2 && (t.endAttr = y.field, t.end_time = e[y.field]));
|
|
2686
|
-
}), t.end_time || (t.endAttr = "end_time", t.end_time = e.end_time), n.options.timeScale === 1 || n.options.timeScale === 2 ? (t.scale = 1e3 * 60 * 60 / n.time_1px, t.mode = 1) : (t.scale = 1e3 * 60 * 60 * 24 / n.time_1px, t.mode = 2), document.body.classList.add("unselecttable"),
|
|
2686
|
+
}), t.end_time || (t.endAttr = "end_time", t.end_time = e.end_time), n.options.timeScale === 1 || n.options.timeScale === 2 ? (t.scale = 1e3 * 60 * 60 / n.time_1px, t.mode = 1) : (t.scale = 1e3 * 60 * 60 * 24 / n.time_1px, t.mode = 2), document.body.classList.add("unselecttable"), M === "drag" ? document.body.style.cursor = "grabbing" : document.body.style.cursor = "e-resize", document.addEventListener("mousemove", d, { passive: !1 }), document.addEventListener("mouseup", N, { passive: !1 });
|
|
2687
2687
|
}
|
|
2688
2688
|
}
|
|
2689
|
-
function d(
|
|
2689
|
+
function d(r) {
|
|
2690
2690
|
if (t.mouseDown) {
|
|
2691
2691
|
u();
|
|
2692
|
-
let
|
|
2693
|
-
t.moveType == "left" ? (document.body.style.cursor = "e-resize",
|
|
2694
|
-
let F = Math.abs(
|
|
2692
|
+
let M = 0, y = 0;
|
|
2693
|
+
t.moveType == "left" ? (document.body.style.cursor = "e-resize", r.clientX > t.startX ? (M = -1, y = 1) : r.clientX < t.startX && (M = 1, y = -1)) : t.moveType == "right" ? (document.body.style.cursor = "e-resize", r.clientX > t.startX ? M = 1 : r.clientX < t.startX && (M = -1)) : t.moveType == "drag" && (document.body.style.cursor = "grabbing", r.clientX > t.startX ? (y = 1, M = 1) : r.clientX < t.startX && (y = -1, M = -1));
|
|
2694
|
+
let F = Math.abs(r.clientX - t.startX);
|
|
2695
2695
|
y === -1 && F > t.start_left && (F = t.start_left);
|
|
2696
|
-
let f = t.start_width + F *
|
|
2696
|
+
let f = t.start_width + F * M, _ = Math.round(t.start_left + F * y);
|
|
2697
2697
|
if (t.moveType === "drag" && (f = Math.round(t.start_width)), y === 1) {
|
|
2698
|
-
const g = new Date(n.end_time).getTime() - new Date(n.start_time).getTime(),
|
|
2699
|
-
|
|
2698
|
+
const g = new Date(n.end_time).getTime() - new Date(n.start_time).getTime(), w = Math.round(g) * n.options.cellWidth / (24 * 60 * 60 * 1e3);
|
|
2699
|
+
_ + f > w && (_ = Math.round(w) - f, F = _ - t.start_left);
|
|
2700
2700
|
}
|
|
2701
|
-
const
|
|
2701
|
+
const x = M * Math.ceil(F / t.scale);
|
|
2702
2702
|
let m = 60 * 60 * 1e3, b = t.start_time, E = t.end_time;
|
|
2703
2703
|
t.mode === 2 && (m = 60 * 60 * 1e3 * 24);
|
|
2704
2704
|
const O = b, h = E;
|
|
2705
2705
|
t.moveType === "left" ? b = ee(
|
|
2706
|
-
O -
|
|
2706
|
+
O - x * m,
|
|
2707
2707
|
n.options.dateFormat
|
|
2708
2708
|
) : t.moveType === "right" ? E = ee(
|
|
2709
|
-
h +
|
|
2709
|
+
h + x * m,
|
|
2710
2710
|
n.options.dateFormat
|
|
2711
2711
|
) : (b = ee(
|
|
2712
|
-
O +
|
|
2712
|
+
O + x * m,
|
|
2713
2713
|
n.options.dateFormat
|
|
2714
2714
|
), E = ee(
|
|
2715
|
-
h +
|
|
2715
|
+
h + x * m,
|
|
2716
2716
|
n.options.dateFormat
|
|
2717
|
-
)), f <= 10 && t.moveType !== "drag" && (f = 10,
|
|
2717
|
+
)), f <= 10 && t.moveType !== "drag" && (f = 10, _ = t.start_left + (t.start_width - 10) * y, t.moveType === "left" ? b = ee(
|
|
2718
2718
|
h - m * Math.ceil(10 / t.scale),
|
|
2719
2719
|
n.options.dateFormat
|
|
2720
2720
|
) : t.moveType === "right" && (E = ee(
|
|
2721
2721
|
O + m * Math.ceil(10 / t.scale),
|
|
2722
2722
|
n.options.dateFormat
|
|
2723
|
-
))), e.width = f, e.left = Math.round(
|
|
2723
|
+
))), e.width = f, e.left = Math.round(_), e[t.startAttr] = b, e[t.endAttr] = E, e.start_time = new Date(E).getTime(), e.end_time = new Date(h).getTime(), D();
|
|
2724
2724
|
}
|
|
2725
2725
|
}
|
|
2726
|
-
function
|
|
2727
|
-
if (console.log("up====="), (e.start_time < n.start_time || e.end_time > n.end_time) && (e.start_time < n.start_time &&
|
|
2726
|
+
function N(r) {
|
|
2727
|
+
if (console.log("up====="), (e.start_time < n.start_time || e.end_time > n.end_time) && (e.start_time < n.start_time && le.emit("triggerInit", {
|
|
2728
2728
|
startTime: e.start_time,
|
|
2729
2729
|
endTime: n.end_time
|
|
2730
|
-
}), e.end_time > n.end_time &&
|
|
2730
|
+
}), e.end_time > n.end_time && le.emit("triggerInit", {
|
|
2731
2731
|
startTime: n.start_time,
|
|
2732
2732
|
endTime: e.end_time
|
|
2733
2733
|
})), !n.options.crossColumnEnabled) {
|
|
2734
2734
|
e.left = Math.round(e.left / n.options.cellWidth) * n.options.cellWidth;
|
|
2735
|
-
const
|
|
2736
|
-
let f = t.start_time,
|
|
2737
|
-
const
|
|
2735
|
+
const M = Math.abs(e.left - t.start_left), F = (e.left - t.start_left > 0 ? 1 : -1) * Math.ceil(M / t.scale);
|
|
2736
|
+
let f = t.start_time, _ = t.end_time;
|
|
2737
|
+
const x = f, m = _;
|
|
2738
2738
|
f = ee(
|
|
2739
|
-
|
|
2739
|
+
x + F * 60 * 60 * 1e3,
|
|
2740
2740
|
n.options.dateFormat
|
|
2741
|
-
),
|
|
2741
|
+
), _ = ee(
|
|
2742
2742
|
m + F * 60 * 60 * 1e3,
|
|
2743
2743
|
n.options.dateFormat
|
|
2744
|
-
), e[t.startAttr] = f, e[t.endAttr] =
|
|
2744
|
+
), e[t.startAttr] = f, e[t.endAttr] = _, e.start_time = new Date(f).getTime(), e.end_time = new Date(_).getTime();
|
|
2745
2745
|
}
|
|
2746
|
-
document.removeEventListener("mousemove", d, !1), document.removeEventListener("mouseup",
|
|
2746
|
+
document.removeEventListener("mousemove", d, !1), document.removeEventListener("mouseup", N, !1), document.body.classList.remove("unselecttable"), document.body.style.cursor = "", e.objectVersionNumber = n.task.objectVersionNumber, t.startX != r.clientX && le.emit("change", {
|
|
2747
2747
|
task: e,
|
|
2748
2748
|
from: {
|
|
2749
2749
|
start: ee(t.start_time, "yyyy-MM-dd HH:mm:ss"),
|
|
@@ -2784,60 +2784,60 @@ const se = hs(), gs = { class: "ut-gante-tbody" }, vs = ["onMouseenter", "onMous
|
|
|
2784
2784
|
moveType: ""
|
|
2785
2785
|
}, u();
|
|
2786
2786
|
}
|
|
2787
|
-
const
|
|
2788
|
-
const
|
|
2787
|
+
const D = () => {
|
|
2788
|
+
const r = document.getElementsByClassName(
|
|
2789
2789
|
"gante-toast"
|
|
2790
2790
|
)[0];
|
|
2791
|
-
if (
|
|
2792
|
-
|
|
2793
|
-
let
|
|
2791
|
+
if (r) {
|
|
2792
|
+
r.style.display = "block";
|
|
2793
|
+
let M = "";
|
|
2794
2794
|
n.columns.filter(
|
|
2795
2795
|
(y) => e[y.field] && (y.showToast || y.time_mode == 1 || y.time_mode == 2)
|
|
2796
2796
|
).forEach((y) => {
|
|
2797
|
-
|
|
2798
|
-
}), (
|
|
2797
|
+
M += `<p>${y.label}: ${y.time_mode ? v(e[y.field]) : e[y.field] || ""}</p>`;
|
|
2798
|
+
}), (r.innerHTML != M || M == "") && (r.innerHTML = M);
|
|
2799
2799
|
}
|
|
2800
|
-
},
|
|
2801
|
-
|
|
2802
|
-
},
|
|
2803
|
-
return (
|
|
2804
|
-
style:
|
|
2805
|
-
cursor:
|
|
2800
|
+
}, S = (r) => {
|
|
2801
|
+
le.emit("onGanteItemDblclick", r);
|
|
2802
|
+
}, v = (r) => r && ee(r, n.options.dateFormat);
|
|
2803
|
+
return (r, M) => (T(), L("div", {
|
|
2804
|
+
style: ne({
|
|
2805
|
+
cursor: oe(t).mouseDown ? "grabbing" : "grab",
|
|
2806
2806
|
width: e.width ? e.width + "px" : 0,
|
|
2807
2807
|
transform: `translate3d(${e.left ? e.left + "px" : 0},10px,0)`,
|
|
2808
|
-
transition:
|
|
2808
|
+
transition: oe(t).mouseDown ? "null" : "width .5s linear, opacity .2s ease",
|
|
2809
2809
|
background: e.bg_color ? e.bg_color : "#65c16f",
|
|
2810
2810
|
borderColor: e.bg_color ? `${e.bg_color} ${e.bg_color} transparent` : "#3c9445 #3c9445 transparent"
|
|
2811
2811
|
}),
|
|
2812
|
-
class:
|
|
2812
|
+
class: De(["ganteview-item", { "has-child": e[r.options.children] }]),
|
|
2813
2813
|
onMousemovePassive: a,
|
|
2814
2814
|
onMouseleave: u,
|
|
2815
|
-
onMousedown:
|
|
2816
|
-
onDblclick:
|
|
2815
|
+
onMousedown: M[2] || (M[2] = (y) => p(y, "drag")),
|
|
2816
|
+
onDblclick: M[3] || (M[3] = (y) => S(e))
|
|
2817
2817
|
}, [
|
|
2818
2818
|
ve($("span", {
|
|
2819
2819
|
"data-drag": "true",
|
|
2820
2820
|
class: "left-drag-line",
|
|
2821
|
-
onMousedown:
|
|
2821
|
+
onMousedown: M[0] || (M[0] = Je((y) => p(y, "left"), ["stop"]))
|
|
2822
2822
|
}, null, 544), [
|
|
2823
|
-
[
|
|
2823
|
+
[ke, s.value]
|
|
2824
2824
|
]),
|
|
2825
2825
|
ve($("span", {
|
|
2826
2826
|
"data-drag": "true",
|
|
2827
2827
|
class: "right-drag-line",
|
|
2828
|
-
onMousedown:
|
|
2828
|
+
onMousedown: M[1] || (M[1] = Je((y) => p(y, "right"), ["stop"]))
|
|
2829
2829
|
}, null, 544), [
|
|
2830
|
-
[
|
|
2830
|
+
[ke, s.value]
|
|
2831
2831
|
]),
|
|
2832
|
-
ve($("div",
|
|
2833
|
-
[
|
|
2832
|
+
ve($("div", Ds, null, 512), [
|
|
2833
|
+
[ke, s.value]
|
|
2834
2834
|
])
|
|
2835
2835
|
], 38));
|
|
2836
2836
|
}
|
|
2837
|
-
}),
|
|
2837
|
+
}), Ts = /* @__PURE__ */ Se(Ms, [["__scopeId", "data-v-3d587822"]]), Ss = { class: "ganteview-content" }, Es = ["onMouseenter", "onMouseleave"], Is = /* @__PURE__ */ $("span", { style: { display: "none" } }, "1", -1), Ns = { class: "ganteview-ones gante-bottom-wrapper" }, Fs = ["innerHTML"], Ls = {
|
|
2838
2838
|
name: "GanteTimelineChunk"
|
|
2839
|
-
},
|
|
2840
|
-
...
|
|
2839
|
+
}, As = /* @__PURE__ */ K({
|
|
2840
|
+
...Ls,
|
|
2841
2841
|
props: {
|
|
2842
2842
|
columns: {},
|
|
2843
2843
|
dayilySummary: {},
|
|
@@ -2857,63 +2857,63 @@ const se = hs(), gs = { class: "ut-gante-tbody" }, vs = ["onMouseenter", "onMous
|
|
|
2857
2857
|
}
|
|
2858
2858
|
return (s, t) => {
|
|
2859
2859
|
const l = z("gante-timeline-chunk", !0);
|
|
2860
|
-
return
|
|
2861
|
-
(
|
|
2860
|
+
return T(), L("div", Ss, [
|
|
2861
|
+
(T(!0), L(ae, null, se(s.tasks, (i, a) => (T(), L("div", {
|
|
2862
2862
|
key: a,
|
|
2863
2863
|
class: "ganteview-ones"
|
|
2864
2864
|
}, [
|
|
2865
2865
|
$("div", {
|
|
2866
|
-
class:
|
|
2867
|
-
onMouseenter: (c) => n(
|
|
2868
|
-
onMouseleave: (c) => e(
|
|
2866
|
+
class: De(["ganteview-content-one", { "gante-hover": i.is_hover }]),
|
|
2867
|
+
onMouseenter: (c) => n(i),
|
|
2868
|
+
onMouseleave: (c) => e(i)
|
|
2869
2869
|
}, [
|
|
2870
|
-
|
|
2870
|
+
i.start_time ? (T(), ie(Ts, {
|
|
2871
2871
|
key: 0,
|
|
2872
2872
|
start_time: s.start_time,
|
|
2873
2873
|
end_time: s.end_time,
|
|
2874
|
-
task:
|
|
2874
|
+
task: i,
|
|
2875
2875
|
columns: s.columns,
|
|
2876
2876
|
time_1px: s.time_1px,
|
|
2877
2877
|
options: s.options
|
|
2878
2878
|
}, null, 8, ["start_time", "end_time", "task", "columns", "time_1px", "options"])) : te("", !0)
|
|
2879
|
-
], 42,
|
|
2880
|
-
|
|
2879
|
+
], 42, Es),
|
|
2880
|
+
i[s.options.children] ? ve((T(), ie(l, {
|
|
2881
2881
|
key: 0,
|
|
2882
2882
|
start_time: s.start_time,
|
|
2883
2883
|
end_time: s.end_time,
|
|
2884
2884
|
columns: s.columns,
|
|
2885
2885
|
time_1px: s.time_1px,
|
|
2886
2886
|
options: s.options,
|
|
2887
|
-
tasks:
|
|
2887
|
+
tasks: i[s.options.children]
|
|
2888
2888
|
}, {
|
|
2889
2889
|
default: Y(() => [
|
|
2890
|
-
|
|
2890
|
+
Is
|
|
2891
2891
|
]),
|
|
2892
2892
|
_: 2
|
|
2893
2893
|
}, 1032, ["start_time", "end_time", "columns", "time_1px", "options", "tasks"])), [
|
|
2894
|
-
[
|
|
2894
|
+
[ke, i.open]
|
|
2895
2895
|
]) : te("", !0)
|
|
2896
2896
|
]))), 128)),
|
|
2897
|
-
$("div",
|
|
2898
|
-
(
|
|
2899
|
-
key:
|
|
2897
|
+
$("div", Ns, [
|
|
2898
|
+
(T(!0), L(ae, null, se(s.dateRange, (i) => (T(), L("div", {
|
|
2899
|
+
key: i.title,
|
|
2900
2900
|
class: "ganteview-item gante-bottom-item",
|
|
2901
|
-
style:
|
|
2901
|
+
style: ne({ width: s.options.cellWidth + "px" })
|
|
2902
2902
|
}, [
|
|
2903
|
-
s.dayilySummary ? (
|
|
2903
|
+
s.dayilySummary ? (T(), L("div", {
|
|
2904
2904
|
key: 0,
|
|
2905
|
-
innerHTML: s.dayilySummary[
|
|
2906
|
-
}, null, 8,
|
|
2905
|
+
innerHTML: s.dayilySummary[i.title]
|
|
2906
|
+
}, null, 8, Fs)) : te("", !0)
|
|
2907
2907
|
], 4))), 128))
|
|
2908
2908
|
]),
|
|
2909
2909
|
Me(s.$slots, "default")
|
|
2910
2910
|
]);
|
|
2911
2911
|
};
|
|
2912
2912
|
}
|
|
2913
|
-
}),
|
|
2913
|
+
}), Ps = {
|
|
2914
2914
|
key: 0,
|
|
2915
2915
|
class: "current_move_time"
|
|
2916
|
-
},
|
|
2916
|
+
}, Bs = { class: "ganteview-toptime" }, Os = ["title"], Rs = { class: "ganteview-bottomtime" }, Us = ["title"], Vs = /* @__PURE__ */ K({
|
|
2917
2917
|
__name: "gante-timeline",
|
|
2918
2918
|
props: {
|
|
2919
2919
|
start_time: {},
|
|
@@ -2925,19 +2925,19 @@ const se = hs(), gs = { class: "ut-gante-tbody" }, vs = ["onMouseenter", "onMous
|
|
|
2925
2925
|
options: { default: () => ({}) }
|
|
2926
2926
|
},
|
|
2927
2927
|
setup(o, { expose: n }) {
|
|
2928
|
-
const e = o, s = P([]), t = P([]), l = P(0),
|
|
2928
|
+
const e = o, s = P([]), t = P([]), l = P(0), i = P(0), a = P(!1), c = P(""), u = P(null), p = P({
|
|
2929
2929
|
width: 0,
|
|
2930
2930
|
left: 0
|
|
2931
2931
|
});
|
|
2932
|
-
let d,
|
|
2933
|
-
function
|
|
2934
|
-
document.getElementsByClassName("gante-tbody")[0].style.top = -
|
|
2935
|
-
const
|
|
2932
|
+
let d, N = 0, D = !0;
|
|
2933
|
+
function S(_) {
|
|
2934
|
+
document.getElementsByClassName("gante-tbody")[0].style.top = -_.target.scrollTop + "px";
|
|
2935
|
+
const x = document.getElementsByClassName(
|
|
2936
2936
|
"ganteview-header"
|
|
2937
2937
|
)[0];
|
|
2938
|
-
|
|
2939
|
-
const m =
|
|
2940
|
-
if (m.scrollHeight <= m.scrollTop + m.clientHeight &&
|
|
2938
|
+
x.style.left = -_.target.scrollLeft + "px";
|
|
2939
|
+
const m = _.target;
|
|
2940
|
+
if (m.scrollHeight <= m.scrollTop + m.clientHeight && D && (D = !1, le.emit("onLoad")), m.scrollLeft >= 0) {
|
|
2941
2941
|
for (const b of s.value)
|
|
2942
2942
|
if (b.left + b.width >= m.scrollLeft) {
|
|
2943
2943
|
c.value = b.date;
|
|
@@ -2945,19 +2945,19 @@ const se = hs(), gs = { class: "ut-gante-tbody" }, vs = ["onMouseenter", "onMous
|
|
|
2945
2945
|
}
|
|
2946
2946
|
}
|
|
2947
2947
|
}
|
|
2948
|
-
const
|
|
2948
|
+
const v = () => {
|
|
2949
2949
|
l.value = 0;
|
|
2950
|
-
let
|
|
2951
|
-
const
|
|
2950
|
+
let _ = 0;
|
|
2951
|
+
const x = u.value.offsetWidth;
|
|
2952
2952
|
let m = 0, b, E = 1;
|
|
2953
2953
|
switch (e.options.timeScale) {
|
|
2954
2954
|
//日
|
|
2955
2955
|
case 1:
|
|
2956
|
-
b = new Date(e.start_time),
|
|
2956
|
+
b = new Date(e.start_time), _ = 60 * 60 * 1 * 24 * 1e3 / e.options.cellWidth, d = b;
|
|
2957
2957
|
break;
|
|
2958
2958
|
// 周
|
|
2959
2959
|
case 2:
|
|
2960
|
-
b = new Date(e.start_time - 7 * 24 * 60 * 60 * 1e3),
|
|
2960
|
+
b = new Date(e.start_time - 7 * 24 * 60 * 60 * 1e3), _ = 7 * 24 * 60 * 60 * 1e3 / e.options.cellWidth, d = new Date(
|
|
2961
2961
|
b.getFullYear(),
|
|
2962
2962
|
b.getMonth(),
|
|
2963
2963
|
b.getDate() - (b.getDay() + 7) % 7
|
|
@@ -2965,12 +2965,12 @@ const se = hs(), gs = { class: "ut-gante-tbody" }, vs = ["onMouseenter", "onMous
|
|
|
2965
2965
|
break;
|
|
2966
2966
|
// 月
|
|
2967
2967
|
case 3:
|
|
2968
|
-
b = new Date(e.start_time - 30 * 24 * 60 * 60 * 1e3),
|
|
2968
|
+
b = new Date(e.start_time - 30 * 24 * 60 * 60 * 1e3), _ = 30 * 24 * 60 * 60 * 1e3 / e.options.cellWidth, d = new Date(b.getFullYear(), b.getMonth(), 1), b = d, E = 2;
|
|
2969
2969
|
break;
|
|
2970
2970
|
// 季
|
|
2971
2971
|
case 4:
|
|
2972
2972
|
{
|
|
2973
|
-
b = new Date(e.start_time - 90 * 24 * 60 * 60 * 1e3),
|
|
2973
|
+
b = new Date(e.start_time - 90 * 24 * 60 * 60 * 1e3), _ = 90 * 24 * 60 * 60 * 1e3 / e.options.cellWidth;
|
|
2974
2974
|
let O = 0;
|
|
2975
2975
|
const h = b.getMonth() + 1;
|
|
2976
2976
|
h >= 1 && h <= 3 ? O = 0 : h >= 4 && h <= 6 ? O = 3 : h >= 7 && h <= 9 ? O = 6 : h >= 10 && h <= 12 && (O = 9), d = new Date(b.getFullYear(), O, 1), b = d, E = 2;
|
|
@@ -2978,130 +2978,130 @@ const se = hs(), gs = { class: "ut-gante-tbody" }, vs = ["onMouseenter", "onMous
|
|
|
2978
2978
|
break;
|
|
2979
2979
|
// 年
|
|
2980
2980
|
case 5:
|
|
2981
|
-
b = new Date(e.start_time - 183 * 24 * 60 * 60 * 1e3),
|
|
2981
|
+
b = new Date(e.start_time - 183 * 24 * 60 * 60 * 1e3), _ = 183 * 24 * 60 * 60 * 1e3 / e.options.cellWidth, d = new Date(b.getFullYear(), 0, 1), b = d, E = 2;
|
|
2982
2982
|
break;
|
|
2983
2983
|
}
|
|
2984
|
-
return a.value = !0, e.end_time ? (m = new Date(e.end_time).getTime(),
|
|
2984
|
+
return a.value = !0, e.end_time ? (m = new Date(e.end_time).getTime(), x * _ >= m - new Date(d).getTime() && (m = x * _ + new Date(d).getTime())) : m = x * _ + new Date(d).getTime(), M(E, d, _, m), i.value = _, { time: _, start_time: b };
|
|
2985
2985
|
};
|
|
2986
|
-
function
|
|
2987
|
-
const m =
|
|
2988
|
-
if (
|
|
2986
|
+
function r(_, x) {
|
|
2987
|
+
const m = _.getFullYear(), b = _.getMonth() + 1, E = _.getDate();
|
|
2988
|
+
if (x == 1)
|
|
2989
2989
|
return m + "-" + (b < 10 ? "0" + b : b) + "-" + (E < 10 ? "0" + E : E);
|
|
2990
|
-
if (
|
|
2990
|
+
if (x == 2)
|
|
2991
2991
|
return m + "-" + (b < 10 ? "0" + b : b);
|
|
2992
|
-
if (
|
|
2992
|
+
if (x == 3)
|
|
2993
2993
|
return E < 10 ? "0" + E : E;
|
|
2994
|
-
if (
|
|
2994
|
+
if (x == 4)
|
|
2995
2995
|
return b < 10 ? "0" + b : b;
|
|
2996
|
-
if (
|
|
2996
|
+
if (x == 5)
|
|
2997
2997
|
return m;
|
|
2998
2998
|
}
|
|
2999
|
-
function
|
|
3000
|
-
p.value.width = 24 * 60 * 60 * 1e3 / m <= 5 ? 5 : 24 * 60 * 60 * 1e3 / m, p.value.left = (new Date((/* @__PURE__ */ new Date()).toLocaleDateString()).getTime() -
|
|
2999
|
+
function M(_, x, m, b) {
|
|
3000
|
+
p.value.width = 24 * 60 * 60 * 1e3 / m <= 5 ? 5 : 24 * 60 * 60 * 1e3 / m, p.value.left = (new Date((/* @__PURE__ */ new Date()).toLocaleDateString()).getTime() - x.getTime()) / m;
|
|
3001
3001
|
const E = [];
|
|
3002
3002
|
for (let O = 0; O <= b; ) {
|
|
3003
|
-
const h =
|
|
3004
|
-
let g =
|
|
3005
|
-
|
|
3006
|
-
|
|
3007
|
-
|
|
3003
|
+
const h = x;
|
|
3004
|
+
let g = r(h, 2);
|
|
3005
|
+
_ === 1 ? x = new Date(
|
|
3006
|
+
x.getFullYear(),
|
|
3007
|
+
x.getMonth() + 1,
|
|
3008
3008
|
1
|
|
3009
|
-
) :
|
|
3010
|
-
const
|
|
3011
|
-
l.value +=
|
|
3009
|
+
) : _ == 2 && (x = new Date(x.getFullYear() + 1, 0, 1), g = r(h, 5));
|
|
3010
|
+
const w = (x.getTime() - h.getTime()) / m;
|
|
3011
|
+
l.value += w, E.push({
|
|
3012
3012
|
left: (h.getTime() - d.getTime()) / m,
|
|
3013
|
-
width:
|
|
3013
|
+
width: w,
|
|
3014
3014
|
date: g
|
|
3015
|
-
}), O =
|
|
3015
|
+
}), O = x.getTime(), N = O;
|
|
3016
3016
|
}
|
|
3017
|
-
s.value = E, console.log({ top_time_data: s.value }),
|
|
3017
|
+
s.value = E, console.log({ top_time_data: s.value }), N && (b = N), y(d, m, b);
|
|
3018
3018
|
}
|
|
3019
|
-
function y(
|
|
3019
|
+
function y(_, x, m) {
|
|
3020
3020
|
var E;
|
|
3021
3021
|
const b = [];
|
|
3022
3022
|
for (let O = 0; O <= m; ) {
|
|
3023
|
-
const h =
|
|
3024
|
-
let g =
|
|
3025
|
-
const I =
|
|
3023
|
+
const h = _;
|
|
3024
|
+
let g = r(h, 3), w = r(h, 1), C = !1, k = "";
|
|
3025
|
+
const I = _.getFullYear(), U = _.getMonth(), W = _.getDate();
|
|
3026
3026
|
if (e.options.timeScale === 1) {
|
|
3027
|
-
if (
|
|
3028
|
-
const { lunar_day: he, reset_day: q } = f(
|
|
3029
|
-
|
|
3027
|
+
if (_ = new Date(I, U, W + 1), (h.getDay() == 0 || h.getDay() == 6) && (C = !0), (E = e.calendarOption) != null && E.list) {
|
|
3028
|
+
const { lunar_day: he, reset_day: q } = f(w);
|
|
3029
|
+
C = q === "Y", k = he;
|
|
3030
3030
|
}
|
|
3031
|
-
} else e.options.timeScale === 2 ? (
|
|
3032
|
-
const ce = (
|
|
3033
|
-
O =
|
|
3034
|
-
left: (h.getTime() - d.getTime()) /
|
|
3031
|
+
} else e.options.timeScale === 2 ? (_ = new Date(I, U, W + 7), w = r(h, 1) + "~" + r(new Date(I, U, W - 1), 1)) : e.options.timeScale === 3 ? (_ = new Date(I, U + 1, 1), g = r(h, 4), w = r(h, 2)) : e.options.timeScale === 4 ? (_ = new Date(I, U + 3, 1), g = F(h.getMonth(), "month"), w = r(h, 1) + "~" + r(new Date(I, U, 0), 1)) : e.options.timeScale === 5 && (_ = new Date(I, U + 6, 1), g = F(h.getMonth(), "year"), w = r(h, 1) + "~" + r(new Date(I, U, 0), 1));
|
|
3032
|
+
const ce = (_.getTime() - h.getTime()) / x;
|
|
3033
|
+
O = _.getTime(), O <= m && b.push({
|
|
3034
|
+
left: (h.getTime() - d.getTime()) / x,
|
|
3035
3035
|
width: ce,
|
|
3036
3036
|
date: g,
|
|
3037
|
-
title:
|
|
3038
|
-
isRestDay:
|
|
3037
|
+
title: w,
|
|
3038
|
+
isRestDay: C,
|
|
3039
3039
|
lunarDay: k
|
|
3040
3040
|
});
|
|
3041
3041
|
}
|
|
3042
3042
|
t.value = b;
|
|
3043
3043
|
}
|
|
3044
|
-
function F(
|
|
3044
|
+
function F(_, x) {
|
|
3045
3045
|
let m = "";
|
|
3046
|
-
return
|
|
3046
|
+
return x == "month" ? _ <= 2 && _ >= 0 ? m = "Q1" : _ <= 5 && _ >= 3 ? m = "Q2" : _ <= 8 && _ >= 6 ? m = "Q3" : _ <= 11 && _ >= 9 && (m = "Q4") : x == "year" && (_ <= 5 && _ >= 0 ? m = "Y1" : _ <= 11 && _ >= 6 && (m = "Y2")), m;
|
|
3047
3047
|
}
|
|
3048
|
-
const f = (
|
|
3048
|
+
const f = (_) => {
|
|
3049
3049
|
var m;
|
|
3050
|
-
const
|
|
3051
|
-
return { lunar_day:
|
|
3050
|
+
const x = (m = e.calendarOption) == null ? void 0 : m.list.find((b) => b.date === _);
|
|
3051
|
+
return { lunar_day: x == null ? void 0 : x.lunarDay, reset_day: x == null ? void 0 : x.isRestDay };
|
|
3052
3052
|
};
|
|
3053
|
-
return n({ initTimeline:
|
|
3053
|
+
return n({ initTimeline: v }), (_, x) => (T(), L("div", {
|
|
3054
3054
|
ref_key: "ganteview",
|
|
3055
3055
|
ref: u,
|
|
3056
3056
|
class: "ganteview-box"
|
|
3057
3057
|
}, [
|
|
3058
3058
|
$("div", {
|
|
3059
3059
|
class: "ganteview",
|
|
3060
|
-
onScrollPassive:
|
|
3060
|
+
onScrollPassive: S
|
|
3061
3061
|
}, [
|
|
3062
|
-
c.value ? (
|
|
3062
|
+
c.value ? (T(), L("div", Ps, G(c.value), 1)) : te("", !0),
|
|
3063
3063
|
$("div", {
|
|
3064
|
-
style:
|
|
3064
|
+
style: ne({ width: l.value + "px" }),
|
|
3065
3065
|
class: "ganteview-header"
|
|
3066
3066
|
}, [
|
|
3067
|
-
$("div",
|
|
3068
|
-
(
|
|
3067
|
+
$("div", Bs, [
|
|
3068
|
+
(T(!0), L(ae, null, se(s.value, (m) => (T(), L("div", {
|
|
3069
3069
|
key: m.id,
|
|
3070
3070
|
class: "ganteview-headercell",
|
|
3071
3071
|
title: m.date,
|
|
3072
|
-
style:
|
|
3073
|
-
}, G(m.date), 13,
|
|
3072
|
+
style: ne({ width: m.width + "px", left: m.left + "px" })
|
|
3073
|
+
}, G(m.date), 13, Os))), 128))
|
|
3074
3074
|
]),
|
|
3075
|
-
$("div",
|
|
3076
|
-
(
|
|
3075
|
+
$("div", Rs, [
|
|
3076
|
+
(T(!0), L(ae, null, se(t.value, (m) => (T(), L("div", {
|
|
3077
3077
|
key: m.id,
|
|
3078
3078
|
class: "ganteview-headercell",
|
|
3079
3079
|
title: m.title,
|
|
3080
|
-
style:
|
|
3080
|
+
style: ne({
|
|
3081
3081
|
width: m.width + "px",
|
|
3082
3082
|
left: m.left + "px",
|
|
3083
3083
|
color: m.isRestDay ? "#999" : ""
|
|
3084
3084
|
})
|
|
3085
|
-
}, G(m.date), 13,
|
|
3085
|
+
}, G(m.date), 13, Us))), 128))
|
|
3086
3086
|
])
|
|
3087
3087
|
], 4),
|
|
3088
|
-
ve(V(
|
|
3089
|
-
columns:
|
|
3090
|
-
start_time:
|
|
3091
|
-
end_time:
|
|
3092
|
-
time_1px:
|
|
3093
|
-
"dayily-summary":
|
|
3088
|
+
ve(V(As, {
|
|
3089
|
+
columns: _.columns,
|
|
3090
|
+
start_time: _.start_time,
|
|
3091
|
+
end_time: _.end_time,
|
|
3092
|
+
time_1px: i.value,
|
|
3093
|
+
"dayily-summary": _.dayilySummary,
|
|
3094
3094
|
"date-range": t.value,
|
|
3095
|
-
options:
|
|
3096
|
-
style:
|
|
3095
|
+
options: _.options,
|
|
3096
|
+
style: ne({ width: l.value + "px" }),
|
|
3097
3097
|
class: "ganteview-content-box",
|
|
3098
|
-
tasks:
|
|
3098
|
+
tasks: _.tasks
|
|
3099
3099
|
}, {
|
|
3100
3100
|
default: Y(() => [
|
|
3101
|
-
(
|
|
3101
|
+
(T(!0), L(ae, null, se(t.value, (m, b) => (T(), L("div", {
|
|
3102
3102
|
key: b,
|
|
3103
3103
|
class: "flex items-end ganteview-column",
|
|
3104
|
-
style:
|
|
3104
|
+
style: ne({
|
|
3105
3105
|
width: m.width + "px",
|
|
3106
3106
|
left: m.left + "px",
|
|
3107
3107
|
background: m.isRestDay ? "#F3FDFF" : ""
|
|
@@ -3109,7 +3109,7 @@ const se = hs(), gs = { class: "ut-gante-tbody" }, vs = ["onMouseenter", "onMous
|
|
|
3109
3109
|
}, null, 4))), 128)),
|
|
3110
3110
|
$("div", {
|
|
3111
3111
|
id: "today-ganteview-column",
|
|
3112
|
-
style:
|
|
3112
|
+
style: ne({
|
|
3113
3113
|
width: p.value.width + "px",
|
|
3114
3114
|
left: p.value.left + "px"
|
|
3115
3115
|
})
|
|
@@ -3117,15 +3117,15 @@ const se = hs(), gs = { class: "ut-gante-tbody" }, vs = ["onMouseenter", "onMous
|
|
|
3117
3117
|
]),
|
|
3118
3118
|
_: 1
|
|
3119
3119
|
}, 8, ["columns", "start_time", "end_time", "time_1px", "dayily-summary", "date-range", "options", "style", "tasks"]), [
|
|
3120
|
-
[
|
|
3120
|
+
[ke, a.value]
|
|
3121
3121
|
])
|
|
3122
3122
|
], 32)
|
|
3123
3123
|
], 512));
|
|
3124
3124
|
}
|
|
3125
|
-
}),
|
|
3125
|
+
}), zs = /* @__PURE__ */ Se(Vs, [["__scopeId", "data-v-386e3cb3"]]), js = {
|
|
3126
3126
|
name: "GanteSplit"
|
|
3127
|
-
},
|
|
3128
|
-
...
|
|
3127
|
+
}, Ws = /* @__PURE__ */ K({
|
|
3128
|
+
...js,
|
|
3129
3129
|
props: {
|
|
3130
3130
|
columns: {},
|
|
3131
3131
|
options: { default: () => ({}) },
|
|
@@ -3134,64 +3134,64 @@ const se = hs(), gs = { class: "ut-gante-tbody" }, vs = ["onMouseenter", "onMous
|
|
|
3134
3134
|
emits: ["onDragEnd"],
|
|
3135
3135
|
setup(o, { emit: n }) {
|
|
3136
3136
|
const e = o, s = P(!1), t = P(0), l = P("");
|
|
3137
|
-
let
|
|
3138
|
-
function a(
|
|
3139
|
-
if (
|
|
3140
|
-
const
|
|
3141
|
-
let
|
|
3142
|
-
const
|
|
3143
|
-
console.log(
|
|
3137
|
+
let i = !1;
|
|
3138
|
+
function a(S) {
|
|
3139
|
+
if (i) {
|
|
3140
|
+
const v = document.getElementsByTagName("body")[0];
|
|
3141
|
+
let r = S.pageX - l.value.getBoundingClientRect().left + 3;
|
|
3142
|
+
const M = p("gante-table-box"), y = p("ganteview-box");
|
|
3143
|
+
console.log(r);
|
|
3144
3144
|
const F = e.options.tableWidth || 450;
|
|
3145
|
-
|
|
3145
|
+
r + M <= F && (r = F - M), y - r <= 30 && (r = y - 30), t.value = r, v.style.cursor = "e-resize";
|
|
3146
3146
|
}
|
|
3147
3147
|
}
|
|
3148
3148
|
function c() {
|
|
3149
|
-
if (
|
|
3150
|
-
const
|
|
3151
|
-
|
|
3149
|
+
if (i) {
|
|
3150
|
+
const S = document.getElementsByTagName("body")[0], v = t.value + p("gante-table-box");
|
|
3151
|
+
le.emit("onDragEnd", v), D("onDragEnd", v), d(v), s.value = !1, t.value = 0, i = !1, S.classList.remove("unselecttable"), S.style.cursor = "", document.removeEventListener("mousemove", a, !1), document.removeEventListener("mouseup", c, !1);
|
|
3152
3152
|
}
|
|
3153
3153
|
}
|
|
3154
3154
|
const u = () => {
|
|
3155
|
-
|
|
3156
|
-
}, p = (
|
|
3157
|
-
function d(
|
|
3158
|
-
let
|
|
3159
|
-
if (e.columns.filter((
|
|
3160
|
-
|
|
3161
|
-
}),
|
|
3162
|
-
const
|
|
3163
|
-
console.log(
|
|
3164
|
-
const
|
|
3165
|
-
|
|
3155
|
+
i = !0, s.value = !0, document.getElementsByTagName("body")[0].classList.add("unselecttable"), document.addEventListener("mousemove", a, { passive: !1 }), document.addEventListener("mouseup", c, { passive: !1 });
|
|
3156
|
+
}, p = (S) => document.getElementsByClassName(S)[0].offsetWidth;
|
|
3157
|
+
function d(S) {
|
|
3158
|
+
let v = 0;
|
|
3159
|
+
if (e.columns.filter((r) => !!r.show || r.show === void 0).forEach((r) => {
|
|
3160
|
+
v += r.width ? Number(r.width) + 1 : 81;
|
|
3161
|
+
}), v < S) {
|
|
3162
|
+
const r = N(1);
|
|
3163
|
+
console.log(r);
|
|
3164
|
+
const M = r.width ? Number(r.width) - 2 : 78;
|
|
3165
|
+
r.width = S - (v - M);
|
|
3166
3166
|
}
|
|
3167
3167
|
}
|
|
3168
|
-
function S
|
|
3169
|
-
const
|
|
3170
|
-
return
|
|
3168
|
+
function N(S) {
|
|
3169
|
+
const v = e.columns.length, r = e.columns[v - S];
|
|
3170
|
+
return r.show || r.show === void 0 ? r : N(S + 1);
|
|
3171
3171
|
}
|
|
3172
|
-
const
|
|
3173
|
-
return (
|
|
3172
|
+
const D = n;
|
|
3173
|
+
return (S, v) => (T(), L("div", {
|
|
3174
3174
|
ref_key: "usplit",
|
|
3175
3175
|
ref: l,
|
|
3176
|
-
style:
|
|
3176
|
+
style: ne({ left: Number(S.left) ? S.left + "px" : S.left }),
|
|
3177
3177
|
class: "ut-gante-split",
|
|
3178
3178
|
onMousedown: u
|
|
3179
3179
|
}, [
|
|
3180
3180
|
ve($("div", {
|
|
3181
|
-
style:
|
|
3181
|
+
style: ne({ left: t.value + "px" }),
|
|
3182
3182
|
class: "ut-gante-split-resize"
|
|
3183
3183
|
}, null, 4), [
|
|
3184
|
-
[
|
|
3184
|
+
[ke, s.value]
|
|
3185
3185
|
])
|
|
3186
3186
|
], 36));
|
|
3187
3187
|
}
|
|
3188
|
-
}),
|
|
3188
|
+
}), Ys = { style: { height: "100%" } }, qs = {
|
|
3189
3189
|
key: 0,
|
|
3190
3190
|
style: { "max-width": "125px", padding: "6px", "font-size": "16px", "font-weight": "bold", color: "tomato" }
|
|
3191
|
-
},
|
|
3191
|
+
}, Hs = { style: { "padding-left": "12px", "font-size": "16px", "font-weight": "900", color: "rgb(59 130 246)" } }, Gs = { style: { display: "flex", "align-items": "center", "font-size": "12px" } }, Xs = /* @__PURE__ */ fo('<div style="margin-left:8px;"><div style="display:flex;align-items:center;"><div style="width:12px;height:12px;background-color:#f3fdff;"></div><span style="padding-right:8px;padding-left:3px;font-size:12px;">休息日</span></div><div style="display:flex;align-items:center;"><div style="width:12px;height:12px;background-color:#dcecfe;"></div><span style="padding-left:3px;font-size:12px;">今日</span></div></div>', 1), Ks = {
|
|
3192
3192
|
name: "UtGante"
|
|
3193
|
-
},
|
|
3194
|
-
...
|
|
3193
|
+
}, Js = /* @__PURE__ */ K({
|
|
3194
|
+
...Ks,
|
|
3195
3195
|
props: {
|
|
3196
3196
|
tasks: {},
|
|
3197
3197
|
columns: {},
|
|
@@ -3206,7 +3206,7 @@ const se = hs(), gs = { class: "ut-gante-tbody" }, vs = ["onMouseenter", "onMous
|
|
|
3206
3206
|
setup(o, { expose: n }) {
|
|
3207
3207
|
const e = o;
|
|
3208
3208
|
let s = 0;
|
|
3209
|
-
const t = P(0), l =
|
|
3209
|
+
const t = P(0), l = xe({
|
|
3210
3210
|
tableWidth: 360,
|
|
3211
3211
|
timeScale: 1,
|
|
3212
3212
|
// 时间刻度 1:日, 2周, 3月, 4季, 5年
|
|
@@ -3235,41 +3235,41 @@ const se = hs(), gs = { class: "ut-gante-tbody" }, vs = ["onMouseenter", "onMous
|
|
|
3235
3235
|
// 唯一标识字段
|
|
3236
3236
|
footerLabel: "合计"
|
|
3237
3237
|
// showFooter为true时生效
|
|
3238
|
-
}),
|
|
3239
|
-
let
|
|
3238
|
+
}), i = P(300), a = P(300), c = P(!1), u = P(/* @__PURE__ */ new Date()), p = P(""), d = P(!1), N = P(0), D = P(0), S = P(null), v = P(null);
|
|
3239
|
+
let r;
|
|
3240
3240
|
Fe(() => {
|
|
3241
|
-
m(), E(),
|
|
3241
|
+
m(), E(), M();
|
|
3242
3242
|
});
|
|
3243
|
-
const
|
|
3244
|
-
|
|
3243
|
+
const M = () => {
|
|
3244
|
+
le.off("onDragChangeTime"), le.on("onDragChangeTime", (g) => {
|
|
3245
3245
|
console.log("[ data ] >", g);
|
|
3246
|
-
}),
|
|
3247
|
-
|
|
3248
|
-
}),
|
|
3246
|
+
}), le.off("change"), le.on("change", (g) => {
|
|
3247
|
+
x(g);
|
|
3248
|
+
}), le.off("changeCalendar"), le.on("changeCalendar", (g) => {
|
|
3249
3249
|
f(g);
|
|
3250
|
-
}),
|
|
3251
|
-
|
|
3252
|
-
}),
|
|
3253
|
-
var
|
|
3254
|
-
(
|
|
3255
|
-
}),
|
|
3250
|
+
}), le.off("onClick"), le.on("onClick", (g) => {
|
|
3251
|
+
_(g);
|
|
3252
|
+
}), le.off("onGanteItemDblclick"), le.on("onGanteItemDblclick", (g) => {
|
|
3253
|
+
var w;
|
|
3254
|
+
(w = e.events) == null || w.onDbclick(g);
|
|
3255
|
+
}), le.off("onLoad"), le.on("onLoad", () => {
|
|
3256
3256
|
});
|
|
3257
3257
|
}, y = (g) => {
|
|
3258
3258
|
t.value = g;
|
|
3259
|
-
}, F = (g,
|
|
3260
|
-
if (console.log(
|
|
3261
|
-
Object.assign(e.tasks,
|
|
3259
|
+
}, F = (g, w) => {
|
|
3260
|
+
if (console.log(w), !g) {
|
|
3261
|
+
Object.assign(e.tasks, r);
|
|
3262
3262
|
return;
|
|
3263
3263
|
}
|
|
3264
|
-
|
|
3265
|
-
function
|
|
3264
|
+
C(e.tasks), s = 0, I(e.tasks);
|
|
3265
|
+
function C(U) {
|
|
3266
3266
|
U.sort(k(g));
|
|
3267
3267
|
for (const W of U)
|
|
3268
|
-
W[l.children] &&
|
|
3268
|
+
W[l.children] && C(W[l.children]);
|
|
3269
3269
|
}
|
|
3270
3270
|
function k(U) {
|
|
3271
3271
|
return function(W, ce) {
|
|
3272
|
-
return
|
|
3272
|
+
return w == "asc" ? W[U] - ce[U] : (console.log(ce, U), ce[U] - W[U]);
|
|
3273
3273
|
};
|
|
3274
3274
|
}
|
|
3275
3275
|
function I(U) {
|
|
@@ -3277,82 +3277,82 @@ const se = hs(), gs = { class: "ut-gante-tbody" }, vs = ["onMouseenter", "onMous
|
|
|
3277
3277
|
W[l.children] ? (s++, W.seqNo = W.seqNo || s, I(W[l.children])) : (s++, W.seqNo = W.seqNo || s);
|
|
3278
3278
|
}
|
|
3279
3279
|
}, f = (g) => {
|
|
3280
|
-
console.log("展开", g.show_calendar), g.changeDate && (u.value = g.changeDate), c.value = g.show_calendar, console.log(c.value), g.calendar_left != null && (
|
|
3281
|
-
},
|
|
3282
|
-
for (const
|
|
3283
|
-
(
|
|
3284
|
-
},
|
|
3280
|
+
console.log("展开", g.show_calendar), g.changeDate && (u.value = g.changeDate), c.value = g.show_calendar, console.log(c.value), g.calendar_left != null && (i.value = g.calendar_left), g.calendar_top != null && (a.value = g.calendar_top), g.change_value != null && (p.value = g.change_value.argument);
|
|
3281
|
+
}, _ = (g) => {
|
|
3282
|
+
for (const w in g.data)
|
|
3283
|
+
(w == "width" || w == "left" || w == "open") && delete g.data[w];
|
|
3284
|
+
}, x = (g) => {
|
|
3285
3285
|
console.log(g), e.events.onChange(g);
|
|
3286
3286
|
}, m = () => {
|
|
3287
|
-
b(e.tasks, 1),
|
|
3287
|
+
b(e.tasks, 1), r = de(e.tasks, !0), Object.assign(l, e.options);
|
|
3288
3288
|
const g = ee(e.startTime, "yyyy-MM-dd 00:00:00");
|
|
3289
|
-
|
|
3290
|
-
const
|
|
3291
|
-
|
|
3292
|
-
function
|
|
3289
|
+
N.value = wt(g, "yyyy-MM-dd HH:mm:ss");
|
|
3290
|
+
const w = ee(e.endTime, "yyyy-MM-dd 23:59:59");
|
|
3291
|
+
D.value = wt(w, "yyyy-MM-dd HH:mm:ss");
|
|
3292
|
+
function C() {
|
|
3293
3293
|
const k = (/* @__PURE__ */ new Date()).getTime();
|
|
3294
|
-
k <
|
|
3294
|
+
k < N.value && (N.value = k), k > D.value && (D.value = k);
|
|
3295
3295
|
}
|
|
3296
|
-
|
|
3297
|
-
const k =
|
|
3296
|
+
C(), s = 0, Re(() => {
|
|
3297
|
+
const k = S.value.initTimeline(l.timeScale);
|
|
3298
3298
|
O(e.tasks, k.time, k.start_time);
|
|
3299
3299
|
});
|
|
3300
|
-
}, b = (g,
|
|
3300
|
+
}, b = (g, w) => (g.forEach((C) => {
|
|
3301
3301
|
var k;
|
|
3302
|
-
if (
|
|
3303
|
-
const I = new Date(
|
|
3304
|
-
|
|
3302
|
+
if (C.g_level = w, C.start_time = h(C.start_time), C.duration && !C.end_time) {
|
|
3303
|
+
const I = new Date(C.start_time).getTime() + C.duration * 1e3 * 24 * 60 * 60;
|
|
3304
|
+
C.end_time = h(I, "end");
|
|
3305
3305
|
} else
|
|
3306
|
-
|
|
3307
|
-
(k =
|
|
3306
|
+
C.end_time = h(C.end_time || C.start_time, "end");
|
|
3307
|
+
(k = C[e.options.children]) != null && k.length && (w++, b(C[e.options.children], w), w--);
|
|
3308
3308
|
}), g), E = () => {
|
|
3309
3309
|
var g;
|
|
3310
3310
|
if (l.tableWidth)
|
|
3311
3311
|
t.value = l.tableWidth;
|
|
3312
3312
|
else {
|
|
3313
|
-
const
|
|
3314
|
-
t.value =
|
|
3313
|
+
const w = (g = v == null ? void 0 : v.value) == null ? void 0 : g.clientWidth;
|
|
3314
|
+
t.value = w / 2;
|
|
3315
3315
|
}
|
|
3316
3316
|
};
|
|
3317
|
-
function O(g,
|
|
3317
|
+
function O(g, w, C) {
|
|
3318
3318
|
for (const k of g) {
|
|
3319
3319
|
if (k.open = k.open || l.expandAll, k.start_time || k.end_time)
|
|
3320
|
-
if (k.left = (k.start_time -
|
|
3321
|
-
let I = (k.end_time - k.start_time) /
|
|
3320
|
+
if (k.left = (k.start_time - C.getTime()) / w, k.end_time && k.end_time >= k.start_time && k.start_time) {
|
|
3321
|
+
let I = (k.end_time - k.start_time) / w;
|
|
3322
3322
|
I >= 0 && I <= 1 && (I = 1), k.width = I;
|
|
3323
3323
|
} else
|
|
3324
3324
|
k.width = 0;
|
|
3325
|
-
k.showLoading = !1, k[l.children] ? (s++, k.seqNo = k.seqNo || s, O(k[l.children],
|
|
3325
|
+
k.showLoading = !1, k[l.children] ? (s++, k.seqNo = k.seqNo || s, O(k[l.children], w, C)) : (s++, k.seqNo = k.seqNo || s);
|
|
3326
3326
|
}
|
|
3327
3327
|
}
|
|
3328
|
-
const h = (g,
|
|
3328
|
+
const h = (g, w = "start") => {
|
|
3329
3329
|
if (!g) return g;
|
|
3330
|
-
const
|
|
3331
|
-
return g = `${ee(g, "yyyy-MM-dd")} ${
|
|
3330
|
+
const C = w === "start" ? "00:00:00" : "23:59:59";
|
|
3331
|
+
return g = `${ee(g, "yyyy-MM-dd")} ${C}`, new Date(g).getTime();
|
|
3332
3332
|
};
|
|
3333
|
-
return n({ initGante: m }), (g,
|
|
3333
|
+
return n({ initGante: m }), (g, w) => (T(), L("div", Ys, [
|
|
3334
3334
|
Me(g.$slots, "header"),
|
|
3335
3335
|
$("div", {
|
|
3336
3336
|
ref_key: "xgante",
|
|
3337
|
-
ref:
|
|
3337
|
+
ref: v,
|
|
3338
3338
|
class: "gante-box"
|
|
3339
3339
|
}, [
|
|
3340
3340
|
$("div", {
|
|
3341
|
-
style:
|
|
3341
|
+
style: ne({ width: Number(t.value) ? t.value + "px" : t.value }),
|
|
3342
3342
|
class: "gante-out-op"
|
|
3343
3343
|
}, [
|
|
3344
|
-
g.title ? (
|
|
3345
|
-
$("div",
|
|
3346
|
-
$("div",
|
|
3344
|
+
g.title ? (T(), L("div", qs, G(g.title), 1)) : te("", !0),
|
|
3345
|
+
$("div", Hs, G(oe(ee)(N.value, "yyyy-MM-dd")) + " ~ " + G(oe(ee)(D.value, "yyyy-MM-dd")), 1),
|
|
3346
|
+
$("div", Gs, [
|
|
3347
3347
|
Me(g.$slots, "colorTip"),
|
|
3348
|
-
|
|
3348
|
+
Xs
|
|
3349
3349
|
])
|
|
3350
3350
|
], 4),
|
|
3351
3351
|
$("div", {
|
|
3352
|
-
style:
|
|
3352
|
+
style: ne({ width: Number(t.value) ? t.value + "px" : t.value }),
|
|
3353
3353
|
class: "gante-table-box"
|
|
3354
3354
|
}, [
|
|
3355
|
-
V(
|
|
3355
|
+
V(xs, {
|
|
3356
3356
|
columns: g.columns,
|
|
3357
3357
|
"show-loading": d.value,
|
|
3358
3358
|
data: g.tasks,
|
|
@@ -3363,16 +3363,16 @@ const se = hs(), gs = { class: "ut-gante-tbody" }, vs = ["onMouseenter", "onMous
|
|
|
3363
3363
|
], 4),
|
|
3364
3364
|
$("div", {
|
|
3365
3365
|
class: "gante-gc-box",
|
|
3366
|
-
style:
|
|
3366
|
+
style: ne({
|
|
3367
3367
|
left: Number(t.value) ? t.value + "px" : t.value,
|
|
3368
3368
|
width: `calc(100% - ${Number(t.value) ? t.value + "px" : t.value}) `
|
|
3369
3369
|
})
|
|
3370
3370
|
}, [
|
|
3371
|
-
V(
|
|
3371
|
+
V(zs, {
|
|
3372
3372
|
ref_key: "ganteTimeline",
|
|
3373
|
-
ref:
|
|
3374
|
-
start_time:
|
|
3375
|
-
end_time:
|
|
3373
|
+
ref: S,
|
|
3374
|
+
start_time: N.value,
|
|
3375
|
+
end_time: D.value,
|
|
3376
3376
|
columns: g.columns,
|
|
3377
3377
|
options: l,
|
|
3378
3378
|
"dayily-summary": g.dayilySummary,
|
|
@@ -3380,7 +3380,7 @@ const se = hs(), gs = { class: "ut-gante-tbody" }, vs = ["onMouseenter", "onMous
|
|
|
3380
3380
|
tasks: g.tasks
|
|
3381
3381
|
}, null, 8, ["start_time", "end_time", "columns", "options", "dayily-summary", "calendar-option", "tasks"])
|
|
3382
3382
|
], 4),
|
|
3383
|
-
V(
|
|
3383
|
+
V(Ws, {
|
|
3384
3384
|
left: t.value,
|
|
3385
3385
|
columns: g.columns,
|
|
3386
3386
|
options: l,
|
|
@@ -3389,10 +3389,10 @@ const se = hs(), gs = { class: "ut-gante-tbody" }, vs = ["onMouseenter", "onMous
|
|
|
3389
3389
|
], 512)
|
|
3390
3390
|
]));
|
|
3391
3391
|
}
|
|
3392
|
-
}),
|
|
3392
|
+
}), Qs = fe(Js), Zs = { class: "selector w-full" }, el = { class: "flex items-center pr-2" }, tl = { class: "flex flex-wrap px-2 ml-2" }, ol = ["title", "onClick"], nl = { class: "w-full h-9 flex items-center overflow-auto border-t border-[#e5e7eb]" }, sl = {
|
|
3393
3393
|
name: "UtIconSelect"
|
|
3394
|
-
},
|
|
3395
|
-
...
|
|
3394
|
+
}, ll = /* @__PURE__ */ K({
|
|
3395
|
+
...sl,
|
|
3396
3396
|
props: {
|
|
3397
3397
|
modelValue: {
|
|
3398
3398
|
require: !1,
|
|
@@ -3405,32 +3405,32 @@ const se = hs(), gs = { class: "ut-gante-tbody" }, vs = ["onMouseenter", "onMous
|
|
|
3405
3405
|
},
|
|
3406
3406
|
emits: ["update:modelValue"],
|
|
3407
3407
|
setup(o, { emit: n }) {
|
|
3408
|
-
const e = o, s = n, t = P(!1), l = mo(e, "modelValue"),
|
|
3408
|
+
const e = o, s = n, t = P(!1), l = mo(e, "modelValue"), i = P(Object.keys(go.icons)), a = P("ri-"), c = P(), u = de(i.value, !0), p = P(35), d = P(1), N = P(0), D = P(""), S = () => {
|
|
3409
3409
|
c.value = "corner-down-right-fill", l.value && (c.value = l.value.split(":")[1]);
|
|
3410
|
-
},
|
|
3410
|
+
}, v = ue(() => d.value === 1 ? u.filter((m) => m.includes(D.value)).slice(d.value - 1, p.value) : u.filter((m) => m.includes(D.value)).slice(
|
|
3411
3411
|
p.value * (d.value - 1),
|
|
3412
3412
|
p.value * (d.value - 1) + p.value
|
|
3413
|
-
)),
|
|
3413
|
+
)), r = ue(() => (m) => {
|
|
3414
3414
|
if (l.value === a.value + m)
|
|
3415
3415
|
return {
|
|
3416
3416
|
borderColor: "var(--el-color-primary)",
|
|
3417
3417
|
color: "var(--el-color-primary)"
|
|
3418
3418
|
};
|
|
3419
3419
|
});
|
|
3420
|
-
function
|
|
3421
|
-
c.value = m, s("update:modelValue", F()),
|
|
3420
|
+
function M(m) {
|
|
3421
|
+
c.value = m, s("update:modelValue", F()), x();
|
|
3422
3422
|
}
|
|
3423
3423
|
function y(m) {
|
|
3424
3424
|
d.value = m;
|
|
3425
3425
|
}
|
|
3426
3426
|
const F = () => a.value === "ri-" ? "ri:" + c.value : a.value + c.value, f = () => {
|
|
3427
3427
|
c.value = "corner-down-right-fill", s("update:modelValue", "");
|
|
3428
|
-
},
|
|
3429
|
-
d.value === 1 ?
|
|
3430
|
-
(m) => m.includes(
|
|
3431
|
-
).length :
|
|
3432
|
-
},
|
|
3433
|
-
t.value = !1,
|
|
3428
|
+
}, _ = () => {
|
|
3429
|
+
d.value === 1 ? N.value = u.filter(
|
|
3430
|
+
(m) => m.includes(D.value)
|
|
3431
|
+
).length : N.value = u.length;
|
|
3432
|
+
}, x = () => {
|
|
3433
|
+
t.value = !1, D.value = "";
|
|
3434
3434
|
};
|
|
3435
3435
|
return Ue(
|
|
3436
3436
|
() => e.modelValue,
|
|
@@ -3440,15 +3440,15 @@ const se = hs(), gs = { class: "ut-gante-tbody" }, vs = ["onMouseenter", "onMous
|
|
|
3440
3440
|
));
|
|
3441
3441
|
}
|
|
3442
3442
|
), Ue(
|
|
3443
|
-
() =>
|
|
3443
|
+
() => D.value,
|
|
3444
3444
|
() => {
|
|
3445
|
-
d.value = 1,
|
|
3445
|
+
d.value = 1, _();
|
|
3446
3446
|
}
|
|
3447
3447
|
), Fe(() => {
|
|
3448
|
-
|
|
3448
|
+
_(), S();
|
|
3449
3449
|
}), (m, b) => {
|
|
3450
|
-
const E = z("IconifyIconOffline"), O = z("el-input"), h = z("el-divider"), g = z("el-scrollbar"),
|
|
3451
|
-
return
|
|
3450
|
+
const E = z("IconifyIconOffline"), O = z("el-input"), h = z("el-divider"), g = z("el-scrollbar"), w = z("el-pagination"), C = z("vxe-button"), k = z("el-popover");
|
|
3451
|
+
return T(), L("div", Zs, [
|
|
3452
3452
|
V(O, {
|
|
3453
3453
|
modelValue: l.value,
|
|
3454
3454
|
"onUpdate:modelValue": b[2] || (b[2] = (I) => l.value = I),
|
|
@@ -3457,7 +3457,7 @@ const se = hs(), gs = { class: "ut-gante-tbody" }, vs = ["onMouseenter", "onMous
|
|
|
3457
3457
|
class: "u-icon-input relative"
|
|
3458
3458
|
}, {
|
|
3459
3459
|
append: Y(() => [
|
|
3460
|
-
l.value ? (
|
|
3460
|
+
l.value ? (T(), L("span", {
|
|
3461
3461
|
key: 0,
|
|
3462
3462
|
class: "u-icon-close item-center justify-center text-sm hidden absolute",
|
|
3463
3463
|
onClick: f
|
|
@@ -3471,7 +3471,7 @@ const se = hs(), gs = { class: "ut-gante-tbody" }, vs = ["onMouseenter", "onMous
|
|
|
3471
3471
|
teleported: e.teleported,
|
|
3472
3472
|
trigger: "click",
|
|
3473
3473
|
"popper-class": "udp-popper",
|
|
3474
|
-
onHide:
|
|
3474
|
+
onHide: x
|
|
3475
3475
|
}, {
|
|
3476
3476
|
reference: Y(() => [
|
|
3477
3477
|
$("div", {
|
|
@@ -3479,16 +3479,16 @@ const se = hs(), gs = { class: "ut-gante-tbody" }, vs = ["onMouseenter", "onMous
|
|
|
3479
3479
|
onClick: b[0] || (b[0] = (I) => t.value = !t.value)
|
|
3480
3480
|
}, [
|
|
3481
3481
|
$("i", {
|
|
3482
|
-
class:
|
|
3482
|
+
class: De(a.value + c.value),
|
|
3483
3483
|
style: { "font-size": "16px" }
|
|
3484
3484
|
}, null, 2)
|
|
3485
3485
|
])
|
|
3486
3486
|
]),
|
|
3487
3487
|
default: Y(() => [
|
|
3488
|
-
$("div",
|
|
3488
|
+
$("div", el, [
|
|
3489
3489
|
V(O, {
|
|
3490
|
-
modelValue:
|
|
3491
|
-
"onUpdate:modelValue": b[1] || (b[1] = (I) =>
|
|
3490
|
+
modelValue: D.value,
|
|
3491
|
+
"onUpdate:modelValue": b[1] || (b[1] = (I) => D.value = I),
|
|
3492
3492
|
class: "p-2",
|
|
3493
3493
|
placeholder: "搜索图标",
|
|
3494
3494
|
clearable: ""
|
|
@@ -3497,27 +3497,27 @@ const se = hs(), gs = { class: "ut-gante-tbody" }, vs = ["onMouseenter", "onMous
|
|
|
3497
3497
|
V(h, { "border-style": "dashed" }),
|
|
3498
3498
|
V(g, { height: "220px" }, {
|
|
3499
3499
|
default: Y(() => [
|
|
3500
|
-
$("ul",
|
|
3501
|
-
(
|
|
3500
|
+
$("ul", tl, [
|
|
3501
|
+
(T(!0), L(ae, null, se(v.value, (I, U) => (T(), L("li", {
|
|
3502
3502
|
key: U,
|
|
3503
3503
|
title: I,
|
|
3504
3504
|
class: "icon-item p-2 cursor-pointer mr-2 mt-1 flex justify-center items-center border border-[#e5e7eb]",
|
|
3505
|
-
style:
|
|
3506
|
-
onClick: (W) =>
|
|
3505
|
+
style: ne(r.value(I)),
|
|
3506
|
+
onClick: (W) => M(I)
|
|
3507
3507
|
}, [
|
|
3508
3508
|
$("i", {
|
|
3509
|
-
class:
|
|
3509
|
+
class: De([a.value + I, "w-5 h-5 text-xl"])
|
|
3510
3510
|
}, null, 2)
|
|
3511
|
-
], 12,
|
|
3511
|
+
], 12, ol))), 128))
|
|
3512
3512
|
])
|
|
3513
3513
|
]),
|
|
3514
3514
|
_: 1
|
|
3515
3515
|
}),
|
|
3516
3516
|
V(h, { "border-style": "dashed" }),
|
|
3517
|
-
$("div",
|
|
3518
|
-
V(
|
|
3517
|
+
$("div", nl, [
|
|
3518
|
+
V(w, {
|
|
3519
3519
|
class: "flex-auto ml-2",
|
|
3520
|
-
total:
|
|
3520
|
+
total: N.value,
|
|
3521
3521
|
"current-page": d.value,
|
|
3522
3522
|
"page-size": p.value,
|
|
3523
3523
|
"pager-count": 5,
|
|
@@ -3526,13 +3526,13 @@ const se = hs(), gs = { class: "ut-gante-tbody" }, vs = ["onMouseenter", "onMous
|
|
|
3526
3526
|
small: "",
|
|
3527
3527
|
onCurrentChange: y
|
|
3528
3528
|
}, null, 8, ["total", "current-page", "page-size"]),
|
|
3529
|
-
V(
|
|
3529
|
+
V(C, {
|
|
3530
3530
|
class: "justify-end mr-2 ml-2",
|
|
3531
3531
|
status: "danger",
|
|
3532
3532
|
size: "small",
|
|
3533
3533
|
mode: "text",
|
|
3534
3534
|
content: "取消",
|
|
3535
|
-
onClick:
|
|
3535
|
+
onClick: x
|
|
3536
3536
|
})
|
|
3537
3537
|
])
|
|
3538
3538
|
]),
|
|
@@ -3544,14 +3544,14 @@ const se = hs(), gs = { class: "ut-gante-tbody" }, vs = ["onMouseenter", "onMous
|
|
|
3544
3544
|
]);
|
|
3545
3545
|
};
|
|
3546
3546
|
}
|
|
3547
|
-
}),
|
|
3547
|
+
}), al = /* @__PURE__ */ Se(ll, [["__scopeId", "data-v-e81401cc"]]), il = fe(al), rl = { class: "op-calendar-pc" }, cl = { class: "op-calendar-pc-box flex" }, dl = { class: "op-calendar-pc-left flex-[2]" }, ul = {
|
|
3548
3548
|
class: "op-calendar-pc-select-box",
|
|
3549
3549
|
style: { visibility: "visible" }
|
|
3550
|
-
},
|
|
3551
|
-
|
|
3552
|
-
],
|
|
3553
|
-
|
|
3554
|
-
],
|
|
3550
|
+
}, fl = { class: "op-calendar-pc-holiday-box" }, ml = { class: "op-calendar-pc-year-box" }, pl = { class: "op-calendar-pc-month-box" }, hl = { class: "flex w-full" }, gl = /* @__PURE__ */ $("i", { class: "vxe-icon-arrow-left" }, null, -1), vl = [
|
|
3551
|
+
gl
|
|
3552
|
+
], yl = /* @__PURE__ */ $("i", { class: "vxe-icon-arrow-right" }, null, -1), _l = [
|
|
3553
|
+
yl
|
|
3554
|
+
], wl = { class: "op-calendar-pc-table-box" }, bl = { class: "op-calendar-pc-table" }, kl = /* @__PURE__ */ $("tr", { style: { "text-align": "center" } }, [
|
|
3555
3555
|
/* @__PURE__ */ $("th", null, "一"),
|
|
3556
3556
|
/* @__PURE__ */ $("th", null, "二"),
|
|
3557
3557
|
/* @__PURE__ */ $("th", null, "三"),
|
|
@@ -3559,26 +3559,26 @@ const se = hs(), gs = { class: "ut-gante-tbody" }, vs = ["onMouseenter", "onMous
|
|
|
3559
3559
|
/* @__PURE__ */ $("th", null, "五"),
|
|
3560
3560
|
/* @__PURE__ */ $("th", { class: "op-calendar-pc-table-weekend" }, "六"),
|
|
3561
3561
|
/* @__PURE__ */ $("th", { class: "op-calendar-pc-table-weekend" }, "日")
|
|
3562
|
-
], -1),
|
|
3562
|
+
], -1), Cl = { class: "op-calendar-pc-relative" }, xl = ["date"], Dl = {
|
|
3563
3563
|
key: 0,
|
|
3564
3564
|
class: "op-calendar-pc-table-holiday-sign"
|
|
3565
|
-
},
|
|
3565
|
+
}, $l = {
|
|
3566
3566
|
key: 1,
|
|
3567
3567
|
class: "op-calendar-pc-table-holiday-sign"
|
|
3568
|
-
},
|
|
3568
|
+
}, Ml = { class: "op-calendar-pc-daynumber" }, Tl = { class: "op-calendar-pc-table-almanac" }, Sl = { class: "op-calendar-pc-right flex-1" }, El = { class: "op-calendar-pc-right-date" }, Il = { class: "op-calendar-pc-right-day" }, Nl = { class: "op-calendar-pc-right-lunar c-gap-top-small" }, Fl = {
|
|
3569
3569
|
key: 0,
|
|
3570
3570
|
class: "op-calendar-pc-right-holid1"
|
|
3571
|
-
},
|
|
3571
|
+
}, Ll = {
|
|
3572
3572
|
key: 1,
|
|
3573
3573
|
class: "op-calendar-pc-right-holid1"
|
|
3574
|
-
},
|
|
3574
|
+
}, Al = /* @__PURE__ */ $("div", { class: "op-calendar-pc-right-almanacbox flex justify-center items-center" }, [
|
|
3575
3575
|
/* @__PURE__ */ $("div", { style: { "writing-mode": "vertical-lr", "letter-spacing": "5px" } }, " 每天都有一点进步😊 "),
|
|
3576
3576
|
/* @__PURE__ */ $("div", { style: { "writing-mode": "vertical-lr", "letter-spacing": "5px" } }, " 每天都有一点进步😝 "),
|
|
3577
3577
|
/* @__PURE__ */ $("div", { style: { "writing-mode": "vertical-lr", "letter-spacing": "5px" } }, " 每天都有一点收获😋 ")
|
|
3578
|
-
], -1),
|
|
3578
|
+
], -1), Pl = /* @__PURE__ */ $("div", { class: "op-calendar-pc-holidaytip" }, null, -1), Bl = {
|
|
3579
3579
|
name: "UtCalendar"
|
|
3580
|
-
},
|
|
3581
|
-
...
|
|
3580
|
+
}, Ol = /* @__PURE__ */ K({
|
|
3581
|
+
...Bl,
|
|
3582
3582
|
props: {
|
|
3583
3583
|
date: String,
|
|
3584
3584
|
range: {
|
|
@@ -3595,7 +3595,7 @@ const se = hs(), gs = { class: "ut-gante-tbody" }, vs = ["onMouseenter", "onMous
|
|
|
3595
3595
|
}
|
|
3596
3596
|
},
|
|
3597
3597
|
setup(o) {
|
|
3598
|
-
const n = P(""), e = P([]), s = o, t = P(""), l = P(""),
|
|
3598
|
+
const n = P(""), e = P([]), s = o, t = P(""), l = P(""), i = P("2023"), a = P(""), c = [], u = P({}), p = /* @__PURE__ */ new Date();
|
|
3599
3599
|
u.value = Ge.solar2lunar(
|
|
3600
3600
|
p.getFullYear(),
|
|
3601
3601
|
p.getMonth() + 1,
|
|
@@ -3606,25 +3606,25 @@ const se = hs(), gs = { class: "ut-gante-tbody" }, vs = ["onMouseenter", "onMous
|
|
|
3606
3606
|
const d = [];
|
|
3607
3607
|
for (let E = 1; E <= 12; E++)
|
|
3608
3608
|
d.push({ value: `${E < 10 ? 0 : ""}${E}`, text: E + "月" });
|
|
3609
|
-
const
|
|
3609
|
+
const N = (E) => {
|
|
3610
3610
|
E === "next" ? n.value = pe(n.value).add(1, "month").format(`YYYY-MM-${t.value}`) : n.value = pe(n.value).subtract(1, "month").format(`YYYY-MM-${t.value}`), l.value = pe(n.value).format("MM"), Re(y);
|
|
3611
|
-
},
|
|
3612
|
-
|
|
3613
|
-
},
|
|
3611
|
+
}, D = (E) => {
|
|
3612
|
+
i.value = E, n.value = pe(n.value).format(`${E}-MM-DD`), Re(y);
|
|
3613
|
+
}, S = (E) => {
|
|
3614
3614
|
l.value = E, n.value = pe(n.value).format(`YYYY-${E}-DD`), Re(y);
|
|
3615
|
-
},
|
|
3615
|
+
}, v = () => {
|
|
3616
3616
|
n.value = pe().format("YYYY-MM-DD");
|
|
3617
3617
|
const { day: E, month: O, year: h } = f();
|
|
3618
|
-
|
|
3619
|
-
},
|
|
3618
|
+
i.value = h, l.value = O, t.value = E;
|
|
3619
|
+
}, r = (E) => {
|
|
3620
3620
|
E && (n.value = E);
|
|
3621
|
-
},
|
|
3622
|
-
|
|
3621
|
+
}, M = () => {
|
|
3622
|
+
v(), s.date && (n.value = s.date), y();
|
|
3623
3623
|
}, y = () => {
|
|
3624
|
-
const E =
|
|
3624
|
+
const E = i.value, O = l.value, h = 1;
|
|
3625
3625
|
let g = [];
|
|
3626
|
-
const
|
|
3627
|
-
let k = [E, O, h].join("-"), I =
|
|
3626
|
+
const w = 42, C = new Date([E, O, h].join("-"));
|
|
3627
|
+
let k = [E, O, h].join("-"), I = C.getDay();
|
|
3628
3628
|
I = I == 0 ? 7 : I;
|
|
3629
3629
|
for (let U = 1; U < I; U++) {
|
|
3630
3630
|
k = pe(k).subtract(1, "day").format("YYYY-MM-DD");
|
|
@@ -3647,7 +3647,7 @@ const se = hs(), gs = { class: "ut-gante-tbody" }, vs = ["onMouseenter", "onMous
|
|
|
3647
3647
|
});
|
|
3648
3648
|
}
|
|
3649
3649
|
k = [E, O, h].join("-"), g = g.reverse();
|
|
3650
|
-
for (let U = 0; U <=
|
|
3650
|
+
for (let U = 0; U <= w - I; U++) {
|
|
3651
3651
|
const { day: W, month: ce, year: he } = f(k), q = Ge.solar2lunar(he, ce, W);
|
|
3652
3652
|
if (q === -1) return {};
|
|
3653
3653
|
let { Term: Q } = q;
|
|
@@ -3672,35 +3672,35 @@ const se = hs(), gs = { class: "ut-gante-tbody" }, vs = ["onMouseenter", "onMous
|
|
|
3672
3672
|
console.log(e);
|
|
3673
3673
|
}, F = (E, O, h) => {
|
|
3674
3674
|
var I;
|
|
3675
|
-
let g,
|
|
3676
|
-
const
|
|
3677
|
-
return k === "班" ? g = !0 : k === "假" && (
|
|
3675
|
+
let g, w;
|
|
3676
|
+
const C = ((I = s.holidays) == null ? void 0 : I.find((U) => U[E])) || {}, k = C[E] && C[E][O] ? C[E][O][h] : "";
|
|
3677
|
+
return k === "班" ? g = !0 : k === "假" && (w = !0), { isRestDay: w, isWorkDay: g };
|
|
3678
3678
|
}, f = (E) => {
|
|
3679
|
-
const O = pe(E || Date.now()).format("DD"), h = pe(E || Date.now()).format("YYYY"), g = pe(E || Date.now()).format("MM"),
|
|
3680
|
-
return { day: O, month: g, year: h, isToday:
|
|
3679
|
+
const O = pe(E || Date.now()).format("DD"), h = pe(E || Date.now()).format("YYYY"), g = pe(E || Date.now()).format("MM"), w = `${h}-${g}-${O}` === pe().format("YYYY-MM-DD");
|
|
3680
|
+
return { day: O, month: g, year: h, isToday: w };
|
|
3681
3681
|
};
|
|
3682
3682
|
Fe(() => {
|
|
3683
|
-
|
|
3683
|
+
M();
|
|
3684
3684
|
}), Ue(n, (E) => {
|
|
3685
3685
|
const { day: O, month: h, year: g } = f(E);
|
|
3686
|
-
|
|
3687
|
-
const
|
|
3688
|
-
|
|
3686
|
+
i.value = g, l.value = h;
|
|
3687
|
+
const w = Ge.solar2lunar(
|
|
3688
|
+
i.value,
|
|
3689
3689
|
l.value,
|
|
3690
3690
|
O
|
|
3691
3691
|
);
|
|
3692
|
-
if (
|
|
3692
|
+
if (w === -1) return {};
|
|
3693
3693
|
u.value = {
|
|
3694
|
-
...
|
|
3695
|
-
lunarFestival: m[
|
|
3696
|
-
festival: b[
|
|
3694
|
+
...w,
|
|
3695
|
+
lunarFestival: m[w.IMonthCn] ? m[w.IMonthCn][w.IDayCn] : void 0,
|
|
3696
|
+
festival: b[w.cMonth] ? b[w.cMonth][w.cDay] : void 0
|
|
3697
3697
|
}, Re(y);
|
|
3698
3698
|
});
|
|
3699
|
-
const
|
|
3699
|
+
const _ = (E) => {
|
|
3700
3700
|
const O = E.target.parentNode.getAttribute("date") ? E.target.parentNode.getAttribute("date") : E.target.getAttribute("date");
|
|
3701
3701
|
console.log(O), n.value = O;
|
|
3702
|
-
},
|
|
3703
|
-
|
|
3702
|
+
}, x = () => {
|
|
3703
|
+
v();
|
|
3704
3704
|
}, m = {
|
|
3705
3705
|
正月: { 初一: "春节", 十五: "元宵节" },
|
|
3706
3706
|
二月: { 初二: "春龙节" },
|
|
@@ -3723,91 +3723,91 @@ const se = hs(), gs = { class: "ut-gante-tbody" }, vs = ["onMouseenter", "onMous
|
|
|
3723
3723
|
};
|
|
3724
3724
|
return (E, O) => {
|
|
3725
3725
|
const h = z("el-option"), g = z("el-select");
|
|
3726
|
-
return
|
|
3727
|
-
$("div",
|
|
3728
|
-
$("div",
|
|
3729
|
-
$("div",
|
|
3730
|
-
$("div",
|
|
3726
|
+
return T(), L("div", rl, [
|
|
3727
|
+
$("div", cl, [
|
|
3728
|
+
$("div", dl, [
|
|
3729
|
+
$("div", ul, [
|
|
3730
|
+
$("div", fl, [
|
|
3731
3731
|
V(g, {
|
|
3732
3732
|
modelValue: a.value,
|
|
3733
|
-
"onUpdate:modelValue": O[0] || (O[0] = (
|
|
3733
|
+
"onUpdate:modelValue": O[0] || (O[0] = (w) => a.value = w),
|
|
3734
3734
|
style: { width: "80px" },
|
|
3735
3735
|
clearable: "",
|
|
3736
3736
|
placeholder: "假期",
|
|
3737
|
-
onChange:
|
|
3737
|
+
onChange: r
|
|
3738
3738
|
}, {
|
|
3739
3739
|
default: Y(() => [
|
|
3740
|
-
(
|
|
3741
|
-
key:
|
|
3742
|
-
value:
|
|
3743
|
-
label:
|
|
3740
|
+
(T(!0), L(ae, null, se(o.statutoryHoliday, (w) => (T(), ie(h, {
|
|
3741
|
+
key: w.date,
|
|
3742
|
+
value: w.date,
|
|
3743
|
+
label: w.name
|
|
3744
3744
|
}, null, 8, ["value", "label"]))), 128))
|
|
3745
3745
|
]),
|
|
3746
3746
|
_: 1
|
|
3747
3747
|
}, 8, ["modelValue"])
|
|
3748
3748
|
]),
|
|
3749
|
-
$("div",
|
|
3749
|
+
$("div", ml, [
|
|
3750
3750
|
V(g, {
|
|
3751
|
-
modelValue:
|
|
3752
|
-
"onUpdate:modelValue": O[1] || (O[1] = (
|
|
3751
|
+
modelValue: i.value,
|
|
3752
|
+
"onUpdate:modelValue": O[1] || (O[1] = (w) => i.value = w),
|
|
3753
3753
|
style: { width: "80px" },
|
|
3754
|
-
onChange:
|
|
3754
|
+
onChange: D
|
|
3755
3755
|
}, {
|
|
3756
3756
|
default: Y(() => [
|
|
3757
|
-
(
|
|
3758
|
-
key:
|
|
3759
|
-
value:
|
|
3760
|
-
label:
|
|
3757
|
+
(T(), L(ae, null, se(c, (w) => V(h, {
|
|
3758
|
+
key: w.value,
|
|
3759
|
+
value: w.value,
|
|
3760
|
+
label: w.text
|
|
3761
3761
|
}, null, 8, ["value", "label"])), 64))
|
|
3762
3762
|
]),
|
|
3763
3763
|
_: 1
|
|
3764
3764
|
}, 8, ["modelValue"])
|
|
3765
3765
|
]),
|
|
3766
|
-
$("div",
|
|
3767
|
-
$("div",
|
|
3766
|
+
$("div", pl, [
|
|
3767
|
+
$("div", hl, [
|
|
3768
3768
|
$("div", {
|
|
3769
3769
|
class: "op-calendar-pc-prev-month",
|
|
3770
|
-
onClick: O[2] || (O[2] = (
|
|
3771
|
-
},
|
|
3770
|
+
onClick: O[2] || (O[2] = (w) => N("prev"))
|
|
3771
|
+
}, vl),
|
|
3772
3772
|
V(g, {
|
|
3773
3773
|
modelValue: l.value,
|
|
3774
|
-
"onUpdate:modelValue": O[3] || (O[3] = (
|
|
3774
|
+
"onUpdate:modelValue": O[3] || (O[3] = (w) => l.value = w),
|
|
3775
3775
|
style: { width: "60px" },
|
|
3776
|
-
onChange:
|
|
3776
|
+
onChange: S
|
|
3777
3777
|
}, {
|
|
3778
3778
|
default: Y(() => [
|
|
3779
|
-
(
|
|
3780
|
-
key:
|
|
3781
|
-
value:
|
|
3782
|
-
label:
|
|
3779
|
+
(T(), L(ae, null, se(d, (w) => V(h, {
|
|
3780
|
+
key: w.value,
|
|
3781
|
+
value: w.value,
|
|
3782
|
+
label: w.text
|
|
3783
3783
|
}, null, 8, ["value", "label"])), 64))
|
|
3784
3784
|
]),
|
|
3785
3785
|
_: 1
|
|
3786
3786
|
}, 8, ["modelValue"]),
|
|
3787
3787
|
$("div", {
|
|
3788
3788
|
class: "op-calendar-pc-next-month",
|
|
3789
|
-
onClick: O[4] || (O[4] = (
|
|
3790
|
-
},
|
|
3789
|
+
onClick: O[4] || (O[4] = (w) => N("next"))
|
|
3790
|
+
}, _l)
|
|
3791
3791
|
])
|
|
3792
3792
|
]),
|
|
3793
3793
|
$("span", {
|
|
3794
3794
|
class: "op-calendar-pc-backtoday OP_LOG_BTN",
|
|
3795
3795
|
hidefocus: "true",
|
|
3796
|
-
onClick:
|
|
3796
|
+
onClick: x
|
|
3797
3797
|
}, "今天")
|
|
3798
3798
|
]),
|
|
3799
|
-
$("div",
|
|
3800
|
-
$("table",
|
|
3799
|
+
$("div", wl, [
|
|
3800
|
+
$("table", bl, [
|
|
3801
3801
|
$("tbody", null, [
|
|
3802
|
-
|
|
3803
|
-
(
|
|
3804
|
-
(
|
|
3802
|
+
kl,
|
|
3803
|
+
(T(!0), L(ae, null, se(e.value, (w, C) => (T(), L("tr", { key: C }, [
|
|
3804
|
+
(T(!0), L(ae, null, se(w, (k) => (T(), L("td", {
|
|
3805
3805
|
key: k.date
|
|
3806
3806
|
}, [
|
|
3807
|
-
$("div",
|
|
3807
|
+
$("div", Cl, [
|
|
3808
3808
|
$("a", {
|
|
3809
3809
|
href: "javascript:void(0);",
|
|
3810
|
-
class:
|
|
3810
|
+
class: De({
|
|
3811
3811
|
"op-calendar-pc-table-selected": k.isSelectClass,
|
|
3812
3812
|
"op-calendar-pc-table-other-month": k.otherMonth,
|
|
3813
3813
|
"op-calendar-pc-table-festival": k.hasTerm,
|
|
@@ -3816,13 +3816,13 @@ const se = hs(), gs = { class: "ut-gante-tbody" }, vs = ["onMouseenter", "onMous
|
|
|
3816
3816
|
"op-calendar-pc-table-rest": k.isRestDay
|
|
3817
3817
|
}),
|
|
3818
3818
|
date: k.date,
|
|
3819
|
-
onClick:
|
|
3819
|
+
onClick: _
|
|
3820
3820
|
}, [
|
|
3821
|
-
k.isWorkDay ? (
|
|
3822
|
-
k.isRestDay ? (
|
|
3823
|
-
$("span",
|
|
3824
|
-
$("span",
|
|
3825
|
-
], 10,
|
|
3821
|
+
k.isWorkDay ? (T(), L("span", Dl, "班")) : te("", !0),
|
|
3822
|
+
k.isRestDay ? (T(), L("span", $l, "休")) : te("", !0),
|
|
3823
|
+
$("span", Ml, G(k.day), 1),
|
|
3824
|
+
$("span", Tl, G(k.d_day), 1)
|
|
3825
|
+
], 10, xl)
|
|
3826
3826
|
])
|
|
3827
3827
|
]))), 128))
|
|
3828
3828
|
]))), 128))
|
|
@@ -3830,27 +3830,27 @@ const se = hs(), gs = { class: "ut-gante-tbody" }, vs = ["onMouseenter", "onMous
|
|
|
3830
3830
|
])
|
|
3831
3831
|
])
|
|
3832
3832
|
]),
|
|
3833
|
-
$("div",
|
|
3834
|
-
$("p",
|
|
3835
|
-
$("p",
|
|
3836
|
-
$("p",
|
|
3833
|
+
$("div", Sl, [
|
|
3834
|
+
$("p", El, G(n.value), 1),
|
|
3835
|
+
$("p", Il, G(u.value.cDay), 1),
|
|
3836
|
+
$("p", Nl, [
|
|
3837
3837
|
$("span", null, G(u.value.IMonthCn) + G(u.value.IDayCn), 1),
|
|
3838
3838
|
$("span", null, G(u.value.gzYear) + "年 " + G(u.value.animal), 1),
|
|
3839
3839
|
$("span", null, G(u.value.gzMonth) + "月 " + G(u.value.gzDay) + "日", 1)
|
|
3840
3840
|
]),
|
|
3841
|
-
u.value.lunarFestival ? (
|
|
3842
|
-
u.value.festival ? (
|
|
3843
|
-
|
|
3841
|
+
u.value.lunarFestival ? (T(), L("p", Fl, G(u.value.lunarFestival), 1)) : te("", !0),
|
|
3842
|
+
u.value.festival ? (T(), L("p", Ll, G(u.value.festival), 1)) : te("", !0),
|
|
3843
|
+
Al
|
|
3844
3844
|
])
|
|
3845
3845
|
]),
|
|
3846
|
-
|
|
3846
|
+
Pl
|
|
3847
3847
|
]);
|
|
3848
3848
|
};
|
|
3849
3849
|
}
|
|
3850
|
-
}),
|
|
3850
|
+
}), Rl = fe(Ol), Ul = { class: "flip-clock" }, Vl = ["id"], zl = { key: 0 }, jl = { class: "flip-card__top" }, Wl = ["data-value"], Yl = ["data-value"], ql = ["data-value"], Hl = { key: 1 }, Gl = { class: "no-animation__card" }, Xl = {
|
|
3851
3851
|
name: "UtCountdown"
|
|
3852
|
-
},
|
|
3853
|
-
...
|
|
3852
|
+
}, Kl = /* @__PURE__ */ K({
|
|
3853
|
+
...Xl,
|
|
3854
3854
|
props: {
|
|
3855
3855
|
countdown: {
|
|
3856
3856
|
type: Boolean,
|
|
@@ -3947,14 +3947,14 @@ const se = hs(), gs = { class: "ut-gante-tbody" }, vs = ["onMouseenter", "onMous
|
|
|
3947
3947
|
}
|
|
3948
3948
|
},
|
|
3949
3949
|
setup(o) {
|
|
3950
|
-
Rt((
|
|
3951
|
-
|
|
3952
|
-
|
|
3953
|
-
"
|
|
3954
|
-
|
|
3955
|
-
"
|
|
3950
|
+
Rt((v) => ({
|
|
3951
|
+
c1060244: v.maincolor,
|
|
3952
|
+
"91661c4a": v.labelcolor,
|
|
3953
|
+
"685c09ba": v.mainflipbackgroundcolor,
|
|
3954
|
+
db76d894: v.secondflipcolor,
|
|
3955
|
+
"16d13f88": v.secondflipbackgroundcolor
|
|
3956
3956
|
}));
|
|
3957
|
-
const n = o, e = P(Math.trunc((/* @__PURE__ */ new Date()).getTime() / 1e3)), s = P(0), t = P(), l = P(0),
|
|
3957
|
+
const n = o, e = P(Math.trunc((/* @__PURE__ */ new Date()).getTime() / 1e3)), s = P(0), t = P(), l = P(0), i = P(!1), a = P([
|
|
3958
3958
|
{
|
|
3959
3959
|
current: 0,
|
|
3960
3960
|
previous: 0,
|
|
@@ -3984,50 +3984,50 @@ const se = hs(), gs = { class: "ut-gante-tbody" }, vs = ["onMouseenter", "onMous
|
|
|
3984
3984
|
show: n.showSeconds
|
|
3985
3985
|
}
|
|
3986
3986
|
]), c = () => {
|
|
3987
|
-
p(0,
|
|
3988
|
-
}, u = (
|
|
3989
|
-
if (
|
|
3987
|
+
p(0, S), p(1, D), p(2, N), p(3, d);
|
|
3988
|
+
}, u = (v) => v != null ? v.toString().length <= 1 ? "0" + v.toString() : v.toString() : "00", p = (v, r) => {
|
|
3989
|
+
if (v >= a.value.length || r === void 0)
|
|
3990
3990
|
return;
|
|
3991
|
-
const
|
|
3992
|
-
if (y !==
|
|
3991
|
+
const M = a.value[v], y = r.value < 0 ? 0 : r.value, F = document.querySelector(`#${M.elementId}`);
|
|
3992
|
+
if (y !== M.current && (M.previous = M.current, M.current = y, F && (F.classList.remove("flip"), F.offsetWidth, F.classList.add("flip")), v === 0)) {
|
|
3993
3993
|
const f = F.querySelectorAll("span b");
|
|
3994
3994
|
if (f)
|
|
3995
|
-
for (const
|
|
3996
|
-
const
|
|
3997
|
-
if (
|
|
3998
|
-
if (!
|
|
3999
|
-
const m =
|
|
4000
|
-
|
|
3995
|
+
for (const _ of f) {
|
|
3996
|
+
const x = _.classList[0];
|
|
3997
|
+
if (r.value / 1e3 >= 1) {
|
|
3998
|
+
if (!x.includes("-4digits")) {
|
|
3999
|
+
const m = x + "-4digits";
|
|
4000
|
+
_.classList.add(m), _.classList.remove(x);
|
|
4001
4001
|
}
|
|
4002
|
-
} else if (
|
|
4003
|
-
const m =
|
|
4004
|
-
|
|
4002
|
+
} else if (x.includes("-4digits")) {
|
|
4003
|
+
const m = x.replace("-4digits", "");
|
|
4004
|
+
_.classList.add(m), _.classList.remove(x);
|
|
4005
4005
|
}
|
|
4006
4006
|
}
|
|
4007
4007
|
else
|
|
4008
4008
|
console.log("....");
|
|
4009
4009
|
}
|
|
4010
|
-
}, d = ue(() => n.countdown ? Math.trunc(l.value) % 60 : Math.trunc(e.value) % 60),
|
|
4010
|
+
}, d = ue(() => n.countdown ? Math.trunc(l.value) % 60 : Math.trunc(e.value) % 60), N = ue(() => n.countdown ? Math.trunc(l.value / 60) % 60 : Math.trunc(e.value / 60) % 60), D = ue(() => n.countdown ? Math.trunc(l.value / 60 / 60) % 24 : new Date(e.value * 1e3).getHours()), S = ue(() => n.countdown ? Math.trunc(l.value / 60 / 60 / 24) : Math.trunc(e.value / 60 / 60 / 24));
|
|
4011
4011
|
return Ue(
|
|
4012
4012
|
() => n.deadline,
|
|
4013
|
-
(
|
|
4014
|
-
const
|
|
4015
|
-
if (s.value = Math.trunc(Date.parse(
|
|
4013
|
+
(v) => {
|
|
4014
|
+
const r = v;
|
|
4015
|
+
if (s.value = Math.trunc(Date.parse(r.replace(/-/g, "/")) / 1e3), !s.value)
|
|
4016
4016
|
throw new Error("Invalid props value, correct the 'deadline'");
|
|
4017
4017
|
}
|
|
4018
4018
|
), Ue(e, () => {
|
|
4019
4019
|
n.countdown ? (l.value = s.value - e.value, l.value <= 0 || n.stop ? (l.value = 0, p(3, 0)) : c()) : c();
|
|
4020
|
-
}), Ue(l, (
|
|
4021
|
-
|
|
4020
|
+
}), Ue(l, (v) => {
|
|
4021
|
+
v == 0 && c();
|
|
4022
4022
|
}), Fe(() => {
|
|
4023
|
-
l.value !== 0 && (
|
|
4023
|
+
l.value !== 0 && (i.value = !0);
|
|
4024
4024
|
}), Ze(() => {
|
|
4025
4025
|
if (n.countdown) {
|
|
4026
4026
|
if (!n.deadline)
|
|
4027
4027
|
throw new Error("Missing props 'deadline'");
|
|
4028
|
-
const
|
|
4029
|
-
let
|
|
4030
|
-
if (n.deadlineDate != null && (
|
|
4028
|
+
const v = n.deadline;
|
|
4029
|
+
let r = Date.parse(v.replace(/-/g, "/"));
|
|
4030
|
+
if (n.deadlineDate != null && (r = Date.parse(n.deadlineDate.toDateString())), n.deadlineISO && (r = Date.parse(n.deadlineISO)), s.value = Math.trunc(r / 1e3), !s.value)
|
|
4031
4031
|
throw new Error("Invalid props value, correct the 'deadline'");
|
|
4032
4032
|
}
|
|
4033
4033
|
t.value = setInterval(() => {
|
|
@@ -4035,45 +4035,45 @@ const se = hs(), gs = { class: "ut-gante-tbody" }, vs = ["onMouseenter", "onMous
|
|
|
4035
4035
|
}, 1e3);
|
|
4036
4036
|
}), Bt(() => {
|
|
4037
4037
|
clearInterval(t.value);
|
|
4038
|
-
}), (
|
|
4039
|
-
(
|
|
4040
|
-
key:
|
|
4041
|
-
id:
|
|
4038
|
+
}), (v, r) => (T(), L("div", Ul, [
|
|
4039
|
+
(T(!0), L(ae, null, se(a.value, (M) => ve((T(), L("span", {
|
|
4040
|
+
key: M.label,
|
|
4041
|
+
id: M.elementId,
|
|
4042
4042
|
class: "flip-clock__piece"
|
|
4043
4043
|
}, [
|
|
4044
|
-
o.flipAnimation ? (
|
|
4044
|
+
o.flipAnimation ? (T(), L("div", zl, [
|
|
4045
4045
|
$("span", {
|
|
4046
4046
|
class: "flip-clock__card flip-card",
|
|
4047
|
-
style:
|
|
4047
|
+
style: ne(o.countdownSize ? `font-size:${o.countdownSize}` : "")
|
|
4048
4048
|
}, [
|
|
4049
|
-
$("b",
|
|
4049
|
+
$("b", jl, G(u(M.current)), 1),
|
|
4050
4050
|
$("b", {
|
|
4051
4051
|
class: "flip-card__bottom",
|
|
4052
|
-
"data-value": u(
|
|
4053
|
-
}, null, 8,
|
|
4052
|
+
"data-value": u(M.current)
|
|
4053
|
+
}, null, 8, Wl),
|
|
4054
4054
|
$("b", {
|
|
4055
4055
|
class: "flip-card__back",
|
|
4056
|
-
"data-value": u(
|
|
4057
|
-
}, null, 8,
|
|
4056
|
+
"data-value": u(M.previous)
|
|
4057
|
+
}, null, 8, Yl),
|
|
4058
4058
|
$("b", {
|
|
4059
4059
|
class: "flip-card__back-bottom",
|
|
4060
|
-
"data-value": u(
|
|
4061
|
-
}, null, 8,
|
|
4060
|
+
"data-value": u(M.previous)
|
|
4061
|
+
}, null, 8, ql)
|
|
4062
4062
|
], 4)
|
|
4063
|
-
])) : (
|
|
4064
|
-
$("span",
|
|
4063
|
+
])) : (T(), L("div", Hl, [
|
|
4064
|
+
$("span", Gl, G(u(M.current)), 1)
|
|
4065
4065
|
])),
|
|
4066
|
-
o.showLabels ? (
|
|
4066
|
+
o.showLabels ? (T(), L("span", {
|
|
4067
4067
|
key: 2,
|
|
4068
4068
|
class: "flip-clock__slot",
|
|
4069
|
-
style:
|
|
4070
|
-
}, G(
|
|
4071
|
-
], 8,
|
|
4072
|
-
[
|
|
4069
|
+
style: ne(o.labelSize ? `font-size:${o.labelSize}` : "")
|
|
4070
|
+
}, G(M.label), 5)) : te("", !0)
|
|
4071
|
+
], 8, Vl)), [
|
|
4072
|
+
[ke, M.show]
|
|
4073
4073
|
])), 128))
|
|
4074
4074
|
]));
|
|
4075
4075
|
}
|
|
4076
|
-
}),
|
|
4076
|
+
}), Jl = /* @__PURE__ */ Se(Kl, [["__scopeId", "data-v-59386b45"]]), Ql = fe(Jl), no = Object.freeze(
|
|
4077
4077
|
{
|
|
4078
4078
|
left: 0,
|
|
4079
4079
|
top: 0,
|
|
@@ -4105,7 +4105,7 @@ const lo = Object.freeze({
|
|
|
4105
4105
|
// Transformations
|
|
4106
4106
|
...so
|
|
4107
4107
|
});
|
|
4108
|
-
function
|
|
4108
|
+
function Zl(o, n) {
|
|
4109
4109
|
const e = {
|
|
4110
4110
|
...o
|
|
4111
4111
|
};
|
|
@@ -4115,9 +4115,9 @@ function ea(o, n) {
|
|
|
4115
4115
|
}
|
|
4116
4116
|
return e;
|
|
4117
4117
|
}
|
|
4118
|
-
const
|
|
4119
|
-
function
|
|
4120
|
-
n.split(
|
|
4118
|
+
const ea = /[\s,]+/;
|
|
4119
|
+
function ta(o, n) {
|
|
4120
|
+
n.split(ea).forEach((e) => {
|
|
4121
4121
|
switch (e.trim()) {
|
|
4122
4122
|
case "horizontal":
|
|
4123
4123
|
o.hFlip = !0;
|
|
@@ -4128,7 +4128,7 @@ function oa(o, n) {
|
|
|
4128
4128
|
}
|
|
4129
4129
|
});
|
|
4130
4130
|
}
|
|
4131
|
-
function
|
|
4131
|
+
function oa(o, n = 0) {
|
|
4132
4132
|
const e = o.replace(/^-?[0-9.]*/, "");
|
|
4133
4133
|
function s(t) {
|
|
4134
4134
|
for (; t < 0; )
|
|
@@ -4154,7 +4154,7 @@ function na(o, n = 0) {
|
|
|
4154
4154
|
}
|
|
4155
4155
|
return n;
|
|
4156
4156
|
}
|
|
4157
|
-
const
|
|
4157
|
+
const na = /(-?[0-9.]*[0-9]+[0-9.]*)/g, sa = /^-?[0-9.]*[0-9]+[0-9.]*$/g;
|
|
4158
4158
|
function Tt(o, n, e) {
|
|
4159
4159
|
if (n === 1)
|
|
4160
4160
|
return o;
|
|
@@ -4162,48 +4162,48 @@ function Tt(o, n, e) {
|
|
|
4162
4162
|
return Math.ceil(o * n * e) / e;
|
|
4163
4163
|
if (typeof o != "string")
|
|
4164
4164
|
return o;
|
|
4165
|
-
const s = o.split(
|
|
4165
|
+
const s = o.split(na);
|
|
4166
4166
|
if (s === null || !s.length)
|
|
4167
4167
|
return o;
|
|
4168
4168
|
const t = [];
|
|
4169
|
-
let l = s.shift(),
|
|
4169
|
+
let l = s.shift(), i = sa.test(l);
|
|
4170
4170
|
for (; ; ) {
|
|
4171
|
-
if (
|
|
4171
|
+
if (i) {
|
|
4172
4172
|
const a = parseFloat(l);
|
|
4173
4173
|
isNaN(a) ? t.push(l) : t.push(Math.ceil(a * n * e) / e);
|
|
4174
4174
|
} else
|
|
4175
4175
|
t.push(l);
|
|
4176
4176
|
if (l = s.shift(), l === void 0)
|
|
4177
4177
|
return t.join("");
|
|
4178
|
-
|
|
4178
|
+
i = !i;
|
|
4179
4179
|
}
|
|
4180
4180
|
}
|
|
4181
|
-
function
|
|
4181
|
+
function la(o, n = "defs") {
|
|
4182
4182
|
let e = "";
|
|
4183
4183
|
const s = o.indexOf("<" + n);
|
|
4184
4184
|
for (; s >= 0; ) {
|
|
4185
4185
|
const t = o.indexOf(">", s), l = o.indexOf("</" + n);
|
|
4186
4186
|
if (t === -1 || l === -1)
|
|
4187
4187
|
break;
|
|
4188
|
-
const
|
|
4189
|
-
if (
|
|
4188
|
+
const i = o.indexOf(">", l);
|
|
4189
|
+
if (i === -1)
|
|
4190
4190
|
break;
|
|
4191
|
-
e += o.slice(t + 1, l).trim(), o = o.slice(0, s).trim() + o.slice(
|
|
4191
|
+
e += o.slice(t + 1, l).trim(), o = o.slice(0, s).trim() + o.slice(i + 1);
|
|
4192
4192
|
}
|
|
4193
4193
|
return {
|
|
4194
4194
|
defs: e,
|
|
4195
4195
|
content: o
|
|
4196
4196
|
};
|
|
4197
4197
|
}
|
|
4198
|
-
function
|
|
4198
|
+
function aa(o, n) {
|
|
4199
4199
|
return o ? "<defs>" + o + "</defs>" + n : n;
|
|
4200
4200
|
}
|
|
4201
|
-
function
|
|
4202
|
-
const s =
|
|
4203
|
-
return
|
|
4201
|
+
function ia(o, n, e) {
|
|
4202
|
+
const s = la(o);
|
|
4203
|
+
return aa(s.defs, n + s.content + e);
|
|
4204
4204
|
}
|
|
4205
|
-
const
|
|
4206
|
-
function
|
|
4205
|
+
const ra = (o) => o === "unset" || o === "undefined" || o === "none";
|
|
4206
|
+
function ca(o, n) {
|
|
4207
4207
|
const e = {
|
|
4208
4208
|
...ht,
|
|
4209
4209
|
...o
|
|
@@ -4217,96 +4217,96 @@ function da(o, n) {
|
|
|
4217
4217
|
height: e.height
|
|
4218
4218
|
};
|
|
4219
4219
|
let l = e.body;
|
|
4220
|
-
[e, s].forEach((
|
|
4221
|
-
const
|
|
4222
|
-
let F =
|
|
4223
|
-
|
|
4220
|
+
[e, s].forEach((v) => {
|
|
4221
|
+
const r = [], M = v.hFlip, y = v.vFlip;
|
|
4222
|
+
let F = v.rotate;
|
|
4223
|
+
M ? y ? F += 2 : (r.push(
|
|
4224
4224
|
"translate(" + (t.width + t.left).toString() + " " + (0 - t.top).toString() + ")"
|
|
4225
|
-
),
|
|
4225
|
+
), r.push("scale(-1 1)"), t.top = t.left = 0) : y && (r.push(
|
|
4226
4226
|
"translate(" + (0 - t.left).toString() + " " + (t.height + t.top).toString() + ")"
|
|
4227
|
-
),
|
|
4227
|
+
), r.push("scale(1 -1)"), t.top = t.left = 0);
|
|
4228
4228
|
let f;
|
|
4229
4229
|
switch (F < 0 && (F -= Math.floor(F / 4) * 4), F = F % 4, F) {
|
|
4230
4230
|
case 1:
|
|
4231
|
-
f = t.height / 2 + t.top,
|
|
4231
|
+
f = t.height / 2 + t.top, r.unshift(
|
|
4232
4232
|
"rotate(90 " + f.toString() + " " + f.toString() + ")"
|
|
4233
4233
|
);
|
|
4234
4234
|
break;
|
|
4235
4235
|
case 2:
|
|
4236
|
-
|
|
4236
|
+
r.unshift(
|
|
4237
4237
|
"rotate(180 " + (t.width / 2 + t.left).toString() + " " + (t.height / 2 + t.top).toString() + ")"
|
|
4238
4238
|
);
|
|
4239
4239
|
break;
|
|
4240
4240
|
case 3:
|
|
4241
|
-
f = t.width / 2 + t.left,
|
|
4241
|
+
f = t.width / 2 + t.left, r.unshift(
|
|
4242
4242
|
"rotate(-90 " + f.toString() + " " + f.toString() + ")"
|
|
4243
4243
|
);
|
|
4244
4244
|
break;
|
|
4245
4245
|
}
|
|
4246
|
-
F % 2 === 1 && (t.left !== t.top && (f = t.left, t.left = t.top, t.top = f), t.width !== t.height && (f = t.width, t.width = t.height, t.height = f)),
|
|
4246
|
+
F % 2 === 1 && (t.left !== t.top && (f = t.left, t.left = t.top, t.top = f), t.width !== t.height && (f = t.width, t.width = t.height, t.height = f)), r.length && (l = ia(
|
|
4247
4247
|
l,
|
|
4248
|
-
'<g transform="' +
|
|
4248
|
+
'<g transform="' + r.join(" ") + '">',
|
|
4249
4249
|
"</g>"
|
|
4250
4250
|
));
|
|
4251
4251
|
});
|
|
4252
|
-
const
|
|
4252
|
+
const i = s.width, a = s.height, c = t.width, u = t.height;
|
|
4253
4253
|
let p, d;
|
|
4254
|
-
|
|
4255
|
-
const
|
|
4256
|
-
|
|
4254
|
+
i === null ? (d = a === null ? "1em" : a === "auto" ? u : a, p = Tt(d, c / u)) : (p = i === "auto" ? c : i, d = a === null ? Tt(p, u / c) : a === "auto" ? u : a);
|
|
4255
|
+
const N = {}, D = (v, r) => {
|
|
4256
|
+
ra(r) || (N[v] = r.toString());
|
|
4257
4257
|
};
|
|
4258
|
-
|
|
4259
|
-
const
|
|
4260
|
-
return
|
|
4261
|
-
attributes:
|
|
4262
|
-
viewBox:
|
|
4258
|
+
D("width", p), D("height", d);
|
|
4259
|
+
const S = [t.left, t.top, c, u];
|
|
4260
|
+
return N.viewBox = S.join(" "), {
|
|
4261
|
+
attributes: N,
|
|
4262
|
+
viewBox: S,
|
|
4263
4263
|
body: l
|
|
4264
4264
|
};
|
|
4265
4265
|
}
|
|
4266
|
-
const
|
|
4267
|
-
let
|
|
4268
|
-
function
|
|
4266
|
+
const da = /\sid="(\S+)"/g, ua = "IconifyId" + Date.now().toString(16) + (Math.random() * 16777216 | 0).toString(16);
|
|
4267
|
+
let fa = 0;
|
|
4268
|
+
function ma(o, n = ua) {
|
|
4269
4269
|
const e = [];
|
|
4270
4270
|
let s;
|
|
4271
|
-
for (; s =
|
|
4271
|
+
for (; s = da.exec(o); )
|
|
4272
4272
|
e.push(s[1]);
|
|
4273
4273
|
if (!e.length)
|
|
4274
4274
|
return o;
|
|
4275
4275
|
const t = "suffix" + (Math.random() * 16777216 | Date.now()).toString(16);
|
|
4276
4276
|
return e.forEach((l) => {
|
|
4277
|
-
const
|
|
4277
|
+
const i = typeof n == "function" ? n(l) : n + (fa++).toString(), a = l.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
4278
4278
|
o = o.replace(
|
|
4279
4279
|
// Allowed characters before id: [#;"]
|
|
4280
4280
|
// Allowed characters after id: [)"], .[a-z]
|
|
4281
4281
|
new RegExp('([#;"])(' + a + ')([")]|\\.[a-z])', "g"),
|
|
4282
|
-
"$1" +
|
|
4282
|
+
"$1" + i + t + "$3"
|
|
4283
4283
|
);
|
|
4284
4284
|
}), o = o.replace(new RegExp(t, "g"), ""), o;
|
|
4285
4285
|
}
|
|
4286
|
-
function
|
|
4286
|
+
function pa(o, n) {
|
|
4287
4287
|
let e = o.indexOf("xlink:") === -1 ? "" : ' xmlns:xlink="http://www.w3.org/1999/xlink"';
|
|
4288
4288
|
for (const s in n)
|
|
4289
4289
|
e += " " + s + '="' + n[s] + '"';
|
|
4290
4290
|
return '<svg xmlns="http://www.w3.org/2000/svg"' + e + ">" + o + "</svg>";
|
|
4291
4291
|
}
|
|
4292
|
-
function
|
|
4292
|
+
function ha(o) {
|
|
4293
4293
|
return o.replace(/"/g, "'").replace(/%/g, "%25").replace(/#/g, "%23").replace(/</g, "%3C").replace(/>/g, "%3E").replace(/\s+/g, " ");
|
|
4294
4294
|
}
|
|
4295
|
-
function
|
|
4296
|
-
return "data:image/svg+xml," +
|
|
4295
|
+
function ga(o) {
|
|
4296
|
+
return "data:image/svg+xml," + ha(o);
|
|
4297
4297
|
}
|
|
4298
|
-
function
|
|
4299
|
-
return 'url("' +
|
|
4298
|
+
function va(o) {
|
|
4299
|
+
return 'url("' + ga(o) + '")';
|
|
4300
4300
|
}
|
|
4301
4301
|
const St = {
|
|
4302
4302
|
...ao,
|
|
4303
4303
|
inline: !1
|
|
4304
|
-
},
|
|
4304
|
+
}, ya = {
|
|
4305
4305
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4306
4306
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
4307
4307
|
"aria-hidden": !0,
|
|
4308
4308
|
role: "img"
|
|
4309
|
-
},
|
|
4309
|
+
}, _a = {
|
|
4310
4310
|
display: "inline-block"
|
|
4311
4311
|
}, it = {
|
|
4312
4312
|
backgroundColor: "currentColor"
|
|
@@ -4334,12 +4334,12 @@ const Ke = {};
|
|
|
4334
4334
|
function Nt(o) {
|
|
4335
4335
|
return o + (o.match(/^[-0-9.]+$/) ? "px" : "");
|
|
4336
4336
|
}
|
|
4337
|
-
const
|
|
4338
|
-
const e =
|
|
4339
|
-
for (let
|
|
4340
|
-
const
|
|
4341
|
-
if (
|
|
4342
|
-
switch (
|
|
4337
|
+
const wa = (o, n) => {
|
|
4338
|
+
const e = Zl(St, n), s = { ...ya }, t = n.mode || "svg", l = {}, i = n.style, a = typeof i == "object" && !(i instanceof Array) ? i : {};
|
|
4339
|
+
for (let v in n) {
|
|
4340
|
+
const r = n[v];
|
|
4341
|
+
if (r !== void 0)
|
|
4342
|
+
switch (v) {
|
|
4343
4343
|
// Properties to ignore
|
|
4344
4344
|
case "icon":
|
|
4345
4345
|
case "style":
|
|
@@ -4350,56 +4350,56 @@ const ba = (o, n) => {
|
|
|
4350
4350
|
case "inline":
|
|
4351
4351
|
case "hFlip":
|
|
4352
4352
|
case "vFlip":
|
|
4353
|
-
e[
|
|
4353
|
+
e[v] = r === !0 || r === "true" || r === 1;
|
|
4354
4354
|
break;
|
|
4355
4355
|
// Flip as string: 'horizontal,vertical'
|
|
4356
4356
|
case "flip":
|
|
4357
|
-
typeof
|
|
4357
|
+
typeof r == "string" && ta(e, r);
|
|
4358
4358
|
break;
|
|
4359
4359
|
// Color: override style
|
|
4360
4360
|
case "color":
|
|
4361
|
-
l.color =
|
|
4361
|
+
l.color = r;
|
|
4362
4362
|
break;
|
|
4363
4363
|
// Rotation as string
|
|
4364
4364
|
case "rotate":
|
|
4365
|
-
typeof
|
|
4365
|
+
typeof r == "string" ? e[v] = oa(r) : typeof r == "number" && (e[v] = r);
|
|
4366
4366
|
break;
|
|
4367
4367
|
// Remove aria-hidden
|
|
4368
4368
|
case "ariaHidden":
|
|
4369
4369
|
case "aria-hidden":
|
|
4370
|
-
|
|
4370
|
+
r !== !0 && r !== "true" && delete s["aria-hidden"];
|
|
4371
4371
|
break;
|
|
4372
4372
|
default: {
|
|
4373
|
-
const
|
|
4374
|
-
|
|
4373
|
+
const M = Ke[v];
|
|
4374
|
+
M ? (r === !0 || r === "true" || r === 1) && (e[M] = !0) : St[v] === void 0 && (s[v] = r);
|
|
4375
4375
|
}
|
|
4376
4376
|
}
|
|
4377
4377
|
}
|
|
4378
|
-
const c =
|
|
4378
|
+
const c = ca(o, e), u = c.attributes;
|
|
4379
4379
|
if (e.inline && (l.verticalAlign = "-0.125em"), t === "svg") {
|
|
4380
4380
|
s.style = {
|
|
4381
4381
|
...l,
|
|
4382
4382
|
...a
|
|
4383
4383
|
}, Object.assign(s, u);
|
|
4384
|
-
let
|
|
4385
|
-
return typeof
|
|
4384
|
+
let v = 0, r = n.id;
|
|
4385
|
+
return typeof r == "string" && (r = r.replace(/-/g, "_")), s.innerHTML = ma(c.body, r ? () => r + "ID" + v++ : "iconifyVue"), ye("svg", s);
|
|
4386
4386
|
}
|
|
4387
|
-
const { body: p, width: d, height:
|
|
4387
|
+
const { body: p, width: d, height: N } = o, D = t === "mask" || (t === "bg" ? !1 : p.indexOf("currentColor") !== -1), S = pa(p, {
|
|
4388
4388
|
...u,
|
|
4389
4389
|
width: d + "",
|
|
4390
|
-
height:
|
|
4390
|
+
height: N + ""
|
|
4391
4391
|
});
|
|
4392
4392
|
return s.style = {
|
|
4393
4393
|
...l,
|
|
4394
|
-
"--svg":
|
|
4394
|
+
"--svg": va(S),
|
|
4395
4395
|
width: Nt(u.width),
|
|
4396
4396
|
height: Nt(u.height),
|
|
4397
|
-
...
|
|
4398
|
-
...
|
|
4397
|
+
..._a,
|
|
4398
|
+
...D ? it : io,
|
|
4399
4399
|
...a
|
|
4400
4400
|
}, ye("span", s);
|
|
4401
4401
|
}, ro = /* @__PURE__ */ Object.create(null);
|
|
4402
|
-
function
|
|
4402
|
+
function ba(o, n) {
|
|
4403
4403
|
ro[o] = n;
|
|
4404
4404
|
}
|
|
4405
4405
|
const Ft = K({
|
|
@@ -4408,12 +4408,12 @@ const Ft = K({
|
|
|
4408
4408
|
// Render icon
|
|
4409
4409
|
render() {
|
|
4410
4410
|
const o = this.$attrs, n = o.icon, e = typeof n == "string" ? ro[n] : typeof n == "object" ? n : null;
|
|
4411
|
-
return e === null || typeof e != "object" || typeof e.body != "string" ? this.$slots.default ? this.$slots.default() : null :
|
|
4411
|
+
return e === null || typeof e != "object" || typeof e.body != "string" ? this.$slots.default ? this.$slots.default() : null : wa({
|
|
4412
4412
|
...ht,
|
|
4413
4413
|
...e
|
|
4414
4414
|
}, o);
|
|
4415
4415
|
}
|
|
4416
|
-
}),
|
|
4416
|
+
}), ka = K({
|
|
4417
4417
|
name: "IconOffline",
|
|
4418
4418
|
components: { IconifyIcon: Ft },
|
|
4419
4419
|
props: {
|
|
@@ -4423,7 +4423,7 @@ const Ft = K({
|
|
|
4423
4423
|
},
|
|
4424
4424
|
render() {
|
|
4425
4425
|
if (!this.icon) return;
|
|
4426
|
-
typeof this.icon == "object" &&
|
|
4426
|
+
typeof this.icon == "object" && ba(this.icon, this.icon);
|
|
4427
4427
|
const o = this.$attrs;
|
|
4428
4428
|
return ye(
|
|
4429
4429
|
Ft,
|
|
@@ -4435,7 +4435,7 @@ const Ft = K({
|
|
|
4435
4435
|
{ default: () => [] }
|
|
4436
4436
|
);
|
|
4437
4437
|
}
|
|
4438
|
-
}),
|
|
4438
|
+
}), Ca = K({
|
|
4439
4439
|
name: "FontIcon",
|
|
4440
4440
|
props: {
|
|
4441
4441
|
icon: {
|
|
@@ -4471,7 +4471,7 @@ const Ft = K({
|
|
|
4471
4471
|
});
|
|
4472
4472
|
}
|
|
4473
4473
|
});
|
|
4474
|
-
function
|
|
4474
|
+
function Fa(o, n) {
|
|
4475
4475
|
console.log(o);
|
|
4476
4476
|
const e = /^IF-/;
|
|
4477
4477
|
if (e.test(o)) {
|
|
@@ -4482,7 +4482,7 @@ function La(o, n) {
|
|
|
4482
4482
|
return K({
|
|
4483
4483
|
name: "FontIcon",
|
|
4484
4484
|
render() {
|
|
4485
|
-
return ye(
|
|
4485
|
+
return ye(Ca, { icon: t, iconType: l, ...n });
|
|
4486
4486
|
}
|
|
4487
4487
|
});
|
|
4488
4488
|
} else return typeof o == "function" || typeof (o == null ? void 0 : o.render) == "function" ? o : o.startsWith("vxe") ? K({
|
|
@@ -4493,50 +4493,50 @@ function La(o, n) {
|
|
|
4493
4493
|
}) : K({
|
|
4494
4494
|
name: "OfflineIcon",
|
|
4495
4495
|
render() {
|
|
4496
|
-
return ye(
|
|
4496
|
+
return ye(ka, { icon: o, ...n });
|
|
4497
4497
|
}
|
|
4498
4498
|
});
|
|
4499
4499
|
}
|
|
4500
|
-
const
|
|
4500
|
+
const xa = [
|
|
4501
4501
|
wo,
|
|
4502
4502
|
Do,
|
|
4503
4503
|
Ao,
|
|
4504
4504
|
Qo,
|
|
4505
|
-
|
|
4506
|
-
|
|
4507
|
-
|
|
4508
|
-
|
|
4505
|
+
ln,
|
|
4506
|
+
gn,
|
|
4507
|
+
_n,
|
|
4508
|
+
kn,
|
|
4509
4509
|
oo,
|
|
4510
|
-
|
|
4511
|
-
|
|
4512
|
-
|
|
4513
|
-
|
|
4514
|
-
|
|
4515
|
-
|
|
4516
|
-
|
|
4517
|
-
],
|
|
4518
|
-
install: (o) =>
|
|
4510
|
+
ts,
|
|
4511
|
+
ss,
|
|
4512
|
+
cs,
|
|
4513
|
+
Qs,
|
|
4514
|
+
il,
|
|
4515
|
+
Rl,
|
|
4516
|
+
Ql
|
|
4517
|
+
], La = {
|
|
4518
|
+
install: (o) => xa.forEach((n) => o.use(n))
|
|
4519
4519
|
};
|
|
4520
4520
|
export {
|
|
4521
4521
|
Ao as UtAttachment,
|
|
4522
4522
|
wo as UtButton,
|
|
4523
|
-
|
|
4524
|
-
|
|
4525
|
-
|
|
4526
|
-
|
|
4527
|
-
|
|
4528
|
-
|
|
4529
|
-
|
|
4530
|
-
|
|
4523
|
+
Rl as UtCalendar,
|
|
4524
|
+
ln as UtContent,
|
|
4525
|
+
Ql as UtCountdown,
|
|
4526
|
+
gn as UtDivider,
|
|
4527
|
+
_n as UtDropdown,
|
|
4528
|
+
kn as UtForm,
|
|
4529
|
+
cs as UtFormUpload,
|
|
4530
|
+
Qs as UtGante,
|
|
4531
4531
|
oo as UtGrid,
|
|
4532
|
-
|
|
4532
|
+
il as UtIconSelect,
|
|
4533
4533
|
Do as UtLov,
|
|
4534
|
-
|
|
4535
|
-
|
|
4534
|
+
ts as UtModalForm,
|
|
4535
|
+
ss as UtModalGrid,
|
|
4536
4536
|
Qo as UtUpload,
|
|
4537
|
-
|
|
4538
|
-
|
|
4539
|
-
|
|
4540
|
-
|
|
4537
|
+
La as default,
|
|
4538
|
+
ka as iconOffline,
|
|
4539
|
+
Ca as iconfont,
|
|
4540
|
+
Fa as useRenderIcon
|
|
4541
4541
|
};
|
|
4542
4542
|
//# sourceMappingURL=components.es.js.map
|