This commit is contained in:
daihh
2022-06-08 19:57:29 +08:00
8 changed files with 58 additions and 28 deletions

View File

@@ -6,9 +6,9 @@
<span v-if="item.isRead" class="readed">已查看</span>
<span class="noRead" v-else>未查看</span>
<span class="title one-line-ellipsis" v-html="$keywordActiveShow(item.title,keyword)"></span>
</div>
<div v-html="$keywordActiveShow(item.summary,keyword)" class="article-info-summary two-line-ellipsis">
<div v-html="$keywordActiveShow(item.summary || item.content,keyword)" class="article-info-summary two-line-ellipsis">
</div>
<!-- v-html="$keywordActiveShow(item.summary,keyword)" -->
<div style="display:flex;justify-content: space-between;">
@@ -72,7 +72,7 @@ export default {
}
})
}
this.$router.push({path:'/article/detail',query:{id:item.objId}})
this.$router.push({path:'/article/detail',query:{id:item.objId || item.id}})
// window.open(`${this.webBaseUrl}/article/detail?id=${item.objId}`)
},
deleteshares(item){
@@ -129,7 +129,7 @@ export default {
font-weight: 400;
display: flex;
justify-content: flex-start;
align-items: center;
.readed{
font-size: 18px;

View File

@@ -113,7 +113,12 @@ export default {
}
})
}
this.$router.push({path:'/course/detail',query:{id:item.objId}})
if(item.contentType == 20) {
this.$router.push({path:'/course/detail',query:{id:item.objId || item.id}})
} else {
this.$router.push({path:'/course/micro',query:{id:item.objId || item.id}})
}
// window.open(`${this.webBaseUrl}/course/detail?id=${item.objId}`)
},
},

View File

