yujialong 4 years ago
parent cef13a9d86
commit f6f0231de4
  1. 286
      src/components/doReview/index.vue
  2. 2
      src/layouts/header/index.vue
  3. 9
      src/libs/route/addRoutes.js
  4. 22
      src/pages/achievement/detail/index.vue
  5. 8
      src/pages/achievement/list/examResults.vue
  6. 1
      src/pages/achievement/list/practiceResults.vue
  7. 14
      src/pages/assessment/detail/index.vue
  8. 9
      src/pages/assessment/monitor/index.vue
  9. 8
      src/pages/assessment/scoreQuery/index.vue
  10. 320
      src/pages/assessment/show/index.vue
  11. 25
      src/pages/index/list/index.vue
  12. 16
      src/pages/practice/detail/index.vue
  13. 13
      src/pages/practice/list/index.vue
  14. 20
      src/pages/quesBank/list/myQuesBank.vue
  15. 15
      src/pages/quesBank/list/quesDialog.vue
  16. 3
      src/pages/setting/person/index.vue
  17. 2
      src/pages/student/list/index.vue
  18. 7
      src/pages/student/list/studentSide.vue
  19. 255
      src/pages/system/list/role.vue
  20. 12
      src/pages/testPaper/add/index.vue
  21. 6
      src/router/modules/assessment.js
  22. 7
      src/router/modules/testPaper.js
  23. 17
      src/router/permission.js
  24. 4
      src/setting.js
  25. 8
      src/store/modules/achievement.js
  26. 6
      src/store/modules/user.js

@ -0,0 +1,286 @@
<template>
<div class="box">
<h1 class="title">{{paperName}}</h1>
<div class="metas">
<div>
<span class="name">学生姓名</span>
<span class="val">{{userName}}</span>
</div>
<div>
<span class="name">学生得分</span>
<span class="val">{{(reviewStatus == 2 || reviewStatus == 3) ? this_score : '--'}}</span>
</div>
<div>
<span class="name">试卷总分</span>
<span class="val">100</span>
</div>
<div>
<span class="name">练习时长</span>
<span class="val">{{duration}}</span>
</div>
</div>
<div class="wrap">
<div class="select">
<el-radio v-model="look" label="1">查看全部</el-radio>
<el-radio v-model="look" label="2" v-if="reviewStatus == 2 || reviewStatus == 3">只看错题</el-radio>
</div>
<div class="item" v-for="(item,index) in list" :key="index">
<div class="status" :class="{done: item.isCorrecting}">{{item.isSub ? '简答题' : '客观题'}}{{getCorrectingName(item.isCorrecting)}}</div>
<div class="name" v-html="item.question_stem"></div>
<div class="answer">
<div class="info" v-if="!item.isSub">
<p class="key">正确答案</p>
<p class="val">{{item.answer}}</p>
</div>
<div class="info">
<p class="key">学生答案</p>
<p class="val">{{item.user_answer}}</p>
</div>
</div>
<div class="meta">
<span class="key">知识点</span>
<span class="val">{{item.knowledge_points}}</span>
</div>
<div class="meta">
<span class="key">答案解析</span>
<span class="val">{{item.answer_analysis}}</span>
</div>
<div class="flex a-center point">
<div class="meta">
<span class="key">题目分数</span>
<div class="val">{{item.question_points}} </div>
</div>
<div class="meta">
<span class="key">考试得分</span>
<div class="val">
<input type="text" v-model.number="item.question_score" :disabled="!isReview || !item.isSub">
</div>
</div>
</div>
</div>
</div>
<div class="btns" v-if="isReview">
<button type="button" class="submit" @click="save(1)">提交</button>
<button type="button" @click="save(0)">保存</button>
</div>
</div>
</template>
<script>
import mixins from '@/mixins/setBackground'
import { mapState,mapGetters,mapActions } from 'vuex'
export default {
mixins: [ mixins ],
data() {
return {
paperName: '',
userName: '',
this_score: '',
duration: '',
list: [],
look: '1',
};
},
computed: {
...mapState('user', [
'userId','clientId'
]),
...mapState('assessment', [
'reviewId','paperId','isReview','reviewStatus','stuId'
]),
...mapGetters('assessment', [
'getCorrectingName'
])
},
watch: {
look(val,oldVal){
val == 1 ? this.getData() : this.getWrong()
}
},
mounted() {
this.getData()
},
methods: {
getData() {
this.$post(`${this.api.correcting}?assessmentId=${this.reviewId}&userId=${this.stuId}&paperId=${this.paperId}`)
.then(res => {
let list = res.data.list
list.forEach(n => {
n.isCorrecting == 0 && (n.question_score = '')
n.isSub = n.typeName == '简答题'
if(n.typeName == '填空题'){
let answer = []
for(let i in n){
if(i.includes('option_')) answer.push(n[i])
}
n.answer = answer.join('|')
n.user_answer = n.user_answer.replace(/&lt;&gt;/g,'|')
}
})
this.list = list
this.paperName = list[0].name
this.userName = list[0].userName
this.this_score = list[0].this_score
this.duration = list[0].duration
})
.catch(err => {})
},
getWrong(){
this.$post(`${this.api.getWrong}?assessmentId=${this.reviewId}&userId=${this.stuId}&paperId=${this.paperId}`)
.then(res => {
this.list = res.data.list
})
.catch(err => {})
},
save(status) {
let isEmpty = false
let isNotNum = false
let invalid = false
this.list.map(n => {
if(n.question_score === '') isEmpty = true
if(isNaN(n.question_score)) isNotNum = true
if(Number(n.question_score) > Number(n.question_points)) invalid = true
})
if(status){
if(isEmpty) return this.$message.warning('请批阅完所有题目')
if(isNotNum) return this.$message.warning('考试得分请输入数字')
}
if(invalid) return this.$message.warning('考试得分不得大于题目分数')
let data = {
review: [],
assessmentId: this.reviewId,
userId: this.stuId,
paperId: this.paperId,
teacherId: this.userId,
}
let totalScore = 0
this.list.map(n => {
n.question_score !== '' && n.isSub && data.review.push({
detailId: Number(n.detailId) ,
score: Number(n.question_score)
})
totalScore += Number(n.question_score)
})
if(!data.review.length) return this.$message.warning('请至少批阅一道题目')
if(status || this.list.filter(n => n.isSub).length == data.review.length){
data.totalScore = totalScore
}
this.$post(this.api.reviewByid,data).then(res => {
this.$message.success(status ? '提交成功' : '保存成功')
this.$router.back()
}).catch(err => {})
},
},
};
</script>
<style lang="scss" scoped>
.title{
text-align: center;
font-size: 18px;
font-weight: 600;
}
.metas{
display: flex;
justify-content: space-between;
margin: 20px 0 30px;
.name{
font-size: 12px;
color: #717171;
}
.val{
font-size: 12px;
color: #929292;
}
}
.wrap{
padding: 20px;
background-color: #fbfbfb;
.select{
padding: 10px;
margin-bottom: 20px;
border-bottom: 1px solid #f4f4f4;
}
.item{
padding-bottom: 30px;
margin-bottom: 30px;
border-bottom: 1px dashed #d2d2d2;
&:last-child{
border-bottom: 0;
}
.status{
color: #cb221c;
&.done{
color: #56d5bf;
}
}
.name{
margin-top: 15px;
font-size: 14px;
color: #555555;
}
.key{
font-weight: bold;
color: #333;
}
.val{
color: #757575;
}
.answer{
display: flex;
align-items: center;
padding: 15px;
margin: 15px 0;
font-size: 12px;
border: 1px solid #e8e8e8;
background-color: #f3f2f2;
.info{
display: inline-flex;
align-items: center;
margin-right: 30px;
}
}
.meta{
display: flex;
align-items: center;
padding-left: 10px;
margin: 10px 0;
font-size: 12px;
.key{
width: 80px;
margin-right: 10px;
text-align: right;
white-space: nowrap;
}
input{
width: 60px;
height: 28px;
padding: 0 5px;
margin-right: 5px;
color: #444;
background-color: #fff;
border: 1px solid #ebebeb;
box-sizing: border-box;
&:focus{
outline: none;
}
&:disabled{
background-color: #e8e8e8;
cursor: not-allowed;
}
}
}
.point{
.meta{
margin: 0;
}
}
}
}
</style>

