Merge branch 'case' into dev

# Conflicts:
#	.env.development
#	.gitignore
#	src/components/Course/weikeContent.vue
#	src/components/PdfPreview/view.vue
#	src/views/portal/case/Detail.vue
#	src/views/portal/case/Index.vue
This commit is contained in:
zhaofang
2022-06-07 19:03:18 +08:00
23 changed files with 1105 additions and 312 deletions

View File

@@ -64,6 +64,30 @@
</div>
</div>
</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">
<div style="min-height: 500px;">
<article-items :keyword="keyword" type="toMy" @confirm="confirm" :items="articleList.list"></article-items>
@@ -118,6 +142,7 @@
</template>
<script>
import caseItems from '@/components/Case/caseItems.vue'
import articleItems from '@/components/Article/shareItems.vue';
import courseItems from '@/components/Course/shareItem.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';
export default {
name: 'myShareIndex',
components: { articleItems, courseItems, qaItems },
components: { articleItems, courseItems, qaItems,caseItems },
data() {
return {
isSearh:false,
@@ -183,6 +208,9 @@ export default {
if (this.tabName == 'course') {
this.findCourse();
}
if (this.tabName == 'case') {
this.findCase();
}
},
resData() {
@@ -218,6 +246,9 @@ export default {
if (tab.name == 'course') {
this.findCourse();
}
if (tab.name == 'case') {
this.findCase();
}
},
//分页点击事件
handleSizeChange(value) {
@@ -233,7 +264,10 @@ export default {
this.courseList.pageSize = value;
this.findCourse();
}
if (this.tabName == 'case') {
this.caseList.pageSize = value;
this.findCase()
}
},
//分页点击事件
handleCurrentChange(value) {
@@ -249,8 +283,25 @@ export default {
this.courseList.pageIndex = value;
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() {
let { pageIndex, pageSize } = this.qaList;