智能算法添加置顶按钮

This commit is contained in:
a0049873 2022-08-15 14:36:54 +08:00
parent c4597f6cbd
commit 91d3622d77
1 changed files with 22 additions and 5 deletions

View File

@ -129,13 +129,13 @@
width="150"
>
<template slot-scope="scope">
<!-- <el-button
v-if="$hasPermission('ability:bsabilityai:update')"
<el-button
v-if="scope.row.infoList.filter(val=>val.attrType=='组件类型')[0].attrValue == '智能算法'"
type="text"
size="small"
@click="UpdateHandle(scope.row)"
>{{ $t("update") }}</el-button
> -->
@click="toppingCapacity(scope.row)"
>置顶</el-button
>
<el-button
v-if="$hasPermission('ability:bsabilityai:update')"
type="text"
@ -314,6 +314,23 @@ export default {
// this.fullScreen()
},
methods: {
//
toppingCapacity (item) {
this.$http.put('/resource/pin_top/' + item.id).then(res => {
console.log('置顶', res.data.code)
if (res.data.code == 0) {
this.$message({
message: '置顶成功',
type: 'success'
})
} else {
this.$message({
message: '置顶失败',
type: 'warning'
})
}
})
},
reset () {
this.$http
.get(