On stocke en localstorage la conf passée par url du filtreCol
This commit is contained in:
parent
be5c2ba345
commit
a44b88e941
2 changed files with 28 additions and 2 deletions
|
@ -414,7 +414,6 @@ let monTableau = {
|
|||
let url = this.apiuri;
|
||||
if (parseInt(id) > 0) {
|
||||
url += '&id=' + id;
|
||||
console.log('url:' + url);
|
||||
} else {
|
||||
let config = localStorage.getItem('header_' + this.nameLocalStorage);
|
||||
config = recupJson(config);
|
||||
|
@ -515,8 +514,10 @@ let monTableau = {
|
|||
|
||||
Vue.nextTick(() => {
|
||||
this.chargement = false;
|
||||
console.log(this.filtreselect);
|
||||
if (this.filtreselect) {
|
||||
let Tfiltres = recupJson(decodeURIComponent(this.filtreselect));
|
||||
localStorage.setItem('filtreselect_' + this.nameLocalStorage, JSON.stringify(Tfiltres));
|
||||
Tfiltres.forEach((col) => {
|
||||
this.filtreColSelected[col.champ] = [
|
||||
...this.filtreColSelected[col.champ],
|
||||
|
@ -524,6 +525,18 @@ let monTableau = {
|
|||
];
|
||||
});
|
||||
this.filtreColModif++;
|
||||
} else {
|
||||
let filtreselect = localStorage.getItem('filtreselect_' + this.nameLocalStorage);
|
||||
if (filtreselect) {
|
||||
let Tfiltres = JSON.parse(filtreselect);
|
||||
Tfiltres.forEach((col) => {
|
||||
this.filtreColSelected[col.champ] = [
|
||||
...this.filtreColSelected[col.champ],
|
||||
...col.valeurs,
|
||||
];
|
||||
});
|
||||
this.filtreColModif++;
|
||||
}
|
||||
}
|
||||
|
||||
if (parseInt(this._id) > 0) {
|
||||
|
|
|
@ -466,7 +466,6 @@ var monTableau = {
|
|||
|
||||
if (parseInt(id) > 0) {
|
||||
url += '&id=' + id;
|
||||
console.log('url:' + url);
|
||||
} else {
|
||||
var config = localStorage.getItem('header_' + this.nameLocalStorage);
|
||||
config = recupJson(config);
|
||||
|
@ -588,13 +587,27 @@ var monTableau = {
|
|||
|
||||
Vue.nextTick(function () {
|
||||
_this4.chargement = false;
|
||||
console.log(_this4.filtreselect);
|
||||
|
||||
if (_this4.filtreselect) {
|
||||
var Tfiltres = recupJson(decodeURIComponent(_this4.filtreselect));
|
||||
localStorage.setItem('filtreselect_' + _this4.nameLocalStorage, JSON.stringify(Tfiltres));
|
||||
Tfiltres.forEach(function (col) {
|
||||
_this4.filtreColSelected[col.champ] = [].concat(_toConsumableArray(_this4.filtreColSelected[col.champ]), _toConsumableArray(col.valeurs));
|
||||
});
|
||||
_this4.filtreColModif++;
|
||||
} else {
|
||||
var filtreselect = localStorage.getItem('filtreselect_' + _this4.nameLocalStorage);
|
||||
|
||||
if (filtreselect) {
|
||||
var _Tfiltres = JSON.parse(filtreselect);
|
||||
|
||||
_Tfiltres.forEach(function (col) {
|
||||
_this4.filtreColSelected[col.champ] = [].concat(_toConsumableArray(_this4.filtreColSelected[col.champ]), _toConsumableArray(col.valeurs));
|
||||
});
|
||||
|
||||
_this4.filtreColModif++;
|
||||
}
|
||||
}
|
||||
|
||||
if (parseInt(_this4._id) > 0) {
|
||||
|
|
Loading…
Add table
Reference in a new issue