qk-pc-ui 4.7.6 → 4.7.7
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/qk-pc-ui.css +1 -1
- package/dist/qk-pc-ui.mjs +801 -744
- package/dist/qk-pc-ui.umd.js +15 -15
- package/package.json +1 -1
package/dist/qk-pc-ui.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { createElementBlock, openBlock, createElementVNode, createVNode, unref, withCtx, renderSlot, createTextVNode, toDisplayString, computed,
|
|
1
|
+
import { ref, onMounted, nextTick, onUnmounted, createElementBlock, openBlock, normalizeClass, createElementVNode, createVNode, unref, withCtx, renderSlot, createCommentVNode, createTextVNode, toDisplayString, computed, createBlock, reactive, watch, Fragment, renderList, normalizeStyle, defineAsyncComponent, h, useAttrs, mergeProps, createSlots, normalizeProps, guardReactiveProps, useSlots, useModel, mergeModels, onBeforeUnmount, withDirectives, vModelText, withKeys } from "vue";
|
|
2
2
|
import { ElForm, ElButton, ElPagination, ElPopover, ElInput, ElCheckboxGroup, ElCheckbox, ElIcon, ElDialog, ElLink, ElTableColumn, ElDropdown, ElDropdownMenu, ElDropdownItem, ElMessageBox, ElAutoResizer, ElTable, ElMessage, ElTableV2, ElLoading, ElDatePicker, ElRow, ElSelect, ElOption, ElUpload, ElButtonGroup, ElRadioGroup, ElRadioButton, ElSwitch, ElTag, ElFormItem, ElTabs, ElTabPane, ElCascader } from "element-plus";
|
|
3
|
-
import { Search, Refresh,
|
|
3
|
+
import { Search, Refresh, ArrowUp, ArrowDown, Setting, Plus, Delete, Download, Document, Printer, View, Check } from "@element-plus/icons-vue";
|
|
4
4
|
import { L, getUrl, Sleep, SaasApi, EquipmentApi, AndroidApi, SystemModuleApi, GetUrlParam, AjaxCallWeb, LocalApi, GetEnumName, MemberApi, UnRegisterKeyboard, RegisterKeyboard, GetCacheData, PlayTTS, InfrastructureApi } from "qk-lib-v3";
|
|
5
5
|
import E from "wangeditor";
|
|
6
6
|
import axios from "axios";
|
|
@@ -10,53 +10,110 @@ const _export_sfc = (o, r) => {
|
|
|
10
10
|
for (const [t, l] of r)
|
|
11
11
|
e[t] = l;
|
|
12
12
|
return e;
|
|
13
|
-
}, _hoisted_1$q = { class: "filter-
|
|
13
|
+
}, _hoisted_1$q = { class: "filter-actions" }, _hoisted_2$e = { class: "action-buttons" }, _hoisted_3$a = {
|
|
14
|
+
key: 0,
|
|
15
|
+
class: "filter-toggle"
|
|
16
|
+
}, STORAGE_KEY = "qkpc_filter_expanded", _sfc_main$x = {
|
|
14
17
|
__name: "Filter",
|
|
15
18
|
props: {
|
|
16
19
|
labelWidth: { type: String, default: "" }
|
|
17
20
|
},
|
|
18
21
|
emits: ["search", "reset"],
|
|
19
22
|
setup(o, { emit: r }) {
|
|
20
|
-
const e = r, t = () => e("search"), l = () => e("reset"), i = o;
|
|
21
|
-
|
|
22
|
-
|
|
23
|
+
const e = r, t = () => e("search"), l = () => e("reset"), i = o, c = ref(!1), n = ref(!1), a = ref(null);
|
|
24
|
+
let m = null;
|
|
25
|
+
const u = () => {
|
|
26
|
+
try {
|
|
27
|
+
return localStorage.getItem(STORAGE_KEY) === "true";
|
|
28
|
+
} catch {
|
|
29
|
+
return !1;
|
|
30
|
+
}
|
|
31
|
+
}, g = (d) => {
|
|
32
|
+
try {
|
|
33
|
+
localStorage.setItem(STORAGE_KEY, String(d));
|
|
34
|
+
} catch {
|
|
35
|
+
}
|
|
36
|
+
}, y = () => {
|
|
37
|
+
c.value = !c.value, g(c.value);
|
|
38
|
+
}, s = () => {
|
|
39
|
+
const d = a.value;
|
|
40
|
+
if (!d) return;
|
|
41
|
+
const f = d.querySelector(".filter-form");
|
|
42
|
+
if (!f) return;
|
|
43
|
+
const p = f.querySelector(".el-form-item");
|
|
44
|
+
if (!p) return;
|
|
45
|
+
const x = p.offsetHeight * 2;
|
|
46
|
+
n.value = f.scrollHeight > x + 2;
|
|
47
|
+
};
|
|
48
|
+
return onMounted(async () => {
|
|
49
|
+
c.value = u(), await nextTick(), await nextTick(), s();
|
|
50
|
+
const d = a.value?.querySelector(".filter-form");
|
|
51
|
+
d && (m = new ResizeObserver(() => {
|
|
52
|
+
s();
|
|
53
|
+
}), m.observe(d));
|
|
54
|
+
}), onUnmounted(() => {
|
|
55
|
+
m?.disconnect();
|
|
56
|
+
}), (d, f) => (openBlock(), createElementBlock("div", {
|
|
57
|
+
class: normalizeClass(["filter-container", { "is-collapsed": !c.value && n.value }])
|
|
58
|
+
}, [
|
|
59
|
+
createElementVNode("div", {
|
|
60
|
+
class: "filter-body",
|
|
61
|
+
ref_key: "filterBodyRef",
|
|
62
|
+
ref: a
|
|
63
|
+
}, [
|
|
23
64
|
createVNode(unref(ElForm), {
|
|
24
65
|
inline: "",
|
|
25
66
|
"label-width": i.labelWidth,
|
|
26
67
|
class: "filter-form"
|
|
27
68
|
}, {
|
|
28
69
|
default: withCtx(() => [
|
|
29
|
-
renderSlot(
|
|
70
|
+
renderSlot(d.$slots, "FilterItem", {}, void 0, !0)
|
|
30
71
|
]),
|
|
31
72
|
_: 3
|
|
32
73
|
}, 8, ["label-width"])
|
|
33
|
-
]),
|
|
34
|
-
createElementVNode("div",
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
74
|
+
], 512),
|
|
75
|
+
createElementVNode("div", _hoisted_1$q, [
|
|
76
|
+
createElementVNode("div", _hoisted_2$e, [
|
|
77
|
+
createVNode(unref(ElButton), {
|
|
78
|
+
type: "primary",
|
|
79
|
+
icon: unref(Search),
|
|
80
|
+
onClick: t,
|
|
81
|
+
class: "search-btn"
|
|
82
|
+
}, {
|
|
83
|
+
default: withCtx(() => [
|
|
84
|
+
createTextVNode(toDisplayString(unref(L)("查询")), 1)
|
|
85
|
+
]),
|
|
86
|
+
_: 1
|
|
87
|
+
}, 8, ["icon"]),
|
|
88
|
+
createVNode(unref(ElButton), {
|
|
89
|
+
icon: unref(Refresh),
|
|
90
|
+
onClick: l,
|
|
91
|
+
class: "reset-btn"
|
|
92
|
+
}, {
|
|
93
|
+
default: withCtx(() => [
|
|
94
|
+
createTextVNode(toDisplayString(unref(L)("重置")), 1)
|
|
95
|
+
]),
|
|
96
|
+
_: 1
|
|
97
|
+
}, 8, ["icon"])
|
|
98
|
+
]),
|
|
99
|
+
n.value ? (openBlock(), createElementBlock("div", _hoisted_3$a, [
|
|
100
|
+
createVNode(unref(ElButton), {
|
|
101
|
+
type: "primary",
|
|
102
|
+
link: "",
|
|
103
|
+
icon: c.value ? unref(ArrowUp) : unref(ArrowDown),
|
|
104
|
+
onClick: y,
|
|
105
|
+
class: "toggle-btn"
|
|
106
|
+
}, {
|
|
107
|
+
default: withCtx(() => [
|
|
108
|
+
createTextVNode(toDisplayString(c.value ? unref(L)("收起") : unref(L)("展开更多查询条件")), 1)
|
|
109
|
+
]),
|
|
110
|
+
_: 1
|
|
111
|
+
}, 8, ["icon"])
|
|
112
|
+
])) : createCommentVNode("", !0)
|
|
56
113
|
])
|
|
57
|
-
]));
|
|
114
|
+
], 2));
|
|
58
115
|
}
|
|
59
|
-
}, Filter = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["__scopeId", "data-v-
|
|
116
|
+
}, Filter = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["__scopeId", "data-v-dae7a969"]]), _hoisted_1$p = { class: "tool-container" }, _hoisted_2$d = { class: "tool-left" }, _hoisted_3$9 = { class: "tool-right" }, _hoisted_4$7 = {
|
|
60
117
|
key: 0,
|
|
61
118
|
class: "total-info"
|
|
62
119
|
}, _hoisted_5$6 = { class: "total-value" }, _sfc_main$w = {
|
|
@@ -67,13 +124,13 @@ const _export_sfc = (o, r) => {
|
|
|
67
124
|
const e = o, t = r, l = computed({
|
|
68
125
|
get: () => e.total * 1
|
|
69
126
|
}), i = computed({
|
|
70
|
-
set: (
|
|
71
|
-
t("update:pageIndex",
|
|
127
|
+
set: (m) => {
|
|
128
|
+
t("update:pageIndex", m);
|
|
72
129
|
},
|
|
73
130
|
get: () => e.pageIndex
|
|
74
|
-
}),
|
|
75
|
-
set: (
|
|
76
|
-
t("update:pageSize",
|
|
131
|
+
}), c = computed({
|
|
132
|
+
set: (m) => {
|
|
133
|
+
t("update:pageSize", m);
|
|
77
134
|
},
|
|
78
135
|
get: () => e.pageSize
|
|
79
136
|
}), n = () => {
|
|
@@ -81,17 +138,17 @@ const _export_sfc = (o, r) => {
|
|
|
81
138
|
}, a = () => {
|
|
82
139
|
t("updateData");
|
|
83
140
|
};
|
|
84
|
-
return (
|
|
141
|
+
return (m, u) => (openBlock(), createElementBlock("div", _hoisted_1$p, [
|
|
85
142
|
createElementVNode("div", _hoisted_2$d, [
|
|
86
|
-
renderSlot(
|
|
143
|
+
renderSlot(m.$slots, "ToolItem", {}, void 0, !0)
|
|
87
144
|
]),
|
|
88
145
|
createElementVNode("div", _hoisted_3$9, [
|
|
89
146
|
l.value > 0 ? (openBlock(), createElementBlock("div", _hoisted_4$7, [
|
|
90
|
-
|
|
147
|
+
u[2] || (u[2] = createElementVNode("span", { class: "total-label" }, "共", -1)),
|
|
91
148
|
createElementVNode("span", _hoisted_5$6, toDisplayString(l.value), 1),
|
|
92
|
-
|
|
149
|
+
u[3] || (u[3] = createElementVNode("span", { class: "total-label" }, "条", -1))
|
|
93
150
|
])) : createCommentVNode("", !0),
|
|
94
|
-
renderSlot(
|
|
151
|
+
renderSlot(m.$slots, "PageItem", {}, void 0, !0),
|
|
95
152
|
l.value > 0 ? (openBlock(), createBlock(unref(ElPagination), {
|
|
96
153
|
key: 1,
|
|
97
154
|
background: "",
|
|
@@ -100,9 +157,9 @@ const _export_sfc = (o, r) => {
|
|
|
100
157
|
total: l.value,
|
|
101
158
|
"page-sizes": [10, 15, 20, 50, 100, 500, 1e3],
|
|
102
159
|
"current-page": i.value,
|
|
103
|
-
"onUpdate:currentPage":
|
|
104
|
-
"page-size":
|
|
105
|
-
"onUpdate:pageSize":
|
|
160
|
+
"onUpdate:currentPage": u[0] || (u[0] = (g) => i.value = g),
|
|
161
|
+
"page-size": c.value,
|
|
162
|
+
"onUpdate:pageSize": u[1] || (u[1] = (g) => c.value = g),
|
|
106
163
|
onCurrentChange: n,
|
|
107
164
|
onSizeChange: a,
|
|
108
165
|
class: "custom-pagination"
|
|
@@ -127,27 +184,27 @@ const _export_sfc = (o, r) => {
|
|
|
127
184
|
columnItemArray: [],
|
|
128
185
|
filterList: []
|
|
129
186
|
}), t = r, l = o, i = () => {
|
|
130
|
-
let
|
|
187
|
+
let u = [];
|
|
131
188
|
return l.srcTabData.forEach((g) => {
|
|
132
189
|
let y = g[l.columnInfo.dataKey];
|
|
133
|
-
y != null && !
|
|
134
|
-
}),
|
|
190
|
+
y != null && !u.Exists((s) => s == y) && u.push(y);
|
|
191
|
+
}), u;
|
|
135
192
|
};
|
|
136
|
-
watch(() => e.isVisible, (
|
|
137
|
-
|
|
138
|
-
}), watch(() => l.currentFilterList, (
|
|
139
|
-
e.isVisible || (e.filterList = Array.isArray(
|
|
193
|
+
watch(() => e.isVisible, (u) => {
|
|
194
|
+
u && (e.columnItemArray = i(), e.showColumnItemArray = e.columnItemArray, e.filterText = "", e.filterList = [...l.currentFilterList]);
|
|
195
|
+
}), watch(() => l.currentFilterList, (u) => {
|
|
196
|
+
e.isVisible || (e.filterList = Array.isArray(u) ? [...u] : []);
|
|
140
197
|
}, { immediate: !0 });
|
|
141
|
-
const
|
|
198
|
+
const c = (u) => {
|
|
142
199
|
e.filterText ? e.showColumnItemArray = e.columnItemArray.Where((g) => String(g).indexOf(e.filterText) >= 0) : e.showColumnItemArray = e.columnItemArray;
|
|
143
|
-
}, n = (
|
|
144
|
-
|
|
200
|
+
}, n = (u) => {
|
|
201
|
+
u && (e.filterList = []), t("change", l.columnInfo, [...e.filterList]), e.isVisible = !1;
|
|
145
202
|
}, a = async () => {
|
|
146
|
-
e.filterList = e.showColumnItemArray.Where((
|
|
147
|
-
},
|
|
203
|
+
e.filterList = e.showColumnItemArray.Where((u) => !e.filterList.Exists((g) => g == u)).Select((u) => u);
|
|
204
|
+
}, m = () => {
|
|
148
205
|
e.filterList = [...e.showColumnItemArray];
|
|
149
206
|
};
|
|
150
|
-
return (
|
|
207
|
+
return (u, g) => (openBlock(), createElementBlock("div", null, [
|
|
151
208
|
createElementVNode("span", null, toDisplayString(unref(L)(o.columnInfo.title)), 1),
|
|
152
209
|
o.columnInfo.isFilter ? (openBlock(), createBlock(unref(ElPopover), {
|
|
153
210
|
trigger: "click",
|
|
@@ -184,7 +241,7 @@ const _export_sfc = (o, r) => {
|
|
|
184
241
|
createVNode(unref(ElInput), {
|
|
185
242
|
modelValue: e.filterText,
|
|
186
243
|
"onUpdate:modelValue": g[0] || (g[0] = (y) => e.filterText = y),
|
|
187
|
-
onInput:
|
|
244
|
+
onInput: c
|
|
188
245
|
}, null, 8, ["modelValue"]),
|
|
189
246
|
createVNode(unref(ElCheckboxGroup), {
|
|
190
247
|
modelValue: e.filterList,
|
|
@@ -237,7 +294,7 @@ const _export_sfc = (o, r) => {
|
|
|
237
294
|
key: 1,
|
|
238
295
|
size: "small",
|
|
239
296
|
type: "primary",
|
|
240
|
-
onClick:
|
|
297
|
+
onClick: m
|
|
241
298
|
}, {
|
|
242
299
|
default: withCtx(() => [
|
|
243
300
|
createTextVNode(toDisplayString(unref(L)("全选")), 1)
|
|
@@ -267,11 +324,11 @@ const _export_sfc = (o, r) => {
|
|
|
267
324
|
setup(o, { emit: r }) {
|
|
268
325
|
const e = o, t = r, l = computed({
|
|
269
326
|
get: () => e.modelValue,
|
|
270
|
-
set: (
|
|
271
|
-
}), i = (
|
|
272
|
-
t("before-close",
|
|
327
|
+
set: (c) => t("update:modelValue", c)
|
|
328
|
+
}), i = (c) => {
|
|
329
|
+
t("before-close", c), t("update:modelValue", !1);
|
|
273
330
|
};
|
|
274
|
-
return (
|
|
331
|
+
return (c, n) => (openBlock(), createBlock(unref(ElDialog), {
|
|
275
332
|
title: e.title,
|
|
276
333
|
modelValue: l.value,
|
|
277
334
|
"onUpdate:modelValue": n[0] || (n[0] = (a) => l.value = a),
|
|
@@ -291,7 +348,7 @@ const _export_sfc = (o, r) => {
|
|
|
291
348
|
key: 0,
|
|
292
349
|
style: normalizeStyle("height:" + e.height + ";overflow: auto;")
|
|
293
350
|
}, [
|
|
294
|
-
renderSlot(
|
|
351
|
+
renderSlot(c.$slots, "default", {}, () => [
|
|
295
352
|
createElementVNode("iframe", {
|
|
296
353
|
ref: "myiframe",
|
|
297
354
|
src: e.url,
|
|
@@ -331,14 +388,14 @@ const _export_sfc = (o, r) => {
|
|
|
331
388
|
const r = o, e = reactive({
|
|
332
389
|
isShowPic: !1,
|
|
333
390
|
picUrl: ""
|
|
334
|
-
}), t = computed(() => r.row[r.columnInfo.dataKey]), l = computed(() => r.columnInfo.Type), i = computed(() => r.columnInfo.OnClick || r.columnInfo.onClick),
|
|
391
|
+
}), t = computed(() => r.row[r.columnInfo.dataKey]), l = computed(() => r.columnInfo.Type), i = computed(() => r.columnInfo.OnClick || r.columnInfo.onClick), c = computed(() => r.columnInfo.color || r.columnInfo.Color), n = computed(() => typeof r.columnInfo.cellRenderer == "function"), a = () => {
|
|
335
392
|
e.isShowPic = !0, e.picUrl = t.value;
|
|
336
|
-
},
|
|
393
|
+
}, m = () => {
|
|
337
394
|
typeof i.value == "function" && i.value(r.row);
|
|
338
|
-
},
|
|
395
|
+
}, u = (s) => {
|
|
339
396
|
try {
|
|
340
|
-
let
|
|
341
|
-
return
|
|
397
|
+
let d = /* @__PURE__ */ new Date(), f = s.ToDateTime();
|
|
398
|
+
return d > f ? "red" : (d = d.AddDays(30), d > f ? "#f6d00c" : "inherit");
|
|
342
399
|
} catch {
|
|
343
400
|
}
|
|
344
401
|
}, g = computed(() => {
|
|
@@ -348,11 +405,11 @@ const _export_sfc = (o, r) => {
|
|
|
348
405
|
};
|
|
349
406
|
if (r.columnInfo.FnGetStyle && typeof r.columnInfo.FnGetStyle == "function")
|
|
350
407
|
try {
|
|
351
|
-
const
|
|
352
|
-
if (
|
|
353
|
-
return { ...s, ...
|
|
354
|
-
} catch (
|
|
355
|
-
console.warn("FnGetStyle 执行出错:",
|
|
408
|
+
const d = r.columnInfo.FnGetStyle(r.row, r.columnInfo, t.value);
|
|
409
|
+
if (d && typeof d == "object")
|
|
410
|
+
return { ...s, ...d };
|
|
411
|
+
} catch (d) {
|
|
412
|
+
console.warn("FnGetStyle 执行出错:", d);
|
|
356
413
|
}
|
|
357
414
|
return s;
|
|
358
415
|
}), y = {
|
|
@@ -361,12 +418,12 @@ const _export_sfc = (o, r) => {
|
|
|
361
418
|
},
|
|
362
419
|
setup(s) {
|
|
363
420
|
return () => {
|
|
364
|
-
const
|
|
365
|
-
return
|
|
421
|
+
const d = s.renderFn;
|
|
422
|
+
return d ? d() : null;
|
|
366
423
|
};
|
|
367
424
|
}
|
|
368
425
|
};
|
|
369
|
-
return (s,
|
|
426
|
+
return (s, d) => (openBlock(), createElementBlock("div", {
|
|
370
427
|
style: normalizeStyle(g.value)
|
|
371
428
|
}, [
|
|
372
429
|
n.value ? (openBlock(), createBlock(y, {
|
|
@@ -379,7 +436,7 @@ const _export_sfc = (o, r) => {
|
|
|
379
436
|
type: "primary",
|
|
380
437
|
onClick: a
|
|
381
438
|
}, {
|
|
382
|
-
default: withCtx(() => [...
|
|
439
|
+
default: withCtx(() => [...d[1] || (d[1] = [
|
|
383
440
|
createTextVNode("查看", -1)
|
|
384
441
|
])]),
|
|
385
442
|
_: 1
|
|
@@ -391,26 +448,26 @@ const _export_sfc = (o, r) => {
|
|
|
391
448
|
style: normalizeStyle("width: 100%;height: 100%;background-color:" + t.value)
|
|
392
449
|
}, " ", 4)) : l.value == "DATE" ? (openBlock(), createElementBlock("span", {
|
|
393
450
|
key: 3,
|
|
394
|
-
style: normalizeStyle("color:" +
|
|
451
|
+
style: normalizeStyle("color:" + u(t.value))
|
|
395
452
|
}, toDisplayString(t.value), 5)) : (openBlock(), createElementBlock("span", _hoisted_3$8, toDisplayString(t.value), 1))
|
|
396
453
|
], 64)) : i.value ? (openBlock(), createBlock(unref(ElLink), {
|
|
397
454
|
key: 2,
|
|
398
455
|
type: "success",
|
|
399
|
-
onClick:
|
|
456
|
+
onClick: m
|
|
400
457
|
}, {
|
|
401
458
|
default: withCtx(() => [
|
|
402
459
|
createTextVNode(toDisplayString(t.value), 1)
|
|
403
460
|
]),
|
|
404
461
|
_: 1
|
|
405
462
|
})) : (openBlock(), createElementBlock(Fragment, { key: 3 }, [
|
|
406
|
-
|
|
463
|
+
c.value ? (openBlock(), createElementBlock("span", {
|
|
407
464
|
key: 1,
|
|
408
|
-
style: normalizeStyle("color:" +
|
|
465
|
+
style: normalizeStyle("color:" + c.value)
|
|
409
466
|
}, toDisplayString(t.value), 5)) : (openBlock(), createElementBlock("span", _hoisted_4$6, toDisplayString(t.value), 1))
|
|
410
467
|
], 64)),
|
|
411
468
|
createVNode(byDialog, {
|
|
412
469
|
modelValue: e.isShowPic,
|
|
413
|
-
"onUpdate:modelValue":
|
|
470
|
+
"onUpdate:modelValue": d[0] || (d[0] = (f) => e.isShowPic = f),
|
|
414
471
|
url: e.picUrl,
|
|
415
472
|
height: "auto",
|
|
416
473
|
width: "800px",
|
|
@@ -454,93 +511,93 @@ const _export_sfc = (o, r) => {
|
|
|
454
511
|
title: r.title
|
|
455
512
|
})), getSummaryValues = ({ columns: o, data: r, columnArray: e, translate: t }) => {
|
|
456
513
|
const l = /^[+-]?([0-9]+[.][0-9]*|[.][0-9]+)$/, i = [];
|
|
457
|
-
return o.forEach((
|
|
514
|
+
return o.forEach((c, n) => {
|
|
458
515
|
if (n === 0) {
|
|
459
516
|
i[n] = t("合计");
|
|
460
517
|
return;
|
|
461
518
|
}
|
|
462
|
-
const a = e.find((
|
|
519
|
+
const a = e.find((u) => u.dataKey == c.property && u.isSummary);
|
|
463
520
|
if (!a) {
|
|
464
521
|
i[n] = "";
|
|
465
522
|
return;
|
|
466
523
|
}
|
|
467
524
|
i[n] = 0;
|
|
468
|
-
let
|
|
469
|
-
r.forEach((
|
|
470
|
-
if (!
|
|
471
|
-
const g =
|
|
472
|
-
!
|
|
525
|
+
let m = !1;
|
|
526
|
+
r.forEach((u) => {
|
|
527
|
+
if (!u.src.IgnoreSummary) {
|
|
528
|
+
const g = u[a.dataKey];
|
|
529
|
+
!m && l.test(g) && (m = !0);
|
|
473
530
|
const y = Number(g);
|
|
474
531
|
Number.isNaN(y) || (i[n] += y);
|
|
475
532
|
}
|
|
476
|
-
}),
|
|
533
|
+
}), m && (i[n] = i[n].toFixed(2));
|
|
477
534
|
}), i;
|
|
478
535
|
}, buildOutputData = ({ rows: o, columnArray: r, action: e, summaryValues: t }) => {
|
|
479
536
|
const l = o.map((i) => {
|
|
480
|
-
const
|
|
537
|
+
const c = {};
|
|
481
538
|
for (const n in i) {
|
|
482
539
|
if (n == "src") {
|
|
483
|
-
e == "打印" && (
|
|
540
|
+
e == "打印" && (c[n] = i.src);
|
|
484
541
|
continue;
|
|
485
542
|
}
|
|
486
|
-
const a = r.find((
|
|
487
|
-
a && (
|
|
543
|
+
const a = r.find((m) => m.dataKey == n);
|
|
544
|
+
a && (c[a.title] = i[n]);
|
|
488
545
|
}
|
|
489
|
-
return
|
|
546
|
+
return c;
|
|
490
547
|
});
|
|
491
548
|
if (t.some((i) => i > 0)) {
|
|
492
549
|
const i = {};
|
|
493
|
-
r.forEach((
|
|
494
|
-
i[
|
|
550
|
+
r.forEach((c, n) => {
|
|
551
|
+
i[c.title] = t[n];
|
|
495
552
|
}), l.push(i);
|
|
496
553
|
}
|
|
497
554
|
return l;
|
|
498
555
|
}, exportTableData = ({ dataArray: o, columnArray: r, printOption: e, tabName: t, translate: l, XLSX: i }) => {
|
|
499
|
-
let
|
|
556
|
+
let c = 0;
|
|
500
557
|
const n = o.length, a = [];
|
|
501
558
|
for (const s in o[0])
|
|
502
|
-
|
|
503
|
-
const
|
|
559
|
+
c++, a.push(s);
|
|
560
|
+
const m = [];
|
|
504
561
|
e.TitleArray.forEach((s) => {
|
|
505
|
-
|
|
506
|
-
}),
|
|
562
|
+
m.push([s]);
|
|
563
|
+
}), m.push(a);
|
|
507
564
|
for (let s = 0; s < o.length; s++)
|
|
508
|
-
|
|
565
|
+
m.push(a.map((d) => o[s][d]));
|
|
509
566
|
e.FootArray.forEach((s) => {
|
|
510
|
-
|
|
567
|
+
m.push([s]);
|
|
511
568
|
});
|
|
512
|
-
const
|
|
569
|
+
const u = i.utils.aoa_to_sheet(m, { header: a }), g = [];
|
|
513
570
|
for (let s = 0; s < e.TitleArray.length; s++)
|
|
514
|
-
g.push({ s: { r: s, c: 0 }, e: { r: s, c:
|
|
571
|
+
g.push({ s: { r: s, c: 0 }, e: { r: s, c: c - 1 } });
|
|
515
572
|
for (let s = 0; s < e.FootArray.length; s++) {
|
|
516
|
-
const
|
|
517
|
-
g.push({ s: { r:
|
|
573
|
+
const d = n + s + e.TitleArray.length + 1;
|
|
574
|
+
g.push({ s: { r: d, c: 0 }, e: { r: d, c: c - 1 } });
|
|
518
575
|
}
|
|
519
|
-
for (let s = 0; s <
|
|
520
|
-
const
|
|
576
|
+
for (let s = 0; s < c; s++) {
|
|
577
|
+
const d = a[s], f = r.find((x) => x.title == d);
|
|
521
578
|
if (!f || !f.isHeBing) continue;
|
|
522
|
-
let p,
|
|
523
|
-
for (let x = 0; x <
|
|
524
|
-
if (
|
|
525
|
-
const S =
|
|
526
|
-
S == p ? N = x : (
|
|
579
|
+
let p, C = 0, N = 0;
|
|
580
|
+
for (let x = 0; x < m.length; x++) {
|
|
581
|
+
if (m[x].length < s) continue;
|
|
582
|
+
const S = m[x][s];
|
|
583
|
+
S == p ? N = x : (C != N && g.push({ s: { r: C, c: s }, e: { r: N, c: s } }), C = x, N = x, p = S);
|
|
527
584
|
}
|
|
528
585
|
}
|
|
529
|
-
|
|
530
|
-
s.indexOf("!") < 0 && (
|
|
586
|
+
u["!merges"] || (u["!merges"] = []), u["!merges"] = u["!merges"].concat(g), Object.keys(u).forEach((s) => {
|
|
587
|
+
s.indexOf("!") < 0 && (u[s].s = {
|
|
531
588
|
alignment: {
|
|
532
589
|
horizontal: "center",
|
|
533
590
|
vertical: "center"
|
|
534
591
|
}
|
|
535
|
-
}, s.indexOf("1") !== -1 && (
|
|
592
|
+
}, s.indexOf("1") !== -1 && (u[s].s.font = {
|
|
536
593
|
bold: !0,
|
|
537
594
|
sz: 16
|
|
538
|
-
}), s.indexOf("2") !== -1 && (
|
|
595
|
+
}), s.indexOf("2") !== -1 && (u[s].s.font = {
|
|
539
596
|
sz: 14
|
|
540
597
|
}));
|
|
541
598
|
});
|
|
542
599
|
const y = i.utils.book_new();
|
|
543
|
-
i.utils.book_append_sheet(y,
|
|
600
|
+
i.utils.book_append_sheet(y, u, "sheet1"), i.writeFile(y, t + l("导出") + ".xlsx");
|
|
544
601
|
};
|
|
545
602
|
let xlsxModulePromise;
|
|
546
603
|
const loadXLSX = async () => (xlsxModulePromise || (xlsxModulePromise = import("./xlsx-8yrQtcId.mjs")), xlsxModulePromise), _hoisted_1$k = { style: { display: "flex" } }, _sfc_main$r = {
|
|
@@ -553,10 +610,10 @@ const loadXLSX = async () => (xlsxModulePromise || (xlsxModulePromise = import("
|
|
|
553
610
|
},
|
|
554
611
|
emits: ["change-column-filter"],
|
|
555
612
|
setup(o, { emit: r }) {
|
|
556
|
-
const e = r, t = o, l = computed(() => groupColumnArray(t.columnArray)), i = (
|
|
557
|
-
e("change-column-filter",
|
|
613
|
+
const e = r, t = o, l = computed(() => groupColumnArray(t.columnArray)), i = (c, n) => {
|
|
614
|
+
e("change-column-filter", c, n);
|
|
558
615
|
};
|
|
559
|
-
return (
|
|
616
|
+
return (c, n) => (openBlock(!0), createElementBlock(Fragment, null, renderList(l.value, (a) => (openBlock(), createElementBlock(Fragment, null, [
|
|
560
617
|
a.length > 1 ? (openBlock(), createBlock(unref(ElTableColumn), {
|
|
561
618
|
key: 0,
|
|
562
619
|
label: a[0].groupName,
|
|
@@ -564,38 +621,38 @@ const loadXLSX = async () => (xlsxModulePromise || (xlsxModulePromise = import("
|
|
|
564
621
|
fixed: a[0].fixed,
|
|
565
622
|
"show-overflow-tooltip": ""
|
|
566
623
|
}, {
|
|
567
|
-
default: withCtx(({ row:
|
|
568
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(a, (
|
|
569
|
-
createTextVNode(toDisplayString(
|
|
624
|
+
default: withCtx(({ row: m }) => [
|
|
625
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(a, (u) => (openBlock(), createElementBlock("div", _hoisted_1$k, [
|
|
626
|
+
createTextVNode(toDisplayString(u.title) + ": ", 1),
|
|
570
627
|
createVNode(DataColumnValue, {
|
|
571
|
-
columnInfo:
|
|
572
|
-
row:
|
|
628
|
+
columnInfo: u,
|
|
629
|
+
row: m,
|
|
573
630
|
style: { color: "cornflowerblue" }
|
|
574
631
|
}, null, 8, ["columnInfo", "row"])
|
|
575
632
|
]))), 256))
|
|
576
633
|
]),
|
|
577
634
|
_: 2
|
|
578
|
-
}, 1032, ["label", "min-width", "fixed"])) : (openBlock(!0), createElementBlock(Fragment, { key: 1 }, renderList(a, (
|
|
579
|
-
prop:
|
|
580
|
-
label: unref(L)(
|
|
581
|
-
"min-width":
|
|
582
|
-
fixed:
|
|
635
|
+
}, 1032, ["label", "min-width", "fixed"])) : (openBlock(!0), createElementBlock(Fragment, { key: 1 }, renderList(a, (m) => (openBlock(), createBlock(unref(ElTableColumn), {
|
|
636
|
+
prop: m.dataKey,
|
|
637
|
+
label: unref(L)(m.title),
|
|
638
|
+
"min-width": m.width,
|
|
639
|
+
fixed: m.fixed,
|
|
583
640
|
"show-overflow-tooltip": "",
|
|
584
641
|
align: "center"
|
|
585
642
|
}, {
|
|
586
643
|
header: withCtx(() => [
|
|
587
644
|
createVNode(DataColumnTitle, {
|
|
588
|
-
columnInfo:
|
|
645
|
+
columnInfo: m,
|
|
589
646
|
tabData: t.tabData,
|
|
590
647
|
srcTabData: t.srcTabData,
|
|
591
|
-
currentFilterList: t.columnFilterArray[
|
|
648
|
+
currentFilterList: t.columnFilterArray[m.dataKey] || [],
|
|
592
649
|
onChange: i
|
|
593
650
|
}, null, 8, ["columnInfo", "tabData", "srcTabData", "currentFilterList"])
|
|
594
651
|
]),
|
|
595
|
-
default: withCtx(({ row:
|
|
652
|
+
default: withCtx(({ row: u }) => [
|
|
596
653
|
createVNode(DataColumnValue, {
|
|
597
|
-
columnInfo:
|
|
598
|
-
row:
|
|
654
|
+
columnInfo: m,
|
|
655
|
+
row: u
|
|
599
656
|
}, null, 8, ["columnInfo", "row"])
|
|
600
657
|
]),
|
|
601
658
|
_: 2
|
|
@@ -614,14 +671,14 @@ const loadXLSX = async () => (xlsxModulePromise || (xlsxModulePromise = import("
|
|
|
614
671
|
const e = r, t = o, l = computed(() => typeof t.commandInfo == "string" ? t.commandInfo == "删除" ? "danger" : "primary" : t.commandInfo.Name == "删除" ? "danger" : "primary"), i = computed(() => {
|
|
615
672
|
let n = t.commandInfo.IsDisabled || t.commandInfo.isDisabled;
|
|
616
673
|
return n || (() => !1);
|
|
617
|
-
}),
|
|
674
|
+
}), c = (n) => {
|
|
618
675
|
e("click", n, t.row);
|
|
619
676
|
};
|
|
620
677
|
return (n, a) => typeof o.commandInfo == "string" ? (openBlock(), createBlock(unref(ElLink), {
|
|
621
678
|
key: 0,
|
|
622
679
|
style: { "margin-right": "5px" },
|
|
623
680
|
type: l.value,
|
|
624
|
-
onClick: a[0] || (a[0] = (
|
|
681
|
+
onClick: a[0] || (a[0] = (m) => c(o.commandInfo))
|
|
625
682
|
}, {
|
|
626
683
|
default: withCtx(() => [
|
|
627
684
|
createTextVNode(toDisplayString(unref(L)(o.commandInfo)), 1)
|
|
@@ -631,7 +688,7 @@ const loadXLSX = async () => (xlsxModulePromise || (xlsxModulePromise = import("
|
|
|
631
688
|
key: 1,
|
|
632
689
|
style: { "margin-right": "5px" },
|
|
633
690
|
type: l.value,
|
|
634
|
-
onClick: a[1] || (a[1] = (
|
|
691
|
+
onClick: a[1] || (a[1] = (m) => c(o.commandInfo.Name)),
|
|
635
692
|
disabled: i.value(o.row)
|
|
636
693
|
}, {
|
|
637
694
|
default: withCtx(() => [
|
|
@@ -653,12 +710,12 @@ const loadXLSX = async () => (xlsxModulePromise || (xlsxModulePromise = import("
|
|
|
653
710
|
},
|
|
654
711
|
emits: ["command"],
|
|
655
712
|
setup(o, { emit: r }) {
|
|
656
|
-
const e = r, t = o, l = (
|
|
657
|
-
let a = t.commandArray.Where((
|
|
658
|
-
let
|
|
659
|
-
typeof
|
|
660
|
-
let g =
|
|
661
|
-
return !(g && !g(
|
|
713
|
+
const e = r, t = o, l = (c, n) => {
|
|
714
|
+
let a = t.commandArray.Where((m) => {
|
|
715
|
+
let u = "";
|
|
716
|
+
typeof m == "string" ? u = m : u = m.Name;
|
|
717
|
+
let g = m.IsShow ?? m.isShow;
|
|
718
|
+
return !(g && !g(c, t.powerArray) || (m.CheckPower ?? m.checkPower) && !t.powerArray.Exists((s) => s.Name == u));
|
|
662
719
|
});
|
|
663
720
|
switch (n) {
|
|
664
721
|
case 1:
|
|
@@ -669,16 +726,16 @@ const loadXLSX = async () => (xlsxModulePromise || (xlsxModulePromise = import("
|
|
|
669
726
|
return a.Take(a.length, a.length - t.maxCommand + 1);
|
|
670
727
|
}
|
|
671
728
|
return a.Take(topCount, takeCount);
|
|
672
|
-
}, i = (
|
|
673
|
-
let a = t.commandArray.FirstOrDefault((
|
|
729
|
+
}, i = (c, n) => {
|
|
730
|
+
let a = t.commandArray.FirstOrDefault((m) => typeof m == "object" && m.Name == c);
|
|
674
731
|
if (a != null) {
|
|
675
|
-
let
|
|
676
|
-
if (
|
|
677
|
-
return
|
|
732
|
+
let m = a.OnClick || a.onClick;
|
|
733
|
+
if (m)
|
|
734
|
+
return m(n);
|
|
678
735
|
}
|
|
679
|
-
e("command",
|
|
736
|
+
e("command", c, n);
|
|
680
737
|
};
|
|
681
|
-
return (
|
|
738
|
+
return (c, n) => (openBlock(), createElementBlock("div", null, [
|
|
682
739
|
l(o.row, 1).length > t.maxCommand ? (openBlock(), createElementBlock("div", _hoisted_1$j, [
|
|
683
740
|
createVNode(unref(ElDropdown), {
|
|
684
741
|
onCommand: n[0] || (n[0] = (a) => i(a, o.row)),
|
|
@@ -687,7 +744,7 @@ const loadXLSX = async () => (xlsxModulePromise || (xlsxModulePromise = import("
|
|
|
687
744
|
dropdown: withCtx(() => [
|
|
688
745
|
createVNode(unref(ElDropdownMenu), null, {
|
|
689
746
|
default: withCtx(() => [
|
|
690
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(l(o.row, 2), (a,
|
|
747
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(l(o.row, 2), (a, m) => (openBlock(), createElementBlock(Fragment, null, [
|
|
691
748
|
typeof a == "string" ? (openBlock(), createBlock(unref(ElDropdownItem), {
|
|
692
749
|
key: 0,
|
|
693
750
|
command: a
|
|
@@ -744,7 +801,7 @@ const loadXLSX = async () => (xlsxModulePromise || (xlsxModulePromise = import("
|
|
|
744
801
|
transformData: l,
|
|
745
802
|
afterUpdate: i
|
|
746
803
|
}) => {
|
|
747
|
-
const
|
|
804
|
+
const c = ref([]), n = reactive({
|
|
748
805
|
IsVisible: !1,
|
|
749
806
|
srcDataArray: [],
|
|
750
807
|
dataArray: [],
|
|
@@ -752,8 +809,8 @@ const loadXLSX = async () => (xlsxModulePromise || (xlsxModulePromise = import("
|
|
|
752
809
|
PicUrl: "",
|
|
753
810
|
columnFilterArray: {}
|
|
754
811
|
}), a = computed(() => o.columnArray);
|
|
755
|
-
let
|
|
756
|
-
const
|
|
812
|
+
let m = null;
|
|
813
|
+
const u = ({ columns: N, data: x }) => getSummaryValues({
|
|
757
814
|
columns: N,
|
|
758
815
|
data: x,
|
|
759
816
|
columnArray: a.value,
|
|
@@ -768,8 +825,8 @@ const loadXLSX = async () => (xlsxModulePromise || (xlsxModulePromise = import("
|
|
|
768
825
|
cancelButtonText: r("取消"),
|
|
769
826
|
confirmButtonText: r("确定")
|
|
770
827
|
}
|
|
771
|
-
), B =
|
|
772
|
-
const D =
|
|
828
|
+
), B = c.value)), B = o.fnGetSelectData(B, N);
|
|
829
|
+
const D = u({
|
|
773
830
|
columns: buildSummaryColumns(a.value),
|
|
774
831
|
data: B
|
|
775
832
|
});
|
|
@@ -803,7 +860,7 @@ const loadXLSX = async () => (xlsxModulePromise || (xlsxModulePromise = import("
|
|
|
803
860
|
}
|
|
804
861
|
}, s = (N, x) => {
|
|
805
862
|
n.columnFilterArray[N.dataKey] = x, p();
|
|
806
|
-
},
|
|
863
|
+
}, d = async (N) => {
|
|
807
864
|
try {
|
|
808
865
|
const x = N || o.data;
|
|
809
866
|
return await l(x, a.value, (S, B) => getColumnValue(S, B, r));
|
|
@@ -812,15 +869,15 @@ const loadXLSX = async () => (xlsxModulePromise || (xlsxModulePromise = import("
|
|
|
812
869
|
}
|
|
813
870
|
}, f = async () => {
|
|
814
871
|
try {
|
|
815
|
-
n.srcDataArray = await
|
|
872
|
+
n.srcDataArray = await d(), c.value = filterTableData(n.srcDataArray, a.value, n.columnFilterArray), i?.(c.value);
|
|
816
873
|
} catch {
|
|
817
874
|
e({ message: r("数据更新失败"), type: "error" });
|
|
818
875
|
}
|
|
819
876
|
}, p = () => {
|
|
820
|
-
|
|
877
|
+
m && clearTimeout(m), m = setTimeout(() => {
|
|
821
878
|
f();
|
|
822
879
|
}, 100);
|
|
823
|
-
},
|
|
880
|
+
}, C = async (N) => {
|
|
824
881
|
try {
|
|
825
882
|
n.dataArray = await g("打印", N), n.IsVisible = !0;
|
|
826
883
|
} catch {
|
|
@@ -830,23 +887,23 @@ const loadXLSX = async () => (xlsxModulePromise || (xlsxModulePromise = import("
|
|
|
830
887
|
return onMounted(() => {
|
|
831
888
|
f();
|
|
832
889
|
}), onUnmounted(() => {
|
|
833
|
-
|
|
890
|
+
m && clearTimeout(m);
|
|
834
891
|
}), watch(
|
|
835
892
|
() => o.data,
|
|
836
893
|
() => {
|
|
837
894
|
p();
|
|
838
895
|
}
|
|
839
896
|
), {
|
|
840
|
-
tabData:
|
|
897
|
+
tabData: c,
|
|
841
898
|
pageData: n,
|
|
842
899
|
columnArray: a,
|
|
843
|
-
onSummaryMethod:
|
|
900
|
+
onSummaryMethod: u,
|
|
844
901
|
getSelectData: g,
|
|
845
902
|
exportData: y,
|
|
846
903
|
onChangeColumnFilter: s,
|
|
847
|
-
onHandDataValue:
|
|
904
|
+
onHandDataValue: d,
|
|
848
905
|
onUpdateData: f,
|
|
849
|
-
printData:
|
|
906
|
+
printData: C
|
|
850
907
|
};
|
|
851
908
|
}, _hoisted_1$i = { style: { height: "100%", width: "100%" } }, _sfc_main$o = {
|
|
852
909
|
__name: "index",
|
|
@@ -874,17 +931,17 @@ const loadXLSX = async () => (xlsxModulePromise || (xlsxModulePromise = import("
|
|
|
874
931
|
},
|
|
875
932
|
emits: ["command", "select"],
|
|
876
933
|
setup(o, { expose: r, emit: e }) {
|
|
877
|
-
const t = defineAsyncComponent(() => Promise.resolve().then(() => byPrintArray)), l = ref(null), i = e,
|
|
878
|
-
i("command",
|
|
879
|
-
}, a = o,
|
|
880
|
-
l.value?.toggleRowSelection && s.value.forEach((
|
|
881
|
-
l.value.toggleRowSelection(
|
|
934
|
+
const t = defineAsyncComponent(() => Promise.resolve().then(() => byPrintArray)), l = ref(null), i = e, c = ref(/* @__PURE__ */ new Set()), n = (v, k) => {
|
|
935
|
+
i("command", v, k);
|
|
936
|
+
}, a = o, m = /* @__PURE__ */ new Map(), u = (v) => c.value.has(v.src), g = () => {
|
|
937
|
+
l.value?.toggleRowSelection && s.value.forEach((v) => {
|
|
938
|
+
l.value.toggleRowSelection(v, u(v));
|
|
882
939
|
});
|
|
883
|
-
}, y = async (
|
|
940
|
+
}, y = async (v, k, T) => {
|
|
884
941
|
const P = [];
|
|
885
|
-
for (let M = 0; M <
|
|
886
|
-
const F = Math.min(M + 50,
|
|
887
|
-
const U = {}, q =
|
|
942
|
+
for (let M = 0; M < v.length; M += 50) {
|
|
943
|
+
const F = Math.min(M + 50, v.length), z = v.slice(M, F).map(async (W) => {
|
|
944
|
+
const U = {}, q = k.map(async (K) => {
|
|
888
945
|
const j = await T(W, K);
|
|
889
946
|
return { key: K.dataKey, value: j };
|
|
890
947
|
});
|
|
@@ -897,10 +954,10 @@ const loadXLSX = async () => (xlsxModulePromise || (xlsxModulePromise = import("
|
|
|
897
954
|
return P;
|
|
898
955
|
}, {
|
|
899
956
|
tabData: s,
|
|
900
|
-
pageData:
|
|
957
|
+
pageData: d,
|
|
901
958
|
columnArray: f,
|
|
902
959
|
onSummaryMethod: p,
|
|
903
|
-
getSelectData:
|
|
960
|
+
getSelectData: C,
|
|
904
961
|
exportData: N,
|
|
905
962
|
onChangeColumnFilter: x,
|
|
906
963
|
onHandDataValue: S,
|
|
@@ -913,19 +970,19 @@ const loadXLSX = async () => (xlsxModulePromise || (xlsxModulePromise = import("
|
|
|
913
970
|
confirm: ElMessageBox.confirm,
|
|
914
971
|
transformData: y,
|
|
915
972
|
afterUpdate: () => {
|
|
916
|
-
|
|
973
|
+
m.clear(), g();
|
|
917
974
|
}
|
|
918
|
-
}), O = ({ row:
|
|
919
|
-
if (
|
|
920
|
-
let A =
|
|
975
|
+
}), O = ({ row: v, column: k, columnIndex: T, rowIndex: P }) => {
|
|
976
|
+
if (k.property == null) return { rowspan: 1, colspan: 1 };
|
|
977
|
+
let A = k.property, M = f.value.FirstOrDefault((U) => U.dataKey == A);
|
|
921
978
|
if (M == null || !M.isHeBing) return { rowspan: 1, colspan: 1 };
|
|
922
979
|
const F = `${P}-${A}`;
|
|
923
|
-
if (
|
|
924
|
-
return
|
|
925
|
-
let G =
|
|
980
|
+
if (m.has(F))
|
|
981
|
+
return m.get(F);
|
|
982
|
+
let G = v[A];
|
|
926
983
|
if (P > 0 && G == s.value[P - 1][A]) {
|
|
927
984
|
const U = { rowspan: 0, colspan: 0 };
|
|
928
|
-
return
|
|
985
|
+
return m.set(F, U), U;
|
|
929
986
|
}
|
|
930
987
|
let z = 1;
|
|
931
988
|
const H = Math.min(1e4, s.value.length - P);
|
|
@@ -935,11 +992,11 @@ const loadXLSX = async () => (xlsxModulePromise || (xlsxModulePromise = import("
|
|
|
935
992
|
rowspan: z,
|
|
936
993
|
colspan: 1
|
|
937
994
|
};
|
|
938
|
-
return
|
|
939
|
-
}, b = () => s.value.filter((
|
|
940
|
-
get: () => f.value.some((
|
|
941
|
-
}), V = () => B(),
|
|
942
|
-
|
|
995
|
+
return m.set(F, W), W;
|
|
996
|
+
}, b = () => s.value.filter((v) => u(v)), R = (v, k) => C(v, b, k), I = (v) => N(b, v), w = computed({
|
|
997
|
+
get: () => f.value.some((v) => v.isSummary)
|
|
998
|
+
}), V = () => B(), _ = (v) => {
|
|
999
|
+
c.value = new Set(v.map((k) => k.src)), i("select", v);
|
|
943
1000
|
};
|
|
944
1001
|
return r({
|
|
945
1002
|
onUpdateData: V,
|
|
@@ -947,7 +1004,7 @@ const loadXLSX = async () => (xlsxModulePromise || (xlsxModulePromise = import("
|
|
|
947
1004
|
onHandDataValue: S,
|
|
948
1005
|
exportData: I,
|
|
949
1006
|
printData: () => D(b)
|
|
950
|
-
}), (
|
|
1007
|
+
}), (v, k) => (openBlock(), createElementBlock("div", _hoisted_1$i, [
|
|
951
1008
|
createVNode(unref(ElAutoResizer), null, {
|
|
952
1009
|
default: withCtx(({ height: T, width: P }) => [
|
|
953
1010
|
createVNode(unref(ElTable), {
|
|
@@ -963,7 +1020,7 @@ const loadXLSX = async () => (xlsxModulePromise || (xlsxModulePromise = import("
|
|
|
963
1020
|
"sum-text": unref(L)("合计"),
|
|
964
1021
|
"span-method": O,
|
|
965
1022
|
"summary-method": unref(p),
|
|
966
|
-
onSelectionChange:
|
|
1023
|
+
onSelectionChange: _
|
|
967
1024
|
}, {
|
|
968
1025
|
default: withCtx(() => [
|
|
969
1026
|
a.showCheck ? (openBlock(), createBlock(unref(ElTableColumn), {
|
|
@@ -984,8 +1041,8 @@ const loadXLSX = async () => (xlsxModulePromise || (xlsxModulePromise = import("
|
|
|
984
1041
|
createVNode(DataColumn, {
|
|
985
1042
|
columnArray: a.columnArray,
|
|
986
1043
|
tabData: unref(s),
|
|
987
|
-
srcTabData: unref(
|
|
988
|
-
columnFilterArray: unref(
|
|
1044
|
+
srcTabData: unref(d).srcDataArray,
|
|
1045
|
+
columnFilterArray: unref(d).columnFilterArray,
|
|
989
1046
|
onChangeColumnFilter: unref(x)
|
|
990
1047
|
}, null, 8, ["columnArray", "tabData", "srcTabData", "columnFilterArray", "onChangeColumnFilter"]),
|
|
991
1048
|
a.commandArray.length > 0 ? (openBlock(), createBlock(unref(ElTableColumn), {
|
|
@@ -1012,11 +1069,11 @@ const loadXLSX = async () => (xlsxModulePromise || (xlsxModulePromise = import("
|
|
|
1012
1069
|
]),
|
|
1013
1070
|
_: 1
|
|
1014
1071
|
}),
|
|
1015
|
-
unref(
|
|
1072
|
+
unref(d).IsVisible ? (openBlock(), createBlock(unref(t), {
|
|
1016
1073
|
key: 0,
|
|
1017
|
-
modelValue: unref(
|
|
1018
|
-
"onUpdate:modelValue":
|
|
1019
|
-
data: unref(
|
|
1074
|
+
modelValue: unref(d).IsVisible,
|
|
1075
|
+
"onUpdate:modelValue": k[0] || (k[0] = (T) => unref(d).IsVisible = T),
|
|
1076
|
+
data: unref(d).dataArray,
|
|
1020
1077
|
title: a.tabName,
|
|
1021
1078
|
columnArray: unref(f),
|
|
1022
1079
|
printOption: a.printOption
|
|
@@ -1049,35 +1106,35 @@ const loadXLSX = async () => (xlsxModulePromise || (xlsxModulePromise = import("
|
|
|
1049
1106
|
},
|
|
1050
1107
|
emits: ["command", "select"],
|
|
1051
1108
|
setup(o, { expose: r, emit: e }) {
|
|
1052
|
-
const t = defineAsyncComponent(() => Promise.resolve().then(() => byPrintArray)), l = e, i = ref(/* @__PURE__ */ new Set()),
|
|
1109
|
+
const t = defineAsyncComponent(() => Promise.resolve().then(() => byPrintArray)), l = e, i = ref(/* @__PURE__ */ new Set()), c = (w, V) => {
|
|
1053
1110
|
l("command", w, V);
|
|
1054
|
-
}, n = (w) => i.value.has(w.src), a = o,
|
|
1055
|
-
const
|
|
1056
|
-
for (let
|
|
1057
|
-
const T = w[
|
|
1111
|
+
}, n = (w) => i.value.has(w.src), a = o, m = async (w, V, _) => {
|
|
1112
|
+
const v = [];
|
|
1113
|
+
for (let k = 0; k < w.length; k++) {
|
|
1114
|
+
const T = w[k], P = {};
|
|
1058
1115
|
for (let A = 0; A < V.length; A++) {
|
|
1059
1116
|
const M = V[A];
|
|
1060
|
-
P[M.dataKey] = await
|
|
1117
|
+
P[M.dataKey] = await _(T, M);
|
|
1061
1118
|
}
|
|
1062
|
-
P.src = T,
|
|
1119
|
+
P.src = T, v.push(P);
|
|
1063
1120
|
}
|
|
1064
|
-
return
|
|
1121
|
+
return v;
|
|
1065
1122
|
}, {
|
|
1066
|
-
tabData:
|
|
1123
|
+
tabData: u,
|
|
1067
1124
|
pageData: g,
|
|
1068
1125
|
columnArray: y,
|
|
1069
1126
|
getSelectData: s,
|
|
1070
|
-
exportData:
|
|
1127
|
+
exportData: d,
|
|
1071
1128
|
onChangeColumnFilter: f,
|
|
1072
1129
|
onHandDataValue: p,
|
|
1073
|
-
onUpdateData:
|
|
1130
|
+
onUpdateData: C,
|
|
1074
1131
|
printData: N
|
|
1075
1132
|
} = useDataListCore({
|
|
1076
1133
|
props: a,
|
|
1077
1134
|
translate: L,
|
|
1078
1135
|
message: ElMessage,
|
|
1079
1136
|
confirm: ElMessageBox.confirm,
|
|
1080
|
-
transformData:
|
|
1137
|
+
transformData: m
|
|
1081
1138
|
}), x = computed(() => {
|
|
1082
1139
|
const w = [];
|
|
1083
1140
|
return a.showCheck && w.push({
|
|
@@ -1087,11 +1144,11 @@ const loadXLSX = async () => (xlsxModulePromise || (xlsxModulePromise = import("
|
|
|
1087
1144
|
fixed: "left",
|
|
1088
1145
|
dataKey: "selection",
|
|
1089
1146
|
width: 55,
|
|
1090
|
-
cellRenderer: ({ rowData: V, rowIndex:
|
|
1147
|
+
cellRenderer: ({ rowData: V, rowIndex: _ }) => h("input", {
|
|
1091
1148
|
type: "checkbox",
|
|
1092
1149
|
checked: n(V),
|
|
1093
|
-
onChange: (
|
|
1094
|
-
|
|
1150
|
+
onChange: (v) => {
|
|
1151
|
+
v.target.checked ? i.value.add(V.src) : i.value.delete(V.src), i.value = new Set(i.value), I();
|
|
1095
1152
|
}
|
|
1096
1153
|
})
|
|
1097
1154
|
}), a.showLineNo && w.push({
|
|
@@ -1103,7 +1160,7 @@ const loadXLSX = async () => (xlsxModulePromise || (xlsxModulePromise = import("
|
|
|
1103
1160
|
width: 80,
|
|
1104
1161
|
cellRenderer: ({ rowIndex: V }) => V + 1
|
|
1105
1162
|
}), y.value.forEach((V) => {
|
|
1106
|
-
const
|
|
1163
|
+
const _ = {
|
|
1107
1164
|
key: V.dataKey,
|
|
1108
1165
|
title: L(V.title),
|
|
1109
1166
|
dataKey: V.dataKey,
|
|
@@ -1112,19 +1169,19 @@ const loadXLSX = async () => (xlsxModulePromise || (xlsxModulePromise = import("
|
|
|
1112
1169
|
fixed: V.fixed || "",
|
|
1113
1170
|
sortable: V.sortable || !1,
|
|
1114
1171
|
resizable: !0,
|
|
1115
|
-
cellRenderer: ({ rowData:
|
|
1172
|
+
cellRenderer: ({ rowData: v }) => h(DataColumnValue, {
|
|
1116
1173
|
columnInfo: V,
|
|
1117
|
-
row:
|
|
1174
|
+
row: v
|
|
1118
1175
|
}),
|
|
1119
1176
|
headerCellRenderer: () => h(DataColumnTitle, {
|
|
1120
1177
|
columnInfo: V,
|
|
1121
|
-
tabData:
|
|
1178
|
+
tabData: u.value,
|
|
1122
1179
|
srcTabData: g.srcDataArray,
|
|
1123
1180
|
currentFilterList: g.columnFilterArray[V.dataKey] || [],
|
|
1124
1181
|
onChange: f
|
|
1125
1182
|
})
|
|
1126
1183
|
};
|
|
1127
|
-
w.push(
|
|
1184
|
+
w.push(_);
|
|
1128
1185
|
}), a.commandArray.length > 0 && w.push({
|
|
1129
1186
|
key: "actions",
|
|
1130
1187
|
title: L("功能"),
|
|
@@ -1137,12 +1194,12 @@ const loadXLSX = async () => (xlsxModulePromise || (xlsxModulePromise = import("
|
|
|
1137
1194
|
powerArray: a.powerArray,
|
|
1138
1195
|
row: V,
|
|
1139
1196
|
maxCommand: a.maxCommand,
|
|
1140
|
-
onCommand:
|
|
1197
|
+
onCommand: c
|
|
1141
1198
|
})
|
|
1142
1199
|
}), w;
|
|
1143
1200
|
}), S = ({ rowIndex: w }) => w % 2 === 0 ? "even-row" : "odd-row", B = ({ rowData: w }) => {
|
|
1144
|
-
}, D = () =>
|
|
1145
|
-
const w =
|
|
1201
|
+
}, D = () => u.value.filter((w) => n(w)), O = (w, V) => s(w, D, V), b = (w) => d(D, w), R = () => C(), I = () => {
|
|
1202
|
+
const w = u.value.filter((V) => n(V));
|
|
1146
1203
|
l("select", w);
|
|
1147
1204
|
};
|
|
1148
1205
|
return r({
|
|
@@ -1153,12 +1210,12 @@ const loadXLSX = async () => (xlsxModulePromise || (xlsxModulePromise = import("
|
|
|
1153
1210
|
printData: () => N(D)
|
|
1154
1211
|
}), (w, V) => (openBlock(), createElementBlock("div", _hoisted_1$h, [
|
|
1155
1212
|
createVNode(unref(ElAutoResizer), null, {
|
|
1156
|
-
default: withCtx(({ height:
|
|
1213
|
+
default: withCtx(({ height: _, width: v }) => [
|
|
1157
1214
|
createVNode(unref(ElTableV2), {
|
|
1158
|
-
data: unref(
|
|
1215
|
+
data: unref(u),
|
|
1159
1216
|
columns: x.value,
|
|
1160
|
-
width:
|
|
1161
|
-
height:
|
|
1217
|
+
width: v,
|
|
1218
|
+
height: _,
|
|
1162
1219
|
"row-height": 50,
|
|
1163
1220
|
"header-height": 50,
|
|
1164
1221
|
fixed: "",
|
|
@@ -1171,7 +1228,7 @@ const loadXLSX = async () => (xlsxModulePromise || (xlsxModulePromise = import("
|
|
|
1171
1228
|
unref(g).IsVisible ? (openBlock(), createBlock(unref(t), {
|
|
1172
1229
|
key: 0,
|
|
1173
1230
|
modelValue: unref(g).IsVisible,
|
|
1174
|
-
"onUpdate:modelValue": V[0] || (V[0] = (
|
|
1231
|
+
"onUpdate:modelValue": V[0] || (V[0] = (_) => unref(g).IsVisible = _),
|
|
1175
1232
|
data: unref(g).dataArray,
|
|
1176
1233
|
title: a.tabName,
|
|
1177
1234
|
columnArray: unref(y),
|
|
@@ -1210,14 +1267,14 @@ const loadXLSX = async () => (xlsxModulePromise || (xlsxModulePromise = import("
|
|
|
1210
1267
|
const e = o, t = r, l = computed({
|
|
1211
1268
|
get: () => e.modelValue,
|
|
1212
1269
|
set: (p) => t("update:modelValue", p)
|
|
1213
|
-
}), i = ref([]),
|
|
1270
|
+
}), i = ref([]), c = ref({}), n = (p, C = {}) => {
|
|
1214
1271
|
const N = {};
|
|
1215
1272
|
p.forEach((x) => {
|
|
1216
1273
|
N[x.dataKey] = {
|
|
1217
|
-
isFilter:
|
|
1218
|
-
isSummary:
|
|
1274
|
+
isFilter: C[x.dataKey]?.isFilter ?? (x.isFilter || !1),
|
|
1275
|
+
isSummary: C[x.dataKey]?.isSummary ?? (x.isSummary || !1)
|
|
1219
1276
|
};
|
|
1220
|
-
}),
|
|
1277
|
+
}), c.value = N;
|
|
1221
1278
|
};
|
|
1222
1279
|
watch(() => e.columnArray, (p) => {
|
|
1223
1280
|
p && p.length > 0 && (i.value = [...e.visibleColumns], n(p, e.columnSettings));
|
|
@@ -1226,8 +1283,8 @@ const loadXLSX = async () => (xlsxModulePromise || (xlsxModulePromise = import("
|
|
|
1226
1283
|
}), watch(() => e.columnSettings, (p) => {
|
|
1227
1284
|
n(e.columnArray, p || {});
|
|
1228
1285
|
}, { deep: !0 });
|
|
1229
|
-
const a = (p,
|
|
1230
|
-
if (
|
|
1286
|
+
const a = (p, C) => {
|
|
1287
|
+
if (C)
|
|
1231
1288
|
i.value.includes(p) || i.value.push(p);
|
|
1232
1289
|
else {
|
|
1233
1290
|
const N = e.columnArray.find((x) => x.dataKey === p);
|
|
@@ -1235,28 +1292,28 @@ const loadXLSX = async () => (xlsxModulePromise || (xlsxModulePromise = import("
|
|
|
1235
1292
|
return;
|
|
1236
1293
|
i.value = i.value.filter((x) => x !== p);
|
|
1237
1294
|
}
|
|
1238
|
-
},
|
|
1239
|
-
|
|
1240
|
-
},
|
|
1241
|
-
|
|
1295
|
+
}, m = (p, C) => {
|
|
1296
|
+
c.value[p] || (c.value[p] = {}), c.value[p].isFilter = C;
|
|
1297
|
+
}, u = (p, C) => {
|
|
1298
|
+
c.value[p] || (c.value[p] = {}), c.value[p].isSummary = C;
|
|
1242
1299
|
}, g = () => {
|
|
1243
1300
|
i.value = e.columnArray.map((p) => p.dataKey);
|
|
1244
1301
|
}, y = () => {
|
|
1245
1302
|
i.value = e.columnArray.filter((p) => p.required).map((p) => p.dataKey);
|
|
1246
1303
|
}, s = () => {
|
|
1247
1304
|
i.value = e.columnArray.map((p) => p.dataKey), n(e.columnArray);
|
|
1248
|
-
},
|
|
1305
|
+
}, d = () => {
|
|
1249
1306
|
i.value = [...e.visibleColumns], n(e.columnArray, e.columnSettings), l.value = !1;
|
|
1250
1307
|
}, f = () => {
|
|
1251
1308
|
const p = {
|
|
1252
1309
|
visibleColumns: [...i.value],
|
|
1253
|
-
columnSettings: { ...
|
|
1310
|
+
columnSettings: { ...c.value }
|
|
1254
1311
|
};
|
|
1255
1312
|
t("confirm", p), l.value = !1;
|
|
1256
1313
|
};
|
|
1257
|
-
return (p,
|
|
1314
|
+
return (p, C) => (openBlock(), createBlock(unref(ElDialog), {
|
|
1258
1315
|
modelValue: l.value,
|
|
1259
|
-
"onUpdate:modelValue":
|
|
1316
|
+
"onUpdate:modelValue": C[0] || (C[0] = (N) => l.value = N),
|
|
1260
1317
|
title: "列显示设置",
|
|
1261
1318
|
width: "600px",
|
|
1262
1319
|
"close-on-click-modal": !1,
|
|
@@ -1271,7 +1328,7 @@ const loadXLSX = async () => (xlsxModulePromise || (xlsxModulePromise = import("
|
|
|
1271
1328
|
size: "small",
|
|
1272
1329
|
onClick: g
|
|
1273
1330
|
}, {
|
|
1274
|
-
default: withCtx(() => [...
|
|
1331
|
+
default: withCtx(() => [...C[1] || (C[1] = [
|
|
1275
1332
|
createTextVNode("全选", -1)
|
|
1276
1333
|
])]),
|
|
1277
1334
|
_: 1
|
|
@@ -1280,7 +1337,7 @@ const loadXLSX = async () => (xlsxModulePromise || (xlsxModulePromise = import("
|
|
|
1280
1337
|
size: "small",
|
|
1281
1338
|
onClick: y
|
|
1282
1339
|
}, {
|
|
1283
|
-
default: withCtx(() => [...
|
|
1340
|
+
default: withCtx(() => [...C[2] || (C[2] = [
|
|
1284
1341
|
createTextVNode("全不选", -1)
|
|
1285
1342
|
])]),
|
|
1286
1343
|
_: 1
|
|
@@ -1289,7 +1346,7 @@ const loadXLSX = async () => (xlsxModulePromise || (xlsxModulePromise = import("
|
|
|
1289
1346
|
size: "small",
|
|
1290
1347
|
onClick: s
|
|
1291
1348
|
}, {
|
|
1292
|
-
default: withCtx(() => [...
|
|
1349
|
+
default: withCtx(() => [...C[3] || (C[3] = [
|
|
1293
1350
|
createTextVNode("恢复默认", -1)
|
|
1294
1351
|
])]),
|
|
1295
1352
|
_: 1
|
|
@@ -1316,10 +1373,10 @@ const loadXLSX = async () => (xlsxModulePromise || (xlsxModulePromise = import("
|
|
|
1316
1373
|
i.value.includes(N.dataKey) ? (openBlock(), createElementBlock("div", _hoisted_6$5, [
|
|
1317
1374
|
createElementVNode("div", _hoisted_7$5, [
|
|
1318
1375
|
createVNode(unref(ElCheckbox), {
|
|
1319
|
-
"model-value":
|
|
1320
|
-
onChange: (x) =>
|
|
1376
|
+
"model-value": c.value[N.dataKey]?.isFilter || !1,
|
|
1377
|
+
onChange: (x) => m(N.dataKey, x)
|
|
1321
1378
|
}, {
|
|
1322
|
-
default: withCtx(() => [...
|
|
1379
|
+
default: withCtx(() => [...C[4] || (C[4] = [
|
|
1323
1380
|
createTextVNode(" 可筛选 ", -1)
|
|
1324
1381
|
])]),
|
|
1325
1382
|
_: 1
|
|
@@ -1327,10 +1384,10 @@ const loadXLSX = async () => (xlsxModulePromise || (xlsxModulePromise = import("
|
|
|
1327
1384
|
]),
|
|
1328
1385
|
createElementVNode("div", _hoisted_8$4, [
|
|
1329
1386
|
createVNode(unref(ElCheckbox), {
|
|
1330
|
-
"model-value":
|
|
1331
|
-
onChange: (x) =>
|
|
1387
|
+
"model-value": c.value[N.dataKey]?.isSummary || !1,
|
|
1388
|
+
onChange: (x) => u(N.dataKey, x)
|
|
1332
1389
|
}, {
|
|
1333
|
-
default: withCtx(() => [...
|
|
1390
|
+
default: withCtx(() => [...C[5] || (C[5] = [
|
|
1334
1391
|
createTextVNode(" 可统计 ", -1)
|
|
1335
1392
|
])]),
|
|
1336
1393
|
_: 1
|
|
@@ -1340,8 +1397,8 @@ const loadXLSX = async () => (xlsxModulePromise || (xlsxModulePromise = import("
|
|
|
1340
1397
|
]))), 128))
|
|
1341
1398
|
]),
|
|
1342
1399
|
createElementVNode("div", _hoisted_9$3, [
|
|
1343
|
-
createVNode(unref(ElButton), { onClick:
|
|
1344
|
-
default: withCtx(() => [...
|
|
1400
|
+
createVNode(unref(ElButton), { onClick: d }, {
|
|
1401
|
+
default: withCtx(() => [...C[6] || (C[6] = [
|
|
1345
1402
|
createTextVNode("取消", -1)
|
|
1346
1403
|
])]),
|
|
1347
1404
|
_: 1
|
|
@@ -1350,7 +1407,7 @@ const loadXLSX = async () => (xlsxModulePromise || (xlsxModulePromise = import("
|
|
|
1350
1407
|
type: "primary",
|
|
1351
1408
|
onClick: f
|
|
1352
1409
|
}, {
|
|
1353
|
-
default: withCtx(() => [...
|
|
1410
|
+
default: withCtx(() => [...C[7] || (C[7] = [
|
|
1354
1411
|
createTextVNode("确定", -1)
|
|
1355
1412
|
])]),
|
|
1356
1413
|
_: 1
|
|
@@ -1397,9 +1454,9 @@ const loadXLSX = async () => (xlsxModulePromise || (xlsxModulePromise = import("
|
|
|
1397
1454
|
const {
|
|
1398
1455
|
columnArray: w,
|
|
1399
1456
|
commandArray: V,
|
|
1400
|
-
powerArray:
|
|
1401
|
-
showCheck:
|
|
1402
|
-
showLineNo:
|
|
1457
|
+
powerArray: _,
|
|
1458
|
+
showCheck: v,
|
|
1459
|
+
showLineNo: k,
|
|
1403
1460
|
tabName: T,
|
|
1404
1461
|
printOption: P,
|
|
1405
1462
|
fnGetSelectData: A,
|
|
@@ -1408,12 +1465,12 @@ const loadXLSX = async () => (xlsxModulePromise || (xlsxModulePromise = import("
|
|
|
1408
1465
|
...G
|
|
1409
1466
|
} = l;
|
|
1410
1467
|
return G;
|
|
1411
|
-
}),
|
|
1412
|
-
|
|
1468
|
+
}), c = ref(null), n = ref(null), a = reactive({ visible: !1 }), m = ref([]), u = ref({}), g = ref(!1), y = computed(() => t.columnArray || []), s = () => `columnDisplay_${y.value.map((V) => V.dataKey).sort().join(",")}`, d = e, f = (w, V) => {
|
|
1469
|
+
d("command", w, V);
|
|
1413
1470
|
}, p = (w) => {
|
|
1414
|
-
|
|
1415
|
-
},
|
|
1416
|
-
const V =
|
|
1471
|
+
d("select", w);
|
|
1472
|
+
}, C = computed(() => g.value ? y.value.filter((w) => m.value.includes(w.dataKey)).map((w) => {
|
|
1473
|
+
const V = u.value[w.dataKey];
|
|
1417
1474
|
return V ? {
|
|
1418
1475
|
...w,
|
|
1419
1476
|
isFilter: V.isFilter,
|
|
@@ -1423,33 +1480,33 @@ const loadXLSX = async () => (xlsxModulePromise || (xlsxModulePromise = import("
|
|
|
1423
1480
|
if (!t.data || t.data.length === 0)
|
|
1424
1481
|
return t.data;
|
|
1425
1482
|
const w = y.value.filter(
|
|
1426
|
-
(V) => V.isHeBing === !0 &&
|
|
1483
|
+
(V) => V.isHeBing === !0 && m.value.includes(V.dataKey)
|
|
1427
1484
|
);
|
|
1428
|
-
return w.length === 0 ? t.data : [...t.data].sort((V,
|
|
1429
|
-
for (const
|
|
1430
|
-
const
|
|
1431
|
-
if (!(
|
|
1432
|
-
if (
|
|
1485
|
+
return w.length === 0 ? t.data : [...t.data].sort((V, _) => {
|
|
1486
|
+
for (const v of w) {
|
|
1487
|
+
const k = V[v.dataKey], T = _[v.dataKey];
|
|
1488
|
+
if (!(k == null && T == null)) {
|
|
1489
|
+
if (k == null) return -1;
|
|
1433
1490
|
if (T == null) return 1;
|
|
1434
|
-
if (
|
|
1435
|
-
if (
|
|
1491
|
+
if (k < T) return -1;
|
|
1492
|
+
if (k > T) return 1;
|
|
1436
1493
|
}
|
|
1437
1494
|
}
|
|
1438
1495
|
return 0;
|
|
1439
1496
|
});
|
|
1440
|
-
}), x = computed(() => JSON.stringify(
|
|
1497
|
+
}), x = computed(() => JSON.stringify(C.value.map((w) => ({
|
|
1441
1498
|
dataKey: w.dataKey,
|
|
1442
1499
|
isFilter: w.isFilter,
|
|
1443
1500
|
isSummary: w.isSummary
|
|
1444
1501
|
})))), S = () => {
|
|
1445
1502
|
a.visible = !0;
|
|
1446
1503
|
}, B = (w) => {
|
|
1447
|
-
|
|
1504
|
+
m.value = [...w.visibleColumns], u.value = { ...w.columnSettings }, g.value = !0, D(), ElMessage({ message: "列显示设置已保存", type: "success" });
|
|
1448
1505
|
}, D = () => {
|
|
1449
1506
|
try {
|
|
1450
1507
|
const w = {
|
|
1451
|
-
visibleColumns:
|
|
1452
|
-
columnSettings:
|
|
1508
|
+
visibleColumns: m.value,
|
|
1509
|
+
columnSettings: u.value,
|
|
1453
1510
|
timestamp: Date.now()
|
|
1454
1511
|
};
|
|
1455
1512
|
localStorage.setItem(s(), JSON.stringify(w));
|
|
@@ -1460,18 +1517,18 @@ const loadXLSX = async () => (xlsxModulePromise || (xlsxModulePromise = import("
|
|
|
1460
1517
|
try {
|
|
1461
1518
|
const w = s(), V = localStorage.getItem(w);
|
|
1462
1519
|
if (V) {
|
|
1463
|
-
const
|
|
1464
|
-
if (Array.isArray(
|
|
1465
|
-
const
|
|
1466
|
-
(
|
|
1520
|
+
const _ = JSON.parse(V);
|
|
1521
|
+
if (Array.isArray(_.visibleColumns)) {
|
|
1522
|
+
const v = _.visibleColumns.filter(
|
|
1523
|
+
(k) => y.value.some((T) => T.dataKey === k)
|
|
1467
1524
|
);
|
|
1468
|
-
|
|
1525
|
+
m.value = v;
|
|
1469
1526
|
}
|
|
1470
|
-
if (
|
|
1471
|
-
const
|
|
1472
|
-
Object.keys(
|
|
1473
|
-
y.value.some((T) => T.dataKey ===
|
|
1474
|
-
}),
|
|
1527
|
+
if (_.columnSettings && typeof _.columnSettings == "object") {
|
|
1528
|
+
const v = {};
|
|
1529
|
+
Object.keys(_.columnSettings).forEach((k) => {
|
|
1530
|
+
y.value.some((T) => T.dataKey === k) && (v[k] = _.columnSettings[k]);
|
|
1531
|
+
}), u.value = v;
|
|
1475
1532
|
}
|
|
1476
1533
|
return !0;
|
|
1477
1534
|
}
|
|
@@ -1480,19 +1537,19 @@ const loadXLSX = async () => (xlsxModulePromise || (xlsxModulePromise = import("
|
|
|
1480
1537
|
}
|
|
1481
1538
|
return !1;
|
|
1482
1539
|
}, b = (w, V = {}) => {
|
|
1483
|
-
const
|
|
1484
|
-
return w.forEach((
|
|
1485
|
-
|
|
1486
|
-
isFilter: V[
|
|
1487
|
-
isSummary: V[
|
|
1540
|
+
const _ = {};
|
|
1541
|
+
return w.forEach((v) => {
|
|
1542
|
+
_[v.dataKey] = {
|
|
1543
|
+
isFilter: V[v.dataKey]?.isFilter ?? (v.isFilter || !1),
|
|
1544
|
+
isSummary: V[v.dataKey]?.isSummary ?? (v.isSummary || !1)
|
|
1488
1545
|
};
|
|
1489
|
-
}),
|
|
1546
|
+
}), _;
|
|
1490
1547
|
}, R = () => {
|
|
1491
1548
|
if (!y.value || y.value.length === 0) {
|
|
1492
|
-
|
|
1549
|
+
m.value = [], u.value = {}, g.value = !1;
|
|
1493
1550
|
return;
|
|
1494
1551
|
}
|
|
1495
|
-
O() || (
|
|
1552
|
+
O() || (m.value = y.value.map((V) => V.dataKey)), u.value = b(y.value, u.value), g.value = !0;
|
|
1496
1553
|
};
|
|
1497
1554
|
watch(
|
|
1498
1555
|
y,
|
|
@@ -1501,7 +1558,7 @@ const loadXLSX = async () => (xlsxModulePromise || (xlsxModulePromise = import("
|
|
|
1501
1558
|
},
|
|
1502
1559
|
{ immediate: !0 }
|
|
1503
1560
|
);
|
|
1504
|
-
const I = () => t.version === "1" || !t.version ?
|
|
1561
|
+
const I = () => t.version === "1" || !t.version ? c.value : t.version === "2" ? n.value : c.value;
|
|
1505
1562
|
return r({
|
|
1506
1563
|
onUpdateData: (w) => I()?.onUpdateData?.(w),
|
|
1507
1564
|
getSelectData: (w, V) => I()?.getSelectData?.(w, V),
|
|
@@ -1510,20 +1567,20 @@ const loadXLSX = async () => (xlsxModulePromise || (xlsxModulePromise = import("
|
|
|
1510
1567
|
printData: (w) => I()?.printData?.(w),
|
|
1511
1568
|
// 列显示控制功能
|
|
1512
1569
|
showColumnDisplayDialog: S,
|
|
1513
|
-
getVisibleColumns: () =>
|
|
1570
|
+
getVisibleColumns: () => m.value,
|
|
1514
1571
|
setVisibleColumns: (w) => {
|
|
1515
|
-
|
|
1572
|
+
m.value = [...w], g.value = !0;
|
|
1516
1573
|
},
|
|
1517
1574
|
resetColumnDisplay: () => {
|
|
1518
|
-
|
|
1575
|
+
m.value = y.value.map((w) => w.dataKey), u.value = b(y.value), g.value = !0, D();
|
|
1519
1576
|
},
|
|
1520
1577
|
// 新增的列设置功能
|
|
1521
|
-
getColumnSettings: () =>
|
|
1578
|
+
getColumnSettings: () => u.value,
|
|
1522
1579
|
setColumnSettings: (w) => {
|
|
1523
|
-
|
|
1580
|
+
u.value = b(y.value, w);
|
|
1524
1581
|
},
|
|
1525
1582
|
updateColumnSetting: (w, V) => {
|
|
1526
|
-
|
|
1583
|
+
u.value[w] || (u.value[w] = {}), u.value[w] = { ...u.value[w], ...V }, D();
|
|
1527
1584
|
},
|
|
1528
1585
|
// 持久化配置管理
|
|
1529
1586
|
saveColumnConfig: D,
|
|
@@ -1540,10 +1597,10 @@ const loadXLSX = async () => (xlsxModulePromise || (xlsxModulePromise = import("
|
|
|
1540
1597
|
o.version === "1" ? (openBlock(), createBlock(DataListV1, mergeProps({
|
|
1541
1598
|
key: 0,
|
|
1542
1599
|
ref_key: "dataListV1Ref",
|
|
1543
|
-
ref:
|
|
1600
|
+
ref: c,
|
|
1544
1601
|
data: N.value
|
|
1545
1602
|
}, i.value, {
|
|
1546
|
-
columnArray:
|
|
1603
|
+
columnArray: C.value,
|
|
1547
1604
|
commandArray: t.commandArray,
|
|
1548
1605
|
powerArray: t.powerArray,
|
|
1549
1606
|
showCheck: t.showCheck,
|
|
@@ -1557,10 +1614,10 @@ const loadXLSX = async () => (xlsxModulePromise || (xlsxModulePromise = import("
|
|
|
1557
1614
|
onCommand: f,
|
|
1558
1615
|
onSelect: p
|
|
1559
1616
|
}), createSlots({ _: 2 }, [
|
|
1560
|
-
renderList(w.$slots, (
|
|
1561
|
-
name:
|
|
1562
|
-
fn: withCtx((
|
|
1563
|
-
renderSlot(w.$slots,
|
|
1617
|
+
renderList(w.$slots, (_, v) => ({
|
|
1618
|
+
name: v,
|
|
1619
|
+
fn: withCtx((k) => [
|
|
1620
|
+
renderSlot(w.$slots, v, normalizeProps(guardReactiveProps(k || {})), void 0, !0)
|
|
1564
1621
|
])
|
|
1565
1622
|
}))
|
|
1566
1623
|
]), 1040, ["data", "columnArray", "commandArray", "powerArray", "showCheck", "showLineNo", "tabName", "printOption", "fnGetSelectData", "maxCommand", "toolWidth"])) : o.version === "2" ? (openBlock(), createBlock(DataListV2, mergeProps({
|
|
@@ -1569,7 +1626,7 @@ const loadXLSX = async () => (xlsxModulePromise || (xlsxModulePromise = import("
|
|
|
1569
1626
|
ref: n,
|
|
1570
1627
|
data: N.value
|
|
1571
1628
|
}, i.value, {
|
|
1572
|
-
columnArray:
|
|
1629
|
+
columnArray: C.value,
|
|
1573
1630
|
commandArray: t.commandArray,
|
|
1574
1631
|
powerArray: t.powerArray,
|
|
1575
1632
|
showCheck: t.showCheck,
|
|
@@ -1583,19 +1640,19 @@ const loadXLSX = async () => (xlsxModulePromise || (xlsxModulePromise = import("
|
|
|
1583
1640
|
onCommand: f,
|
|
1584
1641
|
onSelect: p
|
|
1585
1642
|
}), createSlots({ _: 2 }, [
|
|
1586
|
-
renderList(w.$slots, (
|
|
1587
|
-
name:
|
|
1588
|
-
fn: withCtx((
|
|
1589
|
-
renderSlot(w.$slots,
|
|
1643
|
+
renderList(w.$slots, (_, v) => ({
|
|
1644
|
+
name: v,
|
|
1645
|
+
fn: withCtx((k) => [
|
|
1646
|
+
renderSlot(w.$slots, v, normalizeProps(guardReactiveProps(k || {})), void 0, !0)
|
|
1590
1647
|
])
|
|
1591
1648
|
}))
|
|
1592
1649
|
]), 1040, ["data", "columnArray", "commandArray", "powerArray", "showCheck", "showLineNo", "tabName", "printOption", "fnGetSelectData", "maxCommand", "toolWidth"])) : (openBlock(), createBlock(DataListV1, mergeProps({
|
|
1593
1650
|
key: 2,
|
|
1594
1651
|
ref_key: "dataListV1Ref",
|
|
1595
|
-
ref:
|
|
1652
|
+
ref: c,
|
|
1596
1653
|
data: N.value
|
|
1597
1654
|
}, i.value, {
|
|
1598
|
-
columnArray:
|
|
1655
|
+
columnArray: C.value,
|
|
1599
1656
|
commandArray: t.commandArray,
|
|
1600
1657
|
powerArray: t.powerArray,
|
|
1601
1658
|
showCheck: t.showCheck,
|
|
@@ -1609,19 +1666,19 @@ const loadXLSX = async () => (xlsxModulePromise || (xlsxModulePromise = import("
|
|
|
1609
1666
|
onCommand: f,
|
|
1610
1667
|
onSelect: p
|
|
1611
1668
|
}), createSlots({ _: 2 }, [
|
|
1612
|
-
renderList(w.$slots, (
|
|
1613
|
-
name:
|
|
1614
|
-
fn: withCtx((
|
|
1615
|
-
renderSlot(w.$slots,
|
|
1669
|
+
renderList(w.$slots, (_, v) => ({
|
|
1670
|
+
name: v,
|
|
1671
|
+
fn: withCtx((k) => [
|
|
1672
|
+
renderSlot(w.$slots, v, normalizeProps(guardReactiveProps(k || {})), void 0, !0)
|
|
1616
1673
|
])
|
|
1617
1674
|
}))
|
|
1618
1675
|
]), 1040, ["data", "columnArray", "commandArray", "powerArray", "showCheck", "showLineNo", "tabName", "printOption", "fnGetSelectData", "maxCommand", "toolWidth"])),
|
|
1619
1676
|
createVNode(ColumnDisplayDialog, {
|
|
1620
1677
|
modelValue: a.visible,
|
|
1621
|
-
"onUpdate:modelValue": V[0] || (V[0] = (
|
|
1678
|
+
"onUpdate:modelValue": V[0] || (V[0] = (_) => a.visible = _),
|
|
1622
1679
|
columnArray: y.value,
|
|
1623
|
-
visibleColumns:
|
|
1624
|
-
columnSettings:
|
|
1680
|
+
visibleColumns: m.value,
|
|
1681
|
+
columnSettings: u.value,
|
|
1625
1682
|
onConfirm: B
|
|
1626
1683
|
}, null, 8, ["modelValue", "columnArray", "visibleColumns", "columnSettings"])
|
|
1627
1684
|
]));
|
|
@@ -1639,32 +1696,32 @@ const loadXLSX = async () => (xlsxModulePromise || (xlsxModulePromise = import("
|
|
|
1639
1696
|
translate: l,
|
|
1640
1697
|
fallbackPowerArray: i = []
|
|
1641
1698
|
}) => {
|
|
1642
|
-
const
|
|
1699
|
+
const c = ref([]);
|
|
1643
1700
|
let n = 0;
|
|
1644
1701
|
const a = async (g) => {
|
|
1645
1702
|
const y = ++n, s = await g();
|
|
1646
1703
|
return y !== n ? null : s;
|
|
1647
|
-
},
|
|
1704
|
+
}, m = () => o.powerId && o.powerId > 0 ? o.powerId : typeof t == "function" ? t("PowerId", "") : "";
|
|
1648
1705
|
return {
|
|
1649
|
-
powerArray:
|
|
1706
|
+
powerArray: c,
|
|
1650
1707
|
runLatestRequest: a,
|
|
1651
1708
|
initializePowerArray: async () => {
|
|
1652
1709
|
if (Array.isArray(o.powerArray) && o.powerArray.length > 0)
|
|
1653
|
-
return
|
|
1654
|
-
const g =
|
|
1710
|
+
return c.value = o.powerArray, c.value;
|
|
1711
|
+
const g = m();
|
|
1655
1712
|
return g ? (await r(async () => {
|
|
1656
|
-
|
|
1713
|
+
c.value = await e({
|
|
1657
1714
|
SearchType: 3,
|
|
1658
1715
|
ParentId: g
|
|
1659
1716
|
});
|
|
1660
|
-
}, l("页面加载中")),
|
|
1717
|
+
}, l("页面加载中")), c.value) : (c.value = [...i.length > 0 ? i : DEFAULT_POWER_ARRAY], c.value);
|
|
1661
1718
|
}
|
|
1662
1719
|
};
|
|
1663
1720
|
}, usePageIndexApi = ({ props: o, requestApi: r }) => {
|
|
1664
|
-
const e = (i,
|
|
1721
|
+
const e = (i, c) => {
|
|
1665
1722
|
const n = {
|
|
1666
1723
|
PageIndex: i,
|
|
1667
|
-
PageSize:
|
|
1724
|
+
PageSize: c
|
|
1668
1725
|
};
|
|
1669
1726
|
if (o.searchParam)
|
|
1670
1727
|
for (let a in o.searchParam)
|
|
@@ -1680,10 +1737,10 @@ const loadXLSX = async () => (xlsxModulePromise || (xlsxModulePromise = import("
|
|
|
1680
1737
|
return {
|
|
1681
1738
|
buildPageParams: e,
|
|
1682
1739
|
normalizePageResult: t,
|
|
1683
|
-
fetchPageData: async (i,
|
|
1740
|
+
fetchPageData: async (i, c) => {
|
|
1684
1741
|
const n = await r(
|
|
1685
1742
|
`${o.host}/${o.controller}/${o.getPageActionName}`,
|
|
1686
|
-
e(i,
|
|
1743
|
+
e(i, c)
|
|
1687
1744
|
);
|
|
1688
1745
|
return t(n);
|
|
1689
1746
|
}
|
|
@@ -1795,8 +1852,8 @@ const SafeCall$1 = async (o, r) => {
|
|
|
1795
1852
|
return console.log(n), alert("打印脚本解析失败!请检查打印脚本"), alert(e.PrintScript), !1;
|
|
1796
1853
|
}
|
|
1797
1854
|
await AndroidApi("/print/connectPrinter", l);
|
|
1798
|
-
let
|
|
1799
|
-
return await AndroidApi("/print/printer", { connConfig: l, deviceConfig:
|
|
1855
|
+
let c = await AndroidApi("/print/getPrintDeviceConfig", { connConfig: l });
|
|
1856
|
+
return await AndroidApi("/print/printer", { connConfig: l, deviceConfig: c, data: i }), !0;
|
|
1800
1857
|
}, PrintTick$1 = async (o, r, e, t) => {
|
|
1801
1858
|
if (!window.getLodop) return alert("本页面未加载打印插件");
|
|
1802
1859
|
if (!window.LODOP || !window.LODOP.PRINT_INITA) return alert("打印插件:C-Lodop (Print)未启动,请先启动后再使用打印功能");
|
|
@@ -1909,77 +1966,77 @@ const SafeCall$1 = async (o, r) => {
|
|
|
1909
1966
|
},
|
|
1910
1967
|
emits: ["command", "handData", "saveData", "select"],
|
|
1911
1968
|
setup(o, { expose: r, emit: e }) {
|
|
1912
|
-
const t = useSlots(), l = ref([]), i = ref(!0),
|
|
1913
|
-
props:
|
|
1969
|
+
const t = useSlots(), l = ref([]), i = ref(!0), c = ref(!0), n = ref(), a = reactive({ IsVisible: !1, DataModel: {}, Title: "" }), m = ref(null), u = ref([]), g = ref(0), y = ref(1), s = ref(20), d = o, f = e, { powerArray: p, runLatestRequest: C, initializePowerArray: N } = useListQueryCore({
|
|
1970
|
+
props: d,
|
|
1914
1971
|
safeCall: SafeCall$1,
|
|
1915
|
-
loadPowerApi: (
|
|
1972
|
+
loadPowerApi: (_) => SystemModuleApi("/ModulePowerInfo/Search", _),
|
|
1916
1973
|
getUrlParam: GetUrlParam,
|
|
1917
1974
|
translate: L
|
|
1918
1975
|
}), { fetchPageData: x } = usePageIndexApi({
|
|
1919
|
-
props:
|
|
1976
|
+
props: d,
|
|
1920
1977
|
requestApi: AjaxCallWeb
|
|
1921
|
-
}), S = (
|
|
1922
|
-
|
|
1978
|
+
}), S = (_) => {
|
|
1979
|
+
u.value = _ || [], f("select", _);
|
|
1923
1980
|
}, B = () => {
|
|
1924
1981
|
if (n.value) {
|
|
1925
|
-
const
|
|
1926
|
-
|
|
1927
|
-
|
|
1982
|
+
const _ = n.value.$el.querySelector(".el-form");
|
|
1983
|
+
_ && _.querySelectorAll("input, select").forEach((k) => {
|
|
1984
|
+
k._vueModel && (k._vueModel.value = "");
|
|
1928
1985
|
});
|
|
1929
1986
|
}
|
|
1930
1987
|
I(1);
|
|
1931
1988
|
}, D = computed({
|
|
1932
1989
|
get: () => {
|
|
1933
|
-
var
|
|
1934
|
-
return
|
|
1990
|
+
var _ = [];
|
|
1991
|
+
return d.commandArray && d.commandArray.length > 0 && d.commandArray.forEach((v) => _.push(v)), p.value.some((v) => v.Name == "编辑") ? _.push("编辑") : p.value.some((v) => v.Name == "查看") && _.push("查看"), p.value.some((v) => v.Name == "删除") && _.push("删除"), _;
|
|
1935
1992
|
}
|
|
1936
|
-
}), O = (
|
|
1937
|
-
switch (
|
|
1993
|
+
}), O = (_, v) => {
|
|
1994
|
+
switch (_) {
|
|
1938
1995
|
case "新增": {
|
|
1939
|
-
i.value = !0, a.Title = `${L(
|
|
1996
|
+
i.value = !0, a.Title = `${L(d.tabName)} - ` + L("添加"), a.DataModel = {}, f("handData", a.DataModel, !0), a.IsVisible = !0;
|
|
1940
1997
|
break;
|
|
1941
1998
|
}
|
|
1942
1999
|
case "查看":
|
|
1943
2000
|
case "编辑": {
|
|
1944
|
-
i.value =
|
|
1945
|
-
a.DataModel = await AjaxCallWeb(`${
|
|
1946
|
-
Id:
|
|
1947
|
-
}), f("handData", a.DataModel, !0), a.IsVisible = !0, a.DataModel.Reload = () => O(
|
|
2001
|
+
i.value = _ == "编辑", a.Title = `${L(d.tabName)} - ${L(_)}`, SafeCall$1(async () => {
|
|
2002
|
+
a.DataModel = await AjaxCallWeb(`${d.host}/${d.controller}/${d.getModelActionName}`, {
|
|
2003
|
+
Id: v.Id
|
|
2004
|
+
}), f("handData", a.DataModel, !0), a.IsVisible = !0, a.DataModel.Reload = () => O(_, v);
|
|
1948
2005
|
}, L("数据加载中"));
|
|
1949
2006
|
break;
|
|
1950
2007
|
}
|
|
1951
2008
|
case "删除": {
|
|
1952
2009
|
confirm(L("数据删除后将不能恢复,请确认是否删除")) && SafeCall$1(async () => {
|
|
1953
|
-
await AjaxCallWeb(`${
|
|
1954
|
-
for (let
|
|
1955
|
-
if (l.value[
|
|
1956
|
-
l.value.splice(
|
|
2010
|
+
await AjaxCallWeb(`${d.host}/${d.controller}/${d.deleteActionName}`, { Id: v.Id }), ElMessage({ message: L("数据删除成功!"), type: "success" });
|
|
2011
|
+
for (let k = 0; k < l.value.length; k++)
|
|
2012
|
+
if (l.value[k].Id == v.Id) {
|
|
2013
|
+
l.value.splice(k, 1);
|
|
1957
2014
|
break;
|
|
1958
2015
|
}
|
|
1959
|
-
|
|
2016
|
+
m.value.onUpdateData(!0);
|
|
1960
2017
|
}, L("数据删除中"));
|
|
1961
2018
|
break;
|
|
1962
2019
|
}
|
|
1963
2020
|
case "批量删除": {
|
|
1964
2021
|
if (confirm(L(`数据删除后无法恢复!!\r
|
|
1965
2022
|
确认删除吗?`))) {
|
|
1966
|
-
let
|
|
1967
|
-
if (
|
|
2023
|
+
let k = u.value || [];
|
|
2024
|
+
if (k.length == 0) return ElMessage({ message: L("未选择需要删除的数据"), type: "error" });
|
|
1968
2025
|
SafeCall$1(async () => {
|
|
1969
2026
|
let T = 0, P = 0;
|
|
1970
|
-
for (let A = 0; A <
|
|
2027
|
+
for (let A = 0; A < k.length; A++)
|
|
1971
2028
|
try {
|
|
1972
|
-
let M =
|
|
1973
|
-
await AjaxCallWeb(`${
|
|
2029
|
+
let M = k[A].Id;
|
|
2030
|
+
await AjaxCallWeb(`${d.host}/${d.controller}/${d.deleteActionName}`, {
|
|
1974
2031
|
Id: M
|
|
1975
|
-
}), T++, ElMessage({ message: L("删除成功") + `(${A + 1}/${
|
|
2032
|
+
}), T++, ElMessage({ message: L("删除成功") + `(${A + 1}/${k.length})` });
|
|
1976
2033
|
} catch {
|
|
1977
|
-
P++, ElMessage({ message: L("删除失败") + `(${A + 1}/${
|
|
2034
|
+
P++, ElMessage({ message: L("删除失败") + `(${A + 1}/${k.length})`, type: "error" });
|
|
1978
2035
|
}
|
|
1979
2036
|
T > 0 && (ElMessage({
|
|
1980
2037
|
message: L("批量删除") + `:${T}` + L("条数据成功"),
|
|
1981
2038
|
type: "success"
|
|
1982
|
-
}), l.value = l.value.filter((A) => !
|
|
2039
|
+
}), l.value = l.value.filter((A) => !k.some((M) => M.Id == A.Id)), u.value = u.value.filter((A) => !k.some((M) => M.Id == A.Id)), m.value.onUpdateData(!0)), P > 0 && ElMessage({
|
|
1983
2040
|
message: L("批量删除") + `:${P}` + L("条数据失败"),
|
|
1984
2041
|
type: "error"
|
|
1985
2042
|
});
|
|
@@ -1988,94 +2045,94 @@ const SafeCall$1 = async (o, r) => {
|
|
|
1988
2045
|
break;
|
|
1989
2046
|
}
|
|
1990
2047
|
default: {
|
|
1991
|
-
f("command",
|
|
2048
|
+
f("command", _, v);
|
|
1992
2049
|
break;
|
|
1993
2050
|
}
|
|
1994
2051
|
}
|
|
1995
2052
|
}, b = () => {
|
|
1996
2053
|
SafeCall$1(async () => {
|
|
1997
|
-
let
|
|
1998
|
-
f("saveData",
|
|
1999
|
-
let
|
|
2054
|
+
let _ = V(a.DataModel);
|
|
2055
|
+
f("saveData", _, !0);
|
|
2056
|
+
let v = await AjaxCallWeb(`${d.host}/${d.controller}/${d.saveActionName}`, _);
|
|
2000
2057
|
ElMessage({ message: L("数据保存成功!"), type: "success" }), a.IsVisible = !1, I();
|
|
2001
2058
|
}, L("数据保存中"));
|
|
2002
2059
|
}, R = async () => {
|
|
2003
|
-
let
|
|
2060
|
+
let _ = Math.max(g.value, 1), v = 500, k = Math.ceil(_ / v);
|
|
2004
2061
|
var T = [];
|
|
2005
2062
|
confirm(`是否导出全部数据?\r
|
|
2006
|
-
共:${
|
|
2007
|
-
for (let A = 1; A <=
|
|
2008
|
-
P.setText(`数据拉取中:${A}/${
|
|
2009
|
-
let { dataArray: M } = await x(A,
|
|
2010
|
-
M.forEach((F) => f("handData", F, !1)), M = await
|
|
2063
|
+
共:${_}条数据`) && (await SafeCall$1(async (P) => {
|
|
2064
|
+
for (let A = 1; A <= k; A++) {
|
|
2065
|
+
P.setText(`数据拉取中:${A}/${k} `);
|
|
2066
|
+
let { dataArray: M } = await x(A, v);
|
|
2067
|
+
M.forEach((F) => f("handData", F, !1)), M = await m.value.onHandDataValue(M), T.push(...M);
|
|
2011
2068
|
}
|
|
2012
|
-
}, "数据拉取中"),
|
|
2013
|
-
}, I = (
|
|
2069
|
+
}, "数据拉取中"), m.value.exportData(T));
|
|
2070
|
+
}, I = (_) => {
|
|
2014
2071
|
SafeCall$1(async () => {
|
|
2015
|
-
|
|
2016
|
-
const
|
|
2017
|
-
if (!
|
|
2018
|
-
const { totalCount:
|
|
2019
|
-
g.value =
|
|
2072
|
+
_ && _ > 0 && (y.value = _);
|
|
2073
|
+
const v = await C(() => x(y.value, s.value));
|
|
2074
|
+
if (!v) return;
|
|
2075
|
+
const { totalCount: k, dataArray: T } = v;
|
|
2076
|
+
g.value = k, T.forEach((P) => f("handData", P, !1)), u.value = [], l.value = T;
|
|
2020
2077
|
}, L("数据查询中"));
|
|
2021
2078
|
}, w = () => {
|
|
2022
|
-
|
|
2079
|
+
m.value?.showColumnDisplayDialog();
|
|
2023
2080
|
};
|
|
2024
2081
|
onMounted(async () => {
|
|
2025
|
-
|
|
2082
|
+
c.value = !!t.FilterItem, await N(), d.loadData && nextTick(() => I());
|
|
2026
2083
|
}), r({
|
|
2027
2084
|
onSearch: I
|
|
2028
2085
|
});
|
|
2029
|
-
function V(
|
|
2030
|
-
if (
|
|
2031
|
-
if (
|
|
2032
|
-
if (Array.isArray(
|
|
2033
|
-
const
|
|
2034
|
-
for (let
|
|
2035
|
-
|
|
2036
|
-
return
|
|
2086
|
+
function V(_) {
|
|
2087
|
+
if (_ === null || typeof _ != "object") return _;
|
|
2088
|
+
if (_ instanceof Date) return new Date(_.getTime());
|
|
2089
|
+
if (Array.isArray(_)) return _.map((k) => V(k));
|
|
2090
|
+
const v = {};
|
|
2091
|
+
for (let k in _)
|
|
2092
|
+
_.hasOwnProperty(k) && (v[k] = V(_[k]));
|
|
2093
|
+
return v;
|
|
2037
2094
|
}
|
|
2038
|
-
return (
|
|
2039
|
-
|
|
2095
|
+
return (_, v) => (openBlock(), createElementBlock("div", _hoisted_1$e, [
|
|
2096
|
+
c.value ? (openBlock(), createBlock(Filter, {
|
|
2040
2097
|
key: 0,
|
|
2041
2098
|
class: "filter",
|
|
2042
|
-
onSearch:
|
|
2099
|
+
onSearch: v[0] || (v[0] = (k) => I(1)),
|
|
2043
2100
|
onReset: B,
|
|
2044
2101
|
ref_key: "filter",
|
|
2045
2102
|
ref: n,
|
|
2046
|
-
labelWidth:
|
|
2103
|
+
labelWidth: d.labelWidth
|
|
2047
2104
|
}, {
|
|
2048
2105
|
FilterItem: withCtx(() => [
|
|
2049
|
-
renderSlot(
|
|
2106
|
+
renderSlot(_.$slots, "FilterItem", {}, void 0, !0)
|
|
2050
2107
|
]),
|
|
2051
2108
|
_: 3
|
|
2052
2109
|
}, 8, ["labelWidth"])) : createCommentVNode("", !0),
|
|
2053
2110
|
createVNode(Tool, {
|
|
2054
2111
|
total: g.value,
|
|
2055
2112
|
pageIndex: y.value,
|
|
2056
|
-
"onUpdate:pageIndex":
|
|
2113
|
+
"onUpdate:pageIndex": v[6] || (v[6] = (k) => y.value = k),
|
|
2057
2114
|
pageSize: s.value,
|
|
2058
|
-
"onUpdate:pageSize":
|
|
2115
|
+
"onUpdate:pageSize": v[7] || (v[7] = (k) => s.value = k),
|
|
2059
2116
|
onUpdateData: I,
|
|
2060
2117
|
class: "tool"
|
|
2061
2118
|
}, {
|
|
2062
2119
|
ToolItem: withCtx(() => [
|
|
2063
|
-
unref(p).some((
|
|
2120
|
+
unref(p).some((k) => k.Name == "新增") ? (openBlock(), createBlock(unref(ElButton), {
|
|
2064
2121
|
key: 0,
|
|
2065
2122
|
type: "primary",
|
|
2066
2123
|
icon: unref(Plus),
|
|
2067
|
-
onClick:
|
|
2124
|
+
onClick: v[1] || (v[1] = (k) => O("新增"))
|
|
2068
2125
|
}, {
|
|
2069
2126
|
default: withCtx(() => [
|
|
2070
2127
|
createTextVNode(toDisplayString(unref(L)("新增")), 1)
|
|
2071
2128
|
]),
|
|
2072
2129
|
_: 1
|
|
2073
2130
|
}, 8, ["icon"])) : createCommentVNode("", !0),
|
|
2074
|
-
unref(p).some((
|
|
2131
|
+
unref(p).some((k) => k.Name == "删除") ? (openBlock(), createBlock(unref(ElButton), {
|
|
2075
2132
|
key: 1,
|
|
2076
2133
|
type: "danger",
|
|
2077
2134
|
icon: unref(Delete),
|
|
2078
|
-
onClick:
|
|
2135
|
+
onClick: v[2] || (v[2] = (k) => O("批量删除"))
|
|
2079
2136
|
}, {
|
|
2080
2137
|
default: withCtx(() => [
|
|
2081
2138
|
createTextVNode(toDisplayString(unref(L)("批量删除")), 1)
|
|
@@ -2085,7 +2142,7 @@ const SafeCall$1 = async (o, r) => {
|
|
|
2085
2142
|
createVNode(unref(ElButton), {
|
|
2086
2143
|
type: "primary",
|
|
2087
2144
|
icon: unref(Download),
|
|
2088
|
-
onClick:
|
|
2145
|
+
onClick: v[3] || (v[3] = (k) => m.value.exportData()),
|
|
2089
2146
|
disabled: g.value == 0
|
|
2090
2147
|
}, {
|
|
2091
2148
|
default: withCtx(() => [
|
|
@@ -2096,7 +2153,7 @@ const SafeCall$1 = async (o, r) => {
|
|
|
2096
2153
|
createVNode(unref(ElButton), {
|
|
2097
2154
|
type: "primary",
|
|
2098
2155
|
icon: unref(Document),
|
|
2099
|
-
onClick:
|
|
2156
|
+
onClick: v[4] || (v[4] = (k) => R()),
|
|
2100
2157
|
disabled: g.value == 0
|
|
2101
2158
|
}, {
|
|
2102
2159
|
default: withCtx(() => [
|
|
@@ -2107,7 +2164,7 @@ const SafeCall$1 = async (o, r) => {
|
|
|
2107
2164
|
createVNode(unref(ElButton), {
|
|
2108
2165
|
type: "success",
|
|
2109
2166
|
icon: unref(Printer),
|
|
2110
|
-
onClick:
|
|
2167
|
+
onClick: v[5] || (v[5] = (k) => m.value.printData()),
|
|
2111
2168
|
disabled: g.value == 0
|
|
2112
2169
|
}, {
|
|
2113
2170
|
default: withCtx(() => [
|
|
@@ -2125,7 +2182,7 @@ const SafeCall$1 = async (o, r) => {
|
|
|
2125
2182
|
]),
|
|
2126
2183
|
_: 1
|
|
2127
2184
|
}, 8, ["icon"]),
|
|
2128
|
-
renderSlot(
|
|
2185
|
+
renderSlot(_.$slots, "ToolItem", {
|
|
2129
2186
|
powerArray: unref(p),
|
|
2130
2187
|
dataArray: l.value
|
|
2131
2188
|
}, void 0, !0)
|
|
@@ -2134,49 +2191,49 @@ const SafeCall$1 = async (o, r) => {
|
|
|
2134
2191
|
}, 8, ["total", "pageIndex", "pageSize"]),
|
|
2135
2192
|
(openBlock(), createBlock(DataList, {
|
|
2136
2193
|
ref_key: "dataList",
|
|
2137
|
-
ref:
|
|
2194
|
+
ref: m,
|
|
2138
2195
|
class: "dataList",
|
|
2139
|
-
version:
|
|
2196
|
+
version: d.version,
|
|
2140
2197
|
data: l.value,
|
|
2141
|
-
tabName:
|
|
2142
|
-
columnArray:
|
|
2143
|
-
toolWidth:
|
|
2144
|
-
maxCommand:
|
|
2145
|
-
fnGetSelectData:
|
|
2198
|
+
tabName: d.tabName,
|
|
2199
|
+
columnArray: d.columnArray,
|
|
2200
|
+
toolWidth: d.toolWidth,
|
|
2201
|
+
maxCommand: d.maxCommand,
|
|
2202
|
+
fnGetSelectData: d.fnGetSelectData,
|
|
2146
2203
|
onCommand: O,
|
|
2147
2204
|
onSelect: S,
|
|
2148
2205
|
commandArray: D.value,
|
|
2149
2206
|
key: D.value,
|
|
2150
2207
|
powerArray: unref(p),
|
|
2151
|
-
printOption:
|
|
2208
|
+
printOption: d.printOption
|
|
2152
2209
|
}, null, 8, ["version", "data", "tabName", "columnArray", "toolWidth", "maxCommand", "fnGetSelectData", "commandArray", "powerArray", "printOption"])),
|
|
2153
2210
|
createVNode(unref(ElDialog), {
|
|
2154
2211
|
modelValue: a.IsVisible,
|
|
2155
|
-
"onUpdate:modelValue":
|
|
2212
|
+
"onUpdate:modelValue": v[9] || (v[9] = (k) => a.IsVisible = k),
|
|
2156
2213
|
title: a.Title,
|
|
2157
|
-
width:
|
|
2158
|
-
top:
|
|
2214
|
+
width: d.editDlgWidth,
|
|
2215
|
+
top: d.top,
|
|
2159
2216
|
"close-on-click-modal": !1,
|
|
2160
2217
|
"close-on-press-escape": !1,
|
|
2161
|
-
style: normalizeStyle("height:" +
|
|
2218
|
+
style: normalizeStyle("height:" + d.editDlgHeight),
|
|
2162
2219
|
draggable: "",
|
|
2163
2220
|
"destroy-on-close": "",
|
|
2164
2221
|
class: "edit-dialog"
|
|
2165
2222
|
}, {
|
|
2166
2223
|
default: withCtx(() => [
|
|
2167
2224
|
createVNode(unref(ElForm), {
|
|
2168
|
-
inline:
|
|
2169
|
-
"label-width":
|
|
2225
|
+
inline: d.inline,
|
|
2226
|
+
"label-width": d.labelWidth,
|
|
2170
2227
|
class: "myform"
|
|
2171
2228
|
}, {
|
|
2172
2229
|
default: withCtx(() => [
|
|
2173
|
-
renderSlot(
|
|
2230
|
+
renderSlot(_.$slots, "formItem", {
|
|
2174
2231
|
formModel: a.DataModel,
|
|
2175
2232
|
powerArray: unref(p)
|
|
2176
2233
|
}, void 0, !0),
|
|
2177
2234
|
createElementVNode("div", _hoisted_2$8, [
|
|
2178
2235
|
createVNode(unref(ElButton), {
|
|
2179
|
-
onClick:
|
|
2236
|
+
onClick: v[8] || (v[8] = (k) => a.IsVisible = !1)
|
|
2180
2237
|
}, {
|
|
2181
2238
|
default: withCtx(() => [
|
|
2182
2239
|
createTextVNode(toDisplayString(unref(L)("取消")), 1)
|
|
@@ -2236,10 +2293,10 @@ const SafeCall$1 = async (o, r) => {
|
|
|
2236
2293
|
const t = { IgnoreSummary: !0, Rows: r };
|
|
2237
2294
|
let l = !0;
|
|
2238
2295
|
const i = r[0];
|
|
2239
|
-
for (let
|
|
2240
|
-
t[
|
|
2241
|
-
for (let
|
|
2242
|
-
const n = o[
|
|
2296
|
+
for (let c in i)
|
|
2297
|
+
t[c] = i[c];
|
|
2298
|
+
for (let c = 0; c < o.length; c++) {
|
|
2299
|
+
const n = o[c];
|
|
2243
2300
|
if (l && n.isHeBing) {
|
|
2244
2301
|
t[n.dataKey] = r[0][n.dataKey];
|
|
2245
2302
|
continue;
|
|
@@ -2252,22 +2309,22 @@ const SafeCall$1 = async (o, r) => {
|
|
|
2252
2309
|
t[n.dataKey] = "-";
|
|
2253
2310
|
continue;
|
|
2254
2311
|
}
|
|
2255
|
-
let a = !1,
|
|
2256
|
-
for (let
|
|
2257
|
-
const g = r[
|
|
2258
|
-
!a && regNumber.test(g) && (a = !0),
|
|
2312
|
+
let a = !1, m = 0;
|
|
2313
|
+
for (let u = 0; u < r.length; u++) {
|
|
2314
|
+
const g = r[u][n.dataKey];
|
|
2315
|
+
!a && regNumber.test(g) && (a = !0), m += g * 1;
|
|
2259
2316
|
}
|
|
2260
|
-
t[n.dataKey] = a ?
|
|
2317
|
+
t[n.dataKey] = a ? m.toFixed(2) : m;
|
|
2261
2318
|
}
|
|
2262
2319
|
e.push(t);
|
|
2263
2320
|
}, appendMergedRows = (o, r, e, t, l) => {
|
|
2264
2321
|
if (e == o.length) {
|
|
2265
|
-
t.forEach((
|
|
2322
|
+
t.forEach((c) => l.push(c)), appendSummaryRow(r, t, l);
|
|
2266
2323
|
return;
|
|
2267
2324
|
}
|
|
2268
|
-
const i = t.GroupBy((
|
|
2269
|
-
for (let
|
|
2270
|
-
appendMergedRows(o, r, e + 1, i[
|
|
2325
|
+
const i = t.GroupBy((c) => c[o[e].dataKey]);
|
|
2326
|
+
for (let c = 0; c < i.length; c++)
|
|
2327
|
+
appendMergedRows(o, r, e + 1, i[c], l);
|
|
2271
2328
|
}, buildMergedSummaryRows = (o, r) => {
|
|
2272
2329
|
if (!shouldBuildMergedSummary(o))
|
|
2273
2330
|
return r;
|
|
@@ -2304,20 +2361,20 @@ const SafeCall$1 = async (o, r) => {
|
|
|
2304
2361
|
},
|
|
2305
2362
|
emits: ["command", "handData", "saveData"],
|
|
2306
2363
|
setup(o, { expose: r, emit: e }) {
|
|
2307
|
-
const t = useSlots(), l = ref([]), i = ref(null),
|
|
2308
|
-
get: () =>
|
|
2309
|
-
}), a = computed(() => buildReportTotalDisplayArray(l.value, n.value)),
|
|
2310
|
-
get: () => buildReportPrintOption(
|
|
2311
|
-
}), g = e, { powerArray: y, runLatestRequest: s, initializePowerArray:
|
|
2312
|
-
props:
|
|
2364
|
+
const t = useSlots(), l = ref([]), i = ref(null), c = computed(() => !!t.FilterItem), n = computed({
|
|
2365
|
+
get: () => m.columnArray.Where((b) => b.isSummary && !b.hideTotal)
|
|
2366
|
+
}), a = computed(() => buildReportTotalDisplayArray(l.value, n.value)), m = o, u = computed({
|
|
2367
|
+
get: () => buildReportPrintOption(m.tabName, m.printOption, L)
|
|
2368
|
+
}), g = e, { powerArray: y, runLatestRequest: s, initializePowerArray: d } = useListQueryCore({
|
|
2369
|
+
props: m,
|
|
2313
2370
|
safeCall: SafeCall$1,
|
|
2314
2371
|
loadPowerApi: (b) => SystemModuleApi("/ModulePowerInfo/Search", b),
|
|
2315
2372
|
translate: L,
|
|
2316
2373
|
fallbackPowerArray: []
|
|
2317
2374
|
}), f = (b, R) => {
|
|
2318
2375
|
g("command", b, R);
|
|
2319
|
-
}, p = (b) => buildMergedSummaryRows(
|
|
2320
|
-
const R =
|
|
2376
|
+
}, p = (b) => buildMergedSummaryRows(m.columnArray, b), C = (b) => {
|
|
2377
|
+
const R = m.handArray(b);
|
|
2321
2378
|
R.forEach((I) => g("handData", I, !1)), l.value = p(R);
|
|
2322
2379
|
}, N = () => {
|
|
2323
2380
|
i.value?.exportData();
|
|
@@ -2325,24 +2382,24 @@ const SafeCall$1 = async (o, r) => {
|
|
|
2325
2382
|
i.value?.printData();
|
|
2326
2383
|
}, S = () => {
|
|
2327
2384
|
l.value = [];
|
|
2328
|
-
}, B = () => s(() => AjaxCallWeb(
|
|
2329
|
-
if (!
|
|
2385
|
+
}, B = () => s(() => AjaxCallWeb(m.url, cloneSearchParams(m.searchParam))), D = () => {
|
|
2386
|
+
if (!m.url) {
|
|
2330
2387
|
S();
|
|
2331
2388
|
return;
|
|
2332
2389
|
}
|
|
2333
2390
|
SafeCall$1(async () => {
|
|
2334
2391
|
let b = await B();
|
|
2335
|
-
b &&
|
|
2392
|
+
b && C(b);
|
|
2336
2393
|
}, L("数据查询中"));
|
|
2337
2394
|
}, O = () => {
|
|
2338
2395
|
i.value?.showColumnDisplayDialog();
|
|
2339
2396
|
};
|
|
2340
2397
|
return onMounted(async () => {
|
|
2341
|
-
await
|
|
2398
|
+
await d(), m.loadData && await D();
|
|
2342
2399
|
}), r({
|
|
2343
2400
|
onSearch: D
|
|
2344
2401
|
}), (b, R) => (openBlock(), createElementBlock("div", _hoisted_1$d, [
|
|
2345
|
-
|
|
2402
|
+
c.value ? (openBlock(), createBlock(Filter, {
|
|
2346
2403
|
key: 0,
|
|
2347
2404
|
class: "filter",
|
|
2348
2405
|
onSearch: D
|
|
@@ -2391,7 +2448,7 @@ const SafeCall$1 = async (o, r) => {
|
|
|
2391
2448
|
]),
|
|
2392
2449
|
_: 3
|
|
2393
2450
|
}),
|
|
2394
|
-
|
|
2451
|
+
m.showTotal && n.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_2$7, [
|
|
2395
2452
|
(openBlock(!0), createElementBlock(Fragment, null, renderList(a.value, (I) => (openBlock(), createElementBlock("div", {
|
|
2396
2453
|
key: I.dataKey || I.title,
|
|
2397
2454
|
class: "total-item"
|
|
@@ -2406,13 +2463,13 @@ const SafeCall$1 = async (o, r) => {
|
|
|
2406
2463
|
class: "dataList",
|
|
2407
2464
|
version: o.version,
|
|
2408
2465
|
data: l.value,
|
|
2409
|
-
tabName:
|
|
2410
|
-
toolWidth:
|
|
2411
|
-
maxCommand:
|
|
2412
|
-
columnArray:
|
|
2466
|
+
tabName: m.tabName,
|
|
2467
|
+
toolWidth: m.toolWidth,
|
|
2468
|
+
maxCommand: m.maxCommand,
|
|
2469
|
+
columnArray: m.columnArray,
|
|
2413
2470
|
onCommand: f,
|
|
2414
|
-
commandArray:
|
|
2415
|
-
printOption:
|
|
2471
|
+
commandArray: m.commandArray,
|
|
2472
|
+
printOption: u.value
|
|
2416
2473
|
}, null, 8, ["version", "data", "tabName", "toolWidth", "maxCommand", "columnArray", "commandArray", "printOption"])
|
|
2417
2474
|
]));
|
|
2418
2475
|
}
|
|
@@ -2430,95 +2487,95 @@ const SafeCall$1 = async (o, r) => {
|
|
|
2430
2487
|
const e = o, t = r, l = ref(["", ""]);
|
|
2431
2488
|
watch(
|
|
2432
2489
|
() => e.BeginTime,
|
|
2433
|
-
(
|
|
2490
|
+
(u) => {
|
|
2434
2491
|
l.value[0] = e.BeginTime;
|
|
2435
2492
|
}
|
|
2436
2493
|
), watch(
|
|
2437
2494
|
() => e.EndTime,
|
|
2438
|
-
(
|
|
2495
|
+
(u) => l.value[1] = e.EndTime
|
|
2439
2496
|
);
|
|
2440
2497
|
const i = computed({
|
|
2441
2498
|
get: () => {
|
|
2442
2499
|
if (e.MaxTime) {
|
|
2443
|
-
let
|
|
2444
|
-
return g <
|
|
2500
|
+
let u = e.MaxTime.ToDateTime(), g = u.ToString("yyyy-MM-dd 00:00:00").ToDateTime();
|
|
2501
|
+
return g < u ? g.ToString("yyyy-MM-dd 00:00:00").ToDateTime().AddDays(1) : u;
|
|
2445
2502
|
} else return null;
|
|
2446
2503
|
}
|
|
2447
|
-
}),
|
|
2504
|
+
}), c = computed({
|
|
2448
2505
|
get: () => e.MinTime ? e.MinTime.ToDateTime().ToString("yyyy-MM-dd 00:00:00").ToDateTime() : null
|
|
2449
|
-
}), n = (
|
|
2506
|
+
}), n = (u) => {
|
|
2450
2507
|
let g = !0;
|
|
2451
|
-
return
|
|
2508
|
+
return c.value && (g = g && u >= c.value), i.value && (g = g && u <= i.value), !g;
|
|
2452
2509
|
}, a = () => {
|
|
2453
2510
|
l.value != null ? (t("update:BeginTime", l.value[0]), t("update:EndTime", l.value[1])) : (t("update:BeginTime", ""), t("update:EndTime", ""), l.value = ["", ""]), t("change");
|
|
2454
|
-
},
|
|
2511
|
+
}, m = [
|
|
2455
2512
|
{
|
|
2456
2513
|
text: L("今天"),
|
|
2457
2514
|
value: () => {
|
|
2458
|
-
let
|
|
2459
|
-
return [
|
|
2515
|
+
let u = /* @__PURE__ */ new Date();
|
|
2516
|
+
return [u.ToString("yyyy-MM-dd 00:00:00"), u.ToString("yyyy-MM-dd 23:59:59")];
|
|
2460
2517
|
}
|
|
2461
2518
|
},
|
|
2462
2519
|
{
|
|
2463
2520
|
text: L("最近七天"),
|
|
2464
2521
|
value: () => {
|
|
2465
|
-
let
|
|
2466
|
-
return [
|
|
2522
|
+
let u = /* @__PURE__ */ new Date();
|
|
2523
|
+
return [u.AddDays(-7).ToString("yyyy-MM-dd 00:00:00"), u.ToString("yyyy-MM-dd 23:59:59")];
|
|
2467
2524
|
}
|
|
2468
2525
|
},
|
|
2469
2526
|
{
|
|
2470
2527
|
text: L("最近30天"),
|
|
2471
2528
|
value: () => {
|
|
2472
|
-
let
|
|
2473
|
-
return [
|
|
2529
|
+
let u = /* @__PURE__ */ new Date();
|
|
2530
|
+
return [u.AddDays(-30).ToString("yyyy-MM-dd 00:00:00"), u.ToString("yyyy-MM-dd 23:59:59")];
|
|
2474
2531
|
}
|
|
2475
2532
|
},
|
|
2476
2533
|
{
|
|
2477
2534
|
text: L("本月"),
|
|
2478
2535
|
value: () => {
|
|
2479
|
-
let
|
|
2480
|
-
return [
|
|
2536
|
+
let u = /* @__PURE__ */ new Date();
|
|
2537
|
+
return [u.AddDays(-u.getDate() + 1).ToString("yyyy-MM-dd 00:00:00"), u.ToString("yyyy-MM-dd 23:59:59")];
|
|
2481
2538
|
}
|
|
2482
2539
|
},
|
|
2483
2540
|
{
|
|
2484
2541
|
text: L("上个周"),
|
|
2485
2542
|
value: () => {
|
|
2486
|
-
let
|
|
2543
|
+
let u = /* @__PURE__ */ new Date(), g = u.AddDays(-u.getDay() - 6), y = u.AddDays(-u.getDay());
|
|
2487
2544
|
return [g.ToString("yyyy-MM-dd 00:00:00"), y.ToString("yyyy-MM-dd 23:59:59")];
|
|
2488
2545
|
}
|
|
2489
2546
|
},
|
|
2490
2547
|
{
|
|
2491
2548
|
text: L("上个月"),
|
|
2492
2549
|
value: () => {
|
|
2493
|
-
let
|
|
2494
|
-
return
|
|
2550
|
+
let u = /* @__PURE__ */ new Date();
|
|
2551
|
+
return u = u.AddDays(-u.getDate()), [u.ToString("yyyy-MM-01 00:00:00"), u.ToString("yyyy-MM-dd 23:59:59")];
|
|
2495
2552
|
}
|
|
2496
2553
|
},
|
|
2497
2554
|
{
|
|
2498
2555
|
text: L("今年"),
|
|
2499
2556
|
value: () => {
|
|
2500
|
-
let
|
|
2501
|
-
return [
|
|
2557
|
+
let u = /* @__PURE__ */ new Date();
|
|
2558
|
+
return [u.ToString("yyyy-01-01 00:00:00"), u.ToString("yyyy-MM-dd 23:59:59")];
|
|
2502
2559
|
}
|
|
2503
2560
|
},
|
|
2504
2561
|
{
|
|
2505
2562
|
text: L("去年"),
|
|
2506
2563
|
value: () => {
|
|
2507
|
-
let
|
|
2508
|
-
return [
|
|
2564
|
+
let u = (/* @__PURE__ */ new Date()).AddYears(-1);
|
|
2565
|
+
return [u.ToString("yyyy-01-01 00:00:00"), u.ToString("yyyy-12-31 23:59:59")];
|
|
2509
2566
|
}
|
|
2510
2567
|
}
|
|
2511
2568
|
];
|
|
2512
2569
|
return onMounted(() => {
|
|
2513
|
-
let
|
|
2514
|
-
e.BeginTime ? l.value[0] = e.BeginTime : (l.value[0] =
|
|
2515
|
-
}), (
|
|
2570
|
+
let u = /* @__PURE__ */ new Date(), g = !1;
|
|
2571
|
+
e.BeginTime ? l.value[0] = e.BeginTime : (l.value[0] = u.ToString("yyyy-MM-dd 00:00:00"), g = !0), e.EndTime ? l.value[1] = e.EndTime : (l.value[1] = u.ToString("yyyy-MM-dd 23:59:59"), g = !0), g && a();
|
|
2572
|
+
}), (u, g) => (openBlock(), createBlock(unref(ElDatePicker), {
|
|
2516
2573
|
modelValue: l.value,
|
|
2517
2574
|
"onUpdate:modelValue": g[0] || (g[0] = (y) => l.value = y),
|
|
2518
2575
|
onChange: a,
|
|
2519
2576
|
type: e.type,
|
|
2520
2577
|
"value-format": "YYYY-MM-DD HH:mm:ss",
|
|
2521
|
-
shortcuts:
|
|
2578
|
+
shortcuts: m,
|
|
2522
2579
|
"range-separator": unref(L)("至"),
|
|
2523
2580
|
"disabled-date": n,
|
|
2524
2581
|
"start-placeholder": unref(L)("开始日期"),
|
|
@@ -2544,17 +2601,17 @@ const SafeCall$1 = async (o, r) => {
|
|
|
2544
2601
|
emits: ["update:modelValue"],
|
|
2545
2602
|
setup(o, { emit: r }) {
|
|
2546
2603
|
const e = o, t = ref([]), l = reactive({ PrintName: "", Direction: "" }), i = r;
|
|
2547
|
-
let
|
|
2604
|
+
let c = null;
|
|
2548
2605
|
const n = computed({
|
|
2549
2606
|
get: () => e.modelValue,
|
|
2550
2607
|
set: (y) => i("update:modelValue", y)
|
|
2551
|
-
}), a = (y, s) => y[s] == null ? "" : y[s],
|
|
2608
|
+
}), a = (y, s) => y[s] == null ? "" : y[s], m = () => {
|
|
2552
2609
|
let y = e.data, s = e.printOption;
|
|
2553
|
-
var
|
|
2554
|
-
s.TitleArray && s.TitleArray.length > 0 ?
|
|
2555
|
-
let p = e.columnArray,
|
|
2610
|
+
var d = "", f = "";
|
|
2611
|
+
s.TitleArray && s.TitleArray.length > 0 ? d = s.TitleArray.map((x, S) => `<tr><th colspan='100' style="font-size:${20 - S * 3}px;border:none;">${x}</th></tr>`).join("") : d = `<tr><th colspan='100' style='font-size:20px;border:none'>${e.title}</th></tr>`, s.FootArray && s.FootArray.length > 0 && (f = s.FootArray.map((x) => `<tr><td colspan='100' style="font-size:18ddpx;border:none;text-align:right">${x}</td></tr>`).join(""));
|
|
2612
|
+
let p = e.columnArray, C = y.map(
|
|
2556
2613
|
(x, S) => `<tr>${p.map((B, D) => {
|
|
2557
|
-
let O =
|
|
2614
|
+
let O = u(x, B, D, S);
|
|
2558
2615
|
return O.colspan == "0" || O.rowspan == "0" ? "" : `<td rowspan="${O.rowspan > 1 ? O.rowspan : ""}" colspan="${O.colspan > 1 ? O.colspan : ""}">${a(x, B.title)}</td>`;
|
|
2559
2616
|
}).join("")}</tr>`
|
|
2560
2617
|
).join("");
|
|
@@ -2574,19 +2631,19 @@ const SafeCall$1 = async (o, r) => {
|
|
|
2574
2631
|
</style>
|
|
2575
2632
|
<table>
|
|
2576
2633
|
<thead>
|
|
2577
|
-
${
|
|
2634
|
+
${d}
|
|
2578
2635
|
<tr>${p.map((x) => `<th>${x.title}</th>`).join("")}</tr>
|
|
2579
2636
|
</thead>
|
|
2580
2637
|
<tbody>
|
|
2581
|
-
${
|
|
2638
|
+
${C}
|
|
2582
2639
|
|
|
2583
2640
|
${f}
|
|
2584
2641
|
</tbody>
|
|
2585
2642
|
</table>`;
|
|
2586
|
-
},
|
|
2643
|
+
}, u = (y, s, d, f) => {
|
|
2587
2644
|
if (s.title == null) return { rowspan: 1, colspan: 1 };
|
|
2588
|
-
let p = s.title,
|
|
2589
|
-
if (
|
|
2645
|
+
let p = s.title, C = e.columnArray.FirstOrDefault((S) => S.title == p);
|
|
2646
|
+
if (C == null || !C.isHeBing) return { rowspan: 1, colspan: 1 };
|
|
2590
2647
|
let N = y[p];
|
|
2591
2648
|
if (f > 0 && N == e.data[f - 1][p])
|
|
2592
2649
|
return { rowspan: 0, colspan: 0 };
|
|
@@ -2599,31 +2656,31 @@ const SafeCall$1 = async (o, r) => {
|
|
|
2599
2656
|
};
|
|
2600
2657
|
}, g = () => {
|
|
2601
2658
|
if (t.value.length == 0) return ElMessageBox.alert(L("未发现打印机"));
|
|
2602
|
-
if (
|
|
2659
|
+
if (c == null)
|
|
2603
2660
|
return window.open("//proxy.ip239.com/saas/CommonApp/Lodop6.226_Clodop3.083.zip", "newwindow"), ElMessageBox.alert(L("电脑尚未安装打印机插件!请先下载并解压安装"));
|
|
2604
|
-
var y =
|
|
2605
|
-
l.PrintName &&
|
|
2661
|
+
var y = m();
|
|
2662
|
+
l.PrintName && c.SET_PRINTER_INDEXA(l.PrintName), l.Direction == 1 ? c.SET_PRINT_PAGESIZE(2, 0, 0, "A4") : c.SET_PRINT_PAGESIZE(1, 0, 0, "A4"), c.ADD_PRINT_HTM(0, 0, "100%", "100%", y), c.PRINT(), i("update:modelValue", !1), ElMessage({ message: L("数据打印成功") });
|
|
2606
2663
|
};
|
|
2607
2664
|
return watch(
|
|
2608
2665
|
() => e.modelValue,
|
|
2609
2666
|
(y) => {
|
|
2610
|
-
if (y &&
|
|
2667
|
+
if (y && c == null) {
|
|
2611
2668
|
if (!window.getLodop) {
|
|
2612
2669
|
console.log("未引入Lodop插件");
|
|
2613
2670
|
return;
|
|
2614
2671
|
}
|
|
2615
|
-
|
|
2616
|
-
let s =
|
|
2672
|
+
c = getLodop();
|
|
2673
|
+
let s = c.GET_PRINTER_COUNT();
|
|
2617
2674
|
if (s == 0) {
|
|
2618
2675
|
console.log("电脑无打印机");
|
|
2619
2676
|
return;
|
|
2620
2677
|
}
|
|
2621
|
-
for (let
|
|
2678
|
+
for (let d = 0; d < s; d++) t.value.push(c.GET_PRINTER_NAME(d));
|
|
2622
2679
|
}
|
|
2623
2680
|
}
|
|
2624
2681
|
), (y, s) => (openBlock(), createBlock(unref(ElDialog), {
|
|
2625
2682
|
modelValue: n.value,
|
|
2626
|
-
"onUpdate:modelValue": s[2] || (s[2] = (
|
|
2683
|
+
"onUpdate:modelValue": s[2] || (s[2] = (d) => n.value = d),
|
|
2627
2684
|
title: unref(L)("打印配置"),
|
|
2628
2685
|
width: "600px"
|
|
2629
2686
|
}, {
|
|
@@ -2633,7 +2690,7 @@ const SafeCall$1 = async (o, r) => {
|
|
|
2633
2690
|
createElementVNode("label", _hoisted_1$c, toDisplayString(unref(L)("打印机")), 1),
|
|
2634
2691
|
createVNode(unref(ElSelect), {
|
|
2635
2692
|
modelValue: l.PrintName,
|
|
2636
|
-
"onUpdate:modelValue": s[0] || (s[0] = (
|
|
2693
|
+
"onUpdate:modelValue": s[0] || (s[0] = (d) => l.PrintName = d),
|
|
2637
2694
|
style: { width: "150px" }
|
|
2638
2695
|
}, {
|
|
2639
2696
|
default: withCtx(() => [
|
|
@@ -2641,9 +2698,9 @@ const SafeCall$1 = async (o, r) => {
|
|
|
2641
2698
|
value: "",
|
|
2642
2699
|
label: unref(L)("默认打印机")
|
|
2643
2700
|
}, null, 8, ["label"]),
|
|
2644
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(t.value, (
|
|
2645
|
-
value:
|
|
2646
|
-
label:
|
|
2701
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(t.value, (d) => (openBlock(), createBlock(unref(ElOption), {
|
|
2702
|
+
value: d,
|
|
2703
|
+
label: d
|
|
2647
2704
|
}, null, 8, ["value", "label"]))), 256))
|
|
2648
2705
|
]),
|
|
2649
2706
|
_: 1
|
|
@@ -2656,7 +2713,7 @@ const SafeCall$1 = async (o, r) => {
|
|
|
2656
2713
|
createElementVNode("label", _hoisted_2$6, toDisplayString(unref(L)("打印方向")), 1),
|
|
2657
2714
|
createVNode(unref(ElSelect), {
|
|
2658
2715
|
modelValue: l.Direction,
|
|
2659
|
-
"onUpdate:modelValue": s[1] || (s[1] = (
|
|
2716
|
+
"onUpdate:modelValue": s[1] || (s[1] = (d) => l.Direction = d),
|
|
2660
2717
|
style: { width: "150px" }
|
|
2661
2718
|
}, {
|
|
2662
2719
|
default: withCtx(() => [
|
|
@@ -2721,18 +2778,18 @@ class appendix extends BtnMenu {
|
|
|
2721
2778
|
}
|
|
2722
2779
|
};
|
|
2723
2780
|
for (let i = 0; i < this.files.length; i++) {
|
|
2724
|
-
let
|
|
2725
|
-
if ((
|
|
2781
|
+
let c = this.files[i];
|
|
2782
|
+
if ((c.type == "image/jpeg" || c.type == "image/png" || c.type == "image/bmp") && c.size / 1024 > 600)
|
|
2726
2783
|
return alert("图片大小不能超过 600kb!"), !1;
|
|
2727
2784
|
const a = new FileReader();
|
|
2728
|
-
a.readAsDataURL(
|
|
2729
|
-
let
|
|
2785
|
+
a.readAsDataURL(c), a.onload = function() {
|
|
2786
|
+
let u = {
|
|
2730
2787
|
FileData: this.result.substring(this.result.indexOf(",") + 1),
|
|
2731
|
-
FileType:
|
|
2788
|
+
FileType: c.name
|
|
2732
2789
|
};
|
|
2733
|
-
axios.post(t,
|
|
2790
|
+
axios.post(t, u, l).then((g) => {
|
|
2734
2791
|
let y = g.data;
|
|
2735
|
-
y.resultcode == "200" && e.editor.txt.append(`<a href="${y.data}" download="${
|
|
2792
|
+
y.resultcode == "200" && e.editor.txt.append(`<a href="${y.data}" download="${c.name}">${c.name}</a>`);
|
|
2736
2793
|
});
|
|
2737
2794
|
};
|
|
2738
2795
|
}
|
|
@@ -2757,7 +2814,7 @@ const _hoisted_1$b = { style: { width: "100%", height: "100%", border: "1px soli
|
|
|
2757
2814
|
setup(o) {
|
|
2758
2815
|
const r = useModel(o, "modelValue"), e = ref(null), t = ref();
|
|
2759
2816
|
E.registerMenu("appendix", appendix);
|
|
2760
|
-
const l = (i,
|
|
2817
|
+
const l = (i, c) => {
|
|
2761
2818
|
let n = "//npic.ip239.com/ApiHandler.ashx?Action=UploadFileBase64", a = {
|
|
2762
2819
|
method: "post",
|
|
2763
2820
|
responseType: "json",
|
|
@@ -2765,18 +2822,18 @@ const _hoisted_1$b = { style: { width: "100%", height: "100%", border: "1px soli
|
|
|
2765
2822
|
"content-type": "application/json"
|
|
2766
2823
|
}
|
|
2767
2824
|
};
|
|
2768
|
-
i.forEach((
|
|
2769
|
-
if ((
|
|
2825
|
+
i.forEach((m) => {
|
|
2826
|
+
if ((m.type == "image/jpeg" || m.type == "image/png" || m.type == "image/bmp") && m.size / 1024 > 600)
|
|
2770
2827
|
return alert(L("图片大小不能超过 600kb!")), !1;
|
|
2771
2828
|
const g = new FileReader();
|
|
2772
|
-
g.readAsDataURL(
|
|
2829
|
+
g.readAsDataURL(m), g.onload = function() {
|
|
2773
2830
|
let s = {
|
|
2774
2831
|
FileData: this.result.substring(this.result.indexOf(",") + 1),
|
|
2775
|
-
FileType:
|
|
2832
|
+
FileType: m.name
|
|
2776
2833
|
};
|
|
2777
|
-
axios.post(n, s, a).then((
|
|
2778
|
-
let f =
|
|
2779
|
-
f.resultcode == "200" &&
|
|
2834
|
+
axios.post(n, s, a).then((d) => {
|
|
2835
|
+
let f = d.data;
|
|
2836
|
+
f.resultcode == "200" && c(f.data);
|
|
2780
2837
|
});
|
|
2781
2838
|
};
|
|
2782
2839
|
});
|
|
@@ -2790,7 +2847,7 @@ const _hoisted_1$b = { style: { width: "100%", height: "100%", border: "1px soli
|
|
|
2790
2847
|
e.value == null && (e.value = new E(t.value), e.value.config.uploadImgShowBase64 = !0, e.value.config.showLinkImg = !0, e.value.config.menuTooltipPosition = "down", e.value.config.onchangeTimeout = 1e3, e.value.config.uploadImgAccept = ["jpg", "jpeg", "png", "gif", "bmp", "webp"], e.value.config.customUploadImg = l, e.value.config.customUploadVideo = l, e.value.config.onchange = (i) => {
|
|
2791
2848
|
i != r.value && (r.value = i);
|
|
2792
2849
|
}, e.value.create()), e.value.txt.html(r.value);
|
|
2793
|
-
}), (i,
|
|
2850
|
+
}), (i, c) => (openBlock(), createElementBlock("div", _hoisted_1$b, [
|
|
2794
2851
|
createElementVNode("div", {
|
|
2795
2852
|
ref_key: "richText",
|
|
2796
2853
|
ref: t,
|
|
@@ -2816,14 +2873,14 @@ const _hoisted_1$b = { style: { width: "100%", height: "100%", border: "1px soli
|
|
|
2816
2873
|
const e = o, t = useModel(o, "modelValue"), l = reactive({
|
|
2817
2874
|
isVisible: !1,
|
|
2818
2875
|
picUrl: ""
|
|
2819
|
-
}), i = r,
|
|
2876
|
+
}), i = r, c = computed({
|
|
2820
2877
|
get: () => `//npic.ip239.com/ApiHandler.ashx?Action=${e.headPic ? "UploadHeadPic" : "UploadFile"}&Token=${sessionStorage.getItem("Token")}&IsNoZip=${e.isNoZip ? "1" : "0"}`
|
|
2821
|
-
}), n = (s) => new Promise((
|
|
2878
|
+
}), n = (s) => new Promise((d) => {
|
|
2822
2879
|
const f = new Image();
|
|
2823
|
-
f.onload = () =>
|
|
2880
|
+
f.onload = () => d(!0), f.onerror = () => d(!1), f.src = getUrl(s);
|
|
2824
2881
|
}), a = async (s) => {
|
|
2825
2882
|
try {
|
|
2826
|
-
let
|
|
2883
|
+
let d = await AjaxCallWeb(
|
|
2827
2884
|
"//npic.ip239.com/Api/UploadHeadPicBase64",
|
|
2828
2885
|
{
|
|
2829
2886
|
FileData: s,
|
|
@@ -2834,41 +2891,41 @@ const _hoisted_1$b = { style: { width: "100%", height: "100%", border: "1px soli
|
|
|
2834
2891
|
},
|
|
2835
2892
|
e.timeOut * 1
|
|
2836
2893
|
);
|
|
2837
|
-
for (let f = 0; f < 5 && !await n(
|
|
2894
|
+
for (let f = 0; f < 5 && !await n(d); f++)
|
|
2838
2895
|
await Sleep(1e3);
|
|
2839
|
-
return
|
|
2840
|
-
} catch (
|
|
2841
|
-
if (console.log(
|
|
2842
|
-
${
|
|
2896
|
+
return d;
|
|
2897
|
+
} catch (d) {
|
|
2898
|
+
if (console.log(d), confirm(`因网络波动,上传图片遇到异常!!\r
|
|
2899
|
+
${d.message || d.resultcontent}\r
|
|
2843
2900
|
请问是否进行重试??`))
|
|
2844
2901
|
return await a(s);
|
|
2845
2902
|
}
|
|
2846
2903
|
return null;
|
|
2847
|
-
},
|
|
2904
|
+
}, m = async () => {
|
|
2848
2905
|
let s = null;
|
|
2849
2906
|
try {
|
|
2850
2907
|
s = await AjaxCallWeb("http://localhost:18008/AForge/TakePictures", { IsTakeFace: e.headPic ? 1 : 0 });
|
|
2851
|
-
} catch (
|
|
2852
|
-
let f =
|
|
2908
|
+
} catch (d) {
|
|
2909
|
+
let f = d.resultcontent || d.message;
|
|
2853
2910
|
if (f == "取消") return;
|
|
2854
2911
|
ElMessage.error(f);
|
|
2855
2912
|
return;
|
|
2856
2913
|
}
|
|
2857
2914
|
SafeCall$1(async () => {
|
|
2858
|
-
let
|
|
2859
|
-
|
|
2915
|
+
let d = await a(s.PicData);
|
|
2916
|
+
d != null && (t.value = d, i("change"));
|
|
2860
2917
|
}, "数据上传中");
|
|
2861
|
-
},
|
|
2918
|
+
}, u = () => {
|
|
2862
2919
|
t.value = "", i("change");
|
|
2863
2920
|
}, g = (s) => s.indexOf(".jpg") >= 0 || s.indexOf(".png") >= 0 || s.indexOf(".bmp") >= 0 || e.isImage, y = (s) => {
|
|
2864
2921
|
if (s.resultcode != "200")
|
|
2865
2922
|
return ElMessage.error(L("文件上传失败") + ":" + s.resultcontent);
|
|
2866
2923
|
t.value = s.data, i("change");
|
|
2867
2924
|
};
|
|
2868
|
-
return (s,
|
|
2925
|
+
return (s, d) => (openBlock(), createElementBlock("div", null, [
|
|
2869
2926
|
createVNode(unref(ElUpload), {
|
|
2870
2927
|
class: "avatar-uploader",
|
|
2871
|
-
action:
|
|
2928
|
+
action: c.value,
|
|
2872
2929
|
"show-file-list": !1,
|
|
2873
2930
|
"on-success": y
|
|
2874
2931
|
}, {
|
|
@@ -2916,7 +2973,7 @@ ${u.message || u.resultcontent}\r
|
|
|
2916
2973
|
e.isImage ? (openBlock(), createBlock(unref(ElButton), {
|
|
2917
2974
|
key: 0,
|
|
2918
2975
|
type: "success",
|
|
2919
|
-
onClick:
|
|
2976
|
+
onClick: m,
|
|
2920
2977
|
style: { "margin-left": "10px" }
|
|
2921
2978
|
}, {
|
|
2922
2979
|
default: withCtx(() => [
|
|
@@ -2927,7 +2984,7 @@ ${u.message || u.resultcontent}\r
|
|
|
2927
2984
|
e.modelValue ? (openBlock(), createBlock(unref(ElButton), {
|
|
2928
2985
|
key: 1,
|
|
2929
2986
|
type: "danger",
|
|
2930
|
-
onClick:
|
|
2987
|
+
onClick: u
|
|
2931
2988
|
}, {
|
|
2932
2989
|
default: withCtx(() => [
|
|
2933
2990
|
createTextVNode(toDisplayString(unref(L)("删除")), 1)
|
|
@@ -2937,7 +2994,7 @@ ${u.message || u.resultcontent}\r
|
|
|
2937
2994
|
]),
|
|
2938
2995
|
createVNode(unref(ElDialog), {
|
|
2939
2996
|
modelValue: l.isVisible,
|
|
2940
|
-
"onUpdate:modelValue":
|
|
2997
|
+
"onUpdate:modelValue": d[0] || (d[0] = (f) => l.isVisible = f),
|
|
2941
2998
|
top: "1vh"
|
|
2942
2999
|
}, {
|
|
2943
3000
|
default: withCtx(() => [
|
|
@@ -2974,7 +3031,7 @@ ${u.message || u.resultcontent}\r
|
|
|
2974
3031
|
picUrl: ""
|
|
2975
3032
|
}), i = computed({
|
|
2976
3033
|
get: () => `//npic.ip239.com/ApiHandler.ashx?Action=${t.headPic ? "UploadHeadPic" : "UploadFile"}&Token=${sessionStorage.getItem("Token")}&IsNoZip=${t.isNoZip ? "1" : "0"}`
|
|
2977
|
-
}),
|
|
3034
|
+
}), c = r, n = () => {
|
|
2978
3035
|
e.value && (typeof e.value == "string" ? l.fileArray = e.value.split(t.splitSymbol).filter((g) => g).Select((g, y) => ({ name: `图${y}`, url: g })) : (l.fileArray = [], e.value.forEach((g, y) => l.fileArray.push({ name: `图${y}`, url: g }))));
|
|
2979
3036
|
};
|
|
2980
3037
|
watch(
|
|
@@ -2987,16 +3044,16 @@ ${u.message || u.resultcontent}\r
|
|
|
2987
3044
|
});
|
|
2988
3045
|
const a = (g) => {
|
|
2989
3046
|
l.isVisible = !0, l.picUrl = g.url;
|
|
2990
|
-
},
|
|
2991
|
-
let s = g.url,
|
|
2992
|
-
typeof e.value == "string" ? e.value =
|
|
2993
|
-
},
|
|
3047
|
+
}, m = (g, y) => {
|
|
3048
|
+
let s = g.url, d = l.fileArray.filter((f) => f.url != s);
|
|
3049
|
+
typeof e.value == "string" ? e.value = d.Select((f) => f.url).join(t.splitSymbol) : e.value = d.Select((f) => f.url), c("change");
|
|
3050
|
+
}, u = (g, y, s) => {
|
|
2994
3051
|
if (g.resultcode != "200")
|
|
2995
3052
|
return ElMessage.error(L("文件上传失败") + ":" + g.resultcontent);
|
|
2996
3053
|
if (l.fileArray.Exists((f) => f.url == g.data))
|
|
2997
3054
|
return l.fileArray = l.fileArray.Where((f) => !f.response), ElMessage.error(L("文件已存在"));
|
|
2998
|
-
let
|
|
2999
|
-
|
|
3055
|
+
let d = l.fileArray.Where((f) => !f.response).Select((f) => f.url);
|
|
3056
|
+
d.push(g.data), typeof e.value == "string" ? e.value = d.join(t.splitSymbol) : e.value = d, c("change");
|
|
3000
3057
|
};
|
|
3001
3058
|
return (g, y) => (openBlock(), createElementBlock("div", null, [
|
|
3002
3059
|
createVNode(unref(ElUpload), {
|
|
@@ -3005,8 +3062,8 @@ ${u.message || u.resultcontent}\r
|
|
|
3005
3062
|
action: i.value,
|
|
3006
3063
|
class: "avatar-uploader",
|
|
3007
3064
|
"list-type": "picture-card",
|
|
3008
|
-
"on-success":
|
|
3009
|
-
"on-remove":
|
|
3065
|
+
"on-success": u,
|
|
3066
|
+
"on-remove": m,
|
|
3010
3067
|
"on-preview": a
|
|
3011
3068
|
}, {
|
|
3012
3069
|
default: withCtx(() => [
|
|
@@ -3055,7 +3112,7 @@ ${u.message || u.resultcontent}\r
|
|
|
3055
3112
|
const e = useModel(o, "modelValue"), t = r, l = () => {
|
|
3056
3113
|
t("change");
|
|
3057
3114
|
}, i = o;
|
|
3058
|
-
return (
|
|
3115
|
+
return (c, n) => (openBlock(), createElementBlock("div", _hoisted_1$a, [
|
|
3059
3116
|
o.multiple ? (openBlock(), createBlock(MultipleUploadPic, {
|
|
3060
3117
|
key: 0,
|
|
3061
3118
|
modelValue: e.value,
|
|
@@ -3109,10 +3166,10 @@ ${u.message || u.resultcontent}\r
|
|
|
3109
3166
|
}), i = computed({
|
|
3110
3167
|
get: () => `//proxy.ip239.com/saas/NoPowerApi/GetQrCode?size=${e.size}&text=${encodeURIComponent(e.text)}&color=${e.color}&bkcolor=${e.bkcolor}&logo=${e.logo}`
|
|
3111
3168
|
});
|
|
3112
|
-
function
|
|
3113
|
-
return new Promise((s,
|
|
3169
|
+
function c(n, a) {
|
|
3170
|
+
return new Promise((s, d) => {
|
|
3114
3171
|
try {
|
|
3115
|
-
if (!n) return
|
|
3172
|
+
if (!n) return d(new Error("Source parameter required"));
|
|
3116
3173
|
const f = () => {
|
|
3117
3174
|
if (typeof n == "string") return {
|
|
3118
3175
|
url: n,
|
|
@@ -3127,41 +3184,41 @@ ${u.message || u.resultcontent}\r
|
|
|
3127
3184
|
name: a || "canvas.png"
|
|
3128
3185
|
};
|
|
3129
3186
|
throw new Error("Unsupported source type");
|
|
3130
|
-
}, { url: p, name:
|
|
3131
|
-
if (x.crossOrigin = "Anonymous", N) return
|
|
3187
|
+
}, { url: p, name: C } = f(), N = n instanceof HTMLCanvasElement, x = new Image();
|
|
3188
|
+
if (x.crossOrigin = "Anonymous", N) return m(n, C);
|
|
3132
3189
|
x.onload = function() {
|
|
3133
3190
|
try {
|
|
3134
3191
|
if (window.Blob && window.URL) {
|
|
3135
3192
|
const S = new XMLHttpRequest();
|
|
3136
3193
|
S.open("GET", p, !0), S.responseType = "blob", S.onload = () => {
|
|
3137
|
-
S.status === 200 &&
|
|
3138
|
-
}, S.onerror =
|
|
3194
|
+
S.status === 200 && u(S.response, C);
|
|
3195
|
+
}, S.onerror = d, S.send();
|
|
3139
3196
|
} else
|
|
3140
|
-
g(x,
|
|
3197
|
+
g(x, C);
|
|
3141
3198
|
} catch (S) {
|
|
3142
|
-
|
|
3199
|
+
d(S);
|
|
3143
3200
|
}
|
|
3144
|
-
}, x.onerror =
|
|
3201
|
+
}, x.onerror = d, x.src = p;
|
|
3145
3202
|
} catch (f) {
|
|
3146
|
-
|
|
3203
|
+
d(f);
|
|
3147
3204
|
}
|
|
3148
3205
|
});
|
|
3149
|
-
function
|
|
3206
|
+
function m(s, d) {
|
|
3150
3207
|
s.toBlob ? s.toBlob((f) => {
|
|
3151
|
-
|
|
3152
|
-
}) : g(s,
|
|
3208
|
+
u(f, d);
|
|
3209
|
+
}) : g(s, d);
|
|
3153
3210
|
}
|
|
3154
|
-
function
|
|
3211
|
+
function u(s, d) {
|
|
3155
3212
|
const f = URL.createObjectURL(s);
|
|
3156
|
-
y(f,
|
|
3213
|
+
y(f, d), setTimeout(() => URL.revokeObjectURL(f), 100);
|
|
3157
3214
|
}
|
|
3158
|
-
function g(s,
|
|
3215
|
+
function g(s, d) {
|
|
3159
3216
|
const f = s.src || s.toDataURL();
|
|
3160
|
-
y(f,
|
|
3217
|
+
y(f, d);
|
|
3161
3218
|
}
|
|
3162
|
-
function y(s,
|
|
3219
|
+
function y(s, d) {
|
|
3163
3220
|
const f = document.createElement("a");
|
|
3164
|
-
if (f.href = s, f.download =
|
|
3221
|
+
if (f.href = s, f.download = d.replace(/[\/\\]/g, "_"), f.style.display = "none", typeof MouseEvent == "function")
|
|
3165
3222
|
f.dispatchEvent(new MouseEvent("click"));
|
|
3166
3223
|
else {
|
|
3167
3224
|
const p = document.createEvent("MouseEvents");
|
|
@@ -3172,7 +3229,7 @@ ${u.message || u.resultcontent}\r
|
|
|
3172
3229
|
}
|
|
3173
3230
|
return (n, a) => (openBlock(), createBlock(unref(ElDialog), {
|
|
3174
3231
|
modelValue: l.value,
|
|
3175
|
-
"onUpdate:modelValue": a[1] || (a[1] = (
|
|
3232
|
+
"onUpdate:modelValue": a[1] || (a[1] = (m) => l.value = m),
|
|
3176
3233
|
width: "480px",
|
|
3177
3234
|
style: { height: "680px" },
|
|
3178
3235
|
top: "1vh"
|
|
@@ -3202,7 +3259,7 @@ ${u.message || u.resultcontent}\r
|
|
|
3202
3259
|
o.showDown ? (openBlock(), createElementBlock("div", _hoisted_8$3, [
|
|
3203
3260
|
createVNode(unref(ElLink), {
|
|
3204
3261
|
type: "primary",
|
|
3205
|
-
onClick: a[0] || (a[0] = (
|
|
3262
|
+
onClick: a[0] || (a[0] = (m) => c(i.value, e.title + ".jpg"))
|
|
3206
3263
|
}, {
|
|
3207
3264
|
default: withCtx(() => [
|
|
3208
3265
|
createTextVNode(toDisplayString(unref(L)("下载二维码")), 1)
|
|
@@ -3231,39 +3288,39 @@ ${u.message || u.resultcontent}\r
|
|
|
3231
3288
|
},
|
|
3232
3289
|
emits: ["update:modelValue"],
|
|
3233
3290
|
setup(o, { emit: r }) {
|
|
3234
|
-
const e = useRouter(), t = useRoute(), l = r, i = o,
|
|
3291
|
+
const e = useRouter(), t = useRoute(), l = r, i = o, c = ref(""), n = computed({
|
|
3235
3292
|
get: () => i.modelValue,
|
|
3236
|
-
set: (
|
|
3293
|
+
set: (m) => l("update:modelValue", m)
|
|
3237
3294
|
});
|
|
3238
|
-
watch(() => i.modelValue, (
|
|
3239
|
-
|
|
3295
|
+
watch(() => i.modelValue, (m) => {
|
|
3296
|
+
m && (c.value = a());
|
|
3240
3297
|
});
|
|
3241
3298
|
const a = () => {
|
|
3242
3299
|
if (i.url) {
|
|
3243
|
-
let
|
|
3244
|
-
if (
|
|
3245
|
-
for (let
|
|
3246
|
-
|
|
3247
|
-
return
|
|
3300
|
+
let m = i.url;
|
|
3301
|
+
if (m.indexOf("?") >= 0 ? m += "&Token=" + t.query.Token : m += "?Token=" + t.query.Token, i.params)
|
|
3302
|
+
for (let u in i.params)
|
|
3303
|
+
m += `&${u}=${i.params[u]}`;
|
|
3304
|
+
return m;
|
|
3248
3305
|
} else {
|
|
3249
|
-
let
|
|
3250
|
-
for (let y in
|
|
3251
|
-
g += `&${y}=${encodeURIComponent(
|
|
3252
|
-
return window.location.origin + window.location.pathname +
|
|
3306
|
+
let m = i.params || {}, u = e.resolve({ name: i.name, query: { Token: t.query.Token } }), g = "";
|
|
3307
|
+
for (let y in m)
|
|
3308
|
+
g += `&${y}=${encodeURIComponent(m[y])}`;
|
|
3309
|
+
return window.location.origin + window.location.pathname + u.href + g + "&cachetime=";
|
|
3253
3310
|
}
|
|
3254
3311
|
};
|
|
3255
|
-
return (
|
|
3312
|
+
return (m, u) => (openBlock(), createBlock(unref(ElDialog), {
|
|
3256
3313
|
title: unref(L)(i.name),
|
|
3257
|
-
key:
|
|
3314
|
+
key: c.value,
|
|
3258
3315
|
modelValue: n.value,
|
|
3259
|
-
"onUpdate:modelValue":
|
|
3316
|
+
"onUpdate:modelValue": u[0] || (u[0] = (g) => n.value = g),
|
|
3260
3317
|
top: "1vh",
|
|
3261
3318
|
style: normalizeStyle("width:" + i.width)
|
|
3262
3319
|
}, {
|
|
3263
3320
|
default: withCtx(() => [
|
|
3264
3321
|
n.value ? (openBlock(), createElementBlock("iframe", {
|
|
3265
3322
|
key: 0,
|
|
3266
|
-
src:
|
|
3323
|
+
src: c.value,
|
|
3267
3324
|
style: normalizeStyle("border: none;width:100%;height:" + i.height)
|
|
3268
3325
|
}, null, 12, _hoisted_1$8)) : createCommentVNode("", !0)
|
|
3269
3326
|
]),
|
|
@@ -3293,7 +3350,7 @@ ${u.message || u.resultcontent}\r
|
|
|
3293
3350
|
createVNode(_sfc_main$b, {
|
|
3294
3351
|
name: e.name,
|
|
3295
3352
|
modelValue: r.value,
|
|
3296
|
-
"onUpdate:modelValue": i[0] || (i[0] = (
|
|
3353
|
+
"onUpdate:modelValue": i[0] || (i[0] = (c) => r.value = c),
|
|
3297
3354
|
url: e.url
|
|
3298
3355
|
}, null, 8, ["name", "modelValue", "url"])
|
|
3299
3356
|
], 64));
|
|
@@ -3322,18 +3379,18 @@ ${u.message || u.resultcontent}\r
|
|
|
3322
3379
|
});
|
|
3323
3380
|
var l = () => {
|
|
3324
3381
|
};
|
|
3325
|
-
const i = ref(""),
|
|
3382
|
+
const i = ref(""), c = ref(300), n = ref(null), a = r, m = computed({
|
|
3326
3383
|
get: () => e.modelValue,
|
|
3327
3384
|
set: (f) => a("update:modelValue", f)
|
|
3328
|
-
}),
|
|
3329
|
-
await l(), await Sleep(300), t.CardType == "0" ?
|
|
3385
|
+
}), u = async () => {
|
|
3386
|
+
await l(), await Sleep(300), t.CardType == "0" ? d() : t.CardType == "9" && s(), a("update:cardType", t.CardType);
|
|
3330
3387
|
};
|
|
3331
3388
|
watch(
|
|
3332
3389
|
() => e.modelValue,
|
|
3333
3390
|
async (f) => {
|
|
3334
|
-
f ? (
|
|
3335
|
-
|
|
3336
|
-
}, 1e3),
|
|
3391
|
+
f ? (c.value = 300, t.Id = "", t.Name = "", t.HeadPortrait = "", t.Sex = "男", t.Address = "", t.Telephone = "", n.value = setInterval(() => {
|
|
3392
|
+
c.value--, c.value == 0 && a("update:modelValue", !1), i.value = `证 件 录 入 (${c.value})`;
|
|
3393
|
+
}, 1e3), u()) : (n.value != null && (clearInterval(n.value), n.value = null), await l());
|
|
3337
3394
|
}
|
|
3338
3395
|
);
|
|
3339
3396
|
const g = () => {
|
|
@@ -3347,7 +3404,7 @@ ${u.message || u.resultcontent}\r
|
|
|
3347
3404
|
}), s = async () => {
|
|
3348
3405
|
l = () => LocalApi("/PassPort/CancelRead");
|
|
3349
3406
|
try {
|
|
3350
|
-
let f = await LocalApi("/PassPort/ReadInfo", { MaxSecord:
|
|
3407
|
+
let f = await LocalApi("/PassPort/ReadInfo", { MaxSecord: c.value * 1e3 });
|
|
3351
3408
|
console.log(f), t.Name = f.Surname + " " + f.GivenName, t.Sex = f.Sex == "M" ? "1" : "0", t.Address = f.Nationality, t.Id = f.DocumentNo;
|
|
3352
3409
|
} catch (f) {
|
|
3353
3410
|
f.resultcontent ? f.resultcontent != "取消读卡" && ElMessageBox.confirm("读取失败:" + f.resultcontent, "错误提示", {
|
|
@@ -3357,10 +3414,10 @@ ${u.message || u.resultcontent}\r
|
|
|
3357
3414
|
s();
|
|
3358
3415
|
}) : ElMessageBox.alert(f.message);
|
|
3359
3416
|
}
|
|
3360
|
-
},
|
|
3417
|
+
}, d = async () => {
|
|
3361
3418
|
l = () => LocalApi("/CancelReadIidentityCard");
|
|
3362
3419
|
try {
|
|
3363
|
-
let p = await LocalApi("/ReadIdentityCard", { MaxSecord:
|
|
3420
|
+
let p = await LocalApi("/ReadIdentityCard", { MaxSecord: c.value * 1e3 });
|
|
3364
3421
|
try {
|
|
3365
3422
|
e.upload ? p.HeadPortrait = await y("bmp", p.HeadPortrait) : p.HeadPortrait = "data:image/png;base64," + p.HeadPortrait;
|
|
3366
3423
|
} catch {
|
|
@@ -3375,8 +3432,8 @@ ${u.message || u.resultcontent}\r
|
|
|
3375
3432
|
return (f, p) => (openBlock(), createElementBlock("div", _hoisted_1$7, [
|
|
3376
3433
|
createVNode(unref(ElDialog), {
|
|
3377
3434
|
title: i.value,
|
|
3378
|
-
modelValue:
|
|
3379
|
-
"onUpdate:modelValue": p[6] || (p[6] = (
|
|
3435
|
+
modelValue: m.value,
|
|
3436
|
+
"onUpdate:modelValue": p[6] || (p[6] = (C) => m.value = C),
|
|
3380
3437
|
width: "600px"
|
|
3381
3438
|
}, {
|
|
3382
3439
|
default: withCtx(() => [
|
|
@@ -3403,7 +3460,7 @@ ${u.message || u.resultcontent}\r
|
|
|
3403
3460
|
p[7] || (p[7] = createElementVNode("span", { style: { width: "80px", display: "inline-block" } }, "姓 名:", -1)),
|
|
3404
3461
|
createVNode(unref(ElInput), {
|
|
3405
3462
|
modelValue: t.Name,
|
|
3406
|
-
"onUpdate:modelValue": p[0] || (p[0] = (
|
|
3463
|
+
"onUpdate:modelValue": p[0] || (p[0] = (C) => t.Name = C),
|
|
3407
3464
|
style: { width: "200px" }
|
|
3408
3465
|
}, null, 8, ["modelValue"])
|
|
3409
3466
|
])
|
|
@@ -3413,7 +3470,7 @@ ${u.message || u.resultcontent}\r
|
|
|
3413
3470
|
p[8] || (p[8] = createElementVNode("span", { style: { width: "80px", display: "inline-block" } }, "性 别:", -1)),
|
|
3414
3471
|
createVNode(unref(ElSelect), {
|
|
3415
3472
|
modelValue: t.Sex,
|
|
3416
|
-
"onUpdate:modelValue": p[1] || (p[1] = (
|
|
3473
|
+
"onUpdate:modelValue": p[1] || (p[1] = (C) => t.Sex = C),
|
|
3417
3474
|
style: { width: "100px" }
|
|
3418
3475
|
}, {
|
|
3419
3476
|
default: withCtx(() => [
|
|
@@ -3435,7 +3492,7 @@ ${u.message || u.resultcontent}\r
|
|
|
3435
3492
|
p[9] || (p[9] = createElementVNode("span", { style: { width: "80px", display: "inline-block" } }, "手机号:", -1)),
|
|
3436
3493
|
createVNode(unref(ElInput), {
|
|
3437
3494
|
modelValue: t.Telephone,
|
|
3438
|
-
"onUpdate:modelValue": p[2] || (p[2] = (
|
|
3495
|
+
"onUpdate:modelValue": p[2] || (p[2] = (C) => t.Telephone = C),
|
|
3439
3496
|
style: { width: "200px" }
|
|
3440
3497
|
}, null, 8, ["modelValue"])
|
|
3441
3498
|
])
|
|
@@ -3445,13 +3502,13 @@ ${u.message || u.resultcontent}\r
|
|
|
3445
3502
|
p[10] || (p[10] = createElementVNode("span", { style: { width: "80px", display: "inline-block" } }, "证件类型:", -1)),
|
|
3446
3503
|
createVNode(unref(ElSelect), {
|
|
3447
3504
|
modelValue: t.CardType,
|
|
3448
|
-
"onUpdate:modelValue": p[3] || (p[3] = (
|
|
3449
|
-
onChange:
|
|
3505
|
+
"onUpdate:modelValue": p[3] || (p[3] = (C) => t.CardType = C),
|
|
3506
|
+
onChange: u,
|
|
3450
3507
|
style: { width: "200px" }
|
|
3451
3508
|
}, {
|
|
3452
3509
|
default: withCtx(() => [
|
|
3453
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(UserCardTypeEnum$1), (
|
|
3454
|
-
value:
|
|
3510
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(UserCardTypeEnum$1), (C, N) => (openBlock(), createBlock(unref(ElOption), {
|
|
3511
|
+
value: C,
|
|
3455
3512
|
label: N
|
|
3456
3513
|
}, null, 8, ["value", "label"]))), 256))
|
|
3457
3514
|
]),
|
|
@@ -3464,7 +3521,7 @@ ${u.message || u.resultcontent}\r
|
|
|
3464
3521
|
p[11] || (p[11] = createElementVNode("span", { style: { width: "80px", display: "inline-block" } }, "户籍地址:", -1)),
|
|
3465
3522
|
createVNode(unref(ElInput), {
|
|
3466
3523
|
modelValue: t.Address,
|
|
3467
|
-
"onUpdate:modelValue": p[4] || (p[4] = (
|
|
3524
|
+
"onUpdate:modelValue": p[4] || (p[4] = (C) => t.Address = C),
|
|
3468
3525
|
style: { width: "400px" }
|
|
3469
3526
|
}, null, 8, ["modelValue"])
|
|
3470
3527
|
])
|
|
@@ -3474,7 +3531,7 @@ ${u.message || u.resultcontent}\r
|
|
|
3474
3531
|
p[12] || (p[12] = createElementVNode("span", { style: { width: "80px", display: "inline-block" } }, "证件号:", -1)),
|
|
3475
3532
|
createVNode(unref(ElInput), {
|
|
3476
3533
|
modelValue: t.Id,
|
|
3477
|
-
"onUpdate:modelValue": p[5] || (p[5] = (
|
|
3534
|
+
"onUpdate:modelValue": p[5] || (p[5] = (C) => t.Id = C),
|
|
3478
3535
|
style: { width: "400px" }
|
|
3479
3536
|
}, null, 8, ["modelValue"])
|
|
3480
3537
|
])
|
|
@@ -3529,7 +3586,7 @@ ${u.message || u.resultcontent}\r
|
|
|
3529
3586
|
return "#55aaff";
|
|
3530
3587
|
}
|
|
3531
3588
|
return "#55aaff";
|
|
3532
|
-
},
|
|
3589
|
+
}, c = async () => {
|
|
3533
3590
|
let n = (/* @__PURE__ */ new Date()).getTime();
|
|
3534
3591
|
await SaasApi("/NoPowerApi/GetServerInfo");
|
|
3535
3592
|
let a = (/* @__PURE__ */ new Date()).getTime() - n;
|
|
@@ -3542,12 +3599,12 @@ ${u.message || u.resultcontent}\r
|
|
|
3542
3599
|
let n = !0;
|
|
3543
3600
|
setTimeout(() => {
|
|
3544
3601
|
n && (e.value = 1);
|
|
3545
|
-
}, 500), await
|
|
3602
|
+
}, 500), await c(), n = !1;
|
|
3546
3603
|
}, 5e3);
|
|
3547
3604
|
}), (n, a) => (openBlock(), createElementBlock("div", _hoisted_1$6, [
|
|
3548
3605
|
createElementVNode("div", _hoisted_2$3, [
|
|
3549
|
-
(openBlock(), createElementBlock(Fragment, null, renderList(6, (
|
|
3550
|
-
class: normalizeClass(l(
|
|
3606
|
+
(openBlock(), createElementBlock(Fragment, null, renderList(6, (m) => createElementVNode("div", {
|
|
3607
|
+
class: normalizeClass(l(m))
|
|
3551
3608
|
}, null, 2)), 64))
|
|
3552
3609
|
]),
|
|
3553
3610
|
createElementVNode("div", {
|
|
@@ -3564,14 +3621,14 @@ ${u.message || u.resultcontent}\r
|
|
|
3564
3621
|
},
|
|
3565
3622
|
emits: ["update:modelValue"],
|
|
3566
3623
|
setup(o, { emit: r }) {
|
|
3567
|
-
const e = o, t = r, l = (
|
|
3568
|
-
let n = (e.totalAmount * (100 -
|
|
3624
|
+
const e = o, t = r, l = (c) => {
|
|
3625
|
+
let n = (e.totalAmount * (100 - c) / 100 / 100).toFixed(2);
|
|
3569
3626
|
t("update:modelValue", n);
|
|
3570
3627
|
}, i = computed({
|
|
3571
3628
|
get: () => e.modelValue,
|
|
3572
|
-
set: (
|
|
3629
|
+
set: (c) => t("update:modelValue", c)
|
|
3573
3630
|
});
|
|
3574
|
-
return (
|
|
3631
|
+
return (c, n) => (openBlock(), createElementBlock("div", null, [
|
|
3575
3632
|
createVNode(unref(ElInput), {
|
|
3576
3633
|
modelValue: i.value,
|
|
3577
3634
|
"onUpdate:modelValue": n[0] || (n[0] = (a) => i.value = a),
|
|
@@ -3751,7 +3808,7 @@ ${u.message || u.resultcontent}\r
|
|
|
3751
3808
|
},
|
|
3752
3809
|
emits: ["success", "cancel"],
|
|
3753
3810
|
setup(o, { expose: r, emit: e }) {
|
|
3754
|
-
const t = reactive({ memberInfo: {}, cardArray: [] }), l = o, i = e,
|
|
3811
|
+
const t = reactive({ memberInfo: {}, cardArray: [] }), l = o, i = e, c = {
|
|
3755
3812
|
停用: "0",
|
|
3756
3813
|
正常: "1",
|
|
3757
3814
|
未激活: "2",
|
|
@@ -3763,7 +3820,7 @@ ${u.message || u.resultcontent}\r
|
|
|
3763
3820
|
t.cardArray = [], t.memberInfo = {}, SafeCall$1(async () => {
|
|
3764
3821
|
try {
|
|
3765
3822
|
let s = await MemberApi("/OrganApi/MemberRelCardSearch", { SearchType: 3, Telephone: y });
|
|
3766
|
-
s = s.Where((
|
|
3823
|
+
s = s.Where((d) => d.Status == c.正常 && d.CardTypeClass != CardTypeClassEnum.钱包卡), l.ckTsCardUse == "不支持" && (s = s.Where((d) => d.CardTypeClass == CardTypeClassEnum.储值卡)), t.cardArray = s;
|
|
3767
3824
|
} catch {
|
|
3768
3825
|
}
|
|
3769
3826
|
try {
|
|
@@ -3771,7 +3828,7 @@ ${u.message || u.resultcontent}\r
|
|
|
3771
3828
|
} catch {
|
|
3772
3829
|
}
|
|
3773
3830
|
}, "会员信息查询中");
|
|
3774
|
-
},
|
|
3831
|
+
}, m = (y, s) => {
|
|
3775
3832
|
y.HasPassWord == 1 ? ElMessageBox.prompt("请输入卡密码", "卡密码", {
|
|
3776
3833
|
cancelButtonText: "取消",
|
|
3777
3834
|
confirmButtonText: "确定",
|
|
@@ -3779,13 +3836,13 @@ ${u.message || u.resultcontent}\r
|
|
|
3779
3836
|
closeOnPressEscape: !1,
|
|
3780
3837
|
closeOnHashChange: !1,
|
|
3781
3838
|
inputType: "password"
|
|
3782
|
-
}).then(({ value:
|
|
3839
|
+
}).then(({ value: d }) => {
|
|
3783
3840
|
SafeCall$1(async () => {
|
|
3784
|
-
let f = await MemberApi("/OrganApi/GetMemberCardIdentityCode", { CardId: y.Id, PassWord:
|
|
3841
|
+
let f = await MemberApi("/OrganApi/GetMemberCardIdentityCode", { CardId: y.Id, PassWord: d, ValidityMinute: 5 });
|
|
3785
3842
|
i("success", f.RCardCode, s);
|
|
3786
3843
|
}, "卡密码验证中");
|
|
3787
3844
|
}) : i("success", "MEM" + y.CardNo, s);
|
|
3788
|
-
},
|
|
3845
|
+
}, u = (y) => {
|
|
3789
3846
|
if (y.CardTypeClass == CardTypeClassEnum.计次卡)
|
|
3790
3847
|
ElMessageBox.prompt("注意:当前使用的是【计次卡】,请根据消费的产品输入需要扣取的次数。默认每张票扣1次!", "计次卡扣费", {
|
|
3791
3848
|
cancelButtonText: "取消",
|
|
@@ -3796,13 +3853,13 @@ ${u.message || u.resultcontent}\r
|
|
|
3796
3853
|
inputPlaceholder: "请输入需要扣取的次数",
|
|
3797
3854
|
inputValue: l.orderInfo.TickCount
|
|
3798
3855
|
}).then(({ value: s }) => {
|
|
3799
|
-
|
|
3856
|
+
m(y, s);
|
|
3800
3857
|
});
|
|
3801
3858
|
else if (y.CardTypeClass == CardTypeClassEnum.周期卡) {
|
|
3802
3859
|
if (!confirm("注意:当前使用的是【周期卡】,将不会扣除余额,请确认是否继续?", "注意"))
|
|
3803
3860
|
return;
|
|
3804
|
-
|
|
3805
|
-
} else if (y.CardTypeClass == CardTypeClassEnum.储值卡) return
|
|
3861
|
+
m(y);
|
|
3862
|
+
} else if (y.CardTypeClass == CardTypeClassEnum.储值卡) return m(y);
|
|
3806
3863
|
}, g = () => {
|
|
3807
3864
|
t.memberInfo.HasPassWord == 1 ? ElMessageBox.prompt("请输入会员支付密码", "支付密码", {
|
|
3808
3865
|
cancelButtonText: "取消",
|
|
@@ -3864,7 +3921,7 @@ ${u.message || u.resultcontent}\r
|
|
|
3864
3921
|
t.memberInfo.Id ? (openBlock(), createBlock(unref(ElButton), {
|
|
3865
3922
|
key: 0,
|
|
3866
3923
|
type: "primary",
|
|
3867
|
-
onClick: s[0] || (s[0] = (
|
|
3924
|
+
onClick: s[0] || (s[0] = (d) => g()),
|
|
3868
3925
|
style: { "margin-left": "20px" }
|
|
3869
3926
|
}, {
|
|
3870
3927
|
default: withCtx(() => [...s[2] || (s[2] = [
|
|
@@ -3890,8 +3947,8 @@ ${u.message || u.resultcontent}\r
|
|
|
3890
3947
|
label: "头像",
|
|
3891
3948
|
"show-overflow-tooltip": ""
|
|
3892
3949
|
}, {
|
|
3893
|
-
default: withCtx(({ row:
|
|
3894
|
-
|
|
3950
|
+
default: withCtx(({ row: d }) => [
|
|
3951
|
+
d.HeadPic ? (openBlock(), createBlock(unref(ElPopover), {
|
|
3895
3952
|
key: 0,
|
|
3896
3953
|
placement: "top-start",
|
|
3897
3954
|
title: "头像",
|
|
@@ -3900,13 +3957,13 @@ ${u.message || u.resultcontent}\r
|
|
|
3900
3957
|
}, {
|
|
3901
3958
|
reference: withCtx(() => [
|
|
3902
3959
|
createVNode(_sfc_main$t, {
|
|
3903
|
-
src:
|
|
3960
|
+
src: d.HeadPic,
|
|
3904
3961
|
style: { height: "60px" }
|
|
3905
3962
|
}, null, 8, ["src"])
|
|
3906
3963
|
]),
|
|
3907
3964
|
default: withCtx(() => [
|
|
3908
3965
|
createVNode(_sfc_main$t, {
|
|
3909
|
-
src:
|
|
3966
|
+
src: d.HeadPic,
|
|
3910
3967
|
style: { width: "300px" }
|
|
3911
3968
|
}, null, 8, ["src"])
|
|
3912
3969
|
]),
|
|
@@ -3933,8 +3990,8 @@ ${u.message || u.resultcontent}\r
|
|
|
3933
3990
|
label: "分类",
|
|
3934
3991
|
"show-overflow-tooltip": ""
|
|
3935
3992
|
}, {
|
|
3936
|
-
default: withCtx(({ row:
|
|
3937
|
-
createTextVNode(toDisplayString(unref(GetEnumName)(unref(CardTypeClassEnum),
|
|
3993
|
+
default: withCtx(({ row: d }) => [
|
|
3994
|
+
createTextVNode(toDisplayString(unref(GetEnumName)(unref(CardTypeClassEnum), d.CardTypeClass)), 1)
|
|
3938
3995
|
]),
|
|
3939
3996
|
_: 1
|
|
3940
3997
|
}),
|
|
@@ -3950,8 +4007,8 @@ ${u.message || u.resultcontent}\r
|
|
|
3950
4007
|
label: "余额",
|
|
3951
4008
|
"show-overflow-tooltip": ""
|
|
3952
4009
|
}, {
|
|
3953
|
-
default: withCtx(({ row:
|
|
3954
|
-
|
|
4010
|
+
default: withCtx(({ row: d }) => [
|
|
4011
|
+
d.CardTypeClass == unref(CardTypeClassEnum).储值卡 ? (openBlock(), createElementBlock("span", _hoisted_7$2, toDisplayString((d.Blance / 100).toFixed(2)) + "元", 1)) : d.CardTypeClass == unref(CardTypeClassEnum).计次卡 ? (openBlock(), createElementBlock("span", _hoisted_8$2, toDisplayString(d.NumOfTimes) + "次", 1)) : createCommentVNode("", !0)
|
|
3955
4012
|
]),
|
|
3956
4013
|
_: 1
|
|
3957
4014
|
}),
|
|
@@ -3959,24 +4016,24 @@ ${u.message || u.resultcontent}\r
|
|
|
3959
4016
|
"min-width": "100",
|
|
3960
4017
|
label: "操作"
|
|
3961
4018
|
}, {
|
|
3962
|
-
default: withCtx(({ row:
|
|
3963
|
-
|
|
3964
|
-
|
|
3965
|
-
|
|
4019
|
+
default: withCtx(({ row: d }) => [
|
|
4020
|
+
d.Status != c.正常 ? (openBlock(), createElementBlock("span", _hoisted_9$2, toDisplayString(unref(GetEnumName)(c, d.Status)), 1)) : d.BeginDate.ToDateTime() > /* @__PURE__ */ new Date() ? (openBlock(), createElementBlock("span", _hoisted_10$1, "未生效")) : d.EndDate.ToDateTime() < /* @__PURE__ */ new Date() ? (openBlock(), createElementBlock("span", _hoisted_11$1, "已过期")) : (openBlock(), createElementBlock(Fragment, { key: 3 }, [
|
|
4021
|
+
d.CardTypeClass == unref(CardTypeClassEnum).储值卡 ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
4022
|
+
d.Blance < l.payAmount ? (openBlock(), createElementBlock("span", _hoisted_12$1, "余额不足" + toDisplayString((l.payAmount / 100).toFixed(2)) + "元", 1)) : (openBlock(), createBlock(unref(ElButton), {
|
|
3966
4023
|
key: 1,
|
|
3967
4024
|
type: "primary",
|
|
3968
|
-
onClick: (f) => d
|
|
4025
|
+
onClick: (f) => u(d)
|
|
3969
4026
|
}, {
|
|
3970
4027
|
default: withCtx(() => [...s[4] || (s[4] = [
|
|
3971
4028
|
createTextVNode("使用", -1)
|
|
3972
4029
|
])]),
|
|
3973
4030
|
_: 1
|
|
3974
4031
|
}, 8, ["onClick"]))
|
|
3975
|
-
], 64)) :
|
|
3976
|
-
|
|
4032
|
+
], 64)) : d.CardTypeClass == unref(CardTypeClassEnum).计次卡 ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
4033
|
+
d.NumOfTimes <= 0 ? (openBlock(), createElementBlock("span", _hoisted_13$1, "余次不足")) : (openBlock(), createBlock(unref(ElButton), {
|
|
3977
4034
|
key: 1,
|
|
3978
4035
|
type: "primary",
|
|
3979
|
-
onClick: (f) => d
|
|
4036
|
+
onClick: (f) => u(d)
|
|
3980
4037
|
}, {
|
|
3981
4038
|
default: withCtx(() => [...s[5] || (s[5] = [
|
|
3982
4039
|
createTextVNode("使用", -1)
|
|
@@ -3986,7 +4043,7 @@ ${u.message || u.resultcontent}\r
|
|
|
3986
4043
|
], 64)) : (openBlock(), createBlock(unref(ElButton), {
|
|
3987
4044
|
key: 2,
|
|
3988
4045
|
type: "primary",
|
|
3989
|
-
onClick: (f) => d
|
|
4046
|
+
onClick: (f) => u(d)
|
|
3990
4047
|
}, {
|
|
3991
4048
|
default: withCtx(() => [...s[6] || (s[6] = [
|
|
3992
4049
|
createTextVNode("使用", -1)
|
|
@@ -4177,11 +4234,11 @@ ${u.message || u.resultcontent}\r
|
|
|
4177
4234
|
},
|
|
4178
4235
|
emits: ["update:modelValue", "paySuccess"],
|
|
4179
4236
|
setup(o, { emit: r }) {
|
|
4180
|
-
const e = o, t = r, l = ref(), i = ref(),
|
|
4237
|
+
const e = o, t = r, l = ref(), i = ref(), c = computed({
|
|
4181
4238
|
get: () => e.modelValue,
|
|
4182
4239
|
set: (f) => t("update:modelValue", f)
|
|
4183
4240
|
}), n = computed({
|
|
4184
|
-
get: () =>
|
|
4241
|
+
get: () => c.value ? e.orderInfo.SumPrice - a.RebateAmount : 0
|
|
4185
4242
|
}), a = reactive({
|
|
4186
4243
|
isPlayVoice: "1",
|
|
4187
4244
|
//关闭播放语音
|
|
@@ -4217,7 +4274,7 @@ ${u.message || u.resultcontent}\r
|
|
|
4217
4274
|
e.orderInfo.SumPrice == a.CustomPayAmount && (a.CustomPayAmount = ((e.orderInfo.SumPrice - f) / 100).toFixed(2));
|
|
4218
4275
|
}
|
|
4219
4276
|
);
|
|
4220
|
-
const
|
|
4277
|
+
const m = () => {
|
|
4221
4278
|
a.isMemberBox = !1, nextTick(() => {
|
|
4222
4279
|
i.value.LoadData(a.Telephone), a.isMemberBox = !0;
|
|
4223
4280
|
});
|
|
@@ -4225,17 +4282,17 @@ ${u.message || u.resultcontent}\r
|
|
|
4225
4282
|
watch(
|
|
4226
4283
|
() => a.GetMethod,
|
|
4227
4284
|
(f) => {
|
|
4228
|
-
|
|
4285
|
+
u(f);
|
|
4229
4286
|
}
|
|
4230
4287
|
);
|
|
4231
|
-
const
|
|
4288
|
+
const u = (f) => {
|
|
4232
4289
|
(f == "扫码收款" || f == "会员收款" || f == "现金") && nextTick(() => nextTick(() => l.value.focus()));
|
|
4233
4290
|
};
|
|
4234
4291
|
watch(
|
|
4235
4292
|
() => e.modelValue,
|
|
4236
4293
|
(f) => {
|
|
4237
4294
|
f ? (a.chkMember = !0, a.PayCode = "", a.PayAmount = "", a.RebateAmount = 0, a.numOfTimes = "", a.Remarks = "", a.Telephone = "", e.makreter && a.managerInfo.Telephone && (a.MakreterTel = a.managerInfo.Telephone), a.IsConfirming = !1, a.payTime = 0, a.CustomPayAmount = (e.orderInfo.SumPrice / 100).toFixed(2), setTimeout(() => {
|
|
4238
|
-
e.memberInfo && e.memberInfo.Id && (a.GetMethod = "会员收款", a.Telephone = e.memberInfo.Telephone,
|
|
4295
|
+
e.memberInfo && e.memberInfo.Id && (a.GetMethod = "会员收款", a.Telephone = e.memberInfo.Telephone, m()), u(a.GetMethod);
|
|
4239
4296
|
}, 100)) : (a.timerId != null && (clearInterval(a.timerId), a.timerId = null), a.loading != null && (a.loading.close(), a.loading = null));
|
|
4240
4297
|
}
|
|
4241
4298
|
);
|
|
@@ -4277,8 +4334,8 @@ ${u.message || u.resultcontent}\r
|
|
|
4277
4334
|
PaySuccess: () => {
|
|
4278
4335
|
let p = a.GetMethod;
|
|
4279
4336
|
p.endsWith("收款") || (p = p + "收款");
|
|
4280
|
-
let
|
|
4281
|
-
ElMessage({ message:
|
|
4337
|
+
let C = `${p} : ${((e.orderInfo.SumPrice * 1 - a.RebateAmount * 100) / 100).toFixed(2)}元`;
|
|
4338
|
+
ElMessage({ message: C, type: "success" }), a.isPlayVoice == "1" && PlayTTS(C), e.orderInfo.Status = 1, t("update:modelValue", !1), setTimeout(() => t("paySuccess", e.orderInfo), 300);
|
|
4282
4339
|
},
|
|
4283
4340
|
Cancel: () => {
|
|
4284
4341
|
t("update:modelValue", !1), ElMessageBox.alert("付款中断!用户输入付款码错误或者取消了付款");
|
|
@@ -4288,7 +4345,7 @@ ${u.message || u.resultcontent}\r
|
|
|
4288
4345
|
onUnmounted(() => {
|
|
4289
4346
|
UnRegisterKeyboard("120"), UnRegisterKeyboard("121"), UnRegisterKeyboard("122");
|
|
4290
4347
|
});
|
|
4291
|
-
const
|
|
4348
|
+
const d = () => {
|
|
4292
4349
|
localStorage.setItem("ConfirmOrder_isPlayVoice", a.isPlayVoice);
|
|
4293
4350
|
};
|
|
4294
4351
|
return onMounted(async () => {
|
|
@@ -4315,8 +4372,8 @@ ${u.message || u.resultcontent}\r
|
|
|
4315
4372
|
}
|
|
4316
4373
|
}
|
|
4317
4374
|
}), (f, p) => (openBlock(), createBlock(byDialog, {
|
|
4318
|
-
modelValue:
|
|
4319
|
-
"onUpdate:modelValue": p[12] || (p[12] = (
|
|
4375
|
+
modelValue: c.value,
|
|
4376
|
+
"onUpdate:modelValue": p[12] || (p[12] = (C) => c.value = C),
|
|
4320
4377
|
title: "确认订单",
|
|
4321
4378
|
width: "750px",
|
|
4322
4379
|
height: "auto",
|
|
@@ -4346,7 +4403,7 @@ ${u.message || u.resultcontent}\r
|
|
|
4346
4403
|
p[17] || (p[17] = createElementVNode("div", { class: "tlab" }, "描述:", -1)),
|
|
4347
4404
|
createElementVNode("div", null, [
|
|
4348
4405
|
withDirectives(createElementVNode("textarea", {
|
|
4349
|
-
"onUpdate:modelValue": p[0] || (p[0] = (
|
|
4406
|
+
"onUpdate:modelValue": p[0] || (p[0] = (C) => e.desc = C),
|
|
4350
4407
|
type: "textarea",
|
|
4351
4408
|
rows: "4",
|
|
4352
4409
|
class: "desc",
|
|
@@ -4361,7 +4418,7 @@ ${u.message || u.resultcontent}\r
|
|
|
4361
4418
|
createElementVNode("div", null, [
|
|
4362
4419
|
createVNode(_sfc_main$7, {
|
|
4363
4420
|
modelValue: a.RebateAmount,
|
|
4364
|
-
"onUpdate:modelValue": p[1] || (p[1] = (
|
|
4421
|
+
"onUpdate:modelValue": p[1] || (p[1] = (C) => a.RebateAmount = C),
|
|
4365
4422
|
totalAmount: e.orderInfo.SumPrice
|
|
4366
4423
|
}, null, 8, ["modelValue", "totalAmount"])
|
|
4367
4424
|
])
|
|
@@ -4371,7 +4428,7 @@ ${u.message || u.resultcontent}\r
|
|
|
4371
4428
|
createElementVNode("div", null, [
|
|
4372
4429
|
createVNode(unref(ElInput), {
|
|
4373
4430
|
modelValue: a.MakreterTel,
|
|
4374
|
-
"onUpdate:modelValue": p[2] || (p[2] = (
|
|
4431
|
+
"onUpdate:modelValue": p[2] || (p[2] = (C) => a.MakreterTel = C),
|
|
4375
4432
|
style: { width: "200px" },
|
|
4376
4433
|
placeholder: "请输入营销员手机号"
|
|
4377
4434
|
}, null, 8, ["modelValue"])
|
|
@@ -4382,7 +4439,7 @@ ${u.message || u.resultcontent}\r
|
|
|
4382
4439
|
createElementVNode("div", null, [
|
|
4383
4440
|
createVNode(unref(ElRadioGroup), {
|
|
4384
4441
|
modelValue: a.GetMethod,
|
|
4385
|
-
"onUpdate:modelValue": p[3] || (p[3] = (
|
|
4442
|
+
"onUpdate:modelValue": p[3] || (p[3] = (C) => a.GetMethod = C),
|
|
4386
4443
|
class: "ml-4"
|
|
4387
4444
|
}, {
|
|
4388
4445
|
default: withCtx(() => [
|
|
@@ -4414,9 +4471,9 @@ ${u.message || u.resultcontent}\r
|
|
|
4414
4471
|
]),
|
|
4415
4472
|
_: 1
|
|
4416
4473
|
})) : createCommentVNode("", !0),
|
|
4417
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(a.GetMethodArray, (
|
|
4418
|
-
value:
|
|
4419
|
-
label:
|
|
4474
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(a.GetMethodArray, (C) => (openBlock(), createBlock(unref(ElRadioButton), {
|
|
4475
|
+
value: C,
|
|
4476
|
+
label: C
|
|
4420
4477
|
}, null, 8, ["value", "label"]))), 256))
|
|
4421
4478
|
]),
|
|
4422
4479
|
_: 1
|
|
@@ -4430,7 +4487,7 @@ ${u.message || u.resultcontent}\r
|
|
|
4430
4487
|
ref_key: "payCode",
|
|
4431
4488
|
ref: l,
|
|
4432
4489
|
modelValue: a.CustomPayAmount,
|
|
4433
|
-
"onUpdate:modelValue": p[4] || (p[4] = (
|
|
4490
|
+
"onUpdate:modelValue": p[4] || (p[4] = (C) => a.CustomPayAmount = C),
|
|
4434
4491
|
style: { width: "200px" },
|
|
4435
4492
|
onKeypress: withKeys(s, ["enter", "native"]),
|
|
4436
4493
|
disabled: a.IsConfirming
|
|
@@ -4449,7 +4506,7 @@ ${u.message || u.resultcontent}\r
|
|
|
4449
4506
|
ref_key: "payCode",
|
|
4450
4507
|
ref: l,
|
|
4451
4508
|
modelValue: a.PayAmount,
|
|
4452
|
-
"onUpdate:modelValue": p[5] || (p[5] = (
|
|
4509
|
+
"onUpdate:modelValue": p[5] || (p[5] = (C) => a.PayAmount = C),
|
|
4453
4510
|
style: { width: "200px" },
|
|
4454
4511
|
onKeypress: withKeys(s, ["enter", "native"]),
|
|
4455
4512
|
disabled: a.IsConfirming
|
|
@@ -4478,7 +4535,7 @@ ${u.message || u.resultcontent}\r
|
|
|
4478
4535
|
createElementVNode("div", null, [
|
|
4479
4536
|
createVNode(unref(ElInput), {
|
|
4480
4537
|
modelValue: a.PayCode,
|
|
4481
|
-
"onUpdate:modelValue": p[6] || (p[6] = (
|
|
4538
|
+
"onUpdate:modelValue": p[6] || (p[6] = (C) => a.PayCode = C),
|
|
4482
4539
|
style: { width: "400px" },
|
|
4483
4540
|
ref_key: "payCode",
|
|
4484
4541
|
ref: l,
|
|
@@ -4493,12 +4550,12 @@ ${u.message || u.resultcontent}\r
|
|
|
4493
4550
|
createElementVNode("div", null, [
|
|
4494
4551
|
createVNode(unref(ElInput), {
|
|
4495
4552
|
modelValue: a.Telephone,
|
|
4496
|
-
"onUpdate:modelValue": p[8] || (p[8] = (
|
|
4553
|
+
"onUpdate:modelValue": p[8] || (p[8] = (C) => a.Telephone = C),
|
|
4497
4554
|
style: { width: "220px" },
|
|
4498
4555
|
ref_key: "payCode",
|
|
4499
4556
|
ref: l,
|
|
4500
4557
|
placeholder: "会员手机号",
|
|
4501
|
-
onKeyup: withKeys(
|
|
4558
|
+
onKeyup: withKeys(m, ["enter", "native"])
|
|
4502
4559
|
}, {
|
|
4503
4560
|
append: withCtx(() => [
|
|
4504
4561
|
createVNode(unref(ElPopover), {
|
|
@@ -4508,7 +4565,7 @@ ${u.message || u.resultcontent}\r
|
|
|
4508
4565
|
visible: a.isMemberBox
|
|
4509
4566
|
}, {
|
|
4510
4567
|
reference: withCtx(() => [
|
|
4511
|
-
createVNode(unref(ElButton), { onClick:
|
|
4568
|
+
createVNode(unref(ElButton), { onClick: m }, {
|
|
4512
4569
|
default: withCtx(() => [...p[22] || (p[22] = [
|
|
4513
4570
|
createTextVNode("查询", -1)
|
|
4514
4571
|
])]),
|
|
@@ -4525,7 +4582,7 @@ ${u.message || u.resultcontent}\r
|
|
|
4525
4582
|
ckUserInfoPassword: a.ckUserInfoPassword,
|
|
4526
4583
|
ckCardPassword: a.ckCardPassword,
|
|
4527
4584
|
ckTsCardUse: a.ckTsCardUse,
|
|
4528
|
-
onCancel: p[7] || (p[7] = (
|
|
4585
|
+
onCancel: p[7] || (p[7] = (C) => a.isMemberBox = !1)
|
|
4529
4586
|
}, null, 8, ["payAmount", "orderInfo", "ckUserInfoPassword", "ckCardPassword", "ckTsCardUse"])
|
|
4530
4587
|
]),
|
|
4531
4588
|
_: 1
|
|
@@ -4540,7 +4597,7 @@ ${u.message || u.resultcontent}\r
|
|
|
4540
4597
|
createElementVNode("div", null, [
|
|
4541
4598
|
createVNode(unref(ElInput), {
|
|
4542
4599
|
modelValue: a.PayCode,
|
|
4543
|
-
"onUpdate:modelValue": p[9] || (p[9] = (
|
|
4600
|
+
"onUpdate:modelValue": p[9] || (p[9] = (C) => a.PayCode = C),
|
|
4544
4601
|
style: { width: "400px" },
|
|
4545
4602
|
ref_key: "payCode",
|
|
4546
4603
|
ref: l,
|
|
@@ -4556,7 +4613,7 @@ ${u.message || u.resultcontent}\r
|
|
|
4556
4613
|
createElementVNode("div", null, [
|
|
4557
4614
|
createVNode(unref(ElInput), {
|
|
4558
4615
|
modelValue: a.Remarks,
|
|
4559
|
-
"onUpdate:modelValue": p[10] || (p[10] = (
|
|
4616
|
+
"onUpdate:modelValue": p[10] || (p[10] = (C) => a.Remarks = C),
|
|
4560
4617
|
style: { width: "400px" },
|
|
4561
4618
|
placeholder: "请输入备注"
|
|
4562
4619
|
}, null, 8, ["modelValue"])
|
|
@@ -4587,12 +4644,12 @@ ${u.message || u.resultcontent}\r
|
|
|
4587
4644
|
createVNode(unref(ElSwitch), {
|
|
4588
4645
|
style: { "margin-left": "10px" },
|
|
4589
4646
|
modelValue: a.isPlayVoice,
|
|
4590
|
-
"onUpdate:modelValue": p[11] || (p[11] = (
|
|
4647
|
+
"onUpdate:modelValue": p[11] || (p[11] = (C) => a.isPlayVoice = C),
|
|
4591
4648
|
class: "ml-2",
|
|
4592
4649
|
"inline-prompt": "",
|
|
4593
4650
|
"active-text": "语音播报开启",
|
|
4594
4651
|
"inactive-text": "语音播报关闭",
|
|
4595
|
-
onChange:
|
|
4652
|
+
onChange: d
|
|
4596
4653
|
}, null, 8, ["modelValue"])
|
|
4597
4654
|
])
|
|
4598
4655
|
]),
|
|
@@ -4614,14 +4671,14 @@ ${u.message || u.resultcontent}\r
|
|
|
4614
4671
|
},
|
|
4615
4672
|
emits: ["update:modelValue"],
|
|
4616
4673
|
setup(o, { emit: r }) {
|
|
4617
|
-
const e = ref([]), t = ref(!1), l = o, i = r,
|
|
4674
|
+
const e = ref([]), t = ref(!1), l = o, i = r, c = () => {
|
|
4618
4675
|
i("update:modelValue", "");
|
|
4619
4676
|
}, n = (a) => {
|
|
4620
4677
|
i("update:modelValue", "#" + a.ClassName), i("change", a), t.value = !1;
|
|
4621
4678
|
};
|
|
4622
4679
|
return onMounted(async () => {
|
|
4623
4680
|
e.value = await InfrastructureApi("/NoPowerApi/SearchIcon", { SearchType: 1, Fields: "a.Name,a.ClassName,a.UnCode" });
|
|
4624
|
-
}), (a,
|
|
4681
|
+
}), (a, m) => (openBlock(), createElementBlock("div", _hoisted_1$2, [
|
|
4625
4682
|
createElementVNode("div", _hoisted_2, [
|
|
4626
4683
|
(openBlock(), createElementBlock("svg", _hoisted_3, [
|
|
4627
4684
|
createElementVNode("use", {
|
|
@@ -4633,9 +4690,9 @@ ${u.message || u.resultcontent}\r
|
|
|
4633
4690
|
createVNode(unref(ElButton), {
|
|
4634
4691
|
type: "success",
|
|
4635
4692
|
style: { "margin-left": "20px" },
|
|
4636
|
-
onClick:
|
|
4693
|
+
onClick: m[0] || (m[0] = (u) => t.value = !0)
|
|
4637
4694
|
}, {
|
|
4638
|
-
default: withCtx(() => [...
|
|
4695
|
+
default: withCtx(() => [...m[2] || (m[2] = [
|
|
4639
4696
|
createTextVNode("选择", -1)
|
|
4640
4697
|
])]),
|
|
4641
4698
|
_: 1
|
|
@@ -4643,9 +4700,9 @@ ${u.message || u.resultcontent}\r
|
|
|
4643
4700
|
createVNode(unref(ElButton), {
|
|
4644
4701
|
type: "danger",
|
|
4645
4702
|
style: { "margin-left": "20px" },
|
|
4646
|
-
onClick:
|
|
4703
|
+
onClick: c
|
|
4647
4704
|
}, {
|
|
4648
|
-
default: withCtx(() => [...
|
|
4705
|
+
default: withCtx(() => [...m[3] || (m[3] = [
|
|
4649
4706
|
createTextVNode("清除", -1)
|
|
4650
4707
|
])]),
|
|
4651
4708
|
_: 1
|
|
@@ -4656,21 +4713,21 @@ ${u.message || u.resultcontent}\r
|
|
|
4656
4713
|
"append-to-body": "",
|
|
4657
4714
|
top: "1vh",
|
|
4658
4715
|
modelValue: t.value,
|
|
4659
|
-
"onUpdate:modelValue":
|
|
4716
|
+
"onUpdate:modelValue": m[1] || (m[1] = (u) => t.value = u),
|
|
4660
4717
|
width: "80%"
|
|
4661
4718
|
}, {
|
|
4662
4719
|
default: withCtx(() => [
|
|
4663
4720
|
createElementVNode("div", _hoisted_6, [
|
|
4664
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(e.value, (
|
|
4721
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(e.value, (u) => (openBlock(), createElementBlock("div", {
|
|
4665
4722
|
class: "icon-item",
|
|
4666
|
-
onClick: (g) => n(
|
|
4723
|
+
onClick: (g) => n(u)
|
|
4667
4724
|
}, [
|
|
4668
4725
|
(openBlock(), createElementBlock("svg", _hoisted_8, [
|
|
4669
4726
|
createElementVNode("use", {
|
|
4670
|
-
"xlink:href": "#" +
|
|
4727
|
+
"xlink:href": "#" + u.ClassName
|
|
4671
4728
|
}, null, 8, _hoisted_9)
|
|
4672
4729
|
])),
|
|
4673
|
-
createElementVNode("div", null, toDisplayString(
|
|
4730
|
+
createElementVNode("div", null, toDisplayString(u.Name), 1)
|
|
4674
4731
|
], 8, _hoisted_7))), 256))
|
|
4675
4732
|
])
|
|
4676
4733
|
]),
|
|
@@ -4687,12 +4744,12 @@ ${u.message || u.resultcontent}\r
|
|
|
4687
4744
|
},
|
|
4688
4745
|
emits: ["update:modelValue", "change"],
|
|
4689
4746
|
setup(o, { emit: r }) {
|
|
4690
|
-
const e = o, t = r, l = ref([]), i = ref(!1),
|
|
4691
|
-
i.value = !0, setTimeout(() =>
|
|
4692
|
-
},
|
|
4747
|
+
const e = o, t = r, l = ref([]), i = ref(!1), c = ref(), n = ref(""), a = computed(() => e.canSelect.split("|").Where((y) => y)), m = () => {
|
|
4748
|
+
i.value = !0, setTimeout(() => c.value.focus(), 300);
|
|
4749
|
+
}, u = () => {
|
|
4693
4750
|
if (n.value) {
|
|
4694
4751
|
if (l.value.Exists((y) => y == n.value)) {
|
|
4695
|
-
alert("已存在标签:" + n.value), n.value = "",
|
|
4752
|
+
alert("已存在标签:" + n.value), n.value = "", c.value.focus();
|
|
4696
4753
|
return;
|
|
4697
4754
|
}
|
|
4698
4755
|
l.value.push(n.value), t("update:modelValue", l.value.join("|")), t("change"), n.value = "", i.value = !1;
|
|
@@ -4711,13 +4768,13 @@ ${u.message || u.resultcontent}\r
|
|
|
4711
4768
|
} catch {
|
|
4712
4769
|
}
|
|
4713
4770
|
}), (y, s) => (openBlock(), createElementBlock(Fragment, null, [
|
|
4714
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(l.value, (
|
|
4771
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(l.value, (d) => (openBlock(), createElementBlock("div", _hoisted_1$1, [
|
|
4715
4772
|
createVNode(unref(ElTag), {
|
|
4716
4773
|
closable: "",
|
|
4717
|
-
onClose: (f) => g(
|
|
4774
|
+
onClose: (f) => g(d)
|
|
4718
4775
|
}, {
|
|
4719
4776
|
default: withCtx(() => [
|
|
4720
|
-
createTextVNode(toDisplayString(
|
|
4777
|
+
createTextVNode(toDisplayString(d), 1)
|
|
4721
4778
|
]),
|
|
4722
4779
|
_: 2
|
|
4723
4780
|
}, 1032, ["onClose"])
|
|
@@ -4726,20 +4783,20 @@ ${u.message || u.resultcontent}\r
|
|
|
4726
4783
|
i.value ? (openBlock(), createBlock(unref(ElSelect), {
|
|
4727
4784
|
key: 0,
|
|
4728
4785
|
ref_key: "inputElement",
|
|
4729
|
-
ref:
|
|
4786
|
+
ref: c,
|
|
4730
4787
|
placeholder: e.placeholder,
|
|
4731
4788
|
modelValue: n.value,
|
|
4732
|
-
"onUpdate:modelValue": s[0] || (s[0] = (
|
|
4733
|
-
onBlur:
|
|
4734
|
-
onChange:
|
|
4789
|
+
"onUpdate:modelValue": s[0] || (s[0] = (d) => n.value = d),
|
|
4790
|
+
onBlur: u,
|
|
4791
|
+
onChange: u,
|
|
4735
4792
|
style: { width: "200px" },
|
|
4736
4793
|
filterable: "",
|
|
4737
4794
|
"allow-create": ""
|
|
4738
4795
|
}, {
|
|
4739
4796
|
default: withCtx(() => [
|
|
4740
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(a.value, (
|
|
4741
|
-
value:
|
|
4742
|
-
label:
|
|
4797
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(a.value, (d) => (openBlock(), createBlock(unref(ElOption), {
|
|
4798
|
+
value: d,
|
|
4799
|
+
label: d
|
|
4743
4800
|
}, null, 8, ["value", "label"]))), 256))
|
|
4744
4801
|
]),
|
|
4745
4802
|
_: 1
|
|
@@ -4748,18 +4805,18 @@ ${u.message || u.resultcontent}\r
|
|
|
4748
4805
|
i.value ? (openBlock(), createBlock(unref(ElInput), {
|
|
4749
4806
|
key: 0,
|
|
4750
4807
|
ref_key: "inputElement",
|
|
4751
|
-
ref:
|
|
4808
|
+
ref: c,
|
|
4752
4809
|
placeholder: e.placeholder,
|
|
4753
4810
|
modelValue: n.value,
|
|
4754
|
-
"onUpdate:modelValue": s[1] || (s[1] = (
|
|
4755
|
-
onBlur:
|
|
4756
|
-
onKeypress: withKeys(
|
|
4811
|
+
"onUpdate:modelValue": s[1] || (s[1] = (d) => n.value = d),
|
|
4812
|
+
onBlur: u,
|
|
4813
|
+
onKeypress: withKeys(u, ["enter"]),
|
|
4757
4814
|
style: { width: "200px" }
|
|
4758
4815
|
}, null, 8, ["placeholder", "modelValue"])) : createCommentVNode("", !0)
|
|
4759
4816
|
], 64)),
|
|
4760
4817
|
createVNode(unref(ElButton), {
|
|
4761
4818
|
type: "primary",
|
|
4762
|
-
onClick:
|
|
4819
|
+
onClick: m
|
|
4763
4820
|
}, {
|
|
4764
4821
|
default: withCtx(() => [...s[2] || (s[2] = [
|
|
4765
4822
|
createTextVNode("+", -1)
|
|
@@ -4792,12 +4849,12 @@ ${u.message || u.resultcontent}\r
|
|
|
4792
4849
|
},
|
|
4793
4850
|
emits: ["command", "reportChange"],
|
|
4794
4851
|
setup(o, { emit: r }) {
|
|
4795
|
-
const e = o, t = ref(""), l = ref({}), i = ref([]),
|
|
4796
|
-
a("command", s, t.value,
|
|
4797
|
-
},
|
|
4852
|
+
const e = o, t = ref(""), l = ref({}), i = ref([]), c = ref(""), n = ref(!1), a = r, m = (s, d) => {
|
|
4853
|
+
a("command", s, t.value, d);
|
|
4854
|
+
}, u = async () => {
|
|
4798
4855
|
n.value = !1, await Sleep(10);
|
|
4799
|
-
let s = e.reportArray.FirstOrDefault((
|
|
4800
|
-
i.value = s.ColumnArray,
|
|
4856
|
+
let s = e.reportArray.FirstOrDefault((d) => d.Name == t.value);
|
|
4857
|
+
i.value = s.ColumnArray, c.value = s.Url, n.value = !0, a("reportChange", s);
|
|
4801
4858
|
}, g = computed({
|
|
4802
4859
|
get: () => `${l.value.OrganName}${t.value}`
|
|
4803
4860
|
}), y = computed({
|
|
@@ -4811,17 +4868,17 @@ ${u.message || u.resultcontent}\r
|
|
|
4811
4868
|
});
|
|
4812
4869
|
return onMounted(() => {
|
|
4813
4870
|
nextTick(() => {
|
|
4814
|
-
e.reportArray.length > 0 && (t.value = e.reportArray[0].Name),
|
|
4871
|
+
e.reportArray.length > 0 && (t.value = e.reportArray[0].Name), u();
|
|
4815
4872
|
}), l.value = JSON.parse(sessionStorage.getItem("ManagerInfo"));
|
|
4816
|
-
}), (s,
|
|
4873
|
+
}), (s, d) => (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
4817
4874
|
n.value ? (openBlock(), createBlock(reportIndex, {
|
|
4818
4875
|
key: 0,
|
|
4819
|
-
url:
|
|
4876
|
+
url: c.value,
|
|
4820
4877
|
tabName: g.value,
|
|
4821
4878
|
loadData: !1,
|
|
4822
4879
|
version: e.version,
|
|
4823
4880
|
columnArray: i.value,
|
|
4824
|
-
onCommand:
|
|
4881
|
+
onCommand: m,
|
|
4825
4882
|
commandArray: e.commandArray,
|
|
4826
4883
|
printOption: y.value,
|
|
4827
4884
|
searchParam: e.searchParam,
|
|
@@ -4834,9 +4891,9 @@ ${u.message || u.resultcontent}\r
|
|
|
4834
4891
|
default: withCtx(() => [
|
|
4835
4892
|
createVNode(byDatePicker, {
|
|
4836
4893
|
BeginTime: e.searchParam.BeginTime,
|
|
4837
|
-
"onUpdate:BeginTime":
|
|
4894
|
+
"onUpdate:BeginTime": d[0] || (d[0] = (f) => e.searchParam.BeginTime = f),
|
|
4838
4895
|
EndTime: e.searchParam.EndTime,
|
|
4839
|
-
"onUpdate:EndTime":
|
|
4896
|
+
"onUpdate:EndTime": d[1] || (d[1] = (f) => e.searchParam.EndTime = f)
|
|
4840
4897
|
}, null, 8, ["BeginTime", "EndTime"])
|
|
4841
4898
|
]),
|
|
4842
4899
|
_: 1
|
|
@@ -4845,8 +4902,8 @@ ${u.message || u.resultcontent}\r
|
|
|
4845
4902
|
PageItem: withCtx(() => [
|
|
4846
4903
|
createVNode(unref(ElRadioGroup), {
|
|
4847
4904
|
modelValue: t.value,
|
|
4848
|
-
"onUpdate:modelValue":
|
|
4849
|
-
onChange:
|
|
4905
|
+
"onUpdate:modelValue": d[2] || (d[2] = (f) => t.value = f),
|
|
4906
|
+
onChange: u,
|
|
4850
4907
|
class: "myradio"
|
|
4851
4908
|
}, {
|
|
4852
4909
|
default: withCtx(() => [
|
|
@@ -4889,27 +4946,27 @@ ${u.message || u.resultcontent}\r
|
|
|
4889
4946
|
setup(o, { emit: r }) {
|
|
4890
4947
|
const e = o, t = r;
|
|
4891
4948
|
ref();
|
|
4892
|
-
const l = ref(""), i = ref({}),
|
|
4949
|
+
const l = ref(""), i = ref({}), c = (a) => {
|
|
4893
4950
|
if (typeof a == "string") return a;
|
|
4894
4951
|
if (a.Name) return a.Name;
|
|
4895
|
-
}, n = (a,
|
|
4896
|
-
let g = e.reportArray.FirstOrDefault((s) => s.Name ==
|
|
4952
|
+
}, n = (a, m, u) => {
|
|
4953
|
+
let g = e.reportArray.FirstOrDefault((s) => s.Name == m);
|
|
4897
4954
|
if (g == null) return;
|
|
4898
|
-
let y = g.getDetailParam(
|
|
4955
|
+
let y = g.getDetailParam(u);
|
|
4899
4956
|
i.value = {};
|
|
4900
4957
|
for (let s in y)
|
|
4901
4958
|
y[s] && (i.value[s] = y[s]);
|
|
4902
4959
|
for (let s in e.searchParam)
|
|
4903
4960
|
e.searchParam[s] && (i.value[s] = e.searchParam[s]);
|
|
4904
4961
|
l.value = a, nextTick(() => {
|
|
4905
|
-
t("change", a,
|
|
4962
|
+
t("change", a, m);
|
|
4906
4963
|
});
|
|
4907
4964
|
};
|
|
4908
4965
|
return onMounted(() => {
|
|
4909
4966
|
l.value = e.name;
|
|
4910
|
-
}), (a,
|
|
4967
|
+
}), (a, m) => (openBlock(), createBlock(unref(ElTabs), {
|
|
4911
4968
|
modelValue: l.value,
|
|
4912
|
-
"onUpdate:modelValue":
|
|
4969
|
+
"onUpdate:modelValue": m[1] || (m[1] = (u) => l.value = u),
|
|
4913
4970
|
class: "demo-tabs",
|
|
4914
4971
|
"tab-position": "top"
|
|
4915
4972
|
}, {
|
|
@@ -4926,7 +4983,7 @@ ${u.message || u.resultcontent}\r
|
|
|
4926
4983
|
onCommand: n,
|
|
4927
4984
|
commandArray: e.commandArray,
|
|
4928
4985
|
searchParam: e.searchParam,
|
|
4929
|
-
onReportChange:
|
|
4986
|
+
onReportChange: m[0] || (m[0] = (u) => t("reportChange", u)),
|
|
4930
4987
|
maxCommand: e.maxCommand
|
|
4931
4988
|
}, {
|
|
4932
4989
|
FilterItem: withCtx(() => [
|
|
@@ -4937,13 +4994,13 @@ ${u.message || u.resultcontent}\r
|
|
|
4937
4994
|
]),
|
|
4938
4995
|
_: 3
|
|
4939
4996
|
}, 8, ["label", "name"]),
|
|
4940
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(e.commandArray, (
|
|
4941
|
-
label:
|
|
4942
|
-
name:
|
|
4997
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(e.commandArray, (u) => (openBlock(), createBlock(unref(ElTabPane), {
|
|
4998
|
+
label: c(u),
|
|
4999
|
+
name: c(u)
|
|
4943
5000
|
}, {
|
|
4944
5001
|
default: withCtx(() => [
|
|
4945
5002
|
renderSlot(a.$slots, "detail", {
|
|
4946
|
-
tabName:
|
|
5003
|
+
tabName: c(u),
|
|
4947
5004
|
searchParam: i.value
|
|
4948
5005
|
}, void 0, !0)
|
|
4949
5006
|
]),
|
|
@@ -4976,13 +5033,13 @@ ${u.message || u.resultcontent}\r
|
|
|
4976
5033
|
areaArray: [],
|
|
4977
5034
|
optionConfig: {
|
|
4978
5035
|
lazy: !0,
|
|
4979
|
-
lazyLoad: async (
|
|
4980
|
-
let a =
|
|
4981
|
-
|
|
4982
|
-
value:
|
|
4983
|
-
label:
|
|
4984
|
-
leaf:
|
|
4985
|
-
})), n(
|
|
5036
|
+
lazyLoad: async (c, n) => {
|
|
5037
|
+
let a = c?.value || 99999999, m = await InfrastructureApi("/ChildApi/SearchAreaInfo", { SearchType: 1, DataId: a });
|
|
5038
|
+
m = m.Select((u) => (l.areaArray.push(u), {
|
|
5039
|
+
value: u.Id,
|
|
5040
|
+
label: u.Name,
|
|
5041
|
+
leaf: u.IsLast == 1
|
|
5042
|
+
})), n(m);
|
|
4986
5043
|
}
|
|
4987
5044
|
}
|
|
4988
5045
|
});
|
|
@@ -4996,13 +5053,13 @@ ${u.message || u.resultcontent}\r
|
|
|
4996
5053
|
() => e.countyId,
|
|
4997
5054
|
() => l.elValue[2] = e.countyId
|
|
4998
5055
|
);
|
|
4999
|
-
const i = (
|
|
5000
|
-
let n = l.areaArray.FirstOrDefault((a) => a.Id ==
|
|
5001
|
-
t("update:provinceId", l.elValue[0]), t("update:provinceName", n?.Name), n = l.areaArray.FirstOrDefault((a) => a.Id ==
|
|
5056
|
+
const i = (c) => {
|
|
5057
|
+
let n = l.areaArray.FirstOrDefault((a) => a.Id == c[0]);
|
|
5058
|
+
t("update:provinceId", l.elValue[0]), t("update:provinceName", n?.Name), n = l.areaArray.FirstOrDefault((a) => a.Id == c[1]), t("update:cityId", l.elValue[1]), t("update:cityName", n?.Name), n = l.areaArray.FirstOrDefault((a) => a.Id == c[2]), t("update:countyId", l.elValue[2]), t("update:countyName", n?.Name);
|
|
5002
5059
|
};
|
|
5003
5060
|
return onMounted(async () => {
|
|
5004
5061
|
l.elValue = [e.provinceId, e.cityId, e.countyId];
|
|
5005
|
-
}), (
|
|
5062
|
+
}), (c, n) => (openBlock(), createBlock(unref(ElCascader), {
|
|
5006
5063
|
modelValue: l.elValue,
|
|
5007
5064
|
"onUpdate:modelValue": n[0] || (n[0] = (a) => l.elValue = a),
|
|
5008
5065
|
onChange: i,
|