|
@@ -5,7 +5,17 @@
|
|
<!--评测列表-->
|
|
<!--评测列表-->
|
|
<div class="evaluation-list-wrap" slot="left">
|
|
<div class="evaluation-list-wrap" slot="left">
|
|
<div class="evaluation-list-title">
|
|
<div class="evaluation-list-title">
|
|
- <span>{{$t('learnActivity.mgtScEv.listLabel')}}</span>
|
|
|
|
|
|
+ <span v-if="!$store.state.userInfo.isHeadmaster">{{$t('learnActivity.mgtScEv.listLabel')}}</span>
|
|
|
|
+ <Dropdown v-else class="sort-dropdown" trigger="click" placement="bottom-start" @on-click="function(e){ curEvValue = e }" @on-visible-change="dropdownStates">
|
|
|
|
+ <span style="cursor: pointer;">
|
|
|
|
+ <!-- {{$t('learnActivity.mgtScEv.period')}} -->
|
|
|
|
+ <b class="title">{{ curEvLabel }}</b>
|
|
|
|
+ <Icon type="ios-arrow-down" style="margin-left:8px;"></Icon>
|
|
|
|
+ </span>
|
|
|
|
+ <DropdownMenu slot="list" v-for="(item,index) in evFilter" :value="item.value" :key="index">
|
|
|
|
+ <DropdownItem :name="item.value">{{ item.label }}</DropdownItem>
|
|
|
|
+ </DropdownMenu>
|
|
|
|
+ </Dropdown>
|
|
<Icon type="md-add" class=" to-create-icon" @click="goToCreate" :title="$t('learnActivity.mgtScEv.create')" />
|
|
<Icon type="md-add" class=" to-create-icon" @click="goToCreate" :title="$t('learnActivity.mgtScEv.create')" />
|
|
<Icon type="md-trash" v-show="evaListShow.length" class="to-create-icon" :title="$t('learnActivity.mgtScEv.delete')" @click="deleteEvaluation" />
|
|
<Icon type="md-trash" v-show="evaListShow.length" class="to-create-icon" :title="$t('learnActivity.mgtScEv.delete')" @click="deleteEvaluation" />
|
|
<Icon type="md-create" v-show="evaListShow.length && evaListShow[curEvaIndex].progress == 'pending'" class="to-create-icon" @click="editEvaluation" :title="$t('learnActivity.mgtScEv.edit')" />
|
|
<Icon type="md-create" v-show="evaListShow.length && evaListShow[curEvaIndex].progress == 'pending'" class="to-create-icon" @click="editEvaluation" :title="$t('learnActivity.mgtScEv.edit')" />
|
|
@@ -98,6 +108,7 @@ export default {
|
|
inject: ['reload'],
|
|
inject: ['reload'],
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
|
|
+ curEvValue:0,
|
|
split1: 0.2,
|
|
split1: 0.2,
|
|
scope: '',//school 校本 private 个人
|
|
scope: '',//school 校本 private 个人
|
|
showBack: false,
|
|
showBack: false,
|
|
@@ -109,15 +120,34 @@ export default {
|
|
examDetaiInfo: {},
|
|
examDetaiInfo: {},
|
|
targetList: [],
|
|
targetList: [],
|
|
isLoading: false,
|
|
isLoading: false,
|
|
- filterPeriod: undefined,
|
|
|
|
schoolBase: {
|
|
schoolBase: {
|
|
period: []
|
|
period: []
|
|
},
|
|
},
|
|
|
|
+ evFilter:[
|
|
|
|
+ {
|
|
|
|
+ label:'我发布的评测',
|
|
|
|
+ value:0
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ label:'数学评测',
|
|
|
|
+ value:1
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ label:'英语评测',
|
|
|
|
+ value:2
|
|
|
|
+ }
|
|
|
|
+ ],
|
|
scoreLoading: false,
|
|
scoreLoading: false,
|
|
answerLoading: false
|
|
answerLoading: false
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ dropdownStates(flag) {
|
|
|
|
+ if (!flag) this.filterByTag()
|
|
|
|
+ },
|
|
|
|
+ filterByTag() {
|
|
|
|
+ this.curEvaIndex = 0
|
|
|
|
+ },
|
|
// 模拟教师评分数据
|
|
// 模拟教师评分数据
|
|
mockScoring() {
|
|
mockScoring() {
|
|
this.scoreLoading = true
|
|
this.scoreLoading = true
|
|
@@ -387,10 +417,6 @@ export default {
|
|
(res) => {
|
|
(res) => {
|
|
if (res) {
|
|
if (res) {
|
|
this.schoolBase = res.school_base
|
|
this.schoolBase = res.school_base
|
|
- // 預設搜尋給第一個
|
|
|
|
- if (res.school_base.period && res.school_base.period.length) {
|
|
|
|
- this.filterPeriod = res.school_base.period[0].id
|
|
|
|
- }
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
).finally(() => {
|
|
).finally(() => {
|
|
@@ -410,16 +436,13 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
- filterPeriodName: function () {
|
|
|
|
- let pId = this.filterPeriod
|
|
|
|
- let name = ''
|
|
|
|
- if (pId) {
|
|
|
|
- let temp = this.$store.state.user.schoolProfile.school_base.period.filter(item => {
|
|
|
|
- return pId == item.id
|
|
|
|
- })
|
|
|
|
- if (temp.length > 0) name = temp[0].name
|
|
|
|
- }
|
|
|
|
- return name
|
|
|
|
|
|
+ curEvLabel: function () {
|
|
|
|
+ let value = this.curEvValue
|
|
|
|
+ console.log(this.curEvValue)
|
|
|
|
+ let curObj = this.evFilter.find(item=>{
|
|
|
|
+ return item.value == value
|
|
|
|
+ })
|
|
|
|
+ return curObj.label
|
|
},
|
|
},
|
|
}
|
|
}
|
|
}
|
|
}
|