|
@@ -1,189 +1,201 @@
|
|
-<%@ page language="java" pageEncoding="utf-8"%>
|
|
|
|
-<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
|
|
|
|
|
|
+<%@ page language="java" pageEncoding="utf-8" %>
|
|
|
|
+<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
|
|
<!DOCTYPE html>
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<html lang="en">
|
|
<head>
|
|
<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>
|
|
|
|
|
|
+ <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>
|
|
</head>
|
|
<body id="index">
|
|
<body id="index">
|
|
<div class="wp">
|
|
<div class="wp">
|
|
<div id="top" class="top cl">
|
|
<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="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 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">
|
|
|
|
- <input type="button" id="save-button" value="确认"/>
|
|
|
|
- <input type="button" class="grey" id="back-button" value="打回"/>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- <div class="tipsbox">
|
|
|
|
- <p><span class="icon error"></span><br>当前没有可复核的试卷</p>
|
|
|
|
- </div>
|
|
|
|
|
|
+ <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">
|
|
|
|
+ <input type="button" id="save-button" value="确认"/>
|
|
|
|
+ <input type="button" class="grey" id="back-button" value="打回"/>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="tipsbox">
|
|
|
|
+ <p><span class="icon error"></span><br>当前没有可复核的试卷</p>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</body>
|
|
<script type="text/javascript">
|
|
<script type="text/javascript">
|
|
-var message = '${message}';
|
|
|
|
-var ids = [${ids}];
|
|
|
|
-var current;
|
|
|
|
-var student;
|
|
|
|
-var iviewer;
|
|
|
|
-var regex = /^[a-z]+$/ig;
|
|
|
|
-$(document).ready(function() {
|
|
|
|
- if(message!=undefined && message!=''){
|
|
|
|
- alert(message);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- $('#save-button').click(save);
|
|
|
|
- $('#back-button').click(back);
|
|
|
|
-
|
|
|
|
- $('#zoom-in-button').click(function(){
|
|
|
|
- if(iviewer!=undefined) {
|
|
|
|
- iviewer.iviewer('zoom_by', 1);
|
|
|
|
|
|
+ var message = '${message}';
|
|
|
|
+ var ids = [${ids}];
|
|
|
|
+ var current;
|
|
|
|
+ var student;
|
|
|
|
+ var iviewer;
|
|
|
|
+ var regex = /^[a-z]+$/ig;
|
|
|
|
+ $(document).ready(function () {
|
|
|
|
+ if (message != undefined && message != '') {
|
|
|
|
+ alert(message);
|
|
}
|
|
}
|
|
- });
|
|
|
|
- $('#zoom-out-button').click(function(){
|
|
|
|
- if(iviewer!=undefined) {
|
|
|
|
- iviewer.iviewer('zoom_by', -1);
|
|
|
|
|
|
+
|
|
|
|
+ $('#save-button').click(save);
|
|
|
|
+ $('#back-button').click(back);
|
|
|
|
+
|
|
|
|
+ $('#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;
|
|
}
|
|
}
|
|
- });
|
|
|
|
- $('#zoom-origin-button').click(function(){
|
|
|
|
- if(iviewer!=undefined) {
|
|
|
|
- iviewer.iviewer('set_zoom', 100);
|
|
|
|
|
|
+ $(".tipsbox").css("display", "none");
|
|
|
|
+
|
|
|
|
+ window.onbeforeunload = function () {
|
|
|
|
+ $.post('${ctx}/admin/exam/inspected/clear', {
|
|
|
|
+ libraryId: student.id
|
|
|
|
+ }, function (result) {
|
|
|
|
+
|
|
|
|
+ });
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ $('#progress').html(ids.length);
|
|
|
|
+ process(1);
|
|
});
|
|
});
|
|
- $('#zoom-fit-button').click(function(){
|
|
|
|
- if(iviewer!=undefined) {
|
|
|
|
- iviewer.iviewer('fit');
|
|
|
|
|
|
+
|
|
|
|
+ function process(index) {
|
|
|
|
+
|
|
|
|
+ if (index < 1) {
|
|
|
|
+ return;
|
|
}
|
|
}
|
|
- });
|
|
|
|
- if(ids.length==0){
|
|
|
|
- $(".cont cl").css("display","none");
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- $(".tipsbox").css("display","none");
|
|
|
|
-
|
|
|
|
- window.onbeforeunload = function (){
|
|
|
|
- $.post('${ctx}/admin/exam/inspected/clear', {
|
|
|
|
- libraryId: student.id
|
|
|
|
- }, function(result){
|
|
|
|
-
|
|
|
|
|
|
+ if (index > ids.length) {
|
|
|
|
+ alert('所有考生已处理完毕,请返回重新搜索');
|
|
|
|
+ window.location.reload();
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ current = index;
|
|
|
|
+ $('#answer-content').empty();
|
|
|
|
+ $('#image-holder-track').hide();
|
|
|
|
+ $.post('${ctx}/admin/exam/inspected/info', {
|
|
|
|
+ libraryId: ids[index - 1]
|
|
|
|
+ }, function (result) {
|
|
|
|
+ if (result.success == true) {
|
|
|
|
+ student = result;
|
|
|
|
+ render();
|
|
|
|
+ } else {
|
|
|
|
+ //$('#progress').html(ids.length-current);
|
|
|
|
+ process(current + 1);
|
|
|
|
+ }
|
|
|
|
+ }).error(function () {
|
|
|
|
+ alert('获取考生信息出错');
|
|
|
|
+ onProcessFinish(true);
|
|
});
|
|
});
|
|
}
|
|
}
|
|
-
|
|
|
|
- $('#progress').html(ids.length);
|
|
|
|
- process(1);
|
|
|
|
-});
|
|
|
|
|
|
|
|
-function process(index){
|
|
|
|
-
|
|
|
|
- if(index<1){
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- if(index > ids.length){
|
|
|
|
- alert('所有考生已处理完毕,请返回重新搜索');
|
|
|
|
- window.location.reload();
|
|
|
|
- return;
|
|
|
|
|
|
+ function onProcessFinish(error) {
|
|
|
|
+ if (!error) {
|
|
|
|
+ $('#save-button').removeAttr("disabled");
|
|
|
|
+ }
|
|
}
|
|
}
|
|
- current = index;
|
|
|
|
- $('#answer-content').empty();
|
|
|
|
- $('#image-holder-track').hide();
|
|
|
|
- $.post('${ctx}/admin/exam/inspected/info', {
|
|
|
|
- libraryId: ids[index-1]
|
|
|
|
- }, function(result){
|
|
|
|
- if(result.success==true){
|
|
|
|
- student = result;
|
|
|
|
- render();
|
|
|
|
- }else{
|
|
|
|
- //$('#progress').html(ids.length-current);
|
|
|
|
- process(current+1);
|
|
|
|
- }
|
|
|
|
- }).error(function() {
|
|
|
|
- alert('获取考生信息出错');
|
|
|
|
- onProcessFinish(true);
|
|
|
|
- });
|
|
|
|
-}
|
|
|
|
|
|
|
|
-function onProcessFinish(error) {
|
|
|
|
- if(!error) {
|
|
|
|
- $('#save-button').removeAttr("disabled");
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
|
|
+ function render() {
|
|
|
|
|
|
-function render(){
|
|
|
|
-
|
|
|
|
- $('#studentId').html(student.studentId);
|
|
|
|
- $('#subject').html(student.subjectCode+'_'+student.subjectName);
|
|
|
|
- $('#markerName').html(student.markerName);
|
|
|
|
- $('#markerScore').html(student.markerScore);
|
|
|
|
- $("#question-content").empty();
|
|
|
|
- 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],
|
|
|
|
|
|
+ $('#studentId').html(student.studentId);
|
|
|
|
+ $('#subject').html(student.subjectCode + '_' + student.subjectName);
|
|
|
|
+ $('#markerName').html(student.markerName);
|
|
|
|
+ $('#markerScore').html(student.markerScore);
|
|
|
|
+ $("#question-content").empty();
|
|
|
|
+ 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_delta: 1.2,
|
|
zoom: 'fit',
|
|
zoom: 'fit',
|
|
zoom_min: 10,
|
|
zoom_min: 10,
|
|
@@ -200,125 +212,95 @@ function render(){
|
|
}
|
|
}
|
|
});
|
|
});
|
|
}else{
|
|
}else{
|
|
- iviewer.iviewer('loadImage', '${sheetServer}' + student.sheetUrls[0]);
|
|
|
|
|
|
+ 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;
|
|
|
|
|
|
+ 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);
|
|
}
|
|
}
|
|
- $.post('${ctx}/admin/exam/inspected/save', {
|
|
|
|
- libraryId: student.id
|
|
|
|
- }, function(result){
|
|
|
|
- if(result==true){
|
|
|
|
- $('#progress').html(ids.length-current);
|
|
|
|
- process(current+1);
|
|
|
|
- }else{
|
|
|
|
- alert('保存失败,请稍后重试');
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
-}
|
|
|
|
|
|
|
|
-function back(){
|
|
|
|
- if(student==undefined){
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- if(!confirm('确定要打回该评卷任务吗?')){
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- $.post('${ctx}/admin/exam/library/back', {
|
|
|
|
- id: student.id
|
|
|
|
- }, function(result){
|
|
|
|
- if(result.success==true){
|
|
|
|
- $('#progress').html(ids.length-current);
|
|
|
|
- process(current+1);
|
|
|
|
- }else{
|
|
|
|
- alert(result.message);
|
|
|
|
|
|
+ function save() {
|
|
|
|
+ if (student == undefined) {
|
|
|
|
+ return;
|
|
}
|
|
}
|
|
- });
|
|
|
|
-
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-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;
|
|
|
|
|
|
+ $.post('${ctx}/admin/exam/inspected/save', {
|
|
|
|
+ libraryId: student.id
|
|
|
|
+ }, function (result) {
|
|
|
|
+ if (result == true) {
|
|
|
|
+ $('#progress').html(ids.length - current);
|
|
|
|
+ process(current + 1);
|
|
|
|
+ } else {
|
|
|
|
+ alert('保存失败,请稍后重试');
|
|
}
|
|
}
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ function back() {
|
|
|
|
+ if (student == undefined) {
|
|
|
|
+ return;
|
|
}
|
|
}
|
|
- //阅卷轨迹
|
|
|
|
- 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);
|
|
|
|
- }
|
|
|
|
|
|
+ if (!confirm('确定要打回该评卷任务吗?')) {
|
|
|
|
+ return;
|
|
}
|
|
}
|
|
- 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);
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
-}
|
|
|
|
|
|
+ $.post('${ctx}/admin/exam/library/back', {
|
|
|
|
+ id: student.id
|
|
|
|
+ }, function (result) {
|
|
|
|
+ if (result.success == true) {
|
|
|
|
+ $('#progress').html(ids.length - current);
|
|
|
|
+ process(current + 1);
|
|
|
|
+ } else {
|
|
|
|
+ alert(result.message);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
|
|
-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);
|
|
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ function buildImages(imageServer, picUrls, config, canvas, ctx, markTracks, markSpecialTagList) {
|
|
|
|
+ new ImageLoader({
|
|
|
|
+ server: imageServer,
|
|
|
|
+ flush: true,
|
|
|
|
+ strict: false
|
|
|
|
+ }).combine(picUrls, canvas, config, function () {
|
|
|
|
+ //阅卷轨迹
|
|
|
|
+ if (markTracks != undefined && markTracks.length > 0) {
|
|
|
|
+ ctx.font = "60px Arial";
|
|
|
|
+ ctx.fillStyle = 'red';
|
|
|
|
+ for (var j = 0; j < markTracks.length; j++) {
|
|
|
|
+ if (markTracks[j].positionX > 0 && markTracks[j].positionY > 0) {
|
|
|
|
+ ctx.fillText(
|
|
|
|
+ markTracks[j].score,
|
|
|
|
+ markTracks[j].positionX * canvas.width,
|
|
|
|
+ markTracks[j].positionY * canvas.height);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
- img.src = imageServer + urls[number] + '?' + new Date().getTime();
|
|
|
|
- }else {
|
|
|
|
- images.push({});
|
|
|
|
- loadImages(images, imageServer, indexSet, urls, number + 1, callback);
|
|
|
|
- }
|
|
|
|
- } else {
|
|
|
|
- callback.call(this, images);
|
|
|
|
|
|
+ if (markSpecialTagList != undefined && markSpecialTagList.length > 0) {
|
|
|
|
+ ctx.font = "60px Arial";
|
|
|
|
+ ctx.fillStyle = 'red';
|
|
|
|
+ for (var i = 0; i < markSpecialTagList.length; i++) {
|
|
|
|
+ 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 (error) {
|
|
|
|
+ console.log(error)
|
|
|
|
+ })
|
|
}
|
|
}
|
|
-}
|
|
|
|
|
|
|
|
</script>
|
|
</script>
|
|
</html>
|
|
</html>
|