完善学院对比功能
This commit is contained in:
parent
39fb1184f6
commit
29f5da8c52
|
@ -202,7 +202,8 @@ export default {
|
||||||
getBatch: '/cet/getBatch',
|
getBatch: '/cet/getBatch',
|
||||||
getEntrydate: '/cet/getEntrydate',
|
getEntrydate: '/cet/getEntrydate',
|
||||||
getCollege: '/cet/getCollege',
|
getCollege: '/cet/getCollege',
|
||||||
getRate: '/cet/getRateByCollege',
|
getCollegeRate: '/cet/getRateByCollege',
|
||||||
|
getAllRate: '/cet/getAllRate',
|
||||||
getCollegeMajor: '/cet/getCollegeMajor',
|
getCollegeMajor: '/cet/getCollegeMajor',
|
||||||
getRateByMajor: '/cet/getRateByMajor',
|
getRateByMajor: '/cet/getRateByMajor',
|
||||||
|
|
||||||
|
@ -334,15 +335,7 @@ export default {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// deleteData() {
|
|
||||||
// console.log("delete")
|
|
||||||
// //清空所有选项
|
|
||||||
// this.college = [];
|
|
||||||
// this.entrydate = [];
|
|
||||||
// this.oneentrydate = null;
|
|
||||||
// this.checkedOptions = [];
|
|
||||||
// this.allCollege = [];
|
|
||||||
// },
|
|
||||||
|
|
||||||
//tab3图标
|
//tab3图标
|
||||||
drawChart(data,tab){
|
drawChart(data,tab){
|
||||||
|
@ -398,10 +391,27 @@ export default {
|
||||||
console.log(seriesData,'dasaaseriresdata')
|
console.log(seriesData,'dasaaseriresdata')
|
||||||
// debugger
|
// debugger
|
||||||
let myChart = null;
|
let myChart = null;
|
||||||
|
console.log(tab,"tab")
|
||||||
if (tab == 'tab2') {
|
if (tab == 'tab2') {
|
||||||
|
myChart=document.getElementById("map2");
|
||||||
|
if(myChart){
|
||||||
|
myChart=echarts.getInstanceByDom(myChart)
|
||||||
|
if(myChart){
|
||||||
|
myChart.dispose();
|
||||||
|
}
|
||||||
|
}
|
||||||
myChart = echarts.init(document.getElementById("map2"));
|
myChart = echarts.init(document.getElementById("map2"));
|
||||||
|
|
||||||
} else if (tab == 'tab3') {
|
} else if (tab == 'tab3') {
|
||||||
|
myChart=document.getElementById("map3");
|
||||||
|
if(myChart){
|
||||||
|
myChart=echarts.getInstanceByDom(myChart)
|
||||||
|
if(myChart){
|
||||||
|
myChart.dispose();
|
||||||
|
}
|
||||||
|
}
|
||||||
myChart = echarts.init(document.getElementById("map3"));
|
myChart = echarts.init(document.getElementById("map3"));
|
||||||
|
|
||||||
}
|
}
|
||||||
// 指定图表的配置项和数据
|
// 指定图表的配置项和数据
|
||||||
let option = {
|
let option = {
|
||||||
|
@ -462,12 +472,11 @@ export default {
|
||||||
// 使用刚指定的配置项和数据显示图表。
|
// 使用刚指定的配置项和数据显示图表。
|
||||||
console.log(option, "option")
|
console.log(option, "option")
|
||||||
console.log(myChart, "myChart")
|
console.log(myChart, "myChart")
|
||||||
myChart.setOption(option);
|
setTimeout(() => {
|
||||||
|
myChart.setOption(option);
|
||||||
|
}, 1)
|
||||||
},
|
},
|
||||||
//tab2图表
|
|
||||||
tab2drawChart(data){
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
dataChart(data, tab) {
|
dataChart(data, tab) {
|
||||||
let seriesData = [];
|
let seriesData = [];
|
||||||
|
@ -700,8 +709,9 @@ export default {
|
||||||
entrydate: entrydate,
|
entrydate: entrydate,
|
||||||
level: 'cet4'
|
level: 'cet4'
|
||||||
}
|
}
|
||||||
|
let url = query == 'tab1' ? this.Url.getAllRate : this.Url.getCollegeRate;
|
||||||
console.log(params.college, "college")
|
console.log(params.college, "college")
|
||||||
result = await defHttp.post({ url: this.Url.getRate, params });
|
result = await defHttp.post({ url: url, params });
|
||||||
//使数据按照passRate从大到小排序
|
//使数据按照passRate从大到小排序
|
||||||
// result.data.sort((a, b) => {
|
// result.data.sort((a, b) => {
|
||||||
// return b.passRate - a.passRate;
|
// return b.passRate - a.passRate;
|
||||||
|
@ -713,7 +723,7 @@ export default {
|
||||||
if (query == 'tab1') {
|
if (query == 'tab1') {
|
||||||
this.dataChart(result.data, query);
|
this.dataChart(result.data, query);
|
||||||
} else if (query == 'tab2') {
|
} else if (query == 'tab2') {
|
||||||
this.drawChart(result.data);
|
this.drawChart(result.data,query);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue