yujialong 4 years ago
parent ed0f0a0b0f
commit 99e870b82c
  1. 3
      src/api/index.js
  2. 11
      src/components/testPaperDetail/index.vue
  3. 2
      src/pages/account/login/index.vue
  4. 21
      src/pages/achievement/list/examResults.vue
  5. 6
      src/pages/achievement/list/practiceResults.vue
  6. 16
      src/pages/achievement/list/wrongBook.vue
  7. 16
      src/pages/achievement/statistics/index.vue
  8. 9
      src/pages/assessment/detail/index.vue
  9. 5
      src/pages/assessment/doReview/index.vue
  10. 53
      src/pages/assessment/list/index.vue
  11. 23
      src/pages/assessment/list/studentSide.vue
  12. 20
      src/pages/assessment/list/studentTree.vue
  13. 5
      src/pages/assessment/review/index.vue
  14. 12
      src/pages/assessment/scoreQuery/index.vue
  15. 12
      src/pages/messageBoard/list/index.vue
  16. 4
      src/pages/practice/detail/index.vue
  17. 2
      src/pages/practice/list/index.vue
  18. 4
      src/pages/practice/list/studentSide.vue
  19. 27
      src/pages/quesBank/list/myQuesBank.vue
  20. 4
      src/pages/quesBank/list/quesBankType.vue
  21. 5
      src/pages/testPaper/list/allTestPaper.vue
  22. 4
      src/pages/testPaper/list/myTestPaper.vue
  23. 2
      src/setting.js
  24. 2
      src/store/modules/assessment.js

