|
|
@ -57,17 +57,16 @@ |
|
|
|
@click="catetoryClick(1)">不限</dd> |
|
|
|
@click="catetoryClick(1)">不限</dd> |
|
|
|
<div v-for="(item, i) in category" |
|
|
|
<div v-for="(item, i) in category" |
|
|
|
:key="i" |
|
|
|
:key="i" |
|
|
|
class="category-item"> |
|
|
|
:class="['category-item', {active: item.disciplineId == categoryId}]"> |
|
|
|
<span v-if="!item.val.length" |
|
|
|
<span class="name" |
|
|
|
class="name" |
|
|
|
@click="nameClick(item, i)">{{ item.val.length ? item.name : item.categoryName }}</span> |
|
|
|
@click="nameClick(i)">{{ item.name }}</span> |
|
|
|
|
|
|
|
<el-cascader :class="{active: item.disciplineId == categoryId}" |
|
|
|
<el-cascader :class="{active: item.disciplineId == categoryId}" |
|
|
|
:ref="'category' + i" |
|
|
|
:ref="'category' + i" |
|
|
|
v-model="item.val" |
|
|
|
v-model="item.val" |
|
|
|
:options="item.list" |
|
|
|
:options="item.list" |
|
|
|
:props="{ checkStrictly: true }" |
|
|
|
:props="{ checkStrictly: true }" |
|
|
|
placeholder="" |
|
|
|
placeholder="" |
|
|
|
@change="id => categoryChange(id, item)"></el-cascader> |
|
|
|
@change="id => categoryChange(id, item, i)"></el-cascader> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</dl> |
|
|
|
</dl> |
|
|
@ -412,6 +411,7 @@ export default { |
|
|
|
val: [], |
|
|
|
val: [], |
|
|
|
disciplineId: e.disciplineId, |
|
|
|
disciplineId: e.disciplineId, |
|
|
|
name: e.disciplineName, |
|
|
|
name: e.disciplineName, |
|
|
|
|
|
|
|
categoryName: e.disciplineName, |
|
|
|
list |
|
|
|
list |
|
|
|
}) |
|
|
|
}) |
|
|
|
}).catch(err => { }) |
|
|
|
}).catch(err => { }) |
|
|
@ -425,10 +425,27 @@ export default { |
|
|
|
}) |
|
|
|
}) |
|
|
|
}).catch(err => { }) |
|
|
|
}).catch(err => { }) |
|
|
|
}, |
|
|
|
}, |
|
|
|
nameClick (i) { |
|
|
|
nameClick (item, i) { |
|
|
|
|
|
|
|
this.categoryId = item.disciplineId |
|
|
|
|
|
|
|
this.professionalCategoryId = '' |
|
|
|
|
|
|
|
this.professionalId = '' |
|
|
|
this.$refs['category' + i][0].toggleDropDownVisible() |
|
|
|
this.$refs['category' + i][0].toggleDropDownVisible() |
|
|
|
|
|
|
|
this.clearCategory() |
|
|
|
|
|
|
|
this.initData() |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
// 清除所有学科所选 |
|
|
|
|
|
|
|
clearCategory () { |
|
|
|
|
|
|
|
const list = this.category |
|
|
|
|
|
|
|
list.map(e => { |
|
|
|
|
|
|
|
e.val = [] |
|
|
|
|
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
categoryChange (val, item) { |
|
|
|
categoryChange (val, item, i) { |
|
|
|
|
|
|
|
const name = this.$refs['category' + i][0].getCheckedNodes()[0].pathLabels |
|
|
|
|
|
|
|
console.log("🚀 ~ file: index.vue:431 ~ categoryChange ~ val, item:", val, item, name) |
|
|
|
|
|
|
|
item.name = item.categoryName + '/' + name.join('/') |
|
|
|
|
|
|
|
this.clearCategory() |
|
|
|
|
|
|
|
item.val = val |
|
|
|
this.categoryId = item.disciplineId |
|
|
|
this.categoryId = item.disciplineId |
|
|
|
this.professionalCategoryId = val[0] || '' |
|
|
|
this.professionalCategoryId = val[0] || '' |
|
|
|
this.professionalId = val[1] || '' |
|
|
|
this.professionalId = val[1] || '' |
|
|
@ -501,6 +518,7 @@ export default { |
|
|
|
this.categoryId = id |
|
|
|
this.categoryId = id |
|
|
|
this.professionalCategoryId = id |
|
|
|
this.professionalCategoryId = id |
|
|
|
this.professionalId = id |
|
|
|
this.professionalId = id |
|
|
|
|
|
|
|
this.clearCategory() |
|
|
|
this.initData() |
|
|
|
this.initData() |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 获取产品类型 |
|
|
|
// 获取产品类型 |
|
|
@ -570,9 +588,10 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
.texts { |
|
|
|
.texts { |
|
|
|
position: absolute; |
|
|
|
position: absolute; |
|
|
|
top: 200px; |
|
|
|
top: 50%; |
|
|
|
left: 188px; |
|
|
|
left: 188px; |
|
|
|
color: #fff; |
|
|
|
color: #fff; |
|
|
|
|
|
|
|
transform: translateY(-50%); |
|
|
|
} |
|
|
|
} |
|
|
|
h6 { |
|
|
|
h6 { |
|
|
|
margin-bottom: 25px; |
|
|
|
margin-bottom: 25px; |
|
|
@ -686,6 +705,11 @@ export default { |
|
|
|
width: 30px; |
|
|
|
width: 30px; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
&.active { |
|
|
|
|
|
|
|
.name { |
|
|
|
|
|
|
|
color: #9278ff; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
/deep/.el-cascader { |
|
|
|
/deep/.el-cascader { |
|
|
|
width: auto; |
|
|
|
width: auto; |
|
|
|