This commit is contained in:
zhangsir
2024-09-11 16:07:27 +08:00
parent 1278260812
commit f39a1417b6
6 changed files with 191 additions and 72 deletions

View File

@@ -52,7 +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 style="margin:0 5px" type="text" v-if="scope.row.recommendRank === ''" @click="suggest(scope.row)" icon="el-icon-medal">榜单推荐</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>
@@ -167,7 +167,7 @@
<el-drawer
title="推荐榜单"
:visible.sync="RankingShow"
size="70%">
size="80%">
<div style="padding: 10px 20px 80px">
<el-table :data="tableData" border stripe>
<el-table-column
@@ -175,16 +175,16 @@
width="50"
label="排序">
</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 show-overflow-tooltip label="案例标题" prop="caseTitle"></el-table-column>
<el-table-column width="150px" label="作者名称" prop="caseAuthor"></el-table-column>
<el-table-column width="150px" label="上榜人" prop="caseAuthor"></el-table-column>
<el-table-column width="250px" 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 style="margin:0 5px" type="text" @click="handleNotRank(scope.row)" icon="el-icon-delete">取消推荐</el-button>
<el-button style="margin:0 5px" type="text" @click="moveUp(scope.row,scope.$index)" icon="el-icon-top">上移排序</el-button>
<el-button style="margin:0 5px" type="text" @click="moveDown(scope.row,scope.$index)" icon="el-icon-bottom">下移排序</el-button>
</el-button-group>
</template>
</el-table-column>
@@ -285,6 +285,10 @@ export default {
return name;
},
suggest(record){
if(this.tableData.length == 10){
this.$message.error('最多推荐10个')
return
}
this.$confirm('你确认要推荐此案例么?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
@@ -292,11 +296,10 @@ export default {
}).then(() => {
apiCase.riseIntoRank({caseId:record.id}).then(res=>{
if(res.status == 200 ){
this.$message.success('成功')
this.$message.success('推荐成功')
this.getData()
this.getList()
}
}).catch(()=>{
this.$message.error('失败')
})
})
},
@@ -338,7 +341,7 @@ export default {
arr.splice(index2, 0, temp);
},
getList(){
apiCase.getQueryRecommendRank({pageSize:3}).then(res=>{
apiCase.getQueryRecommendRank({pageSize:10}).then(res=>{
console.log(res,'res')
if(res.status == 200){
this.tableData = res.result