mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-12 04:16:45 +08:00
Merge branch 'dev' of https://codeup.aliyun.com/6265f483e4166464dc2f9c14/boeu/portal into dev
This commit is contained in:
4
.gitignore
vendored
4
.gitignore
vendored
@@ -1,3 +1 @@
|
|||||||
node_modules
|
/node_modules
|
||||||
node_modules
|
|
||||||
/dist
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import ajax from '@/utils/xajax.js'
|
|||||||
|
|
||||||
/**首页查询
|
/**首页查询
|
||||||
* pageSize
|
* pageSize
|
||||||
* orderField
|
* orderField
|
||||||
* orderAsc
|
* orderAsc
|
||||||
*/
|
*/
|
||||||
const indexList = function(query) {
|
const indexList = function(query) {
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
const items=function(key){
|
const items=function(key){
|
||||||
return ajax.get('/xboe/m/dictionary/items?key='+key);
|
return ajax.get('/xboe/m/dictionary/items?key='+key);
|
||||||
}
|
}
|
||||||
// 修改
|
// 修改
|
||||||
//@param key 对应字段后缀
|
//@param key 对应字段后缀
|
||||||
//
|
//
|
||||||
// 案例的组织机构字典 org_domain key
|
// 案例的组织机构字典 org_domain key
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ const casePageList=function(query){
|
|||||||
/*分页查询 收藏的文章信息
|
/*分页查询 收藏的文章信息
|
||||||
*@param {Object} query
|
*@param {Object} query
|
||||||
@param Integer type 根据什么类型搜索,这块暂时不传
|
@param Integer type 根据什么类型搜索,这块暂时不传
|
||||||
@param pageIndex 第几页 pageSize 每页展示多少行
|
@param pageIndex 第几页 pageSize 每页展示多少行
|
||||||
keyword:对应关键字查询
|
keyword:对应关键字查询
|
||||||
*/
|
*/
|
||||||
const articlePageList=function(query){
|
const articlePageList=function(query){
|
||||||
@@ -45,7 +45,7 @@ const articlePageList=function(query){
|
|||||||
@param Integer type 根据什么类型搜索,暂时不传
|
@param Integer type 根据什么类型搜索,暂时不传
|
||||||
@param pageIndex 第几页 pageSize 每页展示多少行
|
@param pageIndex 第几页 pageSize 每页展示多少行
|
||||||
keyword:对应关键字查询
|
keyword:对应关键字查询
|
||||||
|
|
||||||
*/
|
*/
|
||||||
const coursePageList=function(query){
|
const coursePageList=function(query){
|
||||||
return ajax.post('/xboe/m/favorite/mycourselist',query);
|
return ajax.post('/xboe/m/favorite/mycourselist',query);
|
||||||
@@ -85,16 +85,23 @@ const has=function(objType,objId){
|
|||||||
*/
|
*/
|
||||||
const findAll=function(query){
|
const findAll=function(query){
|
||||||
return ajax.post('/xboe/m/favorite/findAll',query);
|
return ajax.post('/xboe/m/favorite/findAll',query);
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
我的收藏 全部
|
我的收藏 全部
|
||||||
@param pageIndex 第几页
|
@param pageIndex 第几页
|
||||||
@param pageSize 每页行数
|
@param pageSize 每页行数
|
||||||
@param keyword 关键字
|
@param keyword 关键字
|
||||||
*/
|
*/
|
||||||
const queryAll=function(query){
|
const queryAll=function(query){
|
||||||
return ajax.post('/xboe/m/favorite/queryAll',query);
|
return ajax.post('/xboe/m/favorite/queryAll',query);
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 查看是否已收藏 批量
|
||||||
|
* @param {问答或者文章或者课程的id数组} data
|
||||||
|
* */
|
||||||
|
const isNoFavorite=function(date){
|
||||||
|
return ajax.postJson('/xboe/m/favorite/isNoFavorite',data);
|
||||||
|
}
|
||||||
|
|
||||||
export default{
|
export default{
|
||||||
has,
|
has,
|
||||||
@@ -107,5 +114,6 @@ export default{
|
|||||||
articlePageList,
|
articlePageList,
|
||||||
coursePageList,
|
coursePageList,
|
||||||
findAll,
|
findAll,
|
||||||
queryAll
|
queryAll,
|
||||||
|
isNoFavorite
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ const remove=function(objId,objType){
|
|||||||
// toAname 分享给人的名称
|
// toAname 分享给人的名称
|
||||||
//
|
//
|
||||||
const querylist=function(query){
|
const querylist=function(query){
|
||||||
return ajax.post('/xboe/m/share/list',data);
|
return ajax.post('/xboe/m/share/list',query);
|
||||||
}
|
}
|
||||||
// 当前用户是否已分享
|
// 当前用户是否已分享
|
||||||
// // objType,点赞对象类型,, 1课程 2文章,3案例, 4问答
|
// // objType,点赞对象类型,, 1课程 2文章,3案例, 4问答
|
||||||
@@ -112,7 +112,7 @@ const mymearticlelist=function(query){
|
|||||||
*/
|
*/
|
||||||
const updateIsRead=function(id){
|
const updateIsRead=function(id){
|
||||||
return ajax.get(`/xboe/m/share/updateIsRead?id=${id}`);
|
return ajax.get(`/xboe/m/share/updateIsRead?id=${id}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
撤回分享
|
撤回分享
|
||||||
@@ -121,6 +121,49 @@ const updateIsRead=function(id){
|
|||||||
const deleteshares=function(id){
|
const deleteshares=function(id){
|
||||||
return ajax.get(`/xboe/m/share/delete-shares?id=${id}`);
|
return ajax.get(`/xboe/m/share/delete-shares?id=${id}`);
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 我分享的全部
|
||||||
|
* @param pageIndex 第几页
|
||||||
|
* @param pageSize 每页多少行
|
||||||
|
* @param keyword 关键字搜索
|
||||||
|
* @param isRead 是否已读
|
||||||
|
* */
|
||||||
|
const findMeShare=function (query){
|
||||||
|
return ajax.post('/xboe/m/share/findMeShare',query);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 分享给我的全部
|
||||||
|
* @param pageIndex 第几页
|
||||||
|
* @param pageSize 每页多少行
|
||||||
|
* @param keyword 关键字搜索
|
||||||
|
* @param isRead 是否已读
|
||||||
|
* */
|
||||||
|
const findShareMe=function (query){
|
||||||
|
return ajax.post('/xboe/m/share/findShareMe',query);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 我分享的案例
|
||||||
|
* @param pageIndex 第几页
|
||||||
|
* @param pageSize 每页多少行
|
||||||
|
* @param isRead 是否已读
|
||||||
|
* @param keyword 关键字搜索
|
||||||
|
* */
|
||||||
|
const myCaseList=function (query){
|
||||||
|
return ajax.post('/xboe/m/share/myCaseList',query);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 分享给我的案例
|
||||||
|
* @param pageIndex 第几页
|
||||||
|
* @param pageSize 每页多少行
|
||||||
|
* @param isRead 是否已读
|
||||||
|
* @param keyword 关键字搜索
|
||||||
|
* */
|
||||||
|
const myMeCaseList=function (query){
|
||||||
|
return ajax.post('/xboe/m/share/myMeCaseList',query);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* */
|
||||||
export default{
|
export default{
|
||||||
save,
|
save,
|
||||||
has,
|
has,
|
||||||
@@ -134,5 +177,9 @@ const deleteshares=function(id){
|
|||||||
mymecourselist,
|
mymecourselist,
|
||||||
mymearticlelist,
|
mymearticlelist,
|
||||||
updateIsRead,
|
updateIsRead,
|
||||||
deleteshares
|
deleteshares,
|
||||||
|
findMeShare,
|
||||||
|
findShareMe,
|
||||||
|
myCaseList,
|
||||||
|
myMeCaseList
|
||||||
}
|
}
|
||||||
|
|||||||
167
src/components/Case/caseItems.vue
Normal file
167
src/components/Case/caseItems.vue
Normal file
@@ -0,0 +1,167 @@
|
|||||||
|
<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 v-if="item.isRead" class="readed">【已查看】</span>
|
||||||
|
<span class="noRead" v-else>【未查看】</span>
|
||||||
|
<span class="title one-line-ellipsis" v-html="$keywordActiveShow(item.cases.title,keyword)"></span>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div v-html="$keywordActiveShow(item.cases.summary,keyword)" class="article-info-summary two-line-ellipsis">
|
||||||
|
</div>
|
||||||
|
<!-- v-html="$keywordActiveShow(item.summary,keyword)" -->
|
||||||
|
<div style="display:flex;justify-content: space-between;">
|
||||||
|
<div class="article-info-tools">
|
||||||
|
<!-- <authorInfo :avatar="item.avatar" :name="item.name" :info="item.orgInfo"></authorInfo> -->
|
||||||
|
<span style="color: #999999;">{{ item.time }}</span>
|
||||||
|
<span v-if="type=='myShare'" style="color: #999999;font-size: 14px;">分享给{{item.toAname}}</span>
|
||||||
|
<span v-else>{{item.sysCreateBy}}分享给我</span>
|
||||||
|
<!-- <interactBar ref="shareDialog" :type="0" :data="item" :shares="false" :views="false"></interactBar> -->
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<el-button style="color: #8590A6;" v-if="!item.isRead&&type=='myShare'" type="text" icon="el-icon-refresh-right" @click.stop="deleteshares(item)">撤回</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import apiShares from '@/api/modules/shares.js';
|
||||||
|
export default {
|
||||||
|
name:'caseItems',
|
||||||
|
props:{
|
||||||
|
items: {
|
||||||
|
//name,
|
||||||
|
type: Array,
|
||||||
|
default: () => []
|
||||||
|
},
|
||||||
|
type:{
|
||||||
|
type:String,
|
||||||
|
default:()=>{
|
||||||
|
return 'myShare'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
keyword:{
|
||||||
|
type:String,
|
||||||
|
default:()=>{
|
||||||
|
return ''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
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:'/case/detail',query:{id:item.cases.id}})
|
||||||
|
// window.open(`${this.webBaseUrl}/article/detail?id=${item.objId}`)
|
||||||
|
},
|
||||||
|
deleteshares(item){
|
||||||
|
this.$emit('confirm',item)
|
||||||
|
},
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
console.log(this.items)
|
||||||
|
},
|
||||||
|
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.article-status1 {
|
||||||
|
padding: 3px;
|
||||||
|
border: 1px dotted #1ea0fa;
|
||||||
|
color: #1ea0fa;
|
||||||
|
}
|
||||||
|
.article-status2 {
|
||||||
|
padding: 3px;
|
||||||
|
border: 1px dotted #00aa00;
|
||||||
|
color: #00aa00;
|
||||||
|
}
|
||||||
|
.article-status3 {
|
||||||
|
padding: 3px;
|
||||||
|
border: 1px dotted #ff0000;
|
||||||
|
color: #ff0000;
|
||||||
|
}
|
||||||
|
.article-list {
|
||||||
|
border-bottom: 1px solid #dddddd;
|
||||||
|
// padding: 10px;
|
||||||
|
padding-bottom: 20px;
|
||||||
|
margin-top: 20px;
|
||||||
|
border-bottom: 1px solid #e9e9e9;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.article-info {
|
||||||
|
cursor: pointer;
|
||||||
|
.article-info-title {
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: 400;
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-start;
|
||||||
|
align-items: center;
|
||||||
|
.readed{
|
||||||
|
font-size: 18px;
|
||||||
|
color: #3e7fff;
|
||||||
|
// margin-bottom: 6px;
|
||||||
|
}
|
||||||
|
.noRead{
|
||||||
|
font-size: 18px;
|
||||||
|
color:#FF3E3E;
|
||||||
|
// margin-bottom: 6px;
|
||||||
|
}
|
||||||
|
.title{
|
||||||
|
line-height: 25px;
|
||||||
|
margin-left: 10px;
|
||||||
|
font-size: 18px;
|
||||||
|
flex-shrink: 10000;
|
||||||
|
font-weight: 500;
|
||||||
|
color: #333333;
|
||||||
|
}
|
||||||
|
.el-button{
|
||||||
|
margin-left: auto;
|
||||||
|
}
|
||||||
|
// .article-info-date {
|
||||||
|
// height: 40px;
|
||||||
|
// line-height: 40px;
|
||||||
|
// float: right;
|
||||||
|
// font-weight: 200;
|
||||||
|
// color: #999999;
|
||||||
|
// i {
|
||||||
|
// margin-right: 5px;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
.article-info-summary {
|
||||||
|
height: 46px;
|
||||||
|
font-weight: 200;
|
||||||
|
font-size: 16px;
|
||||||
|
line-height: 1.5;
|
||||||
|
margin:7px 0;
|
||||||
|
}
|
||||||
|
.article-info-tools {
|
||||||
|
color: #999999;
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-start;
|
||||||
|
align-items: center;
|
||||||
|
>span{
|
||||||
|
font-size: 14px;
|
||||||
|
color: #747474;
|
||||||
|
|
||||||
|
// margin-top: -2px;
|
||||||
|
}
|
||||||
|
// >span:first-of-type{
|
||||||
|
// margin-left: 10px;
|
||||||
|
// }
|
||||||
|
// >span:last-of-type{
|
||||||
|
// margin-top: -4px;
|
||||||
|
// margin-right:auto;
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -1,21 +1,21 @@
|
|||||||
<template>
|
<template>
|
||||||
<div style="">
|
<div style="">
|
||||||
<div class="article-list" v-for="(item,idx) in items" :key="idx">
|
<div class="article-list" v-for="(item,idx) in items" :key="idx">
|
||||||
<div class="article-info">
|
<div class="article-info ">
|
||||||
<div class="article-info-title">
|
<div class="article-info-title title-line-ellipsis" >
|
||||||
<router-link :to="'/case/detail?id='+item.cases.id" target="_blank" style="padding-left: 5px;">{{item.cases.title}}</router-link>
|
<router-link :to="'/case/detail?id='+item.cases.id" target="_blank" >{{item.cases.title}}</router-link>
|
||||||
<div class="article-info-date">
|
<div class="article-info-date">
|
||||||
<el-button @click="delItem(item)" type="text" icon="el-icon-remove">取消收藏</el-button>
|
<el-button @click="delItem(item)" type="text" icon="el-icon-remove">取消收藏</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="article-info-summary">
|
<div class="article-info-summary three-line-ellipsis">
|
||||||
{{item.cases.summary}}
|
{{item.cases.summary}}
|
||||||
</div>
|
</div>
|
||||||
<div class="article-info-tools">
|
<div class="article-info-tools">
|
||||||
<authorInfo :avatar="item.avatar" :name="item.name" :info="item.orgInfo"></authorInfo>
|
<authorInfo :avatar="item.avatar" :name="item.name" :info="item.orgInfo"></authorInfo>
|
||||||
<span>发布时间:{{ item.cases.sysCreateTime | timeFilter }}</span>
|
<span>发布时间:{{ item.cases.sysCreateTime | timeFilter }}</span>
|
||||||
<span>收藏时间:{{ item.time | timeFilter }}</span>
|
<span>收藏时间:{{ item.time | timeFilter }}</span>
|
||||||
<interactBar :type="0" :data="item.cases" :shares="false" :views="false"></interactBar>
|
<!-- <interactBar :type="0" :data="item.cases" :shares="false" :views="false"></interactBar> -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -58,6 +58,26 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
.title-line-ellipsis{
|
||||||
|
width: 100%;
|
||||||
|
display: -webkit-box;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow:ellipsis;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
-webkit-line-clamp: 1;
|
||||||
|
box-sizing: border-box;
|
||||||
|
word-break:break-all;
|
||||||
|
}
|
||||||
|
.three-line-ellipsis{
|
||||||
|
width: 100%;
|
||||||
|
display: -webkit-box;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow:ellipsis;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
-webkit-line-clamp: 2;
|
||||||
|
box-sizing: border-box;
|
||||||
|
word-break:break-all;
|
||||||
|
}
|
||||||
.article-status1{
|
.article-status1{
|
||||||
padding: 3px;
|
padding: 3px;
|
||||||
border: 1px dotted #1EA0FA;
|
border: 1px dotted #1EA0FA;
|
||||||
@@ -75,8 +95,8 @@
|
|||||||
}
|
}
|
||||||
.article-list {
|
.article-list {
|
||||||
margin: 5px 0;
|
margin: 5px 0;
|
||||||
border: 1px solid #dddddd;
|
border-bottom: 1px solid #dddddd;
|
||||||
padding: 10px;
|
padding: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.article-info {
|
.article-info {
|
||||||
@@ -97,10 +117,12 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.article-info-summary {
|
.article-info-summary {
|
||||||
height: 65px;
|
|
||||||
|
line-height: 25px;
|
||||||
color: #999999;
|
color: #999999;
|
||||||
}
|
}
|
||||||
.article-info-tools {
|
.article-info-tools {
|
||||||
|
height: 45px;
|
||||||
color: #999999;
|
color: #999999;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: flex-start;
|
justify-content: flex-start;
|
||||||
|
|||||||
@@ -135,7 +135,7 @@ export default {
|
|||||||
.one-line-ellipsis{
|
.one-line-ellipsis{
|
||||||
display: -webkit-box;
|
display: -webkit-box;
|
||||||
white-space:pre-wrap;
|
white-space:pre-wrap;
|
||||||
word-wrap: break-word;
|
// word-wrap: break-word;
|
||||||
word-break:break-all;
|
word-break:break-all;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow:ellipsis;
|
text-overflow:ellipsis;
|
||||||
|
|||||||
@@ -26,12 +26,12 @@
|
|||||||
@link-clicked="currentPage = $event">
|
@link-clicked="currentPage = $event">
|
||||||
</pdf> -->
|
</pdf> -->
|
||||||
</div>
|
</div>
|
||||||
<div class="pdf-footer">
|
<div v-if="totalPages>initNum" class="pdf-footer" >
|
||||||
<!-- <el-button icon="el-icon-arrow-left" @click="prePage('footer')" :disabled="loadedRatio !== 1"></el-button>
|
<!-- <el-button icon="el-icon-arrow-left" @click="prePage('footer')" :disabled="loadedRatio !== 1"></el-button>
|
||||||
<span v-if="loadedRatio !== 1" style="margin:0 10px;">0 / 0</span>
|
<span v-if="loadedRatio !== 1" style="margin:0 10px;">0 / 0</span>
|
||||||
<span v-else style="margin:0 10px;">{{ currentPage }} / {{ pageCount }}</span>
|
<span v-else style="margin:0 10px;">{{ currentPage }} / {{ pageCount }}</span>
|
||||||
<el-button @click="nextPage('footer')" :disabled="loadedRatio !== 1" icon="el-icon-arrow-right"></el-button> -->
|
<el-button @click="nextPage('footer')" :disabled="loadedRatio !== 1" icon="el-icon-arrow-right"></el-button> -->
|
||||||
<el-button type="primary" @click="clickMore()">加载更多</el-button>
|
<el-button type="primary" @click="clickMore()" v-if="moreState == 1">加载更多</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -59,21 +59,33 @@ export default {
|
|||||||
src: "",
|
src: "",
|
||||||
showPages: undefined,
|
showPages: undefined,
|
||||||
totalPages:0,
|
totalPages:0,
|
||||||
|
initNum:3,
|
||||||
scale: 100, //放大系数
|
scale: 100, //放大系数
|
||||||
loadedRatio:0,// 加载进度
|
loadedRatio:0,// 加载进度
|
||||||
showProgress:true,
|
showProgress:true,
|
||||||
|
moreState:1,// 1 加载更多 2 加载中 3无数据
|
||||||
|
isscroll:false,
|
||||||
|
pdfpage:0,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
// /case/demo.pdf
|
// /case/demo.pdf
|
||||||
let pdfPath=this.$Constants.fileBaseUrl+'/case/demo.pdf';
|
if(this.filePath){
|
||||||
this.loadInitPdf(pdfPath);
|
this.loadInitPdf(this.filePath);
|
||||||
//this.initSrc(this.filePath);
|
}
|
||||||
|
window.addEventListener(
|
||||||
|
"scroll",
|
||||||
|
this.handleScroll
|
||||||
|
);
|
||||||
|
},
|
||||||
|
beforeDestroy(){
|
||||||
|
window.removeEventListener("scroll",this.handleScroll);
|
||||||
},
|
},
|
||||||
watch:{
|
watch:{
|
||||||
filePath(newVal){
|
filePath(newVal){
|
||||||
//this.getNumPages(newVal);
|
if(newVal){
|
||||||
this.initSrc(newVal);
|
this.loadInitPdf(newVal);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
loadedRatio(newVal){
|
loadedRatio(newVal){
|
||||||
// 直接使用loadedRatio控制进度条没有加载效果
|
// 直接使用loadedRatio控制进度条没有加载效果
|
||||||
@@ -87,41 +99,88 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
loadProgress(e){
|
loadProgress(e){
|
||||||
console.log(e,'loadProgress');
|
console.log(e,'loadProgress');
|
||||||
},
|
},
|
||||||
loadedPageHandle(e){
|
loadedPageHandle(e){
|
||||||
console.log(e,'loadedPageHandle');
|
console.log(e,'loadedPageHandle');
|
||||||
|
this.pdfpage = e;
|
||||||
|
|
||||||
},
|
},
|
||||||
loadPdfHandle(e){
|
loadPdfHandle(e){
|
||||||
console.log(e,'loadPdfHandle');
|
console.log(e,'loadPdfHandle');
|
||||||
},
|
},
|
||||||
clickMore(){
|
clickMore(){
|
||||||
if(this.totalPages>this.showPages){
|
if(this.totalPages>this.showPages){
|
||||||
this.showPages++;
|
this.showPages++;
|
||||||
}
|
}
|
||||||
},
|
this.isscroll = true;
|
||||||
|
|
||||||
|
},
|
||||||
//加载页面
|
//加载页面
|
||||||
loadInitPdf(url) {
|
loadInitPdf(url) {
|
||||||
|
|
||||||
if(url && url.indexOf('.pdf')>-1){
|
if(url && url.indexOf('.pdf')>-1){
|
||||||
let loadingTask = pdf.createLoadingTask(url);
|
let loadingTask = pdf.createLoadingTask(url);
|
||||||
this.src=loadingTask;
|
this.src=loadingTask;
|
||||||
|
|
||||||
loadingTask.promise.then((pdf) =>{
|
loadingTask.promise.then((pdf) =>{
|
||||||
|
console.log(pdf)
|
||||||
this.totalPages=pdf.numPages;
|
this.totalPages=pdf.numPages;
|
||||||
if(pdf.numPages>3){
|
|
||||||
this.showPages = 3;
|
|
||||||
}else{
|
if(pdf.numPages>this.initNum){
|
||||||
|
this.showPages = this.initNum;
|
||||||
|
|
||||||
|
} else{
|
||||||
this.showPages =pdf.numPages;
|
this.showPages =pdf.numPages;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}).catch((err) =>{
|
}).catch((err) =>{
|
||||||
this.$message.error("加载内容失败,请联系管理员");
|
this.$message.error("加载内容失败,请联系管理员");
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
initSrc(url){
|
|
||||||
if(url && url.indexOf('.pdf')>-1){
|
handleScroll() {
|
||||||
//this.src = url;
|
let el_anking = document.querySelector('#case-list-content');
|
||||||
|
let innerHeight = document.querySelector('#pdf-perView').clientHeight
|
||||||
|
let outerHeight = document.documentElement.clientHeight
|
||||||
|
let scrollTop = document.documentElement.scrollTop
|
||||||
|
|
||||||
|
if(this.isscroll){
|
||||||
|
this.showPages++;
|
||||||
|
this.debounce(this.loadInitPdf(),5000);
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
// console.log(this.pdfpage,'000')
|
||||||
|
// console.log(this.totalPages,this.pdfpage)
|
||||||
|
if(this.pdfpage >= this.totalPages){
|
||||||
|
this.isscroll = false
|
||||||
|
this.moreState = 3
|
||||||
|
// console.log('hcuewhf')
|
||||||
|
}
|
||||||
|
// if(scrollTop > 400) {
|
||||||
|
// document.querySelector('#articleAnking').style.cssText = "position: fixed;top: 0;width:242.5px";
|
||||||
|
// } else {
|
||||||
|
// document.querySelector('#articleAnking').style.cssText = "position: static";
|
||||||
|
// }
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
debounce(func, wait) {// 非立即执行
|
||||||
|
let timeout;
|
||||||
|
return function () {
|
||||||
|
let context = this;
|
||||||
|
let args = arguments;
|
||||||
|
if (timeout) clearTimeout(timeout);
|
||||||
|
timeout = setTimeout(() => {
|
||||||
|
func.apply(context, args)
|
||||||
|
}, wait);
|
||||||
|
}
|
||||||
|
},
|
||||||
prePage(type) {
|
prePage(type) {
|
||||||
if (this.currentPage > 1) {
|
if (this.currentPage > 1) {
|
||||||
this.currentPage--;
|
this.currentPage--;
|
||||||
|
|||||||
@@ -4,12 +4,12 @@
|
|||||||
<div v-if="showTop" class="comments-top">
|
<div v-if="showTop" class="comments-top">
|
||||||
<div class="comments-top-left">评论 <span style="color: #797979;">{{total}}条</span>
|
<div class="comments-top-left">评论 <span style="color: #797979;">{{total}}条</span>
|
||||||
<el-checkbox v-if="objType ==2" class="btn" v-model="value" type="primary">只看作者</el-checkbox>
|
<el-checkbox v-if="objType ==2" class="btn" v-model="value" type="primary">只看作者</el-checkbox>
|
||||||
<el-checkbox v-if="objType ==3" class="btn" v-model="value" type="primary">{{value?'查看所有':'只看案主'}}</el-checkbox>
|
<el-checkbox v-if="objType ==3" class="btn" v-model="value" type="primary">{{value?'查看所有':'只看案主 @案主可以给他发私信哦'}}</el-checkbox>
|
||||||
</div>
|
</div>
|
||||||
<div class="comments-top-right" v-if="objType !==2">
|
<!-- <div class="comments-top-right" v-if="objType !==2">
|
||||||
<span @click="showList(false)" v-if="listShow">收起<i class="el-icon-arrow-down"></i></span>
|
<span @click="showList(false)" v-if="listShow">收起<i class="el-icon-arrow-down"></i></span>
|
||||||
<span @click="showList(true)" v-else >打开<i class="el-icon-arrow-up"></i></span>
|
<span @click="showList(true)" v-else >打开<i class="el-icon-arrow-up"></i></span>
|
||||||
</div>
|
</div> -->
|
||||||
</div>
|
</div>
|
||||||
<div class="comments-input" v-if="!readonly">
|
<div class="comments-input" v-if="!readonly">
|
||||||
<div class="grid-content bg-purple">
|
<div class="grid-content bg-purple">
|
||||||
@@ -320,6 +320,7 @@
|
|||||||
this.loadData();
|
this.loadData();
|
||||||
},
|
},
|
||||||
inputValue(val,oldVal) {
|
inputValue(val,oldVal) {
|
||||||
|
console.log("333333");
|
||||||
let fu = val.substr(-1);
|
let fu = val.substr(-1);
|
||||||
if(fu == '@'&&!oldVal) {
|
if(fu == '@'&&!oldVal) {
|
||||||
this.toUserId = '';
|
this.toUserId = '';
|
||||||
|
|||||||
@@ -43,7 +43,7 @@
|
|||||||
|
|
||||||
<div v-if="views" style="cursor: default;" :style="`min-width: ${nodeWidth};`" class="interact-bar-btn" :class="{cursor:!readonly}">
|
<div v-if="views" style="cursor: default;" :style="`min-width: ${nodeWidth};`" class="interact-bar-btn" :class="{cursor:!readonly}">
|
||||||
<el-tooltip effect="light" content="浏览量" placement="top">
|
<el-tooltip effect="light" content="浏览量" placement="top">
|
||||||
<svg-icon style="margin-right: 0;font-size: 16px;" icon-class="views"></svg-icon>
|
<svg-icon style="margin-right: 0;font-size: 16px;" icon-class="browse"></svg-icon>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<span class="interact-bar-value"> {{ data.views}}</span>
|
<span class="interact-bar-value"> {{ data.views}}</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -238,21 +238,25 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
checkHas(){
|
checkHas(){
|
||||||
if(this.type>0){
|
if(this.type>0 && !this.readonly && this.data.id){
|
||||||
apiPraises.has(this.type,this.data.id).then(rs=>{
|
if(this.favorites){
|
||||||
if(rs.status==200 && rs.result){
|
apiFavorites.has(this.type,this.data.id).then(rs=>{
|
||||||
this.isPraise=true;
|
if(rs.status==200 && rs.result){
|
||||||
}else{
|
this.isFavorite=true;
|
||||||
this.isPraise=false;
|
}else{
|
||||||
}
|
this.isFavorite=false;
|
||||||
});
|
}
|
||||||
apiFavorites.has(this.type,this.data.id).then(rs=>{
|
})
|
||||||
if(rs.status==200 && rs.result){
|
}
|
||||||
this.isFavorite=true;
|
if(this.praises){
|
||||||
}else{
|
apiPraises.has(this.type,this.data.id).then(rs=>{
|
||||||
this.isFavorite=false;
|
if(rs.status==200 && rs.result){
|
||||||
}
|
this.isPraise=true;
|
||||||
})
|
}else{
|
||||||
|
this.isPraise=false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
addShare(){
|
addShare(){
|
||||||
|
|||||||
@@ -78,10 +78,10 @@
|
|||||||
<svg-icon icon-class="teather"></svg-icon>
|
<svg-icon icon-class="teather"></svg-icon>
|
||||||
<span slot="title">教师管理</span>
|
<span slot="title">教师管理</span>
|
||||||
</el-menu-item>
|
</el-menu-item>
|
||||||
<!-- <el-menu-item index="/case/manage" v-show="curIdentity == 3">
|
<el-menu-item index="/case/manage" v-show="curIdentity == 3">
|
||||||
<svg-icon icon-class="case"></svg-icon>
|
<svg-icon icon-class="case"></svg-icon>
|
||||||
<span slot="title">案例管理</span>
|
<span slot="title">案例管理</span>
|
||||||
</el-menu-item> -->
|
</el-menu-item>
|
||||||
<el-menu-item index="/manage/ugroups" v-show="curIdentity == 3">
|
<el-menu-item index="/manage/ugroups" v-show="curIdentity == 3">
|
||||||
<svg-icon icon-class="audience" style="font-size:16px"></svg-icon>
|
<svg-icon icon-class="audience" style="font-size:16px"></svg-icon>
|
||||||
<span slot="title">受众管理</span>
|
<span slot="title">受众管理</span>
|
||||||
|
|||||||
1
src/icons/svg/browse.svg
Normal file
1
src/icons/svg/browse.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<svg t="1654588163796" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2388" width="200" height="200"><path d="M512.00085 738.377c-121.05 0-219.428-98.377-219.428-219.428S390.95085 299.52 512.00185 299.52s219.428 98.377 219.428 219.429-98.377 219.428-219.428 219.428M0.00085 517.413c0 24.502 8.923 48.53 25.636 66.486 325.779 350.647 693.614 350.501 977.225-1.316 13.934-17.189 21.139-39.132 21.139-61.294v-3.072c0-23.15-7.936-45.934-23.004-63.561C690.03085 90.88 321.72085 93.513 22.05385 455.022A98.011 98.011 0 0 0 0.00185 517.376" p-id="2389" fill="#A3B1CC"></path><path d="M658.28685 518.949c0 80.932-65.353 146.285-146.285 146.285S365.71585 599.881 365.71585 518.95s65.353-146.286 146.286-146.286 146.285 65.353 146.285 146.286" p-id="2390" fill="#A3B1CC"></path></svg>
|
||||||
|
After Width: | Height: | Size: 819 B |
@@ -9,7 +9,7 @@
|
|||||||
<div class="xtop-nav">
|
<div class="xtop-nav">
|
||||||
<div><a :href="`${webBaseUrl}/index`">首页</a></div>
|
<div><a :href="`${webBaseUrl}/index`">首页</a></div>
|
||||||
<div><a :href="`${webBaseUrl}/course`">课程</a></div>
|
<div><a :href="`${webBaseUrl}/course`">课程</a></div>
|
||||||
<!-- <div><a :href="`${webBaseUrl}/case`" target="_blank">案例</a></div> -->
|
<div><a :href="`${webBaseUrl}/case`" target="_blank">案例</a></div>
|
||||||
<div><a :href="`${webBaseUrl}/article`">文章</a></div>
|
<div><a :href="`${webBaseUrl}/article`">文章</a></div>
|
||||||
<div><a :href="`${webBaseUrl}/qa`">问答</a></div>
|
<div><a :href="`${webBaseUrl}/qa`">问答</a></div>
|
||||||
<div>
|
<div>
|
||||||
|
|||||||
@@ -105,6 +105,47 @@
|
|||||||
</el-card>
|
</el-card>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- 推荐案例2版 -->
|
||||||
|
<div class="modules">
|
||||||
|
<div class="modules-title">
|
||||||
|
|
||||||
|
<span class="modules-text">推荐案例</span>
|
||||||
|
<span class="quyer-tag">
|
||||||
|
<a :class="caseList.orderType==2?'current':''" @click="changeCaseOrder(2)">最热</a>
|
||||||
|
<a :class="caseList.orderType==1?'current':''" @click="changeCaseOrder(1)">最新</a>
|
||||||
|
</span>
|
||||||
|
<span class="more"><router-link to="/case">更多 ></router-link></span>
|
||||||
|
</div>
|
||||||
|
<div class="modules-list xrow" style="height: 235px;overflow: hidden;">
|
||||||
|
<div class="index-course xrow-course" v-for="ca in caseList.list" :key="ca.id">
|
||||||
|
<div class="casetwo" :body-style="{ padding: '0px' }">
|
||||||
|
<!-- <div class="case-top"></div> -->
|
||||||
|
<div class="case-conent">
|
||||||
|
<div class="case-time">
|
||||||
|
{{ca.sysCreateTime.substring(0,10)}}
|
||||||
|
</div>
|
||||||
|
<a :href="'case/detail?id='+ca.id" >
|
||||||
|
<span class="case-title one-line-ellipsis">
|
||||||
|
{{ca.title}}
|
||||||
|
</span>
|
||||||
|
<div class="case-text three-line-ellipsis">
|
||||||
|
{{ca.summary}}
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
<div class="case-inter">
|
||||||
|
<interactBar style="width:180px" :type="3" :readonly="true" :data="ca" :shares="false" :views="false"></interactBar>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div style="height:40px">
|
||||||
|
<authorInfo :avatar="ca.authorInfo.avatar" :name="ca.authorInfo.name" :info="ca.authorInfo.orgInfo" :sex="ca.authorInfo.sex"></authorInfo></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<!-- 推荐案例 -->
|
<!-- 推荐案例 -->
|
||||||
<!-- <div class="modules">
|
<!-- <div class="modules">
|
||||||
@@ -153,6 +194,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</div> -->
|
</div> -->
|
||||||
|
|
||||||
<!-- 推荐文章 -->
|
<!-- 推荐文章 -->
|
||||||
<div class="modules">
|
<div class="modules">
|
||||||
<!--内容块-->
|
<!--内容块-->
|
||||||
@@ -313,7 +355,7 @@ export default {
|
|||||||
list: []
|
list: []
|
||||||
},
|
},
|
||||||
caseList: {
|
caseList: {
|
||||||
num: 4,
|
num: 6,
|
||||||
orderType: 2,
|
orderType: 2,
|
||||||
list: []
|
list: []
|
||||||
},
|
},
|
||||||
@@ -430,6 +472,7 @@ export default {
|
|||||||
let userIds = [];
|
let userIds = [];
|
||||||
res.result.forEach(item => {
|
res.result.forEach(item => {
|
||||||
item.authorInfo = { aid: '', name: '', orgInfo: '', avatar: '', code: '',sex:null };
|
item.authorInfo = { aid: '', name: '', orgInfo: '', avatar: '', code: '',sex:null };
|
||||||
|
|
||||||
if (item.authorId && item.authorId != '') {
|
if (item.authorId && item.authorId != '') {
|
||||||
userIds.push(item.authorId);
|
userIds.push(item.authorId);
|
||||||
}
|
}
|
||||||
@@ -583,6 +626,61 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
.three-line-ellipsis {
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
box-sizing: border-box;
|
||||||
|
-webkit-line-clamp: 3;
|
||||||
|
word-break: break-all;
|
||||||
|
display: -webkit-box;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
}
|
||||||
|
.casetwo{
|
||||||
|
border: 1px solid #F0F0F0;
|
||||||
|
width: 100%;
|
||||||
|
height: 220px;
|
||||||
|
margin-bottom:15px;
|
||||||
|
position: relative;
|
||||||
|
background-color: #fff;
|
||||||
|
.case-top{
|
||||||
|
height: 70px;
|
||||||
|
background-image: linear-gradient(to right , #b8c7e2, #d0dcf3);
|
||||||
|
}
|
||||||
|
.case-conent{
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
// box-shadow: 1px 1px 15px #ccc;
|
||||||
|
// position: absolute;
|
||||||
|
// top: 5%;
|
||||||
|
background-color: #fff;
|
||||||
|
// left: 4%;
|
||||||
|
padding: 16px;
|
||||||
|
.case-time{
|
||||||
|
font-size: 12px;
|
||||||
|
color: #999999;
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
.case-title{
|
||||||
|
margin-top: 10px;
|
||||||
|
font-size: 14px;
|
||||||
|
color: #333;
|
||||||
|
font-weight: bold;
|
||||||
|
margin-bottom:10px;
|
||||||
|
}
|
||||||
|
.case-text{
|
||||||
|
height: 55px;
|
||||||
|
font-size: 14px;
|
||||||
|
color: #888888;
|
||||||
|
line-height: 18px;
|
||||||
|
margin-bottom:12px;
|
||||||
|
}
|
||||||
|
.case-inter{
|
||||||
|
width: 100%;
|
||||||
|
border-bottom: 1px solid #f3f3f3;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
// .qa-dai{
|
// .qa-dai{
|
||||||
// color: #5da1ff;
|
// color: #5da1ff;
|
||||||
// }
|
// }
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
<!-- <el-option label="全部" :value="0"></el-option> -->
|
<!-- <el-option label="全部" :value="0"></el-option> -->
|
||||||
<el-option label="文章" :value="2"></el-option>
|
<el-option label="文章" :value="2"></el-option>
|
||||||
<!-- <el-option label="课程" :value="1"></el-option> -->
|
<!-- <el-option label="课程" :value="1"></el-option> -->
|
||||||
<!-- <el-option label="问答" :value="4"></el-option> -->
|
<el-option label="案例" :value="3"></el-option>
|
||||||
<el-option label="问答" :value="4"></el-option>
|
<el-option label="问答" :value="4"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
<!-- <el-input style="width: 200px;margin-right: 10px" placeholder="请选择来源"></el-input> -->
|
<!-- <el-input style="width: 200px;margin-right: 10px" placeholder="请选择来源"></el-input> -->
|
||||||
@@ -155,6 +155,8 @@ export default {
|
|||||||
|
|
||||||
}else if(this.dataList.type == 4){
|
}else if(this.dataList.type == 4){
|
||||||
this.$router.push({ path: '/qa/answer', query: { id: item.objId } });
|
this.$router.push({ path: '/qa/answer', query: { id: item.objId } });
|
||||||
|
} else if(this.dataList.type == 3){
|
||||||
|
this.$router.push({ path: '/case/detail', query: { id: item.objId } });
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -268,12 +270,11 @@ export default {
|
|||||||
toAname:this.replayContent.sysCreateBy,
|
toAname:this.replayContent.sysCreateBy,
|
||||||
parentRead:true
|
parentRead:true
|
||||||
}
|
}
|
||||||
if(this.dataList.type == 2) {
|
if(this.dataList.type == 2 || this.dataList.type == 3) {
|
||||||
apiComment.reply(replayInfo).then(res=>{
|
apiComment.reply(replayInfo).then(res=>{
|
||||||
if(res.status==200){
|
if(res.status==200){
|
||||||
this.$message.success("回复成功");
|
this.$message.success("回复成功");
|
||||||
this.shareShow = false;
|
this.shareShow = false;
|
||||||
//this.getData();
|
|
||||||
if(!this.replyItem.replys){
|
if(!this.replyItem.replys){
|
||||||
this.replyItem.replys=[];
|
this.replyItem.replys=[];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -158,8 +158,8 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
reset() {
|
reset() {
|
||||||
this.queryObj.isTop = ''
|
this.queryObj.isTop = '';
|
||||||
this.queryObj.keyWord = ''
|
this.queryObj.keyWord = '';
|
||||||
this.getData()
|
this.getData()
|
||||||
},
|
},
|
||||||
//获取案例列表数据
|
//获取案例列表数据
|
||||||
|
|||||||
@@ -1,65 +1,124 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div id="case-list-content">
|
||||||
<portal-header current="case" :goSearch="2"></portal-header>
|
<portal-header current="case" :goSearch="2"></portal-header>
|
||||||
<div class="portal-content xcontent" style="margin-top: 30px;">
|
<div class="portal-content xcontent" style="margin-top: 30px;">
|
||||||
<el-breadcrumb separator-class="el-icon-arrow-right" class="breadcrumb-nav">
|
<el-breadcrumb separator-class="el-icon-arrow-right" class="breadcrumb-nav">
|
||||||
<el-breadcrumb-item :to="{ path: '/case' }">案例列表</el-breadcrumb-item>
|
<el-breadcrumb-item :to="{ path: '/case' }">案例列表</el-breadcrumb-item>
|
||||||
<el-breadcrumb-item>案例详情</el-breadcrumb-item>
|
<el-breadcrumb-item>案例详情</el-breadcrumb-item>
|
||||||
</el-breadcrumb>
|
</el-breadcrumb>
|
||||||
<div class="xrow" style="display: flex;justify-content: space-between;">
|
<div class="xrow" style="display: flex;justify-content: space-between;">
|
||||||
<div style="flex: 1;">
|
<div style="flex: 1;">
|
||||||
<el-row :gutter="10">
|
<el-row :gutter="10">
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-card :body-style="{ padding: '0px' }" class="detail">
|
<el-card :body-style="{ padding: '0px' }" class="detail">
|
||||||
<div class="title">{{ caseDetail.title }}</div>
|
<div class="title">{{ caseDetail.title }}</div>
|
||||||
<div class="label">
|
<div class="label">
|
||||||
<author :onlyAvatar="true" :avatar="authorInfo.avatar" ></author>
|
<author :onlyAvatar="true" :avatar="authorInfo.avatar" :sex="authorInfo.sex" ></author>
|
||||||
<span>作者:{{ authorInfo.name }}</span>
|
<span>作者:{{ authorInfo.name }}</span>
|
||||||
<span>工号:{{ authorInfo.code }}</span>
|
<span>工号:{{ authorInfo.code }}</span>
|
||||||
<span>部门:{{ authorInfo.orgInfo }}</span>
|
<span>部门:{{ authorInfo.orgInfo }}</span>
|
||||||
<span>案例编号:{{ caseDetail.id }}</span>
|
<!-- <span>案例编号:{{ caseDetail.id }}</span> -->
|
||||||
<span>发布时间:{{ caseDetail.sysCreateTime }}</span>
|
<span v-if="caseDetail.sysCreateTime">{{ caseDetail.sysCreateTime.substring(0,10) }}</span>
|
||||||
<interactBar :views="false" :data="caseDetail" :type="3" :comments="false" :shares="false"></interactBar>
|
<interactBar :data="caseDetail" :type="3" :comments="false" :shares="true"></interactBar>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="btn-div">
|
<div class="case-summary"><span>{{ caseDetail.summary }}</span></div>
|
||||||
<span class="item">角色认知</span>
|
<div class="btn-div" >
|
||||||
<span class="item">角色转变</span>
|
<span v-if="caseDetail.orgDomain" class="item">{{ caseDetail.orgDomain }}</span>
|
||||||
<span class="item">团队管理</span>
|
<span v-if="caseDetail.majorType" class="item">{{ caseDetail.majorType }}</span>
|
||||||
|
<span v-if="caseDetail.caseType" class="item">{{ caseDetail.caseType }}</span>
|
||||||
|
<span v-if="caseDetail.caseType1" class="item">{{ caseDetail.caseType1 }}</span>
|
||||||
|
<span v-if="caseDetail.caseType2" class="item">{{ caseDetail.caseType2 }}</span>
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-card :body-style="{ padding: '0px' }" class="jianjie">
|
<el-card :body-style="{ padding: '0px' }" class="jianjie">
|
||||||
<!-- <div class="content">
|
<!-- <div class="content">
|
||||||
{{ caseDetail.content }}
|
{{ caseDetail.content }}
|
||||||
</div> -->
|
</div> -->
|
||||||
<pdfPreview :filePath="basePath+caseDetail.filePath"></pdfPreview>
|
<pdfPreview v-if="pdfPath" :filePath="pdfPath"></pdfPreview>
|
||||||
</el-card>
|
</el-card>
|
||||||
<!-- :authorId="articleDetailData.sysCreateAid" -->
|
<!-- :authorId="articleDetailData.sysCreateAid" -->
|
||||||
<el-row><comments @success="success" v-if="resolveId != ''" :obj-type="3" :obj-id="resolveId" :authorId="caseDetail.sysCreateAid"></comments></el-row>
|
<el-row><comments @success="success" v-if="resolveId != ''" :obj-type="3" :obj-id="resolveId" :authorId="caseDetail.sysCreateAid" :toUsers="toUsers"></comments></el-row>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
<div style="width: 245px;margin-left: 10px;"><!--排行榜-->
|
<div style="width: 245px;margin-left: 5px;">
|
||||||
<div id="fixd-box">
|
<div>
|
||||||
<el-card class="ranking-card">
|
<div id="fixd-box">
|
||||||
<div slot="header">
|
<el-card class="ranking-card" >
|
||||||
<span>排行榜</span>
|
<div slot="header">
|
||||||
</div>
|
<span style="font-size: 14px;font-weight: 600;color: #333333;">好评榜</span>
|
||||||
<div>
|
</div>
|
||||||
<el-row class="ranking-title" v-for="(item,index) in ankingList" :key="index">
|
<div style="padding-bottom:10px">
|
||||||
<el-col :span="6">
|
<el-row class="ranking-title">
|
||||||
<img v-if="index===0" :src="`${webBaseUrl}/images/first.png`"/>
|
<!-- <el-col :span="15" style="color: #333333;font-size: 14px;">名称</el-col> -->
|
||||||
<img v-if="index===1" :src="`${webBaseUrl}/images/second.png`"/>
|
<!-- <el-col :offset="4" :span="5" class="center" style="color: #333333;font-size: 14px;">分数</el-col> -->
|
||||||
<img v-if="index===2" :src="`${webBaseUrl}/images/third.png`"/>
|
</el-row>
|
||||||
</el-col>
|
<el-row class="ranking-title bacolor" v-for="(item, index) in ankingList" :key="index" >
|
||||||
<el-col class="center" :span="18">{{item.sysCreateUname}}</el-col>
|
<el-col :span="6" style="height:34px">
|
||||||
<!-- <el-col class="center" :span="7">{{''}}</el-col>
|
<img v-if="index===0" :src="`${webBaseUrl}/images/first.png`"/>
|
||||||
<el-col class="center" :span="7">{{item.counts}}</el-col> -->
|
<img v-if="index===1" :src="`${webBaseUrl}/images/second.png`"/>
|
||||||
</el-row>
|
<img v-if="index===2" :src="`${webBaseUrl}/images/third.png`"/>
|
||||||
</div>
|
<span style="margin-left: 10px" v-if="index!=2&&index!=0&&index!=1">{{index+1}}</span>
|
||||||
</el-card>
|
</el-col>
|
||||||
</div>
|
<el-tooltip :enterable="false" @click.native="jumpRouter(item)" effect="light" :content="item.sysCreateUname" placement="top-start">
|
||||||
|
<el-col :span="15" style="cursor: pointer;" class="title-line-ellipsis"> {{ item.sysCreateUname }}</el-col>
|
||||||
</div>
|
</el-tooltip>
|
||||||
|
<!-- <el-col class="center" style="color: #FF8E00;" :span="5">{{ item.score }}</el-col> -->
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
<div style="height: 10px;"></div>
|
||||||
|
<el-card class="ranking-card" >
|
||||||
|
<div slot="header">
|
||||||
|
<span style="font-size: 14px;font-weight: 600;color: #333333;">人气榜</span>
|
||||||
|
</div>
|
||||||
|
<div style="padding-bottom:10px">
|
||||||
|
<el-row class="ranking-title">
|
||||||
|
<!-- <el-col :span="15" style="color: #333333;font-size: 14px;">名称</el-col> -->
|
||||||
|
<!-- <el-col :offset="4" :span="5" class="center" style="color: #333333;font-size: 14px;">分数</el-col> -->
|
||||||
|
</el-row>
|
||||||
|
<el-row class="ranking-title bacolor" v-for="(item, index) in Popularity" :key="index" >
|
||||||
|
<el-col :span="6" style="height:34px">
|
||||||
|
<img v-if="index===0" :src="`${webBaseUrl}/images/first.png`"/>
|
||||||
|
<img v-if="index===1" :src="`${webBaseUrl}/images/second.png`"/>
|
||||||
|
<img v-if="index===2" :src="`${webBaseUrl}/images/third.png`"/>
|
||||||
|
<span style="margin-left: 10px" v-if="index!=2&&index!=0&&index!=1">{{index+1}}</span>
|
||||||
|
</el-col>
|
||||||
|
<el-tooltip :enterable="false" @click.native="jumpRouter(item)" effect="light" :content="item.title" placement="top-start">
|
||||||
|
<el-col :span="15" style="cursor: pointer;" class="title-line-ellipsis"> {{ item.title }}</el-col>
|
||||||
|
</el-tooltip>
|
||||||
|
<!-- <el-col class="center" style="color: #FF8E00;" :span="5">{{ item.score }}</el-col> -->
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
<div style="height: 10px;"></div>
|
||||||
|
<el-card class="ranking-card" >
|
||||||
|
<div slot="header">
|
||||||
|
<span style="font-size: 14px;font-weight: 600;color: #333333;">热度榜</span>
|
||||||
|
</div>
|
||||||
|
<div style="padding-bottom:10px">
|
||||||
|
<el-row class="ranking-title">
|
||||||
|
<!-- <el-col :span="15" style="color: #333333;font-size: 14px;">名称</el-col> -->
|
||||||
|
<!-- <el-col :offset="4" :span="5" class="center" style="color: #333333;font-size: 14px;">分数</el-col> -->
|
||||||
|
</el-row>
|
||||||
|
<el-row class="ranking-title bacolor" v-for="(item, index) in Positive" :key="index" >
|
||||||
|
<el-col :span="6" style="height:34px">
|
||||||
|
<img v-if="index===0" :src="`${webBaseUrl}/images/first.png`"/>
|
||||||
|
<img v-if="index===1" :src="`${webBaseUrl}/images/second.png`"/>
|
||||||
|
<img v-if="index===2" :src="`${webBaseUrl}/images/third.png`"/>
|
||||||
|
<span style="margin-left: 10px" v-if="index!=2&&index!=0&&index!=1">{{index+1}}</span>
|
||||||
|
</el-col>
|
||||||
|
<el-tooltip :enterable="false" @click.native="jumpRouter(item)" effect="light" :content="item.title" placement="top-start">
|
||||||
|
<el-col :span="15" style="cursor: pointer;" class="title-line-ellipsis"> {{ item.title }}</el-col>
|
||||||
|
</el-tooltip>
|
||||||
|
<!-- <el-col class="center" style="color: #FF8E00;" :span="5">{{ item.score }}</el-col> -->
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<portal-footer></portal-footer>
|
<portal-footer></portal-footer>
|
||||||
@@ -77,7 +136,8 @@ import comments from '@/components/Portal/comments.vue';
|
|||||||
import apiCase from '@/api/modules/cases.js';
|
import apiCase from '@/api/modules/cases.js';
|
||||||
import apiUser from '@/api/system/user.js';
|
import apiUser from '@/api/system/user.js';
|
||||||
import author from '@/components/Portal/authorInfo.vue';
|
import author from '@/components/Portal/authorInfo.vue';
|
||||||
import apiMessage from '@/api/system/message.js'
|
import apiMessage from '@/api/system/message.js';
|
||||||
|
import apiDict from "@/api/modules/dict.js"
|
||||||
export default {
|
export default {
|
||||||
name: 'atticle',
|
name: 'atticle',
|
||||||
components: { portalHeader, portalFooter, interactBar, author, comments,pdfPreview },
|
components: { portalHeader, portalFooter, interactBar, author, comments,pdfPreview },
|
||||||
@@ -86,29 +146,76 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
toUsers:[],
|
||||||
|
ankingList:[],
|
||||||
|
Popularity:[],
|
||||||
|
Positive:[],
|
||||||
resolveId: '',
|
resolveId: '',
|
||||||
basePath:process.env.VUE_APP_FILE_BASE_URL,
|
basePath:process.env.VUE_APP_FILE_BASE_URL,
|
||||||
|
pdfPath:'',
|
||||||
caseDetail: {
|
caseDetail: {
|
||||||
id:'',
|
id:'',
|
||||||
filePath:''
|
filePath:''
|
||||||
},
|
},
|
||||||
ankingList:[],
|
ankingList:[],
|
||||||
authorInfo:{ aid: '', name: '', orgInfo: '', avatar: '', code: '' }
|
authorInfo:{ aid: '', name: '', orgInfo: '', avatar: '', code: '',sex:null}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
//this.pdfPath=this.basePath+'/case/demo1.pdf';
|
||||||
this.resolveId = this.$route.query.id;
|
this.resolveId = this.$route.query.id;
|
||||||
if (this.resolveId) {
|
if (this.resolveId) {
|
||||||
this.getCaseData();
|
this.getCaseData();
|
||||||
}
|
}
|
||||||
this.getAnkingData();
|
this.getAnkingData();
|
||||||
|
this.getPopularity();
|
||||||
|
this.getPositive();
|
||||||
|
window.addEventListener(
|
||||||
|
"scroll",
|
||||||
|
this.handleScroll
|
||||||
|
);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getAnkingData(){
|
|
||||||
apiCase.usernameList(10).then(res=>{
|
|
||||||
|
|
||||||
|
handleScroll() {
|
||||||
|
let innerHeight = document.querySelector('#case-list-content').clientHeight
|
||||||
|
let outerHeight = document.documentElement.clientHeight
|
||||||
|
let scrollTop = document.documentElement.scrollTop
|
||||||
|
if ((outerHeight + scrollTop + 350) >= innerHeight) {
|
||||||
|
if(this.moreState == 1 && this.course.pageIndex < 4) {
|
||||||
|
this.loadMore();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(scrollTop > 630) {
|
||||||
|
document.querySelector('#fixd-box').style.cssText = "position: fixed;top: -550px;width:245.5px";
|
||||||
|
} else {
|
||||||
|
document.querySelector('#fixd-box').style.cssText = "position: static";
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
getAnkingData(){
|
||||||
|
apiCase.usernameList(5).then(res=>{
|
||||||
if(res.status==200){
|
if(res.status==200){
|
||||||
this.ankingList=res.result
|
this.ankingList=res.result
|
||||||
|
// console.log(res)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getPopularity(){
|
||||||
|
apiCase.queryPraises(5).then(res=>{
|
||||||
|
if(res.status==200){
|
||||||
|
this.Popularity=res.result
|
||||||
|
// console.log(this.Popularity)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getPositive(){
|
||||||
|
apiCase.queryComments(5).then(res=>{
|
||||||
|
if(res.status==200){
|
||||||
|
this.Positive=res.result
|
||||||
|
console.log(res)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -118,14 +225,24 @@ export default {
|
|||||||
if (JSON.stringify(res.result) != '{}') {
|
if (JSON.stringify(res.result) != '{}') {
|
||||||
this.caseDetail = res.result;
|
this.caseDetail = res.result;
|
||||||
this.getCaseUserDetail();
|
this.getCaseUserDetail();
|
||||||
|
if(this.caseDetail.filePath){
|
||||||
|
this.pdfPath=this.basePath+this.caseDetail.filePath;
|
||||||
|
}else{
|
||||||
|
this.$message.error('内容文件不存在或已被删除,请与管理员联系');
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
getCaseUserDetail() {
|
getCaseUserDetail() {
|
||||||
apiUser.getByIds([this.caseDetail.sysCreateAid]).then(res => {
|
apiUser.getByIds([this.caseDetail.sysCreateAid]).then(res => {
|
||||||
if (res.status == 200) {
|
if (res.status == 200 && res.result.length>0) {
|
||||||
this.authorInfo = res.result[0];
|
this.authorInfo = res.result[0];
|
||||||
|
this.toUsers = [
|
||||||
|
{name: res.result[0].name, aid:res.result[0].aid ,sex:res.result[0].sex}
|
||||||
|
];
|
||||||
|
//console.log(res.result,'res.result');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@@ -150,6 +267,48 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
.case-summary{
|
||||||
|
margin-top: 10px;
|
||||||
|
font-size: 16px;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
::v-deep .el-card__body{
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
::v-deep .bacolor:nth-child(odd){
|
||||||
|
background-color: #f6f6f6;
|
||||||
|
padding: 0 5px;
|
||||||
|
}
|
||||||
|
::v-deep .bacolor:nth-child(even){
|
||||||
|
background-color: #fff;
|
||||||
|
padding: 0 5px;
|
||||||
|
|
||||||
|
}
|
||||||
|
.ranking-title {
|
||||||
|
line-height: 34px;
|
||||||
|
font-size: 15px;
|
||||||
|
color: #333333;
|
||||||
|
.center-titlt{
|
||||||
|
font-size: 15px;
|
||||||
|
color: #333333;
|
||||||
|
}
|
||||||
|
.center{
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
img{
|
||||||
|
margin-top: 5px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
::v-deep .title-line-ellipsis{
|
||||||
|
// width: 100%;
|
||||||
|
display: -webkit-box;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow:ellipsis;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
-webkit-line-clamp: 1;
|
||||||
|
box-sizing: border-box;
|
||||||
|
word-break:break-all;
|
||||||
|
}
|
||||||
.nav {
|
.nav {
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
@@ -182,7 +341,7 @@ export default {
|
|||||||
padding-bottom: 10px;
|
padding-bottom: 10px;
|
||||||
color: #666;
|
color: #666;
|
||||||
.item {
|
.item {
|
||||||
margin: 0 8px 0 15px;
|
margin: 0 10px 0 0px;
|
||||||
border: 1px solid #9e9e9e;
|
border: 1px solid #9e9e9e;
|
||||||
padding: 3px 10px;
|
padding: 3px 10px;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
@@ -195,7 +354,7 @@ export default {
|
|||||||
.jianjie {
|
.jianjie {
|
||||||
margin: 15px 0;
|
margin: 15px 0;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
padding: 0px 2px 10px 2px;
|
padding: 0px 0px 10px 0px;
|
||||||
.content {
|
.content {
|
||||||
padding: 10px 0;
|
padding: 10px 0;
|
||||||
line-height: 25px;
|
line-height: 25px;
|
||||||
|
|||||||
@@ -7,43 +7,37 @@
|
|||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-card :body-style="{ padding: '0px' }" class="left-div">
|
<el-card :body-style="{ padding: '0px' }" class="left-div">
|
||||||
<el-row class="search-div">
|
<el-row class="search-div">
|
||||||
<el-row>
|
<!-- <el-row>
|
||||||
<el-col :span="10" class="search-keyword">
|
<el-col :span="10" class="search-keyword">
|
||||||
<!-- <el-input placeholder="请输入关键词搜索" v-model="keyWord" clearable><el-button slot="append" icon="el-icon-search" @click="search"></el-button></el-input> -->
|
<el-input placeholder="请输入关键词搜索" v-model="keyWord" clearable><el-button slot="append" icon="el-icon-search" @click="search"></el-button></el-input>
|
||||||
<!-- <div class="tip">热门搜索词:物联网 教师 辅导 绩效</div> -->
|
<div class="tip">热门搜索词:物联网 教师 辅导 绩效</div>
|
||||||
<!-- <div class="tip" style="font-size: 14px;">
|
<div class="tip" style="font-size: 14px;">
|
||||||
热门搜索词:<span style="cursor:pointer;font-size:15px;margin-left: 10px;" v-for="(item,index) in searchRecords" :key="index" @click="useHotword(item)">{{item.keyword}}</span>
|
热门搜索词:<span style="cursor:pointer;font-size:15px;margin-left: 10px;" v-for="(item,index) in searchRecords" :key="index" @click="useHotword(item)">{{item.keyword}}</span>
|
||||||
</div> -->
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row> -->
|
||||||
<div class="searchbar" v-if="searchTags.length > 0">
|
<div class="searchbar" v-if="searchTags.length > 0">
|
||||||
<div style="line-height: 30px;">
|
<div style="line-height: 30px;">
|
||||||
<span class="item-title">搜索条件</span>
|
<span class="item-title">搜索条件</span>
|
||||||
<el-tag closable>显示事业</el-tag>
|
<el-tag closable v-for="(tag, tagIdx) in searchTags" :key="tagIdx" @close="tagsClose(tag,tagIdx)">{{ tag }}</el-tag>
|
||||||
<el-tag closable>经营</el-tag>
|
|
||||||
<el-tag closable>业绩提升</el-tag>
|
|
||||||
<el-tag closable v-for="(tag, tagIdx) in searchTags" :key="tagIdx">{{ tag.words }}</el-tag>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<el-row class="search-item">
|
<el-row class="search-item">
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<!-- <div class="item-title">组织领域</div> -->
|
|
||||||
<div style="margin-top:10px; display: flex;">
|
<div style="margin-top:10px; display: flex;">
|
||||||
<div style="line-height: 25px;">
|
<div style="line-height: 25px;padding-right: 5px;">
|
||||||
<span class="item-title" style="padding-right: 5px;">组织领域</span>
|
<span class="item-title" style="padding-right: 5px;">组织领域</span>
|
||||||
<span class="item-line"></span>
|
<span class="item-line"></span>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div style="flex:1;">
|
||||||
<el-radio-group v-model="category" size="mini" @change="search()">
|
<el-radio-group v-model="queryCondition.orgDomain" size="mini" @change="search()">
|
||||||
<el-radio-button label="0">全部</el-radio-button>
|
<el-radio-button :label="null">全部</el-radio-button>
|
||||||
<el-radio-button label="1">显示事业</el-radio-button>
|
<el-radio-button v-for="item in domain" :key="item.code" :label="item.name"> {{ item.name}}</el-radio-button>
|
||||||
<el-radio-button label="2">传感器事业</el-radio-button>
|
|
||||||
<el-radio-button label="3">智慧医工事业</el-radio-button>
|
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<div class="search-div-collapse">
|
<div class="search-div-collapse">
|
||||||
@@ -51,63 +45,37 @@
|
|||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<!-- <div class="item-title">专业领域</div> -->
|
<!-- <div class="item-title">专业领域</div> -->
|
||||||
<div style="margin-top:10px; display: flex;">
|
<div style="margin-top:10px; display: flex;">
|
||||||
<div style="line-height: 25px;">
|
<div style="line-height: 25px;padding-right: 5px;">
|
||||||
<span class="item-title" style="padding-right: 5px;">专业分类</span>
|
<span class="item-title" style="padding-right: 5px;">专业分类</span>
|
||||||
<span class="item-line"></span>
|
<span class="item-line"></span>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div style="flex:1" id="searchBox">
|
||||||
<el-radio-group v-model="type2" size="mini" @change="search()">
|
<el-radio-group v-model="queryCondition.majorType" size="mini" @change="search()">
|
||||||
<el-radio-button label="0">全部</el-radio-button>
|
<el-radio-button :label="null">全部</el-radio-button>
|
||||||
<el-radio-button label="1">经营</el-radio-button>
|
<el-radio-button v-for="item in Profess" :key="item.code" :label="item.name" > {{ item.name }} </el-radio-button>
|
||||||
<el-radio-button label="2">领用</el-radio-button>
|
|
||||||
<el-radio-button label="3">研发</el-radio-button>
|
|
||||||
<el-radio-button label="4">营销</el-radio-button>
|
|
||||||
<el-radio-button label="5">生产技术</el-radio-button>
|
|
||||||
<el-radio-button label="6">信息技术</el-radio-button>
|
|
||||||
<el-radio-button label="7">质量</el-radio-button>
|
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row class="search-item">
|
|
||||||
<el-col :span="24">
|
|
||||||
<!-- <div class="item-title">应用场景</div> -->
|
|
||||||
<div style="margin-top:10px; display: flex;">
|
|
||||||
<div style="line-height: 25px;">
|
|
||||||
<span class="item-title" style="padding-right: 5px;">专业领域</span>
|
|
||||||
<span class="item-line"></span>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<el-radio-group v-model="type3" size="mini" @click="search()">
|
|
||||||
<el-radio-button label="0">全部</el-radio-button>
|
|
||||||
<el-radio-button label="1">业绩提升</el-radio-button>
|
|
||||||
<el-radio-button label="2">人才培养</el-radio-button>
|
|
||||||
<el-radio-button label="3">知识管理</el-radio-button>
|
|
||||||
</el-radio-group>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
<!-- <el-row class="search-div-more">
|
<div class="searBox" v-if="searchwd">
|
||||||
<el-col :span="24">
|
<el-button type="text" id="closeSearchBtn" @click="closeSearch">
|
||||||
<el-button type="text" @click="queryExpand = true" v-if="!queryExpand">收起</el-button>
|
{{word}}
|
||||||
<el-button type="text" v-else @click="queryExpand = false">更多</el-button>
|
<i :class="showAll ? 'el-icon-arrow-up ': 'el-icon-arrow-down'"></i>
|
||||||
</el-col>
|
</el-button>
|
||||||
</el-row> -->
|
</div>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-row class="order-div">
|
<el-row class="order-div">
|
||||||
<span class="quyer-tag">
|
<span class="quyer-tag">
|
||||||
<el-button type="text" class="order-class" @click="searchData('')" :class="{ actice: queryCondition.orderField == '' }">时间最近</el-button>
|
<el-button type="text" class="order-class" @click="searchData('comments')" :class="{ actice: queryCondition.orderField == 'comments' }">最热</el-button>
|
||||||
<el-button type="text" class="order-class" @click="searchData('praises')" :class="{ actice: queryCondition.orderField == 'praises' }">热度最高</el-button>
|
<el-button type="text" class="order-class" @click="searchData('')" :class="{ actice: queryCondition.orderField == '' }">最新</el-button>
|
||||||
|
|
||||||
<!-- <el-button type="text" class="order-class" @click="queryCondition.breCommend = queryCondition.breCommend == ture ? true : null" :class="{ actice: queryCondition.breCommend == true }">组织推荐</el-button> -->
|
<!-- <el-button type="text" class="order-class" @click="queryCondition.breCommend = queryCondition.breCommend == ture ? true : null" :class="{ actice: queryCondition.breCommend == true }">组织推荐</el-button> -->
|
||||||
</span>
|
</span>
|
||||||
<!-- <span v-if="isFind" style="padding-left:10px;">本次搜索出 {{caseList.count}} 条结果</span> -->
|
|
||||||
<!-- <span class="more"></span> -->
|
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row class="data-content">
|
<el-row class="data-content">
|
||||||
<el-col :span="24" v-for="item in caseList.list" :key="item.id" class="case-list">
|
<el-col :span="24" v-for="item in caseList.list" :key="item.id" class="case-list">
|
||||||
@@ -116,34 +84,60 @@
|
|||||||
<div class="case-info-title">
|
<div class="case-info-title">
|
||||||
<router-link :to="'/case/detail?id='+item.id">
|
<router-link :to="'/case/detail?id='+item.id">
|
||||||
<!-- <span v-if="i % 2 == 0" style="color:red;margin-right:5px">[组织推荐]</span> -->
|
<!-- <span v-if="i % 2 == 0" style="color:red;margin-right:5px">[组织推荐]</span> -->
|
||||||
<span v-html="item.title"></span>
|
<div>
|
||||||
<div class="case-info-date">
|
<span class="" v-html="item.title"></span>
|
||||||
|
<div class="case-info-date">
|
||||||
<i class="el-icon-time"></i>
|
<i class="el-icon-time"></i>
|
||||||
<time-show :time="item.sysCreateTime"></time-show>
|
<time-show :time="item.sysCreateTime"></time-show>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</router-link>
|
||||||
|
</div>
|
||||||
|
<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"> -->
|
||||||
|
<!-- class="case-info-summary" -->
|
||||||
|
<div>
|
||||||
|
<router-link :to="'/case/detail?id='+item.id">
|
||||||
|
<!-- {{item.summary}} -->
|
||||||
|
{{displayAll(item)}}
|
||||||
|
</router-link>
|
||||||
|
<span style="color:#588afc" v-if="item.summary.length>90" @click="changeIsAll(item)">
|
||||||
|
{{item.isAll?'收起':'全文'}}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<!-- </router-link> -->
|
||||||
|
<!-- <div class="button-wrap" v-if="needShowExpande">
|
||||||
|
<div class="exp-but" @click="expandeClick" v-if="!expande">展开
|
||||||
</div>
|
</div>
|
||||||
</router-link>
|
<div class="exp-but" @click="expandeClick" v-else>收起</div>
|
||||||
</div>
|
</div> -->
|
||||||
<div class="case-info-summary" >
|
|
||||||
{{item.content}}
|
|
||||||
</div>
|
|
||||||
<div style="display: flex;justify-content: space-between;">
|
<div style="display: flex;justify-content: space-between;">
|
||||||
<div><author :avatar="item.authorInfo.avatar" :name="item.authorInfo.name" :info="item.authorInfo.orgInfo" :sex="item.authorInfo.sex"></author> </div>
|
|
||||||
<div><interactBar :type="0" :shares="false" :views="false" :data="item" :readonly="false"></interactBar> </div>
|
<div>
|
||||||
|
<interactBar :type="0" :shares="false" :data="item" :readonly="false"></interactBar> </div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
<div class="pagination-div">
|
||||||
|
<span class="pag-text" @click="loadMore()" v-if="moreState == 1">加载更多</span>
|
||||||
|
<span class="pag-text-msg" v-else-if="moreState == 2">数据加载中</span>
|
||||||
|
<span class="pag-text-msg" v-else-if="moreState == 3 && !isSeach">没有更多数据了</span>
|
||||||
|
<span class="pag-text-msg" v-else-if="isSeach">没有查询到相关内容</span>
|
||||||
|
</div>
|
||||||
|
<div v-if="isSeach" style="height:382px">
|
||||||
|
|
||||||
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
<div class="pagination-div">
|
|
||||||
<span class="pag-text" v-if="isMore" @click="loadMore()">加载更多</span>
|
|
||||||
<span class="pag-text" v-else>没有更多数据了</span>
|
|
||||||
</div>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
<div style="width: 245px;margin-left: 5px;">
|
<div style="width: 245px;margin-left: 5px;">
|
||||||
<div>
|
<div>
|
||||||
<div id="fixd-box">
|
<div id="fixd-box">
|
||||||
<el-card class="ranking-card" >
|
<el-card class="ranking-card" >
|
||||||
@@ -196,7 +190,7 @@
|
|||||||
<div style="height: 10px;"></div>
|
<div style="height: 10px;"></div>
|
||||||
<el-card class="ranking-card" >
|
<el-card class="ranking-card" >
|
||||||
<div slot="header">
|
<div slot="header">
|
||||||
<span style="font-size: 14px;font-weight: 600;color: #333333;">人气榜</span>
|
<span style="font-size: 14px;font-weight: 600;color: #333333;">热度榜</span>
|
||||||
</div>
|
</div>
|
||||||
<div style="padding-bottom:10px">
|
<div style="padding-bottom:10px">
|
||||||
<el-row class="ranking-title">
|
<el-row class="ranking-title">
|
||||||
@@ -217,19 +211,10 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<el-row :gutter="10">
|
<el-row :gutter="10">
|
||||||
</el-row>
|
</el-row>
|
||||||
<div style="height: 50px;"></div>
|
<div style="height: 50px;"></div>
|
||||||
@@ -263,12 +248,21 @@ import author from '@/components/Portal/authorInfo.vue';
|
|||||||
import apiCase from '@/api/modules/cases.js';
|
import apiCase from '@/api/modules/cases.js';
|
||||||
import apiUser from '@/api/system/user.js';
|
import apiUser from '@/api/system/user.js';
|
||||||
import apiSearchterm from "@/api/modules/searchterm.js";
|
import apiSearchterm from "@/api/modules/searchterm.js";
|
||||||
import apiDict from "@/api/modules/dict.js";
|
import { deepClone } from "../../../utils";
|
||||||
|
import apiDict from "@/api/modules/dict.js"
|
||||||
export default {
|
export default {
|
||||||
name: 'index',
|
name: 'index',
|
||||||
components: { portalHeader, portalFooter, portalFloatTools, interactBar,timeShow ,author},
|
components: { portalHeader, portalFooter, portalFloatTools, interactBar,timeShow ,author},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters(['userInfo','portalCase']),
|
...mapGetters(['userInfo','portalCase']),
|
||||||
|
word: function() {
|
||||||
|
if (this.showAll == false) {
|
||||||
|
//对文字进行处理
|
||||||
|
return "展开";
|
||||||
|
} else {
|
||||||
|
return "收起";
|
||||||
|
}
|
||||||
|
},
|
||||||
isMore() {
|
isMore() {
|
||||||
let isOk = true;
|
let isOk = true;
|
||||||
if(this.caseList.list.length === this.caseList.count) {
|
if(this.caseList.list.length === this.caseList.count) {
|
||||||
@@ -279,6 +273,10 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
moreState:1,// 1 加载更多 2 加载中 3无数据
|
||||||
|
isSeach:false,
|
||||||
|
searchwd:true,
|
||||||
|
showAll:true,//是否展开全部
|
||||||
searchRecords:[],
|
searchRecords:[],
|
||||||
caseList:{
|
caseList:{
|
||||||
count:0,
|
count:0,
|
||||||
@@ -287,14 +285,20 @@ export default {
|
|||||||
ankingList:[],
|
ankingList:[],
|
||||||
Popularity:[],
|
Popularity:[],
|
||||||
Positive:[],
|
Positive:[],
|
||||||
|
domain:[],
|
||||||
|
Profess:[],
|
||||||
|
optionsList: [], //分类数据
|
||||||
protocolDialogVisible: false,
|
protocolDialogVisible: false,
|
||||||
protocolConfirmButton:true,
|
protocolConfirmButton:true,
|
||||||
queryCondition:{
|
queryCondition:{
|
||||||
pageIndex:1,
|
pageIndex:1,
|
||||||
pageSize:10,
|
pageSize:10,
|
||||||
orderField:'',
|
orderField:'comments',
|
||||||
breCommend:null,
|
// breCommend:null,
|
||||||
keyWord:''
|
keyWord:'',
|
||||||
|
majorType:null,//专业分类
|
||||||
|
orgDomain:null,// 组织领域
|
||||||
|
orderAsc: false
|
||||||
},
|
},
|
||||||
keyWord:'',
|
keyWord:'',
|
||||||
anking: 2,
|
anking: 2,
|
||||||
@@ -306,21 +310,32 @@ export default {
|
|||||||
searchTags: []
|
searchTags: []
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
mounted() {
|
mounted() {
|
||||||
|
this.$nextTick(function() {
|
||||||
|
this.closeSearch();
|
||||||
|
});
|
||||||
if(!this.portalCase.readProtocol){
|
if(!this.portalCase.readProtocol){
|
||||||
this.protocolDialogVisible = true;
|
this.protocolDialogVisible = true;
|
||||||
}
|
}
|
||||||
this.keyWord = this.$route.query.keyword;
|
this.keyWord = this.$route.query.keyword;
|
||||||
this.getAnkingData()
|
if(this.keyWord != '') {
|
||||||
this.getPopularity()
|
this.isSeach = true;
|
||||||
this.searchterm()
|
}
|
||||||
this.getPositive()
|
this.getAnkingData();
|
||||||
this.getCaseData();
|
this.getPopularity();
|
||||||
|
this.searchterm();
|
||||||
|
this.getPositive();
|
||||||
|
this.getProfess();
|
||||||
|
this.getdomain();
|
||||||
|
// this.getCaseData();
|
||||||
|
this.search();
|
||||||
window.addEventListener(
|
window.addEventListener(
|
||||||
"scroll",
|
"scroll",
|
||||||
this.handleScroll
|
this.handleScroll
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
watch:{
|
watch:{
|
||||||
// queryCondition:{
|
// queryCondition:{
|
||||||
// handler(newValue,oldValue){
|
// handler(newValue,oldValue){
|
||||||
@@ -330,12 +345,81 @@ export default {
|
|||||||
// immediate:true
|
// immediate:true
|
||||||
// }
|
// }
|
||||||
},
|
},
|
||||||
beforeDestroy(){
|
beforeDestroy(){
|
||||||
window.removeEventListener("scroll",this.handleScroll);
|
window.removeEventListener("scroll",this.handleScroll);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
//展示全部
|
||||||
|
displayAll(item) {
|
||||||
|
if(!item.isAll && item.summary && item.summary.length > 90) {
|
||||||
|
return item.summary.slice(0, 90) + "...";
|
||||||
|
}
|
||||||
|
return item.summary;
|
||||||
|
},
|
||||||
|
changeIsAll(item) {
|
||||||
|
item.isAll=!item.isAll;
|
||||||
|
},
|
||||||
|
closeSearch() {
|
||||||
|
this.showAll = !this.showAll;
|
||||||
|
var searchBoxHeght = document.getElementById("searchBox");
|
||||||
|
var searchBoxWidth = document.getElementById("searchBox");
|
||||||
|
if(searchBoxWidth.clientWidth > 950){
|
||||||
|
this.searchwd = false;
|
||||||
|
}
|
||||||
|
if (this.showAll == false) {
|
||||||
|
searchBoxHeght.style.height = 70 + "px";
|
||||||
|
} else {
|
||||||
|
searchBoxHeght.style.height = "auto";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
getAnkingData(){
|
||||||
|
apiCase.usernameList(5).then(res=>{
|
||||||
|
if(res.status==200){
|
||||||
|
this.ankingList=res.result
|
||||||
|
// console.log(res)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getPopularity(){
|
||||||
|
apiCase.queryPraises(5).then(res=>{
|
||||||
|
if(res.status==200){
|
||||||
|
this.Popularity=res.result
|
||||||
|
// console.log(this.Popularity)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getPositive(){
|
||||||
|
apiCase.queryComments(5).then(res=>{
|
||||||
|
if(res.status==200){
|
||||||
|
this.Positive=res.result
|
||||||
|
console.log(res)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
getdomain(){
|
||||||
|
let key ='org_domain'
|
||||||
|
apiDict.items(key).then(res =>{
|
||||||
|
if(res.status==200){
|
||||||
|
this.domain = res.result
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getProfess(){
|
||||||
|
let key ='major_type'
|
||||||
|
apiDict.items(key).then(res =>{
|
||||||
|
if(res.status==200){
|
||||||
|
this.Profess = res.result
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
emitInput(val) {
|
emitInput(val) {
|
||||||
this.keyWord=val;
|
this.keyWord=val;
|
||||||
|
this.isSeach =true;
|
||||||
|
this.queryCondition.pageIndex = 1
|
||||||
this.search()
|
this.search()
|
||||||
},
|
},
|
||||||
searchData(num) {
|
searchData(num) {
|
||||||
@@ -346,13 +430,13 @@ export default {
|
|||||||
let innerHeight = document.querySelector('#case-list-content').clientHeight
|
let innerHeight = document.querySelector('#case-list-content').clientHeight
|
||||||
let outerHeight = document.documentElement.clientHeight
|
let outerHeight = document.documentElement.clientHeight
|
||||||
let scrollTop = document.documentElement.scrollTop
|
let scrollTop = document.documentElement.scrollTop
|
||||||
// if ((outerHeight + scrollTop + 350) >= innerHeight) {
|
if ((outerHeight + scrollTop + 350) >= innerHeight) {
|
||||||
// if(this.moreState == 1 && this.course.pageIndex < 4) {
|
if(this.moreState == 1 && this.course.pageIndex < 4) {
|
||||||
// this.loadMore();
|
this.loadMore();
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
if(scrollTop > 100) {
|
if(scrollTop > 630) {
|
||||||
document.querySelector('#fixd-box').style.cssText = "position: fixed;top: 0;width:245px";
|
document.querySelector('#fixd-box').style.cssText = "position: fixed;top: -550px;width:245.5px";
|
||||||
} else {
|
} else {
|
||||||
document.querySelector('#fixd-box').style.cssText = "position: static";
|
document.querySelector('#fixd-box').style.cssText = "position: static";
|
||||||
}
|
}
|
||||||
@@ -397,12 +481,19 @@ export default {
|
|||||||
this.getCaseData();
|
this.getCaseData();
|
||||||
},
|
},
|
||||||
async getCaseData(){
|
async getCaseData(){
|
||||||
|
this.getTags();
|
||||||
let isTopList = [];
|
let isTopList = [];
|
||||||
let caseList = [];
|
let caseList = [];
|
||||||
|
if(this.queryCondition.pageIndex == 1) {
|
||||||
|
this.caseList.list =[];
|
||||||
|
}
|
||||||
|
this.moreState = 2;
|
||||||
await apiCase.queryList(this.queryCondition).then(res=>{
|
await apiCase.queryList(this.queryCondition).then(res=>{
|
||||||
if(res.status==200){
|
if(res.status==200){
|
||||||
if(res.result.list.length>0){
|
if(res.result.list.length>0){
|
||||||
|
this.isSeach =false;
|
||||||
res.result.list.forEach(item=>{
|
res.result.list.forEach(item=>{
|
||||||
|
item.isAll=false;
|
||||||
item.authorInfo={aid:'',name:'',orgInfo:'',avatar:'',sex:null};
|
item.authorInfo={aid:'',name:'',orgInfo:'',avatar:'',sex:null};
|
||||||
if(item.isTop) {
|
if(item.isTop) {
|
||||||
isTopList.push(item);
|
isTopList.push(item);
|
||||||
@@ -410,12 +501,17 @@ export default {
|
|||||||
caseList.push(item)
|
caseList.push(item)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
if(this.queryCondition.pageIndex == 1) {
|
|
||||||
this.caseList.list =[];
|
|
||||||
}
|
|
||||||
this.caseList.list.push(...isTopList,...caseList);
|
this.caseList.list.push(...isTopList,...caseList);
|
||||||
this.caseList.count=res.result.count;
|
this.caseList.count=res.result.count;
|
||||||
this.getCaseUserData(res.result.list)
|
this.getCaseUserData(res.result.list)
|
||||||
|
this.moreState = 1;
|
||||||
|
if(res.result.count === res.result.list.length) {
|
||||||
|
this.moreState = 3;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.moreState = 3;
|
||||||
|
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
this.$message.error(res.message);
|
this.$message.error(res.message);
|
||||||
@@ -423,6 +519,43 @@ export default {
|
|||||||
}).catch(err=>{
|
}).catch(err=>{
|
||||||
console.log(err)
|
console.log(err)
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
getTags() {
|
||||||
|
this.searchTags = [];
|
||||||
|
let caseData = deepClone(this.queryCondition);
|
||||||
|
for (let i in caseData) {
|
||||||
|
if (
|
||||||
|
caseData[i] !== "" &&
|
||||||
|
i !== "pageIndex" &&
|
||||||
|
i !== "pageSize" &&
|
||||||
|
i !== "orderField" &&
|
||||||
|
i !== "orderAsc" &&
|
||||||
|
caseData[i] !== null &&
|
||||||
|
caseData[i] !== undefined
|
||||||
|
) {
|
||||||
|
if(caseData[i] !== '0') {
|
||||||
|
this.searchTags.push(
|
||||||
|
caseData[i]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
tagsClose(tag, index) {
|
||||||
|
for (let i in this.queryCondition) {
|
||||||
|
if (tag === this.queryCondition[i]) {
|
||||||
|
if(i == 'majorType'){
|
||||||
|
this.queryCondition.majorType = null;
|
||||||
|
}
|
||||||
|
if(i == 'orgDomain'){
|
||||||
|
this.queryCondition.orgDomain = null;
|
||||||
|
}
|
||||||
|
this.queryCondition[i] = "";
|
||||||
|
|
||||||
|
this.searchTags.splice(index, 1);
|
||||||
|
this.getCaseData();
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
getCaseUserData(caseList){
|
getCaseUserData(caseList){
|
||||||
let ids=caseList.map((item,index)=>{
|
let ids=caseList.map((item,index)=>{
|
||||||
@@ -447,18 +580,19 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
getAnkingData(){
|
getAnkingData(){
|
||||||
apiCase.usernameList(5).then(res=>{
|
apiCase.usernameList(10).then(res=>{
|
||||||
if(res.status==200){
|
if(res.status==200){
|
||||||
this.ankingList=res.result
|
this.ankingList=res.result
|
||||||
// console.log(res)
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
getPopularity(){
|
getPopularity(){
|
||||||
apiCase.queryPraises(5).then(res=>{
|
apiCase.queryPraises(5).then(res=>{
|
||||||
if(res.status==200){
|
if(res.status==200){
|
||||||
this.Popularity=res.result
|
this.Popularity=res.result
|
||||||
// console.log(this.Popularity)
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -466,7 +600,7 @@ export default {
|
|||||||
apiCase.queryComments(5).then(res=>{
|
apiCase.queryComments(5).then(res=>{
|
||||||
if(res.status==200){
|
if(res.status==200){
|
||||||
this.Positive=res.result
|
this.Positive=res.result
|
||||||
console.log(res)
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -475,13 +609,18 @@ export default {
|
|||||||
this.$router.push(`/case/detail?id=${item.id}`);
|
this.$router.push(`/case/detail?id=${item.id}`);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
.searBox{
|
||||||
|
text-align: center;
|
||||||
|
margin: 0px auto 0 auto;
|
||||||
|
}
|
||||||
|
#searchBox {
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
.ranking-title {
|
.ranking-title {
|
||||||
line-height: 34px;
|
line-height: 34px;
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
@@ -511,17 +650,18 @@ export default {
|
|||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
::v-deep .bacolor:nth-child(odd){
|
::v-deep .bacolor:nth-child(odd){
|
||||||
background-color: #fff;
|
background-color: #f6f6f6;
|
||||||
padding: 0 5px;
|
padding: 0 5px;
|
||||||
}
|
}
|
||||||
::v-deep .bacolor:nth-child(even){
|
::v-deep .bacolor:nth-child(even){
|
||||||
background-color: #f6f6f6;
|
background-color: #fff;
|
||||||
padding: 0 5px;
|
padding: 0 5px;
|
||||||
|
|
||||||
}
|
}
|
||||||
::v-deep .el-card{
|
::v-deep .el-card{
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: 0px;
|
border-radius: 0px;
|
||||||
|
border: 1px solid #EBEEF5;
|
||||||
}
|
}
|
||||||
::v-deep .el-radio-button__inner, .el-radio-group {
|
::v-deep .el-radio-button__inner, .el-radio-group {
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
@@ -546,7 +686,7 @@ export default {
|
|||||||
.item-line{
|
.item-line{
|
||||||
padding-left: 2px;
|
padding-left: 2px;
|
||||||
height: 20px;
|
height: 20px;
|
||||||
|
|
||||||
background: #ddd;
|
background: #ddd;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -613,6 +753,9 @@ export default {
|
|||||||
.pagination-div {
|
.pagination-div {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding: 10px 0;
|
padding: 10px 0;
|
||||||
|
.pag-text{
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.order-div {
|
.order-div {
|
||||||
padding: 12px 15px;
|
padding: 12px 15px;
|
||||||
@@ -656,7 +799,8 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.case-info-summary {
|
.case-info-summary {
|
||||||
height: 45px;
|
height: 60px;
|
||||||
|
|
||||||
line-height: 30px;
|
line-height: 30px;
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
color: #444444;
|
color: #444444;
|
||||||
@@ -718,18 +862,19 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.right-box {
|
|
||||||
line-height: 25px;
|
.ranking-card {
|
||||||
.ranking-card {
|
|
||||||
margin-bottom: 10px;
|
|
||||||
.el-col{
|
|
||||||
margin-bottom: 10px;
|
|
||||||
}
|
|
||||||
.center{
|
.center{
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.right-box {
|
||||||
|
line-height: 25px;
|
||||||
|
|
||||||
|
.ranking-title {
|
||||||
|
}
|
||||||
.aligh-title{
|
.aligh-title{
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
color: #333333;
|
color: #333333;
|
||||||
|
|||||||
@@ -48,6 +48,29 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="案例" name="case">
|
||||||
|
<div style="min-height: 500px;">
|
||||||
|
<case-items @confirm="confirm" :items="caseList.list"></case-items>
|
||||||
|
<div v-if="caseList.list.length > 0" style="text-align: center;margin-top:57px;">
|
||||||
|
<el-pagination
|
||||||
|
background
|
||||||
|
@size-change="handleSizeChange"
|
||||||
|
@current-change="handleCurrentChange"
|
||||||
|
:current-page="caseList.pageIndex"
|
||||||
|
:page-sizes="[10, 20, 30, 40]"
|
||||||
|
:page-size="articleList.pageSize"
|
||||||
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
|
:total="caseList.count"
|
||||||
|
></el-pagination>
|
||||||
|
</div>
|
||||||
|
<div v-else>
|
||||||
|
<div v-if="caseList.list.length == 0">
|
||||||
|
<div v-if="isSearh" class="zan-wu">没有查询到相关内容</div>
|
||||||
|
<div v-else class="zan-wu">暂无数据</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-tab-pane>
|
||||||
<el-tab-pane label="文章" name="article">
|
<el-tab-pane label="文章" name="article">
|
||||||
<div style="min-height: 500px;">
|
<div style="min-height: 500px;">
|
||||||
<article-items @confirm="confirm" :items="articleList.list"></article-items>
|
<article-items @confirm="confirm" :items="articleList.list"></article-items>
|
||||||
@@ -109,9 +132,10 @@
|
|||||||
import qaItems from '@/components/Qa/shareList.vue'
|
import qaItems from '@/components/Qa/shareList.vue'
|
||||||
import apiShares from '@/api/modules/shares.js';
|
import apiShares from '@/api/modules/shares.js';
|
||||||
import apiUser from '@/api/system/user.js';
|
import apiUser from '@/api/system/user.js';
|
||||||
|
import caseItems from '@/components/Case/caseItems.vue'
|
||||||
export default {
|
export default {
|
||||||
name: 'myShareIndex',
|
name: 'myShareIndex',
|
||||||
components:{articleItems,courseItems,qaItems},
|
components:{articleItems,courseItems,qaItems,caseItems},
|
||||||
data(){
|
data(){
|
||||||
return {
|
return {
|
||||||
isRead: '',
|
isRead: '',
|
||||||
@@ -156,12 +180,16 @@
|
|||||||
if (this.tabName == 'qa') {
|
if (this.tabName == 'qa') {
|
||||||
this.findQa();
|
this.findQa();
|
||||||
}
|
}
|
||||||
|
if (this.tabName == 'case') {
|
||||||
|
this.findCase();
|
||||||
|
}
|
||||||
if (this.tabName == 'article') {
|
if (this.tabName == 'article') {
|
||||||
this.findArticle();
|
this.findArticle();
|
||||||
}
|
}
|
||||||
if (this.tabName == 'course') {
|
if (this.tabName == 'course') {
|
||||||
this.findCourse();
|
this.findCourse();
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
resData() {
|
resData() {
|
||||||
this.qaList.pageIndex = 1;
|
this.qaList.pageIndex = 1;
|
||||||
@@ -196,6 +224,10 @@
|
|||||||
if (tab.name == 'course') {
|
if (tab.name == 'course') {
|
||||||
this.findCourse();
|
this.findCourse();
|
||||||
}
|
}
|
||||||
|
console.log(tab.name,'tab.name');
|
||||||
|
if (tab.name == 'case') {
|
||||||
|
this.findCase();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
//分页点击事件
|
//分页点击事件
|
||||||
handleSizeChange(value) {
|
handleSizeChange(value) {
|
||||||
@@ -211,6 +243,10 @@
|
|||||||
this.courseList.pageSize = value;
|
this.courseList.pageSize = value;
|
||||||
this.findCourse();
|
this.findCourse();
|
||||||
}
|
}
|
||||||
|
if (this.tabName == 'case') {
|
||||||
|
this.caseList.pageSize = value;
|
||||||
|
this.findCase();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
//分页点击事件
|
//分页点击事件
|
||||||
handleCurrentChange(value) {
|
handleCurrentChange(value) {
|
||||||
@@ -226,6 +262,24 @@
|
|||||||
this.courseList.pageIndex = value;
|
this.courseList.pageIndex = value;
|
||||||
this.findCourse();
|
this.findCourse();
|
||||||
}
|
}
|
||||||
|
if (this.tabName == 'case') {
|
||||||
|
this.caseList.pageIndex = value;
|
||||||
|
this.findCase();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 案例数据查询
|
||||||
|
findCase() {
|
||||||
|
let { pageIndex, pageSize } = this.caseList;
|
||||||
|
let query = { pageIndex, pageSize,keyword:this.keyword,isRead: this.isRead,objType:3};
|
||||||
|
apiShares.myCaseList(query).then(res=>{
|
||||||
|
console.log(res,'res');
|
||||||
|
if(res.status == 200) {
|
||||||
|
this.caseList.count = res.result.count;
|
||||||
|
this.caseList.list = res.result.list;
|
||||||
|
}else {
|
||||||
|
this.$message.error(res.message);
|
||||||
|
}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
//问答数据查询
|
//问答数据查询
|
||||||
findQa() {
|
findQa() {
|
||||||
@@ -324,6 +378,9 @@
|
|||||||
if (this.tabName == 'course') {
|
if (this.tabName == 'course') {
|
||||||
this.findCourse();
|
this.findCourse();
|
||||||
}
|
}
|
||||||
|
if (this.tabName == 'case') {
|
||||||
|
this.findCase();
|
||||||
|
}
|
||||||
}else{
|
}else{
|
||||||
this.$message.error('撤回失败');
|
this.$message.error('撤回失败');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -64,6 +64,30 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="案例" name="case">
|
||||||
|
<div style="min-height: 500px;">
|
||||||
|
<case-items :keyword="keyword" type="toMy" @confirm="confirm" :items="caseList.list"></case-items>
|
||||||
|
<!-- v-if="articleList.count>articleList.pageSize" -->
|
||||||
|
<div v-if="caseList.list.length > 0" style="text-align: center; margin-top:57px">
|
||||||
|
<el-pagination
|
||||||
|
background
|
||||||
|
@size-change="handleSizeChange"
|
||||||
|
@current-change="handleCurrentChange"
|
||||||
|
:current-page="caseList.pageIndex"
|
||||||
|
:page-sizes="[10, 20, 30, 40]"
|
||||||
|
:page-size="caseList.pageSize"
|
||||||
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
|
:total="caseList.count"
|
||||||
|
></el-pagination>
|
||||||
|
</div>
|
||||||
|
<div v-else>
|
||||||
|
<div v-if="caseList.list.length == 0">
|
||||||
|
<div v-if="isSearh" class="zan-wu">没有查询到相关内容</div>
|
||||||
|
<div v-else class="zan-wu">暂无数据</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-tab-pane>
|
||||||
<el-tab-pane label="文章" name="article">
|
<el-tab-pane label="文章" name="article">
|
||||||
<div style="min-height: 500px;">
|
<div style="min-height: 500px;">
|
||||||
<article-items :keyword="keyword" type="toMy" @confirm="confirm" :items="articleList.list"></article-items>
|
<article-items :keyword="keyword" type="toMy" @confirm="confirm" :items="articleList.list"></article-items>
|
||||||
@@ -118,6 +142,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import caseItems from '@/components/Case/caseItems.vue'
|
||||||
import articleItems from '@/components/Article/shareItems.vue';
|
import articleItems from '@/components/Article/shareItems.vue';
|
||||||
import courseItems from '@/components/Course/shareItem.vue';
|
import courseItems from '@/components/Course/shareItem.vue';
|
||||||
import qaItems from '@/components/Qa/shareList.vue';
|
import qaItems from '@/components/Qa/shareList.vue';
|
||||||
@@ -125,7 +150,7 @@ import apiShares from '@/api/modules/shares.js';
|
|||||||
import apiUser from '@/api/system/user.js';
|
import apiUser from '@/api/system/user.js';
|
||||||
export default {
|
export default {
|
||||||
name: 'myShareIndex',
|
name: 'myShareIndex',
|
||||||
components: { articleItems, courseItems, qaItems },
|
components: { articleItems, courseItems, qaItems,caseItems },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
isSearh:false,
|
isSearh:false,
|
||||||
@@ -183,6 +208,9 @@ export default {
|
|||||||
if (this.tabName == 'course') {
|
if (this.tabName == 'course') {
|
||||||
this.findCourse();
|
this.findCourse();
|
||||||
}
|
}
|
||||||
|
if (this.tabName == 'case') {
|
||||||
|
this.findCase();
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
resData() {
|
resData() {
|
||||||
@@ -218,6 +246,9 @@ export default {
|
|||||||
if (tab.name == 'course') {
|
if (tab.name == 'course') {
|
||||||
this.findCourse();
|
this.findCourse();
|
||||||
}
|
}
|
||||||
|
if (tab.name == 'case') {
|
||||||
|
this.findCase();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
//分页点击事件
|
//分页点击事件
|
||||||
handleSizeChange(value) {
|
handleSizeChange(value) {
|
||||||
@@ -233,7 +264,10 @@ export default {
|
|||||||
this.courseList.pageSize = value;
|
this.courseList.pageSize = value;
|
||||||
this.findCourse();
|
this.findCourse();
|
||||||
}
|
}
|
||||||
|
if (this.tabName == 'case') {
|
||||||
|
this.caseList.pageSize = value;
|
||||||
|
this.findCase()
|
||||||
|
}
|
||||||
},
|
},
|
||||||
//分页点击事件
|
//分页点击事件
|
||||||
handleCurrentChange(value) {
|
handleCurrentChange(value) {
|
||||||
@@ -249,8 +283,25 @@ export default {
|
|||||||
this.courseList.pageIndex = value;
|
this.courseList.pageIndex = value;
|
||||||
this.findCourse();
|
this.findCourse();
|
||||||
}
|
}
|
||||||
|
if (this.tabName == 'case') {
|
||||||
|
this.caseList.pageIndex = value;
|
||||||
|
this.findCase();
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
// 案例
|
||||||
|
findCase(){
|
||||||
|
let { pageIndex, pageSize } = this.caseList;
|
||||||
|
let query = { pageIndex, pageSize, keyword: this.keyword, isRead: this.isRead };
|
||||||
|
apiShares.myCaseList(query).then(res=>{
|
||||||
|
if(res.status == 200) {
|
||||||
|
this.caseList.count = res.result.count;
|
||||||
|
this.caseList.list = res.result.list;
|
||||||
|
} else {
|
||||||
|
this.$message.error(res.message);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
//问答数据查询
|
//问答数据查询
|
||||||
findQa() {
|
findQa() {
|
||||||
let { pageIndex, pageSize } = this.qaList;
|
let { pageIndex, pageSize } = this.qaList;
|
||||||
|
|||||||
@@ -98,18 +98,14 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<!-- <el-tab-pane label="案例" name="case">
|
<el-tab-pane label="案例" name="case">
|
||||||
<div>
|
<div>
|
||||||
<div style="padding-bottom: 10px;">
|
|
||||||
<div style="display: flex;justify-content:flex-start;">
|
|
||||||
<div style="padding: 0px 5px;"><el-input placeholder="关键词查询" v-model="caseList.title"></el-input></div>
|
|
||||||
<div style="padding: 0px 5px;"><el-button @click="findCase" icon="el-icon-search" type="primary" size="small">查询</el-button></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<case-items @confirm="confirm" :items="caseList.list"></case-items>
|
<case-items @confirm="confirm" :items="caseList.list"></case-items>
|
||||||
</div>
|
</div>
|
||||||
<div style="text-align: center;" v-if="caseList.count>caseList.pageSize">
|
<div style="text-align: center;margin-top:50px;" v-if="caseList.list.length > 0
|
||||||
|
">
|
||||||
<el-pagination
|
<el-pagination
|
||||||
|
background
|
||||||
@size-change="handleSizeChange"
|
@size-change="handleSizeChange"
|
||||||
@current-change="handleCurrentChange"
|
@current-change="handleCurrentChange"
|
||||||
:current-page="caseList.pageIndex"
|
:current-page="caseList.pageIndex"
|
||||||
@@ -118,8 +114,15 @@
|
|||||||
layout="total, sizes, prev, pager, next, jumper"
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
:total="caseList.count"
|
:total="caseList.count"
|
||||||
></el-pagination>
|
></el-pagination>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</el-tab-pane> -->
|
<div v-else>
|
||||||
|
<div v-if="caseList.list.length == 0">
|
||||||
|
<div v-if="isSearh" class="zan-wu">没有查询到相关内容</div>
|
||||||
|
<div v-else class="zan-wu">暂无数据</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-tab-pane>
|
||||||
<el-tab-pane label="文章" name="article">
|
<el-tab-pane label="文章" name="article">
|
||||||
<div>
|
<div>
|
||||||
<!-- <div style="padding-bottom: 10px;">
|
<!-- <div style="padding-bottom: 10px;">
|
||||||
@@ -195,7 +198,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import articleItems from '@/components/Article/collectList.vue';
|
import articleItems from '@/components/Article/collectList.vue';
|
||||||
import courseItems from '@/components/Course/collectItem.vue';
|
import courseItems from '@/components/Course/collectItem.vue';
|
||||||
// import caseItems from '@/components/Case/collectList.vue';
|
import caseItems from '@/components/Case/collectList.vue';
|
||||||
import qaItems from '@/components/Qa/favoritesQaList.vue';
|
import qaItems from '@/components/Qa/favoritesQaList.vue';
|
||||||
import apiFavorite from '@/api/modules/favorites.js';
|
import apiFavorite from '@/api/modules/favorites.js';
|
||||||
import apiUser from '@/api/system/user.js';
|
import apiUser from '@/api/system/user.js';
|
||||||
@@ -203,7 +206,7 @@ import apiCourse from "@/api/modules/coursePortal.js";
|
|||||||
import courseImage from '@/components/Course/courseImage.vue';
|
import courseImage from '@/components/Course/courseImage.vue';
|
||||||
export default {
|
export default {
|
||||||
name: 'myShareIndex',
|
name: 'myShareIndex',
|
||||||
components: { articleItems, courseItems, qaItems, courseImage },
|
components: { articleItems, courseItems, qaItems, courseImage,caseItems },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
isSearh:false,
|
isSearh:false,
|
||||||
@@ -391,6 +394,7 @@ export default {
|
|||||||
item.avatar=''
|
item.avatar=''
|
||||||
item.name=''
|
item.name=''
|
||||||
item.orgInfo=''
|
item.orgInfo=''
|
||||||
|
item.sex= null
|
||||||
courseIds.push(item.objId);
|
courseIds.push(item.objId);
|
||||||
})
|
})
|
||||||
this.loadCouserTeacher(res.result.list,courseIds);
|
this.loadCouserTeacher(res.result.list,courseIds);
|
||||||
@@ -490,14 +494,16 @@ export default {
|
|||||||
findCase() {
|
findCase() {
|
||||||
let { pageIndex, pageSize } = this.caseList;
|
let { pageIndex, pageSize } = this.caseList;
|
||||||
let query = { pageIndex, pageSize };
|
let query = { pageIndex, pageSize };
|
||||||
if (this.caseList.title) {
|
// if (this.caseList.cases.title) {
|
||||||
query.keyword = this.keyword.trim();
|
query.keyword = this.keyword.trim();
|
||||||
}
|
// }
|
||||||
query.resolve = this.isRead;
|
query.resolve = this.isRead;
|
||||||
apiFavorite.casePageList(query).then(res => {
|
apiFavorite.casePageList(query).then(res => {
|
||||||
if (res.status == 200) {
|
if (res.status == 200) {
|
||||||
|
|
||||||
this.caseList.count = res.result.count;
|
this.caseList.count = res.result.count;
|
||||||
this.caseList.list = res.result.list;
|
this.caseList.list = res.result.list;
|
||||||
|
console.log(this.caseList)
|
||||||
if (this.caseList.list.length != 0) {
|
if (this.caseList.list.length != 0) {
|
||||||
this.getCaseUserData(res.result.list);
|
this.getCaseUserData(res.result.list);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user