|
@@ -1,48 +1,37 @@
|
|
|
-<%@ page contentType="text/html;charset=UTF-8"%>
|
|
|
-
|
|
|
+<%@ 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"/>
|
|
|
+<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>
|
|
|
|
|
|
-<link rel="stylesheet" type="text/css" href="${ctxStatic}/jBox/Source/jBox.css">
|
|
|
-<script type="text/javascript" src="${ctxStatic}/jBox/Source/jBox.min.js"></script>
|
|
|
-
|
|
|
-<link rel="stylesheet" type="text/css" href="${ctxStatic}/iviewer/jquery.iviewer.css">
|
|
|
-<script type="text/javascript" src="${ctxStatic}/iviewer/jquery.iviewer.js"></script>
|
|
|
-
|
|
|
<link rel="stylesheet" type="text/css" href="${ctxStatic}/rich-text/css/rich-text.css">
|
|
|
<script type="text/javascript" src="${ctxStatic}/rich-text/js/render.js"></script>
|
|
|
|
|
|
-<link rel="stylesheet" type="text/css" href="${ctxStatic}/viewer/viewer.css">
|
|
|
<script type="text/javascript" src="${ctxStatic}/viewer/viewer.js"></script>
|
|
|
+<link href="${ctxStatic}/viewer/viewer.css" rel="stylesheet">
|
|
|
|
|
|
-<div id="json-view-content" class="container-fluid" style="display:none">
|
|
|
- <div class="row-fluid">
|
|
|
- <div id="right-json-div" >
|
|
|
- <ul id="right-json-nav" class="nav nav-tabs">
|
|
|
- </ul>
|
|
|
- <div id="right-json-content" class="tab-content rich-text">
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+</head>
|
|
|
+<body id="index">
|
|
|
+ <div id="json-view-content" class="rich-text">
|
|
|
</div>
|
|
|
-</div>
|
|
|
-
|
|
|
+</body>
|
|
|
<script type="text/javascript">
|
|
|
-var imageModal = new jBox('Modal');
|
|
|
+var url = "${answerServer}${answerUrl}";
|
|
|
+var questionNumbers ="${questionNumbers}";
|
|
|
|
|
|
$(document).ready(function() {
|
|
|
- $('#left-answer-div').find('iframe').height($(window).height()*0.83);
|
|
|
+ initJsonPopover(url,questionNumbers);
|
|
|
});
|
|
|
|
|
|
-function initJsonPopover(title,url,questionNumbers) {
|
|
|
- initJsonPopoverContent(title,url,questionNumbers);
|
|
|
- imageModal.setWidth($(window).width()*0.9);
|
|
|
- imageModal.setHeight($(window).height()*0.85);
|
|
|
- imageModal.setTitle(title);
|
|
|
- imageModal.open();
|
|
|
-}
|
|
|
-function initJsonPopoverContent(title,url,questionNumbers){
|
|
|
+function initJsonPopover(url,questionNumbers){
|
|
|
|
|
|
- $('#right-json-nav, #right-json-content').empty();
|
|
|
+ $('#json-view-content').empty();
|
|
|
$.ajax({
|
|
|
type:"GET",
|
|
|
url:url,
|
|
@@ -60,25 +49,22 @@ function initJsonPopoverContent(title,url,questionNumbers){
|
|
|
return true;
|
|
|
}
|
|
|
var questionTitle = '<span>题号:'+ question.mainNumber+'-'+question.subNumber +'<span></br>';
|
|
|
- $(questionTitle).appendTo($('#right-json-content'));
|
|
|
- $("<span>题干:<span>"+renderRichText(question.body)).appendTo($('#right-json-content'));
|
|
|
- $("<span>考生答案:<span>"+renderRichText(question.studentAnswer)).appendTo('#right-json-content');
|
|
|
- $("<span>标准答案:<span>"+renderRichText(question.answer)).appendTo('#right-json-content');
|
|
|
+ $(questionTitle).appendTo($('#json-view-content'));
|
|
|
+ $("<span>题干:<span>"+renderRichText(question.body)).appendTo($('#json-view-content'));
|
|
|
+ $("<span>考生答案:<span>"+renderRichText(question.studentAnswer)).appendTo('#json-view-content');
|
|
|
+ $("<span>标准答案:<span>"+renderRichText(question.answer)).appendTo('#json-view-content');
|
|
|
});
|
|
|
}else{
|
|
|
questions.forEach(question => {
|
|
|
var questionTitle = '<span>题号:'+ question.mainNumber+'-'+question.subNumber +'<span><br/>';
|
|
|
- $(questionTitle).appendTo($('#right-json-content'));
|
|
|
- $("<span>题干:<span>"+renderRichText(question.body)).appendTo($('#right-json-content'));
|
|
|
- $("<span>考生答案:<span>"+renderRichText(question.studentAnswer)).appendTo('#right-json-content');
|
|
|
- $("<span>标准答案:<span>"+renderRichText(question.answer)).appendTo('#right-json-content');
|
|
|
+ $(questionTitle).appendTo($('#json-view-content'));
|
|
|
+ $("<span>题干:<span>"+renderRichText(question.body)).appendTo($('#json-view-content'));
|
|
|
+ $("<span>考生答案:<span>"+renderRichText(question.studentAnswer)).appendTo('#json-view-content');
|
|
|
+ $("<span>标准答案:<span>"+renderRichText(question.answer)).appendTo('#json-view-content');
|
|
|
});
|
|
|
}
|
|
|
- $('#right-json-nav').append('<li><a href="#" data-toggle="tab">'+title+'</a></li>');
|
|
|
- $('#right-json-nav a:first').trigger('click');
|
|
|
- imageModal.setContent($('#json-view-content'));
|
|
|
- /* const viewer = new Viewer($('#right-json-content')[0], {
|
|
|
- }); */
|
|
|
+ const viewer = new Viewer($('#json-view-content')[0], {
|
|
|
+ });
|
|
|
}
|
|
|
});
|
|
|
|