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. 5
      src/pages/exception/error/403/index.vue
  8. 5
      src/pages/exception/error/404/index.vue
  9. 2
      src/pages/practice/do/index.vue
  10. 18
      src/pages/wrongBook/list/index.vue
  11. 2
      src/plugins/requests/index.js
  12. 4
      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 => {})

@ -4,7 +4,7 @@
<div class="error-desc">啊哦~ 你没有权限访问该页面哦</div>
<div class="error-handle">
<router-link to="/">
<el-button type="primary" size="large">返回首页</el-button>
<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>
@ -14,6 +14,9 @@
<script>
export default {
methods: {
toIndex(){
this.$router.push('/')
},
goBack(){
this.$router.go(-1);
}

@ -4,7 +4,7 @@
<div class="error-desc">啊哦~ 你所访问的页面不存在</div>
<div class="error-handle">
<router-link to="/">
<el-button type="primary" size="large">返回首页</el-button>
<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>
@ -14,6 +14,9 @@
<script>
export default {
methods: {
toIndex(){
this.$router.push('/')
},
goBack(){
this.$router.go(-1);
}

@ -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,18 +1,16 @@
<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-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" clearable placeholder="请选择试卷名称" @change="getData">
<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>
@ -33,9 +31,7 @@
</div>
</div>
</el-card>
</el-col>
<el-col :span="24">
<el-card shadow="hover" class="m-b-20">
<div class="m-b-20">
<el-button
@ -92,8 +88,6 @@
></el-pagination>
</div>
</el-card>
</el-col>
</el-row>
<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') {
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