有时候查询的没有数据也是会提示这个错误对应js如下var widgetNames = ; //定义数组存放控件名称function getWidgetValueByName(name) { var widget = _g().parameterEl.getWidgetByName(name); //根据控件名获取控件值 if (widget == undefined) return; var obj = {}; obj = widget.getValue(); return obj; //返回控件值组成的数组}var paramJson = widgetNames.map(getWidgetValueByName).reduce(function(a, b,c,d,e,f,g,h,i,j,k,l,m) { return Object.assign(a, b)});var colNames = encodeURIComponent() var paramJsonStr = JSON.stringify(paramJson); //将json数据转换为字符串// var colNames = encodeURIComponent(col)_g().directExportToExcel("F_事实表", "收展专员服务记录详细清单表", encodeURIComponent(paramJsonStr), colNames);