Ajoute la possibilite de filtrer via les urls les selects, cf doc
This commit is contained in:
parent
fd148ce52b
commit
eff8722fa2
4 changed files with 32 additions and 0 deletions
|
@ -30,7 +30,14 @@ Choisir entre la version minifiée de vuejs (sans le debug) ou la version de dev
|
||||||
includespip="#ENV{includespip}" // pour ajouter un code html dans la ligne au dessus du tableau
|
includespip="#ENV{includespip}" // pour ajouter un code html dans la ligne au dessus du tableau
|
||||||
nomBlocAjaxReload="nom bloc a recharger à la fin du chargement des donnees"
|
nomBlocAjaxReload="nom bloc a recharger à la fin du chargement des donnees"
|
||||||
env
|
env
|
||||||
|
filtreselect='[(#ENV{filtrerselect}|rawurldecode)]'
|
||||||
}>
|
}>
|
||||||
|
|
||||||
|
[(#SET{filtrerselect,#ARRAY{
|
||||||
|
0,#ARRAY{champ,secteur,valeurs,Le chat},
|
||||||
|
1,#ARRAY{champ,voie,valeurs,Turlut man}
|
||||||
|
}|json_encode|rawurlencode})]
|
||||||
|
<a class="btn" href="[(#URL_PAGE{gestionnaire_voies}|parametre_url{filtrerselect,#GET{filtrerselect}})]"> aaaa </a>
|
||||||
```
|
```
|
||||||
- **url_sort_asc** et **url_sort_desc** => surcharge possible des icones de tri de colonnes
|
- **url_sort_asc** et **url_sort_desc** => surcharge possible des icones de tri de colonnes
|
||||||
|
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
ref="montableau"
|
ref="montableau"
|
||||||
filtrer="#ENV{filtrer}"
|
filtrer="#ENV{filtrer}"
|
||||||
_id="#ENV{_id}"
|
_id="#ENV{_id}"
|
||||||
|
filtreselect='[(#ENV{filtrerselect}|rawurldecode)]'
|
||||||
></mon-tableau>
|
></mon-tableau>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -49,6 +50,7 @@
|
||||||
filtrer="#ENV{filtrer}"
|
filtrer="#ENV{filtrer}"
|
||||||
affichage_id="#ENV{_id}"
|
affichage_id="#ENV{_id}"
|
||||||
_id="#ENV{_id}"
|
_id="#ENV{_id}"
|
||||||
|
filtreselect='[(#ENV{a}|rawurldecode)]'
|
||||||
></mon-tableau>
|
></mon-tableau>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -204,6 +204,9 @@ let monTableau = {
|
||||||
_id: {
|
_id: {
|
||||||
type: String,
|
type: String,
|
||||||
},
|
},
|
||||||
|
filtreselect: {
|
||||||
|
type: String,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
data: function () {
|
data: function () {
|
||||||
return {
|
return {
|
||||||
|
@ -488,6 +491,15 @@ let monTableau = {
|
||||||
|
|
||||||
Vue.nextTick(() => {
|
Vue.nextTick(() => {
|
||||||
this.chargement = false;
|
this.chargement = false;
|
||||||
|
|
||||||
|
if (this.filtreselect) {
|
||||||
|
let Tfiltres = recupJson(this.filtreselect);
|
||||||
|
Tfiltres.forEach((col) => {
|
||||||
|
this.filtreColSelected[col.champ].push(col.valeurs);
|
||||||
|
});
|
||||||
|
this.filtreColModif++;
|
||||||
|
}
|
||||||
|
|
||||||
if (parseInt(this._id) > 0) {
|
if (parseInt(this._id) > 0) {
|
||||||
let _id = parseInt(this._id);
|
let _id = parseInt(this._id);
|
||||||
let parPage = parseInt(this.parPage);
|
let parPage = parseInt(this.parPage);
|
||||||
|
|
|
@ -254,6 +254,9 @@ var monTableau = {
|
||||||
},
|
},
|
||||||
_id: {
|
_id: {
|
||||||
type: String
|
type: String
|
||||||
|
},
|
||||||
|
filtreselect: {
|
||||||
|
type: String
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data: function data() {
|
data: function data() {
|
||||||
|
@ -565,6 +568,14 @@ var monTableau = {
|
||||||
Vue.nextTick(function () {
|
Vue.nextTick(function () {
|
||||||
_this4.chargement = false;
|
_this4.chargement = false;
|
||||||
|
|
||||||
|
if (_this4.filtreselect) {
|
||||||
|
var Tfiltres = recupJson(_this4.filtreselect);
|
||||||
|
Tfiltres.forEach(function (col) {
|
||||||
|
_this4.filtreColSelected[col.champ].push(col.valeurs);
|
||||||
|
});
|
||||||
|
_this4.filtreColModif++;
|
||||||
|
}
|
||||||
|
|
||||||
if (parseInt(_this4._id) > 0) {
|
if (parseInt(_this4._id) > 0) {
|
||||||
var _id = parseInt(_this4._id);
|
var _id = parseInt(_this4._id);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue