|
@@ -54,6 +54,9 @@
|
|
|
<el-table-column align="center" prop="ctime" label="创建时间" />
|
|
|
<el-table-column align="center" prop="date" label="操作">
|
|
|
<template slot-scope="scope">
|
|
|
+ <el-button @click="pushArticle(scope.row)" size="mini" type="primary"
|
|
|
+ >推送</el-button
|
|
|
+ >
|
|
|
<el-button @click="handleEdit(scope.row)" size="mini" type="warning"
|
|
|
>编辑</el-button
|
|
|
>
|
|
@@ -203,6 +206,19 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
+ pushArticle(row){
|
|
|
+ this.$confirm("确认推送该文章给所有用户?", "提示", {
|
|
|
+ type: "warning",
|
|
|
+ }).then(() => {
|
|
|
+ this.$api.pushArticle({ id: row.id }).then((res) => {
|
|
|
+ this.$message({
|
|
|
+ message: "推送成功",
|
|
|
+ type: "success",
|
|
|
+ });
|
|
|
+ this.getData();
|
|
|
+ });
|
|
|
+ });
|
|
|
+ }
|
|
|
},
|
|
|
created() {
|
|
|
this.getData();
|