mgacn-commonsdk 1.1.3 → 1.1.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/{_plugin-vue_export-helper-CVNxSg01.js → _plugin-vue_export-helper-CMKnyAmb.js}
RENAMED
|
@@ -50,12 +50,12 @@ function K(t = {}) {
|
|
|
50
50
|
const p = Number(u == null ? void 0 : u.code);
|
|
51
51
|
if (p === 401 || p === 403)
|
|
52
52
|
return a(), Promise.reject(new Error("登录失效,请重新登录"));
|
|
53
|
-
const
|
|
53
|
+
const b = _(u) || "请求失败", d = new Error(b);
|
|
54
54
|
return d.code = p, d.data = u == null ? void 0 : u.data, d.biz = u, Promise.reject(d);
|
|
55
55
|
},
|
|
56
56
|
(s) => {
|
|
57
|
-
var
|
|
58
|
-
const u = (
|
|
57
|
+
var b, d;
|
|
58
|
+
const u = (b = s == null ? void 0 : s.response) == null ? void 0 : b.status;
|
|
59
59
|
if (u === 401 || u === 403)
|
|
60
60
|
return a(), Promise.reject(new Error("登录失效,请重新登录"));
|
|
61
61
|
const m = (d = s == null ? void 0 : s.response) == null ? void 0 : d.data, p = _(m) || (s == null ? void 0 : s.message) || "请求失败";
|
|
@@ -225,13 +225,13 @@ function W(t, e, n) {
|
|
|
225
225
|
function v(t) {
|
|
226
226
|
return !!(t == null || typeof t == "string" && t.trim() === "" || Array.isArray(t) && t.length === 0 || typeof t == "object" && !Array.isArray(t) && Object.keys(t).length === 0);
|
|
227
227
|
}
|
|
228
|
-
function
|
|
228
|
+
function N(t) {
|
|
229
229
|
if (t === null || typeof t != "object") return t;
|
|
230
230
|
if (t instanceof Date) return new Date(t.getTime());
|
|
231
|
-
if (Array.isArray(t)) return t.map((n) =>
|
|
231
|
+
if (Array.isArray(t)) return t.map((n) => N(n));
|
|
232
232
|
const e = {};
|
|
233
233
|
return Object.keys(t).forEach((n) => {
|
|
234
|
-
e[n] =
|
|
234
|
+
e[n] = N(t[n]);
|
|
235
235
|
}), e;
|
|
236
236
|
}
|
|
237
237
|
function tt(t, e = 300) {
|
|
@@ -285,7 +285,7 @@ function I(t) {
|
|
|
285
285
|
const r = new Date(e);
|
|
286
286
|
return Number.isNaN(r.getTime()) ? null : r;
|
|
287
287
|
}
|
|
288
|
-
function
|
|
288
|
+
function y(t, e = "YYYY-MM-DD HH:mm:ss") {
|
|
289
289
|
const n = I(t);
|
|
290
290
|
if (!n) return "";
|
|
291
291
|
const r = n.getFullYear(), o = n.getMonth() + 1, i = n.getDate(), l = n.getHours(), c = n.getMinutes(), f = n.getSeconds(), a = {
|
|
@@ -308,11 +308,11 @@ function nt() {
|
|
|
308
308
|
t.setHours(23, 59, 59, 0);
|
|
309
309
|
const e = /* @__PURE__ */ new Date();
|
|
310
310
|
return e.setDate(e.getDate() - 30), e.setHours(0, 0, 0, 0), {
|
|
311
|
-
start:
|
|
312
|
-
end:
|
|
311
|
+
start: y(e, "YYYY-MM-DD HH:mm:ss"),
|
|
312
|
+
end: y(t, "YYYY-MM-DD HH:mm:ss")
|
|
313
313
|
};
|
|
314
314
|
}
|
|
315
|
-
function
|
|
315
|
+
function S(t) {
|
|
316
316
|
const e = {};
|
|
317
317
|
return Object.keys(t || {}).forEach((n) => {
|
|
318
318
|
const r = t[n];
|
|
@@ -349,11 +349,13 @@ function ot(t, e = 4) {
|
|
|
349
349
|
if (Number.isFinite(n))
|
|
350
350
|
return Number((n / 100).toFixed(e));
|
|
351
351
|
}
|
|
352
|
-
function st(t, e = 2) {
|
|
352
|
+
function st(t, e = 2, n = 1e9) {
|
|
353
353
|
if (t === 0 || t === "0") return 0;
|
|
354
354
|
if (t == null || t === "") return "";
|
|
355
|
-
|
|
356
|
-
|
|
355
|
+
let r = Number(t);
|
|
356
|
+
if (!Number.isFinite(r)) return "";
|
|
357
|
+
const o = Number(n), i = Number.isFinite(o) ? Math.abs(o) : 1e9;
|
|
358
|
+
return Math.abs(r) >= i && (r = r < 0 ? -i : i), Number.isInteger(r) ? r : Number(r.toFixed(e));
|
|
357
359
|
}
|
|
358
360
|
function ut(t = "id") {
|
|
359
361
|
return `${t}_${Date.now()}_${Math.random().toString(36).slice(2, 9)}`;
|
|
@@ -361,14 +363,14 @@ function ut(t = "id") {
|
|
|
361
363
|
const gt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
362
364
|
__proto__: null,
|
|
363
365
|
cleanNumber: st,
|
|
364
|
-
cleanParams:
|
|
366
|
+
cleanParams: S,
|
|
365
367
|
clearPlatformCache: Q,
|
|
366
368
|
debounce: tt,
|
|
367
|
-
deepClone:
|
|
369
|
+
deepClone: N,
|
|
368
370
|
downloadBlob: $,
|
|
369
371
|
exportFile: k,
|
|
370
372
|
findPlatformLogo: X,
|
|
371
|
-
formatDate:
|
|
373
|
+
formatDate: y,
|
|
372
374
|
formatFansCount: rt,
|
|
373
375
|
formatNum: T,
|
|
374
376
|
getRecentMonthRange: nt,
|
|
@@ -417,7 +419,7 @@ function pt(t) {
|
|
|
417
419
|
* @returns {Promise<Array>} 用户列表(兼容 result / list / 直接数组)
|
|
418
420
|
*/
|
|
419
421
|
async listUserForSelect(e = {}) {
|
|
420
|
-
const n = await t.POST("/yhAdmin/user/listForSelect",
|
|
422
|
+
const n = await t.POST("/yhAdmin/user/listForSelect", S(e));
|
|
421
423
|
return Array.isArray(n) ? n : Array.isArray(n == null ? void 0 : n.result) ? n.result : Array.isArray(n == null ? void 0 : n.list) ? n.list : [];
|
|
422
424
|
},
|
|
423
425
|
/**
|
|
@@ -442,7 +444,7 @@ function pt(t) {
|
|
|
442
444
|
*/
|
|
443
445
|
queryAllTagConfigs(e = {}) {
|
|
444
446
|
return t.GET("/yhShared/tagConfig/queryAllTagConfigs", {
|
|
445
|
-
params:
|
|
447
|
+
params: S(e)
|
|
446
448
|
});
|
|
447
449
|
},
|
|
448
450
|
/**
|
|
@@ -458,7 +460,7 @@ function pt(t) {
|
|
|
458
460
|
const { userId: n, projectId: r, clientType: o, ...i } = e && typeof e == "object" ? e : {};
|
|
459
461
|
return t.POST(
|
|
460
462
|
"/yhAdmin/trace/addTraceData",
|
|
461
|
-
|
|
463
|
+
S({
|
|
462
464
|
...i,
|
|
463
465
|
userId: H(),
|
|
464
466
|
projectId: D(),
|
|
@@ -483,7 +485,7 @@ function at() {
|
|
|
483
485
|
return t;
|
|
484
486
|
}
|
|
485
487
|
const j = "__MGACN_COMMONSDK_PERMISSION_GETTER__";
|
|
486
|
-
function
|
|
488
|
+
function bt(t) {
|
|
487
489
|
globalThis[j] = typeof t == "function" ? t : null;
|
|
488
490
|
}
|
|
489
491
|
function ct() {
|
|
@@ -495,28 +497,28 @@ function lt(t, e, n = "and") {
|
|
|
495
497
|
const o = new Set((t || []).map(String));
|
|
496
498
|
return n === "or" ? r.some((i) => o.has(i)) : r.every((i) => o.has(i));
|
|
497
499
|
}
|
|
498
|
-
function
|
|
500
|
+
function St(t, e = "and") {
|
|
499
501
|
const n = ct();
|
|
500
502
|
return typeof n != "function" ? !0 : lt(n(), t, e);
|
|
501
503
|
}
|
|
502
|
-
const
|
|
504
|
+
const Nt = (t, e) => {
|
|
503
505
|
const n = t.__vccOpts || t;
|
|
504
506
|
for (const [r, o] of e)
|
|
505
507
|
n[r] = o;
|
|
506
508
|
return n;
|
|
507
509
|
};
|
|
508
510
|
export {
|
|
509
|
-
|
|
511
|
+
Nt as _,
|
|
510
512
|
G as a,
|
|
511
513
|
L as b,
|
|
512
514
|
lt as c,
|
|
513
|
-
|
|
514
|
-
|
|
515
|
+
N as d,
|
|
516
|
+
S as e,
|
|
515
517
|
tt as f,
|
|
516
518
|
at as g,
|
|
517
519
|
T as h,
|
|
518
|
-
|
|
519
|
-
|
|
520
|
+
St as i,
|
|
521
|
+
bt as j,
|
|
520
522
|
mt as k,
|
|
521
523
|
pt as l,
|
|
522
524
|
dt as m,
|
package/dist/mgacn-admin.js
CHANGED
|
@@ -3,7 +3,7 @@ import { defineStore as TA, createPinia as Yg } from "pinia";
|
|
|
3
3
|
import Jg, { ElMessageBox as Gg, ElMessage as fA } from "element-plus";
|
|
4
4
|
import kg from "element-plus/es/locale/lang/zh-cn";
|
|
5
5
|
import wg from "mgacn-commonsdk";
|
|
6
|
-
import { s as UA, g as WA, a as eA, b as q, c as Dg, _ as BA, d as hA, e as bA, f as Sg } from "./_plugin-vue_export-helper-
|
|
6
|
+
import { s as UA, g as WA, a as eA, b as q, c as Dg, _ as BA, d as hA, e as bA, f as Sg } from "./_plugin-vue_export-helper-CMKnyAmb.js";
|
|
7
7
|
import { useRoute as cA, useRouter as OA, createRouter as sg, createWebHashHistory as bg } from "vue-router";
|
|
8
8
|
const tA = {
|
|
9
9
|
/** 部署目录名,如 account_cms;DEV 无 path 前缀时用于匹配当前系统 */
|
|
@@ -776,7 +776,7 @@ const iA = TA("menu", {
|
|
|
776
776
|
], 2);
|
|
777
777
|
};
|
|
778
778
|
}
|
|
779
|
-
}), qg = /* @__PURE__ */ BA(Vg, [["__scopeId", "data-v-
|
|
779
|
+
}), qg = /* @__PURE__ */ BA(Vg, [["__scopeId", "data-v-9ed4d509"]]), _g = ["title", "aria-label"], $g = { class: "nav" }, AB = {
|
|
780
780
|
__name: "sideMenu",
|
|
781
781
|
props: {
|
|
782
782
|
collapsed: { type: Boolean, default: !1 }
|
|
@@ -896,7 +896,10 @@ const iA = TA("menu", {
|
|
|
896
896
|
m("div", CB, [
|
|
897
897
|
w(S, null, {
|
|
898
898
|
default: k(({ Component: D, route: G }) => [
|
|
899
|
-
w(Eg, {
|
|
899
|
+
w(Eg, {
|
|
900
|
+
name: "el-fade-in-linear",
|
|
901
|
+
mode: "out-in"
|
|
902
|
+
}, {
|
|
900
903
|
default: k(() => [
|
|
901
904
|
(b(), u(nA(D), {
|
|
902
905
|
key: G.path
|
|
@@ -913,7 +916,7 @@ const iA = TA("menu", {
|
|
|
913
916
|
]);
|
|
914
917
|
};
|
|
915
918
|
}
|
|
916
|
-
}, QB = /* @__PURE__ */ BA(EB, [["__scopeId", "data-v-
|
|
919
|
+
}, QB = /* @__PURE__ */ BA(EB, [["__scopeId", "data-v-b1a45cd0"]]), MB = { class: "placeholder" }, YB = { class: "title" }, JB = {
|
|
917
920
|
__name: "placeholder",
|
|
918
921
|
setup(A) {
|
|
919
922
|
const C = cA(), I = O(() => {
|
|
@@ -1453,6 +1456,7 @@ const iA = TA("menu", {
|
|
|
1453
1456
|
{
|
|
1454
1457
|
type: "input",
|
|
1455
1458
|
prop: "menuName",
|
|
1459
|
+
label: "权限名称",
|
|
1456
1460
|
placeholder: "请输入权限名称",
|
|
1457
1461
|
width: 280
|
|
1458
1462
|
}
|
|
@@ -1722,7 +1726,7 @@ const iA = TA("menu", {
|
|
|
1722
1726
|
]);
|
|
1723
1727
|
};
|
|
1724
1728
|
}
|
|
1725
|
-
}, aA = /* @__PURE__ */ BA(cB, [["__scopeId", "data-v-
|
|
1729
|
+
}, aA = /* @__PURE__ */ BA(cB, [["__scopeId", "data-v-83db8936"]]), eB = { class: "perm-tree-wrap" }, PB = { class: "perm-tree-node" }, RB = { class: "perm-tree-node__label" }, FB = ["onClick"], lB = ["onClick"], uB = {
|
|
1726
1730
|
__name: "roleFormDialog",
|
|
1727
1731
|
emits: ["success"],
|
|
1728
1732
|
setup(A, { expose: C, emit: I }) {
|
|
@@ -2205,6 +2209,7 @@ const iA = TA("menu", {
|
|
|
2205
2209
|
{
|
|
2206
2210
|
type: "input",
|
|
2207
2211
|
prop: "roleName",
|
|
2212
|
+
label: "角色名称",
|
|
2208
2213
|
placeholder: "请输入角色名称",
|
|
2209
2214
|
width: 280
|
|
2210
2215
|
}
|
|
@@ -2438,7 +2443,7 @@ const iA = TA("menu", {
|
|
|
2438
2443
|
]);
|
|
2439
2444
|
};
|
|
2440
2445
|
}
|
|
2441
|
-
}, XA = /* @__PURE__ */ BA(MI, [["__scopeId", "data-v-
|
|
2446
|
+
}, XA = /* @__PURE__ */ BA(MI, [["__scopeId", "data-v-1fd1a299"]]), xA = "/homepage", rA = {
|
|
2442
2447
|
"system/menu/index": aA,
|
|
2443
2448
|
"system/menu": aA,
|
|
2444
2449
|
"system/role/index": XA,
|