智能算法添加置顶按钮

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" width="150"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<!-- <el-button <el-button
v-if="$hasPermission('ability:bsabilityai:update')" v-if="scope.row.infoList.filter(val=>val.attrType=='组件类型')[0].attrValue == '智能算法'"
type="text" type="text"
size="small" size="small"
@click="UpdateHandle(scope.row)" @click="toppingCapacity(scope.row)"
>{{ $t("update") }}</el-button >置顶</el-button
> --> >
<el-button <el-button
v-if="$hasPermission('ability:bsabilityai:update')" v-if="$hasPermission('ability:bsabilityai:update')"
type="text" type="text"
@ -314,6 +314,23 @@ export default {
// this.fullScreen() // this.fullScreen()
}, },
methods: { 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 () { reset () {
this.$http this.$http
.get( .get(