已加上删除判断

This commit is contained in:
daihh
2022-11-09 16:15:13 +08:00
parent fccb4b4cc0
commit c1c7cc6c0b
4 changed files with 26 additions and 8 deletions

View File

@@ -78,6 +78,10 @@
},
methods:{
jumpDetail(item){
if(item.deleted){
this.$message.warning("此内容已删除");
return;
}
this.$router.push('/qa/answer?id='+item.contentId)
},
emitHide(id) {

View File

@@ -124,6 +124,13 @@
if(code==''|| code==undefined){return '';}
return this.orgDomainMap.get(code);
},
jumpDetail(item){
if(item.info.deleted){
this.$message.warning("此案例已删除");
return;
}
this.$router.push('/case/detail?id='+item.contentId)
},
}
}
</script>

View File

@@ -74,6 +74,10 @@
},
methods:{
jumpDetail(item){
if(item.info.deleted){
this.$message.warning("此笔记已删除");
return;
}
this.$router.push('/course/detail?id='+item.info.courseId)
},
emitHide(id) {

View File

@@ -3,8 +3,8 @@
<ul v-if="list.length > 0">
<li class="put-list-index" v-for="item in list" :key="item.id">
<p v-if="isDynamic" class="portal-summary-text" style="margin-bottom:18px;margin-top:10px">
<span v-if="!personal || isFollow">{{item.aname}}</span>{{item.cusInfo}}
<span style="margin-left:28px">{{item.eventTime}}</span>
<span v-if="!personal || isFollow">{{item.aname}}</span>{{item.cusInfo}}
<span style="margin-left:28px">{{item.eventTime}}</span>
<span v-if="item.aid == userInfo.aid" class="follow-hide pointer" style="float:right">
<span v-if="item.hidden">已隐藏</span>
<span v-else @click="emitHide(item.id)"> <svg-icon style="margin-right: 10px;font-size:22px;padding-top: 4px;" icon-class="eyes"></svg-icon>隐藏 </span>
@@ -30,7 +30,7 @@
</div> -->
</div>
</template>
<script>
import interactBar from "@/components/Portal/interactBar.vue";
import { mapGetters,mapActions } from 'vuex';
@@ -74,15 +74,19 @@
},
jumpDetail(data) {
if(!data.id){
return;
return;
}
if(item.info.deleted){
this.$message.warning("此问题已删除");
return;
}
this.$router.push({ path: '/qa/answer', query: { id: data.id } });
},
}
}
</script>
<style lang="scss" scoped>
.put-list{
.put-title-info{
@@ -113,6 +117,5 @@
}
}
}
</style>