|
@@ -10,7 +10,7 @@
|
|
|
<div class="question-condition-item question-num-item" v-for="(items,indexs) in quePerson" :key="indexs">
|
|
|
<span class="condition-label">{{items.name}}:</span>
|
|
|
<span class="question-difficulty-label">难度</span>
|
|
|
- <Select v-model="items.level" style="width:90px" size="small" @on-change="getData">
|
|
|
+ <Select v-model="items.level" style="width:90px" size="small" >
|
|
|
<Option v-for="(item,index) in difficultyList" :value="item.value" :key="index">{{ item.label }}</Option>
|
|
|
</Select>
|
|
|
<span class="input-tag-text total-text-tag">共</span>
|
|
@@ -37,22 +37,22 @@
|
|
|
<Radio v-for="(item,index) in $store.state.schoolBaseInfo.schoolBaseInfo.period" :label="item.id" :key="index" style="margin-right:30px;"> {{item.name}}</Radio>
|
|
|
</RadioGroup>
|
|
|
</div>
|
|
|
- <div class="question-condition-item question-num-item ">
|
|
|
+ <div class="question-condition-item question-num-item " v-if="schoolBaseInfo.length > 0">
|
|
|
<span class="condition-label">适用科目:</span>
|
|
|
<Select style="width:90px" size="small" v-model="autoCreateFilter.subjectId">
|
|
|
- <Option v-for="(item,index) in $store.state.schoolBaseInfo.schoolBaseInfo.period[Number(autoCreateFilter.periodCode) - 1].subjects" :value="item.id" :key="index">{{item.name }}</Option>
|
|
|
+ <Option v-for="(item,index) in schoolBaseInfo[Number(autoCreateFilter.periodCode) - 1].subjects" :value="item.id" :key="index">{{item.name }}</Option>
|
|
|
</Select>
|
|
|
</div>
|
|
|
- <div class="question-condition-item question-num-item" >
|
|
|
+ <div class="question-condition-item question-num-item" v-if="schoolBaseInfo.length > 0">
|
|
|
<span class="condition-label">适用年級:</span>
|
|
|
<Select multiple style="min-width:90px;max-width:200px" size="small" v-model="autoCreateFilter.gradesId">
|
|
|
- <Option v-for="(item,index) in $store.state.schoolBaseInfo.schoolBaseInfo.period[Number(autoCreateFilter.periodCode)].grades" :value="item.id" :key="index">{{item.name }}</Option>
|
|
|
+ <Option v-for="(item,index) in schoolBaseInfo[Number(autoCreateFilter.periodCode)].grades" :value="item.id" :key="index">{{item.name }}</Option>
|
|
|
</Select>
|
|
|
</div>
|
|
|
<div class="question-condition-item question-num-item" v-for="(items,indexs) in queSchool" :key="indexs">
|
|
|
<span class="condition-label">{{items.name}}:</span>
|
|
|
<span class="question-difficulty-label">难度</span>
|
|
|
- <Select v-model="items.level" style="width:90px" size="small" @on-change="getData">
|
|
|
+ <Select v-model="items.level" style="width:90px" size="small">
|
|
|
<Option v-for="(item,index) in difficultyList" :value="item.value" :key="index">{{ item.label }}</Option>
|
|
|
</Select>
|
|
|
<span class="input-tag-text total-text-tag">共</span>
|
|
@@ -103,9 +103,7 @@
|
|
|
isSchool: false,
|
|
|
checkedPoints: [],
|
|
|
isLoading: false,
|
|
|
- comfirmPreviewStatus: false,
|
|
|
activePointTab: 1,
|
|
|
- openKeys: [],
|
|
|
pointsInBlockList: [],
|
|
|
pointBlockList: [],
|
|
|
pointTab: 'pioints',
|
|
@@ -244,17 +242,23 @@
|
|
|
label: '较难',
|
|
|
value: 5
|
|
|
}
|
|
|
- ]
|
|
|
+ ],
|
|
|
+ schoolBaseInfo:[]
|
|
|
}
|
|
|
},
|
|
|
- created() {
|
|
|
- },
|
|
|
methods: {
|
|
|
- getData(data) {
|
|
|
- //console.log(data),
|
|
|
- // console.log(this.queType)
|
|
|
- //console.log(this.single)
|
|
|
- //console.log(this.$store.state.schoolBaseInfo.schoolBaseInfo.period)
|
|
|
+ async getData() {
|
|
|
+ await this.$store.dispatch('schoolBaseInfo/getSchoolBaseData').then(
|
|
|
+ (res) => {
|
|
|
+ this.schoolBaseInfo = this.$store.state.schoolBaseInfo.schoolBaseInfo.period
|
|
|
+ if (res.code == 2) {
|
|
|
+ alert('数据为空!')
|
|
|
+ }
|
|
|
+ },
|
|
|
+ (err) => {
|
|
|
+ this.$Message.error('API error!')
|
|
|
+ }
|
|
|
+ )
|
|
|
},
|
|
|
cancel() {
|
|
|
|
|
@@ -414,7 +418,7 @@
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
|
- console.log(this.subjectCode)
|
|
|
+ this.getData()
|
|
|
}
|
|
|
}
|
|
|
</script>
|