有时候查询的没有数据也是会提示这个错误 对应js如下 var widgetNames = ['S_FGS', 'S_ZZ','S_XQFW','S_SFZT','S_TBZT','S_YSKSRQ','S_YSJSRQ','S_BDKSRQ','S_BDJSRQ','S_FWKSRQ','S_FWJSRQ','S_CJKSRQ','S_CJJSRQ']; //定义数组存放控件名称 function getWidgetValueByName(name) { var widget = _g().parameterEl.getWidgetByName(name); //根据控件名获取控件值 if (widget == undefined) return; var obj = {}; obj[name] = 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); |
最佳回答 |
||||
0
|
|