Merge branch 'zcwy_0822_case' into dev0515
BIN
public/images/browse.png
Normal file
|
After Width: | Height: | Size: 689 B |
BIN
public/images/collect.png
Normal file
|
After Width: | Height: | Size: 665 B |
BIN
public/images/headerBack.png
Normal file
|
After Width: | Height: | Size: 169 KiB |
BIN
public/images/list01.png
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
public/images/listred01.png
Normal file
|
After Width: | Height: | Size: 957 B |
@@ -1,6 +1,6 @@
|
||||
/* 案例模块的相关处理*/
|
||||
import ajax from '@/utils/xajax.js'
|
||||
|
||||
import ajaxs from '@/api/ajax.js'
|
||||
/**首页查询
|
||||
* pageSize
|
||||
* orderField
|
||||
@@ -88,6 +88,12 @@ const usernameList = function (pageSize) {
|
||||
const queryPraises = function (pageSize) {
|
||||
return ajax.get(`/xboe/m/boe/cases/query-praises?pageSize=${pageSize}`);
|
||||
}
|
||||
const queryPraisesNew = function (pageSize,rankType) {
|
||||
return ajax.get(`/xboe/m/boe/cases/queryPopularity?pageSize=${pageSize}&rankType=${rankType}`);
|
||||
}
|
||||
const queryRecommendRank = function (pageSize) {
|
||||
return ajax.get(`/xboe/m/boe/cases/queryRecommendRank?pageSize=${pageSize}`);
|
||||
}
|
||||
/*
|
||||
好评榜
|
||||
@param pageSize 长度
|
||||
@@ -95,6 +101,9 @@ const queryPraises = function (pageSize) {
|
||||
const queryComments = function (pageSize) {
|
||||
return ajax.get(`/xboe/m/boe/cases/query-comments?pageSize=${pageSize}`);
|
||||
}
|
||||
const queryCommentsNew = function (pageSize,rankType) {
|
||||
return ajax.get(`/xboe/m/boe/cases/queryHighOpinion?pageSize=${pageSize}&rankType=${rankType}`);
|
||||
}
|
||||
|
||||
/**
|
||||
* 专业分类
|
||||
@@ -186,11 +195,30 @@ const endReadTimer = (data)=> ajax.postJson('/xboe/m/boe/cases/recommend/record
|
||||
const caseYears = function (query = {}) {
|
||||
return ajax.post('/xboe/m/boe/cases/caseYears', query);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//案例推荐榜单
|
||||
const getQueryRecommendRank = function (params) {
|
||||
return ajax.get(`/xboe/m/boe/cases/queryRecommendRank?pageSize=${params.pageSize}`)
|
||||
}
|
||||
//案例上榜
|
||||
const riseIntoRank = (data) => ajax.post(`/xboe/m/boe/cases/riseIntoRank?caseId=${data.caseId}`)
|
||||
//取消上榜
|
||||
const cancelRiseIntoRank = (data) => ajax.post(`/xboe/m/boe/cases/cancelRiseIntoRank?caseId=${data.caseId}`)
|
||||
//调整榜单
|
||||
const adjustRank = (data) => ajax.post(`/xboe/m/boe/cases/adjustRank?caseIds=${data.caseIds}`)
|
||||
//收藏案例
|
||||
const queryFavoriteCaseOfIndex = (params) => ajax.get(`/xboe/m/boe/cases/queryFavoriteCaseOfIndex?pageIndex=${params.pageIndex}&pageSize=${params.pageSize}&orderField=${params.orderField}&orderAsc=${params.orderAsc}`)
|
||||
//浏览记录
|
||||
const queryViewRecord = (data) => ajaxs.post(`/statApi/xboe/m/stat/userdynamic/list?pageIndex=${data.pageIndex}&pageSize=${data.pageSize}&contentType=${data.contentType}&aid=${data.aid}&hidden=${data.hidden}`)
|
||||
//浏览量TOP榜单
|
||||
const queryPopularityOfMajor = (params) => ajax.get(`/xboe/m/boe/cases/queryPopularityOfMajor?pageSize=${params.pageSize}&rankMonth=${params.rankMonth}&majorId=${params.majorId}`)
|
||||
export default {
|
||||
getQueryRecommendRank,
|
||||
queryPopularityOfMajor,
|
||||
queryViewRecord,
|
||||
queryFavoriteCaseOfIndex,
|
||||
riseIntoRank,
|
||||
cancelRiseIntoRank,
|
||||
adjustRank,
|
||||
indexList,
|
||||
queryList,
|
||||
queryListV2,
|
||||
@@ -202,7 +230,10 @@ export default {
|
||||
query,
|
||||
usernameList,
|
||||
queryPraises,
|
||||
queryPraisesNew,
|
||||
queryRecommendRank,
|
||||
queryComments,
|
||||
queryCommentsNew,
|
||||
majorTypes,
|
||||
details,
|
||||
ids,
|
||||
|
||||
BIN
src/assets/images/asterisk.png
Normal file
|
After Width: | Height: | Size: 360 B |
BIN
src/assets/images/collect.png
Normal file
|
After Width: | Height: | Size: 4.9 KiB |
BIN
src/assets/images/collect_active.png
Normal file
|
After Width: | Height: | Size: 6.6 KiB |
BIN
src/assets/images/time.png
Normal file
|
After Width: | Height: | Size: 4.3 KiB |
BIN
src/assets/images/time_active.png
Normal file
|
After Width: | Height: | Size: 5.5 KiB |
@@ -110,7 +110,7 @@ body {margin: 0px;padding: 0px;}
|
||||
padding-bottom:12px
|
||||
}
|
||||
.ranking-data{
|
||||
min-height: 246px;
|
||||
min-height: 196px;
|
||||
margin: 0px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
@@ -130,7 +130,7 @@ body {margin: 0px;padding: 0px;}
|
||||
padding-bottom:12px
|
||||
}
|
||||
.ranking-data{
|
||||
min-height: 246px;
|
||||
min-height: 196px;
|
||||
margin: 0px;
|
||||
// overflow-y: auto;
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
<div v-if="!onlyAvatar" style="padding-left: 14px;padding-top: 6px;font-size: 14px;">
|
||||
<span style="color: #333333;font-weight: 600;font-size: 16px;">{{userName}}</span>
|
||||
<span class="author-text" v-if="userInfo && userInfo!=''"> {{userInfo}} </span>
|
||||
<span style="margin-right: 15px;" class="comWords" v-if="authorTags.length != 0" v-for="tag in authorTags">{{tag}}</span>
|
||||
</div>
|
||||
<slot />
|
||||
</div>
|
||||
@@ -49,6 +50,12 @@
|
||||
onlyAvatar:{
|
||||
type:Boolean,
|
||||
default:false
|
||||
},
|
||||
authorTags: {
|
||||
type:Array,
|
||||
default(){
|
||||
return []
|
||||
}
|
||||
}
|
||||
},
|
||||
data(){
|
||||
@@ -119,6 +126,14 @@
|
||||
font-weight: 300;
|
||||
margin-left: 4px;
|
||||
}
|
||||
.comWords {
|
||||
background: #409EFF;
|
||||
border-radius: 2px;
|
||||
font-weight: 400;
|
||||
font-size: 12px;
|
||||
color: #FFFFFF;
|
||||
padding: 3px 10px 4px 8px;
|
||||
}
|
||||
.uavatar{
|
||||
// border: 1px solid #73adfe;
|
||||
width: 28px;
|
||||
|
||||
@@ -214,6 +214,20 @@ export const constantRoutes = [{
|
||||
name: 'caseDetail',
|
||||
meta: {title: '案例详情', keepAlive: true, icon: 'dashboard', noCache: false, affix: true},
|
||||
},
|
||||
{
|
||||
path: '/case/charts',
|
||||
hidden: true,
|
||||
component: (resolve) => require(['@/views/portal/case/Charts'], resolve),
|
||||
name: 'caseCharts',
|
||||
meta: {title: '排行榜', keepAlive: true, icon: 'dashboard', noCache: false, affix: true},
|
||||
},
|
||||
{
|
||||
path: '/case/excellent',
|
||||
hidden: true,
|
||||
component: (resolve) => require(['@/views/portal/case/Excellent'], resolve),
|
||||
name: 'caseExcellent',
|
||||
meta: {title: '浏览量榜单', keepAlive: true, icon: 'dashboard', noCache: false, affix: true},
|
||||
},
|
||||
{
|
||||
path: '/article',
|
||||
hidden: true,
|
||||
|
||||
@@ -32,6 +32,9 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="margin: 5px 0 0 5px;">
|
||||
<el-button type="primary" @click="recoRanking">推荐榜单</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<el-table style="100%" :data="caseList" border stripe>
|
||||
<el-table-column label="标题" prop="title" show-overflow-tooltip>
|
||||
@@ -49,6 +52,7 @@
|
||||
<el-table-column label="操作">
|
||||
<template slot-scope="scope">
|
||||
<el-button-group>
|
||||
<el-button style="margin:0 5px" type="text" v-if="scope.row.recommendRank === ''" @click="suggest(scope.row)" icon="el-icon-delete">榜单推荐</el-button>
|
||||
<!-- <el-button type="text" @click="shareItem(scope.row)" icon="el-icon-share" style="margin:0 5px">推荐</el-button> -->
|
||||
<el-button style="margin:0 5px" v-if="!scope.row.isTop && scope.row.confidentialityLevel == '内部'" type="text"
|
||||
@click="setTop(scope.row)" icon="el-icon-top">置顶</el-button>
|
||||
@@ -56,8 +60,12 @@
|
||||
@click="setTop(scope.row)" icon="el-icon-bottom">取消置顶</el-button>
|
||||
<el-button type="text" icon="el-icon-medal"
|
||||
v-if="scope.row.filePath && scope.row.confidentialityLevel == '内部'"><span @click="cancal(scope.row)"
|
||||
v-if="scope.row.excellent">取消最佳</span><span @click="open(scope.row)" v-else>最佳案例</span></el-button>
|
||||
v-if="scope.row.excellent">取消最佳</span>
|
||||
<!-- <span @click="open(scope.row)" v-else>最佳案例</span> -->
|
||||
<span @click="theBest(scope.row)" v-else>最佳</span>
|
||||
</el-button>
|
||||
<el-button style="margin:0 5px" type="text" @click="delItem(scope.row)" icon="el-icon-delete">删除</el-button>
|
||||
<!-- <el-button style="margin:0 5px" type="text" @click="theBest(scope.row)" icon="el-icon-delete">最佳</el-button> -->
|
||||
</el-button-group>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -121,6 +129,71 @@
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer"><el-button @click="recommend.dlgShow = false">关闭</el-button></span>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
title="最佳案例"
|
||||
:visible.sync="bestValue"
|
||||
width="36%">
|
||||
<div class="best_card">
|
||||
<div class="card_item">
|
||||
<div class="card_title">
|
||||
<i class="icon"></i>
|
||||
<i class="text">年度</i>
|
||||
</div>
|
||||
<el-input style="width:190px" disabled v-model="bestYear" placeholder="请输入年度"></el-input>
|
||||
</div>
|
||||
<div class="card_item">
|
||||
<div class="card_title">
|
||||
<i class="icon"></i>
|
||||
<i class="text">组织领域</i>
|
||||
</div>
|
||||
<el-input disabled v-model="bestOrg" placeholder="请输入组织领域"></el-input>
|
||||
</div>
|
||||
<div class="card_item">
|
||||
<div class="card_title">
|
||||
<i class="text">最佳理由</i>
|
||||
</div>
|
||||
<el-input type="textarea"
|
||||
placeholder="请输入内容"
|
||||
v-model="bestTextarea"
|
||||
maxlength="200"
|
||||
show-word-limit></el-input>
|
||||
</div>
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="notBest">取 消</el-button>
|
||||
<el-button type="primary" @click="parameBest">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
<el-drawer
|
||||
title="推荐榜单"
|
||||
:visible.sync="RankingShow"
|
||||
size="70%">
|
||||
<div style="padding: 10px 20px 80px">
|
||||
<el-table :data="tableData" border stripe>
|
||||
<el-table-column
|
||||
type="index"
|
||||
width="50">
|
||||
</el-table-column>
|
||||
<el-table-column label="案例标题" prop="caseTitle"></el-table-column>
|
||||
<el-table-column label="作者名称" prop="caseAuthor"></el-table-column>
|
||||
<el-table-column label="上榜人" prop="caseAuthor"></el-table-column>
|
||||
<el-table-column label="上榜时间" prop="recommendRankPusTime"></el-table-column>
|
||||
<el-table-column label="操作">
|
||||
<template slot-scope="scope">
|
||||
<el-button-group>
|
||||
<el-button style="margin:0 5px" type="text" @click="handleNotRank(scope.row)" icon="el-icon-top">取消推荐</el-button>
|
||||
<el-button style="margin:0 5px" type="text" @click="moveUp(scope.row,scope.$index)" icon="el-icon-delete">上移排序</el-button>
|
||||
<el-button style="margin:0 5px" type="text" @click="moveDown(scope.row,scope.$index)" icon="el-icon-delete">下移排序</el-button>
|
||||
</el-button-group>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="rank_footer">
|
||||
<el-button @click="closeDrawer" style="width: 130px;height:40px;margin-right: 30px;" type="default">取消</el-button>
|
||||
<el-button @click="queryList" style="width: 130px;height:40px;margin-right: 15px;" type="primary">确定</el-button>
|
||||
</div>
|
||||
</el-drawer>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -131,6 +204,14 @@ export default {
|
||||
name: 'articleItems',
|
||||
data() {
|
||||
return {
|
||||
adminList: [],
|
||||
caseType: process.env.VUE_APP_CASE_TYPE,
|
||||
RankingShow: false,
|
||||
bestYear: '',
|
||||
bestOrg: '',
|
||||
bestId: '',
|
||||
bestTextarea: '',
|
||||
bestValue: false,
|
||||
excellent: false,
|
||||
queryObj: {
|
||||
pageIndex: 1,
|
||||
@@ -139,6 +220,8 @@ export default {
|
||||
excellent: '',
|
||||
}, //查询对象
|
||||
caseList: [], //案例列表
|
||||
tableData: [],
|
||||
caseIds: '',
|
||||
count: 0,
|
||||
recommend: {
|
||||
dlgShow: false,
|
||||
@@ -171,8 +254,150 @@ export default {
|
||||
},
|
||||
mounted() {
|
||||
this.getData();
|
||||
this.getList();
|
||||
apiCase.treeList(1,Number(this.caseType ?? 155),1).then(res=>{
|
||||
if(res.code == 200){
|
||||
this.adminList = res.result;
|
||||
}
|
||||
})
|
||||
},
|
||||
watch:{
|
||||
RankingShow(val){
|
||||
if(val){
|
||||
this.getList()
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
orgDomainTranslate(code) { // 组织领域翻译
|
||||
if (code == '') {
|
||||
return
|
||||
}
|
||||
let name = '';
|
||||
let data = this.adminList.find(item => {
|
||||
return item.code == code;
|
||||
});
|
||||
if (data) {
|
||||
name = data.name;
|
||||
}
|
||||
return name;
|
||||
},
|
||||
suggest(record){
|
||||
this.$confirm('你确认要推荐此案例么?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
apiCase.riseIntoRank({caseId:record.id}).then(res=>{
|
||||
if(res.status == 200 ){
|
||||
this.$message.success('成功')
|
||||
this.getData()
|
||||
}
|
||||
}).catch(()=>{
|
||||
this.$message.error('失败')
|
||||
})
|
||||
})
|
||||
},
|
||||
handleNotRank(record){
|
||||
this.$confirm('你确认要取消推荐么?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
apiCase.cancelRiseIntoRank({caseId:record?.caseId}).then(res=>{
|
||||
if(res.status == 200){
|
||||
this.$message.success('取消推荐成功')
|
||||
this.getList()
|
||||
this.getData()
|
||||
}
|
||||
}).catch(()=>{
|
||||
this.$message.error('取消推荐失败')
|
||||
})
|
||||
})
|
||||
},
|
||||
moveUp(row,index){
|
||||
console.log(row,index,'index')
|
||||
if(index == 0){
|
||||
this.$message.error('已经排到第一位了')
|
||||
return
|
||||
}
|
||||
this.swapArray(this.tableData,index,index-1)
|
||||
},
|
||||
moveDown(row,index){
|
||||
if(index == this.tableData.length - 1){
|
||||
this.$message.error('已经排到最后一位了')
|
||||
return
|
||||
}
|
||||
this.swapArray(this.tableData,index,index+1)
|
||||
},
|
||||
swapArray(arr, index1, index2){
|
||||
const temp = arr[index1];
|
||||
arr.splice(index1, 1);
|
||||
arr.splice(index2, 0, temp);
|
||||
},
|
||||
getList(){
|
||||
apiCase.getQueryRecommendRank({pageSize:3}).then(res=>{
|
||||
console.log(res,'res')
|
||||
if(res.status == 200){
|
||||
this.tableData = res.result
|
||||
this.caseIds = res.result.map(item=>item.caseId).join(',')
|
||||
}
|
||||
})
|
||||
},
|
||||
notBest(){
|
||||
this.bestValue = false
|
||||
this.bestYear = ''
|
||||
this.bestOrg = ''
|
||||
this.bestId = ''
|
||||
this.bestTextarea = ''
|
||||
},
|
||||
parameBest(){
|
||||
this.excellent = true;
|
||||
let data = {
|
||||
id: this.bestId,
|
||||
excellent: this.excellent,
|
||||
excellentReason: this.bestTextarea
|
||||
}
|
||||
apiCase.excellent(data).then(res=>{
|
||||
if (res.status == 200) {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '设置最佳案例成功!'
|
||||
});
|
||||
this.getData()
|
||||
}else{
|
||||
this.$message({
|
||||
type: 'error',
|
||||
message: '设置最佳案例失败!'
|
||||
});
|
||||
}
|
||||
this.notBest()
|
||||
})
|
||||
},
|
||||
recoRanking(){
|
||||
this.RankingShow = true
|
||||
},
|
||||
closeDrawer(){
|
||||
this.RankingShow = false
|
||||
},
|
||||
queryList(){
|
||||
if(this.caseIds != this.tableData.map(item=>item.caseId).join(',')){
|
||||
apiCase.adjustRank({caseIds:this.tableData.map(item=>item.caseId).join(',')}).then(res=>{
|
||||
if(res.status == 200){
|
||||
this.$message({
|
||||
message: '调整成功',
|
||||
type: 'success'
|
||||
})
|
||||
}
|
||||
}).catch(()=>{
|
||||
this.$message({
|
||||
message: '调整失败',
|
||||
type: 'error'
|
||||
})
|
||||
})
|
||||
}
|
||||
this.RankingShow = false
|
||||
},
|
||||
// 导出
|
||||
importList() {
|
||||
apiCase.exports(this.queryObj).then(res => {
|
||||
@@ -354,6 +579,12 @@ export default {
|
||||
this.$message({ type: 'info', message: '已取消删除', offset: 50 });
|
||||
});
|
||||
},
|
||||
theBest(item){
|
||||
this.bestValue = true
|
||||
this.bestId = item.id
|
||||
this.bestOrg = this.orgDomainTranslate(item.orgDomainParent)
|
||||
this.bestYear = item.sysCreateTime.split('-')[0]
|
||||
},
|
||||
//添加推荐
|
||||
shareItem(item) {
|
||||
this.shareItemData = { ...item }
|
||||
@@ -467,6 +698,48 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.rank_footer{
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
width: 100%;
|
||||
height: 80px;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
background: #fff;
|
||||
padding-right: 20px;
|
||||
}
|
||||
::v-deep .el-dialog__header{
|
||||
border-bottom: 1px solid #909399;
|
||||
}
|
||||
::v-deep .el-textarea__inner{
|
||||
height: 100px !important;
|
||||
}
|
||||
.best_card{
|
||||
.card_item{
|
||||
display: flex;
|
||||
justify-content: start;
|
||||
margin-bottom: 20px;
|
||||
.card_title{
|
||||
width: 94px;
|
||||
min-width: 94px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: end;
|
||||
margin-right: 14px;
|
||||
.icon{
|
||||
width:8px;
|
||||
height: 8px;
|
||||
background: url('../../assets/images/asterisk.png') no-repeat;
|
||||
background-size: 100%;
|
||||
}
|
||||
.text{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.article-status1 {
|
||||
padding: 3px;
|
||||
border: 1px dotted #1ea0fa;
|
||||
|
||||
242
src/views/portal/case/Charts.vue
Normal file
@@ -0,0 +1,242 @@
|
||||
<template>
|
||||
<div class="charts">
|
||||
<div class="charts_header">
|
||||
<portal-header textColor="#fff"></portal-header>
|
||||
<div class="text">
|
||||
排行榜
|
||||
</div>
|
||||
</div>
|
||||
<div class="charts_content">
|
||||
<div class="charts_item">
|
||||
<div class="charts_item_box charts_bg1">
|
||||
<div class="charts_text">
|
||||
<div class="text">好评榜</div>
|
||||
<el-dropdown trigger="click" @command="positiveReview">
|
||||
<span class="el-dropdown-link">
|
||||
{{favorableName}}<i class="el-icon-arrow-down el-icon--right"></i>
|
||||
</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="charts_list">
|
||||
<li v-for="(item, index) in Positive" :key="index" class="list">
|
||||
<router-link style="display: flex;align-items: center;" :to="'/case/detail?id=' + item.caseId">
|
||||
<img class="num" :src="require(
|
||||
`../../../../public/images/${imgNumBlue(index)}.png`
|
||||
)" alt="">
|
||||
<span class="text">{{ item.caseTitle }}</span>
|
||||
</router-link>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="charts_item_box charts_bg2">
|
||||
<div class="charts_text">
|
||||
<div class="text">人气榜</div>
|
||||
<el-dropdown trigger="click" @command="popularityReview">
|
||||
<span class="el-dropdown-link">
|
||||
{{popularityName}}<i class="el-icon-arrow-down el-icon--right"></i>
|
||||
</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="charts_list">
|
||||
<li v-for="(item, index) in Popularity" :key="index" class="list">
|
||||
<router-link style="display: flex;align-items: center;" :to="'/case/detail?id=' + item.caseId">
|
||||
<img class="num" :src="require(
|
||||
`../../../../public/images/${imgNumOrg(index)}.png`
|
||||
)" alt="">
|
||||
<span class="text">{{ item.caseTitle }}</span>
|
||||
</router-link>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="charts_item_box charts_bg3">
|
||||
<div class="charts_text">
|
||||
<div class="text">推荐榜</div>
|
||||
</div>
|
||||
<ul class="charts_list">
|
||||
<li v-for="(item, index) in recommendRank" :key="index" class="list">
|
||||
<router-link style="display: flex;align-items: center;" :to="'/case/detail?id=' + item.caseId">
|
||||
<img class="num" :src="require(
|
||||
`../../../../public/images/${imgNumPink(index)}.png`
|
||||
)" alt="">
|
||||
<span class="text">{{ item.caseTitle }}</span>
|
||||
</router-link>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import apiCase from "@/api/modules/cases.js";
|
||||
import portalHeader from '@/components/PortalHeader.vue'
|
||||
export default {
|
||||
name: 'charts',
|
||||
components:{portalHeader},
|
||||
data() {
|
||||
return {
|
||||
ankingList: [],//排行数据1
|
||||
Popularity: [],//排行数据2
|
||||
Positive: [],//排行数据3
|
||||
recommendRank: [],
|
||||
switch: {
|
||||
'total': '总',
|
||||
'quarter': '季度',
|
||||
},
|
||||
favorableName: '季度',
|
||||
popularityName: '季度',
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getPopularity();
|
||||
this.getPositive();
|
||||
this.getQueryRecommendRank()
|
||||
},
|
||||
methods: {
|
||||
getPopularity() {
|
||||
apiCase.queryPraisesNew(10,this.popularityName == '季度' ? 1 : 2).then(res => {
|
||||
if(res.status == 200) {
|
||||
this.Popularity = res.result
|
||||
}
|
||||
})
|
||||
},
|
||||
getPositive() {
|
||||
apiCase.queryCommentsNew(10,this.favorableName == '季度' ? 1 : 2).then(res => {
|
||||
if(res.status == 200) {
|
||||
this.Positive = res.result
|
||||
}
|
||||
})
|
||||
},
|
||||
getQueryRecommendRank(){
|
||||
apiCase.queryRecommendRank(10).then(res => {
|
||||
if(res.status == 200) {
|
||||
this.recommendRank = res.result
|
||||
}
|
||||
})
|
||||
},
|
||||
imgNumBlue(index){
|
||||
return 'listblue0' + (index+1)
|
||||
},
|
||||
imgNumOrg(index){
|
||||
return (
|
||||
index>2?'listblue0' + (index+1):'list0'+(index+1)
|
||||
)
|
||||
},
|
||||
imgNumPink(index){
|
||||
return (
|
||||
index>2?'listblue0' + (index+1):'listred0'+(index+1)
|
||||
)
|
||||
},
|
||||
positiveReview(e){
|
||||
this.favorableName = this.switch[e]
|
||||
this.getPositive()
|
||||
},
|
||||
popularityReview(e){
|
||||
this.popularityName = this.switch[e]
|
||||
this.getPopularity()
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.el-dropdown-link {
|
||||
cursor: pointer;
|
||||
font-weight: 400;
|
||||
font-size: 14px;
|
||||
color: rgba(51,51,51,0.9);
|
||||
}
|
||||
.el-icon--right{
|
||||
margin-left: 13px !important;
|
||||
}
|
||||
.charts{
|
||||
min-height: 100vh;
|
||||
background-color: #F2F5F7;
|
||||
.charts_header{
|
||||
width: 100%;
|
||||
// height: 240px;
|
||||
background: url('../../../../public/images/headerBack.png') no-repeat;
|
||||
background-size: 100% 100%;
|
||||
padding-bottom: 37px;
|
||||
.text{
|
||||
margin-top: 41px;
|
||||
font-weight: 400;
|
||||
font-size: 340%;
|
||||
color: #FFFFFF;
|
||||
padding-left: 98px;
|
||||
}
|
||||
}
|
||||
.charts_content{
|
||||
padding: 52px 91px 58px;
|
||||
.charts_item{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
.charts_item_box{
|
||||
width: 30%;
|
||||
padding: 30px;
|
||||
background-color: #fff;
|
||||
width: 30%;
|
||||
min-height: 500px;
|
||||
margin-right: 30px;
|
||||
.charts_text{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
height: 40px;
|
||||
align-items: center;
|
||||
.text{
|
||||
font-size: 24px;
|
||||
color: #000000;
|
||||
}
|
||||
}
|
||||
.charts_list{
|
||||
.list{
|
||||
cursor: pointer;
|
||||
margin-top:30px;
|
||||
line-height: 22px;
|
||||
.num{
|
||||
width: 25px;
|
||||
height: 30px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
.text{
|
||||
font-weight: 500;
|
||||
font-size: 14px;
|
||||
color: #677D86;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.charts_bg1{
|
||||
// width: 100%;
|
||||
height: 100%;
|
||||
background: url('../../../../public/images/qa-box.png') no-repeat;
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
.charts_bg2{
|
||||
// width: 100%;
|
||||
height: 100%;
|
||||
background: url('../../../../public/images/list-or.png') no-repeat;
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
.charts_bg3{
|
||||
// width: 100%;
|
||||
height: 100%;
|
||||
background: url('../../../../public/images/list-pink.png') no-repeat;
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
644
src/views/portal/case/Excellent.vue
Normal file
@@ -0,0 +1,644 @@
|
||||
<template>
|
||||
<div class="excellent">
|
||||
<div class="charts_header">
|
||||
<portal-header textColor="#fff"></portal-header>
|
||||
<div class="text">
|
||||
浏览TOP榜单
|
||||
</div>
|
||||
</div>
|
||||
<div class="ex_content">
|
||||
<div class="ex_top">
|
||||
<div class="ex_select">
|
||||
<div class="ex_left">
|
||||
<div style="margin-right: 12px;">
|
||||
<el-select v-model="majorValue" @change="majorChange" placeholder="请选择专业">
|
||||
<el-option
|
||||
v-for="item in speciData"
|
||||
:key="item.name"
|
||||
:label="item.name"
|
||||
:value="item.code">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<div>
|
||||
<el-select v-model="monthValue" @change="monthChange" placeholder="请选择月份">
|
||||
<el-option
|
||||
v-for="item in optionsMonth"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ex_right" @click="goCase">返回</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="caseList.list.length != 0" class="data-content">
|
||||
<div v-for="item in caseList.list" :key="item.id" class="case-list">
|
||||
<div class="case-info" style="padding-bottom: 28px;">
|
||||
<div class="case-info-cont">
|
||||
<div @click="toCaseDetail(item.id, item.refId)" style="cursor: pointer;">
|
||||
<div class="case-info-title">
|
||||
<div class="case-titdiv">
|
||||
<div class="case-tittext">
|
||||
<span class="title-line-ellipsis" v-html="item.title"></span>
|
||||
</div>
|
||||
<!-- <div class="case-activeText" @click.stop="toExcellent(item)">
|
||||
<span v-if="item.breCommend" class="comWords"
|
||||
style="background-color:rgba(232, 139, 72);">荐</span>
|
||||
<span v-if="item.excellent" class="comWords" style="background-color:red;">最佳</span>
|
||||
<span class="comWords" style="background-color:orange">2024年度最佳</span>
|
||||
</div> -->
|
||||
<div class="case-info-date portal-time">
|
||||
<i class="el-icon-time"></i>
|
||||
<time-show :time="item.sysCreateTime"></time-show>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:58px;padding-top:14px ">
|
||||
<author :avatar="item.authorInfo.avatar" :name="item.authorInfo.name" :info="item.authorInfo.orgInfo"
|
||||
:sex="item.authorInfo.sex" :aid="item.authorInfo.aid">
|
||||
<template>
|
||||
<div v-if="item.breCommend"
|
||||
style="padding-top: 6px;flex: 1;display: flex;justify-content: flex-end;color: #999;font-size: 12px;">
|
||||
<span>{{ item.recommendOrgName }}推荐</span>
|
||||
</div>
|
||||
</template>
|
||||
</author>
|
||||
</div>
|
||||
<div @click="toCaseDetail(item.id, item.refId)" style="cursor: pointer;">
|
||||
<div class="keyword-text clearfix">
|
||||
<div style="color:#2974D6;font-weight: 450;" v-if="item.orgDomainParent">
|
||||
{{ orgDomainTranslate(item.orgDomainParent) }}
|
||||
</div>
|
||||
<div style="color:#2974D6;font-weight: 450;" v-for="(item, idx) in item.majorType" :key="idx">
|
||||
{{ majorTypeTranslate(item) }}
|
||||
</div>
|
||||
<div v-if="item.keyword1">{{ item.keyword1 }}</div>
|
||||
<div v-if="item.keyword2">{{ item.keyword2 }}</div>
|
||||
<div v-if="item.keyword3">{{ item.keyword3 }}</div>
|
||||
<div v-if="item.keyword4">{{ item.keyword4 }}</div>
|
||||
<div v-if="item.keyword5">{{ item.keyword5 }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="case-info-summary two-line-ellipsis" @click="toCaseDetail(item.id, item.refId)">
|
||||
{{ item.summary }}
|
||||
</div>
|
||||
<!-- <div style="display: flex;justify-content: flex-end;">
|
||||
<div style="margin:8px 0;">
|
||||
<interactBar :type="3" :data="item" :comments="false" :shares="true"></interactBar>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="caseList.showPagCount > queryCondition.pageSize">
|
||||
<pagination :size="queryCondition.pageSize" :total="caseList.count" :page="queryCondition.pageIndex"
|
||||
layout="total, prev, pager, next, jumper" @change-page="currentChange"></pagination>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pagination-div" v-if="caseList.list.length == 0">
|
||||
<span class="notcoures">
|
||||
<img :src="`${webBaseUrl}/images/nocase.png`" alt="">
|
||||
<h5>暂无案例,请优先学习其它案例吧~</h5>
|
||||
</span>
|
||||
</div>
|
||||
<div v-if="isSeach" style="height:382px">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from "vuex";
|
||||
import portalHeader from "@/components/PortalHeader.vue";
|
||||
import portalFooter from "@/components/PortalFooter.vue";
|
||||
import portalFloatTools from "@/components/PortalFloatTools.vue";
|
||||
import interactBar from "@/components/Portal/interactBar.vue";
|
||||
import timeShow from "@/components/Portal/datetimeShow.vue";
|
||||
import author from "@/components/Portal/authorInfo.vue";
|
||||
import apiCase from "@/api/modules/cases.js";
|
||||
import apiUser from "@/api/system/user.js";
|
||||
import apiSearchterm from "@/api/modules/searchterm.js";
|
||||
import { deepClone } from "../../../utils";
|
||||
import apiDict from "@/api/modules/dict.js";
|
||||
import apiType from "@/api/modules/type.js";
|
||||
import { cutFullName } from "@/utils/tools.js";
|
||||
import apiPlace from "@/api/phase2/place.js"
|
||||
export default {
|
||||
name: 'excellent',
|
||||
components: {
|
||||
portalHeader,
|
||||
portalFooter,
|
||||
portalFloatTools,
|
||||
interactBar,
|
||||
timeShow,
|
||||
author
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
majorId: '',
|
||||
rankMonth: '',
|
||||
optionsMonth:
|
||||
[...Array(12)].map((item,i)=>{
|
||||
return{
|
||||
value: i+1 + '',
|
||||
label: (i+1)+'月'
|
||||
}
|
||||
})
|
||||
,
|
||||
majorValue: '',
|
||||
monthValue: '',
|
||||
caseList: {
|
||||
count: 0,
|
||||
list: [],
|
||||
showPagCount: 0
|
||||
},
|
||||
isSeach: false,
|
||||
domain: [],//组织领域
|
||||
speciData: [],//专业分类
|
||||
treeList:[],
|
||||
queryCondition: {
|
||||
pageIndex: 1,
|
||||
pageSize: 10,
|
||||
majorType: '', //专业分类code
|
||||
excellent: true,
|
||||
keyWord: '',
|
||||
orgDomainDtos: [],
|
||||
caseType: '',
|
||||
authorName: '',
|
||||
notInIds: [],
|
||||
type: 'all',
|
||||
userId: '',
|
||||
parent: '',
|
||||
children: [],
|
||||
name: '',
|
||||
years: [],
|
||||
// 随机
|
||||
notInIds: [],//重复的id
|
||||
orderField: "id",
|
||||
orderAsc: false,//排序
|
||||
sysType1:'',
|
||||
sysType2:'',
|
||||
sysType3:''
|
||||
},
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.majorValue = this.$route.query.majorName
|
||||
this.monthValue = this.$route.query.riseRankTime.split('-')[1] + '月'
|
||||
this.getCaseData()
|
||||
apiCase.majorTypes().then(res=>{
|
||||
this.speciData = res.result;
|
||||
})
|
||||
Promise.all([apiType.treeList(1,Number(this.caseType ?? 155),1), apiCase.majorTypes()]).then(rs => {
|
||||
if (rs[0].code == 200) {
|
||||
const {records} = rs[0].data
|
||||
records.forEach(item => {
|
||||
item.fielclass = false;
|
||||
item.type = 'org_domain';
|
||||
item.list = item.children ? item.children : []
|
||||
if (Array.isArray(item.children)) {
|
||||
item.list.forEach(sub => {
|
||||
sub.list = sub.children ? sub.children : []
|
||||
sub.fielclass = false
|
||||
if (Array.isArray(sub.children)) {
|
||||
sub.list.forEach(three => {
|
||||
three.list = three.children ? three.children : []
|
||||
three.fielclass = false
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
this.domain = records;
|
||||
}
|
||||
if (rs[1].status == 200) {
|
||||
rs[1].result.forEach(item => {
|
||||
item.fielclass = false;
|
||||
item.type = 'major_type';
|
||||
})
|
||||
this.speciData = rs[1].result;
|
||||
}
|
||||
});
|
||||
this.loadTypeData();//加载分类
|
||||
},
|
||||
computed: {
|
||||
tagList() { //列表属性,用于计算
|
||||
let list = [];
|
||||
if (this.keyWord) {
|
||||
list.push({ type: '0', code: 'keyword', name: this.keyWord, checked: true })
|
||||
}
|
||||
this.domain.forEach(one => {
|
||||
var twoChildChecked = false;//是否有下级
|
||||
one.list.forEach(two => {
|
||||
if (two.fielclass) {
|
||||
twoChildChecked = true;
|
||||
}
|
||||
var threeChildChecked = false;
|
||||
two.list.forEach(three => {
|
||||
if (three.fielclass) {
|
||||
list.push(three);
|
||||
threeChildChecked = true;
|
||||
}
|
||||
});
|
||||
if (two.fielclass && !threeChildChecked) {
|
||||
list.push(two);
|
||||
}
|
||||
});
|
||||
if (one.fielclass && !twoChildChecked) {
|
||||
list.push(one);
|
||||
}
|
||||
})
|
||||
this.speciData.forEach(item => {
|
||||
if (item.fielclass) {
|
||||
list.push(item);
|
||||
}
|
||||
});
|
||||
this.treeList.forEach(one => {
|
||||
var twoChildChecked = false;//是否有下级
|
||||
one.children && one.children.forEach(two => {
|
||||
if (two.checked) {
|
||||
twoChildChecked = true;
|
||||
}
|
||||
var threeChildChecked = false;
|
||||
two.children && two.children.forEach(three => {
|
||||
if (three.checked) {
|
||||
list.push(three);
|
||||
threeChildChecked = true;
|
||||
}
|
||||
});
|
||||
if (two.checked && !threeChildChecked) {
|
||||
list.push(two);
|
||||
}
|
||||
});
|
||||
if (one.checked && !twoChildChecked) {
|
||||
list.push(one);
|
||||
}
|
||||
})
|
||||
console.log(list,'计算属性');
|
||||
|
||||
return list;
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
majorChange(e){
|
||||
this.majorId = e
|
||||
this.getCaseData()
|
||||
},
|
||||
monthChange(e){
|
||||
const mon = e.length == 1 ? '0'+e : e
|
||||
const arr = this.$route.query.riseRankTime.split('-')
|
||||
this.rankMonth = arr[0] + '-' + mon + '-' + arr[2]
|
||||
this.getCaseData()
|
||||
},
|
||||
orgDomainTranslate(code) { // 组织领域翻译
|
||||
if (code == '') {
|
||||
return
|
||||
}
|
||||
let name = '';
|
||||
let data = this.domain.find(item => {
|
||||
return item.code == code;
|
||||
});
|
||||
if (data) {
|
||||
name = data.name;
|
||||
}
|
||||
return name;
|
||||
},
|
||||
majorTypeTranslate(code) { // 专业分类翻译
|
||||
let name = '';
|
||||
let data = this.speciData.find(item => item.code == code);
|
||||
if (data) {
|
||||
name = data.name;
|
||||
}
|
||||
return name;
|
||||
},
|
||||
async loadTypeData() {
|
||||
try {
|
||||
const { result, status } = await apiType.tree(1);
|
||||
if (status === 200) {
|
||||
result.forEach(one => {
|
||||
one.checked = false;
|
||||
if(!one.children) one.children = []
|
||||
one.children && one.children.forEach(two => {
|
||||
two.checked = false;
|
||||
if(!two.children) two.children = []
|
||||
two.children && two.children.forEach(three => {
|
||||
three.checked = false;
|
||||
if(!three.children) three.children = []
|
||||
})
|
||||
})
|
||||
})
|
||||
this.treeList = result
|
||||
}
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
},
|
||||
goCase() {
|
||||
this.$router.go(-1);
|
||||
},
|
||||
toCaseDetail(id, refId) {
|
||||
if (refId) {
|
||||
apiCase.startReadTimer(refId)
|
||||
}
|
||||
this.$router.push({ path: '/case/detail', query: { id } });
|
||||
},
|
||||
getAllFielclass() { //获取全部选中的标签
|
||||
let newlist = JSON.parse(JSON.stringify(this.domain))
|
||||
return newlist.filter(one => {
|
||||
one.list = one.list.filter(two => {
|
||||
two.list = two.list.filter(three => {
|
||||
return three.fielclass;
|
||||
})
|
||||
return two.fielclass;
|
||||
});
|
||||
return one.fielclass
|
||||
})
|
||||
},
|
||||
currentChange(val) {
|
||||
this.caseList.showPagCount = 0
|
||||
this.queryCondition.pageIndex = val
|
||||
this.getCaseData()
|
||||
},
|
||||
getCaseUserData(caseList) {
|
||||
let ids = caseList.map((item, index) => {
|
||||
return item.authorId;
|
||||
});
|
||||
//不能为空
|
||||
if (!ids.length) return
|
||||
|
||||
const noReapetIds = [...new Set(ids)];
|
||||
apiUser.getByIds(noReapetIds).then(res => {
|
||||
if (res.status == 200) {
|
||||
caseList.forEach((item, index) => {
|
||||
res.result.some(author => {
|
||||
if (author.aid == item.authorId) {
|
||||
item.authorInfo = author;
|
||||
author.orgInfo = cutFullName(author.orgInfo, 1);
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
});
|
||||
} else {
|
||||
this.$message.error(res.message);
|
||||
}
|
||||
});
|
||||
},
|
||||
async getCaseData() {
|
||||
let majorTypeList = [];
|
||||
let allFielclass = JSON.parse(JSON.stringify(this.getAllFielclass()));
|
||||
// 获取树状id
|
||||
this.queryCondition.orgDomainDtos = allFielclass.map(item => {
|
||||
item.list = item.list.map(two => {
|
||||
two.list = two.list.map(three => {
|
||||
return {
|
||||
parent: three.code
|
||||
}
|
||||
})
|
||||
return {
|
||||
parent: two.code,
|
||||
children: two.list || []
|
||||
}
|
||||
})
|
||||
return {
|
||||
parent: item.code,
|
||||
children: item.list || []
|
||||
}
|
||||
})
|
||||
// 专业分类的id
|
||||
this.tagList.forEach(tag => {
|
||||
if (tag.type == '0') {
|
||||
this.queryCondition.keyWord = tag.name;
|
||||
} else if (tag.type == 'major_type') {
|
||||
majorTypeList.push(tag.code);
|
||||
}
|
||||
});
|
||||
this.queryCondition.majorType = majorTypeList.join(',');
|
||||
this.queryCondition.majorId = this.majorId || this.$route.query.majorId
|
||||
this.queryCondition.rankMonth = (this.rankMonth || this.$route.query.riseRankTime) + ' 00:00:00'
|
||||
await apiCase.queryPopularityOfMajor(this.queryCondition).then((res) => {
|
||||
if (res.status == 200) {
|
||||
if (res.result.length > 0) {
|
||||
this.isSeach = false;
|
||||
res.result.forEach(item => {
|
||||
item.majorType = item.majorType ? item.majorType.split(",") : [];
|
||||
item.isAll = false;
|
||||
item.authorInfo = {
|
||||
aid: "",
|
||||
name: "",
|
||||
orgInfo: "",
|
||||
avatar: "",
|
||||
sex: null
|
||||
};
|
||||
});
|
||||
}
|
||||
console.log(res?.result,'有没有数据');
|
||||
this.caseList.list = res.result
|
||||
if(this.caseList.length == 0){
|
||||
this.isSeach = true
|
||||
}else{
|
||||
this.isSeach = false
|
||||
}
|
||||
this.getCaseUserData(res.result);
|
||||
// 给所有的赋值
|
||||
this.caseList.count = res.result.count;
|
||||
this.caseList.showPagCount = res.result.count;
|
||||
} else {
|
||||
this.$message.error(res.message);
|
||||
}
|
||||
}).catch(err => {
|
||||
console.log(err);
|
||||
});
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.keyword-text {
|
||||
|
||||
div {
|
||||
padding: 0px 8px;
|
||||
margin-top: 5px;
|
||||
float: left;
|
||||
line-height: 24px;
|
||||
font-size: 12px;
|
||||
border-radius: 2px;
|
||||
margin-right: 8px;
|
||||
color: #2C68FF;
|
||||
height: 24px;
|
||||
background: rgba(44, 104, 255, 0.06);
|
||||
}
|
||||
}
|
||||
.case-titdiv {
|
||||
line-height: 30px;
|
||||
display: flex;
|
||||
|
||||
.case-tittext {
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
color: #333333;
|
||||
max-width: 67%;
|
||||
}
|
||||
|
||||
.case-activeText {
|
||||
line-height: 27.5px;
|
||||
|
||||
.comWords {
|
||||
color: white;
|
||||
font-size: 12px;
|
||||
border-radius: 2px;
|
||||
padding: 2px 4px;
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
.excellent{
|
||||
background-color: #F2F5F7;
|
||||
min-height: 100vh;
|
||||
.charts_header{
|
||||
width: 100%;
|
||||
// height: 240px;
|
||||
background: url('../../../../public/images/headerBack.png') no-repeat;
|
||||
background-size: 100% 100%;
|
||||
padding-bottom: 37px;
|
||||
.text{
|
||||
margin-top: 41px;
|
||||
font-weight: 400;
|
||||
font-size: 340%;
|
||||
color: #FFFFFF;
|
||||
padding-left: 98px;
|
||||
}
|
||||
}
|
||||
|
||||
.ex_content{
|
||||
padding: 31px 90px 103px;
|
||||
.ex_top{
|
||||
background-color: #F2F5F7;
|
||||
margin-bottom: 15px;
|
||||
.ex_text{
|
||||
font-size: 20px;
|
||||
color: #fff;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.ex_select{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
.ex_left{
|
||||
display: flex;
|
||||
}
|
||||
.ex_right{
|
||||
width: 71px;
|
||||
height: 38px;
|
||||
background: #2478FF;
|
||||
border-radius: 4px;
|
||||
text-align: center;
|
||||
line-height: 38px;
|
||||
cursor: pointer;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
.data-content {
|
||||
background-color: #fff;
|
||||
padding: 5px 50px;
|
||||
|
||||
::v-deep .interact-bar-btns {
|
||||
.interact-bar-btn {
|
||||
text-align: right;
|
||||
min-width: 78px !important;
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.case-list:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.case-list {
|
||||
border-bottom: 1px solid rgba(153, 153, 153, .2);
|
||||
margin-top: 10px;
|
||||
margin-bottom: 25px;
|
||||
padding-left: 5px;
|
||||
padding-right: 5px;
|
||||
}
|
||||
|
||||
.case-image {
|
||||
width: 230px;
|
||||
height: 170px;
|
||||
float: left;
|
||||
border: 1px solid #eee;
|
||||
}
|
||||
|
||||
.case-info {
|
||||
.case-info-cont {
|
||||
.case-info-title {
|
||||
font-size: 15px;
|
||||
color: #333;
|
||||
font-weight: 600;
|
||||
height: 30px;
|
||||
|
||||
.case-info-date {
|
||||
flex: 1;
|
||||
text-align: right;
|
||||
font-weight: normal;
|
||||
|
||||
// font-size: 12px;
|
||||
// height: 30px;
|
||||
// font-weight: 200;
|
||||
// color: #8590a6;
|
||||
i {
|
||||
margin-right: 5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.case-info-summary {
|
||||
margin-top: 16px;
|
||||
cursor: pointer;
|
||||
margin-bottom: 5px;
|
||||
word-break: break-all;
|
||||
line-height: 24px;
|
||||
font-size: 14px;
|
||||
color: #333330;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.case-info-tools {
|
||||
height: 30px;
|
||||
|
||||
.case-info-tools-auth {
|
||||
float: left;
|
||||
font-size: 13px;
|
||||
color: #999999;
|
||||
|
||||
img {
|
||||
margin-right: 10px;
|
||||
width: 30px;
|
||||
border: 1px solid #eee;
|
||||
border-radius: 50%;
|
||||
vertical-align: middle;
|
||||
}
|
||||
}
|
||||
|
||||
.case-info-tools-btns {
|
||||
float: right;
|
||||
|
||||
.case-info-tools-btn {
|
||||
margin: 0 0 0 15px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -139,23 +139,53 @@
|
||||
<div style="height:30px;background-color:#f6f7fc;"></div>
|
||||
<div class="order-div" style="border-bottom:none">
|
||||
<span class="quyer-tag">
|
||||
<el-button type="text" class="order-class" @click="searchexcellent('all')"
|
||||
:class="{ actice: queryCondition.type == 'all' }">全部</el-button>
|
||||
<el-button type="text" class="order-class" @click="searchexcellent('excellent')"
|
||||
:class="{ actice: queryCondition.type == 'excellent' }">最佳案例</el-button>
|
||||
:class="{ actice: queryCondition.type == 'excellent' }">年度最佳</el-button>
|
||||
<el-button type="text" class="order-class" @click="searchexcellent('recommend')"
|
||||
:class="{ actice: queryCondition.type == 'recommend' }">推荐案例</el-button>
|
||||
<el-button type="text" class="order-class" @click="searchexcellent('hot')"
|
||||
<!-- <el-button type="text" class="order-class" @click="searchexcellent('hot')"
|
||||
:class="{ actice: queryCondition.type == 'hot' }">最热</el-button>
|
||||
<el-button type="text" class="order-class" @click="searchexcellent('new')"
|
||||
:class="{ actice: queryCondition.type == 'new' }">最新</el-button>
|
||||
:class="{ actice: queryCondition.type == 'new' }">最新</el-button> -->
|
||||
</span>
|
||||
<div style="flex: 1; display: flex; justify-content: flex-end;align-items: center;">
|
||||
<div style="margin-right: 20px;color: #6E7B84;font-size: 14px;">当前已检索 <span style="color:#387DF7;">
|
||||
{{ caseList.count }}</span> 条数据</div>
|
||||
<!-- <div style="margin-right: 20px;color: #6E7B84;font-size: 14px;">当前已检索 <span style="color:#387DF7;">
|
||||
{{ caseList.count }}</span> 条数据</div> -->
|
||||
<div class="pub_time" @click="searchTime">
|
||||
<div class="text">发布时间</div>
|
||||
<div class="triangle">
|
||||
<div :style="{borderBottomColor:pubTimeNum===2?'#387DF7':'#DCDFE6'}" class="up-triangle"></div>
|
||||
<div :style="{borderTopColor:pubTimeNum===1?'#387DF7':'#DCDFE6'}" class="down-triangle"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pub_time" @click="searchPageView">
|
||||
<div class="text">浏览量</div>
|
||||
<div class="triangle">
|
||||
<div :style="{borderBottomColor:pageViewNum===2?'#387DF7':'#DCDFE6'}" class="up-triangle"></div>
|
||||
<div :style="{borderTopColor:pageViewNum===1?'#387DF7':'#DCDFE6'}" class="down-triangle"></div>
|
||||
</div>
|
||||
</div>
|
||||
<el-select v-model="years" multiple collapse-tags
|
||||
style="margin-left: 20px; width: 147px; border-radius:20px !important;" placeholder="全部年份">
|
||||
style=" width: 147px; border-radius:20px !important;" placeholder="全部年份">
|
||||
<el-option v-for="item in caseYears" :key="item.value" :label="item.label" :value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
<div :class="queryCondition.type == 'collect' ? 'collect_active': 'collect'" @click="searchexcellent('collect')">
|
||||
<div class="png"></div>
|
||||
<div class="text">收藏案例</div>
|
||||
</div>
|
||||
<div :class="queryCondition.type == 'time' ? 'time_active': 'time'" @click="searchexcellent('time')">
|
||||
<div class="png"></div>
|
||||
<div class="text">浏览记录</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="back_num">
|
||||
<div class="search_div_num">
|
||||
当前已检索 <span style="color:#FF4040 ;">
|
||||
{{ caseList.count }}</span> 条数据
|
||||
</div>
|
||||
</div>
|
||||
<div class="data-content">
|
||||
@@ -170,9 +200,15 @@
|
||||
<span class="title-line-ellipsis" v-html="item.title"></span>
|
||||
</div>
|
||||
<div class="case-activeText">
|
||||
<span v-if="item.breCommend" class="comWords"
|
||||
<!-- <span v-if="item.breCommend" class="comWords"
|
||||
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: 3px 12px 4px 9px;">
|
||||
{{item.excellentTag}}
|
||||
</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: 3px 12px 4px 9px;">
|
||||
{{tag.tagName}}
|
||||
</span>
|
||||
</div>
|
||||
<div class="case-info-date portal-time">
|
||||
<i class="el-icon-time"></i>
|
||||
@@ -184,7 +220,7 @@
|
||||
<!-- </router-link> -->
|
||||
<div style="height:58px;padding-top:14px ">
|
||||
<author :avatar="item.authorInfo.avatar" :name="item.authorInfo.name" :info="item.authorInfo.orgInfo"
|
||||
:sex="item.authorInfo.sex" :aid="item.authorInfo.aid">
|
||||
:sex="item.authorInfo.sex" :authorTags="item.authorTags" :aid="item.authorInfo.aid">
|
||||
<template>
|
||||
<div v-if="item.breCommend"
|
||||
style="padding-top: 6px;flex: 1;display: flex;justify-content: flex-end;color: #999;font-size: 12px;">
|
||||
@@ -250,13 +286,28 @@
|
||||
</div>
|
||||
<!-- 打开排行榜 -->
|
||||
<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 class="portal-ranking ranking-bg">
|
||||
<p class="ranking-title">好评榜</p>
|
||||
<div style="display: flex;justify-content: space-between;">
|
||||
<p class="ranking-title">好评榜</p>
|
||||
<el-dropdown trigger="click" @command="positiveReview">
|
||||
<span class="el-dropdown-link">
|
||||
{{favorableName}}<i class="el-icon-arrow-down el-icon--right"></i>
|
||||
</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:30px;line-height: 22px;">
|
||||
<router-link :to="'/case/detail?id=' + item.id">
|
||||
<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>
|
||||
@@ -266,23 +317,34 @@
|
||||
<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">
|
||||
<!-- <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.title }}</span>
|
||||
</span> -->
|
||||
<span class="portal-title-desc" style="font-size: 14px;">{{ item.caseTitle }}</span>
|
||||
</router-link>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="portal-ranking ranking-bg1" style="margin-top:26px">
|
||||
<p class="ranking-title">人气榜</p>
|
||||
<div style="display: flex;justify-content: space-between;">
|
||||
<p class="ranking-title">人气榜</p>
|
||||
<el-dropdown trigger="click" @command="popularityReview">
|
||||
<span class="el-dropdown-link">
|
||||
{{popularityName}}<i class="el-icon-arrow-down el-icon--right"></i>
|
||||
</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 Popularity" :key="index" class="title-line-ellipsis"
|
||||
style="cursor: pointer;margin-top:30px;line-height: 22px;">
|
||||
<router-link :to="'/case/detail?id=' + item.id">
|
||||
<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>
|
||||
@@ -298,7 +360,27 @@
|
||||
<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.title }}</span>
|
||||
<span class="portal-title-desc" style="font-size: 14px;">{{ item.caseTitle }}</span>
|
||||
</router-link>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div 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>
|
||||
@@ -399,6 +481,14 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
switch: {
|
||||
'total': '总',
|
||||
'quarter': '季度',
|
||||
},
|
||||
favorableName: '季度',
|
||||
popularityName: '季度',
|
||||
pubTimeNum: 0,
|
||||
pageViewNum: 0,
|
||||
twoId:'',
|
||||
treeList:[],
|
||||
caseType:process.env.VUE_APP_CASE_TYPE,//类型
|
||||
@@ -427,6 +517,7 @@ export default {
|
||||
ankingList: [],//排行数据1
|
||||
Popularity: [],//排行数据2
|
||||
Positive: [],//排行数据3
|
||||
recommendRank: [],
|
||||
protocolDialogVisible: false,
|
||||
protocolConfirmButton: true,
|
||||
years: [],
|
||||
@@ -443,7 +534,7 @@ export default {
|
||||
caseType: '',
|
||||
authorName: '',
|
||||
notInIds: [],
|
||||
type: 'excellent',
|
||||
type: 'all',
|
||||
userId: '',
|
||||
parent: '',
|
||||
children: [],
|
||||
@@ -724,6 +815,7 @@ export default {
|
||||
//打开排行榜下边的两个
|
||||
this.getPopularity();
|
||||
this.getPositive();
|
||||
this.getQueryRecommendRank()
|
||||
this.couresreso();
|
||||
// window.addEventListener("scroll", this.handleScroll);
|
||||
// 获取年
|
||||
@@ -735,6 +827,14 @@ export default {
|
||||
|
||||
},
|
||||
methods: {
|
||||
positiveReview(e){
|
||||
this.favorableName = this.switch[e]
|
||||
this.getPositive()
|
||||
},
|
||||
popularityReview(e){
|
||||
this.popularityName = this.switch[e]
|
||||
this.getPopularity()
|
||||
},
|
||||
handleType(msg){
|
||||
this.queryCondition.type = msg
|
||||
},
|
||||
@@ -818,6 +918,9 @@ export default {
|
||||
}
|
||||
this.$router.push({ path: '/case/detail', query: { id } });
|
||||
},
|
||||
toExcellent(item){
|
||||
this.$router.push({path:'/case/excellent',query:{majorId:item.majorId,majorName:item.majorName,riseRankTime:item.riseRankTime.split(' ')[0]}})
|
||||
},
|
||||
tylClick() {
|
||||
window.open("https://m.qingxuetang.com/x/?appId=qxtcorp306130");
|
||||
},
|
||||
@@ -1046,14 +1149,14 @@ export default {
|
||||
// }
|
||||
// });
|
||||
// },
|
||||
getPositive() {
|
||||
apiCase.queryComments(5).then(res => {
|
||||
if (res.status == 200) {
|
||||
this.Positive = res.result;
|
||||
console.log(res);
|
||||
}
|
||||
});
|
||||
},
|
||||
// getPositive() {
|
||||
// apiCase.queryComments(5).then(res => {
|
||||
// if (res.status == 200) {
|
||||
// this.Positive = res.result;
|
||||
// console.log(res);
|
||||
// }
|
||||
// });
|
||||
// },
|
||||
// 无用
|
||||
async getdomain() {
|
||||
let key = "org_domain";
|
||||
@@ -1119,6 +1222,30 @@ export default {
|
||||
this.isSeach = true;
|
||||
this.search(true);
|
||||
},
|
||||
searchTime(){
|
||||
this.pubTimeNum++
|
||||
if(this.pubTimeNum>2){
|
||||
this.pubTimeNum = 0;
|
||||
}
|
||||
if(this.pubTimeNum != 0){
|
||||
this.pageViewNum = 0;
|
||||
}
|
||||
this.queryCondition.orderField = 'sysCreateTime'
|
||||
this.queryCondition.orderAsc = this.pubTimeNum == 2 ? true : this.pubTimeNum == 1 ? false : ''
|
||||
this.search(true);
|
||||
},
|
||||
searchPageView(){
|
||||
this.pageViewNum++
|
||||
if(this.pageViewNum>2){
|
||||
this.pageViewNum = 0;
|
||||
}
|
||||
if(this.pageViewNum != 0){
|
||||
this.pubTimeNum = 0;
|
||||
}
|
||||
this.queryCondition.orderField = 'views'
|
||||
this.queryCondition.orderAsc = this.pageViewNum == 2 ? true : this.pageViewNum == 1 ? false : ''
|
||||
this.search(true);
|
||||
},
|
||||
searchexcellent(num) {
|
||||
if(this.queryCondition.type==num){
|
||||
this.queryCondition.excellent =false;
|
||||
@@ -1289,6 +1416,74 @@ export default {
|
||||
// this.caseList.list = [];
|
||||
// }
|
||||
this.moreState = 2;
|
||||
// this.queryCondition.pubTimeNum = this.pubTimeNum
|
||||
// this.queryCondition.pageViewNum = this.pageViewNum
|
||||
if(this.queryCondition.type == 'collect'){
|
||||
const params = {
|
||||
pageIndex:this.queryCondition.pageIndex,
|
||||
pageSize:10,
|
||||
orderField:this.queryCondition.orderField,
|
||||
orderAsc:this.queryCondition.orderAsc
|
||||
}
|
||||
await apiCase.queryFavoriteCaseOfIndex(params).then(res=>{
|
||||
if(res.status == 200){
|
||||
if(res.result.list.length > 0){
|
||||
this.isSeach = false;
|
||||
res.result.list.forEach(item => {
|
||||
item.majorType = item.majorType ? item.majorType.split(",") : [];
|
||||
item.isAll = false;
|
||||
item.authorInfo = {
|
||||
aid: "",
|
||||
name: "",
|
||||
orgInfo: "",
|
||||
avatar: "",
|
||||
sex: null
|
||||
};
|
||||
});
|
||||
this.caseList.list = res.result.list
|
||||
console.log(res.result.list ,'有没有1111数据')
|
||||
this.getCaseUserData(res.result.list);
|
||||
// 给所有的赋值
|
||||
this.caseList.count = res.result.count;
|
||||
this.caseList.showPagCount = res.result.count;
|
||||
}
|
||||
}
|
||||
})
|
||||
return
|
||||
}
|
||||
if(this.queryCondition.type=='time'){
|
||||
const data = {
|
||||
pageIndex: this.queryCondition.pageIndex,
|
||||
pageSize: 10,
|
||||
contentType: 3,
|
||||
aid: this.userInfo.aid || '965628977500655616',
|
||||
hidden: '',
|
||||
}
|
||||
await apiCase.queryViewRecord(data).then(res=>{
|
||||
if(res.status == 200){
|
||||
if(res.result.list.length > 0){
|
||||
this.isSeach = false;
|
||||
res.result.list.forEach(item => {
|
||||
item.majorType = item.majorType ? item.majorType.split(",") : [];
|
||||
item.isAll = false;
|
||||
item.authorInfo = {
|
||||
aid: "",
|
||||
name: "",
|
||||
orgInfo: "",
|
||||
avatar: "",
|
||||
sex: null
|
||||
};
|
||||
});
|
||||
this.caseList.list = res.result.list
|
||||
this.getCaseUserData(res.result.list);
|
||||
// 给所有的赋值
|
||||
this.caseList.count = res.result.count;
|
||||
this.caseList.showPagCount = res.result.count;
|
||||
}
|
||||
}
|
||||
})
|
||||
return
|
||||
}
|
||||
await apiCase.queryListV2(this.queryCondition).then((res) => {
|
||||
if (res.status == 200) {
|
||||
if (res.result.list.length > 0) {
|
||||
@@ -1465,40 +1660,58 @@ export default {
|
||||
});
|
||||
},
|
||||
getPopularity() {
|
||||
apiCase.queryPraises(5).then(res => {
|
||||
if (res.status == 200) {
|
||||
this.Popularity = res.result;
|
||||
if (res.result.length < 5) {
|
||||
for (let i = 0; i = (5 - res.result.length); i++) {
|
||||
this.Popularity.push({
|
||||
authorName: '',
|
||||
count: 1,
|
||||
id: '',
|
||||
title: '',
|
||||
})
|
||||
}
|
||||
}
|
||||
// apiCase.queryPraises(5).then(res => {
|
||||
// if (res.status == 200) {
|
||||
// this.Popularity = res.result.slice(0,3);
|
||||
// // if (res.result.length < 5) {
|
||||
// // for (let i = 0; i = (5 - res.result.length); i++) {
|
||||
// // this.Popularity.push({
|
||||
// // authorName: '',
|
||||
// // count: 1,
|
||||
// // id: '',
|
||||
// // title: '',
|
||||
// // })
|
||||
// // }
|
||||
// // }
|
||||
|
||||
// }
|
||||
// });
|
||||
apiCase.queryPraisesNew(3,this.popularityName == '季度' ? 1 : 2).then(res => {
|
||||
if(res.status == 200) {
|
||||
this.Popularity = res.result
|
||||
}
|
||||
});
|
||||
})
|
||||
},
|
||||
getPositive() {
|
||||
apiCase.queryComments(5).then(res => {
|
||||
if (res.status == 200) {
|
||||
this.Positive = res.result;
|
||||
if (res.result.length < 5) {
|
||||
for (let i = 0; i = (5 - res.result.length); i++) {
|
||||
this.Positive.push({
|
||||
authorName: '',
|
||||
count: 1,
|
||||
id: '',
|
||||
title: '',
|
||||
})
|
||||
}
|
||||
// apiCase.queryComments(5).then(res => {
|
||||
// if (res.status == 200) {
|
||||
// this.Positive = res.result.slice(0,3);
|
||||
// // if (res.result.length < 5) {
|
||||
// // for (let i = 0; i = (5 - res.result.length); i++) {
|
||||
// // this.Positive.push({
|
||||
// // authorName: '',
|
||||
// // count: 1,
|
||||
// // id: '',
|
||||
// // title: '',
|
||||
// // })
|
||||
// // }
|
||||
|
||||
}
|
||||
// // }
|
||||
// }
|
||||
// });
|
||||
apiCase.queryCommentsNew(3,this.favorableName == '季度' ? 1 : 2).then(res => {
|
||||
if(res.status == 200) {
|
||||
this.Positive = res.result
|
||||
}
|
||||
});
|
||||
})
|
||||
},
|
||||
|
||||
getQueryRecommendRank(){
|
||||
apiCase.queryRecommendRank(3).then(res => {
|
||||
if(res.status == 200) {
|
||||
this.recommendRank = res.result
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
jumpRouter(item) {
|
||||
@@ -1510,6 +1723,41 @@ export default {
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.el-dropdown-link {
|
||||
cursor: pointer;
|
||||
font-weight: 400;
|
||||
font-size: 14px;
|
||||
color: rgba(51,51,51,0.9);
|
||||
}
|
||||
.el-icon--right{
|
||||
margin-left: 14px !important;
|
||||
}
|
||||
.the_charts{
|
||||
position: relative;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin-bottom: 10px;
|
||||
font-size: 18px;
|
||||
max-width: 400px;
|
||||
min-width: 300px;
|
||||
height: 67px;
|
||||
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%);
|
||||
}
|
||||
|
||||
}
|
||||
// 课程分类
|
||||
.course-title-style {
|
||||
position: relative;
|
||||
@@ -2095,8 +2343,175 @@ export default {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
// margin-bottom: ;
|
||||
.pub_time{
|
||||
display: flex;
|
||||
margin-right: 25px;
|
||||
align-items: center;
|
||||
cursor: pointer;
|
||||
.text{
|
||||
font-size: 14px;
|
||||
color: #333333;
|
||||
}
|
||||
.triangle{
|
||||
margin-left: 5px;
|
||||
.up-triangle{
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-left: 4px solid transparent;
|
||||
border-right: 4px solid transparent;
|
||||
border-bottom: 6px solid #DCDFE6;
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
.down-triangle{
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-left: 4px solid transparent;
|
||||
border-right: 4px solid transparent;
|
||||
border-top: 6px solid #DCDFE6;
|
||||
}
|
||||
}
|
||||
}
|
||||
.time{
|
||||
position: relative;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin-left: 15px;
|
||||
width: 116px;
|
||||
height: 38px;
|
||||
border-radius: 4px;
|
||||
// background: #04243C;
|
||||
&:hover{
|
||||
background: #387DF7;
|
||||
.text{
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
.png{
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
background: url('../../../../public/images/browse.png') no-repeat;
|
||||
background-size: 100%;
|
||||
margin-right: 9px;
|
||||
}
|
||||
.text{
|
||||
font-size: 14px;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
.time::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: #04243C;
|
||||
opacity: 0.05;
|
||||
z-index: 1;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.time_active{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin-left: 15px;
|
||||
width: 116px;
|
||||
height: 38px;
|
||||
background: #387DF7;
|
||||
border-radius: 4px;
|
||||
.png{
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
background: url('../../../../public/images/browse.png') no-repeat;
|
||||
background-size: 100%;
|
||||
margin-right: 9px;
|
||||
}
|
||||
.text{
|
||||
font-size: 14px;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
.collect{
|
||||
position: relative;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin-left: 15px;
|
||||
width: 116px;
|
||||
height: 38px;
|
||||
border-radius: 4px;
|
||||
// background: #04243C;
|
||||
&:hover{
|
||||
background: #387DF7;
|
||||
.text{
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
.png{
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
background: url('../../../../public/images/collect.png') no-repeat;
|
||||
background-size: 100%;
|
||||
margin-right: 9px;
|
||||
}
|
||||
.text{
|
||||
font-size: 14px;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
.collect::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: #04243C;
|
||||
opacity: 0.05;
|
||||
z-index: 1;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.collect_active{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin-left: 15px;
|
||||
width: 116px;
|
||||
height: 38px;
|
||||
background: #387DF7;
|
||||
border-radius: 4px;
|
||||
.png{
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
background: url('../../../../public/images/collect.png') no-repeat;
|
||||
background-size: 100%;
|
||||
margin-right: 9px;
|
||||
}
|
||||
.text{
|
||||
font-size: 14px;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.back_num{
|
||||
background: #FFFFFF;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
padding: 0 40px;
|
||||
.search_div_num{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
height: 38px;
|
||||
background: #DDEDFF;
|
||||
border-radius: 4px;
|
||||
border: 1px solid #387DF7;
|
||||
color: #387DF7;
|
||||
}
|
||||
}
|
||||
.data-content {
|
||||
background-color: #fff;
|
||||
padding: 5px 50px;
|
||||
|
||||
@@ -369,6 +369,7 @@
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tentative: false,
|
||||
isContentTypeTwo: null,
|
||||
isContentType: null,
|
||||
activeId: '',
|
||||
@@ -660,7 +661,7 @@
|
||||
},
|
||||
//替换播放区域
|
||||
changePlayRes(r,item){
|
||||
|
||||
this.tentative = false;
|
||||
if(this.appendStudyOtherHandle!=null){
|
||||
window.clearTimeout(this.appendStudyOtherHandle);
|
||||
}
|
||||
@@ -1514,6 +1515,7 @@
|
||||
});
|
||||
},
|
||||
saveStudyInfo() {
|
||||
this.tentative = true
|
||||
if(this.isContentType){
|
||||
if(this.isContentType != this.contentData.contentType){
|
||||
//定时器产生的,不记录
|
||||
@@ -1707,7 +1709,7 @@
|
||||
finishStudyItem() { //设置完成学习的内容,针对于音视频的内容
|
||||
if (!this.contentData.studyItemId) {
|
||||
//这种可能没有,不过这里也是为了万中那个1
|
||||
this.saveStudyInfo();
|
||||
!this.tentative && this.saveStudyInfo();
|
||||
} else {
|
||||
let params = {
|
||||
itemId: this.contentData.studyItemId,
|
||||
|
||||