From 9006450d3ef074c0d050bc1575ea6db056f32139 Mon Sep 17 00:00:00 2001 From: jack-rabbit <376168706@qq.com> Date: Mon, 1 Jul 2019 14:43:02 +0800 Subject: [PATCH] 1、修改翻译文案 --- WebRoot/WEB-INF/jsp/sunvote/teacher/en_paper_view1.jsp | 156 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ WebRoot/WEB-INF/jsp/sunvote/teacher/en_set_question.jsp | 4 ++++ WebRoot/WEB-INF/jsp/sunvote/teacher/en_test_list.jsp | 3 +++ WebRoot/static/js/en_paper_view1.js | 189 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/com/fh/controller/sunvote/teacher/TeacherController.java | 7 ++++++- 5 files changed, 358 insertions(+), 1 deletion(-) create mode 100644 WebRoot/WEB-INF/jsp/sunvote/teacher/en_paper_view1.jsp create mode 100644 WebRoot/static/js/en_paper_view1.js diff --git a/WebRoot/WEB-INF/jsp/sunvote/teacher/en_paper_view1.jsp b/WebRoot/WEB-INF/jsp/sunvote/teacher/en_paper_view1.jsp new file mode 100644 index 0000000..7c338d9 --- /dev/null +++ b/WebRoot/WEB-INF/jsp/sunvote/teacher/en_paper_view1.jsp @@ -0,0 +1,156 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> +<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> +<% + String path = request.getContextPath(); + String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + + + + + + + 中天电子-教育管理系统 + + + + + + + + + + + + + +
+ +
+ +
+
    + +
