搜索中心-知识分享-不是发起人时,也能删除别人的评论
This commit is contained in:
@@ -83,7 +83,9 @@
|
|||||||
<img src="~@/assets/icon_reply.png" alt="">
|
<img src="~@/assets/icon_reply.png" alt="">
|
||||||
<span>{{$t('answer')}}</span>
|
<span>{{$t('answer')}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="commentRight" @click="deleteClick(item)">
|
<div class="commentRight"
|
||||||
|
v-if="administrators || item.createBy == userInfoQuery.username"
|
||||||
|
@click="deleteClick(item)">
|
||||||
<img src="~@/assets/icon_rubbish.png" alt="">
|
<img src="~@/assets/icon_rubbish.png" alt="">
|
||||||
<span>{{$t('delete')}}</span>
|
<span>{{$t('delete')}}</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -107,7 +109,9 @@
|
|||||||
<div class="commentRight" @click="messageClick(item)">
|
<div class="commentRight" @click="messageClick(item)">
|
||||||
<img src="~@/assets/icon_reply.png" alt="">
|
<img src="~@/assets/icon_reply.png" alt="">
|
||||||
</div>
|
</div>
|
||||||
<div class="commentRight" @click="deleteClick(val)">
|
<div class="commentRight"
|
||||||
|
v-if="administrators || val.createBy == userInfoQuery.username"
|
||||||
|
@click="deleteClick(val)">
|
||||||
<img src="~@/assets/icon_rubbish.png" alt="">
|
<img src="~@/assets/icon_rubbish.png" alt="">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -152,11 +156,22 @@
|
|||||||
isDisplay: false,
|
isDisplay: false,
|
||||||
commentQuery: {},
|
commentQuery: {},
|
||||||
sendDisplay: true,
|
sendDisplay: true,
|
||||||
num: 1
|
num: 1,
|
||||||
|
userInfoQuery:{},
|
||||||
|
administrators:false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
document.title = 'NIO GRP'
|
document.title = 'NIO GRP'
|
||||||
|
this.administrators = false
|
||||||
|
this.userInfoQuery = this.userInfo()
|
||||||
|
if (this.userInfo().userRoleList && this.userInfo().userRoleList.length > 0) {
|
||||||
|
this.userInfo().userRoleList.forEach(res => {
|
||||||
|
if (res.roleCode == 'admin') {
|
||||||
|
this.administrators = true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
window.addEventListener('scroll', this.scrolling)
|
window.addEventListener('scroll', this.scrolling)
|
||||||
window.addEventListener('mousedown', this.handleonmousedown)
|
window.addEventListener('mousedown', this.handleonmousedown)
|
||||||
this.getQueryBy()
|
this.getQueryBy()
|
||||||
|
|||||||
Reference in New Issue
Block a user