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. 169
      src/pages/allocationReview/records/allocation.vue
  5. 13
      src/pages/allocationReview/records/index.vue
  6. 24
      src/pages/allocationReview/records/people.vue
  7. 1
      src/styles/common.scss

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

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

@ -1,12 +1,8 @@
<template>
<div>
<div class="flex-1">
<div class="logo">
<img width="30" src="@/assets/images/logo.png" alt="">
<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">
<el-menu :default-active="active" :default-openeds="['ques', 'testPaper']" background-color="#fff"
text-color="#333" active-text-color="#fff" :collapse-transition="false" @select="menuSelect">
<template v-for="item in menus">
<template v-if="item.subs">
<el-submenu :index="item.index" :key="item.index">
@ -110,23 +106,10 @@ export default {
<style lang="scss" scoped>
.nav {
height: 100%;
background-color: #040506;
background-color: #fff;
box-shadow: 2px 0px 6px 0px rgba(92, 111, 130, 0.35);
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 {
border-right: 0 !important;
@ -140,55 +123,8 @@ export default {
}
}
.el-menu .el-menu-item {
padding-left: 50px !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;
.el-menu-item {
padding-left: 40px !important;
}
}
}

@ -1,6 +1,6 @@
<template>
<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">
<div class="overflow">
<div class="tool">
@ -8,9 +8,9 @@
<li style="align-items: flex-start;">
<label>分配方式</label>
<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>
<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>
</div>
</li>
@ -36,6 +36,18 @@
</el-table-column>
</el-table>
</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 class="btns">
@ -62,13 +74,11 @@
import People from './people'
import Setting from '@/setting'
import Util from '@/libs/util'
import QuesConst from '@/const/ques'
import TestPaperConst from '@/const/testPaper'
import _ from 'lodash'
import Decimal from 'decimal.js'
export default {
components: { People },
props: ['visible'],
props: ['visible', 'row', 'curRecords'],
data () {
return {
radio: '',
@ -78,16 +88,31 @@ export default {
userType: '',
ques: [],
multipleSelection: [],
outlineKeyword: '',
checkAllQues: true,
outlines: [],
allQuesIds: [],
disabledQuesIds: [],
manualJudgeCount: 0,
submiting: false,
peopleVisible: false,
};
},
computed: {
diaTitle () {
return `分配评阅人员(已选${this.curRecords.length}份答卷,每卷共${this.manualJudgeCount}道人工判分题)`
},
},
watch: {
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 () {
@ -95,20 +120,57 @@ export default {
methods: {
//
init () {
this.handleQuesList()
// this.checkAllQues = true
const el = this.$refs.outline
// el && el.setCheckedKeys(this.allQuesIds)
this.getOutline()
},
//
async getQuesBankType () {
//
async getOutline () {
try {
const { data } = await this.$post(this.api.getAllQuestionBankCategories, {
createSource: 1,
status: 1,
const { paperId } = this.row
if (paperId) {
const res = await this.$post(this.api.getPaperQuestionInfoByReviewSetting, {
paperId,
evaluationId: this.row.evaluationId,
keyword: this.outlineKeyword
})
this.handleList(data)
this.quesBankTypes = data
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) { }
},
//
checkAllQuesChange (val) {
this.$refs.outline.setCheckedKeys(val ? this.allQuesIds : this.disabledQuesIds) //
},
handleSelectionChange (val) {
this.multipleSelection = val
},
@ -138,58 +200,8 @@ export default {
async submit () {
if (this.submiting) return false
const { list } = this
let invalid = 0
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(`请填写难度题数`)
// if (!totalCount) return Util.warningMsg(``)
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 {
const res = await this.$post(this.api.selectQuestionsByTypeAndDifficulty, list)
@ -201,22 +213,6 @@ export default {
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) => {
res.list[i].questions.map((e, i) => {
e.questionId = e.id
@ -258,5 +254,10 @@ export default {
font-size: 12px;
color: #585858;
}
.scopes {
max-height: 400px;
overflow: auto;
}
}
</style>

@ -85,12 +85,12 @@
</el-table-column>
</el-table>
<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"
:total="total"></el-pagination>
</div>
<Allocation :visible.sync="allocationVisible" />
<Allocation :row.sync="curRow" :curRecords.sync="curRecords" :visible.sync="allocationVisible" />
<Setup :row.sync="curRow" :visible.sync="setupVisible" />
</div>
</template>
@ -143,7 +143,8 @@ export default {
allocationVisible: false,
setupVisible: false,
curRow: {},
curRow: JSON.parse(localStorage.getItem('reviewRow')) || {},
curRecords: [],
};
},
watch: {
@ -153,12 +154,10 @@ export default {
},
},
mounted () {
const row = localStorage.getItem('reviewRow')
if (row) this.curRow = JSON.parse(row)
const { referrer1 } = this.$store.state.user
this.crumbs = [
{
name: row.competitionContent || '分配评阅任务',
name: this.curRow.competitionContent || '分配评阅任务',
route: referrer1 || '/allocationReview'
},
{
@ -273,6 +272,7 @@ export default {
const list = this.multipleSelection
if (list.length) {
try {
this.curRecords = list
this.allocationVisible = true
} catch (e) { }
} else {
@ -286,6 +286,7 @@ export default {
},
//
allocation (row) {
this.curRecords = [row]
this.allocationVisible = true
},
//

@ -1,6 +1,6 @@
<template>
<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="item">
<el-radio-group class="m-b-10" v-model="userType" size="small">
@ -8,10 +8,12 @@
<el-radio-button :label="1">专家</el-radio-button>
</el-radio-group>
<div class="dep-wrap">
<el-tree :data="nakadais" default-expand-all ref="nakadais" node-key="id" highlight-current
:expand-on-click-node="false" @node-click="depClick"
:props="{ children: 'children', label: 'organizationName', isLeaf: 'leaf' }"></el-tree>
</div>
</div>
<div class="item">
<p class="total m-b-10">用户</p>
<el-input class="m-b-10" placeholder="请输入姓名、现所在单位" prefix-icon="el-icon-search" v-model="userKeyword"
@ -33,14 +35,14 @@
</div>
</div>
</template>
<div v-else class="empty">
<div v-else class="empty m-t-20">
<img class="icon" src="@/assets/images/empty.svg" alt="">
<p>暂无数据</p>
</div>
</div>
<div class="item">
<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>
</div>
@ -65,7 +67,7 @@
</template>
</div>
</template>
<div v-else class="empty">
<div v-else class="empty m-t-20">
<img class="icon" src="@/assets/images/empty.svg" alt="">
<p>暂无数据</p>
</div>
@ -97,13 +99,13 @@ export default {
};
},
watch: {
'quesBankKeyword': function (val) {
quesBankKeyword: function () {
clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(this.initQuesBank, 500)
},
'userKeyword': function (val) {
userKeyword: function () {
clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(this.getKnowledge, 500)
this.searchTimer = setTimeout(this.getNakadaiUser, 500)
},
},
mounted () {
@ -266,7 +268,6 @@ export default {
<style lang="scss" scoped>
/deep/.wrap {
display: flex;
margin-top: 20px;
border: 1px solid #eee;
.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 {
font-size: 16px;
color: #333;
@ -296,7 +302,7 @@ export default {
}
.lines {
height: calc(100vh - 270px);
height: calc(100vh - 588px);
overflow: auto;
}

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

Loading…
Cancel
Save