yujialong 4 years ago
parent a9988dcf0a
commit cef13a9d86
  1. 14
      src/api/index.js
  2. 286
      src/components/doReview/index.vue
  3. 25
      src/components/testPaperDetail/index.vue
  4. 9
      src/libs/route/addRoutes.js
  5. 4
      src/pages/account/login/index.vue
  6. 25
      src/pages/achievement/detail/index.vue
  7. 3
      src/pages/achievement/list/examResults.vue
  8. 0
      src/pages/achievement/statistics/index.vue
  9. 25
      src/pages/assessment/detail/index.vue
  10. 66
      src/pages/assessment/list/index.vue
  11. 21
      src/pages/assessment/list/studentSide.vue
  12. 63
      src/pages/assessment/list/studentTree.vue
  13. 4
      src/pages/assessment/monitor/index.vue
  14. 17
      src/pages/assessment/review/index.vue
  15. 176
      src/pages/assessment/scoreQuery/index.vue
  16. 33
      src/pages/exception/error/403/index.vue
  17. 33
      src/pages/exception/error/404/index.vue
  18. 19
      src/pages/index/list/index.vue
  19. 25
      src/pages/practice/detail/index.vue
  20. 38
      src/pages/practice/list/index.vue
  21. 6
      src/pages/practice/list/studentSide.vue
  22. 37
      src/pages/practice/list/studentTree.vue
  23. 164
      src/pages/practice/scoreQuery/index.vue
  24. 2
      src/pages/quesBank/list/globalQuesBank.vue
  25. 216
      src/pages/quesBank/list/myQuesBank.vue
  26. 13
      src/pages/quesBank/list/quesDialog.vue
  27. 68
      src/pages/testPaper/add/index.vue
  28. 23
      src/pages/testPaper/show/index.vue
  29. 2
      src/router/modules/achievement.js
  30. 2
      src/router/modules/assessment.js
  31. 2
      src/router/modules/practice.js
  32. 14
      src/router/modules/testPaper.js
  33. 12
      src/router/permission.js
  34. 9
      src/store/modules/practice.js

@ -47,8 +47,8 @@ export default {
queryStudent: `management/student/list`, queryStudent: `management/student/list`,
updateStudent: `management/student/updateStudent`, updateStudent: `management/student/updateStudent`,
studentGetWorkNumber: `management/student/getWorkNumber`, studentGetWorkNumber: `management/student/getWorkNumber`,
exportFailureStudent: `management/student/exportFailure`, exportFailureStudent: `${Setting.apiBaseURL}/management/student/exportFailure`,
uploadFileStudent: `management/student/uploadFile`, uploadFileStudent: `${Setting.apiBaseURL}/management/student/uploadFile`,
downloadStudentTemp: 'http://liuwanr.oss-cn-shenzhen.aliyuncs.com/xlsx/20201102/1604658660956.xlsx', downloadStudentTemp: 'http://liuwanr.oss-cn-shenzhen.aliyuncs.com/xlsx/20201102/1604658660956.xlsx',
// 一级部门 // 一级部门
@ -72,8 +72,8 @@ export default {
queryStaff: `management/staff/managementList`, queryStaff: `management/staff/managementList`,
updateStaff: `management/staff/updateStaff`, updateStaff: `management/staff/updateStaff`,
getWorkNumber: `management/staff/getWorkNumber`, getWorkNumber: `management/staff/getWorkNumber`,
exportFailureStaff: `management/staff/exportFailure`, exportFailureStaff: `${Setting.apiBaseURL}/management/staff/exportFailure`,
uploadFileStaff: `management/staff/uploadFile`, uploadFileStaff: `${Setting.apiBaseURL}/management/staff/uploadFile`,
downloadStaffTemp: `http://liuwanr.oss-cn-shenzhen.aliyuncs.com/xlsx/20201102/1604658763812.xlsx`, downloadStaffTemp: `http://liuwanr.oss-cn-shenzhen.aliyuncs.com/xlsx/20201102/1604658763812.xlsx`,
// 角色管理 // 角色管理
@ -88,6 +88,7 @@ export default {
toAssign: `management/permission/toAssign`, toAssign: `management/permission/toAssign`,
getTypeByOneLever:`cjEnterprise/questionBank/getTypeByOneLever`, getTypeByOneLever:`cjEnterprise/questionBank/getTypeByOneLever`,
getCourses:`management/testPaper/getCourses`,
typesList:`cjEnterprise/questionTypes/typesList`, typesList:`cjEnterprise/questionTypes/typesList`,
// 共享相关 // 共享相关
deleteBySharing:`management/questionSharing/deleteBySharing`, deleteBySharing:`management/questionSharing/deleteBySharing`,
@ -117,10 +118,12 @@ export default {
// 试题信息相关 // 试题信息相关
addQuestions:`management/questions/addQuestions`, addQuestions:`management/questions/addQuestions`,
fuzzyQuery:`management/questions/fuzzyQuery`, fuzzyQuery:`management/questions/fuzzyQuery`,
queryKnowledgePoints:`management/questions/queryKnowledgePoints`,
getSelectInfo:`management/questions/getSelectInfo`, getSelectInfo:`management/questions/getSelectInfo`,
pageByChoiceList:`management/questions/pageByChoiceList`, pageByChoiceList:`management/questions/pageByChoiceList`,
statistical:`management/questions/statistical`, statistical:`management/questions/statistical`,
getQuestionListBySelect:`management/questions/getQuestionListBySelect`, getQuestionListBySelect:`management/questions/getQuestionListBySelect`,
listByPage:`cjEnterprise/questionBank/listByPage`,
// 考核管理 // 考核管理
addAssessment:`/management/assessment/addAssessment`, addAssessment:`/management/assessment/addAssessment`,
@ -146,7 +149,7 @@ export default {
pageByCondition:`cjEnterprise/questions/pageByCondition`, pageByCondition:`cjEnterprise/questions/pageByCondition`,
updateQuestions:`cjEnterprise/questions/update`, updateQuestions:`cjEnterprise/questions/update`,
getExcel:`cjEnterprise/questions/getExcel`, getExcel:`cjEnterprise/questions/getExcel`,
impExcel:`management/questions/impExcel`, impExcel:`${Setting.apiBaseURL}/management/questions/impExcel`,
// 考核成绩管理 // 考核成绩管理
answerDetail:`management/paperRecord/answerDetail`, answerDetail:`management/paperRecord/answerDetail`,
@ -156,6 +159,7 @@ export default {
savepaperRecord:`management/paperRecord/save`, savepaperRecord:`management/paperRecord/save`,
teacherByGetAchievement:`management/paperRecord/teacherByGetAchievement`, teacherByGetAchievement:`management/paperRecord/teacherByGetAchievement`,
achievementStatistics:`/management/paperRecord/achievementStatistics`, achievementStatistics:`/management/paperRecord/achievementStatistics`,
exportAssessment:`/management/paperRecord/export`,
// 留言板 // 留言板
delComment:`/management/messageBoard/delComment`, delComment:`/management/messageBoard/delComment`,

@ -1,286 +0,0 @@
<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>

@ -13,7 +13,9 @@
</div> </div>
<ul class="tab"> <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> </ul>
<div class="wrap"> <div class="wrap">
@ -63,19 +65,24 @@ export default {
tabs: [ tabs: [
{ {
id: 1, id: 1,
name: '单选题' name: '单选题',
show: true
},{ },{
id: 2, id: 2,
name: '多选题' name: '多选题',
show: true
},{ },{
id: 3, id: 3,
name: '填空题' name: '填空题',
show: true
},{ },{
id: 4, id: 4,
name: '判断题' name: '判断题',
show: true
},{ },{
id: 5, id: 5,
name: '简答题' name: '简答题',
show: true
} }
], ],
active: 1, active: 1,
@ -115,6 +122,12 @@ export default {
}) })
} }
this.allData = data 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.curType = this.allData.list1
this.handleOptions() this.handleOptions()
}, },

