hs-admin-ui 17.0.4 → 17.0.5
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/bcIcon-BCR5YVyC.js +4 -0
- package/dist/bcIcon.vue_vue_type_script_setup_true_name_bcIcon_lang-DoEyyD3x.js +53 -0
- package/dist/bcVisual.vue_vue_type_style_index_0_scoped_a917535e_lang-BcYE-BQ8.js +80274 -0
- package/dist/components-BQqQsHab.js +14236 -0
- package/dist/element-plus-ui.mjs +13 -20
- package/dist/h5.mjs +353 -442
- package/dist/index-8j3cHwnv.js +31612 -0
- package/dist/index-B8REha8K.js +14343 -0
- package/dist/index-BUCSA3Vy.js +3095 -0
- package/dist/index-CmuHspNk.js +1012 -0
- package/dist/index.mjs +264 -476
- package/dist/setting-BjaCWt3K.js +991 -0
- package/dist/style.css +1 -1894
- package/dist/table-xRAByXLr.js +46 -0
- package/dist/vxe-table-ui.mjs +13 -21
- package/package.json +1 -1
- package/dist/business-BjiJZ1r_.js +0 -25132
- package/dist/index-CriCbWfy.js +0 -1691
- package/dist/lodash-D9wEYdiM.js +0 -7396
- package/dist/trtc-sdk-v5-6h0y3EaH.js +0 -13358
- package/dist/vendor-DgfWUdiw.js +0 -154250
|
@@ -0,0 +1,1012 @@
|
|
|
1
|
+
import { S as v, X as F, H as y, ax as P, J as L, dT as K, M as S, dU as ne, dV as C, dW as h, aa as R, T as le, be as re, ap as oe, ae as D, aj as se, b2 as ie, b3 as ue, dX as ce, W as de, b5 as fe, b6 as ge, b1 as me, dY as pe, aT as ye, aS as be, dZ as he, d_ as ve, d$ as _e, e0 as xe, e1 as we, e2 as De, e3 as Ce, e4 as Ee, e5 as Se, am as Ae, Z as Te, L as Ne, e6 as Be, e7 as Fe, a4 as Pe, e8 as Me, e9 as je, ea as Ie, eb as Le, ec as Re, K as Oe, ed as Ye, ee as $e, ef as ke, eg as Ue, eh as Ke, ei as He, ej as We, ek as qe, aw as Je, el as ze, em as Ze, ac as Qe, en as Xe, eo as Ge, ep as Ve, eq as et, er as tt, V as at, al as nt, N as lt, es as rt, et as ot, an as st, eu as it, ev as ut, at as ct, ew as dt, ex as ft, ey as gt, ez as mt, eA as pt, eB as yt, eC as bt, eD as ht, eE as vt, eF as _t, eG as xt, eH as wt, eI as Dt, eJ as Ct, eK as Et, eL as St, eM as At, eN as Tt, eO as Nt, eP as Bt, eQ as Ft, eR as Pt, eS as Mt, eT as jt, eU as It } from "./bcVisual.vue_vue_type_style_index_0_scoped_a917535e_lang-BcYE-BQ8.js";
|
|
2
|
+
import { ref as Lt, onBeforeUnmount as Rt, nextTick as Ot } from "vue";
|
|
3
|
+
function Yt(t, e) {
|
|
4
|
+
const n = M(t), a = M(e);
|
|
5
|
+
let l = 0;
|
|
6
|
+
const o = n.length;
|
|
7
|
+
for (let r in a)
|
|
8
|
+
for (let s in n)
|
|
9
|
+
a[r] === n[s] && l++;
|
|
10
|
+
return l === o;
|
|
11
|
+
}
|
|
12
|
+
function H(t, e) {
|
|
13
|
+
if (!t || !e) return !1;
|
|
14
|
+
let n = Object.getOwnPropertyNames(t), a = Object.getOwnPropertyNames(e);
|
|
15
|
+
if (n.length != a.length) return !1;
|
|
16
|
+
for (let l = 0; l < n.length; l++) {
|
|
17
|
+
let o = n[l], r = t[o], s = e[o];
|
|
18
|
+
if (!e.hasOwnProperty(o)) return !1;
|
|
19
|
+
if (r instanceof Object) {
|
|
20
|
+
if (!H(r, s)) return !1;
|
|
21
|
+
} else if (r !== s)
|
|
22
|
+
return !1;
|
|
23
|
+
}
|
|
24
|
+
return !0;
|
|
25
|
+
}
|
|
26
|
+
function M(t, e) {
|
|
27
|
+
if (Object.keys(t).length)
|
|
28
|
+
if (e) {
|
|
29
|
+
const n = {};
|
|
30
|
+
return t.reduce((a, l) => (n[l[e]] || (n[l[e]] = l[e] && a.push(l)), a), []);
|
|
31
|
+
} else
|
|
32
|
+
return [...new Set(t)];
|
|
33
|
+
else
|
|
34
|
+
return t;
|
|
35
|
+
}
|
|
36
|
+
let W = "127.0.0.1", q = 54321, f;
|
|
37
|
+
function $t(t, e, n = "ws") {
|
|
38
|
+
return f || (f = new ws(t, e, {
|
|
39
|
+
automaticOpen: !1,
|
|
40
|
+
//是否自动连接标志(true|false),默认为true
|
|
41
|
+
reconnectDecay: 1.5,
|
|
42
|
+
//自动重连延迟重连速度,数字,默认为1.5
|
|
43
|
+
output: "output",
|
|
44
|
+
//指定调试输出div
|
|
45
|
+
protocol: n
|
|
46
|
+
//指定通讯协议(ws|wss),默认为"ws"
|
|
47
|
+
}), f.onconnecting = function(a) {
|
|
48
|
+
f.log("正与服务器建立连接...", a);
|
|
49
|
+
}, f.onopen = function(a) {
|
|
50
|
+
f.log("与服务器连接成功。", a);
|
|
51
|
+
}, f.onclose = function(a) {
|
|
52
|
+
f.log("与打印服务器的连接已关闭", a);
|
|
53
|
+
}, f.onmessage = function(a) {
|
|
54
|
+
f.log('收到消息!"' + a.data + '"', a);
|
|
55
|
+
let l = JSON && JSON.parse(a.data);
|
|
56
|
+
l.result === 1 || v.error("Print failed: " + l.message);
|
|
57
|
+
}, f.onerror = function(a) {
|
|
58
|
+
typeof a.detail == "object" ? (typeof a.detail.message == "string" && f.log("遇到一个错误: " + a.detail.message, a), typeof a.detail.data == "string" && f.log("遇到一个错误: " + a.detail.message, a)) : typeof a.data == "string" ? f.log("遇到一个错误: " + a.data, a) : f.log("遇到一个错误", a);
|
|
59
|
+
}, f);
|
|
60
|
+
}
|
|
61
|
+
const O = () => $t(W, q);
|
|
62
|
+
function J() {
|
|
63
|
+
const t = O();
|
|
64
|
+
return t.open(), new Promise((e, n) => {
|
|
65
|
+
t.addEventListener("open", e), t.addEventListener("close", n);
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
function z(t) {
|
|
69
|
+
return J().then(() => {
|
|
70
|
+
const e = O(), n = function(l, o) {
|
|
71
|
+
e.protocol === "ws" && (e.setHost(W), e.setPort(q)), e.protocol, e.open();
|
|
72
|
+
}, a = function(l) {
|
|
73
|
+
e.log("SENT: <br/>" + l), e.log("正在发送消息..."), e.send(l);
|
|
74
|
+
};
|
|
75
|
+
e.state() !== e.OPEN ? (e.log("连接已断开,正在重新连接。"), e.onopen = function(l) {
|
|
76
|
+
e.log("与服务器连接成功。", l), a(t);
|
|
77
|
+
}, n()) : a(t);
|
|
78
|
+
}).catch(() => {
|
|
79
|
+
v.warning("请先启动康虎云打印服务器!");
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
async function Z(t, e) {
|
|
83
|
+
var x, g, T, N;
|
|
84
|
+
if (!t.config_info)
|
|
85
|
+
return v.warning("请先添加模板!"), Promise.reject();
|
|
86
|
+
const n = JSON.parse(t.config_info) || {};
|
|
87
|
+
let a = [], l = {}, o = [], r = [], s = [], u = [];
|
|
88
|
+
(x = n.formData) == null || x.map((i) => {
|
|
89
|
+
a.push({
|
|
90
|
+
type: "str",
|
|
91
|
+
size: 255,
|
|
92
|
+
name: i.name,
|
|
93
|
+
required: !1
|
|
94
|
+
}), i.name === "销售日期" || i.name === "移库日期" || i.name === "申请单单据日期" || i.name === "交易日期" ? l[i.name] = e[i.value] ? F(e[i.value]).format("YYYY-MM-DD HH:mm") : "" : y.endsWith(i.name, "日期") || i.name === "有效期" ? l[i.name] = e[i.value] ? F(e[i.value]).format("YYYY-MM-DD") : "" : y.endsWith(i.name, "金额") ? l[i.name] = P(e[i.value] || "") : l[i.name] = e[i.value] || "";
|
|
95
|
+
});
|
|
96
|
+
const c = await L.get("userInfo");
|
|
97
|
+
l.所属公司 = c.company_name;
|
|
98
|
+
const _ = ((g = e == null ? void 0 : e.detail) == null ? void 0 : g.reduce((i, p) => i += p.commodity_num || 0, 0)) || 0;
|
|
99
|
+
l.本单合计数量 = _, [
|
|
100
|
+
"repayment_sum",
|
|
101
|
+
//还款金额
|
|
102
|
+
"arrears_sum",
|
|
103
|
+
//欠款金额
|
|
104
|
+
"receipt_sum",
|
|
105
|
+
//收款金额
|
|
106
|
+
"refunds_sum",
|
|
107
|
+
//采购退款金额
|
|
108
|
+
"payment_sum",
|
|
109
|
+
//付款金额
|
|
110
|
+
"amount_sum",
|
|
111
|
+
//预付金额
|
|
112
|
+
"apply_sum",
|
|
113
|
+
//预付款申请单金额
|
|
114
|
+
"payment_app_sum",
|
|
115
|
+
//付款申请金额
|
|
116
|
+
"return_sum_total",
|
|
117
|
+
//销售合计金额
|
|
118
|
+
"return_sum",
|
|
119
|
+
//采购合计金额
|
|
120
|
+
"discount_after_sum",
|
|
121
|
+
//折后金额
|
|
122
|
+
"delivery_sum",
|
|
123
|
+
//配货合计金额
|
|
124
|
+
"commodity_sum",
|
|
125
|
+
//入库合计金额
|
|
126
|
+
"contract_sum",
|
|
127
|
+
"sum_of_reject",
|
|
128
|
+
//拒收单合金金额
|
|
129
|
+
"move_sum",
|
|
130
|
+
//合计
|
|
131
|
+
"real_amount"
|
|
132
|
+
//实收
|
|
133
|
+
].forEach((i) => {
|
|
134
|
+
if (!e[i]) return;
|
|
135
|
+
let p = K(e[i]);
|
|
136
|
+
l.本单合计金额大写 = p, l.本单合计金额 = e.commodity_sum || e.delivery_sum;
|
|
137
|
+
}), o = ((T = n.tableData) == null ? void 0 : T.map((i) => ({
|
|
138
|
+
type: i.type,
|
|
139
|
+
size: i.type === "Str" ? 255 : 0,
|
|
140
|
+
name: i.name,
|
|
141
|
+
required: !1
|
|
142
|
+
}))) || [], r = ((N = e == null ? void 0 : e.detail) == null ? void 0 : N.map((i) => {
|
|
143
|
+
var w;
|
|
144
|
+
let p = {};
|
|
145
|
+
return (w = n.tableData) == null || w.forEach((b) => {
|
|
146
|
+
y.endsWith(b.name, "日期") || y.endsWith(b.name, "时间") || b.name === "有效期至" ? p[b.name] = i[b.value] ? F(i[b.value]).format("YYYY-MM-DD") : "" : y.endsWith(b.name, "金额") ? p[b.name] = P(i[b.value] || "") : p[b.name] = i[b.value] || "";
|
|
147
|
+
}), p;
|
|
148
|
+
})) || [], e.other_information && (s = n.otherData.map((i) => ({
|
|
149
|
+
type: i.type,
|
|
150
|
+
size: i.type === "Str" ? 255 : 0,
|
|
151
|
+
name: i.name,
|
|
152
|
+
required: !1
|
|
153
|
+
})), u = e.other_information.map((i) => {
|
|
154
|
+
let p = {};
|
|
155
|
+
return n.otherData.forEach((w) => {
|
|
156
|
+
p[w.name] = i[w.value] || "";
|
|
157
|
+
}), p;
|
|
158
|
+
}));
|
|
159
|
+
const m = {
|
|
160
|
+
template: `base64:${t.template_base64}`,
|
|
161
|
+
ver: 4,
|
|
162
|
+
Copies: t.copies,
|
|
163
|
+
Duplex: t.duplex || 0,
|
|
164
|
+
Printer: t.printer ? JSON.parse(t.printer).default : "",
|
|
165
|
+
Design: t.design || 0,
|
|
166
|
+
PageTop: t.page_top || 10,
|
|
167
|
+
PageLeft: t.page_left || 10,
|
|
168
|
+
Preview: t.preview,
|
|
169
|
+
Tables: [
|
|
170
|
+
{
|
|
171
|
+
Name: "表单信息",
|
|
172
|
+
Cols: a,
|
|
173
|
+
Data: [l]
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
Name: "销售配车单",
|
|
177
|
+
Cols: o,
|
|
178
|
+
Data: r.length ? r : [{}]
|
|
179
|
+
}
|
|
180
|
+
]
|
|
181
|
+
};
|
|
182
|
+
return s.length && m.Tables.push({
|
|
183
|
+
Name: "其他信息",
|
|
184
|
+
Cols: s,
|
|
185
|
+
Data: u.length ? u : [{}]
|
|
186
|
+
}), console.log("trimPrintData整理打印数据=>>>>>", m), m;
|
|
187
|
+
}
|
|
188
|
+
function kt(t) {
|
|
189
|
+
return new Promise((e, n) => {
|
|
190
|
+
try {
|
|
191
|
+
let a = document.createElement("canvas"), l = a.getContext("2d"), o = new Image();
|
|
192
|
+
o.setAttribute("crossOrigin", "anonymous"), o.src = t, o.onload = function() {
|
|
193
|
+
a.height = o.height, a.width = o.width, l.drawImage(o, 0, 0);
|
|
194
|
+
let r = a.toDataURL("image/jpeg", 1);
|
|
195
|
+
a = null, e("base64/jpeg:" + r.split(",")[1]);
|
|
196
|
+
};
|
|
197
|
+
} catch {
|
|
198
|
+
n("");
|
|
199
|
+
}
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
async function Ut(t, e) {
|
|
203
|
+
const n = await L.get("userInfo"), a = await S({
|
|
204
|
+
url: `/${n.project_code}-web/pri/print_template/get_template_by_code`,
|
|
205
|
+
method: "get",
|
|
206
|
+
params: {
|
|
207
|
+
template_code: t
|
|
208
|
+
}
|
|
209
|
+
}).then((o) => y.get(o, "data", {}));
|
|
210
|
+
e || (e = {
|
|
211
|
+
detail: []
|
|
212
|
+
});
|
|
213
|
+
const l = await Z(a, e);
|
|
214
|
+
return z(JSON.stringify(l));
|
|
215
|
+
}
|
|
216
|
+
const Kt = (t) => ({
|
|
217
|
+
toClipboard(e, n) {
|
|
218
|
+
return new Promise((a, l) => {
|
|
219
|
+
const o = document.createElement("button"), r = new ne(o, {
|
|
220
|
+
text: () => e,
|
|
221
|
+
action: () => "copy",
|
|
222
|
+
container: n !== void 0 ? n : document.body
|
|
223
|
+
});
|
|
224
|
+
r.on("success", (s) => {
|
|
225
|
+
r.destroy(), a(s);
|
|
226
|
+
}), r.on("error", (s) => {
|
|
227
|
+
r.destroy(), l(s);
|
|
228
|
+
}), document.body.appendChild(o), o.click(), document.body.removeChild(o);
|
|
229
|
+
});
|
|
230
|
+
}
|
|
231
|
+
}), Ht = (t) => new Promise((e, n) => {
|
|
232
|
+
try {
|
|
233
|
+
Kt().toClipboard(t), v.success("复制成功!"), e(t);
|
|
234
|
+
} catch (a) {
|
|
235
|
+
v.error("复制失败!"), n(a);
|
|
236
|
+
}
|
|
237
|
+
});
|
|
238
|
+
function Q(t, e, n = ["id"]) {
|
|
239
|
+
for (let a in e)
|
|
240
|
+
Object.keys(t).includes(a) ? typeof e[a] == "object" && !Array.isArray(e[a]) ? Q(t[a], e[a]) : t[a] = e[a] : n.includes(a) && (t[a] = e[a]);
|
|
241
|
+
return t;
|
|
242
|
+
}
|
|
243
|
+
function Wt(t) {
|
|
244
|
+
const e = Lt(!1), n = () => {
|
|
245
|
+
e.value = C.isFullscreen;
|
|
246
|
+
};
|
|
247
|
+
C.on("change", n);
|
|
248
|
+
function a() {
|
|
249
|
+
if (!C.isEnabled)
|
|
250
|
+
return v.warning("暂不不支持全屏"), !1;
|
|
251
|
+
C.toggle(t);
|
|
252
|
+
}
|
|
253
|
+
return Rt(() => {
|
|
254
|
+
C.off("change", n);
|
|
255
|
+
}), { isFullPage: e, toggle: a };
|
|
256
|
+
}
|
|
257
|
+
function A(t, e) {
|
|
258
|
+
if (!t) return "";
|
|
259
|
+
let n = t.getDay(), a = X(t), l = Math.floor((t.getMonth() + 3) / 3).toString();
|
|
260
|
+
const o = {
|
|
261
|
+
"Y+": t.getFullYear().toString(),
|
|
262
|
+
// 年
|
|
263
|
+
"m+": (t.getMonth() + 1).toString(),
|
|
264
|
+
// 月(月份从0开始,要+1)
|
|
265
|
+
"d+": t.getDate().toString(),
|
|
266
|
+
// 日
|
|
267
|
+
"H+": t.getHours().toString(),
|
|
268
|
+
// 时
|
|
269
|
+
"M+": t.getMinutes().toString(),
|
|
270
|
+
// 分
|
|
271
|
+
"S+": t.getSeconds().toString(),
|
|
272
|
+
// 秒
|
|
273
|
+
"q+": l
|
|
274
|
+
// 季度
|
|
275
|
+
}, r = {
|
|
276
|
+
0: "日",
|
|
277
|
+
1: "一",
|
|
278
|
+
2: "二",
|
|
279
|
+
3: "三",
|
|
280
|
+
4: "四",
|
|
281
|
+
5: "五",
|
|
282
|
+
6: "六"
|
|
283
|
+
}, s = {
|
|
284
|
+
1: "一",
|
|
285
|
+
2: "二",
|
|
286
|
+
3: "三",
|
|
287
|
+
4: "四"
|
|
288
|
+
};
|
|
289
|
+
/(W+)/.test(e) && (e = e.replace(RegExp.$1, RegExp.$1.length > 1 ? RegExp.$1.length > 2 ? "星期" + r[n] : "周" + r[n] : r[n])), /(Q+)/.test(e) && (e = e.replace(RegExp.$1, RegExp.$1.length == 4 ? "第" + s[l] + "季度" : s[l])), /(Z+)/.test(e) && (e = e.replace(RegExp.$1, RegExp.$1.length == 3 ? "第" + a + "周" : a + ""));
|
|
290
|
+
for (let u in o) {
|
|
291
|
+
let c = new RegExp("(" + u + ")").exec(e);
|
|
292
|
+
c && (e = e.replace(c[1], RegExp.$1.length == 1 ? o[u] : o[u].padStart(RegExp.$1.length, "0")));
|
|
293
|
+
}
|
|
294
|
+
return e;
|
|
295
|
+
}
|
|
296
|
+
function X(t) {
|
|
297
|
+
let e = new Date(t.getTime()), n = e.getDay() || 7;
|
|
298
|
+
e.setDate(e.getDate() - n + 1 + 5);
|
|
299
|
+
let a = new Date(e.getFullYear(), 0, 1), l = a.getDay(), o = 1;
|
|
300
|
+
l != 0 && (o = 7 - l + 1), a = new Date(e.getFullYear(), 0, 1 + o);
|
|
301
|
+
let r = Math.ceil((e.valueOf() - a.valueOf()) / 864e5);
|
|
302
|
+
return Math.ceil(r / 7);
|
|
303
|
+
}
|
|
304
|
+
function qt(t, e = "YYYY-mm-dd") {
|
|
305
|
+
let n, a, l = (/* @__PURE__ */ new Date()).getTime();
|
|
306
|
+
if (typeof t == "string" || typeof t == "object" ? n = new Date(t).getTime() : n = t, l = Number.parseInt(`${l - n}`), l < 1e4)
|
|
307
|
+
return "刚刚";
|
|
308
|
+
if (l < 6e4 && l >= 1e4)
|
|
309
|
+
return a = Math.floor(l / 1e3), `${a}秒前`;
|
|
310
|
+
if (l < 36e5 && l >= 6e4)
|
|
311
|
+
return a = Math.floor(l / 6e4), `${a}分钟前`;
|
|
312
|
+
if (l < 864e5 && l >= 36e5)
|
|
313
|
+
return a = Math.floor(l / 36e5), `${a}小时前`;
|
|
314
|
+
if (l < 2592e5 && l >= 864e5)
|
|
315
|
+
return a = Math.floor(l / 864e5), `${a}天前`;
|
|
316
|
+
{
|
|
317
|
+
let o = t;
|
|
318
|
+
return (typeof t == "string" || typeof t == "object") && (o = new Date(t)), A(o, e);
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
function Jt(t) {
|
|
322
|
+
let e = new Date(t).getHours();
|
|
323
|
+
return e < 6 ? "凌晨好" : e < 9 ? "早上好" : e < 12 ? "上午好" : e < 14 ? "中午好" : e < 17 ? "下午好" : e < 19 ? "傍晚好" : e < 22 ? "晚上好" : "夜里好";
|
|
324
|
+
}
|
|
325
|
+
const zt = (t, e, n) => n ? `${n}%` : "-", Zt = (t, e, n) => n ? A(new Date(n), "YYYY-mm-dd") : "-", Qt = (t, e, n) => n ? A(new Date(n), "YYYY-mm-dd HH:MM:SS") : "-", Xt = (t, e, n) => {
|
|
326
|
+
if (!n) return "-";
|
|
327
|
+
let a = 0;
|
|
328
|
+
return typeof t == "number" && (a = t), typeof n == "number" && (a = n), A(new Date(a * 1e3), "HH:MM:SS");
|
|
329
|
+
}, Gt = (t = "0", e = 4) => Number.parseFloat(t).toFixed(e), Vt = (t = "0") => Number.parseFloat(t).toFixed(2), ea = (t) => {
|
|
330
|
+
let e = t && t.toUpperCase();
|
|
331
|
+
const n = {
|
|
332
|
+
11: "北京",
|
|
333
|
+
12: "天津",
|
|
334
|
+
13: "河北",
|
|
335
|
+
14: "山西",
|
|
336
|
+
15: "内蒙古",
|
|
337
|
+
21: "辽宁",
|
|
338
|
+
22: "吉林",
|
|
339
|
+
23: "黑龙江 ",
|
|
340
|
+
31: "上海",
|
|
341
|
+
32: "江苏",
|
|
342
|
+
33: "浙江",
|
|
343
|
+
34: "安徽",
|
|
344
|
+
35: "福建",
|
|
345
|
+
36: "江西",
|
|
346
|
+
37: "山东",
|
|
347
|
+
41: "河南",
|
|
348
|
+
42: "湖北 ",
|
|
349
|
+
43: "湖南",
|
|
350
|
+
44: "广东",
|
|
351
|
+
45: "广西",
|
|
352
|
+
46: "海南",
|
|
353
|
+
50: "重庆",
|
|
354
|
+
51: "四川",
|
|
355
|
+
52: "贵州",
|
|
356
|
+
53: "云南",
|
|
357
|
+
54: "西藏 ",
|
|
358
|
+
61: "陕西",
|
|
359
|
+
62: "甘肃",
|
|
360
|
+
63: "青海",
|
|
361
|
+
64: "宁夏",
|
|
362
|
+
65: "新疆",
|
|
363
|
+
71: "台湾",
|
|
364
|
+
81: "香港",
|
|
365
|
+
82: "澳门",
|
|
366
|
+
91: "国外 "
|
|
367
|
+
};
|
|
368
|
+
let a = "", l = !0;
|
|
369
|
+
if (!e || !/^\d{6}(18|19|20)?\d{2}(0[1-9]|1[012])(0[1-9]|[12]\d|3[01])\d{3}(\d|X)$/i.test(e))
|
|
370
|
+
a = "身份证号格式错误", l = !1;
|
|
371
|
+
else if (!n[e.substr(0, 2)])
|
|
372
|
+
a = "身份证地址编码错误", l = !1;
|
|
373
|
+
else if (e.length == 18) {
|
|
374
|
+
e = e.split("");
|
|
375
|
+
for (var o = [7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2], r = [1, 0, "X", 9, 8, 7, 6, 5, 4, 3, 2], s = 0, u = 0, c = 0, _ = 0; _ < 17; _++)
|
|
376
|
+
u = e[_], c = o[_], s += u * c;
|
|
377
|
+
r[s % 11], r[s % 11] != e[17] && (a = "身份证校验位错误", l = !1);
|
|
378
|
+
}
|
|
379
|
+
return {
|
|
380
|
+
tip: a,
|
|
381
|
+
pass: l
|
|
382
|
+
};
|
|
383
|
+
}, ta = (t, e, n) => {
|
|
384
|
+
e = e || "hskj20180614java", n = n || "hskj20180614java";
|
|
385
|
+
let a = h.enc.Utf8.parse(e), l = h.enc.Utf8.parse(n), o = h.enc.Utf8.parse(t), r = h.AES.encrypt(o, a, {
|
|
386
|
+
iv: l,
|
|
387
|
+
mode: h.mode.CBC,
|
|
388
|
+
padding: h.pad.ZeroPadding
|
|
389
|
+
});
|
|
390
|
+
return h.enc.Base64.stringify(r.ciphertext);
|
|
391
|
+
}, aa = (t, e, n) => {
|
|
392
|
+
e = e || "hskj20180614java", n = n || "hskj20180614java";
|
|
393
|
+
var a = h.enc.Utf8.parse(e);
|
|
394
|
+
let l = h.enc.Utf8.parse(n);
|
|
395
|
+
var o = h.AES.decrypt(t, a, {
|
|
396
|
+
iv: l,
|
|
397
|
+
mode: h.mode.CBC,
|
|
398
|
+
padding: h.pad.ZeroPadding
|
|
399
|
+
});
|
|
400
|
+
return h.enc.Base64.stringify(o.ciphertext);
|
|
401
|
+
};
|
|
402
|
+
function na({ uniqueId: t, projectCode: e, templateName: n, tableConfig: a, tableData: l }) {
|
|
403
|
+
const o = [];
|
|
404
|
+
if (a.filter((c) => R({ ...c.data, uniqueId: t })).map((c) => c.data).filter((c) => c.fieldExport == !0).forEach((c) => {
|
|
405
|
+
le.includes(c.type) || o.push(c);
|
|
406
|
+
}), y.isEmpty(o))
|
|
407
|
+
return v.warning("未配置导出字段"), Promise.reject();
|
|
408
|
+
const r = u({ templateArr: o, tableData: l });
|
|
409
|
+
return s(
|
|
410
|
+
{
|
|
411
|
+
template_name: n,
|
|
412
|
+
...r
|
|
413
|
+
},
|
|
414
|
+
e
|
|
415
|
+
);
|
|
416
|
+
async function s(c, _) {
|
|
417
|
+
return S({
|
|
418
|
+
url: `/${_}-web/pub/excel/export_model_assign`,
|
|
419
|
+
responseType: "blob",
|
|
420
|
+
method: "post",
|
|
421
|
+
data: c,
|
|
422
|
+
timeout: 1e3 * 60 * 20
|
|
423
|
+
// 二十分钟
|
|
424
|
+
}).then((d) => {
|
|
425
|
+
const m = new Blob([d], {
|
|
426
|
+
type: "application/vnd.ms-excel"
|
|
427
|
+
}), x = c.template_name ? c.template_name : (/* @__PURE__ */ new Date()).getTime().toString();
|
|
428
|
+
let g = document.createElement("a");
|
|
429
|
+
return g.href = URL.createObjectURL(m), g.download = x + ".xlsx", document.body.appendChild(g), g.click(), document.body.removeChild(g), d;
|
|
430
|
+
});
|
|
431
|
+
}
|
|
432
|
+
function u({ templateArr: c, tableData: _ }) {
|
|
433
|
+
const d = { 序号: "A" }, m = [], x = [], g = [
|
|
434
|
+
"A",
|
|
435
|
+
"B",
|
|
436
|
+
"C",
|
|
437
|
+
"D",
|
|
438
|
+
"E",
|
|
439
|
+
"F",
|
|
440
|
+
"G",
|
|
441
|
+
"H",
|
|
442
|
+
"I",
|
|
443
|
+
"J",
|
|
444
|
+
"K",
|
|
445
|
+
"L",
|
|
446
|
+
"M",
|
|
447
|
+
"N",
|
|
448
|
+
"O",
|
|
449
|
+
"P",
|
|
450
|
+
"Q",
|
|
451
|
+
"R",
|
|
452
|
+
"S",
|
|
453
|
+
"T",
|
|
454
|
+
"U",
|
|
455
|
+
"V",
|
|
456
|
+
"W",
|
|
457
|
+
"X",
|
|
458
|
+
"Y",
|
|
459
|
+
"Z",
|
|
460
|
+
"AA",
|
|
461
|
+
"AB",
|
|
462
|
+
"AC",
|
|
463
|
+
"AD",
|
|
464
|
+
"AE",
|
|
465
|
+
"AF",
|
|
466
|
+
"AG",
|
|
467
|
+
"AH",
|
|
468
|
+
"AI",
|
|
469
|
+
"AJ",
|
|
470
|
+
"AK",
|
|
471
|
+
"AL",
|
|
472
|
+
"AM",
|
|
473
|
+
"AN",
|
|
474
|
+
"AO",
|
|
475
|
+
"AP",
|
|
476
|
+
"AQ",
|
|
477
|
+
"AR",
|
|
478
|
+
"AS",
|
|
479
|
+
"AT",
|
|
480
|
+
"AU",
|
|
481
|
+
"AV",
|
|
482
|
+
"AW",
|
|
483
|
+
"AX",
|
|
484
|
+
"AY",
|
|
485
|
+
"AZ",
|
|
486
|
+
"BA",
|
|
487
|
+
"BB",
|
|
488
|
+
"BC",
|
|
489
|
+
"BD",
|
|
490
|
+
"BE",
|
|
491
|
+
"BF",
|
|
492
|
+
"BG",
|
|
493
|
+
"BH",
|
|
494
|
+
"BI",
|
|
495
|
+
"BJ",
|
|
496
|
+
"BK",
|
|
497
|
+
"BL",
|
|
498
|
+
"BM",
|
|
499
|
+
"BN",
|
|
500
|
+
"BO",
|
|
501
|
+
"BP",
|
|
502
|
+
"BQ",
|
|
503
|
+
"BR",
|
|
504
|
+
"BS",
|
|
505
|
+
"BT",
|
|
506
|
+
"BU",
|
|
507
|
+
"BV",
|
|
508
|
+
"BW",
|
|
509
|
+
"BX",
|
|
510
|
+
"BY",
|
|
511
|
+
"BZ"
|
|
512
|
+
];
|
|
513
|
+
let T = "";
|
|
514
|
+
c.forEach((i, p) => {
|
|
515
|
+
d[i.title] = g[p + 1], x.push(i.field);
|
|
516
|
+
}), _.forEach((i, p) => {
|
|
517
|
+
let w = { A: p + 1 };
|
|
518
|
+
x.forEach((b, ae) => {
|
|
519
|
+
w[g[ae + 1]] = N(i[b]);
|
|
520
|
+
}), m.push(w);
|
|
521
|
+
});
|
|
522
|
+
function N(i) {
|
|
523
|
+
return i == "1" ? "开启" : i == "0" ? "关闭" : i;
|
|
524
|
+
}
|
|
525
|
+
return {
|
|
526
|
+
titles_json_data: JSON.stringify(d),
|
|
527
|
+
infoData_json_data: JSON.stringify(m),
|
|
528
|
+
isNumerical: T
|
|
529
|
+
};
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
function la(t) {
|
|
533
|
+
return new Promise((e, n) => {
|
|
534
|
+
const a = {}, l = t.columnConfig.filter(
|
|
535
|
+
(r) => R({
|
|
536
|
+
...r.data,
|
|
537
|
+
uniqueId: t.uniqueId
|
|
538
|
+
})
|
|
539
|
+
).map((r) => r.data).filter((r) => r.fieldExport == !0).map((r) => (Object.keys(r).forEach((s) => {
|
|
540
|
+
const u = s;
|
|
541
|
+
typeof r[u] == "function" && (a[r.field] || (a[r.field] = []), a[r.field].push(r[u]));
|
|
542
|
+
}), { fieldName: r.field, title: r.title }));
|
|
543
|
+
if (y.isEmpty(l))
|
|
544
|
+
return v.warning("未配置导出字段"), n();
|
|
545
|
+
const o = t.data.map((r) => (Object.keys(a).forEach((s) => {
|
|
546
|
+
var u;
|
|
547
|
+
(u = a[s]) == null || u.forEach((c) => {
|
|
548
|
+
r[`_old_${s}`] = r[`_old_${s}`] || r[s], r[s] = r[`_old_${s}`], r[s] = c({ row: r, column: { field: s } }) || "";
|
|
549
|
+
});
|
|
550
|
+
}), r));
|
|
551
|
+
return S({
|
|
552
|
+
url: `/${t.projectCode}-web/pri/easyexcel/export_model_assign`,
|
|
553
|
+
responseType: "blob",
|
|
554
|
+
method: "post",
|
|
555
|
+
data: {
|
|
556
|
+
titles_json_data: l,
|
|
557
|
+
data_json_data: o,
|
|
558
|
+
template_name: t.template_name,
|
|
559
|
+
export_biz_type: t.export_biz_type
|
|
560
|
+
},
|
|
561
|
+
timeout: 1e3 * 60 * 20
|
|
562
|
+
// 二十分钟
|
|
563
|
+
}).then((r) => {
|
|
564
|
+
e();
|
|
565
|
+
const s = new Blob([r], {
|
|
566
|
+
type: "application/vnd.ms-excel"
|
|
567
|
+
});
|
|
568
|
+
Y(s, t.template_name + ".xlsx");
|
|
569
|
+
});
|
|
570
|
+
});
|
|
571
|
+
}
|
|
572
|
+
function ra(t, e = "/pri/easyexcel/export_model_all") {
|
|
573
|
+
return new Promise((n, a) => {
|
|
574
|
+
const l = t.columnConfig.filter(
|
|
575
|
+
(d) => R({
|
|
576
|
+
...d.data,
|
|
577
|
+
uniqueId: t.uniqueId
|
|
578
|
+
})
|
|
579
|
+
).map((d) => d.data).filter((d) => d.fieldExport == !0).map((d) => {
|
|
580
|
+
var x;
|
|
581
|
+
let m = d.field;
|
|
582
|
+
if (typeof d.formatter == "function") {
|
|
583
|
+
const g = (x = d.formatter_2) == null ? void 0 : x.match(new RegExp("(?<=row\\.)(\\w+)", "g"));
|
|
584
|
+
m = g ? String(g) : d.field;
|
|
585
|
+
}
|
|
586
|
+
return { fieldName: m, title: d.title };
|
|
587
|
+
});
|
|
588
|
+
if (y.isEmpty(l))
|
|
589
|
+
return v.warning("未配置导出字段"), a();
|
|
590
|
+
let s = (re(t.uniqueId) || {})[`${oe}${t.tableId}`] || {};
|
|
591
|
+
for (let d in t.search_json_data)
|
|
592
|
+
(t.search_json_data[d] || t.search_json_data[d] === 0) && (s[d] = t.search_json_data[d]);
|
|
593
|
+
const u = {
|
|
594
|
+
titles_json_data: l,
|
|
595
|
+
search_json_data: s,
|
|
596
|
+
template_name: t.template_name,
|
|
597
|
+
export_biz_type: t.export_biz_type
|
|
598
|
+
}, c = Object.keys(s).filter((d) => d.startsWith("_")).map((d) => {
|
|
599
|
+
const [m, x, g] = d.split("|");
|
|
600
|
+
return {
|
|
601
|
+
type: m.slice(1),
|
|
602
|
+
key: x,
|
|
603
|
+
code: g,
|
|
604
|
+
value: s[d]
|
|
605
|
+
};
|
|
606
|
+
});
|
|
607
|
+
c.length > 0 && (u.qry_json_data = JSON.stringify(c));
|
|
608
|
+
const _ = t.projectCode.replace("-web", "");
|
|
609
|
+
return S({
|
|
610
|
+
url: `/${_}-web${e}`,
|
|
611
|
+
responseType: "blob",
|
|
612
|
+
method: "post",
|
|
613
|
+
data: u,
|
|
614
|
+
timeout: 1e3 * 60 * 20
|
|
615
|
+
// 二十分钟
|
|
616
|
+
}).then((d) => {
|
|
617
|
+
n();
|
|
618
|
+
const m = new Blob([d], {
|
|
619
|
+
type: "application/vnd.ms-excel"
|
|
620
|
+
});
|
|
621
|
+
Y(m, t.template_name + ".xlsx");
|
|
622
|
+
});
|
|
623
|
+
});
|
|
624
|
+
}
|
|
625
|
+
function oa(t) {
|
|
626
|
+
const e = document.createElement("a");
|
|
627
|
+
e.href = t.url, e.download = t.name, e.style.display = "none", document.body.appendChild(e), e.click(), document.body.removeChild(e);
|
|
628
|
+
}
|
|
629
|
+
function Y(t, e) {
|
|
630
|
+
let n = document.createElement("a");
|
|
631
|
+
n.href = window.URL.createObjectURL(t), n.download = /\./.test(e) ? e : e + ".xlsx", document.body.appendChild(n), n.click(), document.body.removeChild(n);
|
|
632
|
+
}
|
|
633
|
+
function sa(t) {
|
|
634
|
+
const [e = "", n = ""] = t.split(","), a = e.match(/:(.*?);/)[1], l = atob(n);
|
|
635
|
+
let o = l.length, r = new Uint8Array(o);
|
|
636
|
+
for (; o--; )
|
|
637
|
+
r[o] = l.charCodeAt(o);
|
|
638
|
+
return new Blob([r], {
|
|
639
|
+
type: a
|
|
640
|
+
});
|
|
641
|
+
}
|
|
642
|
+
const ia = {
|
|
643
|
+
// 创建 loading
|
|
644
|
+
start: () => {
|
|
645
|
+
const t = document.body, e = document.createElement("div");
|
|
646
|
+
e.setAttribute("class", "loading-next");
|
|
647
|
+
const n = `
|
|
648
|
+
<div class="loading-next-box">
|
|
649
|
+
<div class="loading-next-box-warp">
|
|
650
|
+
<div class="loading-next-box-item"></div>
|
|
651
|
+
<div class="loading-next-box-item"></div>
|
|
652
|
+
<div class="loading-next-box-item"></div>
|
|
653
|
+
<div class="loading-next-box-item"></div>
|
|
654
|
+
<div class="loading-next-box-item"></div>
|
|
655
|
+
<div class="loading-next-box-item"></div>
|
|
656
|
+
<div class="loading-next-box-item"></div>
|
|
657
|
+
<div class="loading-next-box-item"></div>
|
|
658
|
+
<div class="loading-next-box-item"></div>
|
|
659
|
+
</div>
|
|
660
|
+
</div>
|
|
661
|
+
`;
|
|
662
|
+
e.innerHTML = n, t.insertBefore(e, t.childNodes[0]), window.nextLoading = !0;
|
|
663
|
+
},
|
|
664
|
+
// 移除 loading
|
|
665
|
+
done: (t = 0) => {
|
|
666
|
+
Ot(() => {
|
|
667
|
+
setTimeout(() => {
|
|
668
|
+
var n;
|
|
669
|
+
window.nextLoading = !1;
|
|
670
|
+
const e = document.querySelector(".loading-next");
|
|
671
|
+
(n = e == null ? void 0 : e.parentNode) == null || n.removeChild(e);
|
|
672
|
+
}, t);
|
|
673
|
+
});
|
|
674
|
+
}
|
|
675
|
+
}, ua = [
|
|
676
|
+
{ label: "F1", value: "F1" },
|
|
677
|
+
{ label: "F2", value: "F2" },
|
|
678
|
+
{ label: "F3", value: "F3" },
|
|
679
|
+
{ label: "F4", value: "F4" },
|
|
680
|
+
{ label: "F5", value: "F5" },
|
|
681
|
+
{ label: "F6", value: "F6" },
|
|
682
|
+
{ label: "F7", value: "F7" },
|
|
683
|
+
{ label: "F8", value: "F8" },
|
|
684
|
+
{ label: "F9", value: "F9" },
|
|
685
|
+
{ label: "F10", value: "F10" },
|
|
686
|
+
{ label: "F11", value: "F11" },
|
|
687
|
+
{ label: "F12", value: "F12" },
|
|
688
|
+
{ label: "Q", value: "KeyQ" },
|
|
689
|
+
{ label: "W", value: "KeyW" },
|
|
690
|
+
{ label: "E", value: "KeyE" },
|
|
691
|
+
{ label: "R", value: "KeyR" },
|
|
692
|
+
{ label: "T", value: "KeyT" },
|
|
693
|
+
{ label: "Y", value: "KeyY" },
|
|
694
|
+
{ label: "U", value: "KeyU" },
|
|
695
|
+
{ label: "I", value: "KeyI" },
|
|
696
|
+
{ label: "O", value: "KeyO" },
|
|
697
|
+
{ label: "P", value: "KeyP" },
|
|
698
|
+
{ label: "A", value: "KeyA" },
|
|
699
|
+
{ label: "S", value: "KeyS" },
|
|
700
|
+
{ label: "D", value: "KeyD" },
|
|
701
|
+
{ label: "F", value: "KeyF" },
|
|
702
|
+
{ label: "G", value: "KeyG" },
|
|
703
|
+
{ label: "H", value: "KeyH" },
|
|
704
|
+
{ label: "J", value: "KeyJ" },
|
|
705
|
+
{ label: "K", value: "KeyK" },
|
|
706
|
+
{ label: "L", value: "KeyL" },
|
|
707
|
+
{ label: "Z", value: "KeyZ" },
|
|
708
|
+
{ label: "X", value: "KeyX" },
|
|
709
|
+
{ label: "C", value: "KeyC" },
|
|
710
|
+
{ label: "V", value: "KeyV" },
|
|
711
|
+
{ label: "B", value: "KeyB" },
|
|
712
|
+
{ label: "N", value: "KeyN" },
|
|
713
|
+
{ label: "M", value: "KeyM" },
|
|
714
|
+
{ label: "Tab", value: "Tab" },
|
|
715
|
+
{ label: "Backspace", value: "Backspace" },
|
|
716
|
+
{ label: "Enter", value: "Enter" },
|
|
717
|
+
{ label: "NumpadEnter", value: "NumpadEnter" },
|
|
718
|
+
{ label: "Delete", value: "Delete" },
|
|
719
|
+
{ label: "左侧Shift", value: "ShiftLeft" },
|
|
720
|
+
{ label: "左侧Alt", value: "AltLeft" },
|
|
721
|
+
{ label: "左侧Ctrl", value: "ControlLeft" },
|
|
722
|
+
{ label: "左侧Win", value: "MetaLeft" },
|
|
723
|
+
{ label: "空格键", value: "Space" },
|
|
724
|
+
{ label: "右侧Alt", value: "AltRight" },
|
|
725
|
+
{ label: "右侧Win", value: "MetaRight" },
|
|
726
|
+
{ label: "右侧Ctrl", value: "ControlRight" },
|
|
727
|
+
{ label: "大键盘数字1", value: "Digit1" },
|
|
728
|
+
{ label: "大键盘数字2", value: "Digit2" },
|
|
729
|
+
{ label: "大键盘数字3", value: "Digit3" },
|
|
730
|
+
{ label: "大键盘数字4", value: "Digit4" },
|
|
731
|
+
{ label: "大键盘数字5", value: "Digit5" },
|
|
732
|
+
{ label: "大键盘数字6", value: "Digit6" },
|
|
733
|
+
{ label: "大键盘数字7", value: "Digit7" },
|
|
734
|
+
{ label: "大键盘数字8", value: "Digit8" },
|
|
735
|
+
{ label: "大键盘数字9", value: "Digit9" },
|
|
736
|
+
{ label: "大键盘数字0", value: "Digit0" },
|
|
737
|
+
{ label: "小键盘数字1", value: "Numpad1" },
|
|
738
|
+
{ label: "小键盘数字2", value: "Numpad2" },
|
|
739
|
+
{ label: "小键盘数字3", value: "Numpad3" },
|
|
740
|
+
{ label: "小键盘数字4", value: "Numpad4" },
|
|
741
|
+
{ label: "小键盘数字5", value: "Numpad5" },
|
|
742
|
+
{ label: "小键盘数字6", value: "Numpad6" },
|
|
743
|
+
{ label: "小键盘数字7", value: "Numpad7" },
|
|
744
|
+
{ label: "小键盘数字8", value: "Numpad8" },
|
|
745
|
+
{ label: "小键盘数字9", value: "Numpad9" },
|
|
746
|
+
{ label: "小键盘数字0", value: "Numpad0" }
|
|
747
|
+
];
|
|
748
|
+
function E() {
|
|
749
|
+
return {
|
|
750
|
+
hexToRgb: (l) => {
|
|
751
|
+
let o = "";
|
|
752
|
+
if (!/^\#?[0-9A-Fa-f]{6}$/.test(l))
|
|
753
|
+
return v.warning("输入错误的hex"), "";
|
|
754
|
+
l = l.replace("#", ""), o = l.match(/../g);
|
|
755
|
+
for (let s = 0; s < 3; s++) o[s] = parseInt(o[s], 16);
|
|
756
|
+
return o;
|
|
757
|
+
},
|
|
758
|
+
rgbToHex: (l, o, r) => {
|
|
759
|
+
let s = /^\d{1,3}$/;
|
|
760
|
+
if (!s.test(String(l)) || !s.test(String(o)) || !s.test(String(r)))
|
|
761
|
+
return v.warning("输入错误的rgb颜色值"), "";
|
|
762
|
+
let u = [l.toString(16), o.toString(16), r.toString(16)];
|
|
763
|
+
for (let c = 0; c < 3; c++) u[c].length == 1 && (u[c] = `0${u[c]}`);
|
|
764
|
+
return `#${u.join("")}`;
|
|
765
|
+
},
|
|
766
|
+
getDarkColor: (l, o) => {
|
|
767
|
+
if (!/^\#?[0-9A-Fa-f]{6}$/.test(l))
|
|
768
|
+
return v.warning("输入错误的hex颜色值"), "";
|
|
769
|
+
let s = E().hexToRgb(l);
|
|
770
|
+
for (let u = 0; u < 3; u++) s[u] = Math.floor(s[u] * (1 - o));
|
|
771
|
+
return E().rgbToHex(s[0], s[1], s[2]);
|
|
772
|
+
},
|
|
773
|
+
getLightColor: (l, o) => {
|
|
774
|
+
if (!/^\#?[0-9A-Fa-f]{6}$/.test(l))
|
|
775
|
+
return v.warning("输入错误的hex颜色值"), "";
|
|
776
|
+
let s = E().hexToRgb(l);
|
|
777
|
+
for (let u = 0; u < 3; u++) s[u] = Math.floor((255 - s[u]) * o + s[u]);
|
|
778
|
+
return E().rgbToHex(s[0], s[1], s[2]);
|
|
779
|
+
}
|
|
780
|
+
};
|
|
781
|
+
}
|
|
782
|
+
function ca(t, e = !0) {
|
|
783
|
+
const n = [];
|
|
784
|
+
function a(l, o = []) {
|
|
785
|
+
return l.reduce((r, s) => (r.push(s), s != null && s.children && s.children.length && r.push(...a(s.children)), r), o);
|
|
786
|
+
}
|
|
787
|
+
return a(e ? y.cloneDeep(t) : t, n), n;
|
|
788
|
+
}
|
|
789
|
+
function da(t) {
|
|
790
|
+
return t.reduce((e, n) => {
|
|
791
|
+
e[D] || (e[D] = []);
|
|
792
|
+
const a = e[D].concat(n[D] || []);
|
|
793
|
+
return Object.assign({}, e, n, {
|
|
794
|
+
[D]: [...new Set(a)]
|
|
795
|
+
});
|
|
796
|
+
}, {});
|
|
797
|
+
}
|
|
798
|
+
function fa(t, e = !1) {
|
|
799
|
+
const n = {}, a = (l) => Object.values(l).reduce((o, r) => (delete r[D], o = Object.assign(o, r), o), {});
|
|
800
|
+
return t.forEach((l) => {
|
|
801
|
+
const o = l.getData();
|
|
802
|
+
Object.assign(n, a(o));
|
|
803
|
+
}), e ? y.cloneDeep(n) : y.cloneDeep({
|
|
804
|
+
...n,
|
|
805
|
+
[D]: Object.keys(n)
|
|
806
|
+
});
|
|
807
|
+
}
|
|
808
|
+
function ga(t) {
|
|
809
|
+
if (Array.isArray(t)) {
|
|
810
|
+
if (t.length === 0 || t.every((e) => typeof e == "string" || typeof e == "number")) return String(t);
|
|
811
|
+
if (t.every((e) => typeof e == "object" && e !== null)) return JSON.stringify(t);
|
|
812
|
+
}
|
|
813
|
+
return typeof t == "object" && t !== null ? JSON.stringify(t) : t;
|
|
814
|
+
}
|
|
815
|
+
const ma = (t, e, n) => {
|
|
816
|
+
if (!e) return t;
|
|
817
|
+
const a = e.toLowerCase();
|
|
818
|
+
return t.filter((l) => n(l).some((r) => r && r.toLowerCase().includes(a)));
|
|
819
|
+
};
|
|
820
|
+
let G;
|
|
821
|
+
const pa = 60 * 1e3;
|
|
822
|
+
let $ = !1, j = !1, B;
|
|
823
|
+
const ya = /<script.*?src=["'](.*?)["'].*?><\/script>/g, k = /index-(.*?)\.js/g, V = async () => fetch("/index.html?timestep=" + Date.now()).then((t) => t.text()).then((t) => {
|
|
824
|
+
var n, a;
|
|
825
|
+
const e = (n = t.match(ya)) == null ? void 0 : n.filter((l) => k.test(l));
|
|
826
|
+
return e && e.length > 0 ? y.get(((a = e[0]) == null ? void 0 : a.match(k)) || [], "0", "") : "";
|
|
827
|
+
}), ee = () => V().then((t) => {
|
|
828
|
+
t && t != G && !$ && ($ = !0, te(), se.confirm("系统版本更新了,是否立即刷新页面?", "提示", {
|
|
829
|
+
confirmButtonText: "立即刷新",
|
|
830
|
+
cancelButtonText: "稍后刷新",
|
|
831
|
+
type: "warning",
|
|
832
|
+
closeOnClickModal: !1
|
|
833
|
+
}).then(() => {
|
|
834
|
+
location.reload();
|
|
835
|
+
}));
|
|
836
|
+
}), I = async () => {
|
|
837
|
+
B = window.setTimeout(async () => {
|
|
838
|
+
j || ee(), I();
|
|
839
|
+
}, pa);
|
|
840
|
+
};
|
|
841
|
+
function te() {
|
|
842
|
+
B && (clearTimeout(B), B = 0);
|
|
843
|
+
}
|
|
844
|
+
async function ba() {
|
|
845
|
+
return V().then((t) => {
|
|
846
|
+
G = t, I(), document.addEventListener("visibilitychange", () => {
|
|
847
|
+
j = document.hidden, j ? te() : (ee(), I());
|
|
848
|
+
});
|
|
849
|
+
});
|
|
850
|
+
}
|
|
851
|
+
const U = (t) => {
|
|
852
|
+
const e = "1.23452384164.123412416";
|
|
853
|
+
document.getElementById(e) !== null && document.body.removeChild(document.getElementById(e));
|
|
854
|
+
const n = document.createElement("canvas");
|
|
855
|
+
n.width = 200, n.height = 130;
|
|
856
|
+
const a = n.getContext("2d");
|
|
857
|
+
a.rotate(-20 * Math.PI / 180), a.font = "12px Vedana", a.fillStyle = "rgba(200, 200, 200, 0.30)", a.textBaseline = "middle", a.fillText(t, n.width / 10, n.height / 2);
|
|
858
|
+
const l = document.createElement("div");
|
|
859
|
+
return l.id = e, l.style.pointerEvents = "none", l.style.top = "0px", l.style.left = "0px", l.style.position = "fixed", l.style.zIndex = "10000000", l.style.width = `${document.documentElement.clientWidth}px`, l.style.height = `${document.documentElement.clientHeight}px`, l.style.background = `url(${n.toDataURL("image/png")}) left top repeat`, document.body.appendChild(l), e;
|
|
860
|
+
}, ha = {
|
|
861
|
+
// 设置水印
|
|
862
|
+
set: (t) => {
|
|
863
|
+
let e = U(t);
|
|
864
|
+
document.getElementById(e) === null && (e = U(t));
|
|
865
|
+
},
|
|
866
|
+
// 删除水印
|
|
867
|
+
del: () => {
|
|
868
|
+
let t = "1.23452384164.123412416";
|
|
869
|
+
document.getElementById(t) !== null && document.body.removeChild(document.getElementById(t));
|
|
870
|
+
}
|
|
871
|
+
}, xa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
872
|
+
__proto__: null,
|
|
873
|
+
CurrentRoute: ie,
|
|
874
|
+
CurrentRouter: ue,
|
|
875
|
+
CustomeStore: ce,
|
|
876
|
+
Download: oa,
|
|
877
|
+
HsMessage: de,
|
|
878
|
+
HsMessageBox: fe,
|
|
879
|
+
HsNotification: ge,
|
|
880
|
+
IS_DEV: me,
|
|
881
|
+
IsIdNumber: ea,
|
|
882
|
+
Local: pe,
|
|
883
|
+
NEXT_NAME: ye,
|
|
884
|
+
NextLoading: ia,
|
|
885
|
+
Session: be,
|
|
886
|
+
add: he,
|
|
887
|
+
addUrlParams: ve,
|
|
888
|
+
axiosInterceptors: _e,
|
|
889
|
+
cfprint: O,
|
|
890
|
+
checkPlugin: J,
|
|
891
|
+
clearAllIndexDB: xe,
|
|
892
|
+
convertCurrency: K,
|
|
893
|
+
copyText: Ht,
|
|
894
|
+
dataURLtoBlob: sa,
|
|
895
|
+
dateFormatHMS: Xt,
|
|
896
|
+
dateFormatYMD: Zt,
|
|
897
|
+
dateFormatYMDHMS: Qt,
|
|
898
|
+
decimalDigits: we,
|
|
899
|
+
decrypt: aa,
|
|
900
|
+
deepClone: De,
|
|
901
|
+
div: Ce,
|
|
902
|
+
downloadFile: Y,
|
|
903
|
+
elSvg: Ee,
|
|
904
|
+
encrypt: ta,
|
|
905
|
+
encryptionTool: Se,
|
|
906
|
+
exportAllData: ra,
|
|
907
|
+
exportSelectedData: la,
|
|
908
|
+
exportSelectedDownloadFile: na,
|
|
909
|
+
fixedNumAccuracy: P,
|
|
910
|
+
formatAxis: Jt,
|
|
911
|
+
formatDate: A,
|
|
912
|
+
formatPast: qt,
|
|
913
|
+
fuzzySearch: ma,
|
|
914
|
+
getAuthFieldsByMid: Ae,
|
|
915
|
+
getColumnWidthConfig: Te,
|
|
916
|
+
getConfig: Ne,
|
|
917
|
+
getDataDictListByMid: Be,
|
|
918
|
+
getDataType: Fe,
|
|
919
|
+
getDictListByMid: Pe,
|
|
920
|
+
getFormDataType: Me,
|
|
921
|
+
getFormInstanceData: fa,
|
|
922
|
+
getMergeData: da,
|
|
923
|
+
getNumbers: je,
|
|
924
|
+
getStoreSystemParams: Ie,
|
|
925
|
+
getSystemParams: Le,
|
|
926
|
+
getTableDataType: Re,
|
|
927
|
+
getUrlBase64: kt,
|
|
928
|
+
getUrlParams: Oe,
|
|
929
|
+
getWeek: X,
|
|
930
|
+
globalComponentSize: Ye,
|
|
931
|
+
handleEmpty: $e,
|
|
932
|
+
handleOpenLink: ke,
|
|
933
|
+
iframeMessage: Ue,
|
|
934
|
+
isLegalNumber: Ke,
|
|
935
|
+
isMobile: He,
|
|
936
|
+
isObjectValueEqual: H,
|
|
937
|
+
isToNumber: We,
|
|
938
|
+
isUpdate: ba,
|
|
939
|
+
judementSameArr: Yt,
|
|
940
|
+
lazyImg: qe,
|
|
941
|
+
lodash: y,
|
|
942
|
+
mathTool: Je,
|
|
943
|
+
message: ze,
|
|
944
|
+
messageBox: Ze,
|
|
945
|
+
mittBus: Qe,
|
|
946
|
+
notification: Xe,
|
|
947
|
+
numberToChinese: Ge,
|
|
948
|
+
other: Ve,
|
|
949
|
+
percentFormat: zt,
|
|
950
|
+
popupPlugin: et,
|
|
951
|
+
print: Ut,
|
|
952
|
+
processData: Q,
|
|
953
|
+
push: tt,
|
|
954
|
+
removeConfig: at,
|
|
955
|
+
removeDuplicate: M,
|
|
956
|
+
request: S,
|
|
957
|
+
scale2Format: Vt,
|
|
958
|
+
scaleFormat: Gt,
|
|
959
|
+
sendMsg: z,
|
|
960
|
+
setColumnWidthConfig: nt,
|
|
961
|
+
setConfig: lt,
|
|
962
|
+
setLocalSystemParams: rt,
|
|
963
|
+
setTagsViewNameI18n: ot,
|
|
964
|
+
shortcutList: ua,
|
|
965
|
+
showPopup: st,
|
|
966
|
+
sub: it,
|
|
967
|
+
systemStore: L,
|
|
968
|
+
times: ut,
|
|
969
|
+
transferString: ga,
|
|
970
|
+
treeToList: ca,
|
|
971
|
+
trimPrintData: Z,
|
|
972
|
+
useChangeColor: E,
|
|
973
|
+
useMittBus: ct,
|
|
974
|
+
useRequest: dt,
|
|
975
|
+
useTitle: ft,
|
|
976
|
+
useToggleFullPage: Wt,
|
|
977
|
+
verifiyNumberInteger: gt,
|
|
978
|
+
verifyAccount: mt,
|
|
979
|
+
verifyAndSpace: pt,
|
|
980
|
+
verifyCarNum: yt,
|
|
981
|
+
verifyCnAndSpace: bt,
|
|
982
|
+
verifyEmail: ht,
|
|
983
|
+
verifyEnAndSpace: vt,
|
|
984
|
+
verifyFullName: _t,
|
|
985
|
+
verifyIPAddress: xt,
|
|
986
|
+
verifyIdCard: wt,
|
|
987
|
+
verifyNumberCnUppercase: Dt,
|
|
988
|
+
verifyNumberComma: Ct,
|
|
989
|
+
verifyNumberIntegerAndFloat: Et,
|
|
990
|
+
verifyNumberPercentage: St,
|
|
991
|
+
verifyNumberPercentageFloat: At,
|
|
992
|
+
verifyPassword: Tt,
|
|
993
|
+
verifyPasswordPowerful: Nt,
|
|
994
|
+
verifyPasswordStrength: Bt,
|
|
995
|
+
verifyPhone: Ft,
|
|
996
|
+
verifyPostalCode: Pt,
|
|
997
|
+
verifyTelPhone: Mt,
|
|
998
|
+
verifyTextColor: jt,
|
|
999
|
+
verifyUrl: It,
|
|
1000
|
+
watermark: ha
|
|
1001
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
1002
|
+
export {
|
|
1003
|
+
oa as D,
|
|
1004
|
+
la as a,
|
|
1005
|
+
ra as b,
|
|
1006
|
+
Ht as c,
|
|
1007
|
+
sa as d,
|
|
1008
|
+
na as e,
|
|
1009
|
+
fa as g,
|
|
1010
|
+
xa as i,
|
|
1011
|
+
Q as p
|
|
1012
|
+
};
|