mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 13:02:56 +00:00
Improve search page
This commit is contained in:
@@ -95,13 +95,8 @@
|
||||
<!-- most searched word-->
|
||||
<div class="most-searched-words" *ngIf="!showDocuments">
|
||||
<p class="title ion-text-center">Palavras mais pesquisadas</p>
|
||||
<div>
|
||||
<angular-tag-cloud class="world-cloud"
|
||||
[data]="data"
|
||||
[width]=width
|
||||
[height]=height
|
||||
[overflow]=true>
|
||||
</angular-tag-cloud>
|
||||
<div class="most-searched-word-container">
|
||||
123
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -197,6 +197,11 @@ ion-slide{
|
||||
text-align: center;
|
||||
color: black;
|
||||
}
|
||||
|
||||
.most-searched-word-container{
|
||||
width: 441px;
|
||||
height: 400px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,13 +1,15 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ModalController } from '@ionic/angular';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { SearchService } from "../../services/search.service";
|
||||
import { SearchService, } from "../../services/search.service";
|
||||
import { SearchCategory } from "src/app/models/search-category";
|
||||
import { SearchDocument } from "src/app/models/search-document";
|
||||
import { formatDate } from '@angular/common';
|
||||
import { CloudData, CloudOptions } from 'angular-tag-cloud-module';
|
||||
import { SenderPage } from 'src/app/pages/search/sender/sender.page';
|
||||
import { OrganicEntityPage } from 'src/app/pages/search/organic-entity/organic-entity.page';
|
||||
import WordCloud from 'src/plugin/wordcloud2.js'
|
||||
|
||||
|
||||
import { NgModel } from '@angular/forms';
|
||||
@Component({
|
||||
@@ -54,12 +56,40 @@ export class SearchPage implements OnInit {
|
||||
speed: 400,
|
||||
}
|
||||
|
||||
|
||||
list = []
|
||||
|
||||
constructor(private modalController: ModalController,
|
||||
private search: SearchService) {
|
||||
this.ordinance = "recent";
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
this.search.mostSeachWord("10").subscribe(res=>{
|
||||
|
||||
let list = []
|
||||
|
||||
res.forEach(element => {
|
||||
list.push(Object.values(element))
|
||||
});
|
||||
|
||||
this.list = list
|
||||
|
||||
const elem = document.documentElement.querySelector('.most-searched-word-container');
|
||||
|
||||
|
||||
WordCloud(
|
||||
elem,
|
||||
{
|
||||
list: this.list,
|
||||
Family: 'Times, serif',
|
||||
gridSize: 15
|
||||
},
|
||||
);
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
close(){
|
||||
|
||||
Reference in New Issue
Block a user