Merge remote-tracking branch 'remotes/origin/hechu1'

# Conflicts:
#	src/core/process/C_TeacherSearchStudent.java
#	web/jsFile/upload_action.js
hechu1
zhai_lw 6 years ago
commit 4e8235598f

@ -14,9 +14,16 @@ public class S_StudentUploadFinishedProduct extends HttpServlet {
static String fileType = "graduation_design_finished_product";
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
String id = "000";
//String id = request.getParameter("id");
System.out.println("id finished");
String fileURL = servlet.Utils.saveFile(request, fileType);
System.out.println("finished");
//String files = request.getParameter("file");
System.out.print("123");
System.out.print( request.getPart("file"));
System.out.print("123");
try {
String fileURL = servlet.Utils.saveFile(request, fileType);
}catch (Exception e)
{
System.out.print(e);
}
System.out.print("222");
}
}

@ -1,5 +1,8 @@
<%@ page import="java.util.List" %>
<%@ page import="java.util.ArrayList" %><%--
<%@ page import="java.util.ArrayList" %>
<%@ page import="core.user.User" %>
<%@ page import="core.process.Condition" %>
<%@ page import="core.process.Process" %><%--
Created by IntelliJ IDEA.
User: lenovo
Date: 2019/1/9
@ -28,13 +31,14 @@
<script type="text/javascript" src="../jsFile/sub-msg-input.js"></script>
</head>
<body>
<%String type="teacher";pageContext.setAttribute("userType",type);%>
<%List<String> list=new ArrayList<>();
list.add("001");
list.add("002");
<%
User user=(User)session.getAttribute("user");
String type=user.getType();
pageContext.setAttribute("userType",type);
Condition condition=user.getCondition();
//List<Process> pList=condition.getProcesses();
int length=0;
int index=0;
pageContext.setAttribute("list",list);
session.setAttribute("list",list);
%>
<div class="main">
<div class="top-bar">

@ -23,9 +23,11 @@
<span class="file-name" style="color: rgba(0,0,0,0.72)">
</span>
</div>
<div class="file-input-frame"><input class="true-select" type="file" accept="application/pdf" multiple="multiple">
<div class="file-input-frame">
<input class="true-select" id="select" type="file" accept="application/pdf" multiple="multiple">
<div class="upload-button select-file">选择文件</div>
<div class="upload-button upload-it">上传文件</div></div>
<div class="upload-button upload-it">上传文件</div>
</div>
</div>
</div>
</body>

@ -5,18 +5,19 @@ $(document).ready(function () {
})
function sendFile() {
var fileData =new FormData();
var Url4='testfrom.jsp';
var file=$('.true-select').files;
var Url4='student-upload-finished-product';
var file=$('#select')[0].files[0];
if($('.true-select').val()=='')
{
alert("请选择文件");
return;
}
alert(file);
fileData.append("file",file);
$.ajax({
type:"post",
url:Url4,
date:fileData,
data:fileData,
processData:false,
contentType:false,
success:function (data,status) {

Loading…
Cancel
Save