|
|
@ -21,7 +21,7 @@ |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item v-if="row.hasManualScoreType || form.allowManualGrading" prop="name" label="评阅的时间限制"> |
|
|
|
<el-form-item v-if="row.hasManualScoreType || form.allowManualGrading" prop="name" label="评阅的时间限制"> |
|
|
|
<div class="relative"> |
|
|
|
<div class="relative"> |
|
|
|
<el-radio-group :disabled="!row.resultsDetails" v-model="form.isTimed"> |
|
|
|
<el-radio-group :disabled="fromNakadai && !row.resultsDetails" v-model="form.isTimed"> |
|
|
|
<el-radio :label="0">不限时</el-radio> |
|
|
|
<el-radio :label="0">不限时</el-radio> |
|
|
|
<el-radio :label="1">限时</el-radio> |
|
|
|
<el-radio :label="1">限时</el-radio> |
|
|
|
</el-radio-group> |
|
|
|
</el-radio-group> |
|
|
@ -98,11 +98,13 @@ import TestPaperConst from '@/const/testPaper' |
|
|
|
import _ from 'lodash' |
|
|
|
import _ from 'lodash' |
|
|
|
import Decimal from 'decimal.js' |
|
|
|
import Decimal from 'decimal.js' |
|
|
|
import dayjs from 'dayjs' |
|
|
|
import dayjs from 'dayjs' |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const fromNakadai = localStorage.getItem('reviewFromNakadai') // 来自中台 |
|
|
|
export default { |
|
|
|
export default { |
|
|
|
props: ['visible', 'row'], |
|
|
|
props: ['visible', 'row'], |
|
|
|
data () { |
|
|
|
data () { |
|
|
|
return { |
|
|
|
return { |
|
|
|
fromNakadai: localStorage.getItem('reviewFromNakadai'), |
|
|
|
fromNakadai, |
|
|
|
arabicToChinese: Util.arabicToChinese, |
|
|
|
arabicToChinese: Util.arabicToChinese, |
|
|
|
difficults: TestPaperConst.difficults, |
|
|
|
difficults: TestPaperConst.difficults, |
|
|
|
questionTypes: QuesConst.questionTypes, |
|
|
|
questionTypes: QuesConst.questionTypes, |
|
|
@ -178,7 +180,7 @@ export default { |
|
|
|
allowManualGrading: data.allowManualGrading, |
|
|
|
allowManualGrading: data.allowManualGrading, |
|
|
|
anonymizeStudents: data.anonymizeStudents, |
|
|
|
anonymizeStudents: data.anonymizeStudents, |
|
|
|
evaluationId: data.evaluationId, |
|
|
|
evaluationId: data.evaluationId, |
|
|
|
isTimed: row.resultsDetails ? data.isTimed : 1, // 成绩没公布,则取保存的isTimed;成绩公布,则限时不限时不可选择,并且固定限时 |
|
|
|
isTimed: !fromNakadai || row.resultsDetails ? data.isTimed : 1, // 成绩没公布,则取保存的isTimed;成绩公布,则限时不限时不可选择,并且固定限时 |
|
|
|
reviewersPerQuestion: data.reviewersPerQuestion, |
|
|
|
reviewersPerQuestion: data.reviewersPerQuestion, |
|
|
|
scoreAggregationRule: data.scoreAggregationRule, |
|
|
|
scoreAggregationRule: data.scoreAggregationRule, |
|
|
|
} |
|
|
|
} |
|
|
@ -192,14 +194,21 @@ export default { |
|
|
|
const form = _.cloneDeep(this.form) |
|
|
|
const form = _.cloneDeep(this.form) |
|
|
|
const { row, timed } = this |
|
|
|
const { row, timed } = this |
|
|
|
const { hasManualScoreType } = row |
|
|
|
const { hasManualScoreType } = row |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const isAss = !this.fromNakadai // 考核 |
|
|
|
|
|
|
|
|
|
|
|
if (timed.length) { |
|
|
|
if (timed.length) { |
|
|
|
if (timed[0]) form.startTime = dayjs(timed[0]).format('YYYY-MM-DD HH:mm:ss') |
|
|
|
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 (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 (((form.hasManualScoreType || form.allowManualGrading) && form.isTimed) && (!form.startTime || !form.endTime)) return Util.warningMsg(`请选择时间限制`) |
|
|
|
if (hasManualScoreType && form.reviewersPerQuestion === '') return Util.warningMsg(`请输入评阅人数`) |
|
|
|
if (hasManualScoreType && form.reviewersPerQuestion === '') return Util.warningMsg(`请输入评阅人数`) |
|
|
|
form.competitionId = row.id |
|
|
|
if (!form.isTimed) { |
|
|
|
form.stageId = row.stageId |
|
|
|
form.startTime = '' |
|
|
|
|
|
|
|
form.endTime = '' |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
form[isAss ? 'assessmentId' : 'competitionId'] = row.id |
|
|
|
|
|
|
|
form.stageId = row.stageId || '' |
|
|
|
this.submiting = true |
|
|
|
this.submiting = true |
|
|
|
try { |
|
|
|
try { |
|
|
|
const res = await this.$post(this.api.evaluationSave, form) |
|
|
|
const res = await this.$post(this.api.evaluationSave, form) |
|
|
@ -215,7 +224,8 @@ export default { |
|
|
|
}) |
|
|
|
}) |
|
|
|
row.evaluationId = res.evaluationId |
|
|
|
row.evaluationId = res.evaluationId |
|
|
|
localStorage.setItem('reviewRow', JSON.stringify(row)) |
|
|
|
localStorage.setItem('reviewRow', JSON.stringify(row)) |
|
|
|
this.$router.push(`records?competitionId=${row.id}&stageId=${row.stageId}`) |
|
|
|
|
|
|
|
|
|
|
|
this.$router.push(`records?competitionId=${!isAss ? row.id : ''}&assessmentId=${isAss ? row.id : ''}&stageId=${row.stageId || ''}`) |
|
|
|
} catch (e) { |
|
|
|
} catch (e) { |
|
|
|
this.close() |
|
|
|
this.close() |
|
|
|
} |
|
|
|
} |
|
|
|