|
@@ -12,12 +12,12 @@
|
|
|
<el-col :span="12">
|
|
|
<div class="search-nav">
|
|
|
<div id="search-block " class="">
|
|
|
- <el-tabs v-model="searchType" type="card" @tab-click="handleTypeClick">
|
|
|
- <el-tab-pane v-for="item in searchTypeArr" :label="item.label" :name="item.value" :key="item.value"></el-tab-pane>
|
|
|
- </el-tabs>
|
|
|
- <el-input placeholder="请输入内容" v-model="searchVal" class="input-with-select">
|
|
|
- <el-button class="search-button" slot="append" type="primary" @click="loadTechnologyArticles(1)">搜索</el-button>
|
|
|
- </el-input>
|
|
|
+ <el-tabs v-model="searchType" type="card" @tab-click="handleTypeClick">
|
|
|
+ <el-tab-pane v-for="item in searchTypeArr" :label="item.label" :name="item.value" :key="item.value"></el-tab-pane>
|
|
|
+ </el-tabs>
|
|
|
+ <el-input placeholder="请输入内容" v-model="searchVal" class="input-with-select">
|
|
|
+ <el-button class="search-button" slot="append" type="primary" @click="loadTechnologyArticles(1)">搜索</el-button>
|
|
|
+ </el-input>
|
|
|
</div>
|
|
|
</div>
|
|
|
</el-col>
|
|
@@ -41,7 +41,7 @@
|
|
|
:toolList = techArticleList.content v-if="searchType=='2'">
|
|
|
</CrowdTool>
|
|
|
<CrowdCase
|
|
|
- :toolList = techArticleList.content v-if="searchType=='3'" @refreshList="loadTechnologyArticles(activePage)">
|
|
|
+ :caseList = techArticleList.content v-if="searchType=='3'" @refreshList="loadTechnologyArticles(activePage)">
|
|
|
</CrowdCase>
|
|
|
<TechnologyCard
|
|
|
:techArticleList = techArticleList.content v-if="searchType=='0'" @refreshList="loadTechnologyArticles(activePage)">
|
|
@@ -175,21 +175,22 @@
|
|
|
"value": this.searchType//展示技术文章value为0
|
|
|
}
|
|
|
],
|
|
|
- "sortType":this.searchType === '2' ? 'id' :null
|
|
|
+ "sortType":(this.searchType === '2' || this.searchType === '3' ) ? 'id' : 'publicTime'
|
|
|
};
|
|
|
Http.post(url,params)
|
|
|
.then(res=>{
|
|
|
+ let { technicalArticlesPage , publicationsPage ,toolVOPage,taskVOS} = res.data;
|
|
|
+ this.techArticleList = technicalArticlesPage || publicationsPage || toolVOPage || taskVOS;
|
|
|
console.log(res.data)
|
|
|
- if(res.data.technicalArticlesPage){
|
|
|
- this.techArticleList = res.data.technicalArticlesPage;
|
|
|
- // this.searchType = '0';
|
|
|
- }
|
|
|
- else if(res.data.publicationsPage){
|
|
|
- this.techArticleList = res.data.publicationsPage;
|
|
|
- // this.searchType = '1';
|
|
|
- }else if(res.data.toolVOPage){
|
|
|
- this.techArticleList = res.data.toolVOPage;
|
|
|
- }
|
|
|
+ // if(res.data.technicalArticlesPage){
|
|
|
+ // this.techArticleList = res.data.technicalArticlesPage;
|
|
|
+ // }else if(res.data.publicationsPage){
|
|
|
+ // this.techArticleList = res.data.publicationsPage;
|
|
|
+ // }else if(res.data.toolVOPage){
|
|
|
+ // this.techArticleList = res.data.toolVOPage;
|
|
|
+ // } else if(res.data.taskVOS){
|
|
|
+ // this.techArticleList = res.data.taskVOS
|
|
|
+ // }
|
|
|
})
|
|
|
},
|
|
|
handlePageChange(index){
|