|
|
@ -8,22 +8,23 @@ |
|
|
|
<li style="align-items: flex-start;"> |
|
|
|
<li style="align-items: flex-start;"> |
|
|
|
<label>分配方式</label> |
|
|
|
<label>分配方式</label> |
|
|
|
<div> |
|
|
|
<div> |
|
|
|
<el-radio v-model="radio" :label="0" :disabled="!this.manualJudgeCount">按整卷分配</el-radio> |
|
|
|
<el-radio v-model="taskType" label="whole_report" :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="1" :disabled="!this.manualJudgeCount">按每道人工判分题分配</el-radio> |
|
|
|
<el-radio v-model="taskType" label="partial_questions" |
|
|
|
|
|
|
|
:disabled="!this.manualJudgeCount">按每道人工判分题分配</el-radio> |
|
|
|
<p class="tips">(每份答卷的每道人工判分题将从以下题目已选的评阅人员中,按照评阅设置的每题评阅人数随机挑选评阅人员对该题进行评阅,且以下已选的每位评阅人员分配到的该题答卷数量基本平均)</p> |
|
|
|
<p class="tips">(每份答卷的每道人工判分题将从以下题目已选的评阅人员中,按照评阅设置的每题评阅人数随机挑选评阅人员对该题进行评阅,且以下已选的每位评阅人员分配到的该题答卷数量基本平均)</p> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</li> |
|
|
|
</li> |
|
|
|
</ul> |
|
|
|
</ul> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<div v-show="!radio"> |
|
|
|
<div v-show="taskType === 'whole_report'"> |
|
|
|
<People /> |
|
|
|
<People ref="people" /> |
|
|
|
|
|
|
|
|
|
|
|
<Outline :outlines.sync="outlines" /> |
|
|
|
<Outline :outlines.sync="outlines" /> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<div v-show="radio"> |
|
|
|
<div v-show="taskType === 'partial_questions'"> |
|
|
|
<div class="flex a-center m-b-10"> |
|
|
|
<div class="flex a-center m-b-10"> |
|
|
|
<h6 class="page-name m-r-10" style="margin-bottom: 0">选择评阅人员</h6> |
|
|
|
<h6 class="page-name m-r-10" style="margin-bottom: 0">选择评阅人员</h6> |
|
|
|
<el-button type="primary" size="mini" @click="batchAlloc">批量分配</el-button> |
|
|
|
<el-button type="primary" size="mini" @click="batchAlloc">批量分配</el-button> |
|
|
@ -93,10 +94,11 @@ export default { |
|
|
|
data () { |
|
|
|
data () { |
|
|
|
return { |
|
|
|
return { |
|
|
|
isOverall: false, // 整体评分表(能勾选试题) |
|
|
|
isOverall: false, // 整体评分表(能勾选试题) |
|
|
|
radio: 0, |
|
|
|
taskType: 'whole_report', |
|
|
|
allocationVisible: false, |
|
|
|
allocationVisible: false, |
|
|
|
searchTimer: null, |
|
|
|
searchTimer: null, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
setup: {}, |
|
|
|
userType: '', |
|
|
|
userType: '', |
|
|
|
ques: [], |
|
|
|
ques: [], |
|
|
|
multipleSelection: [], |
|
|
|
multipleSelection: [], |
|
|
@ -124,7 +126,7 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
mounted () { |
|
|
|
mounted () { |
|
|
|
|
|
|
|
this.getSetup() |
|
|
|
}, |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
// 初始化 |
|
|
|
// 初始化 |
|
|
@ -183,6 +185,16 @@ export default { |
|
|
|
handleSelectionChange (val) { |
|
|
|
handleSelectionChange (val) { |
|
|
|
this.multipleSelection = val |
|
|
|
this.multipleSelection = val |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
// 获取评阅设置详情 |
|
|
|
|
|
|
|
async getSetup () { |
|
|
|
|
|
|
|
try { |
|
|
|
|
|
|
|
const id = this.row.evaluationId |
|
|
|
|
|
|
|
if (id) { |
|
|
|
|
|
|
|
const { data } = await this.$post(`${this.api.evaluationFind}?id=${id}`) |
|
|
|
|
|
|
|
this.setup = data |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} catch (e) { } |
|
|
|
|
|
|
|
}, |
|
|
|
// 批量分配 |
|
|
|
// 批量分配 |
|
|
|
async batchAlloc () { |
|
|
|
async batchAlloc () { |
|
|
|
try { |
|
|
|
try { |
|
|
@ -227,28 +239,25 @@ export default { |
|
|
|
// 提交 |
|
|
|
// 提交 |
|
|
|
async submit () { |
|
|
|
async submit () { |
|
|
|
if (this.submiting) return false |
|
|
|
if (this.submiting) return false |
|
|
|
const { list } = this |
|
|
|
const { row, curRecords, taskType } = this |
|
|
|
// if (!totalCount) return Util.warningMsg(`请填写难度题数`) |
|
|
|
let peopleChecked = [] |
|
|
|
|
|
|
|
// 整卷 |
|
|
|
|
|
|
|
if (taskType === 'whole_report') { |
|
|
|
|
|
|
|
peopleChecked = this.$refs.people.checked |
|
|
|
|
|
|
|
if (!peopleChecked.length) return Util.warningMsg(`请选择评阅人员`) |
|
|
|
|
|
|
|
const num = this.setup.reviewersPerQuestion |
|
|
|
|
|
|
|
if (!isNaN(num) && peopleChecked.length < num) return Util.warningMsg(`所选定的评阅人数(${peopleChecked.length}人)不满足评阅设置的评阅人数(${num}人)`) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
// debugger |
|
|
|
this.submiting = true |
|
|
|
this.submiting = true |
|
|
|
try { |
|
|
|
try { |
|
|
|
const res = await this.$post(this.api.selectQuestionsByTypeAndDifficulty, list) |
|
|
|
await this.$post(this.api.assignReviewers, { |
|
|
|
|
|
|
|
accountIds: peopleChecked.map(e => e.accountId), |
|
|
|
let invalid = 0 |
|
|
|
evaluationId: row.evaluationId, |
|
|
|
let hasQues = 0 |
|
|
|
paperId: row.paperId, |
|
|
|
list.map((e, i) => { |
|
|
|
questionVersionIds: [], |
|
|
|
if (+e.count !== res.list[i].questions.length) invalid = 1 |
|
|
|
reportIds: curRecords.map(e => e.reportId), |
|
|
|
if (e.examQuestions.length) hasQues = 1 |
|
|
|
taskType: this.taskType, |
|
|
|
e.score = 0 |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
list.map((e, i) => { |
|
|
|
|
|
|
|
res.list[i].questions.map((e, i) => { |
|
|
|
|
|
|
|
e.questionId = e.id |
|
|
|
|
|
|
|
e.serialNumber = i + 1 |
|
|
|
|
|
|
|
e.originSort = i + 1 |
|
|
|
|
|
|
|
this.$parent.handleQuesInfo(e) |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
this.$parent.form.paperOutline[i].examQuestions = res.list[i].questions |
|
|
|
|
|
|
|
}) |
|
|
|
}) |
|
|
|
this.allocationVisible = false |
|
|
|
this.allocationVisible = false |
|
|
|
this.$parent.calcDifficult() |
|
|
|
this.$parent.calcDifficult() |
|
|
|