|
|
@ -1,6 +1,6 @@ |
|
|
|
<template> |
|
|
|
<template> |
|
|
|
<div> |
|
|
|
<div> |
|
|
|
<el-drawer title="分配评阅人员" :visible.sync="allocationVisible" size="1200px" :close-on-click-modal="false" |
|
|
|
<el-drawer :title="diaTitle" :visible.sync="allocationVisible" size="1200px" :close-on-click-modal="false" |
|
|
|
custom-class="allo-dia" @closed="closeDia"> |
|
|
|
custom-class="allo-dia" @closed="closeDia"> |
|
|
|
<div class="overflow"> |
|
|
|
<div class="overflow"> |
|
|
|
<div class="tool"> |
|
|
|
<div class="tool"> |
|
|
@ -8,9 +8,9 @@ |
|
|
|
<li style="align-items: flex-start;"> |
|
|
|
<li style="align-items: flex-start;"> |
|
|
|
<label>分配方式</label> |
|
|
|
<label>分配方式</label> |
|
|
|
<div> |
|
|
|
<div> |
|
|
|
<el-radio v-model="radio" label="1">按整卷分配</el-radio> |
|
|
|
<el-radio v-model="radio" label="1" :disabled="!this.manualJudgeCount">按整卷分配</el-radio> |
|
|
|
<p class="tips m-b-20">(每份答卷将从以下已选的评阅人员中,按照评阅设置的每题评阅人数随机挑选评阅人员对整卷进行评阅,且以下已选的每位评阅人员分配到的答卷数量基本平均)</p> |
|
|
|
<p class="tips m-b-20">(每份答卷将从以下已选的评阅人员中,按照评阅设置的每题评阅人数随机挑选评阅人员对整卷进行评阅,且以下已选的每位评阅人员分配到的答卷数量基本平均)</p> |
|
|
|
<el-radio v-model="radio" label="2">按每道人工判分题分配</el-radio> |
|
|
|
<el-radio v-model="radio" label="2" :disabled="!this.manualJudgeCount">按每道人工判分题分配</el-radio> |
|
|
|
<p class="tips">(每份答卷的每道人工判分题将从以下题目已选的评阅人员中,按照评阅设置的每题评阅人数随机挑选评阅人员对该题进行评阅,且以下已选的每位评阅人员分配到的该题答卷数量基本平均)</p> |
|
|
|
<p class="tips">(每份答卷的每道人工判分题将从以下题目已选的评阅人员中,按照评阅设置的每题评阅人数随机挑选评阅人员对该题进行评阅,且以下已选的每位评阅人员分配到的该题答卷数量基本平均)</p> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</li> |
|
|
|
</li> |
|
|
@ -36,6 +36,18 @@ |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
</el-table> |
|
|
|
</div> --> |
|
|
|
</div> --> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h6 class="page-name m-t-20" style="margin-bottom: 10px;">评阅范围</h6> |
|
|
|
|
|
|
|
<div class="m-b-10"> |
|
|
|
|
|
|
|
<el-input style="width: 300px;" placeholder="请输入题干" prefix-icon="el-icon-search" v-model="outlineKeyword" |
|
|
|
|
|
|
|
clearable /> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<el-checkbox class="m-b-5" style="margin-left: 24px;" v-model="checkAllQues" |
|
|
|
|
|
|
|
@change="checkAllQuesChange">全选</el-checkbox> |
|
|
|
|
|
|
|
<div class="scopes"> |
|
|
|
|
|
|
|
<el-tree ref="outline" :data="outlines" show-checkbox default-expand-all node-key="id"> |
|
|
|
|
|
|
|
</el-tree> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<div class="btns"> |
|
|
|
<div class="btns"> |
|
|
@ -62,13 +74,11 @@ |
|
|
|
import People from './people' |
|
|
|
import People from './people' |
|
|
|
import Setting from '@/setting' |
|
|
|
import Setting from '@/setting' |
|
|
|
import Util from '@/libs/util' |
|
|
|
import Util from '@/libs/util' |
|
|
|
import QuesConst from '@/const/ques' |
|
|
|
|
|
|
|
import TestPaperConst from '@/const/testPaper' |
|
|
|
|
|
|
|
import _ from 'lodash' |
|
|
|
import _ from 'lodash' |
|
|
|
import Decimal from 'decimal.js' |
|
|
|
import Decimal from 'decimal.js' |
|
|
|
export default { |
|
|
|
export default { |
|
|
|
components: { People }, |
|
|
|
components: { People }, |
|
|
|
props: ['visible'], |
|
|
|
props: ['visible', 'row', 'curRecords'], |
|
|
|
data () { |
|
|
|
data () { |
|
|
|
return { |
|
|
|
return { |
|
|
|
radio: '', |
|
|
|
radio: '', |
|
|
@ -78,16 +88,31 @@ export default { |
|
|
|
userType: '', |
|
|
|
userType: '', |
|
|
|
ques: [], |
|
|
|
ques: [], |
|
|
|
multipleSelection: [], |
|
|
|
multipleSelection: [], |
|
|
|
|
|
|
|
outlineKeyword: '', |
|
|
|
|
|
|
|
checkAllQues: true, |
|
|
|
|
|
|
|
outlines: [], |
|
|
|
|
|
|
|
allQuesIds: [], |
|
|
|
|
|
|
|
disabledQuesIds: [], |
|
|
|
|
|
|
|
manualJudgeCount: 0, |
|
|
|
submiting: false, |
|
|
|
submiting: false, |
|
|
|
|
|
|
|
|
|
|
|
peopleVisible: false, |
|
|
|
peopleVisible: false, |
|
|
|
}; |
|
|
|
}; |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
computed: { |
|
|
|
|
|
|
|
diaTitle () { |
|
|
|
|
|
|
|
return `分配评阅人员(已选${this.curRecords.length}份答卷,每卷共${this.manualJudgeCount}道人工判分题)` |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
}, |
|
|
|
watch: { |
|
|
|
watch: { |
|
|
|
visible () { |
|
|
|
visible () { |
|
|
|
this.allocationVisible = this.visible |
|
|
|
this.allocationVisible = this.visible |
|
|
|
// this.visible && this.init() |
|
|
|
this.visible && this.init() |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
outlineKeyword: function (val) { |
|
|
|
|
|
|
|
clearTimeout(this.searchTimer) |
|
|
|
|
|
|
|
this.searchTimer = setTimeout(this.getOutline, 500) |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
mounted () { |
|
|
|
mounted () { |
|
|
|
|
|
|
|
|
|
|
@ -95,20 +120,57 @@ export default { |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
// 初始化 |
|
|
|
// 初始化 |
|
|
|
init () { |
|
|
|
init () { |
|
|
|
this.handleQuesList() |
|
|
|
// this.checkAllQues = true |
|
|
|
|
|
|
|
const el = this.$refs.outline |
|
|
|
|
|
|
|
// el && el.setCheckedKeys(this.allQuesIds) |
|
|
|
|
|
|
|
this.getOutline() |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 获取题库分类 |
|
|
|
// 获取试题 |
|
|
|
async getQuesBankType () { |
|
|
|
async getOutline () { |
|
|
|
try { |
|
|
|
try { |
|
|
|
const { data } = await this.$post(this.api.getAllQuestionBankCategories, { |
|
|
|
const { paperId } = this.row |
|
|
|
createSource: 1, |
|
|
|
if (paperId) { |
|
|
|
status: 1, |
|
|
|
const res = await this.$post(this.api.getPaperQuestionInfoByReviewSetting, { |
|
|
|
|
|
|
|
paperId, |
|
|
|
|
|
|
|
evaluationId: this.row.evaluationId, |
|
|
|
|
|
|
|
keyword: this.outlineKeyword |
|
|
|
}) |
|
|
|
}) |
|
|
|
this.handleList(data) |
|
|
|
this.manualJudgeCount = res.manualJudgeCount |
|
|
|
this.quesBankTypes = data |
|
|
|
const paper = res.examPaperOutlineList |
|
|
|
|
|
|
|
let i = 0 |
|
|
|
|
|
|
|
const allIds = [] |
|
|
|
|
|
|
|
const disabledQuesIds = [] |
|
|
|
|
|
|
|
paper.forEach(e => { |
|
|
|
|
|
|
|
e.id = e.outlineId |
|
|
|
|
|
|
|
allIds.push(e.id) |
|
|
|
|
|
|
|
e.label = e.outlineName |
|
|
|
|
|
|
|
if (e.questionType === 'essay') e.disabled = true // 主观题不允许取消勾选 |
|
|
|
|
|
|
|
e.disabled && disabledQuesIds.push(e.id) |
|
|
|
|
|
|
|
e.questionVersions.forEach(n => { |
|
|
|
|
|
|
|
i++ |
|
|
|
|
|
|
|
// n.id = n.questionVersionId |
|
|
|
|
|
|
|
n.label = i + '、' + Util.delTag(n.stem) |
|
|
|
|
|
|
|
if (n.questionType === 'essay') n.disabled = true // 主观题不允许取消勾选 |
|
|
|
|
|
|
|
allIds.push(n.id) |
|
|
|
|
|
|
|
n.disabled && disabledQuesIds.push(n.id) |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
e.children = e.questionVersions |
|
|
|
|
|
|
|
delete e.questionVersions |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
this.outlines = paper |
|
|
|
|
|
|
|
this.allQuesIds = allIds |
|
|
|
|
|
|
|
this.disabledQuesIds = disabledQuesIds |
|
|
|
|
|
|
|
this.$nextTick(() => { |
|
|
|
|
|
|
|
const el = this.$refs.outline |
|
|
|
|
|
|
|
el && el.setCheckedKeys(this.allQuesIds) |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
} catch (e) { } |
|
|
|
} catch (e) { } |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
// 试题全选回调 |
|
|
|
|
|
|
|
checkAllQuesChange (val) { |
|
|
|
|
|
|
|
this.$refs.outline.setCheckedKeys(val ? this.allQuesIds : this.disabledQuesIds) // 全选选中则整个树形选中,否则只取消选中启用的试题 |
|
|
|
|
|
|
|
}, |
|
|
|
handleSelectionChange (val) { |
|
|
|
handleSelectionChange (val) { |
|
|
|
this.multipleSelection = val |
|
|
|
this.multipleSelection = val |
|
|
|
}, |
|
|
|
}, |
|
|
@ -138,58 +200,8 @@ export default { |
|
|
|
async submit () { |
|
|
|
async submit () { |
|
|
|
if (this.submiting) return false |
|
|
|
if (this.submiting) return false |
|
|
|
const { list } = this |
|
|
|
const { list } = this |
|
|
|
let invalid = 0 |
|
|
|
// if (!totalCount) return Util.warningMsg(`请填写难度题数`) |
|
|
|
let totalCount = 0 |
|
|
|
|
|
|
|
for (const i in list) { |
|
|
|
|
|
|
|
const e = list[i] |
|
|
|
|
|
|
|
const name = `第${Util.arabicToChinese(+i + 1)}大题` |
|
|
|
|
|
|
|
if (!e.questionType) { |
|
|
|
|
|
|
|
Util.warningMsg(`${name}请先选择题型`) |
|
|
|
|
|
|
|
invalid = 1 |
|
|
|
|
|
|
|
break |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (!e.questionNum || isNaN(e.questionNum) || e.questionNum <= 0) { |
|
|
|
|
|
|
|
Util.warningMsg(`${name}的目标题数请输入正整数`) |
|
|
|
|
|
|
|
invalid = 1 |
|
|
|
|
|
|
|
break |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
let total = Decimal(e.basicDifficulty || 0).add(e.normalDifficulty || 0).add(e.hardDifficulty || 0).add(e.veryHardDifficulty || 0).toNumber() // 先算前4个难度的题数 |
|
|
|
|
|
|
|
if (total) { // 前面4个空有填1个,则清空随机 |
|
|
|
|
|
|
|
this.$set(e, 'randomDifficulty', 0) |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
total = +e.randomDifficulty || 0 |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (total > e.questionNum) { |
|
|
|
|
|
|
|
Util.warningMsg(`${name}的小题总数大于目标题数,请重新输入`) |
|
|
|
|
|
|
|
invalid = 1 |
|
|
|
|
|
|
|
break |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
e.count = total |
|
|
|
|
|
|
|
totalCount = Decimal(totalCount).add(total).toNumber() |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (invalid) return false |
|
|
|
|
|
|
|
if (!totalCount) return Util.warningMsg(`请填写难度题数`) |
|
|
|
|
|
|
|
this.submiting = true |
|
|
|
this.submiting = true |
|
|
|
const k = this.allKnowledges.map(e => e.id) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const years = [] |
|
|
|
|
|
|
|
this.yearCheck.map(e => { |
|
|
|
|
|
|
|
if (e === '暂无年份') { |
|
|
|
|
|
|
|
years.push('') |
|
|
|
|
|
|
|
} else if (e === '更早') { |
|
|
|
|
|
|
|
// 选的是更早则直接传1990~2005所有年份 |
|
|
|
|
|
|
|
for (let i = 1990; i < 2006; i++) { |
|
|
|
|
|
|
|
years.push(i) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
years.push(+e) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
list.map(e => { |
|
|
|
|
|
|
|
e.givenYears = years |
|
|
|
|
|
|
|
e.knowledgePointsIds = k |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
try { |
|
|
|
try { |
|
|
|
const res = await this.$post(this.api.selectQuestionsByTypeAndDifficulty, list) |
|
|
|
const res = await this.$post(this.api.selectQuestionsByTypeAndDifficulty, list) |
|
|
|
|
|
|
|
|
|
|
@ -201,22 +213,6 @@ export default { |
|
|
|
e.score = 0 |
|
|
|
e.score = 0 |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
// 3种情况提示不一样 |
|
|
|
|
|
|
|
const tips = invalid && hasQues ? |
|
|
|
|
|
|
|
'此操作会清空当前试卷已添加的试题,并且满足自动选题设置的试题数量不足,确定要继续自动选题吗?' : |
|
|
|
|
|
|
|
invalid && !hasQues ? |
|
|
|
|
|
|
|
'满足自动选题设置的试题数量不足,确认要继续自动选题吗?' : |
|
|
|
|
|
|
|
!invalid && hasQues ? '此操作会清空当前试卷已添加的试题,是否确定要继续自动选题吗?' : |
|
|
|
|
|
|
|
'' |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (tips) { |
|
|
|
|
|
|
|
await this.$confirm(tips, '提示', { |
|
|
|
|
|
|
|
confirmButtonText: '确定', |
|
|
|
|
|
|
|
cancelButtonText: '取消', |
|
|
|
|
|
|
|
type: 'warning', |
|
|
|
|
|
|
|
closeOnClickModal: false, |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
list.map((e, i) => { |
|
|
|
list.map((e, i) => { |
|
|
|
res.list[i].questions.map((e, i) => { |
|
|
|
res.list[i].questions.map((e, i) => { |
|
|
|
e.questionId = e.id |
|
|
|
e.questionId = e.id |
|
|
@ -258,5 +254,10 @@ export default { |
|
|
|
font-size: 12px; |
|
|
|
font-size: 12px; |
|
|
|
color: #585858; |
|
|
|
color: #585858; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.scopes { |
|
|
|
|
|
|
|
max-height: 400px; |
|
|
|
|
|
|
|
overflow: auto; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
</style> |
|
|
|
</style> |