@utogether/components 3.0.0-beta.21 → 3.0.0-beta.22
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 +699 -698
- package/dist/components.umd.js +4 -4
- package/package.json +1 -1
package/dist/components.es.js
CHANGED
|
@@ -33,78 +33,78 @@ const jo = {
|
|
|
33
33
|
emits: ["tap", "confirm", "cancel"],
|
|
34
34
|
setup(e, { emit: t }) {
|
|
35
35
|
const n = e, o = De().appContext.config.globalProperties.$hasAuthority, { t: i } = Le(), r = xe(() => {
|
|
36
|
-
const
|
|
36
|
+
const k = l(), x = /.*[\u4e00-\u9fa5]+.*$/.test(n.content);
|
|
37
37
|
return {
|
|
38
|
-
icon:
|
|
39
|
-
content:
|
|
38
|
+
icon: k,
|
|
39
|
+
content: x ? n.content : i(`message.btn.${n.content}`)
|
|
40
40
|
};
|
|
41
41
|
}), l = () => {
|
|
42
|
-
var
|
|
43
|
-
return n.mode === "text" ? null : n.icon ? n.icon : (
|
|
42
|
+
var k, x, C, d;
|
|
43
|
+
return n.mode === "text" ? null : n.icon ? n.icon : (k = n.content) != null && k.toLowerCase().includes("print") ? "ri-printer-line" : (x = n.content) != null && x.toLowerCase().includes("look") ? "ri-eye-line" : (C = n.content) != null && C.toLowerCase().includes("del") ? "ri-delete-bin-line" : (d = n.content) != null && d.toLowerCase().includes("edit") ? "ri-edit-box-line" : "";
|
|
44
44
|
}, f = St(() => {
|
|
45
45
|
D("confirm");
|
|
46
46
|
}, 3e3), p = () => {
|
|
47
47
|
D("cancel");
|
|
48
|
-
},
|
|
48
|
+
}, c = St(() => {
|
|
49
49
|
n.disabled || n.auth && !o(n.auth) || D("tap");
|
|
50
|
-
}, 3e3),
|
|
51
|
-
|
|
50
|
+
}, 3e3), a = St((k) => {
|
|
51
|
+
k.disabled || k.auth && !o(k.auth) || D("tap", k.code);
|
|
52
52
|
}, 2e3), D = t;
|
|
53
|
-
return (
|
|
54
|
-
const
|
|
55
|
-
return
|
|
53
|
+
return (k, x) => {
|
|
54
|
+
const C = V("vxe-button"), d = V("el-popconfirm");
|
|
55
|
+
return k.children.length ? (A(), ie(C, {
|
|
56
56
|
key: 0,
|
|
57
|
-
disabled:
|
|
58
|
-
status:
|
|
57
|
+
disabled: k.auth && !te(o)(k.auth) || k.disabled,
|
|
58
|
+
status: k.status,
|
|
59
59
|
transfer: ""
|
|
60
60
|
}, {
|
|
61
61
|
default: q(() => [
|
|
62
62
|
Ut(G(r.value.content), 1)
|
|
63
63
|
]),
|
|
64
64
|
dropdowns: q(() => [
|
|
65
|
-
(A(!0), P(ce, null, le(
|
|
66
|
-
key:
|
|
67
|
-
disabled:
|
|
68
|
-
status:
|
|
69
|
-
content:
|
|
70
|
-
icon: `${
|
|
71
|
-
mode:
|
|
72
|
-
onClick: (
|
|
65
|
+
(A(!0), P(ce, null, le(k.children, (_) => (A(), ie(C, {
|
|
66
|
+
key: _.code,
|
|
67
|
+
disabled: _.auth && !te(o)(_.auth) || _.disabled,
|
|
68
|
+
status: _.status || "primary",
|
|
69
|
+
content: _.content,
|
|
70
|
+
icon: `${_.icon || l()} ${_.icon ? "ri-1x" : ""}`,
|
|
71
|
+
mode: _.mode || "button",
|
|
72
|
+
onClick: (b) => te(a)(_)
|
|
73
73
|
}, null, 8, ["disabled", "status", "content", "icon", "mode", "onClick"]))), 128))
|
|
74
74
|
]),
|
|
75
75
|
_: 1
|
|
76
|
-
}, 8, ["disabled", "status"])) :
|
|
76
|
+
}, 8, ["disabled", "status"])) : k.type === "pop" && k.visible ? (A(), P("div", jo, [
|
|
77
77
|
j(d, Ce({
|
|
78
|
-
"confirm-button-text":
|
|
79
|
-
"cancel-button-text":
|
|
78
|
+
"confirm-button-text": k.$t("message.btn.confirm"),
|
|
79
|
+
"cancel-button-text": k.$t("message.btn.cancel"),
|
|
80
80
|
"icon-color": "#E6A23C",
|
|
81
81
|
teleported: !1,
|
|
82
|
-
title:
|
|
83
|
-
},
|
|
82
|
+
title: k.title
|
|
83
|
+
}, k.confirmProps, {
|
|
84
84
|
onConfirm: te(f),
|
|
85
85
|
onCancel: p
|
|
86
86
|
}), {
|
|
87
87
|
reference: q(() => [
|
|
88
|
-
j(
|
|
89
|
-
disabled:
|
|
90
|
-
status:
|
|
91
|
-
type:
|
|
88
|
+
j(C, {
|
|
89
|
+
disabled: k.auth && !te(o)(k.auth) || k.disabled,
|
|
90
|
+
status: k.status,
|
|
91
|
+
type: k.type,
|
|
92
92
|
content: r.value.content,
|
|
93
93
|
icon: `${r.value.icon} ${r.value.icon ? "ri-1x" : ""}`,
|
|
94
|
-
loading:
|
|
94
|
+
loading: k.loading
|
|
95
95
|
}, null, 8, ["disabled", "status", "type", "content", "icon", "loading"])
|
|
96
96
|
]),
|
|
97
97
|
_: 1
|
|
98
98
|
}, 16, ["confirm-button-text", "cancel-button-text", "title", "onConfirm"])
|
|
99
|
-
])) :
|
|
99
|
+
])) : k.visible ? (A(), ie(C, {
|
|
100
100
|
key: 2,
|
|
101
|
-
disabled:
|
|
102
|
-
status:
|
|
103
|
-
mode:
|
|
101
|
+
disabled: k.auth && !te(o)(k.auth) || k.disabled,
|
|
102
|
+
status: k.status,
|
|
103
|
+
mode: k.mode || "button",
|
|
104
104
|
content: r.value.content,
|
|
105
105
|
icon: `${r.value.icon} ${r.value.icon ? "ri-1x" : ""}`,
|
|
106
|
-
loading:
|
|
107
|
-
onClick: te(
|
|
106
|
+
loading: k.loading,
|
|
107
|
+
onClick: te(c)
|
|
108
108
|
}, null, 8, ["disabled", "status", "mode", "content", "icon", "loading", "onClick"])) : Z("", !0);
|
|
109
109
|
};
|
|
110
110
|
}
|
|
@@ -129,7 +129,7 @@ const jo = {
|
|
|
129
129
|
},
|
|
130
130
|
emits: ["clear", "change"],
|
|
131
131
|
setup(e, { emit: t }) {
|
|
132
|
-
const n = e, o = De().appContext.config.globalProperties.$serviceApi, i = 600, r = L(!1), l = L(i), f = L(""), p = L("vxe-table--ignore-clear"),
|
|
132
|
+
const n = e, o = De().appContext.config.globalProperties.$serviceApi, i = 600, r = L(!1), l = L(i), f = L(""), p = L("vxe-table--ignore-clear"), c = Fe({
|
|
133
133
|
loading: !1,
|
|
134
134
|
border: !0,
|
|
135
135
|
pagerConfig: {},
|
|
@@ -158,25 +158,25 @@ const jo = {
|
|
|
158
158
|
const { field: N, displayName: U } = n;
|
|
159
159
|
v[U || N] = n.record[U || N];
|
|
160
160
|
}
|
|
161
|
-
return v =
|
|
161
|
+
return v = k(v), a.lovType !== "url" ? (v.lovCode = n.code, o.get(
|
|
162
162
|
"/upfm/v1/lovViewHeader/listBySql",
|
|
163
163
|
v
|
|
164
|
-
)) : o.get(
|
|
164
|
+
)) : o.get(a.lovUrl, v);
|
|
165
165
|
}
|
|
166
166
|
}
|
|
167
167
|
},
|
|
168
168
|
checkboxConfig: {},
|
|
169
169
|
columns: []
|
|
170
170
|
});
|
|
171
|
-
let
|
|
172
|
-
const
|
|
171
|
+
let a, D = [];
|
|
172
|
+
const k = (m) => (D.filter(
|
|
173
173
|
(g) => ["date", "month"].includes(g.fieldType) && g.isSearch
|
|
174
174
|
).forEach((g) => {
|
|
175
175
|
g.fieldType === "date" ? m[g.field] = ee(
|
|
176
176
|
m[g.field],
|
|
177
177
|
"yyyy-MM-dd 00:00:00"
|
|
178
178
|
) : g.fieldType === "month" && (m[g.field] = ee(m[g.field], "yyyy-MM"));
|
|
179
|
-
}), m),
|
|
179
|
+
}), m), x = () => {
|
|
180
180
|
const m = de(D, !0).filter((v) => v.isSearch === "Y");
|
|
181
181
|
if (!m.length) return;
|
|
182
182
|
const h = m.length > 2, g = m.sort((v, N) => v.seqNo - N.seqNo).map((v, N) => ({
|
|
@@ -184,10 +184,10 @@ const jo = {
|
|
|
184
184
|
title: v.colTitle,
|
|
185
185
|
span: 8,
|
|
186
186
|
folding: N > 1,
|
|
187
|
-
itemRender:
|
|
187
|
+
itemRender: _(v)
|
|
188
188
|
}));
|
|
189
|
-
|
|
190
|
-
},
|
|
189
|
+
C.collapseNode = h, h ? g.splice(2, 0, C) : g.push(C), c.formConfig.items = g;
|
|
190
|
+
}, C = {
|
|
191
191
|
span: 8,
|
|
192
192
|
align: "right",
|
|
193
193
|
collapseNode: !1,
|
|
@@ -214,21 +214,21 @@ const jo = {
|
|
|
214
214
|
}
|
|
215
215
|
]
|
|
216
216
|
}
|
|
217
|
-
}, d = Nn(),
|
|
217
|
+
}, d = Nn(), _ = (m) => {
|
|
218
218
|
if (["date", "month"].includes(m.fieldType)) {
|
|
219
219
|
const h = m.fieldType === "date" ? "yyyy-MM-dd HH:mm:ss" : "yyyy-MM";
|
|
220
220
|
return d.renderDate({ type: m.fieldType, valueFormat: h });
|
|
221
221
|
} else if (m.fieldType === "dictCode")
|
|
222
222
|
return d.renderDict(m.dictCode);
|
|
223
223
|
return { name: "VxeInput" };
|
|
224
|
-
},
|
|
224
|
+
}, b = () => {
|
|
225
225
|
const m = de(D, !0).filter(
|
|
226
226
|
(g) => g.isCol === "Y"
|
|
227
227
|
), h = m.reduce(
|
|
228
228
|
(g, v) => g + +v.colWidth,
|
|
229
229
|
65
|
|
230
230
|
);
|
|
231
|
-
l.value = h < i ? i : h > 900 ? 900 : h,
|
|
231
|
+
l.value = h < i ? i : h > 900 ? 900 : h, c.columns = m.sort((g, v) => g.seqNo - v.seqNo).map((g) => {
|
|
232
232
|
const v = g.fieldType, N = ["formatDict", g.dictCode];
|
|
233
233
|
return {
|
|
234
234
|
field: g.colField,
|
|
@@ -236,24 +236,24 @@ const jo = {
|
|
|
236
236
|
minWidth: g.colWidth,
|
|
237
237
|
formatter: v === "date" ? ["formatDate"] : g.fieldType === "dictCode" ? N : null
|
|
238
238
|
};
|
|
239
|
-
}), n.multiple ?
|
|
239
|
+
}), n.multiple ? c.columns.unshift({ type: "checkbox", width: 45, align: "center" }) : c.columns.unshift({ type: "radio", width: 45, align: "center" });
|
|
240
240
|
}, O = L(null), w = async () => {
|
|
241
241
|
var v;
|
|
242
|
-
|
|
242
|
+
c.loading = !0;
|
|
243
243
|
const m = "/upfm/v1/lovViewHeader/detailByViewCode", [h, g] = await Wt(
|
|
244
244
|
o.get(m, { lovCode: n.code })
|
|
245
245
|
);
|
|
246
|
-
|
|
246
|
+
c.loading = !1, h && E(), f.value = (g == null ? void 0 : g.lovTitle) || g.lovName, D = g.lineList, a = g, await rn(30), n.autoLoad && ((v = O.value) == null || v.commitProxy("query")), b(), x();
|
|
247
247
|
}, y = async () => {
|
|
248
248
|
n.disabled || (w(), await rn(64), r.value = !0);
|
|
249
249
|
}, M = () => {
|
|
250
250
|
F("clear", "");
|
|
251
251
|
}, u = ({ row: m }) => {
|
|
252
252
|
const h = n.multiple ? [m] : m;
|
|
253
|
-
F("change", h,
|
|
253
|
+
F("change", h, a.valueField), E();
|
|
254
254
|
}, T = () => {
|
|
255
255
|
const m = O.value, h = n.multiple ? m.getCheckboxRecords() : m.getRadioRecord();
|
|
256
|
-
!et(h) && F("change", h,
|
|
256
|
+
!et(h) && F("change", h, a.valueField), E();
|
|
257
257
|
}, E = () => {
|
|
258
258
|
D.length = 0, r.value = !1;
|
|
259
259
|
}, I = ({ type: m }) => {
|
|
@@ -280,7 +280,7 @@ const jo = {
|
|
|
280
280
|
j(g, Ce({
|
|
281
281
|
ref_key: "xgrid",
|
|
282
282
|
ref: O
|
|
283
|
-
},
|
|
283
|
+
}, c, {
|
|
284
284
|
resizable: "",
|
|
285
285
|
onCellDblclick: u
|
|
286
286
|
}), null, 16)
|
|
@@ -317,7 +317,7 @@ const jo = {
|
|
|
317
317
|
j(g, Ce({
|
|
318
318
|
ref_key: "xgrid",
|
|
319
319
|
ref: O
|
|
320
|
-
},
|
|
320
|
+
}, c, {
|
|
321
321
|
resizable: "",
|
|
322
322
|
onCellDblclick: u
|
|
323
323
|
}), null, 16)
|
|
@@ -378,14 +378,14 @@ function Go(e) {
|
|
|
378
378
|
});
|
|
379
379
|
}
|
|
380
380
|
const Bn = (e, t, n) => {
|
|
381
|
-
const s = n.content.split(","), { textAlign: o, fontSize: i, color: r, fillOpacity: l, xAxis: f, yAxis: p } = n,
|
|
381
|
+
const s = n.content.split(","), { textAlign: o, fontSize: i, color: r, fillOpacity: l, xAxis: f, yAxis: p } = n, c = e.width, a = e.height;
|
|
382
382
|
t.font = `${i || 22}px Microsoft Yahei`, t.lineWidth = 1, t.fillStyle = r || "rgba(255, 255, 255, 1)", t.textAlign = o || "left", t.textBaseline = "middle", t.globalAlpha = Number(l || 1);
|
|
383
|
-
const D = Number(f),
|
|
384
|
-
return s.forEach((
|
|
383
|
+
const D = Number(f), k = Number(p);
|
|
384
|
+
return s.forEach((x, C) => {
|
|
385
385
|
let d = i;
|
|
386
386
|
n.watermarkType === "1" ? d = 18 : n.watermarkType === "2" && (d = 16);
|
|
387
|
-
const
|
|
388
|
-
t.fillText(
|
|
387
|
+
const _ = c - x.split("").length * Number(d);
|
|
388
|
+
t.fillText(x, D || _, k || a - Number(d) - C * 25);
|
|
389
389
|
}), e;
|
|
390
390
|
}, Ko = async (e, t) => {
|
|
391
391
|
let n = await Qo(e);
|
|
@@ -433,7 +433,7 @@ const Bn = (e, t, n) => {
|
|
|
433
433
|
slots: { default: "operate" },
|
|
434
434
|
width: 180
|
|
435
435
|
}
|
|
436
|
-
],
|
|
436
|
+
], c = [
|
|
437
437
|
"xlsx",
|
|
438
438
|
"xls",
|
|
439
439
|
"docx",
|
|
@@ -448,7 +448,7 @@ const Bn = (e, t, n) => {
|
|
|
448
448
|
"zip",
|
|
449
449
|
"rar",
|
|
450
450
|
"svg"
|
|
451
|
-
],
|
|
451
|
+
], a = Fe({
|
|
452
452
|
border: !0,
|
|
453
453
|
loading: !1,
|
|
454
454
|
maxHeight: t.maxHeight,
|
|
@@ -462,16 +462,16 @@ const Bn = (e, t, n) => {
|
|
|
462
462
|
},
|
|
463
463
|
importConfig: {
|
|
464
464
|
remote: !0,
|
|
465
|
-
types:
|
|
465
|
+
types: c,
|
|
466
466
|
modes: ["insert"],
|
|
467
467
|
// 自定义服务端导入
|
|
468
|
-
async importMethod({ file:
|
|
469
|
-
const
|
|
470
|
-
let O =
|
|
471
|
-
if (t.watermarkCode && f.watermarkTrigger === "upload" && l.includes(
|
|
472
|
-
new In(
|
|
468
|
+
async importMethod({ file: _ }) {
|
|
469
|
+
const b = _.name.split(".").pop();
|
|
470
|
+
let O = _;
|
|
471
|
+
if (t.watermarkCode && f.watermarkTrigger === "upload" && l.includes(b) && (O = await Xo(_, f)), l.includes(b) && _.size > 1024 * 1024 * t.compassorSize)
|
|
472
|
+
new In(_, {
|
|
473
473
|
quality: t.quality,
|
|
474
|
-
mimeType:
|
|
474
|
+
mimeType: _.type,
|
|
475
475
|
success(w) {
|
|
476
476
|
const y = new File([w], w.name, { type: w.type });
|
|
477
477
|
D(y), console.log({ result: w, file: y });
|
|
@@ -484,23 +484,23 @@ const Bn = (e, t, n) => {
|
|
|
484
484
|
proxyConfig: {
|
|
485
485
|
ajax: {
|
|
486
486
|
// 接收 Promise
|
|
487
|
-
query: ({ page:
|
|
488
|
-
const O = Object.assign({},
|
|
489
|
-
return O.pageNum =
|
|
487
|
+
query: ({ page: _, form: b }) => {
|
|
488
|
+
const O = Object.assign({}, b);
|
|
489
|
+
return O.pageNum = _.currentPage, O.pageSize = _.pageSize, O.sourceTable = t.sourceTable, O.sourceId = t.sourceId, t.sourceId && r !== "doc" ? o.get(t.url, O) : null;
|
|
490
490
|
}
|
|
491
491
|
}
|
|
492
492
|
},
|
|
493
493
|
columns: p
|
|
494
|
-
}), D = (
|
|
495
|
-
const
|
|
496
|
-
|
|
494
|
+
}), D = (_) => {
|
|
495
|
+
const b = new FormData();
|
|
496
|
+
b.append("file", _);
|
|
497
497
|
const O = { "Content-Type": "multipart/form-data" };
|
|
498
|
-
return o.post("/ufil/file/uploadMultipart",
|
|
498
|
+
return o.post("/ufil/file/uploadMultipart", b, { headers: O }).then(async (w) => {
|
|
499
499
|
const y = {
|
|
500
500
|
realpath: w,
|
|
501
|
-
fileName:
|
|
502
|
-
fileSize:
|
|
503
|
-
fileExtend:
|
|
501
|
+
fileName: _.name,
|
|
502
|
+
fileSize: _.size,
|
|
503
|
+
fileExtend: _.name.split(".").pop(),
|
|
504
504
|
sourceTable: t.sourceTable,
|
|
505
505
|
sourceId: t.sourceId
|
|
506
506
|
};
|
|
@@ -511,70 +511,70 @@ const Bn = (e, t, n) => {
|
|
|
511
511
|
status: "error"
|
|
512
512
|
});
|
|
513
513
|
});
|
|
514
|
-
},
|
|
514
|
+
}, k = async (_) => {
|
|
515
515
|
try {
|
|
516
|
-
|
|
516
|
+
a.loading = !0, await o.delete(t.url, [_]), n.value.commitProxy("query");
|
|
517
517
|
} finally {
|
|
518
|
-
|
|
518
|
+
a.loading = !1;
|
|
519
519
|
}
|
|
520
|
-
},
|
|
521
|
-
const
|
|
520
|
+
}, x = async () => {
|
|
521
|
+
const b = await o.get("/upms/v1/watermark/selectByCode", {
|
|
522
522
|
watermarkCode: t.watermarkCode
|
|
523
523
|
});
|
|
524
|
-
f =
|
|
525
|
-
},
|
|
526
|
-
const
|
|
527
|
-
(f == null ? void 0 : f.watermarkTrigger) == "preview" ? await
|
|
524
|
+
f = b == null ? void 0 : b.list[0], f.watermarkType === "1" ? f.content = ee(/* @__PURE__ */ new Date(), "yyyy-MM-dd") : f.watermarkType === "2" ? f.content = ee(/* @__PURE__ */ new Date(), "yyyy-MM-dd HH:mm:ss") : f.watermarkType === "0" && (f.content = "");
|
|
525
|
+
}, C = async () => {
|
|
526
|
+
const _ = n.value.getData().filter((O) => l.includes(O.fileExtend)), b = [];
|
|
527
|
+
(f == null ? void 0 : f.watermarkTrigger) == "preview" ? await _.forEachSync(async (O) => {
|
|
528
528
|
const w = `${i}/ufil${O.realpath}}`, y = await Ko(w, f);
|
|
529
|
-
|
|
530
|
-
}) :
|
|
529
|
+
b.push(y);
|
|
530
|
+
}) : _.forEach((O) => {
|
|
531
531
|
const w = `${i}/ufil${O.realpath}`;
|
|
532
|
-
|
|
533
|
-
}), $e.previewImage({ activeIndex: 0, urlList:
|
|
534
|
-
}, d = (
|
|
535
|
-
const
|
|
532
|
+
b.push(w);
|
|
533
|
+
}), $e.previewImage({ activeIndex: 0, urlList: b });
|
|
534
|
+
}, d = (_) => {
|
|
535
|
+
const b = i + "/ufil" + _.realpath, O = document.createElement("a");
|
|
536
536
|
O.style.display = "none";
|
|
537
|
-
const w =
|
|
538
|
-
O.href =
|
|
537
|
+
const w = _.fileName.split(".");
|
|
538
|
+
O.href = b, O.setAttribute("download", w[0]), document.body.appendChild(O), O.click(), document.body.removeChild(O);
|
|
539
539
|
};
|
|
540
|
-
return Array.prototype.forEachSync = async function(
|
|
541
|
-
for (const [
|
|
542
|
-
await
|
|
540
|
+
return Array.prototype.forEachSync = async function(_) {
|
|
541
|
+
for (const [b, O] of Object.entries(this))
|
|
542
|
+
await _(O, b, this);
|
|
543
543
|
}, Je(() => {
|
|
544
|
-
t.watermarkCode &&
|
|
545
|
-
}), (
|
|
544
|
+
t.watermarkCode && x();
|
|
545
|
+
}), (_, b) => {
|
|
546
546
|
const O = V("ut-divider"), w = V("ut-button"), y = V("vxe-grid");
|
|
547
547
|
return A(), P("div", Zo, [
|
|
548
548
|
j(y, Ce({
|
|
549
549
|
ref_key: "xGrid",
|
|
550
550
|
ref: n
|
|
551
|
-
},
|
|
551
|
+
}, a), {
|
|
552
552
|
toolbar_buttons: q(() => [
|
|
553
|
-
|
|
553
|
+
_.showTitle ? (A(), P("div", es, [
|
|
554
554
|
j(O, {
|
|
555
|
-
title:
|
|
555
|
+
title: _.title || _.$t("message.attachmentInfo")
|
|
556
556
|
}, null, 8, ["title"])
|
|
557
557
|
])) : Z("", !0)
|
|
558
558
|
]),
|
|
559
559
|
operate: q(({ row: M }) => [
|
|
560
560
|
R("div", ts, [
|
|
561
561
|
j(w, {
|
|
562
|
-
disabled:
|
|
563
|
-
auth:
|
|
562
|
+
disabled: _.dataStatus === "detail",
|
|
563
|
+
auth: _.permissionPreFix + "Del",
|
|
564
564
|
status: "danger",
|
|
565
565
|
icon: "ri-delete-bin-5-fill",
|
|
566
566
|
content: "delete",
|
|
567
|
-
onTap: (u) =>
|
|
567
|
+
onTap: (u) => k(M)
|
|
568
568
|
}, null, 8, ["disabled", "auth", "onTap"]),
|
|
569
569
|
["png", "jpeg", "jpg"].includes(M.fileExtend) ? (A(), ie(w, {
|
|
570
570
|
key: 0,
|
|
571
|
-
auth:
|
|
571
|
+
auth: _.permissionPreFix + "Preview",
|
|
572
572
|
icon: "ri-search-line",
|
|
573
573
|
content: "preview",
|
|
574
|
-
onTap:
|
|
574
|
+
onTap: b[0] || (b[0] = (u) => C())
|
|
575
575
|
}, null, 8, ["auth"])) : (A(), ie(w, {
|
|
576
576
|
key: 1,
|
|
577
|
-
auth:
|
|
577
|
+
auth: _.permissionPreFix + "Download",
|
|
578
578
|
icon: "ri-download-2-fill",
|
|
579
579
|
content: "download",
|
|
580
580
|
onTap: (u) => d(M)
|
|
@@ -623,7 +623,7 @@ const Bn = (e, t, n) => {
|
|
|
623
623
|
fixed: "left"
|
|
624
624
|
};
|
|
625
625
|
return g.unshift(v), g;
|
|
626
|
-
},
|
|
626
|
+
}, c = L({ pageSize: 200, currentPage: 1, total: 0 }), a = [
|
|
627
627
|
"Sizes",
|
|
628
628
|
"PrevJump",
|
|
629
629
|
"PrevPage",
|
|
@@ -632,8 +632,8 @@ const Bn = (e, t, n) => {
|
|
|
632
632
|
"NextJump",
|
|
633
633
|
"FullJump",
|
|
634
634
|
"Total"
|
|
635
|
-
], D = window.innerHeight - 20,
|
|
636
|
-
let
|
|
635
|
+
], D = window.innerHeight - 20, k = L();
|
|
636
|
+
let x = [];
|
|
637
637
|
const d = Fe({
|
|
638
638
|
border: !0,
|
|
639
639
|
height: D,
|
|
@@ -688,11 +688,11 @@ const Bn = (e, t, n) => {
|
|
|
688
688
|
]
|
|
689
689
|
},
|
|
690
690
|
columns: p()
|
|
691
|
-
}),
|
|
691
|
+
}), _ = {
|
|
692
692
|
toolbarButtonClick({ code: g }) {
|
|
693
693
|
switch (g) {
|
|
694
694
|
case "import_plus": {
|
|
695
|
-
|
|
695
|
+
b();
|
|
696
696
|
break;
|
|
697
697
|
}
|
|
698
698
|
case "save_plus": {
|
|
@@ -721,35 +721,35 @@ const Bn = (e, t, n) => {
|
|
|
721
721
|
}
|
|
722
722
|
}
|
|
723
723
|
}
|
|
724
|
-
},
|
|
724
|
+
}, b = () => {
|
|
725
725
|
var g;
|
|
726
|
-
|
|
726
|
+
x = [], (g = k.value) == null || g.openImport();
|
|
727
727
|
};
|
|
728
728
|
function O(g) {
|
|
729
|
-
|
|
729
|
+
x = g.$table.getTableData().fullData, p().filter(
|
|
730
730
|
(N) => !N.type && N.mapField !== n.options.errorField
|
|
731
731
|
).forEach((N) => {
|
|
732
|
-
const U =
|
|
733
|
-
U !== -1 &&
|
|
732
|
+
const U = x.findIndex((Y) => Y[N.field] === N.field);
|
|
733
|
+
U !== -1 && x.splice(U, 1);
|
|
734
734
|
}), n.columns.forEach((N) => {
|
|
735
|
-
(N.dateFormatter || N.valueType === "number") &&
|
|
735
|
+
(N.dateFormatter || N.valueType === "number") && x.forEach((U) => {
|
|
736
736
|
N.dateFormatter ? U[N.field] = ee(
|
|
737
737
|
U[N.field],
|
|
738
738
|
N.dateFormatter || "yyyy-MM-dd HH:mm:ss"
|
|
739
739
|
) : U[N.field] = Io(U[N.field]).toFixed(N.decimal || 6);
|
|
740
740
|
});
|
|
741
|
-
}),
|
|
741
|
+
}), c.value.total = x.length, w();
|
|
742
742
|
}
|
|
743
743
|
const w = () => {
|
|
744
|
-
const { currentPage: g, pageSize: v } =
|
|
745
|
-
d.data =
|
|
744
|
+
const { currentPage: g, pageSize: v } = c.value;
|
|
745
|
+
d.data = x.filter(
|
|
746
746
|
(N, U) => U < v * g && U >= v * (g - 1)
|
|
747
747
|
);
|
|
748
748
|
}, y = ({
|
|
749
749
|
currentPage: g,
|
|
750
750
|
pageSize: v
|
|
751
751
|
}) => {
|
|
752
|
-
|
|
752
|
+
c.value.currentPage = g, c.value.pageSize = v, w();
|
|
753
753
|
}, M = () => {
|
|
754
754
|
var N;
|
|
755
755
|
const g = [];
|
|
@@ -769,14 +769,14 @@ const Bn = (e, t, n) => {
|
|
|
769
769
|
),
|
|
770
770
|
data: g
|
|
771
771
|
};
|
|
772
|
-
(N =
|
|
772
|
+
(N = k.value) == null || N.exportData(v);
|
|
773
773
|
}, u = async () => {
|
|
774
|
-
if (!
|
|
774
|
+
if (!x.length)
|
|
775
775
|
return Ie(r("message.importEmpty"));
|
|
776
776
|
if (await $e.modal.confirm(r("message.importRecord")) === "confirm") {
|
|
777
777
|
d.loading = !0;
|
|
778
778
|
const { url: v } = n;
|
|
779
|
-
I("toSave"), o.post(v,
|
|
779
|
+
I("toSave"), o.post(v, x).then((N) => {
|
|
780
780
|
(N == null ? void 0 : N.status) === "error" || N != null && N.length ? (l.value = !0, E(
|
|
781
781
|
N != null && N.length ? N : N[n.options.errListField || n.sourceList]
|
|
782
782
|
), $e.modal.message({
|
|
@@ -792,29 +792,29 @@ const Bn = (e, t, n) => {
|
|
|
792
792
|
}
|
|
793
793
|
}, T = () => {
|
|
794
794
|
var v;
|
|
795
|
-
const g = (v =
|
|
795
|
+
const g = (v = k.value) == null ? void 0 : v.getCheckboxRecords();
|
|
796
796
|
if (!(g != null && g.length))
|
|
797
797
|
return $e.modal.message({
|
|
798
798
|
content: r("message.selectedRecord"),
|
|
799
799
|
status: "warning"
|
|
800
800
|
});
|
|
801
801
|
g.forEach((N) => {
|
|
802
|
-
const U =
|
|
802
|
+
const U = x.findIndex(
|
|
803
803
|
(Y) => Y._X_ROW_KEY === N._X_ROW_KEY
|
|
804
804
|
);
|
|
805
|
-
U !== -1 &&
|
|
806
|
-
}), d.data =
|
|
805
|
+
U !== -1 && x.splice(U, 1);
|
|
806
|
+
}), d.data = x;
|
|
807
807
|
}, E = (g) => {
|
|
808
|
-
|
|
808
|
+
c.value.total = g.length, x = g.map((v, N) => (v._X_ROW_KEY = N, v)), I("toShow"), w();
|
|
809
809
|
}, I = (g) => {
|
|
810
810
|
d.columns.forEach((v) => {
|
|
811
811
|
if (g === "toSave") {
|
|
812
812
|
const N = _e.get("kCookies_param") ? JSON.parse(_e.get("kCookies_param")) : {};
|
|
813
|
-
|
|
813
|
+
x.forEach((U) => {
|
|
814
814
|
U[v.mapField] = U[v.field], Object.assign(U, N, n.defaultParams);
|
|
815
815
|
});
|
|
816
816
|
} else
|
|
817
|
-
|
|
817
|
+
x.forEach((N) => {
|
|
818
818
|
N[v.field] = N[v.mapField];
|
|
819
819
|
});
|
|
820
820
|
});
|
|
@@ -836,17 +836,17 @@ const Bn = (e, t, n) => {
|
|
|
836
836
|
default: q(() => [
|
|
837
837
|
j(ve, Ce({
|
|
838
838
|
ref_key: "xgrid",
|
|
839
|
-
ref:
|
|
840
|
-
}, d, jt(
|
|
839
|
+
ref: k
|
|
840
|
+
}, d, jt(_)), $o({
|
|
841
841
|
pager: q(() => [
|
|
842
842
|
j(re, {
|
|
843
|
-
"current-page":
|
|
844
|
-
"onUpdate:currentPage": v[0] || (v[0] = (W) =>
|
|
845
|
-
"page-size":
|
|
846
|
-
"onUpdate:pageSize": v[1] || (v[1] = (W) =>
|
|
847
|
-
layouts:
|
|
843
|
+
"current-page": c.value.currentPage,
|
|
844
|
+
"onUpdate:currentPage": v[0] || (v[0] = (W) => c.value.currentPage = W),
|
|
845
|
+
"page-size": c.value.pageSize,
|
|
846
|
+
"onUpdate:pageSize": v[1] || (v[1] = (W) => c.value.pageSize = W),
|
|
847
|
+
layouts: a,
|
|
848
848
|
"page-sizes": [200, 500, 1e3, 2e3, 5e3, 1e4],
|
|
849
|
-
total:
|
|
849
|
+
total: c.value.total,
|
|
850
850
|
onPageChange: y
|
|
851
851
|
}, null, 8, ["current-page", "page-size", "total"])
|
|
852
852
|
]),
|
|
@@ -943,7 +943,7 @@ const Bn = (e, t, n) => {
|
|
|
943
943
|
]);
|
|
944
944
|
};
|
|
945
945
|
}
|
|
946
|
-
}), ys = /* @__PURE__ */ Me(gs, [["__scopeId", "data-v-
|
|
946
|
+
}), ys = /* @__PURE__ */ Me(gs, [["__scopeId", "data-v-af20229b"]]), vs = me(ys), ws = (e) => (zt("data-v-c0562151"), e = e(), Vt(), e), bs = { class: "ut-divider-wrapper" }, _s = { class: "flex items-center" }, xs = /* @__PURE__ */ ws(() => /* @__PURE__ */ R("span", { class: "ut-color-block" }, null, -1)), Cs = { class: "ut-divider-title" }, ks = { class: "mr-2" }, Ts = {
|
|
947
947
|
name: "UtDivider"
|
|
948
948
|
}, Ss = /* @__PURE__ */ K({
|
|
949
949
|
...Ts,
|
|
@@ -973,35 +973,35 @@ const Bn = (e, t, n) => {
|
|
|
973
973
|
},
|
|
974
974
|
emits: ["command"],
|
|
975
975
|
setup(e, { emit: t }) {
|
|
976
|
-
const { t: n } = Le(), s = De(), o = s == null ? void 0 : s.appContext.config.globalProperties.$hasAuthority, i = (
|
|
977
|
-
|
|
978
|
-
}, r = ["primary", "success", "warning"], l = (
|
|
979
|
-
const { content:
|
|
980
|
-
return /.*[\u4e00-\u9fa5]+.*$/.test(
|
|
981
|
-
}, f = (
|
|
982
|
-
var
|
|
983
|
-
return (
|
|
976
|
+
const { t: n } = Le(), s = De(), o = s == null ? void 0 : s.appContext.config.globalProperties.$hasAuthority, i = (c) => {
|
|
977
|
+
c.auth && !o(c.auth) || c.disabled || p("command", c.code);
|
|
978
|
+
}, r = ["primary", "success", "warning"], l = (c) => {
|
|
979
|
+
const { content: a, code: D } = c;
|
|
980
|
+
return /.*[\u4e00-\u9fa5]+.*$/.test(a) ? a : n("message.btn." + (a || D || "edit"));
|
|
981
|
+
}, f = (c) => {
|
|
982
|
+
var a, D;
|
|
983
|
+
return (a = c.code) != null && a.toLowerCase().includes("print") ? "ri-printer-fill" : (D = c.code) != null && D.toLowerCase().includes("look") ? "ri-eye-fill" : "ri-edit-2-fill";
|
|
984
984
|
}, p = t;
|
|
985
|
-
return (
|
|
986
|
-
const D = V("IconifyIconOffline"),
|
|
987
|
-
return A(), ie(
|
|
988
|
-
trigger:
|
|
985
|
+
return (c, a) => {
|
|
986
|
+
const D = V("IconifyIconOffline"), k = V("el-icon"), x = V("vxe-button"), C = V("el-dropdown-item"), d = V("el-dropdown-menu"), _ = V("el-dropdown");
|
|
987
|
+
return A(), ie(_, {
|
|
988
|
+
trigger: c.trigger,
|
|
989
989
|
class: "ut-dropdown"
|
|
990
990
|
}, {
|
|
991
991
|
dropdown: q(() => [
|
|
992
992
|
j(d, { class: "ut-dropdown-menu" }, {
|
|
993
993
|
default: q(() => [
|
|
994
|
-
(A(!0), P(ce, null, le(
|
|
995
|
-
key:
|
|
994
|
+
(A(!0), P(ce, null, le(c.buttons, (b, O) => (A(), ie(C, {
|
|
995
|
+
key: b.code
|
|
996
996
|
}, {
|
|
997
997
|
default: q(() => [
|
|
998
|
-
|
|
998
|
+
b.visible !== !1 ? (A(), ie(x, {
|
|
999
999
|
key: 0,
|
|
1000
|
-
disabled:
|
|
1001
|
-
status:
|
|
1002
|
-
content: l(
|
|
1003
|
-
icon:
|
|
1004
|
-
onClick: (w) => i(
|
|
1000
|
+
disabled: b.disabled || b.auth && !te(o)(b.auth),
|
|
1001
|
+
status: b.status || r[O],
|
|
1002
|
+
content: l(b),
|
|
1003
|
+
icon: b.icon || f(b),
|
|
1004
|
+
onClick: (w) => i(b)
|
|
1005
1005
|
}, null, 8, ["disabled", "status", "content", "icon", "onClick"])) : Z("", !0)
|
|
1006
1006
|
]),
|
|
1007
1007
|
_: 2
|
|
@@ -1011,13 +1011,13 @@ const Bn = (e, t, n) => {
|
|
|
1011
1011
|
})
|
|
1012
1012
|
]),
|
|
1013
1013
|
default: q(() => [
|
|
1014
|
-
j(
|
|
1015
|
-
status:
|
|
1016
|
-
disabled:
|
|
1014
|
+
j(x, {
|
|
1015
|
+
status: c.status,
|
|
1016
|
+
disabled: c.disabled
|
|
1017
1017
|
}, {
|
|
1018
1018
|
default: q(() => [
|
|
1019
|
-
Ut(G(
|
|
1020
|
-
j(
|
|
1019
|
+
Ut(G(c.$t("message.btn.more")) + " ", 1),
|
|
1020
|
+
j(k, { class: "el-icon--right" }, {
|
|
1021
1021
|
default: q(() => [
|
|
1022
1022
|
j(D, { icon: "ri:arrow-down-s-line" })
|
|
1023
1023
|
]),
|
|
@@ -1045,7 +1045,9 @@ const Bn = (e, t, n) => {
|
|
|
1045
1045
|
dataStatus: { default: "detail" }
|
|
1046
1046
|
},
|
|
1047
1047
|
setup(e, { expose: t }) {
|
|
1048
|
-
const n = e, s = L(void 0), { t: o } = Le(), i = L(!0), r = xe(() => n.items.length ? ze(n.items, o) : {}), l = xe(() => n.items.length ? Ht(n.items, n.dataStatus, 6) : n.items)
|
|
1048
|
+
const n = e, s = L(void 0), { t: o } = Le(), i = L(!0), r = xe(() => n.items.length ? ze(n.items, o) : {}), l = xe(() => n.items.length ? Ht(n.items, n.dataStatus, 6) : n.items), f = () => {
|
|
1049
|
+
s.value.toggleCollapse();
|
|
1050
|
+
};
|
|
1049
1051
|
return t({
|
|
1050
1052
|
validateForm: (a) => {
|
|
1051
1053
|
s.value.validate(a);
|
|
@@ -1055,34 +1057,35 @@ const Bn = (e, t, n) => {
|
|
|
1055
1057
|
s.value.clearValidate();
|
|
1056
1058
|
}, 1600);
|
|
1057
1059
|
}
|
|
1058
|
-
}), (a,
|
|
1059
|
-
const
|
|
1060
|
+
}), (a, D) => {
|
|
1061
|
+
const k = V("vxe-checkbox"), x = V("vxe-form");
|
|
1060
1062
|
return A(), P("div", As, [
|
|
1061
|
-
j(
|
|
1063
|
+
j(x, Ce({
|
|
1062
1064
|
ref_key: "xForm",
|
|
1063
1065
|
ref: s,
|
|
1064
|
-
"collapse-status": i.value,
|
|
1065
|
-
"onUpdate:collapseStatus": c[1] || (c[1] = (b) => i.value = b),
|
|
1066
1066
|
data: a.record,
|
|
1067
1067
|
items: l.value,
|
|
1068
1068
|
rules: r.value,
|
|
1069
1069
|
loading: a.loading,
|
|
1070
1070
|
vertical: a.vertical,
|
|
1071
|
-
"title-
|
|
1072
|
-
"title-
|
|
1071
|
+
"title-width": a.titleWidth,
|
|
1072
|
+
"title-overflow": "",
|
|
1073
|
+
"title-align": "right"
|
|
1073
1074
|
}, a.$attrs), {
|
|
1075
|
+
dividerPrefix: q(() => []),
|
|
1074
1076
|
collapseNode: q(() => [
|
|
1075
|
-
j(
|
|
1077
|
+
j(k, {
|
|
1076
1078
|
modelValue: i.value,
|
|
1077
|
-
"onUpdate:modelValue":
|
|
1079
|
+
"onUpdate:modelValue": D[0] || (D[0] = (C) => i.value = C),
|
|
1078
1080
|
content: "查看更多",
|
|
1079
1081
|
"checked-value": !1,
|
|
1080
1082
|
"unchecked-value": !0,
|
|
1081
|
-
class: "pl-10"
|
|
1083
|
+
class: "pl-10",
|
|
1084
|
+
onChange: f
|
|
1082
1085
|
}, null, 8, ["modelValue"])
|
|
1083
1086
|
]),
|
|
1084
1087
|
_: 1
|
|
1085
|
-
}, 16, ["
|
|
1088
|
+
}, 16, ["data", "items", "rules", "loading", "vertical", "title-width"])
|
|
1086
1089
|
]);
|
|
1087
1090
|
};
|
|
1088
1091
|
}
|
|
@@ -1097,23 +1100,23 @@ const Bn = (e, t, n) => {
|
|
|
1097
1100
|
const l = je(r) ? r : r.fetch || r.restful;
|
|
1098
1101
|
if (!l) return null;
|
|
1099
1102
|
const f = r.fetch ? "post" : "get";
|
|
1100
|
-
return new Promise((p,
|
|
1101
|
-
t[f](l, i).then((
|
|
1102
|
-
p(
|
|
1103
|
-
}).catch((
|
|
1104
|
-
a
|
|
1103
|
+
return new Promise((p, c) => {
|
|
1104
|
+
t[f](l, i).then((a) => {
|
|
1105
|
+
p(a.list);
|
|
1106
|
+
}).catch((a) => {
|
|
1107
|
+
c(a);
|
|
1105
1108
|
});
|
|
1106
1109
|
});
|
|
1107
1110
|
}, zn = (e, t, n, s, o) => {
|
|
1108
1111
|
if (o) return js();
|
|
1109
|
-
for (const
|
|
1110
|
-
t[
|
|
1112
|
+
for (const a in t)
|
|
1113
|
+
t[a] && je(t[a]) && (t[a] = t[a].trim());
|
|
1111
1114
|
const i = { pageNum: n.currentPage, pageSize: n.pageSize }, r = Yt();
|
|
1112
1115
|
Object.assign(i, r, e.defaultParams || {}, t);
|
|
1113
1116
|
const l = Hn(i, e.items), { url: f } = e;
|
|
1114
1117
|
if (!f) return null;
|
|
1115
|
-
const p = je(f) ? f : f.fetch || f.restful,
|
|
1116
|
-
return p ? s[
|
|
1118
|
+
const p = je(f) ? f : f.fetch || f.restful, c = f.fetch ? "post" : "get";
|
|
1119
|
+
return p ? s[c](p, l) : null;
|
|
1117
1120
|
}, Vn = (e, t, n) => {
|
|
1118
1121
|
const { url: s } = n;
|
|
1119
1122
|
if (!s) return null;
|
|
@@ -1128,9 +1131,9 @@ const Bn = (e, t, n) => {
|
|
|
1128
1131
|
if (!et(i)) {
|
|
1129
1132
|
const l = Yt();
|
|
1130
1133
|
i.forEach((p) => {
|
|
1131
|
-
var
|
|
1132
|
-
!et(n == null ? void 0 : n.defaultValue) && Object.assign(p, n.defaultValue), (
|
|
1133
|
-
p[
|
|
1134
|
+
var c;
|
|
1135
|
+
!et(n == null ? void 0 : n.defaultValue) && Object.assign(p, n.defaultValue), (c = Object.keys(l)) == null || c.forEach((a) => {
|
|
1136
|
+
p[a] = p[a] || l[a];
|
|
1134
1137
|
});
|
|
1135
1138
|
});
|
|
1136
1139
|
const f = je(o) ? o : o.add || o.restful;
|
|
@@ -1212,25 +1215,25 @@ const Bn = (e, t, n) => {
|
|
|
1212
1215
|
};
|
|
1213
1216
|
if (!t.editable) {
|
|
1214
1217
|
e.editConfig.editable = t.editable;
|
|
1215
|
-
const
|
|
1216
|
-
return
|
|
1218
|
+
const c = t.needExport && s("export");
|
|
1219
|
+
return c && (e.exportConfig = dn(n)), e.toolbarConfig = {
|
|
1217
1220
|
buttons: [],
|
|
1218
|
-
enabled:
|
|
1221
|
+
enabled: c,
|
|
1219
1222
|
refreshOptions: o,
|
|
1220
1223
|
exportOptions: { icon: "ri-download-2-line", code: "export" },
|
|
1221
|
-
customOptions:
|
|
1224
|
+
customOptions: n.gridId ? {} : null,
|
|
1222
1225
|
perfect: !0
|
|
1223
1226
|
}, e;
|
|
1224
1227
|
}
|
|
1225
1228
|
let i = de(n.buttons || [], !0);
|
|
1226
|
-
(n.mode !== "form" ? de(Ls, !0) : de(Is, !0)).reverse().forEach((
|
|
1227
|
-
!i.some((
|
|
1228
|
-
}), i = Un(i, t.auth).filter((
|
|
1229
|
+
(n.mode !== "form" ? de(Ls, !0) : de(Is, !0)).reverse().forEach((c) => {
|
|
1230
|
+
!i.some((a) => a.code === c.code) && i.unshift(c), n.authPrefix && !["print", "export"].includes(c.auth) && (c.auth = n.authPrefix + c.auth.slice(0, 1).toLocaleUpperCase() + c.auth.slice(1).toLocaleLowerCase());
|
|
1231
|
+
}), i = Un(i, t.auth).filter((c) => {
|
|
1229
1232
|
var D;
|
|
1230
|
-
const
|
|
1231
|
-
return (D =
|
|
1232
|
-
(
|
|
1233
|
-
)),
|
|
1233
|
+
const a = c.auth ? s(c.auth) : !0;
|
|
1234
|
+
return (D = c.dropdowns) != null && D.length && (c.dropdowns = c.dropdowns.filter(
|
|
1235
|
+
(k) => !k.auth || k.auth && s(k.auth)
|
|
1236
|
+
)), a;
|
|
1234
1237
|
});
|
|
1235
1238
|
const l = { trigger: "dblclick", mode: "row", showStatus: !0 };
|
|
1236
1239
|
e.editConfig = n.mode !== "form" ? l : { enabled: !1 };
|
|
@@ -1240,7 +1243,7 @@ const Bn = (e, t, n) => {
|
|
|
1240
1243
|
buttons: i,
|
|
1241
1244
|
enabled: !0,
|
|
1242
1245
|
refreshOptions: o,
|
|
1243
|
-
customOptions:
|
|
1246
|
+
customOptions: n.gridId ? {} : null,
|
|
1244
1247
|
exportOptions: p,
|
|
1245
1248
|
perfect: !0
|
|
1246
1249
|
}, e;
|
|
@@ -1325,8 +1328,8 @@ const Bn = (e, t, n) => {
|
|
|
1325
1328
|
setup(e, { emit: t }) {
|
|
1326
1329
|
const n = e, s = De(), o = s.appContext.config.globalProperties.$serviceApi, i = s.appContext.config.globalProperties.$hasAuthority, r = Nn(), { t: l } = Le();
|
|
1327
1330
|
console.log("view ======", n.view);
|
|
1328
|
-
const f = L(null), p = L(""),
|
|
1329
|
-
let
|
|
1331
|
+
const f = L(null), p = L(""), c = L(!1), a = L(!1), D = L(!1), k = L(!1), x = L(!0), C = L({}), d = _e.get("loginer");
|
|
1332
|
+
let _, b, O;
|
|
1330
1333
|
const w = L([]), y = xe(() => n.items.length ? ze(u(), l) : {}), M = xe(() => n.items.length ? Ht(u(), "update") : n.items), u = () => {
|
|
1331
1334
|
const $ = [
|
|
1332
1335
|
{ field: "title", title: "方案名称", required: !0 },
|
|
@@ -1338,27 +1341,27 @@ const Bn = (e, t, n) => {
|
|
|
1338
1341
|
];
|
|
1339
1342
|
return $.push(...de(n.items, !0)), $.filter((B) => B.field !== "dataFlat");
|
|
1340
1343
|
}, T = ($) => {
|
|
1341
|
-
|
|
1344
|
+
b = null;
|
|
1342
1345
|
const B = $.select;
|
|
1343
1346
|
w.value.forEach((z) => {
|
|
1344
1347
|
z.select = !1;
|
|
1345
|
-
}), $.select = !B,
|
|
1348
|
+
}), $.select = !B, x.value = B, b = B ? b : $, $.id === "add" && (x.value = !0, E());
|
|
1346
1349
|
}, E = () => {
|
|
1347
|
-
|
|
1350
|
+
C.value = { isPrivate: "Y", item: {} }, a.value = !0;
|
|
1348
1351
|
}, I = ($, B) => {
|
|
1349
|
-
|
|
1352
|
+
C.value = {
|
|
1350
1353
|
title: $.title,
|
|
1351
1354
|
isPrivate: $.isPrivate,
|
|
1352
1355
|
item: $,
|
|
1353
1356
|
...$.content
|
|
1354
|
-
},
|
|
1357
|
+
}, _ = B, a.value = !0;
|
|
1355
1358
|
}, F = () => {
|
|
1356
1359
|
f.value.validate(async ($) => {
|
|
1357
1360
|
if (!$) {
|
|
1358
1361
|
const B = v();
|
|
1359
|
-
|
|
1362
|
+
k.value = !0;
|
|
1360
1363
|
const z = B.id ? "put" : "post", [X, J] = await Wt(o[z](Dt, [B]));
|
|
1361
|
-
|
|
1364
|
+
k.value = !1, X || (J[0].select = !1, J[0].content = JSON.parse(J[0].content), z === "post" ? w.value.splice(w.value.length - 1, 0, J[0]) : w.value.splice(_, 1, J[0]), O = de(w.value, !0), ft(), a.value = !1);
|
|
1362
1365
|
}
|
|
1363
1366
|
});
|
|
1364
1367
|
}, m = () => {
|
|
@@ -1374,12 +1377,12 @@ const Bn = (e, t, n) => {
|
|
|
1374
1377
|
D.value = !1;
|
|
1375
1378
|
});
|
|
1376
1379
|
}, h = () => {
|
|
1377
|
-
ne("search",
|
|
1380
|
+
ne("search", b.content), g();
|
|
1378
1381
|
}, g = () => {
|
|
1379
|
-
|
|
1382
|
+
a.value ? (C.value = {}, a.value = !1) : (c.value = !1, ne("close"));
|
|
1380
1383
|
}, v = () => {
|
|
1381
|
-
const $ =
|
|
1382
|
-
...
|
|
1384
|
+
const $ = C.value, { title: B, isPrivate: z } = $, X = _e.get("kCookies_param") ? JSON.parse(_e.get("kCookies_param")) : {}, J = {
|
|
1385
|
+
...C.value.item,
|
|
1383
1386
|
...X,
|
|
1384
1387
|
title: B,
|
|
1385
1388
|
isPrivate: z,
|
|
@@ -1427,13 +1430,13 @@ const Bn = (e, t, n) => {
|
|
|
1427
1430
|
m();
|
|
1428
1431
|
const ne = t;
|
|
1429
1432
|
return Je(() => {
|
|
1430
|
-
|
|
1433
|
+
c.value = !0;
|
|
1431
1434
|
}), ($, B) => {
|
|
1432
1435
|
const z = V("el-popover"), X = V("el-scrollbar"), J = V("vxe-input"), oe = V("ut-button"), we = V("vxe-modal"), Ae = V("vxe-form");
|
|
1433
1436
|
return A(), P("div", zs, [
|
|
1434
1437
|
j(we, {
|
|
1435
|
-
modelValue:
|
|
1436
|
-
"onUpdate:modelValue": B[4] || (B[4] = (Q) =>
|
|
1438
|
+
modelValue: c.value,
|
|
1439
|
+
"onUpdate:modelValue": B[4] || (B[4] = (Q) => c.value = Q),
|
|
1437
1440
|
loading: D.value,
|
|
1438
1441
|
width: "820",
|
|
1439
1442
|
height: "360",
|
|
@@ -1535,7 +1538,7 @@ const Bn = (e, t, n) => {
|
|
|
1535
1538
|
onTap: B[2] || (B[2] = (Q) => g())
|
|
1536
1539
|
}),
|
|
1537
1540
|
j(oe, {
|
|
1538
|
-
disabled:
|
|
1541
|
+
disabled: x.value,
|
|
1539
1542
|
content: "confirm",
|
|
1540
1543
|
icon: "ri-save-3-line",
|
|
1541
1544
|
onTap: B[3] || (B[3] = (Q) => h())
|
|
@@ -1545,9 +1548,9 @@ const Bn = (e, t, n) => {
|
|
|
1545
1548
|
_: 1
|
|
1546
1549
|
}, 8, ["modelValue", "loading"]),
|
|
1547
1550
|
j(we, {
|
|
1548
|
-
modelValue:
|
|
1549
|
-
"onUpdate:modelValue": B[7] || (B[7] = (Q) =>
|
|
1550
|
-
loading:
|
|
1551
|
+
modelValue: a.value,
|
|
1552
|
+
"onUpdate:modelValue": B[7] || (B[7] = (Q) => a.value = Q),
|
|
1553
|
+
loading: k.value,
|
|
1551
1554
|
width: "360",
|
|
1552
1555
|
height: "420",
|
|
1553
1556
|
title: "查询方案新增",
|
|
@@ -1558,7 +1561,7 @@ const Bn = (e, t, n) => {
|
|
|
1558
1561
|
j(Ae, {
|
|
1559
1562
|
ref_key: "xForm",
|
|
1560
1563
|
ref: f,
|
|
1561
|
-
data:
|
|
1564
|
+
data: C.value,
|
|
1562
1565
|
items: M.value,
|
|
1563
1566
|
rules: y.value,
|
|
1564
1567
|
"title-align": "right",
|
|
@@ -1604,16 +1607,16 @@ const Bn = (e, t, n) => {
|
|
|
1604
1607
|
setup(e, { expose: t, emit: n }) {
|
|
1605
1608
|
const s = Jt(qt());
|
|
1606
1609
|
let o;
|
|
1607
|
-
const i = {}, r = De(), l = r.appContext.config.globalProperties.$hasAuthority, f = r.appContext.config.globalProperties.$serviceApi, p = r.parent.type.name,
|
|
1610
|
+
const i = {}, r = De(), l = r.appContext.config.globalProperties.$hasAuthority, f = r.appContext.config.globalProperties.$serviceApi, p = r.parent.type.name, c = r.appContext.config.globalProperties.$mode, a = e, { t: D } = Le(), k = L(null), x = L(!1), C = {
|
|
1608
1611
|
icon: "vxe-icon-setting",
|
|
1609
1612
|
name: "favorite",
|
|
1610
1613
|
events: {
|
|
1611
1614
|
click: ($, B) => {
|
|
1612
|
-
B.name === "favorite" && (
|
|
1615
|
+
B.name === "favorite" && (x.value = !0);
|
|
1613
1616
|
}
|
|
1614
1617
|
}
|
|
1615
|
-
}, d = () =>
|
|
1616
|
-
const $ =
|
|
1618
|
+
}, d = () => a.columns.length ? ze(a.columns, D) : {}, _ = () => {
|
|
1619
|
+
const $ = a.columns;
|
|
1617
1620
|
if (s.gridId) {
|
|
1618
1621
|
const z = Bs.filter((J) => !$.some((oe) => oe.field === J.field)).map((J) => (s.format && ["lastUpdateDate", "creationDate"].includes(J.field) && (J.formatter = s.format, J.width = 90), J)), X = $.findIndex((J) => J.field === "operate");
|
|
1619
1622
|
X !== -1 ? $.splice(X, 0, ...z) : $.push(...z);
|
|
@@ -1622,9 +1625,9 @@ const Bn = (e, t, n) => {
|
|
|
1622
1625
|
return Pn(B, s.sortable);
|
|
1623
1626
|
};
|
|
1624
1627
|
ln.getItem(fn).then(($) => {
|
|
1625
|
-
o = $,
|
|
1628
|
+
o = $, b.columns = _();
|
|
1626
1629
|
});
|
|
1627
|
-
const
|
|
1630
|
+
const b = Fe({
|
|
1628
1631
|
border: !0,
|
|
1629
1632
|
pagerConfig: { pageSize: s.pageSize || 20 },
|
|
1630
1633
|
editConfig: {},
|
|
@@ -1633,25 +1636,25 @@ const Bn = (e, t, n) => {
|
|
|
1633
1636
|
columnConfig: { useKey: !0 },
|
|
1634
1637
|
toolbarConfig: { enabled: !1 },
|
|
1635
1638
|
sortConfig: { multiple: !0, trigger: "cell" },
|
|
1636
|
-
height:
|
|
1639
|
+
height: c ? void 0 : window.innerHeight - 92,
|
|
1637
1640
|
checkboxConfig: {
|
|
1638
|
-
checkMethod: ({ row: $ }) => Jn($,
|
|
1639
|
-
checkRowKeys:
|
|
1641
|
+
checkMethod: ({ row: $ }) => Jn($, a),
|
|
1642
|
+
checkRowKeys: a.checkRowKeys
|
|
1640
1643
|
},
|
|
1641
1644
|
loading: !1,
|
|
1642
1645
|
footerRowClassName: "ut-grid-footer",
|
|
1643
1646
|
proxyConfig: {
|
|
1644
1647
|
form: !0,
|
|
1645
1648
|
// 查询是需要启用表单代理
|
|
1646
|
-
autoLoad:
|
|
1649
|
+
autoLoad: a.autoLoad,
|
|
1647
1650
|
showResponseMsgvxe: !1,
|
|
1648
1651
|
showActionMsgvxe: !1,
|
|
1649
1652
|
// 接收 Promise
|
|
1650
1653
|
ajax: {
|
|
1651
|
-
queryAll: ({ form: $ }) => jn(
|
|
1652
|
-
query: ({ page: $, form: B }) => zn(
|
|
1653
|
-
delete: ({ body: { removeRecords: $ } }) => Vn(f, $,
|
|
1654
|
-
save: ({ body: $ }) => Promise.all(qn(f, $,
|
|
1654
|
+
queryAll: ({ form: $ }) => jn(a, f, $),
|
|
1655
|
+
query: ({ page: $, form: B }) => zn(a, B, $, f, c),
|
|
1656
|
+
delete: ({ body: { removeRecords: $ } }) => Vn(f, $, a),
|
|
1657
|
+
save: ({ body: $ }) => Promise.all(qn(f, $, a)),
|
|
1655
1658
|
querySuccess: ({ response: $ }) => h("querySuccess", $),
|
|
1656
1659
|
queryError: ({ response: $ }) => h("queryError", $),
|
|
1657
1660
|
deleteSuccess: ({ response: $ }) => h("deleteSuccess", $),
|
|
@@ -1660,12 +1663,12 @@ const Bn = (e, t, n) => {
|
|
|
1660
1663
|
saveError: ({ response: $ }) => h("saveError", $)
|
|
1661
1664
|
}
|
|
1662
1665
|
},
|
|
1663
|
-
columns: s.gridId ? [] :
|
|
1666
|
+
columns: s.gridId ? [] : _(),
|
|
1664
1667
|
...s
|
|
1665
|
-
}), O = () =>
|
|
1666
|
-
de(
|
|
1667
|
-
p &&
|
|
1668
|
-
) :
|
|
1668
|
+
}), O = () => a.items.length ? Ln(
|
|
1669
|
+
de(a.items, !0),
|
|
1670
|
+
p && a.url ? C : p
|
|
1671
|
+
) : a.items;
|
|
1669
1672
|
function w($) {
|
|
1670
1673
|
const B = o ? o[s.gridId] : {};
|
|
1671
1674
|
return B ? $.map((z, X) => {
|
|
@@ -1674,15 +1677,15 @@ const Bn = (e, t, n) => {
|
|
|
1674
1677
|
}).sort((z, X) => z._sort - X._sort) : $;
|
|
1675
1678
|
}
|
|
1676
1679
|
const y = () => {
|
|
1677
|
-
|
|
1680
|
+
a.items.length && (b.formConfig = {
|
|
1678
1681
|
titleWidth: 100,
|
|
1679
1682
|
titleAlign: "right",
|
|
1680
1683
|
items: O(),
|
|
1681
|
-
rules: ze(
|
|
1684
|
+
rules: ze(a.items, D),
|
|
1682
1685
|
validConfig: { showMessage: !1 }
|
|
1683
1686
|
});
|
|
1684
|
-
const $ = Wn(
|
|
1685
|
-
Object.assign(
|
|
1687
|
+
const $ = Wn(b, a, s, l);
|
|
1688
|
+
Object.assign(b, $), s.gridId && (b.id = s.gridId, b.customConfig = {
|
|
1686
1689
|
storage: !0,
|
|
1687
1690
|
mode: "popup",
|
|
1688
1691
|
checkMethod({ column: B }) {
|
|
@@ -1692,22 +1695,22 @@ const Bn = (e, t, n) => {
|
|
|
1692
1695
|
width: 750,
|
|
1693
1696
|
height: "75%"
|
|
1694
1697
|
}
|
|
1695
|
-
}), s.mergeFooter && (
|
|
1698
|
+
}), s.mergeFooter && (b.showFooter = !0, b.footerMethod = ({ columns: B, data: z }) => Yn({ columns: B, data: z }, s.mergeFooter));
|
|
1696
1699
|
}, M = () => {
|
|
1697
|
-
|
|
1698
|
-
}, u = () => (
|
|
1699
|
-
|
|
1700
|
+
k.value.commitProxy("query");
|
|
1701
|
+
}, u = () => (b.editRules = d(), k.value.refreshColumn()), T = () => {
|
|
1702
|
+
b.loading = !0;
|
|
1700
1703
|
}, E = () => {
|
|
1701
|
-
|
|
1702
|
-
}, I = () => On(
|
|
1703
|
-
const B =
|
|
1704
|
+
b.loading = !1;
|
|
1705
|
+
}, I = () => On(k.value), F = () => k.value.getTableData().fullData, m = ($ = !1) => {
|
|
1706
|
+
const B = a.columns[0].type, z = B === "radio" ? k.value.getRadioRecord($) : k.value.getCheckboxRecords($);
|
|
1704
1707
|
return B === "checkbox" && !z.length ? (Ie(D("message.tip_selectedRecord")), []) : B === "radio" && !z ? (Ie(D("message.tip_selectedRecord")), null) : z;
|
|
1705
1708
|
}, h = ($, B) => {
|
|
1706
1709
|
s != null && s.callback && (s != null && s.callback[$]) && (s == null || s.callback[$](B));
|
|
1707
1710
|
};
|
|
1708
1711
|
let g;
|
|
1709
1712
|
const v = () => {
|
|
1710
|
-
const $ =
|
|
1713
|
+
const $ = k.value;
|
|
1711
1714
|
g = Bo.create(
|
|
1712
1715
|
$.$el.querySelector(".vxe-table--header .vxe-header--row"),
|
|
1713
1716
|
{
|
|
@@ -1735,8 +1738,8 @@ const Bn = (e, t, n) => {
|
|
|
1735
1738
|
}
|
|
1736
1739
|
);
|
|
1737
1740
|
}, N = ($) => {
|
|
1738
|
-
|
|
1739
|
-
const { form: B } =
|
|
1741
|
+
x.value = !1;
|
|
1742
|
+
const { form: B } = k.value.getProxyInfo();
|
|
1740
1743
|
Object.assign(B, $), M();
|
|
1741
1744
|
};
|
|
1742
1745
|
t({
|
|
@@ -1759,7 +1762,7 @@ const Bn = (e, t, n) => {
|
|
|
1759
1762
|
}, he = () => {
|
|
1760
1763
|
window.onresize = () => (() => {
|
|
1761
1764
|
let $ = (s == null ? void 0 : s.height) || window.innerHeight - 90;
|
|
1762
|
-
s.mode !== "inline" && !(s != null && s.height) && ($ = window.innerHeight - 180),
|
|
1765
|
+
s.mode !== "inline" && !(s != null && s.height) && ($ = window.innerHeight - 180), b.height = $ < 240 ? 240 : $;
|
|
1763
1766
|
})();
|
|
1764
1767
|
};
|
|
1765
1768
|
let W;
|
|
@@ -1778,20 +1781,20 @@ const Bn = (e, t, n) => {
|
|
|
1778
1781
|
return A(), P("div", ui, [
|
|
1779
1782
|
j(z, Ce({
|
|
1780
1783
|
ref_key: "xgrid",
|
|
1781
|
-
ref:
|
|
1782
|
-
},
|
|
1784
|
+
ref: k
|
|
1785
|
+
}, b, { class: "ut-grid-wrapper" }, jt(te(s).events || {}), {
|
|
1783
1786
|
onToolbarButtonClick: U,
|
|
1784
1787
|
onToolbarToolClick: U,
|
|
1785
1788
|
onCellClick: Y,
|
|
1786
1789
|
onCellDblclick: re,
|
|
1787
1790
|
onEditActivated: ve
|
|
1788
1791
|
}), null, 16),
|
|
1789
|
-
|
|
1792
|
+
x.value && a.url ? (A(), ie(ci, {
|
|
1790
1793
|
key: 0,
|
|
1791
1794
|
items: $.items,
|
|
1792
1795
|
view: te(p),
|
|
1793
1796
|
onSearch: N,
|
|
1794
|
-
onClose: B[0] || (B[0] = (X) =>
|
|
1797
|
+
onClose: B[0] || (B[0] = (X) => x.value = !1)
|
|
1795
1798
|
}, null, 8, ["items", "view"])) : Z("", !0)
|
|
1796
1799
|
]);
|
|
1797
1800
|
};
|
|
@@ -1814,43 +1817,43 @@ const Bn = (e, t, n) => {
|
|
|
1814
1817
|
},
|
|
1815
1818
|
emits: ["close", "confirm"],
|
|
1816
1819
|
setup(e, { expose: t, emit: n }) {
|
|
1817
|
-
const s = e, o = Jt(qt()), i = L(!1), l = De().appContext.config.globalProperties.$serviceApi, f = xe(() => s.items.length ? ze(s.items,
|
|
1820
|
+
const s = e, o = Jt(qt()), i = L(!1), l = De().appContext.config.globalProperties.$serviceApi, f = xe(() => s.items.length ? ze(s.items, c) : {}), p = xe(() => s.items.length ? Ht(s.items, s.dataStatus) : s.items), { t: c } = Le(), a = L(!1), D = L(null), k = () => {
|
|
1818
1821
|
D.value.validate(async (y) => {
|
|
1819
1822
|
if (!y) {
|
|
1820
1823
|
const { record: M, url: u, method: T } = s;
|
|
1821
1824
|
if (u) {
|
|
1822
|
-
|
|
1825
|
+
x();
|
|
1823
1826
|
const E = o != null && o.dataProcessMethod ? o == null ? void 0 : o.dataProcessMethod(M) : M;
|
|
1824
1827
|
if (u) {
|
|
1825
1828
|
const [I, F] = await Wt(l[T](u, E));
|
|
1826
1829
|
I || (ft(), w("confirm", F));
|
|
1827
1830
|
}
|
|
1828
|
-
|
|
1831
|
+
C(), b();
|
|
1829
1832
|
} else
|
|
1830
1833
|
w("confirm");
|
|
1831
1834
|
}
|
|
1832
1835
|
});
|
|
1833
|
-
},
|
|
1836
|
+
}, x = () => {
|
|
1834
1837
|
i.value = !0;
|
|
1835
|
-
},
|
|
1838
|
+
}, C = () => {
|
|
1836
1839
|
i.value = !1;
|
|
1837
1840
|
}, d = (y) => {
|
|
1838
1841
|
D.value.validate(y);
|
|
1839
|
-
},
|
|
1842
|
+
}, _ = (y) => {
|
|
1840
1843
|
D.value.validate(y);
|
|
1841
|
-
},
|
|
1842
|
-
|
|
1844
|
+
}, b = () => {
|
|
1845
|
+
a.value = !1, w("close");
|
|
1843
1846
|
}, O = () => {
|
|
1844
|
-
|
|
1847
|
+
a.value = !0;
|
|
1845
1848
|
}, w = n;
|
|
1846
|
-
return t({ showLoading:
|
|
1849
|
+
return t({ showLoading: x, hiddenLoading: C, openModal: O, validate: d, validateForm: _ }), ht(() => {
|
|
1847
1850
|
O();
|
|
1848
1851
|
}), (y, M) => {
|
|
1849
1852
|
const u = V("vxe-form"), T = V("ut-button"), E = V("vxe-modal");
|
|
1850
1853
|
return A(), P("div", null, [
|
|
1851
1854
|
j(E, Ce({
|
|
1852
|
-
modelValue:
|
|
1853
|
-
"onUpdate:modelValue": M[0] || (M[0] = (I) =>
|
|
1855
|
+
modelValue: a.value,
|
|
1856
|
+
"onUpdate:modelValue": M[0] || (M[0] = (I) => a.value = I),
|
|
1854
1857
|
title: y.title,
|
|
1855
1858
|
width: y.width,
|
|
1856
1859
|
height: y.height,
|
|
@@ -1861,7 +1864,7 @@ const Bn = (e, t, n) => {
|
|
|
1861
1864
|
}, y.modalAttrs, {
|
|
1862
1865
|
"destroy-on-close": "",
|
|
1863
1866
|
resize: "",
|
|
1864
|
-
onClose:
|
|
1867
|
+
onClose: b
|
|
1865
1868
|
}), {
|
|
1866
1869
|
default: q(() => [
|
|
1867
1870
|
j(u, Ce({
|
|
@@ -1879,13 +1882,13 @@ const Bn = (e, t, n) => {
|
|
|
1879
1882
|
status: "warning",
|
|
1880
1883
|
content: "cancel",
|
|
1881
1884
|
icon: "ri-close-line",
|
|
1882
|
-
onTap:
|
|
1885
|
+
onTap: b
|
|
1883
1886
|
}),
|
|
1884
1887
|
j(T, {
|
|
1885
1888
|
status: "u-cyan",
|
|
1886
1889
|
content: "confirm",
|
|
1887
1890
|
icon: "ri-save-3-line",
|
|
1888
|
-
onTap:
|
|
1891
|
+
onTap: k
|
|
1889
1892
|
})
|
|
1890
1893
|
]),
|
|
1891
1894
|
_: 1
|
|
@@ -1920,10 +1923,10 @@ const Bn = (e, t, n) => {
|
|
|
1920
1923
|
},
|
|
1921
1924
|
emits: ["close", "confirm", "actived", "buttonClick"],
|
|
1922
1925
|
setup(e, { expose: t, emit: n }) {
|
|
1923
|
-
const s = Jt(qt()), o = e, i = L(!1), r = L(null), l = De(), f = l.appContext.config.globalProperties.$hasAuthority, p = l.appContext.config.globalProperties.$serviceApi,
|
|
1926
|
+
const s = Jt(qt()), o = e, i = L(!1), r = L(null), l = De(), f = l.appContext.config.globalProperties.$hasAuthority, p = l.appContext.config.globalProperties.$serviceApi, c = l.appContext.config.globalProperties.$mode, { t: a } = Le(), D = () => {
|
|
1924
1927
|
const h = o.columns.map((g) => (o.editable ? !g.type && !g.editRender && o.editable && g.editable && (g.editRender = { name: "VxeInput" }) : g.editRender = { enabled: !1 }, g));
|
|
1925
1928
|
return Pn(h, s.sortable);
|
|
1926
|
-
},
|
|
1929
|
+
}, k = () => o.items.length ? Ln(de(o.items, !0)) : o.items, x = () => o.columns.length ? ze(o.columns, a) : {}, C = Fe({
|
|
1927
1930
|
loading: !1,
|
|
1928
1931
|
border: !0,
|
|
1929
1932
|
pagerConfig: {},
|
|
@@ -1932,14 +1935,14 @@ const Bn = (e, t, n) => {
|
|
|
1932
1935
|
height: "auto",
|
|
1933
1936
|
editConfig: {},
|
|
1934
1937
|
rowConfig: { keyField: "_X_ROW_KEY" },
|
|
1935
|
-
editRules:
|
|
1938
|
+
editRules: x(),
|
|
1936
1939
|
proxyConfig: {
|
|
1937
1940
|
form: !0,
|
|
1938
1941
|
// 查询是需要启用表单代理
|
|
1939
1942
|
autoLoad: o.autoLoad,
|
|
1940
1943
|
ajax: {
|
|
1941
1944
|
queryAll: ({ form: h }) => jn(o, p, h),
|
|
1942
|
-
query: ({ page: h, form: g }) => zn(o, g, h, p,
|
|
1945
|
+
query: ({ page: h, form: g }) => zn(o, g, h, p, c),
|
|
1943
1946
|
delete: ({ body: { removeRecords: h } }) => Vn(p, h, o),
|
|
1944
1947
|
save: ({ body: h }) => Promise.all(qn(p, h, o))
|
|
1945
1948
|
}
|
|
@@ -1954,9 +1957,9 @@ const Bn = (e, t, n) => {
|
|
|
1954
1957
|
let h = null;
|
|
1955
1958
|
const g = o.columns[0].type;
|
|
1956
1959
|
if (g === "checkbox" ? h = r.value.getCheckboxRecords() : g === "radio" ? h = r.value.getRadioRecord() : h = r.value.getTableData().fullData, g === "checkbox" && !h.length && !o.addChild)
|
|
1957
|
-
return Ie(
|
|
1960
|
+
return Ie(a("message.selectedRecord"));
|
|
1958
1961
|
if (g === "radio" && !h)
|
|
1959
|
-
return Ie(
|
|
1962
|
+
return Ie(a("message.selectedRecord"));
|
|
1960
1963
|
if (At(s.beforeConfirm) && !s.beforeConfirm(h)) return;
|
|
1961
1964
|
const { submitUrl: v } = o;
|
|
1962
1965
|
if (v) {
|
|
@@ -1965,14 +1968,14 @@ const Bn = (e, t, n) => {
|
|
|
1965
1968
|
try {
|
|
1966
1969
|
h.forEach((U) => Object.assign(U, o.defaultParams)), N = await p.post(v, h);
|
|
1967
1970
|
} finally {
|
|
1968
|
-
N && I("confirm", N), N && ft(
|
|
1971
|
+
N && I("confirm", N), N && ft(a("message.operateSuccess")), F(), T();
|
|
1969
1972
|
}
|
|
1970
1973
|
} else
|
|
1971
1974
|
o.autoClose && F(), I("confirm", h);
|
|
1972
|
-
}, x = () => {
|
|
1973
|
-
r.value.commitProxy("query");
|
|
1974
1975
|
}, _ = () => {
|
|
1975
|
-
|
|
1976
|
+
r.value.commitProxy("query");
|
|
1977
|
+
}, b = () => {
|
|
1978
|
+
C.editRules = x(), r.value.refreshColumn();
|
|
1976
1979
|
}, O = () => On(r.value), w = ({ row: h }) => {
|
|
1977
1980
|
const g = o.columns[0].type;
|
|
1978
1981
|
g === "checkbox" ? r.value.setCheckboxRow(h, !0) : g === "radio" && r.value.setRadioRow(h);
|
|
@@ -1981,28 +1984,28 @@ const Bn = (e, t, n) => {
|
|
|
1981
1984
|
}, M = ({ code: h }) => {
|
|
1982
1985
|
I("buttonClick", h);
|
|
1983
1986
|
}, u = () => {
|
|
1984
|
-
|
|
1987
|
+
C.loading = !0;
|
|
1985
1988
|
}, T = () => {
|
|
1986
|
-
|
|
1989
|
+
C.loading = !1;
|
|
1987
1990
|
}, E = (h = !1) => {
|
|
1988
1991
|
const g = o.columns[0].type, v = g === "radio" ? xgrid.value.getRadioRecord(h) : xgrid.value.getCheckboxRecords(h);
|
|
1989
|
-
return g === "checkbox" && !v.length ? (Ie(
|
|
1992
|
+
return g === "checkbox" && !v.length ? (Ie(a("message.tip_selectedRecord")), []) : g === "radio" && !v ? (Ie(a("message.tip_selectedRecord")), null) : v;
|
|
1990
1993
|
}, I = n, F = () => {
|
|
1991
1994
|
At(s.beforeClose) && !s.beforeClose() || (i.value = !1, I("close"));
|
|
1992
1995
|
}, m = () => {
|
|
1993
|
-
o.items.length && (
|
|
1996
|
+
o.items.length && (C.formConfig = {
|
|
1994
1997
|
titleWidth: 100,
|
|
1995
1998
|
titleAlign: "right",
|
|
1996
|
-
items:
|
|
1997
|
-
rules: ze(o.items,
|
|
1999
|
+
items: k(),
|
|
2000
|
+
rules: ze(o.items, a),
|
|
1998
2001
|
validConfig: { showMessage: !1 }
|
|
1999
2002
|
});
|
|
2000
|
-
const h = Wn(
|
|
2001
|
-
Object.assign(
|
|
2003
|
+
const h = Wn(C, o, s, f);
|
|
2004
|
+
Object.assign(C, h), s.mergeFooter && (C.showFooter = !0, C.footerMethod = ({ columns: g, data: v }) => Yn({ columns: g, data: v }, s.mergeFooter));
|
|
2002
2005
|
};
|
|
2003
2006
|
return t({
|
|
2004
|
-
refreshData:
|
|
2005
|
-
refreshColumn:
|
|
2007
|
+
refreshData: _,
|
|
2008
|
+
refreshColumn: b,
|
|
2006
2009
|
getInstance: O,
|
|
2007
2010
|
showLoading: u,
|
|
2008
2011
|
hiddenLoading: T,
|
|
@@ -2019,7 +2022,7 @@ const Bn = (e, t, n) => {
|
|
|
2019
2022
|
title: h.title,
|
|
2020
2023
|
width: h.width,
|
|
2021
2024
|
height: h.height,
|
|
2022
|
-
loading:
|
|
2025
|
+
loading: C.loading,
|
|
2023
2026
|
"show-footer": h.showFooter,
|
|
2024
2027
|
resize: "",
|
|
2025
2028
|
"destroy-on-close": "",
|
|
@@ -2030,7 +2033,7 @@ const Bn = (e, t, n) => {
|
|
|
2030
2033
|
j(v, Ce({
|
|
2031
2034
|
ref_key: "xGrid",
|
|
2032
2035
|
ref: r
|
|
2033
|
-
},
|
|
2036
|
+
}, C, { resizable: "" }, jt(te(s).events || {}), {
|
|
2034
2037
|
onEditActivated: y,
|
|
2035
2038
|
onToolbarButtonClick: M,
|
|
2036
2039
|
onToolbarToolClick: M,
|
|
@@ -2355,59 +2358,59 @@ function _t(e, t, n) {
|
|
|
2355
2358
|
metaTokens: !0,
|
|
2356
2359
|
dots: !1,
|
|
2357
2360
|
indexes: !1
|
|
2358
|
-
}, !1, function(
|
|
2359
|
-
return !S.isUndefined(d[
|
|
2361
|
+
}, !1, function(C, d) {
|
|
2362
|
+
return !S.isUndefined(d[C]);
|
|
2360
2363
|
});
|
|
2361
|
-
const s = n.metaTokens, o = n.visitor ||
|
|
2364
|
+
const s = n.metaTokens, o = n.visitor || c, i = n.dots, r = n.indexes, f = (n.Blob || typeof Blob < "u" && Blob) && S.isSpecCompliantForm(t);
|
|
2362
2365
|
if (!S.isFunction(o))
|
|
2363
2366
|
throw new TypeError("visitor must be a function");
|
|
2364
|
-
function p(
|
|
2365
|
-
if (
|
|
2366
|
-
if (S.isDate(
|
|
2367
|
-
return
|
|
2368
|
-
if (!f && S.isBlob(
|
|
2367
|
+
function p(x) {
|
|
2368
|
+
if (x === null) return "";
|
|
2369
|
+
if (S.isDate(x))
|
|
2370
|
+
return x.toISOString();
|
|
2371
|
+
if (!f && S.isBlob(x))
|
|
2369
2372
|
throw new H("Blob is not supported. Use a Buffer instead.");
|
|
2370
|
-
return S.isArrayBuffer(
|
|
2373
|
+
return S.isArrayBuffer(x) || S.isTypedArray(x) ? f && typeof Blob == "function" ? new Blob([x]) : Buffer.from(x) : x;
|
|
2371
2374
|
}
|
|
2372
|
-
function
|
|
2373
|
-
let
|
|
2374
|
-
if (
|
|
2375
|
-
if (S.endsWith(
|
|
2376
|
-
|
|
2377
|
-
else if (S.isArray(
|
|
2378
|
-
return
|
|
2375
|
+
function c(x, C, d) {
|
|
2376
|
+
let _ = x;
|
|
2377
|
+
if (x && !d && typeof x == "object") {
|
|
2378
|
+
if (S.endsWith(C, "{}"))
|
|
2379
|
+
C = s ? C : C.slice(0, -2), x = JSON.stringify(x);
|
|
2380
|
+
else if (S.isArray(x) && ir(x) || (S.isFileList(x) || S.endsWith(C, "[]")) && (_ = S.toArray(x)))
|
|
2381
|
+
return C = io(C), _.forEach(function(O, w) {
|
|
2379
2382
|
!(S.isUndefined(O) || O === null) && t.append(
|
|
2380
2383
|
// eslint-disable-next-line no-nested-ternary
|
|
2381
|
-
r === !0 ? mn([
|
|
2384
|
+
r === !0 ? mn([C], w, i) : r === null ? C : C + "[]",
|
|
2382
2385
|
p(O)
|
|
2383
2386
|
);
|
|
2384
2387
|
}), !1;
|
|
2385
2388
|
}
|
|
2386
|
-
return Nt(
|
|
2389
|
+
return Nt(x) ? !0 : (t.append(mn(d, C, i), p(x)), !1);
|
|
2387
2390
|
}
|
|
2388
|
-
const
|
|
2389
|
-
defaultVisitor:
|
|
2391
|
+
const a = [], D = Object.assign(rr, {
|
|
2392
|
+
defaultVisitor: c,
|
|
2390
2393
|
convertValue: p,
|
|
2391
2394
|
isVisitable: Nt
|
|
2392
2395
|
});
|
|
2393
|
-
function
|
|
2394
|
-
if (!S.isUndefined(
|
|
2395
|
-
if (
|
|
2396
|
-
throw Error("Circular reference detected in " +
|
|
2397
|
-
|
|
2398
|
-
(!(S.isUndefined(
|
|
2396
|
+
function k(x, C) {
|
|
2397
|
+
if (!S.isUndefined(x)) {
|
|
2398
|
+
if (a.indexOf(x) !== -1)
|
|
2399
|
+
throw Error("Circular reference detected in " + C.join("."));
|
|
2400
|
+
a.push(x), S.forEach(x, function(_, b) {
|
|
2401
|
+
(!(S.isUndefined(_) || _ === null) && o.call(
|
|
2399
2402
|
t,
|
|
2400
|
-
|
|
2401
|
-
S.isString(
|
|
2402
|
-
|
|
2403
|
+
_,
|
|
2404
|
+
S.isString(b) ? b.trim() : b,
|
|
2405
|
+
C,
|
|
2403
2406
|
D
|
|
2404
|
-
)) === !0 &&
|
|
2405
|
-
}),
|
|
2407
|
+
)) === !0 && k(_, C ? C.concat(b) : [b]);
|
|
2408
|
+
}), a.pop();
|
|
2406
2409
|
}
|
|
2407
2410
|
}
|
|
2408
2411
|
if (!S.isObject(e))
|
|
2409
2412
|
throw new TypeError("data must be an object");
|
|
2410
|
-
return
|
|
2413
|
+
return k(e), t;
|
|
2411
2414
|
}
|
|
2412
2415
|
function hn(e) {
|
|
2413
2416
|
const t = {
|
|
@@ -2718,23 +2721,23 @@ let ye = class {
|
|
|
2718
2721
|
set(t, n, s) {
|
|
2719
2722
|
const o = this;
|
|
2720
2723
|
function i(l, f, p) {
|
|
2721
|
-
const
|
|
2722
|
-
if (!
|
|
2724
|
+
const c = Ze(f);
|
|
2725
|
+
if (!c)
|
|
2723
2726
|
throw new Error("header name must be a non-empty string");
|
|
2724
|
-
const
|
|
2725
|
-
(!
|
|
2727
|
+
const a = S.findKey(o, c);
|
|
2728
|
+
(!a || o[a] === void 0 || p === !0 || p === void 0 && o[a] !== !1) && (o[a || f] = lt(l));
|
|
2726
2729
|
}
|
|
2727
|
-
const r = (l, f) => S.forEach(l, (p,
|
|
2730
|
+
const r = (l, f) => S.forEach(l, (p, c) => i(p, c, f));
|
|
2728
2731
|
if (S.isPlainObject(t) || t instanceof this.constructor)
|
|
2729
2732
|
r(t, n);
|
|
2730
2733
|
else if (S.isString(t) && (t = t.trim()) && !Cr(t))
|
|
2731
2734
|
r(_r(t), n);
|
|
2732
2735
|
else if (S.isObject(t) && S.isIterable(t)) {
|
|
2733
2736
|
let l = {}, f, p;
|
|
2734
|
-
for (const
|
|
2735
|
-
if (!S.isArray(
|
|
2737
|
+
for (const c of t) {
|
|
2738
|
+
if (!S.isArray(c))
|
|
2736
2739
|
throw TypeError("Object iterator must return a key-value pair");
|
|
2737
|
-
l[p =
|
|
2740
|
+
l[p = c[0]] = (f = l[p]) ? S.isArray(f) ? [...f, c[1]] : [f, c[1]] : c[1];
|
|
2738
2741
|
}
|
|
2739
2742
|
r(l, n);
|
|
2740
2743
|
} else
|
|
@@ -2883,47 +2886,47 @@ function Er(e, t) {
|
|
|
2883
2886
|
const n = new Array(e), s = new Array(e);
|
|
2884
2887
|
let o = 0, i = 0, r;
|
|
2885
2888
|
return t = t !== void 0 ? t : 1e3, function(f) {
|
|
2886
|
-
const p = Date.now(),
|
|
2889
|
+
const p = Date.now(), c = s[i];
|
|
2887
2890
|
r || (r = p), n[o] = f, s[o] = p;
|
|
2888
|
-
let
|
|
2889
|
-
for (;
|
|
2890
|
-
D += n[
|
|
2891
|
+
let a = i, D = 0;
|
|
2892
|
+
for (; a !== o; )
|
|
2893
|
+
D += n[a++], a = a % e;
|
|
2891
2894
|
if (o = (o + 1) % e, o === i && (i = (i + 1) % e), p - r < t)
|
|
2892
2895
|
return;
|
|
2893
|
-
const
|
|
2894
|
-
return
|
|
2896
|
+
const k = c && p - c;
|
|
2897
|
+
return k ? Math.round(D * 1e3 / k) : void 0;
|
|
2895
2898
|
};
|
|
2896
2899
|
}
|
|
2897
2900
|
function Dr(e, t) {
|
|
2898
2901
|
let n = 0, s = 1e3 / t, o, i;
|
|
2899
|
-
const r = (p,
|
|
2900
|
-
n =
|
|
2902
|
+
const r = (p, c = Date.now()) => {
|
|
2903
|
+
n = c, o = null, i && (clearTimeout(i), i = null), e.apply(null, p);
|
|
2901
2904
|
};
|
|
2902
2905
|
return [(...p) => {
|
|
2903
|
-
const
|
|
2904
|
-
|
|
2906
|
+
const c = Date.now(), a = c - n;
|
|
2907
|
+
a >= s ? r(p, c) : (o = p, i || (i = setTimeout(() => {
|
|
2905
2908
|
i = null, r(o);
|
|
2906
|
-
}, s -
|
|
2909
|
+
}, s - a)));
|
|
2907
2910
|
}, () => o && r(o)];
|
|
2908
2911
|
}
|
|
2909
2912
|
const pt = (e, t, n = 3) => {
|
|
2910
2913
|
let s = 0;
|
|
2911
2914
|
const o = Er(50, 250);
|
|
2912
2915
|
return Dr((i) => {
|
|
2913
|
-
const r = i.loaded, l = i.lengthComputable ? i.total : void 0, f = r - s, p = o(f),
|
|
2916
|
+
const r = i.loaded, l = i.lengthComputable ? i.total : void 0, f = r - s, p = o(f), c = r <= l;
|
|
2914
2917
|
s = r;
|
|
2915
|
-
const
|
|
2918
|
+
const a = {
|
|
2916
2919
|
loaded: r,
|
|
2917
2920
|
total: l,
|
|
2918
2921
|
progress: l ? r / l : void 0,
|
|
2919
2922
|
bytes: f,
|
|
2920
2923
|
rate: p || void 0,
|
|
2921
|
-
estimated: p && l &&
|
|
2924
|
+
estimated: p && l && c ? (l - r) / p : void 0,
|
|
2922
2925
|
event: i,
|
|
2923
2926
|
lengthComputable: l != null,
|
|
2924
2927
|
[t ? "download" : "upload"]: !0
|
|
2925
2928
|
};
|
|
2926
|
-
e(
|
|
2929
|
+
e(a);
|
|
2927
2930
|
}, n);
|
|
2928
2931
|
}, vn = (e, t) => {
|
|
2929
2932
|
const n = e != null;
|
|
@@ -2976,29 +2979,29 @@ const bn = (e) => e instanceof ye ? { ...e } : e;
|
|
|
2976
2979
|
function Ve(e, t) {
|
|
2977
2980
|
t = t || {};
|
|
2978
2981
|
const n = {};
|
|
2979
|
-
function s(p,
|
|
2980
|
-
return S.isPlainObject(p) && S.isPlainObject(
|
|
2982
|
+
function s(p, c, a, D) {
|
|
2983
|
+
return S.isPlainObject(p) && S.isPlainObject(c) ? S.merge.call({ caseless: D }, p, c) : S.isPlainObject(c) ? S.merge({}, c) : S.isArray(c) ? c.slice() : c;
|
|
2981
2984
|
}
|
|
2982
|
-
function o(p,
|
|
2983
|
-
if (S.isUndefined(
|
|
2985
|
+
function o(p, c, a, D) {
|
|
2986
|
+
if (S.isUndefined(c)) {
|
|
2984
2987
|
if (!S.isUndefined(p))
|
|
2985
|
-
return s(void 0, p,
|
|
2986
|
-
} else return s(p,
|
|
2988
|
+
return s(void 0, p, a, D);
|
|
2989
|
+
} else return s(p, c, a, D);
|
|
2987
2990
|
}
|
|
2988
|
-
function i(p,
|
|
2989
|
-
if (!S.isUndefined(
|
|
2990
|
-
return s(void 0,
|
|
2991
|
+
function i(p, c) {
|
|
2992
|
+
if (!S.isUndefined(c))
|
|
2993
|
+
return s(void 0, c);
|
|
2991
2994
|
}
|
|
2992
|
-
function r(p,
|
|
2993
|
-
if (S.isUndefined(
|
|
2995
|
+
function r(p, c) {
|
|
2996
|
+
if (S.isUndefined(c)) {
|
|
2994
2997
|
if (!S.isUndefined(p))
|
|
2995
2998
|
return s(void 0, p);
|
|
2996
|
-
} else return s(void 0,
|
|
2999
|
+
} else return s(void 0, c);
|
|
2997
3000
|
}
|
|
2998
|
-
function l(p,
|
|
2999
|
-
if (
|
|
3000
|
-
return s(p,
|
|
3001
|
-
if (
|
|
3001
|
+
function l(p, c, a) {
|
|
3002
|
+
if (a in t)
|
|
3003
|
+
return s(p, c);
|
|
3004
|
+
if (a in e)
|
|
3002
3005
|
return s(void 0, p);
|
|
3003
3006
|
}
|
|
3004
3007
|
const f = {
|
|
@@ -3030,11 +3033,11 @@ function Ve(e, t) {
|
|
|
3030
3033
|
socketPath: r,
|
|
3031
3034
|
responseEncoding: r,
|
|
3032
3035
|
validateStatus: l,
|
|
3033
|
-
headers: (p,
|
|
3036
|
+
headers: (p, c, a) => o(bn(p), bn(c), a, !0)
|
|
3034
3037
|
};
|
|
3035
|
-
return S.forEach(Object.keys(Object.assign({}, e, t)), function(
|
|
3036
|
-
const
|
|
3037
|
-
S.isUndefined(D) &&
|
|
3038
|
+
return S.forEach(Object.keys(Object.assign({}, e, t)), function(c) {
|
|
3039
|
+
const a = f[c] || o, D = a(e[c], t[c], c);
|
|
3040
|
+
S.isUndefined(D) && a !== l || (n[c] = D);
|
|
3038
3041
|
}), n;
|
|
3039
3042
|
}
|
|
3040
3043
|
const mo = (e) => {
|
|
@@ -3049,8 +3052,8 @@ const mo = (e) => {
|
|
|
3049
3052
|
if (fe.hasStandardBrowserEnv || fe.hasStandardBrowserWebWorkerEnv)
|
|
3050
3053
|
r.setContentType(void 0);
|
|
3051
3054
|
else if ((f = r.getContentType()) !== !1) {
|
|
3052
|
-
const [p, ...
|
|
3053
|
-
r.setContentType([p || "multipart/form-data", ...
|
|
3055
|
+
const [p, ...c] = f ? f.split(";").map((a) => a.trim()).filter(Boolean) : [];
|
|
3056
|
+
r.setContentType([p || "multipart/form-data", ...c].join("; "));
|
|
3054
3057
|
}
|
|
3055
3058
|
}
|
|
3056
3059
|
if (fe.hasStandardBrowserEnv && (s && S.isFunction(s) && (s = s(t)), s || s !== !1 && $r(t.url))) {
|
|
@@ -3063,13 +3066,13 @@ const mo = (e) => {
|
|
|
3063
3066
|
const o = mo(e);
|
|
3064
3067
|
let i = o.data;
|
|
3065
3068
|
const r = ye.from(o.headers).normalize();
|
|
3066
|
-
let { responseType: l, onUploadProgress: f, onDownloadProgress: p } = o,
|
|
3067
|
-
function
|
|
3068
|
-
|
|
3069
|
+
let { responseType: l, onUploadProgress: f, onDownloadProgress: p } = o, c, a, D, k, x;
|
|
3070
|
+
function C() {
|
|
3071
|
+
k && k(), x && x(), o.cancelToken && o.cancelToken.unsubscribe(c), o.signal && o.signal.removeEventListener("abort", c);
|
|
3069
3072
|
}
|
|
3070
3073
|
let d = new XMLHttpRequest();
|
|
3071
3074
|
d.open(o.method.toUpperCase(), o.url, !0), d.timeout = o.timeout;
|
|
3072
|
-
function
|
|
3075
|
+
function _() {
|
|
3073
3076
|
if (!d)
|
|
3074
3077
|
return;
|
|
3075
3078
|
const O = ye.from(
|
|
@@ -3083,13 +3086,13 @@ const mo = (e) => {
|
|
|
3083
3086
|
request: d
|
|
3084
3087
|
};
|
|
3085
3088
|
fo(function(u) {
|
|
3086
|
-
n(u),
|
|
3089
|
+
n(u), C();
|
|
3087
3090
|
}, function(u) {
|
|
3088
|
-
s(u),
|
|
3091
|
+
s(u), C();
|
|
3089
3092
|
}, y), d = null;
|
|
3090
3093
|
}
|
|
3091
|
-
"onloadend" in d ? d.onloadend =
|
|
3092
|
-
!d || d.readyState !== 4 || d.status === 0 && !(d.responseURL && d.responseURL.indexOf("file:") === 0) || setTimeout(
|
|
3094
|
+
"onloadend" in d ? d.onloadend = _ : d.onreadystatechange = function() {
|
|
3095
|
+
!d || d.readyState !== 4 || d.status === 0 && !(d.responseURL && d.responseURL.indexOf("file:") === 0) || setTimeout(_);
|
|
3093
3096
|
}, d.onabort = function() {
|
|
3094
3097
|
d && (s(new H("Request aborted", H.ECONNABORTED, e, d)), d = null);
|
|
3095
3098
|
}, d.onerror = function() {
|
|
@@ -3105,12 +3108,12 @@ const mo = (e) => {
|
|
|
3105
3108
|
)), d = null;
|
|
3106
3109
|
}, i === void 0 && r.setContentType(null), "setRequestHeader" in d && S.forEach(r.toJSON(), function(w, y) {
|
|
3107
3110
|
d.setRequestHeader(y, w);
|
|
3108
|
-
}), S.isUndefined(o.withCredentials) || (d.withCredentials = !!o.withCredentials), l && l !== "json" && (d.responseType = o.responseType), p && ([D,
|
|
3111
|
+
}), S.isUndefined(o.withCredentials) || (d.withCredentials = !!o.withCredentials), l && l !== "json" && (d.responseType = o.responseType), p && ([D, x] = pt(p, !0), d.addEventListener("progress", D)), f && d.upload && ([a, k] = pt(f), d.upload.addEventListener("progress", a), d.upload.addEventListener("loadend", k)), (o.cancelToken || o.signal) && (c = (O) => {
|
|
3109
3112
|
d && (s(!O || O.type ? new Ge(null, e, d) : O), d.abort(), d = null);
|
|
3110
|
-
}, o.cancelToken && o.cancelToken.subscribe(
|
|
3111
|
-
const
|
|
3112
|
-
if (
|
|
3113
|
-
s(new H("Unsupported protocol " +
|
|
3113
|
+
}, o.cancelToken && o.cancelToken.subscribe(c), o.signal && (o.signal.aborted ? c() : o.signal.addEventListener("abort", c)));
|
|
3114
|
+
const b = Sr(o.url);
|
|
3115
|
+
if (b && fe.protocols.indexOf(b) === -1) {
|
|
3116
|
+
s(new H("Unsupported protocol " + b + ":", H.ERR_BAD_REQUEST, e));
|
|
3114
3117
|
return;
|
|
3115
3118
|
}
|
|
3116
3119
|
d.send(i || null);
|
|
@@ -3122,8 +3125,8 @@ const mo = (e) => {
|
|
|
3122
3125
|
const i = function(p) {
|
|
3123
3126
|
if (!o) {
|
|
3124
3127
|
o = !0, l();
|
|
3125
|
-
const
|
|
3126
|
-
s.abort(
|
|
3128
|
+
const c = p instanceof Error ? p : this.reason;
|
|
3129
|
+
s.abort(c instanceof H ? c : new Ge(c instanceof Error ? c.message : c));
|
|
3127
3130
|
}
|
|
3128
3131
|
};
|
|
3129
3132
|
let r = t && setTimeout(() => {
|
|
@@ -3174,17 +3177,17 @@ const mo = (e) => {
|
|
|
3174
3177
|
return new ReadableStream({
|
|
3175
3178
|
async pull(f) {
|
|
3176
3179
|
try {
|
|
3177
|
-
const { done: p, value:
|
|
3180
|
+
const { done: p, value: c } = await o.next();
|
|
3178
3181
|
if (p) {
|
|
3179
3182
|
l(), f.close();
|
|
3180
3183
|
return;
|
|
3181
3184
|
}
|
|
3182
|
-
let
|
|
3185
|
+
let a = c.byteLength;
|
|
3183
3186
|
if (n) {
|
|
3184
|
-
let D = i +=
|
|
3187
|
+
let D = i += a;
|
|
3185
3188
|
n(D);
|
|
3186
3189
|
}
|
|
3187
|
-
f.enqueue(new Uint8Array(
|
|
3190
|
+
f.enqueue(new Uint8Array(c));
|
|
3188
3191
|
} catch (p) {
|
|
3189
3192
|
throw l(p), p;
|
|
3190
3193
|
}
|
|
@@ -3249,24 +3252,24 @@ const jr = async (e) => {
|
|
|
3249
3252
|
onDownloadProgress: l,
|
|
3250
3253
|
onUploadProgress: f,
|
|
3251
3254
|
responseType: p,
|
|
3252
|
-
headers:
|
|
3253
|
-
withCredentials:
|
|
3255
|
+
headers: c,
|
|
3256
|
+
withCredentials: a = "same-origin",
|
|
3254
3257
|
fetchOptions: D
|
|
3255
3258
|
} = mo(e);
|
|
3256
3259
|
p = p ? (p + "").toLowerCase() : "text";
|
|
3257
|
-
let
|
|
3258
|
-
const
|
|
3259
|
-
|
|
3260
|
+
let k = Fr([o, i && i.toAbortSignal()], r), x;
|
|
3261
|
+
const C = k && k.unsubscribe && (() => {
|
|
3262
|
+
k.unsubscribe();
|
|
3260
3263
|
});
|
|
3261
3264
|
let d;
|
|
3262
3265
|
try {
|
|
3263
|
-
if (f && Ur && n !== "get" && n !== "head" && (d = await zr(
|
|
3266
|
+
if (f && Ur && n !== "get" && n !== "head" && (d = await zr(c, s)) !== 0) {
|
|
3264
3267
|
let y = new Request(t, {
|
|
3265
3268
|
method: "POST",
|
|
3266
3269
|
body: s,
|
|
3267
3270
|
duplex: "half"
|
|
3268
3271
|
}), M;
|
|
3269
|
-
if (S.isFormData(s) && (M = y.headers.get("content-type")) &&
|
|
3272
|
+
if (S.isFormData(s) && (M = y.headers.get("content-type")) && c.setContentType(M), y.body) {
|
|
3270
3273
|
const [u, T] = vn(
|
|
3271
3274
|
d,
|
|
3272
3275
|
pt(wn(f))
|
|
@@ -3274,54 +3277,54 @@ const jr = async (e) => {
|
|
|
3274
3277
|
s = _n(y.body, xn, u, T);
|
|
3275
3278
|
}
|
|
3276
3279
|
}
|
|
3277
|
-
S.isString(
|
|
3278
|
-
const
|
|
3279
|
-
|
|
3280
|
+
S.isString(a) || (a = a ? "include" : "omit");
|
|
3281
|
+
const _ = "credentials" in Request.prototype;
|
|
3282
|
+
x = new Request(t, {
|
|
3280
3283
|
...D,
|
|
3281
|
-
signal:
|
|
3284
|
+
signal: k,
|
|
3282
3285
|
method: n.toUpperCase(),
|
|
3283
|
-
headers:
|
|
3286
|
+
headers: c.normalize().toJSON(),
|
|
3284
3287
|
body: s,
|
|
3285
3288
|
duplex: "half",
|
|
3286
|
-
credentials:
|
|
3289
|
+
credentials: _ ? a : void 0
|
|
3287
3290
|
});
|
|
3288
|
-
let
|
|
3291
|
+
let b = await fetch(x);
|
|
3289
3292
|
const O = Pt && (p === "stream" || p === "response");
|
|
3290
|
-
if (Pt && (l || O &&
|
|
3293
|
+
if (Pt && (l || O && C)) {
|
|
3291
3294
|
const y = {};
|
|
3292
3295
|
["status", "statusText", "headers"].forEach((E) => {
|
|
3293
|
-
y[E] =
|
|
3296
|
+
y[E] = b[E];
|
|
3294
3297
|
});
|
|
3295
|
-
const M = S.toFiniteNumber(
|
|
3298
|
+
const M = S.toFiniteNumber(b.headers.get("content-length")), [u, T] = l && vn(
|
|
3296
3299
|
M,
|
|
3297
3300
|
pt(wn(l), !0)
|
|
3298
3301
|
) || [];
|
|
3299
|
-
|
|
3300
|
-
_n(
|
|
3301
|
-
T && T(),
|
|
3302
|
+
b = new Response(
|
|
3303
|
+
_n(b.body, xn, u, () => {
|
|
3304
|
+
T && T(), C && C();
|
|
3302
3305
|
}),
|
|
3303
3306
|
y
|
|
3304
3307
|
);
|
|
3305
3308
|
}
|
|
3306
3309
|
p = p || "text";
|
|
3307
|
-
let w = await mt[S.findKey(mt, p) || "text"](
|
|
3308
|
-
return !O &&
|
|
3310
|
+
let w = await mt[S.findKey(mt, p) || "text"](b, e);
|
|
3311
|
+
return !O && C && C(), await new Promise((y, M) => {
|
|
3309
3312
|
fo(y, M, {
|
|
3310
3313
|
data: w,
|
|
3311
|
-
headers: ye.from(
|
|
3312
|
-
status:
|
|
3313
|
-
statusText:
|
|
3314
|
+
headers: ye.from(b.headers),
|
|
3315
|
+
status: b.status,
|
|
3316
|
+
statusText: b.statusText,
|
|
3314
3317
|
config: e,
|
|
3315
|
-
request:
|
|
3318
|
+
request: x
|
|
3316
3319
|
});
|
|
3317
3320
|
});
|
|
3318
|
-
} catch (
|
|
3319
|
-
throw
|
|
3320
|
-
new H("Network Error", H.ERR_NETWORK, e,
|
|
3321
|
+
} catch (_) {
|
|
3322
|
+
throw C && C(), _ && _.name === "TypeError" && /Load failed|fetch/i.test(_.message) ? Object.assign(
|
|
3323
|
+
new H("Network Error", H.ERR_NETWORK, e, x),
|
|
3321
3324
|
{
|
|
3322
|
-
cause:
|
|
3325
|
+
cause: _.cause || _
|
|
3323
3326
|
}
|
|
3324
|
-
) : H.from(
|
|
3327
|
+
) : H.from(_, _ && _.code, e, x);
|
|
3325
3328
|
}
|
|
3326
3329
|
}), Lt = {
|
|
3327
3330
|
http: sr,
|
|
@@ -3493,45 +3496,45 @@ let Ue = class {
|
|
|
3493
3496
|
);
|
|
3494
3497
|
i && S.forEach(
|
|
3495
3498
|
["delete", "get", "head", "post", "put", "patch", "common"],
|
|
3496
|
-
(
|
|
3497
|
-
delete i[
|
|
3499
|
+
(x) => {
|
|
3500
|
+
delete i[x];
|
|
3498
3501
|
}
|
|
3499
3502
|
), n.headers = ye.concat(r, i);
|
|
3500
3503
|
const l = [];
|
|
3501
3504
|
let f = !0;
|
|
3502
|
-
this.interceptors.request.forEach(function(
|
|
3503
|
-
typeof
|
|
3505
|
+
this.interceptors.request.forEach(function(C) {
|
|
3506
|
+
typeof C.runWhen == "function" && C.runWhen(n) === !1 || (f = f && C.synchronous, l.unshift(C.fulfilled, C.rejected));
|
|
3504
3507
|
});
|
|
3505
3508
|
const p = [];
|
|
3506
|
-
this.interceptors.response.forEach(function(
|
|
3507
|
-
p.push(
|
|
3509
|
+
this.interceptors.response.forEach(function(C) {
|
|
3510
|
+
p.push(C.fulfilled, C.rejected);
|
|
3508
3511
|
});
|
|
3509
|
-
let
|
|
3512
|
+
let c, a = 0, D;
|
|
3510
3513
|
if (!f) {
|
|
3511
|
-
const
|
|
3512
|
-
for (
|
|
3513
|
-
|
|
3514
|
-
return
|
|
3514
|
+
const x = [kn.bind(this), void 0];
|
|
3515
|
+
for (x.unshift.apply(x, l), x.push.apply(x, p), D = x.length, c = Promise.resolve(n); a < D; )
|
|
3516
|
+
c = c.then(x[a++], x[a++]);
|
|
3517
|
+
return c;
|
|
3515
3518
|
}
|
|
3516
3519
|
D = l.length;
|
|
3517
|
-
let
|
|
3518
|
-
for (
|
|
3519
|
-
const
|
|
3520
|
+
let k = n;
|
|
3521
|
+
for (a = 0; a < D; ) {
|
|
3522
|
+
const x = l[a++], C = l[a++];
|
|
3520
3523
|
try {
|
|
3521
|
-
|
|
3524
|
+
k = x(k);
|
|
3522
3525
|
} catch (d) {
|
|
3523
|
-
|
|
3526
|
+
C.call(this, d);
|
|
3524
3527
|
break;
|
|
3525
3528
|
}
|
|
3526
3529
|
}
|
|
3527
3530
|
try {
|
|
3528
|
-
|
|
3529
|
-
} catch (
|
|
3530
|
-
return Promise.reject(
|
|
3531
|
+
c = kn.call(this, k);
|
|
3532
|
+
} catch (x) {
|
|
3533
|
+
return Promise.reject(x);
|
|
3531
3534
|
}
|
|
3532
|
-
for (
|
|
3533
|
-
|
|
3534
|
-
return
|
|
3535
|
+
for (a = 0, D = p.length; a < D; )
|
|
3536
|
+
c = c.then(p[a++], p[a++]);
|
|
3537
|
+
return c;
|
|
3535
3538
|
}
|
|
3536
3539
|
getUri(t) {
|
|
3537
3540
|
t = Ve(this.defaults, t);
|
|
@@ -3767,10 +3770,10 @@ const {
|
|
|
3767
3770
|
style: { "font-size": "18px" }
|
|
3768
3771
|
}, ul = {
|
|
3769
3772
|
key: 1,
|
|
3770
|
-
style: { "font-size": "11px",
|
|
3773
|
+
style: { padding: "0 1px", "font-size": "11px", "text-align": "center" }
|
|
3771
3774
|
}, dl = {
|
|
3772
3775
|
key: 3,
|
|
3773
|
-
style: { "font-size": "11px",
|
|
3776
|
+
style: { padding: "0 1px", "font-size": "11px", "text-align": "center" }
|
|
3774
3777
|
}, fl = { name: "FormUpload" }, pl = /* @__PURE__ */ K({
|
|
3775
3778
|
...fl,
|
|
3776
3779
|
props: {
|
|
@@ -3795,25 +3798,23 @@ const {
|
|
|
3795
3798
|
},
|
|
3796
3799
|
emits: ["remove"],
|
|
3797
3800
|
setup(e, { emit: t }) {
|
|
3798
|
-
const n = e,
|
|
3799
|
-
s.appContext.config.globalProperties.$serviceApi;
|
|
3800
|
-
const i = L(""), r = L(!1), l = ["image/gif", "image/jpeg", "image/png"], f = L(null), p = xe(() => {
|
|
3801
|
+
const n = e, o = De().appContext.config.globalProperties.$url, i = L(""), r = L(!1), l = ["image/gif", "image/jpeg", "image/png"], f = L(null), p = xe(() => {
|
|
3801
3802
|
const T = _e.get("authorized-token");
|
|
3802
3803
|
return {
|
|
3803
3804
|
Authorization: "Bearer " + JSON.parse(T).accessToken
|
|
3804
3805
|
};
|
|
3805
|
-
}),
|
|
3806
|
+
}), c = L([]), a = L([]), D = (u) => l.includes(u.file.type) && u.file.size > 1024 * 1024 * n.compassorSize ? new Promise((T, E) => {
|
|
3806
3807
|
new In(u.file, {
|
|
3807
3808
|
quality: n.quality,
|
|
3808
3809
|
mimeType: u.file.type,
|
|
3809
3810
|
success(I) {
|
|
3810
3811
|
const F = new File([I], I.name, { type: I.type });
|
|
3811
|
-
|
|
3812
|
+
k(T, E, F), console.log({ result: I, file: F });
|
|
3812
3813
|
}
|
|
3813
3814
|
});
|
|
3814
3815
|
}) : new Promise(
|
|
3815
|
-
(T, E) =>
|
|
3816
|
-
),
|
|
3816
|
+
(T, E) => k(T, E, u.file)
|
|
3817
|
+
), k = (u, T, E) => {
|
|
3817
3818
|
const I = new FormData();
|
|
3818
3819
|
I.append("file", E);
|
|
3819
3820
|
const F = o + "/ufil/file/uploadMultipart";
|
|
@@ -3829,27 +3830,27 @@ const {
|
|
|
3829
3830
|
i.value = `进度${h}%`;
|
|
3830
3831
|
}
|
|
3831
3832
|
}).then(async (m) => {
|
|
3832
|
-
i.value = "处理中...", E.path = m.data.data, E.url = `${o}/ufil${E.path}`,
|
|
3833
|
+
i.value = "处理中...", E.path = m.data.data, E.url = `${o}/ufil${E.path}`, a.value.push(E), console.log(E), r.value = !1, u(E);
|
|
3833
3834
|
}).catch(() => {
|
|
3834
3835
|
r.value = !1, T(null);
|
|
3835
3836
|
});
|
|
3836
|
-
},
|
|
3837
|
+
}, x = () => {
|
|
3837
3838
|
f.value.choose();
|
|
3838
|
-
},
|
|
3839
|
+
}, C = ({ data: u }) => {
|
|
3839
3840
|
if (n.success)
|
|
3840
3841
|
return n.success(u);
|
|
3841
3842
|
{
|
|
3842
3843
|
const T = n.field;
|
|
3843
3844
|
Object.assign(n.record, { [T]: u.path });
|
|
3844
3845
|
}
|
|
3845
|
-
console.log(n.record,
|
|
3846
|
+
console.log(n.record, a);
|
|
3846
3847
|
}, d = ({ option: u }) => {
|
|
3847
3848
|
if (n.remove)
|
|
3848
|
-
return n.remove(u,
|
|
3849
|
-
M("remove", u,
|
|
3850
|
-
},
|
|
3851
|
-
|
|
3852
|
-
},
|
|
3849
|
+
return n.remove(u, a);
|
|
3850
|
+
M("remove", u, a);
|
|
3851
|
+
}, _ = (u, T) => {
|
|
3852
|
+
a.value.splice(T, 1), M("remove", u, a);
|
|
3853
|
+
}, b = (u) => {
|
|
3853
3854
|
$e.previewImage({ activeIndex: 0, urlList: [u.url] });
|
|
3854
3855
|
}, O = (u) => {
|
|
3855
3856
|
const T = u.type || u.url.split(".").pop();
|
|
@@ -3912,20 +3913,20 @@ const {
|
|
|
3912
3913
|
}, M = t;
|
|
3913
3914
|
return ht(() => {
|
|
3914
3915
|
const u = n.record[n.field];
|
|
3915
|
-
if (
|
|
3916
|
+
if (a.value = [], u)
|
|
3916
3917
|
if (u && je(u)) {
|
|
3917
3918
|
const E = { name: u.match(/[^\/\\]+$/)[0], url: `${o}/ufil${u}` };
|
|
3918
|
-
n.singleMode ?
|
|
3919
|
+
n.singleMode ? a.value = E : a.value.push(E);
|
|
3919
3920
|
} else Fo(u) && u.forEach((T) => {
|
|
3920
3921
|
const E = T.match(/[^\/\\]+$/)[0];
|
|
3921
|
-
|
|
3922
|
+
a.value.push({ name: E, url: `${o}/ufil${T}` });
|
|
3922
3923
|
});
|
|
3923
3924
|
console.log("fileList");
|
|
3924
3925
|
}), (u, T) => {
|
|
3925
3926
|
const E = V("vxe-tooltip"), I = V("vxe-icon"), F = V("vxe-upload");
|
|
3926
3927
|
return A(), P("div", Xr, [
|
|
3927
3928
|
R("div", Gr, [
|
|
3928
|
-
(A(!0), P(ce, null, le(
|
|
3929
|
+
(A(!0), P(ce, null, le(a.value, (m, h) => (A(), P("div", {
|
|
3929
3930
|
key: m,
|
|
3930
3931
|
class: pe("ut-upload-item--" + u.size)
|
|
3931
3932
|
}, [
|
|
@@ -3934,7 +3935,7 @@ const {
|
|
|
3934
3935
|
key: 0,
|
|
3935
3936
|
src: m.url,
|
|
3936
3937
|
class: "ut-image select-none",
|
|
3937
|
-
onClick: (g) =>
|
|
3938
|
+
onClick: (g) => b(m)
|
|
3938
3939
|
}, null, 8, Qr)) : u.renderMode === "item" || u.dataStatus !== "detail" ? (A(), P("div", Zr, [
|
|
3939
3940
|
R("div", el, [
|
|
3940
3941
|
R("i", {
|
|
@@ -3982,7 +3983,7 @@ const {
|
|
|
3982
3983
|
R("div", rl, [
|
|
3983
3984
|
R("i", {
|
|
3984
3985
|
class: "vxe-icon-close",
|
|
3985
|
-
onClick: (g) =>
|
|
3986
|
+
onClick: (g) => _(m, h)
|
|
3986
3987
|
}, null, 8, ll)
|
|
3987
3988
|
])
|
|
3988
3989
|
])) : Z("", !0)
|
|
@@ -3991,7 +3992,7 @@ const {
|
|
|
3991
3992
|
key: 0,
|
|
3992
3993
|
class: pe(["ut-upload-item--" + u.size, "ut-upload--btn"]),
|
|
3993
3994
|
style: { border: "1px dashed var(--vxe-ui-input-border-color)" },
|
|
3994
|
-
onClick:
|
|
3995
|
+
onClick: x
|
|
3995
3996
|
}, [
|
|
3996
3997
|
R("div", al, [
|
|
3997
3998
|
r.value ? Z("", !0) : (A(), P("span", cl)),
|
|
@@ -4010,8 +4011,8 @@ const {
|
|
|
4010
4011
|
j(F, Ce({
|
|
4011
4012
|
ref_key: "xupload",
|
|
4012
4013
|
ref: f,
|
|
4013
|
-
modelValue:
|
|
4014
|
-
"onUpdate:modelValue": T[0] || (T[0] = (m) =>
|
|
4014
|
+
modelValue: c.value,
|
|
4015
|
+
"onUpdate:modelValue": T[0] || (T[0] = (m) => c.value = m),
|
|
4015
4016
|
style: { display: "none" }
|
|
4016
4017
|
}, u.$attrs, {
|
|
4017
4018
|
"limit-count": u.limitCount,
|
|
@@ -4028,7 +4029,7 @@ const {
|
|
|
4028
4029
|
"show-download-button": u.showDownloadButton,
|
|
4029
4030
|
"show-list": !1,
|
|
4030
4031
|
"show-progress": "",
|
|
4031
|
-
onUploadSuccess:
|
|
4032
|
+
onUploadSuccess: C
|
|
4032
4033
|
}), null, 16, ["modelValue", "limit-count", "limit-size", "size", "mode", "single-mode", "image-types", "auto-hidden-button", "show-error-status", "multiple", "show-download-button"])
|
|
4033
4034
|
]);
|
|
4034
4035
|
};
|
|
@@ -4128,47 +4129,47 @@ const {
|
|
|
4128
4129
|
ae.emit("onGanteItemDblclick", l);
|
|
4129
4130
|
};
|
|
4130
4131
|
return (l, f) => {
|
|
4131
|
-
var
|
|
4132
|
+
var c;
|
|
4132
4133
|
const p = V("gante-table-cell", !0);
|
|
4133
4134
|
return A(), P("div", wl, [
|
|
4134
|
-
(A(!0), P(ce, null, le(l.tasks, (
|
|
4135
|
-
key:
|
|
4135
|
+
(A(!0), P(ce, null, le(l.tasks, (a) => (A(), P("div", {
|
|
4136
|
+
key: a.id,
|
|
4136
4137
|
class: "ut-gante-row"
|
|
4137
4138
|
}, [
|
|
4138
4139
|
R("div", {
|
|
4139
|
-
class: pe(["ut-gante-row--contain", { "gante-hover":
|
|
4140
|
-
onMouseenter: (D) => o(D,
|
|
4141
|
-
onMouseleave: (D) => i(D,
|
|
4142
|
-
onDblclick: dt((D) => r(
|
|
4140
|
+
class: pe(["ut-gante-row--contain", { "gante-hover": a.is_hover }]),
|
|
4141
|
+
onMouseenter: (D) => o(D, a),
|
|
4142
|
+
onMouseleave: (D) => i(D, a),
|
|
4143
|
+
onDblclick: dt((D) => r(a), ["prevent"])
|
|
4143
4144
|
}, [
|
|
4144
4145
|
(A(!0), P(ce, null, le(l.columns, (D) => (A(), P("div", {
|
|
4145
4146
|
key: D.field,
|
|
4146
4147
|
class: "ut-gante-column"
|
|
4147
4148
|
}, [
|
|
4148
4149
|
j(Sn, {
|
|
4149
|
-
row:
|
|
4150
|
+
row: a,
|
|
4150
4151
|
column: D,
|
|
4151
4152
|
options: l.options
|
|
4152
4153
|
}, null, 8, ["row", "column", "options"])
|
|
4153
4154
|
]))), 128))
|
|
4154
4155
|
], 42, bl),
|
|
4155
|
-
|
|
4156
|
+
a[l.options.children] && a.open ? (A(), ie(p, {
|
|
4156
4157
|
key: 0,
|
|
4157
|
-
tasks:
|
|
4158
|
+
tasks: a[l.options.children],
|
|
4158
4159
|
columns: l.columns,
|
|
4159
4160
|
options: l.options,
|
|
4160
4161
|
children: "Y"
|
|
4161
4162
|
}, null, 8, ["tasks", "columns", "options"])) : Z("", !0)
|
|
4162
4163
|
]))), 128)),
|
|
4163
|
-
l.children !== "Y" && l.options.showFooter && ((
|
|
4164
|
+
l.children !== "Y" && l.options.showFooter && ((c = l.tasks) != null && c.length) ? (A(), P("div", _l, [
|
|
4164
4165
|
R("div", xl, [
|
|
4165
|
-
(A(!0), P(ce, null, le(l.columns, (
|
|
4166
|
-
key:
|
|
4166
|
+
(A(!0), P(ce, null, le(l.columns, (a) => (A(), P("div", {
|
|
4167
|
+
key: a.field,
|
|
4167
4168
|
class: "ut-gante-column"
|
|
4168
4169
|
}, [
|
|
4169
4170
|
j(Sn, {
|
|
4170
4171
|
row: n.value,
|
|
4171
|
-
column:
|
|
4172
|
+
column: a,
|
|
4172
4173
|
options: l.options
|
|
4173
4174
|
}, null, 8, ["row", "column", "options"])
|
|
4174
4175
|
]))), 128))
|
|
@@ -4194,7 +4195,7 @@ const {
|
|
|
4194
4195
|
setup(e, { emit: t }) {
|
|
4195
4196
|
const n = e, s = L(0), o = L(!1), i = L(0), r = L(null), l = xe(() => n.columns.filter((w) => w.showColumn !== "N"));
|
|
4196
4197
|
let f = 0, p = 0;
|
|
4197
|
-
const
|
|
4198
|
+
const c = { current_index: -1, mouseDown: !1 }, a = (w) => {
|
|
4198
4199
|
let y = -200;
|
|
4199
4200
|
const M = document.getElementsByClassName("ganteview")[0].scrollTop, u = document.getElementsByClassName("ganteview")[0];
|
|
4200
4201
|
(w.wheelDelta && w.wheelDelta < 0 || w.detail > 0) && (y = 200), D(M, M + y, 4, (T) => {
|
|
@@ -4213,29 +4214,29 @@ const {
|
|
|
4213
4214
|
};
|
|
4214
4215
|
T();
|
|
4215
4216
|
};
|
|
4216
|
-
function
|
|
4217
|
+
function k(w) {
|
|
4217
4218
|
const y = document.getElementsByTagName("body")[0];
|
|
4218
|
-
if (
|
|
4219
|
+
if (c.mouseDown) {
|
|
4219
4220
|
const M = it(r.value).x;
|
|
4220
4221
|
let u = w.clientX;
|
|
4221
4222
|
const T = document.getElementsByClassName("gante-table-box")[0];
|
|
4222
4223
|
T.scrollLeft && (u = u + T.scrollLeft);
|
|
4223
4224
|
let E = u - M + 3;
|
|
4224
|
-
const I = n.columns[
|
|
4225
|
+
const I = n.columns[c.current_index].width || n.columns[c.current_index].minWidth;
|
|
4225
4226
|
E - 30 <= f + 3 - I && (E = f + 3 - I + 30), s.value = E, y.style.cursor = "col-resize";
|
|
4226
4227
|
}
|
|
4227
4228
|
}
|
|
4228
|
-
function
|
|
4229
|
+
function x(w, y) {
|
|
4229
4230
|
if (w.target.tagName === "SPAN" || w.target.tagName === "I")
|
|
4230
4231
|
return;
|
|
4231
4232
|
const M = it(r.value).x;
|
|
4232
4233
|
let u = w.target, T = w.clientX;
|
|
4233
4234
|
const E = document.getElementsByClassName("gante-table-box")[0];
|
|
4234
|
-
u.classList.contains("cell") && (u = u.parentNode), E.scrollLeft && (T = T + E.scrollLeft), f = T - M, console.log("client_x", T), T > it(u).x + u.offsetWidth - 10 && (console.log("index", y), p = u.offsetWidth, o.value = !0,
|
|
4235
|
+
u.classList.contains("cell") && (u = u.parentNode), E.scrollLeft && (T = T + E.scrollLeft), f = T - M, console.log("client_x", T), T > it(u).x + u.offsetWidth - 10 && (console.log("index", y), p = u.offsetWidth, o.value = !0, c.current_index = y, s.value = f + 3, c.mouseDown = !0, document.addEventListener("mousemove", k, { passive: !1 }), document.addEventListener("mouseup", C, { passive: !1 }));
|
|
4235
4236
|
}
|
|
4236
|
-
function
|
|
4237
|
-
if (document.getElementsByTagName("body")[0].style.cursor = "",
|
|
4238
|
-
n.columns[
|
|
4237
|
+
function C() {
|
|
4238
|
+
if (document.getElementsByTagName("body")[0].style.cursor = "", c.mouseDown && f) {
|
|
4239
|
+
n.columns[c.current_index].width = p + (s.value - f), console.log("displayColums", l);
|
|
4239
4240
|
let w = 0;
|
|
4240
4241
|
const M = document.getElementsByClassName(
|
|
4241
4242
|
"gante-table-box"
|
|
@@ -4246,7 +4247,7 @@ const {
|
|
|
4246
4247
|
const u = n.options.tableWidth || 450, T = w + 2 <= u ? u : w + 2;
|
|
4247
4248
|
O("onDragEnd", T);
|
|
4248
4249
|
}
|
|
4249
|
-
|
|
4250
|
+
c.mouseDown = !1, o.value = !1, f = 0, p = 0, c.current_index = -1, i.value++, document.removeEventListener("mousemove", k, !1), document.removeEventListener("mouseup", C, !1);
|
|
4250
4251
|
}
|
|
4251
4252
|
}
|
|
4252
4253
|
function d(w) {
|
|
@@ -4258,10 +4259,10 @@ const {
|
|
|
4258
4259
|
const T = document.getElementsByClassName("gante-table-box")[0];
|
|
4259
4260
|
y.classList.contains("cell") && (y = w.target.parentNode), T.scrollLeft && (u = u + T.scrollLeft), u > it(y).x + y.offsetWidth - 10 ? M.style.cursor = "col-resize" : M.style.cursor = "";
|
|
4260
4261
|
}
|
|
4261
|
-
function
|
|
4262
|
+
function _() {
|
|
4262
4263
|
document.getElementsByTagName("body")[0].style.cursor = "";
|
|
4263
4264
|
}
|
|
4264
|
-
const
|
|
4265
|
+
const b = (w) => ({
|
|
4265
4266
|
width: w.width || w.minWidth ? (w.width || w.minWidth) + "px" : "80px",
|
|
4266
4267
|
textAlign: w.textAlign || n.options.textAlign || "center"
|
|
4267
4268
|
});
|
|
@@ -4273,20 +4274,20 @@ const {
|
|
|
4273
4274
|
ref_key: "gante_table",
|
|
4274
4275
|
ref: r,
|
|
4275
4276
|
class: "gante-table",
|
|
4276
|
-
onMousewheelPassive:
|
|
4277
|
-
"on:DOMMouseScrollPassive":
|
|
4277
|
+
onMousewheelPassive: a,
|
|
4278
|
+
"on:DOMMouseScrollPassive": a
|
|
4278
4279
|
}, [
|
|
4279
4280
|
R("div", Tl, [
|
|
4280
4281
|
(A(!0), P(ce, null, le(l.value, (M, u) => (A(), P("div", {
|
|
4281
4282
|
key: M.field,
|
|
4282
4283
|
class: "gante-th",
|
|
4283
|
-
onMousedown: (T) =>
|
|
4284
|
+
onMousedown: (T) => x(T, u),
|
|
4284
4285
|
onMousemove: d,
|
|
4285
|
-
onMouseout:
|
|
4286
|
+
onMouseout: _
|
|
4286
4287
|
}, [
|
|
4287
4288
|
R("div", {
|
|
4288
4289
|
class: "cell",
|
|
4289
|
-
style: se(
|
|
4290
|
+
style: se(b(M))
|
|
4290
4291
|
}, [
|
|
4291
4292
|
Ut(G(M.label) + " ", 1),
|
|
4292
4293
|
M.sort_type ? (A(), P("span", {
|
|
@@ -4359,7 +4360,7 @@ const {
|
|
|
4359
4360
|
function l(d) {
|
|
4360
4361
|
r = !0, i = requestAnimationFrame(() => {
|
|
4361
4362
|
f();
|
|
4362
|
-
let
|
|
4363
|
+
let b = d.clientX + 15, O = d.clientY + 15;
|
|
4363
4364
|
if (t.task && r) {
|
|
4364
4365
|
let w = document.createElement("div"), y = !0;
|
|
4365
4366
|
w.setAttribute("class", "gante-toast"), document.getElementsByClassName("gante-toast")[0] && (w = document.getElementsByClassName("gante-toast")[0], w.style.display = "block", y = !1);
|
|
@@ -4367,8 +4368,8 @@ const {
|
|
|
4367
4368
|
t.columns.filter(
|
|
4368
4369
|
(u) => u.showToast || u.time_mode === 1 || u.time_mode === 2
|
|
4369
4370
|
).forEach((u) => {
|
|
4370
|
-
M += `<p>${u.label}: ${u.label ? u.time_mode ?
|
|
4371
|
-
}), (w.innerHTML != M || M == "") && (w.innerHTML = M), w.clientHeight + O > window.innerHeight && (d.clientY >= window.innerHeight - w.clientHeight ? O = d.clientY - 10 - w.clientHeight : O = window.innerHeight - w.clientHeight), w.clientWidth +
|
|
4371
|
+
M += `<p>${u.label}: ${u.label ? u.time_mode ? C(n[u.field]) : n[u.field] || "" : ""}</p>`;
|
|
4372
|
+
}), (w.innerHTML != M || M == "") && (w.innerHTML = M), w.clientHeight + O > window.innerHeight && (d.clientY >= window.innerHeight - w.clientHeight ? O = d.clientY - 10 - w.clientHeight : O = window.innerHeight - w.clientHeight), w.clientWidth + b > window.innerWidth && (b = window.innerWidth - w.clientWidth), w.style.left = b + "px", w.style.top = O + "px", y && document.getElementsByTagName("body")[0].appendChild(w);
|
|
4372
4373
|
}
|
|
4373
4374
|
});
|
|
4374
4375
|
}
|
|
@@ -4379,28 +4380,28 @@ const {
|
|
|
4379
4380
|
var d;
|
|
4380
4381
|
o.mouseDown || (r = !1, s.value = !1, cancelAnimationFrame(i), ((d = document.getElementsByClassName("gante-toast")) == null ? void 0 : d.length) > 0 && (document.getElementsByClassName("gante-toast")[0].style.display = "none"));
|
|
4381
4382
|
}
|
|
4382
|
-
function
|
|
4383
|
+
function c(d, _) {
|
|
4383
4384
|
if (n) {
|
|
4384
4385
|
if (!t.options.parentDragEnabled && n[t.options.children])
|
|
4385
4386
|
return;
|
|
4386
|
-
o.mouseDown = !0, o.startX = d.clientX, o.moveType =
|
|
4387
|
-
n[
|
|
4388
|
-
}), o.end_time || (o.endAttr = "end_time", o.end_time = n.end_time), t.options.timeScale === 1 || t.options.timeScale === 2 ? (o.scale = 1e3 * 60 * 60 / t.time_1px, o.mode = 1) : (o.scale = 1e3 * 60 * 60 * 24 / t.time_1px, o.mode = 2), document.body.classList.add("unselecttable"),
|
|
4387
|
+
o.mouseDown = !0, o.startX = d.clientX, o.moveType = _, o.start_width = n.width, o.start_left = n.left, t.columns.forEach((b) => {
|
|
4388
|
+
n[b.field] && (b.time_mode === 1 ? (o.startAttr = b.field, o.start_time = n[b.field]) : b.time_mode === 2 && (o.endAttr = b.field, o.end_time = n[b.field]));
|
|
4389
|
+
}), o.end_time || (o.endAttr = "end_time", o.end_time = n.end_time), t.options.timeScale === 1 || t.options.timeScale === 2 ? (o.scale = 1e3 * 60 * 60 / t.time_1px, o.mode = 1) : (o.scale = 1e3 * 60 * 60 * 24 / t.time_1px, o.mode = 2), document.body.classList.add("unselecttable"), _ === "drag" ? document.body.style.cursor = "grabbing" : document.body.style.cursor = "e-resize", document.addEventListener("mousemove", a, { passive: !1 }), document.addEventListener("mouseup", D, { passive: !1 });
|
|
4389
4390
|
}
|
|
4390
4391
|
}
|
|
4391
|
-
function
|
|
4392
|
+
function a(d) {
|
|
4392
4393
|
if (o.mouseDown) {
|
|
4393
4394
|
p();
|
|
4394
|
-
let
|
|
4395
|
-
o.moveType == "left" ? (document.body.style.cursor = "e-resize", d.clientX > o.startX ? (
|
|
4395
|
+
let _ = 0, b = 0;
|
|
4396
|
+
o.moveType == "left" ? (document.body.style.cursor = "e-resize", d.clientX > o.startX ? (_ = -1, b = 1) : d.clientX < o.startX && (_ = 1, b = -1)) : o.moveType == "right" ? (document.body.style.cursor = "e-resize", d.clientX > o.startX ? _ = 1 : d.clientX < o.startX && (_ = -1)) : o.moveType == "drag" && (document.body.style.cursor = "grabbing", d.clientX > o.startX ? (b = 1, _ = 1) : d.clientX < o.startX && (b = -1, _ = -1));
|
|
4396
4397
|
let O = Math.abs(d.clientX - o.startX);
|
|
4397
|
-
|
|
4398
|
-
let w = o.start_width + O *
|
|
4399
|
-
if (o.moveType === "drag" && (w = Math.round(o.start_width)),
|
|
4398
|
+
b === -1 && O > o.start_left && (O = o.start_left);
|
|
4399
|
+
let w = o.start_width + O * _, y = Math.round(o.start_left + O * b);
|
|
4400
|
+
if (o.moveType === "drag" && (w = Math.round(o.start_width)), b === 1) {
|
|
4400
4401
|
const m = new Date(t.end_time).getTime() - new Date(t.start_time).getTime(), h = Math.round(m) * t.options.cellWidth / (24 * 60 * 60 * 1e3);
|
|
4401
4402
|
y + w > h && (y = Math.round(h) - w, O = y - o.start_left);
|
|
4402
4403
|
}
|
|
4403
|
-
const M =
|
|
4404
|
+
const M = _ * Math.ceil(O / o.scale);
|
|
4404
4405
|
let u = 60 * 60 * 1e3, T = o.start_time, E = o.end_time;
|
|
4405
4406
|
o.mode === 2 && (u = 60 * 60 * 1e3 * 24);
|
|
4406
4407
|
const I = T, F = E;
|
|
@@ -4416,13 +4417,13 @@ const {
|
|
|
4416
4417
|
), E = ee(
|
|
4417
4418
|
F + M * u,
|
|
4418
4419
|
t.options.dateFormat
|
|
4419
|
-
)), w <= 10 && o.moveType !== "drag" && (w = 10, y = o.start_left + (o.start_width - 10) *
|
|
4420
|
+
)), w <= 10 && o.moveType !== "drag" && (w = 10, y = o.start_left + (o.start_width - 10) * b, o.moveType === "left" ? T = ee(
|
|
4420
4421
|
F - u * Math.ceil(10 / o.scale),
|
|
4421
4422
|
t.options.dateFormat
|
|
4422
4423
|
) : o.moveType === "right" && (E = ee(
|
|
4423
4424
|
I + u * Math.ceil(10 / o.scale),
|
|
4424
4425
|
t.options.dateFormat
|
|
4425
|
-
))), n.width = w, n.left = Math.round(y), n[o.startAttr] = T, n[o.endAttr] = E, n.start_time = new Date(E).getTime(), n.end_time = new Date(F).getTime(),
|
|
4426
|
+
))), n.width = w, n.left = Math.round(y), n[o.startAttr] = T, n[o.endAttr] = E, n.start_time = new Date(E).getTime(), n.end_time = new Date(F).getTime(), k();
|
|
4426
4427
|
}
|
|
4427
4428
|
}
|
|
4428
4429
|
function D(d) {
|
|
@@ -4434,7 +4435,7 @@ const {
|
|
|
4434
4435
|
endTime: n.end_time
|
|
4435
4436
|
})), !t.options.crossColumnEnabled) {
|
|
4436
4437
|
n.left = Math.round(n.left / t.options.cellWidth) * t.options.cellWidth;
|
|
4437
|
-
const
|
|
4438
|
+
const _ = Math.abs(n.left - o.start_left), O = (n.left - o.start_left > 0 ? 1 : -1) * Math.ceil(_ / o.scale);
|
|
4438
4439
|
let w = o.start_time, y = o.end_time;
|
|
4439
4440
|
const M = w, u = y;
|
|
4440
4441
|
w = ee(
|
|
@@ -4445,7 +4446,7 @@ const {
|
|
|
4445
4446
|
t.options.dateFormat
|
|
4446
4447
|
), n[o.startAttr] = w, n[o.endAttr] = y, n.start_time = new Date(w).getTime(), n.end_time = new Date(y).getTime();
|
|
4447
4448
|
}
|
|
4448
|
-
document.removeEventListener("mousemove",
|
|
4449
|
+
document.removeEventListener("mousemove", a, !1), document.removeEventListener("mouseup", D, !1), document.body.classList.remove("unselecttable"), document.body.style.cursor = "", n.objectVersionNumber = t.task.objectVersionNumber, o.startX != d.clientX && ae.emit("change", {
|
|
4449
4450
|
task: n,
|
|
4450
4451
|
from: {
|
|
4451
4452
|
start: ee(o.start_time, "yyyy-MM-dd HH:mm:ss"),
|
|
@@ -4486,23 +4487,23 @@ const {
|
|
|
4486
4487
|
moveType: ""
|
|
4487
4488
|
}, p();
|
|
4488
4489
|
}
|
|
4489
|
-
const
|
|
4490
|
+
const k = () => {
|
|
4490
4491
|
const d = document.getElementsByClassName(
|
|
4491
4492
|
"gante-toast"
|
|
4492
4493
|
)[0];
|
|
4493
4494
|
if (d) {
|
|
4494
4495
|
d.style.display = "block";
|
|
4495
|
-
let
|
|
4496
|
+
let _ = "";
|
|
4496
4497
|
t.columns.filter(
|
|
4497
|
-
(
|
|
4498
|
-
).forEach((
|
|
4499
|
-
|
|
4500
|
-
}), (d.innerHTML !=
|
|
4498
|
+
(b) => n[b.field] && (b.showToast || b.time_mode == 1 || b.time_mode == 2)
|
|
4499
|
+
).forEach((b) => {
|
|
4500
|
+
_ += `<p>${b.label}: ${b.time_mode ? C(n[b.field]) : n[b.field] || ""}</p>`;
|
|
4501
|
+
}), (d.innerHTML != _ || _ == "") && (d.innerHTML = _);
|
|
4501
4502
|
}
|
|
4502
|
-
},
|
|
4503
|
+
}, x = (d) => {
|
|
4503
4504
|
ae.emit("onGanteItemDblclick", d);
|
|
4504
|
-
},
|
|
4505
|
-
return (d,
|
|
4505
|
+
}, C = (d) => d && ee(d, t.options.dateFormat);
|
|
4506
|
+
return (d, _) => (A(), P("div", {
|
|
4506
4507
|
style: se({
|
|
4507
4508
|
cursor: te(o).mouseDown ? "grabbing" : "grab",
|
|
4508
4509
|
width: n.width ? n.width + "px" : 0,
|
|
@@ -4514,20 +4515,20 @@ const {
|
|
|
4514
4515
|
class: pe(["ganteview-item", { "has-child": n[d.options.children] }]),
|
|
4515
4516
|
onMousemovePassive: l,
|
|
4516
4517
|
onMouseleave: p,
|
|
4517
|
-
onMousedown:
|
|
4518
|
-
onDblclick:
|
|
4518
|
+
onMousedown: _[2] || (_[2] = (b) => c(b, "drag")),
|
|
4519
|
+
onDblclick: _[3] || (_[3] = (b) => x(n))
|
|
4519
4520
|
}, [
|
|
4520
4521
|
Re(R("span", {
|
|
4521
4522
|
"data-drag": "true",
|
|
4522
4523
|
class: "left-drag-line",
|
|
4523
|
-
onMousedown:
|
|
4524
|
+
onMousedown: _[0] || (_[0] = dt((b) => c(b, "left"), ["stop"]))
|
|
4524
4525
|
}, null, 544), [
|
|
4525
4526
|
[Ne, s.value]
|
|
4526
4527
|
]),
|
|
4527
4528
|
Re(R("span", {
|
|
4528
4529
|
"data-drag": "true",
|
|
4529
4530
|
class: "right-drag-line",
|
|
4530
|
-
onMousedown:
|
|
4531
|
+
onMousedown: _[1] || (_[1] = dt((b) => c(b, "right"), ["stop"]))
|
|
4531
4532
|
}, null, 544), [
|
|
4532
4533
|
[Ne, s.value]
|
|
4533
4534
|
]),
|
|
@@ -4627,19 +4628,19 @@ const {
|
|
|
4627
4628
|
options: { default: () => ({}) }
|
|
4628
4629
|
},
|
|
4629
4630
|
setup(e, { expose: t }) {
|
|
4630
|
-
const n = e, s = L([]), o = L([]), i = L(0), r = L(0), l = L(!1), f = L(""), p = L(null),
|
|
4631
|
+
const n = e, s = L([]), o = L([]), i = L(0), r = L(0), l = L(!1), f = L(""), p = L(null), c = L({
|
|
4631
4632
|
width: 0,
|
|
4632
4633
|
left: 0
|
|
4633
4634
|
});
|
|
4634
|
-
let
|
|
4635
|
-
function
|
|
4635
|
+
let a, D = 0, k = !0;
|
|
4636
|
+
function x(y) {
|
|
4636
4637
|
document.getElementsByClassName("gante-tbody")[0].style.top = -y.target.scrollTop + "px";
|
|
4637
4638
|
const M = document.getElementsByClassName(
|
|
4638
4639
|
"ganteview-header"
|
|
4639
4640
|
)[0];
|
|
4640
4641
|
M.style.left = -y.target.scrollLeft + "px";
|
|
4641
4642
|
const u = y.target;
|
|
4642
|
-
if (u.scrollHeight <= u.scrollTop + u.clientHeight &&
|
|
4643
|
+
if (u.scrollHeight <= u.scrollTop + u.clientHeight && k && (k = !1, ae.emit("onLoad")), u.scrollLeft >= 0) {
|
|
4643
4644
|
for (const T of s.value)
|
|
4644
4645
|
if (T.left + T.width >= u.scrollLeft) {
|
|
4645
4646
|
f.value = T.date;
|
|
@@ -4647,7 +4648,7 @@ const {
|
|
|
4647
4648
|
}
|
|
4648
4649
|
}
|
|
4649
4650
|
}
|
|
4650
|
-
const
|
|
4651
|
+
const C = () => {
|
|
4651
4652
|
i.value = 0;
|
|
4652
4653
|
let y = 0;
|
|
4653
4654
|
const M = p.value.offsetWidth;
|
|
@@ -4655,19 +4656,19 @@ const {
|
|
|
4655
4656
|
switch (n.options.timeScale) {
|
|
4656
4657
|
//日
|
|
4657
4658
|
case 1:
|
|
4658
|
-
T = new Date(n.start_time), y = 60 * 60 * 1 * 24 * 1e3 / n.options.cellWidth,
|
|
4659
|
+
T = new Date(n.start_time), y = 60 * 60 * 1 * 24 * 1e3 / n.options.cellWidth, a = T;
|
|
4659
4660
|
break;
|
|
4660
4661
|
// 周
|
|
4661
4662
|
case 2:
|
|
4662
|
-
T = new Date(n.start_time - 7 * 24 * 60 * 60 * 1e3), y = 7 * 24 * 60 * 60 * 1e3 / n.options.cellWidth,
|
|
4663
|
+
T = new Date(n.start_time - 7 * 24 * 60 * 60 * 1e3), y = 7 * 24 * 60 * 60 * 1e3 / n.options.cellWidth, a = new Date(
|
|
4663
4664
|
T.getFullYear(),
|
|
4664
4665
|
T.getMonth(),
|
|
4665
4666
|
T.getDate() - (T.getDay() + 7) % 7
|
|
4666
|
-
), T =
|
|
4667
|
+
), T = a;
|
|
4667
4668
|
break;
|
|
4668
4669
|
// 月
|
|
4669
4670
|
case 3:
|
|
4670
|
-
T = new Date(n.start_time - 30 * 24 * 60 * 60 * 1e3), y = 30 * 24 * 60 * 60 * 1e3 / n.options.cellWidth,
|
|
4671
|
+
T = new Date(n.start_time - 30 * 24 * 60 * 60 * 1e3), y = 30 * 24 * 60 * 60 * 1e3 / n.options.cellWidth, a = new Date(T.getFullYear(), T.getMonth(), 1), T = a, E = 2;
|
|
4671
4672
|
break;
|
|
4672
4673
|
// 季
|
|
4673
4674
|
case 4:
|
|
@@ -4675,15 +4676,15 @@ const {
|
|
|
4675
4676
|
T = new Date(n.start_time - 90 * 24 * 60 * 60 * 1e3), y = 90 * 24 * 60 * 60 * 1e3 / n.options.cellWidth;
|
|
4676
4677
|
let I = 0;
|
|
4677
4678
|
const F = T.getMonth() + 1;
|
|
4678
|
-
F >= 1 && F <= 3 ? I = 0 : F >= 4 && F <= 6 ? I = 3 : F >= 7 && F <= 9 ? I = 6 : F >= 10 && F <= 12 && (I = 9),
|
|
4679
|
+
F >= 1 && F <= 3 ? I = 0 : F >= 4 && F <= 6 ? I = 3 : F >= 7 && F <= 9 ? I = 6 : F >= 10 && F <= 12 && (I = 9), a = new Date(T.getFullYear(), I, 1), T = a, E = 2;
|
|
4679
4680
|
}
|
|
4680
4681
|
break;
|
|
4681
4682
|
// 年
|
|
4682
4683
|
case 5:
|
|
4683
|
-
T = new Date(n.start_time - 183 * 24 * 60 * 60 * 1e3), y = 183 * 24 * 60 * 60 * 1e3 / n.options.cellWidth,
|
|
4684
|
+
T = new Date(n.start_time - 183 * 24 * 60 * 60 * 1e3), y = 183 * 24 * 60 * 60 * 1e3 / n.options.cellWidth, a = new Date(T.getFullYear(), 0, 1), T = a, E = 2;
|
|
4684
4685
|
break;
|
|
4685
4686
|
}
|
|
4686
|
-
return l.value = !0, n.end_time ? (u = new Date(n.end_time).getTime(), M * y >= u - new Date(
|
|
4687
|
+
return l.value = !0, n.end_time ? (u = new Date(n.end_time).getTime(), M * y >= u - new Date(a).getTime() && (u = M * y + new Date(a).getTime())) : u = M * y + new Date(a).getTime(), _(E, a, y, u), r.value = y, { time: y, start_time: T };
|
|
4687
4688
|
};
|
|
4688
4689
|
function d(y, M) {
|
|
4689
4690
|
const u = y.getFullYear(), T = y.getMonth() + 1, E = y.getDate();
|
|
@@ -4698,8 +4699,8 @@ const {
|
|
|
4698
4699
|
if (M == 5)
|
|
4699
4700
|
return u;
|
|
4700
4701
|
}
|
|
4701
|
-
function
|
|
4702
|
-
|
|
4702
|
+
function _(y, M, u, T) {
|
|
4703
|
+
c.value.width = 24 * 60 * 60 * 1e3 / u <= 5 ? 5 : 24 * 60 * 60 * 1e3 / u, c.value.left = (new Date((/* @__PURE__ */ new Date()).toLocaleDateString()).getTime() - M.getTime()) / u;
|
|
4703
4704
|
const E = [];
|
|
4704
4705
|
for (let I = 0; I <= T; ) {
|
|
4705
4706
|
const F = M;
|
|
@@ -4711,14 +4712,14 @@ const {
|
|
|
4711
4712
|
) : y == 2 && (M = new Date(M.getFullYear() + 1, 0, 1), m = d(F, 5));
|
|
4712
4713
|
const h = (M.getTime() - F.getTime()) / u;
|
|
4713
4714
|
i.value += h, E.push({
|
|
4714
|
-
left: (F.getTime() -
|
|
4715
|
+
left: (F.getTime() - a.getTime()) / u,
|
|
4715
4716
|
width: h,
|
|
4716
4717
|
date: m
|
|
4717
4718
|
}), I = M.getTime(), D = I;
|
|
4718
4719
|
}
|
|
4719
|
-
s.value = E, console.log({ top_time_data: s.value }), D && (T = D),
|
|
4720
|
+
s.value = E, console.log({ top_time_data: s.value }), D && (T = D), b(a, u, T);
|
|
4720
4721
|
}
|
|
4721
|
-
function
|
|
4722
|
+
function b(y, M, u) {
|
|
4722
4723
|
var E;
|
|
4723
4724
|
const T = [];
|
|
4724
4725
|
for (let I = 0; I <= u; ) {
|
|
@@ -4733,7 +4734,7 @@ const {
|
|
|
4733
4734
|
} else n.options.timeScale === 2 ? (y = new Date(N, U, Y + 7), h = d(F, 1) + "~" + d(new Date(N, U, Y - 1), 1)) : n.options.timeScale === 3 ? (y = new Date(N, U + 1, 1), m = d(F, 4), h = d(F, 2)) : n.options.timeScale === 4 ? (y = new Date(N, U + 3, 1), m = O(F.getMonth(), "month"), h = d(F, 1) + "~" + d(new Date(N, U, 0), 1)) : n.options.timeScale === 5 && (y = new Date(N, U + 6, 1), m = O(F.getMonth(), "year"), h = d(F, 1) + "~" + d(new Date(N, U, 0), 1));
|
|
4734
4735
|
const re = (y.getTime() - F.getTime()) / M;
|
|
4735
4736
|
I = y.getTime(), I <= u && T.push({
|
|
4736
|
-
left: (F.getTime() -
|
|
4737
|
+
left: (F.getTime() - a.getTime()) / M,
|
|
4737
4738
|
width: re,
|
|
4738
4739
|
date: m,
|
|
4739
4740
|
title: h,
|
|
@@ -4752,14 +4753,14 @@ const {
|
|
|
4752
4753
|
const M = (u = n.calendarOption) == null ? void 0 : u.list.find((T) => T.date === y);
|
|
4753
4754
|
return { lunar_day: M == null ? void 0 : M.lunarDay, reset_day: M == null ? void 0 : M.isRestDay };
|
|
4754
4755
|
};
|
|
4755
|
-
return t({ initTimeline:
|
|
4756
|
+
return t({ initTimeline: C }), (y, M) => (A(), P("div", {
|
|
4756
4757
|
ref_key: "ganteview",
|
|
4757
4758
|
ref: p,
|
|
4758
4759
|
class: "ganteview-box"
|
|
4759
4760
|
}, [
|
|
4760
4761
|
R("div", {
|
|
4761
4762
|
class: "ganteview",
|
|
4762
|
-
onScrollPassive:
|
|
4763
|
+
onScrollPassive: x
|
|
4763
4764
|
}, [
|
|
4764
4765
|
f.value ? (A(), P("div", Ul, G(f.value), 1)) : Z("", !0),
|
|
4765
4766
|
R("div", {
|
|
@@ -4812,8 +4813,8 @@ const {
|
|
|
4812
4813
|
R("div", {
|
|
4813
4814
|
id: "today-ganteview-column",
|
|
4814
4815
|
style: se({
|
|
4815
|
-
width:
|
|
4816
|
-
left:
|
|
4816
|
+
width: c.value.width + "px",
|
|
4817
|
+
left: c.value.left + "px"
|
|
4817
4818
|
})
|
|
4818
4819
|
}, null, 4)
|
|
4819
4820
|
]),
|
|
@@ -4837,45 +4838,45 @@ const {
|
|
|
4837
4838
|
setup(e, { emit: t }) {
|
|
4838
4839
|
const n = e, s = L(!1), o = L(0), i = L("");
|
|
4839
4840
|
let r = !1;
|
|
4840
|
-
function l(
|
|
4841
|
+
function l(x) {
|
|
4841
4842
|
if (r) {
|
|
4842
|
-
const
|
|
4843
|
-
let d =
|
|
4844
|
-
const
|
|
4843
|
+
const C = document.getElementsByTagName("body")[0];
|
|
4844
|
+
let d = x.pageX - i.value.getBoundingClientRect().left + 3;
|
|
4845
|
+
const _ = c("gante-table-box"), b = c("ganteview-box");
|
|
4845
4846
|
console.log(d);
|
|
4846
4847
|
const O = n.options.tableWidth || 450;
|
|
4847
|
-
d +
|
|
4848
|
+
d + _ <= O && (d = O - _), b - d <= 30 && (d = b - 30), o.value = d, C.style.cursor = "e-resize";
|
|
4848
4849
|
}
|
|
4849
4850
|
}
|
|
4850
4851
|
function f() {
|
|
4851
4852
|
if (r) {
|
|
4852
|
-
const
|
|
4853
|
-
ae.emit("onDragEnd",
|
|
4853
|
+
const x = document.getElementsByTagName("body")[0], C = o.value + c("gante-table-box");
|
|
4854
|
+
ae.emit("onDragEnd", C), k("onDragEnd", C), a(C), s.value = !1, o.value = 0, r = !1, x.classList.remove("unselecttable"), x.style.cursor = "", document.removeEventListener("mousemove", l, !1), document.removeEventListener("mouseup", f, !1);
|
|
4854
4855
|
}
|
|
4855
4856
|
}
|
|
4856
4857
|
const p = () => {
|
|
4857
4858
|
r = !0, s.value = !0, document.getElementsByTagName("body")[0].classList.add("unselecttable"), document.addEventListener("mousemove", l, { passive: !1 }), document.addEventListener("mouseup", f, { passive: !1 });
|
|
4858
|
-
},
|
|
4859
|
-
function
|
|
4860
|
-
let
|
|
4859
|
+
}, c = (x) => document.getElementsByClassName(x)[0].offsetWidth;
|
|
4860
|
+
function a(x) {
|
|
4861
|
+
let C = 0;
|
|
4861
4862
|
if (n.columns.filter((d) => !!d.show || d.show === void 0).forEach((d) => {
|
|
4862
|
-
|
|
4863
|
-
}),
|
|
4863
|
+
C += d.width ? Number(d.width) + 1 : 81;
|
|
4864
|
+
}), C < x) {
|
|
4864
4865
|
const d = D(1);
|
|
4865
4866
|
console.log(d);
|
|
4866
|
-
const
|
|
4867
|
-
d.width =
|
|
4867
|
+
const _ = d.width ? Number(d.width) - 2 : 78;
|
|
4868
|
+
d.width = x - (C - _);
|
|
4868
4869
|
}
|
|
4869
4870
|
}
|
|
4870
|
-
function D(
|
|
4871
|
-
const
|
|
4872
|
-
return d.show || d.show === void 0 ? d : D(
|
|
4871
|
+
function D(x) {
|
|
4872
|
+
const C = n.columns.length, d = n.columns[C - x];
|
|
4873
|
+
return d.show || d.show === void 0 ? d : D(x + 1);
|
|
4873
4874
|
}
|
|
4874
|
-
const
|
|
4875
|
-
return (
|
|
4875
|
+
const k = t;
|
|
4876
|
+
return (x, C) => (A(), P("div", {
|
|
4876
4877
|
ref_key: "usplit",
|
|
4877
4878
|
ref: i,
|
|
4878
|
-
style: se({ left: Number(
|
|
4879
|
+
style: se({ left: Number(x.left) ? x.left + "px" : x.left }),
|
|
4879
4880
|
class: "ut-gante-split",
|
|
4880
4881
|
onMousedown: p
|
|
4881
4882
|
}, [
|
|
@@ -4937,12 +4938,12 @@ const {
|
|
|
4937
4938
|
// 唯一标识字段
|
|
4938
4939
|
footerLabel: "合计"
|
|
4939
4940
|
// showFooter为true时生效
|
|
4940
|
-
}), r = L(300), l = L(300), f = L(!1), p = L(/* @__PURE__ */ new Date()),
|
|
4941
|
+
}), r = L(300), l = L(300), f = L(!1), p = L(/* @__PURE__ */ new Date()), c = L(""), a = L(!1), D = L(0), k = L(0), x = L(null), C = L(null);
|
|
4941
4942
|
let d;
|
|
4942
4943
|
Je(() => {
|
|
4943
|
-
u(), E(),
|
|
4944
|
+
u(), E(), _();
|
|
4944
4945
|
});
|
|
4945
|
-
const
|
|
4946
|
+
const _ = () => {
|
|
4946
4947
|
ae.off("onDragChangeTime"), ae.on("onDragChangeTime", (m) => {
|
|
4947
4948
|
console.log("[ data ] >", m);
|
|
4948
4949
|
}), ae.off("change"), ae.on("change", (m) => {
|
|
@@ -4956,7 +4957,7 @@ const {
|
|
|
4956
4957
|
(h = n.events) == null || h.onDbclick(m);
|
|
4957
4958
|
}), ae.off("onLoad"), ae.on("onLoad", () => {
|
|
4958
4959
|
});
|
|
4959
|
-
},
|
|
4960
|
+
}, b = (m) => {
|
|
4960
4961
|
o.value = m;
|
|
4961
4962
|
}, O = (m, h) => {
|
|
4962
4963
|
if (console.log(h), !m) {
|
|
@@ -4979,7 +4980,7 @@ const {
|
|
|
4979
4980
|
Y[i.children] ? (s++, Y.seqNo = Y.seqNo || s, N(Y[i.children])) : (s++, Y.seqNo = Y.seqNo || s);
|
|
4980
4981
|
}
|
|
4981
4982
|
}, w = (m) => {
|
|
4982
|
-
console.log("展开", m.show_calendar), m.changeDate && (p.value = m.changeDate), f.value = m.show_calendar, console.log(f.value), m.calendar_left != null && (r.value = m.calendar_left), m.calendar_top != null && (l.value = m.calendar_top), m.change_value != null && (
|
|
4983
|
+
console.log("展开", m.show_calendar), m.changeDate && (p.value = m.changeDate), f.value = m.show_calendar, console.log(f.value), m.calendar_left != null && (r.value = m.calendar_left), m.calendar_top != null && (l.value = m.calendar_top), m.change_value != null && (c.value = m.change_value.argument);
|
|
4983
4984
|
}, y = (m) => {
|
|
4984
4985
|
for (const h in m.data)
|
|
4985
4986
|
(h == "width" || h == "left" || h == "open") && delete m.data[h];
|
|
@@ -4990,13 +4991,13 @@ const {
|
|
|
4990
4991
|
const m = ee(n.startTime, "yyyy-MM-dd 00:00:00");
|
|
4991
4992
|
D.value = sn(m, "yyyy-MM-dd HH:mm:ss");
|
|
4992
4993
|
const h = ee(n.endTime, "yyyy-MM-dd 23:59:59");
|
|
4993
|
-
|
|
4994
|
+
k.value = sn(h, "yyyy-MM-dd HH:mm:ss");
|
|
4994
4995
|
function g() {
|
|
4995
4996
|
const v = (/* @__PURE__ */ new Date()).getTime();
|
|
4996
|
-
v < D.value && (D.value = v), v >
|
|
4997
|
+
v < D.value && (D.value = v), v > k.value && (k.value = v);
|
|
4997
4998
|
}
|
|
4998
4999
|
g(), s = 0, Ye(() => {
|
|
4999
|
-
const v =
|
|
5000
|
+
const v = x.value.initTimeline(i.timeScale);
|
|
5000
5001
|
I(n.tasks, v.time, v.start_time);
|
|
5001
5002
|
});
|
|
5002
5003
|
}, T = (m, h) => (m.forEach((g) => {
|
|
@@ -5012,7 +5013,7 @@ const {
|
|
|
5012
5013
|
if (i.tableWidth)
|
|
5013
5014
|
o.value = i.tableWidth;
|
|
5014
5015
|
else {
|
|
5015
|
-
const h = (m =
|
|
5016
|
+
const h = (m = C == null ? void 0 : C.value) == null ? void 0 : m.clientWidth;
|
|
5016
5017
|
o.value = h / 2;
|
|
5017
5018
|
}
|
|
5018
5019
|
};
|
|
@@ -5036,7 +5037,7 @@ const {
|
|
|
5036
5037
|
Pe(m.$slots, "header"),
|
|
5037
5038
|
R("div", {
|
|
5038
5039
|
ref_key: "xgante",
|
|
5039
|
-
ref:
|
|
5040
|
+
ref: C,
|
|
5040
5041
|
class: "gante-box"
|
|
5041
5042
|
}, [
|
|
5042
5043
|
R("div", {
|
|
@@ -5044,7 +5045,7 @@ const {
|
|
|
5044
5045
|
class: "gante-out-op"
|
|
5045
5046
|
}, [
|
|
5046
5047
|
m.title ? (A(), P("div", Gl, G(m.title), 1)) : Z("", !0),
|
|
5047
|
-
R("div", Kl, G(te(ee)(D.value, "yyyy-MM-dd")) + " ~ " + G(te(ee)(
|
|
5048
|
+
R("div", Kl, G(te(ee)(D.value, "yyyy-MM-dd")) + " ~ " + G(te(ee)(k.value, "yyyy-MM-dd")), 1),
|
|
5048
5049
|
R("div", Ql, [
|
|
5049
5050
|
Pe(m.$slots, "colorTip"),
|
|
5050
5051
|
Zl
|
|
@@ -5056,11 +5057,11 @@ const {
|
|
|
5056
5057
|
}, [
|
|
5057
5058
|
j(Dl, {
|
|
5058
5059
|
columns: m.columns,
|
|
5059
|
-
"show-loading":
|
|
5060
|
+
"show-loading": a.value,
|
|
5060
5061
|
data: m.tasks,
|
|
5061
5062
|
options: i,
|
|
5062
5063
|
onSort: O,
|
|
5063
|
-
onOnDragEnd:
|
|
5064
|
+
onOnDragEnd: b
|
|
5064
5065
|
}, null, 8, ["columns", "show-loading", "data", "options"])
|
|
5065
5066
|
], 4),
|
|
5066
5067
|
R("div", {
|
|
@@ -5072,9 +5073,9 @@ const {
|
|
|
5072
5073
|
}, [
|
|
5073
5074
|
j(Wl, {
|
|
5074
5075
|
ref_key: "ganteTimeline",
|
|
5075
|
-
ref:
|
|
5076
|
+
ref: x,
|
|
5076
5077
|
start_time: D.value,
|
|
5077
|
-
end_time:
|
|
5078
|
+
end_time: k.value,
|
|
5078
5079
|
columns: m.columns,
|
|
5079
5080
|
options: i,
|
|
5080
5081
|
"dayily-summary": m.dayilySummary,
|
|
@@ -5086,7 +5087,7 @@ const {
|
|
|
5086
5087
|
left: o.value,
|
|
5087
5088
|
columns: m.columns,
|
|
5088
5089
|
options: i,
|
|
5089
|
-
onOnDragEnd:
|
|
5090
|
+
onOnDragEnd: b
|
|
5090
5091
|
}, null, 8, ["left", "columns", "options"])
|
|
5091
5092
|
], 512)
|
|
5092
5093
|
]));
|
|
@@ -5107,11 +5108,11 @@ const {
|
|
|
5107
5108
|
},
|
|
5108
5109
|
emits: ["update:modelValue"],
|
|
5109
5110
|
setup(e, { emit: t }) {
|
|
5110
|
-
const n = e, s = t, o = L(!1), i = Oo(n, "modelValue"), r = L(Object.keys(Lo.icons)), l = L("ri-"), f = L(), p = de(r.value, !0),
|
|
5111
|
+
const n = e, s = t, o = L(!1), i = Oo(n, "modelValue"), r = L(Object.keys(Lo.icons)), l = L("ri-"), f = L(), p = de(r.value, !0), c = L(35), a = L(1), D = L(0), k = L(""), x = () => {
|
|
5111
5112
|
f.value = "corner-down-right-fill", i.value && (f.value = i.value.split(":")[1]);
|
|
5112
|
-
},
|
|
5113
|
-
|
|
5114
|
-
|
|
5113
|
+
}, C = xe(() => a.value === 1 ? p.filter((u) => u.includes(k.value)).slice(a.value - 1, c.value) : p.filter((u) => u.includes(k.value)).slice(
|
|
5114
|
+
c.value * (a.value - 1),
|
|
5115
|
+
c.value * (a.value - 1) + c.value
|
|
5115
5116
|
)), d = xe(() => (u) => {
|
|
5116
5117
|
if (i.value === l.value + u)
|
|
5117
5118
|
return {
|
|
@@ -5119,20 +5120,20 @@ const {
|
|
|
5119
5120
|
color: "var(--el-color-primary)"
|
|
5120
5121
|
};
|
|
5121
5122
|
});
|
|
5122
|
-
function
|
|
5123
|
+
function _(u) {
|
|
5123
5124
|
f.value = u, s("update:modelValue", O()), M();
|
|
5124
5125
|
}
|
|
5125
|
-
function
|
|
5126
|
-
|
|
5126
|
+
function b(u) {
|
|
5127
|
+
a.value = u;
|
|
5127
5128
|
}
|
|
5128
5129
|
const O = () => l.value === "ri-" ? "ri:" + f.value : l.value + f.value, w = () => {
|
|
5129
5130
|
f.value = "corner-down-right-fill", s("update:modelValue", "");
|
|
5130
5131
|
}, y = () => {
|
|
5131
|
-
|
|
5132
|
-
(u) => u.includes(
|
|
5132
|
+
a.value === 1 ? D.value = p.filter(
|
|
5133
|
+
(u) => u.includes(k.value)
|
|
5133
5134
|
).length : D.value = p.length;
|
|
5134
5135
|
}, M = () => {
|
|
5135
|
-
o.value = !1,
|
|
5136
|
+
o.value = !1, k.value = "";
|
|
5136
5137
|
};
|
|
5137
5138
|
return ut(
|
|
5138
5139
|
() => n.modelValue,
|
|
@@ -5142,12 +5143,12 @@ const {
|
|
|
5142
5143
|
));
|
|
5143
5144
|
}
|
|
5144
5145
|
), ut(
|
|
5145
|
-
() =>
|
|
5146
|
+
() => k.value,
|
|
5146
5147
|
() => {
|
|
5147
|
-
|
|
5148
|
+
a.value = 1, y();
|
|
5148
5149
|
}
|
|
5149
5150
|
), Je(() => {
|
|
5150
|
-
y(),
|
|
5151
|
+
y(), x();
|
|
5151
5152
|
}), (u, T) => {
|
|
5152
5153
|
const E = V("IconifyIconOffline"), I = V("el-input"), F = V("el-divider"), m = V("el-scrollbar"), h = V("el-pagination"), g = V("vxe-button"), v = V("el-popover");
|
|
5153
5154
|
return A(), P("div", oa, [
|
|
@@ -5188,8 +5189,8 @@ const {
|
|
|
5188
5189
|
default: q(() => [
|
|
5189
5190
|
R("div", sa, [
|
|
5190
5191
|
j(I, {
|
|
5191
|
-
modelValue:
|
|
5192
|
-
"onUpdate:modelValue": T[1] || (T[1] = (N) =>
|
|
5192
|
+
modelValue: k.value,
|
|
5193
|
+
"onUpdate:modelValue": T[1] || (T[1] = (N) => k.value = N),
|
|
5193
5194
|
class: "p-2",
|
|
5194
5195
|
placeholder: "搜索图标",
|
|
5195
5196
|
clearable: ""
|
|
@@ -5199,12 +5200,12 @@ const {
|
|
|
5199
5200
|
j(m, { height: "220px" }, {
|
|
5200
5201
|
default: q(() => [
|
|
5201
5202
|
R("ul", ia, [
|
|
5202
|
-
(A(!0), P(ce, null, le(
|
|
5203
|
+
(A(!0), P(ce, null, le(C.value, (N, U) => (A(), P("li", {
|
|
5203
5204
|
key: U,
|
|
5204
5205
|
title: N,
|
|
5205
5206
|
class: "icon-item p-2 cursor-pointer mr-2 mt-1 flex justify-center items-center border border-[#e5e7eb]",
|
|
5206
5207
|
style: se(d.value(N)),
|
|
5207
|
-
onClick: (Y) =>
|
|
5208
|
+
onClick: (Y) => _(N)
|
|
5208
5209
|
}, [
|
|
5209
5210
|
R("i", {
|
|
5210
5211
|
class: pe([l.value + N, "w-5 h-5 text-xl"])
|
|
@@ -5219,13 +5220,13 @@ const {
|
|
|
5219
5220
|
j(h, {
|
|
5220
5221
|
class: "flex-auto ml-2",
|
|
5221
5222
|
total: D.value,
|
|
5222
|
-
"current-page":
|
|
5223
|
-
"page-size":
|
|
5223
|
+
"current-page": a.value,
|
|
5224
|
+
"page-size": c.value,
|
|
5224
5225
|
"pager-count": 5,
|
|
5225
5226
|
layout: "pager",
|
|
5226
5227
|
background: "",
|
|
5227
5228
|
small: "",
|
|
5228
|
-
onCurrentChange:
|
|
5229
|
+
onCurrentChange: b
|
|
5229
5230
|
}, null, 8, ["total", "current-page", "page-size"]),
|
|
5230
5231
|
j(g, {
|
|
5231
5232
|
class: "justify-end mr-2 ml-2",
|
|
@@ -5295,32 +5296,32 @@ const {
|
|
|
5295
5296
|
}
|
|
5296
5297
|
},
|
|
5297
5298
|
setup(e) {
|
|
5298
|
-
const t = L(""), n = L([]), s = e, o = L(""), i = L(""), r = L("2023"), l = L(""), f = [], p = L({}),
|
|
5299
|
+
const t = L(""), n = L([]), s = e, o = L(""), i = L(""), r = L("2023"), l = L(""), f = [], p = L({}), c = /* @__PURE__ */ new Date();
|
|
5299
5300
|
p.value = st.solar2lunar(
|
|
5300
|
-
|
|
5301
|
-
|
|
5302
|
-
|
|
5301
|
+
c.getFullYear(),
|
|
5302
|
+
c.getMonth() + 1,
|
|
5303
|
+
c.getDate()
|
|
5303
5304
|
);
|
|
5304
5305
|
for (let E = s.range[0]; E < s.range[1]; E++)
|
|
5305
5306
|
f.push({ value: `${E}`, text: E + "年" });
|
|
5306
|
-
const
|
|
5307
|
+
const a = [];
|
|
5307
5308
|
for (let E = 1; E <= 12; E++)
|
|
5308
|
-
|
|
5309
|
+
a.push({ value: `${E < 10 ? 0 : ""}${E}`, text: E + "月" });
|
|
5309
5310
|
const D = (E) => {
|
|
5310
|
-
E === "next" ? t.value = be(t.value).add(1, "month").format(`YYYY-MM-${o.value}`) : t.value = be(t.value).subtract(1, "month").format(`YYYY-MM-${o.value}`), i.value = be(t.value).format("MM"), Ye(
|
|
5311
|
-
},
|
|
5312
|
-
r.value = E, t.value = be(t.value).format(`${E}-MM-DD`), Ye(
|
|
5313
|
-
},
|
|
5314
|
-
i.value = E, t.value = be(t.value).format(`YYYY-${E}-DD`), Ye(
|
|
5315
|
-
},
|
|
5311
|
+
E === "next" ? t.value = be(t.value).add(1, "month").format(`YYYY-MM-${o.value}`) : t.value = be(t.value).subtract(1, "month").format(`YYYY-MM-${o.value}`), i.value = be(t.value).format("MM"), Ye(b);
|
|
5312
|
+
}, k = (E) => {
|
|
5313
|
+
r.value = E, t.value = be(t.value).format(`${E}-MM-DD`), Ye(b);
|
|
5314
|
+
}, x = (E) => {
|
|
5315
|
+
i.value = E, t.value = be(t.value).format(`YYYY-${E}-DD`), Ye(b);
|
|
5316
|
+
}, C = () => {
|
|
5316
5317
|
t.value = be().format("YYYY-MM-DD");
|
|
5317
5318
|
const { day: E, month: I, year: F } = w();
|
|
5318
5319
|
r.value = F, i.value = I, o.value = E;
|
|
5319
5320
|
}, d = (E) => {
|
|
5320
5321
|
E && (t.value = E);
|
|
5321
|
-
}, x = () => {
|
|
5322
|
-
k(), s.date && (t.value = s.date), _();
|
|
5323
5322
|
}, _ = () => {
|
|
5323
|
+
C(), s.date && (t.value = s.date), b();
|
|
5324
|
+
}, b = () => {
|
|
5324
5325
|
const E = r.value, I = i.value, F = 1;
|
|
5325
5326
|
let m = [];
|
|
5326
5327
|
const h = 42, g = new Date([E, I, F].join("-"));
|
|
@@ -5380,7 +5381,7 @@ const {
|
|
|
5380
5381
|
return { day: I, month: m, year: F, isToday: h };
|
|
5381
5382
|
};
|
|
5382
5383
|
Je(() => {
|
|
5383
|
-
|
|
5384
|
+
_();
|
|
5384
5385
|
}), ut(t, (E) => {
|
|
5385
5386
|
const { day: I, month: F, year: m } = w(E);
|
|
5386
5387
|
r.value = m, i.value = F;
|
|
@@ -5394,13 +5395,13 @@ const {
|
|
|
5394
5395
|
...h,
|
|
5395
5396
|
lunarFestival: u[h.IMonthCn] ? u[h.IMonthCn][h.IDayCn] : void 0,
|
|
5396
5397
|
festival: T[h.cMonth] ? T[h.cMonth][h.cDay] : void 0
|
|
5397
|
-
}, Ye(
|
|
5398
|
+
}, Ye(b);
|
|
5398
5399
|
});
|
|
5399
5400
|
const y = (E) => {
|
|
5400
5401
|
const I = E.target.parentNode.getAttribute("date") ? E.target.parentNode.getAttribute("date") : E.target.getAttribute("date");
|
|
5401
5402
|
console.log(I), t.value = I;
|
|
5402
5403
|
}, M = () => {
|
|
5403
|
-
|
|
5404
|
+
C();
|
|
5404
5405
|
}, u = {
|
|
5405
5406
|
正月: { 初一: "春节", 十五: "元宵节" },
|
|
5406
5407
|
二月: { 初二: "春龙节" },
|
|
@@ -5451,7 +5452,7 @@ const {
|
|
|
5451
5452
|
modelValue: r.value,
|
|
5452
5453
|
"onUpdate:modelValue": I[1] || (I[1] = (h) => r.value = h),
|
|
5453
5454
|
style: { width: "80px" },
|
|
5454
|
-
onChange:
|
|
5455
|
+
onChange: k
|
|
5455
5456
|
}, {
|
|
5456
5457
|
default: q(() => [
|
|
5457
5458
|
(A(), P(ce, null, le(f, (h) => j(F, {
|
|
@@ -5473,10 +5474,10 @@ const {
|
|
|
5473
5474
|
modelValue: i.value,
|
|
5474
5475
|
"onUpdate:modelValue": I[3] || (I[3] = (h) => i.value = h),
|
|
5475
5476
|
style: { width: "60px" },
|
|
5476
|
-
onChange:
|
|
5477
|
+
onChange: x
|
|
5477
5478
|
}, {
|
|
5478
5479
|
default: q(() => [
|
|
5479
|
-
(A(), P(ce, null, le(
|
|
5480
|
+
(A(), P(ce, null, le(a, (h) => j(F, {
|
|
5480
5481
|
key: h.value,
|
|
5481
5482
|
value: h.value,
|
|
5482
5483
|
label: h.text
|
|
@@ -5559,26 +5560,26 @@ const {
|
|
|
5559
5560
|
},
|
|
5560
5561
|
setup(e, { expose: t }) {
|
|
5561
5562
|
const { initFrontText: n, initBackText: s, duration: o } = e, i = L(!1), r = L("down"), l = L(n), f = L(s), p = ({
|
|
5562
|
-
type:
|
|
5563
|
-
newFrontText:
|
|
5563
|
+
type: c,
|
|
5564
|
+
newFrontText: a,
|
|
5564
5565
|
newBackText: D
|
|
5565
5566
|
}) => {
|
|
5566
5567
|
if (i.value)
|
|
5567
5568
|
return !1;
|
|
5568
|
-
l.value =
|
|
5569
|
+
l.value = a, f.value = D, r.value = c, i.value = !0, setTimeout(() => {
|
|
5569
5570
|
l.value = D, i.value = !1;
|
|
5570
5571
|
}, o);
|
|
5571
5572
|
};
|
|
5572
5573
|
return t({
|
|
5573
5574
|
// 下翻牌
|
|
5574
|
-
flipDown: (
|
|
5575
|
-
p({ type: "down", newFrontText:
|
|
5575
|
+
flipDown: (c, a) => {
|
|
5576
|
+
p({ type: "down", newFrontText: c, newBackText: a });
|
|
5576
5577
|
},
|
|
5577
5578
|
// 上翻牌
|
|
5578
|
-
flipUp: (
|
|
5579
|
-
p({ type: "up", newFrontText:
|
|
5579
|
+
flipUp: (c, a) => {
|
|
5580
|
+
p({ type: "up", newFrontText: c, newBackText: a });
|
|
5580
5581
|
}
|
|
5581
|
-
}), (
|
|
5582
|
+
}), (c, a) => (A(), P("div", {
|
|
5582
5583
|
class: pe(["M-FlipCard", {
|
|
5583
5584
|
down: r.value === "down",
|
|
5584
5585
|
up: r.value === "up",
|
|
@@ -5609,69 +5610,69 @@ const {
|
|
|
5609
5610
|
(() => {
|
|
5610
5611
|
t.value = setInterval(() => {
|
|
5611
5612
|
var d;
|
|
5612
|
-
const
|
|
5613
|
-
for (let
|
|
5614
|
-
|
|
5613
|
+
const k = /* @__PURE__ */ new Date(), x = p(new Date(k.getTime() - 1e3), "hhiiss"), C = p(k, "hhiiss");
|
|
5614
|
+
for (let _ = 0; _ < f.length; _++)
|
|
5615
|
+
x[_] !== C[_] && ((d = f[_].value) == null || d.flipDown(x[_], C[_]));
|
|
5615
5616
|
}, 1e3);
|
|
5616
5617
|
})();
|
|
5617
5618
|
});
|
|
5618
|
-
const p = (D,
|
|
5619
|
-
const
|
|
5620
|
-
|
|
5621
|
-
|
|
5622
|
-
(D.getFullYear() + "").slice(-
|
|
5619
|
+
const p = (D, k) => {
|
|
5620
|
+
const x = k.match(/(y+)/);
|
|
5621
|
+
x && (k = k.replace(
|
|
5622
|
+
x[0],
|
|
5623
|
+
(D.getFullYear() + "").slice(-x[0].length)
|
|
5623
5624
|
));
|
|
5624
|
-
const
|
|
5625
|
+
const C = {
|
|
5625
5626
|
"m+": D.getMonth() + 1,
|
|
5626
5627
|
"d+": D.getDate(),
|
|
5627
5628
|
"h+": D.getHours(),
|
|
5628
5629
|
"i+": D.getMinutes(),
|
|
5629
5630
|
"s+": D.getSeconds()
|
|
5630
5631
|
};
|
|
5631
|
-
for (const d in
|
|
5632
|
-
const
|
|
5633
|
-
if (
|
|
5634
|
-
const
|
|
5635
|
-
|
|
5636
|
-
|
|
5637
|
-
|
|
5632
|
+
for (const d in C) {
|
|
5633
|
+
const _ = k.match(new RegExp(`(${d})`));
|
|
5634
|
+
if (_) {
|
|
5635
|
+
const b = C[d] + "";
|
|
5636
|
+
k = k.replace(
|
|
5637
|
+
_[0],
|
|
5638
|
+
_[0].length === 1 ? b : b.padStart(2, "0")
|
|
5638
5639
|
);
|
|
5639
5640
|
}
|
|
5640
5641
|
}
|
|
5641
|
-
return
|
|
5642
|
-
},
|
|
5643
|
-
return (D,
|
|
5642
|
+
return k;
|
|
5643
|
+
}, c = /* @__PURE__ */ new Date(), a = p(new Date(c.getTime()), "hhiiss");
|
|
5644
|
+
return (D, k) => (A(), P("div", Ha, [
|
|
5644
5645
|
j(We, {
|
|
5645
5646
|
ref_key: "flipCardHour1Ref",
|
|
5646
5647
|
ref: n,
|
|
5647
|
-
"init-front-text": te(
|
|
5648
|
+
"init-front-text": te(a)[0]
|
|
5648
5649
|
}, null, 8, ["init-front-text"]),
|
|
5649
5650
|
j(We, {
|
|
5650
5651
|
ref_key: "flipCardHour2Ref",
|
|
5651
5652
|
ref: s,
|
|
5652
|
-
"init-front-text": te(
|
|
5653
|
+
"init-front-text": te(a)[1]
|
|
5653
5654
|
}, null, 8, ["init-front-text"]),
|
|
5654
5655
|
Wa,
|
|
5655
5656
|
j(We, {
|
|
5656
5657
|
ref_key: "flipCardMinute1Ref",
|
|
5657
5658
|
ref: o,
|
|
5658
|
-
"init-front-text": te(
|
|
5659
|
+
"init-front-text": te(a)[2]
|
|
5659
5660
|
}, null, 8, ["init-front-text"]),
|
|
5660
5661
|
j(We, {
|
|
5661
5662
|
ref_key: "flipCardMinute2Ref",
|
|
5662
5663
|
ref: i,
|
|
5663
|
-
"init-front-text": te(
|
|
5664
|
+
"init-front-text": te(a)[3]
|
|
5664
5665
|
}, null, 8, ["init-front-text"]),
|
|
5665
5666
|
Ya,
|
|
5666
5667
|
j(We, {
|
|
5667
5668
|
ref_key: "flipCardSecond1Ref",
|
|
5668
5669
|
ref: r,
|
|
5669
|
-
"init-front-text": te(
|
|
5670
|
+
"init-front-text": te(a)[4]
|
|
5670
5671
|
}, null, 8, ["init-front-text"]),
|
|
5671
5672
|
j(We, {
|
|
5672
5673
|
ref_key: "flipCardSecond2Ref",
|
|
5673
5674
|
ref: l,
|
|
5674
|
-
"init-front-text": te(
|
|
5675
|
+
"init-front-text": te(a)[5]
|
|
5675
5676
|
}, null, 8, ["init-front-text"])
|
|
5676
5677
|
]));
|
|
5677
5678
|
}
|
|
@@ -5819,12 +5820,12 @@ function lc(e, t) {
|
|
|
5819
5820
|
height: n.height
|
|
5820
5821
|
};
|
|
5821
5822
|
let i = n.body;
|
|
5822
|
-
[n, s].forEach((
|
|
5823
|
-
const d = [],
|
|
5824
|
-
let O =
|
|
5825
|
-
|
|
5823
|
+
[n, s].forEach((C) => {
|
|
5824
|
+
const d = [], _ = C.hFlip, b = C.vFlip;
|
|
5825
|
+
let O = C.rotate;
|
|
5826
|
+
_ ? b ? O += 2 : (d.push(
|
|
5826
5827
|
"translate(" + (o.width + o.left).toString() + " " + (0 - o.top).toString() + ")"
|
|
5827
|
-
), d.push("scale(-1 1)"), o.top = o.left = 0) :
|
|
5828
|
+
), d.push("scale(-1 1)"), o.top = o.left = 0) : b && (d.push(
|
|
5828
5829
|
"translate(" + (0 - o.left).toString() + " " + (o.height + o.top).toString() + ")"
|
|
5829
5830
|
), d.push("scale(1 -1)"), o.top = o.left = 0);
|
|
5830
5831
|
let w;
|
|
@@ -5852,16 +5853,16 @@ function lc(e, t) {
|
|
|
5852
5853
|
));
|
|
5853
5854
|
});
|
|
5854
5855
|
const r = s.width, l = s.height, f = o.width, p = o.height;
|
|
5855
|
-
let
|
|
5856
|
-
r === null ? (
|
|
5857
|
-
const D = {},
|
|
5858
|
-
rc(d) || (D[
|
|
5856
|
+
let c, a;
|
|
5857
|
+
r === null ? (a = l === null ? "1em" : l === "auto" ? p : l, c = En(a, f / p)) : (c = r === "auto" ? f : r, a = l === null ? En(c, p / f) : l === "auto" ? p : l);
|
|
5858
|
+
const D = {}, k = (C, d) => {
|
|
5859
|
+
rc(d) || (D[C] = d.toString());
|
|
5859
5860
|
};
|
|
5860
|
-
|
|
5861
|
-
const
|
|
5862
|
-
return D.viewBox =
|
|
5861
|
+
k("width", c), k("height", a);
|
|
5862
|
+
const x = [o.left, o.top, f, p];
|
|
5863
|
+
return D.viewBox = x.join(" "), {
|
|
5863
5864
|
attributes: D,
|
|
5864
|
-
viewBox:
|
|
5865
|
+
viewBox: x,
|
|
5865
5866
|
body: i
|
|
5866
5867
|
};
|
|
5867
5868
|
}
|
|
@@ -5938,10 +5939,10 @@ function Mn(e) {
|
|
|
5938
5939
|
}
|
|
5939
5940
|
const vc = (e, t) => {
|
|
5940
5941
|
const n = Ka(Dn, t), s = { ...gc }, o = t.mode || "svg", i = {}, r = t.style, l = typeof r == "object" && !(r instanceof Array) ? r : {};
|
|
5941
|
-
for (let
|
|
5942
|
-
const d = t[
|
|
5942
|
+
for (let C in t) {
|
|
5943
|
+
const d = t[C];
|
|
5943
5944
|
if (d !== void 0)
|
|
5944
|
-
switch (
|
|
5945
|
+
switch (C) {
|
|
5945
5946
|
// Properties to ignore
|
|
5946
5947
|
case "icon":
|
|
5947
5948
|
case "style":
|
|
@@ -5952,7 +5953,7 @@ const vc = (e, t) => {
|
|
|
5952
5953
|
case "inline":
|
|
5953
5954
|
case "hFlip":
|
|
5954
5955
|
case "vFlip":
|
|
5955
|
-
n[
|
|
5956
|
+
n[C] = d === !0 || d === "true" || d === 1;
|
|
5956
5957
|
break;
|
|
5957
5958
|
// Flip as string: 'horizontal,vertical'
|
|
5958
5959
|
case "flip":
|
|
@@ -5964,7 +5965,7 @@ const vc = (e, t) => {
|
|
|
5964
5965
|
break;
|
|
5965
5966
|
// Rotation as string
|
|
5966
5967
|
case "rotate":
|
|
5967
|
-
typeof d == "string" ? n[
|
|
5968
|
+
typeof d == "string" ? n[C] = ec(d) : typeof d == "number" && (n[C] = d);
|
|
5968
5969
|
break;
|
|
5969
5970
|
// Remove aria-hidden
|
|
5970
5971
|
case "ariaHidden":
|
|
@@ -5972,8 +5973,8 @@ const vc = (e, t) => {
|
|
|
5972
5973
|
d !== !0 && d !== "true" && delete s["aria-hidden"];
|
|
5973
5974
|
break;
|
|
5974
5975
|
default: {
|
|
5975
|
-
const
|
|
5976
|
-
|
|
5976
|
+
const _ = ct[C];
|
|
5977
|
+
_ ? (d === !0 || d === "true" || d === 1) && (n[_] = !0) : Dn[C] === void 0 && (s[C] = d);
|
|
5977
5978
|
}
|
|
5978
5979
|
}
|
|
5979
5980
|
}
|
|
@@ -5983,21 +5984,21 @@ const vc = (e, t) => {
|
|
|
5983
5984
|
...i,
|
|
5984
5985
|
...l
|
|
5985
5986
|
}, Object.assign(s, p);
|
|
5986
|
-
let
|
|
5987
|
-
return typeof d == "string" && (d = d.replace(/-/g, "_")), s.innerHTML = dc(f.body, d ? () => d + "ID" +
|
|
5987
|
+
let C = 0, d = t.id;
|
|
5988
|
+
return typeof d == "string" && (d = d.replace(/-/g, "_")), s.innerHTML = dc(f.body, d ? () => d + "ID" + C++ : "iconifyVue"), Ee("svg", s);
|
|
5988
5989
|
}
|
|
5989
|
-
const { body:
|
|
5990
|
+
const { body: c, width: a, height: D } = e, k = o === "mask" || (o === "bg" ? !1 : c.indexOf("currentColor") !== -1), x = fc(c, {
|
|
5990
5991
|
...p,
|
|
5991
|
-
width:
|
|
5992
|
+
width: a + "",
|
|
5992
5993
|
height: D + ""
|
|
5993
5994
|
});
|
|
5994
5995
|
return s.style = {
|
|
5995
5996
|
...i,
|
|
5996
|
-
"--svg": hc(
|
|
5997
|
+
"--svg": hc(x),
|
|
5997
5998
|
width: Mn(p.width),
|
|
5998
5999
|
height: Mn(p.height),
|
|
5999
6000
|
...yc,
|
|
6000
|
-
...
|
|
6001
|
+
...k ? Bt : So,
|
|
6001
6002
|
...l
|
|
6002
6003
|
}, Ee("span", s);
|
|
6003
6004
|
}, Eo = /* @__PURE__ */ Object.create(null);
|