|
|
@ -38,7 +38,8 @@ |
|
|
|
type="primary" |
|
|
|
icon="el-icon-edit" |
|
|
|
@click="handleCreate" |
|
|
|
>添加文章</el-button> |
|
|
|
>添加文章</el-button |
|
|
|
> |
|
|
|
</div> |
|
|
|
<el-table |
|
|
|
:key="tableKey" |
|
|
@ -163,9 +164,7 @@ import { |
|
|
|
delSubjectArticle, |
|
|
|
} from "@/api/subject"; |
|
|
|
|
|
|
|
import { |
|
|
|
searchArticle, |
|
|
|
} from "@/api/ad"; |
|
|
|
import { searchArticle } from "@/api/ad"; |
|
|
|
|
|
|
|
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination |
|
|
|
|
|
|
@ -181,7 +180,7 @@ export default { |
|
|
|
listQuery: { |
|
|
|
page: 1, |
|
|
|
limit: 20, |
|
|
|
special_id: undefined |
|
|
|
special_id: undefined, |
|
|
|
}, |
|
|
|
subject: [], |
|
|
|
uploadAction: process.env.VUE_APP_BASE_API + "/files/uploadFile", |
|
|
@ -208,7 +207,7 @@ export default { |
|
|
|
}; |
|
|
|
}, |
|
|
|
created() { |
|
|
|
this.getSubjectList() |
|
|
|
this.getSubjectList(); |
|
|
|
this.getList(); |
|
|
|
}, |
|
|
|
filters: { |
|
|
@ -285,17 +284,19 @@ export default { |
|
|
|
// } |
|
|
|
// }) |
|
|
|
}, |
|
|
|
handleDelete({ article_title, article_id, special_id }) { |
|
|
|
this.$confirm('是否确认删除名称为"' + article_title + '"的数据项?', "警告", { |
|
|
|
async handleDelete({ article_title, article_id, special_id }) { |
|
|
|
let confirm = this.$confirm( |
|
|
|
'是否确认删除名称为"' + article_title + '"的数据项?', |
|
|
|
"警告", |
|
|
|
{ |
|
|
|
confirmButtonText: "确定", |
|
|
|
cancelButtonText: "取消", |
|
|
|
type: "warning", |
|
|
|
}) |
|
|
|
.then(function () { |
|
|
|
return delSubjectArticle({ article_id, special_id }); |
|
|
|
}) |
|
|
|
.then((response) => { |
|
|
|
if (response.code === 200) { |
|
|
|
} |
|
|
|
); |
|
|
|
console.log(1); |
|
|
|
let r = await delSubjectArticle({ article_id, special_id }); |
|
|
|
if (r.code === 200) { |
|
|
|
this.$message({ |
|
|
|
message: "删除成功", |
|
|
|
type: "success", |
|
|
@ -310,8 +311,6 @@ export default { |
|
|
|
duration: 2 * 1000, |
|
|
|
}); |
|
|
|
} |
|
|
|
}) |
|
|
|
.catch(function () {}); |
|
|
|
}, |
|
|
|
|
|
|
|
handleSelectBranch(item) { |
|
|
|