@@ -14,9 +14,9 @@
<el-option label="未置顶" :value="false"></el-option>
</el-select>
</div>
<div style="padding: 0px 5px;"><el-input placeholder="关键词搜索" v-model="queryObj.keyWord" clearable></el-input></div>
<div style="padding: 0px 5px;"><el-input placeholder="关键词搜索" v-model="queryObj.keyWord" @input="inputOn($event)" clearable></el-input></div>
<div style="padding: 0px 5px;">
<el-button @click="getData" icon="el-icon-search" type="primary" >搜索</el-button>
<el-button @click="getData(1)" icon="el-icon-search" type="primary" >搜索</el-button>
<!-- <el-button @click="showRecords()" icon="el-icon-tickets" type="info" >推荐记录</el-button> -->
<el-button icon="el-icon-refresh-right" type="primary" @click="reset">重置</el-button>
</div>
@@ -28,9 +28,9 @@
<span class="previewStyle" @click="viewTopic(scope.row)">{{ scope.row.title }}</span>
</template>
</el-table-column>
<el-table-column label="摘要" show-overflow-tooltip prop="content">
</el-table-column>
<el-table-column label="作者" width="80px" prop="sysCreateBy"></el-table-column>
<!-- <el-table-column label="摘要" show-overflow-tooltip prop="content">
</el-table-column> -->
<el-table-column label="作者" width="80px" prop="authorName"></el-table-column>
<el-table-column label="导入时间" prop="sysCreateTime"></el-table-column>
<el-table-column label="操作">
<template slot-scope="scope">
@@ -158,13 +158,20 @@ export default {
this.getData();
},
methods: {
inputOn() {
this.$forceUpdate();
},
reset() {
this.queryObj.isTop = '';
this.queryObj.keyWord = '';
this.queryObj.pageIndex = 1;
this.getData()
},
//获取案例列表数据
getData() {
getData(num) {
if(num === 1) {
this.queryObj.pageIndex = 1;
}
apiCase
.isTopList(this.queryObj)
.then(res => {
@@ -187,7 +194,7 @@ export default {
},
handleSizeChange(val) {
this.queryObj.pageSize=val;
this.getData();
this.getData(1);
},
handleCurrentChange(val) {
this.queryObj.pageIndex=val;

View File

@@ -7,7 +7,7 @@
<el-breadcrumb-item>文章详情</el-breadcrumb-item>
</el-breadcrumb>
<div class="xrow" style="display: flex;justify-content: space-between;">
<div style="flex: 1;">
<div style="flex: 1;" class="xcol content-div">
<el-row >
<div>
<!-- <div v-else>我四娘娘</div> -->

View File

@@ -7,7 +7,7 @@
<el-breadcrumb-item>案例详情</el-breadcrumb-item>
</el-breadcrumb>
<div class="xrow" style="display: flex;justify-content: space-between;">
<div style="flex: 1;">
<div style="flex: 1;" class="xcol content-div">
<el-row :gutter="10">
<el-col :span="24">
<el-card :body-style="{ padding: '0px' }" class="detail">
@@ -18,7 +18,11 @@
<span>工号{{ authorInfo.code }}</span>
<span>部门{{ authorInfo.orgInfo }}</span>
<!-- <span>案例编号{{ caseDetail.id }}</span> -->
<span v-if="caseDetail.sysCreateTime">{{ caseDetail.sysCreateTime.substring(0,10) }}</span>
</div>
<div class="label">
<span style="margin-left:0px;" v-if="caseDetail.sysCreateTime">{{ caseDetail.sysCreateTime.substring(0,10) }}</span>
<interactBar :data="caseDetail" :type="3" :comments="false" :shares="true"></interactBar>
</div>
@@ -38,7 +42,7 @@
<pdfPreview v-if="pdfPath" :filePath="pdfPath"></pdfPreview>
</el-card>
<!-- :authorId="articleDetailData.sysCreateAid" -->
<el-row><comments @success="success" v-if="resolveId != ''" :obj-type="3" :obj-id="resolveId" :authorId="caseDetail.sysCreateAid" :toUsers="toUsers"></comments></el-row>
<el-row><comments @success="success" v-if="resolveId != ''" :obj-type="3" :obj-id="resolveId" :authorId="caseDetail.authorId" :toUsers="toUsers"></comments></el-row>
</el-col>
</el-row>
</div>
@@ -203,7 +207,7 @@ export default {
}
}
if(scrollTop > 630) {
document.querySelector('#fixd-box').style.cssText = "position: fixed;top: -550px;width:245.5px";
document.querySelector('#fixd-box').style.cssText = "position: fixed;top: -500px;width:245.5px";
} else {
document.querySelector('#fixd-box').style.cssText = "position: static";
}
@@ -213,7 +217,6 @@ export default {
apiCase.usernameList(5).then(res=>{
if(res.status==200){
this.ankingList=res.result
// console.log(res)
}
})
},
@@ -221,7 +224,6 @@ export default {
apiCase.queryPraises(5).then(res=>{
if(res.status==200){
this.Popularity=res.result
// console.log(this.Popularity)
}
})
},
@@ -229,7 +231,6 @@ export default {
apiCase.queryComments(5).then(res=>{
if(res.status==200){
this.Positive=res.result
console.log(res)
}
})
},
@@ -253,7 +254,12 @@ export default {
getCaseUserDetail() {
apiUser.getByIds([this.caseDetail.authorId]).then(res => {
if (res.status == 200 && res.result.length>0) {
this.authorInfo = res.result[0];
this.authorInfo = res.result[0];
console.log(this.authorInfo)
let idx=this.authorInfo.orgInfo.indexOf('/');
if(idx>-1){
this.authorInfo.orgInfo=this.authorInfo.orgInfo.substring(idx+1);
}
this.toUsers = [
{name: res.result[0].name, aid:res.result[0].aid ,sex:res.result[0].sex}
];

View File

@@ -78,8 +78,9 @@
<el-col :span="24" v-for="item in caseList.list" :key="item.id" class="case-list">
<div class="case-info">
<div class="case-info-cont">
<div class="case-info-title">
<router-link :to="'/case/detail?id='+item.id">
<div class="case-info-title">
<!-- <span v-if="i % 2 == 0" style="color:red;margin-right:5px">[组织推荐]</span> -->
<div class="case-titdiv">
<span class="case-tittext" v-html="item.title"></span>
@@ -88,13 +89,15 @@
<time-show :time="item.sysCreateTime"></time-show>
</div>
</div>
</router-link>
</div>
</router-link>
<div style="height:35px; ">
<author :avatar="item.authorInfo.avatar" :name="item.authorInfo.name" :info="item.authorInfo.orgInfo" :sex="item.authorInfo.sex"></author>
</div>
<router-link :to="'/case/detail?id='+item.id">
<div class="keyword-text">
<span v-if="item.keyword1">{{ item.keyword1 }}</span>
<span v-if="item.keyword2">{{ item.keyword2 }}</span>
@@ -103,14 +106,19 @@
<span v-if="item.keyword5">{{ item.keyword5 }}</span>
</div>
<div class="case-info-summary">
<router-link :to="'/case/detail?id='+item.id">
{{displayAll(item)}}
</router-link>
<span style="color:#588afc" v-if="item.summary.length>180" @click.stop="changeIsAll(item)">
<span style="color:#588afc" v-if="item.summary.length>190" @click.stop="changeIsAll(item)">
{{item.isAll?'收起':'展开'}}
</span>
</div>
</router-link>
<div style="display: flex;justify-content: space-between;">
<div style="margin:8px 0;">
<interactBar :type="0" :shares="false" :data="item" :readonly="true"></interactBar> </div>
@@ -363,6 +371,7 @@ export default {
},
//展示全部
displayAll(item) {
if (!item.isAll && item.summary && item.summary.length > 180) {
return item.summary.slice(0, 180) + "...";
}
@@ -449,7 +458,7 @@ export default {
}
if (scrollTop > 630) {
document.querySelector("#fixd-box").style.cssText =
"position: fixed;top: -550px;width:245.5px";
"position: fixed;top: -500px;width:245.5px";
} else {
document.querySelector("#fixd-box").style.cssText = "position: static";
}
@@ -628,6 +637,7 @@ export default {
line-height: 25px;
display: flex;
.case-tittext{
font-size: 18px;
width: 80%;
display: -webkit-box;
overflow: hidden;

View File

@@ -7,7 +7,7 @@
<el-breadcrumb-item>问答详情</el-breadcrumb-item>
</el-breadcrumb>
<div class="xrow" style="display: flex;justify-content: space-between;">
<div style="flex: 1;">
<div style="flex: 1;" class="xcol content-div">
<el-row>
<el-card :body-style="{ padding: '0px' }" class="detail">
<div class="title" >

View File

@@ -318,11 +318,13 @@ export default {
item.question.title=item.title;
item.question.content=item.content;
item.question.bestAnswer=item.bestAnswer;
item.question.id=item.id;
}
if(item.type == 3){
item.cases = {title:'',summary:''};
item.cases.title=item.title;
item.cases.title=item.summary;
item.cases.id=item.id;
}
});
this.dataList.list = res.result.list;