|
@@ -27,7 +27,7 @@
|
|
|
<scroll-view class="rightBox" scroll-y="true" :scroll-top="scrollTop" @scroll="scroll">
|
|
<scroll-view class="rightBox" scroll-y="true" :scroll-top="scrollTop" @scroll="scroll">
|
|
|
<view class="">
|
|
<view class="">
|
|
|
<!-- 学习知识点 -->
|
|
<!-- 学习知识点 -->
|
|
|
- <view class="right-content df fdc" v-show="checkedIndex1==0">
|
|
|
|
|
|
|
+ <!-- <view class="right-content df fdc" v-show="checkedIndex1==0">
|
|
|
<view v-for="(content,n) in myData_SJKC_ZSD[checkedIndex2].content" :key="n">
|
|
<view v-for="(content,n) in myData_SJKC_ZSD[checkedIndex2].content" :key="n">
|
|
|
<view class="right-title df aic" v-show="content.type=='title'">
|
|
<view class="right-title df aic" v-show="content.type=='title'">
|
|
|
<view class="right-title-line"></view>
|
|
<view class="right-title-line"></view>
|
|
@@ -42,9 +42,9 @@
|
|
|
<view class="df jcc">
|
|
<view class="df jcc">
|
|
|
<view class="right-btn-next df aic jcc" @click="onClick_next">下一步</view>
|
|
<view class="right-btn-next df aic jcc" @click="onClick_next">下一步</view>
|
|
|
</view>
|
|
</view>
|
|
|
- </view>
|
|
|
|
|
|
|
+ </view> -->
|
|
|
<!-- 测验 -->
|
|
<!-- 测验 -->
|
|
|
- <view class="ylrz-cy df" v-show="checkedIndex1==1">
|
|
|
|
|
|
|
+ <view class="ylrz-cy df" v-show="checkedIndex1==0">
|
|
|
<!-- 开始测验 -->
|
|
<!-- 开始测验 -->
|
|
|
<view class="ylrz-cy df jcc aic" v-show="testIndex==0">
|
|
<view class="ylrz-cy df jcc aic" v-show="testIndex==0">
|
|
|
<view class="df fdc ylrz-kscy-box">
|
|
<view class="df fdc ylrz-kscy-box">
|
|
@@ -97,7 +97,7 @@
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
<!-- 结论 -->
|
|
<!-- 结论 -->
|
|
|
- <view class="ylrz-cy-jl df" v-show="checkedIndex1==2">
|
|
|
|
|
|
|
+ <view class="ylrz-cy-jl df" v-show="checkedIndex1==1">
|
|
|
<view class="ylrz-cy-dt df fdc" v-show="testIndex==1">
|
|
<view class="ylrz-cy-dt df fdc" v-show="testIndex==1">
|
|
|
<view class="right-title df aic">
|
|
<view class="right-title df aic">
|
|
|
<view class="right-title-line"></view>
|
|
<view class="right-title-line"></view>
|
|
@@ -109,7 +109,7 @@
|
|
|
{{(wrong+1)+'、'+test_YLRZ.list[wrong].q}}
|
|
{{(wrong+1)+'、'+test_YLRZ.list[wrong].q}}
|
|
|
</view>
|
|
</view>
|
|
|
<!-- 答案 -->
|
|
<!-- 答案 -->
|
|
|
- <view class="ylrz-test-a-box">
|
|
|
|
|
|
|
+ <!-- <view class="ylrz-test-a-box">
|
|
|
<view class="ylrz-test-a-box2">
|
|
<view class="ylrz-test-a-box2">
|
|
|
<view class="df aic fdr ylrz-test-a" v-for="(answer2,answerI2) in test_YLRZ.list[wrong].a_list" :key="answerI2">
|
|
<view class="df aic fdr ylrz-test-a" v-for="(answer2,answerI2) in test_YLRZ.list[wrong].a_list" :key="answerI2">
|
|
|
<img class="ylrz-test-a-img" :src="test_YLRZ.list[wrong].a[answerI2]==1?test_answer_icon_checked:allCheckedAnswer[wrong][answerI2]==1?test_answer_icon_wrong:test_answer_icon_unchecked"></img>
|
|
<img class="ylrz-test-a-img" :src="test_YLRZ.list[wrong].a[answerI2]==1?test_answer_icon_checked:allCheckedAnswer[wrong][answerI2]==1?test_answer_icon_wrong:test_answer_icon_unchecked"></img>
|
|
@@ -118,7 +118,19 @@
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
+ </view> -->
|
|
|
|
|
+ <view class="ylrz-test-a-box">
|
|
|
|
|
+ <view class="ylrz-test-a-box2">
|
|
|
|
|
+ <view class="df aic fdr ylrz-test-a" v-for="(answer2,answerI2) in test_YLRZ.list[wrong].a_list" :key="answerI2">
|
|
|
|
|
+ <!-- <img class="ylrz-test-a-img" :src="test_YLRZ.list[wrong].a[answerI2]==1?test_answer_icon_checked:allCheckedAnswer[wrong][answerI2]==1?test_answer_icon_wrong:test_answer_icon_unchecked"></img> -->
|
|
|
|
|
+ <view class="ylrz-test-a-text">
|
|
|
|
|
+ {{test_answer_pre[answerI2]+':'+answer2}}
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
+ <view>{{allWrong_checked_letter[wrongIndex]}}</view>
|
|
|
|
|
+ <view>{{allWrong_right_letter[wrongIndex]}}</view>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="ylrz-test-btn-exit ylrz-test-btn-red df aic jcc" @click="onClick_test_exit">退出</view>
|
|
<view class="ylrz-test-btn-exit ylrz-test-btn-red df aic jcc" @click="onClick_test_exit">退出</view>
|
|
|
</view>
|
|
</view>
|
|
@@ -142,6 +154,10 @@
|
|
|
curCheckedAnswer: [],
|
|
curCheckedAnswer: [],
|
|
|
//玩家选择的答案
|
|
//玩家选择的答案
|
|
|
allCheckedAnswer: [],
|
|
allCheckedAnswer: [],
|
|
|
|
|
+ //用户错题答案的字母
|
|
|
|
|
+ allWrong_checked_letter: [],
|
|
|
|
|
+ //正确答案的字母
|
|
|
|
|
+ allWrong_right_letter: [],
|
|
|
//玩家错误的题目序列号
|
|
//玩家错误的题目序列号
|
|
|
allWrongTest: [],
|
|
allWrongTest: [],
|
|
|
scrollTop: 0,
|
|
scrollTop: 0,
|
|
@@ -149,12 +165,13 @@
|
|
|
|
|
|
|
|
// ------以下为静态
|
|
// ------以下为静态
|
|
|
arrowSrc: require('../../../../assets/learning/icon_ylrz_arrow.png'),
|
|
arrowSrc: require('../../../../assets/learning/icon_ylrz_arrow.png'),
|
|
|
- btnList: [{
|
|
|
|
|
- "text": '实景勘察',
|
|
|
|
|
- "icon_btn1_checked": require('../../../../assets/learning/icon_ylrz_menu_02.png'),
|
|
|
|
|
- "icon_btn1_unchecked": require('../../../../assets/learning/icon_ylrz_menu_01.png'),
|
|
|
|
|
- "list": ['实景学习模块']
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ btnList: [
|
|
|
|
|
+ // {
|
|
|
|
|
+ // "text": '实景勘察',
|
|
|
|
|
+ // "icon_btn1_checked": require('../../../../assets/learning/icon_ylrz_menu_02.png'),
|
|
|
|
|
+ // "icon_btn1_unchecked": require('../../../../assets/learning/icon_ylrz_menu_01.png'),
|
|
|
|
|
+ // "list": ['实景学习模块']
|
|
|
|
|
+ // },
|
|
|
{
|
|
{
|
|
|
"text": '测验(完成获得10分)',
|
|
"text": '测验(完成获得10分)',
|
|
|
"icon_btn1_checked": require('../../../../assets/learning/icon_ylrz_menu_02.png'),
|
|
"icon_btn1_checked": require('../../../../assets/learning/icon_ylrz_menu_02.png'),
|
|
@@ -178,7 +195,7 @@
|
|
|
],
|
|
],
|
|
|
text_ksdt: '你必须正确回答所有测试问题才能完成课程。测试没有次数限制,也没有惩罚,即使你已经通过测试也可以再次回答。你可以在课程页面上的测试模块中点击“结果‘按钮查看测试结果的详细报告。',
|
|
text_ksdt: '你必须正确回答所有测试问题才能完成课程。测试没有次数限制,也没有惩罚,即使你已经通过测试也可以再次回答。你可以在课程页面上的测试模块中点击“结果‘按钮查看测试结果的详细报告。',
|
|
|
//原理认知测试题
|
|
//原理认知测试题
|
|
|
- test_YLRZ: myData_test_YLRZ,
|
|
|
|
|
|
|
+ test_YLRZ: myData_test_SJKC,
|
|
|
//答案小标号
|
|
//答案小标号
|
|
|
test_answer_pre: ['A', 'B', 'C', 'D', 'E', 'F', 'G'],
|
|
test_answer_pre: ['A', 'B', 'C', 'D', 'E', 'F', 'G'],
|
|
|
test_answer_icon_checked: require('../../../../assets/learning/icon_test_03_02.png'),
|
|
test_answer_icon_checked: require('../../../../assets/learning/icon_test_03_02.png'),
|
|
@@ -289,14 +306,55 @@
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
console.log("检测结果为", this.allWrongTest);
|
|
console.log("检测结果为", this.allWrongTest);
|
|
|
- this.checkedIndex1 = 2;
|
|
|
|
|
- let score = 10-this.allWrongTest.length;
|
|
|
|
|
|
|
+ this.updateCheckedAnswerLetter();
|
|
|
|
|
+ this.checkedIndex1 = 1;
|
|
|
|
|
+ let score = 5-this.allWrongTest.length;
|
|
|
userController.setupScore_sjkc(score,function(res){
|
|
userController.setupScore_sjkc(score,function(res){
|
|
|
alert("提交成功");
|
|
alert("提交成功");
|
|
|
},function(res){
|
|
},function(res){
|
|
|
alert("提交失败");
|
|
alert("提交失败");
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
|
|
+ //更新用户选择答案字母
|
|
|
|
|
+ updateCheckedAnswerLetter() {
|
|
|
|
|
+ this.allWrong_checked_letter = [];
|
|
|
|
|
+ // console.log("更新用户选择答案字母", this.allCheckedAnswer, this.allWrongTest);
|
|
|
|
|
+ for (let i = 0; i < this.allWrongTest.length; i++) {
|
|
|
|
|
+ //把用户选择的答案放进去
|
|
|
|
|
+ let curCheckedLetter = '我的答案:【';
|
|
|
|
|
+ for (let j = 0; j < this.allCheckedAnswer[i].length; j++) {
|
|
|
|
|
+ if (this.allCheckedAnswer[i][j] == 1) {
|
|
|
|
|
+ curCheckedLetter += this.test_answer_pre[j];
|
|
|
|
|
+ curCheckedLetter += ','
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ if (curCheckedLetter[curCheckedLetter.length - 1] == ',') {
|
|
|
|
|
+ curCheckedLetter = curCheckedLetter.substring(0, curCheckedLetter.length - 1);
|
|
|
|
|
+ }
|
|
|
|
|
+ curCheckedLetter += '】';
|
|
|
|
|
+ this.allWrong_checked_letter.push(curCheckedLetter);
|
|
|
|
|
+ }
|
|
|
|
|
+ // console.log("用户选择的答案", this.allWrong_checked_letter);
|
|
|
|
|
+
|
|
|
|
|
+ this.allWrong_right_letter = [];
|
|
|
|
|
+ for (let i = 0; i < this.allWrongTest.length; i++) {
|
|
|
|
|
+ //把正确的答案放进去
|
|
|
|
|
+ let curRightLetter = '正确答案:【';
|
|
|
|
|
+ let testIndex = this.allWrongTest[i];
|
|
|
|
|
+ for (let j = 0; j < this.test_YLRZ.list[testIndex].a.length; j++) {
|
|
|
|
|
+ if (this.test_YLRZ.list[testIndex].a[j] == 1) {
|
|
|
|
|
+ curRightLetter += this.test_answer_pre[j];
|
|
|
|
|
+ curRightLetter += ','
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ if (curRightLetter[curRightLetter.length - 1] == ',') {
|
|
|
|
|
+ curRightLetter = curRightLetter.substring(0, curRightLetter.length - 1);
|
|
|
|
|
+ }
|
|
|
|
|
+ curRightLetter += '】'
|
|
|
|
|
+ this.allWrong_right_letter.push(curRightLetter);
|
|
|
|
|
+ }
|
|
|
|
|
+ // console.log("正确答案", this.allWrong_right_letter);
|
|
|
|
|
+ },
|
|
|
onClick_test_exit() {
|
|
onClick_test_exit() {
|
|
|
this.checkedIndex1 = 1;
|
|
this.checkedIndex1 = 1;
|
|
|
this.testIndex = 0;
|
|
this.testIndex = 0;
|