|
@@ -32,11 +32,17 @@
|
|
|
<Col :md="24" :lg="24" :xl="12" :xxl="8">
|
|
|
<FormItem :label="$t('learnActivity.mark.allocation')" class="setting-item-wrap" prop="mode">
|
|
|
<RadioGroup v-model="setting.mode" style="color:white">
|
|
|
- <Radio label="full">
|
|
|
+ <Radio label="stu">
|
|
|
{{$t('learnActivity.mark.allocationByStu')}}
|
|
|
+ <Tooltip :content="$t('learnActivity.mark.byStuTips')">
|
|
|
+ <Icon type="md-help-circle" color="#a5a5a5" />
|
|
|
+ </Tooltip>
|
|
|
</Radio>
|
|
|
- <Radio disabled label="qu" style="margin-left:20px">
|
|
|
- {{$t('learnActivity.mark.allocationByQu')}}(开发中)
|
|
|
+ <Radio label="qu" style="margin-left:20px">
|
|
|
+ {{$t('learnActivity.mark.allocationByQu')}}
|
|
|
+ <Tooltip :content="$t('learnActivity.mark.byQuTips')">
|
|
|
+ <Icon type="md-help-circle" color="#a5a5a5" />
|
|
|
+ </Tooltip>
|
|
|
</Radio>
|
|
|
</RadioGroup>
|
|
|
</FormItem>
|
|
@@ -95,7 +101,7 @@
|
|
|
</Select>
|
|
|
</FormItem>
|
|
|
</Col>
|
|
|
- <Col :md="24" :lg="24" :xl="24" :xxl="24">
|
|
|
+ <Col :md="24" :lg="24" :xl="24" :xxl="24" v-if="setting.mode == 'stu'">
|
|
|
<!-- 阅卷老师 -->
|
|
|
<FormItem :label="$t('learnActivity.mark.markRole')" class="setting-item-wrap dark-iview-table" prop="markers">
|
|
|
<Table :columns="teaCol" :data="markers" border :no-data-text="$t('learnActivity.mark.noTea')">
|
|
@@ -112,8 +118,8 @@
|
|
|
<span>{{`${row.count}/${evInfo.stuCount * setting.num}`}}</span>
|
|
|
</template>
|
|
|
<template slot-scope="{ row }" slot="qu">
|
|
|
- <span :style="{color:setting.mode == 'full' ? '#2db7f5' : row.qu.length ? '#FFFFFF' : '#ed4014'}">
|
|
|
- {{setting.mode == 'full' ? $t('learnActivity.mark.allQu') : row.qu.length ? row.qu.join(',') : $t('learnActivity.mark.noSet')}}
|
|
|
+ <span :style="{color:setting.mode == 'stu' ? '#2db7f5' : row.qu.length ? '#FFFFFF' : '#ed4014'}">
|
|
|
+ {{setting.mode == 'stu' ? $t('learnActivity.mark.allQu') : row.qu.length ? row.qu.join(',') : $t('learnActivity.mark.noSet')}}
|
|
|
</span>
|
|
|
</template>
|
|
|
</Table>
|
|
@@ -123,11 +129,42 @@
|
|
|
</span>
|
|
|
</FormItem>
|
|
|
</Col>
|
|
|
+ <Col :md="24" :lg="24" :xl="24" :xxl="24" v-else>
|
|
|
+ <!-- 题目划块 -->
|
|
|
+ <FormItem :label="$t('learnActivity.mark.quBlock')" class="setting-item-wrap dark-iview-table" prop="markers">
|
|
|
+ <Table :columns="blockCol" :data="blockData" border>
|
|
|
+ <template slot-scope="{ row,index }" slot="action">
|
|
|
+ <Button type="info" size="small" style="margin-right:10px" @click="setQuStatus = true">
|
|
|
+ {{$t('learnActivity.mgtScEv.edit')}}
|
|
|
+ </Button>
|
|
|
+ <Button type="error" size="small" @click="removeMarker(row,index)">{{$t('learnActivity.mark.remove')}}</Button>
|
|
|
+ </template>
|
|
|
+ <template slot-scope="{ row }" slot="count">
|
|
|
+ <span>{{`${row.count}/${evInfo.stuCount * setting.num}`}}</span>
|
|
|
+ </template>
|
|
|
+ <template slot-scope="{ row }" slot="quLabel">
|
|
|
+ <span style="word-break: break-word;">
|
|
|
+ {{getQuLabels(row.quNo).join(', ')}}
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ <template slot-scope="{ row }" slot="teachers">
|
|
|
+ <span style="word-break: break-word;">
|
|
|
+ {{row.teachers.map(item=>item.name).join(', ')}}
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ </Table>
|
|
|
+ <span class="add-tea-btn" v-if="$access.can('admin.*|schoolAc-upd')" @click="setQuStatus = true">
|
|
|
+ <Icon type="md-add" />
|
|
|
+ {{$t('learnActivity.mark.addBlock')}}
|
|
|
+ </span>
|
|
|
+ </FormItem>
|
|
|
+ </Col>
|
|
|
</Row>
|
|
|
</Form>
|
|
|
</div>
|
|
|
</div>
|
|
|
</vuescroll>
|
|
|
+ <!-- 按人分配设置阅卷老师 -->
|
|
|
<Modal v-model="addTeaStatus" :title="$t('learnActivity.mark.addTeaTitle')" class-name="dark-iview-modal dark-iview-table" @on-ok="okAddTea" :width="1000">
|
|
|
<Table ref="sltTea" :columns="teacherCol" :data="teacherList" style="margin-top:10px" @on-selection-change="(selection)=>{sltTeachers = selection}" height="600">
|
|
|
<template slot-scope="{ row }" slot="picture">
|
|
@@ -138,8 +175,27 @@
|
|
|
</template>
|
|
|
</Table>
|
|
|
</Modal>
|
|
|
- <Modal v-model="setQuStatus" :title="$t('learnActivity.mark.quNoSet')" class-name="dark-iview-modal dark-iview-table" @on-ok="okSetQu" :width="1000">
|
|
|
-
|
|
|
+ <!-- 按题分配设置题块和老师 -->
|
|
|
+ <Modal v-model="setQuStatus" class-name="dark-iview-modal dark-iview-table" @on-ok="okSetQu" :width="1000">
|
|
|
+ <Tabs value="name1" style="color:white">
|
|
|
+ <TabPane label="题目" name="name1">
|
|
|
+ <CheckboxGroup v-model="quBlock" style="margin-left:10px">
|
|
|
+ <Checkbox v-for="(item,index) in quNoList" :key="index" :label="item.value">
|
|
|
+ <span class="qu-no-label">{{item.label}}</span>
|
|
|
+ </Checkbox>
|
|
|
+ </CheckboxGroup>
|
|
|
+ </TabPane>
|
|
|
+ <TabPane label="教师" name="name2">
|
|
|
+ <Table ref="quTea" :columns="teacherCol" :data="teacherList" @on-selection-change="(selection)=>{quTeachers = selection}" height="600">
|
|
|
+ <template slot-scope="{ row }" slot="picture">
|
|
|
+ <PersonalPhoto :name="row.name" :picture="row.picture" />
|
|
|
+ </template>
|
|
|
+ <template slot-scope="{ row }" slot="job">
|
|
|
+ <span>{{row.job || '--'}}</span>
|
|
|
+ </template>
|
|
|
+ </Table>
|
|
|
+ </TabPane>
|
|
|
+ </Tabs>
|
|
|
</Modal>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -168,6 +224,8 @@ export default {
|
|
|
data() {
|
|
|
let _this = this
|
|
|
return {
|
|
|
+ quBlock: [],
|
|
|
+ blockData: [],
|
|
|
isSetting: false,
|
|
|
ruleValidate: {
|
|
|
startTime: [
|
|
@@ -209,7 +267,7 @@ export default {
|
|
|
createTime: '',
|
|
|
endTime: '',
|
|
|
scode: '',//评测的分区键
|
|
|
- mode: 'full',//阅卷模式 按人 full 按题 qu
|
|
|
+ mode: 'stu',//阅卷模式 按人 stu 按题 qu
|
|
|
num: 1,//阅卷次数
|
|
|
isErr: 0, //是否有异常处理流程 0/1
|
|
|
isArb: 0, //是否有仲裁处理流程 0/1
|
|
@@ -234,7 +292,8 @@ export default {
|
|
|
},
|
|
|
addTeaStatus: false,
|
|
|
teacherList: [],
|
|
|
- sltTeachers: [],
|
|
|
+ sltTeachers: [], //按人分配时,设置老师
|
|
|
+ quTeachers:[], //按题分配时,设置老师
|
|
|
teacherCol: [
|
|
|
{
|
|
|
type: 'selection',
|
|
@@ -295,6 +354,37 @@ export default {
|
|
|
align: 'center'
|
|
|
},
|
|
|
],
|
|
|
+ blockCol: [
|
|
|
+ {
|
|
|
+ title: '序号',
|
|
|
+ type: 'index',
|
|
|
+ align: 'center',
|
|
|
+ width: 80
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '题号',
|
|
|
+ slot: 'quLabel',
|
|
|
+ align: 'center',
|
|
|
+ width: 180
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '阅卷教师',
|
|
|
+ slot: 'teachers',
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '阅卷量',
|
|
|
+ key: 'num',
|
|
|
+ align: 'center',
|
|
|
+ width: 120
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '',
|
|
|
+ slot: 'action',
|
|
|
+ align: 'center',
|
|
|
+ width: 150
|
|
|
+ },
|
|
|
+ ],
|
|
|
dateOpt: {
|
|
|
disabledDate(date) {
|
|
|
return date && date.valueOf() < Date.now() - 86400000
|
|
@@ -314,6 +404,38 @@ export default {
|
|
|
MarkProgress, CptCount, ScanProgress, PersonalPhoto
|
|
|
},
|
|
|
methods: {
|
|
|
+ getQuLabels() {
|
|
|
+ return this.quNoList.filter(item => {
|
|
|
+ return this.quBlock.includes(item.value)
|
|
|
+ }).map(item => {
|
|
|
+ return item.label
|
|
|
+ })
|
|
|
+ },
|
|
|
+ /**
|
|
|
+ * index 题目index 必传
|
|
|
+ * childIndex 小题index 非必传
|
|
|
+ */
|
|
|
+ getScoreIndex(index, childIndex) {
|
|
|
+ let realIndex = 0
|
|
|
+ this.curPaper.item.forEach((item, itemIndex) => {
|
|
|
+ if (itemIndex <= index) {
|
|
|
+ //综合题
|
|
|
+ if (item.children.length) {
|
|
|
+ item.children.forEach((childItem, cIndex) => {
|
|
|
+ if (itemIndex < index) {
|
|
|
+ realIndex++
|
|
|
+ } else if (cIndex <= childIndex) {
|
|
|
+ realIndex++
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ realIndex++
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ return --realIndex
|
|
|
+ },
|
|
|
//移除阅卷老师
|
|
|
removeMarker(row, index) {
|
|
|
if (this.$access.can('admin.*|schoolAc-upd')) {
|
|
@@ -334,7 +456,10 @@ export default {
|
|
|
},
|
|
|
//确认设置阅卷题号
|
|
|
okSetQu() {
|
|
|
-
|
|
|
+ this.blockData.push({
|
|
|
+ quNo: this.quBlock,
|
|
|
+ teachers: [...this.quTeachers]
|
|
|
+ })
|
|
|
},
|
|
|
/**
|
|
|
* 将日期控件时间格式转成时间戳
|
|
@@ -443,6 +568,7 @@ export default {
|
|
|
this.setting.code = this.$store.state.userInfo.schoolCode
|
|
|
this.setting.scode = this.evInfo.code
|
|
|
this.setting.creatorId = this.$store.state.userInfo.TEAMModelId
|
|
|
+ this.setting.mode = 'stu'
|
|
|
this.setting.createTime = new Date().getTime()
|
|
|
this.setting.startTime = new Date().getTime()
|
|
|
this.setting.endTime = new Date().getTime() + 86400000 * 2
|
|
@@ -481,6 +607,7 @@ export default {
|
|
|
watch: {
|
|
|
'evInfo.id': {
|
|
|
handler(n, o) {
|
|
|
+ console.log('评测数据', this.evInfo)
|
|
|
if (this.evInfo.id) {
|
|
|
this.findSettingInfo()
|
|
|
} else {
|
|
@@ -555,11 +682,63 @@ export default {
|
|
|
} else {
|
|
|
return []
|
|
|
}
|
|
|
+ },
|
|
|
+ //当前科目试卷信息
|
|
|
+ curPaper() {
|
|
|
+ let defData = {
|
|
|
+ item: []
|
|
|
+ }
|
|
|
+ if (this.subjects.length) {
|
|
|
+ let curSub = this.subjects[this.curSubIndex]
|
|
|
+ if (curSub) {
|
|
|
+ let paper = this.evInfo.papers.find(item => {
|
|
|
+ return item.subjectId == curSub.id
|
|
|
+ })
|
|
|
+ if (paper) {
|
|
|
+ return paper
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return defData
|
|
|
+ },
|
|
|
+ //试卷题号列表
|
|
|
+ quNoList() {
|
|
|
+ if (this.curPaper.item.length) {
|
|
|
+ let objectiveQu = ['single', 'multiple', 'judge']
|
|
|
+ let data = []
|
|
|
+ let realIndex = 0
|
|
|
+ this.curPaper.item.forEach((item, index) => {
|
|
|
+ if (item.children.length) {
|
|
|
+ item.children.forEach((childItem, childIndex) => {
|
|
|
+ data.push({
|
|
|
+ label: (index + 1) + '-' + (childIndex + 1),
|
|
|
+ value: realIndex++,
|
|
|
+ disabled: objectiveQu.includes(childItem.type)
|
|
|
+ })
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ data.push({
|
|
|
+ label: index + 1,
|
|
|
+ value: realIndex++,
|
|
|
+ disabled: objectiveQu.includes(item.type)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ return data
|
|
|
+ }
|
|
|
+ return []
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
|
<style scoped lang="less">
|
|
|
+.qu-no-label {
|
|
|
+ color: white;
|
|
|
+ margin-right: 15px;
|
|
|
+ margin-bottom: 10px;
|
|
|
+ width: 60px;
|
|
|
+ display: inline-block;
|
|
|
+}
|
|
|
.publish-status-box {
|
|
|
width: 360px;
|
|
|
height: 315px;
|