var url = 'report?reportlets=';//定义urlvar pars = '&format=excel&__filename__=人员流动情况月度趋势';//设置导出格式和导出文件名称var path = "${reportName}";//获取模板名称和路径//获取模板中参数值,以数组形式存储,每个参数值对应一个sheetvar json = ;for (var i = 0; i < TX.length; i++) {var sheet = {reportlet: path,TX: TX};json.push(sheet);}jsonStr = encodeURIComponent(JSON.stringify(json));//对url进行encodeURIComponent编码url += jsonStr;//给url添加模板参数url += pars;//给url添加导出参数alert(url);//打印urlwindow.open(url);