|
@@ -0,0 +1,276 @@
|
|
|
|
+<%@ page language="java" pageEncoding="utf-8"%>
|
|
|
|
+<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
|
|
|
|
+<!DOCTYPE html>
|
|
|
|
+<html lang="en">
|
|
|
|
+<head>
|
|
|
|
+<meta charset="UTF-8">
|
|
|
|
+<title>云阅卷</title>
|
|
|
|
+<meta name="viewport" content="width=device-width,initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no"/>
|
|
|
|
+<link rel="stylesheet" href="${ctxStatic}/inspected/css/style.css"/>
|
|
|
|
+<script type="text/javascript" src="${ctxStatic}/mark-new/js/jquery.min.js"></script>
|
|
|
|
+<script type="text/javascript" src="${ctxStatic}/mark-new/js/jquery-ui.min.js "></script>
|
|
|
|
+<script type="text/javascript" src="${ctxStatic}/mark-new/js/jquery.mousewheel.min.js"></script>
|
|
|
|
+
|
|
|
|
+<script type="text/javascript" src="${ctxStatic}/answer-check/js/common.js"></script>
|
|
|
|
+
|
|
|
|
+<link rel="stylesheet" href="${ctxStatic}/iviewer/jquery.iviewer.css"/>
|
|
|
|
+<script type="text/javascript" src="${ctxStatic}/iviewer/jquery.iviewer.js"></script>
|
|
|
|
+
|
|
|
|
+<script type="text/javascript" src="${ctxStatic}/mark-new/js/jquery-ui.min.js"></script>
|
|
|
|
+<script type="text/javascript" src="${ctxStatic}/mark-new/js/jquery.mousewheel.min.js"></script>
|
|
|
|
+
|
|
|
|
+</head>
|
|
|
|
+<body id="index">
|
|
|
|
+<div class="wp">
|
|
|
|
+ <div id="top" class="top cl">
|
|
|
|
+ <div class="z"><div>
|
|
|
|
+ <span class="b">编号:</span><span class="i" id="studentId"></span><span class="pipe">|</span>
|
|
|
|
+ <span class="b">科目:</span><span class="i" id="subject"></span><span class="pipe">|</span>
|
|
|
|
+ <span class="b">评卷员:</span><span class="i" id="markerName"></span><span class="pipe">|</span>
|
|
|
|
+ <span class="b">未复核:</span><span class="i" id="progress"></span><span class="pipe">|</span>
|
|
|
|
+ </div></div>
|
|
|
|
+ <div class="y">
|
|
|
|
+ <div><span class="user">${web_user.name}</span></div>
|
|
|
|
+ </div>
|
|
|
|
+ </div></div>
|
|
|
|
+ <div class="middle">
|
|
|
|
+ <div class="middle-bg"></div>
|
|
|
|
+ <div class="box">
|
|
|
|
+ <div class="cont cl">
|
|
|
|
+ <div class="left">
|
|
|
|
+<!-- <div class="iviewer_zoom cl"> -->
|
|
|
|
+<!-- <div class="iviewer_zoom_in" id="zoom-in-button"></div> -->
|
|
|
|
+<!-- <div class="iviewer_zoom_out" id="zoom-out-button"></div> -->
|
|
|
|
+<!-- <div class="iviewer_zoom_zero" id="zoom-origin-button"></div> -->
|
|
|
|
+<!-- <div class="iviewer_zoom_fit" id="zoom-fit-button"></div> -->
|
|
|
|
+<!-- </div> -->
|
|
|
|
+ <div id="image-holder-track" class="image-content" style="position: relative; " ></div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="right">
|
|
|
|
+ <div class="formbox">
|
|
|
|
+ <div class="form-t">
|
|
|
|
+ <h1><span>评分:</span><span class="i" id="markerScore"></span></h1>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="form-m">
|
|
|
|
+ <table class="c-table" cellpadding="0" cellspacing="0" width="100%">
|
|
|
|
+ <thead>
|
|
|
|
+ <tr>
|
|
|
|
+ <th>小题</th>
|
|
|
|
+ <td>给分</td>
|
|
|
|
+ </tr>
|
|
|
|
+ </thead>
|
|
|
|
+ <tbody id="question-content">
|
|
|
|
+<!-- <tr> -->
|
|
|
|
+<!-- <th>网络教育学院2015年下半年本科学士学位主干课程考试01</th> -->
|
|
|
|
+<!-- <td>3.5</td> -->
|
|
|
|
+<!-- </tr> -->
|
|
|
|
+ </tbody>
|
|
|
|
+ </table>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="form-b cl"> <a href="" id="save-button"/>确认</a><!--<a class="grey" href=""/>取消</a>--> </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="tipsbox">
|
|
|
|
+ <p><span class="icon error"></span><br>当前没有可复核的试卷</p>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+</div>
|
|
|
|
+</body>
|
|
|
|
+<script type="text/javascript">
|
|
|
|
+var ids = [${ids}];
|
|
|
|
+var current;
|
|
|
|
+var student;
|
|
|
|
+var iviewer;
|
|
|
|
+var regex = /^[a-z]+$/ig;
|
|
|
|
+$(document).ready(function() {
|
|
|
|
+ $('#save-button').click(save);
|
|
|
|
+ $('#zoom-in-button').click(function(){
|
|
|
|
+ if(iviewer!=undefined) {
|
|
|
|
+ iviewer.iviewer('zoom_by', 1);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ $('#zoom-out-button').click(function(){
|
|
|
|
+ if(iviewer!=undefined) {
|
|
|
|
+ iviewer.iviewer('zoom_by', -1);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ $('#zoom-origin-button').click(function(){
|
|
|
|
+ if(iviewer!=undefined) {
|
|
|
|
+ iviewer.iviewer('set_zoom', 100);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ $('#zoom-fit-button').click(function(){
|
|
|
|
+ if(iviewer!=undefined) {
|
|
|
|
+ iviewer.iviewer('fit');
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ if(ids.length==0){
|
|
|
|
+ $(".cont cl").css("display","none");
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ $(".tipsbox").css("display","none");
|
|
|
|
+ process(1);
|
|
|
|
+});
|
|
|
|
+
|
|
|
|
+function process(index){
|
|
|
|
+ if(index<1){
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ if(index > ids.length){
|
|
|
|
+ alert('所有考生已处理完毕,请返回重新搜索');
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ current = index;
|
|
|
|
+ $('#answer-content').empty();
|
|
|
|
+ $('#image-holder-track').hide();
|
|
|
|
+ $.post('${ctx}/admin/exam/inspected/info', {
|
|
|
|
+ libraryId: ids[index-1]
|
|
|
|
+ }, function(result){
|
|
|
|
+ student = result;
|
|
|
|
+ render();
|
|
|
|
+ }).error(function() {
|
|
|
|
+ alert('获取考生信息出错');
|
|
|
|
+ onProcessFinish(true)
|
|
|
|
+ });
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+function onProcessFinish(error) {
|
|
|
|
+ if(!error) {
|
|
|
|
+ $('#save-button').removeAttr("disabled");
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+function render(){
|
|
|
|
+ $('#progress').html(ids.length);
|
|
|
|
+ $('#studentId').html(student.studentId);
|
|
|
|
+ $('#subject').html(student.subjectCode+'_'+student.subjectName);
|
|
|
|
+ $('#markerName').html(student.markerName);
|
|
|
|
+ $('#markerScore').html(student.markerScore);
|
|
|
|
+
|
|
|
|
+ for(var i=0;i<student.questions.length;i++){
|
|
|
|
+ var q = student.questions[i];
|
|
|
|
+ var dom = '<tr><th>'+q.questionNumber+'</th><td>'+q.score+'</td></tr>';
|
|
|
|
+ $("#question-content").append(dom) ;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+/* if(iviewer==undefined){
|
|
|
|
+ iviewer = $('#image-holder-track').iviewer({
|
|
|
|
+ src: '${sheetServer}' + student.sheetUrls[0],
|
|
|
|
+ zoom_delta: 1.2,
|
|
|
|
+ zoom: 'fit',
|
|
|
|
+ zoom_min: 10,
|
|
|
|
+ mousewheel: false,
|
|
|
|
+ zoom_animation: false,
|
|
|
|
+ update_on_resize: true,
|
|
|
|
+ ui_disabled: true,
|
|
|
|
+ onFinishLoad: function(ev, url) {
|
|
|
|
+ $('#image-holder-track').show();
|
|
|
|
+ onProcessFinish(false);
|
|
|
|
+ },
|
|
|
|
+ onErrorLoad: function(ev, url) {
|
|
|
|
+ onProcessFinish(true);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }else{
|
|
|
|
+ iviewer.iviewer('loadImage', '${sheetServer}' + student.sheetUrls[0]);
|
|
|
|
+ } */
|
|
|
|
+ var pane = $('<canvas id="track-builder-canvas"></canvas>').appendTo($('#image-holder-track'));
|
|
|
|
+ var canvas = document.getElementById('track-builder-canvas');
|
|
|
|
+ var ctx = canvas.getContext('2d');
|
|
|
|
+ buildImages('${sliceServer}',student.picUrls,student.pictureConfig,canvas,ctx,student.markTracks,student.markSpecialTagList);
|
|
|
|
+ $('#image-holder-track').show();
|
|
|
|
+ onProcessFinish(false);
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+function save(){
|
|
|
|
+ if(student==undefined){
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ $.post('${ctx}/admin/exam/inspected/save', {
|
|
|
|
+ libraryId: student.id
|
|
|
|
+ }, function(result){
|
|
|
|
+ if(result==true){
|
|
|
|
+ process(current+1);
|
|
|
|
+ }else{
|
|
|
|
+ alert('保存失败,请稍后重试');
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+function buildImages (imageServer,picUrls,config,canvas,ctx,markTracks,markSpecialTagList) {
|
|
|
|
+ var indexSet = {};
|
|
|
|
+ for(var i=0;i<config.length;i++){
|
|
|
|
+ indexSet[config[i].i-1] = true;
|
|
|
|
+ }
|
|
|
|
+ //调用图片预加载函数,实现回调函数
|
|
|
|
+ var imageObjects = [];
|
|
|
|
+ loadImages(imageObjects, imageServer, indexSet, picUrls, 0,function(images) {
|
|
|
|
+ var maxWidth = 0;
|
|
|
|
+ var totalHeight = 0;
|
|
|
|
+ for (var i = 0; i < config.length; i++) {
|
|
|
|
+ //计算最大宽度与合计高度
|
|
|
|
+ if(config[i].w<=0){
|
|
|
|
+ config[i].w=images[config[i].i-1].width;
|
|
|
|
+ }
|
|
|
|
+ if(config[i].h<=0){
|
|
|
|
+ config[i].h=images[config[i].i-1].height;
|
|
|
|
+ }
|
|
|
|
+ maxWidth = Math.max(maxWidth, config[i].w);
|
|
|
|
+ totalHeight += config[i].h;
|
|
|
|
+ }
|
|
|
|
+ if (maxWidth > 0 && totalHeight > 0) {
|
|
|
|
+ //设置画布大小及背景颜色
|
|
|
|
+ canvas.width = maxWidth;
|
|
|
|
+ canvas.height = totalHeight;
|
|
|
|
+ ctx.fillStyle = "#FFFFFF";
|
|
|
|
+ ctx.fillRect(0, 0, maxWidth, totalHeight);
|
|
|
|
+ //绘画到画布
|
|
|
|
+ var height = 0;
|
|
|
|
+ for (var i = 0; i < config.length; i++) {
|
|
|
|
+ var image = images[config[i].i-1];
|
|
|
|
+ ctx.drawImage(image, config[i].x, config[i].y, config[i].w, config[i].h, 0, height, config[i].w, config[i].h);
|
|
|
|
+ height += config[i].h;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ //阅卷轨迹
|
|
|
|
+ if(markTracks!=undefined && markTracks.length>0){
|
|
|
|
+ ctx.font ="60px Arial";
|
|
|
|
+ ctx.fillStyle ='red';
|
|
|
|
+ for (var j = 0; j < markTracks.length; j++) {
|
|
|
|
+ ctx.fillText(
|
|
|
|
+ markTracks[j].score,
|
|
|
|
+ markTracks[j].positionX*canvas.width,
|
|
|
|
+ markTracks[j].positionY*canvas.height);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ for (var i = 0; i < markSpecialTagList.length; i++) {
|
|
|
|
+ ctx.font ="60px Arial";
|
|
|
|
+ ctx.fillStyle ='red';
|
|
|
|
+ if(markSpecialTagList[i].positionX > 0 && markSpecialTagList[i].positionY > 0){
|
|
|
|
+ ctx.fillText(markSpecialTagList[i].tagName,markSpecialTagList[i].positionX*canvas.width ,markSpecialTagList[i].positionY*canvas.height);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+function loadImages(images, imageServer, indexSet, urls, number, callback) {
|
|
|
|
+ if (urls != undefined && number < urls.length) {
|
|
|
|
+ if(indexSet[number]==true) {
|
|
|
|
+ var img = new Image();
|
|
|
|
+ img.onload = function() {
|
|
|
|
+ images.push(img);
|
|
|
|
+ loadImages(images, imageServer, indexSet, urls, number + 1, callback);
|
|
|
|
+ }
|
|
|
|
+ img.src = imageServer + urls[number] + '?' + new Date().getTime();
|
|
|
|
+ }else {
|
|
|
|
+ images.push({});
|
|
|
|
+ loadImages(images, imageServer, indexSet, urls, number + 1, callback);
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ callback.call(this, images);
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+</script>
|
|
|
|
+</html>
|