mooho-base-admin-plus 2.10.41 → 2.10.43
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
|
@@ -212,3 +212,5 @@ mooho-base-admin-plus@2.10.38 - 修复上一版本的bug
|
|
|
212
212
|
mooho-base-admin-plus@2.10.39 - 修复上一版本的bug
|
|
213
213
|
mooho-base-admin-plus@2.10.40 - 修复上一版本的bug
|
|
214
214
|
mooho-base-admin-plus@2.10.41 - 修复上一版本的bug
|
|
215
|
+
mooho-base-admin-plus@2.10.42 - Excel表格只读
|
|
216
|
+
mooho-base-admin-plus@2.10.43 - Excel表格增加excelTableTop插槽
|
|
@@ -42287,8 +42287,8 @@ function _sfc_render$p(a, r, o, s, l, c) {
|
|
|
42287
42287
|
"parent-data": l.data,
|
|
42288
42288
|
onOnChange: (de, we, he) => c.onDataChange(W, null, de, we, he)
|
|
42289
42289
|
}, {
|
|
42290
|
-
|
|
42291
|
-
renderSlot(a.$slots, "
|
|
42290
|
+
top: withCtx(() => [
|
|
42291
|
+
renderSlot(a.$slots, "excelTableTop", {
|
|
42292
42292
|
tableColumn: W,
|
|
42293
42293
|
tableCode: W.code
|
|
42294
42294
|
})
|
|
@@ -103186,6 +103186,7 @@ const _sfc_main$o = {
|
|
|
103186
103186
|
autoWrapCol: !0,
|
|
103187
103187
|
autoWrapRow: !0,
|
|
103188
103188
|
manualColumnResize: !0,
|
|
103189
|
+
readOnly: this.readonly,
|
|
103189
103190
|
// columnSummary: [
|
|
103190
103191
|
// {
|
|
103191
103192
|
// sourceColumn: 2,
|
|
@@ -103195,7 +103196,7 @@ const _sfc_main$o = {
|
|
|
103195
103196
|
// }
|
|
103196
103197
|
// ],
|
|
103197
103198
|
// minSpareRows: 1,
|
|
103198
|
-
contextMenu: { items: {} },
|
|
103199
|
+
contextMenu: this.readonly ? !1 : { items: {} },
|
|
103199
103200
|
licenseKey: "non-commercial-and-evaluation"
|
|
103200
103201
|
},
|
|
103201
103202
|
coords: {},
|
|
@@ -103309,63 +103310,62 @@ const _sfc_main$o = {
|
|
|
103309
103310
|
className: l.align ? "ht" + l.align : "htCenter",
|
|
103310
103311
|
controlType: l.controlType
|
|
103311
103312
|
};
|
|
103312
|
-
if (this.readonly)
|
|
103313
|
-
|
|
103314
|
-
|
|
103315
|
-
|
|
103316
|
-
|
|
103317
|
-
|
|
103318
|
-
|
|
103319
|
-
|
|
103320
|
-
|
|
103321
|
-
|
|
103322
|
-
|
|
103323
|
-
|
|
103324
|
-
|
|
103325
|
-
|
|
103326
|
-
|
|
103327
|
-
|
|
103328
|
-
|
|
103329
|
-
|
|
103330
|
-
|
|
103331
|
-
|
|
103332
|
-
|
|
103333
|
-
|
|
103334
|
-
|
|
103335
|
-
|
|
103336
|
-
|
|
103337
|
-
|
|
103338
|
-
|
|
103339
|
-
|
|
103340
|
-
}
|
|
103341
|
-
|
|
103342
|
-
|
|
103343
|
-
|
|
103344
|
-
|
|
103345
|
-
|
|
103346
|
-
|
|
103347
|
-
|
|
103348
|
-
|
|
103349
|
-
|
|
103350
|
-
|
|
103351
|
-
|
|
103352
|
-
|
|
103353
|
-
|
|
103354
|
-
|
|
103355
|
-
|
|
103356
|
-
|
|
103357
|
-
|
|
103358
|
-
|
|
103359
|
-
|
|
103360
|
-
|
|
103361
|
-
|
|
103362
|
-
|
|
103363
|
-
|
|
103364
|
-
|
|
103365
|
-
}
|
|
103366
|
-
|
|
103367
|
-
c.
|
|
103368
|
-
} else l.controlType === "Date" && (c.type = "date", c.dateFormat = "YYYY-MM-DD", c.correctFormat = !0);
|
|
103313
|
+
if (!this.readonly)
|
|
103314
|
+
if (l.controlType === "Label" || l.isReadonly == !0)
|
|
103315
|
+
c.readOnly = !0;
|
|
103316
|
+
else if (l.controlType === "NumberInput")
|
|
103317
|
+
c.type = "numeric", c.numericFormat = "0%";
|
|
103318
|
+
else if (l.controlType === "Check")
|
|
103319
|
+
c.type = "checkbox";
|
|
103320
|
+
else if (l.controlType === "Select") {
|
|
103321
|
+
c.editor = "select";
|
|
103322
|
+
let u = [];
|
|
103323
|
+
if (c.isStaticItem)
|
|
103324
|
+
(c.itemData || "").trim() && c.itemData.split(/[\n]/).forEach((d) => {
|
|
103325
|
+
if ((d || "").trim())
|
|
103326
|
+
if (d.split(":").length > 1) {
|
|
103327
|
+
let f = d.split(":")[0], p = d.split(":")[1];
|
|
103328
|
+
c.dataType == "Integer" || c.dataType == "BigInteger" ? u.push({
|
|
103329
|
+
id: parseInt(f),
|
|
103330
|
+
name: p
|
|
103331
|
+
}) : c.dataType == "Decimal" || c.dataType == "Float" || c.dataType == "Double" ? u.push({
|
|
103332
|
+
id: parseFloat(f),
|
|
103333
|
+
name: p
|
|
103334
|
+
}) : c.dataType == "Boolean" ? u.push({
|
|
103335
|
+
id: f.toUpperCase() == "TRUE",
|
|
103336
|
+
name: p
|
|
103337
|
+
}) : u.push({
|
|
103338
|
+
id: f,
|
|
103339
|
+
name: p
|
|
103340
|
+
});
|
|
103341
|
+
} else
|
|
103342
|
+
c.dataType == "Integer" || c.dataType == "BigInteger" ? u.push({
|
|
103343
|
+
id: parseInt(d),
|
|
103344
|
+
name: d
|
|
103345
|
+
}) : c.dataType == "Decimal" || c.dataType == "Float" || c.dataType == "Double" ? u.push({
|
|
103346
|
+
id: parseFloat(d),
|
|
103347
|
+
name: d
|
|
103348
|
+
}) : c.dataType == "Boolean" ? u.push({
|
|
103349
|
+
id: d.toUpperCase() == "TRUE",
|
|
103350
|
+
name: d
|
|
103351
|
+
}) : u.push({
|
|
103352
|
+
id: d,
|
|
103353
|
+
name: d
|
|
103354
|
+
});
|
|
103355
|
+
});
|
|
103356
|
+
else if (c.dataType.startsWith("Enum:"))
|
|
103357
|
+
u = this.getEnumList(c.dataType.split(":")[1]);
|
|
103358
|
+
else if ((c.source || "").trim()) {
|
|
103359
|
+
let d = this.getParam(null, c, this.parentData);
|
|
103360
|
+
this.disableLoader();
|
|
103361
|
+
let f;
|
|
103362
|
+
c.isSourceCustom ? f = await customModelApi.query(c.source, d) : f = await modelApi.query(c.source, d), this.enableLoader(), u = f.data.map((p) => ({
|
|
103363
|
+
id: (c.sourceDataCode || "").trim() ? this.parseData(p, c.sourceDataCode) : p.id,
|
|
103364
|
+
name: this.parseData(p, c.sourceDisplayCode)
|
|
103365
|
+
}));
|
|
103366
|
+
}
|
|
103367
|
+
c.selectOptions = u.map((d) => d.id);
|
|
103368
|
+
} else l.controlType === "Date" && (c.type = "date", c.dateFormat = "YYYY-MM-DD", c.correctFormat = !0);
|
|
103369
103369
|
return c;
|
|
103370
103370
|
})
|
|
103371
103371
|
), this.columns = this.columns.filter((l) => l.isFixed == !0).concat(
|
|
@@ -103379,7 +103379,7 @@ const _sfc_main$o = {
|
|
|
103379
103379
|
}));
|
|
103380
103380
|
this.hotSetting.nestedHeaders = [l, c];
|
|
103381
103381
|
}
|
|
103382
|
-
this.tableView.createEnable && (this.hotSetting.contextMenu.items.row_above = { name: "上方插入行" }, this.hotSetting.contextMenu.items.row_below = { name: "下方插入行" }, this.hotSetting.contextMenu.items.separator1 = ContextMenu.SEPARATOR), this.tableView.adjustEnable && (this.hotSetting.contextMenu.items.move_up = {
|
|
103382
|
+
this.readonly || (this.tableView.createEnable && (this.hotSetting.contextMenu.items.row_above = { name: "上方插入行" }, this.hotSetting.contextMenu.items.row_below = { name: "下方插入行" }, this.hotSetting.contextMenu.items.separator1 = ContextMenu.SEPARATOR), this.tableView.adjustEnable && (this.hotSetting.contextMenu.items.move_up = {
|
|
103383
103383
|
name: "整行上移",
|
|
103384
103384
|
callback: (l, c, u) => {
|
|
103385
103385
|
let d = c[0].start.row;
|
|
@@ -103416,7 +103416,7 @@ const _sfc_main$o = {
|
|
|
103416
103416
|
}), console.log(v), v && this.$refs.table.hotInstance.alter("remove_row", d);
|
|
103417
103417
|
});
|
|
103418
103418
|
}
|
|
103419
|
-
}), this.$refs.table.hotInstance.addHook("afterChange", (l) => {
|
|
103419
|
+
})), this.$refs.table.hotInstance.addHook("afterChange", (l) => {
|
|
103420
103420
|
l && (l.forEach(([c, u, d, f]) => {
|
|
103421
103421
|
this.tableView.createEnable && c == this.data.length - 1 && (d ?? "") != (f ?? "") && (this.data.push(this.getDefaultData()), this.$refs.table.hotInstance.loadData(this.data)), this.onDataChange(
|
|
103422
103422
|
this.data[c],
|
|
@@ -103457,7 +103457,7 @@ const _sfc_main$o = {
|
|
|
103457
103457
|
let r = this.staticData[a];
|
|
103458
103458
|
for (let o = 0; o < this.columns.length; o++) {
|
|
103459
103459
|
let s = this.columns[o], l = this.parseData(r, s.code);
|
|
103460
|
-
if (s.
|
|
103460
|
+
if (s.isShow != !1) {
|
|
103461
103461
|
if (s.isRequired && (l == null || !(String(l) || "").trim()))
|
|
103462
103462
|
return this.error("Front_Msg_Row_Column_Required|" + (a + 1) + "|" + name), !1;
|
|
103463
103463
|
if (s.maxValue != null && !isNaN(l) && l > s.maxValue)
|