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> </span>
</div> </div>
<div class="total"> <div class="total">
<slot name="total"> <span>{{ typeof total === 'function' && total() || total }}</span>
<span>{{ typeof total === 'function' && total() || total }}</span>
</slot>
</div> </div>
</div> </div>
<div class="chart-card-content"> <div class="chart-card-content">

View File

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

View File

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

View File

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

View File

@ -198,7 +198,7 @@ export default {
} }
}, },
handlerDetail (row) { 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) { handlerSubmit (result) {
const { type } = this.query const { type } = this.query
if (type === 'practice') { if (type === 'practice' || type === 'operation') {
this.submitPractice(result) this.submitPractice(result)
} }
if (type === 'exam' || type === 'test' || type === 'operation') { if (type === 'exam' || type === 'test') {
this.submitExam(result) this.submitExam(result)
} }
// if (type === 'operation') { // if (type === 'operation') {