yujialong 4 years ago
parent 554f8bdfa5
commit 0c4594bd3a
  1. 2
      src/pages/account/login/index.vue
  2. 25
      src/pages/achievement/assessment/index.vue
  3. 2
      src/pages/achievement/list/examResults.vue
  4. 8
      src/pages/achievement/list/practiceResults.vue
  5. 25
      src/pages/achievement/practice/index.vue
  6. 25
      src/pages/exam/detail/index.vue
  7. 33
      src/pages/exception/error/403/index.vue
  8. 33
      src/pages/exception/error/404/index.vue
  9. 2
      src/pages/practice/do/index.vue
  10. 186
      src/pages/wrongBook/list/index.vue
  11. 2
      src/plugins/requests/index.js
  12. 12
      src/router/permission.js

@ -98,7 +98,7 @@ export default {
password: this.loginForm.password
}
this.login(data).then(() => {
let redirect = decodeURIComponent(this.$route.query.redirect || '/')
let redirect = this.$route.query.redirect ? decodeURIComponent(this.$route.query.redirect) : '/index'
this.$router.replace(redirect)
}).catch(() => {})
}

@ -17,7 +17,9 @@
</div>
<ul class="tab">
<li v-for="(item,index) in tabs" :key="index" :class="{active: active == item.id}" @click="tabChange(item.id)">{{item.name}}</li>
<template v-for="(item,index) in tabs">
<li v-if="item.show" :key="index" :class="{active: active == item.id}" @click="tabChange(item.id)">{{item.name}}</li>
</template>
</ul>
<div class="wrap">
@ -74,19 +76,24 @@ export default {
tabs: [
{
id: 1,
name: '单选题'
name: '单选题',
show: true
},{
id: 2,
name: '多选题'
name: '多选题',
show: true
},{
id: 3,
name: '填空题'
name: '判断题',
show: true
},{
id: 4,
name: '判断题'
name: '简答题',
show: true
},{
id: 5,
name: '简答题'
name: '填空题',
show: true
}
],
active: 1,
@ -112,6 +119,12 @@ export default {
this.time = res.time
this.ranking = res.ranking
this.allData = res.data
let tabs = this.tabs
res.data.list1.length || (tabs[0].show = false)
res.data.list2.length || (tabs[1].show = false)
res.data.list3.length || (tabs[2].show = false)
res.data.list4.length || (tabs[3].show = false)
res.data.list5.length || (tabs[4].show = false)
this.curType = this.allData.list1
this.handleOptions()
})