+
+
+ +
+ + + + + + + + + + + diff --git a/WebRoot/WEB-INF/jsp/sunvote/teacher/en_set_question.jsp b/WebRoot/WEB-INF/jsp/sunvote/teacher/en_set_question.jsp index 96bc608..7ea59bd 100644 --- a/WebRoot/WEB-INF/jsp/sunvote/teacher/en_set_question.jsp +++ b/WebRoot/WEB-INF/jsp/sunvote/teacher/en_set_question.jsp @@ -23,6 +23,10 @@ diff --git a/WebRoot/WEB-INF/jsp/sunvote/teacher/en_test_list.jsp b/WebRoot/WEB-INF/jsp/sunvote/teacher/en_test_list.jsp index e640add..151c5d7 100644 --- a/WebRoot/WEB-INF/jsp/sunvote/teacher/en_test_list.jsp +++ b/WebRoot/WEB-INF/jsp/sunvote/teacher/en_test_list.jsp @@ -86,7 +86,10 @@ var user_id= "${pd.userId}"; var url = "<%=basePath%>"; $(document).ready(function(){ + window.top.loading.remove(); + var h_height = $(".head_box").height(); + $(".table_box").css("padding-top",h_height); }); diff --git a/WebRoot/static/js/en_paper_view1.js b/WebRoot/static/js/en_paper_view1.js new file mode 100644 index 0000000..f888fe5 --- /dev/null +++ b/WebRoot/static/js/en_paper_view1.js @@ -0,0 +1,189 @@ + var url=""; + function slide(obj){ //查看详情 + obj.closest(".star_box").siblings(".resolve").slideToggle(function(){ + if($(".resolve").css("display") == "none") + obj.text("Show Analysis"); + else + obj.text("Hide Analysis"); + }); + } + + + function bar(index,data1,data2,answer,color,sum){ //柱状图 + var myChart = echarts.init(document.getElementById('main'+index)); + myChart.setOption({ + color: ['#3398DB'], + tooltip : { + trigger: 'axis', + axisPointer : { // 坐标轴指示器,坐标轴触发有效 + type : 'line' // 默认为直线,可选为:'line' | 'shadow' + }, + formatter: function(params){ + return params[0].name+"
Proportion:"+((params[0].value/sum)*100).toFixed(2)+"%
Number:"+params[0].value; + } + }, + grid: { + top: 15, + left: '0%', + right: '0%', + bottom: '0%', + containLabel: true + }, + xAxis : [ + { + type : 'category', + data : data2, + axisTick: { + alignWithLabel: true + }, + axisLabel: { + show:true, + textStyle:{ + color: function (value){ + console.log(value); + return value == answer ? '#75b3ff' : '#fcb35b'; + } + } + } + } + ], + yAxis : [ + { + type : 'value', + max: function(value) { + return sum; + } + } + ], + series : [ + { + name:'选项人数', + type:'bar', + barWidth: '60%', + data:data1, + itemStyle: { + //通常情况下: + normal:{ + //每个柱子的颜色即为colorList数组里的每一项,如果柱子数目多于colorList的长度,则柱子颜色循环使用该数组 + color: function (params){ + var colorList = color; + return colorList[params.dataIndex]; + }, + label : {show: true,position:'top',distance:-4} + } + } + } + ] + }); + } + +function getQueryString(name) { + var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i"); + var r = window.location.search.substr(1).match(reg); + if (r != null) return unescape(r[2]); return null; + } + var testpaperId=getQueryString("testpaperId"); + + var _html=""; + $(document).ready(function(){ + window.top.loading.remove(); + $.ajax({ + url:url+"/SunvoteEducation/api/v1/testpaperinfo", + async:false, + type:"post", + data:{ID:testpaperId}, + success:function(data){ + console.log(data); + $("#paper_title").html(data.data.NAME); + $("#time").html(data.data.CREATE_DATE); + if(data.data.QUESTIONS.length>0){ + for(var i=0;i

【Answer】 '+data.data.QUESTIONS[i].ANSWER+'

【Analysis】'+data.data.QUESTIONS[i].ANALYSIS+'

Wrong Answerer No.

0/0

Wrong rate

100%
Wrong sutdent No.:0/0
difficulty
'; + } + console.log(_html); + $(".analysis ul").html(_html); + for(var j=0;j'+(j+1)+'、'+data.data.QUESTIONS[j].CONTENT); + var arry_option=data.data.QUESTIONS[j].OPTION_CONTENT; + var answerinfo=data.data.QUESTIONS[j].ANSWERINFO; + + for(var x=0;x'+arry_option[x]+''; + } + for(k=0;k抽'); + } + } + }, + error: function (XMLHttpRequest, textStatus, errorThrown) { + // 错误信息 + alert("状态码:"+XMLHttpRequest.status+"状态:"+XMLHttpRequest.readyState+"错误信息:"+textStatus+""); + window.top.loading.remove(); + } + }) + }) + function star(index,num){ //难度星级 + $(".star").eq(index).append('
    '); + var li_html=""; + for(var i=1;i<=num;i++){ + li_html +='
  • '; + } + for(var j=num;j<5;j++){ + li_html += '
  • '; + } + + $(".star").eq(index).find("ul").html(li_html); + } + $(document).on("click",".round_n_orange",function(){ //显示错误学生名单 + var question_id = $(this).closest("li").attr("data-id"); + var student_html=""; + $.ajax({ + url:url+"/SunvoteEducation/api/v1/qstudentinfo", + async:false, + type:"post", + data:{question_id:question_id,test_id:testpaperId}, + success:function(data){ + console.log(data); + for(var i=0;i'+data.data[i].NAME+''+data.data[i].ANSWER+''+data.data[i].PRESS_TIME+'秒'; + } + $(".student_list").html(student_html); + }, + error: function (XMLHttpRequest, textStatus, errorThrown) { + // 错误信息 + alert("状态码:"+XMLHttpRequest.status+"状态:"+XMLHttpRequest.readyState+"错误信息:"+textStatus+""); + window.top.loading.remove(); + } + }); + $('#myModal').modal('show'); + }) \ No newline at end of file diff --git a/src/com/fh/controller/sunvote/teacher/TeacherController.java b/src/com/fh/controller/sunvote/teacher/TeacherController.java index cefae40..7233d65 100644 --- a/src/com/fh/controller/sunvote/teacher/TeacherController.java +++ b/src/com/fh/controller/sunvote/teacher/TeacherController.java @@ -401,7 +401,12 @@ public class TeacherController extends BaseController { PageData pd = new PageData(); pd = this.getPageData(); pd.put("userId", userId); - mv.setViewName("sunvote/teacher/paper_view1"); + if(isChineseLanguageClient()){ + mv.setViewName("sunvote/teacher/paper_view1"); + }else{ + mv.setViewName("sunvote/teacher/en_paper_view1"); + } + mv.addObject("pd", pd); return mv; } -- libgit2 0.21.4