@ -73,7 +73,7 @@ export default {
updateStaff: `management/staff/updateStaff`, updateStaff: `management/staff/updateStaff`,
getWorkNumber: `management/staff/getWorkNumber`, getWorkNumber: `management/staff/getWorkNumber`,
exportFailureStaff: `${Setting.apiBaseURL}/management/staff/exportFailure`, exportFailureStaff: `${Setting.apiBaseURL}/management/staff/exportFailure`,
uploadFileStaff: `${Setting.apiBaseURL}/management/staff/uploadFile`, uploadFileStaff: `${Setting.apiBaseURL}/management/staff/managementUpload`,
downloadStaffTemp: `http://liuwanr.oss-cn-shenzhen.aliyuncs.com/xlsx/20201102/1604658763812.xlsx`, downloadStaffTemp: `http://liuwanr.oss-cn-shenzhen.aliyuncs.com/xlsx/20201102/1604658763812.xlsx`,
// 角色管理 // 角色管理
@ -114,6 +114,7 @@ export default {
modifyState:`management/testPaper/modifyState`, modifyState:`management/testPaper/modifyState`,
schoolTestPaperByRelease:`management/testPaper/schoolTestPaperByRelease`, schoolTestPaperByRelease:`management/testPaper/schoolTestPaperByRelease`,
previewPaper:`/management/testPaper/previewPaper`, previewPaper:`/management/testPaper/previewPaper`,
getPaperCurriculum:`/management/testPaper/getPaperCurriculum`,
// 试题信息相关 // 试题信息相关
addQuestions:`management/questions/addQuestions`, addQuestions:`management/questions/addQuestions`,

@ -118,9 +118,18 @@ export default {
initData(data){ initData(data){
let index = 0 let index = 0
for(let i in data){ for(let i in data){
data[i].map(n => { data[i].map((n,j) => {
index++ index++
n.mediaEleId = `player${index}` n.mediaEleId = `player${index}`
if(i == 'list3'){
let answer = []
for(let j in n){
if(j.includes('option') && n[j]){
answer.push(n[j])
}
}
n.answer = answer.join('|')
}
}) })
} }
this.allData = data this.allData = data

@ -58,7 +58,7 @@ export default {
data: function() { data: function() {
return { return {
loginForm: { loginForm: {
username: 'manager', username: 'manage',
password: '111aaa', password: '111aaa',
}, },
loginRules: { loginRules: {

@ -69,9 +69,21 @@
</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 prop="timeSpent" label="用时(分钟)" align="center"></el-table-column> <template slot-scope="scope">
<el-table-column prop="openingTime" label="考试时间" align="center"></el-table-column> <p>{{scope.row.thisScore | defaultShow}}</p>
</template>
</el-table-column>
<el-table-column prop="timeSpent" label="用时(分钟)" align="center">
<template slot-scope="scope">
{{scope.row.timeSpent != null && scope.row.timeSpent != '--' ? (scope.row.timeSpent / 60).toFixed(2) : scope.row.timeSpent}}
</template>
</el-table-column>
<el-table-column prop="openingTime" label="考试时间" align="center">
<template slot-scope="scope">
<p>{{scope.row.openingTime | defaultShow}}</p>
</template>
</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)" v-auth="'/achievement/list:考试成绩:查看详情'">查看详情</el-button> <el-button type="text" @click="show(scope.row)" v-auth="'/achievement/list:考试成绩:查看详情'">查看详情</el-button>
@ -183,7 +195,8 @@ export default {
id: row.paperId, id: row.paperId,
assessmentId: row.assessmentId, assessmentId: row.assessmentId,
stuId: row.stuId, stuId: row.stuId,
thisScore: row.thisScore thisScore: row.thisScore,
timeSpent: row.timeSpent
}) })
this.$router.push('/assessment/detail') this.$router.push('/assessment/detail')
}, },

@ -121,7 +121,11 @@
>{{scope.$index + (page - 1) * pageSize + 1}}</template> >{{scope.$index + (page - 1) * pageSize + 1}}</template>
</el-table-column> </el-table-column>
<el-table-column prop="paperName" label="练习试卷名称" align="center"></el-table-column> <el-table-column prop="paperName" label="练习试卷名称" align="center"></el-table-column>
<el-table-column prop="examTime" label="开始时间" align="center"></el-table-column> <el-table-column prop="examTime" label="开始时间" align="center">
<template slot-scope="scope">
<p>{{scope.row.examTime | defaultShow}}</p>
</template>
</el-table-column>
<el-table-column prop="score" label="得分" align="center"> <el-table-column prop="score" label="得分" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<p>{{scope.row.score | defaultShow}}</p> <p>{{scope.row.score | defaultShow}}</p>

@ -43,12 +43,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"
@ -59,16 +53,12 @@
{{type == 1 ? '考核试卷' : '练习试卷'}} {{type == 1 ? '考核试卷' : '练习试卷'}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="试卷名称" align="center"> <el-table-column prop="paperName" label="试卷名称" align="center"></el-table-column>
<template slot-scope="scope">
{{paperName}}
</template>
</el-table-column>
<el-table-column prop="knowledgePoints" label="所需知识点" align="center"></el-table-column> <el-table-column prop="knowledgePoints" label="所需知识点" align="center"></el-table-column>
<el-table-column prop="questionStem" label="题干" align="center" :show-overflow-tooltip="true"></el-table-column> <el-table-column prop="questionStem" label="题干" align="center" :show-overflow-tooltip="true"></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="showNum(scope.row)">{{scope.row.wrongNum}}</el-button> <el-button type="primary" size="mini" @click="showNum(scope.row)">{{scope.row.wrongNum}}</el-button>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center"> <el-table-column label="操作" align="center">

@ -173,7 +173,21 @@ export default {
getList() { getList() {
this.$get(`${this.api.getRanking}?pageNum=${this.page}&pageSize=${this.pageSize}&assessmentId=${this.assessmentId}`) this.$get(`${this.api.getRanking}?pageNum=${this.page}&pageSize=${this.pageSize}&assessmentId=${this.assessmentId}`)
.then(res => { .then(res => {
this.listData = res.data.list.list let list = res.data.list.list
let len = list.length - 1
for(let i = 0; i < len; i++){
for(let j = 0; j < len; j++){
if(list[j].rank && list[j].rank > list[j + 1].rank){
let temp = list[j]
list[j] = list[j + 1]
list[j + 1] = temp
}
}
}
let hasRank = list.filter(n => n.rank)
let notRank = list.filter(n => !n.rank)
list = [...hasRank,...notRank]
this.listData = list
this.total = res.data.list.totalCount this.total = res.data.list.totalCount
}) })
.catch(err => {}) .catch(err => {})

@ -12,7 +12,7 @@
</div> </div>
<div class="m-r-20"> <div class="m-r-20">
<span class="name">考试时长</span> <span class="name">考试时长</span>
<span class="val">{{time}}分钟</span> <span class="val">{{timeSpent != null && timeSpent != '--' ? (timeSpent / 60).toFixed(2) + '分钟' : timeSpent}}</span>
</div> </div>
<div> <div>
<span class="name">排名</span> <span class="name">排名</span>
@ -42,14 +42,14 @@
<p class="key">题干</p> <p class="key">题干</p>
<p class="val" v-html="item.question_stem"></p> <p class="val" v-html="item.question_stem"></p>
</div> </div>
<div class="meta"> <div class="meta" v-if="active != 4 && active != 5">
<p class="key">选项</p> <p class="key">选项</p>
<div class="val"> <div class="val">
<p v-for="(option,i) in item.options" :key="i">{{i}}.{{item.options[i]}}</p> <p v-for="(option,i) in item.options" :key="i">{{i}}.{{item.options[i]}}</p>
</div> </div>
</div> </div>
<div class="meta ans"> <div class="meta ans">
<div class="info"> <div class="info" v-if="active != 4">
<p class="key">正确答案</p> <p class="key">正确答案</p>
<p class="val">{{item.answer}}</p> <p class="val">{{item.answer}}</p>
</div> </div>
@ -136,7 +136,7 @@ export default {
'userId' 'userId'
]), ]),
...mapState('achievement', [ ...mapState('achievement', [
'id','assessmentId','stuId','thisScore' 'id','assessmentId','stuId','thisScore','timeSpent'
]) ])
}, },
mounted() { mounted() {
@ -147,7 +147,6 @@ export default {
this.$post(`${this.api.answerDetail}?userId=${this.stuId}&assessmentId=${this.assessmentId}&paperId=${this.id}`) this.$post(`${this.api.answerDetail}?userId=${this.stuId}&assessmentId=${this.assessmentId}&paperId=${this.id}`)
.then(res => { .then(res => {
this.paperName = res.paperName this.paperName = res.paperName
this.time = res.time
this.ranking = res.ranking this.ranking = res.ranking
res.data.list4.map(n => { res.data.list4.map(n => {

@ -16,7 +16,7 @@
</div> </div>
<div> <div>
<span class="name">考试时长</span> <span class="name">考试时长</span>
<span class="val">{{duration}}</span> <span class="val">{{timeSpent != null && timeSpent != '--' ? (timeSpent / 60).toFixed(2) + '分钟' : timeSpent}}</span>
</div> </div>
</div> </div>
@ -114,7 +114,7 @@ export default {
'userId','clientId' 'userId','clientId'
]), ]),
...mapState('assessment', [ ...mapState('assessment', [
'reviewId','paperId','isReview','reviewStatus','stuId' 'reviewId','paperId','isReview','reviewStatus','stuId','timeSpent'
]), ]),
...mapGetters('assessment', [ ...mapGetters('assessment', [
'getCorrectingName' 'getCorrectingName'
@ -152,7 +152,6 @@ export default {
this.paperName = list[0].name this.paperName = list[0].name
this.userName = list[0].userName this.userName = list[0].userName
this.this_score = list[0].this_score this.this_score = list[0].this_score
this.duration = list[0].duration
}) })
.catch(err => {}) .catch(err => {})
}, },

@ -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"></studentSide> <studentSide ref="getSelectData" :classId="form.classId" :studentId="form.studentId" :key="stuCompKey" @fircheck="fircheck" @twocheck="twocheck" @threecheck="threecheck" @fourcheck="fourcheck"></studentSide>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -297,7 +297,7 @@ export default {
}, },
mounted() { mounted() {
this.getData() this.getData()
// this.addInterval() this.addInterval()
}, },
watch: { watch: {
keyword: function(val) { keyword: function(val) {
@ -377,10 +377,18 @@ 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)
classIds.indexOf(n.classId) == -1 && classIds.push(n.classId)
}else{
util.removeByValue(studentId, j.userId);
}
})
}) })
}) })
}) })
@ -392,6 +400,7 @@ export default {
if(val.children){ if(val.children){
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)) val.children.map( e => e.children.map(n => n.ischeck = e.ischeck))
val.children.map( e => e.children.map(n => n.children.map(j => j.ischeck = e.ischeck)))
this.handleCheck(val2) this.handleCheck(val2)
}else{ }else{
this.form.classId = val.classId this.form.classId = val.classId
@ -401,10 +410,11 @@ export default {
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){
if(e.children.every(i => i.ischeck)){ if(e.children.length && e.children.every(i => i.ischeck)){
e.ischeck = true e.ischeck = true
}else{ }else{
e.ischeck = false e.ischeck = false
@ -416,6 +426,7 @@ 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 => {
@ -427,7 +438,7 @@ export default {
} }
} }
}) })
if(e.children.every(i => i.ischeck)){ if(e.children.length && e.children.every(i => i.ischeck)){
e.ischeck = true e.ischeck = true
}else{ }else{
e.ischeck = false e.ischeck = false
@ -436,6 +447,35 @@ 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.length && r.children.every(i => i.ischeck)){
r.ischeck = true
}else{
r.ischeck = false
}
})
if(e.children.length && 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();
@ -516,7 +556,6 @@ export default {
this.time = [now,second] this.time = [now,second]
this.form.startTime = now this.form.startTime = now
this.form.endTime = second this.form.endTime = second
console.log(11,this.form)
this.addVisible = true this.addVisible = true
}, },
save(){ save(){
@ -529,7 +568,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 = {

@ -1,7 +1,7 @@
<template> <template>
<div> <div>
<div> <div>
<lctree :data="majorList" :allClassList.sync="allClassList" @fircheckitem="fircheckitem" @twocheckitem="twocheckitem" @threecheckitem="threecheckitem"></lctree> <lctree :data="majorList" :allClassList.sync="allClassList" @fircheckitem="fircheckitem" @twocheckitem="twocheckitem" @threecheckitem="threecheckitem" @fourcheckitem="fourcheckitem"></lctree>
</div> </div>
</div> </div>
</template> </template>
@ -54,7 +54,6 @@ 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 = [] let classList = []
console.log(22,this.classId)
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 => {
@ -80,7 +79,17 @@ 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 => {
e.userIds = res.data.studentList.map(n => n.userId) res.data.studentList.map(s => {
(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
// e.userIds = res.data.studentList.map(n => n.userId)
}).catch(res => {}) }).catch(res => {})
if(classId.includes(String(e.classId))){ if(classId.includes(String(e.classId))){
@ -91,10 +100,10 @@ export default {
}) })
j.children = res.data.Class j.children = res.data.Class
classList = classList.concat(res.data.Class) classList = classList.concat(res.data.Class)
if(j.children.every(i => i.ischeck)){ if(j.children.length && j.children.every(i => i.ischeck)){
j.ischeck = true j.ischeck = true
} }
if(n.children.every(i => i.ischeck)){ if(n.children.length && n.children.every(i => i.ischeck)){
n.ischeck = true n.ischeck = true
} }
}).catch(res => {}); }).catch(res => {});
@ -123,6 +132,10 @@ 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>