@ -46,7 +46,7 @@ export default {
this.$router.push('/setting/person') this.$router.push('/setting/person')
}, },
loginout() { loginout() {
this.logout() this.logout(this.$router)
}, },
back(){ back(){
this.$router.back() this.$router.back()

@ -25,11 +25,10 @@ function createRoute(data){
} }
export default function(data,path){ export default function(data,path){
// generateBtnPermission(data) generateBtnPermission(data)
createRoute(data) createRoute(data)
let routes = router.options.routes let routes = router.options.routes
console.log(11,routes) routes[1].children = [...routes[1].children,...newRoutes]
// routes[1].children = [...routes[1].children,...newRoutes] store.auth.commit("addRoutes", { routes })
// store.auth.commit("addRoutes", { routes }) router.addRoutes(routes)
// router.addRoutes(routes)
} }

@ -2,20 +2,28 @@
<div class="box"> <div class="box">
<h1 class="title">{{paperName }}</h1> <h1 class="title">{{paperName }}</h1>
<div class="metas"> <div class="metas">
<div style="margin-right: 20px;"> <div class="m-r-20">
<span class="name">总分</span> <span class="name">总分</span>
<span class="val">100</span> <span class="val">100</span>
</div> </div>
<div> <div class="m-r-20" v-if="thisScore != null">
<span class="name">得分</span>
<span class="val">{{thisScore}}</span>
</div>
<div class="m-r-20">
<span class="name">考试时长</span> <span class="name">考试时长</span>
<span class="val">{{time}}分钟</span> <span class="val">{{time}}分钟</span>
</div> </div>
<div>
<span class="name">排名</span>
<span class="val">{{ranking === 0 ? 1 : ranking}}</span>
</div>
</div> </div>
<ul class="tab"> <ul class="tab">
<template v-for="(item,index) in tabs"> <!-- <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> <li v-for="(item,index) in tabs" :key="index" :class="{active: active == item.id}" @click="tabChange(item.id)">{{item.name}}</li>
</template> <!-- </template> -->
</ul> </ul>
<div class="wrap"> <div class="wrap">
@ -67,6 +75,7 @@ export default {
return { return {
paperName: '', paperName: '',
time: 0, time: 0,
ranking: 1,
selectVisible: false, selectVisible: false,
tabs: [ tabs: [
{ {
@ -100,7 +109,7 @@ export default {
'userId' 'userId'
]), ]),
...mapState('achievement', [ ...mapState('achievement', [
'id','assessmentId','stuId' 'id','assessmentId','stuId','thisScore'
]) ])
}, },
mounted() { mounted() {
@ -112,6 +121,7 @@ export default {
.then(res => { .then(res => {
this.paperName = res.paperName this.paperName = res.paperName
this.time = res.time this.time = res.time
this.ranking = res.ranking
this.allData = res.data this.allData = res.data
let tabs = this.tabs let tabs = this.tabs
res.data.list1.length || (tabs[0].show = false) res.data.list1.length || (tabs[0].show = false)

@ -69,7 +69,7 @@
<el-table-column prop="stuNo" label="学号" align="center"></el-table-column> <el-table-column prop="stuNo" label="学号" align="center"></el-table-column>
<el-table-column prop="thisScore" label="得分" align="center"></el-table-column> <el-table-column prop="thisScore" label="得分" align="center"></el-table-column>
<el-table-column prop="timeSpent" label="用时(分钟)" align="center"></el-table-column> <el-table-column prop="timeSpent" label="用时(分钟)" align="center"></el-table-column>
<el-table-column prop="totalDuration" label="考试时间" align="center"></el-table-column> <el-table-column prop="openingTime" label="考试时间" align="center"></el-table-column>
<el-table-column label="操作" align="center"> <el-table-column label="操作" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click="show(scope.row)">查看详情</el-button> <el-button type="text" @click="show(scope.row)">查看详情</el-button>
@ -181,7 +181,8 @@ export default {
this.setAssDetailInfo({ this.setAssDetailInfo({
id: row.paperId, id: row.paperId,
assessmentId: row.assessmentId, assessmentId: row.assessmentId,
stuId: row.stuId stuId: row.stuId,
thisScore: row.thisScore
}) })
this.$router.push('detail') this.$router.push('detail')
}, },
@ -192,7 +193,8 @@ export default {
assessmentId: this.assessmentId, assessmentId: this.assessmentId,
assessmentName: this.assessmentName, assessmentName: this.assessmentName,
classId: this.classId, classId: this.classId,
stuId: this.userId stuId: this.userId,
}) })
this.$router.push('statistics') this.$router.push('statistics')
}else{ }else{

@ -230,6 +230,7 @@ export default {
show(row){ show(row){
this.setPracDetailInfo({ this.setPracDetailInfo({
practiseId: this.practiseId, practiseId: this.practiseId,
score: row.score
}) })
this.$router.push('/practice/detail') this.$router.push('/practice/detail')
}, },

@ -6,16 +6,20 @@
<span class="name">总分</span> <span class="name">总分</span>
<span class="val">100</span> <span class="val">100</span>
</div> </div>
<div style="margin-right: 20px;">
<span class="name">得分</span>
<span class="val">{{thisScore}}</span>
</div>
<div> <div>
<span class="name">考试时长</span> <span class="name">考试时长</span>
<span class="val">{{time}}分钟</span> <span class="val">{{timeSpent}}分钟</span>
</div> </div>
</div> </div>
<ul class="tab"> <ul class="tab">
<template v-for="(item,index) in tabs"> <!-- <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> <li v-for="(item,index) in tabs" :key="index" :class="{active: active == item.id}" @click="tabChange(item.id)">{{item.name}}</li>
</template> <!-- </template> -->
</ul> </ul>
<div class="wrap"> <div class="wrap">
@ -100,7 +104,7 @@ export default {
'userId' 'userId'
]), ]),
...mapState('achievement', [ ...mapState('achievement', [
'id','assessmentId','stuId' 'id','assessmentId','stuId','timeSpent','thisScore'
]) ])
}, },
mounted() { mounted() {

@ -43,7 +43,6 @@
</el-select> </el-select>
</div> </div>
<div class="item"> <div class="item">
<p class="key">试卷用途</p>
<el-input placeholder="请输入学生姓名/学号" prefix-icon="el-icon-search" v-model="keyword" clearable size="small"></el-input> <el-input placeholder="请输入学生姓名/学号" prefix-icon="el-icon-search" v-model="keyword" clearable size="small"></el-input>
</div> </div>
</div> </div>
@ -60,12 +59,6 @@
header-align="center" header-align="center"
@selection-change="handleSelectionChange" @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"> <el-table-column type="index" width="100" label="序号" align="center">
<template <template
slot-scope="scope" slot-scope="scope"
@ -191,7 +184,7 @@ export default {
this.completed = list.completed this.completed = list.completed
this.notTested = list.notTested this.notTested = list.notTested
this.listData = list.list.list ? list.list.list : [] this.listData = list.list.list ? list.list.list : []
this.total = list.totalCount this.total = list.list.totalCount
}) })
.catch(err => { .catch(err => {
clearInterval(this.timer) clearInterval(this.timer)

@ -71,7 +71,7 @@
<el-table-column prop="stuNo" label="学号" align="center"></el-table-column> <el-table-column prop="stuNo" label="学号" align="center"></el-table-column>
<el-table-column prop="thisScore" label="得分" align="center"></el-table-column> <el-table-column prop="thisScore" label="得分" align="center"></el-table-column>
<el-table-column prop="timeSpent" label="用时(分钟)" align="center"></el-table-column> <el-table-column prop="timeSpent" label="用时(分钟)" align="center"></el-table-column>
<el-table-column prop="totalDuration" label="考试时间" align="center"></el-table-column> <el-table-column prop="openingTime" label="考试时间" align="center"></el-table-column>
<el-table-column label="操作" align="center"> <el-table-column label="操作" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click="show(scope.row)">查看详情</el-button> <el-button type="text" @click="show(scope.row)">查看详情</el-button>
@ -181,7 +181,9 @@ export default {
this.setAssDetailInfo({ this.setAssDetailInfo({
id: row.paperId, id: row.paperId,
assessmentId: row.assessmentId, assessmentId: row.assessmentId,
stuId: row.stuId stuId: row.stuId,
thisScore: row.thisScore,
timeSpent: row.timeSpent
}) })
this.$router.push('detail') this.$router.push('detail')
}, },
@ -194,7 +196,7 @@ export default {
classId: this.classId, classId: this.classId,
stuId: this.listData[0].stuId stuId: this.listData[0].stuId
}) })
this.$router.push('statistics') this.$router.push('/achievement/statistics')
}else{ }else{
this.$message.warning('没有考试成绩') this.$message.warning('没有考试成绩')
} }

