|
@@ -57,15 +57,15 @@
|
|
<div class="role-item-wrap dark-iview-table">
|
|
<div class="role-item-wrap dark-iview-table">
|
|
<span class="role-label" style="vertical-align: top;">{{$t('learnActivity.mark.markRole')}}</span>
|
|
<span class="role-label" style="vertical-align: top;">{{$t('learnActivity.mark.markRole')}}</span>
|
|
<div class="scan-tea-table">
|
|
<div class="scan-tea-table">
|
|
- <Table :columns="teaCol" :data="teaData" border :no-data-text="$t('learnActivity.mark.noTea')">
|
|
|
|
|
|
+ <Table :columns="teaCol" :data="markers" border :no-data-text="$t('learnActivity.mark.noTea')">
|
|
<template slot-scope="{ row }" slot="header">
|
|
<template slot-scope="{ row }" slot="header">
|
|
<PersonalPhoto :name="row.name" :picture="row.picture" />
|
|
<PersonalPhoto :name="row.name" :picture="row.picture" />
|
|
</template>
|
|
</template>
|
|
<template slot-scope="{ row }" slot="action">
|
|
<template slot-scope="{ row }" slot="action">
|
|
<Button type="error" size="small">{{$t('learnActivity.mark.remove')}}</Button>
|
|
<Button type="error" size="small">{{$t('learnActivity.mark.remove')}}</Button>
|
|
</template>
|
|
</template>
|
|
- <template slot-scope="{ row }" slot="num">
|
|
|
|
- <span>{{`${row.num}/24`}}</span>
|
|
|
|
|
|
+ <template slot-scope="{ row }" slot="count">
|
|
|
|
+ <span>{{`${row.count}/${evInfo.stuCount}`}}</span>
|
|
</template>
|
|
</template>
|
|
</Table>
|
|
</Table>
|
|
<span class="add-tea-btn" @click="addTeaStatus = true">
|
|
<span class="add-tea-btn" @click="addTeaStatus = true">
|
|
@@ -114,16 +114,54 @@ import ScanProgress from '../echarts/ScanProgress.vue'
|
|
import CptCount from '../echarts/CptCount.vue'
|
|
import CptCount from '../echarts/CptCount.vue'
|
|
import PersonalPhoto from "@/components/public/personalPhoto/Index.vue"
|
|
import PersonalPhoto from "@/components/public/personalPhoto/Index.vue"
|
|
export default {
|
|
export default {
|
|
|
|
+ props: {
|
|
|
|
+ evInfo: {
|
|
|
|
+ type: Object,
|
|
|
|
+ default: () => {
|
|
|
|
+ return {
|
|
|
|
+ id: '',
|
|
|
|
+ name: ''
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ subjectId: {
|
|
|
|
+ type: String,
|
|
|
|
+ default: ''
|
|
|
|
+ }
|
|
|
|
+ },
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
setting: {
|
|
setting: {
|
|
- mode: '',//阅卷模式
|
|
|
|
- num: 0,//阅卷次数
|
|
|
|
- err: [],//处理异常卷人员
|
|
|
|
- arb: [],//处理冲裁卷人员
|
|
|
|
- marker: [],//阅卷老师
|
|
|
|
- point: 2,//分差(仲裁条件)
|
|
|
|
- quRule: [],//题目分配规则
|
|
|
|
|
|
+ id: '',
|
|
|
|
+ code: '',
|
|
|
|
+ name: '',
|
|
|
|
+ owner: 'school',
|
|
|
|
+ school: '',
|
|
|
|
+ creatorId: '',
|
|
|
|
+ scope: 'school',
|
|
|
|
+ startTime: '',
|
|
|
|
+ createTime: '',
|
|
|
|
+ endTime: '',
|
|
|
|
+ scode: '',//评测的分区键
|
|
|
|
+ subs: [
|
|
|
|
+ // {
|
|
|
|
+ // id: '',//科目id,
|
|
|
|
+ // name: '',//科目名称
|
|
|
|
+ // markers: [ //阅卷老师
|
|
|
|
+ // {
|
|
|
|
+ // id: '',
|
|
|
|
+ // count: 0
|
|
|
|
+ // }
|
|
|
|
+ // ],
|
|
|
|
+ // mode: '',//阅卷模式
|
|
|
|
+ // num: 0,//阅卷次数
|
|
|
|
+ // err: [],//处理异常卷人员
|
|
|
|
+ // arb: [],//处理冲裁卷人员
|
|
|
|
+ // point: 2,//分差(仲裁条件)
|
|
|
|
+ // quRule: []//题目分配规则
|
|
|
|
+ // }
|
|
|
|
+ ],
|
|
|
|
+
|
|
},
|
|
},
|
|
addTeaStatus: false,
|
|
addTeaStatus: false,
|
|
teacherList: [],
|
|
teacherList: [],
|
|
@@ -174,7 +212,7 @@ export default {
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: this.$t('learnActivity.mark.markNum'),
|
|
title: this.$t('learnActivity.mark.markNum'),
|
|
- slot: 'num',
|
|
|
|
|
|
+ slot: 'count',
|
|
align: 'center'
|
|
align: 'center'
|
|
},
|
|
},
|
|
{
|
|
{
|
|
@@ -183,7 +221,6 @@ export default {
|
|
align: 'center'
|
|
align: 'center'
|
|
},
|
|
},
|
|
],
|
|
],
|
|
- teaData: [],
|
|
|
|
quCol: [
|
|
quCol: [
|
|
{
|
|
{
|
|
title: this.$t('learnActivity.mark.quIndex'),
|
|
title: this.$t('learnActivity.mark.quIndex'),
|
|
@@ -202,46 +239,98 @@ export default {
|
|
slot: 'teachers',
|
|
slot: 'teachers',
|
|
},
|
|
},
|
|
],
|
|
],
|
|
- quData: [
|
|
|
|
- {
|
|
|
|
- quNo: [1, 2, 3],
|
|
|
|
- teachers: [
|
|
|
|
- 'JK',
|
|
|
|
- '尹航',
|
|
|
|
- '向奕然',
|
|
|
|
- '高嘉妍',
|
|
|
|
- '刘雨菡',
|
|
|
|
- 'jefftest',
|
|
|
|
- '李芷萱',
|
|
|
|
- ]
|
|
|
|
- }
|
|
|
|
- ]
|
|
|
|
|
|
+ quData: []
|
|
}
|
|
}
|
|
},
|
|
},
|
|
components: {
|
|
components: {
|
|
MarkProgress, CptCount, ScanProgress, PersonalPhoto
|
|
MarkProgress, CptCount, ScanProgress, PersonalPhoto
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ saveSetting() {
|
|
|
|
+ this.setting.code = this.$store.state.userInfo.schoolCode
|
|
|
|
+ this.$api.mark.UpsertMarkSet(this.setting).then(
|
|
|
|
+ res => {
|
|
|
|
+ this.$Message.success('保存成功!')
|
|
|
|
+ },
|
|
|
|
+ err => {
|
|
|
|
+ this.$Message.error('保存失败!')
|
|
|
|
+ }
|
|
|
|
+ )
|
|
|
|
+ },
|
|
//确认添加老师
|
|
//确认添加老师
|
|
okAddTea() {
|
|
okAddTea() {
|
|
- let ids = this.teaData.map(item => {
|
|
|
|
- return item.id
|
|
|
|
- })
|
|
|
|
- this.sltTeachers.forEach(item => {
|
|
|
|
- if (ids.indexOf(item.id) == -1) {
|
|
|
|
- this.teaData.push(item)
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- this.teaData.map(item => {
|
|
|
|
- item.num = 24 / this.teaData.length
|
|
|
|
|
|
+ let subject = this.setting.subs.find(item => {
|
|
|
|
+ return this.subjectId == item.id
|
|
})
|
|
})
|
|
|
|
+ if (subject) {
|
|
|
|
+ let ids = subject.marker.map(item => {
|
|
|
|
+ return item.id
|
|
|
|
+ })
|
|
|
|
+ this.sltTeachers.forEach(item => {
|
|
|
|
+ if (ids.indexOf(item.id) == -1) {
|
|
|
|
+ subject.marker.push({
|
|
|
|
+ id: item.id,
|
|
|
|
+ name: item.name
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ let more = this.evInfo.stuCount % subject.marker.length
|
|
|
|
+ subject.marker.map((item, index) => {
|
|
|
|
+ if (index < more) {
|
|
|
|
+ item.count = Math.ceil(this.evInfo.stuCount / subject.marker.length)
|
|
|
|
+ } else {
|
|
|
|
+ item.count = Math.floor(this.evInfo.stuCount / subject.marker.length)
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ console.log(this.setting)
|
|
this.cancel()
|
|
this.cancel()
|
|
},
|
|
},
|
|
cancel() {
|
|
cancel() {
|
|
this.sltTeachers = []
|
|
this.sltTeachers = []
|
|
this.$refs.sltTea.selectAll(false)
|
|
this.$refs.sltTea.selectAll(false)
|
|
},
|
|
},
|
|
-
|
|
|
|
|
|
+ //查询评测阅卷配置信息
|
|
|
|
+ findSettingInfo() {
|
|
|
|
+ let requestData = {
|
|
|
|
+ id: this.evInfo.id,
|
|
|
|
+ code: this.$store.state.userInfo.schoolCode
|
|
|
|
+ }
|
|
|
|
+ this.$api.mark.FindById(requestData).then(
|
|
|
|
+ res => {
|
|
|
|
+ if (res.correct) {
|
|
|
|
+ this.setting = res.correct
|
|
|
|
+ } else {
|
|
|
|
+ if (this.evInfo.subjects) {
|
|
|
|
+ this.setting.id = this.evInfo.id
|
|
|
|
+ this.setting.name = this.evInfo.name
|
|
|
|
+ this.setting.school = this.$store.state.userInfo.schoolCode
|
|
|
|
+ this.setting.code = this.$store.state.userInfo.schoolCode
|
|
|
|
+ this.setting.scode = this.evInfo.code
|
|
|
|
+ this.setting.creatorId = this.$store.state.userInfo.TEAMModelId
|
|
|
|
+ this.setting.createTime = new Date().getTime()
|
|
|
|
+ this.setting.startTime = new Date().getTime()
|
|
|
|
+ this.setting.endTime = new Date().getTime() + 86400000 * 2
|
|
|
|
+ this.evInfo.subjects.forEach((item) => {
|
|
|
|
+ this.setting.subs.push({
|
|
|
|
+ id: item.id,
|
|
|
|
+ name: item.name,
|
|
|
|
+ marker: []
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ console.log('初始化配置数据')
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ err => {
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ ).finally(() => {
|
|
|
|
+
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ }
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
this.$store.dispatch('teachers/getTeacherList').then(res => {
|
|
this.$store.dispatch('teachers/getTeacherList').then(res => {
|
|
@@ -250,6 +339,36 @@ export default {
|
|
})
|
|
})
|
|
console.log(this.teacherList)
|
|
console.log(this.teacherList)
|
|
})
|
|
})
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+ watch: {
|
|
|
|
+ 'evInfo.id': {
|
|
|
|
+ handler(n, o) {
|
|
|
|
+ console.log('评测信息', this.evInfo)
|
|
|
|
+ if (this.evInfo.id) {
|
|
|
|
+ this.findSettingInfo()
|
|
|
|
+ } else {
|
|
|
|
+ this.$Message.warning('暂无评测id')
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+ deep: true
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ computed: {
|
|
|
|
+ //从基础信息获取阅卷老师
|
|
|
|
+ markers() {
|
|
|
|
+ let arr = []
|
|
|
|
+ if (this.setting.subs) {
|
|
|
|
+ let subject = this.setting.subs.find(item => {
|
|
|
|
+ return item.id == this.subjectId
|
|
|
|
+ })
|
|
|
|
+ if (subject) {
|
|
|
|
+ arr = subject.marker
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ return arr
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|