|
|
@ -76,30 +76,44 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="filter"> |
|
|
|
<div class="filter"> |
|
|
|
<dl v-if="curTab == 1" |
|
|
|
<template v-if="curTab == 1"> |
|
|
|
style="align-items: center;"> |
|
|
|
<dl> |
|
|
|
<dt>学科专业</dt> |
|
|
|
<dt>学科类别</dt> |
|
|
|
<div class="vals"> |
|
|
|
<div class="vals"> |
|
|
|
<dd :class="{active: categoryId === ''}" |
|
|
|
<dd :class="{active: categoryId === ''}" |
|
|
|
@click="catetoryClick('')">全部</dd> |
|
|
|
@click="categoryClick({id: ''}, 1)">全部</dd> |
|
|
|
<dd :class="{active: categoryId === 1}" |
|
|
|
<dd :class="{active: categoryId === 1}" |
|
|
|
style="margin-right: 20px" |
|
|
|
style="margin-right: 20px" |
|
|
|
@click="catetoryClick(1)">不限</dd> |
|
|
|
@click="categoryClick({id: 1}, 1)">不限</dd> |
|
|
|
<div v-for="(item, i) in category" |
|
|
|
<dd v-for="(item, i) in category" |
|
|
|
:key="i" |
|
|
|
:key="i" |
|
|
|
:class="['category-item', {active: item.disciplineId == categoryId}]"> |
|
|
|
:class="{active: categoryId === item.id}" |
|
|
|
<span class="name" |
|
|
|
@click="categoryClick(item, 1)">{{ item.name }}</dd> |
|
|
|
@click="nameClick(item, i)">{{ item.val.length ? item.name : item.categoryName }}</span> |
|
|
|
|
|
|
|
<el-cascader :class="{active: item.disciplineId == categoryId}" |
|
|
|
|
|
|
|
:ref="'category' + i" |
|
|
|
|
|
|
|
v-model="item.val" |
|
|
|
|
|
|
|
:options="item.list" |
|
|
|
|
|
|
|
:props="{ checkStrictly: true }" |
|
|
|
|
|
|
|
placeholder="" |
|
|
|
|
|
|
|
@change="id => categoryChange(id, item, i)"></el-cascader> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
</dl> |
|
|
|
|
|
|
|
<dl v-if="categoryId && categoryId !== 1"> |
|
|
|
|
|
|
|
<dt>专业类</dt> |
|
|
|
|
|
|
|
<div class="vals"> |
|
|
|
|
|
|
|
<dd :class="{active: professionalCategoryId === ''}" |
|
|
|
|
|
|
|
@click="categoryClick({id: ''}, 2)">全部</dd> |
|
|
|
|
|
|
|
<dd v-for="(item, i) in professionalClasses" |
|
|
|
|
|
|
|
:key="i" |
|
|
|
|
|
|
|
:class="{active: professionalCategoryId === item.id}" |
|
|
|
|
|
|
|
@click="categoryClick(item, 2)">{{ item.name }}</dd> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</dl> |
|
|
|
|
|
|
|
<dl v-if="professionalCategoryId && professionalCategoryId !== 1"> |
|
|
|
|
|
|
|
<dt>专业</dt> |
|
|
|
|
|
|
|
<div class="vals"> |
|
|
|
|
|
|
|
<dd :class="{active: professionalId === ''}" |
|
|
|
|
|
|
|
@click="categoryClick({id: ''}, 3)">全部</dd> |
|
|
|
|
|
|
|
<dd v-for="(item, i) in professionals" |
|
|
|
|
|
|
|
:key="i" |
|
|
|
|
|
|
|
:class="{active: professionalId === item.id}" |
|
|
|
|
|
|
|
@click="categoryClick(item, 3)">{{ item.name }}</dd> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</dl> |
|
|
|
</dl> |
|
|
|
|
|
|
|
</template> |
|
|
|
<dl v-if="curTab == 3"> |
|
|
|
<dl v-if="curTab == 3"> |
|
|
|
<dt>产品标签</dt> |
|
|
|
<dt>产品标签</dt> |
|
|
|
<div class="vals"> |
|
|
|
<div class="vals"> |
|
|
@ -282,13 +296,9 @@ export default { |
|
|
|
professionalCategoryId: '', |
|
|
|
professionalCategoryId: '', |
|
|
|
professionalId: '', |
|
|
|
professionalId: '', |
|
|
|
category: [], |
|
|
|
category: [], |
|
|
|
|
|
|
|
professionalClasses: [], |
|
|
|
|
|
|
|
professionals: [], |
|
|
|
labels: [], |
|
|
|
labels: [], |
|
|
|
subjectList: [], //专业学科 |
|
|
|
|
|
|
|
professionalClassList: [], //专业类 |
|
|
|
|
|
|
|
professionalList: [], //专业 |
|
|
|
|
|
|
|
categoryName: '', |
|
|
|
|
|
|
|
professionalCategoryName: '', |
|
|
|
|
|
|
|
professionalName: '', |
|
|
|
|
|
|
|
types: [], |
|
|
|
types: [], |
|
|
|
classifications: [], |
|
|
|
classifications: [], |
|
|
|
status: [ |
|
|
|
status: [ |
|
|
@ -411,6 +421,7 @@ export default { |
|
|
|
this.$post(this.api.schemeList, { |
|
|
|
this.$post(this.api.schemeList, { |
|
|
|
pageNum: 1, |
|
|
|
pageNum: 1, |
|
|
|
pageSize: 10000, |
|
|
|
pageSize: 10000, |
|
|
|
|
|
|
|
classificationId: this.form.productClassification, |
|
|
|
querySource: 3, //查询来源(3.中台 4.合伙人平台) |
|
|
|
querySource: 3, //查询来源(3.中台 4.合伙人平台) |
|
|
|
}).then(({ data }) => { |
|
|
|
}).then(({ data }) => { |
|
|
|
this.schemes = data.records |
|
|
|
this.schemes = data.records |
|
|
@ -420,109 +431,41 @@ export default { |
|
|
|
async getSubject () { |
|
|
|
async getSubject () { |
|
|
|
// 学科类别 |
|
|
|
// 学科类别 |
|
|
|
this.$get(this.api.subjectCategoryCited).then(({ list }) => { |
|
|
|
this.$get(this.api.subjectCategoryCited).then(({ list }) => { |
|
|
|
const result = [] |
|
|
|
|
|
|
|
const promises = [] |
|
|
|
|
|
|
|
list = list.filter(e => e.disciplineId != 1) |
|
|
|
list = list.filter(e => e.disciplineId != 1) |
|
|
|
list.map((e, i) => { |
|
|
|
list.map((e, i) => { |
|
|
|
|
|
|
|
e.id = e.disciplineId |
|
|
|
|
|
|
|
e.name = e.disciplineName |
|
|
|
// 专业类 |
|
|
|
// 专业类 |
|
|
|
e.professionalClasses.map(e => { |
|
|
|
e.professionalClasses.map(e => { |
|
|
|
e.value = e.professionalClassId |
|
|
|
e.id = e.professionalClassId |
|
|
|
e.label = e.professionalClassName |
|
|
|
e.name = e.professionalClassName |
|
|
|
|
|
|
|
|
|
|
|
// 专业 |
|
|
|
// 专业 |
|
|
|
e.professionals.map(e => { |
|
|
|
e.professionals.map(e => { |
|
|
|
e.value = e.professionalId |
|
|
|
e.id = e.professionalId |
|
|
|
e.label = e.professionalName |
|
|
|
e.name = e.professionalName |
|
|
|
}) |
|
|
|
}) |
|
|
|
e.children = e.professionals |
|
|
|
e.children = e.professionals |
|
|
|
}) |
|
|
|
}) |
|
|
|
result.push({ |
|
|
|
e.children = e.professionalClasses |
|
|
|
val: [], |
|
|
|
|
|
|
|
disciplineId: e.disciplineId, |
|
|
|
|
|
|
|
name: e.disciplineName, |
|
|
|
|
|
|
|
categoryName: e.disciplineName, |
|
|
|
|
|
|
|
list: e.professionalClasses |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Promise.all(promises).then(_ => { |
|
|
|
|
|
|
|
console.log("🚀 ~ file: index.vue:378 ~ this.$get ~ result:", result) |
|
|
|
|
|
|
|
this.category = result |
|
|
|
|
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
this.category = list |
|
|
|
}).catch(err => { }) |
|
|
|
}).catch(err => { }) |
|
|
|
}, |
|
|
|
}, |
|
|
|
nameClick (item, i) { |
|
|
|
// 学科点击回调 |
|
|
|
this.categoryId = item.disciplineId |
|
|
|
categoryClick (item, i) { |
|
|
|
|
|
|
|
const { id, children } = item |
|
|
|
|
|
|
|
this[i === 1 ? 'categoryId' : i === 2 ? 'professionalCategoryId' : 'professionalId'] = id |
|
|
|
|
|
|
|
// 学科类别 |
|
|
|
|
|
|
|
if (i === 1) { |
|
|
|
this.professionalCategoryId = '' |
|
|
|
this.professionalCategoryId = '' |
|
|
|
this.professionalId = '' |
|
|
|
this.professionalId = '' |
|
|
|
this.$refs['category' + i][0].toggleDropDownVisible() |
|
|
|
if (children) this.professionalClasses = children |
|
|
|
this.clearCategory() |
|
|
|
this.professionals = [] |
|
|
|
this.initData() |
|
|
|
} else if (i === 2) { // 专业类 |
|
|
|
}, |
|
|
|
this.professionalId = '' |
|
|
|
// 清除所有学科所选 |
|
|
|
if (children) this.professionals = children |
|
|
|
clearCategory () { |
|
|
|
|
|
|
|
const list = this.category |
|
|
|
|
|
|
|
list.map(e => { |
|
|
|
|
|
|
|
e.val = [] |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
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.professionalCategoryId = val[0] || '' |
|
|
|
|
|
|
|
this.professionalId = val[1] || '' |
|
|
|
|
|
|
|
this.initData() |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
// 返回学科name |
|
|
|
|
|
|
|
handleCategoryName () { |
|
|
|
|
|
|
|
if (this.subjectList.length) { |
|
|
|
|
|
|
|
const id = this.categoryId |
|
|
|
|
|
|
|
const list = this.subjectList |
|
|
|
|
|
|
|
if (list.length) { |
|
|
|
|
|
|
|
if (id === '' || id === 1) { |
|
|
|
|
|
|
|
this.categoryName = list[0].disciplineName |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
const item = list.find(e => e.disciplineId == id) |
|
|
|
|
|
|
|
this.categoryName = item ? item.disciplineName : '' |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (this.professionalClassList.length) { |
|
|
|
|
|
|
|
const id = this.professionalCategoryId |
|
|
|
|
|
|
|
const list = this.professionalClassList |
|
|
|
|
|
|
|
if (list.length) { |
|
|
|
|
|
|
|
if (id === '' || id === 1) { |
|
|
|
|
|
|
|
this.professionalCategoryName = list[0].professionalClassName |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
const item = list.find(e => e.professionalClassId == id) |
|
|
|
|
|
|
|
this.professionalCategoryName = item ? item.professionalClassName : '' |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (this.professionalList.length) { |
|
|
|
|
|
|
|
const id = this.professionalId |
|
|
|
|
|
|
|
const list = this.professionalList |
|
|
|
|
|
|
|
if (list.length) { |
|
|
|
|
|
|
|
if (id === '' || id === 1) { |
|
|
|
|
|
|
|
this.professionalName = list[0].professionalName |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
const item = list.find(e => e.professionalId == id) |
|
|
|
|
|
|
|
this.professionalName = item ? item.professionalName : '' |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
// 学科点击回调 |
|
|
|
|
|
|
|
catetoryClick (id) { |
|
|
|
|
|
|
|
this.categoryId = id |
|
|
|
|
|
|
|
this.professionalCategoryId = id |
|
|
|
|
|
|
|
this.professionalId = id |
|
|
|
|
|
|
|
this.clearCategory() |
|
|
|
|
|
|
|
this.initData() |
|
|
|
this.initData() |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 获取产品类型 |
|
|
|
// 获取产品类型 |
|
|
@ -549,6 +492,10 @@ export default { |
|
|
|
// 类型切换 |
|
|
|
// 类型切换 |
|
|
|
filterChange (id, prop) { |
|
|
|
filterChange (id, prop) { |
|
|
|
this.form[prop] = id |
|
|
|
this.form[prop] = id |
|
|
|
|
|
|
|
if (prop === 'productClassification') { |
|
|
|
|
|
|
|
this.form.websiteMallId = '' |
|
|
|
|
|
|
|
this.getSchemes() |
|
|
|
|
|
|
|
} |
|
|
|
this.initData() |
|
|
|
this.initData() |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 发布时间排序 |
|
|
|
// 发布时间排序 |
|
|
@ -570,6 +517,7 @@ export default { |
|
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped> |
|
|
|
<style lang="scss" scoped> |
|
|
|
.wrap { |
|
|
|
.wrap { |
|
|
|
|
|
|
|
min-width: 1150px; |
|
|
|
.carousel { |
|
|
|
.carousel { |
|
|
|
img { |
|
|
|
img { |
|
|
|
height: 100%; |
|
|
|
height: 100%; |
|
|
@ -950,112 +898,120 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
@media (max-width: 1200px) { |
|
|
|
@media (max-width: 1150px) { |
|
|
|
.wrap { |
|
|
|
.wrap { |
|
|
|
.carousel { |
|
|
|
min-width: 980px; |
|
|
|
.text-wrap { |
|
|
|
|
|
|
|
left: 40px; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
.qrcode-wrap { |
|
|
|
|
|
|
|
margin-right: 20px; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
.inner { |
|
|
|
.inner { |
|
|
|
width: 90%; |
|
|
|
width: 98%; |
|
|
|
} |
|
|
|
} |
|
|
|
.type-wrap { |
|
|
|
} |
|
|
|
flex-direction: column; |
|
|
|
} |
|
|
|
} |
|
|
|
// @media (max-width: 1200px) { |
|
|
|
.search { |
|
|
|
// .wrap { |
|
|
|
margin-top: 20px; |
|
|
|
// .carousel { |
|
|
|
} |
|
|
|
// .text-wrap { |
|
|
|
.filter { |
|
|
|
// left: 40px; |
|
|
|
.vals { |
|
|
|
// } |
|
|
|
width: calc(100% - 100px); |
|
|
|
// .qrcode-wrap { |
|
|
|
} |
|
|
|
// margin-right: 20px; |
|
|
|
} |
|
|
|
// } |
|
|
|
} |
|
|
|
// } |
|
|
|
} |
|
|
|
// .inner { |
|
|
|
@media (max-width: 1000px) { |
|
|
|
// width: 90%; |
|
|
|
.wrap { |
|
|
|
// } |
|
|
|
.carousel { |
|
|
|
// .type-wrap { |
|
|
|
.text-wrap { |
|
|
|
// flex-direction: column; |
|
|
|
top: 47%; |
|
|
|
// } |
|
|
|
flex-direction: column; |
|
|
|
// .search { |
|
|
|
align-items: flex-start; |
|
|
|
// margin-top: 20px; |
|
|
|
} |
|
|
|
// } |
|
|
|
.qrcode-wrap { |
|
|
|
// .filter { |
|
|
|
margin: 0 0 20px 0; |
|
|
|
// .vals { |
|
|
|
} |
|
|
|
// width: calc(100% - 100px); |
|
|
|
h6 { |
|
|
|
// } |
|
|
|
font-size: 1.8rem; |
|
|
|
// } |
|
|
|
} |
|
|
|
// } |
|
|
|
.sub { |
|
|
|
// } |
|
|
|
font-size: 1.3rem; |
|
|
|
// @media (max-width: 1000px) { |
|
|
|
} |
|
|
|
// .wrap { |
|
|
|
} |
|
|
|
// .carousel { |
|
|
|
.intro { |
|
|
|
// .text-wrap { |
|
|
|
flex-direction: column; |
|
|
|
// top: 47%; |
|
|
|
justify-content: center; |
|
|
|
// flex-direction: column; |
|
|
|
align-items: flex-start; |
|
|
|
// align-items: flex-start; |
|
|
|
li { |
|
|
|
// } |
|
|
|
flex: 1; |
|
|
|
// .qrcode-wrap { |
|
|
|
margin-bottom: 20px; |
|
|
|
// margin: 0 0 20px 0; |
|
|
|
} |
|
|
|
// } |
|
|
|
} |
|
|
|
// h6 { |
|
|
|
.type-wrap { |
|
|
|
// font-size: 1.8rem; |
|
|
|
.tab-wrap { |
|
|
|
// } |
|
|
|
flex-direction: column; |
|
|
|
// .sub { |
|
|
|
align-items: flex-start; |
|
|
|
// font-size: 1.3rem; |
|
|
|
} |
|
|
|
// } |
|
|
|
.tab { |
|
|
|
// } |
|
|
|
margin-top: 10px; |
|
|
|
// .intro { |
|
|
|
} |
|
|
|
// flex-direction: column; |
|
|
|
} |
|
|
|
// justify-content: center; |
|
|
|
.courses { |
|
|
|
// align-items: flex-start; |
|
|
|
li { |
|
|
|
// li { |
|
|
|
width: calc((100% - 22px) / 2); |
|
|
|
// flex: 1; |
|
|
|
&:nth-child(2n) { |
|
|
|
// margin-bottom: 20px; |
|
|
|
margin-right: 0; |
|
|
|
// } |
|
|
|
} |
|
|
|
// } |
|
|
|
} |
|
|
|
// .type-wrap { |
|
|
|
} |
|
|
|
// .tab-wrap { |
|
|
|
} |
|
|
|
// flex-direction: column; |
|
|
|
} |
|
|
|
// align-items: flex-start; |
|
|
|
@media (max-width: 640px) { |
|
|
|
// } |
|
|
|
.wrap { |
|
|
|
// .tab { |
|
|
|
.carousel { |
|
|
|
// margin-top: 10px; |
|
|
|
.text-wrap { |
|
|
|
// } |
|
|
|
top: 47%; |
|
|
|
// } |
|
|
|
} |
|
|
|
// .courses { |
|
|
|
.qrcode { |
|
|
|
// li { |
|
|
|
width: 80px; |
|
|
|
// width: calc((100% - 22px) / 2); |
|
|
|
height: 80px; |
|
|
|
// &:nth-child(2n) { |
|
|
|
} |
|
|
|
// margin-right: 0; |
|
|
|
h6 { |
|
|
|
// } |
|
|
|
font-size: 1.4rem; |
|
|
|
// } |
|
|
|
} |
|
|
|
// } |
|
|
|
.sub { |
|
|
|
// } |
|
|
|
font-size: 1rem; |
|
|
|
// } |
|
|
|
} |
|
|
|
// @media (max-width: 640px) { |
|
|
|
} |
|
|
|
// .wrap { |
|
|
|
.type-wrap { |
|
|
|
// .carousel { |
|
|
|
.tab { |
|
|
|
// .text-wrap { |
|
|
|
flex-wrap: wrap; |
|
|
|
// top: 47%; |
|
|
|
li { |
|
|
|
// } |
|
|
|
margin-bottom: 20px; |
|
|
|
// .qrcode { |
|
|
|
} |
|
|
|
// width: 80px; |
|
|
|
} |
|
|
|
// height: 80px; |
|
|
|
} |
|
|
|
// } |
|
|
|
.search { |
|
|
|
// h6 { |
|
|
|
margin-top: 0; |
|
|
|
// font-size: 1.4rem; |
|
|
|
} |
|
|
|
// } |
|
|
|
.courses { |
|
|
|
// .sub { |
|
|
|
li { |
|
|
|
// font-size: 1rem; |
|
|
|
width: 100%; |
|
|
|
// } |
|
|
|
margin-right: 0; |
|
|
|
// } |
|
|
|
} |
|
|
|
// .type-wrap { |
|
|
|
} |
|
|
|
// .tab { |
|
|
|
} |
|
|
|
// flex-wrap: wrap; |
|
|
|
} |
|
|
|
// li { |
|
|
|
|
|
|
|
// margin-bottom: 20px; |
|
|
|
|
|
|
|
// } |
|
|
|
|
|
|
|
// } |
|
|
|
|
|
|
|
// } |
|
|
|
|
|
|
|
// .search { |
|
|
|
|
|
|
|
// margin-top: 0; |
|
|
|
|
|
|
|
// } |
|
|
|
|
|
|
|
// .courses { |
|
|
|
|
|
|
|
// li { |
|
|
|
|
|
|
|
// width: 100%; |
|
|
|
|
|
|
|
// margin-right: 0; |
|
|
|
|
|
|
|
// } |
|
|
|
|
|
|
|
// } |
|
|
|
|
|
|
|
// } |
|
|
|
|
|
|
|
// } |
|
|
|
</style> |
|
|
|
</style> |