@ -25,10 +25,11 @@ 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
routes[1].children = [...routes[1].children,...newRoutes] console.log(11,routes)
store.auth.commit("addRoutes", { routes }) // routes[1].children = [...routes[1].children,...newRoutes]
router.addRoutes(routes) // store.auth.commit("addRoutes", { routes })
// router.addRoutes(routes)
} }

@ -59,7 +59,7 @@ export default {
return { return {
loginForm: { loginForm: {
username: 'manager', username: 'manager',
password: 'huoran123', password: '111aaa',
}, },
loginRules: { loginRules: {
username: [{ required: true, message: '请输入用户名', trigger: 'blur' }], username: [{ required: true, message: '请输入用户名', trigger: 'blur' }],
@ -92,7 +92,7 @@ export default {
password: this.loginForm.password password: this.loginForm.password
} }
this.login(data).then(() => { 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) this.$router.replace(redirect)
}).catch(() => {}) }).catch(() => {})
} }

@ -13,7 +13,9 @@
</div> </div>
<ul class="tab"> <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> </ul>
<div class="wrap"> <div class="wrap">
@ -69,19 +71,24 @@ export default {
tabs: [ tabs: [
{ {
id: 1, id: 1,
name: '单选题' name: '单选题',
show: true
},{ },{
id: 2, id: 2,
name: '多选题' name: '多选题',
show: true
},{ },{
id: 3, id: 3,
name: '判断题' name: '判断题',
show: true
},{ },{
id: 4, id: 4,
name: '简答题' name: '简答题',
show: true
},{ },{
id: 5, id: 5,
name: '填空题' name: '填空题',
show: true
} }
], ],
active: 1, active: 1,
@ -106,6 +113,12 @@ export default {
this.paperName = res.paperName this.paperName = res.paperName
this.time = res.time this.time = res.time
this.allData = res.data 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.curType = this.allData.list1
this.handleOptions() this.handleOptions()
}) })

@ -91,6 +91,7 @@
</template> </template>
<script> <script>
import { mapState,mapActions } from 'vuex' import { mapState,mapActions } from 'vuex'
import Setting from '@/setting'
export default { export default {
data() { data() {
return { return {
@ -199,7 +200,7 @@ export default {
} }
}, },
exportData(){ exportData(){
location.href = `${Setting.apiBaseURL}${this.api.exportAssessment}?assessmentId=${this.assessmentId}&classId=${this.classId}&userId=${this.userId}`
}, },
} }
}; };

@ -13,7 +13,9 @@
</div> </div>
<ul class="tab"> <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> </ul>
<div class="wrap"> <div class="wrap">
@ -69,19 +71,24 @@ export default {
tabs: [ tabs: [
{ {
id: 1, id: 1,
name: '单选题' name: '单选题',
show: true
},{ },{
id: 2, id: 2,
name: '多选题' name: '多选题',
show: true
},{ },{
id: 3, id: 3,
name: '判断题' name: '判断题',
show: true
},{ },{
id: 4, id: 4,
name: '简答题' name: '简答题',
show: true
},{ },{
id: 5, id: 5,
name: '填空题' name: '填空题',
show: true
} }
], ],
active: 1, active: 1,
@ -106,6 +113,12 @@ export default {
this.paperName = res.paperName this.paperName = res.paperName
this.time = res.time this.time = res.time
this.allData = res.data 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.curType = this.allData.list1
this.handleOptions() this.handleOptions()
}) })

