Browse Source

Merge branch 'stmms_ft_dev' of http://git.qmth.com.cn/luoshi/stmms-ft
into stmms_ft_dev

# Conflicts:
# stmms-biz/src/main/java/cn/com/qmth/stmms/biz/exam/model/MarkGroup.java
# stmms-web/src/main/java/cn/com/qmth/stmms/admin/exam/MarkGroupController.java
# stmms-web/src/main/java/cn/com/qmth/stmms/common/controller/LoginController.java
# stmms-web/src/main/webapp/WEB-INF/application.properties

luoshi 6 years ago
parent
commit
68f4ef8f78
39 changed files with 960 additions and 197 deletions
  1. 4 0
      stmms-biz/src/main/java/cn/com/qmth/stmms/biz/exam/dao/MarkGroupDao.java
  2. 46 1
      stmms-biz/src/main/java/cn/com/qmth/stmms/biz/exam/model/ExamStudent.java
  3. 16 1
      stmms-biz/src/main/java/cn/com/qmth/stmms/biz/exam/model/MarkGroup.java
  4. 2 0
      stmms-biz/src/main/java/cn/com/qmth/stmms/biz/exam/service/MarkGroupService.java
  5. 8 2
      stmms-biz/src/main/java/cn/com/qmth/stmms/biz/exam/service/impl/ExamStudentServiceImpl.java
  6. 6 0
      stmms-biz/src/main/java/cn/com/qmth/stmms/biz/exam/service/impl/MarkGroupServiceImpl.java
  7. 1 1
      stmms-web/src/main/java/cn/com/qmth/stmms/admin/dto/SubjectQuestionDTO.java
  8. 7 4
      stmms-web/src/main/java/cn/com/qmth/stmms/admin/exam/MarkGroupController.java
  9. 31 28
      stmms-web/src/main/java/cn/com/qmth/stmms/admin/exam/StudentController.java
  10. 1 1
      stmms-web/src/main/java/cn/com/qmth/stmms/api/controller/ExamStudentController.java
  11. 91 10
      stmms-web/src/main/java/cn/com/qmth/stmms/common/controller/LoginController.java
  12. 3 2
      stmms-web/src/main/java/cn/com/qmth/stmms/mark/MarkController.java
  13. 4 2
      stmms-web/src/main/webapp/WEB-INF/application.properties
  14. 6 0
      stmms-web/src/main/webapp/WEB-INF/views/modules/exam/groupAdd.jsp
  15. 6 0
      stmms-web/src/main/webapp/WEB-INF/views/modules/exam/groupEditFull.jsp
  16. 6 0
      stmms-web/src/main/webapp/WEB-INF/views/modules/exam/groupEditSimple.jsp
  17. 5 3
      stmms-web/src/main/webapp/WEB-INF/views/modules/mark/markNew.jsp
  18. 5 3
      stmms-web/src/main/webapp/WEB-INF/views/modules/mark/markTrack.jsp
  19. 67 0
      stmms-web/src/main/webapp/WEB-INF/views/modules/sys/login.jsp
  20. 99 0
      stmms-web/src/main/webapp/WEB-INF/views/modules/sys/markLogin-bak.jsp
  21. 32 69
      stmms-web/src/main/webapp/WEB-INF/views/modules/sys/markLogin.jsp
  22. 92 0
      stmms-web/src/main/webapp/WEB-INF/views/modules/sys/sysLogin-bak.jsp
  23. 30 60
      stmms-web/src/main/webapp/WEB-INF/views/modules/sys/sysLogin.jsp
  24. 224 0
      stmms-web/src/main/webapp/static/common/login.css
  25. BIN
      stmms-web/src/main/webapp/static/favicon.png
  26. BIN
      stmms-web/src/main/webapp/static/images/bg.jpg
  27. BIN
      stmms-web/src/main/webapp/static/images/error.png
  28. BIN
      stmms-web/src/main/webapp/static/images/loginbg.png
  29. BIN
      stmms-web/src/main/webapp/static/images/logo@2x.png
  30. BIN
      stmms-web/src/main/webapp/static/images/password-on.png
  31. BIN
      stmms-web/src/main/webapp/static/images/password.png
  32. BIN
      stmms-web/src/main/webapp/static/images/userid-on.png
  33. BIN
      stmms-web/src/main/webapp/static/images/userid.png
  34. BIN
      stmms-web/src/main/webapp/static/images/whdxlogo.png
  35. 17 1
      stmms-web/src/main/webapp/static/mark-new/css/style.css
  36. BIN
      stmms-web/src/main/webapp/static/mark-new/images/images-close-b.png
  37. 87 5
      stmms-web/src/main/webapp/static/mark-new/js/modules/sheet-view.js
  38. 39 0
      stmms-web/src/main/webapp/static/mark-new/sheet-popover.html
  39. 25 4
      stmms-web/src/main/webapp/static/mark-track/js/modules/sheet-view.js

+ 4 - 0
stmms-biz/src/main/java/cn/com/qmth/stmms/biz/exam/dao/MarkGroupDao.java

@@ -118,6 +118,10 @@ public interface MarkGroupDao
     @Query("update MarkGroup g set g.trialCount=?4 where g.pk.examId=?1 and g.pk.subjectCode=?2 and g.pk.number=?3")
     void updateTrialCount(Integer examId, String subjectCode, Integer number, Integer trialCount);
 
+    @Modifying(clearAutomatically = true)
+    @Query("update MarkGroup g set g.sheetView=?4 where g.pk.examId=?1 and g.pk.subjectCode=?2 and g.pk.number=?3")
+    void updateSheetView(Integer examId, String subjectCode, Integer number, boolean sheetView);
+
     @Modifying(clearAutomatically = true)
     @Query("update MarkGroup g set g.status=?4 where g.pk.examId=?1 and g.pk.subjectCode=?2 and g.pk.number=?3 "
             + "and g.status in (?5)")

+ 46 - 1
stmms-biz/src/main/java/cn/com/qmth/stmms/biz/exam/model/ExamStudent.java

@@ -223,11 +223,32 @@ public class ExamStudent implements Serializable {
     @ExcelField(title = "专业类型", align = 2, sort = 120)
     @Column(name = "subject_category")
     private String subjectCategory;
+    
+    /**
+     * 学院
+     */
+    @ExcelField(title = "学院", align = 2, sort = 130)
+    @Column(name = "college")
+    private String college;
+    
+    /**
+     * 班级
+     */
+    @ExcelField(title = "班级", align = 2, sort = 140)
+    @Column(name = "class_name")
+    private String className;
+    
+    /**
+     * 任课老师
+     */
+    @ExcelField(title = "任课老师", align = 2, sort = 150)
+    @Column(name = "teacher")
+    private String teacher;
 
     /**
      * 科目备注信息
      */
-    @ExcelField(title = "科目备注信息", align = 2, sort = 130)
+    @ExcelField(title = "科目备注信息", align = 2, sort = 160)
     @Transient
     private String subjectRemark;
 
@@ -685,4 +706,28 @@ public class ExamStudent implements Serializable {
         this.paperType = paperType;
     }
 
+	public String getCollege() {
+		return college;
+	}
+
+	public void setCollege(String college) {
+		this.college = college;
+	}
+
+	public String getClassName() {
+		return className;
+	}
+
+	public void setClassName(String className) {
+		this.className = className;
+	}
+
+	public String getTeacher() {
+		return teacher;
+	}
+
+	public void setTeacher(String teacher) {
+		this.teacher = teacher;
+	}
+
 }

+ 16 - 1
stmms-biz/src/main/java/cn/com/qmth/stmms/biz/exam/model/MarkGroup.java

