<!DOCTYPE html>
<div style="width: 100%;">
    <div v-if="showList">
        <!-- 练习记录列表 -->
        <div class="practice-record__item">
            <div class="practice-record__box" v-if="allData.length>0" v-for="(item,i) in allData" :key="i">
                <div class="practice-record__left">
                    <div class="practice-record__title">
                        <span>[{{item.type_name}}]</span>{{item.title}}({{item.adddate_mm}})
                    </div>
                    <div class="practice-record__text">
                        <span>练习时间：{{item.adddate}}</span>
                        <span>用时：{{Math.floor(item.exam_time/60)>=10?Math.floor(item.exam_time/60):'0'+Math.floor(item.exam_time/60)}}分{{item.exam_time%60>=10?item.exam_time%60:'0'+item.exam_time%60}}秒</span>
                        <span>总{{item.do_num}}题/对{{item.do_num-item.error_num}}题</span>
                        <span>正确率：{{item.zhunquelv}}%</span>
                    </div>
                </div>
                <div class="practice-record__right">
                    <span v-if="item.show_analysis" class="practice-record__answer" @click="openAnswer(item.get_viewurl,item.id,item.title,item.tk_num,item.exam_time,item.do_num)">查看解析</span>
                    <!-- <p v-if="item.is_repractice==0" class="disabled" @click="openExam()">重新做题</p> -->
                    <el-button size="medium" round @click="openExam(item.get_viewurl,item.type,item.isrand,item.sectionid,item.knowledgeid)">重新做题</el-button>
                    <!-- <p v-else-if="item.is_repractice==2">继续做题</p> -->
                    <el-button size="medium" round type="primary" plain @click="deletePaperTest(item.id)">删除</el-button>
                </div>
            </div>

        </div>

        <div class="practice-record__pagination">
            <el-pagination style="text-align: center" :current-page="page" @current-change="getTestRecordList" background layout="prev, pager, next" :total="pageCount">
            </el-pagination>
        </div>
    </div>
    <!-- 无数据提示 -->
    <div class="practice-record__noShow" v-if="showNodata">
        <ks-empty msg="暂无练习记录" />
    </div>

</div>