mooho-base-admin-plus 2.10.17 → 2.10.19
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 +39 -84
- package/package/mooho-base-admin-plus.min.js +14 -14
- package/package/style.css +1 -1
- package/package.json +1 -1
- package/src/components/input/dialog-select.vue +0 -2
- package/src/components/view/mixin.js +64 -2
- package/src/components/view/table-filter.vue +6 -34
- package/src/components/view/view-form-draggable.vue +0 -51
- package/src/components/view/view-form.vue +0 -53
- package/src/components/view/view-table.vue +0 -53
package/history.md
CHANGED
|
@@ -188,3 +188,5 @@ mooho-base-admin-plus@2.10.14 - 内嵌表格增加筛选栏按钮插槽
|
|
|
188
188
|
mooho-base-admin-plus@2.10.15 - 修复上一版本bug
|
|
189
189
|
mooho-base-admin-plus@2.10.16 - 修复上一版本bug
|
|
190
190
|
mooho-base-admin-plus@2.10.17 - 内嵌表格默认增加行数可配置
|
|
191
|
+
mooho-base-admin-plus@2.10.18 - 优化表格、表单、筛选项默认值
|
|
192
|
+
mooho-base-admin-plus@2.10.19 - 解决标签控件值为null报错的bug
|
|
@@ -30283,13 +30283,13 @@ const comboSelect = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["render", _sfc_re
|
|
|
30283
30283
|
a[this.sourceDataCode] = JSON.parse(this.modelValue).join(","), this.loadDataView(this.source).then(async (r) => {
|
|
30284
30284
|
if (r.dataView.isCustom) {
|
|
30285
30285
|
let o = await customModelApi.query(r.dataView.model, a, [this.sourceDataCode, this.sourceDisplayCode]);
|
|
30286
|
-
o.data.length > 0 && (this.selected = o.data.map((s) => this.parseData(s, this.sourceDisplayCode)).join(","),
|
|
30286
|
+
o.data.length > 0 && (this.selected = o.data.map((s) => this.parseData(s, this.sourceDisplayCode)).join(","), this.selectedData = o.data);
|
|
30287
30287
|
} else if (r.dataView.isDataSource) {
|
|
30288
30288
|
let o = await dataSourceApi.query(r.dataView.dataSource, a);
|
|
30289
30289
|
o.table.length > 0 && (this.selected = o.table.map((s) => this.parseData(s, this.sourceDisplayCode)).join(","), this.selectedData = o.table);
|
|
30290
30290
|
} else {
|
|
30291
30291
|
let o = await modelApi.query(r.dataView.model, a, [this.sourceDataCode, this.sourceDisplayCode]);
|
|
30292
|
-
o.data.length > 0 && (this.selected = o.data.map((s) => this.parseData(s, this.sourceDisplayCode)).join(","),
|
|
30292
|
+
o.data.length > 0 && (this.selected = o.data.map((s) => this.parseData(s, this.sourceDisplayCode)).join(","), this.selectedData = o.data);
|
|
30293
30293
|
}
|
|
30294
30294
|
});
|
|
30295
30295
|
} else {
|
|
@@ -33444,17 +33444,42 @@ const columnEdit = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["render", _sfc_ren
|
|
|
33444
33444
|
},
|
|
33445
33445
|
// 获取标签颜色
|
|
33446
33446
|
getTagColor(a, r) {
|
|
33447
|
-
let o =
|
|
33447
|
+
let o = "default";
|
|
33448
|
+
if (r == null)
|
|
33449
|
+
return o;
|
|
33450
|
+
let s = [];
|
|
33448
33451
|
if (a.param)
|
|
33449
33452
|
try {
|
|
33450
|
-
|
|
33453
|
+
s = JSON.parse(a.param);
|
|
33451
33454
|
} catch (l) {
|
|
33452
33455
|
console.log(l);
|
|
33453
33456
|
}
|
|
33454
|
-
|
|
33455
|
-
|
|
33456
|
-
|
|
33457
|
-
|
|
33457
|
+
return s.forEach((l) => {
|
|
33458
|
+
l.value.split(",").some((u) => u.trim() == r.trim()) && (o = l.color);
|
|
33459
|
+
}), o;
|
|
33460
|
+
},
|
|
33461
|
+
/**
|
|
33462
|
+
* 获取默认值
|
|
33463
|
+
*
|
|
33464
|
+
* @public
|
|
33465
|
+
*/
|
|
33466
|
+
getDefaultData(a = (o, s, l) => this.setData(o, s.code, l), r = (o, s, l) => this.setArrayData(o, s.code, l)) {
|
|
33467
|
+
let o = {};
|
|
33468
|
+
if (this.columns.forEach((s) => {
|
|
33469
|
+
if (s.defaultValue)
|
|
33470
|
+
if (s.defaultValue == "{today}") {
|
|
33471
|
+
let u = (/* @__PURE__ */ new Date()).toISOString().replace(/T.*/, "");
|
|
33472
|
+
a(o, s, new Date(u));
|
|
33473
|
+
} else if (s.defaultValue.startsWith("{today(") && s.defaultValue.endsWith(")}")) {
|
|
33474
|
+
let l = s.defaultValue.substr(7, s.defaultValue.length - 9);
|
|
33475
|
+
a(o, s, format$4(/* @__PURE__ */ new Date(), l));
|
|
33476
|
+
} else s.defaultValue == "{currentUserID}" ? a(o, s, this.info.id) : s.defaultValue == "{currentUser}" ? a(o, s, this.info.name) : s.controlType == "MultiSelect" || s.controlType == "MultiTreeSelect" || s.controlType == "MultiComboSelect" ? r(o, s, s.defaultValue.split(",")) : s.dataType === "Integer" ? a(o, s, parseInt(s.defaultValue)) : s.dataType === "Decimal" ? a(o, s, parseFloat(s.defaultValue)) : s.dataType === "Boolean" && s.defaultValue.toUpperCase == "TRUE" ? a(o, s, !0) : s.dataType === "Boolean" && s.defaultValue.toUpperCase == "FALSE" ? a(o, s, !1) : a(o, s, s.defaultValue);
|
|
33477
|
+
else
|
|
33478
|
+
(s.controlType == "Check" || s.controlType == "Switch") && s.dataType === "Boolean" ? a(o, s, !1) : a(o, s, null);
|
|
33479
|
+
}), this.defaultData)
|
|
33480
|
+
for (let s in this.defaultData)
|
|
33481
|
+
a(o, s, this.defaultData[s]);
|
|
33482
|
+
return o;
|
|
33458
33483
|
}
|
|
33459
33484
|
}
|
|
33460
33485
|
};
|
|
@@ -38086,25 +38111,6 @@ const draggable = /* @__PURE__ */ getDefaultExportFromCjs(vuedraggable_umdExport
|
|
|
38086
38111
|
r.needClear = !1, r.needRefresh = !1;
|
|
38087
38112
|
}
|
|
38088
38113
|
},
|
|
38089
|
-
// 获取默认值
|
|
38090
|
-
getDefaultData() {
|
|
38091
|
-
let a = {};
|
|
38092
|
-
this.columns.forEach((r) => {
|
|
38093
|
-
if (r.defaultValue)
|
|
38094
|
-
if (r.defaultValue == "{today}") {
|
|
38095
|
-
let s = (/* @__PURE__ */ new Date()).toISOString().replace(/T.*/, "");
|
|
38096
|
-
this.setData(a, r.code, new Date(s));
|
|
38097
|
-
} else if (r.defaultValue.startsWith("{today(") && r.defaultValue.endsWith(")}")) {
|
|
38098
|
-
let o = r.defaultValue.substr(7, r.defaultValue.length - 9);
|
|
38099
|
-
this.setData(a, r.code, format$4(/* @__PURE__ */ new Date(), o));
|
|
38100
|
-
} else r.defaultValue == "{currentUserID}" ? this.setData(a, r.code, this.info.id) : r.defaultValue == "{currentUser}" ? this.setData(a, r.code, this.info.name) : r.dataType === "Integer" ? this.setData(a, r.code, parseInt(r.defaultValue)) : r.dataType === "Decimal" ? this.setData(a, r.code, parseFloat(r.defaultValue)) : r.dataType === "Boolean" && r.defaultValue.toUpperCase == "TRUE" ? this.setData(a, r.code, !0) : r.dataType === "Boolean" && r.defaultValue.toUpperCase == "FALSE" ? this.setData(a, r.code, !1) : this.setData(a, r.code, r.defaultValue);
|
|
38101
|
-
else
|
|
38102
|
-
r.dataType === "Boolean" ? this.setData(a, r.code, !1) : this.setData(a, r.code, null);
|
|
38103
|
-
});
|
|
38104
|
-
for (let r in this.defaultData)
|
|
38105
|
-
this.setData(a, r, this.defaultData[r]);
|
|
38106
|
-
return a;
|
|
38107
|
-
},
|
|
38108
38114
|
// 编辑
|
|
38109
38115
|
edit(a, r) {
|
|
38110
38116
|
this.$emit("edit", { column: a, index: r });
|
|
@@ -40400,17 +40406,10 @@ const modalTable = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["render", _sfc_ren
|
|
|
40400
40406
|
computed: {},
|
|
40401
40407
|
methods: {
|
|
40402
40408
|
init() {
|
|
40403
|
-
let a = this.
|
|
40404
|
-
|
|
40405
|
-
|
|
40406
|
-
|
|
40407
|
-
let s = (/* @__PURE__ */ new Date()).toISOString().replace(/T.*/, "");
|
|
40408
|
-
this.setFilterData(a, r, new Date(s));
|
|
40409
|
-
} else if (r.defaultValue.startsWith("{today(") && r.defaultValue.endsWith(")}")) {
|
|
40410
|
-
let o = r.defaultValue.substr(7, r.defaultValue.length - 9);
|
|
40411
|
-
this.setFilterData(a, r, format$4(/* @__PURE__ */ new Date(), o));
|
|
40412
|
-
} else r.defaultValue == "{currentUserID}" ? this.setFilterData(a, r, this.info.id) : r.defaultValue == "{currentUser}" ? this.setFilterData(a, r, this.info.name) : r.dataType === "Integer" ? this.setFilterData(a, r, parseInt(r.defaultValue)) : r.dataType === "Decimal" ? this.setFilterData(a, r, parseFloat(r.defaultValue)) : r.dataType === "Boolean" && r.defaultValue.toUpperCase == "TRUE" ? this.setFilterData(a, r, !0) : r.dataType === "Boolean" && r.defaultValue.toUpperCase == "FALSE" ? this.setFilterData(a, r, !1) : this.setFilterData(a, r, r.defaultValue);
|
|
40413
|
-
}), setTimeout(() => {
|
|
40409
|
+
let a = this.getDefaultData(this.setFilterData, this.setArrayFilterData);
|
|
40410
|
+
for (let r in a)
|
|
40411
|
+
this.data[r] = a[r];
|
|
40412
|
+
setTimeout(() => {
|
|
40414
40413
|
this.initStaticItem(), this.initTrigger(), this.onDataChange();
|
|
40415
40414
|
});
|
|
40416
40415
|
},
|
|
@@ -41687,29 +41686,6 @@ const tableSetting = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["render", _sfc_r
|
|
|
41687
41686
|
this.initTab(), this.initStaticItem(), this.initTrigger(), this.onDataChange();
|
|
41688
41687
|
});
|
|
41689
41688
|
},
|
|
41690
|
-
/**
|
|
41691
|
-
* 获取默认值
|
|
41692
|
-
*
|
|
41693
|
-
* @public
|
|
41694
|
-
*/
|
|
41695
|
-
getDefaultData() {
|
|
41696
|
-
let a = {};
|
|
41697
|
-
this.columns.forEach((r) => {
|
|
41698
|
-
if (r.defaultValue)
|
|
41699
|
-
if (r.defaultValue == "{today}") {
|
|
41700
|
-
let s = (/* @__PURE__ */ new Date()).toISOString().replace(/T.*/, "");
|
|
41701
|
-
this.setData(a, r.code, new Date(s));
|
|
41702
|
-
} else if (r.defaultValue.startsWith("{today(") && r.defaultValue.endsWith(")}")) {
|
|
41703
|
-
let o = r.defaultValue.substr(7, r.defaultValue.length - 9);
|
|
41704
|
-
this.setData(a, r.code, format$4(/* @__PURE__ */ new Date(), o));
|
|
41705
|
-
} else r.defaultValue == "{currentUserID}" ? this.setData(a, r.code, this.info.id) : r.defaultValue == "{currentUser}" ? this.setData(a, r.code, this.info.name) : r.dataType === "Integer" ? this.setData(a, r.code, parseInt(r.defaultValue)) : r.dataType === "Decimal" ? this.setData(a, r.code, parseFloat(r.defaultValue)) : r.dataType === "Boolean" && r.defaultValue.toUpperCase == "TRUE" ? this.setData(a, r.code, !0) : r.dataType === "Boolean" && r.defaultValue.toUpperCase == "FALSE" ? this.setData(a, r.code, !1) : this.setData(a, r.code, r.defaultValue);
|
|
41706
|
-
else
|
|
41707
|
-
(r.controlType == "Check" || r.controlType == "Switch") && r.dataType === "Boolean" ? this.setData(a, r.code, !1) : this.setData(a, r.code, null);
|
|
41708
|
-
});
|
|
41709
|
-
for (let r in this.defaultData)
|
|
41710
|
-
this.setData(a, r, this.defaultData[r]);
|
|
41711
|
-
return a;
|
|
41712
|
-
},
|
|
41713
41689
|
/**
|
|
41714
41690
|
* 重置
|
|
41715
41691
|
*
|
|
@@ -43252,26 +43228,6 @@ const _sfc_main$n = {
|
|
|
43252
43228
|
}));
|
|
43253
43229
|
});
|
|
43254
43230
|
},
|
|
43255
|
-
/**
|
|
43256
|
-
* 获取默认值
|
|
43257
|
-
*
|
|
43258
|
-
* @public
|
|
43259
|
-
*/
|
|
43260
|
-
getDefaultData() {
|
|
43261
|
-
let a = {};
|
|
43262
|
-
return this.columns.forEach((r) => {
|
|
43263
|
-
if (r.defaultValue)
|
|
43264
|
-
if (r.defaultValue == "{today}") {
|
|
43265
|
-
let s = (/* @__PURE__ */ new Date()).toISOString().replace(/T.*/, "");
|
|
43266
|
-
this.setData(a, r.code, new Date(s));
|
|
43267
|
-
} else if (r.defaultValue.startsWith("{today(") && r.defaultValue.endsWith(")}")) {
|
|
43268
|
-
let o = r.defaultValue.substr(7, r.defaultValue.length - 9);
|
|
43269
|
-
this.setData(a, r.code, format$4(/* @__PURE__ */ new Date(), o));
|
|
43270
|
-
} else r.defaultValue == "{currentUserID}" ? this.setData(a, r.code, this.info.id) : r.defaultValue == "{currentUser}" ? this.setData(a, r.code, this.info.name) : r.dataType === "Integer" ? this.setData(a, r.code, parseInt(r.defaultValue)) : r.dataType === "Decimal" ? this.setData(a, r.code, parseFloat(r.defaultValue)) : r.dataType === "Boolean" && r.defaultValue.toUpperCase == "TRUE" ? this.setData(a, r.code, !0) : r.dataType === "Boolean" && r.defaultValue.toUpperCase == "FALSE" ? this.setData(a, r.code, !1) : this.setData(a, r.code, r.defaultValue);
|
|
43271
|
-
else
|
|
43272
|
-
r.dataType === "Boolean" ? this.setData(a, r.code, !1) : this.setData(a, r.code, null);
|
|
43273
|
-
}), a;
|
|
43274
|
-
},
|
|
43275
43231
|
/**
|
|
43276
43232
|
* 添加新行
|
|
43277
43233
|
*
|
|
@@ -43345,7 +43301,7 @@ const _sfc_main$n = {
|
|
|
43345
43301
|
if (this.static ? a = this.copy(this.staticData) : a = this.copy(this.data), a.forEach((r) => {
|
|
43346
43302
|
for (let o in r)
|
|
43347
43303
|
o.startsWith("_") && delete r[o];
|
|
43348
|
-
}),
|
|
43304
|
+
}), this.tableView.adjustEnable) {
|
|
43349
43305
|
let r = 0;
|
|
43350
43306
|
for (let o of a)
|
|
43351
43307
|
o.orderNo = r, r += 10;
|
|
@@ -43862,7 +43818,6 @@ const _sfc_main$n = {
|
|
|
43862
43818
|
},
|
|
43863
43819
|
// 打开弹出表单
|
|
43864
43820
|
async openModalForm(a, r) {
|
|
43865
|
-
console.log("control", a);
|
|
43866
43821
|
let o;
|
|
43867
43822
|
a.formView.isCustom ? o = await customModelApi.get(a.formView.model, r) : o = await modelApi.get(a.formView.model, r), a.open(o);
|
|
43868
43823
|
}
|
|
@@ -44684,7 +44639,7 @@ function _sfc_render$n(a, r, o, s, l, u) {
|
|
|
44684
44639
|
], 2)
|
|
44685
44640
|
], 2);
|
|
44686
44641
|
}
|
|
44687
|
-
const viewTable = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["render", _sfc_render$n], ["__scopeId", "data-v-
|
|
44642
|
+
const viewTable = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["render", _sfc_render$n], ["__scopeId", "data-v-4273ba1a"]]), __vite_glob_1_32 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
44688
44643
|
__proto__: null,
|
|
44689
44644
|
default: viewTable
|
|
44690
44645
|
}, Symbol.toStringTag, { value: "Module" })), _sfc_main$m = {
|