yujialong 2 months ago
parent 5c564366c4
commit 60d11eb362
  1. 12
      src/layouts/navbar/index.vue
  2. 10
      src/pages/allocationReview/list/setup.vue
  3. 118
      src/pages/allocationReview/records/allocation.vue
  4. 103
      src/pages/allocationReview/records/outline.vue
  5. 13
      src/pages/allocationReview/records/people.vue

@ -44,15 +44,15 @@ export default {
menus: [], menus: [],
defaultMenus: [ defaultMenus: [
{ {
index: '/myReview/list', index: '/myReview',
title: '我的评阅任务' title: '我的评阅任务'
}, },
{ {
index: '/allocationReview/list', index: '/allocationReview',
title: '分配评阅任务' title: '分配评阅任务'
}, },
{ {
index: '/expert/list', index: '/expert',
title: '专家管理' title: '专家管理'
}, },
], ],
@ -64,6 +64,12 @@ export default {
]) ])
}, },
created () { created () {
const { path } = this.$route
if (path.includes('myReview/')) {
this.active = '/myReview'
} else if (path.includes('allocationReview/')) {
this.active = '/allocationReview'
}
this.initMenu() this.initMenu()
}, },
methods: { methods: {

@ -186,12 +186,12 @@ export default {
async submit () { async submit () {
if (this.submiting) return false if (this.submiting) return false
const form = _.cloneDeep(this.form) const form = _.cloneDeep(this.form)
const { row } = this const { row, timed } = this
if (form.isTimed && !this.timed.length) return Util.warningMsg(`请选择时间限制`) if (timed.length) {
if (this.timed.length) { if (timed[0]) form.startTime = dayjs(timed[0]).format('YYYY-MM-DD HH:mm:ss')
form.startTime = dayjs(this.timed[0]).format('YYYY-MM-DD HH:mm:ss') if (timed[1]) form.endTime = dayjs(timed[1]).format('YYYY-MM-DD HH:mm:ss')
form.endTime = dayjs(this.timed[1]).format('YYYY-MM-DD HH:mm:ss')
} }
if (form.isTimed && (!form.startTime || !form.endTime)) return Util.warningMsg(`请选择时间限制`)
form.competitionId = row.id form.competitionId = row.id
form.stageId = row.stageId form.stageId = row.stageId
this.submiting = true this.submiting = true

@ -8,45 +8,43 @@
<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" :disabled="!this.manualJudgeCount">按整卷分配</el-radio> <el-radio v-model="radio" :label="0" :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" :disabled="!this.manualJudgeCount">按每道人工判分题分配</el-radio> <el-radio v-model="radio" :label="1" :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">
<People /> <People />
<!-- <div> <Outline :outlines.sync="outlines" />
</div>
<div v-show="radio">
<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>
</div> </div>
<el-table :data="ques" class="table" ref="table" stripe header-align="center" row-key="id" <el-table :data="essays" class="table" ref="table" stripe header-align="center" row-key="id"
@selection-change="handleSelectionChange"> @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column> <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 type="index" width="50" label="序号" align="center"></el-table-column>
<el-table-column prop="stem" label="题干" align="center" min-width="120"></el-table-column> <el-table-column prop="stemText" label="题干" align="center" min-width="120"></el-table-column>
<el-table-column label="操作" align="center" width="100"> <el-table-column label="评阅人员" align="center" width="200">
<template slot-scope="scope"> <template slot-scope="scope">
<i class="el-icon-edit-outline"></i> <el-tag size="mini">谢道韫</el-tag>
<i class="el-icon-edit action-icon" @click="alloc(scope.row)"></i>
</template> </template>
</el-table-column> </el-table-column>
</el-table> <el-table-column label="评阅范围" align="center" width="80">
</div> --> <template slot-scope="scope">
<el-button type="text" @click="showScope(scope.row)">查看</el-button>
<h6 class="page-name m-t-20" style="margin-bottom: 10px;">评阅范围</h6> </template>
<div class="m-b-10"> </el-table-column>
<el-input style="width: 300px;" placeholder="请输入题干" prefix-icon="el-icon-search" v-model="outlineKeyword" </el-table>
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>
@ -57,10 +55,10 @@
</el-drawer> </el-drawer>
<el-drawer title="分配评阅人员" :visible.sync="peopleVisible" :with-header="false" size="1000px" <el-drawer :visible.sync="peopleVisible" :with-header="false" size="1000px" :close-on-click-modal="false"
:close-on-click-modal="false" custom-class="allo-dia"> custom-class="allo-dia">
<div class="p-l-20 p-r-20"> <div class="p-l-20 p-r-20">
<People /> <People dia="1" />
</div> </div>
<div class="btns"> <div class="btns">
@ -68,35 +66,50 @@
<el-button type="primary" :loading="submiting" @click="peopleSubmit">确定</el-button> <el-button type="primary" :loading="submiting" @click="peopleSubmit">确定</el-button>
</div> </div>
</el-drawer> </el-drawer>
<el-drawer :visible.sync="outlineVisible" :with-header="false" size="1000px" :close-on-click-modal="false"
custom-class="allo-dia">
<div class="p-l-20 p-r-20">
<Outline :outlines.sync="curOutlines" dia="1" />
</div>
<div class="btns">
<el-button @click="outlineVisible = false">关闭</el-button>
<!-- <el-button type="primary" :loading="submiting" @click="peopleSubmit">确定</el-button> -->
</div>
</el-drawer>
</div> </div>
</template> </template>
<script> <script>
import People from './people' import People from './people'
import Outline from './outline'
import Setting from '@/setting' import Setting from '@/setting'
import Util from '@/libs/util' import Util from '@/libs/util'
import _ from 'lodash' import _ from 'lodash'
import Decimal from 'decimal.js' import Decimal from 'decimal.js'
export default { export default {
components: { People }, components: { People, Outline },
props: ['visible', 'row', 'curRecords'], props: ['visible', 'row', 'curRecords'],
data () { data () {
return { return {
radio: '', isOverall: false, //
radio: 0,
allocationVisible: false, allocationVisible: false,
searchTimer: null, searchTimer: null,
userType: '', userType: '',
ques: [], ques: [],
multipleSelection: [], multipleSelection: [],
outlineKeyword: '',
checkAllQues: true,
outlines: [], outlines: [],
allQuesIds: [], allQuesIds: [],
disabledQuesIds: [], disabledQuesIds: [],
essays: [],
manualJudgeCount: 0, manualJudgeCount: 0,
submiting: false, submiting: false,
peopleVisible: false, peopleVisible: false,
outlineVisible: false,
curOutlines: [],
}; };
}, },
computed: { computed: {
@ -109,10 +122,6 @@ export default {
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 () {
@ -139,27 +148,31 @@ export default {
const paper = res.examPaperOutlineList const paper = res.examPaperOutlineList
let i = 0 let i = 0
const allIds = [] const allIds = []
const disabledQuesIds = [] const essays = []
// const disabledQuesIds = []
paper.forEach(e => { paper.forEach(e => {
e.id = e.outlineId e.id = e.outlineId
allIds.push(e.id) allIds.push(e.id)
e.label = e.outlineName e.label = e.outlineName
if (e.questionType === 'essay') e.disabled = true // // if (e.questionType === 'essay') e.disabled = true //
e.disabled && disabledQuesIds.push(e.id) // e.disabled && disabledQuesIds.push(e.id)
e.questionVersions.forEach(n => { e.questionVersions.forEach(n => {
i++ i++
// n.id = n.questionVersionId // n.id = n.questionVersionId
n.label = i + '、' + Util.delTag(n.stem) n.stemText = Util.delTag(n.stem)
if (n.questionType === 'essay') n.disabled = true // n.label = i + '、' + n.stemText
// if (n.questionType === 'essay') n.disabled = true //
n.questionType === 'essay' && essays.push(n) //
allIds.push(n.id) allIds.push(n.id)
n.disabled && disabledQuesIds.push(n.id) // n.disabled && disabledQuesIds.push(n.id)
}) })
e.children = e.questionVersions e.children = e.questionVersions
delete e.questionVersions delete e.questionVersions
}) })
this.outlines = paper this.outlines = paper
this.allQuesIds = allIds this.allQuesIds = allIds
this.disabledQuesIds = disabledQuesIds this.essays = essays
// this.disabledQuesIds = disabledQuesIds
this.$nextTick(() => { this.$nextTick(() => {
const el = this.$refs.outline const el = this.$refs.outline
el && el.setCheckedKeys(this.allQuesIds) el && el.setCheckedKeys(this.allQuesIds)
@ -167,10 +180,6 @@ export default {
} }
} 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
}, },
@ -191,6 +200,25 @@ export default {
alloc () { alloc () {
this.peopleVisible = true this.peopleVisible = true
}, },
//
showScope (row) {
const { outlines } = this
const { allowManualGrading } = this.row //
const result = []
outlines.forEach(e => {
if (e.questionType === 'essay') {
const cur = e.children.find(n => n.id === row.id)
cur && result.push({
...e,
children: [cur]
})
} else if (allowManualGrading) {
result.push(e)
}
})
this.curOutlines = result
this.outlineVisible = true
},
// //
peopleSubmit () { peopleSubmit () {
@ -255,9 +283,5 @@ export default {
color: #585858; color: #585858;
} }
.scopes {
max-height: 400px;
overflow: auto;
}
} }
</style> </style>

@ -0,0 +1,103 @@
<template>
<div>
<h6 class="page-name m-t-20" style="margin-bottom: 10px;">评阅范围</h6>
<div v-if="!dia" 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', { dia }]">
<el-tree ref="outline" :data="outlines" :show-checkbox="false" default-expand-all node-key="id">
</el-tree>
</div>
</div>
</template>
<script>
import Setting from '@/setting'
import Util from '@/libs/util'
import _ from 'lodash'
export default {
props: ['outlines', 'dia'],
data () {
return {
searchTimer: null,
outlineKeyword: '',
checkAllQues: true,
submiting: false,
};
},
watch: {
outlineKeyword: function (val) {
clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(this.getOutline, 500)
},
},
mounted () {
},
methods: {
//
async getNakadaiDep () {
const res = await this.$post(this.api.treeListArch)
const list = res.treeList
this.handleList(list)
this.nakadais = list
},
//
checkAllQuesChange (val) {
this.$refs.outline.setCheckedKeys(val ? this.allQuesIds : this.disabledQuesIds) //
},
//
async submit () {
if (this.submiting) return false
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
})
this.allocationVisible = false
this.$parent.calcDifficult()
this.submiting = false
} catch (e) {
this.submiting = false
}
},
//
closeDia () {
this.$emit('update:visible', false)
}
}
};
</script>
<style lang="scss" scoped>
.scopes {
max-height: 400px;
overflow: auto;
&.dia {
max-height: calc(100vh - 135px);
}
}
</style>

@ -1,7 +1,7 @@
<template> <template>
<div> <div>
<h6 class="page-name m-t-20" style="margin-bottom: 10px;">选择评阅人员</h6> <h6 class="page-name m-t-20" style="margin-bottom: 10px;">选择评阅人员</h6>
<div class="wrap"> <div :class="['wrap', { dia }]">
<div class="item"> <div class="item">
<el-radio-group class="m-b-10" v-model="userType" size="small"> <el-radio-group class="m-b-10" v-model="userType" size="small">
<el-radio-button :label="0">平台用户</el-radio-button> <el-radio-button :label="0">平台用户</el-radio-button>
@ -81,6 +81,7 @@ import Util from '@/libs/util'
import _ from 'lodash' import _ from 'lodash'
import Decimal from 'decimal.js' import Decimal from 'decimal.js'
export default { export default {
props: ['dia'],
data () { data () {
return { return {
nakadais: [], nakadais: [],
@ -306,6 +307,16 @@ export default {
overflow: auto; overflow: auto;
} }
&.dia {
.dep-wrap {
height: calc(100vh - 212px);
}
.lines {
height: calc(100vh - 270px);
}
}
.line { .line {
display: flex; display: flex;
align-items: center; align-items: center;

Loading…
Cancel
Save