@@ -93,6 +93,12 @@ public class MarkGroup implements Serializable {
     @Column(name = "left_count")
     private Integer leftCount;
 
+    /**
+     * 开启/关闭 原卷显示
+     */
+    @Column(name = "sheet_view", nullable = false)
+    private boolean sheetView;
+
     @Transient
     private int currentCount;
 
@@ -120,7 +126,7 @@ public class MarkGroup implements Serializable {
 
     public MarkGroup(Integer examId, String subjectCode, Integer number, String title,
             List<PictureConfigItem> configList, Double totalScore, Double doubleRate, Double arbitrateThreshold,
-            Integer scorePolicy, String markMode, Integer trialCount) {
+            Integer scorePolicy, String markMode, Integer trialCount, boolean sheetView) {
         this.pk = new MarkGroupPK();
         this.pk.setExamId(examId);
         this.pk.setNumber(number);
@@ -152,6 +158,7 @@ public class MarkGroup implements Serializable {
         } else {
             this.status = MarkStatus.FORMAL;
         }
+        this.sheetView = sheetView;
     }
 
     public Integer getExamId() {
@@ -360,4 +367,12 @@ public class MarkGroup implements Serializable {
         this.trialCount = trialCount;
     }
 
+    public boolean isSheetView() {
+        return sheetView;
+    }
+
+    public void setSheetView(boolean sheetView) {
+        this.sheetView = sheetView;
+    }
+
 }

+ 2 - 0
stmms-biz/src/main/java/cn/com/qmth/stmms/biz/exam/service/MarkGroupService.java

@@ -40,6 +40,8 @@ public interface MarkGroupService {
 
     void updateTrialCount(int examId, String subjectCode, Integer number, Integer trialCount);
 
+    void updateSheetView(int examId, String subjectCode, Integer number, boolean sheetView);
+
     long sumLibraryCount(Integer examId);
 
     long sumMarkedCount(Integer examId);

+ 8 - 2
stmms-biz/src/main/java/cn/com/qmth/stmms/biz/exam/service/impl/ExamStudentServiceImpl.java

@@ -115,15 +115,21 @@ public class ExamStudentServiceImpl extends BaseQueryService<ExamStudent> implem
         Set<String> packageSet = new HashSet<String>();
 
         for (ExamStudent student : list) {
+        	ExamSubject subject = null;
             if (!subjectMap.containsKey(student.getSubjectCode())) {
-                ExamSubject subject = new ExamSubject();
+                subject = new ExamSubject();
                 subject.setCode(student.getSubjectCode());
                 subject.setName(student.getSubjectName());
                 subject.setLevel(StringUtils.trimToNull(student.getSubjectLevel()));
                 subject.setCategory(StringUtils.trimToNull(student.getSubjectCategory()));
                 subject.setRemark(StringUtils.trimToNull(student.getSubjectRemark()));
-                subjectMap.put(subject.getCode(), subject);
+            }else{
+            	subject = subjectMap.get(student.getSubjectCode());
+            	subject.setLevel(StringUtils.trimToNull(student.getSubjectLevel()));
+                subject.setCategory(StringUtils.trimToNull(student.getSubjectCategory()));
+                subject.setRemark(StringUtils.trimToNull(student.getSubjectRemark()));
             }
+            subjectMap.put(subject.getCode(), subject);
             campusSet.add(student.getCampusName());
             if (StringUtils.isNotBlank(student.getPackageCode())) {
                 packageSet.add(student.getPackageCode());

+ 6 - 0
stmms-biz/src/main/java/cn/com/qmth/stmms/biz/exam/service/impl/MarkGroupServiceImpl.java

@@ -85,6 +85,12 @@ public class MarkGroupServiceImpl extends BaseQueryService<MarkGroup> implements
         groupDao.updateTrialCount(examId, subjectCode, number, trialCount);
     }
 
+    @Transactional
+    @Override
+    public void updateSheetView(int examId, String subjectCode, Integer number, boolean sheetView) {
+        groupDao.updateSheetView(examId, subjectCode, number, sheetView);
+    }
+
     @Transactional
     @Override
     public boolean updateStatus(int examId, String subjectCode, Integer number, MarkStatus newStatus,

+ 1 - 1
stmms-web/src/main/java/cn/com/qmth/stmms/admin/dto/SubjectQuestionDTO.java

@@ -65,7 +65,7 @@ public class SubjectQuestionDTO {
                     group = new MarkGroup(examId, subjectCode, question.getMainNumber(), question.getMainTitle(),
                             PictureConfigItem.parse(question.getPicList()), 0d, question.getDoubleRate(),
                             question.getArbitrateThreshold(), question.getScorePolicy(), question.getMarkMode(),
-                            question.getTrialCount());
+                            question.getTrialCount(), false);
                     group.setQuestionList(new LinkedList<ExamQuestion>());
                     groups.put(question.getMainNumber(), group);
                 }

+ 7 - 4
stmms-web/src/main/java/cn/com/qmth/stmms/admin/exam/MarkGroupController.java

@@ -204,7 +204,7 @@ public class MarkGroupController extends BaseExamController {
 
     @RequestMapping("/add")
     @RoleRequire(Role.SCHOOL_ADMIN)
-    public String editSimple(HttpServletRequest request, Model model, @RequestParam String subjectCode) {
+    public String add(HttpServletRequest request, Model model, @RequestParam String subjectCode) {
         int examId = getSessionExamId(request);
         ExamSubject subject = subjectService.find(examId, subjectCode);
         if (subject == null) {
@@ -287,7 +287,7 @@ public class MarkGroupController extends BaseExamController {
             @RequestParam(required = false) Double doubleRate,
             @RequestParam(required = false) Double arbitrateThreshold,
             @RequestParam(required = false) Integer scorePolicy, @RequestParam(required = false) MarkMode markMode,
-            @RequestParam(required = false) Integer trialCount) {
+            @RequestParam(required = false) Integer trialCount, @RequestParam(required = false) Boolean sheetView) {
         int examId = getSessionExamId(request);
         MarkGroup group = groupService.findOne(examId, subjectCode, number);
         List<ExamQuestion> questionList = questionService
@@ -325,6 +325,9 @@ public class MarkGroupController extends BaseExamController {
             if (trialCount != null && trialCount > 0 && group.getStatus() == MarkStatus.TRIAL) {
                 groupService.updateTrialCount(examId, subjectCode, number, trialCount);
             }
+            if (sheetView != null) {
+                groupService.updateSheetView(examId, subjectCode, number, sheetView);
+            }
             // advance update
             ScorePolicy policy = scorePolicy != null ? ScorePolicy.findByValue(scorePolicy) : null;
             List<Double> scores = buildDoubleList(scoreList);
@@ -352,7 +355,7 @@ public class MarkGroupController extends BaseExamController {
             @RequestParam(required = false) String scoreList, @RequestParam(required = false) Double doubleRate,
             @RequestParam(required = false) Double arbitrateThreshold,
             @RequestParam(required = false) Integer scorePolicy, @RequestParam(required = false) String markMode,
-            @RequestParam(required = false) Integer trialCount) {
+            @RequestParam(required = false) Integer trialCount, @RequestParam(required = false) boolean sheetView) {
         int examId = getSessionExamId(request);
         MarkGroup group = groupService.findOne(examId, subjectCode, number);
         if (group != null) {
@@ -369,7 +372,7 @@ public class MarkGroupController extends BaseExamController {
             JSONArray array = JSONArray.fromObject(picList);
             List<PictureConfigItem> list = JSONArray.toList(array, new PictureConfigItem(), new JsonConfig());
             group = new MarkGroup(examId, subjectCode, number, StringUtils.trimToNull(title), list, 0d, doubleRate,
-                    arbitrateThreshold, scorePolicy, markMode, trialCount);
+                    arbitrateThreshold, scorePolicy, markMode, trialCount, sheetView);
             List<Double> scores = buildDoubleList(scoreList);
             if (group.getTitle() != null && group.getPicList() != null && scores.size() > 0) {
                 // clear and replace exam_question

+ 31 - 28
stmms-web/src/main/java/cn/com/qmth/stmms/admin/exam/StudentController.java

@@ -140,8 +140,8 @@ public class StudentController extends BaseExamController {
                     previous.setStudentCode(student.getStudentCode());
                     previous.setName(student.getName());
                     previous.setPackageCode(student.getPackageCode());
-                    if (checkExamNumber(previous, new HashMap<String, ExamStudent>(),
-                            new HashMap<String, ExamStudent>())) {
+                    previous = checkExamNumber(previous, new HashMap<String, ExamStudent>(),
+                            new HashMap<String, ExamStudent>());
                         previous = studentService.save(previous);
                         // if
                         // (!previousSubjectCode.equals(previous.getSubjectCode()))
@@ -161,11 +161,6 @@ public class StudentController extends BaseExamController {
                         // previous.getSubjectCode());
                         // }
                         addMessage(redirectAttributes, "考生" + previous.getName() + "保存成功");
-                    } else {
-                        addMessage(redirectAttributes, "准考证号" + previous.getExamNumber() + "已存在");
-                        redirectAttributes.addAttribute("id", student.getId());
-                        return "redirect:/admin/exam/student/update";
-                    }
                 } else {
                     addMessage(redirectAttributes, "考生不存在");
                 }
@@ -180,13 +175,10 @@ public class StudentController extends BaseExamController {
                 student.setSheetCount(0);
                 student.setObjectiveScore(0d);
                 student.setSubjectiveScore(0d);
-                if (checkExamNumber(student, new HashMap<String, ExamStudent>(), new HashMap<String, ExamStudent>())) {
-                    studentService.save(student);
-                    addMessage(redirectAttributes, "考生" + student.getName() + "保存成功");
-                } else {
-                    addMessage(redirectAttributes, "准考证号" + student.getExamNumber() + "已存在");
-                    return "redirect:/admin/exam/student/add";
-                }
+                
+                student = checkExamNumber(student, new HashMap<String, ExamStudent>(), new HashMap<String, ExamStudent>());
+                studentService.save(student);
+                addMessage(redirectAttributes, "考生" + student.getName() + "保存成功");
             }
         }
         return "redirect:/admin/exam/student";
@@ -249,7 +241,10 @@ public class StudentController extends BaseExamController {
                 if (StringUtils.isBlank(student.getStudentCode()) || StringUtils.isBlank(student.getName())
                         || StringUtils.isBlank(student.getSubjectCode())
                         || StringUtils.isBlank(student.getSubjectName())
-                        || StringUtils.isBlank(student.getCampusName())) {
+                        || StringUtils.isBlank(student.getCampusName())
+                        || StringUtils.isBlank(student.getCollege())
+                        || StringUtils.isBlank(student.getClassName())
+                        || StringUtils.isBlank(student.getTeacher())) {
                     continue;
                 }
 
@@ -263,13 +258,9 @@ public class StudentController extends BaseExamController {
                 student.setObjectiveScore(0d);
                 student.setSubjectiveScore(0d);
 
-                if (checkExamNumber(student, current, saveMap)) {
-                    saveList.add(student);
-                    saveMap.put(student.getExamNumber(), student);
-                } else {
-                    failureMsg.append("<br/>准考证号 " + student.getExamNumber() + " 已存在; ");
-                    failureNum++;
-                }
+                student = checkExamNumber(student, current, saveMap);
+                saveList.add(student);
+                saveMap.put(student.getExamNumber(), student);
             }
 
             successNum = studentService.batchSave(saveList);
@@ -325,14 +316,13 @@ public class StudentController extends BaseExamController {
         }
     }
 
-    private boolean checkExamNumber(ExamStudent student, Map<String, ExamStudent> current,
+    private ExamStudent checkExamNumber(ExamStudent student, Map<String, ExamStudent> current,
             Map<String, ExamStudent> saveMap) {
         ExamStudent previous = saveMap.get(student.getExamNumber());
 
         if (previous != null) {
-            return false;
+        	return updatePrevious(student, previous);
         }
-
         if (current != null) {
             previous = current.get(student.getExamNumber());
         } else {
@@ -340,14 +330,27 @@ public class StudentController extends BaseExamController {
         }
 
         if (previous == null) {
-            return true;
+            return student;
         }
         if (student.getId() != null && student.getId().intValue() == previous.getId().intValue()) {
-            return true;
+            return updatePrevious(student, previous);
         }
-        return false;
+        return null;
     }
 
+	private ExamStudent updatePrevious(ExamStudent student, ExamStudent previous) {
+		previous.setCollege(student.getCollege());
+		previous.setClassName(student.getClassName());
+		previous.setTeacher(student.getTeacher());
+		previous.setExamRoom(student.getExamRoom());
+		previous.setExamSite(student.getExamSite());
+		previous.setRemark(student.getRemark());
+		previous.setSubjectLevel(student.getSubjectLevel());
+		previous.setSubjectCategory(student.getSubjectCategory());
+		previous.setSubjectRemark(student.getSubjectCategory());
+		return previous;
+	}
+
     private void buildSheetUrl(ExamStudent student) {
         Campus campus = campusService.findBySchoolAndName(student.getSchoolId(), student.getCampusName());
         student.setSheetUrls(PictureUrlBuilder.getSheetUrls(student.getExamId(), campus.getId(),

+ 1 - 1
stmms-web/src/main/java/cn/com/qmth/stmms/api/controller/ExamStudentController.java

@@ -304,7 +304,7 @@ public class ExamStudentController extends BaseApiController {
                             detail.accumulate("mainNumber", question.getMainNumber());
                             detail.accumulate("subNumber", question.getSubNumber());
                             detail.accumulate("score", item.getScore());
-                            detail.accumulate("marker", getMarkerNames(student, question.getMainNumber()));
+                            detail.accumulate("marker", StringUtils.join(getMarkerNames(student, question.getMainNumber()),","));
                             subjective.add(detail);
                         }
                         obj.accumulate("subjectiveScoreDetail", subjective);

+ 91 - 10
stmms-web/src/main/java/cn/com/qmth/stmms/common/controller/LoginController.java

@@ -7,16 +7,15 @@ import javax.servlet.http.HttpServletResponse;
 
 import org.apache.commons.lang.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.servlet.ModelAndView;
 
-import cn.com.qmth.stmms.biz.exam.model.ExamSubject;
 import cn.com.qmth.stmms.biz.exam.model.MarkGroup;
 import cn.com.qmth.stmms.biz.exam.model.Marker;
-import cn.com.qmth.stmms.biz.exam.service.ExamSubjectService;
 import cn.com.qmth.stmms.biz.exam.service.MarkGroupService;
 import cn.com.qmth.stmms.biz.exam.service.MarkerService;
 import cn.com.qmth.stmms.biz.user.model.User;
@@ -37,17 +36,104 @@ public class LoginController {
     @Autowired
     private MarkerService markerService;
 
-    @Autowired
-    private ExamSubjectService examSubjectService;
-
     @Autowired
     private MarkGroupService groupService;
 
+    @Value("${index.logo}")
+    private String indexLogo;
+
     @RequestMapping("/")
     public ModelAndView index(HttpServletRequest request) {
         return new ModelAndView("index");
     }
 
+    @RequestMapping(value = "/login", method = RequestMethod.GET)
+    public ModelAndView login(HttpServletRequest request) {
+        ModelAndView view = new ModelAndView("modules/sys/login");
+        view.addObject("indexLogo", indexLogo);
+        return view;
+    }
+
+    @RequestMapping(value = "/login", method = RequestMethod.POST)
+    public ModelAndView login(User user, String loginType, HttpServletRequest request, HttpServletResponse response) {
+        if (loginType.equals("admin-login")) {
+            User u = userService.findByLoginName(user.getLoginName());
+            if (u != null) {
+                if (u.getPassword().equals(Md5EncryptUtils.md5(user.getPassword()))) {
+                    u.setLastLoginTime(new Date());
+                    u.setLastLoginIp(request.getRemoteAddr());
+                    userService.save(u);
+
+                    StmmsSession session = RequestUtils.getSession(request);
+                    new WebUser(u.getId(), u.getRole()).writeToSession(session);
+
+                    if (u.getRole() == Role.SYS_ADMIN || u.getRole() == Role.SCHOOL_ADMIN
+                            || u.getRole() == Role.SUBJECT_HEADER || u.getRole() == Role.SCHOOL_VIEWER) {
+                        ModelAndView modelAndView = new ModelAndView("redirect:admin/home");
+                        return modelAndView;
+                    } else {
+                        ModelAndView view = new ModelAndView("modules/sys/login");
+                        view.addObject("message", "用户没有访问权限");
+                        view.addObject("loginType", loginType);
+                        view.addObject("indexLogo", indexLogo);
+                        return view;
+                    }
+                } else {
+                    ModelAndView modelAndView = new ModelAndView("modules/sys/login");
+                    modelAndView.addObject("message", "密码错误");
+                    modelAndView.addObject("loginType", loginType);
+                    modelAndView.addObject("indexLogo", indexLogo);
+                    return modelAndView;
+                }
+            } else {
+                ModelAndView modelAndView = new ModelAndView("modules/sys/login");
+                modelAndView.addObject("message", "无此用户");
+                modelAndView.addObject("loginType", loginType);
+                modelAndView.addObject("indexLogo", indexLogo);
+                return modelAndView;
+            }
+        } else if (loginType.equals("mark-login")) {
+            Marker marker = markerService.findByLoginName(user.getLoginName());
+            if (marker != null) {
+                ModelAndView modelAndView = new ModelAndView("modules/sys/login");
+                if (!marker.getPassword().equals(user.getPassword())) {
+                    modelAndView.addObject("message", "密码错误");
+                    modelAndView.addObject("loginType", loginType);
+                    modelAndView.addObject("indexLogo", indexLogo);
+                    return modelAndView;
+                }
+                if (marker.isEnable() == false) {
+                    modelAndView.addObject("message", "帐号已禁用");
+                    modelAndView.addObject("loginType", loginType);
+                    modelAndView.addObject("indexLogo", indexLogo);
+                    return modelAndView;
+                }
+
+                new WebUser(marker.getId(), Role.MARKER).writeToSession(RequestUtils.getSession(request));
+
+                if (marker.getLastLoginTime() == null) {
+                    return new ModelAndView("redirect:/mark/reset");
+                } else {
+                    marker.setLastLoginTime(new Date());
+                    marker.setLastLoginIp(request.getRemoteAddr());
+                    markerService.save(marker);
+                }
+                return new ModelAndView("redirect:/mark/index");
+            }
+
+            ModelAndView view = new ModelAndView("modules/sys/login");
+            view.addObject("message", "帐号不存在");
+            view.addObject("loginType", loginType);
+            view.addObject("indexLogo", indexLogo);
+            return view;
+        } else {
+            ModelAndView view = new ModelAndView("modules/sys/login");
+            view.addObject("loginType", loginType);
+            view.addObject("indexLogo", indexLogo);
+            return view;
+        }
+    }
+
     @RequestMapping(value = "/admin-login", method = RequestMethod.GET)
     public ModelAndView adminIndex(HttpServletRequest request) {
         // StmmsSession session = RequestUtils.getSession(request);
@@ -167,11 +253,6 @@ public class LoginController {
             modelAndView.addObject("message", "帐号已禁用");
             return modelAndView;
         }
-        ExamSubject subject = examSubjectService.find(marker.getExamId(), marker.getSubjectCode());
-        if (subject == null) {
-            modelAndView.addObject("message", "科目不存在");
-            return modelAndView;
-        }
         MarkGroup group = groupService.findOne(marker.getExamId(), marker.getSubjectCode(), marker.getGroupNumber());
         if (group == null) {
             modelAndView.addObject("message", "大题不存在");

+ 3 - 2
stmms-web/src/main/java/cn/com/qmth/stmms/mark/MarkController.java

@@ -126,14 +126,14 @@ public class MarkController extends BaseController {
     private ModelAndView getMarkModeView(Marker marker, MarkMode mode) {
         boolean forceMode = false;
         MarkMode sysMode = MarkMode.findByName(forceMarkMode);
+        MarkGroup group = groupService.findOne(marker.getExamId(), marker.getSubjectCode(),
+                marker.getGroupNumber());
         if (sysMode != null) {
             // 全局配置的强制评卷模式
             mode = sysMode;
             forceMode = true;
         } else {
             // 没有全局配置,优先从大题配置取强制评卷模式
-            MarkGroup group = groupService.findOne(marker.getExamId(), marker.getSubjectCode(),
-                    marker.getGroupNumber());
             if (group != null && group.getMarkMode() != null) {
                 mode = group.getMarkMode();
                 forceMode = true;
@@ -153,6 +153,7 @@ public class MarkController extends BaseController {
         ModelAndView view = new ModelAndView(
                 mode == MarkMode.TRACK ? "modules/mark/markTrack" : "modules/mark/markNew");
         view.addObject("forceMode", forceMode);
+        view.addObject("sheetView", group.isSheetView());
         return view;
     }
 

+ 4 - 2
stmms-web/src/main/webapp/WEB-INF/application.properties

@@ -13,8 +13,8 @@ cookie.path=/
 #server config
 slice.image.server=https://ft-slice.markingcloud.com
 sheet.image.server=https://ft-sheet.markingcloud.com
-package.image.server=http://ft-package.markingcloud.com
-card.server=http://ft-card.markingcloud.com
+package.image.server=https://ft-package.markingcloud.com
+card.server=https://ft-card.markingcloud.com
 ##slice.image.server=http://${local.ip}:9000/gx-slice
 ##sheet.image.server=http://${local.ip}:9000/gx-sheet
 ##package.image.server=http://${local.ip}:9000/gx-package
@@ -43,3 +43,5 @@ mark.cleanLockSchedule=0 0 3 * * ?
 
 marker.showBtnImportAndBtnUpdateImport=false
 marker.forceMode=
+##\u9996\u9875\u53ef\u9009\u7684logo\u6587\u4ef6
+index.logo=

+ 6 - 0
stmms-web/src/main/webapp/WEB-INF/views/modules/exam/groupAdd.jsp

@@ -116,6 +116,12 @@
             </div>
         </div>
         </div>
+		<div class="control-group">
+			<label class="control-label">原卷显示</label>
+			<div class="controls">
+				<input name="sheetView" type="checkbox" <c:if test="${group.sheetView}">checked</c:if>/>
+			</div>
+		</div>
         <div class="form-actions">
             <input id="btnSubmit" class="btn btn-primary" type="submit" value="保 存"/>&nbsp;
             <input id="btnCancel" class="btn" type="button" value="返 回" onclick="history.go(-1)"/>

+ 6 - 0
stmms-web/src/main/webapp/WEB-INF/views/modules/exam/groupEditFull.jsp

@@ -132,6 +132,12 @@
             </div>
         </div>
         </div>
+ 		<div class="control-group">
+			<label class="control-label">原卷显示</label>
+			<div class="controls">
+				<input name="sheetView" type="checkbox" <c:if test="${group.sheetView}">checked</c:if>/>
+			</div>
+		</div>
         <div class="control-group">
             <label class="control-label">重要提示</label>
             <div class="controls">

+ 6 - 0
stmms-web/src/main/webapp/WEB-INF/views/modules/exam/groupEditSimple.jsp

@@ -120,6 +120,12 @@
             </div>
         </div>
         </div>
+		<div class="control-group">
+			<label class="control-label">原卷显示</label>
+			<div class="controls">
+				<input name="sheetView" type="checkbox" <c:if test="${group.sheetView}">checked</c:if>/>
+			</div>
+		</div>
         <div class="form-actions">
             <a id="btnSubmit" href="##" class="btn btn-primary">保 存</a>&nbsp;
             <a id="btnCancel" href="##" class="btn" onclick="history.go(-1)">返 回</a>

+ 5 - 3
stmms-web/src/main/webapp/WEB-INF/views/modules/mark/markNew.jsp

@@ -70,9 +70,11 @@
 						needConfirm : false,
 						//showTotalScore:true
 					},
-					//'sheet-view' : {
-					//	server : '${sheetServer}'
-					//},
+					<c:if test="${sheetView==true}">
+					'sheet-view' : {
+						server : '${sheetServer}'
+					},
+					</c:if>
 					'warning-info': {
 					},
 					'thumbnail':{

+ 5 - 3
stmms-web/src/main/webapp/WEB-INF/views/modules/mark/markTrack.jsp

@@ -70,9 +70,11 @@
 					},
                     'specialTag':{
                     },
-					//'sheet-view':{
-                    //    server : '${sheetServer}'
-                    //},
+                    <c:if test="${sheetView==true}">
+					'sheet-view':{
+                        server : '${sheetServer}'
+                    },
+                    </c:if>
 					'object-view':{
 					    list: [
 					           {title:'试卷',  url:'<c:if test="${subject.hasPaper==true}">${cardServer}${subject.paperUrl}</c:if>'},

+ 67 - 0
stmms-web/src/main/webapp/WEB-INF/views/modules/sys/login.jsp

@@ -0,0 +1,67 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
+<html>
+<head>
+	<title>登录</title>
+	<meta name="decorator" content="default"/>
+	<%@include file="/WEB-INF/views/include/head.jsp" %>
+    <link rel="stylesheet" href="${ctxStatic}/common/login.css">
+    <link rel="icon" href="${ctxStatic}/favicon.png" type="image/x-icon">
+	<script type="text/javascript">
+		$(document).ready(function() {
+			$("#loginType").hide();
+			$("#adminLogin").click(function() {
+				$("#adminLogin").addClass("on");
+				$("#markLogin").removeClass("on");
+				$("#loginType").attr("value","admin-login");
+			});
+			$("#markLogin").click(function() {
+				$("#markLogin").addClass("on");
+				$("#adminLogin").removeClass("on");
+				$("#loginType").attr("value","mark-login");
+			});
+			$("#loginForm").validate({
+				messages: {
+					username: {required: "请填写用户名."},password: {required: "请填写密码."},
+				}
+			});
+		});
+		// 如果在框架中,则跳转刷新上级页面
+		if(self.frameElement && self.frameElement.tagName=="IFRAME"){
+			parent.location.reload();
+		}
+	</script>
+</head>
+<body>
+<div class="container">
+  <div class="middle cl">
+   <div class="left">
+    <div class="logo"><img src="${ctxStatic}/images/<c:if test="${indexLogo ==null||indexLogo =='' }">logo@2x.png</c:if><c:if test="${indexLogo !=null }">${indexLogo }</c:if>"/></div>
+    <p>Copyright &#169武汉启明软件 2012-2014</p>
+   </div>
+   <div class="right">
+     <div class="title">
+       <h1>高校考试管理平台</h1>
+       <p><span><a href="#" class="<c:if test="${loginType == 'admin-login' ||loginType==null}">on</c:if>" id="adminLogin">管理员登录</a></span>
+       	<span><a href="#" class="<c:if test="${loginType == 'mark-login' }">on</c:if>" id="markLogin">评卷员登录</a></span></p>
+     </div>
+     <div class="loginbox">
+      <form action="${ctx}/login" method="post" role="form" id="loginForm">
+      	<input id ="loginType" name ="loginType" value="${loginType }" />
+        <div class="input-group">
+        	<input type="text" class="form-control required" id="loginName" name="loginName" placeholder="请输入用户名" autocomplete="off" value="${loginName }"/>
+        </div>
+        <div class="input-group">
+        	<input type="password" class="form-control required" id="password" name="password" placeholder="请输入密码" autocomplete="off"/>
+        </div>
+        <div class="point <c:if test="${message != null }"></c:if><c:if test="${message == null }">hide</c:if>">
+        <em class="error">${message }</em>
+        </div>
+        <div class="login-btn"><input class="opacity" type="submit" value="登 录"/></div>
+      </form>
+     </div>
+   </div>
+  </div>
+</div>
+</body>
+</html>

+ 99 - 0
stmms-web/src/main/webapp/WEB-INF/views/modules/sys/markLogin-bak.jsp

@@ -0,0 +1,99 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
+<html>
+<head>
+	<title>评卷员登录</title>
+	<meta name="decorator" content="default"/>
+	<%@include file="/WEB-INF/views/include/head.jsp" %>
+    <link rel="stylesheet" href="${ctxStatic}/common/typica-login.css">
+	<style type="text/css">
+		.control-group{border-bottom:0px;}
+	</style>
+    <script src="${ctxStatic}/common/backstretch.min.js"></script>
+	<script type="text/javascript">
+		$(document).ready(function() {
+			<!--针对nw.js评卷客户端,自动窗口最大化-->
+			try{
+				require('nw.gui').Window.get().maximize();
+			}catch(e){
+			}
+
+			$.backstretch([
+ 		      "${ctxStatic}/images/bg1.jpg", 
+ 		      "${ctxStatic}/images/bg2.jpg",
+ 		      "${ctxStatic}/images/bg3.jpg"
+ 		  	], {duration: 10000, fade: 2000});
+			$("#loginForm").validate({
+				rules: {
+					validateCode: {remote: "${pageContext.request.contextPath}/servlet/validateCodeServlet"}
+				},
+				messages: {
+					loginName: {required: "请填写用户名."},
+					password: {required: "请填写密码."}
+					//validateCode: {remote: "验证码不正确.", required: "请填写验证码."}
+				},
+				errorLabelContainer: "#messageBox",
+				errorPlacement: function(error, element) {
+					error.appendTo($("#loginError").parent());
+				} 
+			});
+		});
+		// 如果在框架中,则跳转刷新上级页面
+		if(self.frameElement && self.frameElement.tagName=="IFRAME"){
+			parent.location.reload();
+		}
+	</script>
+</head>
+<body>
+    <div class="navbar navbar-fixed-top">
+      <div class="navbar-inner">
+        <div class="container">
+          <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
+            <span class="icon-bar"></span>
+            <span class="icon-bar"></span>
+            <span class="icon-bar"></span>
+          </a>
+          <a class="brand" href="${ctx}"><img src="${ctxStatic}/images/logo.png" alt="" style="height:40px;"></a>
+        </div>
+      </div>
+    </div>
+
+    <div class="container">
+		<!--[if lte IE 6]><br/><div class='alert alert-block' style="text-align:left;padding-bottom:10px;"><a class="close" data-dismiss="alert">x</a><h4>温馨提示:</h4><p>你使用的浏览器版本过低。为了获得更好的浏览体验,我们强烈建议您 <a href="http://browsehappy.com" target="_blank">升级</a> 到最新版本的IE浏览器,或者使用较新版本的 Chrome、Firefox、Safari 等。</p></div><![endif]-->
+		<div id="messageBox" class="alert alert-error <c:if test="${message != null }"></c:if><c:if test="${message == null }">hide</c:if>"><button data-dismiss="alert" class="close">×</button>
+			<label id="loginError" class="error">${message }</label>
+		</div>
+        <div id="login-wraper">
+            <form id="loginForm"  class="form login-form" action="${ctx}/mark-login" method="post">
+                <legend><span style="color:#033249;">评卷员登陆</span></legend>
+                <div class="body">
+					<div class="control-group">
+						<div class="controls">
+							<input type="text" id="loginName" name="loginName" class="required" value="${loginName}" placeholder="请输入用户名">
+						</div>
+					</div>
+					
+					<div class="control-group">
+						<div class="controls">
+							<input type="password" id="password" name="password" class="required" placeholder="请输入密码"/>
+						</div>
+					</div>
+					<%-- <c:if test="${isValidateCodeLogin}"><div class="validateCode">
+						<label for="password">密 码:</label>
+						<tags:validateCode name="validateCode" inputCssStyle="margin-bottom:0;"/>
+					</div></c:if> --%>
+                </div>
+                <div class="footer">
+                    <!-- <label class="checkbox inline">
+                        <input type="checkbox" id="rememberMe" name="rememberMe"> <span style="color:#08c;">记住我</span>
+                    </label> -->
+                    <input class="btn btn-primary" type="submit" value="登 录"/>
+                </div>
+            </form>
+        </div>
+    </div>
+    <footer class="white navbar-fixed-bottom">
+		Copyright &copy;武汉启明软件 2012-2014
+    </footer>
+  </body>
+</html>

+ 32 - 69
stmms-web/src/main/webapp/WEB-INF/views/modules/sys/markLogin.jsp

@@ -2,35 +2,20 @@
 <%@ include file="/WEB-INF/views/include/taglib.jsp"%>
 <html>
 <head>
-	<title>评卷员登录</title>
+	<title>登录</title>
 	<meta name="decorator" content="default"/>
 	<%@include file="/WEB-INF/views/include/head.jsp" %>
-    <link rel="stylesheet" href="${ctxStatic}/common/typica-login.css">
-	<style type="text/css">
-		.control-group{border-bottom:0px;}
-	</style>
-    <script src="${ctxStatic}/common/backstretch.min.js"></script>
+    <link rel="stylesheet" href="${ctxStatic}/common/login.css">
+    <link rel="icon" href="${ctxStatic}/favicon.png" type="image/x-icon">
 	<script type="text/javascript">
 		$(document).ready(function() {
-			<!--针对nw.js评卷客户端,自动窗口最大化-->
-			try{
-				require('nw.gui').Window.get().maximize();
-			}catch(e){
-			}
-
-			$.backstretch([
- 		      "${ctxStatic}/images/bg1.jpg", 
- 		      "${ctxStatic}/images/bg2.jpg",
- 		      "${ctxStatic}/images/bg3.jpg"
- 		  	], {duration: 10000, fade: 2000});
 			$("#loginForm").validate({
 				rules: {
 					validateCode: {remote: "${pageContext.request.contextPath}/servlet/validateCodeServlet"}
 				},
 				messages: {
-					loginName: {required: "请填写用户名."},
-					password: {required: "请填写密码."}
-					//validateCode: {remote: "验证码不正确.", required: "请填写验证码."}
+					username: {required: "请填写用户名."},password: {required: "请填写密码."},
+					validateCode: {remote: "验证码不正确.", required: "请填写验证码."}
 				},
 				errorLabelContainer: "#messageBox",
 				errorPlacement: function(error, element) {
@@ -45,55 +30,33 @@
 	</script>
 </head>
 <body>
-    <div class="navbar navbar-fixed-top">
-      <div class="navbar-inner">
-        <div class="container">
-          <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
-            <span class="icon-bar"></span>
-            <span class="icon-bar"></span>
-            <span class="icon-bar"></span>
-          </a>
-          <a class="brand" href="${ctx}"><img src="${ctxStatic}/images/logo.png" alt="" style="height:40px;"></a>
+<div class="container">
+  <div class="middle cl">
+   <div class="left">
+    <div class="logo"><img src="${ctxStatic}/images/logo@2x.png"/></div>
+    <p>Copyright &#169武汉启明软件 2012-2014</p>
+   </div>
+   <div class="right">
+     <div class="title">
+       <h1>高校考试管理平台</h1>
+       <p>评卷员登录</p>
+     </div>
+     <div class="loginbox">
+      <form action="${ctx}/mark-login" method="post" role="form" id="loginForm">
+        <div class="input-group">
+        	<input type="text" class="form-control required" id="loginName" name="loginName" placeholder="请输入用户ID" autocomplete="off" value="${loginName }"/>
         </div>
-      </div>
-    </div>
-
-    <div class="container">
-		<!--[if lte IE 6]><br/><div class='alert alert-block' style="text-align:left;padding-bottom:10px;"><a class="close" data-dismiss="alert">x</a><h4>温馨提示:</h4><p>你使用的浏览器版本过低。为了获得更好的浏览体验,我们强烈建议您 <a href="http://browsehappy.com" target="_blank">升级</a> 到最新版本的IE浏览器,或者使用较新版本的 Chrome、Firefox、Safari 等。</p></div><![endif]-->
-		<div id="messageBox" class="alert alert-error <c:if test="${message != null }"></c:if><c:if test="${message == null }">hide</c:if>"><button data-dismiss="alert" class="close">×</button>
-			<label id="loginError" class="error">${message }</label>
-		</div>
-        <div id="login-wraper">
-            <form id="loginForm"  class="form login-form" action="${ctx}/mark-login" method="post">
-                <legend><span style="color:#033249;">评卷员登陆</span></legend>
-                <div class="body">
-					<div class="control-group">
-						<div class="controls">
-							<input type="text" id="loginName" name="loginName" class="required" value="${loginName}" placeholder="请输入用户名">
-						</div>
-					</div>
-					
-					<div class="control-group">
-						<div class="controls">
-							<input type="password" id="password" name="password" class="required" placeholder="请输入密码"/>
-						</div>
-					</div>
-					<%-- <c:if test="${isValidateCodeLogin}"><div class="validateCode">
-						<label for="password">密 码:</label>
-						<tags:validateCode name="validateCode" inputCssStyle="margin-bottom:0;"/>
-					</div></c:if> --%>
-                </div>
-                <div class="footer">
-                    <!-- <label class="checkbox inline">
-                        <input type="checkbox" id="rememberMe" name="rememberMe"> <span style="color:#08c;">记住我</span>
-                    </label> -->
-                    <input class="btn btn-primary" type="submit" value="登 录"/>
-                </div>
-            </form>
+        <div class="input-group">
+        	<input type="password" class="form-control required" id="password" name="password" placeholder="请输入密码" autocomplete="off"/>
         </div>
-    </div>
-    <footer class="white navbar-fixed-bottom">
-		Copyright &copy;武汉启明软件 2012-2014
-    </footer>
-  </body>
+        <div class="point <c:if test="${message != null }"></c:if><c:if test="${message == null }">hide</c:if>">
+        <em class="error">${message }</em>
+        </div>
+        <div class="login-btn"><input class="opacity" type="submit" "submit" value="登 录"/></div>
+      </form>
+     </div>
+   </div>
+  </div>
+</div>
+</body>
 </html>

+ 92 - 0
stmms-web/src/main/webapp/WEB-INF/views/modules/sys/sysLogin-bak.jsp

@@ -0,0 +1,92 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
+<html>
+<head>
+	<title>管理员登录</title>
+	<meta name="decorator" content="default"/>
+	<%@include file="/WEB-INF/views/include/head.jsp" %>
+    <link rel="stylesheet" href="${ctxStatic}/common/typica-login.css">
+	<style type="text/css">
+		.control-group{border-bottom:0px;}
+	</style>
+    <script src="${ctxStatic}/common/backstretch.min.js"></script>
+	<script type="text/javascript">
+		$(document).ready(function() {
+			$.backstretch([
+ 		      "${ctxStatic}/images/bg1.jpg", 
+ 		      "${ctxStatic}/images/bg2.jpg",
+ 		      "${ctxStatic}/images/bg3.jpg"
+ 		  	], {duration: 10000, fade: 2000});
+			$("#loginForm").validate({
+				rules: {
+					validateCode: {remote: "${pageContext.request.contextPath}/servlet/validateCodeServlet"}
+				},
+				messages: {
+					username: {required: "请填写用户名."},password: {required: "请填写密码."},
+					validateCode: {remote: "验证码不正确.", required: "请填写验证码."}
+				},
+				errorLabelContainer: "#messageBox",
+				errorPlacement: function(error, element) {
+					error.appendTo($("#loginError").parent());
+				} 
+			});
+		});
+		// 如果在框架中,则跳转刷新上级页面
+		if(self.frameElement && self.frameElement.tagName=="IFRAME"){
+			parent.location.reload();
+		}
+	</script>
+</head>
+<body>
+    <div class="navbar navbar-fixed-top">
+      <div class="navbar-inner">
+        <div class="container">
+          <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
+            <span class="icon-bar"></span>
+            <span class="icon-bar"></span>
+            <span class="icon-bar"></span>
+          </a>
+          <a class="brand" href="${ctx}"><img src="${ctxStatic}/images/logo.png" alt="" style="height:40px;"></a>
+        </div>
+      </div>
+    </div>
+
+    <div class="container">
+		<!--[if lte IE 6]><br/><div class='alert alert-block' style="text-align:left;padding-bottom:10px;"><a class="close" data-dismiss="alert">x</a><h4>温馨提示:</h4><p>你使用的浏览器版本过低。为了获得更好的浏览体验,我们强烈建议您 <a href="http://browsehappy.com" target="_blank">升级</a> 到最新版本的IE浏览器,或者使用较新版本的 Chrome、Firefox、Safari 等。</p></div><![endif]-->
+		<div id="messageBox" class="alert alert-error <c:if test="${message != null }"></c:if><c:if test="${message == null }">hide</c:if>"><button data-dismiss="alert" class="close">×</button>
+			<label id="loginError" class="error">${message }</label>
+		</div>
+        <div id="login-wraper">
+            <form id="loginForm"  class="form login-form" action="${ctx}/admin-login" method="post">
+                <legend><span style="color:#08c;">管理员登陆</span></legend>
+                <div class="body">
+					<div class="control-group">
+						<div class="controls">
+							<input type="text" id="loginName" name="loginName" class="required" value="${loginName}" placeholder="登录名">
+						</div>
+					</div>
+					
+					<div class="control-group">
+						<div class="controls">
+							<input type="password" id="password" name="password" class="required" placeholder="密码"/>
+						</div>
+					</div>
+					<%-- <c:if test="${isValidateCodeLogin}"><div class="validateCode">
+						<label for="password">密 码:</label>
+						<tags:validateCode name="validateCode" inputCssStyle="margin-bottom:0;"/>
+					</div></c:if> --%>
+                </div>
+                <div class="footer">
+                    <!-- <label class="checkbox inline">
+                        <input type="checkbox" id="rememberMe" name="rememberMe"> <span style="color:#08c;">记住我</span>
+                    </label> -->
+                    <input class="btn btn-primary" type="submit" value="登 录"/>
+                </div>
+            </form>
+        </div>
+    </div>
+    <footer class="white navbar-fixed-bottom">
+		Copyright &copy;武汉启明软件 2012-2014
+    </footer>
+  </body>
+</html>

+ 30 - 60
stmms-web/src/main/webapp/WEB-INF/views/modules/sys/sysLogin.jsp

@@ -2,21 +2,13 @@
 <%@ include file="/WEB-INF/views/include/taglib.jsp"%>
 <html>
 <head>
-	<title>管理员登录</title>
+	<title>登录</title>
 	<meta name="decorator" content="default"/>
 	<%@include file="/WEB-INF/views/include/head.jsp" %>
-    <link rel="stylesheet" href="${ctxStatic}/common/typica-login.css">
-	<style type="text/css">
-		.control-group{border-bottom:0px;}
-	</style>
-    <script src="${ctxStatic}/common/backstretch.min.js"></script>
+    <link rel="stylesheet" href="${ctxStatic}/common/login.css">
+    <link rel="icon" href="${ctxStatic}/favicon.png" type="image/x-icon">
 	<script type="text/javascript">
 		$(document).ready(function() {
-			$.backstretch([
- 		      "${ctxStatic}/images/bg1.jpg", 
- 		      "${ctxStatic}/images/bg2.jpg",
- 		      "${ctxStatic}/images/bg3.jpg"
- 		  	], {duration: 10000, fade: 2000});
 			$("#loginForm").validate({
 				rules: {
 					validateCode: {remote: "${pageContext.request.contextPath}/servlet/validateCodeServlet"}
@@ -38,55 +30,33 @@
 	</script>
 </head>
 <body>
-    <div class="navbar navbar-fixed-top">
-      <div class="navbar-inner">
-        <div class="container">
-          <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
-            <span class="icon-bar"></span>
-            <span class="icon-bar"></span>
-            <span class="icon-bar"></span>
-          </a>
-          <a class="brand" href="${ctx}"><img src="${ctxStatic}/images/logo.png" alt="" style="height:40px;"></a>
+<div class="container">
+  <div class="middle cl">
+   <div class="left">
+    <div class="logo"><img src="${ctxStatic}/images/logo@2x.png"/></div>
+    <p>Copyright &#169武汉启明软件 2012-2014</p>
+   </div>
+   <div class="right">
+     <div class="title">
+       <h1>高校考试管理平台</h1>
+       <p>管理员登录</p>
+     </div>
+     <div class="loginbox">
+      <form action="${ctx}/admin-login" method="post" role="form" id="loginForm">
+        <div class="input-group">
+        	<input type="text" class="form-control required" id="loginName" name="loginName" placeholder="请输入用户ID" autocomplete="off" value="${loginName }"/>
         </div>
-      </div>
-    </div>
-
-    <div class="container">
-		<!--[if lte IE 6]><br/><div class='alert alert-block' style="text-align:left;padding-bottom:10px;"><a class="close" data-dismiss="alert">x</a><h4>温馨提示:</h4><p>你使用的浏览器版本过低。为了获得更好的浏览体验,我们强烈建议您 <a href="http://browsehappy.com" target="_blank">升级</a> 到最新版本的IE浏览器,或者使用较新版本的 Chrome、Firefox、Safari 等。</p></div><![endif]-->
-		<div id="messageBox" class="alert alert-error <c:if test="${message != null }"></c:if><c:if test="${message == null }">hide</c:if>"><button data-dismiss="alert" class="close">×</button>
-			<label id="loginError" class="error">${message }</label>
-		</div>
-        <div id="login-wraper">
-            <form id="loginForm"  class="form login-form" action="${ctx}/admin-login" method="post">
-                <legend><span style="color:#08c;">管理员登陆</span></legend>
-                <div class="body">
-					<div class="control-group">
-						<div class="controls">
-							<input type="text" id="loginName" name="loginName" class="required" value="${loginName}" placeholder="登录名">
-						</div>
-					</div>
-					
-					<div class="control-group">
-						<div class="controls">
-							<input type="password" id="password" name="password" class="required" placeholder="密码"/>
-						</div>
-					</div>
-					<%-- <c:if test="${isValidateCodeLogin}"><div class="validateCode">
-						<label for="password">密 码:</label>
-						<tags:validateCode name="validateCode" inputCssStyle="margin-bottom:0;"/>
-					</div></c:if> --%>
-                </div>
-                <div class="footer">
-                    <!-- <label class="checkbox inline">
-                        <input type="checkbox" id="rememberMe" name="rememberMe"> <span style="color:#08c;">记住我</span>
-                    </label> -->
-                    <input class="btn btn-primary" type="submit" value="登 录"/>
-                </div>
-            </form>
+        <div class="input-group">
+        	<input type="password" class="form-control required" id="password" name="password" placeholder="请输入密码" autocomplete="off"/>
         </div>
-    </div>
-    <footer class="white navbar-fixed-bottom">
-		Copyright &copy;武汉启明软件 2012-2014
-    </footer>
-  </body>
+        <div class="point <c:if test="${message != null }"></c:if><c:if test="${message == null }">hide</c:if>">
+        <em class="error">${message }</em>
+        </div>
+        <div class="login-btn"><input class="opacity" type="submit" "submit" value="登 录"/></div>
+      </form>
+     </div>
+   </div>
+  </div>
+</div>
+</body>
 </html>

+ 224 - 0
stmms-web/src/main/webapp/static/common/login.css

@@ -0,0 +1,224 @@
+/*common*/
+* {
+	margin: 0;
+	padding: 0;
+	list-style: none;
+	outline: none;
+	-webkit-tap-highlight-color: transparent;
+	-webkit-box-sizing: border-box;
+	box-sizing: border-box;
+	font-family: "微软雅黑";
+}
+html, body {
+	height: 100%;
+	color: #1B2C5F;
+	overflow-x: hidden;
+}
+body {
+	background: url(../images/bg.jpg) no-repeat 0 30% #F0F3FF fixed;
+	background-size: cover;
+}
+a {
+	text-decoration: none;
+}
+input {
+	font-family: "微软雅黑";
+	outline: none;
+	vertical-align: top;
+}
+.ellipsis {
+	text-overflow: ellipsis;
+	overflow: hidden;
+	white-space: nowrap;
+}
+::-webkit-input-placeholder {
+    color:    #B4B7C3;
+}
+:-moz-placeholder {
+   color:    #B4B7C3;
+}
+::-moz-placeholder {
+   color:    #B4B7C3;
+}
+:-ms-input-placeholder {
+   color:    #B4B7C3;
+}
+.cl:after {
+	content: ".";
+	display: block;
+	height: 0;
+	clear: both;
+	visibility: hidden;
+}
+.cl {
+	zoom: 1;
+}
+/*container*/
+.container {
+	width: 100%;
+	height: 100%;
+	display: -webkit-box;
+	display: -webkit-flex;
+	display: -ms-flexbox;
+	display: flex;
+	
+	-webkit-box-pack: center;
+	-ms-flex-pack: center;
+	-webkit-justify-content: center;
+	justify-content: center;
+	
+	-webkit-box-align: center;
+	-ms-flex-align: center;
+	-webkit-align-items: center;
+	align-items: center;
+}
+.middle {
+	width: 920px;
+	height: 540px;
+	overflow: hidden;
+	background: rgba(255,255,255,.75);
+	-moz-box-shadow: 0px 15px 15px 0px rgba(203,205,211,0.3);
+	-webkit-box-shadow: 0px 15px 15px 0px rgba(203,205,211,0.3);
+	box-shadow: 0px 15px 15px 0px rgba(203,205,211,0.3);
+	padding-left: 320px;
+}
+.left {
+	position: relative;
+	float: left;
+	width: 320px;
+	height: 540px;
+	overflow: hidden;
+	margin-left: -320px;
+	padding: 38px;
+	background: #142862 url(../images/loginbg.png) no-repeat 0 0;
+}
+.left .logo img {
+	width: 130px;
+}
+.left p {
+	position: absolute;
+	left: 38px;
+	bottom: 38px;
+	font-size: 13px;
+	font-size: 700;
+	color: rgba(255,255,255,.65);
+}
+.right {
+	float: left;
+	width: 100%;
+	height: 540px;
+	padding: 90px 130px;
+}
+/*title*/
+.title h1 {
+	height: 38px;
+	line-height: 38px;
+	overflow: hidden;
+	text-align: center;
+	font-size: 26px;
+	color: #1B2C5F;
+}
+.title p {
+	height: 80px;
+	line-height: 80px;
+	overflow: hidden;
+	text-align: center;
+	font-size: 16px;
+	font-size: 700;
+	color: #B4B7C3;
+}
+.title p a {
+	display: inline-block;
+	width: 120px;
+	height: 56px;
+	line-height: 22px;
+	overflow: hidden;
+	text-align: center;
+	font-size: 16px;
+	font-size: 700;
+	color: #B4B7C3;
+	padding-top: 24px;
+	border-bottom: 1px solid #E2E5EB;
+}
+.title p a.on {
+	color: #4E9FE2;
+	border-bottom: 2px solid #66AEE9;
+}
+/*input*/
+.input-group {
+	width: 100%;
+}
+.input-group input {
+	width: 100%;
+	height: 48px;
+	line-height: 48px;
+	color:#1B2C5F;
+	padding: 0 20px 0 48px;
+	background: none;
+	border: 1px solid #E2E5EB;
+	-moz-border-radius: 8px;
+	-webkit-border-radius: 8px;
+	border-radius: 8px;
+}
+.input-group input:focus {
+	outline: 0;
+	-webkit-box-shadow: 0px 10px 15px 0px rgba(203,205,211,.1);
+	-moz-box-shadow: 0px 10px 15px 0px rgba(203,205,211,.1);
+	box-shadow: 0px 10px 15px 0px rgba(203,205,211,.1);
+}
+input#userid {
+	background: url(../images/userid.png) no-repeat 20px 50%;
+}
+input#userid:focus {
+	background: url(../images/userid-on.png) no-repeat 20px 50% #FFF;
+}
+input#password {
+	background: url(../images/password.png) no-repeat 20px 50%;
+	margin-top: 20px;
+}
+input#password:focus {
+	background: url(../images/password-on.png) no-repeat 20px 50% #FFF;
+}
+/*point*/
+.point {
+	height: 16px;
+	line-height: 16px;
+	overflow: hidden;
+	font-size: 12px;
+	padding-left: 21px;
+	margin-top: 16px;
+}
+.point em.error {
+	font-style: normal;
+	color: #FF5F5F;
+	padding-left: 28px;
+	background: url(../images/error.png) no-repeat 0 50%;
+}
+/*btn*/
+.login-btn {
+	text-align: center;
+	padding-top: 40px;
+}
+.login-btn input {
+	display: inline-block;
+	width: 160px;
+	height: 54px;
+	line-height: 54px;
+	overflow: hidden;
+	letter-spacing: 3px;
+	font-size: 20px;
+	font-weight: 700;
+	color: #FFF;
+	border: 0;
+	background: #66ADE8;
+	background-image:-webkit-linear-gradient(to right, #88D3FC, #66ADE8); 
+	background-image:linear-gradient(to right, #88D3FC, #66ADE8); 
+	-moz-border-radius: 30px;
+	-webkit-border-radius: 30px;
+	border-radius: 30px;
+}
+.login-btn input:hover {
+	-moz-box-shadow: 0px 10px 20px 0px rgba(119,192,242,.4);
+	-webkit-box-shadow: 0px 10px 20px 0px rgba(119,192,242,.4);
+	box-shadow: 0px 10px 20px 0px rgba(119,192,242,.4);
+}

BIN
stmms-web/src/main/webapp/static/favicon.png


BIN
stmms-web/src/main/webapp/static/images/bg.jpg


BIN
stmms-web/src/main/webapp/static/images/error.png


BIN
stmms-web/src/main/webapp/static/images/loginbg.png


BIN
stmms-web/src/main/webapp/static/images/logo@2x.png


BIN
stmms-web/src/main/webapp/static/images/password-on.png


BIN
stmms-web/src/main/webapp/static/images/password.png


BIN
stmms-web/src/main/webapp/static/images/userid-on.png


BIN
stmms-web/src/main/webapp/static/images/userid.png


BIN
stmms-web/src/main/webapp/static/images/whdxlogo.png


+ 17 - 1
stmms-web/src/main/webapp/static/mark-new/css/style.css

@@ -1206,4 +1206,20 @@ a.button.all-zero-button {
 }
 .buttonCss{
     border-bottom: 1px solid #b50505;!important;
-}
+}
+
+.sheet, .sheet > * {
+	list-style: none;
+	outline: none;
+	-webkit-tap-highlight-color: transparent;
+	-webkit-box-sizing: border-box;
+	box-sizing: border-box;
+}
+.sheet .popover-cont {
+	width: 100%;
+	height: -webkit-calc(100vh - 51px);
+	height: -moz-calc(100vh - 51px);
+	height: calc(100vh - 51px);
+	padding: 15px;
+	overflow-y: scroll;
+}

BIN
stmms-web/src/main/webapp/static/mark-new/images/images-close-b.png


+ 87 - 5
stmms-web/src/main/webapp/static/mark-new/js/modules/sheet-view.js

@@ -21,22 +21,104 @@ function SheetView(option) {
 }
 
 SheetView.prototype.init = function() {
+	var self = this;
     this.markControl.initMarkFunction();
-    this.container = getDom(this.container_dom, this.markControl).appendTo(this.markControl.container.assistant).find('#sheet-list');
+    this.container = getDom(this.container_dom, this.markControl).appendTo(this.markControl.container);
+    this.container.width(this.maxWidth);
+    
+    this.container.header = getDom(this.container_header_dom, this.markControl).appendTo(this.container);
+    this.container.header.width('100%');
+
+    this.container.content = getDom(this.container_content_dom, this.markControl).appendTo(this.container);
+    this.container.content.width('100%');
+    
+    this.container.header.find('.image-close').click(function () {
+        self.toggle(false);
+    });
+    
+    this.control = getDom(this.control_dom, this.markControl).appendTo(this.markControl.container.assistant);
+    this.control.find('#show-sheet-button').click(function () {
+        self.markControl.container.assistant.hide();
+        self.toggle(true);
+    });
+    this.control.find('#hide-sheet-button').click(function () {
+        self.markControl.container.assistant.hide();
+        self.toggle(false);
+    });
+    self.toggle(false);
 }
 
 SheetView.prototype.render = function(urls) {
+	var self = this;
+	self.container.header.find('.image-switch').empty();
+	self.container.content.empty();
     if (urls != undefined && urls.length > 0) {
-        this.container.empty();
         for (var i = 0; i < urls.length; i++) {
-            this.container.append('<a href="' + (this.server + urls[i]) + '" target="_blank">' + (i + 1) + '</a>');
+        	var url = urls[i];
+        	var sheetId = "sheet"+i;
+        	var nav = $('<a href="#" data-url="'+url+'" id="'+sheetId+'"><span>'+(i+1)+'</span></a>').appendTo(this.container.header.find('.image-switch'));
         }
+        this.container.header.find('.image-switch a').click(function(){
+        	var url = this.getAttribute("data-url");
+        	var sheetId = this.getAttribute("id");
+        	self.renderContent(self.container.content, sheetId);
+        });
+        this.container.header.find('.image-switch a').first().click();
+        
+    } else {
+        this.container.hide();
+    }
+}
+
+SheetView.prototype.renderContent = function(content, sheetId) {
+	content.width(this.markControl.container.centerContent.width());
+	content.height(this.markControl.container.centerContent.height());
+	content.empty();
+	var url =  document.getElementById(sheetId).getAttribute("data-url");
+	var show  = false;
+	var i = sheetId.split("sheet")[1];
+	if(i%2==0){
+		show = true;
+	}
+	content.append($('<canvas id="sheet-canvas"></canvas>'));
+	var image = new Image();
+	image.crossOrigin = '';
+	image.src = this.server + url ;
+    image.canvas = document.getElementById('sheet-canvas');
+    image.content = content;
+    image.onload = function() {
+    	var ctx = this.canvas.getContext("2d");
+    	this.canvas.width = Math.min(this.width, this.content.width());
+    	this.canvas.height = this.canvas.width * this.height / this.width;
+    	ctx.drawImage(image, 0,0,this.width,this.height,0, 0, this.canvas.width, this.canvas.height);
+    	if(show){
+    		ctx.fillStyle = "#FFFFFF";
+    		ctx.fillRect(0, 0, this.canvas.width/2, this.canvas.height*3.7/10);
+    	}
+    	this.canvas.toDataURL("image/jpeg");
+    }
+}
+
+SheetView.prototype.toggle = function(show) {
+    if (show == true) {
+        this.show = true;
         this.container.show();
     } else {
+        this.show = false;
         this.container.hide();
     }
 }
 
-SheetView.prototype.container_dom = '<h3 class="popover-title">查看原卷</h3>\
+SheetView.prototype.control_dom = '<h3 class="popover-title">查看原卷</h3>\
 <div class="popover-content"><p id="sheet-list" class="popover-list">\
-</p></div>';
+<a href="#" id="show-sheet-button">打开</a><a href="#" id="hide-sheet-button">关闭</a>\
+</p></div>';
+
+SheetView.prototype.container_dom = '<div class="image-view-popover sheet" style=" width:100%; height:100vh;"></div>';
+
+SheetView.prototype.container_header_dom = '<div class="popover-header">\
+	<p class="title">原图切换</p>\
+	<p class="image-switch"></p>\
+	<p class="image-close"><img src="{staticServer}/mark-new/images/images-close-b.png" /></p></div>';
+
+SheetView.prototype.container_content_dom = '<div class="popover-cont"></div>';

+ 39 - 0
stmms-web/src/main/webapp/static/mark-new/sheet-popover.html

@@ -0,0 +1,39 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>高校版阅卷系统</title>
+<link href="css/bootstrap.css" rel="stylesheet" type="text/css" />
+<link href="css/style.css" rel="stylesheet" type="text/css" />
+<style type="text/css">
+/*新增css*/
+.sheet, .sheet > * {
+	list-style: none;
+	outline: none;
+	-webkit-tap-highlight-color: transparent;
+	-webkit-box-sizing: border-box;
+	box-sizing: border-box;
+}
+.sheet .popover-cont {
+	width: 100%;
+	height: -webkit-calc(100vh - 51px);
+	height: -moz-calc(100vh - 51px);
+	height: calc(100vh - 51px);
+	padding: 15px;
+	overflow-y: scroll;
+}
+</style>
+</head>
+<body>
+<div class="image-view-popover sheet" style=" width:100%; height:100vh;">
+  <div class="popover-header">
+    <p class="title">原图切换</p>
+    <p class="image-switch"><a href="#">1</a><a href="#">2</a><a class="curr" href="#">3</a><a href="#">4</a></p>
+    <p class="image-close"><img src="images/images-close-b.png" /></p>
+  </div>
+  <div class="popover-cont">
+    <canvas id="canvas"></canvas>
+  </div>
+</div>
+</body>
+</html>

+ 25 - 4
stmms-web/src/main/webapp/static/mark-track/js/modules/sheet-view.js

@@ -27,10 +27,10 @@ SheetView.prototype.render = function(urls) {
 			if(this.list.length > i) {
 				var item = this.list[i];
 				item.nav.show();
-				this.renderContent(item.content, url);
+				this.renderContent(item.content, url,i);
 			} else {
 				var content = $(this.container_dom).appendTo(this.markControl.container.centerContent);
-				this.renderContent(content, url);
+				this.renderContent(content, url,i);
 				this.list.push({
 				    nav: this.markControl.addNavGroup('原卷' + (i + 1), content),
 				    content: content
@@ -46,11 +46,32 @@ SheetView.prototype.render = function(urls) {
 	}
 }
 
-SheetView.prototype.renderContent = function(content, url) {
+SheetView.prototype.renderContent = function(content, url,i) {
 	content.width(this.markControl.container.centerContent.width());
 	content.height(this.markControl.container.centerContent.height());
 	content.empty();
-	content.append($('<img src="'+this.server + url +'">'));
+//	content.append($('<img src="'+this.server + url +'">'));
+	var show  = false;
+	if(i%2==0){
+		show = true;
+	}
+	content.append($('<canvas id="sheet-canvas'+i+'"></canvas>'));
+	var image = new Image();
+	image.crossOrigin = '';
+	image.src = this.server + url ;
+    image.canvas = document.getElementById('sheet-canvas'+i);
+    image.content = content;
+    image.onload = function() {
+    	var ctx = this.canvas.getContext("2d");
+    	this.canvas.width = Math.min(this.width, this.content.width());
+    	this.canvas.height = this.canvas.width * this.height / this.width;
+    	ctx.drawImage(image, 0,0,this.width,this.height,0, 0, this.canvas.width, this.canvas.height);
+    	if(show){
+    		ctx.fillStyle = "#FFFFFF";
+    		ctx.fillRect(0, 0, this.canvas.width/2, this.canvas.height*3.7/10);
+    	}
+    	this.canvas.toDataURL("image/jpeg");
+    }
 }
 
 SheetView.prototype.container_dom = '<div style="display:none; overflow: scroll"></div>';