yujialong 2 months ago
parent 6aa907d14b
commit 5c564366c4
  1. 2
      src/api/index.js
  2. 5
      src/layouts/home/index.vue
  3. 74
      src/layouts/navbar/index.vue
  4. 171
      src/pages/allocationReview/records/allocation.vue
  5. 13
      src/pages/allocationReview/records/index.vue
  6. 30
      src/pages/allocationReview/records/people.vue
  7. 1
      src/styles/common.scss

@ -16,4 +16,6 @@ export default {
evaluationSave: `/nakadai/evaluation/saveOrUpdate`, evaluationSave: `/nakadai/evaluation/saveOrUpdate`,
evaluationFind: `/nakadai/evaluation/findById`, evaluationFind: `/nakadai/evaluation/findById`,
competitionUserReport: `/nakadai/evaluation/competitionUserReport`, competitionUserReport: `/nakadai/evaluation/competitionUserReport`,
examPaperDetails: `/exam/exam/paper/examPaperDetails`,
getPaperQuestionInfoByReviewSetting: `/nakadai/evaluation/getPaperQuestionInfoByReviewSetting`,
} }

@ -43,12 +43,11 @@ export default {
overflow: hidden; overflow: hidden;
.nav { .nav {
width: 256px; width: 190px;
} }
.layout { .layout {
width: calc(100% - 256px); width: calc(100% - 190px);
.content { .content {
height: 100vh; height: 100vh;

@ -1,12 +1,8 @@
<template> <template>
<div> <div>
<div class="flex-1"> <div class="flex-1">
<div class="logo"> <el-menu :default-active="active" :default-openeds="['ques', 'testPaper']" background-color="#fff"
<img width="30" src="@/assets/images/logo.png" alt=""> text-color="#333" active-text-color="#fff" :collapse-transition="false" @select="menuSelect">
<span>评阅中心</span>
</div>
<el-menu :default-active="active" :default-openeds="['ques', 'testPaper']" background-color="#040506"
text-color="#fff" active-text-color="#fff" :collapse-transition="false" @select="menuSelect">
<template v-for="item in menus"> <template v-for="item in menus">
<template v-if="item.subs"> <template v-if="item.subs">
<el-submenu :index="item.index" :key="item.index"> <el-submenu :index="item.index" :key="item.index">
@ -110,23 +106,10 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.nav { .nav {
height: 100%; height: 100%;
background-color: #040506; background-color: #fff;
box-shadow: 2px 0px 6px 0px rgba(92, 111, 130, 0.35); box-shadow: 2px 0px 6px 0px rgba(92, 111, 130, 0.35);
overflow: auto; overflow: auto;
.logo {
display: flex;
align-items: center;
padding-left: 28px;
margin: 15px 0 26px;
font-size: 16px;
color: #fff;
img {
margin-right: 8px;
}
}
/deep/.el-menu { /deep/.el-menu {
border-right: 0 !important; border-right: 0 !important;
@ -140,55 +123,8 @@ export default {
} }
} }
.el-menu .el-menu-item { .el-menu-item {
padding-left: 50px !important; padding-left: 40px !important;
}
}
.light {
display: flex;
height: 100%;
background-color: #fff;
overflow: hidden;
.col-wrap {
width: 64px;
background-color: #040506;
}
.logo-icon {
width: 41px;
margin: 16px 0 30px 7px;
}
.col-nav {
text-align: center;
li {
padding: 25px 0;
cursor: pointer;
}
}
.name {
margin: 17px 0 27px 15px;
font-size: 15px;
font-weight: 600;
text-align: center;
color: #333;
line-height: 32px;
}
.col-menu {
width: 192px;
}
/deep/.el-submenu__title {
padding-left: 14px !important;
}
.icon {
margin-left: 0;
} }
} }
} }

@ -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,
this.handleList(data) evaluationId: this.row.evaluationId,
this.quesBankTypes = data keyword: this.outlineKeyword
})
this.manualJudgeCount = res.manualJudgeCount
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) { // 41
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>

@ -85,12 +85,12 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="pagination"> <div class="pagination">
<el-pagination background :page-sizes="[10, 30, 50, 100, 200]" @current-change="currentChange" <el-pagination background :page-sizes="[10, 50, 100, 200, 500, 1000]" @current-change="currentChange"
@size-change="sizeChange" :current-page="page" layout="total, prev, pager, next, sizes" @size-change="sizeChange" :current-page="page" layout="total, prev, pager, next, sizes"
:total="total"></el-pagination> :total="total"></el-pagination>
</div> </div>
<Allocation :visible.sync="allocationVisible" /> <Allocation :row.sync="curRow" :curRecords.sync="curRecords" :visible.sync="allocationVisible" />
<Setup :row.sync="curRow" :visible.sync="setupVisible" /> <Setup :row.sync="curRow" :visible.sync="setupVisible" />
</div> </div>
</template> </template>
@ -143,7 +143,8 @@ export default {
allocationVisible: false, allocationVisible: false,
setupVisible: false, setupVisible: false,
curRow: {}, curRow: JSON.parse(localStorage.getItem('reviewRow')) || {},
curRecords: [],
}; };
}, },
watch: { watch: {
@ -153,12 +154,10 @@ export default {
}, },
}, },
mounted () { mounted () {
const row = localStorage.getItem('reviewRow')
if (row) this.curRow = JSON.parse(row)
const { referrer1 } = this.$store.state.user const { referrer1 } = this.$store.state.user
this.crumbs = [ this.crumbs = [
{ {
name: row.competitionContent || '分配评阅任务', name: this.curRow.competitionContent || '分配评阅任务',
route: referrer1 || '/allocationReview' route: referrer1 || '/allocationReview'
}, },
{ {
@ -273,6 +272,7 @@ export default {
const list = this.multipleSelection const list = this.multipleSelection
if (list.length) { if (list.length) {
try { try {
this.curRecords = list
this.allocationVisible = true this.allocationVisible = true
} catch (e) { } } catch (e) { }
} else { } else {
@ -286,6 +286,7 @@ export default {
}, },
// //
allocation (row) { allocation (row) {
this.curRecords = [row]
this.allocationVisible = true this.allocationVisible = true
}, },
// //

@ -1,6 +1,6 @@
<template> <template>
<div> <div>
<h6 class="page-name m-t-20">选择评阅人员</h6> <h6 class="page-name m-t-20" style="margin-bottom: 10px;">选择评阅人员</h6>
<div class="wrap"> <div class="wrap">
<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">
@ -8,9 +8,11 @@
<el-radio-button :label="1">专家</el-radio-button> <el-radio-button :label="1">专家</el-radio-button>
</el-radio-group> </el-radio-group>
<el-tree :data="nakadais" default-expand-all ref="nakadais" node-key="id" highlight-current <div class="dep-wrap">
:expand-on-click-node="false" @node-click="depClick" <el-tree :data="nakadais" default-expand-all ref="nakadais" node-key="id" highlight-current
:props="{ children: 'children', label: 'organizationName', isLeaf: 'leaf' }"></el-tree> :expand-on-click-node="false" @node-click="depClick"
:props="{ children: 'children', label: 'organizationName', isLeaf: 'leaf' }"></el-tree>
</div>
</div> </div>
<div class="item"> <div class="item">
<p class="total m-b-10">用户</p> <p class="total m-b-10">用户</p>
@ -33,14 +35,14 @@
</div> </div>
</div> </div>
</template> </template>
<div v-else class="empty"> <div v-else class="empty m-t-20">
<img class="icon" src="@/assets/images/empty.svg" alt=""> <img class="icon" src="@/assets/images/empty.svg" alt="">
<p>暂无数据</p> <p>暂无数据</p>
</div> </div>
</div> </div>
<div class="item"> <div class="item">
<div class="flex j-between a-center"> <div class="flex j-between a-center">
<p class="total">已选人</p> <p class="total">已选{{ checked.length }}</p>
<el-button type="text" @click="batchDelChecked">批量移除</el-button> <el-button type="text" @click="batchDelChecked">批量移除</el-button>
</div> </div>
@ -65,7 +67,7 @@
</template> </template>
</div> </div>
</template> </template>
<div v-else class="empty"> <div v-else class="empty m-t-20">
<img class="icon" src="@/assets/images/empty.svg" alt=""> <img class="icon" src="@/assets/images/empty.svg" alt="">
<p>暂无数据</p> <p>暂无数据</p>
</div> </div>
@ -97,13 +99,13 @@ export default {
}; };
}, },
watch: { watch: {
'quesBankKeyword': function (val) { quesBankKeyword: function () {
clearTimeout(this.searchTimer) clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(this.initQuesBank, 500) this.searchTimer = setTimeout(this.initQuesBank, 500)
}, },
'userKeyword': function (val) { userKeyword: function () {
clearTimeout(this.searchTimer) clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(this.getKnowledge, 500) this.searchTimer = setTimeout(this.getNakadaiUser, 500)
}, },
}, },
mounted () { mounted () {
@ -266,7 +268,6 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
/deep/.wrap { /deep/.wrap {
display: flex; display: flex;
margin-top: 20px;
border: 1px solid #eee; border: 1px solid #eee;
.el-radio-button:focus:not(.is-focus):not(:active):not(.is-disabled) { .el-radio-button:focus:not(.is-focus):not(:active):not(.is-disabled) {
@ -284,6 +285,11 @@ export default {
} }
} }
.dep-wrap {
height: calc(100vh - 528px);
overflow: auto;
}
.total { .total {
font-size: 16px; font-size: 16px;
color: #333; color: #333;
@ -296,7 +302,7 @@ export default {
} }
.lines { .lines {
height: calc(100vh - 270px); height: calc(100vh - 588px);
overflow: auto; overflow: auto;
} }

@ -4,6 +4,7 @@
display: none; display: none;
} }
.ip { .ip {
z-index: 1;
position: fixed; position: fixed;
top: 0; top: 0;
left: 0; left: 0;

Loading…
Cancel
Save