mooho-base-admin-plus 2.10.50 → 2.10.51
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 +79 -35
- package/package/mooho-base-admin-plus.min.js +2 -2
- package/package/style.css +1 -1
- package/package.json +1 -1
- package/src/components/view/modal-form.vue +19 -1
- package/src/components/view/modal-table.vue +31 -0
- package/src/components/view/view-form.vue +1 -0
- package/src/components/view/view-table-excel.vue +32 -37
- package/src/components/view/view-table.vue +15 -0
package/history.md
CHANGED
|
@@ -39282,6 +39282,7 @@ const formSetting = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["render", _sfc_re
|
|
|
39282
39282
|
}, Symbol.toStringTag, { value: "Module" })), _sfc_main$t = {
|
|
39283
39283
|
mixins: [mixinPage],
|
|
39284
39284
|
components: { formSetting, formSettingLayout },
|
|
39285
|
+
emits: ["on-after-save", "on-before-save", "on-blur", "on-change", "on-close"],
|
|
39285
39286
|
data() {
|
|
39286
39287
|
return {
|
|
39287
39288
|
opened: !1,
|
|
@@ -39510,6 +39511,10 @@ const formSetting = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["render", _sfc_re
|
|
|
39510
39511
|
onReady(a) {
|
|
39511
39512
|
this.formView = a;
|
|
39512
39513
|
},
|
|
39514
|
+
// 输入框失去焦点事件
|
|
39515
|
+
onBlur(a) {
|
|
39516
|
+
this.$emit("on-blur", a);
|
|
39517
|
+
},
|
|
39513
39518
|
onVisibleChange(a) {
|
|
39514
39519
|
a || (this.$refs.form.reset(), this.$emit("on-close"));
|
|
39515
39520
|
},
|
|
@@ -39670,7 +39675,8 @@ function _sfc_render$t(a, r, o, s, l, c) {
|
|
|
39670
39675
|
defaultData: o.defaultData,
|
|
39671
39676
|
"setting-enable": o.settingEnable,
|
|
39672
39677
|
onOnChange: c.onChange,
|
|
39673
|
-
onOnReady: c.onReady
|
|
39678
|
+
onOnReady: c.onReady,
|
|
39679
|
+
onOnBlur: c.onBlur
|
|
39674
39680
|
}, {
|
|
39675
39681
|
top: withCtx(({ form: y }) => [
|
|
39676
39682
|
renderSlot(a.$slots, "top", { form: y })
|
|
@@ -39713,7 +39719,7 @@ function _sfc_render$t(a, r, o, s, l, c) {
|
|
|
39713
39719
|
renderSlot(a.$slots, "bottom", { form: y })
|
|
39714
39720
|
]),
|
|
39715
39721
|
_: 3
|
|
39716
|
-
}, 8, ["view-code", "readonly", "defaultData", "setting-enable", "onOnChange", "onOnReady"])
|
|
39722
|
+
}, 8, ["view-code", "readonly", "defaultData", "setting-enable", "onOnChange", "onOnReady", "onOnBlur"])
|
|
39717
39723
|
])
|
|
39718
39724
|
]),
|
|
39719
39725
|
_: 3
|
|
@@ -39740,6 +39746,7 @@ const modalForm = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["render", _sfc_rend
|
|
|
39740
39746
|
}, Symbol.toStringTag, { value: "Module" })), _sfc_main$s = {
|
|
39741
39747
|
mixins: [mixinPage],
|
|
39742
39748
|
components: {},
|
|
39749
|
+
emits: ["after-init", "create", "on-close", "edit", "on-blur", "on-cell-click", "on-change", "on-load-data", "on-row-click", "on-row-dblclick", "on-select-change", "show"],
|
|
39743
39750
|
data() {
|
|
39744
39751
|
return {
|
|
39745
39752
|
opened: !1,
|
|
@@ -40145,6 +40152,18 @@ const modalForm = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["render", _sfc_rend
|
|
|
40145
40152
|
},
|
|
40146
40153
|
setFullscreen(a) {
|
|
40147
40154
|
this.$refs.table.isMaxHight = a, this.isFullscreen = a;
|
|
40155
|
+
},
|
|
40156
|
+
// 失去焦点事件
|
|
40157
|
+
onBlur(a, r) {
|
|
40158
|
+
this.$emit("on-blur", a, r);
|
|
40159
|
+
},
|
|
40160
|
+
// 变更事件
|
|
40161
|
+
onChange(a, r, o) {
|
|
40162
|
+
this.$emit("on-change", a, r, o);
|
|
40163
|
+
},
|
|
40164
|
+
// 选中项变化事件
|
|
40165
|
+
onSelectChange() {
|
|
40166
|
+
this.$emit("on-select-change");
|
|
40148
40167
|
}
|
|
40149
40168
|
}
|
|
40150
40169
|
}, _hoisted_1$k = { class: "title" }, _hoisted_2$f = { class: "description" }, _hoisted_3$d = { class: "ivu-ml-8 ivu-mr-8" };
|
|
@@ -40234,14 +40253,18 @@ function _sfc_render$s(a, r, o, s, l, c) {
|
|
|
40234
40253
|
onCreate: c.create,
|
|
40235
40254
|
onEdit: c.edit,
|
|
40236
40255
|
onShow: c.show,
|
|
40256
|
+
onOnBlur: c.onBlur,
|
|
40257
|
+
onOnChange: c.onChange,
|
|
40237
40258
|
onOnReady: c.onReady,
|
|
40259
|
+
onOnRemove: a.onRemove,
|
|
40238
40260
|
onOnLoadData: c.onLoadData,
|
|
40239
40261
|
onAfterInit: c.afterInit,
|
|
40240
40262
|
onOnDragDrop: r[4] || (r[4] = (p, g) => this.$emit("on-drag-drop", p, g)),
|
|
40241
40263
|
onOnCurrentChange: r[5] || (r[5] = (p, g) => a.$emit("on-current-change", p, g)),
|
|
40242
40264
|
onOnRowClick: c.onRowClick,
|
|
40243
40265
|
onOnRowDblclick: c.onRowDblclick,
|
|
40244
|
-
onOnCellClick: c.onCellClick
|
|
40266
|
+
onOnCellClick: c.onCellClick,
|
|
40267
|
+
onOnSelectChange: c.onSelectChange
|
|
40245
40268
|
}, {
|
|
40246
40269
|
top: withCtx(() => [
|
|
40247
40270
|
renderSlot(a.$slots, "top")
|
|
@@ -40287,7 +40310,7 @@ function _sfc_render$s(a, r, o, s, l, c) {
|
|
|
40287
40310
|
})
|
|
40288
40311
|
]),
|
|
40289
40312
|
_: 3
|
|
40290
|
-
}, 8, ["view-code", "static", "setting-enable", "select-enable", "check-cross-page", "tree-enable", "tree-load", "has-children", "create-enable", "edit-enable", "show-enable", "remove-enable", "draggable", "filter-enable", "page-enable", "embedded", "before-load-data", "on-search", "summary-method", "page-size-opts", "span-method", "load-data-enable", "row-class-name", "highlight-row", "returnColumns", "onCreate", "onEdit", "onShow", "onOnReady", "onOnLoadData", "onAfterInit", "onOnRowClick", "onOnRowDblclick", "onOnCellClick"])
|
|
40313
|
+
}, 8, ["view-code", "static", "setting-enable", "select-enable", "check-cross-page", "tree-enable", "tree-load", "has-children", "create-enable", "edit-enable", "show-enable", "remove-enable", "draggable", "filter-enable", "page-enable", "embedded", "before-load-data", "on-search", "summary-method", "page-size-opts", "span-method", "load-data-enable", "row-class-name", "highlight-row", "returnColumns", "onCreate", "onEdit", "onShow", "onOnBlur", "onOnChange", "onOnReady", "onOnRemove", "onOnLoadData", "onAfterInit", "onOnRowClick", "onOnRowDblclick", "onOnCellClick", "onOnSelectChange"])
|
|
40291
40314
|
])
|
|
40292
40315
|
]),
|
|
40293
40316
|
_: 3
|
|
@@ -41484,6 +41507,7 @@ const tableSetting = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["render", _sfc_r
|
|
|
41484
41507
|
}, Symbol.toStringTag, { value: "Module" })), _sfc_main$p = {
|
|
41485
41508
|
mixins: [mixin$2, mixinPage],
|
|
41486
41509
|
components: { richEditor, uploadAttachment, uploadImage, CheckGroup },
|
|
41510
|
+
emits: ["on-blur", "on-change", "on-ready"],
|
|
41487
41511
|
data() {
|
|
41488
41512
|
return {
|
|
41489
41513
|
formView: {},
|
|
@@ -103640,7 +103664,7 @@ registerAllModules();
|
|
|
103640
103664
|
const _sfc_main$o = {
|
|
103641
103665
|
mixins: [mixin$2, mixinPage],
|
|
103642
103666
|
components: { HotTable, tableSetting },
|
|
103643
|
-
emits: ["
|
|
103667
|
+
emits: ["after-init", "on-change", "on-load-data"],
|
|
103644
103668
|
data() {
|
|
103645
103669
|
return {
|
|
103646
103670
|
inited: !1,
|
|
@@ -103668,7 +103692,6 @@ const _sfc_main$o = {
|
|
|
103668
103692
|
licenseKey: "non-commercial-and-evaluation"
|
|
103669
103693
|
},
|
|
103670
103694
|
coords: {},
|
|
103671
|
-
data: [],
|
|
103672
103695
|
staticData: [],
|
|
103673
103696
|
setting: !1,
|
|
103674
103697
|
tableSettingActive: !1,
|
|
@@ -103735,7 +103758,11 @@ const _sfc_main$o = {
|
|
|
103735
103758
|
default: null
|
|
103736
103759
|
}
|
|
103737
103760
|
},
|
|
103738
|
-
computed: {
|
|
103761
|
+
computed: {
|
|
103762
|
+
data() {
|
|
103763
|
+
return this.staticData;
|
|
103764
|
+
}
|
|
103765
|
+
},
|
|
103739
103766
|
watch: {
|
|
103740
103767
|
// value() {
|
|
103741
103768
|
// if (this.embedded) {
|
|
@@ -103768,11 +103795,11 @@ const _sfc_main$o = {
|
|
|
103768
103795
|
typeof o == "function" ? o() : this.error("Front_Msg_View_Code_Not_Exist|" + a);
|
|
103769
103796
|
return;
|
|
103770
103797
|
}
|
|
103771
|
-
if (this.tableView = s.dataView, this.tableView.columns = s.viewColumns,
|
|
103798
|
+
if (this.tableView = s.dataView, this.tableView.columns = s.viewColumns, Handsontable.validators.registerValidator("text-required", (l, c) => {
|
|
103772
103799
|
(l || "").trim() ? c(!0) : c(!1);
|
|
103773
103800
|
}), Handsontable.validators.registerValidator("numeric-required", (l, c) => {
|
|
103774
103801
|
l == null ? c(!1) : Handsontable.validators.NumericValidator(l, c);
|
|
103775
|
-
}),
|
|
103802
|
+
}), Handsontable.validators.registerValidator("date-required", (l, c) => {
|
|
103776
103803
|
(l || "").trim() ? Handsontable.validators.DateValidator.apply({ instance: this.$refs.table.hotInstance }, [l, c]) : c(!1);
|
|
103777
103804
|
}), Handsontable.validators.registerValidator("select-required", (l, c) => {
|
|
103778
103805
|
(l || "").trim() ? Handsontable.validators.AutocompleteValidator(l, c) : c(!1);
|
|
@@ -103863,7 +103890,7 @@ const _sfc_main$o = {
|
|
|
103863
103890
|
let d = c[0].start.row;
|
|
103864
103891
|
if (d > 0) {
|
|
103865
103892
|
let f = this.$refs.table.hotInstance.getSourceData(), p = f.splice(d, 1);
|
|
103866
|
-
f.splice(d - 1, 0, p[0]), this.$refs.table.hotInstance.
|
|
103893
|
+
f.splice(d - 1, 0, p[0]), this.$refs.table.hotInstance.updateData(f);
|
|
103867
103894
|
}
|
|
103868
103895
|
}
|
|
103869
103896
|
}, this.hotSetting.contextMenu.items.move_down = {
|
|
@@ -103872,33 +103899,28 @@ const _sfc_main$o = {
|
|
|
103872
103899
|
let d = c[0].start.row, f = this.$refs.table.hotInstance.getSourceData();
|
|
103873
103900
|
if (d < f.length - 1) {
|
|
103874
103901
|
let p = f.splice(d, 1);
|
|
103875
|
-
f.splice(d + 1, 0, p[0]), this.$refs.table.hotInstance.
|
|
103902
|
+
f.splice(d + 1, 0, p[0]), this.$refs.table.hotInstance.updateData(f);
|
|
103876
103903
|
}
|
|
103877
103904
|
}
|
|
103878
103905
|
}), this.tableView.removeEnable && (this.hotSetting.contextMenu.items.remove_row = {
|
|
103879
103906
|
name: "整行删除",
|
|
103880
103907
|
callback: (l, c, u) => {
|
|
103881
|
-
let d = [], f = [], p =
|
|
103882
|
-
for (const
|
|
103883
|
-
let
|
|
103884
|
-
d.push([
|
|
103885
|
-
for (let
|
|
103886
|
-
p.push(
|
|
103887
|
-
for (let S = y; S < _; S++)
|
|
103888
|
-
g[S].id && f.push(g[S].id);
|
|
103908
|
+
let d = [], f = [], p = this.$refs.table.hotInstance.getSourceData();
|
|
103909
|
+
for (const g of c) {
|
|
103910
|
+
let v = g.start.row, y = g.end.row;
|
|
103911
|
+
d.push([v, y - v + 1]);
|
|
103912
|
+
for (let _ = v; _ < y; _++)
|
|
103913
|
+
p[_].id && f.push(p[_].id);
|
|
103889
103914
|
}
|
|
103890
103915
|
this.confirm("确定要删除该行吗?", async () => {
|
|
103891
|
-
|
|
103892
|
-
this.$emit("on-remove", p, (y) => {
|
|
103893
|
-
v = y;
|
|
103894
|
-
}), v && this.$refs.table.hotInstance.alter("remove_row", d);
|
|
103916
|
+
this.$refs.table.hotInstance.alter("remove_row", d);
|
|
103895
103917
|
});
|
|
103896
103918
|
}
|
|
103897
103919
|
})), this.$refs.table.hotInstance.addHook("afterChange", (l) => {
|
|
103898
103920
|
l && l.forEach(([c, u, d, f]) => {
|
|
103899
|
-
!this.readonly && this.tableView.createEnable && c == this.
|
|
103921
|
+
!this.readonly && this.tableView.createEnable && c == this.staticData.length - 1 && (d ?? "") != (f ?? "") && this.staticData.push(this.getDefaultData());
|
|
103900
103922
|
let p = this.columns.find((g) => g.code == u);
|
|
103901
|
-
p.controlType != "DialogSelect" && this.onDataChange(this.
|
|
103923
|
+
p.controlType != "DialogSelect" && this.onDataChange(this.staticData[c], p), p.controlType == "Select" && (p.selectOptions.some((g) => g == f) || (this.staticData[c][p.code] = null)), this.calc(this.staticData[c]), this.$refs.table.hotInstance.updateData(this.staticData);
|
|
103902
103924
|
});
|
|
103903
103925
|
}), this.$refs.table.hotInstance.addHook("beforePaste", (l, c) => {
|
|
103904
103926
|
let u = this.columns.filter((d) => !!(d.parentCode || "").trim() || this.columns.filter((f) => f.parentCode == d.code).length == 0);
|
|
@@ -103921,16 +103943,24 @@ const _sfc_main$o = {
|
|
|
103921
103943
|
a && (this.staticData = this.copy(a), this.staticData.forEach((r) => {
|
|
103922
103944
|
for (let o in r)
|
|
103923
103945
|
r[o] != null && this.columns.some((s) => s.code === o && s.controlType === "Date") && (r[o] = format$6(new Date(r[o]), "yyyy-MM-dd"));
|
|
103924
|
-
})),
|
|
103925
|
-
for (let r = 0; r < this.
|
|
103926
|
-
this.calc(this.
|
|
103927
|
-
this.$refs.table.hotInstance.loadData(this.
|
|
103946
|
+
})), !this.readonly && a && this.tableView.createEnable && this.staticData.push(this.getDefaultData());
|
|
103947
|
+
for (let r = 0; r < this.staticData.length; r++)
|
|
103948
|
+
this.calc(this.staticData[r]);
|
|
103949
|
+
this.$refs.table.hotInstance.loadData(this.staticData), setTimeout(() => {
|
|
103928
103950
|
this.$refs.table.hotInstance.render();
|
|
103929
103951
|
}), this.$emit("on-load-data"), a && this.$emit("on-change", null, null, null);
|
|
103930
103952
|
}
|
|
103931
103953
|
},
|
|
103932
103954
|
/**
|
|
103933
|
-
*
|
|
103955
|
+
* 刷新
|
|
103956
|
+
*
|
|
103957
|
+
* @public
|
|
103958
|
+
*/
|
|
103959
|
+
refresh() {
|
|
103960
|
+
this.$refs.table.hotInstance.updateData(this.staticData);
|
|
103961
|
+
},
|
|
103962
|
+
/**
|
|
103963
|
+
* 验证
|
|
103934
103964
|
*
|
|
103935
103965
|
* @public
|
|
103936
103966
|
*/
|
|
@@ -103938,8 +103968,7 @@ const _sfc_main$o = {
|
|
|
103938
103968
|
let a = [];
|
|
103939
103969
|
for (let o = 0; o < this.staticData.length - 1; o++)
|
|
103940
103970
|
a.push(o);
|
|
103941
|
-
return
|
|
103942
|
-
console.log("valid", o);
|
|
103971
|
+
return this.$refs.table.hotInstance.validateRows(a, (o) => {
|
|
103943
103972
|
}) ? !0 : (this.error("Front_Msg_Form_Validate_Fail"), !1);
|
|
103944
103973
|
},
|
|
103945
103974
|
/**
|
|
@@ -103984,7 +104013,7 @@ const _sfc_main$o = {
|
|
|
103984
104013
|
},
|
|
103985
104014
|
// 行数据
|
|
103986
104015
|
rowData(a, r) {
|
|
103987
|
-
return this.
|
|
104016
|
+
return this.staticData[r];
|
|
103988
104017
|
},
|
|
103989
104018
|
// 获取多语言名称
|
|
103990
104019
|
getNameI18n(a) {
|
|
@@ -103999,7 +104028,7 @@ const _sfc_main$o = {
|
|
|
103999
104028
|
},
|
|
104000
104029
|
// 清空数据
|
|
104001
104030
|
clear() {
|
|
104002
|
-
this.staticData = []
|
|
104031
|
+
this.staticData = [];
|
|
104003
104032
|
},
|
|
104004
104033
|
// 弹出选择框选中
|
|
104005
104034
|
dialogCheck(a) {
|
|
@@ -104087,6 +104116,21 @@ var getColumns = (a, r, o) => {
|
|
|
104087
104116
|
const _sfc_main$n = {
|
|
104088
104117
|
mixins: [mixin$2, mixinPage],
|
|
104089
104118
|
components: { tableFilter, tableSetting, filterSetting },
|
|
104119
|
+
emits: [
|
|
104120
|
+
"after-init",
|
|
104121
|
+
"create",
|
|
104122
|
+
"edit",
|
|
104123
|
+
"on-blur",
|
|
104124
|
+
"on-cell-click",
|
|
104125
|
+
"on-change",
|
|
104126
|
+
"on-load-data",
|
|
104127
|
+
"on-ready",
|
|
104128
|
+
"on-remove",
|
|
104129
|
+
"on-row-click",
|
|
104130
|
+
"on-row-dblclick",
|
|
104131
|
+
"on-select-change",
|
|
104132
|
+
"show"
|
|
104133
|
+
],
|
|
104090
104134
|
data() {
|
|
104091
104135
|
return {
|
|
104092
104136
|
inited: !1,
|
|
@@ -106007,7 +106051,7 @@ function _sfc_render$n(a, r, o, s, l, c) {
|
|
|
106007
106051
|
], 2)
|
|
106008
106052
|
], 2);
|
|
106009
106053
|
}
|
|
106010
|
-
const viewTable = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["render", _sfc_render$n], ["__scopeId", "data-v-
|
|
106054
|
+
const viewTable = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["render", _sfc_render$n], ["__scopeId", "data-v-930f280f"]]), __vite_glob_1_33 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
106011
106055
|
__proto__: null,
|
|
106012
106056
|
default: viewTable
|
|
106013
106057
|
}, Symbol.toStringTag, { value: "Module" })), _sfc_main$m = {
|