|
@@ -174,10 +174,11 @@ export default {
|
|
|
tabActive: 0,
|
|
|
defaultProps: {
|
|
|
children: 'children',
|
|
|
- label: 'label'
|
|
|
+ label: 'name'
|
|
|
},
|
|
|
type: '本科',
|
|
|
- majorList: [],
|
|
|
+ masterMajorList: [],
|
|
|
+ specialtyMajorList: [],
|
|
|
majorDetail: {}, // 概况
|
|
|
prospects: {}, // 前景
|
|
|
contentPropsByBen: ['introduction', 'eduObjective', 'eduRequirement', 'subjectRequirement', 'loreAndAbility', 'studyDirection', 'mainCourse', 'famousScholar'], // 本科概况列
|
|
@@ -188,6 +189,10 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
|
+ majorList() {
|
|
|
+ if(this.type == '本科') return this.masterMajorList
|
|
|
+ if(this.type == '专科') return this.specialtyMajorList
|
|
|
+ },
|
|
|
// 平均薪资趋势
|
|
|
reverseSalary() {
|
|
|
if (!this.prospects.averageSalary) return null
|
|
@@ -323,10 +328,12 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
type: {
|
|
|
- immediate: true,
|
|
|
- handler(newVal) {
|
|
|
- // 2 院校 1 前景 0 概览
|
|
|
- this.getAllMajor()
|
|
|
+ immediate:true,
|
|
|
+ handler(val){
|
|
|
+ console.log(val)
|
|
|
+ if((val == '本科' && this.masterMajorList.length == 0) || (val == '专科' && this.specialtyMajorList.length == 0)){
|
|
|
+ this.getAllMajor()
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
'$route': {
|
|
@@ -347,7 +354,12 @@ export default {
|
|
|
allMajor({
|
|
|
type: this.type
|
|
|
}).then(res => {
|
|
|
- this.majorList = res.data
|
|
|
+ if(this.type == '本科'){
|
|
|
+ this.masterMajorList = res.data
|
|
|
+ }
|
|
|
+ if(this.type == '专科'){
|
|
|
+ this.specialtyMajorList = res.data
|
|
|
+ }
|
|
|
})
|
|
|
},
|
|
|
getCareerProspects() {
|