mooho-base-admin-plus 2.10.46 → 2.10.48
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
CHANGED
|
@@ -217,3 +217,5 @@ mooho-base-admin-plus@2.10.43 - 修复上一版本的bug
|
|
|
217
217
|
mooho-base-admin-plus@2.10.44 - 修复上一版本的bug
|
|
218
218
|
mooho-base-admin-plus@2.10.45 - 修复上一版本的bug
|
|
219
219
|
mooho-base-admin-plus@2.10.46 - 修复上一版本的bug
|
|
220
|
+
mooho-base-admin-plus@2.10.47 - Excel表格验证等
|
|
221
|
+
mooho-base-admin-plus@2.10.48 - int类型可以显示千分位
|
|
@@ -7590,7 +7590,9 @@ const showFormat = {}, mixinPage = {
|
|
|
7590
7590
|
}
|
|
7591
7591
|
if (s === "DateTime")
|
|
7592
7592
|
return (l || "").trim() ? format$6(new Date(d), l) : format$6(new Date(d), "yyyy-MM-dd");
|
|
7593
|
-
if (s === "Integer")
|
|
7593
|
+
if (s === "Integer") {
|
|
7594
|
+
if (l === "Thousand")
|
|
7595
|
+
return this.formatThousand(d);
|
|
7594
7596
|
if ((l || "").trim()) {
|
|
7595
7597
|
let f = null;
|
|
7596
7598
|
try {
|
|
@@ -7601,7 +7603,7 @@ const showFormat = {}, mixinPage = {
|
|
|
7601
7603
|
return f;
|
|
7602
7604
|
} else
|
|
7603
7605
|
return d;
|
|
7604
|
-
else {
|
|
7606
|
+
} else {
|
|
7605
7607
|
if (s === "Decimal" || s === "Float" || s === "Double")
|
|
7606
7608
|
return d = parseFloat(d), l === "Money" ? this.formatThousand(d.toFixed(2)) : l === "Thousand" ? this.formatThousand(this.keepDecimal(d, c, u)) : l === "Percent" ? this.keepDecimal(d, c, u) + "%" : this.keepDecimal(d, c, u);
|
|
7607
7609
|
if (s === "Boolean")
|
|
@@ -41886,7 +41888,6 @@ const tableSetting = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["render", _sfc_r
|
|
|
41886
41888
|
},
|
|
41887
41889
|
// 数据变化事件
|
|
41888
41890
|
async onDataChange(a, r, o, s, l) {
|
|
41889
|
-
console.log("onDataChange", a, r, o, s, l);
|
|
41890
41891
|
for (let c of this.columns) {
|
|
41891
41892
|
if ((c.showJson || "").trim()) {
|
|
41892
41893
|
let u = JSON.parse(c.showJson);
|
|
@@ -103210,7 +103211,7 @@ const _sfc_main$o = {
|
|
|
103210
103211
|
if (this.coords = r, a.detail === 2 && r.row >= 0 && !this.readonly) {
|
|
103211
103212
|
let o = this.hotSetting.columns[r.col], s = this.$refs.table.hotInstance.getSourceData();
|
|
103212
103213
|
o.controlType === "DialogSelect" && !o.readonly && this.$refs.dialogTable.init(o.source, () => {
|
|
103213
|
-
this.$refs.dialogTable.open(this.getParam(s[r.row], o));
|
|
103214
|
+
this.$refs.dialogTable.open(this.getParam(s[r.row], o, this.parentData));
|
|
103214
103215
|
});
|
|
103215
103216
|
}
|
|
103216
103217
|
});
|
|
@@ -103307,7 +103308,7 @@ const _sfc_main$o = {
|
|
|
103307
103308
|
if (l.controlType === "Label" || l.isReadonly == !0)
|
|
103308
103309
|
c.readOnly = !0;
|
|
103309
103310
|
else if (l.controlType === "NumberInput")
|
|
103310
|
-
c.type = "numeric"
|
|
103311
|
+
c.type = "numeric";
|
|
103311
103312
|
else if (l.controlType === "Check")
|
|
103312
103313
|
c.type = "checkbox";
|
|
103313
103314
|
else if (l.controlType === "Select") {
|
|
@@ -103406,16 +103407,20 @@ const _sfc_main$o = {
|
|
|
103406
103407
|
let v = !0;
|
|
103407
103408
|
this.$emit("on-remove", p, (y) => {
|
|
103408
103409
|
v = y;
|
|
103409
|
-
}),
|
|
103410
|
+
}), v && this.$refs.table.hotInstance.alter("remove_row", d);
|
|
103410
103411
|
});
|
|
103411
103412
|
}
|
|
103412
103413
|
})), this.$refs.table.hotInstance.addHook("afterChange", (l) => {
|
|
103413
|
-
l &&
|
|
103414
|
-
!this.readonly && this.tableView.createEnable && c == this.data.length - 1 && (d ?? "") != (f ?? "") &&
|
|
103415
|
-
|
|
103416
|
-
|
|
103417
|
-
|
|
103418
|
-
|
|
103414
|
+
l && l.forEach(([c, u, d, f]) => {
|
|
103415
|
+
!this.readonly && this.tableView.createEnable && c == this.data.length - 1 && (d ?? "") != (f ?? "") && this.data.push(this.getDefaultData());
|
|
103416
|
+
let p = this.columns.find((g) => g.code == u);
|
|
103417
|
+
p.controlType != "DialogSelect" && this.onDataChange(this.data[c], p), p.controlType == "Select" && (p.selectOptions.some((g) => g == f) || (this.data[c][p.code] = null)), this.calc(this.data[c]), this.$refs.table.hotInstance.updateData(this.data);
|
|
103418
|
+
});
|
|
103419
|
+
}), this.$refs.table.hotInstance.addHook("beforePaste", (l, c) => {
|
|
103420
|
+
let u = this.columns.filter((d) => !!(d.parentCode || "").trim() || this.columns.filter((f) => f.parentCode == d.code).length == 0);
|
|
103421
|
+
for (let d = c[0].startCol; d < c[0].startCol + l[0].length; d++)
|
|
103422
|
+
for (let f = c[0].startRow; f < c[0].startRow + l.length; f++)
|
|
103423
|
+
l[f - c[0].startRow][d - c[0].startCol] != null && (l[f - c[0].startRow][d - c[0].startCol] = l[f - c[0].startRow][d - c[0].startCol].trim(), u[d].controlType == "NumberInput" && (l[f - c[0].startRow][d - c[0].startCol] = l[f - c[0].startRow][d - c[0].startCol].replace(/,/g, "")));
|
|
103419
103424
|
}), this.loadData([]), this.inited = !0, setTimeout(() => {
|
|
103420
103425
|
typeof r == "function" && r();
|
|
103421
103426
|
});
|
|
@@ -103446,19 +103451,19 @@ const _sfc_main$o = {
|
|
|
103446
103451
|
* @public
|
|
103447
103452
|
*/
|
|
103448
103453
|
validate() {
|
|
103449
|
-
for (let a = 0; a < this.staticData.length; a++) {
|
|
103454
|
+
for (let a = 0; a < this.staticData.length - 1; a++) {
|
|
103450
103455
|
let r = this.staticData[a];
|
|
103451
103456
|
for (let o = 0; o < this.columns.length; o++) {
|
|
103452
103457
|
let s = this.columns[o], l = this.parseData(r, s.code);
|
|
103453
|
-
if (s.
|
|
103458
|
+
if (s.isShow != !1) {
|
|
103454
103459
|
if (s.isRequired && (l == null || !(String(l) || "").trim()))
|
|
103455
|
-
return this.error("Front_Msg_Row_Column_Required|" + (a + 1) + "|" + name), !1;
|
|
103460
|
+
return this.error("Front_Msg_Row_Column_Required|" + (a + 1) + "|" + s.name), !1;
|
|
103456
103461
|
if (s.maxValue != null && !isNaN(l) && l > s.maxValue)
|
|
103457
|
-
return this.error("Front_Msg_Row_Validation_Max_Value|" + (a + 1) + "|" + name + "|" + s.maxValue.toString()), !1;
|
|
103462
|
+
return this.error("Front_Msg_Row_Validation_Max_Value|" + (a + 1) + "|" + s.name + "|" + s.maxValue.toString()), !1;
|
|
103458
103463
|
if (s.minValue != null && !isNaN(l) && l < s.minValue)
|
|
103459
|
-
return this.error("Front_Msg_Row_Validation_Min_Value|" + (a + 1) + "|" + name + "|" + s.minValue.toString()), !1;
|
|
103464
|
+
return this.error("Front_Msg_Row_Validation_Min_Value|" + (a + 1) + "|" + s.name + "|" + s.minValue.toString()), !1;
|
|
103460
103465
|
if ((s.pattern || "").trim() && l != null && new RegExp(s.pattern).test(l) == !1)
|
|
103461
|
-
return this.error("Front_Msg_Row_Validation_Pattern|" + (a + 1) + "|" + name + "|" + s.pattern), !1;
|
|
103466
|
+
return this.error("Front_Msg_Row_Validation_Pattern|" + (a + 1) + "|" + s.name + "|" + s.pattern), !1;
|
|
103462
103467
|
}
|
|
103463
103468
|
}
|
|
103464
103469
|
}
|