yujialong 2 months ago
parent 60d11eb362
commit 8d71f7c055
  1. 1
      src/api/index.js
  2. 6
      src/pages/allocationReview/list/setup.vue
  3. 63
      src/pages/allocationReview/records/allocation.vue
  4. 29
      src/pages/allocationReview/records/index.vue
  5. 10
      src/pages/allocationReview/records/people.vue

@ -18,4 +18,5 @@ export default {
competitionUserReport: `/nakadai/evaluation/competitionUserReport`,
examPaperDetails: `/exam/exam/paper/examPaperDetails`,
getPaperQuestionInfoByReviewSetting: `/nakadai/evaluation/getPaperQuestionInfoByReviewSetting`,
assignReviewers: `/nakadai/evaluationAssignments/assignReviewers`,
}

@ -34,7 +34,7 @@
type="datetimerange" start-placeholder="开始日期" end-placeholder="结束日期" clearable
:picker-options="pickerOptions"></el-date-picker>
</el-form-item>
<el-form-item prop="name" label="每题的评阅人数">
<el-form-item prop="name" label="评阅人数">
<el-input class="hide-spin" style="width: 200px;" placeholder="请输入" type="number"
v-model.number="form.reviewersPerQuestion" />&emsp;<span class="fs-12">人工判分题和整体评分表的评阅人数</span>
</el-form-item>
@ -187,11 +187,13 @@ export default {
if (this.submiting) return false
const form = _.cloneDeep(this.form)
const { row, timed } = this
const { hasManualScoreType } = row
if (timed.length) {
if (timed[0]) form.startTime = dayjs(timed[0]).format('YYYY-MM-DD HH:mm:ss')
if (timed[1]) form.endTime = dayjs(timed[1]).format('YYYY-MM-DD HH:mm:ss')
}
if (form.isTimed && (!form.startTime || !form.endTime)) return Util.warningMsg(`请选择时间限制`)
if (hasManualScoreType && form.reviewersPerQuestion === '') return Util.warningMsg(`请输入评阅人数`)
form.competitionId = row.id
form.stageId = row.stageId
this.submiting = true
@ -199,7 +201,7 @@ export default {
await this.$post(this.api.evaluationSave, form)
this.submiting = false
if (this.$route.path === '/allocationReview/list') {
if (this.$route.path === '/allocationReview/list' && (hasManualScoreType || form.allowManualGrading)) { //
try {
await this.$confirm('保存成功!', '提示', {
confirmButtonText: '前往任务分配',

@ -8,22 +8,23 @@
<li style="align-items: flex-start;">
<label>分配方式</label>
<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>
<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>
</div>
</li>
</ul>
</div>
<div v-show="!radio">
<People />
<div v-show="taskType === 'whole_report'">
<People ref="people" />
<Outline :outlines.sync="outlines" />
</div>
<div v-show="radio">
<div v-show="taskType === 'partial_questions'">
<div class="flex a-center m-b-10">
<h6 class="page-name m-r-10" style="margin-bottom: 0">选择评阅人员</h6>
<el-button type="primary" size="mini" @click="batchAlloc">批量分配</el-button>
@ -93,10 +94,11 @@ export default {
data () {
return {
isOverall: false, //
radio: 0,
taskType: 'whole_report',
allocationVisible: false,
searchTimer: null,
setup: {},
userType: '',
ques: [],
multipleSelection: [],
@ -124,7 +126,7 @@ export default {
},
},
mounted () {
this.getSetup()
},
methods: {
//
@ -183,6 +185,16 @@ export default {
handleSelectionChange (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 () {
try {
@ -227,28 +239,25 @@ export default {
//
async submit () {
if (this.submiting) return false
const { list } = this
// if (!totalCount) return Util.warningMsg(``)
const { row, curRecords, taskType } = this
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
try {
const res = await this.$post(this.api.selectQuestionsByTypeAndDifficulty, list)
let invalid = 0
let hasQues = 0
list.map((e, i) => {
if (+e.count !== res.list[i].questions.length) invalid = 1
if (e.examQuestions.length) hasQues = 1
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
await this.$post(this.api.assignReviewers, {
accountIds: peopleChecked.map(e => e.accountId),
evaluationId: row.evaluationId,
paperId: row.paperId,
questionVersionIds: [],
reportIds: curRecords.map(e => e.reportId),
taskType: this.taskType,
})
this.allocationVisible = false
this.$parent.calcDifficult()

@ -57,9 +57,10 @@
@selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column>
<el-table-column type="index" width="50" label="序号" align="center"></el-table-column>
<el-table-column prop="provinceName" label="省份" align="center" width="70"></el-table-column>
<el-table-column prop="cityName" label="城市" align="center" width="70"></el-table-column>
<el-table-column prop="realSchool" label="学生所在学校" align="center" width="100"></el-table-column>
<el-table-column prop="provinceName" label="省份" align="center" width="70" show-overflow-tooltip></el-table-column>
<el-table-column prop="cityName" label="城市" align="center" width="70" show-overflow-tooltip></el-table-column>
<el-table-column prop="realSchool" label="学生所在院校" align="center" width="100"
show-overflow-tooltip></el-table-column>
<el-table-column prop="teamName" label="团队名称" align="center" width="90"></el-table-column>
<el-table-column prop="userName" label="学生姓名" align="center" width="80"></el-table-column>
<el-table-column prop="workNumber" label="学号" align="center" width="70"></el-table-column>
@ -68,14 +69,22 @@
<template slot-scope="scope">{{ scope.row.timeSum }}min</template>
</el-table-column>
<el-table-column prop="submitTime" label="提交时间" align="center" width="150"></el-table-column>
<el-table-column prop="submitName" label="提交名称" align="center" width="120"></el-table-column>
<el-table-column prop="lastEditor" label="是否完成分配" align="center" width="100"></el-table-column>
<el-table-column prop="lastEditor" label="评阅人员" align="center" width="90"></el-table-column>
<el-table-column prop="lastEditor" label="评阅人数" align="center" width="90"></el-table-column>
<el-table-column prop="lastEditor" label="评阅状态" align="center" width="90"></el-table-column>
<el-table-column prop="submitName" label="提交名称" align="center" width="120"
show-overflow-tooltip></el-table-column>
<el-table-column prop="lastEditor" label="是否完成分配" align="center" width="100">
<template slot-scope="scope">{{ scope.row.isDistribution ? '是' : '否' }}</template>
</el-table-column>
<el-table-column prop="evaluator" label="评阅人员" align="center" width="90" show-overflow-tooltip></el-table-column>
<el-table-column prop="evaluatorCount" label="评阅人数" align="center" width="80"></el-table-column>
<el-table-column prop="evaluationStatus" label="评阅状态" align="center" width="90">
<template slot-scope="scope">
<el-tag :type="scope.row.evaluationStatus === '待评阅' ? 'danger' : 'success'">{{ scope.row.evaluationStatus
}}</el-tag>
</template>
</el-table-column>
<el-table-column prop="score" label="成绩" align="center" width="60"></el-table-column>
<el-table-column prop="lastEditor" label="最新分配时间" align="center" width="150"></el-table-column>
<el-table-column prop="lastEditor" label="最新分配人" align="center" width="90"></el-table-column>
<el-table-column prop="latestDistributionTime" label="最新分配时间" align="center" width="150"></el-table-column>
<el-table-column prop="latestDistributionUser" label="最新分配人" align="center" width="90"></el-table-column>
<el-table-column label="操作" align="center" width="100" fixed="right">
<template slot-scope="scope">
<el-button type="text" @click="allocation(scope.row)">分配评阅人员</el-button>

@ -149,7 +149,7 @@ export default {
const list = page.records
const { checked } = this
list.forEach(e => {
e.check = !!checked.find(n => n.userId === e.userId)
e.check = !!checked.find(n => n.accountId === e.accountId)
})
this.users = list
},
@ -163,7 +163,7 @@ export default {
},
//
userChange (val, item) {
const cur = this.checked.findIndex(e => e.userId === item.userId)
const cur = this.checked.findIndex(e => e.accountId === item.accountId)
//
if (val) {
if (cur === -1) {
@ -186,7 +186,7 @@ export default {
const checked = this.checked.filter(e => e.check)
if (checked.length) {
checked.map(e => {
const cur = this.users.find(n => n.userId === e.userId)
const cur = this.users.find(n => n.accountId === e.accountId)
if (cur) {
cur.check = false
}
@ -202,9 +202,9 @@ export default {
//
async delChecked (item) {
try {
const cur = this.users.find(e => e.userId === item.userId)
const cur = this.users.find(e => e.accountId === item.accountId)
if (cur) cur.check = false
this.checked.splice(this.checked.findIndex(e => e.userId === item.userId), 1)
this.checked.splice(this.checked.findIndex(e => e.accountId === item.accountId), 1)
} catch (e) { }
},

Loading…
Cancel
Save