1.0版本封版

master
yujialong 4 years ago
parent 68af41a4b7
commit 0c602151a6
  1. 4
      src/components/achiStatistics/index.vue
  2. 85
      src/components/doReview/index.vue
  3. 2
      src/layouts/header/index.vue
  4. 12
      src/layouts/navbar/index.vue
  5. 19
      src/pages/achievement/detail/index.vue
  6. 10
      src/pages/achievement/list/examResults.vue
  7. 2
      src/pages/achievement/list/practiceResults.vue
  8. 2
      src/pages/achievement/list/wrongBook.vue
  9. 41
      src/pages/assessment/list/index.vue
  10. 53
      src/pages/assessment/monitor/index.vue
  11. 29
      src/pages/assessment/review/index.vue
  12. 15
      src/pages/quesBank/list/globalQuesBank.vue
  13. 18
      src/pages/quesBank/list/myQuesBank.vue
  14. 18
      src/pages/testPaper/add/index.vue
  15. 13
      src/pages/testPaper/list/allTestPaper.vue
  16. 27
      src/pages/testPaper/list/myTestPaper.vue
  17. 2
      src/setting.js
  18. 2
      src/store/modules/achievement.js
  19. 9
      src/store/modules/assessment.js

@ -77,7 +77,7 @@ export default {
'userId'
]),
...mapState('achievement', [
'id','assessmentId','assessmentName','classId'
'id','assessmentId','assessmentName','classId','stuId'
])
},
mounted() {
@ -85,7 +85,7 @@ export default {
},
methods: {
getData() {
this.$post(`${this.api.achievementStatistics}?userId=${this.userId}&assessmentId=${this.assessmentId}&paperId=${this.id}&classId=${this.classId}`)
this.$post(`${this.api.achievementStatistics}?userId=${this.stuId}&assessmentId=${this.assessmentId}&paperId=${this.id}&classId=${this.classId}`)
.then(res => {
this.info = res.data.list
let statData = []

@ -8,7 +8,7 @@
</div>
<div>
<span class="name">学生得分</span>
<span class="val">{{(reviewStatus == 2 || reviewStatus == 3) ? total_score : '--'}}</span>
<span class="val">{{(reviewStatus == 2 || reviewStatus == 3) ? this_score : '--'}}</span>
</div>
<div>
<span class="name">试卷总分</span>
@ -19,7 +19,7 @@
<span class="val">{{duration}}</span>
</div>
</div>
<div class="wrap">
<div class="select">
<el-radio v-model="look" label="1">查看全部</el-radio>
@ -30,7 +30,7 @@
<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">
<div class="info" v-if="!item.isSub">
<p class="key">正确答案</p>
<p class="val">{{item.answer}}</p>
</div>
@ -50,7 +50,7 @@
<div class="meta">
<span class="key">考试得分</span>
<div class="val">
<input type="text" v-model.number="item.this_score" :disabled="!isReview">
<input type="text" v-model.number="item.question_score" :disabled="!isReview || !item.isSub">
</div>
</div>
</div>
@ -71,7 +71,7 @@ export default {
return {
paperName: '',
userName: '',
total_score: '',
this_score: '',
duration: '',
list: [],
look: '1',
@ -82,7 +82,7 @@ export default {
'userId','clientId'
]),
...mapState('assessment', [
'reviewId','paperId','isReview','reviewStatus'
'reviewId','paperId','isReview','reviewStatus','stuId'
]),
...mapGetters('assessment', [
'getCorrectingName'
@ -98,51 +98,74 @@ export default {
},
methods: {
getData() {
this.$post(`${this.api.correcting}?assessmentId=${this.reviewId}&userId=${this.userId}&paperId=${this.paperId}`)
this.$post(`${this.api.correcting}?assessmentId=${this.reviewId}&userId=${this.stuId}&paperId=${this.paperId}`)
.then(res => {
this.list = res.data.list
this.list.forEach(n => {
n.isCorrecting == 0 && (n.this_score = '')
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.paperName = this.list[0].name
this.userName = this.list[0].userName
this.total_score = this.list[0].total_score
this.duration = this.list[0].duration
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=${1}&userId=${566}&paperId=${1}`)
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 data = []
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){
let isEmpty = false
let isNotNum = false
this.list.map(n => {
if(n.this_score === '') isEmpty = true
if(isNaN(n.this_score)) isNotNum = true
if(n.isSub){
data.push({
detailId: n.detailId,
score: n.this_score
})
}
})
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 => {})
}).catch(err => {})
},
},
};

@ -1,5 +1,5 @@
<template>
<div class="header flex j-between">
<div class="header flex a-center j-between">
<div v-if="showBack" class="goBack" v-throttle @click="back"><i class="el-icon-arrow-left"></i>返回</div>
<div v-else class="logo">
<img src="../../assets/img/logo-fill.png">

@ -60,32 +60,32 @@ export default {
collapse: false,
defaultMenus: [
{
icon: 'el-icon-monitor',
icon: 'el-icon-user',
index: '/index/list',
title: '学生管理'
},
{
icon: 'el-icon-news',
icon: 'el-icon-notebook-1',
index: '/quesBank/list',
title: '题库管理'
},
{
icon: 'el-icon-user',
icon: 'el-icon-receiving',
index: '/testPaper/list',
title: '试卷管理'
},
{
icon: 'el-icon-user',
icon: 'el-icon-data-analysis',
index: '/assessment/list',
title: '考核管理'
},
{
icon: 'el-icon-user',
icon: 'el-icon-suitcase-1',
index: '/achievement/list',
title: '成绩管理'
},
{
icon: 'el-icon-takeaway-box',
icon: 'el-icon-setting',
index: '/system/list',
title: '系统设置'
}

@ -75,13 +75,13 @@ export default {
name: '多选题'
},{
id: 3,
name: '填空题'
name: '判断题'
},{
id: 4,
name: '判断题'
name: '简答题'
},{
id: 5,
name: '简答题'
name: '填空题'
}
],
active: 1,
@ -93,7 +93,7 @@ export default {
'userId'
]),
...mapState('achievement', [
'id','assessmentId'
'id','assessmentId','stuId'
])
},
mounted() {
@ -101,8 +101,7 @@ export default {
},
methods: {
getData() {
this.$post(`${this.api.answerDetail}?userId=${this.userId}&assessmentId=${this.assessmentId}&paperId=${this.id}`)
// this.$post(`${this.api.answerDetail}?userId=${1}&assessmentId=${1}&paperId=${1}`)
this.$post(`${this.api.answerDetail}?userId=${this.stuId}&assessmentId=${this.assessmentId}&paperId=${this.id}`)
.then(res => {
this.paperName = res.paperName
this.time = res.time
@ -110,8 +109,7 @@ export default {
this.curType = this.allData.list1
this.handleOptions()
})
.catch(err => {});
.catch(err => {})
},
tabChange(id){
this.active = id
@ -123,12 +121,14 @@ export default {
curType.forEach(n => {
if(!n.options){
let options = {}
let answer = []
for(let i in n){
if(i.includes('option') && n[i]){
console.log(i.replace('option_',''))
options[i.replace('option_','')] = n[i]
if(n.typeName == '填空题') answer.push(n[i])
}
}
if(n.typeName == '填空题') n.answer = answer.join('|')
n.options = options
}
})
@ -224,7 +224,6 @@ export default {
font-size: 12px;
&.ans{
display: flex;
align-items: center;
.info{
margin-right: 20px;
}

@ -157,7 +157,6 @@ export default {
getClass() {
this.$post(this.api.getMyClass,{
userId: this.userId
// userId: 1
})
.then(res => {
this.classList = res.data.list
@ -176,8 +175,7 @@ export default {
this.assessmentId = this.classList.find(n => n.classId == this.classId).assessmentId
this.assessmentName = this.assessmentNameList[0].assessmentName
this.getData()
})
.catch(err => {})
}).catch(err => {})
},
handleCurrentChange(val) {
this.page = val
@ -193,7 +191,8 @@ export default {
show(row){
this.setInfo({
id: row.paperId,
assessmentId: row.id
assessmentId: row.id,
stuId: row.stuId
})
this.$router.push('detail')
},
@ -203,7 +202,8 @@ export default {
id: this.listData[0].paperId,
assessmentId: this.assessmentId,
assessmentName: this.assessmentName,
classId: this.classId
classId: this.classId,
stuId: this.listData[0].stuId
})
this.$router.push('statistics')
}else{

@ -147,7 +147,7 @@ export default {
data() {
return {
keyword: '',
listData: [{}],
listData: [],
classId: '',
classList: [],
total: 0,

@ -95,7 +95,7 @@
export default {
data() {
return {
listData: [{}],
listData: [],
keyword: '',
page: 1,
pageSize: 10,

@ -123,7 +123,7 @@
</el-tag>
</el-form-item>
<el-form-item label="发布班级">
<studentSide ref="getSelectData" :classId="form.classId" :studentId="form.studentId" :key="form.id" @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" @fourcheck="fourcheck"></studentSide>
</el-form-item>
</el-form>
@ -199,7 +199,7 @@
<div class="details">
<div class="line">
<span class="key">考核内容</span>
<p class="val">{{testPaperName}}</p>
<p class="val">{{assContent}}</p>
</div>
<div class="line">
<span class="key">考核题数</span>
@ -272,7 +272,10 @@ export default {
testPaperId: '',
testPaperName: '',
quesNum: 0,
assPeopleNum: 0
assPeopleNum: 0,
assContent: '',
timer: null,
stuCompKey: 1
};
},
components: {
@ -291,6 +294,7 @@ export default {
},
mounted() {
this.getData()
this.addInterval()
},
watch: {
keyword: function(val) {
@ -335,7 +339,15 @@ export default {
this.listData = res.data.Assessment
this.total = res.data.total
})
.catch(err => {})
.catch(err => {
clearInterval(this.timer)
})
},
addInterval(){
this.timer = setInterval(this.getData,1000)
this.$once('hook:beforeDestroy',() => {
clearInterval(this.timer)
})
},
handleCheck(data){
let professionalStudentIds = []
@ -380,11 +392,13 @@ export default {
val.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.children.map(j => j.ischeck = e.ischeck)))
this.handleCheck(val2)
},
twocheck(val,val2){
val.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 => {
e.children.forEach( r => {
if(r.gradeId == val.gradeId){
@ -469,6 +483,7 @@ export default {
edit(row){
this.$get(`${this.api.queryAssessmentNumber}?id=${row.id}`).then(res => {
this.form = row
this.originalName = row.assessmentName
this.form.studentId = res.data.studentId
this.testPaperName = row.name
this.time = [this.form.startTime,this.form.endTime]
@ -479,7 +494,7 @@ export default {
nameChange(){
if(this.form.assessmentName !== this.originalName){
this.$get(`${this.api.queryAssessmentName}?userId=${this.userId}&assessmentName=${this.form.assessmentName}`).then(res => {
if(res.data.userInfo){
if(res.data.Assessment){
this.nameRepeat = true
this.$message.warning('该考核名称已存在')
}else{
@ -492,7 +507,8 @@ export default {
},
monitor(row){
this.setAssInfo({
id: row.id
id: row.id,
endTime: row.endTime
})
this.$router.push('monitor')
},
@ -523,9 +539,12 @@ export default {
if(this.nameRepeat) return this.$message.warning('该考核名称已存在')
if(form.type === '') return this.$message.warning('请选择考核类型')
if(form.startTime === '') return this.$message.warning('请选择考核时间')
if(new Date(this.form.startTime).getTime() < new Date().getTime()) return this.$message.warning('考试开始时间不能小于当前时间')
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.classId === '') 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
let data = {
id: form.id,
@ -566,6 +585,12 @@ export default {
testPaperId: '',
type: ''
}
this.time = []
this.testPaperName = ''
this.testPaperId = ''
this.cid = ''
this.keywordPaper = ''
this.stuCompKey++
},
openSelect(){
this.selectVisible = true
@ -606,13 +631,13 @@ export default {
this.selectVisible = false
},
closeSelect(){
},
show(row){
this.$get(`${this.api.queryAssessmentDetails}?id=${row.id}`)
.then(res => {
let data = res.data.data
this.testPaperName = data.name
this.assContent = data.name
this.quesNum = data.questionNumber.split(',').length
this.assPeopleNum = data.number
})

@ -37,7 +37,7 @@
<div class="filter">
<div class="item">
<p class="key">考试状态</p>
<el-select v-model="state" clearable placeholder="请选择考试状态" @change="getData">
<el-select v-model="state" clearable placeholder="请选择考试状态" @change="getData" size="small">
<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-select>
@ -49,14 +49,13 @@
</div>
<div class="table">
<div class="flex-justify-end">
<div class="flex-justify-end m-b-10">
<el-button type="primary" size="small" round @click="rollUp">强制收卷</el-button>
</div>
<el-table
:data="listData"
ref="table"
row-key="id"
class="table"
stripe
header-align="center"
@selection-change="handleSelectionChange"
@ -100,6 +99,7 @@
<script>
import mixins from '@/mixins/setBackground'
import { mapState,mapGetters } from 'vuex'
import util from '@/libs/util'
export default {
mixins: [ mixins ],
data() {
@ -113,11 +113,12 @@ export default {
multipleSelection: [],
paperName: '',
paperScore: '',
remainingTime: '',
remainingTime: '0小时0分0秒',
shouldArrive: '',
inExamination: '',
completed: '',
notTested: '',
timer: null
};
},
computed: {
@ -125,17 +126,44 @@ export default {
'userId','clientId'
]),
...mapState('assessment', [
'id','stateList'
'id','stateList','endTime'
]),
...mapGetters('assessment', [
'getTypeName','getStudentStateName'
])
},
directives: {
countdown: {
bind: function(el,binding,vnode) {
let that = vnode.context
let duration = new Date(new Date(that.endTime).getTime() - new Date().getTime()) / 1000
let time = `${Math.floor(duration / 3600)}小时${Math.floor(duration % 3600 / 60)}${Math.floor(duration % 3600 % 60)}`
that.timer = setInterval(() => {
let timeList = time.replace('小时',':').replace('分',':').replace('秒','').split(':')
let total = Number.parseInt(timeList[0] * 60 * 60) + Number.parseInt(timeList[1] * 60) + Number.parseInt(timeList[2])
if(total > 0){
--total
let hours = Math.floor(total / (60 * 60))
let minutes = Math.floor(total % (60 * 60) / 60)
let seconds = Math.floor(total % (60 * 60) % 60)
time = `${util.formateTime(hours)}小时${util.formateTime(minutes)}${util.formateTime(seconds)}`
}else{
clearInterval(that.timer)
}
that.remainingTime = time
},1000)
}
}
},
mounted() {
this.getData()
this.addLeaveEvent()
},
methods: {
getData() {
let duration = new Date(new Date(this.endTime).getTime() - new Date().getTime()) / 1000
let time = `${Math.floor(duration / 3600)}小时${Math.floor(duration % 3600 / 60)}${Math.floor(duration % 3600 % 60)}`
this.remainingTime = time
let data = {
assessmentId: this.id,
keyword: this.keyword,
@ -149,7 +177,6 @@ export default {
let list = res.data
this.paperName = list.paperName
this.paperScore = list.paperScore
this.remainingTime = list.remainingTime
this.shouldArrive = list.shouldArrive
this.inExamination = list.inExamination
this.completed = list.completed
@ -157,7 +184,15 @@ export default {
this.listData = list.list.list ? list.list.list : []
this.total = list.totalCount
})
.catch(err => {})
.catch(err => {
clearInterval(this.timer)
})
},
addLeaveEvent(){
this.timer = setInterval(this.getData,1000)
this.$once('hook:beforeDestroy',() => {
clearInterval(this.timer)
})
},
handleCurrentChange(val) {
this.page = val
@ -210,6 +245,7 @@ export default {
margin-left: 20px;
color: #333;
text-align: center;
height: 36px;
line-height: 36px;
font-size: 14px;
background-color: #f4f4f4;
@ -250,10 +286,9 @@ export default {
}
}
.table{
padding: 10px;
padding: 15px;
margin-top: 10px;
background-color: #efefef;
}
}
}

@ -11,6 +11,7 @@
<el-select v-model="assessmentId" clearable placeholder="请选择批阅状态" @change="getData">
<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-select>
</el-form-item>
</el-form>
@ -49,7 +50,11 @@
<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="handPaperTime" 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">
<template slot-scope="scope">
{{transferToMinutes(scope.row.timeSpent)}}
</template>
</el-table-column>
<el-table-column prop="name" label="考试状态" align="center">
<template slot-scope="scope">
{{getExamStatusName(scope.row.examinationStatus)}}
@ -63,7 +68,7 @@
<el-table-column label="操作" align="center">
<template slot-scope="scope">
<el-button type="text" @click="review(scope.row,false)">查看</el-button>
<el-button type="text" @click="review(scope.row,true)" v-if="scope.row.reviewStatus == 0 && scope.row.reviewStatus == 1">批阅</el-button>
<el-button type="text" @click="review(scope.row,true)" v-if="(scope.row.reviewStatus == 0 || scope.row.reviewStatus == 1) && scope.row.examinationStatus == 2">批阅</el-button>
</template>
</el-table-column>
</el-table>
@ -86,6 +91,18 @@ export default {
data() {
return {
assessmentId: '',
reviewStatusList: [
{
id: 0,
name: '未批阅'
},{
id: 1,
name: '批阅部分'
},{
id: 2,
name: '已批阅'
}
],
keyword: '',
listData: [],
page: 1,
@ -99,7 +116,7 @@ export default {
'userId','clientId'
]),
...mapState('assessment', [
'id','reviewStatusList','examStatusList'
'id','examStatusList'
]),
...mapGetters('assessment', [
'getReviewStatusName','getExamStatusName'
@ -135,11 +152,15 @@ export default {
review(row,isReview){
this.setReviewInfo({
isReview,
id: row.id,
id: row.assessmentId,
paperId: row.paperId,
stuId: row.stuId,
reviewStatus: row.reviewStatus
})
this.$router.push('/testPaper/doReview')
},
transferToMinutes(seconds){
return isNaN(seconds) ? seconds : (seconds / 60).toFixed(2)
}
}
};

@ -36,7 +36,7 @@
<div class="flex j-between m-b-20">
<div class="flex a-center">
<p class="hr_tag"></p>
<span>分类管理</span>
<span>题目列表</span>
</div>
<div>
<!-- <el-button type="primary" size="small" round @click="delAllData" v-auth>取消共享</el-button> -->
@ -61,7 +61,6 @@
<el-table-column label="操作" align="center" width="120">
<template slot-scope="scope">
<el-button type="text" @click="show(scope.row)" v-auth>查看</el-button>
<el-button v-if="scope.row.myShare" type="text" @click="cancelShare(scope.row)">取消共享</el-button>
<el-button type="text" @click="delData(scope.row)" v-auth>删除</el-button>
</template>
</el-table-column>
@ -152,18 +151,6 @@ export default {
handleSelectionChange(val) {
this.multipleSelection = val;
},
cancelShare(row) {
this.$confirm('确定要取消共享吗?', '提示', {
type: 'info'
})
.then(() => {
this.$post(`${this.api.cancelByMySharing}?ids=${row.id}`).then(res => {
this.$message.success('取消共享成功');
this.getData()
}).catch(res => {});
})
.catch(() => {});
},
delData(row) {
this.$confirm('确定要删除吗?', '提示', {
type: 'warning'

@ -100,13 +100,13 @@
<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="createTime" label="上传时间" width="140" align="center"></el-table-column>
<el-table-column label="操作" width="170" align="center">
<el-table-column label="操作" width="200" align="center">
<template slot-scope="scope">
<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="share(scope.row)">共享</el-button>
<el-button type="text" @click="delData(scope.row)">删除</el-button>
<!-- <el-button type="text" @click="cancelShare(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>
</template>
</el-table-column>
</el-table>
@ -282,11 +282,7 @@ export default {
type: 'info'
})
.then(() => {
let data = {
userId: this.userId,
qid: row.id
}
this.$post(this.api.delete,data).then(res => {
this.$post(`${this.api.cancelByMySharing}?ids=${row.id}`).then(res => {
this.$message.success('取消共享成功');
this.getData()
}).catch(res => {});
@ -315,11 +311,13 @@ export default {
this.multipleSelection = [];
this.$message.success('共享成功');
this.getData()
}).catch(res => {});
}).catch(res => {
this.getData()
})
})
.catch(() => {});
}else{
this.$message.error('请先选择数据');
this.$message.error('请先选择数据');
}
},
cancelShareBatch() {

@ -468,7 +468,7 @@ export default {
})
this.listData = newData
this.total = newData.length
this.$refs.listData.clearSelection()
this.$refs.listTable.clearSelection()
})
.catch(err => {});
},
@ -633,12 +633,13 @@ export default {
let index = i.replace('countCheck','')
if(this[`countNumberInput${index}`]){
everyIsZero = false
if(this[`countNumberInput${index}`] < this.pointRules[index-1]){
invalid = true
}else if(this[`countNumberInput${index}`] > this.pointRules[index-1]){
this.$message.error('题目数量不能大于可选题数')
return false
}
invalid = true
// if(this[`countNumberInput${index}`] < this.pointRules[index-1]){
// invalid = true
// }else if(this[`countNumberInput${index}`] > this.pointRules[index-1]){
// this.$message.error('')
// return false
// }
}
}else{
invalid = true
@ -655,7 +656,6 @@ export default {
let remainder = 100 % totalCount
let avgPoint = 100 / totalCount
if(remainder) avgPoint = (100 - remainder) / totalCount
this.singleCount = ''
this.multipleCount = ''
this.fillBlankCount = ''
@ -780,8 +780,6 @@ export default {
coursesList: this.course,
schoolId: this.clientId,
userId: this.userId,
// schoolId: 2,
// userId: 2,
}
this.$post(this.api.getQuestionListBySelect,data)
.then(res => {

@ -201,14 +201,21 @@ export default {
let totalScore = singleCount * row.singleChoiceScore + multipleCount * row.multipleChoiceScore + fillBlankCount * row.fillBlanksScore + judgeCount * row.judgeScore + briefCount * row.briefAnswerScore
if(totalScore < 100) return this.$message.warning('总分值未满100分,请重新设置')
if(totalScore > 100) return this.$message.warning('总分值超过100分,请重新设置')
this.$post(`${this.api.modifyState}?id=${row.id}`).then(res => {
let data = row
data.state = 1
data.singleChoiceNum = singleCount
data.multipleChoiceNum = multipleCount
data.judgeNum = judgeCount
data.fillBlanksNum = fillBlankCount
data.briefAnswerNum = briefCount
this.$post(this.api.modifyState,data).then(res => {
this.$message.success('发布成功')
this.getData()
}).catch(res => {})
}).catch(err => {})
}
})
.catch(err => {})
}).catch(err => {})
},
preview(row){
this.setInfo({

@ -90,7 +90,6 @@
<el-button type="text" @click="copy(scope.row)" v-auth>复制</el-button>
<el-button type="text" @click="edit(scope.row)" v-auth>修改</el-button>
<el-button type="text" @click="delData(scope.row)" v-auth>删除</el-button>
<el-button type="text" @click="review(scope.row)" v-auth>批阅</el-button>
</template>
</el-table-column>
</el-table>
@ -212,14 +211,14 @@ export default {
})
.then(() => {
this.$post(`${this.api.delByMyTestPaper}?ids=${delList.join()}`).then(res => {
this.multipleSelection = [];
this.$message.success('删除成功');
this.multipleSelection = []
this.$message.success('删除成功')
this.getData()
}).catch(res => {});
}).catch(res => {})
})
.catch(() => {});
.catch(() => {})
}else{
this.$message.error('请先选择数据 !');
this.$message.error('请先选择数据 !')
}
},
publish(row){
@ -243,14 +242,21 @@ export default {
let totalScore = singleCount * row.singleChoiceScore + multipleCount * row.multipleChoiceScore + fillBlankCount * row.fillBlanksScore + judgeCount * row.judgeScore + briefCount * row.briefAnswerScore
if(totalScore < 100) return this.$message.warning('总分值未满100分,请重新设置')
if(totalScore > 100) return this.$message.warning('总分值超过100分,请重新设置')
this.$post(`${this.api.modifyState}?id=${row.id}`).then(res => {
let data = row
data.state = 1
data.singleChoiceNum = singleCount
data.multipleChoiceNum = multipleCount
data.judgeNum = judgeCount
data.fillBlanksNum = fillBlankCount
data.briefAnswerNum = briefCount
this.$post(this.api.modifyState,data).then(res => {
this.$message.success('发布成功')
this.getData()
}).catch(res => {})
}).catch(err => {})
}
})
.catch(err => {})
}).catch(err => {})
},
preview(row){
this.setInfo({
@ -269,9 +275,6 @@ export default {
edit(row){
this.$router.push(`add?id=${row.id}`)
},
review(row){
this.$router.push('review')
},
addTestPaper(){
this.$router.push('add')
},

@ -16,7 +16,7 @@ const Setting = {
showProgressBar: true,
// 接口请求地址
// apiBaseURL: env === 'development' ? 'http://192.168.31.152:8001' : 'http://39.108.250.202:8000/',
apiBaseURL: env === 'development' ? 'http://39.108.250.202:9000' : 'http://39.108.250.202:9000',
apiBaseURL: env === 'development' ? 'http://192.168.31.152:8001' : 'http://39.108.250.202:9000',
// 接口请求返回错误时,弹窗的持续时间,单位:秒
modalDuration: 3,
// 接口请求返回错误时,弹窗的类型,可选值为 Message 或 Notice

@ -5,6 +5,7 @@ export default {
namespaced: true,
state: {
id: '',
stuId: '',
assessmentId: '',
assessmentName: '',
classId: ''
@ -15,6 +16,7 @@ export default {
mutations: {
SET_INFO: (state, info) => {
state.id = info.id
state.stuId = info.stuId
state.assessmentId = info.assessmentId
state.assessmentName = info.assessmentName
state.classId = info.classId

@ -5,8 +5,10 @@ export default {
namespaced: true,
state: {
id: '',
endTime: '',
reviewId: '',
paperId: '',
stuId: '',
isReview: false,
reviewStatus: '',
typeList: [
@ -66,7 +68,10 @@ export default {
name: '未考'
},{
id: 1,
name: '已考试'
name: '在考'
},{
id: 2,
name: '已考'
}
],
correctingList: [
@ -102,10 +107,12 @@ export default {
mutations: {
SET_INFO: (state, info) => {
state.id = info.id
state.endTime = info.endTime
},
SET_REVIEW_INFO: (state, info) => {
state.reviewId = info.id
state.paperId = info.paperId
state.stuId = info.stuId
state.isReview = info.isReview
state.reviewStatus = info.reviewStatus
},

Loading…
Cancel
Save