mooho-base-admin-plus 2.10.79 → 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 +2 -0
- package/package/mooho-base-admin-plus.min.esm.js +116 -85
- 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/components/view/view-table-excel.vue +24 -6
- package/src/mixins/page.js +17 -15
- package/token.txt +1 -1
package/history.md
CHANGED
|
@@ -250,3 +250,5 @@ mooho-base-admin-plus@2.10.76 - 增加筛选控件使用父对象作为条件的
|
|
|
250
250
|
mooho-base-admin-plus@2.10.77 - 内嵌表格增加重新加载方法
|
|
251
251
|
mooho-base-admin-plus@2.10.78 - 修复上一版本的bug
|
|
252
252
|
mooho-base-admin-plus@2.10.79 - Excel表格必填标致放标题左边
|
|
253
|
+
mooho-base-admin-plus@2.10.80 - Excel表格支持可筛选选择框
|
|
254
|
+
mooho-base-admin-plus@2.10.81 - 优化弹出选择控件
|
|
@@ -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({
|
|
@@ -104104,8 +104057,7 @@ const _sfc_main$o = {
|
|
|
104104
104057
|
c.type = "numeric";
|
|
104105
104058
|
else if (l.controlType === "Check")
|
|
104106
104059
|
c.type = "checkbox";
|
|
104107
|
-
else if (l.controlType === "Select") {
|
|
104108
|
-
c.editor = "select";
|
|
104060
|
+
else if (l.controlType === "Select" || l.controlType == "ComboSelect") {
|
|
104109
104061
|
let u = [];
|
|
104110
104062
|
if (c.isStaticItem)
|
|
104111
104063
|
(c.itemData || "").trim() && c.itemData.split(/[\n]/).forEach((d) => {
|
|
@@ -104151,7 +104103,16 @@ const _sfc_main$o = {
|
|
|
104151
104103
|
name: this.parseData(p, c.sourceDisplayCode)
|
|
104152
104104
|
}));
|
|
104153
104105
|
}
|
|
104154
|
-
c.selectOptions = u.map((d) => d.id)
|
|
104106
|
+
l.controlType == "Select" ? (c.editor = "select", c.selectOptions = u.map((d) => d.id)) : l.controlType == "ComboSelect" && (c.type = "autocomplete", c.dropdownMenu = !0, c.strict = !0, c.source = (d, f) => {
|
|
104107
|
+
let p = [];
|
|
104108
|
+
if (d) {
|
|
104109
|
+
const v = d.toLowerCase();
|
|
104110
|
+
p = u.filter((y) => y.name.toLowerCase().includes(v));
|
|
104111
|
+
} else
|
|
104112
|
+
p = [...u];
|
|
104113
|
+
const g = p.map((v) => v.name);
|
|
104114
|
+
f(g);
|
|
104115
|
+
});
|
|
104155
104116
|
} else l.controlType === "Date" && (c.type = "date", c.dateFormat = "YYYY-MM-DD", c.correctFormat = !0);
|
|
104156
104117
|
return c;
|
|
104157
104118
|
})
|
|
@@ -106892,6 +106853,12 @@ setMatchMedia();
|
|
|
106892
106853
|
const _sfc_main$l = {
|
|
106893
106854
|
name: "app",
|
|
106894
106855
|
components: { loader: loader$1 },
|
|
106856
|
+
data() {
|
|
106857
|
+
return {
|
|
106858
|
+
dialogCheck: null,
|
|
106859
|
+
multiSave: null
|
|
106860
|
+
};
|
|
106861
|
+
},
|
|
106895
106862
|
computed: {},
|
|
106896
106863
|
methods: {
|
|
106897
106864
|
...mapMutations("admin/layout", ["setDevice", "setBodyHeight"]),
|
|
@@ -106904,6 +106871,18 @@ const _sfc_main$l = {
|
|
|
106904
106871
|
},
|
|
106905
106872
|
handleSetBodyHeight() {
|
|
106906
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);
|
|
106907
106886
|
}
|
|
106908
106887
|
},
|
|
106909
106888
|
mounted() {
|
|
@@ -106914,10 +106893,62 @@ const _sfc_main$l = {
|
|
|
106914
106893
|
}
|
|
106915
106894
|
}, _hoisted_1$c = { id: "app" };
|
|
106916
106895
|
function _sfc_render$l(a, r, o, s, l, c) {
|
|
106917
|
-
const u = resolveComponent("router-view"), d = resolveComponent("loader");
|
|
106896
|
+
const u = resolveComponent("router-view"), d = resolveComponent("loader"), f = resolveComponent("Button"), p = resolveComponent("modal-table");
|
|
106918
106897
|
return openBlock(), createElementBlock("div", _hoisted_1$c, [
|
|
106919
106898
|
createVNode$1(u),
|
|
106920
|
-
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"])
|
|
106921
106952
|
]);
|
|
106922
106953
|
}
|
|
106923
106954
|
const App = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["render", _sfc_render$l]]), mixinApp = {
|