|
@@ -4,265 +4,19 @@
|
|
|
<div class="tab">
|
|
|
<div
|
|
|
class="tab_item"
|
|
|
- :class="tabActive == 0 ? 'tab_active' : ''"
|
|
|
- @click="switchTab(0)"
|
|
|
+ v-for="item in tabList"
|
|
|
+ :class="tabActive == item.value ? 'tab_active' : ''"
|
|
|
+ @click="switchTab(item.value)"
|
|
|
>
|
|
|
- 收藏夹
|
|
|
- </div>
|
|
|
- <div
|
|
|
- class="tab_item"
|
|
|
- :class="tabActive == 1 ? 'tab_active' : ''"
|
|
|
- @click="switchTab(1)"
|
|
|
- >
|
|
|
- 错题本
|
|
|
- </div>
|
|
|
- <div
|
|
|
- class="tab_item"
|
|
|
- :class="tabActive == 2 ? 'tab_active' : ''"
|
|
|
- @click="switchTab(2)"
|
|
|
- >
|
|
|
- 学习记录
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="radio_contianer" v-show="tabActive == 1">
|
|
|
- <div style="margin-bottom: 16px">
|
|
|
- <span>科目</span>
|
|
|
- <el-radio-group
|
|
|
- v-model="form.worngSubjectName"
|
|
|
- size="mini"
|
|
|
- @change="toggleWrongSub"
|
|
|
- >
|
|
|
- <el-radio-button
|
|
|
- :label="item"
|
|
|
- v-for="(item, index) in wrongSubject"
|
|
|
- :key="index"
|
|
|
- >{{ item }}</el-radio-button
|
|
|
- >
|
|
|
- </el-radio-group>
|
|
|
- </div>
|
|
|
- <div style="margin-bottom: 16px">
|
|
|
- <span>题型</span>
|
|
|
- <el-radio-group
|
|
|
- v-model="form.wrongType"
|
|
|
- size="mini"
|
|
|
- @change="toggleWrongType"
|
|
|
- >
|
|
|
- <el-radio-button
|
|
|
- :label="item"
|
|
|
- v-for="(item, index) in wrongTypes"
|
|
|
- :key="index"
|
|
|
- >{{ item }}</el-radio-button
|
|
|
- >
|
|
|
- </el-radio-group>
|
|
|
+ {{ item.label }}
|
|
|
</div>
|
|
|
</div>
|
|
|
</el-card>
|
|
|
<!-- 收藏夹 -->
|
|
|
<collect v-if="tabActive == 0"></collect>
|
|
|
-<!-- <div class="shoucan_content" v-show="tabActive == 0">-->
|
|
|
-<!-- <!– 试题收藏 –>-->
|
|
|
-<!-- <div class="topic" v-show="form.type == 'question'">-->
|
|
|
-<!-- <!– 题目 –>-->
|
|
|
-<!-- <div class="paper_questions" id="collect-question">-->
|
|
|
-<!-- <div-->
|
|
|
-<!-- class="que_item"-->
|
|
|
-<!-- v-for="(item, index) in collectQue"-->
|
|
|
-<!-- :key="item.id"-->
|
|
|
-<!-- >-->
|
|
|
-<!-- <div class="que_content" style="display: flex">-->
|
|
|
-<!-- <div>{{ index + 1 }}.</div>-->
|
|
|
-<!-- <div v-html="item.title"></div>-->
|
|
|
-<!-- </div>-->
|
|
|
-<!-- <div class="option" v-if="item.optionA">-->
|
|
|
-<!-- <div style="margin-right: 5px">A:</div>-->
|
|
|
-<!-- <div v-html="item.optionA"></div>-->
|
|
|
-<!-- </div>-->
|
|
|
-<!-- <div class="option" v-if="item.optionB">-->
|
|
|
-<!-- <div style="margin-right: 5px">B:</div>-->
|
|
|
-<!-- <div v-html="item.optionB"></div>-->
|
|
|
-<!-- </div>-->
|
|
|
-<!-- <div class="option" v-if="item.optionC">-->
|
|
|
-<!-- C:-->
|
|
|
-<!-- <div v-html="item.optionC"></div>-->
|
|
|
-<!-- </div>-->
|
|
|
-<!-- <div class="option" v-if="item.optionD">-->
|
|
|
-<!-- <div style="margin-right: 5px">D:</div>-->
|
|
|
-<!-- <div v-html="item.optionD"></div>-->
|
|
|
-<!-- </div>-->
|
|
|
-<!-- <div class="que_footer">-->
|
|
|
-<!-- <div class="spans">-->
|
|
|
-<!-- <span class="id">ID: {{ item.id }}</span>-->
|
|
|
-<!-- <span>题型: {{ item.qtpye }}</span>-->
|
|
|
-<!-- <span>难度: 一般</span>-->
|
|
|
-<!-- </div>-->
|
|
|
-<!-- <div class="operation">-->
|
|
|
-<!-- <div class="shoucan">-->
|
|
|
-<!-- <div-->
|
|
|
-<!-- v-show="item.collect"-->
|
|
|
-<!-- @click="toCancelCollectQue(item)"-->
|
|
|
-<!-- style="display: flex; align-items: center"-->
|
|
|
-<!-- >-->
|
|
|
-<!-- <img-->
|
|
|
-<!-- src="@/assets/images/icon_shoucang_s.png"-->
|
|
|
-<!-- style="margin-right: 8px"-->
|
|
|
-<!-- />-->
|
|
|
-<!-- <span>已收藏</span>-->
|
|
|
-<!-- </div>-->
|
|
|
-<!-- <div-->
|
|
|
-<!-- v-show="!item.collect"-->
|
|
|
-<!-- @click="toCollectQue(item)"-->
|
|
|
-<!-- style="display: flex; align-items: center"-->
|
|
|
-<!-- >-->
|
|
|
-<!-- <img-->
|
|
|
-<!-- src="@/assets/images/icon_shoucang_n.png"-->
|
|
|
-<!-- style="margin-right: 8px"-->
|
|
|
-<!-- />-->
|
|
|
-<!-- <span>收藏</span>-->
|
|
|
-<!-- </div>-->
|
|
|
-<!-- </div>-->
|
|
|
-<!-- <div class="detail" @click="viewDetail(index)">-->
|
|
|
-<!-- <img src="@/assets/images/icon_chakan.png" alt="" />-->
|
|
|
-<!-- <span>查看解析>></span>-->
|
|
|
-<!-- </div>-->
|
|
|
-<!-- <div class="addQue">-->
|
|
|
-<!-- <i-->
|
|
|
-<!-- class="el-icon-shopping-cart-2"-->
|
|
|
-<!-- style="margin-right: 5px"-->
|
|
|
-<!-- ></i>-->
|
|
|
-<!-- <span>加入选题</span>-->
|
|
|
-<!-- </div>-->
|
|
|
-<!-- </div>-->
|
|
|
-<!-- </div>-->
|
|
|
-<!-- <div-->
|
|
|
-<!-- class="parse"-->
|
|
|
-<!-- v-show="item.createTime"-->
|
|
|
-<!-- v-html="item.parse"-->
|
|
|
-<!-- ></div>-->
|
|
|
-<!-- </div>-->
|
|
|
-<!-- </div>-->
|
|
|
-<!-- </div>-->
|
|
|
-<!-- <!– 试卷收藏 –>-->
|
|
|
-<!-- <div class="exam" v-show="form.type == 'paper'">-->
|
|
|
-<!-- <div class="paper_container">-->
|
|
|
-<!-- <div class="paper_item" v-for="item in collectPaper" :key="item.id">-->
|
|
|
-<!-- <div class="tit">-->
|
|
|
-<!-- <div>{{ item.papername }}</div>-->
|
|
|
-<!-- <div class="viewCount">-->
|
|
|
-<!-- <img src="@/assets/images/icon_eye.png" alt="" />-->
|
|
|
-<!-- <span>{{item.readNum}}人已预览</span>-->
|
|
|
-<!-- </div>-->
|
|
|
-<!-- </div>-->
|
|
|
-<!-- <div class="opera">-->
|
|
|
-<!-- <div class="view" @click="toPreView(item.id, item.papername)">-->
|
|
|
-<!-- <img-->
|
|
|
-<!-- style="margin-right: 8px"-->
|
|
|
-<!-- src="@/assets/images/icon_view.png"-->
|
|
|
-<!-- alt=""-->
|
|
|
-<!-- />-->
|
|
|
-<!-- <span>预览</span>-->
|
|
|
-<!-- </div>-->
|
|
|
-<!-- <div class="download">下载</div>-->
|
|
|
-<!-- <div>-->
|
|
|
-<!-- <img-->
|
|
|
-<!-- src="@/assets/images/icon_shoucang_s.png"-->
|
|
|
-<!-- alt=""-->
|
|
|
-<!-- style="margin-right: 8px"-->
|
|
|
-<!-- />-->
|
|
|
-<!-- <span>已收藏</span>-->
|
|
|
-<!-- </div>-->
|
|
|
-<!-- </div>-->
|
|
|
-<!-- </div>-->
|
|
|
-<!-- </div>-->
|
|
|
-<!-- </div>-->
|
|
|
-<!-- <!– 分页 –>-->
|
|
|
-<!-- <div style="display: flex; justify-content: center; margin-top: 92px">-->
|
|
|
-<!-- <el-pagination-->
|
|
|
-<!-- layout="prev, pager, next"-->
|
|
|
-<!-- :total="total"-->
|
|
|
-<!-- :current-page="pageNum"-->
|
|
|
-<!-- :page-size="pageSize"-->
|
|
|
-<!-- @prev-click="prev"-->
|
|
|
-<!-- @next-click="next"-->
|
|
|
-<!-- >-->
|
|
|
-<!-- </el-pagination>-->
|
|
|
-<!-- </div>-->
|
|
|
-<!-- </div>-->
|
|
|
<!-- 错题本 -->
|
|
|
- <div class="mis_content" v-show="tabActive == 1">
|
|
|
- <div class="topic">
|
|
|
- <!-- 题目 -->
|
|
|
- <div class="paper_questions" id="wrong-question">
|
|
|
- <div
|
|
|
- class="que_item"
|
|
|
- v-for="(item, index) in wrongQues"
|
|
|
- :key="item.id"
|
|
|
- >
|
|
|
- <div class="que_content" style="display: flex">
|
|
|
- <div>{{ index + 1 }}.</div>
|
|
|
- <div v-html="item.title"></div>
|
|
|
- </div>
|
|
|
- <div class="option" v-if="item.optionA">
|
|
|
- <div style="margin-right: 5px">A:</div>
|
|
|
- <div v-html="item.optionA"></div>
|
|
|
- </div>
|
|
|
- <div class="option" v-if="item.optionB">
|
|
|
- <div style="margin-right: 5px">B:</div>
|
|
|
- <div v-html="item.optionB"></div>
|
|
|
- </div>
|
|
|
- <div class="option" v-if="item.optionC">
|
|
|
- C:
|
|
|
- <div v-html="item.optionC"></div>
|
|
|
- </div>
|
|
|
- <div class="option" v-if="item.optionD">
|
|
|
- <div style="margin-right: 5px">D:</div>
|
|
|
- <div v-html="item.optionD"></div>
|
|
|
- </div>
|
|
|
- <div class="que_footer">
|
|
|
- <div class="spans">
|
|
|
- <span>题型: {{ item.qtpye }}</span>
|
|
|
- <span>难度: 一般</span>
|
|
|
- </div>
|
|
|
- <div class="operation">
|
|
|
- <div class="delete" style="display: flex; align-items: center">
|
|
|
- <div
|
|
|
- style="margin-right: 24px; cursor: pointer display: flex;align-items: center;"
|
|
|
- @click="toDeleteWrongQue(item.id, index)"
|
|
|
- >
|
|
|
- <img
|
|
|
- src="@/assets/images/icon_wrong.png"
|
|
|
- style="margin-right: 8px"
|
|
|
- />
|
|
|
- <span>删除错题</span>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="detail" @click="viewWrongDetail(index)">
|
|
|
- <img src="@/assets/images/icon_chakan.png" alt="" />
|
|
|
- <span>查看解析>></span>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div
|
|
|
- class="parse"
|
|
|
- v-show="item.createTime"
|
|
|
- v-html="item.parse"
|
|
|
- ></div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <!-- 错题分页 -->
|
|
|
- <div style="display: flex; justify-content: center; margin-top: 92px">
|
|
|
- <el-pagination
|
|
|
- layout="prev, pager, next"
|
|
|
- :total="wrongForm.total"
|
|
|
- :current-page="wrongForm.pageNum"
|
|
|
- :page-size="wrongForm.pageSize"
|
|
|
- @prev-click="wrongPrev"
|
|
|
- @next-click="wrongNext"
|
|
|
- >
|
|
|
- </el-pagination>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <!-- 学习记录 -->
|
|
|
+ <mistake v-if="tabActive == 1"></mistake>
|
|
|
+ <!-- 学习记录 -->
|
|
|
<div class="record_content" v-show="tabActive == 2">
|
|
|
<div class="record_contian">
|
|
|
<div class="tit">数据统计(总)</div>
|
|
@@ -428,15 +182,8 @@
|
|
|
</template>
|
|
|
<script>
|
|
|
import Collect from './components/collect'
|
|
|
+import Mistake from './components/mistake'
|
|
|
import {
|
|
|
- favSubjects,
|
|
|
- favQueTypes,
|
|
|
- favQuestions,
|
|
|
- favPapers,
|
|
|
- wrongSubjects,
|
|
|
- wrongTypes,
|
|
|
- wrongQuestions,
|
|
|
- deleteWrongQuestion,
|
|
|
summary,
|
|
|
questionStatsByDay,
|
|
|
videoStatsBySubject,
|
|
@@ -461,10 +208,24 @@ var myChart3;
|
|
|
var myChart4;
|
|
|
var flag = 1;
|
|
|
export default {
|
|
|
- components: {Collect},
|
|
|
+ components: {Collect,Mistake},
|
|
|
data() {
|
|
|
return {
|
|
|
tabActive: 0,
|
|
|
+ tabList: [
|
|
|
+ {
|
|
|
+ label:'收藏夹',
|
|
|
+ value:0
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label:'错题本',
|
|
|
+ value:1
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label:'学习记录',
|
|
|
+ value:2
|
|
|
+ }
|
|
|
+ ],
|
|
|
dateYears: [2021, 2020],
|
|
|
dateMonth: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12],
|
|
|
dateWeek: [1, 2, 3, 4, 5],
|
|
@@ -483,17 +244,9 @@ export default {
|
|
|
queTypes: [],
|
|
|
collectQue: [],
|
|
|
collectPaper: [],
|
|
|
- wrongSubject: [],
|
|
|
- wrongTypes: [],
|
|
|
pageSize: 10,
|
|
|
pageNum: 1,
|
|
|
total: 0,
|
|
|
- wrongQues: [],
|
|
|
- wrongForm: {
|
|
|
- total: 0,
|
|
|
- pageSize: 10,
|
|
|
- pageNum: 1,
|
|
|
- },
|
|
|
learnInfo: {},
|
|
|
dateForm: {
|
|
|
year: date.getFullYear(),
|
|
@@ -722,17 +475,14 @@ export default {
|
|
|
this.tabActive = this.$route.query.tabActive
|
|
|
? this.$route.query.tabActive
|
|
|
: 0;
|
|
|
- if (this.tabActive == 1) {
|
|
|
- this.switchTab(1);
|
|
|
- } else if (this.tabActive == 2) {
|
|
|
- this.switchTab(2);
|
|
|
- }
|
|
|
+
|
|
|
+ this.switchTab(this.tabActive);
|
|
|
},
|
|
|
methods: {
|
|
|
switchTab(index) {
|
|
|
this.tabActive = index;
|
|
|
if (this.tabActive == 1) {
|
|
|
- this.getWrongSubject();
|
|
|
+
|
|
|
} else if (this.tabActive == 2 && flag == 1) {
|
|
|
let queCountChart = document.getElementById("echarts_quecount");
|
|
|
myChart1 = echarts.init(queCountChart);
|
|
@@ -756,99 +506,6 @@ export default {
|
|
|
this.searchData();
|
|
|
}
|
|
|
},
|
|
|
- // 错题涉及的题型
|
|
|
- getWrongTypes() {
|
|
|
- wrongTypes({ subjectName: this.form.worngSubjectName }).then((res) => {
|
|
|
- if (res.data.length > 0) {
|
|
|
- this.form.wrongType = res.data[0];
|
|
|
- }
|
|
|
- this.wrongTypes = res.data;
|
|
|
- this.wrongForm.pageNum;
|
|
|
- this.getWrongQuestions();
|
|
|
- });
|
|
|
- },
|
|
|
- // 错题涉及的科目
|
|
|
- getWrongSubject() {
|
|
|
- wrongSubjects().then((res) => {
|
|
|
- if (res.data.length > 0) {
|
|
|
- this.form.worngSubjectName = res.data[0];
|
|
|
- }
|
|
|
- this.wrongSubject = res.data;
|
|
|
- this.getWrongTypes();
|
|
|
- });
|
|
|
- },
|
|
|
- // 错题列表
|
|
|
- getWrongQuestions() {
|
|
|
- wrongQuestions({
|
|
|
- subjectName: this.form.worngSubjectName,
|
|
|
- qtype: this.form.wrongType,
|
|
|
- pageSize: this.wrongForm.pageSize,
|
|
|
- pageNum: this.wrongForm.pageNum,
|
|
|
- }).then((res) => {
|
|
|
- this.wrongQues = res.rows;
|
|
|
- this.wrongForm.total = res.total;
|
|
|
- this.$nextTick(_=>this.mxGlobal.MathQueue('wrong-question'))
|
|
|
- console.log(res);
|
|
|
- });
|
|
|
- },
|
|
|
- // 收藏的问题列表
|
|
|
- getFavQuestions() {
|
|
|
- favQuestions({
|
|
|
- subjectName: this.form.subjectName,
|
|
|
- qtype: this.form.qtype,
|
|
|
- pageNum: this.pageNum,
|
|
|
- pageSize: this.pageSize,
|
|
|
- }).then((res) => {
|
|
|
- this.total = res.total;
|
|
|
- this.collectQue = res.rows;
|
|
|
- this.$nextTick(_=>this.mxGlobal.MathQueue('collect-question'))
|
|
|
- console.log(res);
|
|
|
- });
|
|
|
- },
|
|
|
- viewWrongDetail(index) {
|
|
|
- if (this.wrongQues[index].createTime) {
|
|
|
- this.wrongQues[index].createTime = false;
|
|
|
- } else {
|
|
|
- this.wrongQues[index].createTime = true;
|
|
|
- }
|
|
|
- },
|
|
|
- prev() {
|
|
|
- this.pageNum = this.pageNum - 1;
|
|
|
- if (this.form.type == "question") {
|
|
|
- this.getFavQuestions();
|
|
|
- } else {
|
|
|
- }
|
|
|
- },
|
|
|
- next() {
|
|
|
- this.pageNum = this.pageNum + 1;
|
|
|
- if (this.form.type == "question") {
|
|
|
- this.getFavQuestions();
|
|
|
- } else {
|
|
|
- this.getFavPapers();
|
|
|
- }
|
|
|
- },
|
|
|
- toDeleteWrongQue(id, index) {
|
|
|
- this.wrongQues.splice(index, 1);
|
|
|
- deleteWrongQuestion({ questionId: id }).then((res) => {
|
|
|
- this.msgSuccess("删除成功");
|
|
|
- console.log(res);
|
|
|
- });
|
|
|
- },
|
|
|
- toggleWrongType() {
|
|
|
- this.wrongForm.pageNum = 1;
|
|
|
- this.getWrongQuestions();
|
|
|
- },
|
|
|
- toggleWrongSub() {
|
|
|
- this.getWrongTypes();
|
|
|
- },
|
|
|
- wrongNext() {
|
|
|
- this.wrongForm.pageNum++;
|
|
|
- this.getWrongQuestions();
|
|
|
- },
|
|
|
- wrongPrev() {
|
|
|
- this.wrongForm.pageNum--;
|
|
|
- this.getWrongQuestions();
|
|
|
- },
|
|
|
getSummary() {
|
|
|
summary().then((res) => {
|
|
|
this.learnInfo = res.data;
|