|
@@ -0,0 +1,131 @@
|
|
|
+<!DOCTYPE html>
|
|
|
+<html>
|
|
|
+<head>
|
|
|
+ <meta charset="utf-8">
|
|
|
+ <title>试题管理详情</title>
|
|
|
+ <meta name="renderer" content="webkit">
|
|
|
+ <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
|
|
+ <meta name="viewport"
|
|
|
+ content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
|
|
+ <link rel="stylesheet" href="../../layuiadmin/layui/css/layui.css" media="all">
|
|
|
+ <link rel="stylesheet" href="../../layuiadmin/style/admin.css" media="all">
|
|
|
+ <style type="text/css">
|
|
|
+ .title {
|
|
|
+ width: 140px;
|
|
|
+ background: #efefef;
|
|
|
+ }
|
|
|
+ </style>
|
|
|
+</head>
|
|
|
+<body>
|
|
|
+
|
|
|
+<div class="layui-fluid">
|
|
|
+ <div class="layui-card">
|
|
|
+ <div class="layui-card-body" pad15>
|
|
|
+ <div class="layui-row layui-col-space15">
|
|
|
+ <div class="layui-col-md12">
|
|
|
+
|
|
|
+ <div id="print_div">
|
|
|
+ <table class="layui-table">
|
|
|
+
|
|
|
+ <tr>
|
|
|
+ <td class="title">科目:</td>
|
|
|
+ <td id="subject_text" class="cell"></td>
|
|
|
+ <td class="title">章节:</td>
|
|
|
+ <td id="chapter_text" class="cell"></td>
|
|
|
+ </tr>
|
|
|
+
|
|
|
+ <tr>
|
|
|
+ <td class="title">题型:</td>
|
|
|
+ <td id="type_text" class="cell"></td>
|
|
|
+ <td class="title">难度:</td>
|
|
|
+ <td id="difficulty_text" class="cell"></td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td class="title">分数:</td>
|
|
|
+ <td id="scores" class="cell"></td>
|
|
|
+ <td class="title"></td>
|
|
|
+ <td class="cell"></td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td class="title">录入人:</td>
|
|
|
+ <td id="create_user_text" class="cell"></td>
|
|
|
+ <td class="title">录入时间:</td>
|
|
|
+ <td id="create_time" class="cell"></td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td class="title">题目:</td>
|
|
|
+ <td colspan="3" id="title" class="cell"></td>
|
|
|
+ </tr>
|
|
|
+
|
|
|
+ <tr id="id_analysis">
|
|
|
+ <td class="title">解析:</td>
|
|
|
+ <td colspan="3" id="analysis" class="cell"></td>
|
|
|
+ </tr>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</div>
|
|
|
+
|
|
|
+<script src="../../layuiadmin/layui/layui.js?t=1"></script>
|
|
|
+<script>
|
|
|
+ layui.config({
|
|
|
+ base: '../../../layuiadmin/' //静态资源所在路径
|
|
|
+ }).extend({
|
|
|
+ index: 'lib/index' //主入口模块
|
|
|
+ }).use(['index', 'table'], function () {
|
|
|
+ var $ = layui.$;
|
|
|
+ var editdata = JSON.parse(JSON.stringify(parent.layui.table.editdata)); // 框架有Bug所以这么转换
|
|
|
+ $('.cell').each(function (index, element) {
|
|
|
+ element.innerHTML += (editdata[element.id] || '')
|
|
|
+ });
|
|
|
+ var answer = ''
|
|
|
+ if (editdata.type < 4) {
|
|
|
+ // 单选、多选、填空
|
|
|
+ var answers = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R',
|
|
|
+ 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']
|
|
|
+ var items = editdata.items, answer_title = '', right = ''
|
|
|
+ for (var i = 0; i < items.length; i++) {
|
|
|
+ if (editdata.type === 3) {
|
|
|
+ answer_title = '空白' + (i + 1)
|
|
|
+ } else {
|
|
|
+ answer_title = answers[i]
|
|
|
+ }
|
|
|
+
|
|
|
+ if (items[i].right) {
|
|
|
+ right = '<img src="../right.png" width="15px" height="15px" style="margin-right: 3px">'
|
|
|
+ } else {
|
|
|
+ right = '<span style="margin-right: 17px"></span>'
|
|
|
+ }
|
|
|
+ if (i === 0) {
|
|
|
+ answer = "<tr>\n" +
|
|
|
+ "<td class=\"title\">选项/答案:</td>\n" +
|
|
|
+ "<td colspan=\"3\" class=\"cell\">" + right + answer_title + "、" + items[i].content + "</td>\n" +
|
|
|
+ "</tr>"
|
|
|
+ } else {
|
|
|
+ answer = "<tr>\n" +
|
|
|
+ "<td></td>\n" +
|
|
|
+ "<td colspan=\"3\" class=\"cell\">" + right + answer_title + "、" + items[i].content + "</td>\n" +
|
|
|
+ "</tr>"
|
|
|
+ }
|
|
|
+ $('#id_analysis').before(answer)
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ // 判断
|
|
|
+ if (editdata.judgment === "1") {
|
|
|
+ right = '<img src="../right.png" width="15px" height="15px" style="margin-right: 3px">正确'
|
|
|
+ } else {
|
|
|
+ right = '<img src="../wrong.png" style="margin-right: 3px">错误'
|
|
|
+ }
|
|
|
+ answer = "<tr>\n" +
|
|
|
+ "<td class=\"title\">选项/答案:</td>\n" +
|
|
|
+ "<td colspan=\"3\" class=\"cell\">" + right + "</td>\n" +
|
|
|
+ "</tr>"
|
|
|
+ $('#id_analysis').before(answer)
|
|
|
+ }
|
|
|
+ });
|
|
|
+</script>
|
|
|
+</body>
|
|
|
+</html>
|