|
@@ -57,7 +57,8 @@
|
|
new ImageLoader({
|
|
new ImageLoader({
|
|
server: data.fileServer,
|
|
server: data.fileServer,
|
|
flush: true,
|
|
flush: true,
|
|
- strict: false
|
|
|
|
|
|
+ strict: false,
|
|
|
|
+ split: [${properties['slice.split.config']}]
|
|
}).merge(data.urls, data.pictureConfig, function (image) {
|
|
}).merge(data.urls, data.pictureConfig, function (image) {
|
|
trialDetailModal.setContent($('#trial-detail-content'));
|
|
trialDetailModal.setContent($('#trial-detail-content'));
|
|
$(image).width($('#trial-left-div').width() * 0.95);
|
|
$(image).width($('#trial-left-div').width() * 0.95);
|
|
@@ -73,78 +74,78 @@
|
|
questionNumbers.forEach(questionNumber => {
|
|
questionNumbers.forEach(questionNumber => {
|
|
questionArr[questionNumber] = true;
|
|
questionArr[questionNumber] = true;
|
|
});
|
|
});
|
|
- let paperqQuestions=[];
|
|
|
|
- $.ajax({
|
|
|
|
- type: "GET",
|
|
|
|
- url: paperUrl,
|
|
|
|
- dataType: "json",
|
|
|
|
- success: function (data) {
|
|
|
|
- paperqQuestions = data.subjectives;
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
|
|
+ let paperqQuestions = [];
|
|
$.ajax({
|
|
$.ajax({
|
|
- type: "GET",
|
|
|
|
- url: answerUrl,
|
|
|
|
- dataType: "json",
|
|
|
|
- success: function (data) {
|
|
|
|
- let questions = JSON.parse(data) || [];
|
|
|
|
- //var data = '[{"mainNumber": 6,"subNumber": 19,"body": {"sections": [{ "blocks":[{"type": "text","value": "我是题目我是题目我是题目"}]}]},"answer": {"sections": [{"blocks":[{"type": "image","value": "https://ecs-test-static.qmth.com.cn/oe-answer-file/3/8/20/3_8_20_15748452889591137.jpeg"}]},{"blocks":[{"type": "audio","value": "https://ecs-test-static.qmth.com.cn/oe-answer-file/3/8/19/3_8_19_15748452552644264.mp3"}]}]},"studentAnswer": {"sections": [{"blocks":[{"type": "image","value": "https://ecs-test-static.qmth.com.cn/oe-answer-file/3/8/20/3_8_20_15748452889591137.jpeg"},{"type": "image","value": "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1582709869784&di=39683b1330bd09bebd93c95fe925ca70&imgtype=0&src=http%3A%2F%2Fn.sinaimg.cn%2Fsinacn10108%2F170%2Fw600h370%2F20190222%2Fd6de-htknpmh2595255.jpg"},{"type": "text","value": "我是答案答案daan"}]}]}}]';
|
|
|
|
- //let questions = JSON.parse(data);
|
|
|
|
- for (var j in questions) {
|
|
|
|
- var question = questions[j];
|
|
|
|
- var paperQuestion = paperqQuestions[j];
|
|
|
|
- // 按题号过滤
|
|
|
|
- if (questionArr[question.mainNumber + "." + question.subNumber] === true) {
|
|
|
|
- let numberTitle = {
|
|
|
|
- "blocks": [{
|
|
|
|
- "type": "text",
|
|
|
|
- "param": {"bold": true},
|
|
|
|
- "value": "题号:" + question.mainNumber + "-" + question.subNumber
|
|
|
|
- }]
|
|
|
|
- };
|
|
|
|
- let bodyTitle = {
|
|
|
|
- "blocks": [{
|
|
|
|
- "type": "text",
|
|
|
|
- "param": {"bold": true},
|
|
|
|
- "value": "题干:"
|
|
|
|
- }]
|
|
|
|
- };
|
|
|
|
- let answerTitle = {
|
|
|
|
- "blocks": [{
|
|
|
|
- "type": "text",
|
|
|
|
- "param": {"bold": true},
|
|
|
|
- "value": "考生答案:"
|
|
|
|
- }, {
|
|
|
|
- "type": "text",
|
|
|
|
- "param": {
|
|
|
|
- "italic": true,
|
|
|
|
- "danger": true
|
|
|
|
- },
|
|
|
|
- "value": "(字数统计:" + textCount(question.studentAnswer) + ")"
|
|
|
|
- }]
|
|
|
|
- };
|
|
|
|
- let standardTitle = {
|
|
|
|
- "blocks": [{
|
|
|
|
- "type": "text",
|
|
|
|
- "param": {"bold": true},
|
|
|
|
- "value": "标准答案:"
|
|
|
|
- }]
|
|
|
|
- };
|
|
|
|
- this.holder = $('#trial-left-div');
|
|
|
|
- $(renderSection(numberTitle)).appendTo(this.holder);
|
|
|
|
- $(renderSection(bodyTitle)).appendTo(this.holder);
|
|
|
|
- if (paperQuestion.parentBody != null && paperQuestion.parentBody != undefined) {
|
|
|
|
- $(renderRichText(paperQuestion.parentBody)).appendTo(this.holder);
|
|
|
|
|
|
+ type: "GET",
|
|
|
|
+ url: paperUrl,
|
|
|
|
+ dataType: "json",
|
|
|
|
+ success: function (data) {
|
|
|
|
+ paperqQuestions = data.subjectives;
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ $.ajax({
|
|
|
|
+ type: "GET",
|
|
|
|
+ url: answerUrl,
|
|
|
|
+ dataType: "json",
|
|
|
|
+ success: function (data) {
|
|
|
|
+ let questions = JSON.parse(data) || [];
|
|
|
|
+ //var data = '[{"mainNumber": 6,"subNumber": 19,"body": {"sections": [{ "blocks":[{"type": "text","value": "我是题目我是题目我是题目"}]}]},"answer": {"sections": [{"blocks":[{"type": "image","value": "https://ecs-test-static.qmth.com.cn/oe-answer-file/3/8/20/3_8_20_15748452889591137.jpeg"}]},{"blocks":[{"type": "audio","value": "https://ecs-test-static.qmth.com.cn/oe-answer-file/3/8/19/3_8_19_15748452552644264.mp3"}]}]},"studentAnswer": {"sections": [{"blocks":[{"type": "image","value": "https://ecs-test-static.qmth.com.cn/oe-answer-file/3/8/20/3_8_20_15748452889591137.jpeg"},{"type": "image","value": "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1582709869784&di=39683b1330bd09bebd93c95fe925ca70&imgtype=0&src=http%3A%2F%2Fn.sinaimg.cn%2Fsinacn10108%2F170%2Fw600h370%2F20190222%2Fd6de-htknpmh2595255.jpg"},{"type": "text","value": "我是答案答案daan"}]}]}}]';
|
|
|
|
+ //let questions = JSON.parse(data);
|
|
|
|
+ for (var j in questions) {
|
|
|
|
+ var question = questions[j];
|
|
|
|
+ var paperQuestion = paperqQuestions[j];
|
|
|
|
+ // 按题号过滤
|
|
|
|
+ if (questionArr[question.mainNumber + "." + question.subNumber] === true) {
|
|
|
|
+ let numberTitle = {
|
|
|
|
+ "blocks": [{
|
|
|
|
+ "type": "text",
|
|
|
|
+ "param": {"bold": true},
|
|
|
|
+ "value": "题号:" + question.mainNumber + "-" + question.subNumber
|
|
|
|
+ }]
|
|
|
|
+ };
|
|
|
|
+ let bodyTitle = {
|
|
|
|
+ "blocks": [{
|
|
|
|
+ "type": "text",
|
|
|
|
+ "param": {"bold": true},
|
|
|
|
+ "value": "题干:"
|
|
|
|
+ }]
|
|
|
|
+ };
|
|
|
|
+ let answerTitle = {
|
|
|
|
+ "blocks": [{
|
|
|
|
+ "type": "text",
|
|
|
|
+ "param": {"bold": true},
|
|
|
|
+ "value": "考生答案:"
|
|
|
|
+ }, {
|
|
|
|
+ "type": "text",
|
|
|
|
+ "param": {
|
|
|
|
+ "italic": true,
|
|
|
|
+ "danger": true
|
|
|
|
+ },
|
|
|
|
+ "value": "(字数统计:" + textCount(question.studentAnswer) + ")"
|
|
|
|
+ }]
|
|
|
|
+ };
|
|
|
|
+ let standardTitle = {
|
|
|
|
+ "blocks": [{
|
|
|
|
+ "type": "text",
|
|
|
|
+ "param": {"bold": true},
|
|
|
|
+ "value": "标准答案:"
|
|
|
|
+ }]
|
|
|
|
+ };
|
|
|
|
+ this.holder = $('#trial-left-div');
|
|
|
|
+ $(renderSection(numberTitle)).appendTo(this.holder);
|
|
|
|
+ $(renderSection(bodyTitle)).appendTo(this.holder);
|
|
|
|
+ if (paperQuestion.parentBody != null && paperQuestion.parentBody != undefined) {
|
|
|
|
+ $(renderRichText(paperQuestion.parentBody)).appendTo(this.holder);
|
|
|
|
+ }
|
|
|
|
+ $(renderRichText(paperQuestion.body)).appendTo(this.holder);
|
|
|
|
+ $(renderSection(answerTitle)).appendTo(this.holder);
|
|
|
|
+ $(renderRichText(question.studentAnswer)).appendTo(this.holder);
|
|
|
|
+ $(renderSection(standardTitle)).appendTo(this.holder);
|
|
|
|
+ $(renderRichText(paperQuestion.answer)).appendTo(this.holder);
|
|
|
|
+ trialDetailModal.setContent($('#trial-detail-content'));
|
|
}
|
|
}
|
|
- $(renderRichText(paperQuestion.body)).appendTo(this.holder);
|
|
|
|
- $(renderSection(answerTitle)).appendTo(this.holder);
|
|
|
|
- $(renderRichText(question.studentAnswer)).appendTo(this.holder);
|
|
|
|
- $(renderSection(standardTitle)).appendTo(this.holder);
|
|
|
|
- $(renderRichText(paperQuestion.answer)).appendTo(this.holder);
|
|
|
|
- trialDetailModal.setContent($('#trial-detail-content'));
|
|
|
|
}
|
|
}
|
|
- }
|
|
|
|
- }).error(function () {
|
|
|
|
|
|
+ }).error(function () {
|
|
trialDetailModal.setTitle('加载失败')
|
|
trialDetailModal.setTitle('加载失败')
|
|
});
|
|
});
|
|
}
|
|
}
|