@ -72,7 +72,7 @@ export default {
'setInfo'
]),
getData() {
this.$post(`${this.api.getMyAchievement}?userId=${this.userId}&pageSize=${this.pageSize}&pageNum=${this.page}`).then(res => {
this.$post(`${this.api.getMyAchievement}?userId=${this.userId}&pageSize=${this.pageSize}&pageNum=${this.page}&keyword=${this.keyword}`).then(res => {
this.listData = res.data.list.list
this.total = res.data.list.totalCount
}).catch(res => {})

@ -6,7 +6,7 @@
<div class="flex">
<div>
<el-input placeholder="请输入练习/试卷名称" prefix-icon="el-icon-search" v-model="keyword" clearable></el-input>
<el-input placeholder="请输入练习名称" prefix-icon="el-icon-search" v-model="keyword" clearable></el-input>
</div>
</div>
</div>
@ -75,7 +75,9 @@ export default {
'setInfo'
]),
getData() {
this.$post(`${this.api.practiseAchievement}?userId=${this.userId}&pageNum=${this.page}&pageSize=${this.pageSize}`).then(res => {
let url = `${this.api.practiseAchievement}?userId=${this.userId}&pageNum=${this.page}&pageSize=${this.pageSize}`
if(this.keyword) url = url + `&keyword=${this.keyword}`
this.$post(url).then(res => {
this.listData = res.data.list.list
this.total = res.data.list.totalCount
}).catch(res => {})
@ -100,7 +102,7 @@ export default {
},
show(row){
this.setInfo({
id: row.practiseId,
id: row.id,
})
this.$router.push('practice')
}

@ -13,7 +13,9 @@
</div>
<ul class="tab">
<li v-for="(item,index) in tabs" :key="index" :class="{active: active == item.id}" @click="tabChange(item.id)">{{item.name}}</li>
<template v-for="(item,index) in tabs">
<li v-if="item.show" :key="index" :class="{active: active == item.id}" @click="tabChange(item.id)">{{item.name}}</li>
</template>
</ul>
<div class="wrap">
@ -69,19 +71,24 @@ export default {
tabs: [
{
id: 1,
name: '单选题'
name: '单选题',
show: true
},{
id: 2,
name: '多选题'
name: '多选题',
show: true
},{
id: 3,
name: '判断题'
name: '判断题',
show: true
},{
id: 4,
name: '简答题'
name: '简答题',
show: true
},{
id: 5,
name: '填空题'
name: '填空题',
show: true
}
],
typeNameList: ['单项选择','多项选择','判断题','简答题','填空题'],
@ -119,6 +126,12 @@ export default {
}
})
this.list = data.list
let tabs = this.tabs
data.list.find(n => n.typeName == '单项选择') || (tabs[0].show = false)
data.list.find(n => n.typeName == '多项选择') || (tabs[1].show = false)
data.list.find(n => n.typeName == '判断题') || (tabs[2].show = false)
data.list.find(n => n.typeName == '简答题') || (tabs[3].show = false)
data.list.find(n => n.typeName == '填空题') || (tabs[4].show = false)
this.handleOptions()
this.paperName = data.paperName
this.userName = data.stuName

@ -13,7 +13,9 @@
</div>
<ul class="tab">
<li v-for="(item,index) in tabs" :key="index" :class="{active: active == item.id}" @click="tabChange(item.id)">{{item.name}}</li>
<template v-for="(item,index) in tabs">
<li v-if="item.show" :key="index" :class="{active: active == item.id}" @click="tabChange(item.id)">{{item.name}}</li>
</template>
</ul>
<div class="wrap">
@ -69,19 +71,24 @@ export default {
tabs: [
{
id: 1,
name: '单选题'
name: '单选题',
show: true
},{
id: 2,
name: '多选题'
name: '多选题',
show: true
},{
id: 3,
name: '填空题'
name: '判断题',
show: true
},{
id: 4,
name: '判断题'
name: '简答题',
show: true
},{
id: 5,
name: '简答题'
name: '填空题',
show: true
}
],
active: 1,
@ -106,6 +113,12 @@ export default {
this.paperName = res.paperName
this.time = res.time
this.allData = res.data
let tabs = this.tabs
res.data.list1.length || (tabs[0].show = false)
res.data.list2.length || (tabs[1].show = false)
res.data.list3.length || (tabs[2].show = false)
res.data.list4.length || (tabs[3].show = false)
res.data.list5.length || (tabs[4].show = false)
this.curType = this.allData.list1
this.handleOptions()
}).catch(err => {})

@ -1,23 +1,26 @@
<template>
<div class="error-page">
<div class="error-code">4<span>0</span>3</div>
<div class="error-desc">啊哦~ 你没有权限访问该页面哦</div>
<div class="error-handle">
<router-link to="/">
<el-button type="primary" size="large">返回首页</el-button>
</router-link>
<el-button class="error-btn" type="primary" size="large" @click="goBack">返回上一页</el-button>
</div>
</div>
<div class="error-page">
<div class="error-code">4<span>0</span>3</div>
<div class="error-desc">啊哦~ 你没有权限访问该页面哦</div>
<div class="error-handle">
<router-link to="/">
<el-button type="primary" size="large" @click="toIndex">返回首页</el-button>
</router-link>
<el-button class="error-btn" type="primary" size="large" @click="goBack">返回上一页</el-button>
</div>
</div>
</template>
<script>
export default {
methods: {
goBack(){
this.$router.go(-1);
}
}
methods: {
toIndex(){
this.$router.push('/')
},
goBack(){
this.$router.go(-1);
}
}
}
</script>

@ -1,23 +1,26 @@
<template>
<div class="error-page">
<div class="error-code">4<span>0</span>4</div>
<div class="error-desc">啊哦~ 你所访问的页面不存在</div>
<div class="error-handle">
<router-link to="/">
<el-button type="primary" size="large">返回首页</el-button>
</router-link>
<el-button class="error-btn" type="primary" size="large" @click="goBack">返回上一页</el-button>
</div>
</div>
<div class="error-page">
<div class="error-code">4<span>0</span>4</div>
<div class="error-desc">啊哦~ 你所访问的页面不存在</div>
<div class="error-handle">
<router-link to="/">
<el-button type="primary" size="large" @click="toIndex">返回首页</el-button>
</router-link>
<el-button class="error-btn" type="primary" size="large" @click="goBack">返回上一页</el-button>
</div>
</div>
</template>
<script>
export default {
methods: {
goBack(){
this.$router.go(-1);
}
}
methods: {
toIndex(){
this.$router.push('/')
},
goBack(){
this.$router.go(-1);
}
}
}
</script>

@ -97,7 +97,7 @@ export default {
mixins: [ setBackground,examDo ],
data() {
return {
identification: this.$store.state.identification,
identification: this.$store.state.practice.identification,
subjects: [],
singleCount: 0,
multipleCount: 0,

@ -1,99 +1,93 @@
<template>
<div>
<el-row :gutter="20">
<el-col :span="24">
<el-card shadow="hover" class="m-b-20">
<div class="p-title m-b-20">筛选</div>
<div class="flex j-between">
<el-form label-width="80px" inline>
<el-form-item class="no-mb" label="题库来源">
<el-select v-model="type" clearable placeholder="请选择题库来源" @change="getName">
<el-option v-for="(item,index) in sourceList" :key="index" :label="item.name" :value="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item class="no-mb" label="试卷名称">
<el-select v-model="paperId" clearable placeholder="请选择试卷名称" @change="getData">
<el-option v-for="(item,index) in nameList" :key="index" :label="item.paperName" :value="item.paperId"></el-option>
</el-select>
</el-form-item>
<el-form-item class="no-mb" label="试题类型">
<el-select v-model="typeId" clearable placeholder="请选择试题类型" @change="getData">
<el-option label="不限" value=""></el-option>
<el-option v-for="(item,index) in typeList" :key="index" :label="item.name" :value="item.id"></el-option>
</el-select>
</el-form-item>
</el-form>
<div>
<el-input
placeholder="请输入知识点"
prefix-icon="el-icon-search"
v-model="keyword"
clearable
></el-input>
</div>
</div>
</el-card>
</el-col>
<el-card shadow="hover" class="m-b-20">
<div class="p-title m-b-20">筛选</div>
<div class="flex j-between">
<el-form label-width="80px" inline>
<el-form-item class="no-mb" label="题库来源">
<el-select v-model="type" placeholder="请选择题库来源" @change="getName">
<el-option v-for="(item,index) in sourceList" :key="index" :label="item.name" :value="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item class="no-mb" label="试卷名称">
<el-select v-model="paperId" placeholder="请选择试卷名称" @change="getData">
<el-option v-for="(item,index) in nameList" :key="index" :label="item.paperName" :value="item.paperId"></el-option>
</el-select>
</el-form-item>
<el-form-item class="no-mb" label="试题类型">
<el-select v-model="typeId" clearable placeholder="请选择试题类型" @change="getData">
<el-option label="不限" value=""></el-option>
<el-option v-for="(item,index) in typeList" :key="index" :label="item.name" :value="item.id"></el-option>
</el-select>
</el-form-item>
</el-form>
<div>
<el-input
placeholder="请输入知识点"
prefix-icon="el-icon-search"
v-model="keyword"
clearable
></el-input>
</div>
</div>
</el-card>
<el-col :span="24">
<el-card shadow="hover" class="m-b-20">
<div class="m-b-20">
<el-button
type="primary"
size="small"
round
@click="practice"
>错题练习</el-button>
</div>
<el-card shadow="hover" class="m-b-20">
<div class="m-b-20">
<el-button
type="primary"
size="small"
round
@click="practice"
>错题练习</el-button>
</div>
<el-table
:data="listData"
ref="table"
row-key="id"
class="table"
stripe
header-align="center"
@selection-change="handleSelectionChange"
>
<el-table-column
type="selection"
width="55"
align="center"
:reserve-selection="true"
></el-table-column>
<el-table-column type="index" width="100" label="序号" align="center">
<template
slot-scope="scope"
>{{scope.$index + (page - 1) * pageSize + 1}}</template>
</el-table-column>
<el-table-column prop="questionStem" label="错题题干名称" align="center" :show-overflow-tooltip="true"></el-table-column>
<el-table-column label="题目来源" width="120" align="center">
<template>
{{type == 1 ? '考试' : '练习'}}
</template>
</el-table-column>
<el-table-column prop="courses" label="对应课程" width="140" align="center"></el-table-column>
<el-table-column prop="knowledgePoints" label="对应知识点" width="140" align="center"></el-table-column>
<el-table-column prop="wrongNum" label="错题次数" width="100" align="center"></el-table-column>
<el-table-column label="操作" width="100" align="center">
<template slot-scope="scope">
<el-button type="text" @click="show(scope.row)">查看</el-button>
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination
background
@current-change="handleCurrentChange"
:current-page="page"
:page-size="pageSize"
layout="total,prev, pager, next"
:total="total"
></el-pagination>
</div>
</el-card>
</el-col>
</el-row>
<el-table
:data="listData"
ref="table"
row-key="id"
class="table"
stripe
header-align="center"
@selection-change="handleSelectionChange"
>
<el-table-column
type="selection"
width="55"
align="center"
:reserve-selection="true"
></el-table-column>
<el-table-column type="index" width="100" label="序号" align="center">
<template
slot-scope="scope"
>{{scope.$index + (page - 1) * pageSize + 1}}</template>
</el-table-column>
<el-table-column prop="questionStem" label="错题题干名称" align="center" :show-overflow-tooltip="true"></el-table-column>
<el-table-column label="题目来源" width="120" align="center">
<template>
{{type == 1 ? '考试' : '练习'}}
</template>
</el-table-column>
<el-table-column prop="courses" label="对应课程" width="140" align="center"></el-table-column>
<el-table-column prop="knowledgePoints" label="对应知识点" width="140" align="center"></el-table-column>
<el-table-column prop="wrongNum" label="错题次数" width="100" align="center"></el-table-column>
<el-table-column label="操作" width="100" align="center">
<template slot-scope="scope">
<el-button type="text" @click="show(scope.row)">查看</el-button>
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination
background
@current-change="handleCurrentChange"
:current-page="page"
:page-size="pageSize"
layout="total,prev, pager, next"
:total="total"
></el-pagination>
</div>
</el-card>
<el-dialog title="错题详情" :visible.sync="detailVisible" width="40%">
<div class="ques">
@ -129,14 +123,14 @@ export default {
data() {
return {
keyword: '',
type: 1,
type: 2,
sourceList: [
{
id: 1,
name: '用于考试'
},{
id: 2,
name: '用于练习'
},{
id: 1,
name: '用于考试'
}
],
paperId: '',

@ -5,7 +5,7 @@ import Setting from '@/setting'
const service = axios.create({
baseURL: Setting.apiBaseURL,
timeout: 5000
timeout: 50000
})
// post请求头

@ -6,10 +6,14 @@ router.beforeEach((to, from, next) => {
document.title = Setting.titleSuffix;
const role = util.session.get(Setting.usernameKey);
if (!role && to.path !== '/login') {
next({
path: '/login',
query: {redirect: to.fullPath}
})
if(to.fullPath == '/'){
next('/login')
}else{
next({
path: '/login',
query: {redirect: to.fullPath}
})
}
} else if(role && to.path == '/login') {
next('/index')
} else {

Loading…
Cancel
Save