@ -42,10 +42,25 @@
<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)">
<i class="empty"></i> <img
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>
@ -124,6 +139,9 @@ export default {
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

@ -49,7 +49,7 @@
</el-table-column> </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">
{{getExamStatusName(scope.row.examinationStatus)}} {{scope.row.examinationStatus == 1 ? '已考' : getExamStatusName(scope.row.examinationStatus)}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="name" label="批阅状态" align="center"> <el-table-column prop="name" label="批阅状态" align="center">
@ -152,7 +152,8 @@ export default {
id: row.assessmentId, id: row.assessmentId,
paperId: row.paperId, paperId: row.paperId,
stuId: row.stuId, stuId: row.stuId,
reviewStatus: row.reviewStatus reviewStatus: row.reviewStatus,
timeSpent: row.timeSpent
}) })
this.$router.push('doReview') this.$router.push('doReview')
}, },

@ -74,8 +74,16 @@
<p>{{scope.row.thisScore | defaultShow}}</p> <p>{{scope.row.thisScore | defaultShow}}</p>
</template> </template>
</el-table-column> </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 prop="openingTime" label="考试时间" align="center"></el-table-column> <template slot-scope="scope">
{{scope.row.timeSpent != null && scope.row.timeSpent != '--' ? (scope.row.timeSpent / 60).toFixed(2) : scope.row.timeSpent}}
</template>
</el-table-column>
<el-table-column prop="openingTime" label="考试时间" align="center">
<template slot-scope="scope">
<p>{{scope.row.openingTime | defaultShow}}</p>
</template>
</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>

