feat: bug修复

This commit is contained in:
cgd_mac 2022-02-25 18:20:53 +08:00
parent 50cb5c3688
commit 6135e5ac52
6 changed files with 13 additions and 14 deletions

View File

@ -12,9 +12,7 @@
</span>
</div>
<div class="total">
<slot name="total">
<span>{{ typeof total === 'function' && total() || total }}</span>
</slot>
</div>
</div>
<div class="chart-card-content">

View File

@ -1,6 +1,6 @@
<template>
<a-card :bordered="false">
<a-tabs v-if="activeTab" v-model="activeTab">
<a-tabs v-model="activeTab">
<a-tab-pane key="1" tab="我的收藏">
<a-card
:title="`我的收藏题目(共${collectionInfo.total}题)`"
@ -139,7 +139,7 @@ export default {
}
},
mounted () {
this.activeTab = this.$route.query.type || '1'
this.activeTab = String(this.$route.query.type) || '1'
console.log('>>>>>>>>>.', this.activeTab)
this.initData()
},

View File

@ -61,6 +61,7 @@
<script>
import moment from 'moment'
import { reqMyCourseList } from '@/api/mycourse/index'
import { dictGet } from '@/api/project/project'
import { dictionaryDropDown } from '@/api/sys/dictionaryItem'
import { dictToTree } from '@/utils/util'
import { STable, SearchCom } from '@/components'
@ -82,7 +83,7 @@ export default {
},
queryOptions: [
{ type: 'input', placeholder: '课程名称', key: 'name' },
{ type: 'select-dic-tree', placeholder: '课程类别', key: 'trainWay', options: [] },
{ type: 'select', placeholder: '课程类别', key: 'trainWay', options: [] },
{
type: 'select',
placeholder: '课程状态',
@ -167,8 +168,8 @@ export default {
},
//
dictionaryDropDown () {
dictionaryDropDown({ dictionaryCode: '0009' }).then(res => {
this.queryOptions[1].options = dictToTree(res.data, [], 0)
dictGet({ type: 1 }).then(res => {
this.queryOptions[1].options = res.data
this.loading = false
})
},

View File

@ -76,6 +76,7 @@ import { STable, SearchCom } from '@/components'
import { reqExamList, reqExamAttendList, reqExamSubscribe } from '@/api/myexam/exam'
import { dictionaryDropDown } from '@/api/sys/dictionaryItem'
import { dictToTree } from '@/utils/util'
import { dictGet } from '@/api/project/project'
export default {
components: { STable, SearchCom },
@ -187,9 +188,8 @@ export default {
},
methods: {
dictionaryDropDown () {
dictionaryDropDown({ dictionaryCode: '0009' }).then((res) => {
const result = dictToTree(res.data, [], 0)
this.queryOptions[0].options = result
dictGet({ type: 1 }).then((res) => {
this.queryOptions[0].options = res.data
this.loading = false
})
},

View File

@ -198,7 +198,7 @@ export default {
}
},
handlerDetail (row) {
this.$router.push({ path: '/mycourse/courseLearn', query: { courseId: row.courseId } })
this.$router.push({ path: '/mycourse/courseLearn', query: { courseId: row.id } })
}
}
}

View File

@ -85,10 +85,10 @@ export default {
//
handlerSubmit (result) {
const { type } = this.query
if (type === 'practice') {
if (type === 'practice' || type === 'operation') {
this.submitPractice(result)
}
if (type === 'exam' || type === 'test' || type === 'operation') {
if (type === 'exam' || type === 'test') {
this.submitExam(result)
}
// if (type === 'operation') {