2022年5月29日从svn移到git

This commit is contained in:
daihh
2022-05-29 18:56:34 +08:00
commit b050613020
488 changed files with 68444 additions and 0 deletions

View File

@@ -0,0 +1,216 @@
<template>
<div style="">
<div class="article-list" v-for="(item, idx) in items" :key="idx">
<div class="article-info" @click="jumpRouter(item)">
<div class="article-info-title">
<span class="qa-basic" :class="item.question.isResolve ? 'qa-solve' : 'qa-unSolve'">{{ item.question.isResolve ? '【已解决】' : '【未解决】' }}</span>
<span class="title one-line-ellipsis" v-html="$keywordActiveShow(item.question.title,keyword)"></span>
</div>
<div class="article-info-summary">
<span class="two-line-ellipsis" v-html="$keywordActiveShow(item.question.content,keyword)"></span>
</div>
<div class="bestAnswer one-line-ellipsis " v-if="item.question.isResolve">
<span>最佳回答:</span>
<span class="one-line-ellipsi" style="color: #999999;" v-html="$keywordActiveShow(item.question.bestAnswer,keyword)"></span>
<!-- v-if="item.question.isResolve" -->
<!-- v-if="item.question.isResolve" -->
<!-- <div style="margin-right:15px;width: 80px">
</div>
<div class="one-line-ellipsis" v-if="item.question.isResolve" style="color: #999999;padding:2px 0 0 0;width:90%" v-html="$keywordActiveShow(item.question.bestAnswer,keyword)"> -->
</div>
</div>
<div style="display:flex;justify-content: space-between;color: rgb(153, 153, 153);font-size: 14px;">
<div class="article-info-tools">
<span>{{ item.time }}</span>
<span v-if="type=='myShare'">分享给{{ item.toAname }}</span>
<span v-else>{{ item.sysCreateBy }}分享给我</span>
<el-button v-if="item.isRead" class="common readed" style="color: #8590A6;margin-left:10px;" icon="el-icon-folder-opened" type="text">已查看</el-button>
<el-button class="common noRead" v-else style="color: #8590A6;margin-left:10px;" icon="el-icon-folder" type="text">未查看</el-button>
</div>
<div>
<el-button @click.stop="deleteshares(item)" style="color: #8590A6;margin-left:36px" v-if="!item.isRead&&type=='myShare'" icon="el-icon-refresh-right" type="text">撤回</el-button>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
import apiShares from '@/api/modules/shares.js';
// import interactBar from '@/components/Portal/interactBar.vue';
// import authorInfo from '@/components/Portal/authorInfo.vue';
export default {
name: 'articleItems',
props: {
items: {
//name,
type: Array,
default: () => []
},
type:{
type:String,
default:()=>{
return 'myShare'
}
},
keyword:{
type:String,
default:()=>{
return ''
}
}
},
data() {
return {
};
},
components: {
},
methods: {
jumpRouter(item){
if(this.type!='myShare'){
apiShares.updateIsRead(item.id).then(res=>{
if(res.status==200){
this.$emit('confirm',item)
}
})
}
this.$router.push({path:'/qa/answer',query:{id:item.question.id}})
// window.open(`${this.webBaseUrl}/qa/answer?id=${item.question.id}`)
},
shareItem(idx) {
this.$refs.shareAction[idx].addShare()
},
delItem(item) {
this.$confirm('您确定要删除所选问答吗?', '删除提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
this.$emit("confirm",item)
})
.catch(() => {
});
},
deleteshares(item){
this.$emit('confirm',item)
}
}
};
</script>
<style lang="scss" scoped>
.one-line-ellipsis{
display: -webkit-box;
// white-space:pre-wrap;
overflow: hidden;
text-overflow:ellipsis;
-webkit-box-orient: vertical;
-webkit-line-clamp: 1;
box-sizing: border-box;
}
.two-line-ellipsis{
display: -webkit-box;
// white-space:pre-wrap;
overflow: hidden;
text-overflow:ellipsis;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
box-sizing: border-box;
}
.text-status1 {
// border: 1px dotted #1ea0fa;
color: #1ea0fa;
}
.text-status2 {
// border: 1px dotted #00aa00;
color: #00aa00;
}
.text-status3 {
// border: 1px dotted #ff3e3e;
color: #ff3e3e;
}
.article-list {
// margin: 5px 0;
// border: 1px solid #dddddd;
// padding: 10px;
padding-bottom: 21px;
margin-top: 24px;
border-bottom: 1px solid #E8E8E8;
cursor: pointer;
}
.article-info {
.article-info-title {
font-size: 18px;
font-weight: 500;
color: #333333;
display: flex;
justify-content: flex-start;
align-items: center;
span:first-of-type{
margin-top: -2px;
}
.title{
margin-left: 8px;
flex-shrink: 10000;
}
.common{
margin-left: auto;
}
.readed{
color: #2AB28B;
}
.noRead{
color:#FF3E3E;
}
}
.article-info-summary {
color: #666666;
// line-height: 1.5;
font-size: 14px;
height: 40px;
display: flex;
justify-content: space-between;
align-items: center;
margin: 7px 0px;
}
.bestAnswer{
// height: 30px;
font-size: 16px;
color: #444444;
font-weight: 600;
display: flex;
align-items: center;
span:first-of-type{
flex-shrink: 0;
}
.one-line-ellipsi{
overflow: hidden;
text-overflow:ellipsis;
white-space: nowrap;
}
// padding-left: 20px;
}
.article-info-tools {
color: #999999;
display: flex;
justify-content: flex-start;
align-items: center;
>span{
font-size: 14px;
line-height: 25px;
color: #747474;
}
}
}
</style>