mooho-base-admin-plus 2.4.48 → 2.4.50
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 +102 -23
- package/package/mooho-base-admin-plus.min.js +5 -5
- package/package.json +1 -1
- package/src/components/upload/file-upload.vue +9 -5
- package/src/components/upload/upload-attachment.vue +8 -1
- package/src/components/view/table-filter.vue +14 -1
- package/src/components/view/view-form-draggable.vue +24 -9
- package/src/components/view/view-form.vue +13 -3
- package/src/components/view/view-table.vue +47 -9
- package/src/layouts/basic-layout/index.vue +0 -1
- package/src/store/modules/admin/modules/menu.js +0 -1
package/history.md
CHANGED
|
@@ -80,3 +80,5 @@ mooho-base-admin-plus@2.4.45 - 修复多选可筛选选择框无法删除的问
|
|
|
80
80
|
mooho-base-admin-plus@2.4.46 - 分页增加直接跳转
|
|
81
81
|
mooho-base-admin-plus@2.4.47 - 多选可筛选选择框清空内容不重新刷新
|
|
82
82
|
mooho-base-admin-plus@2.4.48 - 修复弹出选择框多加载一次的bug
|
|
83
|
+
mooho-base-admin-plus@2.4.49 - 筛选条件增加了日期范围控件支持
|
|
84
|
+
mooho-base-admin-plus@2.4.50 - 静态选项增加bool类型支持,优化表格中的静态选项支持
|
|
@@ -23967,7 +23967,11 @@ const _sfc_main$1k = {
|
|
|
23967
23967
|
},
|
|
23968
23968
|
importFileSuccess(res2) {
|
|
23969
23969
|
this.end();
|
|
23970
|
-
|
|
23970
|
+
if (res2.code == 0) {
|
|
23971
|
+
this.$emit("on-success", res2);
|
|
23972
|
+
} else {
|
|
23973
|
+
this.error(res2.message);
|
|
23974
|
+
}
|
|
23971
23975
|
},
|
|
23972
23976
|
importFileError(error2) {
|
|
23973
23977
|
this.end();
|
|
@@ -24056,7 +24060,13 @@ const _sfc_main$1j = {
|
|
|
24056
24060
|
this.fileList = list;
|
|
24057
24061
|
this.defaultList = list;
|
|
24058
24062
|
},
|
|
24059
|
-
beforeUpload() {
|
|
24063
|
+
beforeUpload(file) {
|
|
24064
|
+
if (this.maxSize != null) {
|
|
24065
|
+
if (file.size > this.maxSize * 1024 * 1024) {
|
|
24066
|
+
this.error("Front_Msg_Max_Quantity|" + this.maxSize);
|
|
24067
|
+
return false;
|
|
24068
|
+
}
|
|
24069
|
+
}
|
|
24060
24070
|
if (this.maxCount != null) {
|
|
24061
24071
|
let list = this.fileList;
|
|
24062
24072
|
if (list.length >= this.maxCount) {
|
|
@@ -34844,27 +34854,27 @@ const _sfc_main$1b = {
|
|
|
34844
34854
|
trigger: "blur,change"
|
|
34845
34855
|
});
|
|
34846
34856
|
}
|
|
34847
|
-
if (column.maxValue != null) {
|
|
34857
|
+
if (column.maxValue != null && (column.controlType == "NumberInput" || column.controlType == "Slider")) {
|
|
34848
34858
|
rules.push({
|
|
34849
34859
|
type: this.getDataType(column),
|
|
34850
34860
|
max: column.maxValue,
|
|
34851
|
-
message: this
|
|
34861
|
+
message: this.tParam("Front_Msg_Validation_Max_Value|" + column.maxValue),
|
|
34852
34862
|
trigger: "blur,change"
|
|
34853
34863
|
});
|
|
34854
34864
|
}
|
|
34855
|
-
if (column.minValue != null) {
|
|
34865
|
+
if (column.minValue != null && (column.controlType == "NumberInput" || column.controlType == "Slider")) {
|
|
34856
34866
|
rules.push({
|
|
34857
34867
|
type: this.getDataType(column),
|
|
34858
34868
|
min: column.minValue,
|
|
34859
|
-
message: this
|
|
34869
|
+
message: this.tParam("Front_Msg_Validation_Min_Value|" + column.minValue),
|
|
34860
34870
|
trigger: "blur,change"
|
|
34861
34871
|
});
|
|
34862
34872
|
}
|
|
34863
|
-
if (column.maxLength != null) {
|
|
34873
|
+
if (column.maxLength != null && (column.controlType == "TextInput" || column.controlType == "TextArea")) {
|
|
34864
34874
|
rules.push({
|
|
34865
34875
|
type: this.getDataType(column),
|
|
34866
34876
|
length: column.maxLength,
|
|
34867
|
-
message: this
|
|
34877
|
+
message: this.tParam("Front_Msg_Validation_Max_Length|" + column.maxLength),
|
|
34868
34878
|
trigger: "blur,change"
|
|
34869
34879
|
});
|
|
34870
34880
|
}
|
|
@@ -34939,6 +34949,11 @@ const _sfc_main$1b = {
|
|
|
34939
34949
|
id: parseFloat(key),
|
|
34940
34950
|
name: value
|
|
34941
34951
|
});
|
|
34952
|
+
} else if (column.dataType == "Boolean") {
|
|
34953
|
+
column.dataSource.push({
|
|
34954
|
+
id: key.toUpperCase() == "TRUE",
|
|
34955
|
+
name: value
|
|
34956
|
+
});
|
|
34942
34957
|
} else {
|
|
34943
34958
|
column.dataSource.push({
|
|
34944
34959
|
id: key,
|
|
@@ -34956,6 +34971,11 @@ const _sfc_main$1b = {
|
|
|
34956
34971
|
id: parseFloat(item),
|
|
34957
34972
|
name: item
|
|
34958
34973
|
});
|
|
34974
|
+
} else if (column.dataType == "Boolean") {
|
|
34975
|
+
column.dataSource.push({
|
|
34976
|
+
id: item.toUpperCase() == "TRUE",
|
|
34977
|
+
name: item
|
|
34978
|
+
});
|
|
34959
34979
|
} else {
|
|
34960
34980
|
column.dataSource.push({
|
|
34961
34981
|
id: item,
|
|
@@ -35066,17 +35086,17 @@ const _sfc_main$1b = {
|
|
|
35066
35086
|
return result2;
|
|
35067
35087
|
},
|
|
35068
35088
|
getDataSource(data2, column) {
|
|
35069
|
-
if (!column.isStaticItem && column.dataType
|
|
35089
|
+
if (!column.isStaticItem && column.dataType.startsWith("Enum:")) {
|
|
35070
35090
|
return this.getEnumList(column.dataType.split(":")[1]);
|
|
35071
35091
|
} else {
|
|
35072
35092
|
return column.dataSource == null ? [] : column.dataSource;
|
|
35073
35093
|
}
|
|
35074
35094
|
},
|
|
35075
35095
|
async onDataChange(sender) {
|
|
35076
|
-
if (sender == null || sender.triggers !== []) {
|
|
35096
|
+
if (sender == null || sender.triggers && sender.triggers !== []) {
|
|
35077
35097
|
this.columns.forEach(function(column) {
|
|
35078
|
-
if (!!(column.source || "").trim() && !(column.dataType && column.dataType.startsWith("Enum:")) && (sender == null || sender.triggers.some((item) => {
|
|
35079
|
-
return item.
|
|
35098
|
+
if (!column.isStaticItem && !!(column.source || "").trim() && !(column.dataType && column.dataType.startsWith("Enum:")) && (sender == null || sender.triggers.some((item) => {
|
|
35099
|
+
return item.code == column.code;
|
|
35080
35100
|
}))) {
|
|
35081
35101
|
column.needRefresh = true;
|
|
35082
35102
|
}
|
|
@@ -38711,6 +38731,11 @@ const _sfc_main$12 = {
|
|
|
38711
38731
|
id: parseFloat(key),
|
|
38712
38732
|
name: value
|
|
38713
38733
|
});
|
|
38734
|
+
} else if (column.dataType == "Boolean") {
|
|
38735
|
+
column.dataSource.push({
|
|
38736
|
+
id: key.toUpperCase() == "TRUE",
|
|
38737
|
+
name: value
|
|
38738
|
+
});
|
|
38714
38739
|
} else {
|
|
38715
38740
|
column.dataSource.push({
|
|
38716
38741
|
id: key,
|
|
@@ -38728,6 +38753,11 @@ const _sfc_main$12 = {
|
|
|
38728
38753
|
id: parseFloat(item),
|
|
38729
38754
|
name: item
|
|
38730
38755
|
});
|
|
38756
|
+
} else if (column.dataType == "Boolean") {
|
|
38757
|
+
column.dataSource.push({
|
|
38758
|
+
id: item.toUpperCase() == "TRUE",
|
|
38759
|
+
name: item
|
|
38760
|
+
});
|
|
38731
38761
|
} else {
|
|
38732
38762
|
column.dataSource.push({
|
|
38733
38763
|
id: item,
|
|
@@ -38981,6 +39011,9 @@ const _sfc_main$12 = {
|
|
|
38981
39011
|
case "Year":
|
|
38982
39012
|
key = "y_" + key;
|
|
38983
39013
|
break;
|
|
39014
|
+
case "DateRange":
|
|
39015
|
+
key = key + "_c";
|
|
39016
|
+
return key;
|
|
38984
39017
|
}
|
|
38985
39018
|
switch (column.operator) {
|
|
38986
39019
|
case "GreaterThan":
|
|
@@ -40806,7 +40839,7 @@ const _sfc_main$$ = {
|
|
|
40806
40839
|
rules.push({
|
|
40807
40840
|
type: this.getDataType(column),
|
|
40808
40841
|
max: column.maxValue,
|
|
40809
|
-
message: this
|
|
40842
|
+
message: this.tParam("Front_Msg_Validation_Max_Value|" + column.maxValue),
|
|
40810
40843
|
trigger: "blur,change"
|
|
40811
40844
|
});
|
|
40812
40845
|
}
|
|
@@ -40814,7 +40847,7 @@ const _sfc_main$$ = {
|
|
|
40814
40847
|
rules.push({
|
|
40815
40848
|
type: this.getDataType(column),
|
|
40816
40849
|
min: column.minValue,
|
|
40817
|
-
message: this
|
|
40850
|
+
message: this.tParam("Front_Msg_Validation_Min_Value|" + column.minValue),
|
|
40818
40851
|
trigger: "blur,change"
|
|
40819
40852
|
});
|
|
40820
40853
|
}
|
|
@@ -40822,7 +40855,7 @@ const _sfc_main$$ = {
|
|
|
40822
40855
|
rules.push({
|
|
40823
40856
|
type: this.getDataType(column),
|
|
40824
40857
|
length: column.maxLength,
|
|
40825
|
-
message: this
|
|
40858
|
+
message: this.tParam("Front_Msg_Validation_Max_Length|" + column.maxLength),
|
|
40826
40859
|
trigger: "blur,change"
|
|
40827
40860
|
});
|
|
40828
40861
|
}
|
|
@@ -40856,6 +40889,11 @@ const _sfc_main$$ = {
|
|
|
40856
40889
|
id: parseFloat(key),
|
|
40857
40890
|
name: value
|
|
40858
40891
|
});
|
|
40892
|
+
} else if (column.dataType == "Boolean") {
|
|
40893
|
+
column.dataSource.push({
|
|
40894
|
+
id: key.toUpperCase() == "TRUE",
|
|
40895
|
+
name: value
|
|
40896
|
+
});
|
|
40859
40897
|
} else {
|
|
40860
40898
|
column.dataSource.push({
|
|
40861
40899
|
id: key,
|
|
@@ -40873,6 +40911,11 @@ const _sfc_main$$ = {
|
|
|
40873
40911
|
id: parseFloat(item),
|
|
40874
40912
|
name: item
|
|
40875
40913
|
});
|
|
40914
|
+
} else if (column.dataType == "Boolean") {
|
|
40915
|
+
column.dataSource.push({
|
|
40916
|
+
id: item.toUpperCase() == "TRUE",
|
|
40917
|
+
name: item
|
|
40918
|
+
});
|
|
40876
40919
|
} else {
|
|
40877
40920
|
column.dataSource.push({
|
|
40878
40921
|
id: item,
|
|
@@ -42623,15 +42666,49 @@ const _sfc_main$_ = {
|
|
|
42623
42666
|
if (item.split(":").length > 1) {
|
|
42624
42667
|
let key = item.split(":")[0];
|
|
42625
42668
|
let value = item.split(":")[1];
|
|
42626
|
-
|
|
42627
|
-
|
|
42628
|
-
|
|
42629
|
-
|
|
42669
|
+
if (column.dataType == "Integer" || column.dataType == "BigInteger") {
|
|
42670
|
+
row._dataSource[column.code].push({
|
|
42671
|
+
id: parseInt(key),
|
|
42672
|
+
name: value
|
|
42673
|
+
});
|
|
42674
|
+
} else if (column.dataType == "Decimal" || column.dataType == "Float" || column.dataType == "Double") {
|
|
42675
|
+
row._dataSource[column.code].push({
|
|
42676
|
+
id: parseFloat(key),
|
|
42677
|
+
name: value
|
|
42678
|
+
});
|
|
42679
|
+
} else if (column.dataType == "Boolean") {
|
|
42680
|
+
row._dataSource[column.code].push({
|
|
42681
|
+
id: key.toUpperCase() == "TRUE",
|
|
42682
|
+
name: value
|
|
42683
|
+
});
|
|
42684
|
+
} else {
|
|
42685
|
+
row._dataSource[column.code].push({
|
|
42686
|
+
id: key,
|
|
42687
|
+
name: value
|
|
42688
|
+
});
|
|
42689
|
+
}
|
|
42630
42690
|
} else {
|
|
42631
|
-
|
|
42632
|
-
|
|
42633
|
-
|
|
42634
|
-
|
|
42691
|
+
if (column.dataType == "Integer" || column.dataType == "BigInteger") {
|
|
42692
|
+
row._dataSource[column.code].push({
|
|
42693
|
+
id: parseInt(item),
|
|
42694
|
+
name: item
|
|
42695
|
+
});
|
|
42696
|
+
} else if (column.dataType == "Decimal" || column.dataType == "Float" || column.dataType == "Double") {
|
|
42697
|
+
row._dataSource[column.code].push({
|
|
42698
|
+
id: parseFloat(item),
|
|
42699
|
+
name: item
|
|
42700
|
+
});
|
|
42701
|
+
} else if (column.dataType == "Boolean") {
|
|
42702
|
+
row._dataSource[column.code].push({
|
|
42703
|
+
id: item.toUpperCase() == "TRUE",
|
|
42704
|
+
name: item
|
|
42705
|
+
});
|
|
42706
|
+
} else {
|
|
42707
|
+
row._dataSource[column.code].push({
|
|
42708
|
+
id: item,
|
|
42709
|
+
name: item
|
|
42710
|
+
});
|
|
42711
|
+
}
|
|
42635
42712
|
}
|
|
42636
42713
|
}
|
|
42637
42714
|
});
|
|
@@ -42913,6 +42990,8 @@ const _sfc_main$_ = {
|
|
|
42913
42990
|
for (let key in filter2) {
|
|
42914
42991
|
if (this.isJSON(filter2[key])) {
|
|
42915
42992
|
filter2[key] = JSON.parse(filter2[key]).join(",");
|
|
42993
|
+
} else if (Object.prototype.toString.call(filter2[key]) === "[object Array]") {
|
|
42994
|
+
filter2[key] = filter2[key].join(",");
|
|
42916
42995
|
} else if (typeof filter2[key] == "object" && !(filter2[key] instanceof Date)) {
|
|
42917
42996
|
delete filter2[key];
|
|
42918
42997
|
}
|