Commit ab1f8da6 by 陈超

A

parent e19c93b2
......@@ -217,6 +217,12 @@
},
selectedCondition: function() {
return this.condition.filter( r => { return r.id != '' && r.select })
},
conditionId: function() {
let f = this.condition.filter( r => { return r.id != '' && r.select })
if(this.tab == 0) {
return f.length > 0 ? f[0].id : ''
}
}
},
methods: {
......@@ -236,21 +242,21 @@
this.myTab = tab
},
onCondition: function(condition) {
if(condition.id == '') {
this.condition.forEach( r => { r.select = false })
this.condition.forEach( r => { r.select = false })
condition.select = true
this.$refs.item.toggle()
if(this.tab == 0) {
this.loadZhenti()
} else {
this.condition.forEach( r => {
r.select = r.id == '' ? false : r.select
})
}
condition.select = true
},
//加载真题
loadZhenti: function() {
let that = this
$.ajax({
type: "GET",
url: "{:U('exams/Index/paper')}" + "&api=1",
url: "{:U('exams/Index/paper')}" + "&api=1&c=" + that.conditionId,
dataType: "json",
success: function(res) {
if(res.status == 1) {
......@@ -277,7 +283,9 @@
}
}
})
}
},
//加载试题下载
}
})
</script>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment