ID:50826928
大小:53.00 KB
页数:9页
时间:2020-03-15
3、fine(function(require){var$=require('jquery');varcontextPath=$("#contextPath").val();require('dialog')($);require('uriTemplate')($);varIFA=require('util');require('dateTimePicker')($);require("../../../styles/cim/jquery-ui-1.8.14.custom.css");$("#importBtn").c
4、lick(function(){varurl=contextPath+'/question/import.do';$("#importForm").attr("action",url);$("#importForm").submit();});$("#downloadBtn").click(function(){url=contextPath+'/download/questionTemplate.xlsx';location.href=url;});});Java代码:/***导入试题**@authorEric*
5、*/@SuppressWarnings("unchecked")@RequestMapping(value="/question/import.json",method=RequestMethod.POST)publicStringcreate(finalExcelDTOexcelDTO,finalBindingResultresult,finalModelMapmodel,HttpServletRequestrequest){excelValidator.validate(excelDTO,result);//插
6、入数据的listList
7、olean)parse.get("dataTooManyErrorFlag");if(dataTooManyErrorFlag){model.put("importFileDataTooManyErroFlag1",true);}else{//格式正确的listimportQuestionList=(List
8、","true");returnview(model,"importQuestionView",TopMenu.EXAM,SideMenu.QUESTION_MANAGEMENT);}finalMap
此文档下载收益归作者所有