Compare commits
2 Commits
18a119af78
...
e215955bfa
Author | SHA1 | Date | |
---|---|---|---|
e215955bfa | |||
d759204350 |
1
inspur-ui/src/assets/icons/svg/delete.svg
Normal file
1
inspur-ui/src/assets/icons/svg/delete.svg
Normal file
@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1715389460528" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1509" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M0 136.594286m70.034286 0l883.931428 0q70.034286 0 70.034286 70.034285l0 61.074286q0 70.034286-70.034286 70.034286l-883.931428 0q-70.034286 0-70.034286-70.034286l0-61.074286q0-70.034286 70.034286-70.034285Z" fill="#333333" p-id="1510"></path><path d="M685.714286 146.285714h-73.142857V73.142857h-201.142858v73.142857h-73.142857V73.142857a73.142857 73.142857 0 0 1 73.142857-73.142857h201.142858a73.142857 73.142857 0 0 1 73.142857 73.142857zM164.571429 274.285714v676.571429a73.142857 73.142857 0 0 0 73.142857 73.142857h548.571428a73.142857 73.142857 0 0 0 73.142857-73.142857V274.285714z m233.142857 521.142857a36.571429 36.571429 0 0 1-73.142857 0v-329.142857a36.571429 36.571429 0 0 1 73.142857 0z m155.428571 0a36.571429 36.571429 0 0 1-73.142857 0v-329.142857a36.571429 36.571429 0 0 1 73.142857 0z m146.285714 0a36.571429 36.571429 0 0 1-73.142857 0v-329.142857a36.571429 36.571429 0 0 1 73.142857 0z" fill="#333333" p-id="1511"></path></svg>
|
After Width: | Height: | Size: 1.3 KiB |
@ -32,11 +32,20 @@
|
||||
</div>
|
||||
<div
|
||||
class="blog-report"
|
||||
v-if="logUser.userId != blog.userId"
|
||||
@click="handleReport(blog,0)"
|
||||
>
|
||||
<svg-icon icon-class="report"></svg-icon>
|
||||
<span>举报</span>
|
||||
</div>
|
||||
<div
|
||||
class="blog-report"
|
||||
v-else
|
||||
@click="handleDelete(blog)"
|
||||
>
|
||||
<svg-icon icon-class="delete"></svg-icon>
|
||||
<span>删除</span>
|
||||
</div>
|
||||
<h2 class="blog-title header">{{blog.postTitle}}
|
||||
<!-- <el-tag
|
||||
size="mini"
|
||||
@ -278,6 +287,7 @@ import {
|
||||
addReport,
|
||||
updateReport,
|
||||
} from "@/api/community/report";
|
||||
import { getUserProfile } from "@/api/system/user";
|
||||
export default {
|
||||
dicts: ["post_type", "community_field", "community_industry"],
|
||||
components: {
|
||||
@ -302,6 +312,7 @@ export default {
|
||||
},
|
||||
title: "举报内容",
|
||||
open: false,
|
||||
logUser: {},
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
@ -311,11 +322,17 @@ export default {
|
||||
},
|
||||
created() {
|
||||
this.getBlogInfomation();
|
||||
this.getUser();
|
||||
},
|
||||
computed: {
|
||||
...mapState(["userInfo", "administrator"]),
|
||||
},
|
||||
methods: {
|
||||
getUser() {
|
||||
getUserProfile().then((response) => {
|
||||
this.logUser = response.data;
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitReportForm() {
|
||||
this.$refs["reportForm"].validate((valid) => {
|
||||
@ -344,6 +361,24 @@ export default {
|
||||
};
|
||||
this.resetForm("reportForm");
|
||||
},
|
||||
handleDelete(blog) {
|
||||
this.$modal
|
||||
.confirm('是否确认删除社区帖子名称"' + blog.postTitle + '"的数据项?')
|
||||
.then(function () {
|
||||
blog.status = "2";
|
||||
updateCommunityInfo(blog);
|
||||
// return delReport(reportIds);
|
||||
})
|
||||
.then(() => {
|
||||
// this.getList();
|
||||
//返回上一层
|
||||
this.$router.push({
|
||||
path: "/community/forum",
|
||||
});
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
//点击举报按钮
|
||||
handleReport(info, type) {
|
||||
if (type == 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user