mooho-base-admin-plus 2.5.34 → 2.5.36
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/history.md +1 -0
- package/package/mooho-base-admin-plus.min.esm.js +65 -48
- package/package/mooho-base-admin-plus.min.js +8 -8
- package/package/style.css +1 -1
- package/package.json +1 -1
- package/src/components/view/view-table.vue +43 -19
- package/src/store/modules/admin/modules/account.js +7 -4
- package/src/store/modules/admin/modules/menu.js +4 -0
- package/src/store/modules/admin/modules/page.js +7 -2
package/history.md
CHANGED
|
@@ -9571,7 +9571,7 @@ const res$o = "User", userlApi = {
|
|
|
9571
9571
|
*/
|
|
9572
9572
|
async login({ dispatch: r }, { username: a = "", password: o = "" } = {}) {
|
|
9573
9573
|
const s = await userlApi.login({ account: a, password: o });
|
|
9574
|
-
r("admin/account/saveLoginData", s, { root: !0 });
|
|
9574
|
+
await r("admin/account/saveLoginData", s, { root: !0 });
|
|
9575
9575
|
},
|
|
9576
9576
|
/**
|
|
9577
9577
|
* @description 保存登录信息
|
|
@@ -9581,7 +9581,7 @@ const res$o = "User", userlApi = {
|
|
|
9581
9581
|
* @param data {String} 数据
|
|
9582
9582
|
*/
|
|
9583
9583
|
async saveLoginData({ dispatch: r }, { user: a, token: o, data: s } = {}) {
|
|
9584
|
-
util$2.cookies.set("uuid", a.id), util$2.cookies.set("token", o), await r("admin/user/set", a, { root: !0 }), await r("admin/user/setData", s, { root: !0 }), await r("
|
|
9584
|
+
util$2.cookies.set("uuid", a.id), util$2.cookies.set("token", o), await r("admin/user/set", a, { root: !0 }), await r("admin/user/setData", s, { root: !0 }), await r("admin/menu/getMenuList", !0, { root: !0 }), await r("load", { loadOpenedTabs: Setting.page.loadOpenedTabs });
|
|
9585
9585
|
},
|
|
9586
9586
|
/**
|
|
9587
9587
|
* @description 退出登录
|
|
@@ -9613,7 +9613,7 @@ const res$o = "User", userlApi = {
|
|
|
9613
9613
|
* @param {Object} loadOpenedTabs 是否加载页签信息
|
|
9614
9614
|
*/
|
|
9615
9615
|
async load({ dispatch: r }, { loadOpenedTabs: a = !0 } = {}) {
|
|
9616
|
-
await r("admin/user/load", null, { root: !0 });
|
|
9616
|
+
await r("admin/user/load", null, { root: !0 }), await r("admin/page/openedLoad", { loadOpenedTabs: a }, { root: !0 });
|
|
9617
9617
|
}
|
|
9618
9618
|
}
|
|
9619
9619
|
}, __vite_glob_0_0$2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
@@ -16117,7 +16117,7 @@ const menu = {
|
|
|
16117
16117
|
a("setHeader", s);
|
|
16118
16118
|
const l = getNativeMenuSider();
|
|
16119
16119
|
let u = o.path, c = getHeaderName(u, l);
|
|
16120
|
-
if (c !== null) {
|
|
16120
|
+
if (c == null && (c = "home"), c !== null) {
|
|
16121
16121
|
a("setHeaderName", c), a("setMenuSider", l);
|
|
16122
16122
|
const d = getMenuSider(l, c);
|
|
16123
16123
|
a("setSider", d), a("setActivePath", o.path);
|
|
@@ -16160,35 +16160,7 @@ const menu = {
|
|
|
16160
16160
|
}, __vite_glob_0_8$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
16161
16161
|
__proto__: null,
|
|
16162
16162
|
default: menu
|
|
16163
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
16164
|
-
path: "/dashboard",
|
|
16165
|
-
title: "Dashboard",
|
|
16166
|
-
header: "home",
|
|
16167
|
-
custom: "i-icon-demo i-icon-demo-dashboard",
|
|
16168
|
-
children: [
|
|
16169
|
-
{
|
|
16170
|
-
path: `${pre}console`,
|
|
16171
|
-
title: "主控台"
|
|
16172
|
-
},
|
|
16173
|
-
{
|
|
16174
|
-
path: `${pre}monitor`,
|
|
16175
|
-
title: "监控页"
|
|
16176
|
-
},
|
|
16177
|
-
{
|
|
16178
|
-
path: `${pre}workplace`,
|
|
16179
|
-
title: "工作台",
|
|
16180
|
-
subtitle: "Workplace"
|
|
16181
|
-
}
|
|
16182
|
-
]
|
|
16183
|
-
}, menuSider = [
|
|
16184
|
-
dashboard,
|
|
16185
|
-
{
|
|
16186
|
-
path: "/i18n",
|
|
16187
|
-
title: "menu.i18n",
|
|
16188
|
-
header: "home",
|
|
16189
|
-
custom: "i-icon-demo i-icon-demo-i18n"
|
|
16190
|
-
}
|
|
16191
|
-
], isKeepAlive = (r) => lodashExports.get(r, "meta.cache", !1), page = {
|
|
16163
|
+
}, Symbol.toStringTag, { value: "Module" })), isKeepAlive = (r) => lodashExports.get(r, "meta.cache", !1), page = {
|
|
16192
16164
|
namespaced: !0,
|
|
16193
16165
|
state: {
|
|
16194
16166
|
// 可以在多页 tab 模式下显示的页面
|
|
@@ -16224,13 +16196,16 @@ const menu = {
|
|
|
16224
16196
|
const p = r.pool.find((v) => v.name === f.name);
|
|
16225
16197
|
return f.keepMeta && (p.meta = Object.assign({}, f.meta)), d.push(p ? 1 : 0), Object.assign({}, f, p);
|
|
16226
16198
|
}).filter((f, p) => d[p] === 1).filter((f) => {
|
|
16227
|
-
|
|
16228
|
-
|
|
16229
|
-
|
|
16230
|
-
|
|
16231
|
-
|
|
16199
|
+
let p = s.admin.menu.menuSider;
|
|
16200
|
+
const g = getAllSiderMenu(p).find((_) => _.path === f.fullPath);
|
|
16201
|
+
let y = !0;
|
|
16202
|
+
if (!g)
|
|
16203
|
+
y = !1;
|
|
16204
|
+
else if (g && g.auth) {
|
|
16205
|
+
const _ = s.admin.user.info, S = lodashExports.cloneDeep(_.access);
|
|
16206
|
+
S.push("hidden"), S && !includeArray(g.auth, S) && (y = !1);
|
|
16232
16207
|
}
|
|
16233
|
-
return
|
|
16208
|
+
return y;
|
|
16234
16209
|
}), a("keepAliveRefresh"), u();
|
|
16235
16210
|
});
|
|
16236
16211
|
},
|
|
@@ -41203,13 +41178,24 @@ const _sfc_main$n = {
|
|
|
41203
41178
|
this.$refs.filterSetting.open(this.tableView, this.copy(this.tableView.filterColumns));
|
|
41204
41179
|
});
|
|
41205
41180
|
},
|
|
41206
|
-
|
|
41207
|
-
|
|
41208
|
-
|
|
41209
|
-
|
|
41210
|
-
|
|
41181
|
+
onSelect(r, a) {
|
|
41182
|
+
a._checked = !0, this.selectedData.push(a), this.$emit("on-select-change");
|
|
41183
|
+
},
|
|
41184
|
+
onSelectCancel(r, a) {
|
|
41185
|
+
const o = this.selectedData.findIndex((s) => s.id == a.id);
|
|
41186
|
+
a._checked = !1, this.selectedData.splice(o, 1), this.$emit("on-select-change");
|
|
41187
|
+
},
|
|
41188
|
+
onSelectAll(r) {
|
|
41189
|
+
let a = this.getDataWithChildren(this.data);
|
|
41190
|
+
this.selectedData.length = 0, a.forEach((o) => {
|
|
41191
|
+
o._checked = !0, this.selectedData.push(o);
|
|
41211
41192
|
}), this.$emit("on-select-change");
|
|
41212
41193
|
},
|
|
41194
|
+
onSelectAllCancel(r) {
|
|
41195
|
+
this.getDataWithChildren(this.data).forEach((o) => {
|
|
41196
|
+
o._checked = !1;
|
|
41197
|
+
}), this.selectedData.length = 0, this.$emit("on-select-change");
|
|
41198
|
+
},
|
|
41213
41199
|
// 键盘事件
|
|
41214
41200
|
onKeyup(r) {
|
|
41215
41201
|
if (r) {
|
|
@@ -41718,7 +41704,10 @@ function _sfc_render$n(r, a, o, s, l, u) {
|
|
|
41718
41704
|
"highlight-row": o.highlightRow,
|
|
41719
41705
|
onOnColumnWidthResize: u.columnWidthResize,
|
|
41720
41706
|
onOnSortChange: u.sortChange,
|
|
41721
|
-
|
|
41707
|
+
onOnSelect: u.onSelect,
|
|
41708
|
+
onOnSelectCancel: u.onSelectCancel,
|
|
41709
|
+
onOnSelectAll: u.onSelectAll,
|
|
41710
|
+
onOnSelectAllCancel: u.onSelectAllCancel,
|
|
41722
41711
|
onOnDragDrop: a[4] || (a[4] = (X, Y) => this.$emit("on-drag-drop", X, Y)),
|
|
41723
41712
|
onOnCurrentChange: a[5] || (a[5] = (X, Y) => r.$emit("on-current-change", X, Y))
|
|
41724
41713
|
}, {
|
|
@@ -42116,7 +42105,7 @@ function _sfc_render$n(r, a, o, s, l, u) {
|
|
|
42116
42105
|
createElementVNode("div", null, toDisplayString$2(l.size * (l.current - 1) + X + 1), 1)
|
|
42117
42106
|
]),
|
|
42118
42107
|
_: 3
|
|
42119
|
-
}, 8, ["update-show-children", "columns", "data", "max-height", "load-data", "draggable", "span-method", "border", "show-summary", "summary-method", "page-size-opts", "row-class-name", "highlight-row", "onOnColumnWidthResize", "onOnSortChange", "
|
|
42108
|
+
}, 8, ["update-show-children", "columns", "data", "max-height", "load-data", "draggable", "span-method", "border", "show-summary", "summary-method", "page-size-opts", "row-class-name", "highlight-row", "onOnColumnWidthResize", "onOnSortChange", "onOnSelect", "onOnSelectCancel", "onOnSelectAll", "onOnSelectAllCancel"]),
|
|
42120
42109
|
createElementVNode("div", _hoisted_10$1, [
|
|
42121
42110
|
o.settingEnable && r.allow("permission/tableView") ? (openBlock(), createBlock(f, {
|
|
42122
42111
|
key: 0,
|
|
@@ -42256,7 +42245,7 @@ function _sfc_render$n(r, a, o, s, l, u) {
|
|
|
42256
42245
|
], 2)
|
|
42257
42246
|
], 2);
|
|
42258
42247
|
}
|
|
42259
|
-
const viewTable = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["render", _sfc_render$n], ["__scopeId", "data-v-
|
|
42248
|
+
const viewTable = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["render", _sfc_render$n], ["__scopeId", "data-v-ce7edcd8"]]), __vite_glob_1_32 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
42260
42249
|
__proto__: null,
|
|
42261
42250
|
default: viewTable
|
|
42262
42251
|
}, Symbol.toStringTag, { value: "Module" })), _sfc_main$m = {
|
|
@@ -44654,7 +44643,35 @@ function _sfc_render$3(r, a, o, s, l, u) {
|
|
|
44654
44643
|
}, 8, ["modelValue"])
|
|
44655
44644
|
]);
|
|
44656
44645
|
}
|
|
44657
|
-
const iHeaderSetting = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$3]])
|
|
44646
|
+
const iHeaderSetting = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$3]]), pre = "/dashboard/", dashboard = {
|
|
44647
|
+
path: "/dashboard",
|
|
44648
|
+
title: "Dashboard",
|
|
44649
|
+
header: "home",
|
|
44650
|
+
custom: "i-icon-demo i-icon-demo-dashboard",
|
|
44651
|
+
children: [
|
|
44652
|
+
{
|
|
44653
|
+
path: `${pre}console`,
|
|
44654
|
+
title: "主控台"
|
|
44655
|
+
},
|
|
44656
|
+
{
|
|
44657
|
+
path: `${pre}monitor`,
|
|
44658
|
+
title: "监控页"
|
|
44659
|
+
},
|
|
44660
|
+
{
|
|
44661
|
+
path: `${pre}workplace`,
|
|
44662
|
+
title: "工作台",
|
|
44663
|
+
subtitle: "Workplace"
|
|
44664
|
+
}
|
|
44665
|
+
]
|
|
44666
|
+
}, menuSider = [
|
|
44667
|
+
dashboard,
|
|
44668
|
+
{
|
|
44669
|
+
path: "/i18n",
|
|
44670
|
+
title: "menu.i18n",
|
|
44671
|
+
header: "home",
|
|
44672
|
+
custom: "i-icon-demo i-icon-demo-i18n"
|
|
44673
|
+
}
|
|
44674
|
+
];
|
|
44658
44675
|
function random$1(r = 32) {
|
|
44659
44676
|
const a = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890", o = a.length;
|
|
44660
44677
|
let s = "";
|