|
@@ -34,14 +34,14 @@
|
|
|
评价指标
|
|
|
</span>
|
|
|
</div>
|
|
|
- <DataView v-model="schoolId" @on-school-change="handleSchoolChange(1)" :artInfo="artInfo" :quotaFirstLevel="quotaFirstLevel" :classList="classList" v-if="curBarIndex === 0" :schoolList="schoolList"></DataView>
|
|
|
+ <DataView v-model="schoolId" @on-school-change="handleSchoolChange(1)" :artInfo="artInfo" :quotaFirstLevel="quotaFirstLevel" :classList="classList" v-if="curBarIndex === 0" :schoolList="schoolListShow"></DataView>
|
|
|
<div v-else-if="curBarIndex === 1" class="quo-detail-wrap">
|
|
|
<vuescroll style="background:white">
|
|
|
<Tabs v-model="tabName" style="padding: 0px 10px;margin-top:15px">
|
|
|
<template slot="extra">
|
|
|
<div class="art-filter-wrap">
|
|
|
<Select v-model="schoolId" style="width: 200px;margin-right:10px" placeholder="学校" transfer @on-change="handleSchoolChange(2)">
|
|
|
- <Option v-for="item in schoolList" :value="item.id" :key="item.id">{{ item.name }}</Option>
|
|
|
+ <Option v-for="item in schoolListShow" :value="item.id" :key="item.id">{{ item.name }}</Option>
|
|
|
</Select>
|
|
|
<Select v-model="classId" style="width: 200px;margin-right:10px" placeholder="班级">
|
|
|
<Option v-for="item in classList" :value="item.id" :key="item.id">{{ item.name }}</Option>
|
|
@@ -72,9 +72,9 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- hasPublish:true,
|
|
|
- schoolId:'',
|
|
|
- schoolList:[],
|
|
|
+ hasPublish: true,
|
|
|
+ schoolId: '',
|
|
|
+ schoolList: [],
|
|
|
tabName: '',
|
|
|
split: 0.2,
|
|
|
artList: [],
|
|
@@ -120,21 +120,31 @@ export default {
|
|
|
},
|
|
|
subjectList() {
|
|
|
return this.artInfo?.subjects || []
|
|
|
+ },
|
|
|
+ schoolListShow() {
|
|
|
+ if (this.artList[this.curIndex].sc && this.schoolList.length) {
|
|
|
+ let data = this.schoolList.filter(item => {
|
|
|
+ let has = this.artList[this.curIndex].sc?.find(s => item.id === s.code)
|
|
|
+ return !!has
|
|
|
+ })
|
|
|
+ return data
|
|
|
+ }
|
|
|
+ return this.schoolList
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
- handleSchoolChange(value){
|
|
|
+ handleSchoolChange(value) {
|
|
|
console.log(value)
|
|
|
this.findArtSummary()
|
|
|
},
|
|
|
- getAreaSchoolList(){
|
|
|
+ getAreaSchoolList() {
|
|
|
this.$api.areaArt.findAreaSchoolList({
|
|
|
- id:sessionStorage.getItem('areaId')
|
|
|
+ id: sessionStorage.getItem('areaId')
|
|
|
}).then(
|
|
|
- res=>{
|
|
|
+ res => {
|
|
|
this.schoolList = res.sc
|
|
|
},
|
|
|
- err=>{
|
|
|
+ err => {
|
|
|
this.$Message.error("获取学校列表失败")
|
|
|
}
|
|
|
)
|
|
@@ -169,9 +179,9 @@ export default {
|
|
|
onOk: () => {
|
|
|
let requestData = {
|
|
|
id: this.artList[this.curIndex].id,
|
|
|
- code: this.$store.state.userInfo.schoolCode
|
|
|
+ areaId: sessionStorage.getItem('areaId')
|
|
|
}
|
|
|
- this.$api.areaArt.delArt(requestData).then(
|
|
|
+ this.$api.areaArt.delAreaArt(requestData).then(
|
|
|
res => {
|
|
|
this.$Message.success(this.$t('ae.ae33'))
|
|
|
let index = this.curIndex
|
|
@@ -191,7 +201,7 @@ export default {
|
|
|
this.subjectId = ''
|
|
|
this.curIndex = index
|
|
|
//TODO过滤学校
|
|
|
- this.schoolId = this.schoolList[0] ? this.schoolList[0].id : ''
|
|
|
+ this.schoolId = this.schoolListShow[0] ? this.schoolListShow[0].id : ''
|
|
|
this.findArtSummary()
|
|
|
},
|
|
|
toCreate() {
|
|
@@ -213,9 +223,9 @@ export default {
|
|
|
)
|
|
|
},
|
|
|
findArtSummary() {
|
|
|
- if(!this.schoolId) return
|
|
|
- let sArt = this.artList[this.curIndex].sc?.find(item=>item.code === this.schoolId)
|
|
|
- if(!sArt) return
|
|
|
+ if (!this.schoolId) return
|
|
|
+ let sArt = this.artList[this.curIndex].sc?.find(item => item.code === this.schoolId)
|
|
|
+ if (!sArt) return
|
|
|
let sId = sArt.id
|
|
|
this.classList = []
|
|
|
let params = {
|
|
@@ -235,7 +245,7 @@ export default {
|
|
|
this.classes = []
|
|
|
if (this.artInfo?.classes?.length) {
|
|
|
this.getClassList()
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
this.hasPublish = false
|
|
|
}
|
|
|
},
|
|
@@ -303,7 +313,7 @@ export default {
|
|
|
handler(n, o) {
|
|
|
if (n && n.length) {
|
|
|
this.classId = n[0].id
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
this.classId = ''
|
|
|
}
|
|
|
}
|
|
@@ -323,7 +333,7 @@ export default {
|
|
|
</script>
|
|
|
|
|
|
<style lang="less" scoped>
|
|
|
-.art-exam-list-wrap{
|
|
|
+.art-exam-list-wrap {
|
|
|
height: 100%;
|
|
|
}
|
|
|
.quo-detail-wrap {
|