diff --git a/GDMS.iml b/GDMS.iml index d8a6196..e49e437 100644 --- a/GDMS.iml +++ b/GDMS.iml @@ -28,6 +28,6 @@ - + \ No newline at end of file diff --git a/web/home/home.jsp b/web/home/home.jsp index c11db47..a11e5d3 100644 --- a/web/home/home.jsp +++ b/web/home/home.jsp @@ -36,7 +36,7 @@ String type=user.getType(); pageContext.setAttribute("userType",type); Condition condition=user.getCondition(); - List pList=condition.getProcesses(); + /*List pList=condition.getProcesses();*/ int length=0; int index=0; %> diff --git a/web/home/result_list.jsp b/web/home/result_list.jsp index f2f4e13..a680834 100644 --- a/web/home/result_list.jsp +++ b/web/home/result_list.jsp @@ -7,19 +7,17 @@ --%> <%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %> -<%String a=request.getParameter("id"); -String b[][]=new String[3][3]; -for(int i=0;i<3;i++) - for(int j=0;j<3;j++) - b[i][j]="hello"; +<% + String id=request.getParameter("id"); + String searchType=request.getParameter("searchType"); %> <%%>
-
<%=a%>
+
<%=searchType%>
<%for(int k=0;k<2;k++) for (int n=0;n<2;n++) - out.print("
电话号码:"+b[k][n]+"
"); + out.print("
电话号码:"+k+n+"
"); %>
电话号码:18711191679
diff --git a/web/home/select.jsp b/web/home/select.jsp index 042817e..1209b65 100644 --- a/web/home/select.jsp +++ b/web/home/select.jsp @@ -54,7 +54,7 @@
-
+
diff --git a/web/jsFile/search.js b/web/jsFile/search.js index b74575a..67502ca 100644 --- a/web/jsFile/search.js +++ b/web/jsFile/search.js @@ -1,10 +1,12 @@ $(document).ready(function () { - $(document).off('click',searchmsg).on('click','.search-button',searchmsg); - $(document).off('keydown',searchmsg).on('keydown','.search-input',KDsearchmsg); + $(document).off('click',searchStuMsg).on('click','.search-button.teacher',searchStuMsg); + $(document).off('click',searchTeaMsg).on('click','.search-button.student',searchTeaMsg); + $(document).off('keydown',KDsearchSmsg).on('keydown','.search-button.teacher',KDsearchSmsg); + $(document).off('keydown',KDsearchTmsg).on('keydown','.search-button.student',KDsearchTmsg); $(document).off('click',teacherSelect).on('click','.select-it.teacher',teacherSelect); $(document).off('click',studentSelect).on('click','.select-it.student',studentSelect); }) -function searchmsg(e) { +function searchStuMsg(e) { if($('.search-input').val()=='') { e.preventDefault(); @@ -12,15 +14,36 @@ function searchmsg(e) { } else { var id=$('.search-input').val(); - var rqDate={"id":id}; + var searchType='teacher'; + var rqDate={"id":id,"searchType":searchType}; var Url1='result_list.jsp'; $('.list-frame').load(Url1,rqDate); } } -function KDsearchmsg(e) { +function searchTeaMsg(e) { + if($('.search-input').val()=='') + { + e.preventDefault(); + alert('请输入学号'); + } + else { + var id=$('.search-input').val(); + var searchType='student'; + var rqDate={"id":id,"searchType":searchType}; + var Url1='result_list.jsp'; + $('.list-frame').load(Url1,rqDate); + } +} +function KDsearchSmsg(e) { + if(e.keyCode==13) + { + searchStuMsg(e); + } +} +function KDsearchTmsg(e) { if(e.keyCode==13) { - searchmsg(e); + searchTeaMsg(e); } } function select_one(Url2,button) {