c617106f
孙向锦
添加即时测功能
|
1
2
3
4
5
6
7
8
9
10
11
|
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>中天电子-教育管理系统</title>
<!-- Bootstrap -->
<link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
<link href="../static/css/teach.css" rel="stylesheet">
|
757dfed6
孙向锦
样例报表
|
12
|
<link href="../static/css/set_quetion.css?t=11" rel="stylesheet">
|
c617106f
孙向锦
添加即时测功能
|
13
14
15
16
17
18
19
20
21
22
23
24
25
|
<!-- HTML5 shim 和 Respond.js 是为了让 IE8 支持 HTML5 元素和媒体查询(media queries)功能 -->
<!-- 警告:通过 file:// 协议(就是直接将 html 页面拖拽到浏览器中)访问页面时 Respond.js 不起作用 -->
<!--[if lt IE 9]>
<script src="https://cdn.bootcss.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<style>
table{display:inline-block;vertical-align: middle;}
.resolve_box img{vertical-align:top;}
</style>
</head>
<body>
|
757dfed6
孙向锦
样例报表
|
26
27
|
<div class="col-md-12">
<!--<div class="choose_class">
|
c617106f
孙向锦
添加即时测功能
|
28
29
30
|
<div class="col-md-2">
<p>选择班级</p>
</div>
|
757dfed6
孙向锦
样例报表
|
31
|
<div class="col-md-10 classList">
|
c617106f
孙向锦
添加即时测功能
|
32
33
34
35
36
|
<ul>
<li>一年级1502班</li>
</ul>
</div>
<div class="clearfix"></div>
|
757dfed6
孙向锦
样例报表
|
37
|
</div>-->
|
c617106f
孙向锦
添加即时测功能
|
38
39
40
|
<div class="col-md-3 left_menu">
<div class="tab">
<ul>
|
757dfed6
孙向锦
样例报表
|
41
42
|
<li data-index=0><p>同步教材</p></li>
<li class="active" data-index=1><p>知识点</p></li>
|
c617106f
孙向锦
添加即时测功能
|
43
44
45
46
|
<div class="clearfix"></div>
</ul>
</div>
<div class="choose_book">
|
757dfed6
孙向锦
样例报表
|
47
|
<div class="book"><p><span id="book_name">西师大版/一年级上</span></p><img src="../static/images/down_arrow.png" /><div class="clearfix"></div></div>
|
c617106f
孙向锦
添加即时测功能
|
48
49
|
<div class="book_box">
<ul>
|
757dfed6
孙向锦
样例报表
|
50
|
|
c617106f
孙向锦
添加即时测功能
|
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
|
</ul>
</div>
<!-- <div class="gary"></div> -->
</div>
<div class="section">
<ul>
<!-- <li>
<img src="../static/images/add.png" /><span>1 准备课</span>
<ul>
<li>
<span>●</span>
<span>1.1 数一数</span>
</li>
<li>
<span>●</span>
<span>1.1 数一数</span>
</li>
</ul>
</li>
<li><img src="../static/images/reduce.png" />期中</li> -->
</ul>
</div>
</div>
<div class="col-md-9 right_content">
<!-- <div class="screen">
<div class="tag">
<dl>
<dt>题目难度:</dt>
<dd>基础题</dd>
<dd>中档题</dd>
<dd>难题</dd>
</dl>
</div>
<div class="tag">
<dl>
<dt>题目来源:</dt>
<dd>云题库</dd>
<dd>个人题库</dd>
</dl>
</div>
</div> -->
<div class="question_box">
<ul>
<!-- <li>
<div class="content">
<span>1、</span>
<img src="http://image.yuncelian.com/1/2018/1/2a5074aa7d5f0dc7df586005922cb60d.png" style="vertical-align:middle;FLOAT:right" />如图,▱ABCD的对角线AC、BD交于点O,AE平分∠BAD交BC于点E,且∠ADC=60°,AB=<span class="YclQues" mathtag="math" style="whiteSpace:nowrap;wordSpacing:normal;wordWrap:normal"><table cellpadding="-1" cellspacing="-1" style="margin-right:1px"><tr><td style="border-bottom:1px solid black">1</td></tr><tr><td>2</td></tr></table></span>BC,连接OE.下列结论:①∠CAD=30°;②S<SUB>▱ABCD</SUB>=AB•AC;③OB=AB;④OE=<span class="YclQues" mathtag="math" style="whiteSpace:nowrap;wordSpacing:normal;wordWrap:normal"><table cellpadding="-1" cellspacing="-1" style="margin-right:1px"><tr><td style="border-bottom:1px solid black">1</td></tr><tr><td>4</td></tr></table></span>BC,成立的个数有( )
</div>
<div class="option">
<ul>
<li><span>A.</span>1个</li>
<li><span>B.</span>2个</li>
<li><span>C.</span>3个</li>
<li><span>D.</span>4个</li>
<div class="clearfix"></div>
</ul>
</div>
<div class="resolve">
<div class="resolve_box">
<p><span>【答案】</span> A</p>
<p><span>【解析】</span><img src="http://image.yuncelian.com/1/analysis/00ca500f-224f-584e-b92f-d7863238e2a8.png"></p>
<p>【考点】 10以内数的认识</p>
</div>
<div class="clearfix"></div>
</div>
<div class="star_box">
<div class="col-md-6">
<div class="star">
<span style="float:left;">难度</span>
<ul data-num="4">
<li class="on"></li>
<li class="on"></li>
<li class="off"></li>
<li class="off"></li>
<li class="off"></li>
</ul>
</div>
<div class="resolve_click">
<a onclick="slide($(this))">查看解析</a>
<div class="check_box"></div>
</div>
</div>
<div class="clearfix"></div>
</div>
</li> -->
</ul>
</div>
</div>
</div>
<div class="basket">
<div class="basket_box">
<p class="col-md-4">已选:<span id="all_que_num">0</span>题</p>
<p class="col-md-8"><input type="button" value="清空" class="btn btn-danger clear_que"/><button type="button" class="btn btn-primary btn-lg topic" >
完成选题
</button></p>
</div>
</div>
<div class="modal fade" id="myModal" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title">完成选题</h4>
</div>
<div class="modal-body">
<form class="form-horizontal">
<div class="form-group">
<label for="inputEmail3" class="col-sm-2 control-label">试卷标题</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="title" placeholder="例:初二数学">
</div>
</div>
<div class="form-group">
<label for="inputPassword3" class="col-sm-2 control-label">考试时长</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="time" placeholder="例:120分钟">
</div>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
<button type="button" class="btn btn-primary" id="submit">确定</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<script src="https://cdn.bootcss.com/jquery/1.12.4/jquery.min.js"></script>
<script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<script>
//http://192.168.0.113:8080/SunvoteEducation/api/v1/point 所有知识点
var url="http://127.0.0.1:8080";
var temp_tag;
var temp_data;
|
757dfed6
孙向锦
样例报表
|
191
192
193
194
|
var TEXTBOOK_ID="";
var question_box=[];
var question_num=0;
|
c617106f
孙向锦
添加即时测功能
|
195
196
|
$(document).ready(function(){
|
757dfed6
孙向锦
样例报表
|
197
198
199
200
|
//getClassName();
getPoint();
|
c617106f
孙向锦
添加即时测功能
|
201
|
});
|
757dfed6
孙向锦
样例报表
|
202
203
204
205
206
207
208
209
210
211
212
213
|
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 subject_id=getQueryString("subject_id");
var class_id=getQueryString("class_id");
//alert(subject_id+";"+class_id);
|
c617106f
孙向锦
添加即时测功能
|
214
215
216
217
218
|
function getPoint(){ //获取知识点
$.ajax({
url:url+"/SunvoteEducation/api/v1/point",
async:false,
type:"post",
|
757dfed6
孙向锦
样例报表
|
219
|
data:{depth:"",subject_id:subject_id,p_id:"",knowledge_from:101},
|
c617106f
孙向锦
添加即时测功能
|
220
221
222
223
|
success:function(data){
console.log(data);
var point_html="";
for(var i=0;i<data.data.length;i++){
|
757dfed6
孙向锦
样例报表
|
224
|
point_html +='<li data-id="'+data.data[i].KNOWLEDGE_ID+'" data-img-click=0 data-span-click=0><img src="../static/images/add.png" class="add" /><span>'+(i+1)+data.data[i].NAME+'</span></li>';
|
c617106f
孙向锦
添加即时测功能
|
225
226
|
}
$(".section").children("ul").html(point_html);
|
757dfed6
孙向锦
样例报表
|
227
|
getQuestion($(".section li").eq(0));
|
c617106f
孙向锦
添加即时测功能
|
228
229
230
|
}
})
}
|
757dfed6
孙向锦
样例报表
|
231
|
function getChapter(TEXTBOOK_ID){ //获取章节
|
c617106f
孙向锦
添加即时测功能
|
232
233
234
235
236
|
$(".section").children("ul").html("");
$.ajax({
url:url+"/SunvoteEducation/api/v1/chapter",
async:false,
type:"post",
|
757dfed6
孙向锦
样例报表
|
237
|
data:{TEXTBOOK_ID:TEXTBOOK_ID},
|
c617106f
孙向锦
添加即时测功能
|
238
239
240
|
success:function(data){
console.log(data);
for(var i=0;i<data.data.length;i++){
|
757dfed6
孙向锦
样例报表
|
241
|
$(".section").children("ul").append('<li data-id="'+data.data[i].ID+'" data-img-click=0 data-span-click=0><img src="../static/images/add.png" class="add"/><span>'+data.data[i].NAME+'</span></li>');
|
c617106f
孙向锦
添加即时测功能
|
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
|
if(data.data[i].CHILDREN.length>0){
$(".section").children("ul").children("li").eq(i).append("<ul></ul>");
for(var j=0;j<data.data[i].CHILDREN.length;j++){
$(".section").children("ul").children("li").eq(i).children("ul").append('<li data-id="'+data.data[i].CHILDREN[j].ID+'" onclick="getQuestion($(this))"><span>●</span><span>'+data.data[i].CHILDREN[j].NAME+'</span></li>');
}
}
}
}
})
}
function getMenu(id,obj){ //获取知识点下级内容
var _html="";
$.ajax({
url:url+"/SunvoteEducation/api/v1/point",
async:false,
type:"post",
data:{depth:"",subject_id:20,p_id:id,knowledge_from:101},
success:function(data){
console.log(data);
obj.append('<ul></ul>');
for(var i=0;i<data.data.length;i++){
console.log(typeof(data.data[i].CHILDREN));
if(data.data[i].CHILDREN===undefined)
|
757dfed6
孙向锦
样例报表
|
266
|
_html +='<li data-id="'+data.data[i].KNOWLEDGE_ID+'" data-span-click=0 "><span>●</span><span>'+(i+1)+data.data[i].NAME+'</span></li>';
|
c617106f
孙向锦
添加即时测功能
|
267
|
else
|
757dfed6
孙向锦
样例报表
|
268
|
_html +='<li data-id="'+data.data[i].KNOWLEDGE_ID+'" data-img-click=0 data-span-click=0 ><img src="../static/images/add.png" class="add"/><span>'+(i+1)+data.data[i].NAME+'</span></li>';
|
c617106f
孙向锦
添加即时测功能
|
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
|
}
obj.children('ul').html(_html);
}
})
}
function slide(obj){ //查看解析
obj.closest(".star_box").siblings(".resolve").slideToggle(function(){
if($(".resolve").css("display") == "none")
obj.text("查看解析");
else
obj.text("收起解析");
});
}
function getQuestion(obj){ //获取题目
|
757dfed6
孙向锦
样例报表
|
284
|
|
c617106f
孙向锦
添加即时测功能
|
285
286
287
288
289
290
291
292
293
294
295
|
var knowledge_id="",chapter_id="";
if($(".tab .active").attr("data-index")==1){
knowledge_id=obj.attr("data-id");
}else{
chapter_id=obj.attr("data-id");
}
var _html="";
$.ajax({
url:url+"/SunvoteEducation/api/v1/questions",
|
757dfed6
孙向锦
样例报表
|
296
|
async:true,
|
c617106f
孙向锦
添加即时测功能
|
297
|
type:"post",
|
757dfed6
孙向锦
样例报表
|
298
|
data:{chapter_id:chapter_id,teachingmaterial_id:"",knowledge_id:knowledge_id,question_from:101,user_id:"",problem_type:"",subject_id:"",count:"5"},
|
c617106f
孙向锦
添加即时测功能
|
299
|
success:function(data){
|
757dfed6
孙向锦
样例报表
|
300
|
window.top.loading.remove();
|
c617106f
孙向锦
添加即时测功能
|
301
302
303
304
305
306
307
308
309
|
if(data.data.length>0){
for(var i=0;i<data.data.length;i++){
_html += '<li data-id="'+data.data[i].QUESTION_ID+'"><div class="content"></div><div class="option"><ul></ul></div><div class="resolve"><div class="resolve_box"><p><span>【答案】</span> '+data.data[i].ANSWER+'</p><p><span>【解析】</span>'+data.data[i].ANALYSIS+'</p></div></div><div class="star_box"><div class="col-md-6"><div class="star"><span style="float:left;">难度</span></div><div class="resolve_click"><a onclick="slide($(this))">查看解析</a><div class="check_box"></div></div></div><div class="clearfix"></div></div></li>';
}
$(".question_box ul").html(_html);
for(var j=0;j<data.data.length;j++){
var option_html="";
$(".question_box li .content").eq(j).append('<span>'+(j+1)+'、</span>'+data.data[j].CONTENT);
var arry_option=data.data[j].OPTION_CONTENT;
|
757dfed6
孙向锦
样例报表
|
310
311
312
313
314
315
|
if(question_box.indexOf(data.data[j].QUESTION_ID)>=0){
$(".check_box").eq(j).addClass("checked");
}
//arry_option=arry_option.replace("[","");
//arry_option=arry_option.replace("]","");
//arry_option=arry_option.split(",");
|
c617106f
孙向锦
添加即时测功能
|
316
317
318
319
320
321
322
323
|
for(var x=0;x<arry_option.length;x++){
option_html += '<li><span>'+String.fromCharCode(64 + parseInt(x+1))+'.</span>'+arry_option[x]+'</li>';
}
$(".option").eq(j).find("ul").html(option_html);
star(j,parseInt(data.data[j].DIFFICULTY));
}
|
757dfed6
孙向锦
样例报表
|
324
325
|
}else{
$(".question_box ul").html("");
|
c617106f
孙向锦
添加即时测功能
|
326
|
}
|
757dfed6
孙向锦
样例报表
|
327
|
|
c617106f
孙向锦
添加即时测功能
|
328
329
330
331
|
}
})
}
function getTeachingMaterial(){ //获取教材版本
|
757dfed6
孙向锦
样例报表
|
332
|
|
c617106f
孙向锦
添加即时测功能
|
333
334
|
$.ajax({
url:url+"/SunvoteEducation/api/v1/teachingmaterial",
|
757dfed6
孙向锦
样例报表
|
335
|
async:true,
|
c617106f
孙向锦
添加即时测功能
|
336
|
type:"post",
|
757dfed6
孙向锦
样例报表
|
337
|
data:{subject_id:subject_id},
|
c617106f
孙向锦
添加即时测功能
|
338
339
340
341
|
success:function(data){
console.log(data);
if(data.data.length>0){
var teach_html="";
|
757dfed6
孙向锦
样例报表
|
342
343
|
|
c617106f
孙向锦
添加即时测功能
|
344
|
for(var i=0;i<data.data.length;i++){
|
757dfed6
孙向锦
样例报表
|
345
|
teach_html += '<li data-id="'+data.data[i].ID+'" class="li_name"><p class="name">'+data.data[i].NAME+'</p><img src="../static/images/arrow_right.png" /><div class="clearfix"></div></li>';
|
c617106f
孙向锦
添加即时测功能
|
346
347
|
}
$(".book_box ul").html(teach_html);
|
757dfed6
孙向锦
样例报表
|
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
|
var li_length=$(".book_box ul li").length;
for(var k=0;k<li_length;k++){
var books=[];
var book_html="";
var book_id=$(".book_box ul").children("li").eq(k).attr("data-id");
if(textBook(book_id).length>0){
books=textBook($(".book_box ul li").eq(k).attr("data-id"));
$(".book_box ul li").eq(k).append('<div class="float_box"><ul><div class="clearfix"></div></ul></div>');
for(var j=0;j<books.length;j++){
console.log("j:"+j);
book_html += '<li data-id='+books[j].id+'>'+books[j].name+'</li>';
}
$(".float_box").eq(k).children("ul").find(".clearfix").before(book_html);
TEXTBOOK_ID=books[0].id;
}
}
getChapter(TEXTBOOK_ID);
$("#book_name").text($(".name").eq(0).text()+"/"+$(".float_box").eq(0).find('li').eq(0).text());
|
c617106f
孙向锦
添加即时测功能
|
370
371
372
373
|
}
}
})
|
757dfed6
孙向锦
样例报表
|
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
|
}
function textBook(id){
var textBookName=[];
$.ajax({
url:url+"/SunvoteEducation/api/v1/textbook",
async:false,
type:"post",
data:{teaching_material_id:id,subject_id:subject_id,grade_id:""},
success:function(data){
//alert(data.data);
if(data.data.length>0){
for(var i=0;i<data.data.length;i++){
textBookName[i]={"name":data.data[i].NAME,"id":data.data[i].ID};
}
}
}
})
return textBookName;
}
function getClassName(){
//var className="";
$.ajax({
url:url+"/SunvoteEducation/api/v1/classname",
async:false,
type:"post",
data:{id:class_id},
success:function(data){
//alert(data.data);
$(".classList li").html(data.data);
}
})
|
c617106f
孙向锦
添加即时测功能
|
406
407
408
409
410
411
412
413
414
415
416
417
418
419
|
}
function star(index,num){ //难度星级
$(".star").eq(index).append('<ul></ul>');
var li_html="";
for(var i=1;i<=num;i++){
li_html +='<li class="on"></li>';
}
for(var j=num;j<5;j++){
li_html += '<li class="off"></li>';
}
$(".star").eq(index).find("ul").html(li_html);
}
|
757dfed6
孙向锦
样例报表
|
420
|
$(".section").on("click",".add",function(event){ //展开菜单
|
c617106f
孙向锦
添加即时测功能
|
421
|
event.stopPropagation();
|
757dfed6
孙向锦
样例报表
|
422
423
424
|
var that=$(this).closest("li");
//alert(that.attr("data-img-click"));
|
c617106f
孙向锦
添加即时测功能
|
425
426
427
|
//console.log(that.attr("data-click"));
if($(".tab .active").attr("data-index")==1){
|
757dfed6
孙向锦
样例报表
|
428
|
if(that.attr("data-img-click")==0){
|
c617106f
孙向锦
添加即时测功能
|
429
|
getMenu(that.attr("data-id"),that);
|
757dfed6
孙向锦
样例报表
|
430
431
432
433
434
435
436
437
|
//getQuestion(that);
}
that.attr("data-img-click",1);
}else{
if(that.attr("data-img-click")==0){
//getQuestion(that);
}
that.attr("data-img-click",1);
|
c617106f
孙向锦
添加即时测功能
|
438
439
440
441
442
443
444
445
446
447
|
}
if(that.children('ul').length>0)
that.children('ul').slideToggle(function(){
if(that.children('ul').css("display")=="block")
that.children('img').attr("src","../static/images/reduce.png");
else
that.children('img').attr("src","../static/images/add.png");
});
});
|
757dfed6
孙向锦
样例报表
|
448
449
450
451
452
453
454
455
456
457
458
459
|
$(".section").on("click","span",function(event){ //点击菜单获取题目
window.top.loading.show();
event.stopPropagation();
var that=$(this).closest("li");
if($(".tab .active").attr("data-index")==1){
getQuestion(that);
}else{
getQuestion(that);
}
});
|
c617106f
孙向锦
添加即时测功能
|
460
461
|
$(".book_box").children("ul").on("mouseover","li",function(event){ //教材版本交互
event.stopPropagation();
|
757dfed6
孙向锦
样例报表
|
462
463
|
//$(this).siblings("li").css("background","#fff");
//$(this).css("background","#e9f0ff");
|
c617106f
孙向锦
添加即时测功能
|
464
465
466
467
468
|
//$(".float_box").css("display","none");
$(this).children(".float_box").css("display","block");
});
$(".book_box").children("ul").on("mouseleave","li",function(event){ //教材版本交互
event.stopPropagation();
|
757dfed6
孙向锦
样例报表
|
469
470
|
//$(this).css("background","#fff");
$(this).children(".float_box").css("display","none");
|
c617106f
孙向锦
添加即时测功能
|
471
472
473
474
475
|
});
$(".float_box").on("mouseleave",function(event){ //教材版本交互
event.stopPropagation();
$(this).css("display","none");
});
|
757dfed6
孙向锦
样例报表
|
476
477
478
479
480
481
482
483
484
|
$(document).on("click",".float_box li",function(event){ //教材版本交互
//alert($(this).index());
event.stopPropagation();
var id=$(this).attr("data-id");
$("#book_name").text($(this).closest(".li_name").children(".name").text()+"/"+$(this).text());
$(".float_box").css("display","none");
$(".book_box").slideToggle();
getChapter(id);
});
|
c617106f
孙向锦
添加即时测功能
|
485
486
487
488
|
$(".book").click(function(){ //教材版本下拉框交互
$(".book_box").slideToggle();
})
$(document).on("click",".check_box",function(){ //选中题目
|
757dfed6
孙向锦
样例报表
|
489
|
|
c617106f
孙向锦
添加即时测功能
|
490
|
if($(this).hasClass("checked")){
|
757dfed6
孙向锦
样例报表
|
491
492
|
var id=$(this).closest("li").attr("data-id");
var que_index=question_box.indexOf(id);
|
c617106f
孙向锦
添加即时测功能
|
493
|
$(this).removeClass("checked");
|
757dfed6
孙向锦
样例报表
|
494
495
|
question_box.splice(que_index,1);
question_num--;
|
c617106f
孙向锦
添加即时测功能
|
496
|
}else{
|
757dfed6
孙向锦
样例报表
|
497
498
|
question_box[question_num]=$(this).closest("li").attr("data-id");
question_num++;
|
c617106f
孙向锦
添加即时测功能
|
499
500
|
$(this).addClass("checked");
}
|
757dfed6
孙向锦
样例报表
|
501
|
$("#all_que_num").html(question_num);
|
c617106f
孙向锦
添加即时测功能
|
502
503
|
});
$(".clear_que").click(function(){ //清空
|
757dfed6
孙向锦
样例报表
|
504
505
|
question_num=0;
question_box=[];
|
c617106f
孙向锦
添加即时测功能
|
506
|
$(".checked").removeClass("checked");
|
757dfed6
孙向锦
样例报表
|
507
|
$("#all_que_num").html(question_num);
|
c617106f
孙向锦
添加即时测功能
|
508
509
510
511
512
|
});
$(".tab li").click(function(){ //教材与知识点选择
$(this).siblings().removeClass("active");
$(this).addClass("active");
if($(this).index()==0){
|
757dfed6
孙向锦
样例报表
|
513
|
getTeachingMaterial();
|
c617106f
孙向锦
添加即时测功能
|
514
|
$(".choose_book").css("display","block");
|
757dfed6
孙向锦
样例报表
|
515
|
getChapter(TEXTBOOK_ID);
|
c617106f
孙向锦
添加即时测功能
|
516
517
518
519
520
521
522
523
524
525
526
527
528
|
}else{
$(".choose_book").css("display","none");
getPoint();
}
});
$(".topic").click(function(){
if(parseInt($("#all_que_num").text())>0)
$('#myModal').modal('show');
else
alert("请先选择题目")
});
$("#submit").click(function(){
var question_arry=[];
|
757dfed6
孙向锦
样例报表
|
529
|
for(var i=0;i<question_num;i++){
|
c617106f
孙向锦
添加即时测功能
|
530
531
532
|
question_arry[i]={
score: "0",
part_score: "0",
|
757dfed6
孙向锦
样例报表
|
533
|
question_id: question_box[i],
|
c617106f
孙向锦
添加即时测功能
|
534
535
536
537
538
539
540
541
542
543
544
|
rank: i.toString(),
no_name: i.toString()
};
}
var data={
title: $("#title").val(),
exam_time: $("#time").val(),
paper_type: "101",
subject_id: "20",
grade_id: "",
|
757dfed6
孙向锦
样例报表
|
545
|
class_id: class_id,
|
c617106f
孙向锦
添加即时测功能
|
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
|
user_id: "8dbef15bb6d043ec94b719ede583b033",
score: "100",
questions: question_arry
};
//console.log(data);
$.ajax({
url:url+"/SunvoteEducation/api/v1/publishpaper",
async:false,
type:"post",
dataType: "json",
headers: {'Content-Type': 'application/json'},
data:JSON.stringify(data),
success:function(data){
alert("上传成功");
$('#myModal').modal('hide');
|
757dfed6
孙向锦
样例报表
|
561
|
window.history.go(-1);
|
c617106f
孙向锦
添加即时测功能
|
562
563
564
565
566
567
|
}
})
})
</script>
</html>
|