将学生花名册导出excel
<p>[TOC]</p>
<h5>简要描述</h5>
<ul>
<li>学生花名册导出excel</li>
</ul>
<h5>请求URL</h5>
<ul>
<li><code>/admin/student/exportExcel</code></li>
</ul>
<h5>请求方式</h5>
<ul>
<li>POST </li>
</ul>
<h5>参数</h5>
<table>
<thead>
<tr>
<th style="text-align: left;">参数名</th>
<th style="text-align: left;">必选</th>
<th style="text-align: left;">类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">stuArr</td>
<td style="text-align: left;">是</td>
<td style="text-align: left;">arr</td>
<td>学生数组</td>
</tr>
</tbody>
</table>
<h5>参数示例</h5>
<pre><code> stuArr= [
{
&quot;sid&quot;:&quot;1238&quot;,
&quot;sname&quot;:&quot;张无忌&quot;,
&quot;sex&quot;:&quot;男&quot;,
&quot;tel&quot;:&quot;17828344556&quot;,
&quot;birthday&quot;:&quot;2002-12-3&quot;,
&quot;address&quot;:&quot;湖南省衡阳市&quot;,
&quot;className&quot;:&quot;软件本2002班&quot;,
&quot;gradeName&quot;:&quot;20级&quot;,
&quot;majorName&quot;:&quot;软件工程&quot;,
&quot;familyName&quot;:&quot;张三丰&quot;,
&quot;familyTel&quot;:&quot;18723781892&quot;,
},
{
&quot;sid&quot;:&quot;1238&quot;,
&quot;sname&quot;:&quot;张无忌&quot;,
&quot;sex&quot;:&quot;男&quot;,
&quot;tel&quot;:&quot;17828344556&quot;,
&quot;birthday&quot;:&quot;2002-12-3&quot;,
&quot;address&quot;:&quot;湖南省衡阳市&quot;,
&quot;className&quot;:&quot;软件本2002班&quot;,
&quot;gradeName&quot;:&quot;20级&quot;,
&quot;majorName&quot;:&quot;软件工程&quot;,
&quot;familyName&quot;:&quot;张三丰&quot;,
&quot;familyTel&quot;:&quot;18723781892&quot;,
},
{
&quot;sid&quot;:&quot;1238&quot;,
&quot;sname&quot;:&quot;张无忌&quot;,
&quot;sex&quot;:&quot;男&quot;,
&quot;tel&quot;:&quot;17828344556&quot;,
&quot;birthday&quot;:&quot;2002-12-3&quot;,
&quot;address&quot;:&quot;湖南省衡阳市&quot;,
&quot;className&quot;:&quot;软件本2002班&quot;,
&quot;gradeName&quot;:&quot;20级&quot;,
&quot;majorName&quot;:&quot;软件工程&quot;,
&quot;familyName&quot;:&quot;张三丰&quot;,
&quot;familyTel&quot;:&quot;18723781892&quot;,
},
{
&quot;sid&quot;:&quot;1238&quot;,
&quot;sname&quot;:&quot;张无忌&quot;,
&quot;sex&quot;:&quot;男&quot;,
&quot;tel&quot;:&quot;17828344556&quot;,
&quot;birthday&quot;:&quot;2002-12-3&quot;,
&quot;address&quot;:&quot;湖南省衡阳市&quot;,
&quot;className&quot;:&quot;软件本2002班&quot;,
&quot;gradeName&quot;:&quot;20级&quot;,
&quot;majorName&quot;:&quot;软件工程&quot;,
&quot;familyName&quot;:&quot;张三丰&quot;,
&quot;familyTel&quot;:&quot;18723781892&quot;,
},
]</code></pre>
<h5>返回示例</h5>
<pre><code> {
&quot;code&quot;: 200,
&quot;data&quot;: {
&quot;filePath&quot;:&quot;/excel/软件本2002班.xls&quot;,
},
&quot;message&quot;:&quot;成功&quot;
}</code></pre>
<h5>返回参数说明</h5>
<table>
<thead>
<tr>
<th style="text-align: left;">参数名</th>
<th style="text-align: left;">类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">code</td>
<td style="text-align: left;">int</td>
<td>状态码</td>
</tr>
<tr>
<td style="text-align: left;">data</td>
<td style="text-align: left;">json</td>
<td>返回的数据</td>
</tr>
<tr>
<td style="text-align: left;">message</td>
<td style="text-align: left;">string</td>
<td>提示信息</td>
</tr>
</tbody>
</table>
<h5>备注</h5>
<ul>
<li>
<p>前端传递一个学生数组,后端拿到进行处理</p>
</li>
<li>
<p>每一个属性名就是一个表头,要求为中文
例如: sid:身份证号码 sname:姓名 sex:性别 tel: 联系方式等等</p>
</li>
<li>学生数组中每一个对象就是一条记录
例如<br />
身份证号码 姓名 性别 生日 年级 专业 班级 联系电话 家庭住址 家长姓名 家长电话
43112321123 张三 男 2002-2-5 20级 软件工程 2002班 176712773 湖南省衡阳市 张三丰 18312318</li>
</ul>