@ -0,0 +1,320 @@
<template>
<div class="box">
<h1 class="title">{{paperName}}</h1>
<div class="metas">
<div style="margin-right: 20px;">
<span class="name">总分</span>
<span class="val">100</span>
</div>
<div>
<span class="name">考试时长</span>
<span class="val">{{totalDuration}}分钟</span>
</div>
</div>
<ul class="tab">
<!-- <template v-for="(item,index) in tabs"> -->
<li v-for="(item,index) in tabs" :key="index" :class="{active: active == item.id}" @click="tabChange(item.id)">{{item.name}}</li>
<!-- </template> -->
</ul>
<div class="wrap">
<div class="item" v-for="(item,index) in curType" :key="index">
<div class="answer">
<div class="info">
<p class="key">序号</p>
<p class="val">{{index+1}}</p>
</div>
</div>
<div class="meta">
<p class="key">题干</p>
<p class="val" v-html="item.questionStem"></p>
<div class="media" :id="item.mediaEleId"></div>
</div>
<div class="meta">
<p class="key">选项</p>
<div class="val">
<p v-for="(option,i) in item.options" :key="i">{{i}}.{{item.options[i]}}</p>
</div>
</div>
<div class="meta ans">
<div class="info">
<p class="key">正确答案</p>
<p class="val">{{item.answer}}</p>
</div>
</div>
<div class="meta">
<p class="key">答案解析</p>
<p class="val" v-html="item.answerAnalysis"></p>
</div>
</div>
</div>
</div>
</template>
<script>
import mixins from '@/mixins/setBackground'
import { mapState } from 'vuex'
export default {
props: ['data'],
mixins: [ mixins ],
data() {
return {
assPaperName: '',
assTotalDuration: 0,
selectVisible: false,
tabs: [
{
id: 1,
name: '单选题',
show: true
},{
id: 2,
name: '多选题',
show: true
},{
id: 3,
name: '填空题',
show: true
},{
id: 4,
name: '判断题',
show: true
},{
id: 5,
name: '简答题',
show: true
}
],
active: 1,
allData: {},
curType: []
};
},
computed: {
...mapState('user', [
'userId'
]),
...mapState('assessment', [
'id','paperName','totalDuration'
])
},
mounted() {
this.insertScript()
this.getData()
},
methods: {
getData() {
if(this.data){
this.initData(this.data)
}else{
this.$post(`${this.api.previewtestPaper}?id=${this.id}`)
.then(res => {
this.initData(res.data)
}).catch(err => {})
}
},
initData(data){
let index = 0
for(let i in data){
data[i].map(n => {
index++
n.mediaEleId = `player${index}`
})
}
this.allData = data
let tabs = this.tabs
data.list1.length || (tabs[0].show = false)
data.list2.length || (tabs[1].show = false)
data.list3.length || (tabs[2].show = false)
data.list4.length || (tabs[3].show = false)
data.list5.length || (tabs[4].show = false)
this.curType = this.allData.list1
this.handleOptions()
},
initMedia(item){
if(item.videoAudio && !item.player){
this.$get(`${this.api.getPlayAuth}/${item.videoAudio}`).then(res => {
let playAuth = res.data.playAuth
this.$nextTick(() => {
item.player = new Aliplayer({
id: item.mediaEleId,
width: '100%',
autoplay: false,
vid : item.videoAudio,
playauth : playAuth,
encryptType:1, //
})
})
}).catch(res => {})
}
},
tabChange(id){
this.active = id
this.curType = this.allData[`list${id}`]
this.handleOptions()
},
handleOptions(){
let curType = this.curType
curType.forEach(n => {
this.initMedia(n)
if(!n.options){
let options = {}
for(let i in n){
if(i.includes('option') && n[i]){
options[i.replace('option','')] = n[i]
}
}
n.options = options
}
})
this.curType = curType
},
insertScript(){
const linkTag = document.createElement('link')
linkTag.id = 'aliplayerLink'
linkTag.rel = 'stylesheet'
linkTag.href = 'https://g.alicdn.com/de/prismplayer/2.8.2/skins/default/aliplayer-min.css'
document.body.appendChild(linkTag)
const scriptTag = document.createElement('script')
scriptTag.id = 'aliplayerScript'
scriptTag.type = 'text/javascript'
scriptTag.src = 'https://g.alicdn.com/de/prismplayer/2.8.2/aliplayer-min.js'
document.body.appendChild(scriptTag)
this.$once('hook:beforeDestroy', function () {
document.body.removeChild(document.querySelector('#aliplayerLink'))
document.body.removeChild(document.querySelector('#aliplayerScript'))
})
},
},
};
</script>
<style lang="scss" scoped>
.box{
width: 90%;
margin: 0 auto;
}
.title{
text-align: center;
font-size: 18px;
font-weight: 600;
}
.metas{
display: flex;
justify-content: center;
margin: 20px 0 30px;
.name{
font-size: 12px;
color: #717171;
}
.val{
font-size: 12px;
color: #929292;
}
}
.tab{
display: flex;
align-items: center;
margin-bottom: 10px;
li{
position: relative;
padding: 0 44px;
margin-right: 7px;
font-size: 13px;
line-height: 46px;
text-align: center;
color: #444;
border: 1px solid #ececec;
cursor: pointer;
&:hover{
opacity: .8;
}
&.active:after{
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 4px;
background-color: $main-color;
}
}
}
.wrap{
.item{
padding-bottom: 30px;
margin-bottom: 30px;
border-bottom: 1px dashed #f4f4f4;
.key{
font-weight: bold;
color: #333;
font-size: 14px;
}
.val{
line-height: 1.6;
color: #757575;
font-size: 14px;
}
.answer{
display: flex;
align-items: center;
padding: 15px;
margin: 15px 0;
font-size: 12px;
border: 1px solid #e8e8e8;
background-color: #f3f2f2;
.info{
display: inline-flex;
align-items: center;
margin-right: 30px;
}
}
.meta{
padding-left: 10px;
margin: 20px 0;
font-size: 12px;
&.ans{
display: flex;
align-items: center;
.info{
margin-right: 20px;
}
}
.key{
margin-bottom: 5px;
}
.media{
margin-top: 10px;
}
}
}
}
.btns{
display: flex;
justify-content: center;
margin-top: 20px;
button{
height: 30px;
padding: 0 30px;
margin: 0 15px;
font-size: 14px;
color: #333;
line-height: 30px;
background-color: #fff;
border: 1px solid #ededed;
border-radius: 4px;
cursor: pointer;
&.submit{
color: #fff;
background-color: $main-color;
border-color: $main-color;
}
&:hover{
opacity: .8;
}
}
}
</style>

