mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-11 11:56:44 +08:00
案例
This commit is contained in:
@@ -213,7 +213,10 @@ const queryViewRecord = (data) => ajaxs.post(`/statApi/xboe/m/stat/userdynamic/l
|
|||||||
const queryPopularityOfMajor = (params) => ajax.get(`/xboe/m/boe/cases/queryPopularityOfMajor?pageSize=${params.pageSize}&rankMonth=${params.rankMonth}&majorId=${params.majorId}`)
|
const queryPopularityOfMajor = (params) => ajax.get(`/xboe/m/boe/cases/queryPopularityOfMajor?pageSize=${params.pageSize}&rankMonth=${params.rankMonth}&majorId=${params.majorId}`)
|
||||||
//浏览记录新
|
//浏览记录新
|
||||||
const browsingHistory = (params) => ajax.get(`/xboe/m/boe/cases/browsingHistory?pageIndex=${params.pageIndex}&pageSize=5`)
|
const browsingHistory = (params) => ajax.get(`/xboe/m/boe/cases/browsingHistory?pageIndex=${params.pageIndex}&pageSize=5`)
|
||||||
|
//获取所有的专业月份
|
||||||
|
const queryAllTimePopularityOfMajor = () => ajax.get('/xboe/m/boe/cases/queryAllTimePopularityOfMajor')
|
||||||
export default {
|
export default {
|
||||||
|
queryAllTimePopularityOfMajor,
|
||||||
getQueryRecommendRank,
|
getQueryRecommendRank,
|
||||||
queryPopularityOfMajor,
|
queryPopularityOfMajor,
|
||||||
browsingHistory,
|
browsingHistory,
|
||||||
|
|||||||
@@ -185,7 +185,7 @@ import portalHeader from '@/components/PortalHeader.vue'
|
|||||||
padding: 30px;
|
padding: 30px;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
width: 30%;
|
width: 30%;
|
||||||
min-height: 500px;
|
min-height: 716px;
|
||||||
margin-right: 30px;
|
margin-right: 30px;
|
||||||
.charts_text{
|
.charts_text{
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@@ -109,9 +109,13 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="xcontent2-minor" :style="{ display: zoomShow ? '' : 'none' }">
|
<div class="xcontent2-minor" :style="{ display: zoomShow ? '' : 'none' }">
|
||||||
<div>
|
<div id="fixd-box">
|
||||||
<div id="fixd-box">
|
<router-link class="the_charts" to="/case/charts">
|
||||||
<div class="portal-ranking ranking-bg">
|
<div class="text">排行榜</div>
|
||||||
|
<div class="icon">></div>
|
||||||
|
</router-link>
|
||||||
|
<div>
|
||||||
|
<div class="portal-ranking ranking-bg" style="padding: 20px 15px;max-height: 222px;">
|
||||||
<div style="display: flex;justify-content: space-between;">
|
<div style="display: flex;justify-content: space-between;">
|
||||||
<p class="ranking-title">好评榜</p>
|
<p class="ranking-title">好评榜</p>
|
||||||
<el-dropdown trigger="click" @command="positiveReview">
|
<el-dropdown trigger="click" @command="positiveReview">
|
||||||
@@ -126,7 +130,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<ul class="ranking-data">
|
<ul class="ranking-data">
|
||||||
<li v-for="(item, index) in Positive" :key="index" class="title-line-ellipsis"
|
<li v-for="(item, index) in Positive" :key="index" class="title-line-ellipsis"
|
||||||
style="cursor: pointer;margin-top:30px;line-height: 22px;" @click="jumpRouter(item)">
|
style="cursor: pointer;margin-top:15px;line-height: 22px;" @click="jumpRouter(item)">
|
||||||
<span class="portal-right-text blue-one" v-if="index == 0">
|
<span class="portal-right-text blue-one" v-if="index == 0">
|
||||||
<img :src="`${webBaseUrl}/images/listblue01.png`" alt="">
|
<img :src="`${webBaseUrl}/images/listblue01.png`" alt="">
|
||||||
</span>
|
</span>
|
||||||
@@ -146,7 +150,7 @@
|
|||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div style="margin-top:26px" class="portal-ranking ranking-bg1">
|
<div style="padding: 20px 15px;max-height: 222px;margin-top: 20px;" class="portal-ranking ranking-bg1">
|
||||||
<div style="display: flex;justify-content: space-between;">
|
<div style="display: flex;justify-content: space-between;">
|
||||||
<p class="ranking-title">人气榜</p>
|
<p class="ranking-title">人气榜</p>
|
||||||
<el-dropdown trigger="click" @command="popularityReview">
|
<el-dropdown trigger="click" @command="popularityReview">
|
||||||
@@ -161,7 +165,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<ul class="ranking-data">
|
<ul class="ranking-data">
|
||||||
<li v-for="(item, index) in Popularity" :key="index" class="title-line-ellipsis"
|
<li v-for="(item, index) in Popularity" :key="index" class="title-line-ellipsis"
|
||||||
style="cursor: pointer;margin-top:30px;line-height: 22px;" @click="jumpRouter(item)">
|
style="cursor: pointer;margin-top:15px;line-height: 22px;" @click="jumpRouter(item)">
|
||||||
<span class="portal-right-text orange-one" v-if="index == 0">
|
<span class="portal-right-text orange-one" v-if="index == 0">
|
||||||
<img :src="`${webBaseUrl}/images/list-01.png`" alt="">
|
<img :src="`${webBaseUrl}/images/list-01.png`" alt="">
|
||||||
</span>
|
</span>
|
||||||
@@ -181,11 +185,11 @@
|
|||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="recommendRank.length > 0" class="portal-ranking ranking-bg2" style="margin-top:26px">
|
<div v-if="recommendRank.length > 0" class="portal-ranking ranking-bg2" style="padding: 20px 15px;max-height: 222px;margin-top: 20px;">
|
||||||
<p class="ranking-title">推荐榜</p>
|
<p class="ranking-title">推荐榜</p>
|
||||||
<ul class="ranking-data">
|
<ul class="ranking-data">
|
||||||
<li v-for="(item, index) in recommendRank" :key="index" class="title-line-ellipsis"
|
<li v-for="(item, index) in recommendRank" :key="index" class="title-line-ellipsis"
|
||||||
style="cursor: pointer;margin-top:30px;line-height: 22px;">
|
style="cursor: pointer;margin-top:15px;line-height: 22px;">
|
||||||
<router-link :to="'/case/detail?id=' + item.caseId">
|
<router-link :to="'/case/detail?id=' + item.caseId">
|
||||||
<span class="portal-right-text blue-one" v-if="index == 0">
|
<span class="portal-right-text blue-one" v-if="index == 0">
|
||||||
<img :src="`${webBaseUrl}/images/listred01 .png`" alt="">
|
<img :src="`${webBaseUrl}/images/listred01 .png`" alt="">
|
||||||
@@ -547,9 +551,9 @@ export default {
|
|||||||
if (pdfTopBox.getBoundingClientRect().top < 1000) {
|
if (pdfTopBox.getBoundingClientRect().top < 1000) {
|
||||||
document.querySelector('#pdfTopBox').style.cssText = "position:static";
|
document.querySelector('#pdfTopBox').style.cssText = "position:static";
|
||||||
}
|
}
|
||||||
if (scrollTop > 800) {
|
if (scrollTop > 240) {
|
||||||
this.isTopBoxShow = true;
|
this.isTopBoxShow = true;
|
||||||
document.querySelector('#fixd-box').style.cssText = "position: fixed;top: -624px;width:" + outerWidth + "px";
|
document.querySelector('#fixd-box').style.cssText = "position: fixed;top: 10px;width:" + outerWidth + "px";
|
||||||
} else {
|
} else {
|
||||||
document.querySelector('#fixd-box').style.cssText = "position: static";
|
document.querySelector('#fixd-box').style.cssText = "position: static";
|
||||||
}
|
}
|
||||||
@@ -730,7 +734,32 @@ export default {
|
|||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.the_charts{
|
||||||
|
position: relative;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
font-size: 18px;
|
||||||
|
max-width: 400px;
|
||||||
|
min-width: 260px;
|
||||||
|
height: 47px;
|
||||||
|
background: #DDEDFF;
|
||||||
|
border-radius: 8px;
|
||||||
|
.text{
|
||||||
|
font-size: 18px;
|
||||||
|
color: #387DF7;
|
||||||
|
}
|
||||||
|
.icon{
|
||||||
|
position: absolute;
|
||||||
|
font-size: 18px;
|
||||||
|
color: #387DF7;
|
||||||
|
right: 25px;
|
||||||
|
top: 50%;
|
||||||
|
transform: translateY(-50%);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
.pdftext {
|
.pdftext {
|
||||||
|
|
||||||
// padding: 0 20px;
|
// padding: 0 20px;
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
<div style="margin-right: 12px;">
|
<div style="margin-right: 12px;">
|
||||||
<el-select v-model="majorValue" @change="majorChange" placeholder="请选择专业">
|
<el-select v-model="majorValue" @change="majorChange" placeholder="请选择专业">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in speciData"
|
v-for="item in speciDataNew"
|
||||||
:key="item.name"
|
:key="item.name"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item.code">
|
:value="item.code">
|
||||||
@@ -44,7 +44,7 @@
|
|||||||
<div class="case-tittext">
|
<div class="case-tittext">
|
||||||
<span class="title-line-ellipsis" v-html="item.title"></span>
|
<span class="title-line-ellipsis" v-html="item.title"></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="case-activeText" @click.stop="toExcellent(item)">
|
<div class="case-activeText" @click.stop="()=>{}">
|
||||||
<!-- <span v-if="item.breCommend" class="comWords"
|
<!-- <span v-if="item.breCommend" class="comWords"
|
||||||
style="background-color:rgba(232, 139, 72);">荐</span>
|
style="background-color:rgba(232, 139, 72);">荐</span>
|
||||||
<span v-if="item.excellent" class="comWords" style="background-color:red;">最佳</span> -->
|
<span v-if="item.excellent" class="comWords" style="background-color:red;">最佳</span> -->
|
||||||
@@ -146,14 +146,7 @@ import apiPlace from "@/api/phase2/place.js"
|
|||||||
return {
|
return {
|
||||||
majorId: '',
|
majorId: '',
|
||||||
rankMonth: '',
|
rankMonth: '',
|
||||||
optionsMonth:
|
optionsMonth: [],
|
||||||
[...Array(12)].map((item,i)=>{
|
|
||||||
return{
|
|
||||||
value: i+1 + '',
|
|
||||||
label: (i+1)+'月'
|
|
||||||
}
|
|
||||||
})
|
|
||||||
,
|
|
||||||
majorValue: '',
|
majorValue: '',
|
||||||
monthValue: '',
|
monthValue: '',
|
||||||
caseList: {
|
caseList: {
|
||||||
@@ -164,6 +157,8 @@ import apiPlace from "@/api/phase2/place.js"
|
|||||||
isSeach: false,
|
isSeach: false,
|
||||||
domain: [],//组织领域
|
domain: [],//组织领域
|
||||||
speciData: [],//专业分类
|
speciData: [],//专业分类
|
||||||
|
speciDataNew: [],
|
||||||
|
monthsObject: {},
|
||||||
treeList:[],
|
treeList:[],
|
||||||
queryCondition: {
|
queryCondition: {
|
||||||
pageIndex: 1,
|
pageIndex: 1,
|
||||||
@@ -193,9 +188,12 @@ import apiPlace from "@/api/phase2/place.js"
|
|||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.majorValue = this.$route.query.majorName
|
this.majorValue = this.$route.query.majorName
|
||||||
this.monthValue = parseInt(this.$route.query.riseRankTime.split('-')[1], 10) + '月'
|
const dateStr = this.$route.query.riseRankTime;
|
||||||
|
const year = dateStr.substring(2, 4) + '年';
|
||||||
|
const month = dateStr.substring(5, 7) + '月';
|
||||||
|
this.monthValue = year + month;
|
||||||
this.getCaseData()
|
this.getCaseData()
|
||||||
Promise.all([apiType.treeList(1,Number(this.caseType ?? 155),1), apiCase.majorTypes()]).then(rs => {
|
Promise.all([apiType.treeList(1,Number(this.caseType ?? 155),1), apiCase.majorTypes(),apiCase.queryAllTimePopularityOfMajor()]).then(rs => {
|
||||||
if (rs[0].code == 200) {
|
if (rs[0].code == 200) {
|
||||||
const {records} = rs[0].data
|
const {records} = rs[0].data
|
||||||
records.forEach(item => {
|
records.forEach(item => {
|
||||||
@@ -224,6 +222,18 @@ import apiPlace from "@/api/phase2/place.js"
|
|||||||
})
|
})
|
||||||
this.speciData = rs[1].result;
|
this.speciData = rs[1].result;
|
||||||
}
|
}
|
||||||
|
if(rs[2].status == 200){
|
||||||
|
const months = Object.keys(rs[2].result)
|
||||||
|
this.monthsObject = rs[2].result
|
||||||
|
months.forEach(item=>{
|
||||||
|
rs[1].result.forEach(sub=>{
|
||||||
|
if(item == sub.code){
|
||||||
|
this.speciDataNew.push(sub)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
this.selectMonth(this.$route.query.majorId)
|
||||||
});
|
});
|
||||||
this.loadTypeData();//加载分类
|
this.loadTypeData();//加载分类
|
||||||
},
|
},
|
||||||
@@ -285,14 +295,23 @@ import apiPlace from "@/api/phase2/place.js"
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
selectMonth(e){
|
||||||
|
this.optionsMonth = this.monthsObject[e].map(item=>{
|
||||||
|
return {
|
||||||
|
value: item,
|
||||||
|
label: item.split('-')[0]+'年'+item.split('-')[1]+'月'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
majorChange(e){
|
majorChange(e){
|
||||||
|
this.selectMonth(e)
|
||||||
this.majorId = e
|
this.majorId = e
|
||||||
|
this.rankMonth = '20' + this.optionsMonth[0].value + '-' + '20'
|
||||||
|
this.monthValue = this.optionsMonth[0].label
|
||||||
this.getCaseData()
|
this.getCaseData()
|
||||||
},
|
},
|
||||||
monthChange(e){
|
monthChange(e){
|
||||||
const mon = e.length == 1 ? '0'+e : e
|
this.rankMonth ='20' + e + '-' + '20'
|
||||||
const arr = this.$route.query.riseRankTime.split('-')
|
|
||||||
this.rankMonth = arr[0] + '-' + mon + '-' + arr[2]
|
|
||||||
this.getCaseData()
|
this.getCaseData()
|
||||||
},
|
},
|
||||||
orgDomainTranslate(code) { // 组织领域翻译
|
orgDomainTranslate(code) { // 组织领域翻译
|
||||||
|
|||||||
@@ -207,7 +207,7 @@
|
|||||||
<!-- <span v-if="item.breCommend" class="comWords"
|
<!-- <span v-if="item.breCommend" class="comWords"
|
||||||
style="background-color:rgba(232, 139, 72);">荐</span>
|
style="background-color:rgba(232, 139, 72);">荐</span>
|
||||||
<span v-if="item.excellent" class="comWords" style="background-color:red;">最佳</span> -->
|
<span v-if="item.excellent" class="comWords" style="background-color:red;">最佳</span> -->
|
||||||
<span v-if="item.excellentTag" class="comWords" style="width: 98px;height: 24px;background: #F99000;border-radius: 2px;font-weight: 400;font-size: 12px;color: #FFFFFF;padding: 4px 10px;">
|
<span @click.stop="()=>{}" v-if="item.excellentTag" class="comWords" style="width: 98px;height: 24px;background: #F99000;border-radius: 2px;font-weight: 400;font-size: 12px;color: #FFFFFF;padding: 4px 10px;">
|
||||||
{{item.excellentTag}}
|
{{item.excellentTag}}
|
||||||
</span>
|
</span>
|
||||||
<span @click.stop="toExcellent(tag)" v-if="item.viewRankTags.length != 0" v-for="tag in item.viewRankTags" class="comWords" style="width: 98px;height: 24px;background: #F99000;border-radius: 2px;font-weight: 400;font-size: 12px;color: #FFFFFF;padding: 4px 10px;">
|
<span @click.stop="toExcellent(tag)" v-if="item.viewRankTags.length != 0" v-for="tag in item.viewRankTags" class="comWords" style="width: 98px;height: 24px;background: #F99000;border-radius: 2px;font-weight: 400;font-size: 12px;color: #FFFFFF;padding: 4px 10px;">
|
||||||
@@ -292,104 +292,106 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- 打开排行榜 -->
|
<!-- 打开排行榜 -->
|
||||||
<div class="xcontent2-minor">
|
<div class="xcontent2-minor">
|
||||||
<router-link class="the_charts" to="/case/charts">
|
|
||||||
<div class="text">排行榜</div>
|
|
||||||
<div class="icon">></div>
|
|
||||||
</router-link>
|
|
||||||
<div id="fixd-box">
|
<div id="fixd-box">
|
||||||
<div class="portal-ranking ranking-bg">
|
<router-link class="the_charts" to="/case/charts">
|
||||||
<div style="display: flex;justify-content: space-between;">
|
<div class="text">排行榜</div>
|
||||||
<p class="ranking-title">好评榜</p>
|
<div class="icon">></div>
|
||||||
<el-dropdown trigger="click" @command="positiveReview">
|
</router-link>
|
||||||
<span class="el-dropdown-link">
|
<div>
|
||||||
{{favorableName}}<i class="el-icon-arrow-down el-icon--right"></i>
|
<div class="portal-ranking ranking-bg" style="padding: 20px 15px;max-height: 222px;">
|
||||||
</span>
|
<div style="display: flex;justify-content: space-between;">
|
||||||
<el-dropdown-menu slot="dropdown">
|
<p class="ranking-title">好评榜</p>
|
||||||
<el-dropdown-item command="total">总</el-dropdown-item>
|
<el-dropdown trigger="click" @command="positiveReview">
|
||||||
<el-dropdown-item command="quarter">季度</el-dropdown-item>
|
<span class="el-dropdown-link">
|
||||||
</el-dropdown-menu>
|
{{favorableName}}<i class="el-icon-arrow-down el-icon--right"></i>
|
||||||
</el-dropdown>
|
</span>
|
||||||
|
<el-dropdown-menu slot="dropdown">
|
||||||
|
<el-dropdown-item command="total">总</el-dropdown-item>
|
||||||
|
<el-dropdown-item command="quarter">季度</el-dropdown-item>
|
||||||
|
</el-dropdown-menu>
|
||||||
|
</el-dropdown>
|
||||||
|
</div>
|
||||||
|
<ul class="ranking-data">
|
||||||
|
<li v-for="(item, index) in Positive" :key="index" class="title-line-ellipsis"
|
||||||
|
style="cursor: pointer;margin-top:15px;line-height: 22px;">
|
||||||
|
<router-link :to="'/case/detail?id=' + item.caseId">
|
||||||
|
<span class="portal-right-text blue-one" v-if="index == 0">
|
||||||
|
<img :src="`${webBaseUrl}/images/listblue01.png`" alt="">
|
||||||
|
</span>
|
||||||
|
<span class="portal-right-text blue-tow" v-if="index == 1">
|
||||||
|
<img :src="`${webBaseUrl}/images/listblue02.png`" alt="">
|
||||||
|
</span>
|
||||||
|
<span class="portal-right-text blue-three" v-if="index == 2">
|
||||||
|
<img :src="`${webBaseUrl}/images/listblue03.png`" alt="">
|
||||||
|
</span>
|
||||||
|
<!-- <span class="portal-right-text" v-if="index == 3">
|
||||||
|
<img :src="`${webBaseUrl}/images/list04.png`" alt="">
|
||||||
|
</span>
|
||||||
|
<span class="portal-right-text" v-if="index == 4">
|
||||||
|
<img :src="`${webBaseUrl}/images/list05.png`" alt="">
|
||||||
|
</span> -->
|
||||||
|
<span class="portal-title-desc" style="font-size: 14px;">{{ item.caseTitle }}</span>
|
||||||
|
</router-link>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<ul class="ranking-data">
|
<div class="portal-ranking ranking-bg1" style="padding: 20px 15px;max-height: 222px;margin-top: 20px;">
|
||||||
<li v-for="(item, index) in Positive" :key="index" class="title-line-ellipsis"
|
<div style="display: flex;justify-content: space-between;">
|
||||||
style="cursor: pointer;margin-top:30px;line-height: 22px;">
|
<p class="ranking-title">人气榜</p>
|
||||||
<router-link :to="'/case/detail?id=' + item.caseId">
|
<el-dropdown trigger="click" @command="popularityReview">
|
||||||
<span class="portal-right-text blue-one" v-if="index == 0">
|
<span class="el-dropdown-link">
|
||||||
<img :src="`${webBaseUrl}/images/listblue01.png`" alt="">
|
{{popularityName}}<i class="el-icon-arrow-down el-icon--right"></i>
|
||||||
</span>
|
</span>
|
||||||
<span class="portal-right-text blue-tow" v-if="index == 1">
|
<el-dropdown-menu slot="dropdown">
|
||||||
<img :src="`${webBaseUrl}/images/listblue02.png`" alt="">
|
<el-dropdown-item command="total">总</el-dropdown-item>
|
||||||
</span>
|
<el-dropdown-item command="quarter">季度</el-dropdown-item>
|
||||||
<span class="portal-right-text blue-three" v-if="index == 2">
|
</el-dropdown-menu>
|
||||||
<img :src="`${webBaseUrl}/images/listblue03.png`" alt="">
|
</el-dropdown>
|
||||||
</span>
|
</div>
|
||||||
<!-- <span class="portal-right-text" v-if="index == 3">
|
<ul class="ranking-data">
|
||||||
<img :src="`${webBaseUrl}/images/list04.png`" alt="">
|
<li v-for="(item, index) in Popularity" :key="index" class="title-line-ellipsis"
|
||||||
</span>
|
style="cursor: pointer;margin-top:15px;line-height: 22px;">
|
||||||
<span class="portal-right-text" v-if="index == 4">
|
<router-link :to="'/case/detail?id=' + item.caseId">
|
||||||
<img :src="`${webBaseUrl}/images/list05.png`" alt="">
|
<span class="portal-right-text orange-one" v-if="index == 0">
|
||||||
</span> -->
|
<img :src="`${webBaseUrl}/images/list-01.png`" alt="">
|
||||||
<span class="portal-title-desc" style="font-size: 14px;">{{ item.caseTitle }}</span>
|
</span>
|
||||||
</router-link>
|
<span class="portal-right-text orange-tow" v-if="index == 1">
|
||||||
</li>
|
<img :src="`${webBaseUrl}/images/list02.png`" alt="">
|
||||||
</ul>
|
</span>
|
||||||
</div>
|
<span class="portal-right-text orange-three" v-if="index == 2">
|
||||||
<div class="portal-ranking ranking-bg1" style="margin-top:26px">
|
<img :src="`${webBaseUrl}/images/list03.png`" alt="">
|
||||||
<div style="display: flex;justify-content: space-between;">
|
</span>
|
||||||
<p class="ranking-title">人气榜</p>
|
<span class="portal-right-text" v-if="index == 3">
|
||||||
<el-dropdown trigger="click" @command="popularityReview">
|
<img :src="`${webBaseUrl}/images/list04.png`" alt="">
|
||||||
<span class="el-dropdown-link">
|
</span>
|
||||||
{{popularityName}}<i class="el-icon-arrow-down el-icon--right"></i>
|
<span class="portal-right-text" v-if="index == 4">
|
||||||
</span>
|
<img :src="`${webBaseUrl}/images/list05.png`" alt="">
|
||||||
<el-dropdown-menu slot="dropdown">
|
</span>
|
||||||
<el-dropdown-item command="total">总</el-dropdown-item>
|
<span class="portal-title-desc" style="font-size: 14px;">{{ item.caseTitle }}</span>
|
||||||
<el-dropdown-item command="quarter">季度</el-dropdown-item>
|
</router-link>
|
||||||
</el-dropdown-menu>
|
</li>
|
||||||
</el-dropdown>
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div v-if="recommendRank.length > 0" class="portal-ranking ranking-bg2" style="margin-top:20px;padding: 20px 15px;max-height: 222px;">
|
||||||
|
<p class="ranking-title">推荐榜</p>
|
||||||
|
<ul class="ranking-data">
|
||||||
|
<li v-for="(item, index) in recommendRank" :key="index" class="title-line-ellipsis"
|
||||||
|
style="cursor: pointer;margin-top:15px;line-height: 22px;">
|
||||||
|
<router-link :to="'/case/detail?id=' + item.caseId">
|
||||||
|
<span class="portal-right-text blue-one" v-if="index == 0">
|
||||||
|
<img :src="`${webBaseUrl}/images/listred01 .png`" alt="">
|
||||||
|
</span>
|
||||||
|
<span class="portal-right-text blue-tow" v-if="index == 1">
|
||||||
|
<img :src="`${webBaseUrl}/images/listred02.png`" alt="">
|
||||||
|
</span>
|
||||||
|
<span class="portal-right-text blue-three" v-if="index == 2">
|
||||||
|
<img :src="`${webBaseUrl}/images/listred03.png`" alt="">
|
||||||
|
</span>
|
||||||
|
<span class="portal-title-desc" style="font-size: 14px;">{{ item.caseTitle }}</span>
|
||||||
|
</router-link>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<ul class="ranking-data">
|
|
||||||
<li v-for="(item, index) in Popularity" :key="index" class="title-line-ellipsis"
|
|
||||||
style="cursor: pointer;margin-top:30px;line-height: 22px;">
|
|
||||||
<router-link :to="'/case/detail?id=' + item.caseId">
|
|
||||||
<span class="portal-right-text orange-one" v-if="index == 0">
|
|
||||||
<img :src="`${webBaseUrl}/images/list-01.png`" alt="">
|
|
||||||
</span>
|
|
||||||
<span class="portal-right-text orange-tow" v-if="index == 1">
|
|
||||||
<img :src="`${webBaseUrl}/images/list02.png`" alt="">
|
|
||||||
</span>
|
|
||||||
<span class="portal-right-text orange-three" v-if="index == 2">
|
|
||||||
<img :src="`${webBaseUrl}/images/list03.png`" alt="">
|
|
||||||
</span>
|
|
||||||
<span class="portal-right-text" v-if="index == 3">
|
|
||||||
<img :src="`${webBaseUrl}/images/list04.png`" alt="">
|
|
||||||
</span>
|
|
||||||
<span class="portal-right-text" v-if="index == 4">
|
|
||||||
<img :src="`${webBaseUrl}/images/list05.png`" alt="">
|
|
||||||
</span>
|
|
||||||
<span class="portal-title-desc" style="font-size: 14px;">{{ item.caseTitle }}</span>
|
|
||||||
</router-link>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div v-if="recommendRank.length > 0" class="portal-ranking ranking-bg2" style="margin-top:26px">
|
|
||||||
<p class="ranking-title">推荐榜</p>
|
|
||||||
<ul class="ranking-data">
|
|
||||||
<li v-for="(item, index) in recommendRank" :key="index" class="title-line-ellipsis"
|
|
||||||
style="cursor: pointer;margin-top:30px;line-height: 22px;">
|
|
||||||
<router-link :to="'/case/detail?id=' + item.caseId">
|
|
||||||
<span class="portal-right-text blue-one" v-if="index == 0">
|
|
||||||
<img :src="`${webBaseUrl}/images/listred01 .png`" alt="">
|
|
||||||
</span>
|
|
||||||
<span class="portal-right-text blue-tow" v-if="index == 1">
|
|
||||||
<img :src="`${webBaseUrl}/images/listred02.png`" alt="">
|
|
||||||
</span>
|
|
||||||
<span class="portal-right-text blue-three" v-if="index == 2">
|
|
||||||
<img :src="`${webBaseUrl}/images/listred03.png`" alt="">
|
|
||||||
</span>
|
|
||||||
<span class="portal-title-desc" style="font-size: 14px;">{{ item.caseTitle }}</span>
|
|
||||||
</router-link>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -663,7 +665,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
beforeRouteLeave (to, from, next) {
|
beforeRouteLeave (to, from, next) {
|
||||||
if(to.name !== 'caseDetail'){
|
if(to.name !== 'caseDetail'&&to.name !=='caseCharts'&&to.name !=='caseExcellent'){
|
||||||
// console.log('我是外')
|
// console.log('我是外')
|
||||||
this.queryCondition.pageIndex = 1
|
this.queryCondition.pageIndex = 1
|
||||||
this.search()
|
this.search()
|
||||||
@@ -672,6 +674,7 @@ export default {
|
|||||||
}else{
|
}else{
|
||||||
sessionStorage.setItem('pagesScroll', JSON.stringify(window.pageYOffset))
|
sessionStorage.setItem('pagesScroll', JSON.stringify(window.pageYOffset))
|
||||||
}
|
}
|
||||||
|
window.removeEventListener("scroll", this.handleScroll);
|
||||||
next()
|
next()
|
||||||
},
|
},
|
||||||
beforeRouteEnter(to, from, next) {
|
beforeRouteEnter(to, from, next) {
|
||||||
@@ -832,13 +835,20 @@ export default {
|
|||||||
// window.addEventListener("scroll", this.handleScroll);
|
// window.addEventListener("scroll", this.handleScroll);
|
||||||
// 获取年
|
// 获取年
|
||||||
this.getYears();
|
this.getYears();
|
||||||
|
this.allRequests()
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
// window.removeEventListener("scroll", this.handleScroll);
|
// window.removeEventListener("scroll", this.handleScroll);
|
||||||
// console.log('销毁了');/
|
// console.log('销毁了');
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
allRequests(){
|
||||||
|
window.addEventListener(
|
||||||
|
"scroll",
|
||||||
|
this.handleScroll
|
||||||
|
);
|
||||||
|
},
|
||||||
deleteFavorite(e){
|
deleteFavorite(e){
|
||||||
this.search()
|
this.search()
|
||||||
},
|
},
|
||||||
@@ -932,10 +942,16 @@ export default {
|
|||||||
this.$message.error('该案例已被删除')
|
this.$message.error('该案例已被删除')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (refId) {
|
apiCase.details(id,true).then(res=>{
|
||||||
apiCase.startReadTimer(refId)
|
if (res.status == 200) {
|
||||||
}
|
if (refId) {
|
||||||
this.$router.push({ path: '/case/detail', query: { id } });
|
apiCase.startReadTimer(refId)
|
||||||
|
}
|
||||||
|
this.$router.push({ path: '/case/detail', query: { id } });
|
||||||
|
}else{
|
||||||
|
this.$message.error(res.message);
|
||||||
|
}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
toExcellent(item){
|
toExcellent(item){
|
||||||
this.$router.push({path:'/case/excellent',query:{majorId:item.majorId,majorName:item.majorName,riseRankTime:item.riseRankTime.split(' ')[0]}})
|
this.$router.push({path:'/case/excellent',query:{majorId:item.majorId,majorName:item.majorName,riseRankTime:item.riseRankTime.split(' ')[0]}})
|
||||||
@@ -1319,25 +1335,25 @@ export default {
|
|||||||
// this.getCaseData();
|
// this.getCaseData();
|
||||||
// },
|
// },
|
||||||
// 滚动请求
|
// 滚动请求
|
||||||
// handleScroll() {
|
handleScroll() {
|
||||||
// let innerw = document.querySelector("#fixd-box");
|
let innerw = document.querySelector("#fixd-box");
|
||||||
// let innerHeight = document.querySelector("#case-list-content")
|
// let innerHeight = document.querySelector("#case-list-content")
|
||||||
// .clientHeight;
|
// .clientHeight;
|
||||||
// let outerHeight = document.documentElement.clientHeight;
|
// let outerHeight = document.documentElement.clientHeight;
|
||||||
// let outerWidth = innerw.clientWidth;
|
let outerWidth = innerw.clientWidth;
|
||||||
// let scrollTop = document.documentElement.scrollTop;
|
let scrollTop = document.documentElement.scrollTop;
|
||||||
// if (outerHeight + scrollTop + 350 >= innerHeight) {
|
// if (outerHeight + scrollTop + 350 >= innerHeight) {
|
||||||
// if (this.moreState == 1) {
|
// if (this.moreState == 1) {
|
||||||
// this.debounce(this.loadMore(), 5000);
|
// this.debounce(this.loadMore(), 5000);
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
// if (scrollTop > 630) {
|
if (scrollTop > 260) {
|
||||||
// document.querySelector("#fixd-box").style.cssText =
|
document.querySelector("#fixd-box").style.cssText =
|
||||||
// "position: fixed;top: -400px;width:" + outerWidth + "px";
|
"position: fixed;top: 10px;width:" + outerWidth + "px";
|
||||||
// } else {
|
} else {
|
||||||
// document.querySelector("#fixd-box").style.cssText = "position: static";
|
document.querySelector("#fixd-box").style.cssText = "position: static";
|
||||||
// }
|
}
|
||||||
// },
|
},
|
||||||
useHotword(item) {
|
useHotword(item) {
|
||||||
this.keyWord = item.keyword;
|
this.keyWord = item.keyword;
|
||||||
this.search();
|
this.search();
|
||||||
@@ -1853,19 +1869,19 @@ export default {
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
font-size: 18px;
|
font-size: 17px;
|
||||||
max-width: 400px;
|
max-width: 400px;
|
||||||
min-width: 260px;
|
min-width: 260px;
|
||||||
height: 67px;
|
height: 47px;
|
||||||
background: #DDEDFF;
|
background: #DDEDFF;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
.text{
|
.text{
|
||||||
font-size: 18px;
|
font-size: 17px;
|
||||||
color: #387DF7;
|
color: #387DF7;
|
||||||
}
|
}
|
||||||
.icon{
|
.icon{
|
||||||
position: absolute;
|
position: absolute;
|
||||||
font-size: 18px;
|
font-size: 17px;
|
||||||
color: #387DF7;
|
color: #387DF7;
|
||||||
right: 25px;
|
right: 25px;
|
||||||
top: 50%;
|
top: 50%;
|
||||||
|
|||||||
Reference in New Issue
Block a user