ss-component-new 1.2.239 → 1.2.240
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/{MTLLoader-Dty52Kos.cjs → MTLLoader-BK7sCOKw.cjs} +1 -1
- package/dist/{MTLLoader-ZOJJ-Zca.js → MTLLoader-UTEzRiYH.js} +1 -1
- package/dist/{OrbitControls-fz1Q5z4o.js → OrbitControls-C4wOEoH5.js} +1 -1
- package/dist/{OrbitControls-B0AMmpiE.cjs → OrbitControls-DmVBM-Ud.cjs} +1 -1
- package/dist/{URDFLoader-Ancz7QVZ.cjs → URDFLoader-77AvV0WM.cjs} +1 -1
- package/dist/{URDFLoader-C3_kHBTh.js → URDFLoader-BAxsZiFV.js} +2 -2
- package/dist/{animationData-JHXk_SMb.js → animationData-DsDrgxIs.js} +1 -1
- package/dist/{animationData-D7z6SN34.cjs → animationData-DxQeR3lW.cjs} +1 -1
- package/dist/{array-B8jfTWdr.js → array-_9dR-jfG.js} +1 -1
- package/dist/{array-mOhrKMKc.cjs → array-gHdd6OE5.cjs} +1 -1
- package/dist/{iconfont-DeLrM3NF.js → iconfont-CCjP-T1w.js} +2 -2
- package/dist/{iconfont-Qm8bQNiI.cjs → iconfont-D4hZ8lQB.cjs} +1 -1
- package/dist/{index-mPCjoZzL.cjs → index-3a_FFP1r.cjs} +1 -1
- package/dist/{index-6cQWf9lg.cjs → index-B-ill49l.cjs} +1 -1
- package/dist/{index-DXc6VP0-.js → index-B4NaFshT.js} +1 -1
- package/dist/{index-DXahvDht.cjs → index-BGkKKMYM.cjs} +1 -1
- package/dist/{index-D9uP-j_f.js → index-BHB8_puL.js} +1 -1
- package/dist/{index-VXn4QQ6h.cjs → index-BHWo4qfG.cjs} +1 -1
- package/dist/{index-BLrtNHJw.cjs → index-BKj0fzZy.cjs} +1 -1
- package/dist/{index-BYyAqV5J.cjs → index-BOUCjrkn.cjs} +1 -1
- package/dist/{index-DW06_6Us.js → index-Bj_A0R0A.js} +3 -3
- package/dist/{index-DjD-V1yP.js → index-Bp-OGSaz.js} +7 -7
- package/dist/{index-CSoBuWPq.js → index-BpVqG5KK.js} +3 -3
- package/dist/{index-CaQkGd4w.cjs → index-ByAwqXPJ.cjs} +1 -1
- package/dist/{index-Cun2oG5e.js → index-C0EnW_nv.js} +4 -4
- package/dist/{index-Bt7zboia.js → index-CCBlxpGn.js} +1 -1
- package/dist/{index-C-GYH2e-.cjs → index-CEJrI-Nt.cjs} +1 -1
- package/dist/{index-CLIohYt2.cjs → index-COT_roXg.cjs} +1 -1
- package/dist/index-CQ52Awk5.js +4276 -0
- package/dist/{index-XAZJKL25.cjs → index-C_2bhy1j.cjs} +1 -1
- package/dist/{index-305au7cl.cjs → index-CjQ-w88j.cjs} +1 -1
- package/dist/{index-TnYAZpgF.js → index-CkKef9Xg.js} +2 -2
- package/dist/{index-DIv-wtkN.js → index-CmOyLg9f.js} +8 -8
- package/dist/{index--9gCNgdE.js → index-CqjjUEYP.js} +1 -1
- package/dist/{index-Ds4CAs9m.js → index-Csu4kumc.js} +4 -4
- package/dist/index-Cth3DRog.cjs +13 -0
- package/dist/{index-RBfbRP89.js → index-D-WFV7eu.js} +1 -1
- package/dist/{index-CB9123Ca.cjs → index-D5-t4UZk.cjs} +1 -1
- package/dist/{index-B7dQMnVH.js → index-D9L82EwE.js} +2 -2
- package/dist/{index-C_fnYWIg.cjs → index-DC2dPfGE.cjs} +1 -1
- package/dist/{index-BAahUD8z.cjs → index-DCCxsNGw.cjs} +1 -1
- package/dist/{index-DSmWhHh1.js → index-DFSBb_Up.js} +1 -1
- package/dist/{index-Y-qD2EKj.js → index-DNZm-g41.js} +1 -1
- package/dist/{index-B_R-9InB.cjs → index-DhWSyYn_.cjs} +1 -1
- package/dist/{index-CRoEK_jP.cjs → index-DrKyipWO.cjs} +1 -1
- package/dist/{index-CF8aoT7d.js → index-GCsmhk7R.js} +1 -1
- package/dist/{index-FjrBXhOF.js → index-IV9zWUQN.js} +1 -1
- package/dist/{index-DOCcOmco.js → index-JVlLPF3o.js} +1 -1
- package/dist/{index-D7CfJNBg.cjs → index-LSc_D7Br.cjs} +1 -1
- package/dist/{index-BwoWLLrS.cjs → index-QrPmlKwo.cjs} +1 -1
- package/dist/{index-cVN315Aw.cjs → index-Rsl-9SHE.cjs} +1 -1
- package/dist/{index-CL_SJFfm.js → index-WUwZkGTy.js} +4 -4
- package/dist/{index-BGQxV1Z0.js → index-YClaEzon.js} +1 -1
- package/dist/{index-BO9Xirjz.js → index-cajHEMXA.js} +16 -16
- package/dist/{index-CqcIJB7l.cjs → index-dP_btubw.cjs} +1 -1
- package/dist/{index-CIkvZBU9.cjs → index-frLe3S9h.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-B--yNtf1.js → index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-DQlBopIf.js} +6 -6
- package/dist/{index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-Ceu3XjdH.cjs → index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-FomZb4vY.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-D1EZRqgB.cjs → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-B_ZyoH-c.cjs} +40 -40
- package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-oA5S09l2.js → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-D6Ct13p6.js} +1008 -1013
- package/dist/{index.vue_vue_type_style_index_0_scoped_3d3811e8_lang-BmGjawag.js → index.vue_vue_type_style_index_0_scoped_3d3811e8_lang-BzowNu9E.js} +4 -4
- package/dist/{index.vue_vue_type_style_index_0_scoped_3d3811e8_lang-DNL_YdS9.cjs → index.vue_vue_type_style_index_0_scoped_3d3811e8_lang-DZHKXyL_.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_1_lang-CDkVExU4.cjs → index.vue_vue_type_style_index_1_lang-CcCJPXIe.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_1_lang-CmRU0NlU.js → index.vue_vue_type_style_index_1_lang-DZE35KJA.js} +3 -3
- package/dist/{main-B7qUb3OO.js → main-BZ1jv6xE.js} +3 -3
- package/dist/{main-CzJfiOuQ.cjs → main-CWD_I3fY.cjs} +1 -1
- package/dist/ss-component.cjs +1 -1
- package/dist/ss-component.css +1 -1
- package/dist/ss-component.js +9 -9
- package/dist/ss-component2.cjs +1 -1
- package/dist/ss-component2.js +10 -10
- package/dist/{threeModel-B-WiRZsP.js → threeModel-CgO4hMA7.js} +4 -4
- package/dist/{threeModel-9244RH82.cjs → threeModel-DQL1qjlJ.cjs} +1 -1
- package/dist/{threePreview-CDVWPPqC.js → threePreview-NRT3zSEh.js} +3 -3
- package/dist/{threePreview-Cs-fXU15.cjs → threePreview-tIv-KGBG.cjs} +1 -1
- package/dist/{threeSceneView-D-QgnVtZ.cjs → threeSceneView-B1nFHsgF.cjs} +1 -1
- package/dist/{threeSceneView-BIVFCX44.js → threeSceneView-ftUAfAK7.js} +8 -8
- package/dist/{threeSceneViewForCPMPIP-CP4Z7-ku.cjs → threeSceneViewForCPMPIP-8ezFd1ZK.cjs} +1 -1
- package/dist/{threeSceneViewForCPMPIP-l_jYJCJ1.js → threeSceneViewForCPMPIP-CwJWPro2.js} +7 -7
- package/dist/{threeTrackPathView-DMTFKySx.cjs → threeTrackPathView-DmKEVnaj.cjs} +1 -1
- package/dist/{threeTrackPathView-CMTtFQwo.js → threeTrackPathView-SF7nRPxQ.js} +3 -3
- package/dist/{threeViewerHost-AibV8TLI.cjs → threeViewerHost-BQ2Nydiz.cjs} +1 -1
- package/dist/{threeViewerHost-CSfITlTw.js → threeViewerHost-EYzWF2vO.js} +2 -2
- package/dist/{urdfTree-Bg_hGuBV.js → urdfTree-2wTWJ6Bj.js} +1 -1
- package/dist/{urdfTree-C5RSefmZ.cjs → urdfTree-Dboa3l9g.cjs} +1 -1
- package/dist/{workpieceTreePanel-DxjKBScf.js → workpieceTreePanel-BGGioqup.js} +4 -4
- package/dist/{workpieceTreePanel-CGYnW5xz.cjs → workpieceTreePanel-DM1pjPI1.cjs} +1 -1
- package/package.json +1 -1
- package/dist/index-BnD8y-0W.cjs +0 -1
- package/dist/index-C-X7YmVi.js +0 -3722
- package/dist/obj/model.mtl +0 -42
- package/dist/obj/model.obj +0 -26110
- package/public/obj/model.mtl +0 -42
- package/public/obj/model.obj +0 -26110
|
@@ -0,0 +1,4276 @@
|
|
|
1
|
+
var Ys = Object.defineProperty;
|
|
2
|
+
var Zs = (D, j, A) => j in D ? Ys(D, j, { enumerable: !0, configurable: !0, writable: !0, value: A }) : D[j] = A;
|
|
3
|
+
var jl = (D, j, A) => Zs(D, typeof j != "symbol" ? j + "" : j, A);
|
|
4
|
+
import { ref as G, watch as $l, nextTick as Ja, resolveComponent as ol, createBlock as Xe, openBlock as ee, withCtx as H, createElementVNode as de, renderSlot as on, onMounted as Tr, createElementBlock as Ce, normalizeStyle as pa, normalizeClass as _n, toDisplayString as Ze, createCommentVNode as Ke, createVNode as V, unref as zl, Fragment as Zl, renderList as Il, createTextVNode as Ie, defineComponent as Or, computed as Ca, reactive as za, inject as Is, provide as Vs, onBeforeUnmount as eo, onUnmounted as lo, resolveDirective as ao, createSlots as ro, withModifiers as ar, withDirectives as kr, vShow as un } from "vue";
|
|
5
|
+
import { bh as tn, as as dn, c as ae, E as nl, bD as An, g as ia, e as Cn, h as no, p as va, s as Ta, u as so, c3 as oo, f as io, b as ga, bv as uo, bt as cn, c4 as to } from "./index-7MBVUN82.js";
|
|
6
|
+
import { $ as wa, aI as co, aJ as Wa, aK as po, g as xa, b as fo, a as ho, _ as yo, u as vo, aL as pn, aM as go, aN as fn, aO as bo, d as Oa, X as mr, q as hn, l as ko, aP as yn, a7 as mo, aQ as So, aR as _o, aS as Ao, Z as Co, aT as To } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-D6Ct13p6.js";
|
|
7
|
+
import { d as Ua, _ as vn, j as Oo, e as gn, E as Sr, u as xo } from "./index-C0EnW_nv.js";
|
|
8
|
+
import { a as wo, T as Uo } from "./threeViewerHost-EYzWF2vO.js";
|
|
9
|
+
import { u as Do, a as Eo, E as bn } from "./index-3oQGURYh.js";
|
|
10
|
+
import { c as Lo } from "./index.vue_vue_type_style_index_1_lang-DZE35KJA.js";
|
|
11
|
+
import { _ as qa } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
12
|
+
import { s as ca } from "./index-CqjjUEYP.js";
|
|
13
|
+
import "./index-DfFq9kkn.js";
|
|
14
|
+
import { i as kn } from "./isString-D70CzuJZ.js";
|
|
15
|
+
const _r = (D) => D.match(/\((.*)\)/)[1], mn = {
|
|
16
|
+
__name: "index",
|
|
17
|
+
props: {
|
|
18
|
+
isVisible: {
|
|
19
|
+
type: Boolean,
|
|
20
|
+
default: !1
|
|
21
|
+
},
|
|
22
|
+
title: {
|
|
23
|
+
type: String,
|
|
24
|
+
default: ""
|
|
25
|
+
},
|
|
26
|
+
placement: {
|
|
27
|
+
type: String,
|
|
28
|
+
default: "bottom"
|
|
29
|
+
},
|
|
30
|
+
width: {
|
|
31
|
+
type: Number,
|
|
32
|
+
default: 200
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
setup(D) {
|
|
36
|
+
const j = D, A = G(null), T = G(!1), m = G(null);
|
|
37
|
+
return $l(
|
|
38
|
+
() => j == null ? void 0 : j.isVisible,
|
|
39
|
+
() => {
|
|
40
|
+
T.value = j == null ? void 0 : j.isVisible;
|
|
41
|
+
},
|
|
42
|
+
{ deep: !0, immediate: !0 }
|
|
43
|
+
), $l(
|
|
44
|
+
() => m.value,
|
|
45
|
+
() => {
|
|
46
|
+
Ja(() => {
|
|
47
|
+
var s, Z;
|
|
48
|
+
(Z = (s = A.value) == null ? void 0 : s.updatePopper) == null || Z.call(s);
|
|
49
|
+
});
|
|
50
|
+
},
|
|
51
|
+
{ deep: !0, immediate: !0 }
|
|
52
|
+
), (s, Z) => {
|
|
53
|
+
const fe = ol("el-popover");
|
|
54
|
+
return ee(), Xe(fe, {
|
|
55
|
+
visible: T.value,
|
|
56
|
+
title: j == null ? void 0 : j.title,
|
|
57
|
+
placement: j == null ? void 0 : j.placement,
|
|
58
|
+
width: j == null ? void 0 : j.width,
|
|
59
|
+
ref_key: "popOverRef",
|
|
60
|
+
ref: A
|
|
61
|
+
}, {
|
|
62
|
+
reference: H(() => [
|
|
63
|
+
de("div", null, [
|
|
64
|
+
on(s.$slots, "reference", {
|
|
65
|
+
ref_key: "referenceRef",
|
|
66
|
+
ref: m
|
|
67
|
+
})
|
|
68
|
+
])
|
|
69
|
+
]),
|
|
70
|
+
default: H(() => [
|
|
71
|
+
de("div", null, [
|
|
72
|
+
on(s.$slots, "content")
|
|
73
|
+
])
|
|
74
|
+
]),
|
|
75
|
+
_: 3
|
|
76
|
+
}, 8, ["visible", "title", "placement", "width"]);
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
}, jo = {
|
|
80
|
+
key: 0,
|
|
81
|
+
class: "extra-button-content"
|
|
82
|
+
}, $o = { class: "table-operator-wrap" }, Po = {
|
|
83
|
+
key: 0,
|
|
84
|
+
class: "extra-button-filter"
|
|
85
|
+
}, No = { class: "form-content-value" }, Ro = {
|
|
86
|
+
key: 1,
|
|
87
|
+
class: "extra-header"
|
|
88
|
+
}, Bo = {
|
|
89
|
+
class: "drop-menu",
|
|
90
|
+
style: { width: "120px" }
|
|
91
|
+
}, Mo = { key: 0 }, Fo = { key: 1 }, Ko = {
|
|
92
|
+
key: 1,
|
|
93
|
+
class: "extra-button-content tabs-button-wrapper"
|
|
94
|
+
}, zo = { class: "table-operator-wrap" }, Jo = { class: "extra-button-filter" }, Wo = { class: "form-content-value" }, qo = {
|
|
95
|
+
key: 0,
|
|
96
|
+
class: "extra-header"
|
|
97
|
+
}, Go = {
|
|
98
|
+
class: "drop-menu",
|
|
99
|
+
style: { width: "120px" }
|
|
100
|
+
}, Ho = { key: 0 }, Xo = { key: 1 }, Qo = {
|
|
101
|
+
__name: "header",
|
|
102
|
+
props: {
|
|
103
|
+
pageLayout: {
|
|
104
|
+
type: String,
|
|
105
|
+
default: "vertical"
|
|
106
|
+
},
|
|
107
|
+
lockingPage: Boolean,
|
|
108
|
+
level: {
|
|
109
|
+
type: Number,
|
|
110
|
+
default: 1
|
|
111
|
+
},
|
|
112
|
+
compName: {
|
|
113
|
+
type: String,
|
|
114
|
+
default: "表格名称",
|
|
115
|
+
required: !1
|
|
116
|
+
},
|
|
117
|
+
filterShow: {
|
|
118
|
+
type: Boolean,
|
|
119
|
+
default: !1
|
|
120
|
+
},
|
|
121
|
+
isDevMode: Boolean,
|
|
122
|
+
selectNums: Number,
|
|
123
|
+
dataNums: Number,
|
|
124
|
+
filterValues: Array,
|
|
125
|
+
buttons: {
|
|
126
|
+
type: Array,
|
|
127
|
+
default: () => []
|
|
128
|
+
},
|
|
129
|
+
columns: {
|
|
130
|
+
type: Array,
|
|
131
|
+
default: () => []
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
emits: ["buttonClick", "filter", "getImportData"],
|
|
135
|
+
setup(D, { emit: j }) {
|
|
136
|
+
const A = j, T = D, m = G(""), s = G(!1), Z = G([]), fe = G([{ label: "取消", background: "#999999" }, {
|
|
137
|
+
label: "清空",
|
|
138
|
+
background: "#999999"
|
|
139
|
+
}, { label: "确认" }]), be = [
|
|
140
|
+
{
|
|
141
|
+
label: "新增",
|
|
142
|
+
icon: "Plus"
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
label: "导入",
|
|
146
|
+
icon: "import"
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
label: "导出",
|
|
150
|
+
icon: "export"
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
label: "OCR识别",
|
|
154
|
+
icon: "ocr"
|
|
155
|
+
}
|
|
156
|
+
], Oe = (he) => {
|
|
157
|
+
const Je = he.raw;
|
|
158
|
+
if (!Je) return;
|
|
159
|
+
const el = new FileReader();
|
|
160
|
+
el.onload = (ye) => {
|
|
161
|
+
try {
|
|
162
|
+
const ie = new Uint8Array(ye.target.result), oe = co(ie, { type: "array" }), Le = oe.SheetNames[0], B = oe.Sheets[Le], ul = Wa.decode_range(B["!ref"]).e.c + 1, le = new Array(ul).fill(""), w = [];
|
|
163
|
+
for (const re in B) {
|
|
164
|
+
if (re[0] === "!") continue;
|
|
165
|
+
const { r: we, c: We } = Wa.decode_cell(re);
|
|
166
|
+
let Tl = B[re].v;
|
|
167
|
+
if (B[re].t === "n" && Tl > 0 && Tl < 1e6 && (Tl = new Date((Tl - 25569) * 86400 * 1e3).toISOString().split("T")[0]), (Tl == null || Tl === "") && (Tl = ""), we === 0)
|
|
168
|
+
le[We] = Tl;
|
|
169
|
+
else {
|
|
170
|
+
if (!w[we - 1]) {
|
|
171
|
+
w[we - 1] = {};
|
|
172
|
+
for (let ql = 0; ql < ul; ql++)
|
|
173
|
+
w[we - 1][`col_${ql}`] = "";
|
|
174
|
+
}
|
|
175
|
+
w[we - 1][`col_${We}`] = Tl;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
for (let re = 0; re < ul; re++)
|
|
179
|
+
le[re] === void 0 && (le[re] = "");
|
|
180
|
+
const ll = w == null ? void 0 : w[0];
|
|
181
|
+
if (!(ll != null && ll.hasOwnProperty("col_0"))) return nl.error("导入的数据列不匹配,请检查是否错位");
|
|
182
|
+
A("getImportData", le, w);
|
|
183
|
+
} catch (ie) {
|
|
184
|
+
throw nl.error(ie.message), new Error(ie.message);
|
|
185
|
+
}
|
|
186
|
+
}, el.readAsArrayBuffer(Je);
|
|
187
|
+
}, Ve = (he) => {
|
|
188
|
+
var el;
|
|
189
|
+
const Je = (el = Z.value) == null ? void 0 : el.reduce((ye, ie, oe) => (oe === 0 ? ye[ie.label] = he : ye[ie.label] = ie == null ? void 0 : ie.value, ye), {});
|
|
190
|
+
A("filter", Je, he, !0);
|
|
191
|
+
}, rl = (he) => {
|
|
192
|
+
A("buttonClick", he);
|
|
193
|
+
}, tl = (he) => {
|
|
194
|
+
var Je, el;
|
|
195
|
+
Z.value = (el = (Je = wa(ae(he))) == null ? void 0 : Je.filter((ye) => (ye == null ? void 0 : ye.label) !== "" && (ye == null ? void 0 : ye.label) !== "操作")) == null ? void 0 : el.map((ye) => ({
|
|
196
|
+
label: (ye == null ? void 0 : ye.label) ?? "",
|
|
197
|
+
value: "",
|
|
198
|
+
name: (ye == null ? void 0 : ye.label) ?? "",
|
|
199
|
+
isFormColHidden: ye == null ? void 0 : ye.isTableColHidden,
|
|
200
|
+
width: 2
|
|
201
|
+
}));
|
|
202
|
+
}, il = G(!1), Ol = (he) => {
|
|
203
|
+
var Je;
|
|
204
|
+
if ((he == null ? void 0 : he.buttonName) === "确认" && (A("filter", he == null ? void 0 : he.content), il.value = (he == null ? void 0 : he.content) && Object.values(he == null ? void 0 : he.content).length > 0), (he == null ? void 0 : he.buttonName) === "清空") {
|
|
205
|
+
const el = ae(he == null ? void 0 : he.content);
|
|
206
|
+
for (const ye in el)
|
|
207
|
+
el[ye] = "";
|
|
208
|
+
Z.value = (Je = Z.value) == null ? void 0 : Je.map((ye) => ({
|
|
209
|
+
...ye,
|
|
210
|
+
value: ""
|
|
211
|
+
})), A("filter", el), il.value = !1;
|
|
212
|
+
}
|
|
213
|
+
s.value = !1;
|
|
214
|
+
}, xl = () => {
|
|
215
|
+
var Je, el;
|
|
216
|
+
Z.value = (Je = Z.value) == null ? void 0 : Je.map((ye) => ({
|
|
217
|
+
...ye,
|
|
218
|
+
value: ""
|
|
219
|
+
}));
|
|
220
|
+
const he = (el = Z.value) == null ? void 0 : el.reduce((ye, ie) => (ye[ie.label] = ie.value, ye), {});
|
|
221
|
+
A("filter", he);
|
|
222
|
+
};
|
|
223
|
+
return Tr(() => {
|
|
224
|
+
tl(T.columns);
|
|
225
|
+
}), $l(
|
|
226
|
+
() => T.columns,
|
|
227
|
+
() => {
|
|
228
|
+
tl(T.columns);
|
|
229
|
+
},
|
|
230
|
+
{ deep: !0, immediate: !0 }
|
|
231
|
+
), (he, Je) => {
|
|
232
|
+
var B, kl, ul, le;
|
|
233
|
+
const el = ol("el-icon"), ye = ol("svg-icon"), ie = ol("el-input"), oe = ol("el-button"), Le = ol("el-upload");
|
|
234
|
+
return D.pageLayout === "vertical" ? (ee(), Ce("div", jo, [
|
|
235
|
+
de("div", {
|
|
236
|
+
class: _n(D.compName ? "table-name-wrap" : ""),
|
|
237
|
+
style: pa({
|
|
238
|
+
background: (T == null ? void 0 : T.level) > 1 ? "transparent" : "var(--ssgroup-background)",
|
|
239
|
+
paddingLeft: ((T == null ? void 0 : T.level) - 1) * 12 + "px",
|
|
240
|
+
fontWeight: 600 - ((T == null ? void 0 : T.level) - 1) * 100 >= 400 ? 600 - ((T == null ? void 0 : T.level) - 1) * 100 : 400,
|
|
241
|
+
fontSize: 17 - (T == null ? void 0 : T.level) >= 14 ? 17 - (T == null ? void 0 : T.level) + "px" : "14px"
|
|
242
|
+
})
|
|
243
|
+
}, Ze(D.compName), 7),
|
|
244
|
+
de("div", $o, [
|
|
245
|
+
T != null && T.filterShow ? (ee(), Ce("div", Po, [
|
|
246
|
+
V(mn, {
|
|
247
|
+
title: "",
|
|
248
|
+
width: 800,
|
|
249
|
+
placement: "bottom-start",
|
|
250
|
+
isVisible: s.value
|
|
251
|
+
}, {
|
|
252
|
+
reference: H(() => {
|
|
253
|
+
var w, ll, re, we;
|
|
254
|
+
return [
|
|
255
|
+
V(ie, {
|
|
256
|
+
modelValue: m.value,
|
|
257
|
+
"onUpdate:modelValue": Je[1] || (Je[1] = (We) => m.value = We),
|
|
258
|
+
style: { "min-width": "80px" },
|
|
259
|
+
placeholder: il.value ? (re = (ll = (w = D.filterValues) == null ? void 0 : w.filter((We) => We)) == null ? void 0 : ll.slice(0, 3)) == null ? void 0 : re.join("/") : "搜索",
|
|
260
|
+
"prefix-icon": zl(tn),
|
|
261
|
+
clearable: "",
|
|
262
|
+
onInput: Ve,
|
|
263
|
+
disabled: ((we = Z.value) == null ? void 0 : we.length) === 0
|
|
264
|
+
}, {
|
|
265
|
+
suffix: H(() => {
|
|
266
|
+
var We, Tl;
|
|
267
|
+
return [
|
|
268
|
+
!m.value && ((Tl = (We = D.filterValues) == null ? void 0 : We.filter((ql) => ql)) != null && Tl.join("/")) ? (ee(), Xe(el, {
|
|
269
|
+
key: 0,
|
|
270
|
+
style: { cursor: "pointer" },
|
|
271
|
+
onClick: xl
|
|
272
|
+
}, {
|
|
273
|
+
default: H(() => [
|
|
274
|
+
V(zl(dn))
|
|
275
|
+
]),
|
|
276
|
+
_: 1
|
|
277
|
+
})) : Ke("", !0)
|
|
278
|
+
];
|
|
279
|
+
}),
|
|
280
|
+
append: H(() => [
|
|
281
|
+
de("span", {
|
|
282
|
+
title: "条件查询",
|
|
283
|
+
onClick: Je[0] || (Je[0] = (We) => s.value = !s.value)
|
|
284
|
+
}, [
|
|
285
|
+
V(ye, {
|
|
286
|
+
name: "query",
|
|
287
|
+
style: { width: "15px", height: "15px", cursor: "pointer" }
|
|
288
|
+
})
|
|
289
|
+
])
|
|
290
|
+
]),
|
|
291
|
+
_: 1
|
|
292
|
+
}, 8, ["modelValue", "placeholder", "prefix-icon", "disabled"])
|
|
293
|
+
];
|
|
294
|
+
}),
|
|
295
|
+
content: H(() => [
|
|
296
|
+
de("div", No, [
|
|
297
|
+
(ee(), Xe(Ua, {
|
|
298
|
+
rowContents: Z.value,
|
|
299
|
+
buttonValue: fe.value,
|
|
300
|
+
isRowFlex: !0,
|
|
301
|
+
isEnableWrap: !1,
|
|
302
|
+
isButtonRow: !1,
|
|
303
|
+
key: fe.value,
|
|
304
|
+
isStartJustify: !1,
|
|
305
|
+
onOnButtonClick: Ol
|
|
306
|
+
}, null, 8, ["rowContents", "buttonValue"]))
|
|
307
|
+
])
|
|
308
|
+
]),
|
|
309
|
+
_: 1
|
|
310
|
+
}, 8, ["isVisible"])
|
|
311
|
+
])) : Ke("", !0),
|
|
312
|
+
D.buttons && ((B = D.buttons) == null ? void 0 : B.length) > 0 ? (ee(), Ce("div", Ro, [
|
|
313
|
+
(ee(!0), Ce(Zl, null, Il((kl = D.buttons) == null ? void 0 : kl.filter((w) => D.isDevMode || (w == null ? void 0 : w.label) !== "修改模板"), (w, ll) => (ee(), Ce("div", {
|
|
314
|
+
class: "extra-contents",
|
|
315
|
+
key: ll
|
|
316
|
+
}, [
|
|
317
|
+
(w == null ? void 0 : w.type) === "upload" ? (ee(), Xe(Le, {
|
|
318
|
+
key: 0,
|
|
319
|
+
class: "upload-button-wrap",
|
|
320
|
+
"on-change": Oe,
|
|
321
|
+
accept: ".xlsx,.xls",
|
|
322
|
+
"auto-upload": !1,
|
|
323
|
+
action: "#",
|
|
324
|
+
"show-file-list": !1,
|
|
325
|
+
disabled: !!D.lockingPage
|
|
326
|
+
}, {
|
|
327
|
+
default: H(() => [
|
|
328
|
+
V(oe, {
|
|
329
|
+
disabled: !!D.lockingPage,
|
|
330
|
+
style: pa({ background: (w == null ? void 0 : w.background) ?? "var(--ssbutton-theme-bg)", color: (w == null ? void 0 : w.color) ?? "var(--ssbutton-theme-color)" })
|
|
331
|
+
}, {
|
|
332
|
+
default: H(() => [
|
|
333
|
+
Ie(Ze(w == null ? void 0 : w.label), 1)
|
|
334
|
+
]),
|
|
335
|
+
_: 2
|
|
336
|
+
}, 1032, ["disabled", "style"])
|
|
337
|
+
]),
|
|
338
|
+
_: 2
|
|
339
|
+
}, 1032, ["disabled"])) : Ke("", !0),
|
|
340
|
+
(w == null ? void 0 : w.type) === "popover" ? (ee(), Xe(vn, { key: 1 }, {
|
|
341
|
+
dropTitle: H(() => [
|
|
342
|
+
(w == null ? void 0 : w.type) === "popover" ? (ee(), Xe(oe, {
|
|
343
|
+
key: 0,
|
|
344
|
+
disabled: !!D.lockingPage,
|
|
345
|
+
style: pa({ background: (w == null ? void 0 : w.background) ?? "var(--ssbutton-theme-bg)", color: (w == null ? void 0 : w.color) ?? "var(--ssbutton-theme-color)" })
|
|
346
|
+
}, {
|
|
347
|
+
default: H(() => [
|
|
348
|
+
Ie(Ze(w == null ? void 0 : w.label), 1)
|
|
349
|
+
]),
|
|
350
|
+
_: 2
|
|
351
|
+
}, 1032, ["disabled", "style"])) : Ke("", !0)
|
|
352
|
+
]),
|
|
353
|
+
dropMenu: H(() => [
|
|
354
|
+
de("div", Bo, [
|
|
355
|
+
(ee(!0), Ce(Zl, null, Il(w == null ? void 0 : w.contents, (re) => (ee(), Xe(oe, {
|
|
356
|
+
key: re == null ? void 0 : re.label,
|
|
357
|
+
disabled: !!D.lockingPage,
|
|
358
|
+
style: { width: "100%", margin: "0", border: "none", display: "flex", "justify-content": "flex-start" },
|
|
359
|
+
onClick: (we) => rl(re == null ? void 0 : re.label)
|
|
360
|
+
}, {
|
|
361
|
+
default: H(() => {
|
|
362
|
+
var we, We;
|
|
363
|
+
return [
|
|
364
|
+
Ie(Ze(re == null ? void 0 : re.label), 1),
|
|
365
|
+
(we = re == null ? void 0 : re.label) != null && we.includes("选中") ? (ee(), Ce("span", Mo, "(" + Ze(D.selectNums) + ")", 1)) : Ke("", !0),
|
|
366
|
+
(We = re == null ? void 0 : re.label) != null && We.includes("全部") ? (ee(), Ce("span", Fo, "(" + Ze(D.dataNums) + ")", 1)) : Ke("", !0)
|
|
367
|
+
];
|
|
368
|
+
}),
|
|
369
|
+
_: 2
|
|
370
|
+
}, 1032, ["disabled", "onClick"]))), 128))
|
|
371
|
+
])
|
|
372
|
+
]),
|
|
373
|
+
_: 2
|
|
374
|
+
}, 1024)) : Ke("", !0),
|
|
375
|
+
w != null && w.type ? Ke("", !0) : (ee(), Xe(oe, {
|
|
376
|
+
key: 2,
|
|
377
|
+
id: "themeButton",
|
|
378
|
+
disabled: !!D.lockingPage,
|
|
379
|
+
style: pa({ background: (w == null ? void 0 : w.background) ?? "var(--ssbutton-theme-bg)", color: (w == null ? void 0 : w.color) ?? "var(--ssbutton-theme-color)" }),
|
|
380
|
+
onClick: (re) => rl(w == null ? void 0 : w.label)
|
|
381
|
+
}, {
|
|
382
|
+
default: H(() => [
|
|
383
|
+
Ie(Ze(w == null ? void 0 : w.label), 1)
|
|
384
|
+
]),
|
|
385
|
+
_: 2
|
|
386
|
+
}, 1032, ["disabled", "style", "onClick"]))
|
|
387
|
+
]))), 128))
|
|
388
|
+
])) : Ke("", !0)
|
|
389
|
+
])
|
|
390
|
+
])) : (ee(), Ce("div", Ko, [
|
|
391
|
+
de("div", zo, [
|
|
392
|
+
de("div", Jo, [
|
|
393
|
+
V(mn, {
|
|
394
|
+
title: "",
|
|
395
|
+
width: 800,
|
|
396
|
+
placement: "bottom-start",
|
|
397
|
+
isVisible: s.value
|
|
398
|
+
}, {
|
|
399
|
+
reference: H(() => {
|
|
400
|
+
var w, ll, re, we;
|
|
401
|
+
return [
|
|
402
|
+
V(ie, {
|
|
403
|
+
modelValue: m.value,
|
|
404
|
+
"onUpdate:modelValue": Je[3] || (Je[3] = (We) => m.value = We),
|
|
405
|
+
style: { "min-width": "80px" },
|
|
406
|
+
placeholder: il.value ? (re = (ll = (w = D.filterValues) == null ? void 0 : w.filter((We) => We)) == null ? void 0 : ll.slice(0, 3)) == null ? void 0 : re.join("/") : "搜索",
|
|
407
|
+
"prefix-icon": zl(tn),
|
|
408
|
+
clearable: "",
|
|
409
|
+
onInput: Ve,
|
|
410
|
+
disabled: ((we = Z.value) == null ? void 0 : we.length) === 0
|
|
411
|
+
}, {
|
|
412
|
+
suffix: H(() => {
|
|
413
|
+
var We, Tl;
|
|
414
|
+
return [
|
|
415
|
+
!m.value && ((Tl = (We = D.filterValues) == null ? void 0 : We.filter((ql) => ql)) != null && Tl.join("/")) ? (ee(), Xe(el, {
|
|
416
|
+
key: 0,
|
|
417
|
+
style: { cursor: "pointer" },
|
|
418
|
+
onClick: xl
|
|
419
|
+
}, {
|
|
420
|
+
default: H(() => [
|
|
421
|
+
V(zl(dn))
|
|
422
|
+
]),
|
|
423
|
+
_: 1
|
|
424
|
+
})) : Ke("", !0)
|
|
425
|
+
];
|
|
426
|
+
}),
|
|
427
|
+
append: H(() => [
|
|
428
|
+
de("span", {
|
|
429
|
+
title: "条件查询",
|
|
430
|
+
onClick: Je[2] || (Je[2] = (We) => s.value = !s.value)
|
|
431
|
+
}, [
|
|
432
|
+
V(ye, {
|
|
433
|
+
name: "query",
|
|
434
|
+
style: { width: "15px", height: "15px", cursor: "pointer" }
|
|
435
|
+
})
|
|
436
|
+
])
|
|
437
|
+
]),
|
|
438
|
+
_: 1
|
|
439
|
+
}, 8, ["modelValue", "placeholder", "prefix-icon", "disabled"])
|
|
440
|
+
];
|
|
441
|
+
}),
|
|
442
|
+
content: H(() => [
|
|
443
|
+
de("div", Wo, [
|
|
444
|
+
(ee(), Xe(Ua, {
|
|
445
|
+
rowContents: Z.value,
|
|
446
|
+
buttonValue: fe.value,
|
|
447
|
+
isRowFlex: !0,
|
|
448
|
+
isEnableWrap: !1,
|
|
449
|
+
isButtonRow: !1,
|
|
450
|
+
key: fe.value,
|
|
451
|
+
isStartJustify: !1,
|
|
452
|
+
onOnButtonClick: Ol
|
|
453
|
+
}, null, 8, ["rowContents", "buttonValue"]))
|
|
454
|
+
])
|
|
455
|
+
]),
|
|
456
|
+
_: 1
|
|
457
|
+
}, 8, ["isVisible"])
|
|
458
|
+
]),
|
|
459
|
+
D.buttons && ((ul = D.buttons) == null ? void 0 : ul.length) > 0 ? (ee(), Ce("div", qo, [
|
|
460
|
+
(ee(!0), Ce(Zl, null, Il((le = D.buttons) == null ? void 0 : le.filter((w) => D.isDevMode || (w == null ? void 0 : w.label) !== "修改模板"), (w, ll) => (ee(), Ce("div", {
|
|
461
|
+
class: "extra-contents",
|
|
462
|
+
key: ll
|
|
463
|
+
}, [
|
|
464
|
+
(w == null ? void 0 : w.type) === "upload" ? (ee(), Xe(Le, {
|
|
465
|
+
key: 0,
|
|
466
|
+
class: "upload-button-wrap",
|
|
467
|
+
"on-change": Oe,
|
|
468
|
+
accept: ".xlsx,.xls",
|
|
469
|
+
"auto-upload": !1,
|
|
470
|
+
action: "#",
|
|
471
|
+
"show-file-list": !1
|
|
472
|
+
}, {
|
|
473
|
+
default: H(() => [
|
|
474
|
+
V(oe, { style: { background: "transparent", color: "#666666" } }, {
|
|
475
|
+
icon: H(() => {
|
|
476
|
+
var re;
|
|
477
|
+
return [
|
|
478
|
+
V(ye, {
|
|
479
|
+
name: (re = be == null ? void 0 : be.find((we) => (we == null ? void 0 : we.label) === (w == null ? void 0 : w.label))) == null ? void 0 : re.icon
|
|
480
|
+
}, null, 8, ["name"])
|
|
481
|
+
];
|
|
482
|
+
}),
|
|
483
|
+
default: H(() => [
|
|
484
|
+
Ie(" " + Ze(w == null ? void 0 : w.label), 1)
|
|
485
|
+
]),
|
|
486
|
+
_: 2
|
|
487
|
+
}, 1024)
|
|
488
|
+
]),
|
|
489
|
+
_: 2
|
|
490
|
+
}, 1024)) : Ke("", !0),
|
|
491
|
+
(w == null ? void 0 : w.type) === "popover" ? (ee(), Xe(vn, { key: 1 }, {
|
|
492
|
+
dropTitle: H(() => [
|
|
493
|
+
(w == null ? void 0 : w.type) === "popover" ? (ee(), Xe(oe, {
|
|
494
|
+
key: 0,
|
|
495
|
+
style: { background: "transparent", color: "#666666" }
|
|
496
|
+
}, {
|
|
497
|
+
icon: H(() => {
|
|
498
|
+
var re;
|
|
499
|
+
return [
|
|
500
|
+
V(ye, {
|
|
501
|
+
name: (re = be == null ? void 0 : be.find((we) => (we == null ? void 0 : we.label) === (w == null ? void 0 : w.label))) == null ? void 0 : re.icon
|
|
502
|
+
}, null, 8, ["name"])
|
|
503
|
+
];
|
|
504
|
+
}),
|
|
505
|
+
default: H(() => [
|
|
506
|
+
Ie(" " + Ze(w == null ? void 0 : w.label), 1)
|
|
507
|
+
]),
|
|
508
|
+
_: 2
|
|
509
|
+
}, 1024)) : Ke("", !0)
|
|
510
|
+
]),
|
|
511
|
+
dropMenu: H(() => [
|
|
512
|
+
de("div", Go, [
|
|
513
|
+
(ee(!0), Ce(Zl, null, Il(w == null ? void 0 : w.contents, (re) => (ee(), Xe(oe, {
|
|
514
|
+
key: re == null ? void 0 : re.label,
|
|
515
|
+
style: { width: "100%", margin: "0", border: "none", display: "flex", "justify-content": "flex-start" },
|
|
516
|
+
onClick: (we) => rl(re == null ? void 0 : re.label)
|
|
517
|
+
}, {
|
|
518
|
+
default: H(() => {
|
|
519
|
+
var we, We;
|
|
520
|
+
return [
|
|
521
|
+
Ie(Ze(re == null ? void 0 : re.label), 1),
|
|
522
|
+
(we = re == null ? void 0 : re.label) != null && we.includes("选中") ? (ee(), Ce("span", Ho, "(" + Ze(D.selectNums) + ")", 1)) : Ke("", !0),
|
|
523
|
+
(We = re == null ? void 0 : re.label) != null && We.includes("全部") ? (ee(), Ce("span", Xo, "(" + Ze(D.dataNums) + ")", 1)) : Ke("", !0)
|
|
524
|
+
];
|
|
525
|
+
}),
|
|
526
|
+
_: 2
|
|
527
|
+
}, 1032, ["onClick"]))), 128))
|
|
528
|
+
])
|
|
529
|
+
]),
|
|
530
|
+
_: 2
|
|
531
|
+
}, 1024)) : Ke("", !0),
|
|
532
|
+
w != null && w.type ? Ke("", !0) : (ee(), Xe(oe, {
|
|
533
|
+
key: 2,
|
|
534
|
+
id: "themeButton",
|
|
535
|
+
style: pa({ background: "transparent", color: (w == null ? void 0 : w.label) === "新增" ? "var(--ssbutton-theme-bg)" : "#666666" }),
|
|
536
|
+
onClick: (re) => rl(w == null ? void 0 : w.label)
|
|
537
|
+
}, {
|
|
538
|
+
icon: H(() => {
|
|
539
|
+
var re;
|
|
540
|
+
return [
|
|
541
|
+
V(ye, {
|
|
542
|
+
name: (re = be == null ? void 0 : be.find((we) => (we == null ? void 0 : we.label) === (w == null ? void 0 : w.label))) == null ? void 0 : re.icon
|
|
543
|
+
}, null, 8, ["name"])
|
|
544
|
+
];
|
|
545
|
+
}),
|
|
546
|
+
default: H(() => [
|
|
547
|
+
Ie(" " + Ze(w == null ? void 0 : w.label), 1)
|
|
548
|
+
]),
|
|
549
|
+
_: 2
|
|
550
|
+
}, 1032, ["style", "onClick"]))
|
|
551
|
+
]))), 128))
|
|
552
|
+
])) : Ke("", !0)
|
|
553
|
+
])
|
|
554
|
+
]));
|
|
555
|
+
};
|
|
556
|
+
}
|
|
557
|
+
}, Yo = /* @__PURE__ */ qa(Qo, [["__scopeId", "data-v-03b0d8fa"]]), Zo = /* @__PURE__ */ Or({
|
|
558
|
+
__name: "batch",
|
|
559
|
+
props: {
|
|
560
|
+
lockingPage: Boolean,
|
|
561
|
+
buttons: {
|
|
562
|
+
type: Array,
|
|
563
|
+
default: () => []
|
|
564
|
+
},
|
|
565
|
+
selectTableItems: {
|
|
566
|
+
type: Array,
|
|
567
|
+
default: () => []
|
|
568
|
+
},
|
|
569
|
+
columns: {
|
|
570
|
+
type: Array,
|
|
571
|
+
default: () => []
|
|
572
|
+
}
|
|
573
|
+
},
|
|
574
|
+
emits: ["buttonClick"],
|
|
575
|
+
setup(D, { emit: j }) {
|
|
576
|
+
const A = D, T = j, m = (Z) => {
|
|
577
|
+
T("buttonClick", Z);
|
|
578
|
+
}, s = (Z) => {
|
|
579
|
+
var fe;
|
|
580
|
+
return Z != null && Z.includes("删除") ? ((fe = A.selectTableItems) == null ? void 0 : fe.length) > 0 ? "warning-active-type" : "warning-type" : "default-type";
|
|
581
|
+
};
|
|
582
|
+
return (Z, fe) => {
|
|
583
|
+
const be = ol("el-button");
|
|
584
|
+
return ee(), Ce("div", null, [
|
|
585
|
+
(ee(!0), Ce(Zl, null, Il(D.buttons, (Oe) => (ee(), Xe(be, {
|
|
586
|
+
key: Oe == null ? void 0 : Oe.label,
|
|
587
|
+
disabled: !!D.lockingPage,
|
|
588
|
+
class: _n(s(Oe == null ? void 0 : Oe.label)),
|
|
589
|
+
onClick: (Ve) => m(Oe == null ? void 0 : Oe.label)
|
|
590
|
+
}, {
|
|
591
|
+
default: H(() => [
|
|
592
|
+
Ie(Ze(Oe == null ? void 0 : Oe.label), 1)
|
|
593
|
+
]),
|
|
594
|
+
_: 2
|
|
595
|
+
}, 1032, ["disabled", "class", "onClick"]))), 128))
|
|
596
|
+
]);
|
|
597
|
+
};
|
|
598
|
+
}
|
|
599
|
+
}), Io = /* @__PURE__ */ qa(Zo, [["__scopeId", "data-v-70b12973"]]), Vo = An("formToTableComp", {
|
|
600
|
+
state: () => ({
|
|
601
|
+
selectArray: [],
|
|
602
|
+
selectString: ""
|
|
603
|
+
}),
|
|
604
|
+
actions: {
|
|
605
|
+
setSelectArray(D) {
|
|
606
|
+
this.selectArray = D;
|
|
607
|
+
},
|
|
608
|
+
setSelectString(D) {
|
|
609
|
+
this.selectString = D;
|
|
610
|
+
}
|
|
611
|
+
}
|
|
612
|
+
}), ei = { class: "calculator-content" }, li = { class: "calculator-child" }, ai = { class: "calculator-child" }, ri = /* @__PURE__ */ Or({
|
|
613
|
+
__name: "calculator",
|
|
614
|
+
setup(D) {
|
|
615
|
+
const j = G(), A = G();
|
|
616
|
+
return Tr(() => {
|
|
617
|
+
j.value = [
|
|
618
|
+
{
|
|
619
|
+
type: "Upload",
|
|
620
|
+
label: "输入",
|
|
621
|
+
name: "input"
|
|
622
|
+
}
|
|
623
|
+
], A.value = [
|
|
624
|
+
{
|
|
625
|
+
type: "Upload",
|
|
626
|
+
label: "输出",
|
|
627
|
+
name: "output"
|
|
628
|
+
}
|
|
629
|
+
];
|
|
630
|
+
}), (T, m) => (ee(), Ce("div", ei, [
|
|
631
|
+
de("div", li, [
|
|
632
|
+
V(Ua, {
|
|
633
|
+
rowContents: j.value,
|
|
634
|
+
isRowFlex: !0
|
|
635
|
+
}, null, 8, ["rowContents"])
|
|
636
|
+
]),
|
|
637
|
+
de("div", ai, [
|
|
638
|
+
V(Ua, {
|
|
639
|
+
rowContents: A.value,
|
|
640
|
+
isEdit: !1,
|
|
641
|
+
isRowFlex: !0
|
|
642
|
+
}, null, 8, ["rowContents"])
|
|
643
|
+
])
|
|
644
|
+
]));
|
|
645
|
+
}
|
|
646
|
+
}), ni = /* @__PURE__ */ qa(ri, [["__scopeId", "data-v-73db0fe7"]]), Cr = (D, j) => {
|
|
647
|
+
let A = D, T = j;
|
|
648
|
+
return Array.isArray(A) && (A = A == null ? void 0 : A.map((m, s) => {
|
|
649
|
+
if (Array.isArray(m)) {
|
|
650
|
+
let Z = {};
|
|
651
|
+
return m = m == null ? void 0 : m.forEach((fe, be) => {
|
|
652
|
+
var Oe;
|
|
653
|
+
(Oe = T == null ? void 0 : T[be]) != null && Oe.prop ? Z[T[be].prop] = fe : Array.isArray(fe) && (Z.children = Cr(fe, T));
|
|
654
|
+
}), Object.assign(Z, { id: s });
|
|
655
|
+
} else
|
|
656
|
+
return m;
|
|
657
|
+
})), A;
|
|
658
|
+
}, Tn = (D, j, A) => {
|
|
659
|
+
let T = D, m = j;
|
|
660
|
+
return T = T == null ? void 0 : T.map((s, Z) => {
|
|
661
|
+
var fe, be;
|
|
662
|
+
return !Array.isArray(s) || !((fe = m == null ? void 0 : m[Z]) != null && fe.label) && !A || (s.unshift(((be = m == null ? void 0 : m[Z]) == null ? void 0 : be.label) ?? ""), s.some((Oe) => Array.isArray(Oe)) && (s = s == null ? void 0 : s.map((Oe) => {
|
|
663
|
+
var Ve;
|
|
664
|
+
return Array.isArray(Oe) && (Oe = Tn(Oe, (Ve = m == null ? void 0 : m[Z]) == null ? void 0 : Ve.children, A)), Oe;
|
|
665
|
+
}))), s;
|
|
666
|
+
}), T;
|
|
667
|
+
}, si = (D, j, A) => {
|
|
668
|
+
if (j === "")
|
|
669
|
+
return D == null ? void 0 : D.filter((T) => (T == null ? void 0 : T.id) !== A);
|
|
670
|
+
{
|
|
671
|
+
const T = j.split("-");
|
|
672
|
+
return oi(D, T, A);
|
|
673
|
+
}
|
|
674
|
+
}, oi = (D, j, A) => {
|
|
675
|
+
let T = D, m = j;
|
|
676
|
+
return (m == null ? void 0 : m.length) === 0 ? T = T == null ? void 0 : T.filter((s) => s.id !== A) : T = T == null ? void 0 : T.map((s) => (s.id.toString() === (m == null ? void 0 : m[0]) && (m == null || m.shift(), s = On(s, m, A)), s)), T;
|
|
677
|
+
}, On = (D, j, A) => {
|
|
678
|
+
var s, Z;
|
|
679
|
+
let T = D, m = j;
|
|
680
|
+
return (m == null ? void 0 : m.length) === 0 ? T.children = (s = T.children) == null ? void 0 : s.filter((fe) => fe.id !== A) : T.children = (Z = T.children) == null ? void 0 : Z.map((fe) => (fe.id.toString() === (m == null ? void 0 : m[0]) && (m == null || m.shift(), fe = On(fe, m, A)), fe)), T;
|
|
681
|
+
}, ii = (D, j, A) => {
|
|
682
|
+
if (j === "")
|
|
683
|
+
return A;
|
|
684
|
+
{
|
|
685
|
+
const T = j.split("-");
|
|
686
|
+
return ui(D, T, A);
|
|
687
|
+
}
|
|
688
|
+
}, ui = (D, j, A) => {
|
|
689
|
+
let T = D, m = j;
|
|
690
|
+
return (m == null ? void 0 : m.length) === 0 ? T = A : T = T == null ? void 0 : T.map((s) => (s.id.toString() === (m == null ? void 0 : m[0]) && (m == null || m.shift(), s = xn(s, m, A)), s)), T;
|
|
691
|
+
}, xn = (D, j, A) => {
|
|
692
|
+
var s;
|
|
693
|
+
let T = D, m = j;
|
|
694
|
+
return (m == null ? void 0 : m.length) === 0 ? T.children = A : T.children = (s = T.children) == null ? void 0 : s.map((Z) => (Z.id.toString() === (m == null ? void 0 : m[0]) && (m == null || m.shift(), Z = xn(Z, m, A)), Z)), T;
|
|
695
|
+
};
|
|
696
|
+
class ti {
|
|
697
|
+
constructor(j = {}) {
|
|
698
|
+
jl(this, "url");
|
|
699
|
+
jl(this, "heartbeatInterval");
|
|
700
|
+
jl(this, "socket", null);
|
|
701
|
+
jl(this, "isConnected", !1);
|
|
702
|
+
jl(this, "heartTimer", null);
|
|
703
|
+
jl(this, "canvas", null);
|
|
704
|
+
jl(this, "ctx", null);
|
|
705
|
+
jl(this, "mainCamCutMode", 0);
|
|
706
|
+
jl(this, "pMainShowStartX", 0);
|
|
707
|
+
jl(this, "pMainShowStartY", 0);
|
|
708
|
+
jl(this, "onLog");
|
|
709
|
+
jl(this, "onDevCount");
|
|
710
|
+
jl(this, "onCameraStatus");
|
|
711
|
+
jl(this, "onPhoto");
|
|
712
|
+
this.url = j.url ?? "ws://127.0.0.1:22225", this.heartbeatInterval = j.heartbeatInterval ?? 3e3;
|
|
713
|
+
}
|
|
714
|
+
init(j, A, T) {
|
|
715
|
+
var Z;
|
|
716
|
+
(Z = this.canvas) != null && Z.parentNode && this.canvas.parentNode.removeChild(this.canvas);
|
|
717
|
+
const m = document.createElement("canvas");
|
|
718
|
+
m.style.border = "solid 1px #A0A0A0", m.id = "MainCamCanvas", m.width = A, m.height = T;
|
|
719
|
+
const s = m.getContext("2d");
|
|
720
|
+
if (!s) throw new Error("无法获取 CanvasRenderingContext2D");
|
|
721
|
+
j.appendChild(m), this.canvas = m, this.ctx = s;
|
|
722
|
+
}
|
|
723
|
+
async connect() {
|
|
724
|
+
this.socket && (this.socket.readyState === WebSocket.OPEN || this.socket.readyState === WebSocket.CONNECTING) || await new Promise((j, A) => {
|
|
725
|
+
const T = new WebSocket(this.url);
|
|
726
|
+
T.binaryType = "arraybuffer", T.onopen = () => {
|
|
727
|
+
this.socket = T, this.isConnected = !0, this.startHeartbeat(), this.log("socket.onopen"), j();
|
|
728
|
+
}, T.onerror = (m) => {
|
|
729
|
+
this.isConnected = !1, this.log("socket.onerror"), A(m);
|
|
730
|
+
}, T.onclose = () => {
|
|
731
|
+
this.isConnected = !1, this.stopHeartbeat(), this.log("socket.onclose");
|
|
732
|
+
}, T.onmessage = (m) => {
|
|
733
|
+
this.handleMessage(m);
|
|
734
|
+
};
|
|
735
|
+
});
|
|
736
|
+
}
|
|
737
|
+
destroy() {
|
|
738
|
+
var j;
|
|
739
|
+
this.stopHeartbeat();
|
|
740
|
+
try {
|
|
741
|
+
this.closeCamera();
|
|
742
|
+
} catch {
|
|
743
|
+
}
|
|
744
|
+
if (this.socket) {
|
|
745
|
+
try {
|
|
746
|
+
this.socket.onmessage = null;
|
|
747
|
+
} catch {
|
|
748
|
+
}
|
|
749
|
+
try {
|
|
750
|
+
this.socket.onopen = null;
|
|
751
|
+
} catch {
|
|
752
|
+
}
|
|
753
|
+
try {
|
|
754
|
+
this.socket.onerror = null;
|
|
755
|
+
} catch {
|
|
756
|
+
}
|
|
757
|
+
try {
|
|
758
|
+
this.socket.onclose = null;
|
|
759
|
+
} catch {
|
|
760
|
+
}
|
|
761
|
+
try {
|
|
762
|
+
this.socket.close();
|
|
763
|
+
} catch {
|
|
764
|
+
}
|
|
765
|
+
this.socket = null;
|
|
766
|
+
}
|
|
767
|
+
this.isConnected = !1, (j = this.canvas) != null && j.parentNode && this.canvas.parentNode.removeChild(this.canvas), this.canvas = null, this.ctx = null;
|
|
768
|
+
}
|
|
769
|
+
getDevCount() {
|
|
770
|
+
this.sendBytes(new Uint8Array([119, 136, 80]));
|
|
771
|
+
}
|
|
772
|
+
openCamera(j = 0, A = 1280, T = 720) {
|
|
773
|
+
if (!this.canvas) throw new Error("请先 init() 传入容器并创建 canvas");
|
|
774
|
+
const m = new Uint8Array(12);
|
|
775
|
+
m[0] = 119, m[1] = 136, m[2] = 1, m[3] = j, m[4] = this.canvas.width >> 8 & 255, m[5] = this.canvas.width & 255, m[6] = this.canvas.height >> 8 & 255, m[7] = this.canvas.height & 255, m[8] = A >> 8 & 255, m[9] = A & 255, m[10] = T >> 8 & 255, m[11] = T & 255, this.sendBytes(m);
|
|
776
|
+
}
|
|
777
|
+
closeCamera() {
|
|
778
|
+
this.sendBytes(new Uint8Array([119, 136, 2, 0]));
|
|
779
|
+
}
|
|
780
|
+
photo() {
|
|
781
|
+
const m = new Uint8Array(12);
|
|
782
|
+
m[0] = 119, m[1] = 136, m[2] = 16, m[3] = 0, m[4] = 0, m[5] = 0, m[6] = 0, m[7] = 0, m[8] = 1, m[9] = 0, m[10] = 0, m[11] = 0, this.sendBytes(m);
|
|
783
|
+
}
|
|
784
|
+
bestSize() {
|
|
785
|
+
this.sendBytes(new Uint8Array([119, 136, 5, 0]));
|
|
786
|
+
}
|
|
787
|
+
rotateLeft() {
|
|
788
|
+
this.sendBytes(new Uint8Array([119, 136, 7, 0]));
|
|
789
|
+
}
|
|
790
|
+
rotateRight() {
|
|
791
|
+
this.sendBytes(new Uint8Array([119, 136, 8, 0]));
|
|
792
|
+
}
|
|
793
|
+
focus() {
|
|
794
|
+
this.sendBytes(new Uint8Array([119, 136, 48, 0]));
|
|
795
|
+
}
|
|
796
|
+
log(j) {
|
|
797
|
+
var A;
|
|
798
|
+
(A = this.onLog) == null || A.call(this, j);
|
|
799
|
+
}
|
|
800
|
+
sendBytes(j) {
|
|
801
|
+
if (!this.socket || this.socket.readyState !== WebSocket.OPEN || !this.isConnected)
|
|
802
|
+
throw new Error("socket 未连接");
|
|
803
|
+
this.socket.send(j.buffer);
|
|
804
|
+
}
|
|
805
|
+
startHeartbeat() {
|
|
806
|
+
this.stopHeartbeat(), this.heartTimer = window.setInterval(() => {
|
|
807
|
+
this.log("heartCheck...........");
|
|
808
|
+
}, this.heartbeatInterval);
|
|
809
|
+
}
|
|
810
|
+
stopHeartbeat() {
|
|
811
|
+
this.heartTimer && (clearInterval(this.heartTimer), this.heartTimer = null);
|
|
812
|
+
}
|
|
813
|
+
handleMessage(j) {
|
|
814
|
+
var m, s, Z, fe, be;
|
|
815
|
+
const A = new Uint8Array(j.data);
|
|
816
|
+
if (A.length <= 0) return;
|
|
817
|
+
if (A[0] === 17 && A[1] === 17 && A[2] === 17) {
|
|
818
|
+
this.log("heart socket!!!!");
|
|
819
|
+
return;
|
|
820
|
+
}
|
|
821
|
+
if (A[0] !== 85 || A[1] !== 102) return;
|
|
822
|
+
const T = A[2];
|
|
823
|
+
if (T === 80) {
|
|
824
|
+
const Oe = A[3], Ve = A.length - 4, rl = new Uint8Array(Ve);
|
|
825
|
+
for (let Ol = 0; Ol < Ve; Ol++) rl[Ol] = A[4 + Ol];
|
|
826
|
+
const il = decodeURIComponent(this.byteToString(rl)).split("|");
|
|
827
|
+
(m = this.onDevCount) == null || m.call(this, Oe, il);
|
|
828
|
+
return;
|
|
829
|
+
}
|
|
830
|
+
if (T === 1) {
|
|
831
|
+
A[3] === 1 && ((s = this.onCameraStatus) == null || s.call(this, "opened")), A[3] === 3 && ((Z = this.onCameraStatus) == null || Z.call(this, "closed"));
|
|
832
|
+
return;
|
|
833
|
+
}
|
|
834
|
+
if (T === 16) {
|
|
835
|
+
if (A[3] === 1) {
|
|
836
|
+
const Ve = A[4] * 256 + A[5], rl = A[6] * 65536 + A[7] * 256 + A[8];
|
|
837
|
+
let tl = "";
|
|
838
|
+
if (Ve > 0) {
|
|
839
|
+
const xl = new Uint8Array(Ve);
|
|
840
|
+
for (let he = 0; he < Ve; he++) xl[he] = A[9 + he];
|
|
841
|
+
tl = decodeURIComponent(this.byteToString(xl));
|
|
842
|
+
}
|
|
843
|
+
const il = new Uint8Array(rl);
|
|
844
|
+
for (let xl = 0; xl < rl; xl++)
|
|
845
|
+
il[xl] = A[9 + Ve + xl];
|
|
846
|
+
const Ol = this.uint8ArrayToString(il);
|
|
847
|
+
(fe = this.onPhoto) == null || fe.call(this, { flag: 0, imgPath: tl, base64: Ol });
|
|
848
|
+
}
|
|
849
|
+
A[3] === 2 && ((be = this.onPhoto) == null || be.call(this, { flag: 2, imgPath: "", base64: "" }));
|
|
850
|
+
return;
|
|
851
|
+
}
|
|
852
|
+
if (T === 204) {
|
|
853
|
+
if (!this.canvas || !this.ctx) return;
|
|
854
|
+
const Oe = A[3] * 256 + A[4], Ve = A[5] * 256 + A[6];
|
|
855
|
+
this.pMainShowStartX = A[7] * 256 + A[8], this.pMainShowStartY = A[9] * 256 + A[10], this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height);
|
|
856
|
+
const rl = this.ctx.createImageData(Oe, Ve);
|
|
857
|
+
let tl = 11;
|
|
858
|
+
for (let il = 0; il < rl.data.length; il += 4)
|
|
859
|
+
rl.data[il + 0] = A[tl], rl.data[il + 1] = A[tl + 1], rl.data[il + 2] = A[tl + 2], rl.data[il + 3] = 255, tl += 3;
|
|
860
|
+
this.ctx.putImageData(rl, this.pMainShowStartX, this.pMainShowStartY), this.mainCamCutMode;
|
|
861
|
+
return;
|
|
862
|
+
}
|
|
863
|
+
}
|
|
864
|
+
uint8ArrayToString(j) {
|
|
865
|
+
let A = "";
|
|
866
|
+
for (let T = 0; T < j.length; T++)
|
|
867
|
+
A += String.fromCharCode(j[T]);
|
|
868
|
+
return A;
|
|
869
|
+
}
|
|
870
|
+
byteToString(j) {
|
|
871
|
+
let A = "";
|
|
872
|
+
for (let T = 0; T < j.length; T++)
|
|
873
|
+
A += String.fromCharCode(j[T]);
|
|
874
|
+
return A;
|
|
875
|
+
}
|
|
876
|
+
}
|
|
877
|
+
const di = { style: { display: "flex", gap: "16px", height: "100%" } }, ci = {
|
|
878
|
+
key: 0,
|
|
879
|
+
style: { color: "var(--el-text-color-secondary)" }
|
|
880
|
+
}, pi = { style: { width: "420px", display: "flex", "flex-direction": "column", gap: "16px" } }, fi = { style: { border: "1px solid var(--el-border-color)", "border-radius": "4px", padding: "12px" } }, hi = {
|
|
881
|
+
ref: "pictureBox",
|
|
882
|
+
style: { height: "220px", border: "1px dashed var(--el-border-color)", "border-radius": "4px", display: "flex", "align-items": "center", "justify-content": "center", background: "var(--el-fill-color-lighter)", position: "relative", overflow: "hidden" }
|
|
883
|
+
}, yi = {
|
|
884
|
+
key: 0,
|
|
885
|
+
style: { color: "var(--el-text-color-secondary)" }
|
|
886
|
+
}, vi = ["src"], gi = { style: { border: "1px solid var(--el-border-color)", "border-radius": "4px", padding: "12px", flex: "1", "min-height": "0", display: "flex", "flex-direction": "column" } }, bi = { class: "dialog-footer" }, ki = /* @__PURE__ */ Or({
|
|
887
|
+
__name: "index",
|
|
888
|
+
props: {
|
|
889
|
+
visible: {
|
|
890
|
+
type: Boolean,
|
|
891
|
+
default: !1
|
|
892
|
+
}
|
|
893
|
+
},
|
|
894
|
+
emits: ["confirm", "cancel"],
|
|
895
|
+
setup(D, { emit: j }) {
|
|
896
|
+
const A = D, T = j, m = G(null), s = G(!1), Z = G(""), fe = G(""), be = new ti({
|
|
897
|
+
url: "ws://127.0.0.1:22225"
|
|
898
|
+
});
|
|
899
|
+
function Oe(ie, oe) {
|
|
900
|
+
var w;
|
|
901
|
+
const Le = ie.split(","), B = ((w = Le[0].match(/:(.*?);/)) == null ? void 0 : w[1]) ?? "image/jpeg", kl = atob(Le[1]);
|
|
902
|
+
let ul = kl.length;
|
|
903
|
+
const le = new Uint8Array(ul);
|
|
904
|
+
for (; ul--; )
|
|
905
|
+
le[ul] = kl.charCodeAt(ul);
|
|
906
|
+
return new File([le], oe, { type: B });
|
|
907
|
+
}
|
|
908
|
+
function Ve() {
|
|
909
|
+
be.onLog = (ie) => {
|
|
910
|
+
console.log("[GPY]", ie);
|
|
911
|
+
}, be.onDevCount = (ie, oe) => {
|
|
912
|
+
if (fe.value += `设备数量=${ie},设备=${oe.join(",")}
|
|
913
|
+
`, ie > 0) {
|
|
914
|
+
fe.value += `检测到设备,正在打开摄像头...
|
|
915
|
+
`;
|
|
916
|
+
try {
|
|
917
|
+
be.openCamera(0, 1280, 720);
|
|
918
|
+
} catch (Le) {
|
|
919
|
+
fe.value += `打开摄像头失败:${(Le == null ? void 0 : Le.message) ?? Le}
|
|
920
|
+
`;
|
|
921
|
+
}
|
|
922
|
+
} else
|
|
923
|
+
fe.value += `未检测到高拍仪设备!
|
|
924
|
+
`;
|
|
925
|
+
}, be.onCameraStatus = (ie) => {
|
|
926
|
+
ie === "opened" ? (s.value = !0, fe.value += `摄像头已打开
|
|
927
|
+
`) : (s.value = !1, fe.value += `摄像头已关闭
|
|
928
|
+
`);
|
|
929
|
+
}, be.onPhoto = (ie) => {
|
|
930
|
+
ie.flag === 0 && ie.base64 ? (Z.value = `data:image/jpeg;base64,${ie.base64}`, fe.value += `拍照完成,已接收图片
|
|
931
|
+
`) : fe.value += `拍照失败 flag=${ie.flag}
|
|
932
|
+
`;
|
|
933
|
+
};
|
|
934
|
+
}
|
|
935
|
+
const rl = async () => {
|
|
936
|
+
if (await Ja(), !m.value) return;
|
|
937
|
+
tl(), Ve();
|
|
938
|
+
const ie = m.value.getBoundingClientRect();
|
|
939
|
+
be.init(m.value, Math.floor(ie.width), Math.floor(ie.height)), fe.value += `正在连接设备服务...
|
|
940
|
+
`, await be.connect(), fe.value += `正在获取设备数量...
|
|
941
|
+
`, be.getDevCount();
|
|
942
|
+
}, tl = () => {
|
|
943
|
+
try {
|
|
944
|
+
be.destroy();
|
|
945
|
+
} catch (ie) {
|
|
946
|
+
console.error(ie);
|
|
947
|
+
}
|
|
948
|
+
s.value = !1, Z.value = "", fe.value = "";
|
|
949
|
+
};
|
|
950
|
+
$l(
|
|
951
|
+
() => A.visible,
|
|
952
|
+
(ie) => {
|
|
953
|
+
ie ? rl() : tl();
|
|
954
|
+
}
|
|
955
|
+
);
|
|
956
|
+
const il = () => {
|
|
957
|
+
try {
|
|
958
|
+
be.bestSize();
|
|
959
|
+
} catch (ie) {
|
|
960
|
+
console.error(ie);
|
|
961
|
+
}
|
|
962
|
+
}, Ol = () => {
|
|
963
|
+
try {
|
|
964
|
+
be.rotateLeft();
|
|
965
|
+
} catch (ie) {
|
|
966
|
+
console.error(ie);
|
|
967
|
+
}
|
|
968
|
+
}, xl = () => {
|
|
969
|
+
try {
|
|
970
|
+
be.rotateRight();
|
|
971
|
+
} catch (ie) {
|
|
972
|
+
console.error(ie);
|
|
973
|
+
}
|
|
974
|
+
}, he = () => {
|
|
975
|
+
try {
|
|
976
|
+
be.focus();
|
|
977
|
+
} catch (ie) {
|
|
978
|
+
console.error(ie);
|
|
979
|
+
}
|
|
980
|
+
}, Je = () => {
|
|
981
|
+
fe.value += `正在拍照...
|
|
982
|
+
`;
|
|
983
|
+
try {
|
|
984
|
+
be.photo();
|
|
985
|
+
} catch (ie) {
|
|
986
|
+
fe.value += `拍照调用失败:${(ie == null ? void 0 : ie.message) ?? ie}
|
|
987
|
+
`;
|
|
988
|
+
}
|
|
989
|
+
}, el = () => {
|
|
990
|
+
if (Z.value) {
|
|
991
|
+
const ie = Oe(Z.value, "gpy-capture.jpg");
|
|
992
|
+
T("confirm", ie);
|
|
993
|
+
} else
|
|
994
|
+
T("confirm", null);
|
|
995
|
+
}, ye = () => {
|
|
996
|
+
tl(), T("cancel");
|
|
997
|
+
};
|
|
998
|
+
return (ie, oe) => {
|
|
999
|
+
const Le = ol("el-input"), B = ol("el-button");
|
|
1000
|
+
return ee(), Xe(ca, {
|
|
1001
|
+
title: "扫描录入",
|
|
1002
|
+
visible: A.visible,
|
|
1003
|
+
onBeforeDestroy: ye,
|
|
1004
|
+
width: "1200px",
|
|
1005
|
+
style: { height: "80%" }
|
|
1006
|
+
}, {
|
|
1007
|
+
default: H(() => [
|
|
1008
|
+
de("div", di, [
|
|
1009
|
+
de("div", {
|
|
1010
|
+
ref_key: "cameraBox",
|
|
1011
|
+
ref: m,
|
|
1012
|
+
style: { flex: "1", "min-width": "0", border: "1px solid var(--el-border-color)", "border-radius": "4px", position: "relative", overflow: "hidden", display: "flex", "align-items": "center", "justify-content": "center", background: "var(--el-fill-color-lighter)" }
|
|
1013
|
+
}, [
|
|
1014
|
+
s.value ? Ke("", !0) : (ee(), Ce("div", ci, "初始化摄像头..."))
|
|
1015
|
+
], 512),
|
|
1016
|
+
de("div", pi, [
|
|
1017
|
+
de("div", fi, [
|
|
1018
|
+
oe[0] || (oe[0] = de("div", { style: { "font-weight": "600", "margin-bottom": "8px" } }, "拍照图片", -1)),
|
|
1019
|
+
de("div", hi, [
|
|
1020
|
+
Z.value ? Ke("", !0) : (ee(), Ce("div", yi, "暂无图片")),
|
|
1021
|
+
Z.value ? (ee(), Ce("img", {
|
|
1022
|
+
key: 1,
|
|
1023
|
+
src: Z.value,
|
|
1024
|
+
style: { "max-width": "100%", "max-height": "100%", "object-fit": "contain" },
|
|
1025
|
+
alt: "captured image"
|
|
1026
|
+
}, null, 8, vi)) : Ke("", !0)
|
|
1027
|
+
], 512)
|
|
1028
|
+
]),
|
|
1029
|
+
de("div", gi, [
|
|
1030
|
+
oe[1] || (oe[1] = de("div", { style: { "font-weight": "600", "margin-bottom": "8px" } }, "操作记录", -1)),
|
|
1031
|
+
V(Le, {
|
|
1032
|
+
type: "textarea",
|
|
1033
|
+
value: fe.value,
|
|
1034
|
+
readonly: "",
|
|
1035
|
+
rows: 10,
|
|
1036
|
+
placeholder: "设备操作记录...",
|
|
1037
|
+
style: { flex: "1" }
|
|
1038
|
+
}, null, 8, ["value"])
|
|
1039
|
+
])
|
|
1040
|
+
])
|
|
1041
|
+
])
|
|
1042
|
+
]),
|
|
1043
|
+
footer: H(() => [
|
|
1044
|
+
de("div", bi, [
|
|
1045
|
+
V(B, {
|
|
1046
|
+
onClick: il,
|
|
1047
|
+
disabled: !s.value,
|
|
1048
|
+
id: "themeBorderButton"
|
|
1049
|
+
}, {
|
|
1050
|
+
default: H(() => oe[2] || (oe[2] = [
|
|
1051
|
+
Ie("适屏")
|
|
1052
|
+
])),
|
|
1053
|
+
_: 1,
|
|
1054
|
+
__: [2]
|
|
1055
|
+
}, 8, ["disabled"]),
|
|
1056
|
+
V(B, {
|
|
1057
|
+
onClick: Ol,
|
|
1058
|
+
disabled: !s.value,
|
|
1059
|
+
id: "themeBorderButton"
|
|
1060
|
+
}, {
|
|
1061
|
+
default: H(() => oe[3] || (oe[3] = [
|
|
1062
|
+
Ie("左旋")
|
|
1063
|
+
])),
|
|
1064
|
+
_: 1,
|
|
1065
|
+
__: [3]
|
|
1066
|
+
}, 8, ["disabled"]),
|
|
1067
|
+
V(B, {
|
|
1068
|
+
onClick: xl,
|
|
1069
|
+
disabled: !s.value,
|
|
1070
|
+
id: "themeBorderButton"
|
|
1071
|
+
}, {
|
|
1072
|
+
default: H(() => oe[4] || (oe[4] = [
|
|
1073
|
+
Ie("右旋")
|
|
1074
|
+
])),
|
|
1075
|
+
_: 1,
|
|
1076
|
+
__: [4]
|
|
1077
|
+
}, 8, ["disabled"]),
|
|
1078
|
+
V(B, {
|
|
1079
|
+
onClick: he,
|
|
1080
|
+
disabled: !s.value,
|
|
1081
|
+
id: "themeBorderButton"
|
|
1082
|
+
}, {
|
|
1083
|
+
default: H(() => oe[5] || (oe[5] = [
|
|
1084
|
+
Ie("对焦")
|
|
1085
|
+
])),
|
|
1086
|
+
_: 1,
|
|
1087
|
+
__: [5]
|
|
1088
|
+
}, 8, ["disabled"]),
|
|
1089
|
+
V(B, {
|
|
1090
|
+
onClick: Je,
|
|
1091
|
+
disabled: !s.value,
|
|
1092
|
+
id: "themeButton"
|
|
1093
|
+
}, {
|
|
1094
|
+
default: H(() => oe[6] || (oe[6] = [
|
|
1095
|
+
Ie("拍照")
|
|
1096
|
+
])),
|
|
1097
|
+
_: 1,
|
|
1098
|
+
__: [6]
|
|
1099
|
+
}, 8, ["disabled"]),
|
|
1100
|
+
oe[9] || (oe[9] = de("div", { style: { flex: "1" } }, null, -1)),
|
|
1101
|
+
V(B, {
|
|
1102
|
+
onClick: el,
|
|
1103
|
+
disabled: !Z.value,
|
|
1104
|
+
id: "themeButton"
|
|
1105
|
+
}, {
|
|
1106
|
+
default: H(() => oe[7] || (oe[7] = [
|
|
1107
|
+
Ie("确认")
|
|
1108
|
+
])),
|
|
1109
|
+
_: 1,
|
|
1110
|
+
__: [7]
|
|
1111
|
+
}, 8, ["disabled"]),
|
|
1112
|
+
V(B, {
|
|
1113
|
+
onClick: ye,
|
|
1114
|
+
id: "themeBorderButton"
|
|
1115
|
+
}, {
|
|
1116
|
+
default: H(() => oe[8] || (oe[8] = [
|
|
1117
|
+
Ie("取消")
|
|
1118
|
+
])),
|
|
1119
|
+
_: 1,
|
|
1120
|
+
__: [8]
|
|
1121
|
+
})
|
|
1122
|
+
])
|
|
1123
|
+
]),
|
|
1124
|
+
_: 1
|
|
1125
|
+
}, 8, ["visible"]);
|
|
1126
|
+
};
|
|
1127
|
+
}
|
|
1128
|
+
}), mi = /* @__PURE__ */ qa(ki, [["__scopeId", "data-v-cfe79109"]]), Si = An("formComp", {
|
|
1129
|
+
state: () => ({
|
|
1130
|
+
objUrl: [],
|
|
1131
|
+
blobUrls: []
|
|
1132
|
+
}),
|
|
1133
|
+
actions: {
|
|
1134
|
+
setObjUrl(D) {
|
|
1135
|
+
this.objUrl = D;
|
|
1136
|
+
},
|
|
1137
|
+
setBlobUrls(D) {
|
|
1138
|
+
this.blobUrls = D;
|
|
1139
|
+
}
|
|
1140
|
+
}
|
|
1141
|
+
}), Ar = async (D, j) => {
|
|
1142
|
+
var Z, fe, be, Oe, Ve, rl, tl, il, Ol, xl, he, Je, el, ye, ie, oe, Le;
|
|
1143
|
+
let A = (fe = (Z = ae(D)) == null ? void 0 : Z.optionUrl) == null ? void 0 : fe.menuSelect, T = [];
|
|
1144
|
+
A == null || A.forEach((B) => {
|
|
1145
|
+
});
|
|
1146
|
+
let m = "", s = await po(A);
|
|
1147
|
+
if (s == null || s.forEach((B) => {
|
|
1148
|
+
var kl, ul, le, w;
|
|
1149
|
+
(B == null ? void 0 : B.name) === (((w = (le = (ul = (kl = ae(D)) == null ? void 0 : kl.optionUrl) == null ? void 0 : ul.groupSelect) == null ? void 0 : le[0]) == null ? void 0 : w.replaceAll("'", "")) ?? "") && (m = B == null ? void 0 : B.id);
|
|
1150
|
+
}), j) {
|
|
1151
|
+
m = j;
|
|
1152
|
+
const B = await ia({
|
|
1153
|
+
id: m
|
|
1154
|
+
}), kl = (rl = (Ve = (Oe = (be = B == null ? void 0 : B.data) == null ? void 0 : be.result) == null ? void 0 : Oe[0]) == null ? void 0 : Ve.key) == null ? void 0 : rl.pageKey;
|
|
1155
|
+
s = await xa(kl, sessionStorage.getItem("systemKey"), "");
|
|
1156
|
+
}
|
|
1157
|
+
if (m !== "") {
|
|
1158
|
+
let B;
|
|
1159
|
+
j ? B = (tl = s == null ? void 0 : s.find((le) => (le == null ? void 0 : le.id) === j)) == null ? void 0 : tl.compData : B = (il = s == null ? void 0 : s.find((le) => {
|
|
1160
|
+
var w, ll, re, we;
|
|
1161
|
+
return (le == null ? void 0 : le.name) === (((ll = (w = D == null ? void 0 : D.groupSelect) == null ? void 0 : w.split(":")) == null ? void 0 : ll[0]) || ((we = (re = D == null ? void 0 : D.optionUrl) == null ? void 0 : re.groupSelect) == null ? void 0 : we[0]));
|
|
1162
|
+
})) == null ? void 0 : il.compData;
|
|
1163
|
+
let kl = (xl = (Ol = B == null ? void 0 : B.find((le) => (le == null ? void 0 : le.key) === "header")) == null ? void 0 : Ol.contents) == null ? void 0 : xl.map((le) => le == null ? void 0 : le.label);
|
|
1164
|
+
(Je = (he = B == null ? void 0 : B.find((le) => (le == null ? void 0 : le.key) === "header")) == null ? void 0 : he.contents) != null && Je.every((le) => Array.isArray(le)) && (kl = (ie = wa((ye = (el = B == null ? void 0 : B.find((le) => (le == null ? void 0 : le.key) === "header")) == null ? void 0 : el.contents) == null ? void 0 : ye[0])) == null ? void 0 : ie.map((le) => le == null ? void 0 : le.prop));
|
|
1165
|
+
let ul = (Le = (oe = B == null ? void 0 : B.find((le) => (le == null ? void 0 : le.key) === "tableContents")) == null ? void 0 : oe.contents) == null ? void 0 : Le.map((le) => {
|
|
1166
|
+
if (Array.isArray(le))
|
|
1167
|
+
le = le == null ? void 0 : le.filter((w) => !(w != null && w.id));
|
|
1168
|
+
else {
|
|
1169
|
+
let w = {};
|
|
1170
|
+
for (let ll in le)
|
|
1171
|
+
ll !== "id" && (w[ll] = le == null ? void 0 : le[ll]);
|
|
1172
|
+
le = w;
|
|
1173
|
+
}
|
|
1174
|
+
return le;
|
|
1175
|
+
});
|
|
1176
|
+
ul == null || ul.forEach((le) => {
|
|
1177
|
+
Array.isArray(le) ? T.push(fo(le, kl)) : T.push(le);
|
|
1178
|
+
});
|
|
1179
|
+
}
|
|
1180
|
+
return T;
|
|
1181
|
+
}, _i = "col-operate", xr = (D) => `${_i}-${D}`, Ai = (D, j) => {
|
|
1182
|
+
const A = /* @__PURE__ */ new Map();
|
|
1183
|
+
return D.forEach((T) => {
|
|
1184
|
+
const { prop: m } = T;
|
|
1185
|
+
A.set(m, T);
|
|
1186
|
+
}), j.forEach((T) => {
|
|
1187
|
+
const { prop: m } = T, s = A.get(m);
|
|
1188
|
+
return Ci(s, T);
|
|
1189
|
+
}), j;
|
|
1190
|
+
}, Ci = (D, j) => (D && (j.sortable = D == null ? void 0 : D.sortable, j.filterable = D == null ? void 0 : D.filterable, j.showSummary = D == null ? void 0 : D.showSummary, j.operable = D == null ? void 0 : D.operable, j.fixed = D == null ? void 0 : D.fixed), j), Ti = (D, j) => {
|
|
1191
|
+
const { sortable: A = !1, filterable: T = !1, showSummary: m = !1, operable: s = !1, fixed: Z = !1 } = j || {};
|
|
1192
|
+
return {
|
|
1193
|
+
prop: D,
|
|
1194
|
+
sortable: A,
|
|
1195
|
+
filterable: T,
|
|
1196
|
+
showSummary: m,
|
|
1197
|
+
operable: s,
|
|
1198
|
+
fixed: Z
|
|
1199
|
+
};
|
|
1200
|
+
}, Oi = async (D) => {
|
|
1201
|
+
var s, Z;
|
|
1202
|
+
if (!D)
|
|
1203
|
+
return;
|
|
1204
|
+
const j = xr(D), A = await ia({
|
|
1205
|
+
key: {
|
|
1206
|
+
systemKey: sessionStorage.getItem("systemKey"),
|
|
1207
|
+
uniqueKey: j
|
|
1208
|
+
}
|
|
1209
|
+
}), T = (s = A == null ? void 0 : A.data) == null ? void 0 : s.code, m = (Z = A == null ? void 0 : A.data) == null ? void 0 : Z.result;
|
|
1210
|
+
if (T == 200)
|
|
1211
|
+
return m == null ? void 0 : m[0];
|
|
1212
|
+
}, xi = async (D) => {
|
|
1213
|
+
var s, Z, fe, be;
|
|
1214
|
+
if (!D)
|
|
1215
|
+
return;
|
|
1216
|
+
const j = xr(D), A = await ia({
|
|
1217
|
+
key: {
|
|
1218
|
+
systemKey: sessionStorage.getItem("systemKey"),
|
|
1219
|
+
uniqueKey: j
|
|
1220
|
+
}
|
|
1221
|
+
}), T = (s = A == null ? void 0 : A.data) == null ? void 0 : s.code, m = (Z = A == null ? void 0 : A.data) == null ? void 0 : Z.result;
|
|
1222
|
+
return T == 200 ? (be = (fe = m == null ? void 0 : m[0]) == null ? void 0 : fe.value) == null ? void 0 : be.columns : [];
|
|
1223
|
+
}, wi = async (D, j) => {
|
|
1224
|
+
if (!D || !j)
|
|
1225
|
+
return;
|
|
1226
|
+
const A = xr(D);
|
|
1227
|
+
return await no({
|
|
1228
|
+
key: {
|
|
1229
|
+
systemKey: sessionStorage.getItem("systemKey"),
|
|
1230
|
+
uniqueKey: A
|
|
1231
|
+
},
|
|
1232
|
+
value: {
|
|
1233
|
+
columns: j
|
|
1234
|
+
}
|
|
1235
|
+
});
|
|
1236
|
+
}, Ui = async (D, j) => !D || !j ? void 0 : await Cn({
|
|
1237
|
+
id: D,
|
|
1238
|
+
value: {
|
|
1239
|
+
columns: j
|
|
1240
|
+
}
|
|
1241
|
+
}), Sn = async (D, j) => {
|
|
1242
|
+
const A = sessionStorage.getItem("systemKey");
|
|
1243
|
+
if (!D || !j || !A)
|
|
1244
|
+
return;
|
|
1245
|
+
const T = await Oi(D);
|
|
1246
|
+
return T ? await Ui(T == null ? void 0 : T.id, j) : await wi(D, j);
|
|
1247
|
+
}, Di = { class: "table-content" }, Ei = { class: "menu-config-wrap" }, Li = ["onClick"], ji = {
|
|
1248
|
+
key: 0,
|
|
1249
|
+
class: "viewport-wrap"
|
|
1250
|
+
}, $i = ["onClick"], Pi = { title: "选择显示列信息" }, Ni = {
|
|
1251
|
+
class: "menu-config-wrap",
|
|
1252
|
+
style: { padding: "0 0 0 16px", "box-sizing": "border-box", "min-height": "200px", width: "400px", overflow: "auto", position: "relative" }
|
|
1253
|
+
}, Ri = ["title"], Bi = { class: "col-operate-wrap" }, Mi = {
|
|
1254
|
+
key: 0,
|
|
1255
|
+
class: "col-operate-radio-wrapper"
|
|
1256
|
+
}, Fi = {
|
|
1257
|
+
title: "拖拽排序列",
|
|
1258
|
+
style: { cursor: "move", color: "grey", position: "absolute", right: "15px" }
|
|
1259
|
+
}, Ki = {
|
|
1260
|
+
key: 0,
|
|
1261
|
+
style: { display: "flex", "justify-content": "center", "align-items": "center" }
|
|
1262
|
+
}, zi = { class: "pop-view" }, Ji = { class: "pop-wrapper" }, Wi = { class: "file-list-pop" }, qi = ["title", "onClick"], Gi = ["onClick"], Hi = ["onClick"], Xi = { class: "form-content" }, Qi = {
|
|
1263
|
+
key: 0,
|
|
1264
|
+
class: "dialog-footer"
|
|
1265
|
+
}, Yi = { class: "dialog-footer" }, Zi = { "element-loading-text": "正在识别中 请稍后" }, Ii = { style: { display: "flex", "justify-content": "space-between", width: "100%", "align-items": "center" } }, Vi = ["title"], eu = {
|
|
1266
|
+
class: "icon",
|
|
1267
|
+
style: { display: "flex", gap: "8px" }
|
|
1268
|
+
}, lu = { class: "dialog-footer" }, au = { class: "ocr-preview-content" }, ru = { class: "ocr-preview-tip" }, nu = { class: "ocr-preview-table" }, su = { style: { display: "flex", "align-items": "center", gap: "8px" } }, ou = { class: "dialog-footer" }, iu = { class: "form-content" }, uu = {
|
|
1269
|
+
__name: "index",
|
|
1270
|
+
props: {
|
|
1271
|
+
pageLayout: {
|
|
1272
|
+
type: String,
|
|
1273
|
+
default: "vertical"
|
|
1274
|
+
},
|
|
1275
|
+
level: {
|
|
1276
|
+
type: Number,
|
|
1277
|
+
default: 1
|
|
1278
|
+
},
|
|
1279
|
+
compName: {
|
|
1280
|
+
type: String,
|
|
1281
|
+
default: "",
|
|
1282
|
+
required: !1
|
|
1283
|
+
},
|
|
1284
|
+
compNames: {
|
|
1285
|
+
type: Array,
|
|
1286
|
+
default: () => [],
|
|
1287
|
+
required: !1
|
|
1288
|
+
},
|
|
1289
|
+
compItem: {
|
|
1290
|
+
type: Object,
|
|
1291
|
+
default: () => {
|
|
1292
|
+
}
|
|
1293
|
+
},
|
|
1294
|
+
operatingForm: {
|
|
1295
|
+
type: Object,
|
|
1296
|
+
default: () => {
|
|
1297
|
+
}
|
|
1298
|
+
},
|
|
1299
|
+
cacheNewData: {
|
|
1300
|
+
type: Object,
|
|
1301
|
+
default: () => {
|
|
1302
|
+
}
|
|
1303
|
+
},
|
|
1304
|
+
config: Object,
|
|
1305
|
+
parentTableId: {
|
|
1306
|
+
type: Number,
|
|
1307
|
+
default: 0
|
|
1308
|
+
},
|
|
1309
|
+
itemData: {
|
|
1310
|
+
type: Array,
|
|
1311
|
+
default: () => []
|
|
1312
|
+
},
|
|
1313
|
+
childItemData: {
|
|
1314
|
+
type: Array,
|
|
1315
|
+
default: () => []
|
|
1316
|
+
},
|
|
1317
|
+
index: Number,
|
|
1318
|
+
isDevMode: Boolean,
|
|
1319
|
+
changedContent: {
|
|
1320
|
+
type: Object,
|
|
1321
|
+
default: () => {
|
|
1322
|
+
}
|
|
1323
|
+
},
|
|
1324
|
+
showHeader: {
|
|
1325
|
+
type: Boolean,
|
|
1326
|
+
default: !0
|
|
1327
|
+
},
|
|
1328
|
+
allowSelect: {
|
|
1329
|
+
type: Boolean,
|
|
1330
|
+
default: !1
|
|
1331
|
+
},
|
|
1332
|
+
allowOperate: {
|
|
1333
|
+
type: Boolean,
|
|
1334
|
+
default: !0
|
|
1335
|
+
},
|
|
1336
|
+
allMapContents: {
|
|
1337
|
+
type: Object,
|
|
1338
|
+
default: () => {
|
|
1339
|
+
}
|
|
1340
|
+
}
|
|
1341
|
+
},
|
|
1342
|
+
emits: ["getSliceContLength", "clickMainKey", "change", "contentChange", "onButtonClick", "contentClick", "pageChange", "rowClick", "routeUrl"],
|
|
1343
|
+
setup(D, { emit: j }) {
|
|
1344
|
+
var Vr;
|
|
1345
|
+
const A = G([]), T = Si(va), m = G(null), s = D, Z = G(s == null ? void 0 : s.allowSelect), fe = G((Vr = s == null ? void 0 : s.config) == null ? void 0 : Vr.showIndex), be = G(), Oe = G(!0), Ve = G(!1), rl = {
|
|
1346
|
+
sortable: "switch",
|
|
1347
|
+
filterable: "switch",
|
|
1348
|
+
showSummary: "switch",
|
|
1349
|
+
operable: "switch",
|
|
1350
|
+
fixed: "radio"
|
|
1351
|
+
}, tl = G([
|
|
1352
|
+
{
|
|
1353
|
+
label: "排序",
|
|
1354
|
+
value: "sortable",
|
|
1355
|
+
checked: !1
|
|
1356
|
+
},
|
|
1357
|
+
// {
|
|
1358
|
+
// label: '筛选',
|
|
1359
|
+
// value: 'filterable',
|
|
1360
|
+
// checked: false
|
|
1361
|
+
// },
|
|
1362
|
+
{
|
|
1363
|
+
label: "合计",
|
|
1364
|
+
value: "showSummary",
|
|
1365
|
+
checked: !1
|
|
1366
|
+
},
|
|
1367
|
+
// {
|
|
1368
|
+
// label: '编辑',
|
|
1369
|
+
// value: 'operable',
|
|
1370
|
+
// checked: false
|
|
1371
|
+
// },
|
|
1372
|
+
{
|
|
1373
|
+
type: "radio",
|
|
1374
|
+
label: "固定",
|
|
1375
|
+
value: "fixed",
|
|
1376
|
+
checked: "",
|
|
1377
|
+
options: [
|
|
1378
|
+
{
|
|
1379
|
+
label: "无",
|
|
1380
|
+
value: !1
|
|
1381
|
+
},
|
|
1382
|
+
{
|
|
1383
|
+
label: "左",
|
|
1384
|
+
value: "left"
|
|
1385
|
+
},
|
|
1386
|
+
{
|
|
1387
|
+
label: "右",
|
|
1388
|
+
value: "right"
|
|
1389
|
+
}
|
|
1390
|
+
]
|
|
1391
|
+
}
|
|
1392
|
+
]), il = ho(va);
|
|
1393
|
+
let Ol = "$R";
|
|
1394
|
+
const { originalPath: xl } = Ta(il), he = xl.value, Je = Ca(() => {
|
|
1395
|
+
var l;
|
|
1396
|
+
return (l = B.value) == null ? void 0 : l.every((a) => a == null ? void 0 : a.sortable);
|
|
1397
|
+
});
|
|
1398
|
+
Ca(() => {
|
|
1399
|
+
var l;
|
|
1400
|
+
return (l = B.value) == null ? void 0 : l.every((a) => a == null ? void 0 : a.filterable);
|
|
1401
|
+
}), Ca(() => {
|
|
1402
|
+
var l;
|
|
1403
|
+
return (l = B.value) == null ? void 0 : l.every((a) => a == null ? void 0 : a.operable);
|
|
1404
|
+
});
|
|
1405
|
+
const el = G(!0), ye = G([]), ie = za({
|
|
1406
|
+
column: {},
|
|
1407
|
+
status: !1,
|
|
1408
|
+
text: "合计"
|
|
1409
|
+
}), oe = za({
|
|
1410
|
+
currentPage: 1,
|
|
1411
|
+
pageSize: 10,
|
|
1412
|
+
total: 0,
|
|
1413
|
+
pageSizes: [5, 10, 20, 50, 100]
|
|
1414
|
+
}), Le = j, B = G([]), kl = G([]), ul = G([]), le = za({ prop: "", order: null }), w = G([]), ll = G(!1), re = G(!1), we = G(null), { isUseBackdrop: We, initTrackFileType: Tl, getFileExtension: ql, setData: rr, getFileInfo: wr, getFilesInfo: wn } = wo(), nr = G([]), fa = G(!1), ba = G(), ml = Do(), { importLoading: tu, activeMenuPath: Ge, contentLoading: du, linkMenuInfo: Un } = Ta(ml), Dn = yo(va), dl = Eo(va), { extraContents: Qe, cacheUpdatingData: Da, tableViewContents: Ea, tableLoading: cu, pageMapState: ka, lockingPage: Ga } = Ta(dl), ne = G([]), Vl = G([]), Bl = G(/* @__PURE__ */ new Map());
|
|
1415
|
+
G(!1);
|
|
1416
|
+
const ea = G("");
|
|
1417
|
+
G();
|
|
1418
|
+
const Ha = G(!0), ma = G(0), Ur = G(!0), Pl = G(""), la = G(!1), En = G({
|
|
1419
|
+
label: "查看三维模型"
|
|
1420
|
+
}), Xa = G(!1), sr = G(), Jl = G([]), ua = G([]), Qa = G(!1), La = G([]), Ml = G([]), Fl = G([]), xe = G([]), Ya = G(!1), ta = G(!1), aa = G([]), Ln = G(null), Za = G(!1), Ia = G([]), Dr = G(""), or = G(""), ir = G(!1), Sa = G([]), ur = G([]), tr = G([]), dr = G(null), ra = G([]), ja = Lo(), jn = Ca(() => ja.getConfig()), Gl = G(), Dl = G(), $n = Vo(va), $a = G(), cr = G(0), Pn = vo(va), { selectIndex: Nn, selectMenu: Pa, selectTitle: pu } = Ta(Pn), { selectString: ha } = Ta($n), Rn = so(va), { loginUserInfo: _a } = Ta(Rn), Bn = G(720), Hl = G(!1), Va = G(!1), Xl = G([]), Ql = G(), Na = G(!0), Er = G(!0), ya = G([]), Mn = Is("contentRef");
|
|
1421
|
+
Vs("contentRef", Mn), $l(() => {
|
|
1422
|
+
var e;
|
|
1423
|
+
return (e = ne.value) == null ? void 0 : e.length;
|
|
1424
|
+
}, (e) => {
|
|
1425
|
+
oe.total = e;
|
|
1426
|
+
}), $l(
|
|
1427
|
+
() => Ea.value,
|
|
1428
|
+
async () => {
|
|
1429
|
+
var u, t, o, p, b, O, v, x, N, M, F, S, K, J, $, _, L, i;
|
|
1430
|
+
if (((u = Ea.value) == null ? void 0 : u.length) === 0 || !((t = s == null ? void 0 : s.itemData) != null && t.find((y) => (y == null ? void 0 : y.key) === "columnPath")) || !((o = s == null ? void 0 : s.itemData) != null && o.find((y) => (y == null ? void 0 : y.key) === "pageColumn"))) return;
|
|
1431
|
+
let e = (N = (x = (v = (O = (b = (p = s == null ? void 0 : s.itemData) == null ? void 0 : p.find((y) => (y == null ? void 0 : y.key) === "pageColumn")) == null ? void 0 : b.contents) == null ? void 0 : O.split("[")) == null ? void 0 : v[1]) == null ? void 0 : x.split("]")) == null ? void 0 : N[0], l = ((K = (S = (F = (M = s == null ? void 0 : s.itemData) == null ? void 0 : M.find((y) => (y == null ? void 0 : y.key) === "pageColumn")) == null ? void 0 : F.contents) == null ? void 0 : S.split("[")) == null ? void 0 : K[0]) + (($ = (J = Ea.value) == null ? void 0 : J.find((y) => (y == null ? void 0 : y.key) === e)) == null ? void 0 : $.value), a = ((L = (_ = s == null ? void 0 : s.itemData) == null ? void 0 : _.find((y) => (y == null ? void 0 : y.key) === "pageGroup")) == null ? void 0 : L.contents) ?? "", r = await xa(l, sessionStorage.getItem("systemKey"), ""), n = (i = r == null ? void 0 : r.find((y) => (y == null ? void 0 : y.name) === (a === "" ? s == null ? void 0 : s.compName : a))) == null ? void 0 : i.compData;
|
|
1432
|
+
Zr(n, s.allMapContents);
|
|
1433
|
+
},
|
|
1434
|
+
{ deep: !0 }
|
|
1435
|
+
);
|
|
1436
|
+
const Fn = async (e, l) => {
|
|
1437
|
+
var a, r, n, u, t;
|
|
1438
|
+
try {
|
|
1439
|
+
const o = await ia({ id: (s == null ? void 0 : s.parentTableId) || (s == null ? void 0 : s.index) });
|
|
1440
|
+
let p;
|
|
1441
|
+
((a = o == null ? void 0 : o.data) == null ? void 0 : a.code) === 200 && (p = ((n = (r = o == null ? void 0 : o.data) == null ? void 0 : r.result) == null ? void 0 : n[0]) || null);
|
|
1442
|
+
const b = {
|
|
1443
|
+
type: "data",
|
|
1444
|
+
pageKey: s != null && s.parentTableId ? (u = p == null ? void 0 : p.key) == null ? void 0 : u.pageKey : Ge.value,
|
|
1445
|
+
tableId: (s == null ? void 0 : s.parentTableId) || (s == null ? void 0 : s.index),
|
|
1446
|
+
systemKey: sessionStorage.getItem("systemKey")
|
|
1447
|
+
}, O = l == null ? void 0 : l.map((N) => {
|
|
1448
|
+
const M = Object.keys(N), F = {};
|
|
1449
|
+
return M.forEach((S, K) => {
|
|
1450
|
+
F[e[K]] = N[S];
|
|
1451
|
+
}), F;
|
|
1452
|
+
}), v = O == null ? void 0 : O.map((N) => ({
|
|
1453
|
+
key: b,
|
|
1454
|
+
value: {
|
|
1455
|
+
tableData: N
|
|
1456
|
+
}
|
|
1457
|
+
})), x = await cn({ dataList: v });
|
|
1458
|
+
((t = x == null ? void 0 : x.data) == null ? void 0 : t.code) === 200 ? (dl.setRefreshCurStructure(!0), nl.success("导入数据成功")) : nl.error("导入数据响应失败");
|
|
1459
|
+
} catch (o) {
|
|
1460
|
+
throw nl.error("导入数据处理失败"), new Error(o);
|
|
1461
|
+
}
|
|
1462
|
+
}, Kn = async (e) => {
|
|
1463
|
+
var u, t, o, p, b, O, v;
|
|
1464
|
+
let l = ul.value;
|
|
1465
|
+
l != null && l.find((x) => (e == null ? void 0 : e.key) === (x == null ? void 0 : x.key)) && (l = l == null ? void 0 : l.filter((x) => (e == null ? void 0 : e.key) !== (x == null ? void 0 : x.key))), l.push({
|
|
1466
|
+
key: e == null ? void 0 : e.key,
|
|
1467
|
+
value: [(t = e == null ? void 0 : e.value) == null ? void 0 : t[((u = e == null ? void 0 : e.value) == null ? void 0 : u.length) - 1]]
|
|
1468
|
+
});
|
|
1469
|
+
let a = xe.value;
|
|
1470
|
+
a = a == null ? void 0 : a.map((x) => {
|
|
1471
|
+
var N, M;
|
|
1472
|
+
return (x == null ? void 0 : x.type) === "Select" && (e == null ? void 0 : e.key) === (x == null ? void 0 : x.prop) && Array.isArray(x.value) && (N = x.value) != null && N.every((F) => typeof F == "string") && (x.selectValue = (M = l == null ? void 0 : l.find((F) => (F == null ? void 0 : F.key) === (x == null ? void 0 : x.prop))) == null ? void 0 : M.value), x;
|
|
1473
|
+
});
|
|
1474
|
+
let r = (p = (o = a == null ? void 0 : a.find((x) => (x == null ? void 0 : x.prop) === (e == null ? void 0 : e.key))) == null ? void 0 : o.optionUrl) == null ? void 0 : p.menuId, n = a == null ? void 0 : a.find((x) => (x == null ? void 0 : x.prop) === (e == null ? void 0 : e.key));
|
|
1475
|
+
if (r) {
|
|
1476
|
+
let x = await Ar(n == null ? void 0 : n.optionUrl, r), N, M = ye.value, F = (v = (O = (b = xe.value) == null ? void 0 : b.find((S) => {
|
|
1477
|
+
var K;
|
|
1478
|
+
return (K = n == null ? void 0 : n.optionUrl) == null ? void 0 : K.menuId;
|
|
1479
|
+
})) == null ? void 0 : O.selectValue) == null ? void 0 : v[0];
|
|
1480
|
+
if (x == null || x.forEach((S) => {
|
|
1481
|
+
var K, J, $, _, L, i, y, h, q, P;
|
|
1482
|
+
if (r) {
|
|
1483
|
+
let X = (J = (K = xe.value) == null ? void 0 : K.find((E) => {
|
|
1484
|
+
var ve, W;
|
|
1485
|
+
return ((ve = n == null ? void 0 : n.optionUrl) == null ? void 0 : ve.menuId) === ((W = E == null ? void 0 : E.optionUrl) == null ? void 0 : W.menuId);
|
|
1486
|
+
})) == null ? void 0 : J.prop, d = (_ = ($ = a == null ? void 0 : a.find((E) => (E == null ? void 0 : E.prop) === X)) == null ? void 0 : $.selectValue) == null ? void 0 : _[0];
|
|
1487
|
+
X != null && X.includes("·") && (X = (L = X == null ? void 0 : X.split("·")) == null ? void 0 : L[0], d = (q = (h = (y = e == null ? void 0 : e.value) == null ? void 0 : y[((i = e == null ? void 0 : e.value) == null ? void 0 : i.length) - 1]) == null ? void 0 : h.split(" ")) == null ? void 0 : q[0]), M != null && M.find((E) => (E == null ? void 0 : E.value) === F) ? N = (P = M == null ? void 0 : M.find((E) => (E == null ? void 0 : E.value) === F)) == null ? void 0 : P.objectValue : S[X] === d && (N = S);
|
|
1488
|
+
}
|
|
1489
|
+
}), N) {
|
|
1490
|
+
let S = a;
|
|
1491
|
+
S = S == null ? void 0 : S.map((K) => {
|
|
1492
|
+
var J, $, _, L, i, y;
|
|
1493
|
+
return r && (N != null && N[K == null ? void 0 : K.prop]) && Pl.value === "新增" && (K == null ? void 0 : K.prop) !== (n == null ? void 0 : n.prop) ? K.value = (N == null ? void 0 : N[K == null ? void 0 : K.prop]) || (N == null ? void 0 : N[(L = (_ = ($ = (J = K == null ? void 0 : K.optionUrl) == null ? void 0 : J.groupSelect) == null ? void 0 : $[1]) == null ? void 0 : _.replaceAll("[", "")) == null ? void 0 : L.replaceAll("]", "")]) : K.value = (y = (i = xe.value) == null ? void 0 : i.find((h) => (h == null ? void 0 : h.prop) === (K == null ? void 0 : K.prop))) == null ? void 0 : y.value, K;
|
|
1494
|
+
}), xe.value = S;
|
|
1495
|
+
}
|
|
1496
|
+
}
|
|
1497
|
+
ul.value = l;
|
|
1498
|
+
}, zn = async (e) => {
|
|
1499
|
+
var l, a, r, n, u;
|
|
1500
|
+
if ((l = e == null ? void 0 : e.toString()) != null && l.includes(".txt") || (a = e == null ? void 0 : e.toString()) != null && a.includes(".cpt") || (r = e == null ? void 0 : e.toString()) != null && r.includes(".cyd")) {
|
|
1501
|
+
const t = await ga.get(e, {
|
|
1502
|
+
responseType: "blob",
|
|
1503
|
+
// 必须设置
|
|
1504
|
+
headers: {
|
|
1505
|
+
"Content-Type": "application/json"
|
|
1506
|
+
}
|
|
1507
|
+
}), o = new Blob([t.data], {
|
|
1508
|
+
type: "application/octet-stream;charset=UTF-8"
|
|
1509
|
+
});
|
|
1510
|
+
let p = URL.createObjectURL(o);
|
|
1511
|
+
ba.value = [{
|
|
1512
|
+
name: (u = e == null ? void 0 : e.split("/")) == null ? void 0 : u[((n = e == null ? void 0 : e.split("/")) == null ? void 0 : n.length) - 1],
|
|
1513
|
+
blobUrl: p
|
|
1514
|
+
}], fa.value = !0;
|
|
1515
|
+
}
|
|
1516
|
+
};
|
|
1517
|
+
eo(() => {
|
|
1518
|
+
Er.value = !1;
|
|
1519
|
+
let e = cr.value;
|
|
1520
|
+
cr.value = e + 1;
|
|
1521
|
+
});
|
|
1522
|
+
const Lr = Ca(() => {
|
|
1523
|
+
var r, n;
|
|
1524
|
+
const e = (oe.currentPage - 1) * oe.pageSize, l = e + oe.pageSize, a = (r = B.value) == null ? void 0 : r.find((u) => {
|
|
1525
|
+
var t;
|
|
1526
|
+
return (u == null ? void 0 : u.sortable) && ((t = u == null ? void 0 : u.label) == null ? void 0 : t.includes("时间"));
|
|
1527
|
+
});
|
|
1528
|
+
return a && (le.order = "descending", le.prop = a == null ? void 0 : a.prop), Le("getSliceContLength", oe), (n = ne.value) == null ? void 0 : n.slice(e, l);
|
|
1529
|
+
}), Jn = (e) => {
|
|
1530
|
+
oe.currentPage = e, Le("getSliceContLength", oe);
|
|
1531
|
+
}, Wn = (e) => {
|
|
1532
|
+
var l;
|
|
1533
|
+
oe.pageSize = e, e * oe.currentPage > ((l = ne.value) == null ? void 0 : l.length) && (oe.currentPage = 1, oe.pageSize = 10, nl.warning("分页无效,返回第一页")), Le("getSliceContLength", oe);
|
|
1534
|
+
}, qn = (e, l) => {
|
|
1535
|
+
var t, o;
|
|
1536
|
+
const a = (o = (t = B.value) == null ? void 0 : t.map((p) => p == null ? void 0 : p.prop)) == null ? void 0 : o.filter((p) => p !== "operate");
|
|
1537
|
+
let r;
|
|
1538
|
+
const n = (e == null ? void 0 : e.length) === (a == null ? void 0 : a.length);
|
|
1539
|
+
if (e != null && e.includes("序号")) return nl.error("导入的数据不需要包含序号列");
|
|
1540
|
+
if (r = n ? e : e.slice(0, a == null ? void 0 : a.length), !(r == null ? void 0 : r.every((p) => a == null ? void 0 : a.find((b) => p === b)))) return nl.error("导入的数据表头不匹配");
|
|
1541
|
+
Fn(r, l);
|
|
1542
|
+
}, Gn = (e, l) => {
|
|
1543
|
+
var a;
|
|
1544
|
+
dl.setRefreshCurStructure(!1), ((a = B.value) == null ? void 0 : a.length) === 0 || qn(e, l);
|
|
1545
|
+
}, Hn = (e, l, a, r) => {
|
|
1546
|
+
const n = [], u = [], t = (b) => Object.keys(b).length;
|
|
1547
|
+
for (const b in e)
|
|
1548
|
+
if (e[b] !== void 0) {
|
|
1549
|
+
const O = e[b], v = [];
|
|
1550
|
+
for (const [x, N] of Object.entries(O))
|
|
1551
|
+
v.push(N), u.length < t(O) && u.push(x);
|
|
1552
|
+
n.push(v);
|
|
1553
|
+
}
|
|
1554
|
+
n.unshift(u);
|
|
1555
|
+
const o = Wa.aoa_to_sheet(n), p = Wa.book_new();
|
|
1556
|
+
Wa.book_append_sheet(p, o, r), Ao(p, `${l}.xlsx`), Xl.value = [];
|
|
1557
|
+
}, jr = async (e, l, a, r = !1, n) => {
|
|
1558
|
+
var u, t, o, p, b, O, v, x;
|
|
1559
|
+
try {
|
|
1560
|
+
dl.setRefreshCurStructure(!1);
|
|
1561
|
+
const N = await ia({
|
|
1562
|
+
id: s == null ? void 0 : s.index
|
|
1563
|
+
});
|
|
1564
|
+
if (((u = N == null ? void 0 : N.data) == null ? void 0 : u.code) === 200) {
|
|
1565
|
+
let M = (b = (p = (o = (t = N == null ? void 0 : N.data) == null ? void 0 : t.result) == null ? void 0 : o[0]) == null ? void 0 : p.value) == null ? void 0 : b.pageData;
|
|
1566
|
+
r ? M = {
|
|
1567
|
+
...M,
|
|
1568
|
+
compData: (v = M == null ? void 0 : M.compData) == null ? void 0 : v.map((S) => {
|
|
1569
|
+
var K;
|
|
1570
|
+
return (S == null ? void 0 : S.key) === "header" ? {
|
|
1571
|
+
...S,
|
|
1572
|
+
contents: (K = S == null ? void 0 : S.contents) == null ? void 0 : K.map((J) => ({
|
|
1573
|
+
...J,
|
|
1574
|
+
[e]: a
|
|
1575
|
+
}))
|
|
1576
|
+
} : S;
|
|
1577
|
+
})
|
|
1578
|
+
} : M = {
|
|
1579
|
+
...M,
|
|
1580
|
+
compData: (O = M == null ? void 0 : M.compData) == null ? void 0 : O.map((S) => {
|
|
1581
|
+
var K, J;
|
|
1582
|
+
return (S == null ? void 0 : S.key) === "header" ? {
|
|
1583
|
+
...S,
|
|
1584
|
+
contents: (K = S == null ? void 0 : S.contents) == null ? void 0 : K.map(($) => {
|
|
1585
|
+
if (Array.isArray($))
|
|
1586
|
+
$ = $ == null ? void 0 : $.map((_) => (_ == null ? void 0 : _.prop) === (l == null ? void 0 : l.prop) ? {
|
|
1587
|
+
..._,
|
|
1588
|
+
[e]: a
|
|
1589
|
+
} : _);
|
|
1590
|
+
else if (($ == null ? void 0 : $.prop) === (l == null ? void 0 : l.prop))
|
|
1591
|
+
return {
|
|
1592
|
+
...$,
|
|
1593
|
+
[e]: a
|
|
1594
|
+
};
|
|
1595
|
+
return $;
|
|
1596
|
+
})
|
|
1597
|
+
} : (S == null ? void 0 : S.key) === "tableToForm" && n ? {
|
|
1598
|
+
...S,
|
|
1599
|
+
contents: (J = S == null ? void 0 : S.contents) == null ? void 0 : J.map(($) => ($ == null ? void 0 : $.prop) === (l == null ? void 0 : l.prop) ? {
|
|
1600
|
+
...$,
|
|
1601
|
+
[n]: a
|
|
1602
|
+
} : $)
|
|
1603
|
+
} : S;
|
|
1604
|
+
})
|
|
1605
|
+
};
|
|
1606
|
+
const F = await Cn({
|
|
1607
|
+
id: s == null ? void 0 : s.index,
|
|
1608
|
+
value: {
|
|
1609
|
+
pageData: M
|
|
1610
|
+
}
|
|
1611
|
+
});
|
|
1612
|
+
((x = F == null ? void 0 : F.data) == null ? void 0 : x.code) === 200 ? (nl.success("编辑成功"), dl.setRefreshCurStructure(!0)) : nl.error("编辑响应失败");
|
|
1613
|
+
}
|
|
1614
|
+
} catch (N) {
|
|
1615
|
+
nl.error(N);
|
|
1616
|
+
}
|
|
1617
|
+
}, Xn = async (e, l) => {
|
|
1618
|
+
await jr("label", l, e);
|
|
1619
|
+
}, Qn = async (e, l) => {
|
|
1620
|
+
await jr("columnType", l, e, !1, "type");
|
|
1621
|
+
}, Yn = () => {
|
|
1622
|
+
Da.value ? Hl.value = !1 : Ir();
|
|
1623
|
+
}, Zn = (e) => {
|
|
1624
|
+
Xl.value = e;
|
|
1625
|
+
}, In = (e, l) => {
|
|
1626
|
+
Ql.value === l ? Na.value = !1 : Na.value = !0, Ql.value = l == null ? void 0 : l.changeProp;
|
|
1627
|
+
}, Vn = (e) => {
|
|
1628
|
+
if (!e)
|
|
1629
|
+
return;
|
|
1630
|
+
const { item: l, value: a } = e, r = xe.value.find((n) => n.prop == l.prop);
|
|
1631
|
+
r && r.contents.push({
|
|
1632
|
+
label: a,
|
|
1633
|
+
value: a
|
|
1634
|
+
});
|
|
1635
|
+
}, Ra = Ca(() => {
|
|
1636
|
+
var a, r, n;
|
|
1637
|
+
const e = (a = B.value) == null ? void 0 : a.some((u) => u == null ? void 0 : u.filterable);
|
|
1638
|
+
return document.documentElement.style.setProperty("--ssTable-header-filter-display", e ? "inline-block" : "none"), (n = (r = B.value) == null ? void 0 : r.filter((u) => (u == null ? void 0 : u.label) !== "操作")) == null ? void 0 : n.map((u) => ({
|
|
1639
|
+
...u,
|
|
1640
|
+
filterable: !!(u != null && u.filterable),
|
|
1641
|
+
showSummary: !!(u != null && u.showSummary),
|
|
1642
|
+
operable: !!(u != null && u.operable),
|
|
1643
|
+
fixed: u == null ? void 0 : u.fixed
|
|
1644
|
+
}));
|
|
1645
|
+
}), $r = async (e, l, a) => {
|
|
1646
|
+
const r = ae(B.value);
|
|
1647
|
+
await Ja();
|
|
1648
|
+
const n = r == null ? void 0 : r.map((t) => (a == null ? void 0 : a.label) === (t == null ? void 0 : t.label) ? {
|
|
1649
|
+
...t,
|
|
1650
|
+
[l]: e
|
|
1651
|
+
} : t), u = pr(n);
|
|
1652
|
+
await Sn(s.index, u), B.value = n, kl.value = u;
|
|
1653
|
+
}, pr = (e) => (e || []).map((r) => {
|
|
1654
|
+
const { prop: n } = r;
|
|
1655
|
+
return Ti(n, r);
|
|
1656
|
+
}), es = async (e) => {
|
|
1657
|
+
let l = await xi(s.index);
|
|
1658
|
+
l || (l = pr(e)), kl.value = l;
|
|
1659
|
+
}, ls = async (e, l) => {
|
|
1660
|
+
const a = ae(B.value), r = a == null ? void 0 : a.map((u) => ({
|
|
1661
|
+
...u,
|
|
1662
|
+
[l]: e
|
|
1663
|
+
})), n = pr(r);
|
|
1664
|
+
await Sn(s.index, n), B.value = r, kl.value = n;
|
|
1665
|
+
}, as = () => {
|
|
1666
|
+
la.value = !1;
|
|
1667
|
+
}, rs = (e) => {
|
|
1668
|
+
Le("clickTrigger", e);
|
|
1669
|
+
}, Pr = async (e) => {
|
|
1670
|
+
var u, t, o, p, b, O, v, x, N, M, F, S, K, J, $;
|
|
1671
|
+
const l = e == null ? void 0 : e.row, a = e == null ? void 0 : e.rowData, r = e == null ? void 0 : e.suffix;
|
|
1672
|
+
if ((u = l == null ? void 0 : l.toString()) != null && u.includes(".urdf") || e != null && e.isUrdf || r != null && r.includes(".urdf")) {
|
|
1673
|
+
if (l.includes(",")) {
|
|
1674
|
+
nl.error("当前版本仅允许单个urdf预览!");
|
|
1675
|
+
return;
|
|
1676
|
+
}
|
|
1677
|
+
if (We(l)) {
|
|
1678
|
+
const L = {
|
|
1679
|
+
files: [wr(l)],
|
|
1680
|
+
data: {}
|
|
1681
|
+
};
|
|
1682
|
+
rr(L);
|
|
1683
|
+
return;
|
|
1684
|
+
}
|
|
1685
|
+
La.value = [{
|
|
1686
|
+
url: l,
|
|
1687
|
+
extension: ql(l)
|
|
1688
|
+
}], re.value = !0, we.value = {
|
|
1689
|
+
data: ae(a)
|
|
1690
|
+
}, ll.value = !0;
|
|
1691
|
+
return;
|
|
1692
|
+
}
|
|
1693
|
+
let n = [];
|
|
1694
|
+
if ((t = l == null ? void 0 : l.toString()) != null && t.includes(".stl") || (o = l == null ? void 0 : l.toString()) != null && o.includes(".STL") || (p = l == null ? void 0 : l.toString()) != null && p.includes(".obj") || (b = l == null ? void 0 : l.toString()) != null && b.includes(".mtl")) {
|
|
1695
|
+
const _ = (O = l == null ? void 0 : l.toString()) == null ? void 0 : O.split(","), L = wn(_), i = L == null ? void 0 : L[0];
|
|
1696
|
+
if (We(i == null ? void 0 : i.extension)) {
|
|
1697
|
+
rr({
|
|
1698
|
+
files: L,
|
|
1699
|
+
data: {}
|
|
1700
|
+
});
|
|
1701
|
+
return;
|
|
1702
|
+
}
|
|
1703
|
+
La.value = L, re.value = !1, ll.value = !0;
|
|
1704
|
+
return;
|
|
1705
|
+
}
|
|
1706
|
+
if ((v = l == null ? void 0 : l.toString()) != null && v.includes(".stl") || (x = l == null ? void 0 : l.toString()) != null && x.includes(".STL") || (N = l == null ? void 0 : l.toString()) != null && N.includes(".obj") || (M = l == null ? void 0 : l.toString()) != null && M.includes(".mtl") || r != null && r.includes(".stl") || r != null && r.includes(".STL") || r != null && r.includes(".obj") || r != null && r.includes(".mtl")) {
|
|
1707
|
+
let _, L = [], i = {};
|
|
1708
|
+
if (Array.isArray(l) ? _ = l : _ = l == null ? void 0 : l.split(","), _ == null || _.forEach((y) => {
|
|
1709
|
+
y.includes(".mtl") ? L.push(y) : i.blob = i.blob ? i.blob + "," + y : y;
|
|
1710
|
+
}), (L == null ? void 0 : L.length) > 0 && (i.mtlBlobs = L), r && (i.suffix = r), (S = (F = Object.values(i)) == null ? void 0 : F[0]) != null && S.includes("http:"))
|
|
1711
|
+
n.push(i);
|
|
1712
|
+
else {
|
|
1713
|
+
const y = new Blob([i.blob], {
|
|
1714
|
+
type: "application/octet-stream;charset=UTF-8"
|
|
1715
|
+
});
|
|
1716
|
+
let h = URL.createObjectURL(y), q = "";
|
|
1717
|
+
(K = l == null ? void 0 : l.split("/")) == null || K.forEach((P, X) => {
|
|
1718
|
+
var d;
|
|
1719
|
+
X === ((d = l == null ? void 0 : l.split("/")) == null ? void 0 : d.length) - 1 && (q = P);
|
|
1720
|
+
}), (J = i.blob) != null && J.includes(".stl") && (q = (q == null ? void 0 : q.replaceAll(">", "")) + ".urdf"), ba.value = [{
|
|
1721
|
+
name: q,
|
|
1722
|
+
blobUrl: h
|
|
1723
|
+
}], fa.value = !0;
|
|
1724
|
+
}
|
|
1725
|
+
} else {
|
|
1726
|
+
const _ = await ga.get(l, {
|
|
1727
|
+
responseType: "blob",
|
|
1728
|
+
headers: {
|
|
1729
|
+
"Content-Type": "application/json"
|
|
1730
|
+
}
|
|
1731
|
+
}), L = new Blob([_.data], {
|
|
1732
|
+
type: "application/octet-stream;charset=UTF-8"
|
|
1733
|
+
});
|
|
1734
|
+
let i = URL.createObjectURL(L), y = "";
|
|
1735
|
+
if (($ = l == null ? void 0 : l.split("/")) == null || $.forEach((h, q) => {
|
|
1736
|
+
var P;
|
|
1737
|
+
q === ((P = l == null ? void 0 : l.split("/")) == null ? void 0 : P.length) - 1 && (y = h);
|
|
1738
|
+
}), We(y)) {
|
|
1739
|
+
const h = Tl(y), q = wr(l);
|
|
1740
|
+
rr({
|
|
1741
|
+
files: [q],
|
|
1742
|
+
data: {
|
|
1743
|
+
trackFileType: h
|
|
1744
|
+
}
|
|
1745
|
+
});
|
|
1746
|
+
return;
|
|
1747
|
+
}
|
|
1748
|
+
ba.value = [{
|
|
1749
|
+
name: y,
|
|
1750
|
+
blobUrl: i
|
|
1751
|
+
}], fa.value = !0;
|
|
1752
|
+
}
|
|
1753
|
+
(n == null ? void 0 : n.length) > 0 && T.setBlobUrls(n);
|
|
1754
|
+
}, Ba = (e) => {
|
|
1755
|
+
var r, n, u, t;
|
|
1756
|
+
if (e != null && e.downloadUrl)
|
|
1757
|
+
return e == null ? void 0 : e.name;
|
|
1758
|
+
const l = (t = (r = e == null ? void 0 : e.url) == null ? void 0 : r.split(".")) == null ? void 0 : t[((u = (n = e == null ? void 0 : e.url) == null ? void 0 : n.split(".")) == null ? void 0 : u.length) - 1];
|
|
1759
|
+
return (e == null ? void 0 : e.name) + "." + l;
|
|
1760
|
+
}, fr = (e) => {
|
|
1761
|
+
if (!e) return "未知文件";
|
|
1762
|
+
try {
|
|
1763
|
+
const r = Ba(e);
|
|
1764
|
+
if (typeof r == "string" && r.includes(".")) return r;
|
|
1765
|
+
} catch {
|
|
1766
|
+
}
|
|
1767
|
+
const l = (e == null ? void 0 : e.fileName) || (e == null ? void 0 : e.name) || "未知文件", a = (e == null ? void 0 : e.suffix) || "";
|
|
1768
|
+
return l.includes(".") ? l : `${l}${a}`;
|
|
1769
|
+
}, Nr = (e) => {
|
|
1770
|
+
if (e == null || typeof e == "number" || typeof e != "string") return e;
|
|
1771
|
+
const l = e.match(/^(\d+)\_(\d+)$/);
|
|
1772
|
+
if (!l) return e;
|
|
1773
|
+
const a = Number(l[1]), r = Number(l[2]);
|
|
1774
|
+
return !Number.isFinite(a) || !Number.isFinite(r) ? e : String(a * 1e3 + r);
|
|
1775
|
+
}, Rr = async (e) => {
|
|
1776
|
+
let l = null, a = null;
|
|
1777
|
+
if (e != null && e.id) {
|
|
1778
|
+
const n = Sr.service({
|
|
1779
|
+
lock: !0,
|
|
1780
|
+
text: "Loading",
|
|
1781
|
+
background: "rgba(0, 0, 0, 0.7)"
|
|
1782
|
+
});
|
|
1783
|
+
try {
|
|
1784
|
+
const u = await Oa(e);
|
|
1785
|
+
l = URL.createObjectURL(u.data), a = fr(e);
|
|
1786
|
+
} finally {
|
|
1787
|
+
n.close();
|
|
1788
|
+
}
|
|
1789
|
+
} else if (e != null && e.downloadUrl) {
|
|
1790
|
+
const n = await hr(), u = Sr.service({
|
|
1791
|
+
lock: !0,
|
|
1792
|
+
text: "Loading",
|
|
1793
|
+
background: "rgba(0, 0, 0, 0.7)"
|
|
1794
|
+
}), t = await ga.post(e == null ? void 0 : e.url, null, {
|
|
1795
|
+
responseType: "blob",
|
|
1796
|
+
// 必须设置
|
|
1797
|
+
headers: {
|
|
1798
|
+
Authorization: n,
|
|
1799
|
+
baseURL: "http://139.196.154.85:20025",
|
|
1800
|
+
"Content-Type": "application/json"
|
|
1801
|
+
}
|
|
1802
|
+
}).finally(() => {
|
|
1803
|
+
u.close();
|
|
1804
|
+
}), o = new Blob([t.data], {
|
|
1805
|
+
type: "application/octet-stream;charset=UTF-8"
|
|
1806
|
+
});
|
|
1807
|
+
l = URL.createObjectURL(o), a = e == null ? void 0 : e.name;
|
|
1808
|
+
} else {
|
|
1809
|
+
const n = await Oa({
|
|
1810
|
+
url: e == null ? void 0 : e.url
|
|
1811
|
+
});
|
|
1812
|
+
!e.url.toUpperCase().includes(".OBJ") && !e.url.toUpperCase().includes(".STL") && !e.url.toUpperCase().includes(".MTL") && !e.url.toUpperCase().includes(".URDF") ? (l = URL.createObjectURL(n.data), a = Ba(e)) : l = e == null ? void 0 : e.url;
|
|
1813
|
+
}
|
|
1814
|
+
if (We(l)) {
|
|
1815
|
+
const n = {
|
|
1816
|
+
row: `${l}`,
|
|
1817
|
+
suffix: ql(a)
|
|
1818
|
+
};
|
|
1819
|
+
Pr(n);
|
|
1820
|
+
return;
|
|
1821
|
+
}
|
|
1822
|
+
const r = {
|
|
1823
|
+
name: a,
|
|
1824
|
+
blobUrl: l
|
|
1825
|
+
};
|
|
1826
|
+
ba.value = [r], fa.value = !0;
|
|
1827
|
+
}, ns = async (e) => {
|
|
1828
|
+
let l = null, a = null;
|
|
1829
|
+
if (e != null && e.id) {
|
|
1830
|
+
const u = await Oa(e);
|
|
1831
|
+
l = URL.createObjectURL(u.data), a = fr(e);
|
|
1832
|
+
} else if (e != null && e.downloadUrl) {
|
|
1833
|
+
const u = await hr(), t = await ga.post(e == null ? void 0 : e.url, null, {
|
|
1834
|
+
responseType: "blob",
|
|
1835
|
+
// 必须设置
|
|
1836
|
+
headers: {
|
|
1837
|
+
Authorization: u,
|
|
1838
|
+
baseURL: "http://139.196.154.85:20025",
|
|
1839
|
+
"Content-Type": "application/json"
|
|
1840
|
+
}
|
|
1841
|
+
}), o = new Blob([t.data], {
|
|
1842
|
+
type: "application/octet-stream;charset=UTF-8"
|
|
1843
|
+
});
|
|
1844
|
+
l = URL.createObjectURL(o), a = e == null ? void 0 : e.name;
|
|
1845
|
+
} else {
|
|
1846
|
+
const u = await Oa({
|
|
1847
|
+
url: e == null ? void 0 : e.url
|
|
1848
|
+
});
|
|
1849
|
+
l = URL.createObjectURL(u.data), a = Ba(e);
|
|
1850
|
+
}
|
|
1851
|
+
const r = {
|
|
1852
|
+
name: a,
|
|
1853
|
+
blobUrl: l
|
|
1854
|
+
}, n = document.createElement("a");
|
|
1855
|
+
n.href = r.blobUrl, n.download = r.name, n.style.display = "none", document.body.appendChild(n), n.click(), setTimeout(() => {
|
|
1856
|
+
document.body.removeChild(n);
|
|
1857
|
+
}, 100);
|
|
1858
|
+
}, ss = (e, l) => {
|
|
1859
|
+
var r;
|
|
1860
|
+
if (Object.values(l).length === 0) return;
|
|
1861
|
+
let a = e;
|
|
1862
|
+
return Object.values(l).find((n) => {
|
|
1863
|
+
var u, t, o;
|
|
1864
|
+
return ((u = n == null ? void 0 : n.toString()) == null ? void 0 : u.includes(".txt")) || ((t = n == null ? void 0 : n.toString()) == null ? void 0 : t.includes(".cpt")) || ((o = n == null ? void 0 : n.toString()) == null ? void 0 : o.includes(".obj"));
|
|
1865
|
+
}) ? a = [...e, En.value] : (r = s == null ? void 0 : s.config) != null && r.allowMove && (a = [...e, { label: "迁移" }]), a;
|
|
1866
|
+
}, os = (e, l = {}) => [...e == null ? void 0 : e.values()].filter((a) => Object.keys(l).every((r) => {
|
|
1867
|
+
var t;
|
|
1868
|
+
const n = a[r], u = (t = l[r]) == null ? void 0 : t.toLowerCase();
|
|
1869
|
+
return u && n && typeof n == "string" ? n.toLowerCase().includes(u) : !0;
|
|
1870
|
+
})), is = () => {
|
|
1871
|
+
Ve.value = !0;
|
|
1872
|
+
}, Br = G([]), us = async (e, l, a = !1) => {
|
|
1873
|
+
var r;
|
|
1874
|
+
if (e) {
|
|
1875
|
+
if (dl.setTableLoading(!0), Br.value = Object.values(e), e && ((r = Object.values(e)) != null && r.every((n) => !n)))
|
|
1876
|
+
return ne.value = Vl.value;
|
|
1877
|
+
if (a) {
|
|
1878
|
+
ne.value = [...Bl.value.values()].filter((n) => Object.values(n).some((u) => typeof u == "string" ? u == null ? void 0 : u.toLowerCase().includes(l == null ? void 0 : l.toLowerCase()) : !1));
|
|
1879
|
+
return;
|
|
1880
|
+
}
|
|
1881
|
+
ne.value = os(Bl.value, e), dl.setTableLoading(!1);
|
|
1882
|
+
}
|
|
1883
|
+
}, ts = async (e) => {
|
|
1884
|
+
}, Mr = async (e, l, a, r) => {
|
|
1885
|
+
var n, u, t, o, p, b, O, v, x, N, M, F, S, K, J, $, _, L, i, y;
|
|
1886
|
+
if (Le("clickMainKey", a), (r == null ? void 0 : r.isExistChild) === !0) {
|
|
1887
|
+
let h = (n = r == null ? void 0 : r.columnType) == null ? void 0 : n.prop, q = r == null ? void 0 : r.data;
|
|
1888
|
+
if (ya.value = await xa(Ge.value, sessionStorage.getItem("systemKey"), ""), !ya.value) {
|
|
1889
|
+
let X = (o = (t = (u = Ge.value) == null ? void 0 : u.split("/")) == null ? void 0 : t.filter((d, E) => {
|
|
1890
|
+
var ve, W;
|
|
1891
|
+
return E !== ((W = (ve = Ge.value) == null ? void 0 : ve.split("/")) == null ? void 0 : W.length) - 1;
|
|
1892
|
+
})) == null ? void 0 : o.join("/");
|
|
1893
|
+
ya.value = await xa(X, sessionStorage.getItem("systemKey"), "");
|
|
1894
|
+
}
|
|
1895
|
+
let P = (p = ya.value) == null ? void 0 : p.filter((X) => (X == null ? void 0 : X.name) === h);
|
|
1896
|
+
ya.value = P == null ? void 0 : P.map((X) => {
|
|
1897
|
+
var d;
|
|
1898
|
+
return X.compData = (d = X.compData) == null ? void 0 : d.map((E) => {
|
|
1899
|
+
var ve, W;
|
|
1900
|
+
return (E == null ? void 0 : E.key) === "tableContents" && (ve = E == null ? void 0 : E.contents) != null && ve.every((C) => C == null ? void 0 : C.find((R) => R == null ? void 0 : R.id)) && (E.contents = (W = E == null ? void 0 : E.contents) == null ? void 0 : W.filter((C) => (C == null ? void 0 : C[1]) === q)), E;
|
|
1901
|
+
}), X;
|
|
1902
|
+
}), Le("routeUrl", ya.value, {
|
|
1903
|
+
isEdit: !0,
|
|
1904
|
+
routerUrl: Ge.value
|
|
1905
|
+
});
|
|
1906
|
+
return;
|
|
1907
|
+
}
|
|
1908
|
+
if ((r == null ? void 0 : r.data) === "查看" && (e != null && e.every((h) => (h == null ? void 0 : h.url) && (h == null ? void 0 : h.name)))) {
|
|
1909
|
+
let h = ae(e);
|
|
1910
|
+
h = await ((b = ae(h)) == null ? void 0 : b.map(async (P) => {
|
|
1911
|
+
var E, ve, W, C;
|
|
1912
|
+
const X = await Oa({
|
|
1913
|
+
url: P == null ? void 0 : P.url
|
|
1914
|
+
});
|
|
1915
|
+
let d = URL.createObjectURL(X.data);
|
|
1916
|
+
return {
|
|
1917
|
+
name: (P == null ? void 0 : P.name) + "." + ((C = (E = P == null ? void 0 : P.url) == null ? void 0 : E.split(".")) == null ? void 0 : C[((W = (ve = P == null ? void 0 : P.url) == null ? void 0 : ve.split(".")) == null ? void 0 : W.length) - 1]),
|
|
1918
|
+
blobUrl: d
|
|
1919
|
+
};
|
|
1920
|
+
}));
|
|
1921
|
+
let q = await Promise.all(h);
|
|
1922
|
+
ba.value = q, fa.value = !0;
|
|
1923
|
+
}
|
|
1924
|
+
if (ae(B.value), (r == null ? void 0 : r.isMainKey) === !0) {
|
|
1925
|
+
ml.setActiveMenuPath(void 0), dl.setRouteToChildPath(void 0), dl.setFixMenuStatus(!0);
|
|
1926
|
+
let h = (v = (O = s.itemData) == null ? void 0 : O.find((P) => (P == null ? void 0 : P.key) === "contentTableId")) == null ? void 0 : v.contents, q = (N = (x = s.itemData) == null ? void 0 : x.find((P) => (P == null ? void 0 : P.key) === "relatedFilter")) == null ? void 0 : N.index;
|
|
1927
|
+
if (q !== 0) {
|
|
1928
|
+
let P = (F = (M = B.value) == null ? void 0 : M[q]) == null ? void 0 : F.prop;
|
|
1929
|
+
if ((a == null ? void 0 : a[P]) === (r == null ? void 0 : r.data)) {
|
|
1930
|
+
let X = await ia({
|
|
1931
|
+
id: h
|
|
1932
|
+
}), d = ($ = (J = (K = (S = X == null ? void 0 : X.data) == null ? void 0 : S.result) == null ? void 0 : K[0]) == null ? void 0 : J.key) == null ? void 0 : $.pageKey;
|
|
1933
|
+
ml.setActiveMenuPath(d + "/" + (r == null ? void 0 : r.data));
|
|
1934
|
+
} else {
|
|
1935
|
+
let X = await ia({
|
|
1936
|
+
key: {
|
|
1937
|
+
pageKey: ae(Ge).value + "/" + (r == null ? void 0 : r.data),
|
|
1938
|
+
systemKey: sessionStorage.getItem("systemKey")
|
|
1939
|
+
}
|
|
1940
|
+
});
|
|
1941
|
+
((L = (_ = X == null ? void 0 : X.data) == null ? void 0 : _.result) == null ? void 0 : L.length) > 0 && ml.setActiveMenuPath(ae(Ge).value + "/" + (r == null ? void 0 : r.data));
|
|
1942
|
+
}
|
|
1943
|
+
} else {
|
|
1944
|
+
let P = await ia({
|
|
1945
|
+
key: {
|
|
1946
|
+
pageKey: ae(Ge).value + "/" + (r == null ? void 0 : r.data),
|
|
1947
|
+
systemKey: sessionStorage.getItem("systemKey")
|
|
1948
|
+
}
|
|
1949
|
+
});
|
|
1950
|
+
((y = (i = P == null ? void 0 : P.data) == null ? void 0 : i.result) == null ? void 0 : y.length) > 0 && ml.setActiveMenuPath(ae(Ge).value + "/" + (r == null ? void 0 : r.data));
|
|
1951
|
+
}
|
|
1952
|
+
}
|
|
1953
|
+
}, ds = () => {
|
|
1954
|
+
fa.value = !1;
|
|
1955
|
+
}, cs = (e) => {
|
|
1956
|
+
Le("rowClick", e);
|
|
1957
|
+
};
|
|
1958
|
+
$l(
|
|
1959
|
+
() => s.changedContent,
|
|
1960
|
+
() => {
|
|
1961
|
+
var a, r;
|
|
1962
|
+
if (!s.changedContent) return;
|
|
1963
|
+
let e = (a = ne.value) == null ? void 0 : a.map((n) => {
|
|
1964
|
+
var u;
|
|
1965
|
+
return n.id === ((u = s.changedContent) == null ? void 0 : u.id) && (n = {
|
|
1966
|
+
...s.changedContent,
|
|
1967
|
+
id: s.changedContent.newId ? s.changedContent.newId : s.changedContent.id
|
|
1968
|
+
}, delete n.newId), n;
|
|
1969
|
+
});
|
|
1970
|
+
const l = (r = s.itemData) == null ? void 0 : r.map((n) => ((n == null ? void 0 : n.key) === "tableContents" && (n.contents = e), n));
|
|
1971
|
+
ne.value = e, Le("contentChange", {
|
|
1972
|
+
contents: l,
|
|
1973
|
+
index: s.index
|
|
1974
|
+
}), Le("change", {
|
|
1975
|
+
content: e,
|
|
1976
|
+
index: s == null ? void 0 : s.index,
|
|
1977
|
+
buttonName: "",
|
|
1978
|
+
id: s == null ? void 0 : s.index
|
|
1979
|
+
});
|
|
1980
|
+
},
|
|
1981
|
+
{ deep: !0, immediate: !0 }
|
|
1982
|
+
);
|
|
1983
|
+
const ps = () => {
|
|
1984
|
+
}, fs = async () => {
|
|
1985
|
+
const e = Ge.value, l = sessionStorage.getItem("systemKey"), a = await xa(e, l, ""), r = (a == null ? void 0 : a.find((o) => (o == null ? void 0 : o.name) === "方法明细")) || (a == null ? void 0 : a[0]), n = (r == null ? void 0 : r.compData) || [], u = n == null ? void 0 : n.find((o) => {
|
|
1986
|
+
const p = o == null ? void 0 : o.key;
|
|
1987
|
+
return p === "formContent" || p === "tableContents";
|
|
1988
|
+
});
|
|
1989
|
+
return u == null ? void 0 : u.contents;
|
|
1990
|
+
}, hr = async () => `Bearer ${to.get("access-token")}`, hs = async (e, { token: l, inputData: a } = {}) => await ga.post(e, a, {
|
|
1991
|
+
headers: {
|
|
1992
|
+
Authorization: l
|
|
1993
|
+
}
|
|
1994
|
+
}).catch((n) => (ml.setImportLoading(!1), Promise.reject(n))), ys = (e) => {
|
|
1995
|
+
var r;
|
|
1996
|
+
let l = {};
|
|
1997
|
+
const a = [];
|
|
1998
|
+
return l.form = {}, (r = ae(e)) == null || r.forEach((n, u) => {
|
|
1999
|
+
var t, o, p, b, O, v, x, N, M, F, S, K, J, $;
|
|
2000
|
+
if ((n == null ? void 0 : n.comp) === "Table") {
|
|
2001
|
+
(o = (t = n == null ? void 0 : n.compData) == null ? void 0 : t.find((y) => (y == null ? void 0 : y.key) === "header")) == null || o.contents;
|
|
2002
|
+
let _ = (O = (b = (p = n == null ? void 0 : n.compData) == null ? void 0 : p.find((y) => (y == null ? void 0 : y.key) === "tableContents")) == null ? void 0 : b.contents) == null ? void 0 : O.map((y) => y.slice(1));
|
|
2003
|
+
(F = (M = (N = (x = (v = n == null ? void 0 : n.compData) == null ? void 0 : v.find((y) => (y == null ? void 0 : y.key) === "header")) == null ? void 0 : x.contents) == null ? void 0 : N[0]) == null ? void 0 : M[0]) == null || F.label;
|
|
2004
|
+
let L = (K = (S = n == null ? void 0 : n.compData) == null ? void 0 : S.find((y) => (y == null ? void 0 : y.key) === "header")) == null ? void 0 : K.contents, i = [];
|
|
2005
|
+
_ == null || _.forEach((y) => {
|
|
2006
|
+
let h = [];
|
|
2007
|
+
y == null || y.forEach((q, P) => {
|
|
2008
|
+
var d;
|
|
2009
|
+
let X = {};
|
|
2010
|
+
((d = L[P]) == null ? void 0 : d.label) !== "操作" && (X[L[P].label] = q, h.push(X));
|
|
2011
|
+
}), i.push(h);
|
|
2012
|
+
}), l[n.name] = i;
|
|
2013
|
+
} else {
|
|
2014
|
+
const _ = ($ = (J = n.compData) == null ? void 0 : J.find((L) => (L == null ? void 0 : L.key) === "formContent")) == null ? void 0 : $.contents;
|
|
2015
|
+
_ == null || _.forEach((L) => {
|
|
2016
|
+
var i, y;
|
|
2017
|
+
if (L.prop !== "") {
|
|
2018
|
+
let h = L == null ? void 0 : L.value;
|
|
2019
|
+
Array.isArray(h) ? h = ((i = h == null ? void 0 : h[0]) == null ? void 0 : i.oldUrl) || "http://222.92.178.198:62001/" + ((y = h == null ? void 0 : h[0]) == null ? void 0 : y.url) : h = h.toString(), L = {
|
|
2020
|
+
key: (L == null ? void 0 : L.prop) ?? (L == null ? void 0 : L.label),
|
|
2021
|
+
value: h
|
|
2022
|
+
}, a.push(L);
|
|
2023
|
+
}
|
|
2024
|
+
});
|
|
2025
|
+
}
|
|
2026
|
+
}), l.form = To(a), l;
|
|
2027
|
+
}, vs = (e) => {
|
|
2028
|
+
const l = [], a = (r) => {
|
|
2029
|
+
r && typeof r == "object" && !Array.isArray(r) ? Object.values(r).forEach(a) : l.push(r);
|
|
2030
|
+
};
|
|
2031
|
+
return a(e), l;
|
|
2032
|
+
}, gs = async (e, l, a) => {
|
|
2033
|
+
var L, i, y, h, q, P, X, d, E, ve, W;
|
|
2034
|
+
ml.setImportLoading(!0), dl.setFreshContent(!1);
|
|
2035
|
+
let r = await fs().catch((C) => (ml.setImportLoading(!1), Promise.reject(C)));
|
|
2036
|
+
r = r == null ? void 0 : r.filter((C) => {
|
|
2037
|
+
var R;
|
|
2038
|
+
return ((R = C == null ? void 0 : C.find((te) => te == null ? void 0 : te.id)) == null ? void 0 : R.id) === (l == null ? void 0 : l.id);
|
|
2039
|
+
});
|
|
2040
|
+
let n = yn([(L = B.value) == null ? void 0 : L.filter((C) => (C == null ? void 0 : C.label) !== "操作")]);
|
|
2041
|
+
const u = (y = (i = mo(r, n)) == null ? void 0 : i[0]) == null ? void 0 : y.find((C) => {
|
|
2042
|
+
const R = C == null ? void 0 : C.key;
|
|
2043
|
+
return R === "Interface" || R === "方法体";
|
|
2044
|
+
}), t = u == null ? void 0 : u.value;
|
|
2045
|
+
if (!t) {
|
|
2046
|
+
console.log("未搜索到isMain, 缺少算法执行接口"), ml.setImportLoading(!1);
|
|
2047
|
+
return;
|
|
2048
|
+
}
|
|
2049
|
+
const o = B.value ? yn([B.value]) : [], p = o.find((C) => {
|
|
2050
|
+
const R = C == null ? void 0 : C.prop;
|
|
2051
|
+
return R === "Input1" || R === "输入数据.输入1" || R === "样本输入数据";
|
|
2052
|
+
}), b = p == null ? void 0 : p.prop;
|
|
2053
|
+
let O = l == null ? void 0 : l[b];
|
|
2054
|
+
const v = await hr().catch((C) => (ml.setImportLoading(!1), Promise.reject(C)));
|
|
2055
|
+
let x = !0, N = "";
|
|
2056
|
+
(h = B.value) == null || h.forEach((C) => {
|
|
2057
|
+
(C == null ? void 0 : C.prop) === b && (x = !!(C != null && C.childPath), N = C == null ? void 0 : C.childPath);
|
|
2058
|
+
});
|
|
2059
|
+
let M = "";
|
|
2060
|
+
if (x) {
|
|
2061
|
+
let C = (P = (q = B.value) == null ? void 0 : q.find((_e) => (_e == null ? void 0 : _e.isMainKey) === !0)) == null ? void 0 : P.prop;
|
|
2062
|
+
M = l == null ? void 0 : l[C];
|
|
2063
|
+
let R = N == null ? void 0 : N.split(he), te = [];
|
|
2064
|
+
R == null || R.forEach((_e, Pe) => {
|
|
2065
|
+
(R == null ? void 0 : R.length) - 1 === Pe && te.push(M), te.push(_e);
|
|
2066
|
+
}), te = te == null ? void 0 : te[0];
|
|
2067
|
+
let ue = await xa(te, sessionStorage.getItem("systemKey"), ""), se = ue == null ? void 0 : ue.filter((_e) => (_e == null ? void 0 : _e.name) === b);
|
|
2068
|
+
se = se == null ? void 0 : se.map((_e) => {
|
|
2069
|
+
var Pe;
|
|
2070
|
+
return _e.compData = (Pe = _e == null ? void 0 : _e.compData) == null ? void 0 : Pe.map((Y) => {
|
|
2071
|
+
var pe;
|
|
2072
|
+
return (Y == null ? void 0 : Y.key) === "tableContents" && (Y.contents = (pe = Y == null ? void 0 : Y.contents) == null ? void 0 : pe.filter((ze) => (ze == null ? void 0 : ze[1]) === (l == null ? void 0 : l[b]))), Y;
|
|
2073
|
+
}), _e;
|
|
2074
|
+
}), (!se || (se == null ? void 0 : se.length) === 0) && (se = ue, se = se == null ? void 0 : se.map((_e) => {
|
|
2075
|
+
var Pe;
|
|
2076
|
+
return _e.compData = (Pe = _e == null ? void 0 : _e.compData) == null ? void 0 : Pe.map((Y) => {
|
|
2077
|
+
var pe;
|
|
2078
|
+
return (Y == null ? void 0 : Y.key) === "tableContents" && (Y.contents = (pe = Y == null ? void 0 : Y.contents) == null ? void 0 : pe.filter((ze) => {
|
|
2079
|
+
var ge, ke;
|
|
2080
|
+
return (ze == null ? void 0 : ze[1]) === (l == null ? void 0 : l[(ke = (ge = B == null ? void 0 : B.value) == null ? void 0 : ge[0]) == null ? void 0 : ke.prop]);
|
|
2081
|
+
})), Y;
|
|
2082
|
+
}), _e;
|
|
2083
|
+
})), O = ys(se);
|
|
2084
|
+
}
|
|
2085
|
+
const F = await hs(t, {
|
|
2086
|
+
token: v,
|
|
2087
|
+
inputData: O
|
|
2088
|
+
}).catch((C) => (ml.setImportLoading(!1), Promise.reject(C))), S = (X = F == null ? void 0 : F.data) == null ? void 0 : X.data, K = o.find((C) => (C == null ? void 0 : C.prop) === "Output1"), J = K == null ? void 0 : K.prop;
|
|
2089
|
+
let $ = [], _ = [];
|
|
2090
|
+
if (S && ((d = Object.values(S)) == null ? void 0 : d.length) > 0) {
|
|
2091
|
+
let C = [];
|
|
2092
|
+
const R = new FormData(), te = (E = vs(S)) == null ? void 0 : E.map(async (se) => {
|
|
2093
|
+
var _e, Pe;
|
|
2094
|
+
if (!Array.isArray(se) && (se != null && se.includes("http"))) {
|
|
2095
|
+
let Y = await ga.get(se, { responseType: "blob" }), pe = (Pe = se == null ? void 0 : se.split("/")) == null ? void 0 : Pe[((_e = se == null ? void 0 : se.split("/")) == null ? void 0 : _e.length) - 1];
|
|
2096
|
+
R.append("files", Y.data, pe);
|
|
2097
|
+
} else
|
|
2098
|
+
C.push(se);
|
|
2099
|
+
});
|
|
2100
|
+
if (await Promise.all(te), !So(R)) {
|
|
2101
|
+
let se = await _o(R), _e = (W = (ve = se == null ? void 0 : se.data) == null ? void 0 : ve.result) == null ? void 0 : W.map((Pe) => {
|
|
2102
|
+
var Y, pe, ze, ge, ke, je;
|
|
2103
|
+
return {
|
|
2104
|
+
name: (je = (ke = (ge = (Y = Pe == null ? void 0 : Pe.url) == null ? void 0 : Y.split("/")) == null ? void 0 : ge[((ze = (pe = Pe == null ? void 0 : Pe.url) == null ? void 0 : pe.split("/")) == null ? void 0 : ze.length) - 1]) == null ? void 0 : ke.split(".")) == null ? void 0 : je[0],
|
|
2105
|
+
url: Pe == null ? void 0 : Pe.url
|
|
2106
|
+
};
|
|
2107
|
+
});
|
|
2108
|
+
C = [...C, ..._e];
|
|
2109
|
+
}
|
|
2110
|
+
let ue = {};
|
|
2111
|
+
for (let se in l)
|
|
2112
|
+
se !== "id" && (ue[se] = l[se]);
|
|
2113
|
+
ue[J] = C, _.push({
|
|
2114
|
+
id: l == null ? void 0 : l.id,
|
|
2115
|
+
value: {
|
|
2116
|
+
tableData: ue
|
|
2117
|
+
}
|
|
2118
|
+
});
|
|
2119
|
+
}
|
|
2120
|
+
(_ == null ? void 0 : _.length) > 0 && await uo({
|
|
2121
|
+
dataList: _
|
|
2122
|
+
}), ($ == null ? void 0 : $.length) > 0 && await cn({
|
|
2123
|
+
dataList: $
|
|
2124
|
+
}), Ka(!0), ml.setImportLoading(!1), dl.setFreshContent(!0);
|
|
2125
|
+
}, Fr = (e, l) => (e = e == null ? void 0 : e.map((a) => {
|
|
2126
|
+
var r, n;
|
|
2127
|
+
return a != null && a.children && ((r = a.children) != null && r.find((u) => u.id === (l == null ? void 0 : l.id)) ? a.children = (n = a.children) == null ? void 0 : n.filter((u) => (u == null ? void 0 : u.id) !== (l == null ? void 0 : l.id)) : a.children = Fr(a.children, l)), a;
|
|
2128
|
+
}), e), er = G(!1), bs = () => {
|
|
2129
|
+
er.value = !0;
|
|
2130
|
+
}, ks = (e) => {
|
|
2131
|
+
if (er.value = !1, e) {
|
|
2132
|
+
const l = {
|
|
2133
|
+
name: e.name || "capture.jpg",
|
|
2134
|
+
url: URL.createObjectURL(e),
|
|
2135
|
+
// 供预览
|
|
2136
|
+
raw: e
|
|
2137
|
+
};
|
|
2138
|
+
aa.value.push(l);
|
|
2139
|
+
}
|
|
2140
|
+
}, cl = za({
|
|
2141
|
+
title: "迁移至",
|
|
2142
|
+
show: !1,
|
|
2143
|
+
width: "20%",
|
|
2144
|
+
selectRow: null,
|
|
2145
|
+
from: s == null ? void 0 : s.index,
|
|
2146
|
+
to: null,
|
|
2147
|
+
contents: [],
|
|
2148
|
+
formRules: {
|
|
2149
|
+
groupName: [
|
|
2150
|
+
{ required: !0, message: "输入不能为空", trigger: "blur" },
|
|
2151
|
+
{
|
|
2152
|
+
validator: (e, l, a) => {
|
|
2153
|
+
l === (s == null ? void 0 : s.index) ? a(new Error("选择源不能和目标源一致")) : a();
|
|
2154
|
+
}
|
|
2155
|
+
}
|
|
2156
|
+
]
|
|
2157
|
+
},
|
|
2158
|
+
buttonValue: [{ label: "取消", background: "#999999", color: "var(--ssbutton-theme-color)" }, {
|
|
2159
|
+
label: "确认",
|
|
2160
|
+
background: "var(--ssbutton-theme-bg)",
|
|
2161
|
+
color: "var(--ssbutton-theme-color)"
|
|
2162
|
+
}]
|
|
2163
|
+
}), ms = () => {
|
|
2164
|
+
cl.show = !1;
|
|
2165
|
+
}, Ss = (e) => {
|
|
2166
|
+
var l, a;
|
|
2167
|
+
if ((e == null ? void 0 : e.buttonName) === "取消") return cl.show = !1;
|
|
2168
|
+
cl.to = e == null ? void 0 : e.content, !(!(s != null && s.index) || !((l = cl.to) != null && l.groupName)) && (s == null ? void 0 : s.index) !== ((a = cl.to) == null ? void 0 : a.groupName) && (Le("change", {
|
|
2169
|
+
buttonName: "迁移",
|
|
2170
|
+
value: {
|
|
2171
|
+
from: cl.from,
|
|
2172
|
+
to: cl.to,
|
|
2173
|
+
data: cl.selectRow
|
|
2174
|
+
}
|
|
2175
|
+
}), cl.show = !1);
|
|
2176
|
+
}, _s = (e) => {
|
|
2177
|
+
if (e) {
|
|
2178
|
+
if (!ja.validateFileSize(e.raw)) {
|
|
2179
|
+
nl.warning(`文件大小不能超过 ${jn.value.maxSize}MB`);
|
|
2180
|
+
return;
|
|
2181
|
+
}
|
|
2182
|
+
if (!ja.validateFileType(e.raw)) {
|
|
2183
|
+
nl.warning("请上传图片文件");
|
|
2184
|
+
return;
|
|
2185
|
+
}
|
|
2186
|
+
}
|
|
2187
|
+
}, As = async () => {
|
|
2188
|
+
var e, l;
|
|
2189
|
+
if (aa.value.length === 0) {
|
|
2190
|
+
nl.warning("请先选择要上传的图片");
|
|
2191
|
+
return;
|
|
2192
|
+
}
|
|
2193
|
+
ta.value = !0;
|
|
2194
|
+
try {
|
|
2195
|
+
const a = aa.value.map(async (v) => {
|
|
2196
|
+
var M;
|
|
2197
|
+
const x = new FormData();
|
|
2198
|
+
x.append("file", v.raw, v.name);
|
|
2199
|
+
const N = await xo(x);
|
|
2200
|
+
return ((M = N == null ? void 0 : N.data) == null ? void 0 : M.result) || {
|
|
2201
|
+
name: v.name,
|
|
2202
|
+
url: "",
|
|
2203
|
+
fileName: v.name
|
|
2204
|
+
};
|
|
2205
|
+
}), r = await Promise.all(a), n = ja.extractTableHeaders(B.value), u = r.map((v) => ({
|
|
2206
|
+
name: (v == null ? void 0 : v.fileName) || (v == null ? void 0 : v.name),
|
|
2207
|
+
url: (v == null ? void 0 : v.url) || ""
|
|
2208
|
+
})), t = await ja.recognize(u, n), o = Array.isArray(t == null ? void 0 : t.result) ? t.result : [];
|
|
2209
|
+
if (o.length === 0) {
|
|
2210
|
+
nl.warning("OCR识别未返回有效数据"), ta.value = !1;
|
|
2211
|
+
return;
|
|
2212
|
+
}
|
|
2213
|
+
const p = /* @__PURE__ */ new Set(), b = [];
|
|
2214
|
+
o.forEach((v, x) => {
|
|
2215
|
+
const N = v != null && v.数据 && typeof (v == null ? void 0 : v.数据) == "object" ? v.数据 : {}, M = {
|
|
2216
|
+
_index: x,
|
|
2217
|
+
_certType: (v == null ? void 0 : v.证书类型) || "",
|
|
2218
|
+
_certNo: (v == null ? void 0 : v.证书编号) || ""
|
|
2219
|
+
};
|
|
2220
|
+
Object.entries(N).forEach(([F, S]) => {
|
|
2221
|
+
Array.isArray(S) && S.length >= 2 ? (M[F] = S[0] ?? "", M[`${F}_accuracy`] = S[1] ?? 0, p.add(F)) : (M[F] = S ?? "", M[`${F}_accuracy`] = 0, p.add(F));
|
|
2222
|
+
}), b.push(M);
|
|
2223
|
+
});
|
|
2224
|
+
const O = [];
|
|
2225
|
+
p.forEach((v) => {
|
|
2226
|
+
O.push({
|
|
2227
|
+
prop: v,
|
|
2228
|
+
label: v,
|
|
2229
|
+
editable: !0,
|
|
2230
|
+
minWidth: 120
|
|
2231
|
+
}), O.push({
|
|
2232
|
+
prop: `${v}_accuracy`,
|
|
2233
|
+
label: `${v}准确率`,
|
|
2234
|
+
editable: !1,
|
|
2235
|
+
minWidth: 100,
|
|
2236
|
+
isAccuracy: !0
|
|
2237
|
+
});
|
|
2238
|
+
}), ur.value = O, Sa.value = b, tr.value = r, dr.value = t, Ya.value = !1, aa.value = [], ta.value = !1, ir.value = !0;
|
|
2239
|
+
} catch (a) {
|
|
2240
|
+
console.error("OCR处理失败:", a), nl.error(((l = (e = a == null ? void 0 : a.response) == null ? void 0 : e.data) == null ? void 0 : l.message) || "OCR识别失败,请重试"), ta.value = !1;
|
|
2241
|
+
}
|
|
2242
|
+
}, Cs = () => {
|
|
2243
|
+
var M, F;
|
|
2244
|
+
const e = tr.value, l = dr.value, a = Sa.value;
|
|
2245
|
+
if (!a || a.length === 0) {
|
|
2246
|
+
nl.warning("暂无数据可添加");
|
|
2247
|
+
return;
|
|
2248
|
+
}
|
|
2249
|
+
const r = (M = fn(B.value) || []) == null ? void 0 : M.filter((S) => (S == null ? void 0 : S.type) !== "operate" && (S == null ? void 0 : S.label) !== "操作" && (S == null ? void 0 : S.prop) !== "operate"), n = /* @__PURE__ */ new Map(), u = /* @__PURE__ */ new Map(), t = (F = r == null ? void 0 : r.find((S) => (S == null ? void 0 : S.label) === "OCR图片")) == null ? void 0 : F.prop;
|
|
2250
|
+
r == null || r.forEach((S) => {
|
|
2251
|
+
S != null && S.label && (S != null && S.prop) && (n.set(S.label, S.prop), u.set(S.prop, S.label));
|
|
2252
|
+
});
|
|
2253
|
+
const o = Date.now(), p = (S) => String(o * 1e3 + S);
|
|
2254
|
+
let b = 0, O = 0;
|
|
2255
|
+
const v = [], x = [];
|
|
2256
|
+
a.forEach((S, K) => {
|
|
2257
|
+
const J = { id: p(K), _isOCRRow: !0, _ocrTableId: s == null ? void 0 : s.index };
|
|
2258
|
+
for (const [$, _] of n.entries())
|
|
2259
|
+
Object.prototype.hasOwnProperty.call(S, $) && (J[_] = S[$]);
|
|
2260
|
+
if (t && e[K]) {
|
|
2261
|
+
const $ = e[K];
|
|
2262
|
+
J[t] = [{
|
|
2263
|
+
...$,
|
|
2264
|
+
name: ($ == null ? void 0 : $.fileName) || ($ == null ? void 0 : $.name),
|
|
2265
|
+
url: ($ == null ? void 0 : $.url) || ""
|
|
2266
|
+
}];
|
|
2267
|
+
}
|
|
2268
|
+
if (ra.value && ra.value.length > 0) {
|
|
2269
|
+
const $ = {};
|
|
2270
|
+
let _ = !1;
|
|
2271
|
+
if (ra.value.forEach((L) => {
|
|
2272
|
+
const i = n.get(L);
|
|
2273
|
+
i && J[i] !== void 0 && J[i] !== null && J[i] !== "" && ($[i] = J[i], _ = !0);
|
|
2274
|
+
}), _) {
|
|
2275
|
+
const L = ne.value.find((i) => Object.entries($).every(([y, h]) => {
|
|
2276
|
+
const q = i[y];
|
|
2277
|
+
return String(q) === String(h) || q === h;
|
|
2278
|
+
}));
|
|
2279
|
+
if (L) {
|
|
2280
|
+
for (const [y, h] of n.entries())
|
|
2281
|
+
Object.prototype.hasOwnProperty.call(J, h) && h !== "_isOCRRow" && h !== "_ocrTableId" && h !== "id" && (L[h] = J[h]);
|
|
2282
|
+
if (t && e[K]) {
|
|
2283
|
+
const y = e[K];
|
|
2284
|
+
L[t] = [{
|
|
2285
|
+
...y,
|
|
2286
|
+
name: (y == null ? void 0 : y.fileName) || (y == null ? void 0 : y.name),
|
|
2287
|
+
url: (y == null ? void 0 : y.url) || ""
|
|
2288
|
+
}];
|
|
2289
|
+
}
|
|
2290
|
+
const i = Vl.value.find((y) => y.id === L.id);
|
|
2291
|
+
if (i) {
|
|
2292
|
+
for (const [y, h] of n.entries())
|
|
2293
|
+
Object.prototype.hasOwnProperty.call(J, h) && h !== "_isOCRRow" && h !== "_ocrTableId" && h !== "id" && (i[h] = J[h]);
|
|
2294
|
+
if (t && e[K]) {
|
|
2295
|
+
const y = e[K];
|
|
2296
|
+
i[t] = [{
|
|
2297
|
+
...y,
|
|
2298
|
+
name: (y == null ? void 0 : y.fileName) || (y == null ? void 0 : y.name),
|
|
2299
|
+
url: (y == null ? void 0 : y.url) || ""
|
|
2300
|
+
}];
|
|
2301
|
+
}
|
|
2302
|
+
}
|
|
2303
|
+
Bl.value && Bl.value.set(L.id, L), x.push(JSON.parse(JSON.stringify(L))), b++;
|
|
2304
|
+
return;
|
|
2305
|
+
}
|
|
2306
|
+
}
|
|
2307
|
+
}
|
|
2308
|
+
v.push(J), O++;
|
|
2309
|
+
}), x.length > 0 && (ne.value = [...ne.value || []]), v.length > 0 && (ne.value = [...ne.value || [], ...v], Vl.value = [...Vl.value || [], ...v], v.forEach((S) => {
|
|
2310
|
+
var K, J;
|
|
2311
|
+
return (J = (K = Bl.value) == null ? void 0 : K.set) == null ? void 0 : J.call(K, S.id, S);
|
|
2312
|
+
})), $a.value = ne.value;
|
|
2313
|
+
let N = "";
|
|
2314
|
+
b > 0 && O > 0 ? N = `成功匹配替换 ${b} 条数据,新增 ${O} 条OCR识别数据` : b > 0 ? N = `成功匹配替换 ${b} 条数据` : N = `成功添加 ${O} 条OCR识别数据`, nl.success(N), x.length > 0 && Le("change", {
|
|
2315
|
+
buttonName: "编辑",
|
|
2316
|
+
singleContent: x,
|
|
2317
|
+
content: ne.value,
|
|
2318
|
+
index: s == null ? void 0 : s.index,
|
|
2319
|
+
parentTableId: s == null ? void 0 : s.parentTableId,
|
|
2320
|
+
column: B.value
|
|
2321
|
+
}), v.length > 0 && Le("change", {
|
|
2322
|
+
buttonName: "OCR批量新增",
|
|
2323
|
+
content: ne.value,
|
|
2324
|
+
index: s == null ? void 0 : s.index,
|
|
2325
|
+
parentTableId: s == null ? void 0 : s.parentTableId,
|
|
2326
|
+
column: B.value,
|
|
2327
|
+
ocrRows: v,
|
|
2328
|
+
uploadedFiles: e,
|
|
2329
|
+
ocrResult: l,
|
|
2330
|
+
matchedCount: b,
|
|
2331
|
+
newCount: O
|
|
2332
|
+
}), yr();
|
|
2333
|
+
}, yr = () => {
|
|
2334
|
+
ir.value = !1, Sa.value = [], ur.value = [], tr.value = [], dr.value = null, ra.value = [];
|
|
2335
|
+
}, Ts = (e, l, a) => {
|
|
2336
|
+
Sa.value[e] && (Sa.value[e][l] = a);
|
|
2337
|
+
}, Os = (e, l) => {
|
|
2338
|
+
if (l)
|
|
2339
|
+
ra.value.includes(e) || ra.value.push(e);
|
|
2340
|
+
else {
|
|
2341
|
+
const a = ra.value.indexOf(e);
|
|
2342
|
+
a > -1 && ra.value.splice(a, 1);
|
|
2343
|
+
}
|
|
2344
|
+
}, xs = (e) => e == null || e === 0 ? "-" : `${(Number(e) * 100).toFixed(1)}%`, ws = (e) => {
|
|
2345
|
+
if (e == null || e === 0)
|
|
2346
|
+
return "#909399";
|
|
2347
|
+
const l = Number(e);
|
|
2348
|
+
return l >= 0.9 ? "#67c23a" : l >= 0.7 ? "#e6a23c" : "#f56c6c";
|
|
2349
|
+
}, Kr = () => {
|
|
2350
|
+
Ya.value = !1, aa.value = [], Ln.value = null;
|
|
2351
|
+
}, Us = async (e) => {
|
|
2352
|
+
Dr.value = e == null ? void 0 : e.name;
|
|
2353
|
+
const l = e.raw;
|
|
2354
|
+
or.value = URL.createObjectURL(l), Ia.value = [{
|
|
2355
|
+
name: Dr.value,
|
|
2356
|
+
blobUrl: or.value
|
|
2357
|
+
}], Za.value = !0;
|
|
2358
|
+
}, Ds = async (e) => {
|
|
2359
|
+
const l = Xs(e);
|
|
2360
|
+
if (!l || l.length === 0) {
|
|
2361
|
+
nl.warning("暂无图片");
|
|
2362
|
+
return;
|
|
2363
|
+
}
|
|
2364
|
+
if (l.length === 1) {
|
|
2365
|
+
await Rr(l[0]);
|
|
2366
|
+
return;
|
|
2367
|
+
}
|
|
2368
|
+
try {
|
|
2369
|
+
const a = Sr.service({
|
|
2370
|
+
lock: !0,
|
|
2371
|
+
text: "Loading",
|
|
2372
|
+
background: "rgba(0, 0, 0, 0.7)"
|
|
2373
|
+
}), r = await Promise.all(
|
|
2374
|
+
l.map(async (n) => {
|
|
2375
|
+
const u = await Oa(n), t = URL.createObjectURL(u.data);
|
|
2376
|
+
return {
|
|
2377
|
+
name: fr(n),
|
|
2378
|
+
blobUrl: t
|
|
2379
|
+
};
|
|
2380
|
+
})
|
|
2381
|
+
);
|
|
2382
|
+
a.close(), Ia.value = r, Za.value = !0;
|
|
2383
|
+
} catch (a) {
|
|
2384
|
+
console.error("预览图片失败:", a), nl.error("预览图片失败,请重试");
|
|
2385
|
+
}
|
|
2386
|
+
}, Es = () => {
|
|
2387
|
+
Za.value = !1, Ia.value = [], or.value = "";
|
|
2388
|
+
}, Ls = (e) => {
|
|
2389
|
+
aa.value = aa.value.filter((l, a) => a !== e);
|
|
2390
|
+
}, lr = async (e, l, a) => {
|
|
2391
|
+
var r, n, u, t, o, p, b, O, v, x, N, M, F, S, K;
|
|
2392
|
+
if (ea.value = "", Qa.value = !0, Ha.value = !0, Le("onButtonClick", e, l), ye.value = [], e === "删除")
|
|
2393
|
+
bn.confirm("是否确认删除", "温馨提示", {
|
|
2394
|
+
confirmButtonText: "确认",
|
|
2395
|
+
cancelButtonText: "取消",
|
|
2396
|
+
type: "warning"
|
|
2397
|
+
}).then(() => {
|
|
2398
|
+
var J, $;
|
|
2399
|
+
(J = ne.value) != null && J.find((_) => (_ == null ? void 0 : _.id) === (l == null ? void 0 : l.id)) ? ne.value = ($ = ae(ne.value)) == null ? void 0 : $.filter((_) => (_ == null ? void 0 : _.id) !== (l == null ? void 0 : l.id)) : ne.value = Fr(ae(ne.value), l), si($a.value, Pa.value, l == null ? void 0 : l.id), dl.setTableLoading(s == null ? void 0 : s.index), Le("change", {
|
|
2400
|
+
content: ne.value,
|
|
2401
|
+
singleContent: l,
|
|
2402
|
+
index: s == null ? void 0 : s.index,
|
|
2403
|
+
type: "delete",
|
|
2404
|
+
buttonName: e,
|
|
2405
|
+
column: B.value
|
|
2406
|
+
});
|
|
2407
|
+
});
|
|
2408
|
+
else if (e === "批量删除") {
|
|
2409
|
+
if (((r = Xl.value) == null ? void 0 : r.length) === 0)
|
|
2410
|
+
return nl.warning("请先勾选操作的数据");
|
|
2411
|
+
bn.confirm("是否确认删除", "温馨提示", {
|
|
2412
|
+
confirmButtonText: "确认",
|
|
2413
|
+
cancelButtonText: "取消",
|
|
2414
|
+
type: "warning"
|
|
2415
|
+
}).then(
|
|
2416
|
+
() => {
|
|
2417
|
+
var $, _;
|
|
2418
|
+
const J = ($ = Xl.value) == null ? void 0 : $.map((L) => L.id);
|
|
2419
|
+
ne.value = (_ = ae(ne.value)) == null ? void 0 : _.filter((L) => !(J != null && J.includes(L.id))), dl.setTableLoading(s == null ? void 0 : s.index), Le("change", {
|
|
2420
|
+
content: ne.value,
|
|
2421
|
+
singleContent: null,
|
|
2422
|
+
selectItems: Xl.value,
|
|
2423
|
+
index: s == null ? void 0 : s.index,
|
|
2424
|
+
type: "batchDelete",
|
|
2425
|
+
buttonName: e,
|
|
2426
|
+
column: B.value
|
|
2427
|
+
});
|
|
2428
|
+
}
|
|
2429
|
+
);
|
|
2430
|
+
} else if (e === "复制新增") {
|
|
2431
|
+
Pl.value = "新增";
|
|
2432
|
+
const J = ae(l), $ = (n = B.value) == null ? void 0 : n.find((i) => i == null ? void 0 : i.isMainKey), _ = $ || ((u = B.value) == null ? void 0 : u[0]), L = (t = Fl.value) == null ? void 0 : t.find((i) => (i == null ? void 0 : i.label) === "新建");
|
|
2433
|
+
await Jr(!0, L, { data: J, firstCol: _ });
|
|
2434
|
+
} else if (e === "新增")
|
|
2435
|
+
Pl.value = "新增", Fa(""), la.value = !0;
|
|
2436
|
+
else if (e === "编辑")
|
|
2437
|
+
Pl.value = "编辑", Fa(l), la.value = !0;
|
|
2438
|
+
else if (e === "查看")
|
|
2439
|
+
Pl.value = "查看", Fa(l), Qa.value = !1, Ha.value = !1, la.value = !0;
|
|
2440
|
+
else if (e === "查看三维模型") {
|
|
2441
|
+
const J = {};
|
|
2442
|
+
for (let _ in l)
|
|
2443
|
+
_ !== "id" && (J[_] = l[_]);
|
|
2444
|
+
let $ = (o = Object.values(J)) == null ? void 0 : o[1];
|
|
2445
|
+
Dn.setTableShowThree($);
|
|
2446
|
+
} else if (((p = a == null ? void 0 : a.extra) == null ? void 0 : p.type) === "modelExample")
|
|
2447
|
+
Pl.value = e, Xa.value = !0;
|
|
2448
|
+
else if (e === "新建") {
|
|
2449
|
+
let J = ka.value, $ = [];
|
|
2450
|
+
for (let h in J)
|
|
2451
|
+
h != null && h.includes(`loading${((b = _a.value) == null ? void 0 : b.account) || ((O = _a.value) == null ? void 0 : O.账号)}`) && ($ = [...$, ...h]);
|
|
2452
|
+
let _ = [];
|
|
2453
|
+
for (let h in J)
|
|
2454
|
+
h != null && h.includes(`updateLoading${((v = _a.value) == null ? void 0 : v.account) || ((x = _a.value) == null ? void 0 : x.账号)}`) && (_ = [..._, ...h]);
|
|
2455
|
+
let L = $ == null ? void 0 : $.map((h) => h == null ? void 0 : h.id);
|
|
2456
|
+
const i = _ == null ? void 0 : _.map((h) => h == null ? void 0 : h.id);
|
|
2457
|
+
L = [...ae(L), ...i], (L == null ? void 0 : L.length) > 0 && (L != null && L.every((h) => h !== null && h)) && await io({
|
|
2458
|
+
ids: L
|
|
2459
|
+
});
|
|
2460
|
+
const y = (N = Fl.value) == null ? void 0 : N.find((h) => (h == null ? void 0 : h.label) === "新建");
|
|
2461
|
+
await Jr(!1, y);
|
|
2462
|
+
} else if (e === "修改模板") {
|
|
2463
|
+
let J = ae(Ge).value;
|
|
2464
|
+
dl.setRouteToChildPath(J), ml.setActiveMenuPath(J + he);
|
|
2465
|
+
} else if (e === "执行")
|
|
2466
|
+
gs(e, l);
|
|
2467
|
+
else if (e != null && e.includes("导出")) {
|
|
2468
|
+
if (e === "导出选中" && ((M = Xl.value) == null ? void 0 : M.length) === 0)
|
|
2469
|
+
return nl.warning(`请先勾选${e}的数据`);
|
|
2470
|
+
if (e === "导出全部" && ((F = ne.value) == null ? void 0 : F.length) === 0)
|
|
2471
|
+
return nl.warning("暂无数据导出");
|
|
2472
|
+
const J = (K = (S = B.value) == null ? void 0 : S.map((_) => _ == null ? void 0 : _.label)) == null ? void 0 : K.filter((_) => _ !== "操作"), $ = e === "导出全部" ? ae(ne.value) : ae(Xl.value);
|
|
2473
|
+
$ == null || $.forEach((_) => {
|
|
2474
|
+
_ == null || delete _.id;
|
|
2475
|
+
}), Hn($, s == null ? void 0 : s.compName, J, s == null ? void 0 : s.compName);
|
|
2476
|
+
} else e === "OCR识别" ? (Ya.value = !0, aa.value = []) : e === "迁移" && (cl.selectRow = l, cl.show = !0);
|
|
2477
|
+
}, js = async (e) => {
|
|
2478
|
+
var a, r, n, u, t, o;
|
|
2479
|
+
const l = await ia({
|
|
2480
|
+
key: {
|
|
2481
|
+
pageKey: e,
|
|
2482
|
+
type: "structure",
|
|
2483
|
+
systemKey: sessionStorage.getItem("systemKey")
|
|
2484
|
+
}
|
|
2485
|
+
});
|
|
2486
|
+
if (((a = l == null ? void 0 : l.data) == null ? void 0 : a.code) === 200)
|
|
2487
|
+
return Array.isArray((r = l == null ? void 0 : l.data) == null ? void 0 : r.result) && ((u = (n = l == null ? void 0 : l.data) == null ? void 0 : n.result) == null ? void 0 : u.length) > 0 ? (o = (t = l == null ? void 0 : l.data) == null ? void 0 : t.result) == null ? void 0 : o.map((p) => {
|
|
2488
|
+
var b;
|
|
2489
|
+
return {
|
|
2490
|
+
id: p == null ? void 0 : p.id,
|
|
2491
|
+
...(b = p == null ? void 0 : p.value) == null ? void 0 : b.pageData
|
|
2492
|
+
};
|
|
2493
|
+
}) : [];
|
|
2494
|
+
}, $s = async (e, l) => {
|
|
2495
|
+
var a, r, n, u, t, o, p, b, O, v, x, N, M, F, S, K, J, $, _, L;
|
|
2496
|
+
try {
|
|
2497
|
+
let i, y;
|
|
2498
|
+
const h = (a = ka.value[Ge.value + he]) == null ? void 0 : a.filter((C) => {
|
|
2499
|
+
var R;
|
|
2500
|
+
return ((R = C == null ? void 0 : C.key) == null ? void 0 : R.type) === "structureMethod";
|
|
2501
|
+
}), q = (r = ka.value[Ge.value + he]) == null ? void 0 : r.filter((C) => {
|
|
2502
|
+
var R;
|
|
2503
|
+
return ((R = C == null ? void 0 : C.key) == null ? void 0 : R.type) === "structure";
|
|
2504
|
+
}), P = h == null ? void 0 : h.find((C) => {
|
|
2505
|
+
var R, te;
|
|
2506
|
+
return ((te = (R = C == null ? void 0 : C.value) == null ? void 0 : R.pageData) == null ? void 0 : te.method) === "保存";
|
|
2507
|
+
});
|
|
2508
|
+
if (!P) return;
|
|
2509
|
+
const X = (o = (t = ka.value[(u = (n = P == null ? void 0 : P.value) == null ? void 0 : n.pageData) == null ? void 0 : u.path]) == null ? void 0 : t.filter((C) => {
|
|
2510
|
+
var R;
|
|
2511
|
+
return ((R = C == null ? void 0 : C.key) == null ? void 0 : R.type) === "data";
|
|
2512
|
+
})) == null ? void 0 : o.find((C) => {
|
|
2513
|
+
var R, te, ue, se;
|
|
2514
|
+
return ((te = (R = C == null ? void 0 : C.value) == null ? void 0 : R.tableData) == null ? void 0 : te.算法名称) === ((se = (ue = P == null ? void 0 : P.value) == null ? void 0 : ue.pageData) == null ? void 0 : se.method);
|
|
2515
|
+
});
|
|
2516
|
+
if (!X) return;
|
|
2517
|
+
const d = {
|
|
2518
|
+
buttonName: (b = (p = P == null ? void 0 : P.value) == null ? void 0 : p.pageData) == null ? void 0 : b.method,
|
|
2519
|
+
api: (v = (O = X == null ? void 0 : X.value) == null ? void 0 : O.tableData) == null ? void 0 : v.算法体,
|
|
2520
|
+
content: q == null ? void 0 : q.map((C) => {
|
|
2521
|
+
var R;
|
|
2522
|
+
return (R = C == null ? void 0 : C.value) == null ? void 0 : R.pageData;
|
|
2523
|
+
}),
|
|
2524
|
+
extraContent: [],
|
|
2525
|
+
extraValues: (N = (x = P == null ? void 0 : P.value) == null ? void 0 : x.pageData) == null ? void 0 : N.data,
|
|
2526
|
+
methodName: (F = (M = P == null ? void 0 : P.value) == null ? void 0 : M.pageData) == null ? void 0 : F.path
|
|
2527
|
+
};
|
|
2528
|
+
if (!e) return;
|
|
2529
|
+
const E = {
|
|
2530
|
+
...e,
|
|
2531
|
+
compData: (S = e == null ? void 0 : e.compData) == null ? void 0 : S.map((C) => {
|
|
2532
|
+
var R;
|
|
2533
|
+
return (C == null ? void 0 : C.key) === "formContent" ? {
|
|
2534
|
+
...C,
|
|
2535
|
+
contents: (R = C == null ? void 0 : C.contents) == null ? void 0 : R.map((te) => (te == null ? void 0 : te.prop) === l ? {
|
|
2536
|
+
...te,
|
|
2537
|
+
value: ""
|
|
2538
|
+
} : te)
|
|
2539
|
+
} : C;
|
|
2540
|
+
})
|
|
2541
|
+
}, ve = {
|
|
2542
|
+
key: {
|
|
2543
|
+
pageKey: Ge.value + he,
|
|
2544
|
+
parentTable: "",
|
|
2545
|
+
systemKey: sessionStorage.getItem("systemKey"),
|
|
2546
|
+
type: "structure"
|
|
2547
|
+
},
|
|
2548
|
+
value: {
|
|
2549
|
+
pageData: E
|
|
2550
|
+
}
|
|
2551
|
+
}, W = await ga.post(d.api, ve, {
|
|
2552
|
+
headers: {
|
|
2553
|
+
"Content-Type": "application/json"
|
|
2554
|
+
}
|
|
2555
|
+
});
|
|
2556
|
+
return ((K = W == null ? void 0 : W.data) == null ? void 0 : K.code) === 200 && (i = ($ = (J = W == null ? void 0 : W.data) == null ? void 0 : J.result) == null ? void 0 : $.latestReportCode, y = (L = (_ = W == null ? void 0 : W.data) == null ? void 0 : _.result) == null ? void 0 : L.status), {
|
|
2557
|
+
newMainKeyValue: i,
|
|
2558
|
+
newStatus: y
|
|
2559
|
+
};
|
|
2560
|
+
} catch (i) {
|
|
2561
|
+
throw nl.error(i), new Error(i);
|
|
2562
|
+
}
|
|
2563
|
+
}, zr = (e, l, a, r) => {
|
|
2564
|
+
var n;
|
|
2565
|
+
Le("contentChange", {
|
|
2566
|
+
contents: (n = e == null ? void 0 : e.compData) == null ? void 0 : n.map((u) => {
|
|
2567
|
+
var t;
|
|
2568
|
+
return (u == null ? void 0 : u.key) === "formContent" ? {
|
|
2569
|
+
...u,
|
|
2570
|
+
contents: (t = u == null ? void 0 : u.contents) == null ? void 0 : t.map((o) => (o == null ? void 0 : o.key) === l ? {
|
|
2571
|
+
...o,
|
|
2572
|
+
value: a
|
|
2573
|
+
} : Ma.value && (o == null ? void 0 : o.prop) === Ma.prop ? {
|
|
2574
|
+
...o,
|
|
2575
|
+
value: Ma.value
|
|
2576
|
+
} : o)
|
|
2577
|
+
} : u;
|
|
2578
|
+
}),
|
|
2579
|
+
index: e == null ? void 0 : e.id
|
|
2580
|
+
}, r);
|
|
2581
|
+
}, Ma = za({
|
|
2582
|
+
prop: "状态",
|
|
2583
|
+
value: ""
|
|
2584
|
+
}), Ps = G(["系统自动生成信息", "审批意见"]), Ns = async (e, l, a) => {
|
|
2585
|
+
var p, b;
|
|
2586
|
+
let r = e == null ? void 0 : e[l == null ? void 0 : l.prop], n = 1, u, t;
|
|
2587
|
+
const o = ae(Ge).value + he + r;
|
|
2588
|
+
if (o) {
|
|
2589
|
+
Ma.value = "", u = (p = ka.value[o]) == null ? void 0 : p.filter((x) => {
|
|
2590
|
+
var N;
|
|
2591
|
+
return ((N = x == null ? void 0 : x.key) == null ? void 0 : N.type) === "structure";
|
|
2592
|
+
});
|
|
2593
|
+
const O = u == null ? void 0 : u.find((x) => {
|
|
2594
|
+
var N, M, F;
|
|
2595
|
+
return ((F = (M = (N = x == null ? void 0 : x.value) == null ? void 0 : N.pageData) == null ? void 0 : M.comp) == null ? void 0 : F.toUpperCase()) === "FORM";
|
|
2596
|
+
});
|
|
2597
|
+
t = {
|
|
2598
|
+
...(b = O == null ? void 0 : O.value) == null ? void 0 : b.pageData,
|
|
2599
|
+
id: O == null ? void 0 : O.id
|
|
2600
|
+
};
|
|
2601
|
+
const v = await $s(t, l == null ? void 0 : l.prop);
|
|
2602
|
+
if (Ma.value = v == null ? void 0 : v.newStatus, v != null && v.newMainKeyValue) return v == null ? void 0 : v.newMainKeyValue;
|
|
2603
|
+
}
|
|
2604
|
+
if (ne.value.some((O) => (O == null ? void 0 : O[l == null ? void 0 : l.prop]) === r)) {
|
|
2605
|
+
const O = r;
|
|
2606
|
+
for (; ne.value.some((v) => (v == null ? void 0 : v[l == null ? void 0 : l.prop]) === `${O}(${n})`); )
|
|
2607
|
+
n++;
|
|
2608
|
+
r = `${O}(${n})`;
|
|
2609
|
+
}
|
|
2610
|
+
return r;
|
|
2611
|
+
}, Jr = async (e, l, a) => {
|
|
2612
|
+
var t, o, p, b, O, v, x, N;
|
|
2613
|
+
let r, n;
|
|
2614
|
+
const u = await Ns(a == null ? void 0 : a.data, a == null ? void 0 : a.firstCol);
|
|
2615
|
+
if (e ? (r = ae(Ge).value + he + ((b = a == null ? void 0 : a.data) == null ? void 0 : b[(p = a == null ? void 0 : a.firstCol) == null ? void 0 : p.prop]), n = ae(Ge).value + he + u) : (r = ae(Ge).value + he, n = ae(r) + `loading${((t = _a.value) == null ? void 0 : t.account) || ((o = _a.value) == null ? void 0 : o.账号)}`), l) {
|
|
2616
|
+
const M = (v = (O = ka.value[n]) == null ? void 0 : O.filter((F) => {
|
|
2617
|
+
var S;
|
|
2618
|
+
return ((S = F == null ? void 0 : F.key) == null ? void 0 : S.parentTable) === "";
|
|
2619
|
+
})) == null ? void 0 : v.map((F) => {
|
|
2620
|
+
var S;
|
|
2621
|
+
return {
|
|
2622
|
+
id: F == null ? void 0 : F.id,
|
|
2623
|
+
...(S = F == null ? void 0 : F.value) == null ? void 0 : S.pageData
|
|
2624
|
+
};
|
|
2625
|
+
});
|
|
2626
|
+
if ((M == null ? void 0 : M.length) > 0)
|
|
2627
|
+
if (e) {
|
|
2628
|
+
const F = M == null ? void 0 : M.find((S) => {
|
|
2629
|
+
var K;
|
|
2630
|
+
return ((K = S == null ? void 0 : S.comp) == null ? void 0 : K.toUpperCase()) === "FORM";
|
|
2631
|
+
});
|
|
2632
|
+
F && zr(F, (x = a == null ? void 0 : a.firstCol) == null ? void 0 : x.label, u, Ge.value);
|
|
2633
|
+
} else
|
|
2634
|
+
dl.setRouteToChildPath(ae(Ge).value), ml.setActiveMenuPath(n);
|
|
2635
|
+
else if (await ko(r, n, null, null, e ? Ps.value : null), e) {
|
|
2636
|
+
const F = await js(n);
|
|
2637
|
+
if ((F == null ? void 0 : F.length) > 0) {
|
|
2638
|
+
const S = F == null ? void 0 : F.find((K) => {
|
|
2639
|
+
var J;
|
|
2640
|
+
return ((J = K == null ? void 0 : K.comp) == null ? void 0 : J.toUpperCase()) === "FORM";
|
|
2641
|
+
});
|
|
2642
|
+
S && zr(S, (N = a == null ? void 0 : a.firstCol) == null ? void 0 : N.label, u, Ge.value);
|
|
2643
|
+
}
|
|
2644
|
+
} else
|
|
2645
|
+
dl.setRouteToChildPath(ae(Ge).value), ml.setActiveMenuPath(n);
|
|
2646
|
+
} else
|
|
2647
|
+
e ? (ea.value = "", Dl.value = a == null ? void 0 : a.data, Ka(!0, a == null ? void 0 : a.firstCol, u)) : (dl.setRouteToChildPath(ae(Ge).value), ml.setActiveMenuPath(n));
|
|
2648
|
+
}, Rs = () => {
|
|
2649
|
+
ll.value = !1, La.value = [], re.value = !1;
|
|
2650
|
+
}, Fa = (e) => {
|
|
2651
|
+
var t, o, p, b, O, v, x, N, M, F, S, K, J, $, _, L, i, y, h, q, P, X;
|
|
2652
|
+
const l = [];
|
|
2653
|
+
let a = [];
|
|
2654
|
+
for (let d in e)
|
|
2655
|
+
Array.isArray(e == null ? void 0 : e[d]) && a.push(d);
|
|
2656
|
+
w.value = ae(B.value), (o = wa((t = ae(B.value)) == null ? void 0 : t.filter((d) => (d == null ? void 0 : d.label) !== "操作"))) == null || o.forEach((d, E) => {
|
|
2657
|
+
var ve, W, C;
|
|
2658
|
+
a.find((R) => R === (d == null ? void 0 : d.prop)) || (d != null && d.formType && ((ve = d == null ? void 0 : d.formType) == null ? void 0 : ve.toUpperCase()) === "SELECT" || d != null && d.menuId ? l.push({
|
|
2659
|
+
label: (W = d == null ? void 0 : d.prop) != null && W.includes(".") ? d == null ? void 0 : d.prop : (d == null ? void 0 : d.label) ?? (d == null ? void 0 : d.prop) ?? "",
|
|
2660
|
+
name: (d == null ? void 0 : d.prop) ?? "t" + E,
|
|
2661
|
+
prop: d == null ? void 0 : d.prop,
|
|
2662
|
+
type: "Select",
|
|
2663
|
+
// (!t?.formType || t?.formType === '') ? 'Input' : t?.formType,
|
|
2664
|
+
value: (e == null ? void 0 : e[d == null ? void 0 : d.prop]) ?? (d == null ? void 0 : d.value) ?? "",
|
|
2665
|
+
id: (d == null ? void 0 : d.id) ?? E,
|
|
2666
|
+
contents: (d == null ? void 0 : d.options) ?? [],
|
|
2667
|
+
width: 1,
|
|
2668
|
+
isFormColHidden: d == null ? void 0 : d.isFormColHidden,
|
|
2669
|
+
relatedValueId: d == null ? void 0 : d.relatedValueId,
|
|
2670
|
+
disabled: d == null ? void 0 : d.disabled,
|
|
2671
|
+
optionUrl: {
|
|
2672
|
+
groupSelect: d == null ? void 0 : d.groupSelect,
|
|
2673
|
+
menuSelect: d == null ? void 0 : d.formMenuSelect,
|
|
2674
|
+
type: "Select",
|
|
2675
|
+
selectRelateType: d == null ? void 0 : d.selectRelateType,
|
|
2676
|
+
allSelectionContents: (d == null ? void 0 : d.allSelectionContents) ?? [],
|
|
2677
|
+
selectFilter: d == null ? void 0 : d.selectFilter,
|
|
2678
|
+
menuId: d == null ? void 0 : d.menuId,
|
|
2679
|
+
filterContent: d == null ? void 0 : d.filterContent
|
|
2680
|
+
}
|
|
2681
|
+
}) : l.push({
|
|
2682
|
+
label: (C = d == null ? void 0 : d.prop) != null && C.includes(".") ? d == null ? void 0 : d.prop : (d == null ? void 0 : d.label) ?? (d == null ? void 0 : d.prop) ?? "",
|
|
2683
|
+
prop: d == null ? void 0 : d.prop,
|
|
2684
|
+
name: (d == null ? void 0 : d.prop) ?? "t" + E,
|
|
2685
|
+
type: !(d != null && d.formType) || (d == null ? void 0 : d.formType) === "" ? "Input" : d == null ? void 0 : d.formType,
|
|
2686
|
+
value: (e == null ? void 0 : e[d == null ? void 0 : d.prop]) ?? (d == null ? void 0 : d.value) ?? "",
|
|
2687
|
+
id: (d == null ? void 0 : d.id) ?? E,
|
|
2688
|
+
contents: (d == null ? void 0 : d.options) ?? [],
|
|
2689
|
+
width: 1,
|
|
2690
|
+
isFormColHidden: d == null ? void 0 : d.isFormColHidden,
|
|
2691
|
+
disabled: d == null ? void 0 : d.disabled,
|
|
2692
|
+
relatedValueId: d == null ? void 0 : d.relatedValueId
|
|
2693
|
+
}));
|
|
2694
|
+
}), e === "" || !e || (ea.value = (e == null ? void 0 : e.id) ?? "");
|
|
2695
|
+
let r = wa((p = ae(B.value)) == null ? void 0 : p.filter((d) => (d == null ? void 0 : d.label) !== "操作"));
|
|
2696
|
+
Jl.value && ((b = Jl.value) == null ? void 0 : b.length) > 0 && (Jl.value = (O = ae(Jl).value) == null ? void 0 : O.map((d) => {
|
|
2697
|
+
var ve;
|
|
2698
|
+
let E = (d == null ? void 0 : d.prop) || ((ve = r == null ? void 0 : r.find((W) => (W == null ? void 0 : W.label) === (d == null ? void 0 : d.label))) == null ? void 0 : ve.prop);
|
|
2699
|
+
return E && (d.value = e[E]), d;
|
|
2700
|
+
})), xe.value = Jl.value && ((v = Jl.value) == null ? void 0 : v.length) > 0 ? bo(Jl.value) : l;
|
|
2701
|
+
let n = [], u = (x = s.itemData) == null ? void 0 : x.filter((d) => (d == null ? void 0 : d.key) === "filterAllType");
|
|
2702
|
+
if ((u == null ? void 0 : u.length) > 0 && (n = (u == null ? void 0 : u.map((E) => E == null ? void 0 : E.value)).flat()), (n == null ? void 0 : n.length) > 0) {
|
|
2703
|
+
let d = (M = n == null ? void 0 : n.filter((W) => {
|
|
2704
|
+
var C;
|
|
2705
|
+
return (C = W == null ? void 0 : W.content) == null ? void 0 : C.includes("@Type");
|
|
2706
|
+
})) == null ? void 0 : M[((N = n == null ? void 0 : n.filter((W) => {
|
|
2707
|
+
var C;
|
|
2708
|
+
return (C = W == null ? void 0 : W.content) == null ? void 0 : C.includes("@Type");
|
|
2709
|
+
})) == null ? void 0 : N.length) - 1];
|
|
2710
|
+
if (d != null && d.content) {
|
|
2711
|
+
let W = (K = (S = (F = d == null ? void 0 : d.content) == null ? void 0 : F.replace(":", Ol)) == null ? void 0 : S.split(Ol)) == null ? void 0 : K[1];
|
|
2712
|
+
if (((J = W == null ? void 0 : W.trim()) == null ? void 0 : J.toUpperCase()) === "MANUAL") {
|
|
2713
|
+
let C = (y = (i = ($ = s.itemData) == null ? void 0 : $.filter((R) => (R == null ? void 0 : R.key) === "contentTableId")) == null ? void 0 : i[((L = (_ = s.itemData) == null ? void 0 : _.filter((R) => (R == null ? void 0 : R.key) === "contentTableId")) == null ? void 0 : L.length) - 1]) == null ? void 0 : y.contents;
|
|
2714
|
+
xe.value = (h = xe.value) == null ? void 0 : h.map((R, te) => {
|
|
2715
|
+
var ue, se;
|
|
2716
|
+
return (ue = R == null ? void 0 : R.optionUrl) != null && ue.menuId && (R.type = "Select", (se = R == null ? void 0 : R.optionUrl) != null && se.menuId && (R.optionUrl.menuId = R.optionUrl.menuId ?? C, R.optionUrl.menuFilter = n, Pl.value === "新增" && (R.optionUrl.multiple = !0, R.optionUrl.multipleLimit = 5))), R;
|
|
2717
|
+
});
|
|
2718
|
+
}
|
|
2719
|
+
}
|
|
2720
|
+
let E = (q = xe.value) == null ? void 0 : q.filter((W) => {
|
|
2721
|
+
var C, R;
|
|
2722
|
+
return ((C = W == null ? void 0 : W.optionUrl) == null ? void 0 : C.menuId) && ((R = W == null ? void 0 : W.optionUrl) == null ? void 0 : R.menuId) !== "";
|
|
2723
|
+
}), ve;
|
|
2724
|
+
if (E == null || E.forEach((W) => {
|
|
2725
|
+
var R, te;
|
|
2726
|
+
if (ve !== void 0) return;
|
|
2727
|
+
let C = (R = W == null ? void 0 : W.optionUrl) == null ? void 0 : R.menuId;
|
|
2728
|
+
((te = E == null ? void 0 : E.filter((ue) => {
|
|
2729
|
+
var se;
|
|
2730
|
+
return ((se = ue == null ? void 0 : ue.optionUrl) == null ? void 0 : se.menuId) === C;
|
|
2731
|
+
})) == null ? void 0 : te.length) > 1 && (ve = C);
|
|
2732
|
+
}), E = E == null ? void 0 : E.filter((W) => {
|
|
2733
|
+
var C;
|
|
2734
|
+
return ((C = W == null ? void 0 : W.optionUrl) == null ? void 0 : C.menuId) === ve;
|
|
2735
|
+
}), (E == null ? void 0 : E.length) > 1) {
|
|
2736
|
+
let W = E == null ? void 0 : E.map((ue) => ue == null ? void 0 : ue.prop), C = E == null ? void 0 : E.map((ue) => ue == null ? void 0 : ue.label), R = E == null ? void 0 : E.map((ue) => ue == null ? void 0 : ue.value), te = (P = ae(E)) == null ? void 0 : P[0];
|
|
2737
|
+
te.label = C == null ? void 0 : C.join("·"), te.value = R == null ? void 0 : R.join(" "), te.value.trim() === "" && (te.value = ""), te.prop = W == null ? void 0 : W.join("·"), te.usingType = "parent", xe.value.unshift(te), xe.value = (X = xe.value) == null ? void 0 : X.map((ue) => (W != null && W.find((se) => se === (ue == null ? void 0 : ue.prop)) && (ue.isFormColHidden = !0), ue));
|
|
2738
|
+
}
|
|
2739
|
+
}
|
|
2740
|
+
}, Bs = () => {
|
|
2741
|
+
var l;
|
|
2742
|
+
const e = (l = m.value) == null ? void 0 : l.$el;
|
|
2743
|
+
e && Co.create(e, {
|
|
2744
|
+
animation: 150,
|
|
2745
|
+
handle: ".col-drag-icon",
|
|
2746
|
+
ghostClass: "sortable-ghost",
|
|
2747
|
+
onEnd: (a) => {
|
|
2748
|
+
var t;
|
|
2749
|
+
const { oldIndex: r, newIndex: n } = a;
|
|
2750
|
+
if (r === n) return;
|
|
2751
|
+
const u = Ra.value.splice(r, 1)[0];
|
|
2752
|
+
Ra.value.splice(n, 0, u), B.value = (t = B.value) == null ? void 0 : t.slice().sort((o, p) => {
|
|
2753
|
+
if (o.label === "操作") return 1;
|
|
2754
|
+
if (p.label === "操作") return -1;
|
|
2755
|
+
const b = Ra.value.findIndex((v) => v.label === o.label), O = Ra.value.findIndex((v) => v.label === p.label);
|
|
2756
|
+
return b - O;
|
|
2757
|
+
});
|
|
2758
|
+
}
|
|
2759
|
+
});
|
|
2760
|
+
};
|
|
2761
|
+
Tr(() => {
|
|
2762
|
+
sr.value = window.innerWidth - 240 * 2;
|
|
2763
|
+
});
|
|
2764
|
+
const Ms = () => {
|
|
2765
|
+
Ja(() => {
|
|
2766
|
+
Bs();
|
|
2767
|
+
});
|
|
2768
|
+
}, vr = (e, l) => {
|
|
2769
|
+
var r;
|
|
2770
|
+
if (!e && !(e != null && e.children)) return {
|
|
2771
|
+
contents: e,
|
|
2772
|
+
currentSelectContents: void 0
|
|
2773
|
+
};
|
|
2774
|
+
let a;
|
|
2775
|
+
return e.children = (r = e.children) == null ? void 0 : r.map((n) => {
|
|
2776
|
+
var u, t;
|
|
2777
|
+
if ((n == null ? void 0 : n.id) === ea.value) {
|
|
2778
|
+
let o = {};
|
|
2779
|
+
for (let p in n) {
|
|
2780
|
+
let b = (u = l == null ? void 0 : l.find((O) => (O == null ? void 0 : O.prop) === p)) == null ? void 0 : u.label;
|
|
2781
|
+
b ? o[p] = (t = Dl.value) == null ? void 0 : t[b] : o[p] = n[p];
|
|
2782
|
+
}
|
|
2783
|
+
n = Object.assign(o, Dl.value), a = n;
|
|
2784
|
+
} else {
|
|
2785
|
+
let o = vr(n, l);
|
|
2786
|
+
n = o == null ? void 0 : o.contents, a = o == null ? void 0 : o.currentSelectContents;
|
|
2787
|
+
}
|
|
2788
|
+
return n;
|
|
2789
|
+
}), {
|
|
2790
|
+
contents: e,
|
|
2791
|
+
currentSelectContents: a
|
|
2792
|
+
};
|
|
2793
|
+
}, Wr = (e, l) => {
|
|
2794
|
+
let a, r;
|
|
2795
|
+
return e != null && e.find((n) => (n == null ? void 0 : n.id) === ea.value) ? a = e == null ? void 0 : e.map((n) => {
|
|
2796
|
+
var u, t;
|
|
2797
|
+
if ((n == null ? void 0 : n.id) === ea.value) {
|
|
2798
|
+
let o = {};
|
|
2799
|
+
for (let p in n) {
|
|
2800
|
+
let b = (u = l == null ? void 0 : l.find((O) => (O == null ? void 0 : O.prop) === p)) == null ? void 0 : u.label;
|
|
2801
|
+
b ? o[p] = (t = Dl.value) == null ? void 0 : t[b] : o[p] = n[p];
|
|
2802
|
+
}
|
|
2803
|
+
n = Object.assign(o, Dl.value), r = n;
|
|
2804
|
+
}
|
|
2805
|
+
return n;
|
|
2806
|
+
}) : a = e == null ? void 0 : e.map((n) => {
|
|
2807
|
+
var u, t, o, p;
|
|
2808
|
+
if ((n == null ? void 0 : n.id) === ea.value) {
|
|
2809
|
+
let b = {};
|
|
2810
|
+
for (let O in n) {
|
|
2811
|
+
let v = (u = l == null ? void 0 : l.find((x) => (x == null ? void 0 : x.prop) === O)) == null ? void 0 : u.label;
|
|
2812
|
+
v ? b[O] = (t = Dl.value) == null ? void 0 : t[v] : b[O] = n[O];
|
|
2813
|
+
}
|
|
2814
|
+
n = Object.assign(b, Dl.value), r = n;
|
|
2815
|
+
} else
|
|
2816
|
+
n = (o = vr(n, l)) == null ? void 0 : o.contents, r = (p = vr(n, l)) == null ? void 0 : p.currentSelectContents;
|
|
2817
|
+
return n;
|
|
2818
|
+
}), {
|
|
2819
|
+
newContents: a,
|
|
2820
|
+
currentSelectContents: r
|
|
2821
|
+
};
|
|
2822
|
+
}, qr = (e, l, a) => {
|
|
2823
|
+
var r, n;
|
|
2824
|
+
return e[l == null ? void 0 : l.prop] = a, typeof e.id == "number" && (e.id = (r = e.id) == null ? void 0 : r.toString()), e.children && ((n = e.children) == null ? void 0 : n.length) > 0 && (e.children = e.children.map(qr)), e;
|
|
2825
|
+
}, gr = (e) => {
|
|
2826
|
+
var a;
|
|
2827
|
+
const l = [];
|
|
2828
|
+
return l.push({ ...e }), e != null && e.children && Array.isArray(e.children) && ((a = e.children) == null || a.forEach((r) => {
|
|
2829
|
+
l.push(...gr(r));
|
|
2830
|
+
})), (l == null ? void 0 : l.length) > 0 ? l == null ? void 0 : l.map((r) => {
|
|
2831
|
+
const n = { ...r };
|
|
2832
|
+
return delete n.children, n;
|
|
2833
|
+
}) : [];
|
|
2834
|
+
}, Ka = (e = !0, l, a) => {
|
|
2835
|
+
var b, O, v, x, N, M, F, S, K, J, $, _, L, i, y, h, q, P, X, d, E, ve, W, C, R, te, ue, se, _e, Pe;
|
|
2836
|
+
let r = wa((b = ae(B.value)) == null ? void 0 : b.filter((Y) => (Y == null ? void 0 : Y.label) !== "操作")), n, u = ae(ne.value);
|
|
2837
|
+
if (!Dl.value) {
|
|
2838
|
+
la.value = !1;
|
|
2839
|
+
return;
|
|
2840
|
+
}
|
|
2841
|
+
if (ea.value === "") {
|
|
2842
|
+
ma.value++;
|
|
2843
|
+
let Y;
|
|
2844
|
+
l && a ? Y = {
|
|
2845
|
+
id: ma.value.toString(),
|
|
2846
|
+
[l == null ? void 0 : l.prop]: a,
|
|
2847
|
+
children: Dl.value.children
|
|
2848
|
+
} : Y = { id: ma.value.toString() }, Y != null && Y.children && (Y = {
|
|
2849
|
+
...Y,
|
|
2850
|
+
children: (O = Y.children) == null ? void 0 : O.map((pe) => qr(pe, l, a))
|
|
2851
|
+
}), u.push(Object.assign(Dl.value, Y)), n = Object.assign(Dl.value, Y);
|
|
2852
|
+
} else
|
|
2853
|
+
u = (v = Wr(u, r)) == null ? void 0 : v.newContents, n = (x = Wr(u, r)) == null ? void 0 : x.currentSelectContents;
|
|
2854
|
+
const t = (N = s.itemData) == null ? void 0 : N.filter((Y) => (Y == null ? void 0 : Y.key) === "childTree")[0];
|
|
2855
|
+
if (((M = t == null ? void 0 : t.contents) == null ? void 0 : M.length) > 0) {
|
|
2856
|
+
Pl.value = "编辑";
|
|
2857
|
+
const Y = [];
|
|
2858
|
+
u == null || u.forEach((pe, ze) => {
|
|
2859
|
+
var ke;
|
|
2860
|
+
let ge = {};
|
|
2861
|
+
if (Array.isArray(pe)) {
|
|
2862
|
+
let je = [];
|
|
2863
|
+
pe == null || pe.filter((Ye) => !(Ye != null && Ye.id)).forEach((Ye, U) => {
|
|
2864
|
+
var I, He, qe, sl, f, ce, Me;
|
|
2865
|
+
if ((He = (I = Gl.value) == null ? void 0 : I[U]) != null && He.prop && !Array.isArray(Ye)) {
|
|
2866
|
+
let k = {};
|
|
2867
|
+
k[Gl.value[U].column] = Ye, Qe != null && Qe.value && ((qe = Qe == null ? void 0 : Qe.value) == null ? void 0 : qe.length) > 0 && ((sl = Qe == null ? void 0 : Qe.value) != null && sl.find((Ae) => JSON.stringify(Ae == null ? void 0 : Ae[0]) === JSON.stringify(k))) && (je = (f = Qe == null ? void 0 : Qe.value) == null ? void 0 : f.find((Ae) => JSON.stringify(Ae == null ? void 0 : Ae[0]) === JSON.stringify(k))), je && je.length > 0 ? ge[Gl.value[U].prop] = je != null && je.find((Ae) => {
|
|
2868
|
+
var Fe;
|
|
2869
|
+
return ((Fe = Object.keys(Ae)) == null ? void 0 : Fe[0]) === Gl.value[U].column;
|
|
2870
|
+
}) ? (ce = je == null ? void 0 : je.find((Ae) => {
|
|
2871
|
+
var Fe;
|
|
2872
|
+
return ((Fe = Object.keys(Ae)) == null ? void 0 : Fe[0]) === Gl.value[U].column;
|
|
2873
|
+
})) == null ? void 0 : ce[Gl.value[U].column] : Ye : ge[Gl.value[U].prop] = Ye;
|
|
2874
|
+
} else Array.isArray(Ye) && ((Me = Gl.value[U]) != null && Me.prop ? ge[Gl.value[U].prop] = Ye : ge.children = Cr(Ye, Gl.value));
|
|
2875
|
+
});
|
|
2876
|
+
} else
|
|
2877
|
+
ge = pe;
|
|
2878
|
+
if (Array.isArray(pe) && pe.some((je) => je == null ? void 0 : je.id)) {
|
|
2879
|
+
const je = (ke = pe == null ? void 0 : pe.find((Ye) => Ye.id)) == null ? void 0 : ke.id;
|
|
2880
|
+
Y.push(Object.assign(ge, { id: Nr(je) }));
|
|
2881
|
+
} else ge.id ? Y.push(ge) : Y.push(Object.assign(ge, { id: ze.toString() }));
|
|
2882
|
+
}), ne.value = Yr(Y, t, B.value);
|
|
2883
|
+
} else
|
|
2884
|
+
ne.value = u;
|
|
2885
|
+
Xr(ne.value), $a.value = ne.value;
|
|
2886
|
+
const o = ii($a.value, Pa.value, u);
|
|
2887
|
+
let p = [];
|
|
2888
|
+
if (Da.value ? (p = (F = ae(Da).value.singleContent) == null ? void 0 : F.filter((Y) => (Y == null ? void 0 : Y.id) !== (n == null ? void 0 : n.id)), p.push(n)) : p = [n], Hl.value) {
|
|
2889
|
+
const Y = {
|
|
2890
|
+
content: o,
|
|
2891
|
+
singleContent: ((S = t == null ? void 0 : t.contents) == null ? void 0 : S.length) > 0 ? p == null ? void 0 : p.flatMap(gr) : p,
|
|
2892
|
+
index: s == null ? void 0 : s.index,
|
|
2893
|
+
buttonName: "编辑",
|
|
2894
|
+
column: B.value,
|
|
2895
|
+
parentTableId: s == null ? void 0 : s.parentTableId
|
|
2896
|
+
};
|
|
2897
|
+
dl.setCacheUpdatingData(Y);
|
|
2898
|
+
}
|
|
2899
|
+
if (e) {
|
|
2900
|
+
let Y = (_ = ($ = (J = (K = s.itemData) == null ? void 0 : K.find((ge) => (ge == null ? void 0 : ge.key) === "filterAllType")) == null ? void 0 : J.value) == null ? void 0 : $.find((ge) => (ge == null ? void 0 : ge.value) === "onConditionContents")) == null ? void 0 : _.content, pe = (L = s.itemData) == null ? void 0 : L.filter((ge) => (ge == null ? void 0 : ge.key) === "filterAllType");
|
|
2901
|
+
pe = Array.from(
|
|
2902
|
+
new Map(
|
|
2903
|
+
pe.filter(Boolean).map((ge, ke) => [ge.value, { ...ge, _idx: ke }])
|
|
2904
|
+
// 2. 带索引,保证顺序
|
|
2905
|
+
).values()
|
|
2906
|
+
// 3. Map 自动保留“后者”
|
|
2907
|
+
).sort((ge, ke) => ge._idx - ke._idx).map(({ _idx: ge, ...ke }) => ke), pe = (i = pe == null ? void 0 : pe[(pe == null ? void 0 : pe.length) - 1]) == null ? void 0 : i.value;
|
|
2908
|
+
const ze = {
|
|
2909
|
+
content: o,
|
|
2910
|
+
singleContent: ((y = t == null ? void 0 : t.contents) == null ? void 0 : y.length) > 0 ? gr(n) : n,
|
|
2911
|
+
index: s == null ? void 0 : s.index,
|
|
2912
|
+
buttonName: Pl.value,
|
|
2913
|
+
column: B.value,
|
|
2914
|
+
parentTableId: s == null ? void 0 : s.parentTableId,
|
|
2915
|
+
filter: Y,
|
|
2916
|
+
allFilter: pe,
|
|
2917
|
+
pathIndex: (q = (h = s.itemData) == null ? void 0 : h.find((ge) => (ge == null ? void 0 : ge.key) === "relatedFilter")) == null ? void 0 : q.index,
|
|
2918
|
+
rowContents: xe.value,
|
|
2919
|
+
addArrayValues: ye.value
|
|
2920
|
+
};
|
|
2921
|
+
dl.setTableLoading(s == null ? void 0 : s.index), la.value = !1, Dl.value = void 0, Le("change", ze);
|
|
2922
|
+
}
|
|
2923
|
+
if ((d = (X = (P = xe.value) == null ? void 0 : P[0]) == null ? void 0 : X.optionUrl) != null && d.menuId) {
|
|
2924
|
+
la.value = !1;
|
|
2925
|
+
let Y = (E = s.itemData) == null ? void 0 : E.filter((pe) => (pe == null ? void 0 : pe.key) === "filterAllType");
|
|
2926
|
+
if ((Y == null ? void 0 : Y.length) > 0) {
|
|
2927
|
+
let pe = Y == null ? void 0 : Y.map((ke) => ke == null ? void 0 : ke.value), ze = (C = (W = (ve = pe.flat().find((ke) => {
|
|
2928
|
+
var je;
|
|
2929
|
+
return (je = ke == null ? void 0 : ke.content) == null ? void 0 : je.includes("@Num");
|
|
2930
|
+
})) == null ? void 0 : ve.content) == null ? void 0 : W.split(":")) == null ? void 0 : C[1];
|
|
2931
|
+
((ue = (te = (R = pe.flat().find((ke) => {
|
|
2932
|
+
var je;
|
|
2933
|
+
return (je = ke == null ? void 0 : ke.content) == null ? void 0 : je.includes("@Type:");
|
|
2934
|
+
})) == null ? void 0 : R.content) == null ? void 0 : te.split(":")) == null ? void 0 : ue[1]) !== "Manual" && (ze = parseInt(ze), ne.value = (Pe = ne.value) == null ? void 0 : Pe.slice(((se = ne.value) == null ? void 0 : se.length) - ze, (_e = ne.value) == null ? void 0 : _e.length));
|
|
2935
|
+
}
|
|
2936
|
+
}
|
|
2937
|
+
};
|
|
2938
|
+
lo(() => {
|
|
2939
|
+
B.value = [], ne.value = [], w.value = [], nr.value = [], Jl.value = [], ua.value = [], La.value = [], Ml.value = [], xe.value = [], Xl.value = [], m.value = null;
|
|
2940
|
+
});
|
|
2941
|
+
const Gr = async (e, l, a) => {
|
|
2942
|
+
var b, O, v, x, N, M, F, S, K, J, $;
|
|
2943
|
+
Ql.value = a == null ? void 0 : a.prop;
|
|
2944
|
+
const r = ae(s.itemData), n = r == null ? void 0 : r.map((_) => {
|
|
2945
|
+
var L;
|
|
2946
|
+
return (_ == null ? void 0 : _.key) === "header" && ((L = _.contents) == null || L.map((i, y) => {
|
|
2947
|
+
var h, q, P, X, d, E, ve, W, C, R, te, ue, se, _e, Pe, Y, pe, ze, ge;
|
|
2948
|
+
return i.type = i != null && i.type ? i.type : (X = (P = (q = (h = i == null ? void 0 : i.key) == null ? void 0 : h.split("$")) == null ? void 0 : q[1]) == null ? void 0 : P.split("(")) != null && X[0] ? (E = (d = mr) == null ? void 0 : d.find((ke) => {
|
|
2949
|
+
var je, Ye, U, I;
|
|
2950
|
+
return (ke == null ? void 0 : ke.key) === ((I = (U = (Ye = (je = i == null ? void 0 : i.key) == null ? void 0 : je.split("$")) == null ? void 0 : Ye[1]) == null ? void 0 : U.split("(")) == null ? void 0 : I[0]);
|
|
2951
|
+
})) == null ? void 0 : E.value : "Input", i.options = i != null && i.options ? i.options : ((C = (W = (ve = i == null ? void 0 : i.key) == null ? void 0 : ve.split("$")) == null ? void 0 : W[1]) == null ? void 0 : C.length) > 0 ? (se = (ue = _r((te = (R = i == null ? void 0 : i.key) == null ? void 0 : R.split("$")) == null ? void 0 : te[1])) == null ? void 0 : ue.split(",")) == null ? void 0 : se.map((ke) => ({
|
|
2952
|
+
label: ke,
|
|
2953
|
+
value: ke
|
|
2954
|
+
})) : [], (_e = i == null ? void 0 : i.key) != null && _e.includes("$") && (i.key = (Y = (Pe = i == null ? void 0 : i.key) == null ? void 0 : Pe.split("$")) == null ? void 0 : Y[0]), i.value = (pe = Object.values(l)) == null ? void 0 : pe[y], i.optionUrl = i != null && i.formMenuSelect && ((ze = i == null ? void 0 : i.formMenuSelect) == null ? void 0 : ze.length) > 0 ? {
|
|
2955
|
+
groupSelect: (ge = i == null ? void 0 : i.groupSelect) == null ? void 0 : ge.split(/[::]/).map((ke) => ke.trim()),
|
|
2956
|
+
menuSelect: i == null ? void 0 : i.formMenuSelect,
|
|
2957
|
+
selectRelateType: "",
|
|
2958
|
+
type: (i == null ? void 0 : i.formType) ?? (i != null && i.groupSelect ? "Select" : "")
|
|
2959
|
+
} : null, i;
|
|
2960
|
+
})), _;
|
|
2961
|
+
});
|
|
2962
|
+
let u = ae(xe.value), t = (O = (b = ae(n)) == null ? void 0 : b.find((_) => (_ == null ? void 0 : _.key) === "header")) == null ? void 0 : O.contents;
|
|
2963
|
+
u = u == null ? void 0 : u.map((_) => {
|
|
2964
|
+
var L;
|
|
2965
|
+
return _.value = (L = t == null ? void 0 : t.find((i, y) => y === (_ == null ? void 0 : _.id))) == null ? void 0 : L.value, _;
|
|
2966
|
+
});
|
|
2967
|
+
let o = "", p = (N = (x = (v = ae(n)) == null ? void 0 : v.find((_) => (_ == null ? void 0 : _.key) === "header")) == null ? void 0 : x.contents) == null ? void 0 : N.find((_, L) => {
|
|
2968
|
+
var i, y, h;
|
|
2969
|
+
return (_ == null ? void 0 : _.label) === Ql.value || (L == null ? void 0 : L.toString()) === ((h = (y = (i = Ql.value) == null ? void 0 : i.split("a")) == null ? void 0 : y[1]) == null ? void 0 : h.toString());
|
|
2970
|
+
});
|
|
2971
|
+
if ((S = (F = (M = ae(n)) == null ? void 0 : M.find((_) => (_ == null ? void 0 : _.key) === "header")) == null ? void 0 : F.contents) == null || S.forEach((_) => {
|
|
2972
|
+
var L, i, y, h, q;
|
|
2973
|
+
o === "" && ((y = (i = (L = _ == null ? void 0 : _.optionUrl) == null ? void 0 : L.groupSelect) == null ? void 0 : i[1]) != null && y.includes("[")) && (o = (q = (h = _ == null ? void 0 : _.optionUrl) == null ? void 0 : h.groupSelect) == null ? void 0 : q[1]);
|
|
2974
|
+
}), (K = p == null ? void 0 : p.optionUrl) != null && K.menuSelect) {
|
|
2975
|
+
let _ = await Ar(p), L;
|
|
2976
|
+
if (_ == null || _.forEach((i) => {
|
|
2977
|
+
var y, h, q, P, X, d, E, ve, W, C;
|
|
2978
|
+
o === ((h = (y = p == null ? void 0 : p.optionUrl) == null ? void 0 : y.groupSelect) == null ? void 0 : h[1]) && ((X = (P = (q = p == null ? void 0 : p.optionUrl) == null ? void 0 : q.groupSelect) == null ? void 0 : P[1]) != null && X.includes("[")) && ((C = ae(i)) == null ? void 0 : C[(W = (ve = (E = (d = p == null ? void 0 : p.optionUrl) == null ? void 0 : d.groupSelect) == null ? void 0 : E[1]) == null ? void 0 : ve.replaceAll("[", "")) == null ? void 0 : W.replaceAll("]", "")]) === (p == null ? void 0 : p.value) && (L = i);
|
|
2979
|
+
}), L) {
|
|
2980
|
+
let i = ae(u);
|
|
2981
|
+
i = i == null ? void 0 : i.map((h) => {
|
|
2982
|
+
var q, P, X, d, E, ve, W, C, R, te, ue;
|
|
2983
|
+
return (L != null && L[h == null ? void 0 : h.label] || L != null && L[(d = (X = (P = (q = h == null ? void 0 : h.optionUrl) == null ? void 0 : q.groupSelect) == null ? void 0 : P[1]) == null ? void 0 : X.replaceAll("[", "")) == null ? void 0 : d.replaceAll("]", "")]) && ((W = (ve = (E = h == null ? void 0 : h.optionUrl) == null ? void 0 : E.groupSelect) == null ? void 0 : ve[1]) != null && W.includes("[")) && (h.value = (L == null ? void 0 : L[h == null ? void 0 : h.label]) || (L == null ? void 0 : L[(ue = (te = (R = (C = h == null ? void 0 : h.optionUrl) == null ? void 0 : C.groupSelect) == null ? void 0 : R[1]) == null ? void 0 : te.replaceAll("[", "")) == null ? void 0 : ue.replaceAll("]", "")])), h;
|
|
2984
|
+
}), ne.value = (J = ae(ne.value)) == null ? void 0 : J.map((h) => {
|
|
2985
|
+
if ((h == null ? void 0 : h.id) === (l == null ? void 0 : l.id)) {
|
|
2986
|
+
const q = {};
|
|
2987
|
+
return i == null || i.forEach((P) => {
|
|
2988
|
+
q[P.name] = P.value;
|
|
2989
|
+
}), q.id = h == null ? void 0 : h.id, q;
|
|
2990
|
+
}
|
|
2991
|
+
return h;
|
|
2992
|
+
});
|
|
2993
|
+
let y = ae(i);
|
|
2994
|
+
y = y == null ? void 0 : y.map((h) => {
|
|
2995
|
+
var q, P, X, d;
|
|
2996
|
+
return (P = (q = h == null ? void 0 : h.optionUrl) == null ? void 0 : q.menuSelect) != null && P.some((E) => E == null ? void 0 : E.includes) && (h.optionUrl.menuSelect = (d = (X = h == null ? void 0 : h.optionUrl) == null ? void 0 : X.menuSelect) == null ? void 0 : d.map((E) => {
|
|
2997
|
+
var ve, W, C, R;
|
|
2998
|
+
if (E != null && E.includes("[")) {
|
|
2999
|
+
let te = (W = (ve = E == null ? void 0 : E.replaceAll("[", "").replaceAll("]", "")) == null ? void 0 : ve.split(":")) == null ? void 0 : W[1];
|
|
3000
|
+
E = (R = (C = ae(i)) == null ? void 0 : C.find((ue) => (ue == null ? void 0 : ue.label) === te)) == null ? void 0 : R.value;
|
|
3001
|
+
}
|
|
3002
|
+
return E;
|
|
3003
|
+
})), h;
|
|
3004
|
+
}), ne.value = ($ = ae(ne.value)) == null ? void 0 : $.map((h) => {
|
|
3005
|
+
if ((h == null ? void 0 : h.id) === (l == null ? void 0 : l.id)) {
|
|
3006
|
+
const q = {};
|
|
3007
|
+
return y == null || y.forEach((P) => {
|
|
3008
|
+
q[P.name] = P.value;
|
|
3009
|
+
}), q.id = h == null ? void 0 : h.id, q;
|
|
3010
|
+
}
|
|
3011
|
+
return h;
|
|
3012
|
+
});
|
|
3013
|
+
}
|
|
3014
|
+
}
|
|
3015
|
+
}, Fs = async (e) => {
|
|
3016
|
+
var N, M, F, S, K, J, $, _, L, i, y, h, q, P, X, d, E, ve, W, C, R, te, ue, se, _e, Pe, Y, pe, ze, ge, ke, je, Ye;
|
|
3017
|
+
if (!e) return;
|
|
3018
|
+
Dl.value = e;
|
|
3019
|
+
const l = ae(s.itemData);
|
|
3020
|
+
let a = l == null ? void 0 : l.map((U) => {
|
|
3021
|
+
var I, He, qe, sl;
|
|
3022
|
+
return (U == null ? void 0 : U.key) === "header" && (Array.isArray((I = U.contents) == null ? void 0 : I[0]) ? U.contents = (qe = wa((He = U.contents) == null ? void 0 : He[0])) == null ? void 0 : qe.map((f, ce) => {
|
|
3023
|
+
var Me, k, Ae, Fe, fl, hl, yl, vl, gl, bl, pl, Ue, Be, Sl, wl, g, Q, Te, al, _l, Kl, Al, Nl, Ll;
|
|
3024
|
+
return f.type = f != null && f.type ? f.type : (Fe = (Ae = (k = (Me = f == null ? void 0 : f.key) == null ? void 0 : Me.split("$")) == null ? void 0 : k[1]) == null ? void 0 : Ae.split("(")) != null && Fe[0] ? (hl = (fl = mr) == null ? void 0 : fl.find((Ne) => {
|
|
3025
|
+
var z, c, me, Re;
|
|
3026
|
+
return (Ne == null ? void 0 : Ne.key) === ((Re = (me = (c = (z = f == null ? void 0 : f.key) == null ? void 0 : z.split("$")) == null ? void 0 : c[1]) == null ? void 0 : me.split("(")) == null ? void 0 : Re[0]);
|
|
3027
|
+
})) == null ? void 0 : hl.value : "Input", f.options = f != null && f.options ? f.options : ((gl = (vl = (yl = f == null ? void 0 : f.key) == null ? void 0 : yl.split("$")) == null ? void 0 : vl[1]) == null ? void 0 : gl.length) > 0 ? (Be = (Ue = _r((pl = (bl = f == null ? void 0 : f.key) == null ? void 0 : bl.split("$")) == null ? void 0 : pl[1])) == null ? void 0 : Ue.split(",")) == null ? void 0 : Be.map((Ne) => ({
|
|
3028
|
+
label: Ne,
|
|
3029
|
+
value: Ne
|
|
3030
|
+
})) : [], (Sl = f == null ? void 0 : f.key) != null && Sl.includes("$") && (f.key = (g = (wl = f == null ? void 0 : f.key) == null ? void 0 : wl.split("$")) == null ? void 0 : g[0]), ((al = (Te = (Q = xe.value) == null ? void 0 : Q.find((Ne) => (Ne == null ? void 0 : Ne.prop) === (f == null ? void 0 : f.prop))) == null ? void 0 : Te.optionUrl) == null ? void 0 : al.multiple) === !0 && !Array.isArray((_l = Object.values(e)) == null ? void 0 : _l[ce]) ? f.value = [(Kl = Object.values(e)) == null ? void 0 : Kl[ce]] : f.value = (Al = Object.values(e)) == null ? void 0 : Al[ce], f.optionUrl = f != null && f.formMenuSelect && ((Nl = f == null ? void 0 : f.formMenuSelect) == null ? void 0 : Nl.length) > 0 ? {
|
|
3031
|
+
groupSelect: (Ll = f == null ? void 0 : f.groupSelect) == null ? void 0 : Ll.split(/[::]/).map((Ne) => Ne.trim()),
|
|
3032
|
+
menuSelect: f == null ? void 0 : f.formMenuSelect,
|
|
3033
|
+
selectRelateType: "",
|
|
3034
|
+
type: (f == null ? void 0 : f.formType) ?? (f != null && f.groupSelect ? "Select" : "")
|
|
3035
|
+
} : null, f;
|
|
3036
|
+
}) : U.contents = (sl = U.contents) == null ? void 0 : sl.map((f, ce) => {
|
|
3037
|
+
var Me, k, Ae, Fe, fl, hl, yl, vl, gl, bl, pl, Ue, Be, Sl, wl, g, Q, Te, al, _l, Kl, Al, Nl, Ll;
|
|
3038
|
+
return f.type = f != null && f.type ? f.type : (Fe = (Ae = (k = (Me = f == null ? void 0 : f.key) == null ? void 0 : Me.split("$")) == null ? void 0 : k[1]) == null ? void 0 : Ae.split("(")) != null && Fe[0] ? (hl = (fl = mr) == null ? void 0 : fl.find((Ne) => {
|
|
3039
|
+
var z, c, me, Re;
|
|
3040
|
+
return (Ne == null ? void 0 : Ne.key) === ((Re = (me = (c = (z = f == null ? void 0 : f.key) == null ? void 0 : z.split("$")) == null ? void 0 : c[1]) == null ? void 0 : me.split("(")) == null ? void 0 : Re[0]);
|
|
3041
|
+
})) == null ? void 0 : hl.value : "Input", f.options = f != null && f.options ? f.options : ((gl = (vl = (yl = f == null ? void 0 : f.key) == null ? void 0 : yl.split("$")) == null ? void 0 : vl[1]) == null ? void 0 : gl.length) > 0 ? (Be = (Ue = _r((pl = (bl = f == null ? void 0 : f.key) == null ? void 0 : bl.split("$")) == null ? void 0 : pl[1])) == null ? void 0 : Ue.split(",")) == null ? void 0 : Be.map((Ne) => ({
|
|
3042
|
+
label: Ne,
|
|
3043
|
+
value: Ne
|
|
3044
|
+
})) : [], (Sl = f == null ? void 0 : f.key) != null && Sl.includes("$") && (f.key = (g = (wl = f == null ? void 0 : f.key) == null ? void 0 : wl.split("$")) == null ? void 0 : g[0]), ((al = (Te = (Q = xe.value) == null ? void 0 : Q.find((Ne) => (Ne == null ? void 0 : Ne.prop) === (f == null ? void 0 : f.prop))) == null ? void 0 : Te.optionUrl) == null ? void 0 : al.multiple) === !0 && !Array.isArray((_l = Object.values(e)) == null ? void 0 : _l[ce]) ? f.value = [(Kl = Object.values(e)) == null ? void 0 : Kl[ce]] : f.value = (Al = Object.values(e)) == null ? void 0 : Al[ce], f.optionUrl = f != null && f.formMenuSelect && ((Nl = f == null ? void 0 : f.formMenuSelect) == null ? void 0 : Nl.length) > 0 ? {
|
|
3045
|
+
groupSelect: (Ll = f == null ? void 0 : f.groupSelect) == null ? void 0 : Ll.split(/[::]/).map((Ne) => Ne.trim()),
|
|
3046
|
+
menuSelect: f == null ? void 0 : f.formMenuSelect,
|
|
3047
|
+
selectRelateType: "",
|
|
3048
|
+
type: (f == null ? void 0 : f.formType) ?? (f != null && f.groupSelect ? "Select" : "")
|
|
3049
|
+
} : null, f;
|
|
3050
|
+
})), U;
|
|
3051
|
+
}), r = xe.value, n = (M = (N = ae(a)) == null ? void 0 : N.find((U) => (U == null ? void 0 : U.key) === "header")) == null ? void 0 : M.contents;
|
|
3052
|
+
if (n = n == null ? void 0 : n.filter((U) => (U == null ? void 0 : U.label) !== "操作"), n.push({
|
|
3053
|
+
label: "操作",
|
|
3054
|
+
type: "operate"
|
|
3055
|
+
}), r = r == null ? void 0 : r.map((U) => {
|
|
3056
|
+
var I;
|
|
3057
|
+
return U.value = U.value ?? ((I = n == null ? void 0 : n.find((He, qe) => (He == null ? void 0 : He.prop) === (U == null ? void 0 : U.name))) == null ? void 0 : I.value), U;
|
|
3058
|
+
}), !Na.value) return;
|
|
3059
|
+
let u = "", t = ae(Ql.value);
|
|
3060
|
+
(F = Ql.value) != null && F.includes("·") && (Ql.value = (K = (S = Ql.value) == null ? void 0 : S.split("·")) == null ? void 0 : K[0]);
|
|
3061
|
+
let o = (_ = ($ = (J = ae(a)) == null ? void 0 : J.find((U) => (U == null ? void 0 : U.key) === "header")) == null ? void 0 : $.contents) == null ? void 0 : _.find((U, I) => {
|
|
3062
|
+
var He, qe, sl;
|
|
3063
|
+
return (U == null ? void 0 : U.prop) === Ql.value || (I == null ? void 0 : I.toString()) === ((sl = (qe = (He = Ql.value) == null ? void 0 : He.split("a")) == null ? void 0 : qe[1]) == null ? void 0 : sl.toString());
|
|
3064
|
+
}), p = (L = o == null ? void 0 : o.optionUrl) == null ? void 0 : L.menuSelect, b = !0;
|
|
3065
|
+
(h = (y = (i = ae(a)) == null ? void 0 : i.find((U) => (U == null ? void 0 : U.key) === "header")) == null ? void 0 : y.contents) == null || h.forEach((U) => {
|
|
3066
|
+
var He, qe, sl, f, ce, Me, k;
|
|
3067
|
+
let I = (qe = (He = U == null ? void 0 : U.optionUrl) == null ? void 0 : He.groupSelect) == null ? void 0 : qe[1];
|
|
3068
|
+
!I && !Array.isArray((sl = U == null ? void 0 : U.optionUrl) == null ? void 0 : sl.groupSelect) && (I = (Me = (ce = (f = U == null ? void 0 : U.optionUrl) == null ? void 0 : f.groupSelect) == null ? void 0 : ce.split(":")) == null ? void 0 : Me[1]), b && (I != null && I.includes("[")) && (u = I, JSON.stringify(p) === JSON.stringify((k = U == null ? void 0 : U.optionUrl) == null ? void 0 : k.menuSelect) && (b = !1));
|
|
3069
|
+
});
|
|
3070
|
+
let O = ae(r), v = ul.value;
|
|
3071
|
+
v != null && v.find((U) => (o == null ? void 0 : o.prop) === (U == null ? void 0 : U.key)) && (v = v == null ? void 0 : v.filter((U) => (o == null ? void 0 : o.prop) !== (U == null ? void 0 : U.key))), v != null && v.find((U) => t === (U == null ? void 0 : U.key)) && (v = v == null ? void 0 : v.filter((U) => t !== (U == null ? void 0 : U.key))), O = O == null ? void 0 : O.map((U) => {
|
|
3072
|
+
var I, He, qe, sl, f, ce, Me, k, Ae;
|
|
3073
|
+
return (U == null ? void 0 : U.type) === "Select" && (((He = (I = U == null ? void 0 : U.optionUrl) == null ? void 0 : I.allSelectionContents) == null ? void 0 : He.length) > 0 && (U.optionUrl.contactValue = e), ((o == null ? void 0 : o.prop) === (U == null ? void 0 : U.prop) || t === (U == null ? void 0 : U.prop)) && o && (Array.isArray(o.value) && ((qe = o.value) == null ? void 0 : qe.length) > 0 && ((sl = o.value) != null && sl.every((Fe) => typeof Fe == "string")) ? (v.push({
|
|
3074
|
+
key: U == null ? void 0 : U.prop,
|
|
3075
|
+
value: [(ce = o.value) == null ? void 0 : ce[((f = o.value) == null ? void 0 : f.length) - 1]]
|
|
3076
|
+
}), U.selectValue = (Me = v == null ? void 0 : v.find((Fe) => (Fe == null ? void 0 : Fe.key) === (U == null ? void 0 : U.prop))) == null ? void 0 : Me.value) : Array.isArray(o.value) && ((k = o.value) == null ? void 0 : k.length) === 0 ? (v = [], U.selectValue = [], e[U == null ? void 0 : U.prop] = "") : Array.isArray(U.value) && v.push({
|
|
3077
|
+
key: U == null ? void 0 : U.prop,
|
|
3078
|
+
value: [(Ae = U.value) == null ? void 0 : Ae[(U == null ? void 0 : U.length) - 1]]
|
|
3079
|
+
}))), U.value = e == null ? void 0 : e[U == null ? void 0 : U.prop], U;
|
|
3080
|
+
}), ul.value = v, xe.value = ae(O);
|
|
3081
|
+
let x = (o == null ? void 0 : o.menuId) ?? ((X = (P = (q = xe.value) == null ? void 0 : q.find((U) => {
|
|
3082
|
+
var I;
|
|
3083
|
+
return (I = U == null ? void 0 : U.optionUrl) == null ? void 0 : I.menuId;
|
|
3084
|
+
})) == null ? void 0 : P.optionUrl) == null ? void 0 : X.menuId);
|
|
3085
|
+
if ((d = o == null ? void 0 : o.optionUrl) != null && d.menuSelect && Na.value || x) {
|
|
3086
|
+
let U = await Ar(o, x), I;
|
|
3087
|
+
if (U == null || U.forEach((f) => {
|
|
3088
|
+
var ce, Me, k, Ae, Fe, fl, hl, yl, vl, gl, bl, pl, Ue, Be, Sl, wl, g, Q, Te, al, _l, Kl, Al, Nl, Ll, Ne, z;
|
|
3089
|
+
if (!x && u === ((Me = (ce = o == null ? void 0 : o.optionUrl) == null ? void 0 : ce.groupSelect) == null ? void 0 : Me[1]) && ((Fe = (Ae = (k = o == null ? void 0 : o.optionUrl) == null ? void 0 : k.groupSelect) == null ? void 0 : Ae[1]) != null && Fe.includes("[")) && ((gl = ae(f)) == null ? void 0 : gl[(vl = (yl = (hl = (fl = o == null ? void 0 : o.optionUrl) == null ? void 0 : fl.groupSelect) == null ? void 0 : hl[1]) == null ? void 0 : yl.replaceAll("[", "")) == null ? void 0 : vl.replaceAll("]", "")]) === (o == null ? void 0 : o.value) && (I = f), x) {
|
|
3090
|
+
let c = (pl = (bl = xe.value) == null ? void 0 : bl.find((Se) => {
|
|
3091
|
+
var $e;
|
|
3092
|
+
return (o == null ? void 0 : o.menuId) === (($e = Se == null ? void 0 : Se.optionUrl) == null ? void 0 : $e.menuId);
|
|
3093
|
+
})) == null ? void 0 : pl.prop, me = e[c];
|
|
3094
|
+
if (c != null && c.includes("·"))
|
|
3095
|
+
if (!Array.isArray(e[c]))
|
|
3096
|
+
me = (Be = (Ue = e[c]) == null ? void 0 : Ue.split(" ")) == null ? void 0 : Be[0], c = (Sl = c == null ? void 0 : c.split("·")) == null ? void 0 : Sl[0];
|
|
3097
|
+
else {
|
|
3098
|
+
c = (wl = c == null ? void 0 : c.split("·")) == null ? void 0 : wl[0];
|
|
3099
|
+
let Se = (Q = (g = O == null ? void 0 : O.find(($e) => ($e == null ? void 0 : $e.prop) === c)) == null ? void 0 : g.selectValue) == null ? void 0 : Q[0];
|
|
3100
|
+
me = (Te = Se == null ? void 0 : Se.split(" ")) == null ? void 0 : Te[0];
|
|
3101
|
+
}
|
|
3102
|
+
let Re = (_l = (al = O == null ? void 0 : O.find((Se) => {
|
|
3103
|
+
var $e;
|
|
3104
|
+
return (Se == null ? void 0 : Se.prop) === c || (($e = Se == null ? void 0 : Se.prop) == null ? void 0 : $e.includes("." + c));
|
|
3105
|
+
})) == null ? void 0 : al.selectValue) == null ? void 0 : _l[0];
|
|
3106
|
+
if (c != null && c.includes(".") && !f[c] && (c = (Al = c == null ? void 0 : c.split(".")) == null ? void 0 : Al[((Kl = c == null ? void 0 : c.split(".")) == null ? void 0 : Kl.length) - 1]), Array.isArray(me) && !Re && (Re = me == null ? void 0 : me[0]), f[c] === (Array.isArray(me) ? Re : me) && (o == null ? void 0 : o.directiveLabel) === "#isMain") {
|
|
3107
|
+
if (t != null && t.includes("·")) {
|
|
3108
|
+
let Se = t == null ? void 0 : t.split("·"), $e = (z = (Ne = (Ll = Array.isArray(e == null ? void 0 : e[t]) ? (Nl = e == null ? void 0 : e[t]) == null ? void 0 : Nl[0] : e == null ? void 0 : e[t]) == null ? void 0 : Ll.split(" ")) == null ? void 0 : Ne.filter((De) => De && De !== "")) == null ? void 0 : z.map((De) => De == null ? void 0 : De.trim());
|
|
3109
|
+
Se == null || Se.forEach((De, Wl) => {
|
|
3110
|
+
f[De] = $e == null ? void 0 : $e[Wl];
|
|
3111
|
+
});
|
|
3112
|
+
}
|
|
3113
|
+
I = f;
|
|
3114
|
+
}
|
|
3115
|
+
}
|
|
3116
|
+
}), Ve.value && (o == null ? void 0 : o.directiveLabel) === "#isMain" && (ye.value = []), !I) {
|
|
3117
|
+
if (Ve.value && (o == null ? void 0 : o.directiveLabel) === "#isMain")
|
|
3118
|
+
if (t != null && t.includes("·")) {
|
|
3119
|
+
let f = e, ce = (W = (ve = (E = e == null ? void 0 : e[t]) == null ? void 0 : E.split(" ")) == null ? void 0 : ve.filter((k) => k && k !== "")) == null ? void 0 : W.map((k) => k == null ? void 0 : k.trim());
|
|
3120
|
+
(C = t == null ? void 0 : t.split("·")) == null || C.forEach((k, Ae) => {
|
|
3121
|
+
f[k] = ce[Ae];
|
|
3122
|
+
});
|
|
3123
|
+
let Me = (R = xe.value) == null ? void 0 : R.find((k) => (k == null ? void 0 : k.prop) === t);
|
|
3124
|
+
f[Me.prop] = [Me.value], I = f;
|
|
3125
|
+
} else {
|
|
3126
|
+
let f = (te = xe.value) == null ? void 0 : te.find((ce) => (ce == null ? void 0 : ce.prop) === (o == null ? void 0 : o.prop));
|
|
3127
|
+
e[f.prop] = [f.value], I = e;
|
|
3128
|
+
}
|
|
3129
|
+
else if ((o == null ? void 0 : o.directiveLabel) === "#isMain") {
|
|
3130
|
+
let f = {};
|
|
3131
|
+
(ue = xe.value) == null || ue.forEach((ce) => {
|
|
3132
|
+
var Me, k;
|
|
3133
|
+
(ce == null ? void 0 : ce.prop) === t ? f[ce.prop] = (Me = ce == null ? void 0 : ce.selectValue) != null && Me[0] ? [(k = ce == null ? void 0 : ce.selectValue) == null ? void 0 : k[0]] : "" : f[ce.prop] = "";
|
|
3134
|
+
}), I = f;
|
|
3135
|
+
}
|
|
3136
|
+
}
|
|
3137
|
+
if (I) {
|
|
3138
|
+
let f = ae(r);
|
|
3139
|
+
f = f == null ? void 0 : f.map((k) => {
|
|
3140
|
+
var Fe, fl, hl, yl, vl, gl, bl, pl, Ue, Be, Sl, wl, g, Q, Te, al, _l, Kl, Al, Nl, Ll, Ne, z, c, me, Re, Se, $e, De, Wl, na, sa, Ee, Rl, Yl, oa, Ul, da, en, ln, an, rn, nn, sn;
|
|
3141
|
+
if (((Fe = k == null ? void 0 : k.prop) != null && Fe.includes(".") && (I != null && I[(vl = (fl = k == null ? void 0 : k.prop) == null ? void 0 : fl.split(".")) == null ? void 0 : vl[((yl = (hl = k == null ? void 0 : k.prop) == null ? void 0 : hl.split(".")) == null ? void 0 : yl.length) - 1]]) || I != null && I[k == null ? void 0 : k.prop] || I != null && I[(Ue = (pl = (bl = (gl = k == null ? void 0 : k.optionUrl) == null ? void 0 : gl.groupSelect) == null ? void 0 : bl[1]) == null ? void 0 : pl.replaceAll("[", "")) == null ? void 0 : Ue.replaceAll("]", "")]) && ((wl = (Sl = (Be = k == null ? void 0 : k.optionUrl) == null ? void 0 : Be.groupSelect) == null ? void 0 : Sl[1]) != null && wl.includes("[")) && !(k != null && k.relatedValueId))
|
|
3142
|
+
return k.value = (I == null ? void 0 : I[k == null ? void 0 : k.prop]) ?? (I == null ? void 0 : I[(al = (g = k == null ? void 0 : k.prop) == null ? void 0 : g.split(".")) == null ? void 0 : al[((Te = (Q = k == null ? void 0 : k.prop) == null ? void 0 : Q.split(".")) == null ? void 0 : Te.length) - 1]]) ?? (I == null ? void 0 : I[(Nl = (Al = (Kl = (_l = k == null ? void 0 : k.optionUrl) == null ? void 0 : _l.groupSelect) == null ? void 0 : Kl[1]) == null ? void 0 : Al.replaceAll("[", "")) == null ? void 0 : Nl.replaceAll("]", "")]), k;
|
|
3143
|
+
let Ae = I == null ? void 0 : I[k == null ? void 0 : k.prop];
|
|
3144
|
+
return (Ll = k == null ? void 0 : k.prop) != null && Ll.includes(".") && !Ae && ((z = (Ne = o == null ? void 0 : o.prop) == null ? void 0 : Ne.split(".")) == null ? void 0 : z[0]) === ((me = (c = k == null ? void 0 : k.prop) == null ? void 0 : c.split(".")) == null ? void 0 : me[0]) && (Ae = (I == null ? void 0 : I[(De = (Re = k == null ? void 0 : k.prop) == null ? void 0 : Re.split(".")) == null ? void 0 : De[(($e = (Se = k == null ? void 0 : k.prop) == null ? void 0 : Se.split(".")) == null ? void 0 : $e.length) - 1]]) ?? (I == null ? void 0 : I[k == null ? void 0 : k.prop])), x && (Ae || Ae === "") && (k != null && k.relatedValueId) && Pl.value === "新增" && ((k == null ? void 0 : k.prop) !== (o == null ? void 0 : o.prop) || t != null && t.includes((o == null ? void 0 : o.prop) + "·") || t != null && t.includes("·" + (k == null ? void 0 : k.prop))) ? k.value = Ae ?? (I == null ? void 0 : I[(Ee = (sa = (na = (Wl = k == null ? void 0 : k.optionUrl) == null ? void 0 : Wl.groupSelect) == null ? void 0 : na[1]) == null ? void 0 : sa.replaceAll("[", "")) == null ? void 0 : Ee.replaceAll("]", "")]) : (t != null && t.includes("·" + (k == null ? void 0 : k.prop)) || t != null && t.includes(".")) && (k == null ? void 0 : k.prop) !== (o == null ? void 0 : o.prop) && !Array.isArray((Yl = (Rl = xe.value) == null ? void 0 : Rl.find((Cl) => (Cl == null ? void 0 : Cl.prop) === (k == null ? void 0 : k.prop))) == null ? void 0 : Yl.value) ? k.value = Ae ?? "" : ((oa = k == null ? void 0 : k.optionUrl) == null ? void 0 : oa.multiple) === !0 && !Array.isArray((da = (Ul = xe.value) == null ? void 0 : Ul.find((Cl) => (Cl == null ? void 0 : Cl.prop) === (k == null ? void 0 : k.prop))) == null ? void 0 : da.value) ? k.value = ((ln = (en = xe.value) == null ? void 0 : en.find((Cl) => (Cl == null ? void 0 : Cl.prop) === (k == null ? void 0 : k.prop))) == null ? void 0 : ln.value) === "" ? [] : [(rn = (an = xe.value) == null ? void 0 : an.find((Cl) => (Cl == null ? void 0 : Cl.prop) === (k == null ? void 0 : k.prop))) == null ? void 0 : rn.value] : k.value = (sn = (nn = xe.value) == null ? void 0 : nn.find((Cl) => (Cl == null ? void 0 : Cl.prop) === (k == null ? void 0 : k.prop))) == null ? void 0 : sn.value, k;
|
|
3145
|
+
}), xe.value = ae(f);
|
|
3146
|
+
let ce = ae(f);
|
|
3147
|
+
ce = ce == null ? void 0 : ce.map((k) => {
|
|
3148
|
+
var Ae, Fe, fl, hl, yl, vl, gl, bl, pl;
|
|
3149
|
+
return (Fe = (Ae = k == null ? void 0 : k.optionUrl) == null ? void 0 : Ae.menuSelect) != null && Fe.some((Ue) => Ue == null ? void 0 : Ue.includes("[")) && (k.optionUrl.oldMenuSelect = (hl = (fl = ae(k)) == null ? void 0 : fl.optionUrl) == null ? void 0 : hl.menuSelect, k.optionUrl.menuSelect = (vl = (yl = k == null ? void 0 : k.optionUrl) == null ? void 0 : yl.menuSelect) == null ? void 0 : vl.map((Ue) => {
|
|
3150
|
+
var Be, Sl, wl, g;
|
|
3151
|
+
if (Ue != null && Ue.includes("[")) {
|
|
3152
|
+
let Q = (Sl = (Be = Ue == null ? void 0 : Ue.replaceAll("[", "").replaceAll("]", "")) == null ? void 0 : Be.split(":")) == null ? void 0 : Sl[1];
|
|
3153
|
+
Ue = (g = (wl = ae(f)) == null ? void 0 : wl.find((Te) => (Te == null ? void 0 : Te.label) === Q)) == null ? void 0 : g.value;
|
|
3154
|
+
}
|
|
3155
|
+
return Ue;
|
|
3156
|
+
})), ((o == null ? void 0 : o.prop) === (k == null ? void 0 : k.prop) || t === (k == null ? void 0 : k.prop)) && Array.isArray(o.value) && (gl = o.value) != null && gl.every((Ue) => typeof Ue == "string") && (k.selectValue = ((bl = v == null ? void 0 : v.find((Ue) => (Ue == null ? void 0 : Ue.key) === (k == null ? void 0 : k.prop))) == null ? void 0 : bl.value) ?? ((pl = k.value) == null ? void 0 : pl[0])), k;
|
|
3157
|
+
}), xe.value = ce;
|
|
3158
|
+
let Me = {};
|
|
3159
|
+
(se = xe.value) == null || se.forEach((k) => {
|
|
3160
|
+
Me[k.prop] = k == null ? void 0 : k.value;
|
|
3161
|
+
}), Dl.value = Me;
|
|
3162
|
+
}
|
|
3163
|
+
let He = ye.value, qe = {};
|
|
3164
|
+
(_e = xe.value) == null || _e.forEach((f) => {
|
|
3165
|
+
var ce, Me, k, Ae, Fe, fl, hl, yl, vl, gl, bl;
|
|
3166
|
+
if (((f == null ? void 0 : f.directiveLabel) === "#isMain" || (ce = f == null ? void 0 : f.optionUrl) != null && ce.menuId) && Array.isArray(f == null ? void 0 : f.value)) {
|
|
3167
|
+
if (qe[f.prop] || (qe[f.prop] = (k = f.value) == null ? void 0 : k[((Me = f.value) == null ? void 0 : Me.length) - 1]), (Ae = f == null ? void 0 : f.prop) != null && Ae.includes("·")) {
|
|
3168
|
+
let pl = (hl = (fl = (Fe = f == null ? void 0 : f.prop) == null ? void 0 : Fe.split("·")) == null ? void 0 : fl.filter((Be) => Be && Be !== "")) == null ? void 0 : hl.map((Be) => Be == null ? void 0 : Be.trim()), Ue = (bl = (gl = (vl = (yl = f == null ? void 0 : f.selectValue) == null ? void 0 : yl[0]) == null ? void 0 : vl.split(" ")) == null ? void 0 : gl.filter((Be) => Be && Be !== "")) == null ? void 0 : bl.map((Be) => Be == null ? void 0 : Be.trim());
|
|
3169
|
+
pl == null || pl.forEach((Be, Sl) => {
|
|
3170
|
+
qe = Object.assign({}, qe, { [Be]: Ue == null ? void 0 : Ue[Sl] });
|
|
3171
|
+
});
|
|
3172
|
+
}
|
|
3173
|
+
} else
|
|
3174
|
+
qe[f.prop] = (qe == null ? void 0 : qe[f == null ? void 0 : f.prop]) ?? f.value;
|
|
3175
|
+
});
|
|
3176
|
+
let sl = (Pe = xe.value) == null ? void 0 : Pe.find((f) => {
|
|
3177
|
+
var ce;
|
|
3178
|
+
return (f == null ? void 0 : f.directiveLabel) === "#isMain" || ((ce = f == null ? void 0 : f.optionUrl) == null ? void 0 : ce.menuId);
|
|
3179
|
+
});
|
|
3180
|
+
(o == null ? void 0 : o.directiveLabel) === "#isMain" && ((pe = o == null ? void 0 : o.value) == null ? void 0 : pe[((Y = o == null ? void 0 : o.value) == null ? void 0 : Y.length) - 1]) !== "" ? He.push({
|
|
3181
|
+
label: o == null ? void 0 : o.prop,
|
|
3182
|
+
value: (ge = o == null ? void 0 : o.value) == null ? void 0 : ge[((ze = o == null ? void 0 : o.value) == null ? void 0 : ze.length) - 1],
|
|
3183
|
+
objectValue: qe
|
|
3184
|
+
}) : ((ke = sl == null ? void 0 : sl.value) == null ? void 0 : ke.length) > 0 && ((Ye = o == null ? void 0 : o.value) == null ? void 0 : Ye[((je = o == null ? void 0 : o.value) == null ? void 0 : je.length) - 1]) !== "" && (He = He == null ? void 0 : He.map((f) => {
|
|
3185
|
+
var ce;
|
|
3186
|
+
return (f == null ? void 0 : f.value) === ((ce = sl == null ? void 0 : sl.selectValue) == null ? void 0 : ce[0]) && (f.objectValue = qe), f;
|
|
3187
|
+
})), ye.value = He;
|
|
3188
|
+
}
|
|
3189
|
+
Na.value = !0, Ve.value = !1;
|
|
3190
|
+
}, Ks = (e) => e ? (e == null ? void 0 : e.toUpperCase()) === "INPUT" ? "TEXTAREA" : e : "TEXTAREA", zs = (e) => {
|
|
3191
|
+
var u, t;
|
|
3192
|
+
const l = (t = (u = Jl.value) == null ? void 0 : u.find((o) => (o == null ? void 0 : o.label) === (e == null ? void 0 : e.label))) == null ? void 0 : t.multiple, a = e == null ? void 0 : e.prop;
|
|
3193
|
+
if ((e == null ? void 0 : e.formType) != "Select")
|
|
3194
|
+
return;
|
|
3195
|
+
ne.value.forEach((o) => {
|
|
3196
|
+
const p = o == null ? void 0 : o[a];
|
|
3197
|
+
l && kn(p) && (o[a] = [p]), !l && !kn(p) && (o[a] = "");
|
|
3198
|
+
});
|
|
3199
|
+
}, Hr = (e, l) => {
|
|
3200
|
+
var a;
|
|
3201
|
+
return l == null || l.forEach((r) => {
|
|
3202
|
+
e[r == null ? void 0 : r.prop] = r == null ? void 0 : r.value;
|
|
3203
|
+
}), e.children && ((a = e.children) == null ? void 0 : a.length) > 0 && (e.children = e.children.map((r) => Hr(r, l))), e;
|
|
3204
|
+
}, br = (e) => {
|
|
3205
|
+
var a, r, n, u, t, o;
|
|
3206
|
+
Fa("");
|
|
3207
|
+
const l = (a = xe.value) == null ? void 0 : a.reduce((p, b) => (p[b.name] = b.value, p), {});
|
|
3208
|
+
if (((r = Object.keys(l)) == null ? void 0 : r.length) > 0) {
|
|
3209
|
+
Dl.value = l, ea.value = "", ma.value = (n = ne.value) == null ? void 0 : n.length, Ml.value = (u = Fl.value) == null ? void 0 : u.filter((b) => (b == null ? void 0 : b.label) !== "新增");
|
|
3210
|
+
const p = (o = (t = w.value) == null ? void 0 : t.filter((b) => (b == null ? void 0 : b.label) !== "操作")) == null ? void 0 : o.map((b) => {
|
|
3211
|
+
var v, x, N;
|
|
3212
|
+
const O = (x = (v = Jl.value) == null ? void 0 : v.find((M) => (M == null ? void 0 : M.label) === (b == null ? void 0 : b.label))) == null ? void 0 : x.multiple;
|
|
3213
|
+
return zs(b), {
|
|
3214
|
+
...b,
|
|
3215
|
+
contents: (b == null ? void 0 : b.options) ?? [],
|
|
3216
|
+
// type: 'edit',
|
|
3217
|
+
optionUrl: b != null && b.formMenuSelect && ((N = b == null ? void 0 : b.formMenuSelect) == null ? void 0 : N.length) > 0 ? {
|
|
3218
|
+
groupSelect: b == null ? void 0 : b.groupSelect,
|
|
3219
|
+
menuSelect: b == null ? void 0 : b.formMenuSelect,
|
|
3220
|
+
selectRelateType: "",
|
|
3221
|
+
type: b == null ? void 0 : b.formType,
|
|
3222
|
+
multiple: O
|
|
3223
|
+
} : null
|
|
3224
|
+
// 表格编辑视图组件类型:兼容表头类型切换逻辑,优先模型里定义的类型,其次是手动配置的类型
|
|
3225
|
+
// columnType: convertColType(col?.formType) || col?.columnType
|
|
3226
|
+
};
|
|
3227
|
+
});
|
|
3228
|
+
B.value = p == null ? void 0 : p.map((b) => Hr(b, [{
|
|
3229
|
+
prop: "type",
|
|
3230
|
+
value: "edit"
|
|
3231
|
+
}, { prop: "columnType", value: Ks(b == null ? void 0 : b.formType) || (b == null ? void 0 : b.columnType) }])), e === "createClick" && Ka(!1);
|
|
3232
|
+
}
|
|
3233
|
+
}, Aa = {
|
|
3234
|
+
START: "开始时间",
|
|
3235
|
+
END: "结束时间",
|
|
3236
|
+
HOURS: "工时"
|
|
3237
|
+
}, Js = (e, l) => Number(hn(l).diff(hn(e), "day", !0).toFixed(1)), Xr = (e) => {
|
|
3238
|
+
var u;
|
|
3239
|
+
const l = s.itemData, a = (u = l == null ? void 0 : l.find((t) => (t == null ? void 0 : t.key) === "header")) == null ? void 0 : u.contents, r = /* @__PURE__ */ new Map();
|
|
3240
|
+
return a == null || a.forEach((t, o) => {
|
|
3241
|
+
const { label: p } = t;
|
|
3242
|
+
r.set(p, o);
|
|
3243
|
+
}), !r.has(Aa.START) || !r.has(Aa.END) || !r.has(Aa.HOURS) ? e : e == null ? void 0 : e.map((t) => {
|
|
3244
|
+
const o = t == null ? void 0 : t[Aa.START], p = t == null ? void 0 : t[Aa.END], b = Js(o, p);
|
|
3245
|
+
return o && p && (t[Aa.HOURS] = `${b}天`), t;
|
|
3246
|
+
});
|
|
3247
|
+
}, Qr = (e, l, a = 0) => {
|
|
3248
|
+
if (a > ((l == null ? void 0 : l.length) ?? "")) return e;
|
|
3249
|
+
const r = l == null ? void 0 : l[a], n = /* @__PURE__ */ new Map();
|
|
3250
|
+
for (const t of e) {
|
|
3251
|
+
const o = t[r];
|
|
3252
|
+
n.has(o) || n.set(o, []), n.get(o) && n.get(o).push(t);
|
|
3253
|
+
}
|
|
3254
|
+
const u = [];
|
|
3255
|
+
for (const [t, o] of n) {
|
|
3256
|
+
const [p, ...b] = o, O = { ...p };
|
|
3257
|
+
a + 1 === ((l == null ? void 0 : l.length) ?? "") ? O.children = o == null ? void 0 : o.map((v) => (v.level = ae(a) + 1, v)).filter((v, x) => x !== 0) : b.length > 0 && (O.children = Qr(b, l, a + 1)), O.level = a, u.push(O);
|
|
3258
|
+
}
|
|
3259
|
+
return u;
|
|
3260
|
+
}, Yr = (e, l, a) => {
|
|
3261
|
+
var n;
|
|
3262
|
+
if (!(l != null && l.contents) || ((n = l == null ? void 0 : l.contents) == null ? void 0 : n.length) === 0)
|
|
3263
|
+
return e;
|
|
3264
|
+
let r = [];
|
|
3265
|
+
return r = Qr(e, l == null ? void 0 : l.contents, 0), r;
|
|
3266
|
+
}, Zr = async (e, l) => {
|
|
3267
|
+
var N, M, F, S, K, J, $, _, L, i, y, h, q, P, X, d, E, ve, W, C, R, te, ue, se, _e, Pe, Y, pe, ze, ge, ke, je, Ye, U, I, He, qe, sl, f, ce, Me, k, Ae, Fe, fl, hl, yl, vl, gl, bl, pl, Ue, Be, Sl, wl;
|
|
3268
|
+
const a = e == null ? void 0 : e.filter((g) => (g == null ? void 0 : g.key) === "header");
|
|
3269
|
+
e == null || e.filter((g) => (g == null ? void 0 : g.key) === "tableIndexColumn")[0];
|
|
3270
|
+
const r = e == null ? void 0 : e.filter((g) => (g == null ? void 0 : g.key) === "childTree")[0];
|
|
3271
|
+
let n = !0;
|
|
3272
|
+
if ((F = (M = (N = e == null ? void 0 : e.find((g) => (g == null ? void 0 : g.key) === "filterAllType")) == null ? void 0 : N.value) == null ? void 0 : M.find((g) => (g == null ? void 0 : g.value) === "onPamButtonContents")) != null && F.content) {
|
|
3273
|
+
let g = (J = (K = (S = e == null ? void 0 : e.find((Q) => (Q == null ? void 0 : Q.key) === "filterAllType")) == null ? void 0 : S.value) == null ? void 0 : K.find((Q) => (Q == null ? void 0 : Q.value) === "onPamButtonContents")) == null ? void 0 : J.content;
|
|
3274
|
+
g = ($ = g == null ? void 0 : g.split(":")) == null ? void 0 : $[1], g = (_ = g.slice(1, (g == null ? void 0 : g.length) - 1)) == null ? void 0 : _.split(","), n = !!(g != null && g.find((Q) => Q === "操作"));
|
|
3275
|
+
}
|
|
3276
|
+
let u = l;
|
|
3277
|
+
const t = e == null ? void 0 : e.find((g) => (g == null ? void 0 : g.key) === "page"), o = e == null ? void 0 : e.find((g) => (g == null ? void 0 : g.key) === "rowButton"), p = e == null ? void 0 : e.find((g) => (g == null ? void 0 : g.key) === "extraButton"), b = e == null ? void 0 : e.filter((g) => (g == null ? void 0 : g.key) === "tableContents"), O = e == null ? void 0 : e.filter((g) => (g == null ? void 0 : g.key) === "tableIndex");
|
|
3278
|
+
Jl.value = (i = (L = e == null ? void 0 : e.filter((g) => (g == null ? void 0 : g.key) === "tableToForm")) == null ? void 0 : L[0]) == null ? void 0 : i.contents, Ur.value = (t == null ? void 0 : t.contents) ?? !0;
|
|
3279
|
+
let v = [];
|
|
3280
|
+
ha.value === "" ? v = a == null ? void 0 : a[0] : v = (a == null ? void 0 : a.find((g) => (g == null ? void 0 : g.selectLabel) === "(" + ha.value + ")")) ?? (a == null ? void 0 : a.find((g) => !(g != null && g.selectLabel)));
|
|
3281
|
+
let x = [];
|
|
3282
|
+
if (ha.value === "" ? x = O == null ? void 0 : O[0] : x = (O == null ? void 0 : O.find((g) => (g == null ? void 0 : g.selectLabel) === "(" + ha.value + ")")) ?? (O == null ? void 0 : O.find((g) => !(g != null && g.selectLabel))), ((y = v == null ? void 0 : v.contents) == null ? void 0 : y.length) > 0) {
|
|
3283
|
+
let g = [];
|
|
3284
|
+
if (v != null && v.contents.some((z) => Array.isArray(z) && (z == null ? void 0 : z.find((c) => c.children))))
|
|
3285
|
+
Pa.value === "" ? g = (q = (h = pn(v == null ? void 0 : v.contents, n, u)) == null ? void 0 : h[0]) == null ? void 0 : q.filter((z) => !Array.isArray(z)) : (Pa.value.split("-"), g = (P = pn(v == null ? void 0 : v.contents, n, u)) == null ? void 0 : P[0]);
|
|
3286
|
+
else {
|
|
3287
|
+
let z = v != null && v.contents.some((c) => Array.isArray(c)) ? (X = v == null ? void 0 : v.contents) == null ? void 0 : X[0] : v == null ? void 0 : v.contents;
|
|
3288
|
+
z != null && z.find((c) => (c == null ? void 0 : c.label) === "操作") || z.push({
|
|
3289
|
+
label: "操作"
|
|
3290
|
+
}), z == null || z.forEach((c, me) => {
|
|
3291
|
+
var $e, De, Wl, na, sa;
|
|
3292
|
+
let Re = "";
|
|
3293
|
+
(De = ($e = Ge.value) == null ? void 0 : $e.split("/")) == null || De.forEach((Ee) => {
|
|
3294
|
+
var Rl, Yl, oa;
|
|
3295
|
+
if (Ee !== "") {
|
|
3296
|
+
let Ul = (oa = (Yl = (Rl = Ee == null ? void 0 : Ee.split(he + "updateLoading")) == null ? void 0 : Rl[0]) == null ? void 0 : Yl.split(he + "loading")) == null ? void 0 : oa[0];
|
|
3297
|
+
Re = Re === "" ? Re + Ul : Re + "/" + Ul;
|
|
3298
|
+
}
|
|
3299
|
+
}), Re = Re + "/";
|
|
3300
|
+
const Se = (Wl = Jl.value) == null ? void 0 : Wl.find((Ee) => (Ee == null ? void 0 : Ee.prop) === (c == null ? void 0 : c.prop));
|
|
3301
|
+
g.push({
|
|
3302
|
+
label: (c == null ? void 0 : c.label) === "操作" ? n ? "操作" : "" : (c == null ? void 0 : c.label) ?? "",
|
|
3303
|
+
prop: (c == null ? void 0 : c.label) === "操作" ? "operate" : (c == null ? void 0 : c.prop) ?? "a" + me,
|
|
3304
|
+
// width: t?.label === '操作' ? '200' : (t?.width ? parseInt(t.width) : ''),
|
|
3305
|
+
width: c != null && c.width ? parseInt(c.width) : "",
|
|
3306
|
+
fixed: (c == null ? void 0 : c.fixed) ?? void 0,
|
|
3307
|
+
sortable: (c == null ? void 0 : c.sortable) ?? !1,
|
|
3308
|
+
filterable: (c == null ? void 0 : c.filterable) ?? !1,
|
|
3309
|
+
operable: (c == null ? void 0 : c.operable) ?? !1,
|
|
3310
|
+
showSummary: (c == null ? void 0 : c.showSummary) ?? !1,
|
|
3311
|
+
align: (c == null ? void 0 : c.align) ?? "left",
|
|
3312
|
+
showOverflowTooltip: (c == null ? void 0 : c.showOverflowTooltip) ?? !0,
|
|
3313
|
+
isNotDrag: (c == null ? void 0 : c.isNotDrag) ?? !1,
|
|
3314
|
+
isEditCol: (c == null ? void 0 : c.isEditCol) ?? !1,
|
|
3315
|
+
isOperate: (c == null ? void 0 : c.isOperate) ?? !1,
|
|
3316
|
+
id: (c == null ? void 0 : c.id) ?? me,
|
|
3317
|
+
type: (c == null ? void 0 : c.label) === "操作" ? "operate" : void 0,
|
|
3318
|
+
formType: (c == null ? void 0 : c.formType) ?? (c != null && c.groupSelect ? "Select" : ""),
|
|
3319
|
+
isTableColHidden: c == null ? void 0 : c.isTableColHidden,
|
|
3320
|
+
isFormColHidden: c == null ? void 0 : c.isFormColHidden,
|
|
3321
|
+
disabled: c == null ? void 0 : c.disabled,
|
|
3322
|
+
options: (c == null ? void 0 : c.options) ?? [],
|
|
3323
|
+
value: (c == null ? void 0 : c.value) ?? "",
|
|
3324
|
+
formMenuSelect: (c == null ? void 0 : c.formMenuSelect) ?? [],
|
|
3325
|
+
isRoute: (c == null ? void 0 : c.isRoute) ?? !1,
|
|
3326
|
+
groupSelect: c != null && c.groupSelect ? (na = c == null ? void 0 : c.groupSelect) == null ? void 0 : na.replaceAll('"', "").split(":") : [],
|
|
3327
|
+
isMainKey: (c == null ? void 0 : c.isMainKey) || (c == null ? void 0 : c.directiveLabel) === "#isMain",
|
|
3328
|
+
// 同步弹窗列类型到表格列类型
|
|
3329
|
+
columnType: (Se == null ? void 0 : Se.type) || (c == null ? void 0 : c.columnType) || "TEXTAREA",
|
|
3330
|
+
directiveLabel: c == null ? void 0 : c.directiveLabel,
|
|
3331
|
+
directiveColor: (c == null ? void 0 : c.directiveColor) ?? !1,
|
|
3332
|
+
isExistChild: !!(c != null && c.directiveLabel && (u != null && u[Re]) && !((sa = c == null ? void 0 : c.directiveLabel) != null && sa.includes("@")) && (c == null ? void 0 : c.directiveLabel) === "#isMain"),
|
|
3333
|
+
childPath: (c == null ? void 0 : c.directiveLabel) !== "#isMain" ? Re : void 0,
|
|
3334
|
+
allSelectionContents: (c == null ? void 0 : c.allSelectionContents) ?? [],
|
|
3335
|
+
selectFilter: c == null ? void 0 : c.selectFilter,
|
|
3336
|
+
menuId: c == null ? void 0 : c.menuId,
|
|
3337
|
+
filterContent: c == null ? void 0 : c.filterContent,
|
|
3338
|
+
relatedValueId: c == null ? void 0 : c.relatedValueId
|
|
3339
|
+
});
|
|
3340
|
+
});
|
|
3341
|
+
}
|
|
3342
|
+
const Q = go(g);
|
|
3343
|
+
await es(Q), Ai(kl.value, Q), B.value = Q, nr.value = Q, A.value = (d = B.value) == null ? void 0 : d.map((z) => z == null ? void 0 : z.label);
|
|
3344
|
+
let Te = (ve = (E = fn(B.value)) == null ? void 0 : E.filter((z) => (z == null ? void 0 : z.type) !== "operate")) == null ? void 0 : ve.map((z, c) => ({
|
|
3345
|
+
prop: (z == null ? void 0 : z.prop) ?? "a" + c,
|
|
3346
|
+
column: z.label
|
|
3347
|
+
}));
|
|
3348
|
+
Gl.value = Te;
|
|
3349
|
+
let al = [];
|
|
3350
|
+
ha.value === "" ? al = b == null ? void 0 : b[0] : al = (b == null ? void 0 : b.find((z) => (z == null ? void 0 : z.selectLabel) === "(" + ha.value + ")")) ?? (b == null ? void 0 : b.find((z) => !(z != null && z.selectLabel)));
|
|
3351
|
+
let _l = Array.isArray((W = al == null ? void 0 : al.contents) == null ? void 0 : W[0]) && ((C = al == null ? void 0 : al.contents) != null && C[0].every((z) => Array.isArray(z))) ? (R = al == null ? void 0 : al.contents) == null ? void 0 : R[0] : al == null ? void 0 : al.contents;
|
|
3352
|
+
x != null && x.contents && ((te = x == null ? void 0 : x.contents) == null ? void 0 : te.length) !== 0 && (_l = (ue = ae(_l)) == null ? void 0 : ue.map((z, c) => {
|
|
3353
|
+
if (!Array.isArray(z)) {
|
|
3354
|
+
let me = {};
|
|
3355
|
+
for (let Re in z)
|
|
3356
|
+
Re !== "id" && Re !== "index" && (me[Re] = z[Re]);
|
|
3357
|
+
z = Object.values(me);
|
|
3358
|
+
}
|
|
3359
|
+
return z;
|
|
3360
|
+
}));
|
|
3361
|
+
const Kl = !!((se = B.value) != null && se.find((z) => z.prop === "index"));
|
|
3362
|
+
_l = Tn(_l, x == null ? void 0 : x.contents, Kl);
|
|
3363
|
+
const Al = [];
|
|
3364
|
+
_l == null || _l.forEach((z, c) => {
|
|
3365
|
+
var Re;
|
|
3366
|
+
let me = {};
|
|
3367
|
+
if (Array.isArray(z)) {
|
|
3368
|
+
let Se = [];
|
|
3369
|
+
z == null || z.filter(($e) => !($e != null && $e.id)).forEach(($e, De) => {
|
|
3370
|
+
var Wl, na, sa, Ee, Rl, Yl;
|
|
3371
|
+
if ((Wl = Te == null ? void 0 : Te[De]) != null && Wl.prop && !Array.isArray($e)) {
|
|
3372
|
+
let oa = {};
|
|
3373
|
+
oa[Te[De].column] = $e, Qe != null && Qe.value && ((na = Qe == null ? void 0 : Qe.value) == null ? void 0 : na.length) > 0 && ((sa = Qe == null ? void 0 : Qe.value) != null && sa.find((Ul) => JSON.stringify(Ul == null ? void 0 : Ul[0]) === JSON.stringify(oa))) && (Se = (Ee = Qe == null ? void 0 : Qe.value) == null ? void 0 : Ee.find((Ul) => JSON.stringify(Ul == null ? void 0 : Ul[0]) === JSON.stringify(oa))), Se && Se.length > 0 ? me[Te[De].prop] = Se != null && Se.find((Ul) => {
|
|
3374
|
+
var da;
|
|
3375
|
+
return ((da = Object.keys(Ul)) == null ? void 0 : da[0]) === Te[De].column;
|
|
3376
|
+
}) ? (Rl = Se == null ? void 0 : Se.find((Ul) => {
|
|
3377
|
+
var da;
|
|
3378
|
+
return ((da = Object.keys(Ul)) == null ? void 0 : da[0]) === Te[De].column;
|
|
3379
|
+
})) == null ? void 0 : Rl[Te[De].column] : $e : me[Te[De].prop] = $e;
|
|
3380
|
+
} else Array.isArray($e) && ((Yl = Te[De]) != null && Yl.prop ? me[Te[De].prop] = $e : me.children = Cr($e, Te));
|
|
3381
|
+
});
|
|
3382
|
+
} else
|
|
3383
|
+
me = z;
|
|
3384
|
+
if (Array.isArray(z) && z.some((Se) => Se == null ? void 0 : Se.id)) {
|
|
3385
|
+
const Se = (Re = z == null ? void 0 : z.find(($e) => $e.id)) == null ? void 0 : Re.id;
|
|
3386
|
+
Al.push(Object.assign(me, { id: Nr(Se) }));
|
|
3387
|
+
} else me.id ? Al.push(me) : Al.push(Object.assign(me, { id: c.toString() }));
|
|
3388
|
+
});
|
|
3389
|
+
try {
|
|
3390
|
+
const z = JSON.parse(sessionStorage.getItem("ocr_last_saved_table") || "null"), c = JSON.parse(sessionStorage.getItem("ocr_last_saved_ids") || "null"), me = z == null ? void 0 : z.tableId, Re = z == null ? void 0 : z.compIndex;
|
|
3391
|
+
if (me && Array.isArray(c) && c.length > 0 && String(me) === String(s == null ? void 0 : s.parentTableId) && String(Re) === String(s == null ? void 0 : s.index)) {
|
|
3392
|
+
const Se = new Set(Al.map((De) => String(De == null ? void 0 : De.id))), $e = c.filter((De) => !Se.has(String(De)));
|
|
3393
|
+
if ($e.length > 0) {
|
|
3394
|
+
const De = z == null ? void 0 : z.pageKey, Wl = De != null && De.startsWith("/") ? De.substring(1) : De;
|
|
3395
|
+
((l == null ? void 0 : l[De]) || (l == null ? void 0 : l[Wl]) || []).filter(
|
|
3396
|
+
(Ee) => {
|
|
3397
|
+
var Rl, Yl;
|
|
3398
|
+
return ((Rl = Ee == null ? void 0 : Ee.key) == null ? void 0 : Rl.type) === "data" && String((Yl = Ee == null ? void 0 : Ee.key) == null ? void 0 : Yl.tableId) === String(me) && $e.includes(Ee == null ? void 0 : Ee.id);
|
|
3399
|
+
}
|
|
3400
|
+
).forEach((Ee) => {
|
|
3401
|
+
var Rl;
|
|
3402
|
+
Se.has(String(Ee == null ? void 0 : Ee.id)) || (Al.push({ id: Ee == null ? void 0 : Ee.id, ...((Rl = Ee == null ? void 0 : Ee.value) == null ? void 0 : Rl.tableData) || {} }), Se.add(String(Ee == null ? void 0 : Ee.id)));
|
|
3403
|
+
});
|
|
3404
|
+
}
|
|
3405
|
+
}
|
|
3406
|
+
} catch {
|
|
3407
|
+
}
|
|
3408
|
+
const Nl = Array.from(((_e = Bl.value) == null ? void 0 : _e.values()) || []).filter(
|
|
3409
|
+
(z) => (z == null ? void 0 : z._isOCRRow) && (z == null ? void 0 : z._ocrTableId) === (s == null ? void 0 : s.index)
|
|
3410
|
+
);
|
|
3411
|
+
ne.value = Yr(Al, r, B.value), Vl.value = Al, (Pe = Vl.value) == null || Pe.forEach((z) => {
|
|
3412
|
+
var c;
|
|
3413
|
+
(c = Bl.value) == null || c.set(z.id, z);
|
|
3414
|
+
});
|
|
3415
|
+
const Ll = JSON.parse(sessionStorage.getItem("ocr_last_saved_table") || "null"), Ne = JSON.parse(sessionStorage.getItem("ocr_last_saved_ids") || "null");
|
|
3416
|
+
if (Ll && Array.isArray(Ne) && Ne.length > 0 && String(Ll == null ? void 0 : Ll.compIndex) === String(s == null ? void 0 : s.index)) {
|
|
3417
|
+
const z = new Set((Vl.value || []).map((c) => String(c == null ? void 0 : c.id)));
|
|
3418
|
+
Ne.filter((c) => !z.has(String(c)));
|
|
3419
|
+
}
|
|
3420
|
+
if (Nl.length > 0) {
|
|
3421
|
+
const z = new Set((ne.value || []).map((me) => me == null ? void 0 : me.id)), c = Nl.filter((me) => !z.has(me.id));
|
|
3422
|
+
c.length > 0 && (ne.value = [...ne.value || [], ...c], Vl.value = [...Vl.value || [], ...c], c.forEach((me) => {
|
|
3423
|
+
var Re;
|
|
3424
|
+
return (Re = Bl.value) == null ? void 0 : Re.set(me.id, me);
|
|
3425
|
+
}));
|
|
3426
|
+
}
|
|
3427
|
+
} else
|
|
3428
|
+
B.value = [], w.value = [], ne.value = [], Vl.value = [], Bl.value = /* @__PURE__ */ new Map();
|
|
3429
|
+
if (((Y = o == null ? void 0 : o.contents) == null ? void 0 : Y.length) > 0)
|
|
3430
|
+
if ((ge = (ze = (pe = e == null ? void 0 : e.find((g) => (g == null ? void 0 : g.key) === "filterAllType")) == null ? void 0 : pe.value) == null ? void 0 : ze.find((g) => (g == null ? void 0 : g.value) === "onRowButtonContents")) != null && ge.content) {
|
|
3431
|
+
let g = (Ye = (je = (ke = e == null ? void 0 : e.find((Q) => (Q == null ? void 0 : Q.key) === "filterAllType")) == null ? void 0 : ke.value) == null ? void 0 : je.find((Q) => (Q == null ? void 0 : Q.value) === "onButtonContents")) == null ? void 0 : Ye.content;
|
|
3432
|
+
g = (U = g == null ? void 0 : g.split(":")) == null ? void 0 : U[1], g = (I = g.slice(1, (g == null ? void 0 : g.length) - 1)) == null ? void 0 : I.split(","), ua.value = (He = o == null ? void 0 : o.contents) == null ? void 0 : He.filter((Q) => g == null ? void 0 : g.find((Te) => Te === (Q == null ? void 0 : Q.label)));
|
|
3433
|
+
} else
|
|
3434
|
+
ua.value = o == null ? void 0 : o.contents;
|
|
3435
|
+
else
|
|
3436
|
+
ua.value = [];
|
|
3437
|
+
if (((qe = p == null ? void 0 : p.contents) == null ? void 0 : qe.length) > 0)
|
|
3438
|
+
if ((ce = (f = (sl = e == null ? void 0 : e.find((g) => (g == null ? void 0 : g.key) === "filterAllType")) == null ? void 0 : sl.value) == null ? void 0 : f.find((g) => (g == null ? void 0 : g.value) === "onButtonContents")) != null && ce.content) {
|
|
3439
|
+
let g = (Ae = (k = (Me = e == null ? void 0 : e.find((Q) => (Q == null ? void 0 : Q.key) === "filterAllType")) == null ? void 0 : Me.value) == null ? void 0 : k.find((Q) => (Q == null ? void 0 : Q.value) === "onButtonContents")) == null ? void 0 : Ae.content;
|
|
3440
|
+
if (g = (Fe = g == null ? void 0 : g.split(":")) == null ? void 0 : Fe[1], g = (fl = g.slice(1, (g == null ? void 0 : g.length) - 1)) == null ? void 0 : fl.split(","), Ml.value = (hl = p == null ? void 0 : p.contents) == null ? void 0 : hl.filter((Q) => g == null ? void 0 : g.find((Te) => Te === (Q == null ? void 0 : Q.label))), Fl.value = (yl = p == null ? void 0 : p.contents) == null ? void 0 : yl.filter((Q) => g == null ? void 0 : g.find((Te) => Te === (Q == null ? void 0 : Q.label))), (vl = p == null ? void 0 : p.contents) != null && vl.some((Q) => (Q == null ? void 0 : Q.label) === "OCR识别") && !((gl = Ml.value) != null && gl.some((Q) => (Q == null ? void 0 : Q.label) === "OCR识别"))) {
|
|
3441
|
+
const Q = (bl = p == null ? void 0 : p.contents) == null ? void 0 : bl.find((Te) => (Te == null ? void 0 : Te.label) === "OCR识别");
|
|
3442
|
+
Ml.value = [...Ml.value, Q], Fl.value = [...Fl.value, Q];
|
|
3443
|
+
}
|
|
3444
|
+
Oe.value = !!(g != null && g.find((Q) => Q === "搜索")), el.value = !!(g != null && g.find((Q) => Q === "块状显示"));
|
|
3445
|
+
} else
|
|
3446
|
+
Ml.value = p == null ? void 0 : p.contents, Fl.value = p == null ? void 0 : p.contents;
|
|
3447
|
+
else
|
|
3448
|
+
Ml.value = [], Fl.value = [];
|
|
3449
|
+
(pl = Ml.value) != null && pl.some((g) => (g == null ? void 0 : g.label) === "OCR识别") || (Ml.value = [...Ml.value || [], { label: "OCR识别" }]), (Ue = Fl.value) != null && Ue.some((g) => (g == null ? void 0 : g.label) === "OCR识别") || (Fl.value = [...Fl.value || [], { label: "OCR识别" }]), ma.value = ((Be = ne == null ? void 0 : ne.value) == null ? void 0 : Be.length) ?? 0, Xr(ne.value), $a.value = ne.value, Hl.value && (B.value = (wl = (Sl = w.value) == null ? void 0 : Sl.filter((g) => (g == null ? void 0 : g.label) !== "操作")) == null ? void 0 : wl.map((g) => {
|
|
3450
|
+
var Q;
|
|
3451
|
+
return {
|
|
3452
|
+
...g,
|
|
3453
|
+
type: "edit",
|
|
3454
|
+
optionUrl: g != null && g.formMenuSelect && ((Q = g == null ? void 0 : g.formMenuSelect) == null ? void 0 : Q.length) > 0 ? {
|
|
3455
|
+
groupSelect: g == null ? void 0 : g.groupSelect,
|
|
3456
|
+
menuSelect: g == null ? void 0 : g.formMenuSelect,
|
|
3457
|
+
selectRelateType: "",
|
|
3458
|
+
type: g == null ? void 0 : g.formType
|
|
3459
|
+
} : null
|
|
3460
|
+
};
|
|
3461
|
+
}), br());
|
|
3462
|
+
};
|
|
3463
|
+
$l(
|
|
3464
|
+
() => [s.itemData, ha.value, Nn.value, Pa.value, Qe == null ? void 0 : Qe.value],
|
|
3465
|
+
async () => {
|
|
3466
|
+
var e, l, a, r, n, u;
|
|
3467
|
+
if ((e = s == null ? void 0 : s.itemData) != null && e.find((t) => (t == null ? void 0 : t.key) === "columnPath") && !((l = Ea.value) != null && l.find((t) => {
|
|
3468
|
+
var o, p;
|
|
3469
|
+
return (t == null ? void 0 : t.key) === ((p = (o = s == null ? void 0 : s.itemData) == null ? void 0 : o.find((b) => (b == null ? void 0 : b.key) === "columnPath")) == null ? void 0 : p.contents);
|
|
3470
|
+
}))) {
|
|
3471
|
+
let t = Ea.value, o = {
|
|
3472
|
+
key: (r = (a = s == null ? void 0 : s.itemData) == null ? void 0 : a.find((p) => (p == null ? void 0 : p.key) === "columnPath")) == null ? void 0 : r.contents,
|
|
3473
|
+
value: (u = (n = s == null ? void 0 : s.itemData) == null ? void 0 : n.find((p) => (p == null ? void 0 : p.key) === "columnUsingPath")) == null ? void 0 : u.contents
|
|
3474
|
+
};
|
|
3475
|
+
t != null && t.find((p) => (p == null ? void 0 : p.key) === (o == null ? void 0 : o.key)) ? t = t == null ? void 0 : t.map((p) => ((p == null ? void 0 : p.key) === (o == null ? void 0 : o.key) && (p.value = o.value), p)) : t.push(o), dl.setTableViewContents(t);
|
|
3476
|
+
}
|
|
3477
|
+
Zr(s.itemData, s.allMapContents);
|
|
3478
|
+
},
|
|
3479
|
+
{ deep: !0, immediate: !0 }
|
|
3480
|
+
), $l(() => s == null ? void 0 : s.operatingForm, (e) => {
|
|
3481
|
+
e != null && e.form && (Fa(e == null ? void 0 : e.form), Pl.value = e == null ? void 0 : e.dialogTitle, Qa.value = !0, la.value = !0);
|
|
3482
|
+
}, { immediate: !0, deep: !0 });
|
|
3483
|
+
const Ir = () => {
|
|
3484
|
+
var e;
|
|
3485
|
+
(e = be.value) != null && e.includes("read") && (Hl.value = !Hl.value);
|
|
3486
|
+
}, Ws = () => {
|
|
3487
|
+
Va.value = !Va.value;
|
|
3488
|
+
};
|
|
3489
|
+
$l(() => {
|
|
3490
|
+
var e;
|
|
3491
|
+
return (e = s == null ? void 0 : s.config) == null ? void 0 : e.viewport;
|
|
3492
|
+
}, (e) => {
|
|
3493
|
+
var l;
|
|
3494
|
+
be.value = e, (e == null ? void 0 : e.length) === 0 ? Hl.value = !1 : (e != null && e.includes("read") || (Hl.value = !0), e != null && e.includes("edit") || (Hl.value = !1)), fe.value = ((l = s == null ? void 0 : s.config) == null ? void 0 : l.showIndex) || Hl.value;
|
|
3495
|
+
}, { immediate: !0 }), $l(() => Hl.value, (e) => {
|
|
3496
|
+
var l;
|
|
3497
|
+
e ? (br("viewChange"), dl.setCacheUpdatingData(null)) : (Ml.value = Fl.value, B.value = nr.value, Da.value && (dl.setTableLoading(s == null ? void 0 : s.index), Le("change", Da.value))), Z.value = e, fe.value = e || ((l = s == null ? void 0 : s.config) == null ? void 0 : l.showIndex);
|
|
3498
|
+
}, { immediate: !0 }), $l(() => {
|
|
3499
|
+
var e;
|
|
3500
|
+
return (e = Lr.value) == null ? void 0 : e.length;
|
|
3501
|
+
}, (e) => {
|
|
3502
|
+
e === 0 && (oe.currentPage = 1);
|
|
3503
|
+
}), $l(() => s == null ? void 0 : s.compNames, (e) => {
|
|
3504
|
+
cl.contents = [
|
|
3505
|
+
{
|
|
3506
|
+
label: "列表名",
|
|
3507
|
+
prop: "groupName",
|
|
3508
|
+
name: "列表名",
|
|
3509
|
+
type: "select",
|
|
3510
|
+
value: "",
|
|
3511
|
+
id: 0,
|
|
3512
|
+
contents: e || [],
|
|
3513
|
+
width: 1
|
|
3514
|
+
}
|
|
3515
|
+
];
|
|
3516
|
+
}, { immediate: !0 }), G(!1);
|
|
3517
|
+
const qs = (e, l) => {
|
|
3518
|
+
var a;
|
|
3519
|
+
br("createClick"), l === oe.pageSize && (oe.currentPage = Math.ceil(((a = ne.value) == null ? void 0 : a.length) / oe.pageSize));
|
|
3520
|
+
}, Gs = (e, l, a) => {
|
|
3521
|
+
var r;
|
|
3522
|
+
Gr(a, e, l), Dl.value = ae(e), ea.value = e == null ? void 0 : e.id, ma.value = (r = ne.value) == null ? void 0 : r.length, Pl.value = typeof (e == null ? void 0 : e.id) == "string" ? "新增" : "编辑", Ka(!1);
|
|
3523
|
+
}, El = (e) => {
|
|
3524
|
+
var p, b, O, v, x, N, M, F, S, K;
|
|
3525
|
+
const { row: l, column: a, item: r, slotData: n } = e;
|
|
3526
|
+
let u = l != null && l[a == null ? void 0 : a.prop] || (l == null ? void 0 : l[a == null ? void 0 : a.prop]) === 0 ? ((b = (p = l == null ? void 0 : l[a == null ? void 0 : a.prop]) == null ? void 0 : p[0]) == null ? void 0 : b.contents) ?? ((l == null ? void 0 : l[a == null ? void 0 : a.prop]) === 0 ? "0" : l == null ? void 0 : l[a == null ? void 0 : a.prop]) : ((v = (O = l == null ? void 0 : l[r == null ? void 0 : r.prop]) == null ? void 0 : O[0]) == null ? void 0 : v.contents) ?? (l == null ? void 0 : l[r == null ? void 0 : r.prop]) ?? ((N = (x = n == null ? void 0 : n[r == null ? void 0 : r.prop]) == null ? void 0 : x[0]) == null ? void 0 : N.contents) ?? (n == null ? void 0 : n[r == null ? void 0 : r.prop]) ?? ((S = (F = l == null ? void 0 : l[(M = r == null ? void 0 : r.child) == null ? void 0 : M.prop]) == null ? void 0 : F[0]) == null ? void 0 : S.contents) ?? (l == null ? void 0 : l[(K = r == null ? void 0 : r.child) == null ? void 0 : K.prop]), o = Array.isArray(u) && !(u != null && u.every((J) => typeof J == "string" || typeof J == "number")) ? "查看" : u;
|
|
3527
|
+
return o = Array.isArray(o) ? o.join(",") : o, o;
|
|
3528
|
+
}, Hs = (e) => {
|
|
3529
|
+
var b, O, v, x, N, M, F, S, K, J;
|
|
3530
|
+
const { row: l, column: a, item: r, slotData: n } = e;
|
|
3531
|
+
let u = l != null && l[a == null ? void 0 : a.prop] ? ((O = (b = l == null ? void 0 : l[a == null ? void 0 : a.prop]) == null ? void 0 : b[0]) == null ? void 0 : O.contents) ?? (l == null ? void 0 : l[a == null ? void 0 : a.prop]) : ((x = (v = l == null ? void 0 : l[r == null ? void 0 : r.prop]) == null ? void 0 : v[0]) == null ? void 0 : x.contents) ?? (l == null ? void 0 : l[r == null ? void 0 : r.prop]) ?? ((M = (N = n == null ? void 0 : n[r == null ? void 0 : r.prop]) == null ? void 0 : N[0]) == null ? void 0 : M.contents) ?? (n == null ? void 0 : n[r == null ? void 0 : r.prop]) ?? ((K = (S = l == null ? void 0 : l[(F = r == null ? void 0 : r.child) == null ? void 0 : F.prop]) == null ? void 0 : S[0]) == null ? void 0 : K.contents) ?? (l == null ? void 0 : l[(J = r == null ? void 0 : r.child) == null ? void 0 : J.prop]);
|
|
3532
|
+
const o = Array.isArray(u) && !(u != null && u.every(($) => typeof $ == "string" || typeof $ == "number")), p = Array.isArray(u) && (u == null ? void 0 : u.find(($) => $ == null ? void 0 : $.url));
|
|
3533
|
+
return o && p;
|
|
3534
|
+
}, Xs = (e) => {
|
|
3535
|
+
var t, o, p, b, O, v, x, N, M, F;
|
|
3536
|
+
const { row: l, column: a, item: r, slotData: n } = e || {};
|
|
3537
|
+
let u = l != null && l[a == null ? void 0 : a.prop] ? ((o = (t = l == null ? void 0 : l[a == null ? void 0 : a.prop]) == null ? void 0 : t[0]) == null ? void 0 : o.contents) ?? (l == null ? void 0 : l[a == null ? void 0 : a.prop]) : ((b = (p = l == null ? void 0 : l[r == null ? void 0 : r.prop]) == null ? void 0 : p[0]) == null ? void 0 : b.contents) ?? (l == null ? void 0 : l[r == null ? void 0 : r.prop]) ?? ((v = (O = n == null ? void 0 : n[r == null ? void 0 : r.prop]) == null ? void 0 : O[0]) == null ? void 0 : v.contents) ?? (n == null ? void 0 : n[r == null ? void 0 : r.prop]) ?? ((M = (N = l == null ? void 0 : l[(x = r == null ? void 0 : r.child) == null ? void 0 : x.prop]) == null ? void 0 : N[0]) == null ? void 0 : M.contents) ?? (l == null ? void 0 : l[(F = r == null ? void 0 : r.child) == null ? void 0 : F.prop]);
|
|
3538
|
+
return Array.isArray(u) ? (u == null ? void 0 : u.filter((S) => (S == null ? void 0 : S.url) || (S == null ? void 0 : S.downloadUrl))) ?? [] : [];
|
|
3539
|
+
}, Qs = (e, l) => e.find((a) => Object.values(a).some((r) => r === l));
|
|
3540
|
+
return $l(() => Un.value, async (e) => {
|
|
3541
|
+
if (e) {
|
|
3542
|
+
ml.setContentLoading(!0), await Ja();
|
|
3543
|
+
const l = Qs(ne.value, e == null ? void 0 : e.data);
|
|
3544
|
+
if (!l) return ml.setContentLoading(!1);
|
|
3545
|
+
await Mr(e == null ? void 0 : e.data, null, l, { data: e == null ? void 0 : e.data, isMainKey: !0 }), ml.setContentLoading(!1);
|
|
3546
|
+
}
|
|
3547
|
+
}, { deep: !0, immediate: !0 }), $l(() => s == null ? void 0 : s.cacheNewData, (e) => {
|
|
3548
|
+
var l;
|
|
3549
|
+
e && (Array.isArray(e) ? e.forEach((a) => {
|
|
3550
|
+
var r, n, u, t, o, p, b;
|
|
3551
|
+
if ((a == null ? void 0 : a.compId) === (s == null ? void 0 : s.index) && (a != null && a.resId) && ((r = a == null ? void 0 : a.data) != null && r.id) && (ne.value = (n = ne.value) == null ? void 0 : n.map((O) => {
|
|
3552
|
+
var v;
|
|
3553
|
+
return (O == null ? void 0 : O.id) === ((v = a == null ? void 0 : a.data) == null ? void 0 : v.id) ? {
|
|
3554
|
+
...O,
|
|
3555
|
+
id: a == null ? void 0 : a.resId
|
|
3556
|
+
} : O;
|
|
3557
|
+
}), (o = (u = Bl.value) == null ? void 0 : u.has) != null && o.call(u, (t = a == null ? void 0 : a.data) == null ? void 0 : t.id))) {
|
|
3558
|
+
const O = Bl.value.get((p = a == null ? void 0 : a.data) == null ? void 0 : p.id);
|
|
3559
|
+
Bl.value.delete((b = a == null ? void 0 : a.data) == null ? void 0 : b.id), Bl.value.set(a == null ? void 0 : a.resId, { ...O, id: a == null ? void 0 : a.resId });
|
|
3560
|
+
}
|
|
3561
|
+
}) : (e == null ? void 0 : e.compId) === (s == null ? void 0 : s.index) && (ne.value = (l = ne.value) == null ? void 0 : l.map((a) => {
|
|
3562
|
+
var r;
|
|
3563
|
+
return (a == null ? void 0 : a.id) === ((r = e == null ? void 0 : e.data) == null ? void 0 : r.id) ? {
|
|
3564
|
+
...a,
|
|
3565
|
+
id: e == null ? void 0 : e.resId
|
|
3566
|
+
} : a;
|
|
3567
|
+
})));
|
|
3568
|
+
}, { immediate: !0, deep: !0 }), (e, l) => {
|
|
3569
|
+
var J, $, _, L;
|
|
3570
|
+
const a = ol("svg-icon"), r = ol("el-popover"), n = ol("el-switch"), u = ol("el-checkbox"), t = ol("el-radio"), o = ol("el-radio-group"), p = ol("el-checkbox-group"), b = ol("el-button"), O = ol("LookComponent"), v = ol("el-icon"), x = ol("el-upload"), N = ol("el-alert"), M = ol("el-table-column"), F = ol("el-input"), S = ol("el-table"), K = ao("loading");
|
|
3571
|
+
return ee(), Ce("div", Di, [
|
|
3572
|
+
Er.value ? (ee(), Xe(Oo, {
|
|
3573
|
+
id: "excel-table",
|
|
3574
|
+
pageObj: oe,
|
|
3575
|
+
showIndex: fe.value,
|
|
3576
|
+
isTree: (J = D.compItem) == null ? void 0 : J.isTree,
|
|
3577
|
+
summaryInfo: ie,
|
|
3578
|
+
columns: B.value,
|
|
3579
|
+
defaultSort: le,
|
|
3580
|
+
isCardViewport: Va.value,
|
|
3581
|
+
checkedColumns: A.value,
|
|
3582
|
+
key: cr.value + JSON.stringify(B.value),
|
|
3583
|
+
tableData: Lr.value,
|
|
3584
|
+
isEditViewport: Hl.value,
|
|
3585
|
+
isShowPagination: Ur.value,
|
|
3586
|
+
isShowEdit: !1,
|
|
3587
|
+
isShowDelete: !1,
|
|
3588
|
+
allowSelect: Z.value,
|
|
3589
|
+
onDbClickRow: ts,
|
|
3590
|
+
extraButton: Ml.value,
|
|
3591
|
+
rowButton: ua.value,
|
|
3592
|
+
cacheExtraButtons: Fl.value,
|
|
3593
|
+
isClearSelection: (($ = Xl.value) == null ? void 0 : $.length) === 0,
|
|
3594
|
+
onDoCurrentChange: Jn,
|
|
3595
|
+
onDoSizeChange: Wn,
|
|
3596
|
+
onContentClick: Mr,
|
|
3597
|
+
onRowClick: cs,
|
|
3598
|
+
onSelectChange: Zn,
|
|
3599
|
+
onCellChange: Gs,
|
|
3600
|
+
onChange: Gr,
|
|
3601
|
+
onPreview: Pr,
|
|
3602
|
+
onSubmitEditingTable: Yn,
|
|
3603
|
+
onHandleColEditChange: Xn,
|
|
3604
|
+
onHandleColTypeChange: Qn,
|
|
3605
|
+
onClickButton: lr
|
|
3606
|
+
}, ro({
|
|
3607
|
+
headerButton: H((i) => {
|
|
3608
|
+
var y, h;
|
|
3609
|
+
return [
|
|
3610
|
+
D.showHeader ? (ee(), Xe(Yo, {
|
|
3611
|
+
key: 0,
|
|
3612
|
+
pageLayout: D.pageLayout,
|
|
3613
|
+
lockingPage: zl(Ga) === zl(Ge),
|
|
3614
|
+
filterValues: Br.value,
|
|
3615
|
+
selectNums: (y = Xl.value) == null ? void 0 : y.length,
|
|
3616
|
+
dataNums: (h = ne.value) == null ? void 0 : h.length,
|
|
3617
|
+
compName: D.compName,
|
|
3618
|
+
isDevMode: D.isDevMode,
|
|
3619
|
+
buttons: i.buttons,
|
|
3620
|
+
onButtonClick: l[1] || (l[1] = (q) => lr(q, "", {})),
|
|
3621
|
+
columns: B.value,
|
|
3622
|
+
onFilter: us,
|
|
3623
|
+
onGetImportData: Gn,
|
|
3624
|
+
level: D.level,
|
|
3625
|
+
filterShow: Oe.value
|
|
3626
|
+
}, null, 8, ["pageLayout", "lockingPage", "filterValues", "selectNums", "dataNums", "compName", "isDevMode", "buttons", "columns", "level", "filterShow"])) : Ke("", !0)
|
|
3627
|
+
];
|
|
3628
|
+
}),
|
|
3629
|
+
viewport: H(() => {
|
|
3630
|
+
var i, y, h, q;
|
|
3631
|
+
return [
|
|
3632
|
+
((i = ne.value) == null ? void 0 : i.length) > 0 && D.allowOperate && el.value ? (ee(), Ce("div", ji, [
|
|
3633
|
+
(y = be.value) != null && y.includes("read") && ((h = be.value) != null && h.includes("edit")) && ((q = ua.value) != null && q.some((P) => (P == null ? void 0 : P.label) === "编辑")) && !Va.value && zl(Ga) !== zl(Ge) ? (ee(), Ce("span", {
|
|
3634
|
+
key: 0,
|
|
3635
|
+
title: "编辑表格",
|
|
3636
|
+
onClick: Ir
|
|
3637
|
+
}, [
|
|
3638
|
+
V(a, {
|
|
3639
|
+
name: "editTable",
|
|
3640
|
+
class: "view-icon"
|
|
3641
|
+
})
|
|
3642
|
+
])) : Ke("", !0),
|
|
3643
|
+
de("span", {
|
|
3644
|
+
title: "卡片视图",
|
|
3645
|
+
onClick: Ws
|
|
3646
|
+
}, [
|
|
3647
|
+
V(a, {
|
|
3648
|
+
name: "cardViewport",
|
|
3649
|
+
class: "view-icon"
|
|
3650
|
+
})
|
|
3651
|
+
])
|
|
3652
|
+
])) : Ke("", !0)
|
|
3653
|
+
];
|
|
3654
|
+
}),
|
|
3655
|
+
rowCreate: H(({ row: i, index: y }) => [
|
|
3656
|
+
de("span", {
|
|
3657
|
+
title: "新增",
|
|
3658
|
+
class: "row-create-wrap",
|
|
3659
|
+
onClick: (h) => qs(i, y)
|
|
3660
|
+
}, [
|
|
3661
|
+
V(a, {
|
|
3662
|
+
name: "rowCreate",
|
|
3663
|
+
style: { width: "10px", height: "10px" }
|
|
3664
|
+
})
|
|
3665
|
+
], 8, $i)
|
|
3666
|
+
]),
|
|
3667
|
+
operateCol: H(() => [
|
|
3668
|
+
V(r, {
|
|
3669
|
+
title: "选择显示列信息",
|
|
3670
|
+
placement: "left-start",
|
|
3671
|
+
"popper-class": "menu-operate-popover",
|
|
3672
|
+
trigger: "hover",
|
|
3673
|
+
onShow: Ms
|
|
3674
|
+
}, {
|
|
3675
|
+
reference: H(() => [
|
|
3676
|
+
de("span", Pi, [
|
|
3677
|
+
V(a, {
|
|
3678
|
+
name: "operate",
|
|
3679
|
+
style: { width: "15px", height: "15px", cursor: "pointer" }
|
|
3680
|
+
})
|
|
3681
|
+
])
|
|
3682
|
+
]),
|
|
3683
|
+
default: H(() => [
|
|
3684
|
+
de("div", Ni, [
|
|
3685
|
+
l[14] || (l[14] = de("div", { class: "group-title" }, "表格操作", -1)),
|
|
3686
|
+
V(n, {
|
|
3687
|
+
"model-value": Je.value,
|
|
3688
|
+
"active-text": "排序",
|
|
3689
|
+
"inactive-text": "",
|
|
3690
|
+
style: { "margin-right": "8px" },
|
|
3691
|
+
onChange: l[3] || (l[3] = (i) => ls(i, "sortable"))
|
|
3692
|
+
}, null, 8, ["model-value"]),
|
|
3693
|
+
l[15] || (l[15] = de("div", { class: "group-title" }, "表格列操作", -1)),
|
|
3694
|
+
V(p, {
|
|
3695
|
+
modelValue: A.value,
|
|
3696
|
+
"onUpdate:modelValue": l[4] || (l[4] = (i) => A.value = i),
|
|
3697
|
+
style: { height: "100%" },
|
|
3698
|
+
min: 2,
|
|
3699
|
+
ref_key: "checkboxGroupRef",
|
|
3700
|
+
ref: m
|
|
3701
|
+
}, {
|
|
3702
|
+
default: H(() => [
|
|
3703
|
+
(ee(!0), Ce(Zl, null, Il(Ra.value, (i) => (ee(), Ce("div", {
|
|
3704
|
+
style: { display: "flex", "align-items": "center" },
|
|
3705
|
+
key: i.label
|
|
3706
|
+
}, [
|
|
3707
|
+
V(u, {
|
|
3708
|
+
value: i.label,
|
|
3709
|
+
style: { width: "100%", marginRight: 0 }
|
|
3710
|
+
}, {
|
|
3711
|
+
default: H(() => [
|
|
3712
|
+
de("span", {
|
|
3713
|
+
title: i.label,
|
|
3714
|
+
style: { display: "inline-block", width: "250px", overflow: "hidden", "text-overflow": "ellipsis", "white-space": "nowrap" }
|
|
3715
|
+
}, Ze(i.label), 9, Ri)
|
|
3716
|
+
]),
|
|
3717
|
+
_: 2
|
|
3718
|
+
}, 1032, ["value"]),
|
|
3719
|
+
V(r, {
|
|
3720
|
+
"popper-class": "col-operate-popover",
|
|
3721
|
+
title: "列操作",
|
|
3722
|
+
placement: "left",
|
|
3723
|
+
teleported: !1,
|
|
3724
|
+
trigger: "hover"
|
|
3725
|
+
}, {
|
|
3726
|
+
reference: H(() => [
|
|
3727
|
+
V(a, {
|
|
3728
|
+
name: "colOperate",
|
|
3729
|
+
style: { width: "15px", height: "15px", cursor: "pointer", color: "grey", position: "absolute", right: "40px" }
|
|
3730
|
+
})
|
|
3731
|
+
]),
|
|
3732
|
+
default: H(() => {
|
|
3733
|
+
var y;
|
|
3734
|
+
return [
|
|
3735
|
+
de("div", Bi, [
|
|
3736
|
+
(ee(!0), Ce(Zl, null, Il((y = Object.keys(i)) == null ? void 0 : y.filter((h) => {
|
|
3737
|
+
var q;
|
|
3738
|
+
return (q = tl.value) == null ? void 0 : q.find((P) => (P == null ? void 0 : P.value) === h);
|
|
3739
|
+
}), (h) => {
|
|
3740
|
+
var q, P;
|
|
3741
|
+
return ee(), Ce("div", { key: h }, [
|
|
3742
|
+
rl[h] == "radio" ? (ee(), Ce("div", Mi, [
|
|
3743
|
+
l[13] || (l[13] = de("div", null, "固定:", -1)),
|
|
3744
|
+
V(o, {
|
|
3745
|
+
"model-value": i == null ? void 0 : i[h],
|
|
3746
|
+
onChange: (X) => $r(X, h, i)
|
|
3747
|
+
}, {
|
|
3748
|
+
default: H(() => {
|
|
3749
|
+
var X, d;
|
|
3750
|
+
return [
|
|
3751
|
+
(ee(!0), Ce(Zl, null, Il((d = (X = tl.value) == null ? void 0 : X.find((E) => (E == null ? void 0 : E.value) === h)) == null ? void 0 : d.options, (E) => (ee(), Xe(t, {
|
|
3752
|
+
key: E == null ? void 0 : E.value,
|
|
3753
|
+
label: E == null ? void 0 : E.value,
|
|
3754
|
+
value: E == null ? void 0 : E.value
|
|
3755
|
+
}, {
|
|
3756
|
+
default: H(() => [
|
|
3757
|
+
Ie(Ze(E == null ? void 0 : E.label), 1)
|
|
3758
|
+
]),
|
|
3759
|
+
_: 2
|
|
3760
|
+
}, 1032, ["label", "value"]))), 128))
|
|
3761
|
+
];
|
|
3762
|
+
}),
|
|
3763
|
+
_: 2
|
|
3764
|
+
}, 1032, ["model-value", "onChange"])
|
|
3765
|
+
])) : Ke("", !0),
|
|
3766
|
+
rl[h] == "switch" ? (ee(), Xe(n, {
|
|
3767
|
+
key: 1,
|
|
3768
|
+
"model-value": i == null ? void 0 : i[h],
|
|
3769
|
+
"active-text": (P = (q = tl.value) == null ? void 0 : q.find((X) => (X == null ? void 0 : X.value) === h)) == null ? void 0 : P.label,
|
|
3770
|
+
onChange: (X) => $r(X, h, i)
|
|
3771
|
+
}, null, 8, ["model-value", "active-text", "onChange"])) : Ke("", !0)
|
|
3772
|
+
]);
|
|
3773
|
+
}), 128))
|
|
3774
|
+
])
|
|
3775
|
+
];
|
|
3776
|
+
}),
|
|
3777
|
+
_: 2
|
|
3778
|
+
}, 1024),
|
|
3779
|
+
de("span", Fi, [
|
|
3780
|
+
V(a, {
|
|
3781
|
+
name: "drag",
|
|
3782
|
+
class: "col-drag-icon",
|
|
3783
|
+
style: { width: "15px", height: "15px" }
|
|
3784
|
+
})
|
|
3785
|
+
])
|
|
3786
|
+
]))), 128))
|
|
3787
|
+
]),
|
|
3788
|
+
_: 1
|
|
3789
|
+
}, 8, ["modelValue"])
|
|
3790
|
+
])
|
|
3791
|
+
]),
|
|
3792
|
+
_: 1
|
|
3793
|
+
})
|
|
3794
|
+
]),
|
|
3795
|
+
content: H((i) => {
|
|
3796
|
+
var y, h, q, P, X, d, E, ve, W, C, R, te, ue, se, _e, Pe, Y, pe, ze, ge;
|
|
3797
|
+
return [
|
|
3798
|
+
((y = i == null ? void 0 : i.column) == null ? void 0 : y.label) === "OCR图片" || ((h = i == null ? void 0 : i.column) == null ? void 0 : h.prop) === "OCR图片" ? (ee(), Ce("div", Ki, [
|
|
3799
|
+
V(a, {
|
|
3800
|
+
name: "query",
|
|
3801
|
+
style: {
|
|
3802
|
+
width: "20px",
|
|
3803
|
+
height: "20px",
|
|
3804
|
+
color: "var(--ssComponent-theme-color)",
|
|
3805
|
+
cursor: "pointer"
|
|
3806
|
+
},
|
|
3807
|
+
onClick: ar((ke) => Ds(i), ["stop"]),
|
|
3808
|
+
title: "查看OCR图片"
|
|
3809
|
+
}, null, 8, ["onClick"])
|
|
3810
|
+
])) : Hs(i) ? (ee(), Xe(r, {
|
|
3811
|
+
key: 1,
|
|
3812
|
+
"popper-class": "file-popover",
|
|
3813
|
+
placement: "right",
|
|
3814
|
+
trigger: "hover",
|
|
3815
|
+
effect: "light",
|
|
3816
|
+
width: "auto"
|
|
3817
|
+
}, {
|
|
3818
|
+
reference: H(() => [
|
|
3819
|
+
de("span", zi, Ze(El(i)), 1)
|
|
3820
|
+
]),
|
|
3821
|
+
default: H(() => {
|
|
3822
|
+
var ke, je;
|
|
3823
|
+
return [
|
|
3824
|
+
de("div", Ji, [
|
|
3825
|
+
(ee(!0), Ce(Zl, null, Il((je = i == null ? void 0 : i.row) == null ? void 0 : je[(ke = i == null ? void 0 : i.column) == null ? void 0 : ke.prop], (Ye) => (ee(), Ce("div", Wi, [
|
|
3826
|
+
de("div", {
|
|
3827
|
+
class: "prop-url",
|
|
3828
|
+
title: Ba(Ye),
|
|
3829
|
+
onClick: (U) => Rr(Ye)
|
|
3830
|
+
}, Ze(Ba(Ye)), 9, qi),
|
|
3831
|
+
de("div", {
|
|
3832
|
+
class: "prop-download",
|
|
3833
|
+
onClick: (U) => ns(Ye)
|
|
3834
|
+
}, " 下载 ", 8, Gi)
|
|
3835
|
+
]))), 256))
|
|
3836
|
+
])
|
|
3837
|
+
];
|
|
3838
|
+
}),
|
|
3839
|
+
_: 2
|
|
3840
|
+
}, 1024)) : (ee(), Ce("div", {
|
|
3841
|
+
key: 2,
|
|
3842
|
+
style: pa({
|
|
3843
|
+
color: !Array.isArray(El(i)) && ((P = (q = El(i)) == null ? void 0 : q.toString()) != null && P.includes(".txt") || (d = (X = El(i)) == null ? void 0 : X.toString()) != null && d.includes(".cpt") || (ve = (E = El(i)) == null ? void 0 : E.toString()) != null && ve.includes(".cyd")) ? "var(--vertical-menuitem-active-bg)" : "",
|
|
3844
|
+
textDecoration: !Array.isArray(El(i)) && ((C = (W = El(i)) == null ? void 0 : W.toString()) != null && C.includes(".txt") || (te = (R = El(i)) == null ? void 0 : R.toString()) != null && te.includes(".cpt") || (se = (ue = El(i)) == null ? void 0 : ue.toString()) != null && se.includes(".cyd")) ? "underline" : "",
|
|
3845
|
+
cursor: !Array.isArray(El(i)) && ((Pe = (_e = El(i)) == null ? void 0 : _e.toString()) != null && Pe.includes(".txt") || (pe = (Y = El(i)) == null ? void 0 : Y.toString()) != null && pe.includes(".cpt") || (ge = (ze = El(i)) == null ? void 0 : ze.toString()) != null && ge.includes(".cyd")) ? "pointer" : "",
|
|
3846
|
+
marginLeft: (i == null ? void 0 : i.colIndex) === 0 ? `${((i == null ? void 0 : i.level) ?? 0) * 20}px` : 0
|
|
3847
|
+
}),
|
|
3848
|
+
onClick: (ke) => zn(El(i))
|
|
3849
|
+
}, Ze(El(i) === 0 ? "0" : El(i)), 13, Hi))
|
|
3850
|
+
];
|
|
3851
|
+
}),
|
|
3852
|
+
_: 2
|
|
3853
|
+
}, [
|
|
3854
|
+
((_ = ua.value) == null ? void 0 : _.length) > 0 && zl(Ga) !== zl(Ge) ? {
|
|
3855
|
+
name: "actions",
|
|
3856
|
+
fn: H(({ item: i }) => [
|
|
3857
|
+
V(r, {
|
|
3858
|
+
title: "",
|
|
3859
|
+
placement: "left-start",
|
|
3860
|
+
"popper-class": "menu-operate-popover"
|
|
3861
|
+
}, {
|
|
3862
|
+
reference: H(() => [
|
|
3863
|
+
V(a, {
|
|
3864
|
+
name: "more",
|
|
3865
|
+
style: { cursor: "pointer", width: "15px", height: "15px" },
|
|
3866
|
+
onClick: l[0] || (l[0] = ar(() => {
|
|
3867
|
+
}, ["stop"]))
|
|
3868
|
+
})
|
|
3869
|
+
]),
|
|
3870
|
+
default: H(() => [
|
|
3871
|
+
de("div", Ei, [
|
|
3872
|
+
(ee(!0), Ce(Zl, null, Il(ss(ua.value, i), (y, h) => (ee(), Ce("div", {
|
|
3873
|
+
class: "menu-config-item",
|
|
3874
|
+
key: h,
|
|
3875
|
+
onClick: ar((q) => lr(y == null ? void 0 : y.label, i, { extra: y }), ["stop"])
|
|
3876
|
+
}, [
|
|
3877
|
+
de("div", {
|
|
3878
|
+
style: pa({ color: y == null ? void 0 : y.textColor }),
|
|
3879
|
+
class: "extra-button-label"
|
|
3880
|
+
}, Ze(y == null ? void 0 : y.label), 5)
|
|
3881
|
+
], 8, Li))), 128))
|
|
3882
|
+
])
|
|
3883
|
+
]),
|
|
3884
|
+
_: 2
|
|
3885
|
+
}, 1024)
|
|
3886
|
+
]),
|
|
3887
|
+
key: "0"
|
|
3888
|
+
} : void 0,
|
|
3889
|
+
((L = ne.value) == null ? void 0 : L.length) > 0 ? {
|
|
3890
|
+
name: "batchButton",
|
|
3891
|
+
fn: H((i) => [
|
|
3892
|
+
kr(V(Io, {
|
|
3893
|
+
lockingPage: zl(Ga) === zl(Ge),
|
|
3894
|
+
buttons: i.buttons,
|
|
3895
|
+
selectTableItems: Xl.value,
|
|
3896
|
+
onButtonClick: l[2] || (l[2] = (y) => lr(y, "", {}))
|
|
3897
|
+
}, null, 8, ["lockingPage", "buttons", "selectTableItems"]), [
|
|
3898
|
+
[un, Z.value]
|
|
3899
|
+
]),
|
|
3900
|
+
kr(de("div", null, null, 512), [
|
|
3901
|
+
[un, !Z.value]
|
|
3902
|
+
])
|
|
3903
|
+
]),
|
|
3904
|
+
key: "1"
|
|
3905
|
+
} : void 0
|
|
3906
|
+
]), 1032, ["pageObj", "showIndex", "isTree", "summaryInfo", "columns", "defaultSort", "isCardViewport", "checkedColumns", "tableData", "isEditViewport", "isShowPagination", "allowSelect", "extraButton", "rowButton", "cacheExtraButtons", "isClearSelection"])) : Ke("", !0),
|
|
3907
|
+
V(ca, {
|
|
3908
|
+
title: Pl.value,
|
|
3909
|
+
visible: la.value,
|
|
3910
|
+
width: Bn.value,
|
|
3911
|
+
onBeforeDestroy: as,
|
|
3912
|
+
style: { height: "74%" }
|
|
3913
|
+
}, {
|
|
3914
|
+
default: H(() => [
|
|
3915
|
+
de("div", Xi, [
|
|
3916
|
+
V(Ua, {
|
|
3917
|
+
rowContents: xe.value,
|
|
3918
|
+
isEnableWrap: !1,
|
|
3919
|
+
showOperator: !1,
|
|
3920
|
+
onChange: Fs,
|
|
3921
|
+
onFixChangeValue: is,
|
|
3922
|
+
onClickTrigger: rs,
|
|
3923
|
+
isEdit: Ha.value,
|
|
3924
|
+
onBlurChange: In,
|
|
3925
|
+
onCreate: Vn,
|
|
3926
|
+
onTagChange: Kn
|
|
3927
|
+
}, null, 8, ["rowContents", "isEdit"])
|
|
3928
|
+
])
|
|
3929
|
+
]),
|
|
3930
|
+
footer: H(() => [
|
|
3931
|
+
Qa.value ? (ee(), Ce("div", Qi, [
|
|
3932
|
+
V(b, {
|
|
3933
|
+
onClick: l[5] || (l[5] = (i) => la.value = !1),
|
|
3934
|
+
id: "themeBorderButton"
|
|
3935
|
+
}, {
|
|
3936
|
+
default: H(() => l[16] || (l[16] = [
|
|
3937
|
+
Ie(Ze("取消"))
|
|
3938
|
+
])),
|
|
3939
|
+
_: 1,
|
|
3940
|
+
__: [16]
|
|
3941
|
+
}),
|
|
3942
|
+
V(b, {
|
|
3943
|
+
class: "ok-button",
|
|
3944
|
+
onClick: l[6] || (l[6] = (i) => Ka(!0)),
|
|
3945
|
+
id: "themeButton"
|
|
3946
|
+
}, {
|
|
3947
|
+
default: H(() => l[17] || (l[17] = [
|
|
3948
|
+
Ie(Ze("确认"))
|
|
3949
|
+
])),
|
|
3950
|
+
_: 1,
|
|
3951
|
+
__: [17]
|
|
3952
|
+
})
|
|
3953
|
+
])) : Ke("", !0)
|
|
3954
|
+
]),
|
|
3955
|
+
_: 1
|
|
3956
|
+
}, 8, ["title", "visible", "width"]),
|
|
3957
|
+
V(ca, {
|
|
3958
|
+
title: Pl.value,
|
|
3959
|
+
visible: Xa.value,
|
|
3960
|
+
width: sr.value,
|
|
3961
|
+
onBeforeDestroy: l[8] || (l[8] = (i) => Xa.value = !1)
|
|
3962
|
+
}, {
|
|
3963
|
+
default: H(() => [
|
|
3964
|
+
V(ni)
|
|
3965
|
+
]),
|
|
3966
|
+
footer: H(() => [
|
|
3967
|
+
de("div", Yi, [
|
|
3968
|
+
V(b, {
|
|
3969
|
+
onClick: l[7] || (l[7] = (i) => Xa.value = !1),
|
|
3970
|
+
class: "cancel-button",
|
|
3971
|
+
id: "themeBorderButton"
|
|
3972
|
+
}, {
|
|
3973
|
+
default: H(() => l[18] || (l[18] = [
|
|
3974
|
+
Ie(Ze("取消"))
|
|
3975
|
+
])),
|
|
3976
|
+
_: 1,
|
|
3977
|
+
__: [18]
|
|
3978
|
+
}),
|
|
3979
|
+
V(b, {
|
|
3980
|
+
class: "ok-button",
|
|
3981
|
+
onClick: ps,
|
|
3982
|
+
id: "themeButton"
|
|
3983
|
+
}, {
|
|
3984
|
+
default: H(() => l[19] || (l[19] = [
|
|
3985
|
+
Ie(Ze("确认"))
|
|
3986
|
+
])),
|
|
3987
|
+
_: 1,
|
|
3988
|
+
__: [19]
|
|
3989
|
+
})
|
|
3990
|
+
])
|
|
3991
|
+
]),
|
|
3992
|
+
_: 1
|
|
3993
|
+
}, 8, ["title", "visible", "width"]),
|
|
3994
|
+
fa.value ? (ee(), Xe(gn, {
|
|
3995
|
+
key: 1,
|
|
3996
|
+
fileDataList: ba.value,
|
|
3997
|
+
onDestroy: ds
|
|
3998
|
+
}, null, 8, ["fileDataList"])) : Ke("", !0),
|
|
3999
|
+
ll.value ? (ee(), Xe(ca, {
|
|
4000
|
+
key: 2,
|
|
4001
|
+
visible: ll.value,
|
|
4002
|
+
onBeforeDestroy: Rs,
|
|
4003
|
+
style: { height: "80vh", width: "80vw" },
|
|
4004
|
+
"body-class": "three-dialog-body",
|
|
4005
|
+
"footer-class": "three-dialog-footer"
|
|
4006
|
+
}, {
|
|
4007
|
+
default: H(() => [
|
|
4008
|
+
V(Uo, {
|
|
4009
|
+
files: La.value,
|
|
4010
|
+
threeData: we.value
|
|
4011
|
+
}, null, 8, ["files", "threeData"])
|
|
4012
|
+
]),
|
|
4013
|
+
_: 1
|
|
4014
|
+
}, 8, ["visible"])) : Ke("", !0),
|
|
4015
|
+
V(ca, {
|
|
4016
|
+
visible: e.componentVisible,
|
|
4017
|
+
onBeforeDestroy: l[9] || (l[9] = (i) => e.componentVisible = !1),
|
|
4018
|
+
width: sr.value,
|
|
4019
|
+
style: { height: "70vh" }
|
|
4020
|
+
}, {
|
|
4021
|
+
default: H(() => [
|
|
4022
|
+
V(O, { dialogItem: ya.value }, null, 8, ["dialogItem"])
|
|
4023
|
+
]),
|
|
4024
|
+
_: 1
|
|
4025
|
+
}, 8, ["visible", "width"]),
|
|
4026
|
+
V(ca, {
|
|
4027
|
+
title: "上传OCR图片",
|
|
4028
|
+
visible: Ya.value,
|
|
4029
|
+
onBeforeDestroy: Kr,
|
|
4030
|
+
width: "600px"
|
|
4031
|
+
}, {
|
|
4032
|
+
default: H(() => [
|
|
4033
|
+
kr((ee(), Ce("div", Zi, [
|
|
4034
|
+
V(x, {
|
|
4035
|
+
"file-list": aa.value,
|
|
4036
|
+
"onUpdate:fileList": l[10] || (l[10] = (i) => aa.value = i),
|
|
4037
|
+
multiple: "",
|
|
4038
|
+
drag: "",
|
|
4039
|
+
action: "",
|
|
4040
|
+
"auto-upload": !1,
|
|
4041
|
+
limit: 20,
|
|
4042
|
+
accept: "image/*",
|
|
4043
|
+
"on-change": _s,
|
|
4044
|
+
class: "upload-content"
|
|
4045
|
+
}, {
|
|
4046
|
+
tip: H(() => l[20] || (l[20] = [
|
|
4047
|
+
de("div", { class: "el-upload__tip tip-content" }, " 请上传图片文件,大小不超过10MB ", -1)
|
|
4048
|
+
])),
|
|
4049
|
+
default: H(() => [
|
|
4050
|
+
V(v, { class: "el-icon--upload" }, {
|
|
4051
|
+
default: H(() => [
|
|
4052
|
+
V(zl(oo))
|
|
4053
|
+
]),
|
|
4054
|
+
_: 1
|
|
4055
|
+
}),
|
|
4056
|
+
l[21] || (l[21] = de("div", { class: "el-upload__text" }, [
|
|
4057
|
+
Ie(" 将图片拖到此处或"),
|
|
4058
|
+
de("em", null, "点击上传")
|
|
4059
|
+
], -1))
|
|
4060
|
+
]),
|
|
4061
|
+
file: H(({ file: i, index: y }) => [
|
|
4062
|
+
de("div", Ii, [
|
|
4063
|
+
de("div", {
|
|
4064
|
+
class: "upload-content-title",
|
|
4065
|
+
style: { flex: "1", overflow: "hidden", "text-overflow": "ellipsis", "white-space": "nowrap" },
|
|
4066
|
+
title: i == null ? void 0 : i.name
|
|
4067
|
+
}, Ze(i == null ? void 0 : i.name), 9, Vi),
|
|
4068
|
+
de("div", eu, [
|
|
4069
|
+
V(a, {
|
|
4070
|
+
class: "icon-blue",
|
|
4071
|
+
name: "EyeFill",
|
|
4072
|
+
style: { width: "15px", height: "15px", cursor: "pointer", color: "var(--ssform-label-color)" },
|
|
4073
|
+
onClick: (h) => Us(i),
|
|
4074
|
+
title: "预览"
|
|
4075
|
+
}, null, 8, ["onClick"]),
|
|
4076
|
+
V(a, {
|
|
4077
|
+
class: "icon-blue",
|
|
4078
|
+
name: "Cancel",
|
|
4079
|
+
style: { width: "15px", height: "15px", cursor: "pointer", color: "var(--ssform-label-color)" },
|
|
4080
|
+
onClick: (h) => Ls(y),
|
|
4081
|
+
title: "删除"
|
|
4082
|
+
}, null, 8, ["onClick"])
|
|
4083
|
+
])
|
|
4084
|
+
])
|
|
4085
|
+
]),
|
|
4086
|
+
_: 1
|
|
4087
|
+
}, 8, ["file-list"])
|
|
4088
|
+
])), [
|
|
4089
|
+
[K, ta.value]
|
|
4090
|
+
])
|
|
4091
|
+
]),
|
|
4092
|
+
footer: H(() => [
|
|
4093
|
+
de("div", lu, [
|
|
4094
|
+
V(b, {
|
|
4095
|
+
onClick: bs,
|
|
4096
|
+
id: "themeBorderButton",
|
|
4097
|
+
disabled: ta.value
|
|
4098
|
+
}, {
|
|
4099
|
+
default: H(() => l[22] || (l[22] = [
|
|
4100
|
+
Ie("拍照")
|
|
4101
|
+
])),
|
|
4102
|
+
_: 1,
|
|
4103
|
+
__: [22]
|
|
4104
|
+
}, 8, ["disabled"]),
|
|
4105
|
+
V(b, {
|
|
4106
|
+
onClick: Kr,
|
|
4107
|
+
id: "themeBorderButton",
|
|
4108
|
+
disabled: ta.value
|
|
4109
|
+
}, {
|
|
4110
|
+
default: H(() => l[23] || (l[23] = [
|
|
4111
|
+
Ie("取消")
|
|
4112
|
+
])),
|
|
4113
|
+
_: 1,
|
|
4114
|
+
__: [23]
|
|
4115
|
+
}, 8, ["disabled"]),
|
|
4116
|
+
V(b, {
|
|
4117
|
+
class: "ok-button",
|
|
4118
|
+
onClick: As,
|
|
4119
|
+
id: "themeButton",
|
|
4120
|
+
disabled: ta.value
|
|
4121
|
+
}, {
|
|
4122
|
+
default: H(() => l[24] || (l[24] = [
|
|
4123
|
+
Ie("确认")
|
|
4124
|
+
])),
|
|
4125
|
+
_: 1,
|
|
4126
|
+
__: [24]
|
|
4127
|
+
}, 8, ["disabled"])
|
|
4128
|
+
])
|
|
4129
|
+
]),
|
|
4130
|
+
_: 1
|
|
4131
|
+
}, 8, ["visible"]),
|
|
4132
|
+
V(mi, {
|
|
4133
|
+
visible: er.value,
|
|
4134
|
+
onConfirm: ks,
|
|
4135
|
+
onCancel: l[11] || (l[11] = (i) => er.value = !1)
|
|
4136
|
+
}, null, 8, ["visible"]),
|
|
4137
|
+
Za.value ? (ee(), Xe(gn, {
|
|
4138
|
+
key: 3,
|
|
4139
|
+
fileDataList: Ia.value,
|
|
4140
|
+
onDestroy: Es
|
|
4141
|
+
}, null, 8, ["fileDataList"])) : Ke("", !0),
|
|
4142
|
+
V(ca, {
|
|
4143
|
+
title: "OCR识别结果预览",
|
|
4144
|
+
visible: ir.value,
|
|
4145
|
+
onBeforeDestroy: yr,
|
|
4146
|
+
width: "90%",
|
|
4147
|
+
style: { maxWidth: "1200px" }
|
|
4148
|
+
}, {
|
|
4149
|
+
default: H(() => [
|
|
4150
|
+
de("div", au, [
|
|
4151
|
+
de("div", ru, [
|
|
4152
|
+
V(N, {
|
|
4153
|
+
title: "请核对识别结果,您可以修改字段值后点击确认添加到表格。在表头勾选字段用于匹配并替换现有数据",
|
|
4154
|
+
type: "info",
|
|
4155
|
+
closable: !1,
|
|
4156
|
+
"show-icon": ""
|
|
4157
|
+
})
|
|
4158
|
+
]),
|
|
4159
|
+
de("div", nu, [
|
|
4160
|
+
V(S, {
|
|
4161
|
+
data: Sa.value,
|
|
4162
|
+
border: "",
|
|
4163
|
+
stripe: "",
|
|
4164
|
+
"max-height": "400",
|
|
4165
|
+
style: { width: "100%" }
|
|
4166
|
+
}, {
|
|
4167
|
+
default: H(() => [
|
|
4168
|
+
V(M, {
|
|
4169
|
+
type: "index",
|
|
4170
|
+
label: "序号",
|
|
4171
|
+
width: "60",
|
|
4172
|
+
fixed: ""
|
|
4173
|
+
}),
|
|
4174
|
+
(ee(!0), Ce(Zl, null, Il(ur.value, (i) => (ee(), Xe(M, {
|
|
4175
|
+
key: i.prop,
|
|
4176
|
+
prop: i.prop,
|
|
4177
|
+
"min-width": i.minWidth || 120,
|
|
4178
|
+
"class-name": i.isAccuracy ? "accuracy-column" : ""
|
|
4179
|
+
}, {
|
|
4180
|
+
header: H(() => [
|
|
4181
|
+
de("div", su, [
|
|
4182
|
+
i.isAccuracy ? Ke("", !0) : (ee(), Xe(u, {
|
|
4183
|
+
key: 0,
|
|
4184
|
+
"model-value": ra.value.includes(i.prop),
|
|
4185
|
+
onChange: (y) => Os(i.prop, y),
|
|
4186
|
+
onClick: l[12] || (l[12] = ar(() => {
|
|
4187
|
+
}, ["stop"]))
|
|
4188
|
+
}, null, 8, ["model-value", "onChange"])),
|
|
4189
|
+
de("span", null, Ze(i.label), 1)
|
|
4190
|
+
])
|
|
4191
|
+
]),
|
|
4192
|
+
default: H(({ row: y, $index: h }) => [
|
|
4193
|
+
i.isAccuracy ? (ee(), Ce("span", {
|
|
4194
|
+
key: 0,
|
|
4195
|
+
class: "accuracy-value",
|
|
4196
|
+
style: pa({
|
|
4197
|
+
color: ws(y[i.prop]),
|
|
4198
|
+
fontWeight: 500
|
|
4199
|
+
})
|
|
4200
|
+
}, Ze(xs(y[i.prop])), 5)) : (ee(), Xe(F, {
|
|
4201
|
+
key: 1,
|
|
4202
|
+
modelValue: y[i.prop],
|
|
4203
|
+
"onUpdate:modelValue": (q) => y[i.prop] = q,
|
|
4204
|
+
size: "small",
|
|
4205
|
+
placeholder: "请输入" + i.label,
|
|
4206
|
+
onChange: (q) => Ts(h, i.prop, q)
|
|
4207
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder", "onChange"]))
|
|
4208
|
+
]),
|
|
4209
|
+
_: 2
|
|
4210
|
+
}, 1032, ["prop", "min-width", "class-name"]))), 128))
|
|
4211
|
+
]),
|
|
4212
|
+
_: 1
|
|
4213
|
+
}, 8, ["data"])
|
|
4214
|
+
])
|
|
4215
|
+
])
|
|
4216
|
+
]),
|
|
4217
|
+
footer: H(() => [
|
|
4218
|
+
de("div", ou, [
|
|
4219
|
+
V(b, {
|
|
4220
|
+
onClick: yr,
|
|
4221
|
+
id: "themeBorderButton"
|
|
4222
|
+
}, {
|
|
4223
|
+
default: H(() => l[25] || (l[25] = [
|
|
4224
|
+
Ie("取消")
|
|
4225
|
+
])),
|
|
4226
|
+
_: 1,
|
|
4227
|
+
__: [25]
|
|
4228
|
+
}),
|
|
4229
|
+
V(b, {
|
|
4230
|
+
class: "ok-button",
|
|
4231
|
+
onClick: Cs,
|
|
4232
|
+
id: "themeButton"
|
|
4233
|
+
}, {
|
|
4234
|
+
default: H(() => l[26] || (l[26] = [
|
|
4235
|
+
Ie("确认")
|
|
4236
|
+
])),
|
|
4237
|
+
_: 1,
|
|
4238
|
+
__: [26]
|
|
4239
|
+
})
|
|
4240
|
+
])
|
|
4241
|
+
]),
|
|
4242
|
+
_: 1
|
|
4243
|
+
}, 8, ["visible"]),
|
|
4244
|
+
V(ca, {
|
|
4245
|
+
title: cl.title,
|
|
4246
|
+
visible: cl.show,
|
|
4247
|
+
width: cl.width,
|
|
4248
|
+
onBeforeDestroy: ms
|
|
4249
|
+
}, {
|
|
4250
|
+
default: H(() => [
|
|
4251
|
+
de("div", iu, [
|
|
4252
|
+
V(Ua, {
|
|
4253
|
+
rowContents: cl == null ? void 0 : cl.contents,
|
|
4254
|
+
formRules: cl == null ? void 0 : cl.formRules,
|
|
4255
|
+
showOperator: !1,
|
|
4256
|
+
buttonValue: cl.buttonValue,
|
|
4257
|
+
isEdit: Ha.value,
|
|
4258
|
+
isStartJustify: !1,
|
|
4259
|
+
isEnableWrap: !1,
|
|
4260
|
+
onOnButtonClick: Ss
|
|
4261
|
+
}, null, 8, ["rowContents", "formRules", "buttonValue", "isEdit"])
|
|
4262
|
+
])
|
|
4263
|
+
]),
|
|
4264
|
+
_: 1
|
|
4265
|
+
}, 8, ["title", "visible", "width"])
|
|
4266
|
+
]);
|
|
4267
|
+
};
|
|
4268
|
+
}
|
|
4269
|
+
}, Tu = /* @__PURE__ */ qa(uu, [["__scopeId", "data-v-13380150"]]);
|
|
4270
|
+
export {
|
|
4271
|
+
Vo as a,
|
|
4272
|
+
_r as f,
|
|
4273
|
+
Ar as g,
|
|
4274
|
+
Tu as s,
|
|
4275
|
+
Si as u
|
|
4276
|
+
};
|