@ -152,9 +152,12 @@ export default {
}).catch(res => {}) }).catch(res => {})
}, },
submitComment(row){ submitComment(row){
let content = row.replyContent
if(!content) return this.$message.error('请填写内容')
content = content.replace(/\uD83C[\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F]/g, "")
let data = { let data = {
bid: row.bid, bid: row.bid,
content: row.replyContent, content,
commentUserId: this.userId, commentUserId: this.userId,
schoolId: this.clientId, schoolId: this.clientId,
} }
@ -178,10 +181,13 @@ export default {
} }
}, },
submitReply(row){ submitReply(row){
let content = row.replyContent
if(!content) return this.$message.error('请填写内容')
content = content.replace(/\uD83C[\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F]/g, "")
let data = { let data = {
bid: row.bid, bid: row.bid,
commentId: row.commentId, commentId: row.commentId,
replyComment: row.replyContent, replyComment: content,
replyUserId: row.commentUserId ? row.commentUserId : row.userIdByReply, replyUserId: row.commentUserId ? row.commentUserId : row.userIdByReply,
userId: this.userId, userId: this.userId,
} }
@ -192,6 +198,8 @@ export default {
}).catch(res => {}) }).catch(res => {})
}, },
submitMsg(){ submitMsg(){
if(!this.content) return this.$message.error('请填写内容')
this.content = this.content.replace(/\uD83C[\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F]/g, "")
let data = { let data = {
content: this.content, content: this.content,
schoolId: this.clientId, schoolId: this.clientId,

@ -38,14 +38,14 @@
<p class="key">题干</p> <p class="key">题干</p>
<p class="val" v-html="item.questionStem"></p> <p class="val" v-html="item.questionStem"></p>
</div> </div>
<div class="meta"> <div class="meta" v-if="active != 4 && active != 5">
<p class="key">选项</p> <p class="key">选项</p>
<div class="val"> <div class="val">
<p v-for="(option,i) in item.options" :key="i">{{i}}.{{item.options[i]}}</p> <p v-for="(option,i) in item.options" :key="i">{{i}}.{{item.options[i]}}</p>
</div> </div>
</div> </div>
<div class="meta ans"> <div class="meta ans">
<div class="info"> <div class="info" v-if="active != 4">
<p class="key">正确答案</p> <p class="key">正确答案</p>
<p class="val">{{item.answer}}</p> <p class="val">{{item.answer}}</p>
</div> </div>

@ -307,7 +307,7 @@ export default {
val2.forEach( e => { val2.forEach( e => {
e.children.forEach( r => { e.children.forEach( r => {
if(r.gradeId == val.gradeId){ if(r.gradeId == val.gradeId){
if(e.children.every(i => i.ischeck)){ if(e.children.length && e.children.every(i => i.ischeck)){
e.ischeck = true e.ischeck = true
}else{ }else{
e.ischeck = false e.ischeck = false

@ -85,10 +85,10 @@ export default {
}) })
j.children = res.data.Class j.children = res.data.Class
classList = classList.concat(res.data.Class) classList = classList.concat(res.data.Class)
if(j.children.every(i => i.ischeck)){ if(j.children.length && j.children.every(i => i.ischeck)){
j.ischeck = true j.ischeck = true
} }
if(n.children.every(i => i.ischeck)){ if(n.children.length && n.children.every(i => i.ischeck)){
n.ischeck = true n.ischeck = true
} }
}).catch(res => {}); }).catch(res => {});

@ -90,17 +90,20 @@
<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
ref="upload"
accept=".xls,.xlsx" accept=".xls,.xlsx"
:on-remove="handleRemove" :on-remove="handleRemove"
:on-error="uploadError" :on-error="uploadError"
:on-success="uploadSuccess" :on-success="uploadSuccess"
:before-remove="beforeRemove" :before-remove="beforeRemove"
:on-progress="handleProgress"
:limit="1" :limit="1"
:on-exceed="handleExceed" :on-exceed="handleExceed"
:action="this.api.impExcel" :action="this.api.impExcel"
:file-list="uploadList" :file-list="uploadList"
:data="{userId: this.userId,schoolId: this.clientId}" :data="{userId: this.userId,schoolId: this.clientId}"
name="file" name="file"
:auto-upload="false"
> >
<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>
</el-upload> </el-upload>
@ -352,12 +355,16 @@ export default {
uploadSuccess(res, file, fileList) { uploadSuccess(res, file, fileList) {
this.uploadFaild = false this.uploadFaild = false
if(res.success){ if(res.success){
if(res.data.data.token){ // if(res.data.data.token){
this.token = res.data.data.token // this.token = res.data.data.token
this.uploadFaild = true // this.uploadFaild = true
}else{ // }else{
this.$message.success('上传成功') this.$message.success('上传成功')
} this.importVisible = false
this.page = 1
this.keyword = ''
this.getData()
// }
}else{ }else{
// res.message ? this.$message.error(res.message) : this.$message.error('') // res.message ? this.$message.error(res.message) : this.$message.error('')
res.message && this.$message.error(res.message) res.message && this.$message.error(res.message)
@ -374,7 +381,10 @@ export default {
}); });
}, },
beforeRemove(file, fileList) { beforeRemove(file, fileList) {
return this.$confirm(`确定移除 ${file.name}`); return this.$confirm(`确定移除 ${file.name}`)
},
handleProgress(event, file, fileList){
}, },
handleRemove(file, fileList) { handleRemove(file, fileList) {
this.uploadList = fileList this.uploadList = fileList
@ -386,10 +396,7 @@ export default {
this.uploadList = [] this.uploadList = []
}, },
uploadSure(){ uploadSure(){
this.importVisible = false this.$refs.upload.submit()
this.page = 1
this.keyword = ''
this.getData()
}, },
} }
}; };

@ -29,8 +29,8 @@
<el-table-column label="操作" width="200"> <el-table-column label="操作" width="200">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" v-if="scope.row.parentId == 0 && scope.row.source == 2" @click="addSecond(scope.row)" v-auth="'/quesBank/list:题库分类:添加'">添加</el-button> <el-button type="text" v-if="scope.row.parentId == 0 && scope.row.source == 2" @click="addSecond(scope.row)" v-auth="'/quesBank/list:题库分类:添加'">添加</el-button>
<el-button type="text" @click="editType(scope.row)" v-auth="'/quesBank/list:题库分类:编辑'">编辑</el-button> <el-button type="text" v-if="scope.row.source == 2" @click="editType(scope.row)" v-auth="'/quesBank/list:题库分类:编辑'">编辑</el-button>
<el-button type="text" @click="handleDelete(scope.row)" v-auth="'/quesBank/list:题库分类:删除'">删除</el-button> <el-button type="text" v-if="scope.row.source == 2" @click="handleDelete(scope.row)" v-auth="'/quesBank/list:题库分类:删除'">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>

@ -44,7 +44,6 @@
<el-card shadow="hover"> <el-card shadow="hover">
<div class="p-title m-b-20">所有试卷</div> <div class="p-title m-b-20">所有试卷</div>
<el-table :data="listData" class="table" stripe header-align="center" row-key="id" @selection-change="handleSelecteChange"> <el-table :data="listData" class="table" stripe header-align="center" row-key="id" @selection-change="handleSelecteChange">
<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> <el-table-column type="index" width="100" label="序号" align="center"></el-table-column>
<el-table-column prop="name" label="试卷名称" align="center"></el-table-column> <el-table-column prop="name" label="试卷名称" align="center"></el-table-column>
<el-table-column prop="courses" label="所属课程" align="center"></el-table-column> <el-table-column prop="courses" label="所属课程" align="center"></el-table-column>
@ -169,9 +168,9 @@ export default {
this.multipleSelection = val; this.multipleSelection = val;
}, },
getCourses() { getCourses() {
this.$post(`${this.api.getSelectInfo}?type=2`) this.$get(`${this.api.getPaperCurriculum}?schoolId=${this.clientId}`)
.then(res => { .then(res => {
this.courseList = res.data.pointList this.courseList = res.data.list
}) })
.catch(err => {}) .catch(err => {})
}, },

@ -288,9 +288,9 @@ export default {
this.multipleSelection = val this.multipleSelection = val
}, },
getCourses() { getCourses() {
this.$post(`${this.api.getSelectInfo}?type=2`) this.$get(`${this.api.getPaperCurriculum}?schoolId=${this.clientId}`)
.then(res => { .then(res => {
this.courseList = res.data.pointList this.courseList = res.data.list
}) })
.catch(err => {}) .catch(err => {})
}, },

@ -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',
// 接口请求返回错误时,弹窗的持续时间,单位:秒 // 接口请求返回错误时,弹窗的持续时间,单位:秒
modalDuration: 3, modalDuration: 3,
// 接口请求返回错误时,弹窗的类型,可选值为 Message 或 Notice // 接口请求返回错误时,弹窗的类型,可选值为 Message 或 Notice

@ -11,6 +11,7 @@ export default {
stuId: '', stuId: '',
isReview: false, isReview: false,
reviewStatus: '', reviewStatus: '',
timeSpent: 0,
typeList: [ typeList: [
{ {
id: 1, id: 1,
@ -115,6 +116,7 @@ export default {
state.stuId = info.stuId state.stuId = info.stuId
state.isReview = info.isReview state.isReview = info.isReview
state.reviewStatus = info.reviewStatus state.reviewStatus = info.reviewStatus
state.timeSpent = info.timeSpent
}, },
}, },
actions: { actions: {

Loading…
Cancel
Save