Commit 68fc3c69 authored by shabai517's avatar shabai517
Browse files

finish tree direct with query parameters

parent 48593409
......@@ -100,6 +100,7 @@
<Card>
<p slot="title" class="resource-list-title-container">
<span>Resources List</span>
<!--new api has no sort function
<span>
<span>Sort by: </span>
<div class="sortOption">
......@@ -108,6 +109,7 @@
</Select>
</div>
</span>
-->
</p>
<Spin size="large" fix v-if="loading"></Spin>
<Card v-for="publicationItem in publicaitionList" class="resource-item" v-bind:key = "publicationItem.accession">
......@@ -396,6 +398,7 @@
},
setHighlightKeywords(){
this.highlightKeyword = this.keyword.split(',');
//console.log('this.highlightKeyword',this.highlightKeyword);
},
querySpecificFacets(keyword){
if(this.containSelectors[0] && !this.containSelectors[0].value || this.containValue == keyword)
......@@ -643,21 +646,20 @@
else
this.hightlightMode = false;
//console.log('push',this.normalQuery);
this.$router.push({name: 'archive', query: this.query});
//this.queryArchiveProjectList();
this.$Message.success({content:'new result', duration:1});
},
pageChange(page){
this.page = page-1;
this.setFilter();
this.queryArchiveProjectList();
this.$router.push({name: 'archive', query: this.query});
},
pageSizeChange(size){
this.pageSize = size;
this.setFilter();
this.queryArchiveProjectList();
this.$router.push({name: 'archive', query: this.query});
},
/*new api has no sort funtions
sortChange(type){
console.log(type);
if(type == 'Title')
......@@ -671,7 +673,7 @@
this.setFilter();
this.queryArchiveProjectList();
},
},*/
updateQuery(){
this.sort = 'publication_date';
this.page = 0;
......@@ -755,6 +757,7 @@
},
beforeRouteEnter(to,from,next){
console.log('from',from);
if(from.name == 'landingpage' && from.params.keyword)
paramsFromLandingPage = from.params.keyword;
......
......@@ -185,18 +185,18 @@ export default {
let facets;
let value = param.data.name.split('(')[0];
if(param.data.level == 1){
facets='Organism';
facets='organisms_facet=='+value;
}
else if(param.data.level == 2){
facets='Organism Part';
facets='organisms_part_facet=='+value;
}
else if(param.data.level ==3){
facets='Diseases';
facets='diseases_facet=='+value;
}
else if(param.data.level ==4){
facets='Modifications';
facets='Modifications=='+value;
}
return '<p>Category: '+param.data.name+'</p>'+'<p>Value: '+param.data.rawValue+'</p>'+'<p><a class="search" href="archive?facets='+facets+'&value='+value+'">More</a></p>'
return '<p>Category: '+param.data.name+'</p>'+'<p>Value: '+param.data.rawValue+'</p>'+'<p><a class="search" href="archive?keyword=&filter='+facets+'&page=0&pageSize=20">More</a></p>'
}
//}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment