框架升级及修复升级后的bug

This commit is contained in:
Dev
2026-10-16 18:13:09 +08:00
parent dafb0c96c0
commit 2d342bcbd7
537 changed files with 49836 additions and 40933 deletions
+18 -4
View File
@@ -131,7 +131,7 @@ define(['jquery', 'bootstrap', 'moment', 'moment/locale/zh-cn', 'bootstrap-table
return __('Common search');
},
formatCommonSubmitButton: function () {
return __('Submit');
return __('Search');
},
formatCommonResetButton: function () {
return __('Reset');
@@ -764,7 +764,7 @@ define(['jquery', 'bootstrap', 'moment', 'moment/locale/zh-cn', 'bootstrap-table
suffix = /[\.]?([a-zA-Z0-9]+)$/.exec(value);
suffix = suffix ? suffix[1] : 'file';
url = Fast.api.fixurl("ajax/icon?suffix=" + suffix);
html.push('<a href="' + value + '" target="_blank"><img src="' + url + '" class="' + classname + '"></a>');
html.push('<a href="' + value + '" target="_blank"><img src="' + url + '" class="' + classname + '" width="30" height="30"></a>');
});
return html.join(' ');
},
@@ -788,6 +788,7 @@ define(['jquery', 'bootstrap', 'moment', 'moment/locale/zh-cn', 'bootstrap-table
if (typeof this.custom !== 'undefined') {
custom = $.extend(custom, this.custom);
}
value = row[this.field] || value;
value = value == null || value.length === 0 ? '' : value.toString();
var keys = typeof this.searchList === 'object' ? Object.keys(this.searchList) : [];
var index = keys.indexOf(value);
@@ -800,6 +801,8 @@ define(['jquery', 'bootstrap', 'moment', 'moment/locale/zh-cn', 'bootstrap-table
if (!display) {
display = __(value.charAt(0).toUpperCase() + value.slice(1));
}
value = Fast.api.escape(value);
display = Fast.api.escape(display);
var html = '<span class="text-' + color + '">' + (icon ? '<i class="' + icon + '"></i> ' : '') + display + '</span>';
if (this.operate != false) {
html = '<a href="javascript:;" class="searchit" data-toggle="tooltip" title="' + __('Click to search %s', display) + '" data-field="' + this.field + '" data-value="' + value + '">' + html + '</a>';
@@ -866,6 +869,15 @@ define(['jquery', 'bootstrap', 'moment', 'moment/locale/zh-cn', 'bootstrap-table
value = Fast.api.escape(customValue);
field = this.customField;
}
if (typeof that.searchList === 'object' && typeof that.searchList.then === 'function') {
$.when(that.searchList).done(function (ret) {
if (ret.data && ret.data.searchlist && $.isArray(ret.data.searchlist)) {
that.searchList = ret.data.searchlist;
} else if (ret.constructor === Array || ret.constructor === Object) {
that.searchList = ret;
}
})
}
if (typeof that.searchList === 'object' && typeof that.custom === 'undefined') {
var i = 0;
var searchValues = Object.values(colorArr);
@@ -879,14 +891,16 @@ define(['jquery', 'bootstrap', 'moment', 'moment/locale/zh-cn', 'bootstrap-table
//渲染Flag
var html = [];
var arr = value != '' ? value.split(',') : [];
var arr = $.isArray(value) ? value : value != '' ? value.split(',') : [];
var color, display, label;
$.each(arr, function (i, value) {
value = value == null || value.length === 0 ? '' : value.toString();
if (value == '')
if (value === '')
return true;
color = value && typeof colorArr[value] !== 'undefined' ? colorArr[value] : 'primary';
display = typeof that.searchList !== 'undefined' && typeof that.searchList[value] !== 'undefined' ? that.searchList[value] : __(value.charAt(0).toUpperCase() + value.slice(1));
value = Fast.api.escape(value);
display = Fast.api.escape(display);
label = '<span class="label label-' + color + '">' + display + '</span>';
if (that.operate) {
html.push('<a href="javascript:;" class="searchit" data-toggle="tooltip" title="' + __('Click to search %s', display) + '" data-field="' + field + '" data-value="' + value + '">' + label + '</a>');