@ -139,7 +139,7 @@
</el-tag> </el-tag>
</el-form-item> </el-form-item>
<el-form-item label="发布班级"> <el-form-item label="发布班级">
<studentSide ref="getSelectData" :classId="form.classId" :studentId="form.studentId" :key="stuCompKey" @fircheck="fircheck" @twocheck="twocheck" @threecheck="threecheck" @fourcheck="fourcheck"></studentSide> <studentSide ref="getSelectData" :classId="form.classId" :studentId="form.studentId" :key="stuCompKey" @fircheck="fircheck" @twocheck="twocheck" @threecheck="threecheck"></studentSide>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -153,8 +153,8 @@
<div class="flex j-end m-b-20"> <div class="flex j-end m-b-20">
<el-form label-width="80px" inline> <el-form label-width="80px" inline>
<el-form-item class="no-mb" label="所属课程"> <el-form-item class="no-mb" label="所属课程">
<el-select v-model="cid" clearable placeholder="请选择所属课程" > <el-select v-model="cid" clearable placeholder="请选择所属课程" @change="getPapers">
<el-option v-for="(item,index) in coursesList" :key="index" :label="item.typeName" :value="item.cid"></el-option> <el-option v-for="(item,index) in coursesList" :key="index" :label="item" :value="item"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item class="no-mb"> <el-form-item class="no-mb">
@ -376,17 +376,10 @@ export default {
r.children.forEach( n => { r.children.forEach( n => {
if(n.ischeck){ if(n.ischeck){
classIds.push(n.classId) classIds.push(n.classId)
studentId = studentId.concat(n.userIds)
}else{ }else{
util.removeByValue(classIds, n.classId); util.removeByValue(classIds, n.classId);
} }
n.children.forEach( j => {
if(j.ischeck){
studentId.push(j.userId)
}else{
util.removeByValue(studentId, j.userId);
}
})
}) })
}) })
}) })
@ -395,15 +388,18 @@ export default {
}, },
fircheck(val,val2){ fircheck(val,val2){
val.ischeck = !val.ischeck val.ischeck = !val.ischeck
val.children.map( e => e.ischeck = val.ischeck) if(val.children){
val.children.map( e => e.children.map(n => n.ischeck = e.ischeck)) val.children.map( e => e.ischeck = val.ischeck)
val.children.map( e => e.children.map(n => n.children.map(j => j.ischeck = e.ischeck))) val.children.map( e => e.children.map(n => n.ischeck = e.ischeck))
this.handleCheck(val2) this.handleCheck(val2)
}else{
this.form.classId = val.classId
this.form.studentId = val.userIds
}
}, },
twocheck(val,val2){ twocheck(val,val2){
val.ischeck = !val.ischeck val.ischeck = !val.ischeck
val.children.map( e => e.ischeck = val.ischeck) val.children.map( e => e.ischeck = val.ischeck)
val.children.map( e => e.children.map(n => n.ischeck = e.ischeck))
val2.forEach( e => { val2.forEach( e => {
e.children.forEach( r => { e.children.forEach( r => {
if(r.gradeId == val.gradeId){ if(r.gradeId == val.gradeId){
@ -419,7 +415,6 @@ export default {
}, },
threecheck(val,val2){ threecheck(val,val2){
val.ischeck = !val.ischeck val.ischeck = !val.ischeck
val.children.map( e => e.ischeck = val.ischeck)
val2.forEach( e => { val2.forEach( e => {
e.children.forEach( r => { e.children.forEach( r => {
r.children.forEach( n => { r.children.forEach( n => {
@ -440,35 +435,6 @@ export default {
}) })
this.handleCheck(val2) this.handleCheck(val2)
}, },
fourcheck(val,val2){
val.ischeck = !val.ischeck
val2.forEach( e => {
e.children.forEach( r => {
r.children.forEach( n => {
n.children.forEach( j => {
if(j.studentId == val.studentId){
if(n.children.every(i => i.ischeck)){
n.ischeck = true
}else{
n.ischeck = false
}
}
})
})
if(r.children.every(i => i.ischeck)){
r.ischeck = true
}else{
r.ischeck = false
}
})
if(e.children.every(i => i.ischeck)){
e.ischeck = true
}else{
e.ischeck = false
}
})
this.handleCheck(val2)
},
handleCurrentChange(val) { handleCurrentChange(val) {
this.page = val; this.page = val;
this.getData(); this.getData();
@ -542,6 +508,7 @@ export default {
this.$router.push('review') this.$router.push('review')
}, },
addAss(){ addAss(){
this.stuCompKey++
this.isAdd = true this.isAdd = true
this.addVisible = true this.addVisible = true
}, },
@ -555,7 +522,7 @@ export default {
if((new Date(this.form.endTime).getTime() - new Date(this.form.startTime).getTime()) / 1000 <= 60) return this.$message.warning('考核开始时间和结束时间间隔不得小于1分钟') if((new Date(this.form.endTime).getTime() - new Date(this.form.startTime).getTime()) / 1000 <= 60) return this.$message.warning('考核开始时间和结束时间间隔不得小于1分钟')
if(form.testPaperId === '') return this.$message.warning('请选择试卷') if(form.testPaperId === '') return this.$message.warning('请选择试卷')
if(form.classId === '') return this.$message.warning('请选择发布班级') if(form.classId === '') return this.$message.warning('请选择发布班级')
if(!form.studentId.length) return this.$message.warning('请选择学生') // if(!form.studentId.length) return this.$message.warning('')
if(new Date(this.form.startTime).getTime() < new Date().getTime()) form.state = 2 if(new Date(this.form.startTime).getTime() < new Date().getTime()) form.state = 2
let data = { let data = {
@ -613,14 +580,14 @@ export default {
this.testPaperName = '' this.testPaperName = ''
}, },
getCourses() { getCourses() {
this.$get(this.api.getTypeByOneLever) this.$get(`${this.api.getCourses}?type=0`)
.then(res => { .then(res => {
this.coursesList = res.data.list this.coursesList = res.data.list
}) })
.catch(err => {}) .catch(err => {})
}, },
getPapers() { getPapers() {
this.$post(`${this.api.schoolTestPaperByRelease}?schoolId=${this.clientId}&effect=0`) this.$post(`${this.api.schoolTestPaperByRelease}?schoolId=${this.clientId}&effect=0&courses=${this.cid}&name=${this.keywordPaper}`)
.then(res => { .then(res => {
this.testPaperData = res.data.list this.testPaperData = res.data.list
// this.totalPaper = res.data.list.totalCount // this.totalPaper = res.data.list.totalCount
@ -634,7 +601,6 @@ export default {
paperName: row.name, paperName: row.name,
totalDuration: row.duration totalDuration: row.duration
}) })
// this.$router.push('/testPaper/show')
this.previewVisible = true this.previewVisible = true
}, },
savePaper(){ savePaper(){

@ -1,7 +1,7 @@
<template> <template>
<div> <div>
<div> <div>
<lctree :data="majorList" @fircheckitem="fircheckitem" @twocheckitem="twocheckitem" @threecheckitem="threecheckitem" @fourcheckitem="fourcheckitem"></lctree> <lctree :data="majorList" :allClassList.sync="allClassList" @fircheckitem="fircheckitem" @twocheckitem="twocheckitem" @threecheckitem="threecheckitem"></lctree>
</div> </div>
</div> </div>
</template> </template>
@ -32,6 +32,7 @@ export default {
className: '' className: ''
}, },
majorNoAdd: true, majorNoAdd: true,
allClassList: [],
}; };
}, },
computed: { computed: {
@ -52,6 +53,7 @@ export default {
} }
let classId = this.classId ? this.classId.split(',') : [] let classId = this.classId ? this.classId.split(',') : []
let studentId = this.studentId let studentId = this.studentId
let classList = []
this.$get(this.api.queryStudentProfessionalArchitecture,data).then(res => { this.$get(this.api.queryStudentProfessionalArchitecture,data).then(res => {
let StaffProfessionalArchitectureList = res.data.StaffProfessionalArchitectureList let StaffProfessionalArchitectureList = res.data.StaffProfessionalArchitectureList
StaffProfessionalArchitectureList.map(n => { StaffProfessionalArchitectureList.map(n => {
@ -77,16 +79,7 @@ export default {
schoolId: this.clientId schoolId: this.clientId
} }
this.$get(`${this.api.queryStudent}/1/200`,data).then(res => { this.$get(`${this.api.queryStudent}/1/200`,data).then(res => {
res.data.studentList.map(s => { e.userIds = res.data.studentList.map(n => n.userId)
(s.ifVisible = false), (s.ischeck = false), (s.label = s.studentName)
if(studentId.includes(s.userId)){
s.ischeck = true
e.ifVisible = true
j.ifVisible = true
n.ifVisible = true
}
})
e.children = res.data.studentList
}).catch(res => {}) }).catch(res => {})
if(classId.includes(String(e.classId))){ if(classId.includes(String(e.classId))){
@ -96,6 +89,7 @@ export default {
} }
}) })
j.children = res.data.Class j.children = res.data.Class
classList = classList.concat(res.data.Class)
if(j.children.every(i => i.ischeck)){ if(j.children.every(i => i.ischeck)){
j.ischeck = true j.ischeck = true
} }
@ -109,6 +103,7 @@ export default {
setTimeout(() => { setTimeout(() => {
this.majorList = StaffProfessionalArchitectureList this.majorList = StaffProfessionalArchitectureList
this.majorList[0].ifVisible = true this.majorList[0].ifVisible = true
this.allClassList = classList
}, 500); }, 500);
}).catch(res => {}); }).catch(res => {});
}, },
@ -127,10 +122,6 @@ export default {
threecheckitem(three){ threecheckitem(three){
this.$emit("threecheck",three,this.majorList) this.$emit("threecheck",three,this.majorList)
}, },
//
fourcheckitem(four){
this.$emit("fourcheck",four,this.majorList)
},
} }
}; };
</script> </script>

@ -1,6 +1,18 @@
<template> <template>
<div class="side_view"> <div class="side_view">
<div class="side_tree" @click.stop="open(item)" v-for="(item,index) in data" :key="index"> <el-input placeholder="请输入班级名称" prefix-icon="el-icon-search" v-model="keyword" clearable></el-input>
<div v-if="keyword" class="side_tree">
<div v-for="(item,index) in classList" :key="index">
<div class="item" @click.stop="open(item)">
<i class="empty"></i>
<i :class="item.ischeck ? 'icon-yigouxuan' : 'icon-weigouxuan'" @click.stop="fircheckitem(item)"></i>
<span>{{item.label}}</span>
</div>
</div>
</div>
<div v-else class="side_tree" @click.stop="open(item)" v-for="(item,index) in data" :key="index">
<div class="item" @click.stop="open(item)"> <div class="item" @click.stop="open(item)">
<img <img
v-if="item.children&&item.children.length!=0" v-if="item.children&&item.children.length!=0"
@ -30,25 +42,10 @@
<div v-show="item1.ifVisible" v-if="item1.children&&item1.children.length!=0"> <div v-show="item1.ifVisible" v-if="item1.children&&item1.children.length!=0">
<div v-for="(item2,index2) in item1.children" :key="index2"> <div v-for="(item2,index2) in item1.children" :key="index2">
<div class="item2" @click.stop="open(item2)"> <div class="item2" @click.stop="open(item2)">
<img <i class="empty"></i>
v-if="item2.children&&item2.children.length!=0"
:class="{ 'arrowTransform': !item2.ifVisible, 'arrowTransformReturn': item2.ifVisible}"
src="../../../assets/img/icon-xiangyou.png"
alt
/>
<i v-else class="empty"></i>
<i :class="item2.ischeck ? 'icon-yigouxuan' : 'icon-weigouxuan'" @click.stop="threecheckitem(item2)"></i> <i :class="item2.ischeck ? 'icon-yigouxuan' : 'icon-weigouxuan'" @click.stop="threecheckitem(item2)"></i>
<span>{{item2.label}}</span> <span>{{item2.label}}</span>
</div> </div>
<div v-show="item2.ifVisible" v-if="item2.children&&item2.children.length!=0">
<div v-for="(item3,index3) in item2.children" :key="index3">
<div class="item3" @click.stop="open(item3)">
<i :class="item3.ischeck ? 'icon-yigouxuan' : 'icon-weigouxuan'" @click.stop="fourcheckitem(item3)"></i>
<span>{{item3.label}}</span>
</div>
</div>
</div>
</div> </div>
</div> </div>
</div> </div>
@ -69,10 +66,19 @@ Array.prototype.removeByValue = function (val) {
export default { export default {
data() { data() {
return { return {
chooseList: [] keyword: '',
searchTimer: null,
chooseList: [],
classList: []
}; };
}, },
watch: { watch: {
keyword: function(val) {
clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(() => {
this.fuzzyQuery()
},500)
},
chooseList(n, o) { chooseList(n, o) {
this.$emit('chooseNode', n); this.$emit('chooseNode', n);
} }
@ -81,14 +87,25 @@ export default {
props: { props: {
data: { data: {
type: Array type: Array
} },
allClassList: {
type: Array
},
}, },
methods: { methods: {
fuzzyQuery(){
let list = this.allClassList
let result = []
list.map((n,i) => {
if(n.label.includes(this.keyword)) result.push(n)
})
this.classList = result
},
// //
open(item) { open(item) {
item.ifVisible = !item.ifVisible; item.ifVisible = !item.ifVisible;
}, },
//removeByvaluemain.js //removeByvaluemain.js
choose(item) { choose(item) {
item.ifVisible = !item.ifVisible; item.ifVisible = !item.ifVisible;
@ -102,15 +119,11 @@ export default {
this.$emit('fircheckitem',item); this.$emit('fircheckitem',item);
}, },
twocheckitem(item){ twocheckitem(item){
console.log(22,item)
this.$emit('twocheckitem',item); this.$emit('twocheckitem',item);
}, },
threecheckitem(item){ threecheckitem(item){
this.$emit('threecheckitem',item); this.$emit('threecheckitem',item);
}, },
fourcheckitem(item){
this.$emit('fourcheckitem',item);
},
// //
isHasObj(arr, val) { isHasObj(arr, val) {
var flag = 0; //1 0 var flag = 0; //1 0
@ -124,7 +137,7 @@ export default {
} else { } else {
return false; return false;
} }
} },
} }
}; };
</script> </script>

@ -39,7 +39,7 @@
<p class="key">考试状态</p> <p class="key">考试状态</p>
<el-select v-model="state" clearable placeholder="请选择考试状态" @change="getData" size="small"> <el-select v-model="state" clearable placeholder="请选择考试状态" @change="getData" size="small">
<el-option label="不限" value=""></el-option> <el-option label="不限" value=""></el-option>
<el-option v-for="(item,index) in stateList" :key="index" :label="item.name" :value="item.id"></el-option> <el-option v-for="(item,index) in studentStateList" :key="index" :label="item.name" :value="item.id"></el-option>
</el-select> </el-select>
</div> </div>
<div class="item"> <div class="item">
@ -127,7 +127,7 @@ export default {
'userId','clientId' 'userId','clientId'
]), ]),
...mapState('assessment', [ ...mapState('assessment', [
'id','stateList','endTime' 'id','studentStateList','endTime'
]), ]),
...mapGetters('assessment', [ ...mapGetters('assessment', [
'getTypeName','getStudentStateName' 'getTypeName','getStudentStateName'

@ -6,10 +6,9 @@
<div class="flex j-between"> <div class="flex j-between">
<el-form label-width="80px" inline> <el-form label-width="80px" inline>
<el-form-item class="no-mb" label="批阅状态"> <el-form-item class="no-mb" label="批阅状态">
<el-select v-model="assessmentId" clearable placeholder="请选择批阅状态" @change="getData"> <el-select v-model="state" clearable placeholder="请选择批阅状态" @change="getData">
<el-option label="不限" value=""></el-option> <el-option label="不限" value=""></el-option>
<el-option v-for="(item,index) in reviewStatusList" :key="index" :label="item.name" :value="item.id"></el-option> <el-option v-for="(item,index) in reviewStatusList" :key="index" :label="item.name" :value="item.id"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -45,7 +44,7 @@
<el-table-column prop="handPaperTime" label="交卷时间" align="center"></el-table-column> <el-table-column prop="handPaperTime" label="交卷时间" align="center"></el-table-column>
<el-table-column prop="timeSpent" label="答题用时(分钟)" align="center"> <el-table-column prop="timeSpent" label="答题用时(分钟)" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{transferToMinutes(scope.row.timeSpent)}} <p>{{scope.row.timeSpent | transferToMinutes}}</p>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="name" label="考试状态" align="center"> <el-table-column prop="name" label="考试状态" align="center">
@ -83,7 +82,7 @@ import { mapState,mapGetters,mapActions } from 'vuex'
export default { export default {
data() { data() {
return { return {
assessmentId: '', state: '',
reviewStatusList: [ reviewStatusList: [
{ {
id: 0, id: 0,
@ -104,6 +103,11 @@ export default {
searchTimer: null, searchTimer: null,
}; };
}, },
filters: {
transferToMinutes(val){
return isNaN(val) ? val : (val / 60).toFixed(2)
}
},
computed: { computed: {
...mapState('user', [ ...mapState('user', [
'userId','clientId' 'userId','clientId'
@ -131,7 +135,7 @@ export default {
'setReviewInfo' 'setReviewInfo'
]), ]),
getData() { getData() {
this.$post(`${this.api.reviewList}?pageNum=${this.page}&pageSize=${this.pageSize}&userId=${this.userId}&assessmentId=${this.id}`) this.$post(`${this.api.reviewList}?pageNum=${this.page}&pageSize=${this.pageSize}&userId=${this.userId}&assessmentId=${this.id}&keyword=${this.keyword}&state=${this.state}`)
.then(res => { .then(res => {
this.listData = res.data.list.list this.listData = res.data.list.list
this.total = res.data.list.totalCount this.total = res.data.list.totalCount
@ -152,9 +156,6 @@ export default {
}) })
this.$router.push('/testPaper/doReview') this.$router.push('/testPaper/doReview')
}, },
transferToMinutes(seconds){
return isNaN(seconds) ? seconds : (seconds / 60).toFixed(2)
}
} }
}; };
</script> </script>

@ -1,100 +1,94 @@
<template> <template>
<div> <div>
<el-row :gutter="20"> <el-card shadow="hover" class="m-b-20">
<el-col :span="24"> <div class="p-title m-b-20">筛选</div>
<el-card shadow="hover" class="m-b-20">
<div class="p-title m-b-20">筛选</div>
<div class="flex j-between"> <div class="flex j-between">
<el-form label-width="80px" inline> <el-form label-width="80px" inline>
<el-form-item class="no-mb" label="教学班级"> <el-form-item class="no-mb" label="教学班级">
<el-select v-model="classId" clearable placeholder="请选择教学班级" @change="getData"> <el-select v-model="classId" clearable placeholder="请选择教学班级" @change="getData">
<el-option v-for="(item,index) in classList" :key="index" :label="item.className" :value="item.classId"></el-option> <el-option v-for="(item,index) in classList" :key="index" :label="item.className" :value="item.classId"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item class="no-mb" label="考试名称"> <el-form-item class="no-mb" label="考试名称">
<el-select v-model="assessmentName" clearable placeholder="请选择考试名称" @change="getData" disabled> <el-select v-model="assessmentName" clearable placeholder="请选择考试名称" @change="getData" disabled>
<el-option v-for="(item,index) in assessmentNameList" :key="index" :label="item.assessmentName" :value="item.assessmentName"></el-option> <el-option v-for="(item,index) in assessmentNameList" :key="index" :label="item.assessmentName" :value="item.assessmentName"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div> <div>
<el-input <el-input
placeholder="请输入学生姓名或学号" placeholder="请输入学生姓名或学号"
prefix-icon="el-icon-search" prefix-icon="el-icon-search"
v-model="keyword" v-model="keyword"
clearable clearable
></el-input> ></el-input>
</div> </div>
</div> </div>
</el-card> </el-card>
</el-col>
<el-col :span="24"> <el-card shadow="hover" class="m-b-20">
<el-card shadow="hover" class="m-b-20"> <div class="flex j-between m-b-20">
<div class="flex j-between m-b-20"> <div class="p-title">考试成绩</div>
<div class="p-title">考试成绩</div>
<div> <div>
<el-button <el-button
type="primary" type="primary"
size="small" size="small"
round round
@click="toStat" @click="toStat"
>成绩统计</el-button> >成绩统计</el-button>
<el-button <el-button
type="primary" type="primary"
size="small" size="small"
round round
@click="exportData" @click="exportData"
>导出</el-button> >导出</el-button>
</div> </div>
</div> </div>
<el-table <el-table
:data="listData" :data="listData"
ref="table" ref="table"
row-key="id" row-key="id"
class="table" class="table"
stripe stripe
header-align="center" header-align="center"
@selection-change="handleSelectionChange" @selection-change="handleSelectionChange"
> >
<el-table-column <el-table-column
type="selection" type="selection"
width="55" width="55"
align="center" align="center"
:reserve-selection="true" :reserve-selection="true"
></el-table-column> ></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"
>{{scope.$index + (page - 1) * pageSize + 1}}</template> >{{scope.$index + (page - 1) * pageSize + 1}}</template>
</el-table-column> </el-table-column>
<el-table-column prop="stuName" label="真实姓名" align="center"></el-table-column> <el-table-column prop="stuName" label="真实姓名" align="center"></el-table-column>
<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="totalDuration" 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>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="pagination"> <div class="pagination">
<el-pagination <el-pagination
background background
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
:current-page="page" :current-page="page"
:page-size="pageSize" :page-size="pageSize"
layout="total,prev, pager, next" layout="total,prev, pager, next"
:total="total" :total="total"
></el-pagination> ></el-pagination>
</div> </div>
</el-card> </el-card>
</el-col>
</el-row>
</div> </div>
</template> </template>
<script> <script>

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

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

@ -85,14 +85,14 @@
<el-card shadow="hover" class="m-b-30"> <el-card shadow="hover" class="m-b-30">
<ul class="class"> <ul class="class">
<li v-for="(item,index) in classList" :key="index" :class="'index' + index"> <li v-for="(item,index) in classList" :key="index" :class="'index' + index" @click="toPractice(item)">
<p class="name">{{item.className}}</p> <p class="name">{{item.className}}</p>
<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="editClass(item)"></button> <button class="edit" @click.stop="editClass(item)"></button>
<button class="del" @click="delClass(item)"></button> <button class="del" @click.stop="delClass(item)"></button>
</div> </div>
</li> </li>
</ul> </ul>
@ -211,6 +211,9 @@ export default {
...mapActions('assessment', [ ...mapActions('assessment', [
'setAssInfo' 'setAssInfo'
]), ]),
...mapActions('practice', [
'setClassInfo'
]),
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 => {
@ -254,9 +257,16 @@ export default {
this.pageClass = val this.pageClass = val
this.handleClassPage() this.handleClassPage()
}, },
toPractice(row){
this.setClassInfo({
classId: row.classId,
className: row.className
})
this.$router.push('/practice/list')
},
editClass(row){ editClass(row){
this.classVisible = true this.classVisible = true
this.curClass = row this.curClass = JSON.parse(JSON.stringify(row))
}, },
delClass(item){ delClass(item){
this.$confirm('确定要删除吗?', '提示', { this.$confirm('确定要删除吗?', '提示', {
@ -378,6 +388,7 @@ export default {
padding: 15px 20px; padding: 15px 20px;
margin-right: .5%; margin-right: .5%;
background: url(../../../assets/img/index/bg1.png) 0 0/100% 100% no-repeat; background: url(../../../assets/img/index/bg1.png) 0 0/100% 100% no-repeat;
cursor: pointer;
&.index1{ &.index1{
background-image: url(../../../assets/img/index/bg2.png); background-image: url(../../../assets/img/index/bg2.png);
} }

@ -13,7 +13,9 @@
</div> </div>
<ul class="tab"> <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> </ul>
<div class="wrap"> <div class="wrap">
@ -69,19 +71,24 @@ export default {
tabs: [ tabs: [
{ {
id: 1, id: 1,
name: '单选题' name: '单选题',
show: true
},{ },{
id: 2, id: 2,
name: '多选题' name: '多选题',
show: true
},{ },{
id: 3, id: 3,
name: '判断题' name: '判断题',
show: true
},{ },{
id: 4, id: 4,
name: '简答题' name: '简答题',
show: true
},{ },{
id: 5, id: 5,
name: '填空题' name: '填空题',
show: true
} }
], ],
typeNameList: ['单项选择','多项选择','判断题','简答题','填空题'], typeNameList: ['单项选择','多项选择','判断题','简答题','填空题'],
@ -119,6 +126,12 @@ export default {
} }
}) })
this.list = data.list 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.handleOptions()
this.paperName = data.paperName this.paperName = data.paperName
this.userName = data.stuName this.userName = data.stuName

@ -93,8 +93,8 @@
<div class="flex j-end m-b-20"> <div class="flex j-end m-b-20">
<el-form label-width="80px" inline> <el-form label-width="80px" inline>
<el-form-item class="no-mb" label="所属课程"> <el-form-item class="no-mb" label="所属课程">
<el-select v-model="cid" clearable placeholder="请选择所属课程" > <el-select v-model="cid" clearable placeholder="请选择所属课程" @change="getPapers">
<el-option v-for="(item,index) in coursesList" :key="index" :label="item.typeName" :value="item.cid"></el-option> <el-option v-for="(item,index) in coursesList" :key="index" :label="item" :value="item"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item class="no-mb"> <el-form-item class="no-mb">
@ -214,14 +214,16 @@ export default {
'userId','clientId' 'userId','clientId'
]), ]),
...mapState('practice', [ ...mapState('practice', [
'typeList','stateList' 'typeList','stateList','classId','className'
]), ]),
...mapGetters('practice', [ ...mapGetters('practice', [
'getStateName' 'getStateName'
]) ])
}, },
mounted() { mounted() {
this.className && (this.keyword = this.className)
this.getData() this.getData()
this.addEvent()
}, },
watch: { watch: {
keyword: function(val) { keyword: function(val) {
@ -242,13 +244,15 @@ export default {
'setInfo' 'setInfo'
]), ]),
...mapActions('practice', [ ...mapActions('practice', [
'setPracInfo' 'setPracInfo','setClassInfo'
]), ]),
...mapActions('achievement', [ ...mapActions('achievement', [
'setPracListInfo' 'setPracListInfo'
]), ]),
getData() { getData() {
this.$post(`${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}&practiseName=${this.keyword}&userId=${this.userId}`
if(this.classId) url += `&classId=${this.classId}`
this.$post(url)
.then(res => { .then(res => {
this.listData = res.data.list.list this.listData = res.data.list.list
this.total = res.data.list.totalCount this.total = res.data.list.totalCount
@ -286,9 +290,13 @@ export default {
}, },
fircheck(val,val2){ fircheck(val,val2){
val.ischeck = !val.ischeck val.ischeck = !val.ischeck
val.children.map( e => e.ischeck = val.ischeck) if(val.children){
val.children.map( e => e.children.map(n => n.ischeck = e.ischeck)) val.children.map( e => e.ischeck = val.ischeck)
this.handleCheck(val2) val.children.map( e => e.children.map(n => n.ischeck = e.ischeck))
this.handleCheck(val2)
}else{
this.form.classId = val.classId
}
}, },
twocheck(val,val2){ twocheck(val,val2){
val.ischeck = !val.ischeck val.ischeck = !val.ischeck
@ -333,7 +341,6 @@ export default {
this.addVisible = true this.addVisible = true
this.isAdd = false this.isAdd = false
this.stuCompKey++ this.stuCompKey++
console.log(11,this.form)
}, },
scoreQuery(row){ scoreQuery(row){
this.setPracListInfo({ this.setPracListInfo({
@ -405,14 +412,14 @@ export default {
this.testPaperName = '' this.testPaperName = ''
}, },
getCourses() { getCourses() {
this.$get(this.api.getTypeByOneLever) this.$get(`${this.api.getCourses}?type=1`)
.then(res => { .then(res => {
this.coursesList = res.data.list this.coursesList = res.data.list
}) })
.catch(err => {}) .catch(err => {})
}, },
getPapers() { getPapers() {
this.$post(`${this.api.schoolTestPaperByRelease}?schoolId=${this.clientId}&effect=1`) this.$post(`${this.api.schoolTestPaperByRelease}?schoolId=${this.clientId}&effect=1&courses=${this.cid}&name=${this.keywordPaper}`)
.then(res => { .then(res => {
this.testPaperData = res.data.list this.testPaperData = res.data.list
// this.totalPaper = res.data.list.totalCount // this.totalPaper = res.data.list.totalCount
@ -448,8 +455,13 @@ export default {
}) })
.catch(err => {}) .catch(err => {})
}, },
closeDetail(){ addEvent(){
this.$once('hook:beforeDestroy',() => {
this.setClassInfo({
classId: '',
className: ''
})
})
}, },
} }
} }

@ -1,7 +1,7 @@
<template> <template>
<div> <div>
<div> <div>
<lctree :data="majorList" @fircheckitem="fircheckitem" @twocheckitem="twocheckitem" @threecheckitem="threecheckitem"></lctree> <lctree :data="majorList" :allClassList.sync="allClassList" @fircheckitem="fircheckitem" @twocheckitem="twocheckitem" @threecheckitem="threecheckitem"></lctree>
</div> </div>
</div> </div>
</template> </template>
@ -32,6 +32,7 @@ export default {
className: '' className: ''
}, },
majorNoAdd: true, majorNoAdd: true,
allClassList: [],
}; };
}, },
computed: { computed: {
@ -51,6 +52,7 @@ export default {
schoolId: this.clientId schoolId: this.clientId
} }
let classId = this.classId ? this.classId.split(',') : [] let classId = this.classId ? this.classId.split(',') : []
let classList = []
this.$get(this.api.queryStudentProfessionalArchitecture,data).then(res => { this.$get(this.api.queryStudentProfessionalArchitecture,data).then(res => {
let StaffProfessionalArchitectureList = res.data.StaffProfessionalArchitectureList let StaffProfessionalArchitectureList = res.data.StaffProfessionalArchitectureList
StaffProfessionalArchitectureList.map(n => { StaffProfessionalArchitectureList.map(n => {
@ -82,6 +84,7 @@ export default {
} }
}) })
j.children = res.data.Class j.children = res.data.Class
classList = classList.concat(res.data.Class)
if(j.children.every(i => i.ischeck)){ if(j.children.every(i => i.ischeck)){
j.ischeck = true j.ischeck = true
} }
@ -95,6 +98,7 @@ export default {
setTimeout(() => { setTimeout(() => {
this.majorList = StaffProfessionalArchitectureList this.majorList = StaffProfessionalArchitectureList
this.majorList[0].ifVisible = true this.majorList[0].ifVisible = true
this.allClassList = classList
}, 500); }, 500);
}).catch(res => {}); }).catch(res => {});
}, },

@ -1,6 +1,16 @@
<template> <template>
<div class="side_view"> <div class="side_view">
<div class="side_tree" @click.stop="open(item)" v-for="(item,index) in data" :key="index"> <el-input placeholder="请输入班级名称" prefix-icon="el-icon-search" v-model="keyword" clearable></el-input>
<div v-if="keyword" class="side_tree" @click.stop="open(item)">
<div v-for="(item,index) in classList" :key="index">
<div class="item" @click.stop="open(item)">
<i :class="item.ischeck ? 'icon-yigouxuan' : 'icon-weigouxuan'" @click.stop="fircheckitem(item)"></i>
<span>{{item.label}}</span>
</div>
</div>
</div>
<div v-else class="side_tree" @click.stop="open(item)" v-for="(item,index) in data" :key="index">
<div class="item" @click.stop="open(item)"> <div class="item" @click.stop="open(item)">
<img <img
v-if="item.children&&item.children.length!=0" v-if="item.children&&item.children.length!=0"
@ -53,10 +63,20 @@ Array.prototype.removeByValue = function (val) {
export default { export default {
data() { data() {
return { return {
chooseList: [] keyword: '',
searchTimer: null,
chooseList: [],
classList: []
}; };
}, },
watch: { watch: {
keyword: function(val) {
clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(() => {
this.fuzzyQuery()
},500)
},
chooseList(n, o) { chooseList(n, o) {
this.$emit('chooseNode', n); this.$emit('chooseNode', n);
} }
@ -65,9 +85,20 @@ export default {
props: { props: {
data: { data: {
type: Array type: Array
} },
allClassList: {
type: Array
},
}, },
methods: { methods: {
fuzzyQuery(){
let list = this.allClassList
let result = []
list.map((n,i) => {
if(n.label.includes(this.keyword)) result.push(n)
})
this.classList = result
},
// //
open(item) { open(item) {
item.ifVisible = !item.ifVisible; item.ifVisible = !item.ifVisible;

@ -1,94 +1,88 @@
<template> <template>
<div> <div>
<el-row :gutter="20"> <el-card shadow="hover" class="m-b-20">
<el-col :span="24"> <div class="p-title m-b-20">筛选</div>
<el-card shadow="hover" class="m-b-20">
<div class="p-title m-b-20">筛选</div>
<div class="flex j-between"> <div class="flex j-between">
<el-form label-width="80px" inline> <el-form label-width="80px" inline>
<el-form-item class="no-mb" label="教学班级"> <el-form-item class="no-mb" label="教学班级">
<el-select v-model="classId" clearable placeholder="请选择教学班级" @change="getData"> <el-select v-model="classId" clearable placeholder="请选择教学班级" @change="getData">
<el-option v-for="(item,index) in classList" :key="index" :label="item.className" :value="item.classId"></el-option> <el-option v-for="(item,index) in classList" :key="index" :label="item.className" :value="item.classId"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item class="no-mb" label="练习名称"> <el-form-item class="no-mb" label="练习名称">
<el-select v-model="practiseId" clearable placeholder="请选择练习名称" @change="getData" :disabled="classIdAss ? true : classId == ''"> <el-select v-model="practiseId" clearable placeholder="请选择练习名称" @change="getData" :disabled="classIdAss ? true : classId == ''">
<el-option v-for="(item,index) in practiceNameList" :key="index" :label="item.practiseName" :value="item.practiseId"></el-option> <el-option v-for="(item,index) in practiceNameList" :key="index" :label="item.practiseName" :value="item.practiseId"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div> <div>
<el-input <el-input
placeholder="请输入学生姓名或学号" placeholder="请输入学生姓名或学号"
prefix-icon="el-icon-search" prefix-icon="el-icon-search"
v-model="keyword" v-model="keyword"
clearable clearable
></el-input> ></el-input>
</div> </div>
</div> </div>
</el-card> </el-card>
</el-col>
<el-col :span="24"> <el-card shadow="hover" class="m-b-20">
<el-card shadow="hover" class="m-b-20"> <div class="flex j-between m-b-20">
<div class="flex j-between m-b-20"> <div class="p-title">练习成绩</div>
<div class="p-title">练习成绩</div>
<div> <div>
<el-button <el-button
type="primary" type="primary"
size="small" size="small"
round round
@click="exportData" @click="exportData"
>导出</el-button> >导出</el-button>
</div> </div>
</div> </div>
<el-table <el-table
:data="listData" :data="listData"
ref="table" ref="table"
row-key="id" row-key="id"
class="table" class="table"
stripe stripe
header-align="center" header-align="center"
@selection-change="handleSelectionChange" @selection-change="handleSelectionChange"
> >
<el-table-column <el-table-column
type="selection" type="selection"
width="55" width="55"
align="center" align="center"
:reserve-selection="true" :reserve-selection="true"
></el-table-column> ></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"
>{{scope.$index + (page - 1) * pageSize + 1}}</template> >{{scope.$index + (page - 1) * pageSize + 1}}</template>
</el-table-column> </el-table-column>
<el-table-column prop="userName" label="真实姓名" align="center"></el-table-column> <el-table-column prop="userName" label="真实姓名" align="center"></el-table-column>
<el-table-column prop="workNumber" label="学号" align="center"></el-table-column> <el-table-column prop="workNumber" label="学号" align="center"></el-table-column>
<el-table-column prop="max" label="最高分" align="center"></el-table-column> <el-table-column prop="max" label="最高分" align="center"></el-table-column>
<el-table-column prop="min" label="最低分" align="center"></el-table-column> <el-table-column prop="min" label="最低分" align="center"></el-table-column>
<el-table-column prop="avg" label="平均分" align="center"></el-table-column> <el-table-column prop="avg" 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="showDetail(scope.row)">查看详情</el-button> <el-button type="text" @click="showDetail(scope.row)">查看详情</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="pagination"> <div class="pagination">
<el-pagination <el-pagination
background background
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
:current-page="page" :current-page="page"
:page-size="pageSize" :page-size="pageSize"
layout="total,prev, pager, next" layout="total,prev, pager, next"
:total="total" :total="total"
></el-pagination> ></el-pagination>
</div> </div>
</el-card> </el-card>
</el-col>
</el-row>
<el-dialog title="练习成绩详情" :visible.sync="detailVisible" width="40%" :close-on-click-modal="false"> <el-dialog title="练习成绩详情" :visible.sync="detailVisible" width="40%" :close-on-click-modal="false">
<div class="flex flex-j-e"> <div class="flex flex-j-e">

@ -21,7 +21,7 @@
</el-form> </el-form>
</div> </div>
<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>
</div> </div>
</div> </div>
</div> </div>

@ -1,120 +1,114 @@
<template> <template>
<div> <div>
<el-row :gutter="20"> <el-card shadow="hover" class="m-b-20">
<el-col :span="24"> <div class="p-title m-b-20">测评题库</div>
<el-card shadow="hover" class="m-b-20">
<div class="p-title m-b-20">测评题库</div>
<div class="flex j-between"> <div class="flex j-between">
<el-form label-width="80px"> <el-form label-width="80px">
<el-form-item class="no-mb" label="试题类型"> <el-form-item class="no-mb" label="试题类型">
<el-select v-model="typeId" clearable placeholder="请选择试题类型" @change="getData"> <el-select v-model="typeId" clearable placeholder="请选择试题类型" @change="getData">
<el-option label="不限" value=""></el-option> <el-option label="不限" value=""></el-option>
<el-option v-for="(item,index) in typeList" :key="index" :label="item.name" :value="item.name"></el-option> <el-option v-for="(item,index) in typeList" :key="index" :label="item.name" :value="item.name"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div> <div>
<el-input <el-input
placeholder="请输入题干" placeholder="请输入题干/知识点"
prefix-icon="el-icon-search" prefix-icon="el-icon-search"
v-model="keyword" v-model="keyword"
clearable clearable
></el-input> ></el-input>
</div> </div>
</div> </div>
</el-card> </el-card>
</el-col>
<el-col :span="24"> <el-card shadow="hover" class="m-b-20">
<el-card shadow="hover" class="m-b-20"> <div class="flex j-between m-b-20">
<div class="flex j-between m-b-20"> <div class="p-title m-b-20">题目列表</div>
<div class="p-title m-b-20">题目列表</div>
<div> <div>
<el-button <el-button
type="primary" type="primary"
size="small" size="small"
round round
@click="addTopics" @click="addTopics"
>单题上传</el-button> >单题上传</el-button>
<el-button <el-button
type="primary" type="primary"
size="small" size="small"
round round
@click="showimportVisible" @click="showimportVisible"
>批量上传</el-button> >批量上传</el-button>
<el-button <el-button
type="primary" type="primary"
size="small" size="small"
round round
@click="shareDataBatch" @click="shareDataBatch"
>批量共享</el-button> >批量共享</el-button>
<!-- <el-button <!-- <el-button
type="primary" type="primary"
size="small" size="small"
round round
@click="cancelShareBatch" @click="cancelShareBatch"
>取消共享</el-button> --> >取消共享</el-button> -->
<el-button <el-button
type="primary" type="primary"
size="small" size="small"
round round
@click="delAllData" @click="delAllData"
>批量删除</el-button> >批量删除</el-button>
</div> </div>
</div> </div>
<el-table <el-table
:data="listData" :data="listData"
ref="table" ref="table"
row-key="id" row-key="id"
class="table" class="table"
stripe stripe
header-align="center" header-align="center"
@selection-change="handleSelectionChange" @selection-change="handleSelectionChange"
> >
<el-table-column <el-table-column
type="selection" type="selection"
width="55" width="55"
align="center" align="center"
:reserve-selection="true" :reserve-selection="true"
></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
slot-scope="scope" slot-scope="scope"
>{{scope.$index + (page - 1) * pageSize + 1}}</template> >{{scope.$index + (page - 1) * pageSize + 1}}</template>
</el-table-column> </el-table-column>
<el-table-column prop="questionStem" :show-overflow-tooltip="true" label="题干" align="center"></el-table-column> <el-table-column prop="questionStem" :show-overflow-tooltip="true" label="题干" align="center"></el-table-column>
<el-table-column prop="name" label="试题类型" width="100" align="center"></el-table-column> <el-table-column prop="name" label="试题类型" width="100" align="center"></el-table-column>
<el-table-column prop="courses" label="对应课程" width="140" align="center"></el-table-column> <el-table-column prop="courses" label="对应课程" width="140" align="center"></el-table-column>
<el-table-column prop="typeName" label="所属题库" width="140" align="center"></el-table-column> <el-table-column prop="typeName" 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="knowledgePoints" label="知识点" width="140" align="center"></el-table-column>
<el-table-column prop="useNum" label="使用次数" width="100" align="center"></el-table-column> <el-table-column prop="useNum" label="使用次数" width="100" align="center"></el-table-column>
<el-table-column prop="createTime" label="上传时间" width="140" align="center"></el-table-column> <el-table-column prop="createTime" label="上传时间" width="140" align="center"></el-table-column>
<el-table-column label="操作" width="200"> <el-table-column label="操作" width="200">
<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>
<el-button type="text" @click="edit(scope.row)">修改</el-button> <el-button type="text" @click="edit(scope.row)">修改</el-button>
<el-button type="text" @click="delData(scope.row)">删除</el-button> <el-button type="text" @click="delData(scope.row)">删除</el-button>
<el-button v-if="!scope.row.myShare" type="text" @click="share(scope.row)">共享</el-button> <el-button v-if="!scope.row.myShare" type="text" @click="share(scope.row)">共享</el-button>
<el-button v-else type="text" @click="cancelShare(scope.row)">取消共享</el-button> <el-button v-else type="text" @click="cancelShare(scope.row)">取消共享</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="pagination"> <div class="pagination">
<el-pagination <el-pagination
background background
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
:current-page="page" :current-page="page"
:page-size="pageSize" :page-size="pageSize"
layout="total,prev, pager, next" layout="total,prev, pager, next"
:total="total" :total="total"
></el-pagination> ></el-pagination>
</div> </div>
</el-card> </el-card>
</el-col>
</el-row>
<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>

@ -241,9 +241,18 @@ export default {
.catch(err => {}) .catch(err => {})
}, },
getQuesBank() { getQuesBank() {
this.$get(this.api.getTypeByOneLever) let data = {
pageNum: 1,
pageSize: 10000
}
this.$post(this.api.listByPage,data)
.then(res => { .then(res => {
this.quesBankList = res.data.list let list = res.data.list.list
let result = list
list.map((n,i) => {
result = result.concat(n.secondColumn)
})
this.quesBankList = result
}) })
.catch(err => {}) .catch(err => {})
}, },

@ -198,8 +198,15 @@
<el-dialog title="选择试题" :visible.sync="inteVisible" width="60%" @close="closeInte" :close-on-click-modal="false"> <el-dialog title="选择试题" :visible.sync="inteVisible" width="60%" @close="closeInte" :close-on-click-modal="false">
<div class="select-wrap"> <div class="select-wrap">
<div class="block" style="margin-bottom: 30px;"> <div class="block" style="margin-bottom: 30px;">
<p class="key">试题课程</p> <!-- <p class="key">试题课程</p> -->
<el-transfer v-model="course" :data="inteListData" :props="courseProps" filterable filter-placeholder="请输入课程名称" :titles="['未选', '已选']" @change="courseChange"></el-transfer> <div class="m-r-10" style="width: 100px">
<el-select v-model="inteType" placeholder="请选择" size="mini">
<el-option label="试题课程" value="1"></el-option>
<el-option label="知识点" value="2"></el-option>
</el-select>
</div>
<el-transfer v-if="inteType == 1" v-model="course" :data="inteListData" :props="courseProps" filterable filter-placeholder="请输入课程名称" :titles="['未选', '已选']" @change="courseChange"></el-transfer>
<el-transfer v-else v-model="kn" :data="knListData" :props="knProps" filterable filter-placeholder="请输入知识点名称" :titles="['未选', '已选']" @change="knChange"></el-transfer>
</div> </div>
<div class="block"> <div class="block">
@ -300,11 +307,18 @@ export default {
// //
inteVisible: false, inteVisible: false,
inteListData: [], inteListData: [],
knListData: [],
inteType: '1',
course: [], course: [],
kn: [],
courseProps: { courseProps: {
key: 'courses', key: 'courses',
label: 'courses' label: 'courses'
}, },
knProps: {
key: 'knowledgePoint',
label: 'knowledgePoint'
},
countNumber1: 0, countNumber1: 0,
countNumber2: 0, countNumber2: 0,
countNumber3: 0, countNumber3: 0,
@ -474,6 +488,7 @@ export default {
this.manualVisible = true this.manualVisible = true
}else{ }else{
this.getInteData() this.getInteData()
this.getKnData()
this.inteVisible = true this.inteVisible = true
} }
}, },
@ -557,9 +572,18 @@ export default {
.catch(err => {}) .catch(err => {})
}, },
getQuesBank() { getQuesBank() {
this.$get(this.api.getTypeByOneLever) let data = {
pageNum: 1,
pageSize: 10000
}
this.$post(this.api.listByPage,data)
.then(res => { .then(res => {
this.quesBankList = res.data.list let list = res.data.list.list
let result = list
list.map((n,i) => {
result = result.concat(n.secondColumn)
})
this.quesBankList = result
}) })
.catch(err => {}) .catch(err => {})
}, },
@ -623,6 +647,16 @@ export default {
this.inteListData = res.data.fuzzyList this.inteListData = res.data.fuzzyList
}).catch(err => {}) }).catch(err => {})
}, },
getKnData() {
let data = {
schoolId: this.clientId,
userId: this.userId,
}
this.$post(this.api.queryKnowledgePoints,data)
.then(res => {
this.knListData = res.data.fuzzyList
}).catch(err => {})
},
courseChange(val,dir,allData){ courseChange(val,dir,allData){
let data = { let data = {
coursesList: val, coursesList: val,
@ -639,6 +673,22 @@ export default {
this.countNumber5 = data.countNumber5 this.countNumber5 = data.countNumber5
}).catch(err => {}) }).catch(err => {})
}, },
knChange(val,dir,allData){
let data = {
knowledgePointsList: val,
schoolId: this.clientId,
userId: this.userId,
}
this.$post(this.api.statistical,data)
.then(res => {
let data = res.data.count
this.countNumber1 = data.countNumber1
this.countNumber2 = data.countNumber2
this.countNumber3 = data.countNumber3
this.countNumber4 = data.countNumber4
this.countNumber5 = data.countNumber5
}).catch(err => {})
},
typeValid(index){ typeValid(index){
return this.countCheck[`countCheck${index}`] && this[`countNumberInput${index}`] && this[`countNumber${index}`] return this.countCheck[`countCheck${index}`] && this[`countNumberInput${index}`] && this[`countNumber${index}`]
}, },
@ -803,10 +853,14 @@ export default {
} }
} }
let data = { let data = {
coursesList: this.course,
schoolId: this.clientId, schoolId: this.clientId,
userId: this.userId, userId: this.userId,
} }
if(this.inteType == 1){
data.coursesList = this.course
}else{
data.knowledgePointsList = this.kn
}
this.$post(this.api.getQuestionListBySelect,data) this.$post(this.api.getQuestionListBySelect,data)
.then(res => { .then(res => {
let list = res.data.count let list = res.data.count
@ -822,7 +876,9 @@ export default {
}).catch(err => {}) }).catch(err => {})
}, },
closeInte(){ closeInte(){
this.course = [], this.inteType = '1'
this.course = []
this.kn = []
this.countNumber1 = 0 this.countNumber1 = 0
this.countNumber2 = 0 this.countNumber2 = 0
this.countNumber3 = 0 this.countNumber3 = 0

@ -0,0 +1,23 @@
<template>
<div>
<test-paper-detail></test-paper-detail>
</div>
</template>
<script>
import testPaperDetail from '@/components/testPaperDetail'
export default {
data() {
return {
};
},
components: { testPaperDetail },
methods: {
}
};
</script>
<style lang="scss" scoped>
</style>

@ -22,7 +22,7 @@ export default {
{ {
name: `${pre}statistics`, name: `${pre}statistics`,
path: `statistics`, path: `statistics`,
component: () => import('@/components/achiStatistics'), component: () => import('@/pages/achievement/statistics'),
meta: { title: '成绩统计' } meta: { title: '成绩统计' }
}, },
{ {

@ -28,7 +28,7 @@ export default {
{ {
name: `${pre}scoreQuery`, name: `${pre}scoreQuery`,
path: `scoreQuery`, path: `scoreQuery`,
component: () => import('@/pages/assessment/scoreQuery/index.vue'), component: () => import('@/pages/assessment/scoreQuery'),
meta: { title: '成绩查询' } meta: { title: '成绩查询' }
}, },
{ {

@ -28,7 +28,7 @@ export default {
{ {
name: `${pre}scoreQuery`, name: `${pre}scoreQuery`,
path: `scoreQuery`, path: `scoreQuery`,
component: () => import('@/pages/practice/scoreQuery/index.vue'), component: () => import('@/pages/practice/scoreQuery'),
meta: { title: '成绩查询' } meta: { title: '成绩查询' }
}, },
{ {

@ -18,11 +18,6 @@ export default {
path: `list`, path: `list`,
component: () => import('@/pages/testPaper/list'), component: () => import('@/pages/testPaper/list'),
meta: { title: '试卷管理' } meta: { title: '试卷管理' }
},{
name: `${pre}review`,
path: `review`,
component: () => import('@/pages/testPaper/review'),
meta: { title: '练习批阅' }
},{ },{
name: `${pre}add`, name: `${pre}add`,
path: `add`, path: `add`,
@ -31,13 +26,8 @@ export default {
},{ },{
name: `${pre}show`, name: `${pre}show`,
path: `show`, path: `show`,
component: () => import('@/components/testPaperDetail'), component: () => import('@/pages/testPaper/show'),
meta: { title: '试卷预览' } meta: { title: '试卷预览' }
},{ }
name: `${pre}doReview`,
path: `doReview`,
component: () => import('@/components/doReview'),
meta: { title: '批改' }
},
] ]
}; };

@ -7,10 +7,14 @@ 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') {
next({ if(to.fullPath == '/'){
path: '/login', next('/login')
query: {redirect: to.fullPath} }else{
}) next({
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 == '/') {

@ -12,6 +12,8 @@ export default {
isReview: false, isReview: false,
reviewStatus: '', reviewStatus: '',
userId: '', userId: '',
classId: '',
className: '',
stateList: [ stateList: [
{ {
id: 1, id: 1,
@ -92,6 +94,10 @@ export default {
SET_REVIEW_BY_STUDENT_INFO: (state, info) => { SET_REVIEW_BY_STUDENT_INFO: (state, info) => {
state.userId = info.userId state.userId = info.userId
}, },
SET_CLASS_INFO: (state, info) => {
state.classId = info.classId
state.className = info.className
},
}, },
actions: { actions: {
setPracInfo({ commit },info) { setPracInfo({ commit },info) {
@ -103,5 +109,8 @@ export default {
setReviewInfo({ commit },info) { setReviewInfo({ commit },info) {
commit('SET_REVIEW_INFO',info) commit('SET_REVIEW_INFO',info)
}, },
setClassInfo({ commit },info) {
commit('SET_CLASS_INFO',info)
},
} }
} }
Loading…
Cancel
Save