mooho-base-admin-plus 2.10.80 → 2.10.81
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 +105 -82
- package/package/mooho-base-admin-plus.min.js +3 -3
- package/package.json +1 -1
- package/src/App.vue +31 -0
- package/src/components/input/dialog-select.vue +59 -65
- package/src/mixins/page.js +17 -15
- package/token.txt +1 -1
package/history.md
CHANGED
|
@@ -7517,14 +7517,16 @@ const showFormat = {}, mixinPage = {
|
|
|
7517
7517
|
return lodashExports.cloneDeep(a);
|
|
7518
7518
|
},
|
|
7519
7519
|
allow(a) {
|
|
7520
|
-
if (
|
|
7521
|
-
|
|
7522
|
-
|
|
7523
|
-
|
|
7524
|
-
|
|
7525
|
-
|
|
7526
|
-
|
|
7527
|
-
|
|
7520
|
+
if (this.userPermissions) {
|
|
7521
|
+
if (a.startsWith("permission/"))
|
|
7522
|
+
return this.userPermissions[a];
|
|
7523
|
+
{
|
|
7524
|
+
let r = this.$router.currentRoute.value.fullPath.substr(1).split("?")[0];
|
|
7525
|
+
if (this.userPermissions[r + "$" + a] == !0)
|
|
7526
|
+
return !0;
|
|
7527
|
+
let o = Object.keys(this.userPermissions).filter((s) => s.startsWith(r + "$")).length;
|
|
7528
|
+
return this.userPermissions[r] == !0 && o == 0;
|
|
7529
|
+
}
|
|
7528
7530
|
}
|
|
7529
7531
|
},
|
|
7530
7532
|
getCache(a, r) {
|
|
@@ -30327,7 +30329,8 @@ const comboSelect = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["render", _sfc_re
|
|
|
30327
30329
|
return {
|
|
30328
30330
|
//changed: false,
|
|
30329
30331
|
selected: null,
|
|
30330
|
-
selectedData: null
|
|
30332
|
+
selectedData: null,
|
|
30333
|
+
dialogTable: null
|
|
30331
30334
|
};
|
|
30332
30335
|
},
|
|
30333
30336
|
props: {
|
|
@@ -30448,37 +30451,34 @@ const comboSelect = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["render", _sfc_re
|
|
|
30448
30451
|
},
|
|
30449
30452
|
// 弹出选择框
|
|
30450
30453
|
dialogSelectOpen() {
|
|
30451
|
-
|
|
30452
|
-
|
|
30453
|
-
|
|
30454
|
-
|
|
30454
|
+
let a = this.$parent;
|
|
30455
|
+
for (; a.$parent != null && a.$refs.dialogTable == null; )
|
|
30456
|
+
a = a.$parent;
|
|
30457
|
+
this.multi ? this.dialogTable = a.$refs.multiDialogTable : this.dialogTable = a.$refs.dialogTable, this.dialogTable.init(this.source, () => {
|
|
30458
|
+
!this.readonly && this.source && setTimeout(async () => {
|
|
30459
|
+
for (let r in this.dialogTable.filterData)
|
|
30460
|
+
delete this.dialogTable.filterData[r];
|
|
30461
|
+
this.multi ? (this.selectedData != null ? this.dialogTable.setSelected(this.selectedData) : this.dialogTable.setSelected([]), a.openMultiDialogTable(this.param, this.multiSave)) : a.openDialogTable(this.param, this.dialogCheck);
|
|
30462
|
+
});
|
|
30455
30463
|
});
|
|
30456
30464
|
},
|
|
30457
|
-
// 弹出选择框选中
|
|
30458
|
-
dialogCheck(a) {
|
|
30459
|
-
this.$emit("update:modelValue", this.parseData(a, this.sourceDataCode)), this.selected = this.parseData(a, this.sourceDisplayCode), this.selectedData = a, this.$emit("on-change", a), this.$refs.dialogTable.close();
|
|
30460
|
-
},
|
|
30461
30465
|
// 弹出选择框移除内容
|
|
30462
30466
|
dialogSelectRemove() {
|
|
30463
30467
|
this.$emit("update:modelValue", null), this.selected = null, this.selectedData = null, this.$emit("on-change");
|
|
30464
30468
|
},
|
|
30469
|
+
// 弹出选择框选中
|
|
30470
|
+
dialogCheck(a) {
|
|
30471
|
+
this.$emit("update:modelValue", this.parseData(a, this.sourceDataCode)), this.selected = this.parseData(a, this.sourceDisplayCode), this.selectedData = a, this.$emit("on-change", a), this.dialogTable.close();
|
|
30472
|
+
},
|
|
30465
30473
|
// 多选保存
|
|
30466
30474
|
multiSave() {
|
|
30467
|
-
let a = this
|
|
30468
|
-
this.$emit("update:modelValue", JSON.stringify(r)), this.selected = o, this.selectedData = r, this.$emit("on-change", r, o), this
|
|
30469
|
-
},
|
|
30470
|
-
// 关闭
|
|
30471
|
-
close() {
|
|
30472
|
-
this.$refs.dialogTable.close();
|
|
30473
|
-
},
|
|
30474
|
-
// 双击行选中
|
|
30475
|
-
dialogTableRowDblclick(a) {
|
|
30476
|
-
this.multi || this.dialogCheck(a);
|
|
30475
|
+
let a = this.dialogTable.getSelected(), r = a.length == 0 ? null : a.map((s) => this.parseData(s, this.sourceDataCode)), o = a.length == 0 ? null : a.map((s) => this.parseData(s, this.sourceDisplayCode)).join(",");
|
|
30476
|
+
this.$emit("update:modelValue", JSON.stringify(r)), this.selected = o, this.selectedData = r, this.$emit("on-change", r, o), this.dialogTable.close();
|
|
30477
30477
|
}
|
|
30478
30478
|
}
|
|
30479
30479
|
};
|
|
30480
30480
|
function _sfc_render$F(a, r, o, s, l, c) {
|
|
30481
|
-
const u = resolveComponent("Button"), d = resolveComponent("Input")
|
|
30481
|
+
const u = resolveComponent("Button"), d = resolveComponent("Input");
|
|
30482
30482
|
return openBlock(), createElementBlock("div", null, [
|
|
30483
30483
|
createVNode$1(d, {
|
|
30484
30484
|
type: "text",
|
|
@@ -30486,67 +30486,20 @@ function _sfc_render$F(a, r, o, s, l, c) {
|
|
|
30486
30486
|
readonly: "",
|
|
30487
30487
|
clearable: !o.readonly,
|
|
30488
30488
|
modelValue: l.selected,
|
|
30489
|
-
"onUpdate:modelValue": r[1] || (r[1] = (
|
|
30489
|
+
"onUpdate:modelValue": r[1] || (r[1] = (f) => l.selected = f),
|
|
30490
30490
|
style: normalizeStyle$1({ width: o.controlWidth == null ? null : o.controlWidth + "px" }),
|
|
30491
|
-
onOnFocus: r[2] || (r[2] = (
|
|
30492
|
-
onOnClear: r[3] || (r[3] = (
|
|
30491
|
+
onOnFocus: r[2] || (r[2] = (f) => c.dialogSelectOpen()),
|
|
30492
|
+
onOnClear: r[3] || (r[3] = (f) => c.dialogSelectRemove())
|
|
30493
30493
|
}, {
|
|
30494
30494
|
prepend: withCtx(() => [
|
|
30495
30495
|
createVNode$1(u, {
|
|
30496
30496
|
size: o.size,
|
|
30497
30497
|
"custom-icon": "fa fa-search",
|
|
30498
|
-
onClick: r[0] || (r[0] = (
|
|
30498
|
+
onClick: r[0] || (r[0] = (f) => c.dialogSelectOpen())
|
|
30499
30499
|
}, null, 8, ["size"])
|
|
30500
30500
|
]),
|
|
30501
30501
|
_: 1
|
|
30502
|
-
}, 8, ["size", "clearable", "modelValue", "style"])
|
|
30503
|
-
createVNode$1(f, {
|
|
30504
|
-
ref: "dialogTable",
|
|
30505
|
-
"view-code": o.source,
|
|
30506
|
-
autoLoad: !1,
|
|
30507
|
-
"select-enable": o.multi,
|
|
30508
|
-
"check-cross-page": !0,
|
|
30509
|
-
"footer-enable": o.multi,
|
|
30510
|
-
onOnRowDblclick: c.dialogTableRowDblclick
|
|
30511
|
-
}, {
|
|
30512
|
-
command: withCtx(({ row: p }) => [
|
|
30513
|
-
o.multi ? createCommentVNode("", !0) : (openBlock(), createBlock(u, {
|
|
30514
|
-
key: 0,
|
|
30515
|
-
size: "small",
|
|
30516
|
-
type: "primary",
|
|
30517
|
-
"custom-icon": "fa fa-check",
|
|
30518
|
-
onClick: (g) => c.dialogCheck(p)
|
|
30519
|
-
}, {
|
|
30520
|
-
default: withCtx(() => [
|
|
30521
|
-
createTextVNode(toDisplayString$2(a.$t("Front_Btn_Select")), 1)
|
|
30522
|
-
]),
|
|
30523
|
-
_: 1
|
|
30524
|
-
}, 8, ["onClick"]))
|
|
30525
|
-
]),
|
|
30526
|
-
footer: withCtx(() => [
|
|
30527
|
-
createVNode$1(u, {
|
|
30528
|
-
type: "primary",
|
|
30529
|
-
"custom-icon": "fa fa-save",
|
|
30530
|
-
onClick: c.multiSave
|
|
30531
|
-
}, {
|
|
30532
|
-
default: withCtx(() => [
|
|
30533
|
-
createTextVNode(toDisplayString$2(a.$t("Front_Btn_OK")), 1)
|
|
30534
|
-
]),
|
|
30535
|
-
_: 1
|
|
30536
|
-
}, 8, ["onClick"]),
|
|
30537
|
-
createVNode$1(u, {
|
|
30538
|
-
type: "default",
|
|
30539
|
-
"custom-icon": "fa fa-times",
|
|
30540
|
-
onClick: r[4] || (r[4] = (p) => c.close())
|
|
30541
|
-
}, {
|
|
30542
|
-
default: withCtx(() => [
|
|
30543
|
-
createTextVNode(toDisplayString$2(a.$t("Front_Btn_Close")), 1)
|
|
30544
|
-
]),
|
|
30545
|
-
_: 1
|
|
30546
|
-
})
|
|
30547
|
-
]),
|
|
30548
|
-
_: 1
|
|
30549
|
-
}, 8, ["view-code", "select-enable", "footer-enable", "onOnRowDblclick"])
|
|
30502
|
+
}, 8, ["size", "clearable", "modelValue", "style"])
|
|
30550
30503
|
]);
|
|
30551
30504
|
}
|
|
30552
30505
|
const DialogSelect = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["render", _sfc_render$F]]), __vite_glob_1_5 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
@@ -106900,6 +106853,12 @@ setMatchMedia();
|
|
|
106900
106853
|
const _sfc_main$l = {
|
|
106901
106854
|
name: "app",
|
|
106902
106855
|
components: { loader: loader$1 },
|
|
106856
|
+
data() {
|
|
106857
|
+
return {
|
|
106858
|
+
dialogCheck: null,
|
|
106859
|
+
multiSave: null
|
|
106860
|
+
};
|
|
106861
|
+
},
|
|
106903
106862
|
computed: {},
|
|
106904
106863
|
methods: {
|
|
106905
106864
|
...mapMutations("admin/layout", ["setDevice", "setBodyHeight"]),
|
|
@@ -106912,6 +106871,18 @@ const _sfc_main$l = {
|
|
|
106912
106871
|
},
|
|
106913
106872
|
handleSetBodyHeight() {
|
|
106914
106873
|
this.setBodyHeight(document.body.offsetHeight);
|
|
106874
|
+
},
|
|
106875
|
+
// 打开多选表格
|
|
106876
|
+
openMultiDialogTable(a, r) {
|
|
106877
|
+
this.multiSave = r, this.$refs.multiDialogTable.open(a);
|
|
106878
|
+
},
|
|
106879
|
+
// 打开单选表格
|
|
106880
|
+
openDialogTable(a, r) {
|
|
106881
|
+
this.dialogCheck = r, this.$refs.dialogTable.open(a);
|
|
106882
|
+
},
|
|
106883
|
+
// 双击行选中
|
|
106884
|
+
dialogTableRowDblclick(a) {
|
|
106885
|
+
this.dialogCheck(a);
|
|
106915
106886
|
}
|
|
106916
106887
|
},
|
|
106917
106888
|
mounted() {
|
|
@@ -106922,10 +106893,62 @@ const _sfc_main$l = {
|
|
|
106922
106893
|
}
|
|
106923
106894
|
}, _hoisted_1$c = { id: "app" };
|
|
106924
106895
|
function _sfc_render$l(a, r, o, s, l, c) {
|
|
106925
|
-
const u = resolveComponent("router-view"), d = resolveComponent("loader");
|
|
106896
|
+
const u = resolveComponent("router-view"), d = resolveComponent("loader"), f = resolveComponent("Button"), p = resolveComponent("modal-table");
|
|
106926
106897
|
return openBlock(), createElementBlock("div", _hoisted_1$c, [
|
|
106927
106898
|
createVNode$1(u),
|
|
106928
|
-
createVNode$1(d)
|
|
106899
|
+
createVNode$1(d),
|
|
106900
|
+
createVNode$1(p, {
|
|
106901
|
+
ref: "multiDialogTable",
|
|
106902
|
+
autoLoad: !1,
|
|
106903
|
+
"select-enable": !0,
|
|
106904
|
+
"check-cross-page": !0,
|
|
106905
|
+
"footer-enable": !0
|
|
106906
|
+
}, {
|
|
106907
|
+
footer: withCtx(() => [
|
|
106908
|
+
createVNode$1(f, {
|
|
106909
|
+
type: "primary",
|
|
106910
|
+
"custom-icon": "fa fa-save",
|
|
106911
|
+
onClick: l.multiSave
|
|
106912
|
+
}, {
|
|
106913
|
+
default: withCtx(() => [
|
|
106914
|
+
createTextVNode(toDisplayString$2(a.$t("Front_Btn_OK")), 1)
|
|
106915
|
+
]),
|
|
106916
|
+
_: 1
|
|
106917
|
+
}, 8, ["onClick"]),
|
|
106918
|
+
createVNode$1(f, {
|
|
106919
|
+
type: "default",
|
|
106920
|
+
"custom-icon": "fa fa-times",
|
|
106921
|
+
onClick: r[0] || (r[0] = (g) => a.$refs.dialogTable.close())
|
|
106922
|
+
}, {
|
|
106923
|
+
default: withCtx(() => [
|
|
106924
|
+
createTextVNode(toDisplayString$2(a.$t("Front_Btn_Close")), 1)
|
|
106925
|
+
]),
|
|
106926
|
+
_: 1
|
|
106927
|
+
})
|
|
106928
|
+
]),
|
|
106929
|
+
_: 1
|
|
106930
|
+
}, 512),
|
|
106931
|
+
createVNode$1(p, {
|
|
106932
|
+
ref: "dialogTable",
|
|
106933
|
+
autoLoad: !1,
|
|
106934
|
+
"check-cross-page": !0,
|
|
106935
|
+
onOnRowDblclick: c.dialogTableRowDblclick
|
|
106936
|
+
}, {
|
|
106937
|
+
command: withCtx(({ row: g }) => [
|
|
106938
|
+
createVNode$1(f, {
|
|
106939
|
+
size: "small",
|
|
106940
|
+
type: "primary",
|
|
106941
|
+
"custom-icon": "fa fa-check",
|
|
106942
|
+
onClick: (v) => l.dialogCheck(g)
|
|
106943
|
+
}, {
|
|
106944
|
+
default: withCtx(() => [
|
|
106945
|
+
createTextVNode(toDisplayString$2(a.$t("Front_Btn_Select")), 1)
|
|
106946
|
+
]),
|
|
106947
|
+
_: 1
|
|
106948
|
+
}, 8, ["onClick"])
|
|
106949
|
+
]),
|
|
106950
|
+
_: 1
|
|
106951
|
+
}, 8, ["onOnRowDblclick"])
|
|
106929
106952
|
]);
|
|
106930
106953
|
}
|
|
106931
106954
|
const App = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["render", _sfc_render$l]]), mixinApp = {
|