diff --git a/public/assets/js/require-table.js b/public/assets/js/require-table.js index 3df6305f6713a8b06d8f52a7edf9758241185cfc..91b062a238a928ca57daeac6d38dd11913748e77 100755 --- a/public/assets/js/require-table.js +++ b/public/assets/js/require-table.js @@ -870,6 +870,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.keys(colorArr).map(function (e) { @@ -885,7 +894,7 @@ 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();