@ -30,7 +30,8 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="duration" label="考核时长(分钟)" align="center"></el-table-column> <el-table-column prop="duration" label="考核时长(分钟)" align="center"></el-table-column>
<el-table-column prop="createTime" label="创建时间" align="center"></el-table-column> <el-table-column prop="startTime" label="考试开始时间" align="center"></el-table-column>
<el-table-column prop="endTime" label="考试结束时间" align="center"></el-table-column>
<el-table-column prop="name" label="考核状态" align="center"> <el-table-column prop="name" label="考核状态" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{getStateName(scope.row.state)}} {{getStateName(scope.row.state)}}
@ -80,7 +81,7 @@
</el-card> </el-card>
<el-card shadow="hover" class="m-b-10"> <el-card shadow="hover" class="m-b-10">
<div class="title"><img src="../../../assets/img/index/class.png" alt=""> 学生管理</div> <div class="title"><img src="../../../assets/img/index/class.png" alt=""> 我的班级</div>
</el-card> </el-card>
<el-card shadow="hover" class="m-b-30"> <el-card shadow="hover" class="m-b-30">
@ -90,10 +91,10 @@
<p class="text">班级{{item.className}}</p> <p class="text">班级{{item.className}}</p>
<!-- <p class="text">人数30</p> --> <!-- <p class="text">人数30</p> -->
<!-- <p class="text">创建时间测试</p> --> <!-- <p class="text">创建时间测试</p> -->
<div class="action flex j-end"> <!-- <div class="action flex j-end">
<button class="edit" @click.stop="editClass(item)"></button> <button class="edit" @click.stop="editClass(item)"></button>
<button class="del" @click.stop="delClass(item)"></button> <button class="del" @click.stop="delClass(item)"></button>
</div> </div> -->
</li> </li>
</ul> </ul>
<div class="pagination"> <div class="pagination">
@ -157,7 +158,8 @@ import util from '@/libs/util'
export default { export default {
data() { data() {
return { return {
date: [util.formatDate('yyyy-MM-dd'),util.formatDate('yyyy-MM-dd')], timer: null,
date: [],
startTime: '', startTime: '',
endTime: '', endTime: '',
page: 1, page: 1,
@ -202,6 +204,12 @@ export default {
quill quill
}, },
mounted() { mounted() {
let now = util.formatDate('yyyy-MM-dd')
let second = util.formatDate('yyyy-MM-dd',new Date(new Date().getTime() + 86400000))
this.date = [now,second]
this.startTime = now
this.endTime = second
this.addInterval()
this.getData() this.getData()
this.getReview() this.getReview()
this.getClass() this.getClass()
@ -214,6 +222,12 @@ export default {
...mapActions('practice', [ ...mapActions('practice', [
'setClassInfo' 'setClassInfo'
]), ]),
addInterval(){
this.timer = setInterval(this.getData,1000)
this.$once('hook:beforeDestroy',() => {
clearInterval(this.timer)
})
},
getData() { getData() {
this.$post(`${this.api.waitExam}?userId=${this.userId}&pageNum=${this.page}&pageSize=${this.pageSize}&startTime=${this.startTime}&endTime=${this.endTime}`) this.$post(`${this.api.waitExam}?userId=${this.userId}&pageNum=${this.page}&pageSize=${this.pageSize}&startTime=${this.startTime}&endTime=${this.endTime}`)
.then(res => { .then(res => {
@ -348,7 +362,6 @@ export default {
} }
.review{ .review{
display: flex; display: flex;
justify-content: space-between;
li{ li{
width: 32%; width: 32%;
min-height: 180px; min-height: 180px;

@ -2,20 +2,24 @@
<div class="box"> <div class="box">
<h1 class="title">{{paperName }}</h1> <h1 class="title">{{paperName }}</h1>
<div class="metas"> <div class="metas">
<div style="margin-right: 20px;"> <div class="m-r-20">
<span class="name">总分</span> <span class="name">总分</span>
<span class="val">100</span> <span class="val">100</span>
</div> </div>
<div class="m-r-20" v-if="score != null">
<span class="name">得分</span>
<span class="val">{{score}}</span>
</div>
<div> <div>
<span class="name">考试时长</span> <span class="name">考试时长</span>
<span class="val">{{duration}}</span> <span class="val">{{duration}}分钟</span>
</div> </div>
</div> </div>
<ul class="tab"> <ul class="tab">
<template v-for="(item,index) in tabs"> <!-- <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> <li v-for="(item,index) in tabs" :key="index" :class="{active: active == item.id}" @click="tabChange(item.id)">{{item.name}}</li>
</template> <!-- </template> -->
</ul> </ul>
<div class="wrap"> <div class="wrap">
@ -102,7 +106,7 @@ export default {
'userId' 'userId'
]), ]),
...mapState('achievement', [ ...mapState('achievement', [
'practiseId','stuId' 'practiseId','stuId','score'
]) ])
}, },
mounted() { mounted() {

@ -3,6 +3,7 @@
<el-card shadow="hover" class="m-b-20"> <el-card shadow="hover" class="m-b-20">
<div> <div>
<div class="p-title m-b-20">筛选</div> <div class="p-title m-b-20">筛选</div>
<p class="class-name m-b-10" v-if="className">班级名称{{className}}</p>
<div class="flex"> <div class="flex">
<div> <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>
@ -51,7 +52,7 @@
<el-button type="text" slot="reference" @click="show(scope.row)" v-auth>查看</el-button> <el-button type="text" slot="reference" @click="show(scope.row)" v-auth>查看</el-button>
</el-popover>&nbsp; </el-popover>&nbsp;
<el-button type="text" @click="edit(scope.row)" v-auth>修改</el-button> <el-button type="text" @click="edit(scope.row)" v-auth>修改</el-button>
<el-button type="text" @click="delData(scope.row)" v-auth>取消</el-button> <el-button type="text" @click="delData(scope.row)" v-auth>删除</el-button>
<el-button type="text" @click="review(scope.row)" v-auth>批阅</el-button> <el-button type="text" @click="review(scope.row)" v-auth>批阅</el-button>
<el-button type="text" @click="scoreQuery(scope.row)" v-auth>成绩查询</el-button> <el-button type="text" @click="scoreQuery(scope.row)" v-auth>成绩查询</el-button>
</template> </template>
@ -221,7 +222,6 @@ export default {
]) ])
}, },
mounted() { mounted() {
this.className && (this.keyword = this.className)
this.getData() this.getData()
this.addEvent() this.addEvent()
}, },
@ -250,7 +250,8 @@ export default {
'setPracListInfo' 'setPracListInfo'
]), ]),
getData() { getData() {
let url = `${this.api.pageByName}?pageNum=${this.page}&pageSize=${this.pageSize}&practiseName=${this.keyword}&userId=${this.userId}` let url = `${this.api.pageByName}?pageNum=${this.page}&pageSize=${this.pageSize}&userId=${this.userId}`
if(this.keyword) url += `&practiseName=${this.keyword}`
if(this.classId) url += `&classId=${this.classId}` if(this.classId) url += `&classId=${this.classId}`
this.$post(url) this.$post(url)
.then(res => { .then(res => {
@ -360,6 +361,7 @@ export default {
addAss(){ addAss(){
this.isAdd = true this.isAdd = true
this.addVisible = true this.addVisible = true
this.stuCompKey++
}, },
save(){ save(){
let form = this.form let form = this.form
@ -457,6 +459,7 @@ export default {
}, },
addEvent(){ addEvent(){
this.$once('hook:beforeDestroy',() => { this.$once('hook:beforeDestroy',() => {
console.log(11)
this.setClassInfo({ this.setClassInfo({
classId: '', classId: '',
className: '' className: ''
@ -467,6 +470,10 @@ export default {
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.class-name{
font-size: 12px;
color: #444;
}
.details{ .details{
.line{ .line{
display: flex; display: flex;

@ -75,6 +75,7 @@
width="55" width="55"
align="center" align="center"
:reserve-selection="true" :reserve-selection="true"
:selectable="disabledSelection"
></el-table-column> ></el-table-column>
<el-table-column type="index" width="60" label="序号" align="center"> <el-table-column type="index" width="60" label="序号" align="center">
<template <template
@ -112,7 +113,7 @@
<ques-dialog ref="quesDialog" :title="topicsTitle" :visible.sync="visible" :isDetail.sync="isDetail" @getData="dialogGetData" @closeTopics="closeTopics"></ques-dialog> <ques-dialog ref="quesDialog" :title="topicsTitle" :visible.sync="visible" :isDetail.sync="isDetail" @getData="dialogGetData" @closeTopics="closeTopics"></ques-dialog>
<el-dialog title="批量导入" :visible.sync="importVisible" width="24%" center :close-on-click-modal="false"> <el-dialog title="批量导入" :visible.sync="importVisible" width="24%" center @close="closeImport" :close-on-click-modal="false">
<div style="text-align: center"> <div style="text-align: center">
<div style="margin-bottom: 10px;"><el-button type="primary" @click="downLoad">模板下载<i class="el-icon-download el-icon--right"></i></el-button></div> <div style="margin-bottom: 10px;"><el-button type="primary" @click="downLoad">模板下载<i class="el-icon-download el-icon--right"></i></el-button></div>
<el-upload <el-upload
@ -125,7 +126,7 @@
:on-exceed="handleExceed" :on-exceed="handleExceed"
:action="this.api.impExcel" :action="this.api.impExcel"
:file-list="uploadList" :file-list="uploadList"
:data="{userId: this.userId}" :data="{userId: this.userId,schoolId: this.clientId}"
name="file" name="file"
> >
<el-button type="primary" class="ml20">上传文件<i class="el-icon-upload2 el-icon--right"></i></el-button> <el-button type="primary" class="ml20">上传文件<i class="el-icon-upload2 el-icon--right"></i></el-button>
@ -190,7 +191,8 @@ export default {
pageNum: this.page, pageNum: this.page,
pageSize: this.pageSize, pageSize: this.pageSize,
questionStem: this.keyword, questionStem: this.keyword,
userId: this.userId userId: this.userId,
schoolId: this.clientId
}) })
.then(res => { .then(res => {
this.listData = util.removeHtmlTag(res.data.list.list,'questionStem') this.listData = util.removeHtmlTag(res.data.list.list,'questionStem')
@ -276,6 +278,11 @@ export default {
}).catch(res => {}) }).catch(res => {})
}).catch(() => {}) }).catch(() => {})
}, },
disabledSelection(row,index){
let list = this.listData
if(row.myShare) return false
return true
},
handleSelectionChange(val) { handleSelectionChange(val) {
this.multipleSelection = val this.multipleSelection = val
}, },
@ -401,16 +408,15 @@ export default {
handleDataRemove(file, fileList) { handleDataRemove(file, fileList) {
this.uploadList = fileList this.uploadList = fileList
}, },
closeImport(){
this.uploadList = []
},
uploadSure(){ uploadSure(){
this.importVisible = false this.importVisible = false
this.page = 1 this.page = 1
this.keyword = '' this.keyword = ''
this.getData() this.getData()
}, },
closeUpload() {
this.uploadList = []
this.uploadDataList = []
},
} }
}; };
</script> </script>

@ -32,6 +32,7 @@
<el-form-item label="上传" prop="source"> <el-form-item label="上传" prop="source">
<el-upload <el-upload
:accept="acceptExt" :accept="acceptExt"
:before-upload="handleUploadChange"
:on-remove="handleRemove" :on-remove="handleRemove"
:on-error="uploadError" :on-error="uploadError"
:on-success="uploadSuccess" :on-success="uploadSuccess"
@ -135,6 +136,7 @@ export default {
typeList: [], typeList: [],
topicForm: { topicForm: {
userId: this.userId, userId: this.userId,
schoolId: this.clientId,
cid : '', cid : '',
typeId: '', typeId: '',
courses: '', courses: '',
@ -170,15 +172,17 @@ export default {
questionType: ['','单选题','多选题','判断题','简答题','填空题'], questionType: ['','单选题','多选题','判断题','简答题','填空题'],
fillList: [''], fillList: [''],
uploadList: [], uploadList: [],
uploading: false
}; };
}, },
computed: { computed: {
...mapState('user', [ ...mapState('user', [
'userId' 'userId','clientId'
]) ])
}, },
components: { quill }, components: { quill },
mounted() { mounted() {
this.topicForm.schoolId = this.clientId
this.getQuesBank() this.getQuesBank()
}, },
methods: { methods: {
@ -189,6 +193,7 @@ export default {
this.topicForm = { this.topicForm = {
id: list.id, id: list.id,
userId: list.userId, userId: list.userId,
schoolId: this.clientId,
cid : list.cid, cid : list.cid,
typeId: list.typeId, typeId: list.typeId,
courses: list.courses, courses: list.courses,
@ -310,7 +315,7 @@ export default {
this.topicForm[`option${this.options[i]}`] = n this.topicForm[`option${this.options[i]}`] = n
}) })
} }
if(this.uploading) return this.$message.warning('视频正在上传,请稍等')
this.topicForm.userId = this.userId this.topicForm.userId = this.userId
if(this.topicForm.id) { if(this.topicForm.id) {
this.$post(this.api.updateQuestions,this.topicForm).then(res => { this.$post(this.api.updateQuestions,this.topicForm).then(res => {
@ -342,6 +347,7 @@ export default {
resetForm() { resetForm() {
this.topicForm = { this.topicForm = {
userId: this.userId, userId: this.userId,
schoolId: this.clientId,
cid : '', cid : '',
typeId: '', typeId: '',
courses: '', courses: '',
@ -392,12 +398,14 @@ export default {
) )
}, },
uploadSuccess(res, file, fileList) { uploadSuccess(res, file, fileList) {
this.uploading = false
this.topicForm.videoAudio = res.data.filesResult.fileId this.topicForm.videoAudio = res.data.filesResult.fileId
}, },
showFaild(){ showFaild(){
location.href = `${this.api.export_failure}?token=${this.token}` location.href = `${this.api.export_failure}?token=${this.token}`
}, },
uploadError(err, file, fileList) { uploadError(err, file, fileList) {
this.uploading = false
this.$message({ this.$message({
message: "上传出错,请重试!", message: "上传出错,请重试!",
type: "error", type: "error",
@ -407,6 +415,9 @@ export default {
beforeRemove(file, fileList) { beforeRemove(file, fileList) {
return this.$confirm(`确定移除 ${file.name}`); return this.$confirm(`确定移除 ${file.name}`);
}, },
handleUploadChange(){
this.uploading = true
},
handleRemove(file, fileList) { handleRemove(file, fileList) {
this.uploadList = fileList this.uploadList = fileList
}, },

@ -338,7 +338,7 @@ export default {
}, },
methods: { methods: {
...mapActions('user', [ ...mapActions('user', [
'setAvatar' 'setAvatar','setUserName'
]), ]),
getProvince(){ getProvince(){
this.$get(this.api.queryProvince).then(res => { this.$get(this.api.queryProvince).then(res => {
@ -457,6 +457,7 @@ export default {
let data = userInfoEntity let data = userInfoEntity
this.$post(this.api.userinfoUpdate,data).then(res => { this.$post(this.api.userinfoUpdate,data).then(res => {
if(res.success){ if(res.success){
this.setUserName(personalInformation.userName)
this.$message.success('提交成功') this.$message.success('提交成功')
this.$router.back() this.$router.back()
}else{ }else{

@ -2,7 +2,7 @@
<div> <div>
<el-container> <el-container>
<el-aside width="350px"> <el-aside width="350px">
<StudentSide ref="getSelectData" @fircheck="fircheck" @twocheck="twocheck" @threecheck="threecheck"></StudentSide> <StudentSide ref="getSelectData" @fircheck="fircheck" @twocheck="twocheck" @threecheck="threecheck" @getData="getData"></StudentSide>
</el-aside> </el-aside>
<el-main style="padding-top: 0"> <el-main style="padding-top: 0">

@ -193,6 +193,7 @@ export default {
e.label = this.Form.classmajorName e.label = this.Form.classmajorName
} }
}) })
this.$emit('getData')
}).catch(res => {}) }).catch(res => {})
}else{ }else{
this.$post(this.api.addStudentProfessionalArchitecture,data).then(res => { this.$post(this.api.addStudentProfessionalArchitecture,data).then(res => {
@ -255,7 +256,7 @@ export default {
}, },
sureDepartment(){ sureDepartment(){
if(!this.Form2.departmentName) return this.$message.warning('请输入年级名称') if(!this.Form2.departmentName) return this.$message.warning('请输入年级名称')
if(isNaN(this.Form2.departmentName)) return this.$message.warning('年级名称必须为数字') // if(isNaN(this.Form2.departmentName)) return this.$message.warning('')
let data = { let data = {
gradeName: this.Form2.departmentName, gradeName: this.Form2.departmentName,
gradeId: this.Form2.departmentId, gradeId: this.Form2.departmentId,
@ -273,6 +274,7 @@ export default {
} }
}) })
}) })
this.$emit('getData')
}).catch(res => {}) }).catch(res => {})
}else{ }else{
this.$post(this.api.addGrade,data).then(res => { this.$post(this.api.addGrade,data).then(res => {
@ -353,7 +355,7 @@ export default {
}, },
sureClass(){ sureClass(){
if(!this.Form3.className) return this.$message.warning('请输入班级名称') if(!this.Form3.className) return this.$message.warning('请输入班级名称')
if(isNaN(this.Form3.className)) return this.$message.warning('班级名称必须为数字') // if(isNaN(this.Form3.className)) return this.$message.warning('')
let data = { let data = {
className: this.Form3.className, className: this.Form3.className,
classId: this.Form3.classId, classId: this.Form3.classId,
@ -373,6 +375,7 @@ export default {
}) })
}) })
}) })
this.$emit('getData')
}).catch(res => {}) }).catch(res => {})
}else{ }else{
this.$post(this.api.addClass,data).then(res => { this.$post(this.api.addClass,data).then(res => {

@ -104,7 +104,250 @@ export default {
isAdd: true, isAdd: true,
roleVisible: false, roleVisible: false,
searchTimer: null, searchTimer: null,
permissions: [], permissions: [
{
id: 111,
name: '学生管理',
children: [
{
id: 1,
name: '新增学生'
},{
id: 2,
name: '批量导入'
},{
id: 3,
name: '批量删除'
},{
id: 4,
name: '编辑'
},{
id: 5,
name: '重置密码'
},{
id: 6,
name: '删除'
},
]
},{
id: 7,
name: '题库管理',
children: [
{
id: 8,
name: '我上传的题库',
children: [
{
id: 8,
name: '新增'
},{
id: 10,
name: '批量删除'
},{
id: 11,
name: '编辑'
},{
id: 12,
name: '删除'
},
]
},{
id: 13,
name: '公共题库',
children: [
{
id: 14,
name: '新增'
},{
id: 15,
name: '批量删除'
},{
id: 16,
name: '编辑'
},{
id: 17,
name: '删除'
},
]
}
]
},{
id: 18,
name: '试卷管理',
children: [
{
id: 19,
name: '我的试卷',
children: [
{
id: 20,
name: '新增'
},{
id: 21,
name: '批量删除'
},{
id: 22,
name: '编辑'
},{
id: 23,
name: '删除'
},
]
},{
id: 24,
name: '所有试卷',
children: [
{
id: 25,
name: '新增'
},{
id: 27,
name: '编辑'
},{
id: 28,
name: '删除'
},
]
}
]
},{
id: 29,
name: '练习管理',
children: [
{
id: 30,
name: '新增'
},{
id: 32,
name: '编辑'
},{
id: 33,
name: '删除'
},
]
},{
id: 34,
name: '考核管理',
children: [
{
id: 35,
name: '新增'
},{
id: 38,
name: '编辑'
},{
id: 40,
name: '删除'
},
]
},{
id: 41,
name: '成绩管理',
children: [
{
id: 42,
name: '练习成绩',
children: [
{
id: 43,
name: '新增'
},{
id: 44,
name: '批量删除'
},{
id: 45,
name: '编辑'
},{
id: 46,
name: '删除'
},
]
},{
id: 47,
name: '考试成绩',
children: [
{
id: 48,
name: '新增'
},{
id: 49,
name: '批量删除'
},{
id: 50,
name: '编辑'
},{
id: 51,
name: '删除'
},
]
},{
id: 1,
name: '错题收藏',
children: [
{
id: 52,
name: '新增'
},{
id: 54,
name: '批量删除'
},{
id: 55,
name: '编辑'
},{
id: 56,
name: '删除'
},
]
}
]
},{
id: 57,
name: '系统设置',
children: [
{
id: 58,
name: '员工管理',
children: [
{
id: 59,
name: '新增'
},{
id: 60,
name: '批量删除'
},{
id: 61,
name: '编辑'
},{
id: 62,
name: '删除'
},
]
},{
id: 63,
name: '角色权限',
children: [
{
id: 64,
name: '新增'
},{
id: 65,
name: '批量删除'
},{
id: 66,
name: '编辑'
},{
id: 67,
name: '删除'
},
]
}
]
},{
id: 68,
name: '交流互动',
children: []
},
],
checkedIds: [] checkedIds: []
}; };
}, },
@ -144,8 +387,8 @@ export default {
remark : '', remark : '',
id: '' id: ''
} }
this.checkedIds = [] // this.checkedIds = []
this.permissions = [] // this.permissions = []
}, },
currentChange(val) { currentChange(val) {
this.pageNo = val; this.pageNo = val;
@ -154,7 +397,7 @@ export default {
getPer(){ getPer(){
if(!this.permissions.length){ if(!this.permissions.length){
this.$get(this.api.queryPermissionMenu).then(res => { this.$get(this.api.queryPermissionMenu).then(res => {
this.permissions = res.data.children[0].children // this.permissions = res.data.children[0].children
}).catch(res => {}) }).catch(res => {})
} }
}, },
@ -162,7 +405,7 @@ export default {
this.isAdd = true this.isAdd = true
this.getPer() this.getPer()
this.checkedIds = [] this.checkedIds = []
this.permissions.length && this.$refs.per.setCheckedNodes([]) // this.permissions.length && this.$refs.per.setCheckedNodes([])
this.roleVisible = true this.roleVisible = true
}, },
handleRolePer(data,permissions){ handleRolePer(data,permissions){
@ -185,7 +428,7 @@ export default {
let perRes = await this.$get(`${this.api.toAssign}/${row.id}`) let perRes = await this.$get(`${this.api.toAssign}/${row.id}`)
if(perRes.success){ if(perRes.success){
this.checkedIds = this.handleRolePer(perRes.data.rolePermissions,this.permissions) this.checkedIds = this.handleRolePer(perRes.data.rolePermissions,this.permissions)
this.$refs.per.setCheckedNodes(this.checkedIds) // this.$refs.per.setCheckedNodes(this.checkedIds)
} }
} }
}, },

@ -71,29 +71,29 @@
<div class="line"> <div class="line">
<div class="item"> <div class="item">
<p class="label">单选题</p> <p class="label">单选题</p>
<input type="text" :disabled="singleDisabled || type == 1" v-model.number="singleCount"> <input type="text" disabled v-model.number="singleCount">
<input type="text" :disabled="singleDisabled" v-model.number="singleChoiceScore" v-disabled="'单项选择'"> / <input type="text" :disabled="singleDisabled" v-model.number="singleChoiceScore" v-disabled="'单项选择'"> /
</div> </div>
<div class="item"> <div class="item">
<p class="label">多选题</p> <p class="label">多选题</p>
<input type="text" :disabled="multipleDisabled || type == 1" v-model.number="multipleCount" v-disabled="'多项选择'"> <input type="text" disabled v-model.number="multipleCount" v-disabled="'多项选择'">
<input type="text" :disabled="multipleDisabled" v-model.number="multipleChoiceScore" v-disabled="'多项选择'"> / <input type="text" :disabled="multipleDisabled" v-model.number="multipleChoiceScore" v-disabled="'多项选择'"> /
</div> </div>
<div class="item"> <div class="item">
<p class="label">填空题</p> <p class="label">填空题</p>
<input type="text" :disabled="fillBlankDisabled || type == 1" v-model.number="fillBlankCount" v-disabled="'填空题'"> <input type="text" disabled v-model.number="fillBlankCount" v-disabled="'填空题'">
<input type="text" :disabled="fillBlankDisabled" v-model.number="fillBlanksScore" v-disabled="'填空题'"> / <input type="text" :disabled="fillBlankDisabled" v-model.number="fillBlanksScore" v-disabled="'填空题'"> /
</div> </div>
</div> </div>
<div class="line"> <div class="line">
<div class="item"> <div class="item">
<p class="label">判断题</p> <p class="label">判断题</p>
<input type="text" :disabled="judgeDisabled || type == 1" v-model.number="judgeCount" v-disabled="'判断题'"> <input type="text" disabled v-model.number="judgeCount" v-disabled="'判断题'">
<input type="text" :disabled="judgeDisabled" v-model.number="judgeScore" v-disabled="'判断题'"> / <input type="text" :disabled="judgeDisabled" v-model.number="judgeScore" v-disabled="'判断题'"> /
</div> </div>
<div class="item"> <div class="item">
<p class="label">简答题</p> <p class="label">简答题</p>
<input type="text" :disabled="briefDisabled || type == 1" v-model.number="briefCount" v-disabled="'简答题'"> <input type="text" disabled v-model.number="briefCount" v-disabled="'简答题'">
<input type="text" :disabled="briefDisabled" v-model.number="briefAnswerScore" v-disabled="'简答题'"> / <input type="text" :disabled="briefDisabled" v-model.number="briefAnswerScore" v-disabled="'简答题'"> /
</div> </div>
<div class="item"> <div class="item">
@ -137,7 +137,7 @@
<el-form-item class="no-mb" label="所属题库"> <el-form-item class="no-mb" label="所属题库">
<el-select v-model="selectManual.typeName" clearable placeholder="请选择所属题库" @change="getManualData"> <el-select v-model="selectManual.typeName" clearable placeholder="请选择所属题库" @change="getManualData">
<el-option label="不限" value=""></el-option> <el-option label="不限" value=""></el-option>
<el-option v-for="(item,index) in quesBankList" :key="index" :label="item.typeName" :value="item.cid"></el-option> <el-option v-for="(item,index) in quesBankList" :key="index" :label="item.typeName" :value="item.typeName"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-form> </el-form>

@ -43,5 +43,11 @@ export default {
component: () => import('@/pages/assessment/monitor'), component: () => import('@/pages/assessment/monitor'),
meta: { title: '考试监控' } meta: { title: '考试监控' }
}, },
{
name: `${pre}show`,
path: `show`,
component: () => import('@/pages/assessment/show'),
meta: { title: '批阅详情' }
},
] ]
}; };

@ -28,6 +28,11 @@ export default {
path: `show`, path: `show`,
component: () => import('@/pages/testPaper/show'), component: () => import('@/pages/testPaper/show'),
meta: { title: '试卷预览' } meta: { title: '试卷预览' }
} },{
name: `${pre}doReview`,
path: `doReview`,
component: () => import('@/components/doReview'),
meta: { title: '批改' }
},
] ]
}; };

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

@ -16,7 +16,7 @@ const Setting = {
showProgressBar: true, showProgressBar: true,
// 接口请求地址 // 接口请求地址
// apiBaseURL: env === 'development' ? 'http://192.168.31.152:8001' : 'http://39.108.250.202:8000/', // apiBaseURL: env === 'development' ? 'http://192.168.31.152:8001' : 'http://39.108.250.202:8000/',
apiBaseURL: env === 'development' ? 'http://192.168.31.152:8001' : 'http://39.108.250.202:9000', apiBaseURL: env === 'development' ? 'http://39.108.250.202:9000' : 'http://39.108.250.202:9000',
// oss文件管理接口地址 // oss文件管理接口地址
apiUploadURL: 'http://8.134.8.197:8001', apiUploadURL: 'http://8.134.8.197:8001',
// 接口请求返回错误时,弹窗的持续时间,单位:秒 // 接口请求返回错误时,弹窗的持续时间,单位:秒
@ -51,7 +51,7 @@ const Setting = {
* */ * */
layout: { layout: {
// 需要隐藏顶栏的页面路径 // 需要隐藏顶栏的页面路径
hideNavList: ['testPaper-add','testPaper-review','testPaper-show','testPaper-doReview','assessment-review','assessment-scoreQuery','assessment-detail','assessment-monitor','achievement-show','achievement-statistics','achievement-detail','setting-person','practice-review','practice-scoreQuery','practice-result','practice-detail','practice-doReview'], hideNavList: ['testPaper-add','testPaper-review','testPaper-show','testPaper-doReview','assessment-show','assessment-review','assessment-scoreQuery','assessment-detail','assessment-monitor','achievement-show','achievement-statistics','achievement-detail','setting-person','practice-review','practice-scoreQuery','practice-result','practice-detail','practice-doReview'],
}, },
/** /**
* 功能配置 * 功能配置

@ -15,7 +15,10 @@ export default {
classNameAss: '', classNameAss: '',
practiseId: '', practiseId: '',
practiceIdAss: '', practiceIdAss: '',
practiceNameAss: '' practiceNameAss: '',
thisScore: '',
timeSpent: '',
score: 0
}, },
getters: { getters: {
@ -27,6 +30,8 @@ export default {
state.assessmentId = info.assessmentId state.assessmentId = info.assessmentId
state.assessmentName = info.assessmentName state.assessmentName = info.assessmentName
state.classId = info.classId state.classId = info.classId
state.thisScore = info.thisScore
state.timeSpent = info.timeSpent
}, },
SET_ASS_LIST_INFO: (state, info) => { SET_ASS_LIST_INFO: (state, info) => {
state.assessmentIdAss = info.assessmentIdAss state.assessmentIdAss = info.assessmentIdAss
@ -37,6 +42,7 @@ export default {
SET_RRAC_DETAIL_INFO: (state, info) => { SET_RRAC_DETAIL_INFO: (state, info) => {
state.practiseId = info.practiseId state.practiseId = info.practiseId
state.stuId = info.stuId state.stuId = info.stuId
state.score = info.score
}, },
SET_PRAC_LIST_INFO: (state, info) => { SET_PRAC_LIST_INFO: (state, info) => {
state.practiceIdAss = info.practiceIdAss state.practiceIdAss = info.practiceIdAss

@ -87,10 +87,11 @@ export default {
}) })
}) })
}, },
logout({ commit, state, dispatch }) { logout({ commit, state, dispatch },router) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
util.session.remove(Setting.usernameKey); util.session.remove(Setting.usernameKey);
util.session.remove(Setting.storeKey); util.session.remove(Setting.storeKey);
// router.push('/login')
location.reload() location.reload()
resolve() resolve()
}) })
@ -103,5 +104,8 @@ export default {
} }
post(api.userinfoUpdate,data).then(res => {}).catch(res => {}) post(api.userinfoUpdate,data).then(res => {}).catch(res => {})
}, },
setUserName({ state,commit },userName) {
commit('SET_USERNAME',userName)
},
} }
} }
Loading…
Cancel
Save