-
+
{
+ if(res.status == 200){
+ console.log(res);
+ this.dataList.count = res.result.count;
+ res.result.list.forEach(item => {
+ if(item.type == 4) {
+ item.question = {isResolve:false,title:'',content:'',bestAnswer:''};
+ item.question.isResolve=item.isResolve;
+ item.question.title=item.title;
+ item.question.content=item.content;
+ item.question.bestAnswer=item.bestAnswer;
+ item.question.id=item.id;
+ }
+ if(item.type == 3){
+ item.cases = {title:'',summary:''};
+ item.cases.title=item.title;
+ item.cases.title=item.summary;
+ item.cases.id=item.id;
+ }
+ });
+ this.dataList.list = res.result.list;
+ }else {
+ this.$message.error(res.message);
+ }
+ })
+ },
+
+
+
+
queryData(){
this.qaList.pageIndex = 1;
this.articleList.pageIndex = 1;
@@ -189,6 +257,9 @@
if (this.tabName == 'course') {
this.findCourse();
}
+ if (this.tabName == 'all') {
+ this.findAll();
+ }
},
resData() {
@@ -200,20 +271,21 @@
this.queryData();
this.isSearh = false;
},
- changeIndex(value){
- if(this.tabName=='qa'){
- this.qaIndex=value
- this.findQa();
- }
- if(this.tabName=='article'){
- this.articleIndex=value
- this.findArticle();
- }
- if(this.tabName=='course'){
- this.courseIndex=value
- this.findCourse();
- }
- },
+ // changeIndex(value){
+ // if(this.tabName=='qa'){
+ // this.qaIndex=value
+ // this.findQa();
+ // }
+ // if(this.tabName=='article'){
+ // this.articleIndex=value
+ // this.findArticle();
+ // }
+ // if(this.tabName=='course'){
+ // this.courseIndex=value
+ // this.findCourse();
+ // }
+
+ // },
changeTab(tab) {
if (tab.name == 'qa') {
this.findQa();
@@ -228,6 +300,9 @@
if (tab.name == 'case') {
this.findCase();
}
+ if (tab.name == 'all') {
+ this.findAll();
+ }
},
//分页点击事件
handleSizeChange(value) {
@@ -247,6 +322,10 @@
this.caseList.pageSize = value;
this.findCase();
}
+ if (this.tabName == 'all') {
+ this.dataList.pageSize = value;
+ this.findAll()
+ }
},
//分页点击事件
handleCurrentChange(value) {
@@ -266,6 +345,10 @@
this.caseList.pageIndex = value;
this.findCase();
}
+ if (this.tabName == 'all') {
+ this.dataList.pageIndex = value;
+ this.findAll();
+ }
},
// 案例数据查询
findCase() {
@@ -397,6 +480,10 @@
if (this.tabName == 'course') {
this.findCourse();
}
+ if (this.tabName == 'all') {
+ this.findAll();
+ }
+
},
}