cloud-web-corejs 1.0.243 → 1.0.244
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/package.json
CHANGED
|
@@ -823,11 +823,7 @@ modules = {
|
|
|
823
823
|
} else if ("radio" === widgetType) {
|
|
824
824
|
return this.getOptionLabel(fieldWidget, value);
|
|
825
825
|
} else if ("status" === widgetType) {
|
|
826
|
-
|
|
827
|
-
let statusItem = statusParam.find(
|
|
828
|
-
(item) => item.value === value
|
|
829
|
-
);
|
|
830
|
-
return statusItem ? this.$t1(statusItem.label) : null;
|
|
826
|
+
return this.getStatusOptionLabel(fieldWidget, value);
|
|
831
827
|
} else if ("vabsearch" === widgetType) {
|
|
832
828
|
let result = null;
|
|
833
829
|
let currentData = obj.row;
|
|
@@ -945,6 +941,18 @@ modules = {
|
|
|
945
941
|
return resultList.join(",");
|
|
946
942
|
}
|
|
947
943
|
},
|
|
944
|
+
getStatusOptionLabel(fieldWidget, fieldModel) {
|
|
945
|
+
if (fieldModel === null || fieldModel === undefined) {
|
|
946
|
+
return null;
|
|
947
|
+
}
|
|
948
|
+
let statusParam = fieldWidget.options.statusParam || [];
|
|
949
|
+
let valueField = this.getOptionItemValueKey(fieldWidget);
|
|
950
|
+
let labelField = this.getOptionItemLabelKey(fieldWidget);
|
|
951
|
+
let statusItem = statusParam.find(
|
|
952
|
+
(item) => item[valueField] === fieldModel
|
|
953
|
+
);
|
|
954
|
+
return statusItem ? this.$t1(statusItem[labelField]) : null;
|
|
955
|
+
},
|
|
948
956
|
findInArray: function (e, t) {
|
|
949
957
|
if (!Array.isArray(e)) return -1;
|
|
950
958
|
var i = -1;
|