[Vuejs]-Pass parameters via GET to return filter

0👍

This is how you get that value you selected, let’s say you want to use ‘situacao’.
and pass that value to your backend via GET parameters:

refresh () {
         this.$axios.get()
    
         var selectedSituacao = this.situacao;
         var url = "/Operacional/GetRelatorio?ID=" + selectedSituacao;

         this.$axios.get(url).then(res => { .... })

         // or you could do this:
         var axiosParams = {
             params: {
                ID: selectedSituacao
             }
         }
         this.$axios.get("/Operacional/GetRelatorio", axiosParams).then(res => { .... })

edit: Updated url get parameter situacao to ID as requested.

Leave a comment