|
|
@ -62,6 +62,10 @@ |
|
|
|
<el-button type="text" size="small" @click="updateHandle(scope.row)">编辑活动</el-button> |
|
|
|
<el-button type="text" size="small" @click="pullHandle(scope.row)">新闻发稿</el-button> |
|
|
|
</div> |
|
|
|
<div> |
|
|
|
<el-button v-if="scope.row.topFlag === 0" type="text" size="small" @click="top(scope.row.id, '1')">{{ '置顶' }}</el-button> |
|
|
|
<el-button v-if="scope.row.topFlag === 1" type="text" size="small" @click="top(scope.row.id, '0')">{{ '取消置顶' }}</el-button> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
@ -189,6 +193,31 @@ export default { |
|
|
|
updateHandle (row) { |
|
|
|
this.$parent.selectComponent = 'ActInfoAdd' |
|
|
|
this.$router.push({ path: '/heart-actinfo', query: { id: row.id } }) |
|
|
|
}, |
|
|
|
top (id, topFlag) { |
|
|
|
let title = '置顶' |
|
|
|
if (topFlag === '0') { |
|
|
|
title = '取消置顶' |
|
|
|
} |
|
|
|
this.$confirm(this.$t('prompt.info', { 'handle': title }), this.$t(title), { |
|
|
|
confirmButtonText: this.$t('confirm'), |
|
|
|
cancelButtonText: this.$t('cancel'), |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
this.$http['post']('/heart/actinfo/top', { 'actId': id, 'topFlag': topFlag }).then(({ data: res }) => { |
|
|
|
if (res.code !== 0) { |
|
|
|
return this.$message.error(res.msg) |
|
|
|
} |
|
|
|
this.$message({ |
|
|
|
message: this.$t('prompt.success'), |
|
|
|
type: 'success', |
|
|
|
duration: 500, |
|
|
|
onClose: () => { |
|
|
|
} |
|
|
|
}) |
|
|
|
this.getDataList() |
|
|
|
}).catch(() => {}) |
|
|
|
}).catch(() => {}) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|