Size: a a a

Vue.js Russian Developers Community

2020 December 18

АЗ

Алексей Забайкальски... in Vue.js Russian Developers Community
Sonic [Скупаю | Актуально всегда]
Огромное спасибо! То, что надо было.
You are welcome
источник

MZ

M Z in Vue.js Russian Developers Community
Good evening, when I request for some API service from selected item from v-data-table, after send , it did not change column state, how can I do this thanks in advance
источник

MZ

M Z in Vue.js Russian Developers Community
I use vuex state
источник

MZ

M Z in Vue.js Russian Developers Community
``requestInoviceId(){



               let id=null;

               this.invBody.invID.splice(0,this.invBody.invID.length);
               this.watchIndex = -1
               for (let v of Object.values(this.selected)) {
                   // console.log(k,v);
                   let a = this.allInvoices1.indexOf(v);
                   this.watchIndex=a;
                   console.log(a);

                   for (const [key, value] of Object.entries(v)) {
                       // console.log(key,value);
                       if (key === 'id') {
                           id = value;

                           this.invBody.invID.push({
                               id:id
                           });
                          //

                       }
                   }
               }
               this.$http.post('http://10.50.50.23:8080/InvoiceGnk/api/receive3', {
                   invBody: this.invBody
               }).then(response=>{
                   localStorage.setItem('invData',JSON.stringify(response.data));
                  // console.log(response.data.body);
                   let dataHandle=response.data.body;
                   var test = signOnce(8, 'stringTest');


                 });

               //this.fetchInvoices(this.invoice);
               localStorage.removeItem('invData');
               this.loading = false;
               this.refresh();

           }
refresh(){
               let r = {header: {
                       auth_code: '9b6e6eec-684e-4a99-b5f5-6a98b83a478a',
                       request_date: '01.03.2019',
                       request_id: '1',
                       request_type: 'FETCHINGINVOICES'
                   },
                   body: {
                       elements: [
                           {
                               filial_code:localStorage.getItem('childFilialCode')
                           }

                       ]
                   }};
               this.fetchInvoices(r);
           },``
источник

MZ

M Z in Vue.js Russian Developers Community
this.fetchInvoices(r); this is vuex action
источник

Р

Роман in Vue.js Russian Developers Community
M Z
Good evening, when I request for some API service from selected item from v-data-table, after send , it did not change column state, how can I do this thanks in advance
Can u send screenshot?
источник

MZ

M Z in Vue.js Russian Developers Community
for example 2 rows selected and press button send, after that it doesn't call getters
источник

AM

Alex Morozov in Vue.js Russian Developers Community
Блин, сейчас чат взорвется...
источник

NS

Nataliia Shyianovska in Vue.js Russian Developers Community
M Z
Good evening, when I request for some API service from selected item from v-data-table, after send , it did not change column state, how can I do this thanks in advance
this.refresh(); is the one which should update table?
источник

MZ

M Z in Vue.js Russian Developers Community
next time , other row select, and press send , previously sent request works
источник

NS

Nataliia Shyianovska in Vue.js Russian Developers Community
M Z
Good evening, when I request for some API service from selected item from v-data-table, after send , it did not change column state, how can I do this thanks in advance
this.fetchInvoices(this.invoice).then(this.refresh() )
источник

MZ

M Z in Vue.js Russian Developers Community
Nataliia Shyianovska
this.refresh(); is the one which should update table?
last column should be changed, but actually  whole data should be retrieved
источник

NS

Nataliia Shyianovska in Vue.js Russian Developers Community
M Z
next time , other row select, and press send , previously sent request works
May be because this.fetchInvoices is Async?
источник

MZ

M Z in Vue.js Russian Developers Community
yes it is asnyc
источник

Д

Дима in Vue.js Russian Developers Community
Когда ты не знаешь английского)) а потом смотришь на название канала)
источник

NS

Nataliia Shyianovska in Vue.js Russian Developers Community
M Z
yes it is asnyc
so than all this logic should happen after   request is finished
localStorage.removeItem('invData');
               this.loading = false;
               this.refresh();
источник

NS

Nataliia Shyianovska in Vue.js Russian Developers Community
like this this.fetchInvoices(this.invoice).then(
  localStorage.removeItem('invData');
  this.loading = false;
  this.refresh())
источник

NS

Nataliia Shyianovska in Vue.js Russian Developers Community
Дима
Когда ты не знаешь английского)) а потом смотришь на название канала)
Well the name is in English as well))
источник

Д

Дима in Vue.js Russian Developers Community
Да название может быть )) просто это ещё не конец)
источник

Д

Дима in Vue.js Russian Developers Community
потом смотришь на скриншот)
источник