@utogether/components 3.0.0-beta.13 → 3.0.0-beta.15
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 +1480 -1478
- package/dist/components.umd.js +1 -1
- package/package.json +1 -1
package/dist/components.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as K, getCurrentInstance as ye, computed as de, resolveComponent as V, createBlock as ie, createElementBlock as F, createCommentVNode as ee, openBlock as T, unref as oe, withCtx as W, Fragment as ae, renderList as se, createTextVNode as et, toDisplayString as G, createVNode as U, mergeProps as be, ref as N, reactive as ke, createElementVNode as
|
|
1
|
+
import { defineComponent as K, getCurrentInstance as ye, computed as de, resolveComponent as V, createBlock as ie, createElementBlock as F, createCommentVNode as ee, openBlock as T, unref as oe, withCtx as W, Fragment as ae, renderList as se, createTextVNode as et, toDisplayString as G, createVNode as U, mergeProps as be, ref as N, reactive as ke, createElementVNode as x, onMounted as Fe, createSlots as $t, toHandlers as tt, withDirectives as ge, vModelText as eo, normalizeClass as Ce, renderSlot as De, pushScopeId as Tt, popScopeId as Mt, normalizeStyle as ne, useAttrs as ot, nextTick as Pe, onUnmounted as St, onBeforeMount as qe, toRaw as It, useCssVars as Et, resolveDirective as to, withModifiers as We, vShow as we, createStaticVNode as oo, toRef as no, watch as Be, h as ve } from "vue";
|
|
2
2
|
import { useI18n as $e } from "vue-i18n";
|
|
3
|
-
import { throttle as Xe, toDateString as Z, isEmpty as ze, clone as ce, isString as
|
|
4
|
-
import { withInstall as ue, cookies as he, useRender as Ft, delay as lo, storageLocal as Nt, warnMessage as
|
|
3
|
+
import { throttle as Xe, toDateString as Z, isEmpty as ze, clone as ce, isString as Re, isFunction as Qe, isObject as so, timestamp as ft } from "xe-utils";
|
|
4
|
+
import { withInstall as ue, cookies as he, useRender as Ft, delay as lo, storageLocal as Nt, warnMessage as Ie, formatRules as Ee, formatItems as nt, successMessage as Ye, dbstorage as mt, i18nColums as Lt, errorMessage as ao, formatGridItems as At, iconSet as io, lunarCalendar as Ue } from "@utogether/utils";
|
|
5
5
|
import st from "await-to-js";
|
|
6
6
|
import { VxeUI as Se } from "vxe-pc-ui";
|
|
7
7
|
import Pt from "compressorjs";
|
|
@@ -32,26 +32,26 @@ const fo = {
|
|
|
32
32
|
},
|
|
33
33
|
emits: ["tap", "confirm", "cancel"],
|
|
34
34
|
setup(s, { emit: o }) {
|
|
35
|
-
const t = s, e = ye().appContext.config.globalProperties.$hasAuthority, { t: l } = $e(),
|
|
36
|
-
const k =
|
|
35
|
+
const t = s, e = ye().appContext.config.globalProperties.$hasAuthority, { t: l } = $e(), v = de(() => {
|
|
36
|
+
const k = _(), I = /.*[\u4e00-\u9fa5]+.*$/.test(t.content);
|
|
37
37
|
return {
|
|
38
38
|
icon: k,
|
|
39
39
|
content: I ? t.content : l(`message.btn.${t.content}`)
|
|
40
40
|
};
|
|
41
|
-
}),
|
|
42
|
-
var k, I, M;
|
|
43
|
-
return (k = t.content) != null && k.toLowerCase().includes("print") ? "ri-printer-line" : (I = t.content) != null && I.toLowerCase().includes("look") ? "ri-eye-line" : (M = t.content) != null && M.toLowerCase().includes("del") ? "ri-delete-bin-line" : "ri-edit-box-line";
|
|
41
|
+
}), _ = () => {
|
|
42
|
+
var k, I, M, c;
|
|
43
|
+
return t.mode === "text" ? null : t.icon ? t.icon : (k = t.content) != null && k.toLowerCase().includes("print") ? "ri-printer-line" : (I = t.content) != null && I.toLowerCase().includes("look") ? "ri-eye-line" : (M = t.content) != null && M.toLowerCase().includes("del") ? "ri-delete-bin-line" : (c = t.content) != null && c.toLowerCase().includes("edit") ? "ri-edit-box-line" : "";
|
|
44
44
|
}, w = Xe(() => {
|
|
45
45
|
E("confirm");
|
|
46
46
|
}, 3e3), $ = () => {
|
|
47
47
|
E("cancel");
|
|
48
|
-
},
|
|
48
|
+
}, m = Xe(() => {
|
|
49
49
|
t.disabled || t.auth && !e(t.auth) || E("tap");
|
|
50
|
-
}, 3e3),
|
|
50
|
+
}, 3e3), p = Xe((k) => {
|
|
51
51
|
k.disabled || k.auth && !e(k.auth) || E("tap");
|
|
52
52
|
}, 2e3), E = o;
|
|
53
53
|
return (k, I) => {
|
|
54
|
-
const M = V("vxe-button"),
|
|
54
|
+
const M = V("vxe-button"), c = V("el-popconfirm");
|
|
55
55
|
return k.children.length ? (T(), ie(M, {
|
|
56
56
|
key: 0,
|
|
57
57
|
disabled: k.auth && !oe(e)(k.auth) || k.disabled,
|
|
@@ -59,7 +59,7 @@ const fo = {
|
|
|
59
59
|
transfer: ""
|
|
60
60
|
}, {
|
|
61
61
|
default: W(() => [
|
|
62
|
-
et(G(
|
|
62
|
+
et(G(v.value.content), 1)
|
|
63
63
|
]),
|
|
64
64
|
dropdowns: W(() => [
|
|
65
65
|
(T(!0), F(ae, null, se(k.children, (L) => (T(), ie(M, {
|
|
@@ -67,14 +67,14 @@ const fo = {
|
|
|
67
67
|
disabled: L.auth && !oe(e)(L.auth) || L.disabled,
|
|
68
68
|
status: L.status || "primary",
|
|
69
69
|
content: L.content,
|
|
70
|
-
icon: `${L.icon ||
|
|
70
|
+
icon: `${L.icon || _()} ${L.icon ? "ri-1x" : ""}`,
|
|
71
71
|
mode: L.mode || "button",
|
|
72
|
-
onClick: (
|
|
72
|
+
onClick: (D) => oe(p)(L)
|
|
73
73
|
}, null, 8, ["disabled", "status", "content", "icon", "mode", "onClick"]))), 128))
|
|
74
74
|
]),
|
|
75
75
|
_: 1
|
|
76
76
|
}, 8, ["disabled", "status"])) : k.type === "pop" && !k.visible ? (T(), F("div", fo, [
|
|
77
|
-
U(
|
|
77
|
+
U(c, be({
|
|
78
78
|
"confirm-button-text": k.$t("message.btn.confirm"),
|
|
79
79
|
"cancel-button-text": k.$t("message.btn.cancel"),
|
|
80
80
|
"icon-color": "#E6A23C",
|
|
@@ -89,8 +89,8 @@ const fo = {
|
|
|
89
89
|
disabled: k.auth && !oe(e)(k.auth) || k.disabled,
|
|
90
90
|
status: k.status,
|
|
91
91
|
type: k.type,
|
|
92
|
-
content:
|
|
93
|
-
icon: `${
|
|
92
|
+
content: v.value.content,
|
|
93
|
+
icon: `${v.value.icon} ${v.value.icon ? "ri-1x" : ""}`,
|
|
94
94
|
loading: k.loading
|
|
95
95
|
}, null, 8, ["disabled", "status", "type", "content", "icon", "loading"])
|
|
96
96
|
]),
|
|
@@ -100,12 +100,12 @@ const fo = {
|
|
|
100
100
|
key: 2,
|
|
101
101
|
disabled: k.auth && !oe(e)(k.auth) || k.disabled,
|
|
102
102
|
status: k.status,
|
|
103
|
-
mode: "button",
|
|
104
|
-
content:
|
|
105
|
-
icon: `${
|
|
103
|
+
mode: k.mode || "button",
|
|
104
|
+
content: v.value.content,
|
|
105
|
+
icon: `${v.value.icon} ${v.value.icon ? "ri-1x" : ""}`,
|
|
106
106
|
loading: k.loading,
|
|
107
|
-
onClick: oe(
|
|
108
|
-
}, null, 8, ["disabled", "status", "content", "icon", "loading", "onClick"]));
|
|
107
|
+
onClick: oe(m)
|
|
108
|
+
}, null, 8, ["disabled", "status", "mode", "content", "icon", "loading", "onClick"]));
|
|
109
109
|
};
|
|
110
110
|
}
|
|
111
111
|
}), po = ue(mo), ho = { class: "ut-lov-wrapper" }, go = { style: { height: "360px" } }, vo = {
|
|
@@ -129,7 +129,7 @@ const fo = {
|
|
|
129
129
|
},
|
|
130
130
|
emits: ["clear", "change"],
|
|
131
131
|
setup(s, { emit: o }) {
|
|
132
|
-
const t = s, e = ye().appContext.config.globalProperties.$serviceApi, l = 600,
|
|
132
|
+
const t = s, e = ye().appContext.config.globalProperties.$serviceApi, l = 600, v = N(!1), _ = N(l), w = N(""), $ = N("vxe-table--ignore-clear"), m = ke({
|
|
133
133
|
loading: !1,
|
|
134
134
|
border: !0,
|
|
135
135
|
pagerConfig: {},
|
|
@@ -146,47 +146,47 @@ const fo = {
|
|
|
146
146
|
total: "total"
|
|
147
147
|
},
|
|
148
148
|
ajax: {
|
|
149
|
-
query: ({ page:
|
|
150
|
-
const
|
|
151
|
-
let
|
|
149
|
+
query: ({ page: d, form: u }) => {
|
|
150
|
+
const h = he.get("kCookies_param") ? JSON.parse(he.get("kCookies_param")) : {};
|
|
151
|
+
let g = Object.assign(
|
|
152
152
|
{},
|
|
153
|
-
|
|
154
|
-
|
|
153
|
+
u,
|
|
154
|
+
h,
|
|
155
155
|
t.defaultParams
|
|
156
156
|
);
|
|
157
|
-
if (
|
|
158
|
-
const { field:
|
|
159
|
-
|
|
157
|
+
if (g.pageNum = (d == null ? void 0 : d.currentPage) || 1, g.pageSize = (d == null ? void 0 : d.pageSize) || 20, !t.readonly) {
|
|
158
|
+
const { field: b, displayName: O } = t;
|
|
159
|
+
g[O || b] = t.record[O || b];
|
|
160
160
|
}
|
|
161
|
-
return
|
|
161
|
+
return g = k(g), p.lovType !== "url" ? (g.lovCode = t.code, e.get(
|
|
162
162
|
"/upfm/v1/lovViewHeader/listBySql",
|
|
163
|
-
|
|
164
|
-
)) : e.get(
|
|
163
|
+
g
|
|
164
|
+
)) : e.get(p.lovUrl, g);
|
|
165
165
|
}
|
|
166
166
|
}
|
|
167
167
|
},
|
|
168
168
|
checkboxConfig: {},
|
|
169
169
|
columns: []
|
|
170
170
|
});
|
|
171
|
-
let
|
|
172
|
-
const k = (
|
|
173
|
-
(
|
|
174
|
-
).forEach((
|
|
175
|
-
|
|
176
|
-
|
|
171
|
+
let p, E = [];
|
|
172
|
+
const k = (d) => (E.filter(
|
|
173
|
+
(h) => ["date", "month"].includes(h.fieldType) && h.isSearch
|
|
174
|
+
).forEach((h) => {
|
|
175
|
+
h.fieldType === "date" ? d[h.field] = Z(
|
|
176
|
+
d[h.field],
|
|
177
177
|
"yyyy-MM-dd 00:00:00"
|
|
178
|
-
) :
|
|
179
|
-
}),
|
|
180
|
-
const
|
|
181
|
-
if (!
|
|
182
|
-
const
|
|
183
|
-
field:
|
|
184
|
-
title:
|
|
178
|
+
) : h.fieldType === "month" && (d[h.field] = Z(d[h.field], "yyyy-MM"));
|
|
179
|
+
}), d), I = () => {
|
|
180
|
+
const d = ce(E, !0).filter((g) => g.isSearch === "Y");
|
|
181
|
+
if (!d.length) return;
|
|
182
|
+
const u = d.length > 2, h = d.sort((g, b) => g.seqNo - b.seqNo).map((g, b) => ({
|
|
183
|
+
field: g.colField,
|
|
184
|
+
title: g.colTitle,
|
|
185
185
|
span: 8,
|
|
186
|
-
folding:
|
|
187
|
-
itemRender: L(
|
|
186
|
+
folding: b > 1,
|
|
187
|
+
itemRender: L(g)
|
|
188
188
|
}));
|
|
189
|
-
M.collapseNode =
|
|
189
|
+
M.collapseNode = u, u ? h.splice(2, 0, M) : h.push(M), m.formConfig.items = h;
|
|
190
190
|
}, M = {
|
|
191
191
|
span: 8,
|
|
192
192
|
align: "right",
|
|
@@ -214,142 +214,142 @@ const fo = {
|
|
|
214
214
|
}
|
|
215
215
|
]
|
|
216
216
|
}
|
|
217
|
-
},
|
|
218
|
-
if (["date", "month"].includes(
|
|
219
|
-
const
|
|
220
|
-
return
|
|
221
|
-
} else if (
|
|
222
|
-
return
|
|
217
|
+
}, c = Ft(), L = (d) => {
|
|
218
|
+
if (["date", "month"].includes(d.fieldType)) {
|
|
219
|
+
const u = d.fieldType === "date" ? "yyyy-MM-dd HH:mm:ss" : "yyyy-MM";
|
|
220
|
+
return c.renderDate({ type: d.fieldType, valueFormat: u });
|
|
221
|
+
} else if (d.fieldType === "dictCode")
|
|
222
|
+
return c.renderDict(d.dictCode);
|
|
223
223
|
return { name: "VxeInput" };
|
|
224
|
-
},
|
|
225
|
-
const
|
|
226
|
-
(
|
|
227
|
-
),
|
|
228
|
-
(
|
|
224
|
+
}, D = () => {
|
|
225
|
+
const d = ce(E, !0).filter(
|
|
226
|
+
(h) => h.isCol === "Y"
|
|
227
|
+
), u = d.reduce(
|
|
228
|
+
(h, g) => h + +g.colWidth,
|
|
229
229
|
65
|
|
230
230
|
);
|
|
231
|
-
|
|
232
|
-
const
|
|
231
|
+
_.value = u < l ? l : u > 900 ? 900 : u, m.columns = d.sort((h, g) => h.seqNo - g.seqNo).map((h) => {
|
|
232
|
+
const g = h.fieldType, b = ["formatDict", h.dictCode];
|
|
233
233
|
return {
|
|
234
|
-
field:
|
|
235
|
-
title:
|
|
236
|
-
minWidth:
|
|
237
|
-
formatter:
|
|
234
|
+
field: h.colField,
|
|
235
|
+
title: h.colTitle,
|
|
236
|
+
minWidth: h.colWidth,
|
|
237
|
+
formatter: g === "date" ? ["formatDate"] : h.fieldType === "dictCode" ? b : null
|
|
238
238
|
};
|
|
239
|
-
}), t.multiple ?
|
|
240
|
-
}, S = N(null),
|
|
241
|
-
|
|
242
|
-
const
|
|
243
|
-
e.get(
|
|
239
|
+
}), t.multiple ? m.columns.unshift({ type: "checkbox", width: 45, align: "center" }) : m.columns.unshift({ type: "radio", width: 45, align: "center" });
|
|
240
|
+
}, S = N(null), r = async () => {
|
|
241
|
+
m.loading = !0;
|
|
242
|
+
const d = "/upfm/v1/lovViewHeader/detailByViewCode", [u, h] = await st(
|
|
243
|
+
e.get(d, { lovCode: t.code })
|
|
244
244
|
);
|
|
245
|
-
|
|
246
|
-
},
|
|
247
|
-
t.disabled || (
|
|
248
|
-
},
|
|
249
|
-
|
|
250
|
-
},
|
|
251
|
-
const
|
|
252
|
-
|
|
253
|
-
},
|
|
254
|
-
const
|
|
255
|
-
!ze(
|
|
256
|
-
},
|
|
257
|
-
E.length = 0,
|
|
258
|
-
},
|
|
259
|
-
},
|
|
260
|
-
return (
|
|
261
|
-
const
|
|
245
|
+
m.loading = !1, u && C(), w.value = (h == null ? void 0 : h.lovTitle) || h.lovName, E = h.lineList, p = h, t.autoLoad && S.value.commitProxy("query"), D(), I();
|
|
246
|
+
}, a = async () => {
|
|
247
|
+
t.disabled || (r(), await lo(64), v.value = !0);
|
|
248
|
+
}, f = () => {
|
|
249
|
+
A("clear", "");
|
|
250
|
+
}, i = ({ row: d }) => {
|
|
251
|
+
const u = t.multiple ? [d] : d;
|
|
252
|
+
A("change", u, p.valueField), C();
|
|
253
|
+
}, y = () => {
|
|
254
|
+
const d = S.value, u = t.multiple ? d.getCheckboxRecords() : d.getRadioRecord();
|
|
255
|
+
!ze(u) && A("change", u, p.valueField), C();
|
|
256
|
+
}, C = () => {
|
|
257
|
+
E.length = 0, v.value = !1;
|
|
258
|
+
}, B = ({ type: d }) => {
|
|
259
|
+
}, A = o;
|
|
260
|
+
return (d, u) => {
|
|
261
|
+
const h = V("vxe-grid"), g = V("vxe-button"), b = V("vxe-modal"), O = V("el-dialog"), Y = V("vxe-input");
|
|
262
262
|
return T(), F("div", ho, [
|
|
263
|
-
|
|
263
|
+
d.mode === "vxe" ? (T(), ie(b, {
|
|
264
264
|
key: 0,
|
|
265
|
-
modelValue:
|
|
266
|
-
"onUpdate:modelValue":
|
|
267
|
-
width:
|
|
265
|
+
modelValue: v.value,
|
|
266
|
+
"onUpdate:modelValue": u[0] || (u[0] = (te) => v.value = te),
|
|
267
|
+
width: _.value,
|
|
268
268
|
"destroy-on-close": !1,
|
|
269
269
|
title: w.value,
|
|
270
|
-
transfer:
|
|
270
|
+
transfer: d.transfer,
|
|
271
271
|
height: "80%",
|
|
272
272
|
resize: "",
|
|
273
273
|
"esc-closable": "",
|
|
274
274
|
"show-footer": "",
|
|
275
275
|
className: $.value,
|
|
276
|
-
"before-hide-method":
|
|
276
|
+
"before-hide-method": B
|
|
277
277
|
}, {
|
|
278
278
|
default: W(() => [
|
|
279
|
-
U(
|
|
279
|
+
U(h, be({
|
|
280
280
|
ref_key: "xgrid",
|
|
281
281
|
ref: S
|
|
282
|
-
},
|
|
282
|
+
}, m, {
|
|
283
283
|
resizable: "",
|
|
284
|
-
onCellDblclick:
|
|
284
|
+
onCellDblclick: i
|
|
285
285
|
}), null, 16)
|
|
286
286
|
]),
|
|
287
287
|
footer: W(() => [
|
|
288
|
-
U(
|
|
289
|
-
content:
|
|
288
|
+
U(g, {
|
|
289
|
+
content: d.$t("message.btn.cancel"),
|
|
290
290
|
icon: "ri-close-line",
|
|
291
291
|
status: "warning",
|
|
292
|
-
onClick:
|
|
292
|
+
onClick: C
|
|
293
293
|
}, null, 8, ["content"]),
|
|
294
|
-
U(
|
|
295
|
-
content:
|
|
294
|
+
U(g, {
|
|
295
|
+
content: d.$t("message.btn.confirm"),
|
|
296
296
|
icon: "ri-save-3-line",
|
|
297
297
|
status: "primary",
|
|
298
|
-
onClick:
|
|
298
|
+
onClick: y
|
|
299
299
|
}, null, 8, ["content"])
|
|
300
300
|
]),
|
|
301
301
|
_: 1
|
|
302
|
-
}, 8, ["modelValue", "width", "title", "transfer", "className"])) : (T(), ie(
|
|
302
|
+
}, 8, ["modelValue", "width", "title", "transfer", "className"])) : (T(), ie(O, {
|
|
303
303
|
key: 1,
|
|
304
|
-
modelValue:
|
|
305
|
-
"onUpdate:modelValue":
|
|
306
|
-
width:
|
|
304
|
+
modelValue: v.value,
|
|
305
|
+
"onUpdate:modelValue": u[1] || (u[1] = (te) => v.value = te),
|
|
306
|
+
width: _.value,
|
|
307
307
|
"show-close": !1,
|
|
308
308
|
title: w.value,
|
|
309
|
-
"append-to-body":
|
|
309
|
+
"append-to-body": d.transfer,
|
|
310
310
|
draggable: "",
|
|
311
311
|
"destroy-on-close": "",
|
|
312
312
|
"close-on-press-escape": ""
|
|
313
313
|
}, {
|
|
314
314
|
default: W(() => [
|
|
315
|
-
|
|
316
|
-
U(
|
|
315
|
+
x("div", go, [
|
|
316
|
+
U(h, be({
|
|
317
317
|
ref_key: "xgrid",
|
|
318
318
|
ref: S
|
|
319
|
-
},
|
|
319
|
+
}, m, {
|
|
320
320
|
resizable: "",
|
|
321
|
-
onCellDblclick:
|
|
321
|
+
onCellDblclick: i
|
|
322
322
|
}), null, 16)
|
|
323
323
|
])
|
|
324
324
|
]),
|
|
325
325
|
footer: W(() => [
|
|
326
|
-
U(
|
|
327
|
-
content:
|
|
326
|
+
U(g, {
|
|
327
|
+
content: d.$t("message.btn.cancel"),
|
|
328
328
|
icon: "ri-close-line",
|
|
329
329
|
status: "warning",
|
|
330
|
-
onClick:
|
|
330
|
+
onClick: C
|
|
331
331
|
}, null, 8, ["content"]),
|
|
332
|
-
U(
|
|
333
|
-
content:
|
|
332
|
+
U(g, {
|
|
333
|
+
content: d.$t("message.btn.confirm"),
|
|
334
334
|
icon: "ri-save-3-line",
|
|
335
335
|
status: "primary",
|
|
336
|
-
onClick:
|
|
336
|
+
onClick: y
|
|
337
337
|
}, null, 8, ["content"])
|
|
338
338
|
]),
|
|
339
339
|
_: 1
|
|
340
340
|
}, 8, ["modelValue", "width", "title", "append-to-body"])),
|
|
341
341
|
U(Y, {
|
|
342
|
-
modelValue:
|
|
343
|
-
"onUpdate:modelValue":
|
|
344
|
-
clearable: !
|
|
345
|
-
disabled:
|
|
346
|
-
readonly:
|
|
347
|
-
placeholder:
|
|
342
|
+
modelValue: d.record[d.displayName || d.field],
|
|
343
|
+
"onUpdate:modelValue": u[2] || (u[2] = (te) => d.record[d.displayName || d.field] = te),
|
|
344
|
+
clearable: !d.disabled && d.clearable,
|
|
345
|
+
disabled: d.disabled,
|
|
346
|
+
readonly: d.readonly,
|
|
347
|
+
placeholder: d.placeholder,
|
|
348
348
|
style: { width: "100%" },
|
|
349
349
|
type: "search",
|
|
350
350
|
size: "mini",
|
|
351
|
-
onSearchClick:
|
|
352
|
-
onClear:
|
|
351
|
+
onSearchClick: a,
|
|
352
|
+
onClear: f
|
|
353
353
|
}, null, 8, ["modelValue", "clearable", "disabled", "readonly", "placeholder"])
|
|
354
354
|
]);
|
|
355
355
|
};
|
|
@@ -361,8 +361,8 @@ async function wo(s, o) {
|
|
|
361
361
|
const e = await bo(s);
|
|
362
362
|
let l = document.createElement("canvas");
|
|
363
363
|
l.width = e.naturalWidth, l.height = e.naturalHeight;
|
|
364
|
-
const
|
|
365
|
-
|
|
364
|
+
const v = l.getContext("2d");
|
|
365
|
+
v.drawImage(e, 0, 0, l.width, l.height), l = Bt(l, v, o), l.toBlob((_) => t(_));
|
|
366
366
|
} catch (e) {
|
|
367
367
|
n(e);
|
|
368
368
|
}
|
|
@@ -378,14 +378,14 @@ function bo(s) {
|
|
|
378
378
|
});
|
|
379
379
|
}
|
|
380
380
|
const Bt = (s, o, t) => {
|
|
381
|
-
const n = t.content.split(","), { textAlign: e, fontSize: l, color:
|
|
382
|
-
o.font = `${l || 22}px Microsoft Yahei`, o.lineWidth = 1, o.fillStyle =
|
|
381
|
+
const n = t.content.split(","), { textAlign: e, fontSize: l, color: v, fillOpacity: _, xAxis: w, yAxis: $ } = t, m = s.width, p = s.height;
|
|
382
|
+
o.font = `${l || 22}px Microsoft Yahei`, o.lineWidth = 1, o.fillStyle = v || "rgba(255, 255, 255, 1)", o.textAlign = e || "left", o.textBaseline = "middle", o.globalAlpha = Number(_ || 1);
|
|
383
383
|
const E = Number(w), k = Number($);
|
|
384
384
|
return n.forEach((I, M) => {
|
|
385
|
-
let
|
|
386
|
-
t.watermarkType === "1" ?
|
|
387
|
-
const L =
|
|
388
|
-
o.fillText(I, E || L, k ||
|
|
385
|
+
let c = l;
|
|
386
|
+
t.watermarkType === "1" ? c = 18 : t.watermarkType === "2" && (c = 16);
|
|
387
|
+
const L = m - I.split("").length * Number(c);
|
|
388
|
+
o.fillText(I, E || L, k || p - Number(c) - M * 25);
|
|
389
389
|
}), s;
|
|
390
390
|
}, ko = async (s, o) => {
|
|
391
391
|
let t = await Co(s);
|
|
@@ -416,9 +416,9 @@ const Bt = (s, o, t) => {
|
|
|
416
416
|
showTitle: { type: Boolean, default: !0 }
|
|
417
417
|
},
|
|
418
418
|
setup(s) {
|
|
419
|
-
const o = s, t = N(null), n = ye(), e = n.appContext.config.globalProperties.$serviceApi, l = n.appContext.config.globalProperties.$viewerApi,
|
|
420
|
-
let
|
|
421
|
-
const
|
|
419
|
+
const o = s, t = N(null), n = ye(), e = n.appContext.config.globalProperties.$serviceApi, l = n.appContext.config.globalProperties.$viewerApi, v = n.appContext.config.globalProperties.$url, _ = n.appContext.config.globalProperties.$mode, w = "/ufil/v1/attachment", $ = ["png", "jpg", "jpeg", "webp", "gif"];
|
|
420
|
+
let m;
|
|
421
|
+
const p = [
|
|
422
422
|
{ field: "fileName", title: "message.fileName" },
|
|
423
423
|
{ field: "fileSize", title: "message.fileSize" },
|
|
424
424
|
{ field: "createdBy", title: "message.createdByName" },
|
|
@@ -462,45 +462,45 @@ const Bt = (s, o, t) => {
|
|
|
462
462
|
modes: ["insert"],
|
|
463
463
|
// 自定义服务端导入
|
|
464
464
|
async importMethod({ file: S }) {
|
|
465
|
-
const
|
|
466
|
-
let
|
|
467
|
-
if (o.watermarkCode &&
|
|
465
|
+
const r = S.name.split(".").pop();
|
|
466
|
+
let a = S;
|
|
467
|
+
if (o.watermarkCode && m.watermarkTrigger === "upload" && $.includes(r) && (a = await wo(S, m)), $.includes(r) && S.size > 1024 * 1024 * o.compassorSize)
|
|
468
468
|
new Pt(S, {
|
|
469
469
|
quality: o.quality,
|
|
470
470
|
mimeType: S.type,
|
|
471
|
-
success(
|
|
472
|
-
const
|
|
473
|
-
I(
|
|
471
|
+
success(f) {
|
|
472
|
+
const i = new File([f], f.name, { type: f.type });
|
|
473
|
+
I(i), console.log({ result: f, file: i });
|
|
474
474
|
}
|
|
475
475
|
});
|
|
476
476
|
else
|
|
477
|
-
return I(
|
|
477
|
+
return I(a);
|
|
478
478
|
}
|
|
479
479
|
},
|
|
480
480
|
proxyConfig: {
|
|
481
481
|
ajax: {
|
|
482
482
|
// 接收 Promise
|
|
483
|
-
query: ({ page: S, form:
|
|
484
|
-
const
|
|
485
|
-
return
|
|
483
|
+
query: ({ page: S, form: r }) => {
|
|
484
|
+
const a = Object.assign({}, r);
|
|
485
|
+
return a.pageNum = S.currentPage, a.pageSize = S.pageSize, a.sourceTable = o.sourceTable, a.sourceId = o.sourceId, o.sourceId && _ !== "doc" ? e.get(w, a) : null;
|
|
486
486
|
}
|
|
487
487
|
}
|
|
488
488
|
},
|
|
489
|
-
columns:
|
|
489
|
+
columns: p
|
|
490
490
|
}), I = (S) => {
|
|
491
|
-
const
|
|
492
|
-
|
|
493
|
-
const
|
|
494
|
-
return e.post("/ufil/file/uploadMultipart",
|
|
495
|
-
const
|
|
496
|
-
realpath:
|
|
491
|
+
const r = new FormData();
|
|
492
|
+
r.append("file", S);
|
|
493
|
+
const a = { "Content-Type": "multipart/form-data" };
|
|
494
|
+
return e.post("/ufil/file/uploadMultipart", r, { headers: a }).then(async (f) => {
|
|
495
|
+
const i = {
|
|
496
|
+
realpath: f,
|
|
497
497
|
fileName: S.name,
|
|
498
498
|
fileSize: S.size,
|
|
499
499
|
fileExtend: S.name.split(".").pop(),
|
|
500
500
|
sourceTable: o.sourceTable,
|
|
501
501
|
sourceId: o.sourceId
|
|
502
502
|
};
|
|
503
|
-
await e.post(w, [
|
|
503
|
+
await e.post(w, [i]), t.value.commitProxy("query");
|
|
504
504
|
}).catch(() => {
|
|
505
505
|
Se.modal.message({
|
|
506
506
|
content: "附件上传失败,请刷新后重试",
|
|
@@ -513,60 +513,60 @@ const Bt = (s, o, t) => {
|
|
|
513
513
|
} finally {
|
|
514
514
|
k.loading = !1;
|
|
515
515
|
}
|
|
516
|
-
},
|
|
517
|
-
const
|
|
516
|
+
}, c = async () => {
|
|
517
|
+
const r = await e.get("/upms/v1/watermark/selectByCode", {
|
|
518
518
|
watermarkCode: o.watermarkCode
|
|
519
519
|
});
|
|
520
|
-
|
|
520
|
+
m = r == null ? void 0 : r.list[0], m.watermarkType === "1" ? m.content = Z(/* @__PURE__ */ new Date(), "yyyy-MM-dd") : m.watermarkType === "2" ? m.content = Z(/* @__PURE__ */ new Date(), "yyyy-MM-dd HH:mm:ss") : m.watermarkType === "0" && (m.content = "");
|
|
521
521
|
}, L = async () => {
|
|
522
|
-
const S = t.value.getData().filter((
|
|
523
|
-
(
|
|
524
|
-
const
|
|
525
|
-
|
|
526
|
-
}) : S.forEach((
|
|
527
|
-
const
|
|
528
|
-
console.log(
|
|
529
|
-
}), l({ options: { toolbar: !0, url: "data-source" }, images:
|
|
530
|
-
},
|
|
531
|
-
const
|
|
532
|
-
|
|
533
|
-
const
|
|
534
|
-
|
|
522
|
+
const S = t.value.getData().filter((a) => $.includes(a.fileExtend)), r = [];
|
|
523
|
+
(m == null ? void 0 : m.watermarkTrigger) == "preview" ? await S.forEachSync(async (a) => {
|
|
524
|
+
const f = `${v}/ufil${a.realpath}}`, i = await ko(f, m);
|
|
525
|
+
r.push({ src: i, "data-source": i });
|
|
526
|
+
}) : S.forEach((a) => {
|
|
527
|
+
const f = `${v}/ufil${a.realpath}`;
|
|
528
|
+
console.log(f), r.push({ src: f, "data-source": f });
|
|
529
|
+
}), l({ options: { toolbar: !0, url: "data-source" }, images: r });
|
|
530
|
+
}, D = (S) => {
|
|
531
|
+
const r = v + "/ufil" + S.realpath, a = document.createElement("a");
|
|
532
|
+
a.style.display = "none";
|
|
533
|
+
const f = S.fileName.split(".");
|
|
534
|
+
a.href = r, a.setAttribute("download", f[0]), document.body.appendChild(a), a.click(), document.body.removeChild(a);
|
|
535
535
|
};
|
|
536
536
|
return Array.prototype.forEachSync = async function(S) {
|
|
537
|
-
for (const [
|
|
538
|
-
await S(
|
|
539
|
-
},
|
|
540
|
-
o.watermarkCode &&
|
|
541
|
-
}), (S,
|
|
542
|
-
const
|
|
537
|
+
for (const [r, a] of Object.entries(this))
|
|
538
|
+
await S(a, r, this);
|
|
539
|
+
}, Fe(() => {
|
|
540
|
+
o.watermarkCode && c();
|
|
541
|
+
}), (S, r) => {
|
|
542
|
+
const a = V("ut-divider"), f = V("ut-button"), i = V("vxe-grid");
|
|
543
543
|
return T(), F("div", xo, [
|
|
544
|
-
U(
|
|
544
|
+
U(i, be({
|
|
545
545
|
ref_key: "xGrid",
|
|
546
546
|
ref: t
|
|
547
547
|
}, k), $t({
|
|
548
|
-
operate: W(({ row:
|
|
549
|
-
|
|
550
|
-
U(
|
|
548
|
+
operate: W(({ row: y }) => [
|
|
549
|
+
x("div", $o, [
|
|
550
|
+
U(f, {
|
|
551
551
|
disabled: S.dataStatus === "detail",
|
|
552
552
|
auth: S.permissionPreFix + "Del",
|
|
553
553
|
status: "danger",
|
|
554
554
|
icon: "ri-delete-bin-5-fill",
|
|
555
555
|
content: "delete",
|
|
556
|
-
onTap: (
|
|
556
|
+
onTap: (C) => M(y)
|
|
557
557
|
}, null, 8, ["disabled", "auth", "onTap"]),
|
|
558
|
-
["png", "jpeg", "jpg"].includes(
|
|
558
|
+
["png", "jpeg", "jpg"].includes(y.fileExtend) ? (T(), ie(f, {
|
|
559
559
|
key: 0,
|
|
560
560
|
auth: S.permissionPreFix + "Preview",
|
|
561
561
|
icon: "ri-search-line",
|
|
562
562
|
content: "preview",
|
|
563
|
-
onTap:
|
|
564
|
-
}, null, 8, ["auth"])) : (T(), ie(
|
|
563
|
+
onTap: r[0] || (r[0] = (C) => L())
|
|
564
|
+
}, null, 8, ["auth"])) : (T(), ie(f, {
|
|
565
565
|
key: 1,
|
|
566
566
|
auth: S.permissionPreFix + "Download",
|
|
567
567
|
icon: "ri-download-2-fill",
|
|
568
568
|
content: "download",
|
|
569
|
-
onTap: (
|
|
569
|
+
onTap: (C) => D(y)
|
|
570
570
|
}, null, 8, ["auth", "onTap"]))
|
|
571
571
|
])
|
|
572
572
|
]),
|
|
@@ -575,8 +575,8 @@ const Bt = (s, o, t) => {
|
|
|
575
575
|
S.showTitle ? {
|
|
576
576
|
name: "toolbar_buttons",
|
|
577
577
|
fn: W(() => [
|
|
578
|
-
|
|
579
|
-
U(
|
|
578
|
+
x("div", Do, [
|
|
579
|
+
U(a, {
|
|
580
580
|
title: S.title || S.$t("message.attachmentInfo")
|
|
581
581
|
}, null, 8, ["title"])
|
|
582
582
|
])
|
|
@@ -602,21 +602,21 @@ const Bt = (s, o, t) => {
|
|
|
602
602
|
},
|
|
603
603
|
emits: ["close"],
|
|
604
604
|
setup(s, { emit: o }) {
|
|
605
|
-
const t = s, e = ye().appContext.config.globalProperties.$serviceApi, { t: l } = $e(),
|
|
606
|
-
let
|
|
605
|
+
const t = s, e = ye().appContext.config.globalProperties.$serviceApi, { t: l } = $e(), v = N(!1);
|
|
606
|
+
let _ = ke({
|
|
607
607
|
filename: "数据模板",
|
|
608
608
|
errorField: "errorMsg",
|
|
609
609
|
errListField: "list"
|
|
610
610
|
});
|
|
611
611
|
const w = Nt.getItem("kLov"), $ = () => {
|
|
612
|
-
const
|
|
612
|
+
const h = t.columns.map((b) => (b.slots = { default: b.field }, b.title = b.field, b)), g = {
|
|
613
613
|
type: "checkbox",
|
|
614
614
|
width: 40,
|
|
615
615
|
align: "center",
|
|
616
616
|
fixed: "left"
|
|
617
617
|
};
|
|
618
|
-
return
|
|
619
|
-
},
|
|
618
|
+
return h.unshift(g), h;
|
|
619
|
+
}, m = N({ pageSize: 200, currentPage: 1, total: 0 }), p = [
|
|
620
620
|
"Sizes",
|
|
621
621
|
"PrevJump",
|
|
622
622
|
"PrevPage",
|
|
@@ -627,7 +627,7 @@ const Bt = (s, o, t) => {
|
|
|
627
627
|
"Total"
|
|
628
628
|
], E = window.innerHeight - 90, k = N();
|
|
629
629
|
let I = [];
|
|
630
|
-
const
|
|
630
|
+
const c = ke({
|
|
631
631
|
border: !0,
|
|
632
632
|
height: E,
|
|
633
633
|
data: [],
|
|
@@ -682,180 +682,180 @@ const Bt = (s, o, t) => {
|
|
|
682
682
|
},
|
|
683
683
|
columns: $()
|
|
684
684
|
}), L = {
|
|
685
|
-
toolbarButtonClick({ code:
|
|
686
|
-
switch (
|
|
685
|
+
toolbarButtonClick({ code: h }) {
|
|
686
|
+
switch (h) {
|
|
687
687
|
case "import_plus": {
|
|
688
|
-
|
|
688
|
+
D();
|
|
689
689
|
break;
|
|
690
690
|
}
|
|
691
691
|
case "save_plus": {
|
|
692
|
-
|
|
692
|
+
i();
|
|
693
693
|
break;
|
|
694
694
|
}
|
|
695
695
|
case "del_plus": {
|
|
696
|
-
|
|
696
|
+
y();
|
|
697
697
|
break;
|
|
698
698
|
}
|
|
699
699
|
case "export_plus": {
|
|
700
|
-
|
|
700
|
+
f();
|
|
701
701
|
break;
|
|
702
702
|
}
|
|
703
703
|
}
|
|
704
704
|
},
|
|
705
|
-
toolbarToolClick({ code:
|
|
706
|
-
switch (
|
|
705
|
+
toolbarToolClick({ code: h }) {
|
|
706
|
+
switch (h) {
|
|
707
707
|
case "replay": {
|
|
708
|
-
|
|
708
|
+
u();
|
|
709
709
|
break;
|
|
710
710
|
}
|
|
711
711
|
case "question": {
|
|
712
|
-
|
|
712
|
+
A();
|
|
713
713
|
break;
|
|
714
714
|
}
|
|
715
715
|
}
|
|
716
716
|
}
|
|
717
|
-
},
|
|
718
|
-
var
|
|
719
|
-
I = [], (
|
|
717
|
+
}, D = () => {
|
|
718
|
+
var h;
|
|
719
|
+
I = [], (h = k.value) == null || h.openImport();
|
|
720
720
|
};
|
|
721
|
-
function S(
|
|
722
|
-
I =
|
|
723
|
-
(
|
|
724
|
-
).forEach((
|
|
725
|
-
const
|
|
726
|
-
|
|
727
|
-
}), t.columns.forEach((
|
|
728
|
-
(
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
) :
|
|
721
|
+
function S(h) {
|
|
722
|
+
I = h.$table.getTableData().fullData, $().filter(
|
|
723
|
+
(b) => !b.type && b.mapField !== t.options.errorField
|
|
724
|
+
).forEach((b) => {
|
|
725
|
+
const O = I.findIndex((Y) => Y[b.field] === b.field);
|
|
726
|
+
O !== -1 && I.splice(O, 1);
|
|
727
|
+
}), t.columns.forEach((b) => {
|
|
728
|
+
(b.dateFormatter || b.valueType === "number") && I.forEach((O) => {
|
|
729
|
+
b.dateFormatter ? O[b.field] = Z(
|
|
730
|
+
O[b.field],
|
|
731
|
+
b.dateFormatter || "yyyy-MM-dd HH:mm:ss"
|
|
732
|
+
) : O[b.field] = ro(O[b.field]).toFixed(b.decimal || 6);
|
|
733
733
|
});
|
|
734
|
-
}),
|
|
734
|
+
}), m.value.total = I.length, r();
|
|
735
735
|
}
|
|
736
|
-
const
|
|
737
|
-
const { currentPage:
|
|
738
|
-
|
|
739
|
-
(
|
|
736
|
+
const r = () => {
|
|
737
|
+
const { currentPage: h, pageSize: g } = m.value;
|
|
738
|
+
c.data = I.filter(
|
|
739
|
+
(b, O) => O < g * h && O >= g * (h - 1)
|
|
740
740
|
);
|
|
741
|
-
},
|
|
742
|
-
currentPage:
|
|
743
|
-
pageSize:
|
|
741
|
+
}, a = ({
|
|
742
|
+
currentPage: h,
|
|
743
|
+
pageSize: g
|
|
744
744
|
}) => {
|
|
745
|
-
|
|
746
|
-
},
|
|
747
|
-
var
|
|
748
|
-
const
|
|
745
|
+
m.value.currentPage = h, m.value.pageSize = g, r();
|
|
746
|
+
}, f = () => {
|
|
747
|
+
var b;
|
|
748
|
+
const h = [];
|
|
749
749
|
if (t.templateData.length)
|
|
750
|
-
|
|
750
|
+
h.push(...t.templateData);
|
|
751
751
|
else {
|
|
752
|
-
const
|
|
752
|
+
const O = {};
|
|
753
753
|
$().filter((Y) => Y.type !== "checkbox").forEach((Y) => {
|
|
754
|
-
|
|
755
|
-
}),
|
|
754
|
+
O[Y.field] = "案例";
|
|
755
|
+
}), h.push(O);
|
|
756
756
|
}
|
|
757
|
-
const
|
|
758
|
-
filename:
|
|
757
|
+
const g = {
|
|
758
|
+
filename: _.filename,
|
|
759
759
|
type: "xlsx",
|
|
760
760
|
columns: $().filter(
|
|
761
|
-
(
|
|
761
|
+
(O) => O.mapField !== _.errorField && O.type !== "checkbox"
|
|
762
762
|
),
|
|
763
|
-
data:
|
|
763
|
+
data: h
|
|
764
764
|
};
|
|
765
|
-
(
|
|
766
|
-
},
|
|
765
|
+
(b = k.value) == null || b.exportData(g);
|
|
766
|
+
}, i = async () => {
|
|
767
767
|
if (!I.length)
|
|
768
|
-
return
|
|
768
|
+
return Ie(l("message.importEmpty"));
|
|
769
769
|
if (await Se.modal.confirm(l("message.importRecord")) === "confirm") {
|
|
770
|
-
|
|
771
|
-
const { url:
|
|
772
|
-
|
|
773
|
-
(
|
|
774
|
-
|
|
770
|
+
c.loading = !0;
|
|
771
|
+
const { url: g } = t;
|
|
772
|
+
B("toSave"), e.post(g, I).then((b) => {
|
|
773
|
+
(b == null ? void 0 : b.status) === "error" || b != null && b.length ? (v.value = !0, C(
|
|
774
|
+
b != null && b.length ? b : b[_.errListField || t.sourceList]
|
|
775
775
|
), Se.modal.message({
|
|
776
776
|
content: l("message.importFailed"),
|
|
777
777
|
status: "error"
|
|
778
778
|
})) : (Se.modal.message({
|
|
779
779
|
content: l("message.importSuccess"),
|
|
780
780
|
status: "success"
|
|
781
|
-
}),
|
|
781
|
+
}), u());
|
|
782
782
|
}).finally(() => {
|
|
783
|
-
|
|
783
|
+
v.value = !1, c.loading = !1;
|
|
784
784
|
});
|
|
785
785
|
}
|
|
786
|
-
},
|
|
787
|
-
var
|
|
788
|
-
const
|
|
789
|
-
if (!(
|
|
786
|
+
}, y = () => {
|
|
787
|
+
var g;
|
|
788
|
+
const h = (g = k.value) == null ? void 0 : g.getCheckboxRecords();
|
|
789
|
+
if (!(h != null && h.length))
|
|
790
790
|
return Se.modal.message({
|
|
791
791
|
content: l("message.selectedRecord"),
|
|
792
792
|
status: "warning"
|
|
793
793
|
});
|
|
794
|
-
|
|
795
|
-
const
|
|
796
|
-
(Y) => Y._X_ROW_KEY ===
|
|
794
|
+
h.forEach((b) => {
|
|
795
|
+
const O = I.findIndex(
|
|
796
|
+
(Y) => Y._X_ROW_KEY === b._X_ROW_KEY
|
|
797
797
|
);
|
|
798
|
-
|
|
799
|
-
}),
|
|
800
|
-
},
|
|
801
|
-
|
|
802
|
-
},
|
|
803
|
-
|
|
804
|
-
if (
|
|
805
|
-
const
|
|
806
|
-
I.forEach((
|
|
807
|
-
|
|
798
|
+
O !== -1 && I.splice(O, 1);
|
|
799
|
+
}), c.data = I;
|
|
800
|
+
}, C = (h) => {
|
|
801
|
+
m.value.total = h.length, I = h.map((g, b) => (g._X_ROW_KEY = b, g)), B("toShow"), r();
|
|
802
|
+
}, B = (h) => {
|
|
803
|
+
c.columns.forEach((g) => {
|
|
804
|
+
if (h === "toSave") {
|
|
805
|
+
const b = he.get("kCookies_param") ? JSON.parse(he.get("kCookies_param")) : {};
|
|
806
|
+
I.forEach((O) => {
|
|
807
|
+
O[g.mapField] = O[g.field], Object.assign(O, b, t.defaultParams);
|
|
808
808
|
});
|
|
809
809
|
} else
|
|
810
|
-
I.forEach((
|
|
811
|
-
|
|
810
|
+
I.forEach((b) => {
|
|
811
|
+
b[g.field] = b[g.mapField];
|
|
812
812
|
});
|
|
813
813
|
});
|
|
814
|
-
},
|
|
814
|
+
}, A = () => {
|
|
815
815
|
Se.modal.alert(l("message.importTip"), l("message.udp.tip"));
|
|
816
|
-
},
|
|
817
|
-
|
|
816
|
+
}, d = o, u = () => {
|
|
817
|
+
d("close");
|
|
818
818
|
};
|
|
819
|
-
return
|
|
820
|
-
|
|
821
|
-
}), (
|
|
822
|
-
const
|
|
819
|
+
return Fe(() => {
|
|
820
|
+
_ = Object.assign(_, t.options);
|
|
821
|
+
}), (h, g) => {
|
|
822
|
+
const b = V("el-option"), O = V("el-select"), Y = V("el-date-picker"), te = V("vxe-pager"), pe = V("vxe-grid");
|
|
823
823
|
return T(), F("div", null, [
|
|
824
824
|
U(pe, be({
|
|
825
825
|
ref_key: "xgrid",
|
|
826
826
|
ref: k
|
|
827
|
-
},
|
|
827
|
+
}, c, tt(L)), $t({
|
|
828
828
|
pager: W(() => [
|
|
829
829
|
U(te, {
|
|
830
|
-
"current-page":
|
|
831
|
-
"onUpdate:currentPage":
|
|
832
|
-
"page-size":
|
|
833
|
-
"onUpdate:pageSize":
|
|
834
|
-
layouts:
|
|
830
|
+
"current-page": m.value.currentPage,
|
|
831
|
+
"onUpdate:currentPage": g[0] || (g[0] = (q) => m.value.currentPage = q),
|
|
832
|
+
"page-size": m.value.pageSize,
|
|
833
|
+
"onUpdate:pageSize": g[1] || (g[1] = (q) => m.value.pageSize = q),
|
|
834
|
+
layouts: p,
|
|
835
835
|
"page-sizes": [200, 500, 1e3, 2e3, 5e3, 1e4],
|
|
836
|
-
total:
|
|
837
|
-
onPageChange:
|
|
836
|
+
total: m.value.total,
|
|
837
|
+
onPageChange: a
|
|
838
838
|
}, null, 8, ["current-page", "page-size", "total"])
|
|
839
839
|
]),
|
|
840
840
|
_: 2
|
|
841
841
|
}, [
|
|
842
|
-
se(
|
|
842
|
+
se(h.columns, (q) => ({
|
|
843
843
|
name: q.field,
|
|
844
844
|
fn: W(({ row: J }) => [
|
|
845
|
-
q.dictCode && !q.disabled ? (T(), ie(
|
|
845
|
+
q.dictCode && !q.disabled ? (T(), ie(O, {
|
|
846
846
|
key: 0,
|
|
847
847
|
modelValue: J[q.field],
|
|
848
|
-
"onUpdate:modelValue": (
|
|
848
|
+
"onUpdate:modelValue": (z) => J[q.field] = z,
|
|
849
849
|
modelModifiers: { trim: !0 },
|
|
850
850
|
clearable: ""
|
|
851
851
|
}, {
|
|
852
852
|
default: W(() => {
|
|
853
|
-
var
|
|
853
|
+
var z;
|
|
854
854
|
return [
|
|
855
|
-
(T(!0), F(ae, null, se((
|
|
856
|
-
key:
|
|
857
|
-
value:
|
|
858
|
-
label:
|
|
855
|
+
(T(!0), F(ae, null, se((z = oe(w)[q.dictCode]) == null ? void 0 : z.children, (P) => (T(), ie(b, {
|
|
856
|
+
key: P.dictCode,
|
|
857
|
+
value: P.dictCode,
|
|
858
|
+
label: P.dictName
|
|
859
859
|
}, null, 8, ["value", "label"]))), 128))
|
|
860
860
|
];
|
|
861
861
|
}),
|
|
@@ -863,13 +863,13 @@ const Bt = (s, o, t) => {
|
|
|
863
863
|
}, 1032, ["modelValue", "onUpdate:modelValue"])) : ["date", "month", "datetime"].includes(q.dataType) && !q.disabled ? (T(), ie(Y, {
|
|
864
864
|
key: 1,
|
|
865
865
|
modelValue: J[q.field],
|
|
866
|
-
"onUpdate:modelValue": (
|
|
866
|
+
"onUpdate:modelValue": (z) => J[q.field] = z,
|
|
867
867
|
modelModifiers: { trim: !0 },
|
|
868
868
|
type: q.dataType,
|
|
869
869
|
"value-format": "YYYY-MM-DD hh:mm:ss"
|
|
870
870
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "type"])) : !q.da && !q.disabled ? ge((T(), F("input", {
|
|
871
871
|
key: 2,
|
|
872
|
-
"onUpdate:modelValue": (
|
|
872
|
+
"onUpdate:modelValue": (z) => J[q.field] = z,
|
|
873
873
|
class: "ut-input"
|
|
874
874
|
}, null, 8, Io)), [
|
|
875
875
|
[
|
|
@@ -878,7 +878,7 @@ const Bt = (s, o, t) => {
|
|
|
878
878
|
void 0,
|
|
879
879
|
{ trim: !0 }
|
|
880
880
|
]
|
|
881
|
-
]) :
|
|
881
|
+
]) : v.value ? (T(), F("span", Fo, G(J[q.field]), 1)) : (T(), F("span", Eo, G(J[q.field]), 1))
|
|
882
882
|
])
|
|
883
883
|
}))
|
|
884
884
|
]), 1040)
|
|
@@ -890,7 +890,7 @@ const Bt = (s, o, t) => {
|
|
|
890
890
|
for (const [n, e] of o)
|
|
891
891
|
t[n] = e;
|
|
892
892
|
return t;
|
|
893
|
-
}, Ao = /* @__PURE__ */ Te(Lo, [["__scopeId", "data-v-cc57671c"]]), Po = ue(Ao), Bo = { class: "ut-content" },
|
|
893
|
+
}, Ao = /* @__PURE__ */ Te(Lo, [["__scopeId", "data-v-cc57671c"]]), Po = ue(Ao), Bo = { class: "ut-content" }, Ro = { key: 0 }, Oo = { class: "ut-right-panel" }, zo = { class: "ut-content-body" }, Uo = /* @__PURE__ */ K({
|
|
894
894
|
name: "UtContent",
|
|
895
895
|
__name: "content",
|
|
896
896
|
props: {
|
|
@@ -902,31 +902,31 @@ const Bt = (s, o, t) => {
|
|
|
902
902
|
const t = N(window.top === window.self), n = o, e = () => {
|
|
903
903
|
n("close");
|
|
904
904
|
};
|
|
905
|
-
return (l,
|
|
906
|
-
const
|
|
905
|
+
return (l, v) => {
|
|
906
|
+
const _ = V("ut-button");
|
|
907
907
|
return T(), F("div", Bo, [
|
|
908
908
|
l.showTop && t.value ? (T(), F("div", {
|
|
909
909
|
key: 0,
|
|
910
910
|
class: Ce(["ut-content-top", l.title ? "justify-between" : "justify-end"])
|
|
911
911
|
}, [
|
|
912
|
-
l.title ? (T(), F("span",
|
|
913
|
-
|
|
912
|
+
l.title ? (T(), F("span", Ro, G(l.title), 1)) : ee("", !0),
|
|
913
|
+
x("div", Oo, [
|
|
914
914
|
De(l.$slots, "header", {}, void 0, !0),
|
|
915
|
-
U(
|
|
915
|
+
U(_, {
|
|
916
916
|
status: "info",
|
|
917
917
|
icon: l.$attrs.icon || "ri-reply-line",
|
|
918
918
|
content: l.$attrs.content || "goback",
|
|
919
|
-
onTap:
|
|
919
|
+
onTap: v[0] || (v[0] = (w) => e())
|
|
920
920
|
}, null, 8, ["icon", "content"])
|
|
921
921
|
])
|
|
922
922
|
], 2)) : ee("", !0),
|
|
923
|
-
|
|
923
|
+
x("div", zo, [
|
|
924
924
|
De(l.$slots, "body", {}, void 0, !0)
|
|
925
925
|
])
|
|
926
926
|
]);
|
|
927
927
|
};
|
|
928
928
|
}
|
|
929
|
-
}), Vo = /* @__PURE__ */ Te(Uo, [["__scopeId", "data-v-
|
|
929
|
+
}), Vo = /* @__PURE__ */ Te(Uo, [["__scopeId", "data-v-c6540c5d"]]), jo = ue(Vo), Wo = (s) => (Tt("data-v-c0562151"), s = s(), Mt(), s), Yo = { class: "ut-divider-wrapper" }, qo = { class: "flex items-center" }, Ho = /* @__PURE__ */ Wo(() => /* @__PURE__ */ x("span", { class: "ut-color-block" }, null, -1)), Go = { class: "ut-divider-title" }, Xo = { class: "mr-2" }, Ko = {
|
|
930
930
|
name: "UtDivider"
|
|
931
931
|
}, Jo = /* @__PURE__ */ K({
|
|
932
932
|
...Ko,
|
|
@@ -935,11 +935,11 @@ const Bt = (s, o, t) => {
|
|
|
935
935
|
},
|
|
936
936
|
setup(s) {
|
|
937
937
|
return (o, t) => (T(), F("div", Yo, [
|
|
938
|
-
|
|
938
|
+
x("div", qo, [
|
|
939
939
|
Ho,
|
|
940
|
-
|
|
940
|
+
x("span", Go, G(o.title), 1)
|
|
941
941
|
]),
|
|
942
|
-
|
|
942
|
+
x("div", Xo, [
|
|
943
943
|
De(o.$slots, "operate", {}, void 0, !0)
|
|
944
944
|
])
|
|
945
945
|
]));
|
|
@@ -956,36 +956,36 @@ const Bt = (s, o, t) => {
|
|
|
956
956
|
},
|
|
957
957
|
emits: ["command"],
|
|
958
958
|
setup(s, { emit: o }) {
|
|
959
|
-
const { t } = $e(), n = ye(), e = n == null ? void 0 : n.appContext.config.globalProperties.$hasAuthority, l = (
|
|
960
|
-
|
|
961
|
-
},
|
|
962
|
-
const { content:
|
|
963
|
-
return /.*[\u4e00-\u9fa5]+.*$/.test(
|
|
964
|
-
}, w = (
|
|
965
|
-
var
|
|
966
|
-
return (
|
|
959
|
+
const { t } = $e(), n = ye(), e = n == null ? void 0 : n.appContext.config.globalProperties.$hasAuthority, l = (m) => {
|
|
960
|
+
m.auth && !e(m.auth) || m.disabled || $("command", m.code);
|
|
961
|
+
}, v = ["primary", "success", "warning"], _ = (m) => {
|
|
962
|
+
const { content: p, code: E } = m;
|
|
963
|
+
return /.*[\u4e00-\u9fa5]+.*$/.test(p) ? p : t("message.btn." + (p || E || "edit"));
|
|
964
|
+
}, w = (m) => {
|
|
965
|
+
var p, E;
|
|
966
|
+
return (p = m.code) != null && p.toLowerCase().includes("print") ? "ri-printer-fill" : (E = m.code) != null && E.toLowerCase().includes("look") ? "ri-eye-fill" : "ri-edit-2-fill";
|
|
967
967
|
}, $ = o;
|
|
968
|
-
return (
|
|
969
|
-
const E = V("IconifyIconOffline"), k = V("el-icon"), I = V("vxe-button"), M = V("el-dropdown-item"),
|
|
968
|
+
return (m, p) => {
|
|
969
|
+
const E = V("IconifyIconOffline"), k = V("el-icon"), I = V("vxe-button"), M = V("el-dropdown-item"), c = V("el-dropdown-menu"), L = V("el-dropdown");
|
|
970
970
|
return T(), ie(L, {
|
|
971
|
-
trigger:
|
|
971
|
+
trigger: m.trigger,
|
|
972
972
|
size: "small",
|
|
973
973
|
class: "ut-dropdown"
|
|
974
974
|
}, {
|
|
975
975
|
dropdown: W(() => [
|
|
976
|
-
U(
|
|
976
|
+
U(c, { class: "ut-dropdown-menu" }, {
|
|
977
977
|
default: W(() => [
|
|
978
|
-
(T(!0), F(ae, null, se(
|
|
979
|
-
key:
|
|
978
|
+
(T(!0), F(ae, null, se(m.buttons, (D, S) => (T(), ie(M, {
|
|
979
|
+
key: D.code
|
|
980
980
|
}, {
|
|
981
981
|
default: W(() => [
|
|
982
|
-
|
|
982
|
+
D.visible !== !1 ? (T(), ie(I, {
|
|
983
983
|
key: 0,
|
|
984
|
-
disabled:
|
|
985
|
-
status:
|
|
986
|
-
content:
|
|
987
|
-
icon:
|
|
988
|
-
onClick: (
|
|
984
|
+
disabled: D.disabled || D.auth && !oe(e)(D.auth),
|
|
985
|
+
status: D.status || v[S],
|
|
986
|
+
content: _(D),
|
|
987
|
+
icon: D.icon || w(D),
|
|
988
|
+
onClick: (r) => l(D)
|
|
989
989
|
}, null, 8, ["disabled", "status", "content", "icon", "onClick"])) : ee("", !0)
|
|
990
990
|
]),
|
|
991
991
|
_: 2
|
|
@@ -996,11 +996,11 @@ const Bt = (s, o, t) => {
|
|
|
996
996
|
]),
|
|
997
997
|
default: W(() => [
|
|
998
998
|
U(I, {
|
|
999
|
-
status:
|
|
1000
|
-
disabled:
|
|
999
|
+
status: m.status,
|
|
1000
|
+
disabled: m.disabled
|
|
1001
1001
|
}, {
|
|
1002
1002
|
default: W(() => [
|
|
1003
|
-
et(G(
|
|
1003
|
+
et(G(m.$t("message.btn.more")) + " ", 1),
|
|
1004
1004
|
U(k, { class: "el-icon--right" }, {
|
|
1005
1005
|
default: W(() => [
|
|
1006
1006
|
U(E, { icon: "ri:arrow-down-s-line" })
|
|
@@ -1029,19 +1029,19 @@ const Bt = (s, o, t) => {
|
|
|
1029
1029
|
dataStatus: { default: "detail" }
|
|
1030
1030
|
},
|
|
1031
1031
|
setup(s, { expose: o }) {
|
|
1032
|
-
const t = s, n = N(void 0), { t: e } = $e(), l = de(() => t.items.length ?
|
|
1032
|
+
const t = s, n = N(void 0), { t: e } = $e(), l = de(() => t.items.length ? Ee(t.items, e) : {}), v = de(() => t.items.length ? nt(t.items, t.dataStatus, 6) : t.items);
|
|
1033
1033
|
return o({
|
|
1034
1034
|
validateForm: (w) => {
|
|
1035
1035
|
n.value.validate(w);
|
|
1036
1036
|
}
|
|
1037
1037
|
}), (w, $) => {
|
|
1038
|
-
const
|
|
1038
|
+
const m = V("vxe-form");
|
|
1039
1039
|
return T(), F("div", nn, [
|
|
1040
|
-
U(
|
|
1040
|
+
U(m, {
|
|
1041
1041
|
ref_key: "xForm",
|
|
1042
1042
|
ref: n,
|
|
1043
1043
|
data: w.record,
|
|
1044
|
-
items:
|
|
1044
|
+
items: v.value,
|
|
1045
1045
|
rules: l.value,
|
|
1046
1046
|
loading: w.loading,
|
|
1047
1047
|
vertical: w.vertical,
|
|
@@ -1051,74 +1051,74 @@ const Bt = (s, o, t) => {
|
|
|
1051
1051
|
]);
|
|
1052
1052
|
};
|
|
1053
1053
|
}
|
|
1054
|
-
}), an = ue(ln), rn = "kSysConfig", pt = "kCookies_param", Ke = Nt.getItem(rn),
|
|
1054
|
+
}), an = ue(ln), rn = "kSysConfig", pt = "kCookies_param", Ke = Nt.getItem(rn), Rt = (s, o) => (s.forEach((t) => {
|
|
1055
1055
|
var n;
|
|
1056
|
-
t.auth = o && o[t.code] || t.auth, t.name ? (Ke == null ? void 0 : Ke.i18nEnabled) === "Y" && !t.name.startsWith("message.") && (t.name = `message.btn.${t.name}`) : t.name = `message.btn.${t.code}`, (n = t.dropdowns) != null && n.length &&
|
|
1057
|
-
}), s),
|
|
1056
|
+
t.auth = o && o[t.code] || t.auth, t.name ? (Ke == null ? void 0 : Ke.i18nEnabled) === "Y" && !t.name.startsWith("message.") && (t.name = `message.btn.${t.name}`) : t.name = `message.btn.${t.code}`, (n = t.dropdowns) != null && n.length && Rt(t.dropdowns, o);
|
|
1057
|
+
}), s), Ot = (s, o, t) => {
|
|
1058
1058
|
const n = { pageNum: 1, pageSize: 1e5 }, e = lt();
|
|
1059
1059
|
Object.assign(n, t, e, s.defaultParams || {});
|
|
1060
|
-
const l = jt(n, s.items), { url:
|
|
1061
|
-
if (!
|
|
1062
|
-
const
|
|
1063
|
-
if (!
|
|
1064
|
-
const w =
|
|
1065
|
-
return new Promise(($,
|
|
1066
|
-
o[w](
|
|
1067
|
-
$(
|
|
1068
|
-
}).catch((
|
|
1069
|
-
|
|
1060
|
+
const l = jt(n, s.items), { url: v } = s;
|
|
1061
|
+
if (!v) return null;
|
|
1062
|
+
const _ = Re(v) ? v : v.fetch || v.restful;
|
|
1063
|
+
if (!_) return null;
|
|
1064
|
+
const w = v.fetch ? "post" : "get";
|
|
1065
|
+
return new Promise(($, m) => {
|
|
1066
|
+
o[w](_, l).then((p) => {
|
|
1067
|
+
$(p.list);
|
|
1068
|
+
}).catch((p) => {
|
|
1069
|
+
m(p);
|
|
1070
1070
|
});
|
|
1071
1071
|
});
|
|
1072
|
-
},
|
|
1072
|
+
}, zt = (s, o, t, n, e) => {
|
|
1073
1073
|
if (e) return mn();
|
|
1074
|
-
for (const
|
|
1075
|
-
o[
|
|
1076
|
-
const l = { pageNum: t.currentPage, pageSize: t.pageSize },
|
|
1077
|
-
Object.assign(l,
|
|
1078
|
-
const
|
|
1074
|
+
for (const p in o)
|
|
1075
|
+
o[p] && Re(o[p]) && (o[p] = o[p].trim());
|
|
1076
|
+
const l = { pageNum: t.currentPage, pageSize: t.pageSize }, v = lt();
|
|
1077
|
+
Object.assign(l, v, s.defaultParams || {}, o);
|
|
1078
|
+
const _ = jt(l, s.items), { url: w } = s;
|
|
1079
1079
|
if (!w) return null;
|
|
1080
|
-
const $ =
|
|
1081
|
-
return $ ? n[
|
|
1080
|
+
const $ = Re(w) ? w : w.fetch || w.restful, m = w.fetch ? "post" : "get";
|
|
1081
|
+
return $ ? n[m]($, _) : null;
|
|
1082
1082
|
}, Ut = (s, o, t) => {
|
|
1083
1083
|
const { url: n } = t;
|
|
1084
1084
|
if (!n) return null;
|
|
1085
|
-
const e =
|
|
1085
|
+
const e = Re(n) ? n : n.del || n.restful;
|
|
1086
1086
|
if (!e) return null;
|
|
1087
1087
|
const l = n.del ? "post" : "delete";
|
|
1088
1088
|
return s[l](e, o);
|
|
1089
1089
|
}, Vt = (s, o, t) => {
|
|
1090
1090
|
const n = [], { url: e } = t;
|
|
1091
1091
|
if (!e) return null;
|
|
1092
|
-
const { insertRecords: l, updateRecords:
|
|
1092
|
+
const { insertRecords: l, updateRecords: v } = o;
|
|
1093
1093
|
if (!ze(l)) {
|
|
1094
|
-
const
|
|
1094
|
+
const _ = lt();
|
|
1095
1095
|
l.forEach(($) => {
|
|
1096
|
-
var
|
|
1097
|
-
!ze(t == null ? void 0 : t.defaultValue) && Object.assign($, t.defaultValue), (
|
|
1098
|
-
$[
|
|
1096
|
+
var m;
|
|
1097
|
+
!ze(t == null ? void 0 : t.defaultValue) && Object.assign($, t.defaultValue), (m = Object.keys(_)) == null || m.forEach((p) => {
|
|
1098
|
+
$[p] = $[p] || _[p];
|
|
1099
1099
|
});
|
|
1100
1100
|
});
|
|
1101
|
-
const w =
|
|
1101
|
+
const w = Re(e) ? e : e.add || e.restful;
|
|
1102
1102
|
w && n.push(s.post(w, l));
|
|
1103
1103
|
}
|
|
1104
|
-
if (!ze(
|
|
1105
|
-
const
|
|
1106
|
-
|
|
1104
|
+
if (!ze(v)) {
|
|
1105
|
+
const _ = Re(e) ? e : e.save || e.restful, w = e.save ? "post" : "put";
|
|
1106
|
+
_ && n.push(s[w](_, v));
|
|
1107
1107
|
}
|
|
1108
1108
|
return n;
|
|
1109
1109
|
}, ht = "yyyy-MM-dd 00:00:00", gt = "yyyy-MM-dd 23:59:59", jt = (s, o) => {
|
|
1110
1110
|
const t = o.filter(
|
|
1111
1111
|
(e) => {
|
|
1112
|
-
var l,
|
|
1113
|
-
return ((l = e.itemRender) == null ? void 0 : l.name) === "#SuDateRange" || ((
|
|
1112
|
+
var l, v, _;
|
|
1113
|
+
return ((l = e.itemRender) == null ? void 0 : l.name) === "#SuDateRange" || ((_ = (v = e.itemRender) == null ? void 0 : v.props) == null ? void 0 : _.multiple) || e.multiple;
|
|
1114
1114
|
}
|
|
1115
1115
|
);
|
|
1116
1116
|
if (ze(t)) return s;
|
|
1117
1117
|
const n = ce(s, !0);
|
|
1118
1118
|
return t.forEach((e) => {
|
|
1119
|
-
var l,
|
|
1120
|
-
if (e.multiple || (
|
|
1121
|
-
n[e.field] = (
|
|
1119
|
+
var l, v, _;
|
|
1120
|
+
if (e.multiple || (v = (l = e.itemRender) == null ? void 0 : l.props) != null && v.multiple)
|
|
1121
|
+
n[e.field] = (_ = n[e.field]) == null ? void 0 : _.join(",");
|
|
1122
1122
|
else {
|
|
1123
1123
|
const w = n[e.field];
|
|
1124
1124
|
w && e.toField ? (n[e.fromField] = Z(w[0], ht), n[e.toField] = Z(w[1], gt)) : w && (n[`${e.field}From`] = Z(w[0], ht), n[`${e.field}To`] = Z(w[1], gt)), delete n[e.field];
|
|
@@ -1177,10 +1177,10 @@ const Bt = (s, o, t) => {
|
|
|
1177
1177
|
};
|
|
1178
1178
|
if (!o.editable) {
|
|
1179
1179
|
s.editConfig.editable = o.editable;
|
|
1180
|
-
const
|
|
1181
|
-
return
|
|
1180
|
+
const m = o.needExport && n("export");
|
|
1181
|
+
return m && (s.exportConfig = vt(t)), s.toolbarConfig = {
|
|
1182
1182
|
buttons: [],
|
|
1183
|
-
enabled:
|
|
1183
|
+
enabled: m,
|
|
1184
1184
|
refresh: e,
|
|
1185
1185
|
export: { icon: "ri-download-2-line", code: "export" },
|
|
1186
1186
|
custom: !!t.gridId,
|
|
@@ -1188,17 +1188,17 @@ const Bt = (s, o, t) => {
|
|
|
1188
1188
|
}, s;
|
|
1189
1189
|
}
|
|
1190
1190
|
let l = ce(t.buttons || [], !0);
|
|
1191
|
-
(t.mode !== "form" ? ce(cn, !0) : ce(dn, !0)).reverse().forEach((
|
|
1192
|
-
!l.some((
|
|
1193
|
-
}), l =
|
|
1191
|
+
(t.mode !== "form" ? ce(cn, !0) : ce(dn, !0)).reverse().forEach((m) => {
|
|
1192
|
+
!l.some((p) => p.code === m.code) && l.unshift(m), t.authPrefix && !["print", "export"].includes(m.auth) && (m.auth = t.authPrefix + m.auth.slice(0, 1).toLocaleUpperCase() + m.auth.slice(1).toLocaleLowerCase());
|
|
1193
|
+
}), l = Rt(l, o.auth).filter((m) => {
|
|
1194
1194
|
var E;
|
|
1195
|
-
const
|
|
1196
|
-
return (E =
|
|
1195
|
+
const p = m.auth ? n(m.auth) : !0;
|
|
1196
|
+
return (E = m.dropdowns) != null && E.length && (m.dropdowns = m.dropdowns.filter(
|
|
1197
1197
|
(k) => !k.auth || k.auth && n(k.auth)
|
|
1198
|
-
)),
|
|
1198
|
+
)), p;
|
|
1199
1199
|
});
|
|
1200
|
-
const
|
|
1201
|
-
s.editConfig = t.mode !== "form" ?
|
|
1200
|
+
const _ = { trigger: "dblclick", mode: "row", showStatus: !0 };
|
|
1201
|
+
s.editConfig = t.mode !== "form" ? _ : { enabled: !1 };
|
|
1202
1202
|
const w = o.needExport && n("export");
|
|
1203
1203
|
let $ = null;
|
|
1204
1204
|
return w && (s.exportConfig = vt(t), $ = { icon: "ri-download-2-line", code: "export" }), s.toolbarConfig = {
|
|
@@ -1215,8 +1215,8 @@ const Bt = (s, o, t) => {
|
|
|
1215
1215
|
if (e === (t.index || 0))
|
|
1216
1216
|
return t.label || "合计";
|
|
1217
1217
|
if ((l = t.fields) != null && l.includes(n.property)) {
|
|
1218
|
-
const
|
|
1219
|
-
return
|
|
1218
|
+
const v = o.reduce((_, w) => _ + Number(w[n.property] || 0), 0);
|
|
1219
|
+
return v && Number(v.toFixed(t.decimal || 2));
|
|
1220
1220
|
}
|
|
1221
1221
|
return "";
|
|
1222
1222
|
})
|
|
@@ -1254,11 +1254,11 @@ const Bt = (s, o, t) => {
|
|
|
1254
1254
|
const n = t.replace(/-(\w)/g, (e) => e.slice(1).toUpperCase());
|
|
1255
1255
|
o[n] = s[t];
|
|
1256
1256
|
}), o;
|
|
1257
|
-
}, He = (s) => (Tt("data-v-e0162328"), s = s(), Mt(), s), pn = { class: "w-full h-full" }, hn = /* @__PURE__ */ He(() => /* @__PURE__ */
|
|
1258
|
-
/* @__PURE__ */
|
|
1259
|
-
/* @__PURE__ */
|
|
1260
|
-
/* @__PURE__ */
|
|
1261
|
-
/* @__PURE__ */
|
|
1257
|
+
}, He = (s) => (Tt("data-v-e0162328"), s = s(), Mt(), s), pn = { class: "w-full h-full" }, hn = /* @__PURE__ */ He(() => /* @__PURE__ */ x("span", null, "查询方案", -1)), gn = { class: "pl-2 mr-5" }, vn = /* @__PURE__ */ He(() => /* @__PURE__ */ x("i", { class: "vxe-icon-question-circle-fill" }, null, -1)), yn = /* @__PURE__ */ He(() => /* @__PURE__ */ x("div", null, [
|
|
1258
|
+
/* @__PURE__ */ x("div", { class: "text-sm" }, [
|
|
1259
|
+
/* @__PURE__ */ x("div", null, "• 单击选中需要的查询方案,点击确定即可"),
|
|
1260
|
+
/* @__PURE__ */ x("div", null, "• 专属否: 是否只有自己才能查询"),
|
|
1261
|
+
/* @__PURE__ */ x("div", null, "• 仅方案创建人能够删除及更新方案")
|
|
1262
1262
|
])
|
|
1263
1263
|
], -1)), _n = { class: "flex flex-wrap justify-between x-card" }, wn = ["onClick"], bn = {
|
|
1264
1264
|
style: { "border-bottom-width": "1px", "border-color": "rgb(229 231 235)" },
|
|
@@ -1275,7 +1275,7 @@ const Bt = (s, o, t) => {
|
|
|
1275
1275
|
}, Sn = {
|
|
1276
1276
|
key: 1,
|
|
1277
1277
|
class: "flex flex-wrap items-center justify-center card-content card2"
|
|
1278
|
-
}, In = /* @__PURE__ */ He(() => /* @__PURE__ */
|
|
1278
|
+
}, In = /* @__PURE__ */ He(() => /* @__PURE__ */ x("i", {
|
|
1279
1279
|
style: { "font-size": "56px", color: "rgb(156 163 175)" },
|
|
1280
1280
|
class: "vxe-icon-add"
|
|
1281
1281
|
}, null, -1)), En = [
|
|
@@ -1288,127 +1288,127 @@ const Bt = (s, o, t) => {
|
|
|
1288
1288
|
},
|
|
1289
1289
|
emits: ["close", "search"],
|
|
1290
1290
|
setup(s, { emit: o }) {
|
|
1291
|
-
const t = s, n = ye(), e = n.appContext.config.globalProperties.$serviceApi, l = n.appContext.config.globalProperties.$hasAuthority,
|
|
1291
|
+
const t = s, n = ye(), e = n.appContext.config.globalProperties.$serviceApi, l = n.appContext.config.globalProperties.$hasAuthority, v = Ft(), { t: _ } = $e();
|
|
1292
1292
|
console.log("view ======", t.view);
|
|
1293
|
-
const w = N(null), $ = N(""),
|
|
1294
|
-
let L,
|
|
1295
|
-
const
|
|
1296
|
-
const
|
|
1293
|
+
const w = N(null), $ = N(""), m = N(!1), p = N(!1), E = N(!1), k = N(!1), I = N(!0), M = N({}), c = he.get("loginer");
|
|
1294
|
+
let L, D, S;
|
|
1295
|
+
const r = N([]), a = de(() => t.items.length ? Ee(i(), _) : {}), f = de(() => t.items.length ? nt(i(), "update") : t.items), i = () => {
|
|
1296
|
+
const P = [
|
|
1297
1297
|
{ field: "title", title: "方案名称", required: !0 },
|
|
1298
1298
|
{
|
|
1299
1299
|
field: "isPrivate",
|
|
1300
1300
|
title: "专属否",
|
|
1301
|
-
itemRender:
|
|
1301
|
+
itemRender: v.renderSwitch("Y")
|
|
1302
1302
|
}
|
|
1303
1303
|
];
|
|
1304
|
-
return
|
|
1305
|
-
},
|
|
1306
|
-
|
|
1307
|
-
const
|
|
1308
|
-
|
|
1304
|
+
return P.push(...ce(t.items, !0)), P.filter((R) => R.field !== "dataFlat");
|
|
1305
|
+
}, y = (P) => {
|
|
1306
|
+
D = null;
|
|
1307
|
+
const R = P.select;
|
|
1308
|
+
r.value.forEach((j) => {
|
|
1309
1309
|
j.select = !1;
|
|
1310
|
-
}),
|
|
1311
|
-
},
|
|
1312
|
-
M.value = { isPrivate: "Y", item: {} },
|
|
1313
|
-
},
|
|
1310
|
+
}), P.select = !R, I.value = R, D = R ? D : P, P.id === "add" && (I.value = !0, C());
|
|
1311
|
+
}, C = () => {
|
|
1312
|
+
M.value = { isPrivate: "Y", item: {} }, p.value = !0;
|
|
1313
|
+
}, B = (P, R) => {
|
|
1314
1314
|
M.value = {
|
|
1315
|
-
title:
|
|
1316
|
-
isPrivate:
|
|
1317
|
-
item:
|
|
1318
|
-
...
|
|
1319
|
-
}, L =
|
|
1320
|
-
},
|
|
1321
|
-
w.value.validate(async (
|
|
1322
|
-
if (!
|
|
1323
|
-
const
|
|
1315
|
+
title: P.title,
|
|
1316
|
+
isPrivate: P.isPrivate,
|
|
1317
|
+
item: P,
|
|
1318
|
+
...P.content
|
|
1319
|
+
}, L = R, p.value = !0;
|
|
1320
|
+
}, A = () => {
|
|
1321
|
+
w.value.validate(async (P) => {
|
|
1322
|
+
if (!P) {
|
|
1323
|
+
const R = g();
|
|
1324
1324
|
k.value = !0;
|
|
1325
|
-
const j =
|
|
1326
|
-
k.value = !1, H || (Q[0].select = !1, Q[0].content = JSON.parse(Q[0].content), j === "post" ?
|
|
1325
|
+
const j = R.id ? "put" : "post", [H, Q] = await st(e[j](Je, [R]));
|
|
1326
|
+
k.value = !1, H || (Q[0].select = !1, Q[0].content = JSON.parse(Q[0].content), j === "post" ? r.value.splice(r.value.length - 1, 0, Q[0]) : r.value.splice(L, 1, Q[0]), S = ce(r.value, !0), Ye(), p.value = !1);
|
|
1327
1327
|
}
|
|
1328
1328
|
});
|
|
1329
|
-
},
|
|
1329
|
+
}, d = () => {
|
|
1330
1330
|
E.value = !0;
|
|
1331
|
-
const
|
|
1332
|
-
{ pageSize: 50, pageNum: 1, userName:
|
|
1333
|
-
|
|
1331
|
+
const P = he.get("kCookies_param") ? JSON.parse(he.get("kCookies_param")) : {}, R = Object.assign(
|
|
1332
|
+
{ pageSize: 50, pageNum: 1, userName: c, viewCode: t.view },
|
|
1333
|
+
P
|
|
1334
1334
|
);
|
|
1335
|
-
e.get(Je,
|
|
1335
|
+
e.get(Je, R).then((j) => {
|
|
1336
1336
|
const H = j.list;
|
|
1337
|
-
|
|
1337
|
+
b(H), S = ce(r.value, !0);
|
|
1338
1338
|
}).finally(() => {
|
|
1339
1339
|
E.value = !1;
|
|
1340
1340
|
});
|
|
1341
|
+
}, u = () => {
|
|
1342
|
+
z("search", D.content), h();
|
|
1343
|
+
}, h = () => {
|
|
1344
|
+
p.value ? (M.value = {}, p.value = !1) : (m.value = !1, z("close"));
|
|
1341
1345
|
}, g = () => {
|
|
1342
|
-
R("
|
|
1343
|
-
}, _ = () => {
|
|
1344
|
-
m.value ? (M.value = {}, m.value = !1) : (f.value = !1, R("close"));
|
|
1345
|
-
}, p = () => {
|
|
1346
|
-
const A = M.value, { title: O, isPrivate: j } = A, H = he.get("kCookies_param") ? JSON.parse(he.get("kCookies_param")) : {}, Q = {
|
|
1346
|
+
const P = M.value, { title: R, isPrivate: j } = P, H = he.get("kCookies_param") ? JSON.parse(he.get("kCookies_param")) : {}, Q = {
|
|
1347
1347
|
...M.value.item,
|
|
1348
1348
|
...H,
|
|
1349
|
-
title:
|
|
1349
|
+
title: R,
|
|
1350
1350
|
isPrivate: j,
|
|
1351
1351
|
viewCode: t.view,
|
|
1352
1352
|
content: "",
|
|
1353
|
-
userName:
|
|
1353
|
+
userName: c
|
|
1354
1354
|
};
|
|
1355
|
-
delete
|
|
1355
|
+
delete P.title, delete P.isPrivate, delete P.item;
|
|
1356
1356
|
const re = {};
|
|
1357
|
-
for (const fe in
|
|
1358
|
-
|
|
1357
|
+
for (const fe in P)
|
|
1358
|
+
P[fe] && (re[fe] = P[fe]);
|
|
1359
1359
|
return Q.content = JSON.stringify(re), Q;
|
|
1360
|
-
},
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
}),
|
|
1364
|
-
},
|
|
1360
|
+
}, b = (P) => {
|
|
1361
|
+
P.forEach((R) => {
|
|
1362
|
+
R.select = !1, R.content = JSON.parse(R.content);
|
|
1363
|
+
}), P.push({ id: "add" }), r.value = P;
|
|
1364
|
+
}, O = (P) => {
|
|
1365
1365
|
var j;
|
|
1366
|
-
return (j =
|
|
1367
|
-
}, Y = (
|
|
1368
|
-
var H, Q, re, fe,
|
|
1369
|
-
const j = (H = t.items) == null ? void 0 : H.find((X) => X.field ===
|
|
1370
|
-
return (Q = j == null ? void 0 : j.itemRender) != null && Q.dictCode && ((
|
|
1371
|
-
}, te = async (
|
|
1366
|
+
return (j = f.value.find((H) => H.field === P)) == null ? void 0 : j.title;
|
|
1367
|
+
}, Y = (P, R) => {
|
|
1368
|
+
var H, Q, re, fe, Ne;
|
|
1369
|
+
const j = (H = t.items) == null ? void 0 : H.find((X) => X.field === P);
|
|
1370
|
+
return (Q = j == null ? void 0 : j.itemRender) != null && Q.dictCode && ((Ne = (fe = (re = j == null ? void 0 : j.itemRender) == null ? void 0 : re.options) == null ? void 0 : fe.find((X) => X.dictCode === R)) == null ? void 0 : Ne.dictName) || R;
|
|
1371
|
+
}, te = async (P, R) => {
|
|
1372
1372
|
if (await Se.modal.confirm(
|
|
1373
|
-
`继续操作将删除查询方案【${
|
|
1373
|
+
`继续操作将删除查询方案【${P.title}】`
|
|
1374
1374
|
) === "confirm") {
|
|
1375
1375
|
E.value = !0;
|
|
1376
|
-
const H = ce(
|
|
1376
|
+
const H = ce(P, !0);
|
|
1377
1377
|
H.content = JSON.stringify(H.content), e.delete(Je, [H]).then(() => {
|
|
1378
|
-
|
|
1378
|
+
r.value.splice(R, 1), S = ce(r.value, !0), Ye();
|
|
1379
1379
|
}).finally(() => {
|
|
1380
1380
|
E.value = !1;
|
|
1381
1381
|
});
|
|
1382
1382
|
}
|
|
1383
1383
|
}, pe = () => {
|
|
1384
|
-
|
|
1385
|
-
(
|
|
1384
|
+
r.value = S.filter(
|
|
1385
|
+
(P) => P.id === "add" || P.title.includes($.value)
|
|
1386
1386
|
);
|
|
1387
|
-
}, q = (
|
|
1388
|
-
["Enter", "NumpadEnter"].includes(
|
|
1387
|
+
}, q = (P) => {
|
|
1388
|
+
["Enter", "NumpadEnter"].includes(P.$event.code) && pe();
|
|
1389
1389
|
}, J = () => {
|
|
1390
|
-
$.value = "",
|
|
1390
|
+
$.value = "", r.value = ce(S, !0);
|
|
1391
1391
|
};
|
|
1392
|
-
|
|
1393
|
-
const
|
|
1394
|
-
return
|
|
1395
|
-
|
|
1396
|
-
}), (
|
|
1397
|
-
const j = V("el-popover"), H = V("el-scrollbar"), Q = V("vxe-input"), re = V("ut-button"), fe = V("vxe-modal"),
|
|
1392
|
+
d();
|
|
1393
|
+
const z = o;
|
|
1394
|
+
return Fe(() => {
|
|
1395
|
+
m.value = !0;
|
|
1396
|
+
}), (P, R) => {
|
|
1397
|
+
const j = V("el-popover"), H = V("el-scrollbar"), Q = V("vxe-input"), re = V("ut-button"), fe = V("vxe-modal"), Ne = V("vxe-form");
|
|
1398
1398
|
return T(), F("div", pn, [
|
|
1399
1399
|
U(fe, {
|
|
1400
|
-
modelValue:
|
|
1401
|
-
"onUpdate:modelValue":
|
|
1400
|
+
modelValue: m.value,
|
|
1401
|
+
"onUpdate:modelValue": R[4] || (R[4] = (X) => m.value = X),
|
|
1402
1402
|
loading: E.value,
|
|
1403
1403
|
width: "820",
|
|
1404
1404
|
height: "360",
|
|
1405
1405
|
"show-footer": "",
|
|
1406
|
-
onClose:
|
|
1406
|
+
onClose: R[5] || (R[5] = (X) => h())
|
|
1407
1407
|
}, {
|
|
1408
1408
|
title: W(() => [
|
|
1409
|
-
|
|
1409
|
+
x("div", null, [
|
|
1410
1410
|
hn,
|
|
1411
|
-
|
|
1411
|
+
x("span", gn, [
|
|
1412
1412
|
U(j, {
|
|
1413
1413
|
placement: "right",
|
|
1414
1414
|
width: 260,
|
|
@@ -1426,27 +1426,27 @@ const Bt = (s, o, t) => {
|
|
|
1426
1426
|
])
|
|
1427
1427
|
]),
|
|
1428
1428
|
default: W(() => [
|
|
1429
|
-
|
|
1430
|
-
(T(!0), F(ae, null, se(
|
|
1429
|
+
x("div", _n, [
|
|
1430
|
+
(T(!0), F(ae, null, se(r.value, (X, Me) => (T(), F("div", {
|
|
1431
1431
|
key: X.id,
|
|
1432
1432
|
class: "card",
|
|
1433
|
-
style: ne({ width:
|
|
1434
|
-
onClick: (_e) =>
|
|
1433
|
+
style: ne({ width: r.value.length === 1 ? "100%" : "" }),
|
|
1434
|
+
onClick: (_e) => y(X)
|
|
1435
1435
|
}, [
|
|
1436
1436
|
X.id !== "add" ? (T(), F("div", {
|
|
1437
1437
|
key: 0,
|
|
1438
1438
|
class: Ce(["flex flex-col justify-between card-content card2", { selectCard: X.select }])
|
|
1439
1439
|
}, [
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
X.userName === oe(
|
|
1440
|
+
x("div", bn, [
|
|
1441
|
+
x("span", kn, G(X.title) + "(" + G(X.userName === oe(c) ? "自己" : X.userName) + ")", 1),
|
|
1442
|
+
x("div", Cn, [
|
|
1443
|
+
X.userName === oe(c) || oe(l)("fetch") ? (T(), F("div", {
|
|
1444
1444
|
key: 0,
|
|
1445
1445
|
class: "flex items-center justify-center",
|
|
1446
1446
|
style: { color: "#fff", "background-color": "rgb(29 78 216)", "border-radius": "8px", width: "16px", height: "16px", "margin-left": "12px" },
|
|
1447
|
-
onClick: (_e) =>
|
|
1447
|
+
onClick: (_e) => B(X, Me)
|
|
1448
1448
|
}, " ✔ ", 8, xn)) : ee("", !0),
|
|
1449
|
-
X.userName === oe(
|
|
1449
|
+
X.userName === oe(c) || oe(l)("fetch") ? (T(), F("div", {
|
|
1450
1450
|
key: 1,
|
|
1451
1451
|
class: "flex items-center justify-center",
|
|
1452
1452
|
style: { color: "#fff", "background-color": "rgb(185 28 28)", "border-radius": "8px", width: "16px", height: "16px", "margin-left": "12px" },
|
|
@@ -1459,14 +1459,14 @@ const Bt = (s, o, t) => {
|
|
|
1459
1459
|
class: "w-full overflow-y-auto"
|
|
1460
1460
|
}, {
|
|
1461
1461
|
default: W(() => [
|
|
1462
|
-
(T(!0), F(ae, null, se(X.content, (_e,
|
|
1462
|
+
(T(!0), F(ae, null, se(X.content, (_e, Le) => (T(), F("span", {
|
|
1463
1463
|
key: _e,
|
|
1464
1464
|
style: { "line-height": "2rem", height: "33.333%" },
|
|
1465
1465
|
class: "inline-block w-1/2"
|
|
1466
1466
|
}, [
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1467
|
+
x("span", $n, [
|
|
1468
|
+
x("span", Tn, G(P.$t(O(Le))) + ":", 1),
|
|
1469
|
+
x("span", Mn, G(Y(Le, _e)), 1)
|
|
1470
1470
|
])
|
|
1471
1471
|
]))), 128))
|
|
1472
1472
|
]),
|
|
@@ -1477,10 +1477,10 @@ const Bt = (s, o, t) => {
|
|
|
1477
1477
|
])
|
|
1478
1478
|
]),
|
|
1479
1479
|
footer: W(() => [
|
|
1480
|
-
|
|
1480
|
+
x("div", Fn, [
|
|
1481
1481
|
U(Q, {
|
|
1482
1482
|
modelValue: $.value,
|
|
1483
|
-
"onUpdate:modelValue":
|
|
1483
|
+
"onUpdate:modelValue": R[0] || (R[0] = (X) => $.value = X),
|
|
1484
1484
|
placeholder: "请录入方案标题",
|
|
1485
1485
|
type: "search",
|
|
1486
1486
|
onSearchClick: pe,
|
|
@@ -1491,57 +1491,57 @@ const Bt = (s, o, t) => {
|
|
|
1491
1491
|
content: "reset",
|
|
1492
1492
|
status: "info",
|
|
1493
1493
|
icon: "ri-refresh-line",
|
|
1494
|
-
onTap:
|
|
1494
|
+
onTap: R[1] || (R[1] = (X) => J())
|
|
1495
1495
|
}),
|
|
1496
1496
|
U(re, {
|
|
1497
1497
|
content: "cancel",
|
|
1498
1498
|
status: "warning",
|
|
1499
1499
|
icon: "ri-close-line",
|
|
1500
|
-
onTap:
|
|
1500
|
+
onTap: R[2] || (R[2] = (X) => h())
|
|
1501
1501
|
}),
|
|
1502
1502
|
U(re, {
|
|
1503
1503
|
disabled: I.value,
|
|
1504
1504
|
content: "confirm",
|
|
1505
1505
|
icon: "ri-save-3-line",
|
|
1506
|
-
onTap:
|
|
1506
|
+
onTap: R[3] || (R[3] = (X) => u())
|
|
1507
1507
|
}, null, 8, ["disabled"])
|
|
1508
1508
|
])
|
|
1509
1509
|
]),
|
|
1510
1510
|
_: 1
|
|
1511
1511
|
}, 8, ["modelValue", "loading"]),
|
|
1512
1512
|
U(fe, {
|
|
1513
|
-
modelValue:
|
|
1514
|
-
"onUpdate:modelValue":
|
|
1513
|
+
modelValue: p.value,
|
|
1514
|
+
"onUpdate:modelValue": R[7] || (R[7] = (X) => p.value = X),
|
|
1515
1515
|
loading: k.value,
|
|
1516
1516
|
width: "360",
|
|
1517
1517
|
height: "420",
|
|
1518
1518
|
title: "查询方案新增",
|
|
1519
1519
|
"show-footer": "",
|
|
1520
|
-
onClose:
|
|
1520
|
+
onClose: R[8] || (R[8] = (X) => h())
|
|
1521
1521
|
}, {
|
|
1522
1522
|
default: W(() => [
|
|
1523
|
-
U(
|
|
1523
|
+
U(Ne, {
|
|
1524
1524
|
ref_key: "xForm",
|
|
1525
1525
|
ref: w,
|
|
1526
1526
|
data: M.value,
|
|
1527
|
-
items:
|
|
1528
|
-
rules:
|
|
1527
|
+
items: f.value,
|
|
1528
|
+
rules: a.value,
|
|
1529
1529
|
"title-align": "right",
|
|
1530
1530
|
"title-width": 90
|
|
1531
1531
|
}, null, 8, ["data", "items", "rules"])
|
|
1532
1532
|
]),
|
|
1533
1533
|
footer: W(() => [
|
|
1534
|
-
|
|
1534
|
+
x("div", Nn, [
|
|
1535
1535
|
U(re, {
|
|
1536
1536
|
content: "cancel",
|
|
1537
1537
|
status: "warning",
|
|
1538
1538
|
icon: "ri-close-line",
|
|
1539
|
-
onTap:
|
|
1539
|
+
onTap: R[6] || (R[6] = (X) => h())
|
|
1540
1540
|
}),
|
|
1541
1541
|
U(re, {
|
|
1542
1542
|
content: "confirm",
|
|
1543
1543
|
icon: "ri-save-3-line",
|
|
1544
|
-
onTap:
|
|
1544
|
+
onTap: A
|
|
1545
1545
|
})
|
|
1546
1546
|
])
|
|
1547
1547
|
]),
|
|
@@ -1550,7 +1550,7 @@ const Bt = (s, o, t) => {
|
|
|
1550
1550
|
]);
|
|
1551
1551
|
};
|
|
1552
1552
|
}
|
|
1553
|
-
}), An = /* @__PURE__ */ Te(Ln, [["__scopeId", "data-v-e0162328"]]), Pn = { style: { width: "100%" } }, yt = "U_TABLE_COLUMNN_SORT", Bn = /* @__PURE__ */ K({
|
|
1553
|
+
}), An = /* @__PURE__ */ Te(Ln, [["__scopeId", "data-v-e0162328"]]), Pn = { style: { width: "100%", height: "100%" } }, yt = "U_TABLE_COLUMNN_SORT", Bn = /* @__PURE__ */ K({
|
|
1554
1554
|
name: "UtGrid",
|
|
1555
1555
|
__name: "grid",
|
|
1556
1556
|
props: {
|
|
@@ -1569,196 +1569,194 @@ const Bt = (s, o, t) => {
|
|
|
1569
1569
|
setup(s, { expose: o, emit: t }) {
|
|
1570
1570
|
const n = at(ot());
|
|
1571
1571
|
let e;
|
|
1572
|
-
const l = {},
|
|
1572
|
+
const l = {}, v = ye(), _ = v.appContext.config.globalProperties.$hasAuthority, w = v.appContext.config.globalProperties.$serviceApi, $ = v.parent.type.name, m = v.appContext.config.globalProperties.$mode, p = s, { t: E } = $e(), k = N(null), I = N(!1), M = {
|
|
1573
1573
|
icon: "vxe-icon-setting",
|
|
1574
1574
|
name: "favorite",
|
|
1575
1575
|
events: {
|
|
1576
|
-
click: (
|
|
1577
|
-
|
|
1576
|
+
click: (z, P) => {
|
|
1577
|
+
P.name === "favorite" && (I.value = !0);
|
|
1578
1578
|
}
|
|
1579
1579
|
}
|
|
1580
|
-
},
|
|
1581
|
-
const
|
|
1580
|
+
}, c = () => p.columns.length ? Ee(p.columns, E) : {}, L = () => {
|
|
1581
|
+
const z = p.columns;
|
|
1582
1582
|
if (n.gridId) {
|
|
1583
|
-
const
|
|
1584
|
-
j !== -1 ?
|
|
1583
|
+
const R = un.filter((H) => !z.some((Q) => Q.field === H.field)).map((H) => (n.format && ["lastUpdateDate", "creationDate"].includes(H.field) && (H.formatter = n.format, H.width = 90), H)), j = z.findIndex((H) => H.field === "operate");
|
|
1584
|
+
j !== -1 ? z.splice(j, 0, ...R) : z.push(...R);
|
|
1585
1585
|
}
|
|
1586
|
-
const
|
|
1587
|
-
return Lt(
|
|
1586
|
+
const P = n.gridId ? r(z) : z;
|
|
1587
|
+
return Lt(P);
|
|
1588
1588
|
};
|
|
1589
|
-
mt.getItem(yt).then((
|
|
1590
|
-
e =
|
|
1589
|
+
mt.getItem(yt).then((z) => {
|
|
1590
|
+
e = z, D.columns = L();
|
|
1591
1591
|
});
|
|
1592
|
-
const
|
|
1592
|
+
const D = ke({
|
|
1593
1593
|
border: !0,
|
|
1594
1594
|
pagerConfig: { pageSize: n.pageSize || 20 },
|
|
1595
1595
|
editConfig: {},
|
|
1596
|
-
editRules:
|
|
1596
|
+
editRules: c(),
|
|
1597
1597
|
formConfig: {},
|
|
1598
1598
|
columnConfig: { useKey: !0 },
|
|
1599
1599
|
toolbarConfig: { enabled: !1 },
|
|
1600
1600
|
sortConfig: { multiple: !0, trigger: "cell" },
|
|
1601
|
-
height:
|
|
1601
|
+
height: m ? void 0 : window.innerHeight - 92,
|
|
1602
1602
|
checkboxConfig: {
|
|
1603
|
-
checkMethod: ({ row:
|
|
1604
|
-
checkRowKeys:
|
|
1603
|
+
checkMethod: ({ row: z }) => qt(z, p),
|
|
1604
|
+
checkRowKeys: p.checkRowKeys
|
|
1605
1605
|
},
|
|
1606
1606
|
loading: !1,
|
|
1607
1607
|
footerRowClassName: "ut-grid-footer",
|
|
1608
1608
|
proxyConfig: {
|
|
1609
1609
|
form: !0,
|
|
1610
1610
|
// 查询是需要启用表单代理
|
|
1611
|
-
autoLoad:
|
|
1611
|
+
autoLoad: p.autoLoad,
|
|
1612
1612
|
// 接收 Promise
|
|
1613
1613
|
ajax: {
|
|
1614
|
-
queryAll: ({ form:
|
|
1615
|
-
query: ({ page:
|
|
1616
|
-
delete: ({ body: { removeRecords:
|
|
1617
|
-
save: ({ body:
|
|
1614
|
+
queryAll: ({ form: z }) => Ot(p, w, z),
|
|
1615
|
+
query: ({ page: z, form: P }) => zt(p, P, z, w, m),
|
|
1616
|
+
delete: ({ body: { removeRecords: z } }) => Ut(w, z, p),
|
|
1617
|
+
save: ({ body: z }) => Promise.all(Vt(w, z, p))
|
|
1618
1618
|
}
|
|
1619
1619
|
},
|
|
1620
1620
|
columns: n.gridId ? [] : L(),
|
|
1621
1621
|
...n
|
|
1622
|
-
}), S = () =>
|
|
1623
|
-
ce(
|
|
1624
|
-
$ &&
|
|
1625
|
-
) :
|
|
1626
|
-
function
|
|
1627
|
-
const
|
|
1628
|
-
return
|
|
1622
|
+
}), S = () => p.items.length ? At(
|
|
1623
|
+
ce(p.items, !0),
|
|
1624
|
+
$ && p.url ? M : $
|
|
1625
|
+
) : p.items;
|
|
1626
|
+
function r(z) {
|
|
1627
|
+
const P = e ? e[n.gridId] : {};
|
|
1628
|
+
return P ? z.map((R, j) => {
|
|
1629
1629
|
const H = (j + 1) * 10;
|
|
1630
|
-
return
|
|
1631
|
-
}).sort((
|
|
1630
|
+
return R._sort = P[R.field] || H, l[R.field] = R._sort, R;
|
|
1631
|
+
}).sort((R, j) => R._sort - j._sort) : z;
|
|
1632
1632
|
}
|
|
1633
|
-
const
|
|
1634
|
-
|
|
1633
|
+
const a = () => {
|
|
1634
|
+
p.items.length && (D.formConfig = {
|
|
1635
1635
|
titleWidth: 100,
|
|
1636
1636
|
titleAlign: "right",
|
|
1637
1637
|
items: S(),
|
|
1638
|
-
rules:
|
|
1638
|
+
rules: Ee(p.items, E),
|
|
1639
1639
|
validConfig: { showMessage: !1 }
|
|
1640
1640
|
});
|
|
1641
|
-
const
|
|
1642
|
-
Object.assign(
|
|
1641
|
+
const z = Wt(D, p, n, _);
|
|
1642
|
+
Object.assign(D, z), n.gridId && (D.id = n.gridId, D.customConfig = {
|
|
1643
1643
|
storage: !0,
|
|
1644
1644
|
mode: "popup",
|
|
1645
|
-
checkMethod({ column:
|
|
1646
|
-
return !(
|
|
1645
|
+
checkMethod({ column: P }) {
|
|
1646
|
+
return !(P.field === "operate" || ["checkbox", "radio"].includes(P.type));
|
|
1647
1647
|
},
|
|
1648
1648
|
modalOptions: {
|
|
1649
1649
|
width: 750,
|
|
1650
1650
|
height: "75%"
|
|
1651
1651
|
}
|
|
1652
|
-
}), n.mergeFooter && (
|
|
1653
|
-
},
|
|
1652
|
+
}), n.mergeFooter && (D.showFooter = !0, D.footerMethod = ({ columns: P, data: R }) => Yt({ columns: P, data: R }, n.mergeFooter));
|
|
1653
|
+
}, f = () => {
|
|
1654
1654
|
k.value.commitProxy("query");
|
|
1655
|
-
},
|
|
1656
|
-
|
|
1657
|
-
},
|
|
1658
|
-
|
|
1659
|
-
},
|
|
1660
|
-
const
|
|
1661
|
-
return
|
|
1655
|
+
}, i = () => (D.editRules = c(), k.value.refreshColumn()), y = () => {
|
|
1656
|
+
D.loading = !0;
|
|
1657
|
+
}, C = () => {
|
|
1658
|
+
D.loading = !1;
|
|
1659
|
+
}, B = () => It(k.value), A = () => k.value.getTableData().fullData, d = (z = !1) => {
|
|
1660
|
+
const P = p.columns[0].type, R = P === "radio" ? k.value.getRadioRecord(z) : k.value.getCheckboxRecords(z);
|
|
1661
|
+
return P === "checkbox" && !R.length ? (Ie(E("message.tip_selectedRecord")), []) : P === "radio" && !R ? (Ie(E("message.tip_selectedRecord")), null) : R;
|
|
1662
1662
|
};
|
|
1663
|
-
let
|
|
1664
|
-
const
|
|
1665
|
-
const
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
".body--wrapper>.vxe-table--header .vxe-header--row"
|
|
1669
|
-
),
|
|
1663
|
+
let u;
|
|
1664
|
+
const h = () => {
|
|
1665
|
+
const z = k.value;
|
|
1666
|
+
u = co.create(
|
|
1667
|
+
z.$el.querySelector(".vxe-table--header .vxe-header--row"),
|
|
1670
1668
|
{
|
|
1671
1669
|
disabled: !n.gridId,
|
|
1672
1670
|
handle: ".vxe-header--column",
|
|
1673
|
-
onEnd: async (
|
|
1674
|
-
const
|
|
1671
|
+
onEnd: async (P) => {
|
|
1672
|
+
const R = P.item, j = P.newIndex, H = P.oldIndex, { fullColumn: Q, tableColumn: re } = z.getTableColumn(), fe = R.parentNode, Ne = Q[j], X = Q[H];
|
|
1675
1673
|
let Me = !1, _e = "固定列";
|
|
1676
|
-
if (
|
|
1674
|
+
if (Ne.fixed ? Me = !1 : j === 0 || ["checkbox", "radio"].includes(X.type) ? (_e = "勾选列", Me = !0) : (X.field === "operate" || j === Q.length - 1) && (Me = !0, _e = "操作列"), Me) {
|
|
1677
1675
|
const xe = fe.children[H];
|
|
1678
|
-
return j > H ? fe.insertBefore(
|
|
1679
|
-
|
|
1676
|
+
return j > H ? fe.insertBefore(R, xe) : fe.insertBefore(
|
|
1677
|
+
R,
|
|
1680
1678
|
xe && xe.nextElementSibling
|
|
1681
1679
|
), ao(_e + "不允许拖动!");
|
|
1682
1680
|
}
|
|
1683
|
-
const
|
|
1681
|
+
const Le = z.getColumnIndex(re[H]), Ge = z.getColumnIndex(re[j]), rt = Q.splice(Le, 1)[0];
|
|
1684
1682
|
Q.splice(Ge, 0, rt);
|
|
1685
|
-
const Oe = Ge -
|
|
1683
|
+
const Oe = Ge - Le > 0 ? 1 : -1, ct = (Ge + 1) * 10, dt = (Le + 1) * 10, ut = ct + 1 * Oe;
|
|
1686
1684
|
for (const xe in l) {
|
|
1687
|
-
const
|
|
1688
|
-
(Oe > 0 &&
|
|
1685
|
+
const Ae = l[xe];
|
|
1686
|
+
(Oe > 0 && Ae < ut && Ae > dt || Oe < 0 && Ae > ut && Ae < dt) && (l[xe] = Ae - 10 * Oe);
|
|
1689
1687
|
}
|
|
1690
|
-
l[rt.field] = ct, mt.setItem(yt, { [n.gridId]: l }),
|
|
1688
|
+
l[rt.field] = ct, mt.setItem(yt, { [n.gridId]: l }), z.loadColumn(Q);
|
|
1691
1689
|
}
|
|
1692
1690
|
}
|
|
1693
1691
|
);
|
|
1694
|
-
},
|
|
1692
|
+
}, g = (z) => {
|
|
1695
1693
|
I.value = !1;
|
|
1696
|
-
const { form:
|
|
1697
|
-
Object.assign(
|
|
1694
|
+
const { form: P } = k.value.getProxyInfo();
|
|
1695
|
+
Object.assign(P, z), f();
|
|
1698
1696
|
};
|
|
1699
1697
|
o({
|
|
1700
|
-
getTableData:
|
|
1701
|
-
getSelectRecords:
|
|
1702
|
-
refreshData:
|
|
1703
|
-
refreshColumn:
|
|
1704
|
-
getInstance:
|
|
1705
|
-
showLoading:
|
|
1706
|
-
hiddenLoading:
|
|
1698
|
+
getTableData: A,
|
|
1699
|
+
getSelectRecords: d,
|
|
1700
|
+
refreshData: f,
|
|
1701
|
+
refreshColumn: i,
|
|
1702
|
+
getInstance: B,
|
|
1703
|
+
showLoading: y,
|
|
1704
|
+
hiddenLoading: C
|
|
1707
1705
|
});
|
|
1708
|
-
const
|
|
1709
|
-
J("buttonClick",
|
|
1710
|
-
},
|
|
1711
|
-
J("cellClick",
|
|
1712
|
-
}, Y = (
|
|
1713
|
-
J("cellDbclick",
|
|
1714
|
-
}, te = (
|
|
1715
|
-
J("editEctivated",
|
|
1706
|
+
const b = ({ code: z }) => {
|
|
1707
|
+
J("buttonClick", z);
|
|
1708
|
+
}, O = (z) => {
|
|
1709
|
+
J("cellClick", z);
|
|
1710
|
+
}, Y = (z) => {
|
|
1711
|
+
J("cellDbclick", z);
|
|
1712
|
+
}, te = (z) => {
|
|
1713
|
+
J("editEctivated", z);
|
|
1716
1714
|
}, pe = () => {
|
|
1717
1715
|
window.onresize = () => (() => {
|
|
1718
|
-
let
|
|
1719
|
-
n.mode !== "inline" && !(n != null && n.height) && (
|
|
1716
|
+
let z = (n == null ? void 0 : n.height) || window.innerHeight - 90;
|
|
1717
|
+
n.mode !== "inline" && !(n != null && n.height) && (z = window.innerHeight - 180), D.height = z < 240 ? 240 : z;
|
|
1720
1718
|
})();
|
|
1721
1719
|
};
|
|
1722
1720
|
let q;
|
|
1723
|
-
|
|
1721
|
+
Pe(() => {
|
|
1724
1722
|
q = setTimeout(() => {
|
|
1725
|
-
|
|
1723
|
+
h();
|
|
1726
1724
|
}, 500);
|
|
1727
1725
|
}), St(() => {
|
|
1728
|
-
clearTimeout(q),
|
|
1726
|
+
clearTimeout(q), u && u.destroy();
|
|
1729
1727
|
}), qe(() => {
|
|
1730
|
-
|
|
1728
|
+
a(), pe();
|
|
1731
1729
|
});
|
|
1732
1730
|
const J = t;
|
|
1733
|
-
return (
|
|
1734
|
-
const
|
|
1731
|
+
return (z, P) => {
|
|
1732
|
+
const R = V("vxe-grid");
|
|
1735
1733
|
return T(), F("div", Pn, [
|
|
1736
|
-
U(
|
|
1734
|
+
U(R, be({
|
|
1737
1735
|
ref_key: "xgrid",
|
|
1738
1736
|
ref: k
|
|
1739
|
-
},
|
|
1740
|
-
onToolbarButtonClick:
|
|
1741
|
-
onToolbarToolClick:
|
|
1742
|
-
onCellClick:
|
|
1737
|
+
}, D, { class: "ut-grid-wrapper" }, tt(oe(n).events || {}), {
|
|
1738
|
+
onToolbarButtonClick: b,
|
|
1739
|
+
onToolbarToolClick: b,
|
|
1740
|
+
onCellClick: O,
|
|
1743
1741
|
onCellDblclick: Y,
|
|
1744
1742
|
onEditActivated: te
|
|
1745
1743
|
}), null, 16),
|
|
1746
|
-
I.value &&
|
|
1744
|
+
I.value && p.url ? (T(), ie(An, {
|
|
1747
1745
|
key: 0,
|
|
1748
|
-
items:
|
|
1746
|
+
items: z.items,
|
|
1749
1747
|
view: oe($),
|
|
1750
|
-
onSearch:
|
|
1751
|
-
onClose:
|
|
1748
|
+
onSearch: g,
|
|
1749
|
+
onClose: P[0] || (P[0] = (j) => I.value = !1)
|
|
1752
1750
|
}, null, 8, ["items", "view"])) : ee("", !0)
|
|
1753
1751
|
]);
|
|
1754
1752
|
};
|
|
1755
1753
|
}
|
|
1756
1754
|
}), Ht = ue(Bn);
|
|
1757
1755
|
console.log(Ht);
|
|
1758
|
-
const
|
|
1756
|
+
const Rn = {
|
|
1759
1757
|
name: "UtModalForm"
|
|
1760
|
-
},
|
|
1761
|
-
...
|
|
1758
|
+
}, On = /* @__PURE__ */ K({
|
|
1759
|
+
...Rn,
|
|
1762
1760
|
props: {
|
|
1763
1761
|
record: { default: () => ({}) },
|
|
1764
1762
|
formAttrs: { default: () => ({}) },
|
|
@@ -1773,74 +1771,74 @@ const On = {
|
|
|
1773
1771
|
},
|
|
1774
1772
|
emits: ["close", "confirm"],
|
|
1775
1773
|
setup(s, { expose: o, emit: t }) {
|
|
1776
|
-
const n = s, e = at(ot()), l = N(!1),
|
|
1777
|
-
E.value.validate(async (
|
|
1778
|
-
if (!
|
|
1779
|
-
const { record:
|
|
1780
|
-
if (
|
|
1774
|
+
const n = s, e = at(ot()), l = N(!1), _ = ye().appContext.config.globalProperties.$serviceApi, w = de(() => n.items.length ? Ee(n.items, m) : {}), $ = de(() => n.items.length ? nt(n.items, n.dataStatus) : n.items), { t: m } = $e(), p = N(!1), E = N(null), k = () => {
|
|
1775
|
+
E.value.validate(async (a) => {
|
|
1776
|
+
if (!a) {
|
|
1777
|
+
const { record: f, url: i, method: y } = n;
|
|
1778
|
+
if (i) {
|
|
1781
1779
|
I();
|
|
1782
|
-
const
|
|
1783
|
-
if (
|
|
1784
|
-
const [
|
|
1785
|
-
|
|
1780
|
+
const C = e != null && e.dataProcessMethod ? e == null ? void 0 : e.dataProcessMethod(f) : f;
|
|
1781
|
+
if (i) {
|
|
1782
|
+
const [B, A] = await st(_[y](i, C));
|
|
1783
|
+
B || (Ye(), r("confirm", A));
|
|
1786
1784
|
}
|
|
1787
|
-
M(),
|
|
1785
|
+
M(), D();
|
|
1788
1786
|
} else
|
|
1789
|
-
|
|
1787
|
+
r("confirm");
|
|
1790
1788
|
}
|
|
1791
1789
|
});
|
|
1792
1790
|
}, I = () => {
|
|
1793
1791
|
l.value = !0;
|
|
1794
1792
|
}, M = () => {
|
|
1795
1793
|
l.value = !1;
|
|
1796
|
-
},
|
|
1797
|
-
E.value.validate(
|
|
1798
|
-
}, L = (
|
|
1799
|
-
E.value.validate(
|
|
1800
|
-
},
|
|
1801
|
-
|
|
1794
|
+
}, c = (a) => {
|
|
1795
|
+
E.value.validate(a);
|
|
1796
|
+
}, L = (a) => {
|
|
1797
|
+
E.value.validate(a);
|
|
1798
|
+
}, D = () => {
|
|
1799
|
+
p.value = !1, r("close");
|
|
1802
1800
|
}, S = () => {
|
|
1803
|
-
|
|
1804
|
-
},
|
|
1805
|
-
return o({ showLoading: I, hiddenLoading: M, openModal: S, validate:
|
|
1801
|
+
p.value = !0;
|
|
1802
|
+
}, r = t;
|
|
1803
|
+
return o({ showLoading: I, hiddenLoading: M, openModal: S, validate: c, validateForm: L }), qe(() => {
|
|
1806
1804
|
S();
|
|
1807
|
-
}), (
|
|
1808
|
-
const
|
|
1805
|
+
}), (a, f) => {
|
|
1806
|
+
const i = V("vxe-form"), y = V("ut-button"), C = V("vxe-modal");
|
|
1809
1807
|
return T(), F("div", null, [
|
|
1810
|
-
U(
|
|
1811
|
-
modelValue:
|
|
1812
|
-
"onUpdate:modelValue":
|
|
1813
|
-
title:
|
|
1814
|
-
width:
|
|
1815
|
-
height:
|
|
1808
|
+
U(C, be({
|
|
1809
|
+
modelValue: p.value,
|
|
1810
|
+
"onUpdate:modelValue": f[0] || (f[0] = (B) => p.value = B),
|
|
1811
|
+
title: a.title,
|
|
1812
|
+
width: a.width,
|
|
1813
|
+
height: a.height,
|
|
1816
1814
|
loading: l.value,
|
|
1817
|
-
"show-footer":
|
|
1815
|
+
"show-footer": a.dataStatus !== "detail",
|
|
1818
1816
|
"min-width": "240",
|
|
1819
1817
|
"min-height": "300"
|
|
1820
|
-
},
|
|
1818
|
+
}, a.modalAttrs, {
|
|
1821
1819
|
"destroy-on-close": "",
|
|
1822
1820
|
resize: "",
|
|
1823
|
-
onClose:
|
|
1821
|
+
onClose: D
|
|
1824
1822
|
}), {
|
|
1825
1823
|
default: W(() => [
|
|
1826
|
-
U(
|
|
1824
|
+
U(i, be({
|
|
1827
1825
|
ref_key: "xForm",
|
|
1828
1826
|
ref: E,
|
|
1829
|
-
data:
|
|
1827
|
+
data: a.record,
|
|
1830
1828
|
items: $.value,
|
|
1831
1829
|
rules: w.value,
|
|
1832
1830
|
"title-align": "right",
|
|
1833
|
-
"title-width":
|
|
1834
|
-
},
|
|
1831
|
+
"title-width": a.formAttrs.titleWidth || 90
|
|
1832
|
+
}, a.formAttrs), null, 16, ["data", "items", "rules", "title-width"])
|
|
1835
1833
|
]),
|
|
1836
1834
|
footer: W(() => [
|
|
1837
|
-
U(
|
|
1835
|
+
U(y, {
|
|
1838
1836
|
status: "warning",
|
|
1839
1837
|
content: "cancel",
|
|
1840
1838
|
icon: "ri-close-line",
|
|
1841
|
-
onTap:
|
|
1839
|
+
onTap: D
|
|
1842
1840
|
}),
|
|
1843
|
-
U(
|
|
1841
|
+
U(y, {
|
|
1844
1842
|
status: "u-cyan",
|
|
1845
1843
|
content: "confirm",
|
|
1846
1844
|
icon: "ri-save-3-line",
|
|
@@ -1852,7 +1850,7 @@ const On = {
|
|
|
1852
1850
|
]);
|
|
1853
1851
|
};
|
|
1854
1852
|
}
|
|
1855
|
-
}),
|
|
1853
|
+
}), zn = ue(On), Un = {
|
|
1856
1854
|
name: "UtModalGrid"
|
|
1857
1855
|
}, Vn = /* @__PURE__ */ K({
|
|
1858
1856
|
...Un,
|
|
@@ -1879,10 +1877,10 @@ const On = {
|
|
|
1879
1877
|
},
|
|
1880
1878
|
emits: ["close", "confirm", "actived", "buttonClick"],
|
|
1881
1879
|
setup(s, { expose: o, emit: t }) {
|
|
1882
|
-
const n = at(ot()), e = s, l = N(!1),
|
|
1883
|
-
const
|
|
1884
|
-
return Lt(
|
|
1885
|
-
}, k = () => e.items.length ? At(ce(e.items, !0)) : e.items, I = () => e.columns.length ?
|
|
1880
|
+
const n = at(ot()), e = s, l = N(!1), v = N(null), _ = ye(), w = _.appContext.config.globalProperties.$hasAuthority, $ = _.appContext.config.globalProperties.$serviceApi, m = _.appContext.config.globalProperties.$mode, { t: p } = $e(), E = () => {
|
|
1881
|
+
const u = e.columns.map((h) => (e.editable ? !h.type && !h.editRender && e.editable && h.editable && (h.editRender = { name: "VxeInput" }) : h.editRender = { enabled: !1 }, h));
|
|
1882
|
+
return Lt(u);
|
|
1883
|
+
}, k = () => e.items.length ? At(ce(e.items, !0)) : e.items, I = () => e.columns.length ? Ee(e.columns, p) : {}, M = ke({
|
|
1886
1884
|
loading: !1,
|
|
1887
1885
|
border: !0,
|
|
1888
1886
|
pagerConfig: {},
|
|
@@ -1897,113 +1895,117 @@ const On = {
|
|
|
1897
1895
|
// 查询是需要启用表单代理
|
|
1898
1896
|
autoLoad: e.autoLoad,
|
|
1899
1897
|
ajax: {
|
|
1900
|
-
queryAll: ({ form:
|
|
1901
|
-
query: ({ page:
|
|
1902
|
-
delete: ({ body: { removeRecords:
|
|
1903
|
-
save: ({ body:
|
|
1898
|
+
queryAll: ({ form: u }) => Ot(e, $, u),
|
|
1899
|
+
query: ({ page: u, form: h }) => zt(e, h, u, $, m),
|
|
1900
|
+
delete: ({ body: { removeRecords: u } }) => Ut($, u, e),
|
|
1901
|
+
save: ({ body: u }) => Promise.all(Vt($, u, e))
|
|
1904
1902
|
}
|
|
1905
1903
|
},
|
|
1906
1904
|
checkboxConfig: {
|
|
1907
|
-
checkMethod: ({ row:
|
|
1905
|
+
checkMethod: ({ row: u }) => qt(u, e),
|
|
1908
1906
|
checkRowKeys: e.checkRowKeys
|
|
1909
1907
|
},
|
|
1910
1908
|
columns: E(),
|
|
1911
1909
|
...e.gridOptions
|
|
1912
|
-
}),
|
|
1913
|
-
let
|
|
1914
|
-
const
|
|
1915
|
-
if (
|
|
1916
|
-
return
|
|
1917
|
-
if (
|
|
1918
|
-
return
|
|
1919
|
-
if (Qe(n.beforeConfirm) && !n.beforeConfirm(
|
|
1920
|
-
const { submitUrl:
|
|
1921
|
-
if (
|
|
1922
|
-
|
|
1923
|
-
let
|
|
1910
|
+
}), c = async () => {
|
|
1911
|
+
let u = null;
|
|
1912
|
+
const h = e.columns[0].type;
|
|
1913
|
+
if (h === "checkbox" ? u = v.value.getCheckboxRecords() : h === "radio" ? u = v.value.getRadioRecord() : u = v.value.getTableData().fullData, h === "checkbox" && !u.length && !e.addChild)
|
|
1914
|
+
return Ie(p("message.selectedRecord"));
|
|
1915
|
+
if (h === "radio" && !u)
|
|
1916
|
+
return Ie(p("message.selectedRecord"));
|
|
1917
|
+
if (Qe(n.beforeConfirm) && !n.beforeConfirm(u)) return;
|
|
1918
|
+
const { submitUrl: g } = e;
|
|
1919
|
+
if (g) {
|
|
1920
|
+
i();
|
|
1921
|
+
let b;
|
|
1924
1922
|
try {
|
|
1925
|
-
|
|
1923
|
+
u.forEach((O) => Object.assign(O, e.defaultParams)), b = await $.post(g, u);
|
|
1926
1924
|
} finally {
|
|
1927
|
-
|
|
1925
|
+
b && B("confirm", b), b && Ye(p("message.operateSuccess")), A(), y();
|
|
1928
1926
|
}
|
|
1929
1927
|
} else
|
|
1930
|
-
e.autoClose &&
|
|
1928
|
+
e.autoClose && A(), B("confirm", u);
|
|
1931
1929
|
}, L = () => {
|
|
1932
|
-
|
|
1933
|
-
},
|
|
1934
|
-
M.editRules = I(),
|
|
1935
|
-
}, S = () => It(
|
|
1936
|
-
const
|
|
1937
|
-
|
|
1938
|
-
},
|
|
1939
|
-
|
|
1940
|
-
},
|
|
1941
|
-
|
|
1942
|
-
},
|
|
1930
|
+
v.value.commitProxy("query");
|
|
1931
|
+
}, D = () => {
|
|
1932
|
+
M.editRules = I(), v.value.refreshColumn();
|
|
1933
|
+
}, S = () => It(v.value), r = ({ row: u }) => {
|
|
1934
|
+
const h = e.columns[0].type;
|
|
1935
|
+
h === "checkbox" ? v.value.setCheckboxRow(u, !0) : h === "radio" && v.value.setRadioRow(u);
|
|
1936
|
+
}, a = (u) => {
|
|
1937
|
+
B("actived", u);
|
|
1938
|
+
}, f = ({ code: u }) => {
|
|
1939
|
+
B("buttonClick", u);
|
|
1940
|
+
}, i = () => {
|
|
1943
1941
|
M.loading = !0;
|
|
1944
|
-
},
|
|
1942
|
+
}, y = () => {
|
|
1945
1943
|
M.loading = !1;
|
|
1946
|
-
},
|
|
1947
|
-
|
|
1948
|
-
|
|
1944
|
+
}, C = (u = !1) => {
|
|
1945
|
+
const h = e.columns[0].type, g = h === "radio" ? xgrid.value.getRadioRecord(u) : xgrid.value.getCheckboxRecords(u);
|
|
1946
|
+
return h === "checkbox" && !g.length ? (Ie(p("message.tip_selectedRecord")), []) : h === "radio" && !g ? (Ie(p("message.tip_selectedRecord")), null) : g;
|
|
1947
|
+
}, B = t, A = () => {
|
|
1948
|
+
Qe(n.beforeClose) && !n.beforeClose() || (l.value = !1, B("close"));
|
|
1949
|
+
}, d = () => {
|
|
1949
1950
|
e.items.length && (M.formConfig = {
|
|
1950
1951
|
titleWidth: 100,
|
|
1951
1952
|
titleAlign: "right",
|
|
1952
1953
|
items: k(),
|
|
1953
|
-
rules:
|
|
1954
|
+
rules: Ee(e.items, p),
|
|
1954
1955
|
validConfig: { showMessage: !1 }
|
|
1955
1956
|
});
|
|
1956
|
-
const
|
|
1957
|
-
Object.assign(M,
|
|
1957
|
+
const u = Wt(M, e, n, w);
|
|
1958
|
+
Object.assign(M, u), n.mergeFooter && (M.showFooter = !0, M.footerMethod = ({ columns: h, data: g }) => Yt({ columns: h, data: g }, n.mergeFooter));
|
|
1958
1959
|
};
|
|
1959
1960
|
return o({
|
|
1960
1961
|
refreshData: L,
|
|
1961
|
-
refreshColumn:
|
|
1962
|
+
refreshColumn: D,
|
|
1962
1963
|
getInstance: S,
|
|
1963
|
-
showLoading:
|
|
1964
|
-
hiddenLoading:
|
|
1965
|
-
|
|
1964
|
+
showLoading: i,
|
|
1965
|
+
hiddenLoading: y,
|
|
1966
|
+
getSelectRecords: C,
|
|
1967
|
+
close: A
|
|
1966
1968
|
}), qe(() => {
|
|
1967
|
-
l.value = !0,
|
|
1968
|
-
}), (
|
|
1969
|
-
const
|
|
1969
|
+
l.value = !0, d();
|
|
1970
|
+
}), (u, h) => {
|
|
1971
|
+
const g = V("vxe-grid"), b = V("ut-button"), O = V("vxe-modal");
|
|
1970
1972
|
return T(), F("div", null, [
|
|
1971
|
-
U(
|
|
1973
|
+
U(O, {
|
|
1972
1974
|
modelValue: l.value,
|
|
1973
|
-
"onUpdate:modelValue":
|
|
1974
|
-
title:
|
|
1975
|
-
width:
|
|
1976
|
-
height:
|
|
1975
|
+
"onUpdate:modelValue": h[0] || (h[0] = (Y) => l.value = Y),
|
|
1976
|
+
title: u.title,
|
|
1977
|
+
width: u.width,
|
|
1978
|
+
height: u.height,
|
|
1977
1979
|
loading: M.loading,
|
|
1978
|
-
"show-footer":
|
|
1980
|
+
"show-footer": u.showFooter,
|
|
1979
1981
|
resize: "",
|
|
1980
1982
|
"destroy-on-close": "",
|
|
1981
|
-
onClose:
|
|
1983
|
+
onClose: A
|
|
1982
1984
|
}, {
|
|
1983
1985
|
default: W(() => [
|
|
1984
|
-
De(
|
|
1985
|
-
U(
|
|
1986
|
+
De(u.$slots, "default"),
|
|
1987
|
+
U(g, be({
|
|
1986
1988
|
ref_key: "xGrid",
|
|
1987
|
-
ref:
|
|
1989
|
+
ref: v
|
|
1988
1990
|
}, M, { resizable: "" }, tt(oe(n).events || {}), {
|
|
1989
|
-
onEditActivated:
|
|
1990
|
-
onToolbarButtonClick:
|
|
1991
|
-
onToolbarToolClick:
|
|
1992
|
-
onCellClick:
|
|
1991
|
+
onEditActivated: a,
|
|
1992
|
+
onToolbarButtonClick: f,
|
|
1993
|
+
onToolbarToolClick: f,
|
|
1994
|
+
onCellClick: r
|
|
1993
1995
|
}), null, 16)
|
|
1994
1996
|
]),
|
|
1995
1997
|
footer: W(() => [
|
|
1996
|
-
De(
|
|
1997
|
-
U(
|
|
1998
|
+
De(u.$slots, "bottom"),
|
|
1999
|
+
U(b, {
|
|
1998
2000
|
icon: "ri-close-line",
|
|
1999
2001
|
status: "warning",
|
|
2000
2002
|
content: "cancel",
|
|
2001
|
-
onTap:
|
|
2003
|
+
onTap: A
|
|
2002
2004
|
}),
|
|
2003
|
-
U(
|
|
2005
|
+
U(b, {
|
|
2004
2006
|
icon: "ri-save-3-line",
|
|
2005
2007
|
content: "confirm",
|
|
2006
|
-
onTap:
|
|
2008
|
+
onTap: c
|
|
2007
2009
|
})
|
|
2008
2010
|
]),
|
|
2009
2011
|
_: 3
|
|
@@ -2030,77 +2032,77 @@ const On = {
|
|
|
2030
2032
|
},
|
|
2031
2033
|
emits: ["remove"],
|
|
2032
2034
|
setup(s, { emit: o }) {
|
|
2033
|
-
Et((
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2035
|
+
Et((a) => ({
|
|
2036
|
+
"2cbbf616": p.value,
|
|
2037
|
+
b4727ade: E.value,
|
|
2038
|
+
cc5b0206: k.value
|
|
2037
2039
|
}));
|
|
2038
|
-
const t = s, n = ye(), e = n.appContext.config.globalProperties.$url, l = n.appContext.config.globalProperties.$viewerApi,
|
|
2039
|
-
const
|
|
2040
|
+
const t = s, n = ye(), e = n.appContext.config.globalProperties.$url, l = n.appContext.config.globalProperties.$viewerApi, v = n.appContext.config.globalProperties.$serviceApi, _ = ["image/gif", "image/jpeg", "image/png"], w = de(() => {
|
|
2041
|
+
const f = he.get("authorized-token");
|
|
2040
2042
|
return {
|
|
2041
|
-
Authorization: "Bearer " + JSON.parse(
|
|
2043
|
+
Authorization: "Bearer " + JSON.parse(f).accessToken
|
|
2042
2044
|
};
|
|
2043
|
-
}), $ = N([]),
|
|
2044
|
-
new Pt(
|
|
2045
|
+
}), $ = N([]), m = N(!1), p = N("flex"), E = N(t.size + "px"), k = N(t.size - 10 + "px"), I = (a) => t.beforeUpload ? t.beforeUpload(a) : (m.value = !0, !0), M = (a) => _.includes(a.file.type) && a.file.size > 1024 * 1024 * t.compassorSize ? new Promise((f, i) => {
|
|
2046
|
+
new Pt(a.file, {
|
|
2045
2047
|
quality: t.quality,
|
|
2046
|
-
mimeType:
|
|
2047
|
-
success(
|
|
2048
|
-
const
|
|
2049
|
-
|
|
2048
|
+
mimeType: a.file.type,
|
|
2049
|
+
success(y) {
|
|
2050
|
+
const C = new File([y], y.name, { type: y.type });
|
|
2051
|
+
c(f, i, C);
|
|
2050
2052
|
}
|
|
2051
2053
|
});
|
|
2052
2054
|
}) : new Promise(
|
|
2053
|
-
(
|
|
2054
|
-
),
|
|
2055
|
-
const
|
|
2056
|
-
return
|
|
2057
|
-
|
|
2055
|
+
(f, i) => c(f, i, a.file)
|
|
2056
|
+
), c = (a, f, i) => {
|
|
2057
|
+
const y = new FormData();
|
|
2058
|
+
return y.append("file", i), v.post("/ufil/file/uploadMultipart", y, { headers: w }).then(async (C) => {
|
|
2059
|
+
m.value = !1, i.path = C, a(i);
|
|
2058
2060
|
}).catch(() => {
|
|
2059
|
-
|
|
2061
|
+
m.value = !1, f(null);
|
|
2060
2062
|
});
|
|
2061
|
-
}, L = (
|
|
2062
|
-
if (
|
|
2063
|
-
return t.onSuccess(
|
|
2063
|
+
}, L = (a) => {
|
|
2064
|
+
if (m.value = !1, t.onSuccess)
|
|
2065
|
+
return t.onSuccess(a);
|
|
2064
2066
|
{
|
|
2065
|
-
const
|
|
2066
|
-
Object.assign(t.record, { [
|
|
2067
|
+
const f = t.field;
|
|
2068
|
+
Object.assign(t.record, { [f]: a.path }), p.value = t.limit > $.value.length ? "flex" : "none";
|
|
2067
2069
|
}
|
|
2068
|
-
},
|
|
2070
|
+
}, D = (a, f) => {
|
|
2069
2071
|
if (t.onRemove)
|
|
2070
|
-
return t.onRemove(
|
|
2071
|
-
|
|
2072
|
-
}, S = (
|
|
2073
|
-
if (
|
|
2074
|
-
const
|
|
2072
|
+
return t.onRemove(a, $);
|
|
2073
|
+
m.value = !1, p.value = "flex", r("remove", a, $);
|
|
2074
|
+
}, S = (a) => {
|
|
2075
|
+
if (_.includes(a.raw.type)) {
|
|
2076
|
+
const f = `${e}/ufil${a.response.path}`;
|
|
2075
2077
|
l({
|
|
2076
2078
|
options: { toolbar: !0, url: "data-source" },
|
|
2077
|
-
images: [{ src:
|
|
2079
|
+
images: [{ src: f, "data-source": f }]
|
|
2078
2080
|
});
|
|
2079
2081
|
}
|
|
2080
|
-
},
|
|
2081
|
-
return (
|
|
2082
|
-
const
|
|
2082
|
+
}, r = o;
|
|
2083
|
+
return (a, f) => {
|
|
2084
|
+
const i = V("el-upload"), y = to("spinning");
|
|
2083
2085
|
return ge((T(), F("div", Wn, [
|
|
2084
|
-
U(
|
|
2086
|
+
U(i, {
|
|
2085
2087
|
"file-list": $.value,
|
|
2086
|
-
"onUpdate:fileList":
|
|
2088
|
+
"onUpdate:fileList": f[0] || (f[0] = (C) => $.value = C),
|
|
2087
2089
|
action: oe(e) + "/ufil/file/uploadMultipart",
|
|
2088
|
-
disabled:
|
|
2090
|
+
disabled: a.dataStatus === "detail",
|
|
2089
2091
|
"list-type": "picture-card",
|
|
2090
2092
|
headers: w.value,
|
|
2091
2093
|
"before-upload": I,
|
|
2092
2094
|
"on-success": L,
|
|
2093
2095
|
"on-preview": S,
|
|
2094
|
-
"on-remove":
|
|
2096
|
+
"on-remove": D,
|
|
2095
2097
|
"http-request": M
|
|
2096
2098
|
}, {
|
|
2097
2099
|
default: W(() => [
|
|
2098
|
-
$.value.length <
|
|
2100
|
+
$.value.length < a.limit && a.dataStatus !== "detail" ? (T(), F("i", Yn)) : ee("", !0)
|
|
2099
2101
|
]),
|
|
2100
2102
|
_: 1
|
|
2101
2103
|
}, 8, ["file-list", "action", "disabled", "headers"])
|
|
2102
2104
|
])), [
|
|
2103
|
-
[
|
|
2105
|
+
[y, m.value]
|
|
2104
2106
|
]);
|
|
2105
2107
|
};
|
|
2106
2108
|
}
|
|
@@ -2121,10 +2123,10 @@ const On = {
|
|
|
2121
2123
|
}
|
|
2122
2124
|
const n = (e, l) => l.time_mode && e[l.field] ? Z(e[l.field], "yyyy-MM-dd") : Number.isNaN(+e[l.field]) ? e[l.field] : Number(e[l.field]).toFixed(o.options.decimal);
|
|
2123
2125
|
return (e, l) => {
|
|
2124
|
-
var
|
|
2125
|
-
const
|
|
2126
|
+
var _, w;
|
|
2127
|
+
const v = V("el-tooltip");
|
|
2126
2128
|
return T(), F("div", null, [
|
|
2127
|
-
|
|
2129
|
+
x("div", {
|
|
2128
2130
|
ref: "cells",
|
|
2129
2131
|
class: "cell detail_click",
|
|
2130
2132
|
style: ne({
|
|
@@ -2134,7 +2136,7 @@ const On = {
|
|
|
2134
2136
|
textAlign: e.column.textAlign || o.options.textAlign || "center"
|
|
2135
2137
|
})
|
|
2136
2138
|
}, [
|
|
2137
|
-
|
|
2139
|
+
x("span", {
|
|
2138
2140
|
style: ne({ color: e.row.color }),
|
|
2139
2141
|
class: "cell-value"
|
|
2140
2142
|
}, [
|
|
@@ -2143,24 +2145,24 @@ const On = {
|
|
|
2143
2145
|
class: "trigger",
|
|
2144
2146
|
onClick: l[0] || (l[0] = We(($) => t(), ["stop", "prevent"]))
|
|
2145
2147
|
}, [
|
|
2146
|
-
ge(
|
|
2147
|
-
|
|
2148
|
+
ge(x("span", Xn, [
|
|
2149
|
+
x("span", {
|
|
2148
2150
|
style: ne([{ display: "inline-block" }, { transform: e.row.open ? "" : "rotateZ(-90deg)" }]),
|
|
2149
2151
|
class: "open-icon"
|
|
2150
2152
|
}, null, 4)
|
|
2151
2153
|
], 512), [
|
|
2152
|
-
[we, (
|
|
2154
|
+
[we, (_ = e.row[e.options.children]) == null ? void 0 : _.length]
|
|
2153
2155
|
])
|
|
2154
2156
|
])) : ee("", !0),
|
|
2155
2157
|
e.row.g_level && e.column.shrink && e.row[e.column.field] && !e.row[e.options.children] && !e.column.showFooter ? (T(), F("span", Kn)) : ee("", !0),
|
|
2156
|
-
e.column.showTooltip && ((w = e.row[e.column.field]) == null ? void 0 : w.length) > 12 ? (T(), ie(
|
|
2158
|
+
e.column.showTooltip && ((w = e.row[e.column.field]) == null ? void 0 : w.length) > 12 ? (T(), ie(v, {
|
|
2157
2159
|
key: 2,
|
|
2158
2160
|
effect: "dark",
|
|
2159
2161
|
content: e.row[e.column.field],
|
|
2160
2162
|
placement: "top-start"
|
|
2161
2163
|
}, {
|
|
2162
2164
|
default: W(() => [
|
|
2163
|
-
|
|
2165
|
+
x("span", Jn, G(n(e.row, e.column)), 1)
|
|
2164
2166
|
]),
|
|
2165
2167
|
_: 1
|
|
2166
2168
|
}, 8, ["content"])) : (T(), F("span", Qn, G(n(e.row, e.column)), 1))
|
|
@@ -2185,62 +2187,62 @@ const On = {
|
|
|
2185
2187
|
setup(s) {
|
|
2186
2188
|
const o = s, t = de(() => {
|
|
2187
2189
|
if (!o.options.showFooter) return {};
|
|
2188
|
-
const
|
|
2190
|
+
const _ = {
|
|
2189
2191
|
[o.columns[o.options.labelIdx].field]: o.options.footerLabel
|
|
2190
2192
|
};
|
|
2191
2193
|
return o.columns.filter((w) => w.showFooter).forEach((w) => {
|
|
2192
|
-
|
|
2193
|
-
}), console.log({ colum:
|
|
2194
|
-
}), n = (
|
|
2194
|
+
_[w.field] = n(w.field);
|
|
2195
|
+
}), console.log({ colum: _ }), _;
|
|
2196
|
+
}), n = (_) => o.tasks.reduce((w, $) => w + $[_], 0), e = (_, w) => {
|
|
2195
2197
|
w.is_hover = !0;
|
|
2196
|
-
}, l = (
|
|
2198
|
+
}, l = (_, w) => {
|
|
2197
2199
|
w.is_hover = !1;
|
|
2198
|
-
},
|
|
2199
|
-
le.emit("onGanteItemDblclick",
|
|
2200
|
+
}, v = (_) => {
|
|
2201
|
+
le.emit("onGanteItemDblclick", _);
|
|
2200
2202
|
};
|
|
2201
|
-
return (
|
|
2202
|
-
var
|
|
2203
|
+
return (_, w) => {
|
|
2204
|
+
var m;
|
|
2203
2205
|
const $ = V("gante-table-cell", !0);
|
|
2204
2206
|
return T(), F("div", Zn, [
|
|
2205
|
-
(T(!0), F(ae, null, se(
|
|
2206
|
-
key:
|
|
2207
|
+
(T(!0), F(ae, null, se(_.tasks, (p) => (T(), F("div", {
|
|
2208
|
+
key: p.id,
|
|
2207
2209
|
class: "ut-gante-row"
|
|
2208
2210
|
}, [
|
|
2209
|
-
|
|
2210
|
-
class: Ce(["ut-gante-row--contain", { "gante-hover":
|
|
2211
|
-
onMouseenter: (E) => e(E,
|
|
2212
|
-
onMouseleave: (E) => l(E,
|
|
2213
|
-
onDblclick: We((E) =>
|
|
2211
|
+
x("div", {
|
|
2212
|
+
class: Ce(["ut-gante-row--contain", { "gante-hover": p.is_hover }]),
|
|
2213
|
+
onMouseenter: (E) => e(E, p),
|
|
2214
|
+
onMouseleave: (E) => l(E, p),
|
|
2215
|
+
onDblclick: We((E) => v(p), ["prevent"])
|
|
2214
2216
|
}, [
|
|
2215
|
-
(T(!0), F(ae, null, se(
|
|
2217
|
+
(T(!0), F(ae, null, se(_.columns, (E) => (T(), F("div", {
|
|
2216
2218
|
key: E.field,
|
|
2217
2219
|
class: "ut-gante-column"
|
|
2218
2220
|
}, [
|
|
2219
2221
|
U(_t, {
|
|
2220
|
-
row:
|
|
2222
|
+
row: p,
|
|
2221
2223
|
column: E,
|
|
2222
|
-
options:
|
|
2224
|
+
options: _.options
|
|
2223
2225
|
}, null, 8, ["row", "column", "options"])
|
|
2224
2226
|
]))), 128))
|
|
2225
2227
|
], 42, es),
|
|
2226
|
-
|
|
2228
|
+
p[_.options.children] && p.open ? (T(), ie($, {
|
|
2227
2229
|
key: 0,
|
|
2228
|
-
tasks:
|
|
2229
|
-
columns:
|
|
2230
|
-
options:
|
|
2230
|
+
tasks: p[_.options.children],
|
|
2231
|
+
columns: _.columns,
|
|
2232
|
+
options: _.options,
|
|
2231
2233
|
children: "Y"
|
|
2232
2234
|
}, null, 8, ["tasks", "columns", "options"])) : ee("", !0)
|
|
2233
2235
|
]))), 128)),
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
(T(!0), F(ae, null, se(
|
|
2237
|
-
key:
|
|
2236
|
+
_.children !== "Y" && _.options.showFooter && ((m = _.tasks) != null && m.length) ? (T(), F("div", ts, [
|
|
2237
|
+
x("div", os, [
|
|
2238
|
+
(T(!0), F(ae, null, se(_.columns, (p) => (T(), F("div", {
|
|
2239
|
+
key: p.field,
|
|
2238
2240
|
class: "ut-gante-column"
|
|
2239
2241
|
}, [
|
|
2240
2242
|
U(_t, {
|
|
2241
2243
|
row: t.value,
|
|
2242
|
-
column:
|
|
2243
|
-
options:
|
|
2244
|
+
column: p,
|
|
2245
|
+
options: _.options
|
|
2244
2246
|
}, null, 8, ["row", "column", "options"])
|
|
2245
2247
|
]))), 128))
|
|
2246
2248
|
])
|
|
@@ -2263,122 +2265,122 @@ const On = {
|
|
|
2263
2265
|
},
|
|
2264
2266
|
emits: ["onDragEnd"],
|
|
2265
2267
|
setup(s, { emit: o }) {
|
|
2266
|
-
const t = s, n = N(0), e = N(!1), l = N(0),
|
|
2268
|
+
const t = s, n = N(0), e = N(!1), l = N(0), v = N(null), _ = de(() => t.columns.filter((r) => r.showColumn !== "N"));
|
|
2267
2269
|
let w = 0, $ = 0;
|
|
2268
|
-
const
|
|
2269
|
-
let
|
|
2270
|
-
const
|
|
2271
|
-
(
|
|
2272
|
-
|
|
2270
|
+
const m = { current_index: -1, mouseDown: !1 }, p = (r) => {
|
|
2271
|
+
let a = -200;
|
|
2272
|
+
const f = document.getElementsByClassName("ganteview")[0].scrollTop, i = document.getElementsByClassName("ganteview")[0];
|
|
2273
|
+
(r.wheelDelta && r.wheelDelta < 0 || r.detail > 0) && (a = 200), E(f, f + a, 4, (y) => {
|
|
2274
|
+
i.scrollTop = y;
|
|
2273
2275
|
});
|
|
2274
|
-
}, E = (
|
|
2275
|
-
if (
|
|
2276
|
+
}, E = (r, a, f, i) => {
|
|
2277
|
+
if (r == a || typeof r != "number")
|
|
2276
2278
|
return;
|
|
2277
|
-
|
|
2278
|
-
const
|
|
2279
|
-
if (
|
|
2280
|
-
|
|
2279
|
+
a = a || 0, f = f || 2;
|
|
2280
|
+
const y = function() {
|
|
2281
|
+
if (r = r + (a - r) / f, Math.abs(r - a) <= 1) {
|
|
2282
|
+
i(a, !0);
|
|
2281
2283
|
return;
|
|
2282
2284
|
}
|
|
2283
|
-
r
|
|
2285
|
+
i(r, !1), window.requestAnimationFrame ? requestAnimationFrame(y) : setTimeout(y, 17);
|
|
2284
2286
|
};
|
|
2285
|
-
|
|
2287
|
+
y();
|
|
2286
2288
|
};
|
|
2287
|
-
function k(
|
|
2288
|
-
const
|
|
2289
|
-
if (
|
|
2290
|
-
const
|
|
2291
|
-
let
|
|
2292
|
-
const
|
|
2293
|
-
|
|
2294
|
-
let
|
|
2295
|
-
const
|
|
2296
|
-
|
|
2289
|
+
function k(r) {
|
|
2290
|
+
const a = document.getElementsByTagName("body")[0];
|
|
2291
|
+
if (m.mouseDown) {
|
|
2292
|
+
const f = Ve(v.value).x;
|
|
2293
|
+
let i = r.clientX;
|
|
2294
|
+
const y = document.getElementsByClassName("gante-table-box")[0];
|
|
2295
|
+
y.scrollLeft && (i = i + y.scrollLeft);
|
|
2296
|
+
let C = i - f + 3;
|
|
2297
|
+
const B = t.columns[m.current_index].width || t.columns[m.current_index].minWidth;
|
|
2298
|
+
C - 30 <= w + 3 - B && (C = w + 3 - B + 30), n.value = C, a.style.cursor = "col-resize";
|
|
2297
2299
|
}
|
|
2298
2300
|
}
|
|
2299
|
-
function I(
|
|
2300
|
-
if (
|
|
2301
|
+
function I(r, a) {
|
|
2302
|
+
if (r.target.tagName === "SPAN" || r.target.tagName === "I")
|
|
2301
2303
|
return;
|
|
2302
|
-
const
|
|
2303
|
-
let
|
|
2304
|
-
const
|
|
2305
|
-
|
|
2304
|
+
const f = Ve(v.value).x;
|
|
2305
|
+
let i = r.target, y = r.clientX;
|
|
2306
|
+
const C = document.getElementsByClassName("gante-table-box")[0];
|
|
2307
|
+
i.classList.contains("cell") && (i = i.parentNode), C.scrollLeft && (y = y + C.scrollLeft), w = y - f, console.log("client_x", y), y > Ve(i).x + i.offsetWidth - 10 && (console.log("index", a), $ = i.offsetWidth, e.value = !0, m.current_index = a, n.value = w + 3, m.mouseDown = !0, document.addEventListener("mousemove", k, { passive: !1 }), document.addEventListener("mouseup", M, { passive: !1 }));
|
|
2306
2308
|
}
|
|
2307
2309
|
function M() {
|
|
2308
|
-
if (document.getElementsByTagName("body")[0].style.cursor = "",
|
|
2309
|
-
t.columns[
|
|
2310
|
-
let
|
|
2311
|
-
const
|
|
2310
|
+
if (document.getElementsByTagName("body")[0].style.cursor = "", m.mouseDown && w) {
|
|
2311
|
+
t.columns[m.current_index].width = $ + (n.value - w), console.log("displayColums", _);
|
|
2312
|
+
let r = 0;
|
|
2313
|
+
const f = document.getElementsByClassName(
|
|
2312
2314
|
"gante-table-box"
|
|
2313
2315
|
)[0].offsetWidth;
|
|
2314
|
-
if (
|
|
2315
|
-
|
|
2316
|
-
}, 0), console.log("[ str ] >",
|
|
2317
|
-
const
|
|
2318
|
-
S("onDragEnd",
|
|
2316
|
+
if (_.value.forEach((i) => {
|
|
2317
|
+
r += i.width || i.minWidth ? Number(i.width || i.minWidth) + 1 : 81;
|
|
2318
|
+
}, 0), console.log("[ str ] >", r), r < f) {
|
|
2319
|
+
const i = t.options.tableWidth || 450, y = r + 2 <= i ? i : r + 2;
|
|
2320
|
+
S("onDragEnd", y);
|
|
2319
2321
|
}
|
|
2320
|
-
|
|
2322
|
+
m.mouseDown = !1, e.value = !1, w = 0, $ = 0, m.current_index = -1, l.value++, document.removeEventListener("mousemove", k, !1), document.removeEventListener("mouseup", M, !1);
|
|
2321
2323
|
}
|
|
2322
2324
|
}
|
|
2323
|
-
function
|
|
2324
|
-
if (
|
|
2325
|
+
function c(r) {
|
|
2326
|
+
if (r.target.tagName === "SPAN" || r.target.tagName === "I")
|
|
2325
2327
|
return;
|
|
2326
|
-
let
|
|
2327
|
-
const
|
|
2328
|
-
let
|
|
2329
|
-
const
|
|
2330
|
-
|
|
2328
|
+
let a = r.target;
|
|
2329
|
+
const f = document.getElementsByTagName("body")[0];
|
|
2330
|
+
let i = r.clientX;
|
|
2331
|
+
const y = document.getElementsByClassName("gante-table-box")[0];
|
|
2332
|
+
a.classList.contains("cell") && (a = r.target.parentNode), y.scrollLeft && (i = i + y.scrollLeft), i > Ve(a).x + a.offsetWidth - 10 ? f.style.cursor = "col-resize" : f.style.cursor = "";
|
|
2331
2333
|
}
|
|
2332
2334
|
function L() {
|
|
2333
2335
|
document.getElementsByTagName("body")[0].style.cursor = "";
|
|
2334
2336
|
}
|
|
2335
|
-
const
|
|
2336
|
-
width:
|
|
2337
|
-
textAlign:
|
|
2337
|
+
const D = (r) => ({
|
|
2338
|
+
width: r.width || r.minWidth ? (r.width || r.minWidth) + "px" : "80px",
|
|
2339
|
+
textAlign: r.textAlign || t.options.textAlign || "center"
|
|
2338
2340
|
});
|
|
2339
2341
|
le.off("onDragEnd"), le.on("onDragEnd", () => {
|
|
2340
2342
|
l.value++;
|
|
2341
2343
|
});
|
|
2342
2344
|
const S = o;
|
|
2343
|
-
return (
|
|
2345
|
+
return (r, a) => (T(), F("div", {
|
|
2344
2346
|
ref_key: "gante_table",
|
|
2345
|
-
ref:
|
|
2347
|
+
ref: v,
|
|
2346
2348
|
class: "gante-table",
|
|
2347
|
-
onMousewheelPassive:
|
|
2348
|
-
"on:DOMMouseScrollPassive":
|
|
2349
|
+
onMousewheelPassive: p,
|
|
2350
|
+
"on:DOMMouseScrollPassive": p
|
|
2349
2351
|
}, [
|
|
2350
|
-
|
|
2351
|
-
(T(!0), F(ae, null, se(
|
|
2352
|
-
key:
|
|
2352
|
+
x("div", ls, [
|
|
2353
|
+
(T(!0), F(ae, null, se(_.value, (f, i) => (T(), F("div", {
|
|
2354
|
+
key: f.field,
|
|
2353
2355
|
class: "gante-th",
|
|
2354
|
-
onMousedown: (
|
|
2355
|
-
onMousemove:
|
|
2356
|
+
onMousedown: (y) => I(y, i),
|
|
2357
|
+
onMousemove: c,
|
|
2356
2358
|
onMouseout: L
|
|
2357
2359
|
}, [
|
|
2358
|
-
|
|
2360
|
+
x("div", {
|
|
2359
2361
|
class: "cell",
|
|
2360
|
-
style: ne(
|
|
2362
|
+
style: ne(D(f))
|
|
2361
2363
|
}, [
|
|
2362
|
-
et(G(
|
|
2363
|
-
|
|
2364
|
+
et(G(f.label) + " ", 1),
|
|
2365
|
+
f.sort_type ? (T(), F("span", {
|
|
2364
2366
|
key: 0,
|
|
2365
2367
|
class: Ce([{
|
|
2366
|
-
ascend:
|
|
2367
|
-
descend:
|
|
2368
|
+
ascend: f.sort_type == "asc",
|
|
2369
|
+
descend: f.sort_type == "desc"
|
|
2368
2370
|
}, "caret-wrapper"])
|
|
2369
2371
|
}, null, 2)) : ee("", !0)
|
|
2370
2372
|
], 4)
|
|
2371
2373
|
], 40, as))), 128))
|
|
2372
2374
|
]),
|
|
2373
|
-
|
|
2375
|
+
x("div", is, [
|
|
2374
2376
|
(T(), ie(ss, {
|
|
2375
2377
|
key: l.value,
|
|
2376
|
-
tasks:
|
|
2377
|
-
columns:
|
|
2378
|
-
options:
|
|
2378
|
+
tasks: r.data,
|
|
2379
|
+
columns: _.value,
|
|
2380
|
+
options: r.options
|
|
2379
2381
|
}, null, 8, ["tasks", "columns", "options"]))
|
|
2380
2382
|
]),
|
|
2381
|
-
ge(
|
|
2383
|
+
ge(x("div", {
|
|
2382
2384
|
id: "gante-table-column-resize-proxy",
|
|
2383
2385
|
style: ne({ left: n.value + "px" })
|
|
2384
2386
|
}, null, 4), [
|
|
@@ -2426,77 +2428,77 @@ const On = {
|
|
|
2426
2428
|
// 结束时间的属性名
|
|
2427
2429
|
moveType: ""
|
|
2428
2430
|
// 拖动的方式 left: 拖动左边时间 right: 拖动右边时间 drag: 拖动整体
|
|
2429
|
-
}), l = 0,
|
|
2430
|
-
function
|
|
2431
|
-
|
|
2431
|
+
}), l = 0, v = !1;
|
|
2432
|
+
function _(c) {
|
|
2433
|
+
v = !0, l = requestAnimationFrame(() => {
|
|
2432
2434
|
w();
|
|
2433
|
-
let
|
|
2434
|
-
if (o.task &&
|
|
2435
|
-
let
|
|
2436
|
-
|
|
2437
|
-
let
|
|
2435
|
+
let D = c.clientX + 15, S = c.clientY + 15;
|
|
2436
|
+
if (o.task && v) {
|
|
2437
|
+
let r = document.createElement("div"), a = !0;
|
|
2438
|
+
r.setAttribute("class", "gante-toast"), document.getElementsByClassName("gante-toast")[0] && (r = document.getElementsByClassName("gante-toast")[0], r.style.display = "block", a = !1);
|
|
2439
|
+
let f = "";
|
|
2438
2440
|
o.columns.filter(
|
|
2439
|
-
(
|
|
2440
|
-
).forEach((
|
|
2441
|
-
|
|
2442
|
-
}), (
|
|
2441
|
+
(i) => i.showToast || i.time_mode === 1 || i.time_mode === 2
|
|
2442
|
+
).forEach((i) => {
|
|
2443
|
+
f += `<p>${i.label}: ${i.label ? i.time_mode ? M(t[i.field]) : t[i.field] || "" : ""}</p>`;
|
|
2444
|
+
}), (r.innerHTML != f || f == "") && (r.innerHTML = f), r.clientHeight + S > window.innerHeight && (c.clientY >= window.innerHeight - r.clientHeight ? S = c.clientY - 10 - r.clientHeight : S = window.innerHeight - r.clientHeight), r.clientWidth + D > window.innerWidth && (D = window.innerWidth - r.clientWidth), r.style.left = D + "px", r.style.top = S + "px", a && document.getElementsByTagName("body")[0].appendChild(r);
|
|
2443
2445
|
}
|
|
2444
2446
|
});
|
|
2445
2447
|
}
|
|
2446
2448
|
function w() {
|
|
2447
|
-
|
|
2449
|
+
v && (n.value = !!o.options.resizable || !!t.resizable);
|
|
2448
2450
|
}
|
|
2449
2451
|
function $() {
|
|
2450
|
-
var
|
|
2451
|
-
e.mouseDown || (
|
|
2452
|
+
var c;
|
|
2453
|
+
e.mouseDown || (v = !1, n.value = !1, cancelAnimationFrame(l), ((c = document.getElementsByClassName("gante-toast")) == null ? void 0 : c.length) > 0 && (document.getElementsByClassName("gante-toast")[0].style.display = "none"));
|
|
2452
2454
|
}
|
|
2453
|
-
function
|
|
2455
|
+
function m(c, L) {
|
|
2454
2456
|
if (t) {
|
|
2455
2457
|
if (!o.options.parentDragEnabled && t[o.options.children])
|
|
2456
2458
|
return;
|
|
2457
|
-
e.mouseDown = !0, e.startX =
|
|
2458
|
-
t[
|
|
2459
|
-
}), e.end_time || (e.endAttr = "end_time", e.end_time = t.end_time), o.options.timeScale === 1 || o.options.timeScale === 2 ? (e.scale = 1e3 * 60 * 60 / o.time_1px, e.mode = 1) : (e.scale = 1e3 * 60 * 60 * 24 / o.time_1px, e.mode = 2), document.body.classList.add("unselecttable"), L === "drag" ? document.body.style.cursor = "grabbing" : document.body.style.cursor = "e-resize", document.addEventListener("mousemove",
|
|
2459
|
+
e.mouseDown = !0, e.startX = c.clientX, e.moveType = L, e.start_width = t.width, e.start_left = t.left, o.columns.forEach((D) => {
|
|
2460
|
+
t[D.field] && (D.time_mode === 1 ? (e.startAttr = D.field, e.start_time = t[D.field]) : D.time_mode === 2 && (e.endAttr = D.field, e.end_time = t[D.field]));
|
|
2461
|
+
}), e.end_time || (e.endAttr = "end_time", e.end_time = t.end_time), o.options.timeScale === 1 || o.options.timeScale === 2 ? (e.scale = 1e3 * 60 * 60 / o.time_1px, e.mode = 1) : (e.scale = 1e3 * 60 * 60 * 24 / o.time_1px, e.mode = 2), document.body.classList.add("unselecttable"), L === "drag" ? document.body.style.cursor = "grabbing" : document.body.style.cursor = "e-resize", document.addEventListener("mousemove", p, { passive: !1 }), document.addEventListener("mouseup", E, { passive: !1 });
|
|
2460
2462
|
}
|
|
2461
2463
|
}
|
|
2462
|
-
function
|
|
2464
|
+
function p(c) {
|
|
2463
2465
|
if (e.mouseDown) {
|
|
2464
2466
|
$();
|
|
2465
|
-
let L = 0,
|
|
2466
|
-
e.moveType == "left" ? (document.body.style.cursor = "e-resize",
|
|
2467
|
-
let S = Math.abs(
|
|
2468
|
-
|
|
2469
|
-
let
|
|
2470
|
-
if (e.moveType === "drag" && (
|
|
2471
|
-
const
|
|
2472
|
-
|
|
2467
|
+
let L = 0, D = 0;
|
|
2468
|
+
e.moveType == "left" ? (document.body.style.cursor = "e-resize", c.clientX > e.startX ? (L = -1, D = 1) : c.clientX < e.startX && (L = 1, D = -1)) : e.moveType == "right" ? (document.body.style.cursor = "e-resize", c.clientX > e.startX ? L = 1 : c.clientX < e.startX && (L = -1)) : e.moveType == "drag" && (document.body.style.cursor = "grabbing", c.clientX > e.startX ? (D = 1, L = 1) : c.clientX < e.startX && (D = -1, L = -1));
|
|
2469
|
+
let S = Math.abs(c.clientX - e.startX);
|
|
2470
|
+
D === -1 && S > e.start_left && (S = e.start_left);
|
|
2471
|
+
let r = e.start_width + S * L, a = Math.round(e.start_left + S * D);
|
|
2472
|
+
if (e.moveType === "drag" && (r = Math.round(e.start_width)), D === 1) {
|
|
2473
|
+
const d = new Date(o.end_time).getTime() - new Date(o.start_time).getTime(), u = Math.round(d) * o.options.cellWidth / (24 * 60 * 60 * 1e3);
|
|
2474
|
+
a + r > u && (a = Math.round(u) - r, S = a - e.start_left);
|
|
2473
2475
|
}
|
|
2474
|
-
const
|
|
2475
|
-
let
|
|
2476
|
-
e.mode === 2 && (
|
|
2477
|
-
const
|
|
2478
|
-
e.moveType === "left" ?
|
|
2479
|
-
|
|
2476
|
+
const f = L * Math.ceil(S / e.scale);
|
|
2477
|
+
let i = 60 * 60 * 1e3, y = e.start_time, C = e.end_time;
|
|
2478
|
+
e.mode === 2 && (i = 60 * 60 * 1e3 * 24);
|
|
2479
|
+
const B = y, A = C;
|
|
2480
|
+
e.moveType === "left" ? y = Z(
|
|
2481
|
+
B - f * i,
|
|
2480
2482
|
o.options.dateFormat
|
|
2481
|
-
) : e.moveType === "right" ?
|
|
2482
|
-
|
|
2483
|
+
) : e.moveType === "right" ? C = Z(
|
|
2484
|
+
A + f * i,
|
|
2483
2485
|
o.options.dateFormat
|
|
2484
|
-
) : (
|
|
2485
|
-
|
|
2486
|
+
) : (y = Z(
|
|
2487
|
+
B + f * i,
|
|
2486
2488
|
o.options.dateFormat
|
|
2487
|
-
),
|
|
2488
|
-
|
|
2489
|
+
), C = Z(
|
|
2490
|
+
A + f * i,
|
|
2489
2491
|
o.options.dateFormat
|
|
2490
|
-
)),
|
|
2491
|
-
|
|
2492
|
+
)), r <= 10 && e.moveType !== "drag" && (r = 10, a = e.start_left + (e.start_width - 10) * D, e.moveType === "left" ? y = Z(
|
|
2493
|
+
A - i * Math.ceil(10 / e.scale),
|
|
2492
2494
|
o.options.dateFormat
|
|
2493
|
-
) : e.moveType === "right" && (
|
|
2494
|
-
|
|
2495
|
+
) : e.moveType === "right" && (C = Z(
|
|
2496
|
+
B + i * Math.ceil(10 / e.scale),
|
|
2495
2497
|
o.options.dateFormat
|
|
2496
|
-
))), t.width =
|
|
2498
|
+
))), t.width = r, t.left = Math.round(a), t[e.startAttr] = y, t[e.endAttr] = C, t.start_time = new Date(C).getTime(), t.end_time = new Date(A).getTime(), k();
|
|
2497
2499
|
}
|
|
2498
2500
|
}
|
|
2499
|
-
function E(
|
|
2501
|
+
function E(c) {
|
|
2500
2502
|
if (console.log("up====="), (t.start_time < o.start_time || t.end_time > o.end_time) && (t.start_time < o.start_time && le.emit("triggerInit", {
|
|
2501
2503
|
startTime: t.start_time,
|
|
2502
2504
|
endTime: o.end_time
|
|
@@ -2506,17 +2508,17 @@ const On = {
|
|
|
2506
2508
|
})), !o.options.crossColumnEnabled) {
|
|
2507
2509
|
t.left = Math.round(t.left / o.options.cellWidth) * o.options.cellWidth;
|
|
2508
2510
|
const L = Math.abs(t.left - e.start_left), S = (t.left - e.start_left > 0 ? 1 : -1) * Math.ceil(L / e.scale);
|
|
2509
|
-
let
|
|
2510
|
-
const
|
|
2511
|
-
|
|
2512
|
-
|
|
2511
|
+
let r = e.start_time, a = e.end_time;
|
|
2512
|
+
const f = r, i = a;
|
|
2513
|
+
r = Z(
|
|
2514
|
+
f + S * 60 * 60 * 1e3,
|
|
2513
2515
|
o.options.dateFormat
|
|
2514
|
-
),
|
|
2515
|
-
|
|
2516
|
+
), a = Z(
|
|
2517
|
+
i + S * 60 * 60 * 1e3,
|
|
2516
2518
|
o.options.dateFormat
|
|
2517
|
-
), t[e.startAttr] =
|
|
2519
|
+
), t[e.startAttr] = r, t[e.endAttr] = a, t.start_time = new Date(r).getTime(), t.end_time = new Date(a).getTime();
|
|
2518
2520
|
}
|
|
2519
|
-
document.removeEventListener("mousemove",
|
|
2521
|
+
document.removeEventListener("mousemove", p, !1), document.removeEventListener("mouseup", E, !1), document.body.classList.remove("unselecttable"), document.body.style.cursor = "", t.objectVersionNumber = o.task.objectVersionNumber, e.startX != c.clientX && le.emit("change", {
|
|
2520
2522
|
task: t,
|
|
2521
2523
|
from: {
|
|
2522
2524
|
start: Z(e.start_time, "yyyy-MM-dd HH:mm:ss"),
|
|
@@ -2558,22 +2560,22 @@ const On = {
|
|
|
2558
2560
|
}, $();
|
|
2559
2561
|
}
|
|
2560
2562
|
const k = () => {
|
|
2561
|
-
const
|
|
2563
|
+
const c = document.getElementsByClassName(
|
|
2562
2564
|
"gante-toast"
|
|
2563
2565
|
)[0];
|
|
2564
|
-
if (
|
|
2565
|
-
|
|
2566
|
+
if (c) {
|
|
2567
|
+
c.style.display = "block";
|
|
2566
2568
|
let L = "";
|
|
2567
2569
|
o.columns.filter(
|
|
2568
|
-
(
|
|
2569
|
-
).forEach((
|
|
2570
|
-
L += `<p>${
|
|
2571
|
-
}), (
|
|
2570
|
+
(D) => t[D.field] && (D.showToast || D.time_mode == 1 || D.time_mode == 2)
|
|
2571
|
+
).forEach((D) => {
|
|
2572
|
+
L += `<p>${D.label}: ${D.time_mode ? M(t[D.field]) : t[D.field] || ""}</p>`;
|
|
2573
|
+
}), (c.innerHTML != L || L == "") && (c.innerHTML = L);
|
|
2572
2574
|
}
|
|
2573
|
-
}, I = (
|
|
2574
|
-
le.emit("onGanteItemDblclick",
|
|
2575
|
-
}, M = (
|
|
2576
|
-
return (
|
|
2575
|
+
}, I = (c) => {
|
|
2576
|
+
le.emit("onGanteItemDblclick", c);
|
|
2577
|
+
}, M = (c) => c && Z(c, o.options.dateFormat);
|
|
2578
|
+
return (c, L) => (T(), F("div", {
|
|
2577
2579
|
style: ne({
|
|
2578
2580
|
cursor: oe(e).mouseDown ? "grabbing" : "grab",
|
|
2579
2581
|
width: t.width ? t.width + "px" : 0,
|
|
@@ -2582,32 +2584,32 @@ const On = {
|
|
|
2582
2584
|
background: t.bg_color ? t.bg_color : "#65c16f",
|
|
2583
2585
|
borderColor: t.bg_color ? `${t.bg_color} ${t.bg_color} transparent` : "#3c9445 #3c9445 transparent"
|
|
2584
2586
|
}),
|
|
2585
|
-
class: Ce(["ganteview-item", { "has-child": t[
|
|
2586
|
-
onMousemovePassive:
|
|
2587
|
+
class: Ce(["ganteview-item", { "has-child": t[c.options.children] }]),
|
|
2588
|
+
onMousemovePassive: _,
|
|
2587
2589
|
onMouseleave: $,
|
|
2588
|
-
onMousedown: L[2] || (L[2] = (
|
|
2589
|
-
onDblclick: L[3] || (L[3] = (
|
|
2590
|
+
onMousedown: L[2] || (L[2] = (D) => m(D, "drag")),
|
|
2591
|
+
onDblclick: L[3] || (L[3] = (D) => I(t))
|
|
2590
2592
|
}, [
|
|
2591
|
-
ge(
|
|
2593
|
+
ge(x("span", {
|
|
2592
2594
|
"data-drag": "true",
|
|
2593
2595
|
class: "left-drag-line",
|
|
2594
|
-
onMousedown: L[0] || (L[0] = We((
|
|
2596
|
+
onMousedown: L[0] || (L[0] = We((D) => m(D, "left"), ["stop"]))
|
|
2595
2597
|
}, null, 544), [
|
|
2596
2598
|
[we, n.value]
|
|
2597
2599
|
]),
|
|
2598
|
-
ge(
|
|
2600
|
+
ge(x("span", {
|
|
2599
2601
|
"data-drag": "true",
|
|
2600
2602
|
class: "right-drag-line",
|
|
2601
|
-
onMousedown: L[1] || (L[1] = We((
|
|
2603
|
+
onMousedown: L[1] || (L[1] = We((D) => m(D, "right"), ["stop"]))
|
|
2602
2604
|
}, null, 544), [
|
|
2603
2605
|
[we, n.value]
|
|
2604
2606
|
]),
|
|
2605
|
-
ge(
|
|
2607
|
+
ge(x("div", cs, null, 512), [
|
|
2606
2608
|
[we, n.value]
|
|
2607
2609
|
])
|
|
2608
2610
|
], 38));
|
|
2609
2611
|
}
|
|
2610
|
-
}), fs = /* @__PURE__ */ Te(us, [["__scopeId", "data-v-3d587822"]]), ms = { class: "ganteview-content" }, ps = ["onMouseenter", "onMouseleave"], hs = /* @__PURE__ */
|
|
2612
|
+
}), fs = /* @__PURE__ */ Te(us, [["__scopeId", "data-v-3d587822"]]), ms = { class: "ganteview-content" }, ps = ["onMouseenter", "onMouseleave"], hs = /* @__PURE__ */ x("span", { style: { display: "none" } }, "1", -1), gs = { class: "ganteview-ones gante-bottom-wrapper" }, vs = ["innerHTML"], ys = {
|
|
2611
2613
|
name: "GanteTimelineChunk"
|
|
2612
2614
|
}, _s = /* @__PURE__ */ K({
|
|
2613
2615
|
...ys,
|
|
@@ -2631,51 +2633,51 @@ const On = {
|
|
|
2631
2633
|
return (n, e) => {
|
|
2632
2634
|
const l = V("gante-timeline-chunk", !0);
|
|
2633
2635
|
return T(), F("div", ms, [
|
|
2634
|
-
(T(!0), F(ae, null, se(n.tasks, (
|
|
2635
|
-
key:
|
|
2636
|
+
(T(!0), F(ae, null, se(n.tasks, (v, _) => (T(), F("div", {
|
|
2637
|
+
key: _,
|
|
2636
2638
|
class: "ganteview-ones"
|
|
2637
2639
|
}, [
|
|
2638
|
-
|
|
2639
|
-
class: Ce(["ganteview-content-one", { "gante-hover":
|
|
2640
|
-
onMouseenter: (w) => o(
|
|
2641
|
-
onMouseleave: (w) => t(
|
|
2640
|
+
x("div", {
|
|
2641
|
+
class: Ce(["ganteview-content-one", { "gante-hover": v.is_hover }]),
|
|
2642
|
+
onMouseenter: (w) => o(v),
|
|
2643
|
+
onMouseleave: (w) => t(v)
|
|
2642
2644
|
}, [
|
|
2643
|
-
|
|
2645
|
+
v.start_time ? (T(), ie(fs, {
|
|
2644
2646
|
key: 0,
|
|
2645
2647
|
start_time: n.start_time,
|
|
2646
2648
|
end_time: n.end_time,
|
|
2647
|
-
task:
|
|
2649
|
+
task: v,
|
|
2648
2650
|
columns: n.columns,
|
|
2649
2651
|
time_1px: n.time_1px,
|
|
2650
2652
|
options: n.options
|
|
2651
2653
|
}, null, 8, ["start_time", "end_time", "task", "columns", "time_1px", "options"])) : ee("", !0)
|
|
2652
2654
|
], 42, ps),
|
|
2653
|
-
|
|
2655
|
+
v[n.options.children] ? ge((T(), ie(l, {
|
|
2654
2656
|
key: 0,
|
|
2655
2657
|
start_time: n.start_time,
|
|
2656
2658
|
end_time: n.end_time,
|
|
2657
2659
|
columns: n.columns,
|
|
2658
2660
|
time_1px: n.time_1px,
|
|
2659
2661
|
options: n.options,
|
|
2660
|
-
tasks:
|
|
2662
|
+
tasks: v[n.options.children]
|
|
2661
2663
|
}, {
|
|
2662
2664
|
default: W(() => [
|
|
2663
2665
|
hs
|
|
2664
2666
|
]),
|
|
2665
2667
|
_: 2
|
|
2666
2668
|
}, 1032, ["start_time", "end_time", "columns", "time_1px", "options", "tasks"])), [
|
|
2667
|
-
[we,
|
|
2669
|
+
[we, v.open]
|
|
2668
2670
|
]) : ee("", !0)
|
|
2669
2671
|
]))), 128)),
|
|
2670
|
-
|
|
2671
|
-
(T(!0), F(ae, null, se(n.dateRange, (
|
|
2672
|
-
key:
|
|
2672
|
+
x("div", gs, [
|
|
2673
|
+
(T(!0), F(ae, null, se(n.dateRange, (v) => (T(), F("div", {
|
|
2674
|
+
key: v.title,
|
|
2673
2675
|
class: "ganteview-item gante-bottom-item",
|
|
2674
2676
|
style: ne({ width: n.options.cellWidth + "px" })
|
|
2675
2677
|
}, [
|
|
2676
2678
|
n.dayilySummary ? (T(), F("div", {
|
|
2677
2679
|
key: 0,
|
|
2678
|
-
innerHTML: n.dayilySummary[
|
|
2680
|
+
innerHTML: n.dayilySummary[v.title]
|
|
2679
2681
|
}, null, 8, vs)) : ee("", !0)
|
|
2680
2682
|
], 4))), 128))
|
|
2681
2683
|
]),
|
|
@@ -2698,199 +2700,199 @@ const On = {
|
|
|
2698
2700
|
options: { default: () => ({}) }
|
|
2699
2701
|
},
|
|
2700
2702
|
setup(s, { expose: o }) {
|
|
2701
|
-
const t = s, n = N([]), e = N([]), l = N(0),
|
|
2703
|
+
const t = s, n = N([]), e = N([]), l = N(0), v = N(0), _ = N(!1), w = N(""), $ = N(null), m = N({
|
|
2702
2704
|
width: 0,
|
|
2703
2705
|
left: 0
|
|
2704
2706
|
});
|
|
2705
|
-
let
|
|
2706
|
-
function I(
|
|
2707
|
-
document.getElementsByClassName("gante-tbody")[0].style.top = -
|
|
2708
|
-
const
|
|
2707
|
+
let p, E = 0, k = !0;
|
|
2708
|
+
function I(a) {
|
|
2709
|
+
document.getElementsByClassName("gante-tbody")[0].style.top = -a.target.scrollTop + "px";
|
|
2710
|
+
const f = document.getElementsByClassName(
|
|
2709
2711
|
"ganteview-header"
|
|
2710
2712
|
)[0];
|
|
2711
|
-
|
|
2712
|
-
const
|
|
2713
|
-
if (
|
|
2714
|
-
for (const
|
|
2715
|
-
if (
|
|
2716
|
-
w.value =
|
|
2713
|
+
f.style.left = -a.target.scrollLeft + "px";
|
|
2714
|
+
const i = a.target;
|
|
2715
|
+
if (i.scrollHeight <= i.scrollTop + i.clientHeight && k && (k = !1, le.emit("onLoad")), i.scrollLeft >= 0) {
|
|
2716
|
+
for (const y of n.value)
|
|
2717
|
+
if (y.left + y.width >= i.scrollLeft) {
|
|
2718
|
+
w.value = y.date;
|
|
2717
2719
|
break;
|
|
2718
2720
|
}
|
|
2719
2721
|
}
|
|
2720
2722
|
}
|
|
2721
2723
|
const M = () => {
|
|
2722
2724
|
l.value = 0;
|
|
2723
|
-
let
|
|
2724
|
-
const
|
|
2725
|
-
let
|
|
2725
|
+
let a = 0;
|
|
2726
|
+
const f = $.value.offsetWidth;
|
|
2727
|
+
let i = 0, y, C = 1;
|
|
2726
2728
|
switch (t.options.timeScale) {
|
|
2727
2729
|
//日
|
|
2728
2730
|
case 1:
|
|
2729
|
-
|
|
2731
|
+
y = new Date(t.start_time), a = 60 * 60 * 1 * 24 * 1e3 / t.options.cellWidth, p = y;
|
|
2730
2732
|
break;
|
|
2731
2733
|
// 周
|
|
2732
2734
|
case 2:
|
|
2733
|
-
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
),
|
|
2735
|
+
y = new Date(t.start_time - 7 * 24 * 60 * 60 * 1e3), a = 7 * 24 * 60 * 60 * 1e3 / t.options.cellWidth, p = new Date(
|
|
2736
|
+
y.getFullYear(),
|
|
2737
|
+
y.getMonth(),
|
|
2738
|
+
y.getDate() - (y.getDay() + 7) % 7
|
|
2739
|
+
), y = p;
|
|
2738
2740
|
break;
|
|
2739
2741
|
// 月
|
|
2740
2742
|
case 3:
|
|
2741
|
-
|
|
2743
|
+
y = new Date(t.start_time - 30 * 24 * 60 * 60 * 1e3), a = 30 * 24 * 60 * 60 * 1e3 / t.options.cellWidth, p = new Date(y.getFullYear(), y.getMonth(), 1), y = p, C = 2;
|
|
2742
2744
|
break;
|
|
2743
2745
|
// 季
|
|
2744
2746
|
case 4:
|
|
2745
2747
|
{
|
|
2746
|
-
|
|
2747
|
-
let
|
|
2748
|
-
const
|
|
2749
|
-
|
|
2748
|
+
y = new Date(t.start_time - 90 * 24 * 60 * 60 * 1e3), a = 90 * 24 * 60 * 60 * 1e3 / t.options.cellWidth;
|
|
2749
|
+
let B = 0;
|
|
2750
|
+
const A = y.getMonth() + 1;
|
|
2751
|
+
A >= 1 && A <= 3 ? B = 0 : A >= 4 && A <= 6 ? B = 3 : A >= 7 && A <= 9 ? B = 6 : A >= 10 && A <= 12 && (B = 9), p = new Date(y.getFullYear(), B, 1), y = p, C = 2;
|
|
2750
2752
|
}
|
|
2751
2753
|
break;
|
|
2752
2754
|
// 年
|
|
2753
2755
|
case 5:
|
|
2754
|
-
|
|
2756
|
+
y = new Date(t.start_time - 183 * 24 * 60 * 60 * 1e3), a = 183 * 24 * 60 * 60 * 1e3 / t.options.cellWidth, p = new Date(y.getFullYear(), 0, 1), y = p, C = 2;
|
|
2755
2757
|
break;
|
|
2756
2758
|
}
|
|
2757
|
-
return
|
|
2759
|
+
return _.value = !0, t.end_time ? (i = new Date(t.end_time).getTime(), f * a >= i - new Date(p).getTime() && (i = f * a + new Date(p).getTime())) : i = f * a + new Date(p).getTime(), L(C, p, a, i), v.value = a, { time: a, start_time: y };
|
|
2758
2760
|
};
|
|
2759
|
-
function
|
|
2760
|
-
const
|
|
2761
|
-
if (
|
|
2762
|
-
return
|
|
2763
|
-
if (
|
|
2764
|
-
return
|
|
2765
|
-
if (
|
|
2766
|
-
return
|
|
2767
|
-
if (
|
|
2768
|
-
return
|
|
2769
|
-
if (
|
|
2770
|
-
return
|
|
2761
|
+
function c(a, f) {
|
|
2762
|
+
const i = a.getFullYear(), y = a.getMonth() + 1, C = a.getDate();
|
|
2763
|
+
if (f == 1)
|
|
2764
|
+
return i + "-" + (y < 10 ? "0" + y : y) + "-" + (C < 10 ? "0" + C : C);
|
|
2765
|
+
if (f == 2)
|
|
2766
|
+
return i + "-" + (y < 10 ? "0" + y : y);
|
|
2767
|
+
if (f == 3)
|
|
2768
|
+
return C < 10 ? "0" + C : C;
|
|
2769
|
+
if (f == 4)
|
|
2770
|
+
return y < 10 ? "0" + y : y;
|
|
2771
|
+
if (f == 5)
|
|
2772
|
+
return i;
|
|
2771
2773
|
}
|
|
2772
|
-
function L(
|
|
2773
|
-
|
|
2774
|
-
const
|
|
2775
|
-
for (let
|
|
2776
|
-
const
|
|
2777
|
-
let
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
|
|
2774
|
+
function L(a, f, i, y) {
|
|
2775
|
+
m.value.width = 24 * 60 * 60 * 1e3 / i <= 5 ? 5 : 24 * 60 * 60 * 1e3 / i, m.value.left = (new Date((/* @__PURE__ */ new Date()).toLocaleDateString()).getTime() - f.getTime()) / i;
|
|
2776
|
+
const C = [];
|
|
2777
|
+
for (let B = 0; B <= y; ) {
|
|
2778
|
+
const A = f;
|
|
2779
|
+
let d = c(A, 2);
|
|
2780
|
+
a === 1 ? f = new Date(
|
|
2781
|
+
f.getFullYear(),
|
|
2782
|
+
f.getMonth() + 1,
|
|
2781
2783
|
1
|
|
2782
|
-
) :
|
|
2783
|
-
const
|
|
2784
|
-
l.value +=
|
|
2785
|
-
left: (
|
|
2786
|
-
width:
|
|
2787
|
-
date:
|
|
2788
|
-
}),
|
|
2784
|
+
) : a == 2 && (f = new Date(f.getFullYear() + 1, 0, 1), d = c(A, 5));
|
|
2785
|
+
const u = (f.getTime() - A.getTime()) / i;
|
|
2786
|
+
l.value += u, C.push({
|
|
2787
|
+
left: (A.getTime() - p.getTime()) / i,
|
|
2788
|
+
width: u,
|
|
2789
|
+
date: d
|
|
2790
|
+
}), B = f.getTime(), E = B;
|
|
2789
2791
|
}
|
|
2790
|
-
n.value =
|
|
2792
|
+
n.value = C, console.log({ top_time_data: n.value }), E && (y = E), D(p, i, y);
|
|
2791
2793
|
}
|
|
2792
|
-
function
|
|
2793
|
-
var
|
|
2794
|
-
const
|
|
2795
|
-
for (let
|
|
2796
|
-
const
|
|
2797
|
-
let
|
|
2798
|
-
const
|
|
2794
|
+
function D(a, f, i) {
|
|
2795
|
+
var C;
|
|
2796
|
+
const y = [];
|
|
2797
|
+
for (let B = 0; B <= i; ) {
|
|
2798
|
+
const A = a;
|
|
2799
|
+
let d = c(A, 3), u = c(A, 1), h = !1, g = "";
|
|
2800
|
+
const b = a.getFullYear(), O = a.getMonth(), Y = a.getDate();
|
|
2799
2801
|
if (t.options.timeScale === 1) {
|
|
2800
|
-
if (
|
|
2801
|
-
const { lunar_day: pe, reset_day: q } =
|
|
2802
|
-
|
|
2802
|
+
if (a = new Date(b, O, Y + 1), (A.getDay() == 0 || A.getDay() == 6) && (h = !0), (C = t.calendarOption) != null && C.list) {
|
|
2803
|
+
const { lunar_day: pe, reset_day: q } = r(u);
|
|
2804
|
+
h = q === "Y", g = pe;
|
|
2803
2805
|
}
|
|
2804
|
-
} else t.options.timeScale === 2 ? (
|
|
2805
|
-
const te = (
|
|
2806
|
-
|
|
2807
|
-
left: (
|
|
2806
|
+
} else t.options.timeScale === 2 ? (a = new Date(b, O, Y + 7), u = c(A, 1) + "~" + c(new Date(b, O, Y - 1), 1)) : t.options.timeScale === 3 ? (a = new Date(b, O + 1, 1), d = c(A, 4), u = c(A, 2)) : t.options.timeScale === 4 ? (a = new Date(b, O + 3, 1), d = S(A.getMonth(), "month"), u = c(A, 1) + "~" + c(new Date(b, O, 0), 1)) : t.options.timeScale === 5 && (a = new Date(b, O + 6, 1), d = S(A.getMonth(), "year"), u = c(A, 1) + "~" + c(new Date(b, O, 0), 1));
|
|
2807
|
+
const te = (a.getTime() - A.getTime()) / f;
|
|
2808
|
+
B = a.getTime(), B <= i && y.push({
|
|
2809
|
+
left: (A.getTime() - p.getTime()) / f,
|
|
2808
2810
|
width: te,
|
|
2809
|
-
date:
|
|
2810
|
-
title:
|
|
2811
|
-
isRestDay:
|
|
2812
|
-
lunarDay:
|
|
2811
|
+
date: d,
|
|
2812
|
+
title: u,
|
|
2813
|
+
isRestDay: h,
|
|
2814
|
+
lunarDay: g
|
|
2813
2815
|
});
|
|
2814
2816
|
}
|
|
2815
|
-
e.value =
|
|
2817
|
+
e.value = y;
|
|
2816
2818
|
}
|
|
2817
|
-
function S(
|
|
2818
|
-
let
|
|
2819
|
-
return
|
|
2819
|
+
function S(a, f) {
|
|
2820
|
+
let i = "";
|
|
2821
|
+
return f == "month" ? a <= 2 && a >= 0 ? i = "Q1" : a <= 5 && a >= 3 ? i = "Q2" : a <= 8 && a >= 6 ? i = "Q3" : a <= 11 && a >= 9 && (i = "Q4") : f == "year" && (a <= 5 && a >= 0 ? i = "Y1" : a <= 11 && a >= 6 && (i = "Y2")), i;
|
|
2820
2822
|
}
|
|
2821
|
-
const
|
|
2822
|
-
var
|
|
2823
|
-
const
|
|
2824
|
-
return { lunar_day:
|
|
2823
|
+
const r = (a) => {
|
|
2824
|
+
var i;
|
|
2825
|
+
const f = (i = t.calendarOption) == null ? void 0 : i.list.find((y) => y.date === a);
|
|
2826
|
+
return { lunar_day: f == null ? void 0 : f.lunarDay, reset_day: f == null ? void 0 : f.isRestDay };
|
|
2825
2827
|
};
|
|
2826
|
-
return o({ initTimeline: M }), (
|
|
2828
|
+
return o({ initTimeline: M }), (a, f) => (T(), F("div", {
|
|
2827
2829
|
ref_key: "ganteview",
|
|
2828
2830
|
ref: $,
|
|
2829
2831
|
class: "ganteview-box"
|
|
2830
2832
|
}, [
|
|
2831
|
-
|
|
2833
|
+
x("div", {
|
|
2832
2834
|
class: "ganteview",
|
|
2833
2835
|
onScrollPassive: I
|
|
2834
2836
|
}, [
|
|
2835
2837
|
w.value ? (T(), F("div", ws, G(w.value), 1)) : ee("", !0),
|
|
2836
|
-
|
|
2838
|
+
x("div", {
|
|
2837
2839
|
style: ne({ width: l.value + "px" }),
|
|
2838
2840
|
class: "ganteview-header"
|
|
2839
2841
|
}, [
|
|
2840
|
-
|
|
2841
|
-
(T(!0), F(ae, null, se(n.value, (
|
|
2842
|
-
key:
|
|
2842
|
+
x("div", bs, [
|
|
2843
|
+
(T(!0), F(ae, null, se(n.value, (i) => (T(), F("div", {
|
|
2844
|
+
key: i.id,
|
|
2843
2845
|
class: "ganteview-headercell",
|
|
2844
|
-
title:
|
|
2845
|
-
style: ne({ width:
|
|
2846
|
-
}, G(
|
|
2846
|
+
title: i.date,
|
|
2847
|
+
style: ne({ width: i.width + "px", left: i.left + "px" })
|
|
2848
|
+
}, G(i.date), 13, ks))), 128))
|
|
2847
2849
|
]),
|
|
2848
|
-
|
|
2849
|
-
(T(!0), F(ae, null, se(e.value, (
|
|
2850
|
-
key:
|
|
2850
|
+
x("div", Cs, [
|
|
2851
|
+
(T(!0), F(ae, null, se(e.value, (i) => (T(), F("div", {
|
|
2852
|
+
key: i.id,
|
|
2851
2853
|
class: "ganteview-headercell",
|
|
2852
|
-
title:
|
|
2854
|
+
title: i.title,
|
|
2853
2855
|
style: ne({
|
|
2854
|
-
width:
|
|
2855
|
-
left:
|
|
2856
|
-
color:
|
|
2856
|
+
width: i.width + "px",
|
|
2857
|
+
left: i.left + "px",
|
|
2858
|
+
color: i.isRestDay ? "#999" : ""
|
|
2857
2859
|
})
|
|
2858
|
-
}, G(
|
|
2860
|
+
}, G(i.date), 13, xs))), 128))
|
|
2859
2861
|
])
|
|
2860
2862
|
], 4),
|
|
2861
2863
|
ge(U(_s, {
|
|
2862
|
-
columns:
|
|
2863
|
-
start_time:
|
|
2864
|
-
end_time:
|
|
2865
|
-
time_1px:
|
|
2866
|
-
"dayily-summary":
|
|
2864
|
+
columns: a.columns,
|
|
2865
|
+
start_time: a.start_time,
|
|
2866
|
+
end_time: a.end_time,
|
|
2867
|
+
time_1px: v.value,
|
|
2868
|
+
"dayily-summary": a.dayilySummary,
|
|
2867
2869
|
"date-range": e.value,
|
|
2868
|
-
options:
|
|
2870
|
+
options: a.options,
|
|
2869
2871
|
style: ne({ width: l.value + "px" }),
|
|
2870
2872
|
class: "ganteview-content-box",
|
|
2871
|
-
tasks:
|
|
2873
|
+
tasks: a.tasks
|
|
2872
2874
|
}, {
|
|
2873
2875
|
default: W(() => [
|
|
2874
|
-
(T(!0), F(ae, null, se(e.value, (
|
|
2875
|
-
key:
|
|
2876
|
+
(T(!0), F(ae, null, se(e.value, (i, y) => (T(), F("div", {
|
|
2877
|
+
key: y,
|
|
2876
2878
|
class: "flex items-end ganteview-column",
|
|
2877
2879
|
style: ne({
|
|
2878
|
-
width:
|
|
2879
|
-
left:
|
|
2880
|
-
background:
|
|
2880
|
+
width: i.width + "px",
|
|
2881
|
+
left: i.left + "px",
|
|
2882
|
+
background: i.isRestDay ? "#F3FDFF" : ""
|
|
2881
2883
|
})
|
|
2882
2884
|
}, null, 4))), 128)),
|
|
2883
|
-
|
|
2885
|
+
x("div", {
|
|
2884
2886
|
id: "today-ganteview-column",
|
|
2885
2887
|
style: ne({
|
|
2886
|
-
width:
|
|
2887
|
-
left:
|
|
2888
|
+
width: m.value.width + "px",
|
|
2889
|
+
left: m.value.left + "px"
|
|
2888
2890
|
})
|
|
2889
2891
|
}, null, 4)
|
|
2890
2892
|
]),
|
|
2891
2893
|
_: 1
|
|
2892
2894
|
}, 8, ["columns", "start_time", "end_time", "time_1px", "dayily-summary", "date-range", "options", "style", "tasks"]), [
|
|
2893
|
-
[we,
|
|
2895
|
+
[we, _.value]
|
|
2894
2896
|
])
|
|
2895
2897
|
], 32)
|
|
2896
2898
|
], 512));
|
|
@@ -2907,40 +2909,40 @@ const On = {
|
|
|
2907
2909
|
emits: ["onDragEnd"],
|
|
2908
2910
|
setup(s, { emit: o }) {
|
|
2909
2911
|
const t = s, n = N(!1), e = N(0), l = N("");
|
|
2910
|
-
let
|
|
2911
|
-
function
|
|
2912
|
-
if (
|
|
2912
|
+
let v = !1;
|
|
2913
|
+
function _(I) {
|
|
2914
|
+
if (v) {
|
|
2913
2915
|
const M = document.getElementsByTagName("body")[0];
|
|
2914
|
-
let
|
|
2915
|
-
const L =
|
|
2916
|
-
console.log(
|
|
2916
|
+
let c = I.pageX - l.value.getBoundingClientRect().left + 3;
|
|
2917
|
+
const L = m("gante-table-box"), D = m("ganteview-box");
|
|
2918
|
+
console.log(c);
|
|
2917
2919
|
const S = t.options.tableWidth || 450;
|
|
2918
|
-
|
|
2920
|
+
c + L <= S && (c = S - L), D - c <= 30 && (c = D - 30), e.value = c, M.style.cursor = "e-resize";
|
|
2919
2921
|
}
|
|
2920
2922
|
}
|
|
2921
2923
|
function w() {
|
|
2922
|
-
if (
|
|
2923
|
-
const I = document.getElementsByTagName("body")[0], M = e.value +
|
|
2924
|
-
le.emit("onDragEnd", M), k("onDragEnd", M),
|
|
2924
|
+
if (v) {
|
|
2925
|
+
const I = document.getElementsByTagName("body")[0], M = e.value + m("gante-table-box");
|
|
2926
|
+
le.emit("onDragEnd", M), k("onDragEnd", M), p(M), n.value = !1, e.value = 0, v = !1, I.classList.remove("unselecttable"), I.style.cursor = "", document.removeEventListener("mousemove", _, !1), document.removeEventListener("mouseup", w, !1);
|
|
2925
2927
|
}
|
|
2926
2928
|
}
|
|
2927
2929
|
const $ = () => {
|
|
2928
|
-
|
|
2929
|
-
},
|
|
2930
|
-
function
|
|
2930
|
+
v = !0, n.value = !0, document.getElementsByTagName("body")[0].classList.add("unselecttable"), document.addEventListener("mousemove", _, { passive: !1 }), document.addEventListener("mouseup", w, { passive: !1 });
|
|
2931
|
+
}, m = (I) => document.getElementsByClassName(I)[0].offsetWidth;
|
|
2932
|
+
function p(I) {
|
|
2931
2933
|
let M = 0;
|
|
2932
|
-
if (t.columns.filter((
|
|
2933
|
-
M +=
|
|
2934
|
+
if (t.columns.filter((c) => !!c.show || c.show === void 0).forEach((c) => {
|
|
2935
|
+
M += c.width ? Number(c.width) + 1 : 81;
|
|
2934
2936
|
}), M < I) {
|
|
2935
|
-
const
|
|
2936
|
-
console.log(
|
|
2937
|
-
const L =
|
|
2938
|
-
|
|
2937
|
+
const c = E(1);
|
|
2938
|
+
console.log(c);
|
|
2939
|
+
const L = c.width ? Number(c.width) - 2 : 78;
|
|
2940
|
+
c.width = I - (M - L);
|
|
2939
2941
|
}
|
|
2940
2942
|
}
|
|
2941
2943
|
function E(I) {
|
|
2942
|
-
const M = t.columns.length,
|
|
2943
|
-
return
|
|
2944
|
+
const M = t.columns.length, c = t.columns[M - I];
|
|
2945
|
+
return c.show || c.show === void 0 ? c : E(I + 1);
|
|
2944
2946
|
}
|
|
2945
2947
|
const k = o;
|
|
2946
2948
|
return (I, M) => (T(), F("div", {
|
|
@@ -2950,7 +2952,7 @@ const On = {
|
|
|
2950
2952
|
class: "ut-gante-split",
|
|
2951
2953
|
onMousedown: $
|
|
2952
2954
|
}, [
|
|
2953
|
-
ge(
|
|
2955
|
+
ge(x("div", {
|
|
2954
2956
|
style: ne({ left: e.value + "px" }),
|
|
2955
2957
|
class: "ut-gante-split-resize"
|
|
2956
2958
|
}, null, 4), [
|
|
@@ -3008,133 +3010,133 @@ const On = {
|
|
|
3008
3010
|
// 唯一标识字段
|
|
3009
3011
|
footerLabel: "合计"
|
|
3010
3012
|
// showFooter为true时生效
|
|
3011
|
-
}),
|
|
3012
|
-
let
|
|
3013
|
-
|
|
3014
|
-
|
|
3013
|
+
}), v = N(300), _ = N(300), w = N(!1), $ = N(/* @__PURE__ */ new Date()), m = N(""), p = N(!1), E = N(0), k = N(0), I = N(null), M = N(null);
|
|
3014
|
+
let c;
|
|
3015
|
+
Fe(() => {
|
|
3016
|
+
i(), C(), L();
|
|
3015
3017
|
});
|
|
3016
3018
|
const L = () => {
|
|
3017
|
-
le.off("onDragChangeTime"), le.on("onDragChangeTime", (
|
|
3018
|
-
console.log("[ data ] >",
|
|
3019
|
-
}), le.off("change"), le.on("change", (
|
|
3020
|
-
|
|
3021
|
-
}), le.off("changeCalendar"), le.on("changeCalendar", (
|
|
3022
|
-
|
|
3023
|
-
}), le.off("onClick"), le.on("onClick", (
|
|
3024
|
-
|
|
3025
|
-
}), le.off("onGanteItemDblclick"), le.on("onGanteItemDblclick", (
|
|
3026
|
-
var
|
|
3027
|
-
(
|
|
3019
|
+
le.off("onDragChangeTime"), le.on("onDragChangeTime", (d) => {
|
|
3020
|
+
console.log("[ data ] >", d);
|
|
3021
|
+
}), le.off("change"), le.on("change", (d) => {
|
|
3022
|
+
f(d);
|
|
3023
|
+
}), le.off("changeCalendar"), le.on("changeCalendar", (d) => {
|
|
3024
|
+
r(d);
|
|
3025
|
+
}), le.off("onClick"), le.on("onClick", (d) => {
|
|
3026
|
+
a(d);
|
|
3027
|
+
}), le.off("onGanteItemDblclick"), le.on("onGanteItemDblclick", (d) => {
|
|
3028
|
+
var u;
|
|
3029
|
+
(u = t.events) == null || u.onDbclick(d);
|
|
3028
3030
|
}), le.off("onLoad"), le.on("onLoad", () => {
|
|
3029
3031
|
});
|
|
3030
|
-
},
|
|
3031
|
-
e.value =
|
|
3032
|
-
}, S = (
|
|
3033
|
-
if (console.log(
|
|
3034
|
-
Object.assign(t.tasks,
|
|
3032
|
+
}, D = (d) => {
|
|
3033
|
+
e.value = d;
|
|
3034
|
+
}, S = (d, u) => {
|
|
3035
|
+
if (console.log(u), !d) {
|
|
3036
|
+
Object.assign(t.tasks, c);
|
|
3035
3037
|
return;
|
|
3036
3038
|
}
|
|
3037
|
-
|
|
3038
|
-
function
|
|
3039
|
-
|
|
3040
|
-
for (const Y of
|
|
3041
|
-
Y[l.children] &&
|
|
3039
|
+
h(t.tasks), n = 0, b(t.tasks);
|
|
3040
|
+
function h(O) {
|
|
3041
|
+
O.sort(g(d));
|
|
3042
|
+
for (const Y of O)
|
|
3043
|
+
Y[l.children] && h(Y[l.children]);
|
|
3042
3044
|
}
|
|
3043
|
-
function
|
|
3045
|
+
function g(O) {
|
|
3044
3046
|
return function(Y, te) {
|
|
3045
|
-
return
|
|
3047
|
+
return u == "asc" ? Y[O] - te[O] : (console.log(te, O), te[O] - Y[O]);
|
|
3046
3048
|
};
|
|
3047
3049
|
}
|
|
3048
|
-
function
|
|
3049
|
-
for (const Y of
|
|
3050
|
-
Y[l.children] ? (n++, Y.seqNo = Y.seqNo || n,
|
|
3050
|
+
function b(O) {
|
|
3051
|
+
for (const Y of O)
|
|
3052
|
+
Y[l.children] ? (n++, Y.seqNo = Y.seqNo || n, b(Y[l.children])) : (n++, Y.seqNo = Y.seqNo || n);
|
|
3051
3053
|
}
|
|
3052
|
-
},
|
|
3053
|
-
console.log("展开",
|
|
3054
|
-
},
|
|
3055
|
-
for (const
|
|
3056
|
-
(
|
|
3057
|
-
},
|
|
3058
|
-
console.log(
|
|
3059
|
-
},
|
|
3060
|
-
|
|
3061
|
-
const
|
|
3062
|
-
E.value = ft(
|
|
3063
|
-
const
|
|
3064
|
-
k.value = ft(
|
|
3065
|
-
function
|
|
3066
|
-
const
|
|
3067
|
-
|
|
3054
|
+
}, r = (d) => {
|
|
3055
|
+
console.log("展开", d.show_calendar), d.changeDate && ($.value = d.changeDate), w.value = d.show_calendar, console.log(w.value), d.calendar_left != null && (v.value = d.calendar_left), d.calendar_top != null && (_.value = d.calendar_top), d.change_value != null && (m.value = d.change_value.argument);
|
|
3056
|
+
}, a = (d) => {
|
|
3057
|
+
for (const u in d.data)
|
|
3058
|
+
(u == "width" || u == "left" || u == "open") && delete d.data[u];
|
|
3059
|
+
}, f = (d) => {
|
|
3060
|
+
console.log(d), t.events.onChange(d);
|
|
3061
|
+
}, i = () => {
|
|
3062
|
+
y(t.tasks, 1), c = ce(t.tasks, !0), Object.assign(l, t.options);
|
|
3063
|
+
const d = Z(t.startTime, "yyyy-MM-dd 00:00:00");
|
|
3064
|
+
E.value = ft(d, "yyyy-MM-dd HH:mm:ss");
|
|
3065
|
+
const u = Z(t.endTime, "yyyy-MM-dd 23:59:59");
|
|
3066
|
+
k.value = ft(u, "yyyy-MM-dd HH:mm:ss");
|
|
3067
|
+
function h() {
|
|
3068
|
+
const g = (/* @__PURE__ */ new Date()).getTime();
|
|
3069
|
+
g < E.value && (E.value = g), g > k.value && (k.value = g);
|
|
3068
3070
|
}
|
|
3069
|
-
|
|
3070
|
-
const
|
|
3071
|
-
|
|
3071
|
+
h(), n = 0, Pe(() => {
|
|
3072
|
+
const g = I.value.initTimeline(l.timeScale);
|
|
3073
|
+
B(t.tasks, g.time, g.start_time);
|
|
3072
3074
|
});
|
|
3073
|
-
},
|
|
3074
|
-
var
|
|
3075
|
-
if (
|
|
3076
|
-
const
|
|
3077
|
-
|
|
3075
|
+
}, y = (d, u) => (d.forEach((h) => {
|
|
3076
|
+
var g;
|
|
3077
|
+
if (h.g_level = u, h.start_time = A(h.start_time), h.duration && !h.end_time) {
|
|
3078
|
+
const b = new Date(h.start_time).getTime() + h.duration * 1e3 * 24 * 60 * 60;
|
|
3079
|
+
h.end_time = A(b, "end");
|
|
3078
3080
|
} else
|
|
3079
|
-
|
|
3080
|
-
(
|
|
3081
|
-
}),
|
|
3082
|
-
var
|
|
3081
|
+
h.end_time = A(h.end_time || h.start_time, "end");
|
|
3082
|
+
(g = h[t.options.children]) != null && g.length && (u++, y(h[t.options.children], u), u--);
|
|
3083
|
+
}), d), C = () => {
|
|
3084
|
+
var d;
|
|
3083
3085
|
if (l.tableWidth)
|
|
3084
3086
|
e.value = l.tableWidth;
|
|
3085
3087
|
else {
|
|
3086
|
-
const
|
|
3087
|
-
e.value =
|
|
3088
|
+
const u = (d = M == null ? void 0 : M.value) == null ? void 0 : d.clientWidth;
|
|
3089
|
+
e.value = u / 2;
|
|
3088
3090
|
}
|
|
3089
3091
|
};
|
|
3090
|
-
function
|
|
3091
|
-
for (const
|
|
3092
|
-
if (
|
|
3093
|
-
if (
|
|
3094
|
-
let
|
|
3095
|
-
|
|
3092
|
+
function B(d, u, h) {
|
|
3093
|
+
for (const g of d) {
|
|
3094
|
+
if (g.open = g.open || l.expandAll, g.start_time || g.end_time)
|
|
3095
|
+
if (g.left = (g.start_time - h.getTime()) / u, g.end_time && g.end_time >= g.start_time && g.start_time) {
|
|
3096
|
+
let b = (g.end_time - g.start_time) / u;
|
|
3097
|
+
b >= 0 && b <= 1 && (b = 1), g.width = b;
|
|
3096
3098
|
} else
|
|
3097
|
-
|
|
3098
|
-
|
|
3099
|
+
g.width = 0;
|
|
3100
|
+
g.showLoading = !1, g[l.children] ? (n++, g.seqNo = g.seqNo || n, B(g[l.children], u, h)) : (n++, g.seqNo = g.seqNo || n);
|
|
3099
3101
|
}
|
|
3100
3102
|
}
|
|
3101
|
-
const
|
|
3102
|
-
if (!
|
|
3103
|
-
const
|
|
3104
|
-
return
|
|
3103
|
+
const A = (d, u = "start") => {
|
|
3104
|
+
if (!d) return d;
|
|
3105
|
+
const h = u === "start" ? "00:00:00" : "23:59:59";
|
|
3106
|
+
return d = `${Z(d, "yyyy-MM-dd")} ${h}`, new Date(d).getTime();
|
|
3105
3107
|
};
|
|
3106
|
-
return o({ initGante:
|
|
3107
|
-
De(
|
|
3108
|
-
|
|
3108
|
+
return o({ initGante: i }), (d, u) => (T(), F("div", Ss, [
|
|
3109
|
+
De(d.$slots, "header"),
|
|
3110
|
+
x("div", {
|
|
3109
3111
|
ref_key: "xgante",
|
|
3110
3112
|
ref: M,
|
|
3111
3113
|
class: "gante-box"
|
|
3112
3114
|
}, [
|
|
3113
|
-
|
|
3115
|
+
x("div", {
|
|
3114
3116
|
style: ne({ width: Number(e.value) ? e.value + "px" : e.value }),
|
|
3115
3117
|
class: "gante-out-op"
|
|
3116
3118
|
}, [
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
|
|
3120
|
-
De(
|
|
3119
|
+
d.title ? (T(), F("div", Is, G(d.title), 1)) : ee("", !0),
|
|
3120
|
+
x("div", Es, G(oe(Z)(E.value, "yyyy-MM-dd")) + " ~ " + G(oe(Z)(k.value, "yyyy-MM-dd")), 1),
|
|
3121
|
+
x("div", Fs, [
|
|
3122
|
+
De(d.$slots, "colorTip"),
|
|
3121
3123
|
Ns
|
|
3122
3124
|
])
|
|
3123
3125
|
], 4),
|
|
3124
|
-
|
|
3126
|
+
x("div", {
|
|
3125
3127
|
style: ne({ width: Number(e.value) ? e.value + "px" : e.value }),
|
|
3126
3128
|
class: "gante-table-box"
|
|
3127
3129
|
}, [
|
|
3128
3130
|
U(rs, {
|
|
3129
|
-
columns:
|
|
3130
|
-
"show-loading":
|
|
3131
|
-
data:
|
|
3131
|
+
columns: d.columns,
|
|
3132
|
+
"show-loading": p.value,
|
|
3133
|
+
data: d.tasks,
|
|
3132
3134
|
options: l,
|
|
3133
3135
|
onSort: S,
|
|
3134
|
-
onOnDragEnd:
|
|
3136
|
+
onOnDragEnd: D
|
|
3135
3137
|
}, null, 8, ["columns", "show-loading", "data", "options"])
|
|
3136
3138
|
], 4),
|
|
3137
|
-
|
|
3139
|
+
x("div", {
|
|
3138
3140
|
class: "gante-gc-box",
|
|
3139
3141
|
style: ne({
|
|
3140
3142
|
left: Number(e.value) ? e.value + "px" : e.value,
|
|
@@ -3146,23 +3148,23 @@ const On = {
|
|
|
3146
3148
|
ref: I,
|
|
3147
3149
|
start_time: E.value,
|
|
3148
3150
|
end_time: k.value,
|
|
3149
|
-
columns:
|
|
3151
|
+
columns: d.columns,
|
|
3150
3152
|
options: l,
|
|
3151
|
-
"dayily-summary":
|
|
3152
|
-
"calendar-option":
|
|
3153
|
-
tasks:
|
|
3153
|
+
"dayily-summary": d.dayilySummary,
|
|
3154
|
+
"calendar-option": d.calendarOption,
|
|
3155
|
+
tasks: d.tasks
|
|
3154
3156
|
}, null, 8, ["start_time", "end_time", "columns", "options", "dayily-summary", "calendar-option", "tasks"])
|
|
3155
3157
|
], 4),
|
|
3156
3158
|
U(Ms, {
|
|
3157
3159
|
left: e.value,
|
|
3158
|
-
columns:
|
|
3160
|
+
columns: d.columns,
|
|
3159
3161
|
options: l,
|
|
3160
|
-
onOnDragEnd:
|
|
3162
|
+
onOnDragEnd: D
|
|
3161
3163
|
}, null, 8, ["left", "columns", "options"])
|
|
3162
3164
|
], 512)
|
|
3163
3165
|
]));
|
|
3164
3166
|
}
|
|
3165
|
-
}), Ps = ue(As), Bs = { class: "selector w-full" },
|
|
3167
|
+
}), Ps = ue(As), Bs = { class: "selector w-full" }, Rs = { class: "flex items-center pr-2" }, Os = { class: "flex flex-wrap px-2 ml-2" }, zs = ["title", "onClick"], Us = { class: "w-full h-9 flex items-center overflow-auto border-t border-[#e5e7eb]" }, Vs = {
|
|
3166
3168
|
name: "UtIconSelect"
|
|
3167
3169
|
}, js = /* @__PURE__ */ K({
|
|
3168
3170
|
...Vs,
|
|
@@ -3178,53 +3180,53 @@ const On = {
|
|
|
3178
3180
|
},
|
|
3179
3181
|
emits: ["update:modelValue"],
|
|
3180
3182
|
setup(s, { emit: o }) {
|
|
3181
|
-
const t = s, n = o, e = N(!1), l = no(t, "modelValue"),
|
|
3183
|
+
const t = s, n = o, e = N(!1), l = no(t, "modelValue"), v = N(Object.keys(io.icons)), _ = N("ri-"), w = N(), $ = ce(v.value, !0), m = N(35), p = N(1), E = N(0), k = N(""), I = () => {
|
|
3182
3184
|
w.value = "corner-down-right-fill", l.value && (w.value = l.value.split(":")[1]);
|
|
3183
|
-
}, M = de(() =>
|
|
3184
|
-
|
|
3185
|
-
|
|
3186
|
-
)),
|
|
3187
|
-
if (l.value ===
|
|
3185
|
+
}, M = de(() => p.value === 1 ? $.filter((i) => i.includes(k.value)).slice(p.value - 1, m.value) : $.filter((i) => i.includes(k.value)).slice(
|
|
3186
|
+
m.value * (p.value - 1),
|
|
3187
|
+
m.value * (p.value - 1) + m.value
|
|
3188
|
+
)), c = de(() => (i) => {
|
|
3189
|
+
if (l.value === _.value + i)
|
|
3188
3190
|
return {
|
|
3189
3191
|
borderColor: "var(--el-color-primary)",
|
|
3190
3192
|
color: "var(--el-color-primary)"
|
|
3191
3193
|
};
|
|
3192
3194
|
});
|
|
3193
|
-
function L(
|
|
3194
|
-
w.value =
|
|
3195
|
+
function L(i) {
|
|
3196
|
+
w.value = i, n("update:modelValue", S()), f();
|
|
3195
3197
|
}
|
|
3196
|
-
function
|
|
3197
|
-
|
|
3198
|
+
function D(i) {
|
|
3199
|
+
p.value = i;
|
|
3198
3200
|
}
|
|
3199
|
-
const S = () =>
|
|
3201
|
+
const S = () => _.value === "ri-" ? "ri:" + w.value : _.value + w.value, r = () => {
|
|
3200
3202
|
w.value = "corner-down-right-fill", n("update:modelValue", "");
|
|
3201
|
-
},
|
|
3202
|
-
|
|
3203
|
-
(
|
|
3203
|
+
}, a = () => {
|
|
3204
|
+
p.value === 1 ? E.value = $.filter(
|
|
3205
|
+
(i) => i.includes(k.value)
|
|
3204
3206
|
).length : E.value = $.length;
|
|
3205
|
-
},
|
|
3207
|
+
}, f = () => {
|
|
3206
3208
|
e.value = !1, k.value = "";
|
|
3207
3209
|
};
|
|
3208
|
-
return
|
|
3210
|
+
return Be(
|
|
3209
3211
|
() => t.modelValue,
|
|
3210
3212
|
() => {
|
|
3211
3213
|
t.modelValue && (w.value = t.modelValue.substring(
|
|
3212
3214
|
t.modelValue.indexOf(":") + 1
|
|
3213
3215
|
));
|
|
3214
3216
|
}
|
|
3215
|
-
),
|
|
3217
|
+
), Be(
|
|
3216
3218
|
() => k.value,
|
|
3217
3219
|
() => {
|
|
3218
|
-
|
|
3220
|
+
p.value = 1, a();
|
|
3219
3221
|
}
|
|
3220
|
-
),
|
|
3221
|
-
|
|
3222
|
-
}), (
|
|
3223
|
-
const
|
|
3222
|
+
), Fe(() => {
|
|
3223
|
+
a(), I();
|
|
3224
|
+
}), (i, y) => {
|
|
3225
|
+
const C = V("IconifyIconOffline"), B = V("el-input"), A = V("el-divider"), d = V("el-scrollbar"), u = V("el-pagination"), h = V("vxe-button"), g = V("el-popover");
|
|
3224
3226
|
return T(), F("div", Bs, [
|
|
3225
|
-
U(
|
|
3227
|
+
U(B, {
|
|
3226
3228
|
modelValue: l.value,
|
|
3227
|
-
"onUpdate:modelValue":
|
|
3229
|
+
"onUpdate:modelValue": y[2] || (y[2] = (b) => l.value = b),
|
|
3228
3230
|
readonly: "",
|
|
3229
3231
|
size: "small",
|
|
3230
3232
|
class: "u-icon-input relative"
|
|
@@ -3233,79 +3235,79 @@ const On = {
|
|
|
3233
3235
|
l.value ? (T(), F("span", {
|
|
3234
3236
|
key: 0,
|
|
3235
3237
|
class: "u-icon-close item-center justify-center text-sm hidden absolute",
|
|
3236
|
-
onClick:
|
|
3238
|
+
onClick: r
|
|
3237
3239
|
}, [
|
|
3238
|
-
U(
|
|
3240
|
+
U(C, { icon: "ri:close-circle-line" })
|
|
3239
3241
|
])) : ee("", !0),
|
|
3240
|
-
U(
|
|
3242
|
+
U(g, {
|
|
3241
3243
|
visible: e.value,
|
|
3242
3244
|
width: 350,
|
|
3243
3245
|
"popper-options": { placement: "auto" },
|
|
3244
3246
|
teleported: t.teleported,
|
|
3245
3247
|
trigger: "click",
|
|
3246
3248
|
"popper-class": "udp-popper",
|
|
3247
|
-
onHide:
|
|
3249
|
+
onHide: f
|
|
3248
3250
|
}, {
|
|
3249
3251
|
reference: W(() => [
|
|
3250
|
-
|
|
3252
|
+
x("div", {
|
|
3251
3253
|
class: "w-7 h-full cursor-pointer flex justify-center items-center",
|
|
3252
|
-
onClick:
|
|
3254
|
+
onClick: y[0] || (y[0] = (b) => e.value = !e.value)
|
|
3253
3255
|
}, [
|
|
3254
|
-
|
|
3255
|
-
class: Ce(
|
|
3256
|
+
x("i", {
|
|
3257
|
+
class: Ce(_.value + w.value),
|
|
3256
3258
|
style: { "font-size": "16px" }
|
|
3257
3259
|
}, null, 2)
|
|
3258
3260
|
])
|
|
3259
3261
|
]),
|
|
3260
3262
|
default: W(() => [
|
|
3261
|
-
|
|
3262
|
-
U(
|
|
3263
|
+
x("div", Rs, [
|
|
3264
|
+
U(B, {
|
|
3263
3265
|
modelValue: k.value,
|
|
3264
|
-
"onUpdate:modelValue":
|
|
3266
|
+
"onUpdate:modelValue": y[1] || (y[1] = (b) => k.value = b),
|
|
3265
3267
|
class: "p-2",
|
|
3266
3268
|
placeholder: "搜索图标",
|
|
3267
3269
|
clearable: ""
|
|
3268
3270
|
}, null, 8, ["modelValue"])
|
|
3269
3271
|
]),
|
|
3270
|
-
U(
|
|
3271
|
-
U(
|
|
3272
|
+
U(A, { "border-style": "dashed" }),
|
|
3273
|
+
U(d, { height: "220px" }, {
|
|
3272
3274
|
default: W(() => [
|
|
3273
|
-
|
|
3274
|
-
(T(!0), F(ae, null, se(M.value, (
|
|
3275
|
-
key:
|
|
3276
|
-
title:
|
|
3275
|
+
x("ul", Os, [
|
|
3276
|
+
(T(!0), F(ae, null, se(M.value, (b, O) => (T(), F("li", {
|
|
3277
|
+
key: O,
|
|
3278
|
+
title: b,
|
|
3277
3279
|
class: "icon-item p-2 cursor-pointer mr-2 mt-1 flex justify-center items-center border border-[#e5e7eb]",
|
|
3278
|
-
style: ne(
|
|
3279
|
-
onClick: (Y) => L(
|
|
3280
|
+
style: ne(c.value(b)),
|
|
3281
|
+
onClick: (Y) => L(b)
|
|
3280
3282
|
}, [
|
|
3281
|
-
|
|
3282
|
-
class: Ce([
|
|
3283
|
+
x("i", {
|
|
3284
|
+
class: Ce([_.value + b, "w-5 h-5 text-xl"])
|
|
3283
3285
|
}, null, 2)
|
|
3284
|
-
], 12,
|
|
3286
|
+
], 12, zs))), 128))
|
|
3285
3287
|
])
|
|
3286
3288
|
]),
|
|
3287
3289
|
_: 1
|
|
3288
3290
|
}),
|
|
3289
|
-
U(
|
|
3290
|
-
|
|
3291
|
-
U(
|
|
3291
|
+
U(A, { "border-style": "dashed" }),
|
|
3292
|
+
x("div", Us, [
|
|
3293
|
+
U(u, {
|
|
3292
3294
|
class: "flex-auto ml-2",
|
|
3293
3295
|
total: E.value,
|
|
3294
|
-
"current-page":
|
|
3295
|
-
"page-size":
|
|
3296
|
+
"current-page": p.value,
|
|
3297
|
+
"page-size": m.value,
|
|
3296
3298
|
"pager-count": 5,
|
|
3297
3299
|
layout: "pager",
|
|
3298
3300
|
background: "",
|
|
3299
3301
|
small: "",
|
|
3300
|
-
onCurrentChange:
|
|
3302
|
+
onCurrentChange: D
|
|
3301
3303
|
}, null, 8, ["total", "current-page", "page-size"]),
|
|
3302
|
-
U(
|
|
3304
|
+
U(h, {
|
|
3303
3305
|
class: "justify-end mr-2 ml-2",
|
|
3304
3306
|
status: "danger",
|
|
3305
3307
|
size: "small",
|
|
3306
3308
|
mode: "text",
|
|
3307
3309
|
content: "取消",
|
|
3308
|
-
onClick:
|
|
3310
|
+
onClick: f
|
|
3309
3311
|
})
|
|
3310
3312
|
])
|
|
3311
3313
|
]),
|
|
@@ -3320,18 +3322,18 @@ const On = {
|
|
|
3320
3322
|
}), Ws = /* @__PURE__ */ Te(js, [["__scopeId", "data-v-e81401cc"]]), Ys = ue(Ws), qs = { class: "op-calendar-pc" }, Hs = { class: "op-calendar-pc-box flex" }, Gs = { class: "op-calendar-pc-left flex-[2]" }, Xs = {
|
|
3321
3323
|
class: "op-calendar-pc-select-box",
|
|
3322
3324
|
style: { visibility: "visible" }
|
|
3323
|
-
}, Ks = { class: "op-calendar-pc-holiday-box" }, Js = { class: "op-calendar-pc-year-box" }, Qs = { class: "op-calendar-pc-month-box" }, Zs = { class: "flex w-full" }, el = /* @__PURE__ */
|
|
3325
|
+
}, Ks = { class: "op-calendar-pc-holiday-box" }, Js = { class: "op-calendar-pc-year-box" }, Qs = { class: "op-calendar-pc-month-box" }, Zs = { class: "flex w-full" }, el = /* @__PURE__ */ x("i", { class: "vxe-icon-arrow-left" }, null, -1), tl = [
|
|
3324
3326
|
el
|
|
3325
|
-
], ol = /* @__PURE__ */
|
|
3327
|
+
], ol = /* @__PURE__ */ x("i", { class: "vxe-icon-arrow-right" }, null, -1), nl = [
|
|
3326
3328
|
ol
|
|
3327
|
-
], sl = { class: "op-calendar-pc-table-box" }, ll = { class: "op-calendar-pc-table" }, al = /* @__PURE__ */
|
|
3328
|
-
/* @__PURE__ */
|
|
3329
|
-
/* @__PURE__ */
|
|
3330
|
-
/* @__PURE__ */
|
|
3331
|
-
/* @__PURE__ */
|
|
3332
|
-
/* @__PURE__ */
|
|
3333
|
-
/* @__PURE__ */
|
|
3334
|
-
/* @__PURE__ */
|
|
3329
|
+
], sl = { class: "op-calendar-pc-table-box" }, ll = { class: "op-calendar-pc-table" }, al = /* @__PURE__ */ x("tr", { style: { "text-align": "center" } }, [
|
|
3330
|
+
/* @__PURE__ */ x("th", null, "一"),
|
|
3331
|
+
/* @__PURE__ */ x("th", null, "二"),
|
|
3332
|
+
/* @__PURE__ */ x("th", null, "三"),
|
|
3333
|
+
/* @__PURE__ */ x("th", null, "四"),
|
|
3334
|
+
/* @__PURE__ */ x("th", null, "五"),
|
|
3335
|
+
/* @__PURE__ */ x("th", { class: "op-calendar-pc-table-weekend" }, "六"),
|
|
3336
|
+
/* @__PURE__ */ x("th", { class: "op-calendar-pc-table-weekend" }, "日")
|
|
3335
3337
|
], -1), il = { class: "op-calendar-pc-relative" }, rl = ["date"], cl = {
|
|
3336
3338
|
key: 0,
|
|
3337
3339
|
class: "op-calendar-pc-table-holiday-sign"
|
|
@@ -3344,11 +3346,11 @@ const On = {
|
|
|
3344
3346
|
}, yl = {
|
|
3345
3347
|
key: 1,
|
|
3346
3348
|
class: "op-calendar-pc-right-holid1"
|
|
3347
|
-
}, _l = /* @__PURE__ */
|
|
3348
|
-
/* @__PURE__ */
|
|
3349
|
-
/* @__PURE__ */
|
|
3350
|
-
/* @__PURE__ */
|
|
3351
|
-
], -1), wl = /* @__PURE__ */
|
|
3349
|
+
}, _l = /* @__PURE__ */ x("div", { class: "op-calendar-pc-right-almanacbox flex justify-center items-center" }, [
|
|
3350
|
+
/* @__PURE__ */ x("div", { style: { "writing-mode": "vertical-lr", "letter-spacing": "5px" } }, " 每天都有一点进步😊 "),
|
|
3351
|
+
/* @__PURE__ */ x("div", { style: { "writing-mode": "vertical-lr", "letter-spacing": "5px" } }, " 每天都有一点进步😝 "),
|
|
3352
|
+
/* @__PURE__ */ x("div", { style: { "writing-mode": "vertical-lr", "letter-spacing": "5px" } }, " 每天都有一点收获😋 ")
|
|
3353
|
+
], -1), wl = /* @__PURE__ */ x("div", { class: "op-calendar-pc-holidaytip" }, null, -1), bl = {
|
|
3352
3354
|
name: "UtCalendar"
|
|
3353
3355
|
}, kl = /* @__PURE__ */ K({
|
|
3354
3356
|
...bl,
|
|
@@ -3368,113 +3370,113 @@ const On = {
|
|
|
3368
3370
|
}
|
|
3369
3371
|
},
|
|
3370
3372
|
setup(s) {
|
|
3371
|
-
const o = N(""), t = N([]), n = s, e = N(""), l = N(""),
|
|
3373
|
+
const o = N(""), t = N([]), n = s, e = N(""), l = N(""), v = N("2023"), _ = N(""), w = [], $ = N({}), m = /* @__PURE__ */ new Date();
|
|
3372
3374
|
$.value = Ue.solar2lunar(
|
|
3373
|
-
|
|
3374
|
-
|
|
3375
|
-
|
|
3375
|
+
m.getFullYear(),
|
|
3376
|
+
m.getMonth() + 1,
|
|
3377
|
+
m.getDate()
|
|
3376
3378
|
);
|
|
3377
|
-
for (let
|
|
3378
|
-
w.push({ value: `${
|
|
3379
|
-
const
|
|
3380
|
-
for (let
|
|
3381
|
-
|
|
3382
|
-
const E = (
|
|
3383
|
-
|
|
3384
|
-
}, k = (
|
|
3385
|
-
|
|
3386
|
-
}, I = (
|
|
3387
|
-
l.value =
|
|
3379
|
+
for (let C = n.range[0]; C < n.range[1]; C++)
|
|
3380
|
+
w.push({ value: `${C}`, text: C + "年" });
|
|
3381
|
+
const p = [];
|
|
3382
|
+
for (let C = 1; C <= 12; C++)
|
|
3383
|
+
p.push({ value: `${C < 10 ? 0 : ""}${C}`, text: C + "月" });
|
|
3384
|
+
const E = (C) => {
|
|
3385
|
+
C === "next" ? o.value = me(o.value).add(1, "month").format(`YYYY-MM-${e.value}`) : o.value = me(o.value).subtract(1, "month").format(`YYYY-MM-${e.value}`), l.value = me(o.value).format("MM"), Pe(D);
|
|
3386
|
+
}, k = (C) => {
|
|
3387
|
+
v.value = C, o.value = me(o.value).format(`${C}-MM-DD`), Pe(D);
|
|
3388
|
+
}, I = (C) => {
|
|
3389
|
+
l.value = C, o.value = me(o.value).format(`YYYY-${C}-DD`), Pe(D);
|
|
3388
3390
|
}, M = () => {
|
|
3389
3391
|
o.value = me().format("YYYY-MM-DD");
|
|
3390
|
-
const { day:
|
|
3391
|
-
|
|
3392
|
-
},
|
|
3393
|
-
|
|
3392
|
+
const { day: C, month: B, year: A } = r();
|
|
3393
|
+
v.value = A, l.value = B, e.value = C;
|
|
3394
|
+
}, c = (C) => {
|
|
3395
|
+
C && (o.value = C);
|
|
3394
3396
|
}, L = () => {
|
|
3395
|
-
M(), n.date && (o.value = n.date),
|
|
3396
|
-
},
|
|
3397
|
-
const
|
|
3398
|
-
let
|
|
3399
|
-
const
|
|
3400
|
-
let
|
|
3401
|
-
|
|
3402
|
-
for (let
|
|
3403
|
-
|
|
3404
|
-
const { day: Y, month: te, year: pe } =
|
|
3397
|
+
M(), n.date && (o.value = n.date), D();
|
|
3398
|
+
}, D = () => {
|
|
3399
|
+
const C = v.value, B = l.value, A = 1;
|
|
3400
|
+
let d = [];
|
|
3401
|
+
const u = 42, h = new Date([C, B, A].join("-"));
|
|
3402
|
+
let g = [C, B, A].join("-"), b = h.getDay();
|
|
3403
|
+
b = b == 0 ? 7 : b;
|
|
3404
|
+
for (let O = 1; O < b; O++) {
|
|
3405
|
+
g = me(g).subtract(1, "day").format("YYYY-MM-DD");
|
|
3406
|
+
const { day: Y, month: te, year: pe } = r(g), q = Ue.solar2lunar(pe, te, Y);
|
|
3405
3407
|
if (q === -1) return {};
|
|
3406
3408
|
let { Term: J } = q;
|
|
3407
|
-
const { IDayCn:
|
|
3408
|
-
|
|
3409
|
-
const { isWorkDay: Q, isRestDay: re } = S(H, j,
|
|
3410
|
-
|
|
3411
|
-
day:
|
|
3412
|
-
date:
|
|
3413
|
-
d_day: J ||
|
|
3414
|
-
isSelectClass: o.value ==
|
|
3409
|
+
const { IDayCn: z, IMonthCn: P, cDay: R, cMonth: j, cYear: H } = q;
|
|
3410
|
+
y[j] && y[j][R] && (J = y[j][R]), i[P] && i[P][z] && (J = i[P][z]);
|
|
3411
|
+
const { isWorkDay: Q, isRestDay: re } = S(H, j, R);
|
|
3412
|
+
d.push({
|
|
3413
|
+
day: g.split("-")[2],
|
|
3414
|
+
date: g,
|
|
3415
|
+
d_day: J || z,
|
|
3416
|
+
isSelectClass: o.value == g,
|
|
3415
3417
|
otherMonth: !0,
|
|
3416
3418
|
hasTerm: J,
|
|
3417
|
-
isWeekend: (new Date(
|
|
3419
|
+
isWeekend: (new Date(g).getDay() == 6 || new Date(g).getDay() == 0) && !Q,
|
|
3418
3420
|
isWorkDay: Q,
|
|
3419
3421
|
isRestDay: re
|
|
3420
3422
|
});
|
|
3421
3423
|
}
|
|
3422
|
-
|
|
3423
|
-
for (let
|
|
3424
|
-
const { day: Y, month: te, year: pe } =
|
|
3424
|
+
g = [C, B, A].join("-"), d = d.reverse();
|
|
3425
|
+
for (let O = 0; O <= u - b; O++) {
|
|
3426
|
+
const { day: Y, month: te, year: pe } = r(g), q = Ue.solar2lunar(pe, te, Y);
|
|
3425
3427
|
if (q === -1) return {};
|
|
3426
3428
|
let { Term: J } = q;
|
|
3427
|
-
const { IDayCn:
|
|
3428
|
-
|
|
3429
|
-
const { isWorkDay: Q, isRestDay: re } = S(H, j,
|
|
3430
|
-
|
|
3431
|
-
date:
|
|
3429
|
+
const { IDayCn: z, IMonthCn: P, cDay: R, cMonth: j, cYear: H } = q;
|
|
3430
|
+
y[j] && y[j][R] && (J = y[j][R]), i[P] && i[P][z] && (J = i[P][z]);
|
|
3431
|
+
const { isWorkDay: Q, isRestDay: re } = S(H, j, R);
|
|
3432
|
+
d.push({
|
|
3433
|
+
date: g,
|
|
3432
3434
|
day: Y,
|
|
3433
|
-
d_day: J ||
|
|
3434
|
-
isSelectClass: o.value ==
|
|
3435
|
+
d_day: J || z,
|
|
3436
|
+
isSelectClass: o.value == g,
|
|
3435
3437
|
otherMonth: te != l.value,
|
|
3436
3438
|
hasTerm: J,
|
|
3437
|
-
isWeekend: (new Date(
|
|
3439
|
+
isWeekend: (new Date(g).getDay() == 6 || new Date(g).getDay() == 0) && !Q,
|
|
3438
3440
|
isWorkDay: Q,
|
|
3439
3441
|
isRestDay: re
|
|
3440
|
-
}),
|
|
3442
|
+
}), g = me(g).add(1, "day").format("YYYY-MM-DD");
|
|
3441
3443
|
}
|
|
3442
3444
|
t.value = [];
|
|
3443
|
-
for (let
|
|
3444
|
-
t.value.push(
|
|
3445
|
+
for (let O = 0; O <= 5; O++)
|
|
3446
|
+
t.value.push(d.splice(0, 7));
|
|
3445
3447
|
console.log(t);
|
|
3446
|
-
}, S = (
|
|
3447
|
-
var
|
|
3448
|
-
let
|
|
3449
|
-
const
|
|
3450
|
-
return
|
|
3451
|
-
},
|
|
3452
|
-
const
|
|
3453
|
-
return { day:
|
|
3448
|
+
}, S = (C, B, A) => {
|
|
3449
|
+
var b;
|
|
3450
|
+
let d, u;
|
|
3451
|
+
const h = ((b = n.holidays) == null ? void 0 : b.find((O) => O[C])) || {}, g = h[C] && h[C][B] ? h[C][B][A] : "";
|
|
3452
|
+
return g === "班" ? d = !0 : g === "假" && (u = !0), { isRestDay: u, isWorkDay: d };
|
|
3453
|
+
}, r = (C) => {
|
|
3454
|
+
const B = me(C || Date.now()).format("DD"), A = me(C || Date.now()).format("YYYY"), d = me(C || Date.now()).format("MM"), u = `${A}-${d}-${B}` === me().format("YYYY-MM-DD");
|
|
3455
|
+
return { day: B, month: d, year: A, isToday: u };
|
|
3454
3456
|
};
|
|
3455
|
-
|
|
3457
|
+
Fe(() => {
|
|
3456
3458
|
L();
|
|
3457
|
-
}),
|
|
3458
|
-
const { day:
|
|
3459
|
-
|
|
3460
|
-
const
|
|
3461
|
-
|
|
3459
|
+
}), Be(o, (C) => {
|
|
3460
|
+
const { day: B, month: A, year: d } = r(C);
|
|
3461
|
+
v.value = d, l.value = A;
|
|
3462
|
+
const u = Ue.solar2lunar(
|
|
3463
|
+
v.value,
|
|
3462
3464
|
l.value,
|
|
3463
|
-
|
|
3465
|
+
B
|
|
3464
3466
|
);
|
|
3465
|
-
if (
|
|
3467
|
+
if (u === -1) return {};
|
|
3466
3468
|
$.value = {
|
|
3467
|
-
...
|
|
3468
|
-
lunarFestival:
|
|
3469
|
-
festival:
|
|
3470
|
-
},
|
|
3469
|
+
...u,
|
|
3470
|
+
lunarFestival: i[u.IMonthCn] ? i[u.IMonthCn][u.IDayCn] : void 0,
|
|
3471
|
+
festival: y[u.cMonth] ? y[u.cMonth][u.cDay] : void 0
|
|
3472
|
+
}, Pe(D);
|
|
3471
3473
|
});
|
|
3472
|
-
const
|
|
3473
|
-
const
|
|
3474
|
-
console.log(
|
|
3475
|
-
},
|
|
3474
|
+
const a = (C) => {
|
|
3475
|
+
const B = C.target.parentNode.getAttribute("date") ? C.target.parentNode.getAttribute("date") : C.target.getAttribute("date");
|
|
3476
|
+
console.log(B), o.value = B;
|
|
3477
|
+
}, f = () => {
|
|
3476
3478
|
M();
|
|
3477
|
-
},
|
|
3479
|
+
}, i = {
|
|
3478
3480
|
正月: { 初一: "春节", 十五: "元宵节" },
|
|
3479
3481
|
二月: { 初二: "春龙节" },
|
|
3480
3482
|
五月: { 初五: "端午节" },
|
|
@@ -3482,7 +3484,7 @@ const On = {
|
|
|
3482
3484
|
八月: { 十五: "中秋节" },
|
|
3483
3485
|
九月: { 初九: "重阳节" },
|
|
3484
3486
|
腊月: { 初八: "腊八节", 廿三: "小年", 三十: "除夕" }
|
|
3485
|
-
},
|
|
3487
|
+
}, y = {
|
|
3486
3488
|
1: { 1: "元旦" },
|
|
3487
3489
|
2: { 14: "情人节" },
|
|
3488
3490
|
3: { 8: "妇女节" },
|
|
@@ -3494,107 +3496,107 @@ const On = {
|
|
|
3494
3496
|
9: { 10: "教师节" },
|
|
3495
3497
|
10: { 1: "国庆节" }
|
|
3496
3498
|
};
|
|
3497
|
-
return (
|
|
3498
|
-
const
|
|
3499
|
+
return (C, B) => {
|
|
3500
|
+
const A = V("el-option"), d = V("el-select");
|
|
3499
3501
|
return T(), F("div", qs, [
|
|
3500
|
-
|
|
3501
|
-
|
|
3502
|
-
|
|
3503
|
-
|
|
3504
|
-
U(
|
|
3505
|
-
modelValue:
|
|
3506
|
-
"onUpdate:modelValue":
|
|
3502
|
+
x("div", Hs, [
|
|
3503
|
+
x("div", Gs, [
|
|
3504
|
+
x("div", Xs, [
|
|
3505
|
+
x("div", Ks, [
|
|
3506
|
+
U(d, {
|
|
3507
|
+
modelValue: _.value,
|
|
3508
|
+
"onUpdate:modelValue": B[0] || (B[0] = (u) => _.value = u),
|
|
3507
3509
|
style: { width: "80px" },
|
|
3508
3510
|
clearable: "",
|
|
3509
3511
|
placeholder: "假期",
|
|
3510
|
-
onChange:
|
|
3512
|
+
onChange: c
|
|
3511
3513
|
}, {
|
|
3512
3514
|
default: W(() => [
|
|
3513
|
-
(T(!0), F(ae, null, se(s.statutoryHoliday, (
|
|
3514
|
-
key:
|
|
3515
|
-
value:
|
|
3516
|
-
label:
|
|
3515
|
+
(T(!0), F(ae, null, se(s.statutoryHoliday, (u) => (T(), ie(A, {
|
|
3516
|
+
key: u.date,
|
|
3517
|
+
value: u.date,
|
|
3518
|
+
label: u.name
|
|
3517
3519
|
}, null, 8, ["value", "label"]))), 128))
|
|
3518
3520
|
]),
|
|
3519
3521
|
_: 1
|
|
3520
3522
|
}, 8, ["modelValue"])
|
|
3521
3523
|
]),
|
|
3522
|
-
|
|
3523
|
-
U(
|
|
3524
|
-
modelValue:
|
|
3525
|
-
"onUpdate:modelValue":
|
|
3524
|
+
x("div", Js, [
|
|
3525
|
+
U(d, {
|
|
3526
|
+
modelValue: v.value,
|
|
3527
|
+
"onUpdate:modelValue": B[1] || (B[1] = (u) => v.value = u),
|
|
3526
3528
|
style: { width: "80px" },
|
|
3527
3529
|
onChange: k
|
|
3528
3530
|
}, {
|
|
3529
3531
|
default: W(() => [
|
|
3530
|
-
(T(), F(ae, null, se(w, (
|
|
3531
|
-
key:
|
|
3532
|
-
value:
|
|
3533
|
-
label:
|
|
3532
|
+
(T(), F(ae, null, se(w, (u) => U(A, {
|
|
3533
|
+
key: u.value,
|
|
3534
|
+
value: u.value,
|
|
3535
|
+
label: u.text
|
|
3534
3536
|
}, null, 8, ["value", "label"])), 64))
|
|
3535
3537
|
]),
|
|
3536
3538
|
_: 1
|
|
3537
3539
|
}, 8, ["modelValue"])
|
|
3538
3540
|
]),
|
|
3539
|
-
|
|
3540
|
-
|
|
3541
|
-
|
|
3541
|
+
x("div", Qs, [
|
|
3542
|
+
x("div", Zs, [
|
|
3543
|
+
x("div", {
|
|
3542
3544
|
class: "op-calendar-pc-prev-month",
|
|
3543
|
-
onClick:
|
|
3545
|
+
onClick: B[2] || (B[2] = (u) => E("prev"))
|
|
3544
3546
|
}, tl),
|
|
3545
|
-
U(
|
|
3547
|
+
U(d, {
|
|
3546
3548
|
modelValue: l.value,
|
|
3547
|
-
"onUpdate:modelValue":
|
|
3549
|
+
"onUpdate:modelValue": B[3] || (B[3] = (u) => l.value = u),
|
|
3548
3550
|
style: { width: "60px" },
|
|
3549
3551
|
onChange: I
|
|
3550
3552
|
}, {
|
|
3551
3553
|
default: W(() => [
|
|
3552
|
-
(T(), F(ae, null, se(
|
|
3553
|
-
key:
|
|
3554
|
-
value:
|
|
3555
|
-
label:
|
|
3554
|
+
(T(), F(ae, null, se(p, (u) => U(A, {
|
|
3555
|
+
key: u.value,
|
|
3556
|
+
value: u.value,
|
|
3557
|
+
label: u.text
|
|
3556
3558
|
}, null, 8, ["value", "label"])), 64))
|
|
3557
3559
|
]),
|
|
3558
3560
|
_: 1
|
|
3559
3561
|
}, 8, ["modelValue"]),
|
|
3560
|
-
|
|
3562
|
+
x("div", {
|
|
3561
3563
|
class: "op-calendar-pc-next-month",
|
|
3562
|
-
onClick:
|
|
3564
|
+
onClick: B[4] || (B[4] = (u) => E("next"))
|
|
3563
3565
|
}, nl)
|
|
3564
3566
|
])
|
|
3565
3567
|
]),
|
|
3566
|
-
|
|
3568
|
+
x("span", {
|
|
3567
3569
|
class: "op-calendar-pc-backtoday OP_LOG_BTN",
|
|
3568
3570
|
hidefocus: "true",
|
|
3569
|
-
onClick:
|
|
3571
|
+
onClick: f
|
|
3570
3572
|
}, "今天")
|
|
3571
3573
|
]),
|
|
3572
|
-
|
|
3573
|
-
|
|
3574
|
-
|
|
3574
|
+
x("div", sl, [
|
|
3575
|
+
x("table", ll, [
|
|
3576
|
+
x("tbody", null, [
|
|
3575
3577
|
al,
|
|
3576
|
-
(T(!0), F(ae, null, se(t.value, (
|
|
3577
|
-
(T(!0), F(ae, null, se(
|
|
3578
|
-
key:
|
|
3578
|
+
(T(!0), F(ae, null, se(t.value, (u, h) => (T(), F("tr", { key: h }, [
|
|
3579
|
+
(T(!0), F(ae, null, se(u, (g) => (T(), F("td", {
|
|
3580
|
+
key: g.date
|
|
3579
3581
|
}, [
|
|
3580
|
-
|
|
3581
|
-
|
|
3582
|
+
x("div", il, [
|
|
3583
|
+
x("a", {
|
|
3582
3584
|
href: "javascript:void(0);",
|
|
3583
3585
|
class: Ce({
|
|
3584
|
-
"op-calendar-pc-table-selected":
|
|
3585
|
-
"op-calendar-pc-table-other-month":
|
|
3586
|
-
"op-calendar-pc-table-festival":
|
|
3587
|
-
"op-calendar-pc-table-weekend":
|
|
3588
|
-
"op-calendar-pc-table-work":
|
|
3589
|
-
"op-calendar-pc-table-rest":
|
|
3586
|
+
"op-calendar-pc-table-selected": g.isSelectClass,
|
|
3587
|
+
"op-calendar-pc-table-other-month": g.otherMonth,
|
|
3588
|
+
"op-calendar-pc-table-festival": g.hasTerm,
|
|
3589
|
+
"op-calendar-pc-table-weekend": g.isWeekend,
|
|
3590
|
+
"op-calendar-pc-table-work": g.isWorkDay,
|
|
3591
|
+
"op-calendar-pc-table-rest": g.isRestDay
|
|
3590
3592
|
}),
|
|
3591
|
-
date:
|
|
3592
|
-
onClick:
|
|
3593
|
+
date: g.date,
|
|
3594
|
+
onClick: a
|
|
3593
3595
|
}, [
|
|
3594
|
-
|
|
3595
|
-
|
|
3596
|
-
|
|
3597
|
-
|
|
3596
|
+
g.isWorkDay ? (T(), F("span", cl, "班")) : ee("", !0),
|
|
3597
|
+
g.isRestDay ? (T(), F("span", dl, "休")) : ee("", !0),
|
|
3598
|
+
x("span", ul, G(g.day), 1),
|
|
3599
|
+
x("span", fl, G(g.d_day), 1)
|
|
3598
3600
|
], 10, rl)
|
|
3599
3601
|
])
|
|
3600
3602
|
]))), 128))
|
|
@@ -3603,13 +3605,13 @@ const On = {
|
|
|
3603
3605
|
])
|
|
3604
3606
|
])
|
|
3605
3607
|
]),
|
|
3606
|
-
|
|
3607
|
-
|
|
3608
|
-
|
|
3609
|
-
|
|
3610
|
-
|
|
3611
|
-
|
|
3612
|
-
|
|
3608
|
+
x("div", ml, [
|
|
3609
|
+
x("p", pl, G(o.value), 1),
|
|
3610
|
+
x("p", hl, G($.value.cDay), 1),
|
|
3611
|
+
x("p", gl, [
|
|
3612
|
+
x("span", null, G($.value.IMonthCn) + G($.value.IDayCn), 1),
|
|
3613
|
+
x("span", null, G($.value.gzYear) + "年 " + G($.value.animal), 1),
|
|
3614
|
+
x("span", null, G($.value.gzMonth) + "月 " + G($.value.gzDay) + "日", 1)
|
|
3613
3615
|
]),
|
|
3614
3616
|
$.value.lunarFestival ? (T(), F("p", vl, G($.value.lunarFestival), 1)) : ee("", !0),
|
|
3615
3617
|
$.value.festival ? (T(), F("p", yl, G($.value.festival), 1)) : ee("", !0),
|
|
@@ -3720,14 +3722,14 @@ const On = {
|
|
|
3720
3722
|
}
|
|
3721
3723
|
},
|
|
3722
3724
|
setup(s) {
|
|
3723
|
-
Et((
|
|
3724
|
-
|
|
3725
|
-
|
|
3726
|
-
|
|
3727
|
-
"
|
|
3728
|
-
"
|
|
3725
|
+
Et((r) => ({
|
|
3726
|
+
"44415a3d": m.value,
|
|
3727
|
+
a9d7fb48: p.value,
|
|
3728
|
+
"20c78442": w.value,
|
|
3729
|
+
"0c88abd5": $.value,
|
|
3730
|
+
"776de546": _.value
|
|
3729
3731
|
}));
|
|
3730
|
-
const o = s, t = N(Math.trunc((/* @__PURE__ */ new Date()).getTime() / 1e3)), n = N(0), e = N(), l = N(0),
|
|
3732
|
+
const o = s, t = N(Math.trunc((/* @__PURE__ */ new Date()).getTime() / 1e3)), n = N(0), e = N(), l = N(0), v = N(!1), _ = N(o.secondFlipBackgroundColor), w = N(o.mainFlipBackgroundColor), $ = N(o.secondFlipColor), m = N(o.mainColor), p = N(o.labelColor), E = N([
|
|
3731
3733
|
{
|
|
3732
3734
|
current: 0,
|
|
3733
3735
|
previous: 0,
|
|
@@ -3757,50 +3759,50 @@ const On = {
|
|
|
3757
3759
|
show: o.showSeconds
|
|
3758
3760
|
}
|
|
3759
3761
|
]), k = () => {
|
|
3760
|
-
M(0, S), M(1,
|
|
3761
|
-
}, I = (
|
|
3762
|
-
if (
|
|
3762
|
+
M(0, S), M(1, D), M(2, L), M(3, c);
|
|
3763
|
+
}, I = (r) => r != null ? r.toString().length <= 1 ? "0" + r.toString() : r.toString() : "00", M = (r, a) => {
|
|
3764
|
+
if (r >= E.value.length || a === void 0)
|
|
3763
3765
|
return;
|
|
3764
|
-
const
|
|
3765
|
-
if (
|
|
3766
|
-
const
|
|
3767
|
-
if (
|
|
3768
|
-
for (const
|
|
3769
|
-
const
|
|
3770
|
-
if (
|
|
3771
|
-
if (!
|
|
3772
|
-
const
|
|
3773
|
-
|
|
3766
|
+
const f = E.value[r], i = a.value < 0 ? 0 : a.value, y = document.querySelector(`#${f.elementId}`);
|
|
3767
|
+
if (i !== f.current && (f.previous = f.current, f.current = i, y && (y.classList.remove("flip"), y.offsetWidth, y.classList.add("flip")), r === 0)) {
|
|
3768
|
+
const C = y.querySelectorAll("span b");
|
|
3769
|
+
if (C)
|
|
3770
|
+
for (const B of C) {
|
|
3771
|
+
const A = B.classList[0];
|
|
3772
|
+
if (a.value / 1e3 >= 1) {
|
|
3773
|
+
if (!A.includes("-4digits")) {
|
|
3774
|
+
const d = A + "-4digits";
|
|
3775
|
+
B.classList.add(d), B.classList.remove(A);
|
|
3774
3776
|
}
|
|
3775
|
-
} else if (
|
|
3776
|
-
const
|
|
3777
|
-
|
|
3777
|
+
} else if (A.includes("-4digits")) {
|
|
3778
|
+
const d = A.replace("-4digits", "");
|
|
3779
|
+
B.classList.add(d), B.classList.remove(A);
|
|
3778
3780
|
}
|
|
3779
3781
|
}
|
|
3780
3782
|
else
|
|
3781
3783
|
console.log("....");
|
|
3782
3784
|
}
|
|
3783
|
-
},
|
|
3784
|
-
return
|
|
3785
|
+
}, c = de(() => o.countdown ? Math.trunc(l.value) % 60 : Math.trunc(t.value) % 60), L = de(() => o.countdown ? Math.trunc(l.value / 60) % 60 : Math.trunc(t.value / 60) % 60), D = de(() => o.countdown ? Math.trunc(l.value / 60 / 60) % 24 : new Date(t.value * 1e3).getHours()), S = de(() => o.countdown ? Math.trunc(l.value / 60 / 60 / 24) : Math.trunc(t.value / 60 / 60 / 24));
|
|
3786
|
+
return Be(
|
|
3785
3787
|
() => o.deadline,
|
|
3786
|
-
(
|
|
3787
|
-
const
|
|
3788
|
-
if (n.value = Math.trunc(Date.parse(
|
|
3788
|
+
(r) => {
|
|
3789
|
+
const a = r;
|
|
3790
|
+
if (n.value = Math.trunc(Date.parse(a.replace(/-/g, "/")) / 1e3), !n.value)
|
|
3789
3791
|
throw new Error("Invalid props value, correct the 'deadline'");
|
|
3790
3792
|
}
|
|
3791
|
-
),
|
|
3793
|
+
), Be(t, () => {
|
|
3792
3794
|
o.countdown ? (l.value = n.value - t.value, l.value <= 0 || o.stop ? (l.value = 0, M(3, 0)) : k()) : k();
|
|
3793
|
-
}),
|
|
3794
|
-
|
|
3795
|
-
}),
|
|
3796
|
-
l.value !== 0 && (
|
|
3795
|
+
}), Be(l, (r) => {
|
|
3796
|
+
r == 0 && k();
|
|
3797
|
+
}), Fe(() => {
|
|
3798
|
+
l.value !== 0 && (v.value = !0);
|
|
3797
3799
|
}), qe(() => {
|
|
3798
3800
|
if (o.countdown) {
|
|
3799
3801
|
if (!o.deadline)
|
|
3800
3802
|
throw new Error("Missing props 'deadline'");
|
|
3801
|
-
const
|
|
3802
|
-
let
|
|
3803
|
-
if (o.deadlineDate != null && (
|
|
3803
|
+
const r = o.deadline;
|
|
3804
|
+
let a = Date.parse(r.replace(/-/g, "/"));
|
|
3805
|
+
if (o.deadlineDate != null && (a = Date.parse(o.deadlineDate.toDateString())), o.deadlineISO && (a = Date.parse(o.deadlineISO)), n.value = Math.trunc(a / 1e3), !n.value)
|
|
3804
3806
|
throw new Error("Invalid props value, correct the 'deadline'");
|
|
3805
3807
|
}
|
|
3806
3808
|
e.value = setInterval(() => {
|
|
@@ -3808,45 +3810,45 @@ const On = {
|
|
|
3808
3810
|
}, 1e3);
|
|
3809
3811
|
}), St(() => {
|
|
3810
3812
|
clearInterval(e.value);
|
|
3811
|
-
}), (
|
|
3812
|
-
(T(!0), F(ae, null, se(E.value, (
|
|
3813
|
-
key:
|
|
3814
|
-
id:
|
|
3813
|
+
}), (r, a) => (T(), F("div", xl, [
|
|
3814
|
+
(T(!0), F(ae, null, se(E.value, (f) => ge((T(), F("span", {
|
|
3815
|
+
key: f.label,
|
|
3816
|
+
id: f.elementId,
|
|
3815
3817
|
class: "flip-clock__piece"
|
|
3816
3818
|
}, [
|
|
3817
3819
|
s.flipAnimation ? (T(), F("div", $l, [
|
|
3818
|
-
|
|
3820
|
+
x("span", {
|
|
3819
3821
|
class: "flip-clock__card flip-card",
|
|
3820
3822
|
style: ne(s.countdownSize ? `font-size:${s.countdownSize}` : "")
|
|
3821
3823
|
}, [
|
|
3822
|
-
|
|
3823
|
-
|
|
3824
|
+
x("b", Tl, G(I(f.current)), 1),
|
|
3825
|
+
x("b", {
|
|
3824
3826
|
class: "flip-card__bottom",
|
|
3825
|
-
"data-value": I(
|
|
3827
|
+
"data-value": I(f.current)
|
|
3826
3828
|
}, null, 8, Ml),
|
|
3827
|
-
|
|
3829
|
+
x("b", {
|
|
3828
3830
|
class: "flip-card__back",
|
|
3829
|
-
"data-value": I(
|
|
3831
|
+
"data-value": I(f.previous)
|
|
3830
3832
|
}, null, 8, Sl),
|
|
3831
|
-
|
|
3833
|
+
x("b", {
|
|
3832
3834
|
class: "flip-card__back-bottom",
|
|
3833
|
-
"data-value": I(
|
|
3835
|
+
"data-value": I(f.previous)
|
|
3834
3836
|
}, null, 8, Il)
|
|
3835
3837
|
], 4)
|
|
3836
3838
|
])) : (T(), F("div", El, [
|
|
3837
|
-
|
|
3839
|
+
x("span", Fl, G(I(f.current)), 1)
|
|
3838
3840
|
])),
|
|
3839
3841
|
s.showLabels ? (T(), F("span", {
|
|
3840
3842
|
key: 2,
|
|
3841
3843
|
class: "flip-clock__slot",
|
|
3842
3844
|
style: ne(s.labelSize ? `font-size:${s.labelSize}` : "")
|
|
3843
|
-
}, G(
|
|
3845
|
+
}, G(f.label), 5)) : ee("", !0)
|
|
3844
3846
|
], 8, Dl)), [
|
|
3845
|
-
[we,
|
|
3847
|
+
[we, f.show]
|
|
3846
3848
|
])), 128))
|
|
3847
3849
|
]));
|
|
3848
3850
|
}
|
|
3849
|
-
}), Al = /* @__PURE__ */ Te(Ll, [["__scopeId", "data-v-
|
|
3851
|
+
}), Al = /* @__PURE__ */ Te(Ll, [["__scopeId", "data-v-0a3ab8ac"]]), Pl = ue(Al), Gt = Object.freeze(
|
|
3850
3852
|
{
|
|
3851
3853
|
left: 0,
|
|
3852
3854
|
top: 0,
|
|
@@ -3888,9 +3890,9 @@ function Bl(s, o) {
|
|
|
3888
3890
|
}
|
|
3889
3891
|
return t;
|
|
3890
3892
|
}
|
|
3891
|
-
const
|
|
3892
|
-
function
|
|
3893
|
-
o.split(
|
|
3893
|
+
const Rl = /[\s,]+/;
|
|
3894
|
+
function Ol(s, o) {
|
|
3895
|
+
o.split(Rl).forEach((t) => {
|
|
3894
3896
|
switch (t.trim()) {
|
|
3895
3897
|
case "horizontal":
|
|
3896
3898
|
s.hFlip = !0;
|
|
@@ -3901,7 +3903,7 @@ function zl(s, o) {
|
|
|
3901
3903
|
}
|
|
3902
3904
|
});
|
|
3903
3905
|
}
|
|
3904
|
-
function
|
|
3906
|
+
function zl(s, o = 0) {
|
|
3905
3907
|
const t = s.replace(/^-?[0-9.]*/, "");
|
|
3906
3908
|
function n(e) {
|
|
3907
3909
|
for (; e < 0; )
|
|
@@ -3939,16 +3941,16 @@ function wt(s, o, t) {
|
|
|
3939
3941
|
if (n === null || !n.length)
|
|
3940
3942
|
return s;
|
|
3941
3943
|
const e = [];
|
|
3942
|
-
let l = n.shift(),
|
|
3944
|
+
let l = n.shift(), v = Vl.test(l);
|
|
3943
3945
|
for (; ; ) {
|
|
3944
|
-
if (
|
|
3945
|
-
const
|
|
3946
|
-
isNaN(
|
|
3946
|
+
if (v) {
|
|
3947
|
+
const _ = parseFloat(l);
|
|
3948
|
+
isNaN(_) ? e.push(l) : e.push(Math.ceil(_ * o * t) / t);
|
|
3947
3949
|
} else
|
|
3948
3950
|
e.push(l);
|
|
3949
3951
|
if (l = n.shift(), l === void 0)
|
|
3950
3952
|
return e.join("");
|
|
3951
|
-
|
|
3953
|
+
v = !v;
|
|
3952
3954
|
}
|
|
3953
3955
|
}
|
|
3954
3956
|
function jl(s, o = "defs") {
|
|
@@ -3958,10 +3960,10 @@ function jl(s, o = "defs") {
|
|
|
3958
3960
|
const e = s.indexOf(">", n), l = s.indexOf("</" + o);
|
|
3959
3961
|
if (e === -1 || l === -1)
|
|
3960
3962
|
break;
|
|
3961
|
-
const
|
|
3962
|
-
if (
|
|
3963
|
+
const v = s.indexOf(">", l);
|
|
3964
|
+
if (v === -1)
|
|
3963
3965
|
break;
|
|
3964
|
-
t += s.slice(e + 1, l).trim(), s = s.slice(0, n).trim() + s.slice(
|
|
3966
|
+
t += s.slice(e + 1, l).trim(), s = s.slice(0, n).trim() + s.slice(v + 1);
|
|
3965
3967
|
}
|
|
3966
3968
|
return {
|
|
3967
3969
|
defs: t,
|
|
@@ -3991,44 +3993,44 @@ function Hl(s, o) {
|
|
|
3991
3993
|
};
|
|
3992
3994
|
let l = t.body;
|
|
3993
3995
|
[t, n].forEach((M) => {
|
|
3994
|
-
const
|
|
3996
|
+
const c = [], L = M.hFlip, D = M.vFlip;
|
|
3995
3997
|
let S = M.rotate;
|
|
3996
|
-
L ?
|
|
3998
|
+
L ? D ? S += 2 : (c.push(
|
|
3997
3999
|
"translate(" + (e.width + e.left).toString() + " " + (0 - e.top).toString() + ")"
|
|
3998
|
-
),
|
|
4000
|
+
), c.push("scale(-1 1)"), e.top = e.left = 0) : D && (c.push(
|
|
3999
4001
|
"translate(" + (0 - e.left).toString() + " " + (e.height + e.top).toString() + ")"
|
|
4000
|
-
),
|
|
4001
|
-
let
|
|
4002
|
+
), c.push("scale(1 -1)"), e.top = e.left = 0);
|
|
4003
|
+
let r;
|
|
4002
4004
|
switch (S < 0 && (S -= Math.floor(S / 4) * 4), S = S % 4, S) {
|
|
4003
4005
|
case 1:
|
|
4004
|
-
|
|
4005
|
-
"rotate(90 " +
|
|
4006
|
+
r = e.height / 2 + e.top, c.unshift(
|
|
4007
|
+
"rotate(90 " + r.toString() + " " + r.toString() + ")"
|
|
4006
4008
|
);
|
|
4007
4009
|
break;
|
|
4008
4010
|
case 2:
|
|
4009
|
-
|
|
4011
|
+
c.unshift(
|
|
4010
4012
|
"rotate(180 " + (e.width / 2 + e.left).toString() + " " + (e.height / 2 + e.top).toString() + ")"
|
|
4011
4013
|
);
|
|
4012
4014
|
break;
|
|
4013
4015
|
case 3:
|
|
4014
|
-
|
|
4015
|
-
"rotate(-90 " +
|
|
4016
|
+
r = e.width / 2 + e.left, c.unshift(
|
|
4017
|
+
"rotate(-90 " + r.toString() + " " + r.toString() + ")"
|
|
4016
4018
|
);
|
|
4017
4019
|
break;
|
|
4018
4020
|
}
|
|
4019
|
-
S % 2 === 1 && (e.left !== e.top && (
|
|
4021
|
+
S % 2 === 1 && (e.left !== e.top && (r = e.left, e.left = e.top, e.top = r), e.width !== e.height && (r = e.width, e.width = e.height, e.height = r)), c.length && (l = Yl(
|
|
4020
4022
|
l,
|
|
4021
|
-
'<g transform="' +
|
|
4023
|
+
'<g transform="' + c.join(" ") + '">',
|
|
4022
4024
|
"</g>"
|
|
4023
4025
|
));
|
|
4024
4026
|
});
|
|
4025
|
-
const
|
|
4026
|
-
let
|
|
4027
|
-
|
|
4028
|
-
const E = {}, k = (M,
|
|
4029
|
-
ql(
|
|
4027
|
+
const v = n.width, _ = n.height, w = e.width, $ = e.height;
|
|
4028
|
+
let m, p;
|
|
4029
|
+
v === null ? (p = _ === null ? "1em" : _ === "auto" ? $ : _, m = wt(p, w / $)) : (m = v === "auto" ? w : v, p = _ === null ? wt(m, $ / w) : _ === "auto" ? $ : _);
|
|
4030
|
+
const E = {}, k = (M, c) => {
|
|
4031
|
+
ql(c) || (E[M] = c.toString());
|
|
4030
4032
|
};
|
|
4031
|
-
k("width",
|
|
4033
|
+
k("width", m), k("height", p);
|
|
4032
4034
|
const I = [e.left, e.top, w, $];
|
|
4033
4035
|
return E.viewBox = I.join(" "), {
|
|
4034
4036
|
attributes: E,
|
|
@@ -4047,12 +4049,12 @@ function Jl(s, o = Xl) {
|
|
|
4047
4049
|
return s;
|
|
4048
4050
|
const e = "suffix" + (Math.random() * 16777216 | Date.now()).toString(16);
|
|
4049
4051
|
return t.forEach((l) => {
|
|
4050
|
-
const
|
|
4052
|
+
const v = typeof o == "function" ? o(l) : o + (Kl++).toString(), _ = l.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
4051
4053
|
s = s.replace(
|
|
4052
4054
|
// Allowed characters before id: [#;"]
|
|
4053
4055
|
// Allowed characters after id: [)"], .[a-z]
|
|
4054
|
-
new RegExp('([#;"])(' +
|
|
4055
|
-
"$1" +
|
|
4056
|
+
new RegExp('([#;"])(' + _ + ')([")]|\\.[a-z])', "g"),
|
|
4057
|
+
"$1" + v + e + "$3"
|
|
4056
4058
|
);
|
|
4057
4059
|
}), s = s.replace(new RegExp(e, "g"), ""), s;
|
|
4058
4060
|
}
|
|
@@ -4108,10 +4110,10 @@ function xt(s) {
|
|
|
4108
4110
|
return s + (s.match(/^[-0-9.]+$/) ? "px" : "");
|
|
4109
4111
|
}
|
|
4110
4112
|
const sa = (s, o) => {
|
|
4111
|
-
const t = Bl(bt, o), n = { ...oa }, e = o.mode || "svg", l = {},
|
|
4113
|
+
const t = Bl(bt, o), n = { ...oa }, e = o.mode || "svg", l = {}, v = o.style, _ = typeof v == "object" && !(v instanceof Array) ? v : {};
|
|
4112
4114
|
for (let M in o) {
|
|
4113
|
-
const
|
|
4114
|
-
if (
|
|
4115
|
+
const c = o[M];
|
|
4116
|
+
if (c !== void 0)
|
|
4115
4117
|
switch (M) {
|
|
4116
4118
|
// Properties to ignore
|
|
4117
4119
|
case "icon":
|
|
@@ -4123,28 +4125,28 @@ const sa = (s, o) => {
|
|
|
4123
4125
|
case "inline":
|
|
4124
4126
|
case "hFlip":
|
|
4125
4127
|
case "vFlip":
|
|
4126
|
-
t[M] =
|
|
4128
|
+
t[M] = c === !0 || c === "true" || c === 1;
|
|
4127
4129
|
break;
|
|
4128
4130
|
// Flip as string: 'horizontal,vertical'
|
|
4129
4131
|
case "flip":
|
|
4130
|
-
typeof
|
|
4132
|
+
typeof c == "string" && Ol(t, c);
|
|
4131
4133
|
break;
|
|
4132
4134
|
// Color: override style
|
|
4133
4135
|
case "color":
|
|
4134
|
-
l.color =
|
|
4136
|
+
l.color = c;
|
|
4135
4137
|
break;
|
|
4136
4138
|
// Rotation as string
|
|
4137
4139
|
case "rotate":
|
|
4138
|
-
typeof
|
|
4140
|
+
typeof c == "string" ? t[M] = zl(c) : typeof c == "number" && (t[M] = c);
|
|
4139
4141
|
break;
|
|
4140
4142
|
// Remove aria-hidden
|
|
4141
4143
|
case "ariaHidden":
|
|
4142
4144
|
case "aria-hidden":
|
|
4143
|
-
|
|
4145
|
+
c !== !0 && c !== "true" && delete n["aria-hidden"];
|
|
4144
4146
|
break;
|
|
4145
4147
|
default: {
|
|
4146
4148
|
const L = je[M];
|
|
4147
|
-
L ? (
|
|
4149
|
+
L ? (c === !0 || c === "true" || c === 1) && (t[L] = !0) : bt[M] === void 0 && (n[M] = c);
|
|
4148
4150
|
}
|
|
4149
4151
|
}
|
|
4150
4152
|
}
|
|
@@ -4152,14 +4154,14 @@ const sa = (s, o) => {
|
|
|
4152
4154
|
if (t.inline && (l.verticalAlign = "-0.125em"), e === "svg") {
|
|
4153
4155
|
n.style = {
|
|
4154
4156
|
...l,
|
|
4155
|
-
...
|
|
4157
|
+
..._
|
|
4156
4158
|
}, Object.assign(n, $);
|
|
4157
|
-
let M = 0,
|
|
4158
|
-
return typeof
|
|
4159
|
+
let M = 0, c = o.id;
|
|
4160
|
+
return typeof c == "string" && (c = c.replace(/-/g, "_")), n.innerHTML = Jl(w.body, c ? () => c + "ID" + M++ : "iconifyVue"), ve("svg", n);
|
|
4159
4161
|
}
|
|
4160
|
-
const { body:
|
|
4162
|
+
const { body: m, width: p, height: E } = s, k = e === "mask" || (e === "bg" ? !1 : m.indexOf("currentColor") !== -1), I = Ql(m, {
|
|
4161
4163
|
...$,
|
|
4162
|
-
width:
|
|
4164
|
+
width: p + "",
|
|
4163
4165
|
height: E + ""
|
|
4164
4166
|
});
|
|
4165
4167
|
return n.style = {
|
|
@@ -4169,7 +4171,7 @@ const sa = (s, o) => {
|
|
|
4169
4171
|
height: xt($.height),
|
|
4170
4172
|
...na,
|
|
4171
4173
|
...k ? Ze : Qt,
|
|
4172
|
-
...
|
|
4174
|
+
..._
|
|
4173
4175
|
}, ve("span", n);
|
|
4174
4176
|
}, Zt = /* @__PURE__ */ Object.create(null);
|
|
4175
4177
|
function la(s, o) {
|
|
@@ -4280,7 +4282,7 @@ const ra = [
|
|
|
4280
4282
|
on,
|
|
4281
4283
|
an,
|
|
4282
4284
|
Ht,
|
|
4283
|
-
|
|
4285
|
+
zn,
|
|
4284
4286
|
jn,
|
|
4285
4287
|
Gn,
|
|
4286
4288
|
Ps,
|
|
@@ -4304,7 +4306,7 @@ export {
|
|
|
4304
4306
|
Ht as UtGrid,
|
|
4305
4307
|
Ys as UtIconSelect,
|
|
4306
4308
|
_o as UtLov,
|
|
4307
|
-
|
|
4309
|
+
zn as UtModalForm,
|
|
4308
4310
|
jn as UtModalGrid,
|
|
4309
4311
|
Po as UtUpload,
|
|
4310
4312
|
ba as default,
|