|
|
|
|
|
|
|
|
<form class="om-searchbar" @submit.prevent="search()"> |
|
|
<form class="om-searchbar" @submit.prevent="search()"> |
|
|
<b-field> |
|
|
<b-field> |
|
|
<b-autocomplete |
|
|
<b-autocomplete |
|
|
|
|
|
id="searchtext" |
|
|
rounded |
|
|
rounded |
|
|
v-model="searchtext" |
|
|
v-model="searchtext" |
|
|
@keydown.native.enter="search" |
|
|
@keydown.native.enter="search" |
|
|
|
|
|
|
|
|
@typing="getFilteredTags" |
|
|
@typing="getFilteredTags" |
|
|
@input="saveTagsToArray"> |
|
|
@input="saveTagsToArray"> |
|
|
</b-taginput>--> |
|
|
</b-taginput>--> |
|
|
|
|
|
<button @click="clear">x</button> |
|
|
</b-field> |
|
|
</b-field> |
|
|
</form> |
|
|
</form> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
router, |
|
|
router, |
|
|
el: '#api', |
|
|
el: '#api', |
|
|
data: function() { |
|
|
data: function() { |
|
|
return{ |
|
|
|
|
|
|
|
|
return { |
|
|
searchtext: "", |
|
|
searchtext: "", |
|
|
|
|
|
isSearchActiv: false, |
|
|
selected: [], |
|
|
selected: [], |
|
|
taglist: dat, |
|
|
taglist: dat, |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
search: function() { |
|
|
search: function() { |
|
|
|
|
|
this.isSearchActiv = true; |
|
|
console.log("Searchtext: " +this.searchtext.replace(/#/g,'')); |
|
|
console.log("Searchtext: " +this.searchtext.replace(/#/g,'')); |
|
|
$.ajax({ |
|
|
$.ajax({ |
|
|
url: "api/msg/search/" + this.searchtext.replace(/#/g, ''), |
|
|
url: "api/msg/search/" + this.searchtext.replace(/#/g, ''), |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
}).fail(function (e, f, g) { |
|
|
}).fail(function (e, f, g) { |
|
|
console.log("err: " + e + f + g); |
|
|
console.log("err: " + e + f + g); |
|
|
}); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
}); |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
clear: function() { |
|
|
|
|
|
console.log("clear"); |
|
|
|
|
|
|
|
|
|
|
|
this.isSearchActiv = false; |
|
|
|
|
|
this.searchtext = ""; |
|
|
|
|
|
listMessages(); |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
mounted: function () { |
|
|
mounted: function () { |