|
@@ -77,6 +77,12 @@
|
|
|
<input type="file" accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" id="studentfile" />
|
|
|
</div>
|
|
|
</li>
|
|
|
+ <li>
|
|
|
+ <input type="button" id="teacherAll" style="width: 100px;height: 30px" class="scbtn" value=" + 导入平台批改老师" />
|
|
|
+ <div style="display: none">
|
|
|
+ <input type="file" accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" id="teacherAllFile" />
|
|
|
+ </div>
|
|
|
+ </li>
|
|
|
|
|
|
|
|
|
<li>
|
|
@@ -98,13 +104,21 @@
|
|
|
<li>
|
|
|
<a th:href="@{/static/sys/excel/student_lib.xlsx?2}"><input type="button" style="background: #ccc no-repeat center;width: 100px;height: 30px" class="scbtn" value="学生模板" /></a>
|
|
|
</li>
|
|
|
+ <li>
|
|
|
+ <a th:href="@{/static/sys/excel/teacher_all.xlsx?3}"><input type="button" style="background: #ccc no-repeat center;width: 100px;height: 30px" class="scbtn" value="平台批改老师模板" /></a>
|
|
|
+ </li>
|
|
|
|
|
|
<!-- <li> -->
|
|
|
<!-- <input type="button" id="exbutton" style="width: 100px;height: 30px;background: #ccc no-repeat center;" class="scbtn" value="导出校区" /> -->
|
|
|
<!-- </li> -->
|
|
|
-
|
|
|
-
|
|
|
- <li style="line-height: 30px;">
|
|
|
+
|
|
|
+
|
|
|
+ <li style="line-height: 30px;">
|
|
|
+ <a style="font-size: 13px;text-decoration: underline;" th:href="@{/sys/imlibuser/correctTeacherList}" class="tablelink">平台批改老师(新)列表</a>
|
|
|
+ </li>
|
|
|
+
|
|
|
+
|
|
|
+ <li style="line-height: 30px;">
|
|
|
<a style="font-size: 13px;text-decoration: underline;" th:href="@{/sys/imlibuser/student/error/list}" class="tablelink">学生添加失败列表</a>
|
|
|
</li>
|
|
|
|
|
@@ -378,13 +392,22 @@ function copyContent(ElementObj){
|
|
|
$("#teacherimput").click(function (){
|
|
|
$("#teacherfile").click();
|
|
|
})
|
|
|
-
|
|
|
+
|
|
|
+ $("#teacherAll").click(function (){
|
|
|
+ $("#teacherAllFile").click();
|
|
|
+ })
|
|
|
var $teacherfile = $("#teacherfile");
|
|
|
$teacherfile.change(function () {
|
|
|
if($(this).val() != ""){
|
|
|
fileTeacherLoad(this);
|
|
|
}
|
|
|
})
|
|
|
+ var $teacherAllFile = $("#teacherAllFile");
|
|
|
+ $teacherAllFile.change(function () {
|
|
|
+ if($(this).val() != ""){
|
|
|
+ fileTeacherAllLoad(this);
|
|
|
+ }
|
|
|
+ })
|
|
|
|
|
|
|
|
|
$("#studentimput").click(function (){
|
|
@@ -501,6 +524,40 @@ function copyContent(ElementObj){
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
+
|
|
|
+ //+ 导入平台批改老师
|
|
|
+ function fileTeacherAllLoad(ele){
|
|
|
+ var formData = new FormData();
|
|
|
+ var name = $(ele).val();
|
|
|
+ var files = $(ele)[0].files[0];
|
|
|
+ formData.append("file", files);
|
|
|
+ formData.append("name", name);
|
|
|
+ $.ajax({
|
|
|
+ url: "[[${sysUrl}]]/sys/imlibuser/teacher/allImport",
|
|
|
+ type: 'POST',
|
|
|
+ data: formData,
|
|
|
+ processData: false,
|
|
|
+ contentType: false,
|
|
|
+ beforeSend: function () {
|
|
|
+ parent.layer.msg("数据正在导入中....",{icon:2});
|
|
|
+ },
|
|
|
+ success: function (responseStr) {
|
|
|
+ if(responseStr.meta.success){
|
|
|
+ parent.layer.msg("导入成功",{icon:1});
|
|
|
+ parent.location.reload();
|
|
|
+ parent.layer.close(parent.layer.getFrameIndex(window.name));
|
|
|
+ }else{
|
|
|
+ parent.layer.msg(responseStr.meta.message,{icon:11});
|
|
|
+ $("#teacherAllFile").val("");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ,
|
|
|
+ error : function (responseStr) {
|
|
|
+ parent.layer.msg("导入失败,请刷新后重试!",{icon:11});
|
|
|
+ $("#teacherAllFile").val("");
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|