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