mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-mobile.git
synced 2025-12-08 02:16:46 +08:00
修改考试控制及scorm课件部分
This commit is contained in:
@@ -21,8 +21,11 @@
|
||||
<view v-if="tipText!=''" style="text-align: center;color:red">
|
||||
<text>{{tipText}}</text>
|
||||
</view>
|
||||
<view v-else>
|
||||
<u-button type="primary" :disabled="startButton" v-if="testStatus == 1" @click="startTest()">{{btnText}}</u-button>
|
||||
<view v-else style="text-align: center;">
|
||||
<view v-if="testPaper.enabled">
|
||||
<u-button type="primary" :disabled="startButton" v-if="testStatus == 1" @click="startTest()">{{btnText}}</u-button>
|
||||
</view>
|
||||
<view v-else style="color: #666666;">此考试已下架</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="examStatus==2" style="text-align: center;color:#6d6d6d; ">考试已结束</view>
|
||||
@@ -62,7 +65,12 @@
|
||||
</view>
|
||||
<!--试题内容-->
|
||||
<view class="qitem">
|
||||
<view class="qitem-info">[{{getQuestionType(curItem.type)}}]{{curItem.title}}</view>
|
||||
<view class="qitem-info">
|
||||
<view>[{{getQuestionType(curItem.type)}}]{{curItem.title}}</view>
|
||||
<view v-if="curItem.images" class="qimg">
|
||||
<img class="qimg-fit" :src="imageBaseUrl+curItem.images"/>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="curItem.type == 3">
|
||||
<view class="qitem-opts">
|
||||
<view class="qitem-opt" :class="{check:curItem.userAnswer == 'true'}"
|
||||
@@ -84,12 +92,18 @@
|
||||
{{toLetter(optIdx+1)}}.{{opt.content}}
|
||||
<u-icon v-if="opt.id==curItem.userAnswer" name="checkbox-mark" color="#00aa00"></u-icon>
|
||||
</view>
|
||||
<view v-if="opt.images" class="qimg">
|
||||
<img class="qimg-fit" :src="imageBaseUrl+opt.images"/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="qitem-opts" v-if="curItem.type == 2">
|
||||
<view class="qitem-opt" :class="{check:(curItem.userAnswer && curItem.userAnswer.indexOf(opt.id) > -1)}" @click="chooseOption(opt)">
|
||||
{{toLetter(optIdx+1)}}.{{opt.content}}
|
||||
<u-icon v-if="curItem.userAnswer && curItem.userAnswer.indexOf(opt.id) > -1" name="checkbox-mark" color="#00aa00"></u-icon>
|
||||
</view>
|
||||
<view v-if="opt.images" class="qimg">
|
||||
<img class="qimg-fit" :src="imageBaseUrl+opt.images"/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -123,6 +137,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import config from '@/config/index.js'
|
||||
import apiTestPaper from '@/api/modules/testPaper.js'
|
||||
import { correctJudgment, numberToLetter, examType,toScoreTow } from '@/utils/tools.js';
|
||||
import { formatDate, formatSeconds } from '@/utils/index.js';
|
||||
@@ -132,6 +147,7 @@
|
||||
return {
|
||||
toScoreTow,
|
||||
startButton: false,
|
||||
imageBaseUrl:config.fileUrl,
|
||||
examId: '', //考试的id
|
||||
taskId: '', //考试任务的id
|
||||
lastId: '', //最后一次提交的答卷
|
||||
@@ -817,4 +833,11 @@
|
||||
// display: flex;
|
||||
// justify-content: space-around;
|
||||
}
|
||||
.qimg{
|
||||
width:100%;
|
||||
.qimg-fit{
|
||||
width:100%;
|
||||
object-fit:scale-down
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user