|
@@ -1,208 +1,152 @@
|
|
<template>
|
|
<template>
|
|
<div class="ev-list-container">
|
|
<div class="ev-list-container">
|
|
-
|
|
|
|
- <div class="ev-header">
|
|
|
|
- <Icon type="md-bookmarks" size="30" color="rgb(16, 171, 231)" />
|
|
|
|
- <span class="ev-title">题库列表</span>
|
|
|
|
- <span class="ev-length">共 {{list.length}} 道题</span>
|
|
|
|
- </div>
|
|
|
|
- <!-- 筛选部分 -->
|
|
|
|
- <div class="filter-wrap">
|
|
|
|
- <div class="filter-item">
|
|
|
|
- <span class="filter-title">来源:</span>
|
|
|
|
- <RadioGroup v-model="filterOrigin" type="button" @on-change="filterOriginChange">
|
|
|
|
- <Radio label="self">个人私有库</Radio>
|
|
|
|
- <Radio label="school">学校公用库</Radio>
|
|
|
|
- <Radio label="system">系统公用库</Radio>
|
|
|
|
- </RadioGroup>
|
|
|
|
|
|
+ <div class="ev-header">
|
|
|
|
+ <Icon type="md-bookmarks" size="30" color="rgb(16, 171, 231)" />
|
|
|
|
+ <span class="ev-title">题库列表</span>
|
|
|
|
+ <span class="ev-length">共 {{list.length}} 道题</span>
|
|
</div>
|
|
</div>
|
|
- <div class="filter-item">
|
|
|
|
- <span class="filter-title">题型:</span>
|
|
|
|
- <RadioGroup v-model="filterType" type="button" @on-change="filterTypeChange">
|
|
|
|
- <Radio label="all">全部</Radio>
|
|
|
|
- <Radio label="Single">单选</Radio>
|
|
|
|
- <Radio label="Multiple">多选</Radio>
|
|
|
|
- <Radio label="Judge">判断</Radio>
|
|
|
|
- <Radio label="Complete">填空</Radio>
|
|
|
|
- <Radio label="Subjective">问答</Radio>
|
|
|
|
- </RadioGroup>
|
|
|
|
|
|
+ <!-- 筛选部分 -->
|
|
|
|
+ <div class="filter-wrap">
|
|
|
|
+ <div class="filter-item">
|
|
|
|
+ <span class="filter-title">来源:</span>
|
|
|
|
+ <RadioGroup v-model="filterOrigin" type="button" @on-change="filterOriginChange">
|
|
|
|
+ <Radio label="self">个人私有库</Radio>
|
|
|
|
+ <Radio label="school">学校公用库</Radio>
|
|
|
|
+ <Radio label="system">系统公用库</Radio>
|
|
|
|
+ </RadioGroup>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="filter-item">
|
|
|
|
+ <span class="filter-title">题型:</span>
|
|
|
|
+ <RadioGroup v-model="filterType" type="button" @on-change="filterTypeChange">
|
|
|
|
+ <Radio label="all">全部</Radio>
|
|
|
|
+ <Radio label="Single">单选</Radio>
|
|
|
|
+ <Radio label="Multiple">多选</Radio>
|
|
|
|
+ <Radio label="Judge">判断</Radio>
|
|
|
|
+ <Radio label="Complete">填空</Radio>
|
|
|
|
+ <Radio label="Subjective">问答</Radio>
|
|
|
|
+ </RadioGroup>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="filter-item">
|
|
|
|
+ <span class="filter-title">难度:</span>
|
|
|
|
+ <RadioGroup v-model="filterDiff" type="button" @on-change="filterDiffChange">
|
|
|
|
+ <Radio label="all">全部</Radio>
|
|
|
|
+ <Radio label="0">容易</Radio>
|
|
|
|
+ <Radio label="1">较易</Radio>
|
|
|
|
+ <Radio label="2">一般</Radio>
|
|
|
|
+ <Radio label="3">较难</Radio>
|
|
|
|
+ <Radio label="4">困难</Radio>
|
|
|
|
+ </RadioGroup>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="filter-item">
|
|
|
|
+ <span class="filter-title">排序:</span>
|
|
|
|
+ <RadioGroup v-model="filterSort" type="button" @on-change="filterSortChange">
|
|
|
|
+ <Radio label="0">新增时间<Icon type="md-arrow-round-down" /></Radio>
|
|
|
|
+ <Radio label="1">使用次数<Icon type="md-arrow-round-down" /></Radio>
|
|
|
|
+ </RadioGroup>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
- <div class="filter-item">
|
|
|
|
- <span class="filter-title">难度:</span>
|
|
|
|
- <RadioGroup v-model="filterDiff" type="button" @on-change="filterDiffChange">
|
|
|
|
- <Radio label="all">全部</Radio>
|
|
|
|
- <Radio label="0">容易</Radio>
|
|
|
|
- <Radio label="1">较易</Radio>
|
|
|
|
- <Radio label="2">一般</Radio>
|
|
|
|
- <Radio label="3">较难</Radio>
|
|
|
|
- <Radio label="4">困难</Radio>
|
|
|
|
- </RadioGroup>
|
|
|
|
|
|
+ <div class="ev-list-operation">
|
|
|
|
+ <Checkbox v-model="isShowAnswer">展示答案与解析</Checkbox>
|
|
|
|
+ <span class="import-exercise">
|
|
|
|
+ <Upload multiple action="api/ImportExercise/uploadWord" :headers="headers" :show-upload-list="isShowUploadList" :on-success="uploadSuccess">
|
|
|
|
+ <Button type="info">导入习题</Button>
|
|
|
|
+ </Upload>
|
|
|
|
+ </span>
|
|
</div>
|
|
</div>
|
|
- <div class="filter-item">
|
|
|
|
- <span class="filter-title">排序:</span>
|
|
|
|
- <RadioGroup v-model="filterSort" type="button" @on-change="filterSortChange">
|
|
|
|
- <Radio label="0">新增时间<Icon type="md-arrow-round-down" /></Radio>
|
|
|
|
- <Radio label="1">使用次数<Icon type="md-arrow-round-down" /></Radio>
|
|
|
|
- </RadioGroup>
|
|
|
|
|
|
+ <!-- 筛选部分结束 -->
|
|
|
|
+ <!-- 题目列表部分 -->
|
|
|
|
+ <div v-if="list.length === 0" class="no-data-text">
|
|
|
|
+ <img src="../../../assets/icon/no_data.svg" width="120" />
|
|
|
|
+ <span style="margin-top:15px;color:#808080">暂无数据</span>
|
|
</div>
|
|
</div>
|
|
- </div>
|
|
|
|
- <div class="ev-list-operation">
|
|
|
|
- <Checkbox v-model="isShowAnswer">展示答案与解析</Checkbox>
|
|
|
|
- <span class="import-exercise">
|
|
|
|
- <Upload multiple action="api/ImportExercise/uploadWord" :headers="headers" :show-upload-list="isShowUploadList" :on-success="uploadSuccess">
|
|
|
|
- <Button type="info">导入习题</Button>
|
|
|
|
- </Upload>
|
|
|
|
- </span>
|
|
|
|
- <div class="operation-cart" id="questionCart">
|
|
|
|
- <Poptip trigger="click" title="我的试题篮" placement="top">
|
|
|
|
- <Badge :count="basketCount" show-zero type="success">
|
|
|
|
- <img src="../../../assets/icon/icon_cart.png" />
|
|
|
|
- </Badge>
|
|
|
|
- <div class="basket-content" slot="content">
|
|
|
|
- <p class="basket-title">共计 {{basketCount}} 道题</p>
|
|
|
|
- <div class="basket-body">
|
|
|
|
- <div class="basket-item">
|
|
|
|
- <span>单选题</span>
|
|
|
|
- <Progress :percent="basketList.all.length ? Number((basketList.Single.length / basketList.all.length)*100) : 0" stroke-color="rgb(16, 171, 231)" hide-info />
|
|
|
|
- <span style="margin-left:10px">{{ basketList.Single.length }} 道 <span class="basket-delete" @click="handleBasketDelete('Single')">删除</span></span>
|
|
|
|
- </div>
|
|
|
|
- <div class="basket-item">
|
|
|
|
- <span>多选题</span>
|
|
|
|
- <Progress :percent="basketList.all.length ? Number((basketList.Multiple.length / basketList.all.length)*100) : 0" stroke-color="rgb(16, 171, 231)" hide-info />
|
|
|
|
- <span style="margin-left:10px">{{ basketList.Multiple.length}} 道 <span class="basket-delete" @click="handleBasketDelete('Multiple')">删除</span></span>
|
|
|
|
- </div>
|
|
|
|
- <div class="basket-item">
|
|
|
|
- <span>判断题</span>
|
|
|
|
- <Progress :percent="basketList.all.length ? Number((basketList.Judge.length / basketList.all.length)*100) : 0" stroke-color="rgb(16, 171, 231)" hide-info />
|
|
|
|
- <span style="margin-left:10px">{{ basketList.Judge.length}} 道 <span class="basket-delete" @click="handleBasketDelete('Judge')">删除</span></span>
|
|
|
|
|
|
+ <div class="content-wrap" v-else>
|
|
|
|
+ <Loading v-show="importLoading"></Loading>
|
|
|
|
+
|
|
|
|
+ <div class="exercise-item" v-for="(item,index) of list" :key="index">
|
|
|
|
+ <!-- 题目难度类型以及绑定知识点 -->
|
|
|
|
+ <div class="item-types">
|
|
|
|
+ <span class="item-difficulty" :style="{backgroundColor:diffColors[item.difficulty || 3]}">{{exersicesDiff[item.difficulty || 3]}}</span>
|
|
|
|
+ <span class="item-type">{{exersicesType[item.type]}}</span>
|
|
|
|
+ <span class="item-relevant-points">
|
|
|
|
+ <span class="item-tools-bind">
|
|
|
|
+ <span class="item-tools-tool">
|
|
|
|
+ <span class="item-bind-point">已关联知识点:</span>
|
|
|
|
+ <span class="item-bind-point" v-for="(concept,index) in item.concept" :key="index" v-show="item.concept"><Tag color="success">{{concept.name}}</Tag></span>
|
|
|
|
+ <span class="item-bind-point" v-show="!item.concept">暂未关联</span>
|
|
|
|
+ <Icon type="md-link" size="20" />
|
|
|
|
+ <span @click="handleBindPoint(item.concept || [])">绑定知识点</span>
|
|
|
|
+ </span>
|
|
|
|
+ </span>
|
|
|
|
+ </span>
|
|
|
|
+ </div>
|
|
|
|
+ <!-- 题干部分 -->
|
|
|
|
+ <div class="item-question">
|
|
|
|
+ <p>{{index+1}} : <span v-html="item.question"></span></p>
|
|
|
|
+ </div>
|
|
|
|
+ <!-- 选项部分 -->
|
|
|
|
+ <div v-for="(option,optionIndex) in item.option" :key="optionIndex">
|
|
|
|
+ <p>{{String.fromCharCode(64 + parseInt(optionIndex+1))}} : <span v-html="option.value"></span></p>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <!-- 如果是组合题 -->
|
|
|
|
+ <div v-for="(childQuestion,childIndex) in item.children" :key="childIndex">
|
|
|
|
+ <div v-if="item.children.length">
|
|
|
|
+ <div class="item-question">
|
|
|
|
+ <p>{{childIndex+1}} : <span v-html="childQuestion.question"></span></p>
|
|
</div>
|
|
</div>
|
|
- <div class="basket-item">
|
|
|
|
- <span>填空题</span>
|
|
|
|
- <Progress :percent="basketList.all.length ? Number((basketList.Complete.length / basketList.all.length)*100) : 0" stroke-color="rgb(16, 171, 231)" hide-info />
|
|
|
|
- <span style="margin-left:10px">{{ basketList.Complete.length}} 道 <span class="basket-delete" @click="handleBasketDelete('Complete')">删除</span></span>
|
|
|
|
|
|
+ <div v-for="(childOption,childOptionIndex) in childQuestion.option" :key="childOptionIndex">
|
|
|
|
+ <p>{{String.fromCharCode(64 + parseInt(childOptionIndex+1))}} : <span v-html="childOption.value"></span></p>
|
|
</div>
|
|
</div>
|
|
- <div class="basket-item">
|
|
|
|
- <span>问答题</span>
|
|
|
|
- <Progress :percent="basketList.all.length ? Number((basketList.Subjective.length / basketList.all.length)*100) : 0" stroke-color="rgb(16, 171, 231)" hide-info />
|
|
|
|
- <span style="margin-left:10px">{{ basketList.Subjective.length}} 道 <span class="basket-delete" @click="handleBasketDelete('Subjective')">删除</span></span>
|
|
|
|
|
|
+ <div class="item-answer" v-show="isShowAnswer">
|
|
|
|
+ <span style="color:#01b4ef">【答案】:</span>
|
|
|
|
+ <span v-html="childQuestion.answer[0] || childQuestion.answer" v-if="childQuestion.type === 'Subjective'"></span>
|
|
|
|
+ <span :class="[ childQuestion.type === 'Complete' ? 'item-answer-item':'']" v-for="(answer,answerIndex) in childQuestion.answer" :key="answerIndex" v-else-if="childQuestion.type === 'Complete'" v-html="answer"></span>
|
|
|
|
+ <span :class="[ childQuestion.type === 'Complete' ? 'item-answer-item':'']" v-for="(answer,answerIndex) in childQuestion.answer" :key="answerIndex" v-else>{{answer}}</span>
|
|
</div>
|
|
</div>
|
|
- <div class="basket-item">
|
|
|
|
- <span>综合题</span>
|
|
|
|
- <Progress :percent="basketList.all.length ? Number((basketList.Compose.length / basketList.all.length)*100) : 0" stroke-color="rgb(16, 171, 231)" hide-info />
|
|
|
|
- <span style="margin-left:10px">{{ basketList.Compose.length}} 道 <span class="basket-delete" @click="handleBasketDelete('Compose')">删除</span></span>
|
|
|
|
|
|
+ <div class="item-explain" v-show="isShowAnswer">
|
|
|
|
+ <span style="color:#01b4ef">【解析】:</span>
|
|
|
|
+ <span v-html="childQuestion.explain"></span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <div :class="[basketList.all.length ? 'basket-footer' : 'basket-footer-no']">
|
|
|
|
- <p @click="handleSubmitPaper">进入组卷中心</p>
|
|
|
|
- </div>
|
|
|
|
</div>
|
|
</div>
|
|
- </Poptip>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- <!-- 筛选部分结束 -->
|
|
|
|
- <!-- 题目列表部分 -->
|
|
|
|
- <div v-if="list.length === 0" class="no-data-text">
|
|
|
|
- <img src="../../../assets/icon/no_data.svg" width="120" />
|
|
|
|
- <span style="margin-top:15px;color:#808080">暂无数据</span>
|
|
|
|
- </div>
|
|
|
|
- <div class="content-wrap" v-else>
|
|
|
|
- <Loading v-show="importLoading"></Loading>
|
|
|
|
-
|
|
|
|
- <div class="exercise-item" v-for="(item,index) of list" :key="index">
|
|
|
|
- <!-- 题目难度类型以及绑定知识点 -->
|
|
|
|
- <div class="item-types">
|
|
|
|
- <span class="item-difficulty" :style="{backgroundColor:diffColors[item.difficulty || 3]}">{{exersicesDiff[item.difficulty || 3]}}</span>
|
|
|
|
- <span class="item-type">{{exersicesType[item.type]}}</span>
|
|
|
|
- <span class="item-relevant-points">
|
|
|
|
- <span class="item-tools-bind">
|
|
|
|
- <span class="item-tools-tool">
|
|
|
|
- <span class="item-bind-point">已关联知识点:</span>
|
|
|
|
- <span class="item-bind-point" v-for="(concept,index) in item.concept" :key="index" v-show="item.concept"><Tag color="success">{{concept.name}}</Tag></span>
|
|
|
|
- <span class="item-bind-point" v-show="!item.concept">暂未关联</span>
|
|
|
|
- <Icon type="md-link" size="20" />
|
|
|
|
- <span @click="handleBindPoint(item.concept || [])">绑定知识点</span>
|
|
|
|
- </span>
|
|
|
|
- </span>
|
|
|
|
- </span>
|
|
|
|
- </div>
|
|
|
|
- <!-- 题干部分 -->
|
|
|
|
- <div class="item-question">
|
|
|
|
- <p>{{index+1}} : <span v-html="item.question"></span></p>
|
|
|
|
- </div>
|
|
|
|
- <!-- 选项部分 -->
|
|
|
|
- <div v-for="(option,optionIndex) in item.option" :key="optionIndex">
|
|
|
|
- <p>{{String.fromCharCode(64 + parseInt(optionIndex+1))}} : <span v-html="option.value"></span></p>
|
|
|
|
- </div>
|
|
|
|
-
|
|
|
|
- <!-- 如果是组合题 -->
|
|
|
|
- <div v-for="(childQuestion,childIndex) in item.children" :key="childIndex">
|
|
|
|
- <div v-if="item.children.length">
|
|
|
|
- <div class="item-question">
|
|
|
|
- <p>{{childIndex+1}} : <span v-html="childQuestion.question"></span></p>
|
|
|
|
- </div>
|
|
|
|
- <div v-for="(childOption,childOptionIndex) in childQuestion.option" :key="childOptionIndex">
|
|
|
|
- <p>{{String.fromCharCode(64 + parseInt(childOptionIndex+1))}} : <span v-html="childOption.value"></span></p>
|
|
|
|
- </div>
|
|
|
|
- <div class="item-answer" v-show="isShowAnswer">
|
|
|
|
- <span style="color:#01b4ef">【答案】:</span>
|
|
|
|
- <span v-html="childQuestion.answer[0] || childQuestion.answer" v-if="childQuestion.type === 'Subjective'"></span>
|
|
|
|
- <span :class="[ childQuestion.type === 'Complete' ? 'item-answer-item':'']" v-for="(answer,answerIndex) in childQuestion.answer" :key="answerIndex" v-else-if="childQuestion.type === 'Complete'" v-html="answer"></span>
|
|
|
|
- <span :class="[ childQuestion.type === 'Complete' ? 'item-answer-item':'']" v-for="(answer,answerIndex) in childQuestion.answer" :key="answerIndex" v-else>{{answer}}</span>
|
|
|
|
- </div>
|
|
|
|
- <div class="item-explain" v-show="isShowAnswer">
|
|
|
|
- <span style="color:#01b4ef">【解析】:</span>
|
|
|
|
- <span v-html="childQuestion.explain"></span>
|
|
|
|
|
|
+ <!-- 组合题结束 -->
|
|
|
|
+ <!-- 答案展示部分 -->
|
|
|
|
+ <div class="item-answer" v-show="item.type !== 'Compose' && isShowAnswer">
|
|
|
|
+ <span class="answer-title-line"></span>
|
|
|
|
+ <span class="answer-title" @click="showAnswer($event,'answer')">答案:点击展开答案详情</span>
|
|
|
|
+ <div class="item-answer-details">
|
|
|
|
+ <span v-html="item.answer" v-if="item.type === 'Subjective'"></span>
|
|
|
|
+ <span :class="[ item.type === 'Complete' ? 'item-answer-item':'']" v-for="(answer,index) in item.answer" :key="index" v-else-if="item.type === 'Complete'" v-html="answer"></span>
|
|
|
|
+ <span :class="[ item.type === 'Complete' ? 'item-answer-item':'']" v-for="(answer,index) in item.answer" :key="index" v-else>{{answer}}</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- </div>
|
|
|
|
- <!-- 组合题结束 -->
|
|
|
|
- <!-- 答案展示部分 -->
|
|
|
|
- <div class="item-answer" v-show="item.type !== 'Compose'">
|
|
|
|
- <span class="answer-title-line"></span>
|
|
|
|
- <span class="answer-title" @click="showAnswer($event,'answer')">答案:点击展开答案详情</span>
|
|
|
|
- <div class="item-answer-details">
|
|
|
|
- <span v-html="item.answer" v-if="item.type === 'Subjective'"></span>
|
|
|
|
- <span :class="[ item.type === 'Complete' ? 'item-answer-item':'']" v-for="(answer,index) in item.answer" :key="index" v-else-if="item.type === 'Complete'" v-html="answer"></span>
|
|
|
|
- <span :class="[ item.type === 'Complete' ? 'item-answer-item':'']" v-for="(answer,index) in item.answer" :key="index" v-else>{{answer}}</span>
|
|
|
|
|
|
+ <!-- 解析部分 -->
|
|
|
|
+ <div class="item-explain" v-show="item.type !== 'Compose' && isShowAnswer">
|
|
|
|
+ <span class="explain-title-line"></span>
|
|
|
|
+ <span class="explain-title" @click="showAnswer($event,'explain')">解析:点击展开解析详情</span>
|
|
|
|
+ <div class="item-explain-details">
|
|
|
|
+ <span v-html="item.explain"></span>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
- </div>
|
|
|
|
- <!-- 解析部分 -->
|
|
|
|
- <div class="item-explain" v-show="item.type !== 'Compose'">
|
|
|
|
- <span class="explain-title-line"></span>
|
|
|
|
- <span class="explain-title" @click="showAnswer($event,'explain')">解析:点击展开解析详情</span>
|
|
|
|
- <div class="item-explain-details">
|
|
|
|
- <span v-html="item.explain"></span>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- <!-- 底部题目操作栏 -->
|
|
|
|
- <div class="item-tools">
|
|
|
|
- <span class="item-tools-info">来源:浙江省温州市2019年中考数学试卷</span>
|
|
|
|
- <span class="item-tools-info">使用次数:98 次</span>
|
|
|
|
- <span class="item-tools-info" style="border:0">更新时间:2019-07-01</span>
|
|
|
|
- <Button type="info" :style="{backgroundColor:basketList.all.indexOf(item) > -1 ? '#bbbbbb' : ''}" @click="handleChoose(item)">{{basketList.all.indexOf(item) > -1 ? '已选入' : '选题'}} </Button>
|
|
|
|
- <Button type="primary" @click="handleEdit(item)" style="margin-right:10px">编辑题目</Button>
|
|
|
|
- <!--小球-->
|
|
|
|
- <div>
|
|
|
|
- <transition name="drop" @before-enter="beforeDrop" @enter="dropping" @after-enter="afterDrop">
|
|
|
|
- <div class="ball" v-show="ball.show">
|
|
|
|
- <div class="inner inner-hook">
|
|
|
|
- <img src="../../../assets/icon/icon_paper.png" />
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- </transition>
|
|
|
|
|
|
+ <!-- 底部题目操作栏 -->
|
|
|
|
+ <div class="item-tools">
|
|
|
|
+ <span class="item-tools-info">来源:浙江省温州市2019年中考数学试卷</span>
|
|
|
|
+ <span class="item-tools-info">使用次数:98 次</span>
|
|
|
|
+ <span class="item-tools-info" style="border:0">更新时间:2019-07-01</span>
|
|
|
|
+ <!--<Button type="info" :style="{backgroundColor:basketList.all.indexOf(item) > -1 ? '#bbbbbb' : ''}" @click="handleChoose(item)">{{basketList.all.indexOf(item) > -1 ? '已选入' : '选题'}} </Button>-->
|
|
|
|
+ <Button type="primary" @click="handleEdit(item)" style="margin-right:10px">编辑题目</Button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- </div>
|
|
|
|
|
|
|
|
- <!-- 底部分页区域 -->
|
|
|
|
- <Page :total="totalNum"
|
|
|
|
- show-sizer
|
|
|
|
- @on-page-size-change="pageSizeChange"
|
|
|
|
- @on-change="pageChange"
|
|
|
|
- :page-size-opts="[5,10,15,20]" />
|
|
|
|
- <Button type="success" @click="backToAdd" style="margin:10px;">返回</Button>
|
|
|
|
- <Button type="success" @click="backToPaper" style="margin:10px;">试卷</Button>
|
|
|
|
|
|
+ <!-- 底部分页区域 -->
|
|
|
|
+ <Page :total="totalNum"
|
|
|
|
+ show-sizer
|
|
|
|
+ @on-page-size-change="pageSizeChange"
|
|
|
|
+ @on-change="pageChange"
|
|
|
|
+ :page-size-opts="[5,10,15,20]" />
|
|
|
|
+ <Button type="success" @click="backToAdd" style="margin:10px;">返回</Button>
|
|
|
|
+ <Button type="success" @click="backToPaper" style="margin:10px;">试卷</Button>
|
|
|
|
|
|
<!-- 绑定知识点弹窗开始 -->
|
|
<!-- 绑定知识点弹窗开始 -->
|
|
<Modal v-model="bindPointModal"
|
|
<Modal v-model="bindPointModal"
|
|
@@ -286,12 +230,11 @@
|
|
isShowAnswer: true,
|
|
isShowAnswer: true,
|
|
importLoading: false,
|
|
importLoading: false,
|
|
tabSelectVal: 'school',
|
|
tabSelectVal: 'school',
|
|
- ball: { show: false },
|
|
|
|
dropBalls: []
|
|
dropBalls: []
|
|
}
|
|
}
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
- this.schoolInfo = JSON.parse(localStorage.getItem('c_role_info')).roleClaim[0]
|
|
|
|
|
|
+ //this.schoolInfo = JSON.parse(localStorage.getItem('c_role_info')).roleClaim[0]
|
|
this.list = questions.result.data
|
|
this.list = questions.result.data
|
|
this.totalNum = questions.result.data.length
|
|
this.totalNum = questions.result.data.length
|
|
if (this.$route.params.exerciseItem) {
|
|
if (this.$route.params.exerciseItem) {
|
|
@@ -299,53 +242,7 @@
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
- // 抛物
|
|
|
|
- drop(el) {
|
|
|
|
- this.ball.show = true
|
|
|
|
- this.ball.el = el
|
|
|
|
- this.dropBalls.push(this.ball)
|
|
|
|
- },
|
|
|
|
-
|
|
|
|
- /* 购物车小球动画实现 */
|
|
|
|
- beforeDrop(el) {
|
|
|
|
- let ball = this.ball
|
|
|
|
- if (ball.show) {
|
|
|
|
- let rect = ball.el.getBoundingClientRect() // 元素相对于视口的位置
|
|
|
|
- let x = -(window.innerWidth - rect.x - 152)
|
|
|
|
- let y = -(window.innerHeight - rect.top - 22) // 获取y
|
|
|
|
- el.style.display = ''
|
|
|
|
- el.style.webkitTransform = 'translateY(' + y + 'px)' // translateY
|
|
|
|
- el.style.transform = 'translateY(' + y + 'px)'
|
|
|
|
- let inner = el.getElementsByClassName('inner-hook')[0]
|
|
|
|
- inner.style.webkitTransform = 'translateX(' + x + 'px)'
|
|
|
|
- inner.style.transform = 'translateX(' + x + 'px)'
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
|
|
|
|
- /* 重置小球数量 样式重置 */
|
|
|
|
- dropping(el, done) {
|
|
|
|
- el.style.webkitTransform = 'translate3d(0,0,0)'
|
|
|
|
- el.style.transform = 'translate3d(0,0,0)'
|
|
|
|
- let inner = el.getElementsByClassName('inner-hook')[0]
|
|
|
|
- inner.style.webkitTransform = 'translate3d(0,0,0)'
|
|
|
|
- inner.style.transform = 'translate3d(0,0,0)'
|
|
|
|
- el.addEventListener('transitionend', done)
|
|
|
|
- let cartClassList = document.getElementById('questionCart').classList
|
|
|
|
- cartClassList.add('animated')
|
|
|
|
- cartClassList.add('heartBeat')
|
|
|
|
- },
|
|
|
|
-
|
|
|
|
- /* 初始化小球 */
|
|
|
|
- afterDrop(el) {
|
|
|
|
- let ball = this.dropBalls.shift()
|
|
|
|
- if (ball) {
|
|
|
|
- ball.show = false
|
|
|
|
- el.style.display = 'none'
|
|
|
|
- let cartClassList = document.getElementById('questionCart').classList
|
|
|
|
- cartClassList.remove('animated')
|
|
|
|
- cartClassList.remove('heartBeat')
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
|
|
|
|
// 根据题库加载题目
|
|
// 根据题库加载题目
|
|
filterOriginChange(origin) {
|
|
filterOriginChange(origin) {
|
|
@@ -379,9 +276,10 @@
|
|
showAnswer(e, type) {
|
|
showAnswer(e, type) {
|
|
let el = e.currentTarget
|
|
let el = e.currentTarget
|
|
let isShow = e.currentTarget.nextElementSibling.style.display || 'none'
|
|
let isShow = e.currentTarget.nextElementSibling.style.display || 'none'
|
|
- setTimeout(function() {
|
|
|
|
- if (type !== 'explain') {
|
|
|
|
- el.nextElementSibling.style.display = isShow !== 'none' ? 'block' : 'none'
|
|
|
|
|
|
+ setTimeout(function () {
|
|
|
|
+ console.log(type)
|
|
|
|
+ if (type === 'explain') {
|
|
|
|
+ el.nextElementSibling.style.display = isShow !== 'none' ? 'none' : 'block'
|
|
el.innerHTML = isShow !== 'none' ? '解析:点击收起解析详情' : '解析:点击展开解析详情'
|
|
el.innerHTML = isShow !== 'none' ? '解析:点击收起解析详情' : '解析:点击展开解析详情'
|
|
} else {
|
|
} else {
|
|
el.nextElementSibling.style.display = isShow === 'none' ? 'block' : 'none'
|
|
el.nextElementSibling.style.display = isShow === 'none' ? 'block' : 'none'
|
|
@@ -392,7 +290,7 @@
|
|
|
|
|
|
backToAdd() {
|
|
backToAdd() {
|
|
this.$router.push({
|
|
this.$router.push({
|
|
- path: '/createExercises'// 或者路径跳转path: '/addCreditCards',
|
|
|
|
|
|
+ path: '/createExercises'//
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
|
|
@@ -408,7 +306,7 @@
|
|
let end = this.pageSize * page
|
|
let end = this.pageSize * page
|
|
let list = questions.result.data
|
|
let list = questions.result.data
|
|
this.list = list.slice(start, end)
|
|
this.list = list.slice(start, end)
|
|
- window.scroll(0, 0)
|
|
|
|
|
|
+ window.scrollTo(0, 0)
|
|
},
|
|
},
|
|
|
|
|
|
// 切换分页Size
|
|
// 切换分页Size
|