parent
de9c478360
commit
eb3119b655
2 changed files with 26 additions and 6 deletions
|
@ -48,6 +48,7 @@
|
|||
filtrer="#ENV{filtrer}"
|
||||
:_id="[(#ENV{_id}|intval)]"
|
||||
filtreselect="[(#ENV{filtrerselect})]"
|
||||
trier="[(#ENV{trier})]"
|
||||
></gamu-table>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -80,6 +81,7 @@
|
|||
filtrer="#ENV{filtrer}"
|
||||
:_id="[(#ENV{_id}|intval)]"
|
||||
filtreselect="[(#ENV{filtrerselect_deux})]"
|
||||
trier="[(#ENV{trier_deux})]"
|
||||
></gamu-table>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -362,6 +362,9 @@ const props = defineProps({
|
|||
afficher: {
|
||||
type: Number,
|
||||
},
|
||||
trier: {
|
||||
type: String,
|
||||
},
|
||||
apiuri: {
|
||||
type: String,
|
||||
required: true,
|
||||
|
@ -457,6 +460,8 @@ let vuebloc = ref(false);
|
|||
let loadingVueSelect = ref(true);
|
||||
let ajaxCrayons = ref(false);
|
||||
let maj = ref("");
|
||||
let afficherVal = props.afficher;
|
||||
let trierVal = props.trier;
|
||||
|
||||
let nameLocalStorage = calculer_nameLocalStorage();
|
||||
|
||||
|
@ -787,16 +792,27 @@ function chargerJson(id) {
|
|||
}
|
||||
|
||||
Tfiltres.forEach((col) => {
|
||||
if (filtreCol.value.includes(col)) {
|
||||
filtreColSelected.value[col.champ] = [
|
||||
...filtreColSelected.value[col.champ],
|
||||
...col.valeurs,
|
||||
];
|
||||
}
|
||||
});
|
||||
filtreColModif.value++;
|
||||
ajaxCrayons = false;
|
||||
|
||||
if (props.afficher && props.tparpage.includes(props.afficher)) {
|
||||
parPageSelect.value = props.afficher;
|
||||
if (afficherVal && props.tparpage.includes(afficherVal)) {
|
||||
parPageSelect.value = afficherVal;
|
||||
}
|
||||
|
||||
if (trierVal) {
|
||||
trierVal.split(",").forEach((unTri) => {
|
||||
const [col, sens] = unTri.split("|");
|
||||
if (filtreCol.value.includes(col)) {
|
||||
tri(col, sens);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if (parseInt(props._id) > 0) {
|
||||
|
@ -837,6 +853,8 @@ function saveHeader() {
|
|||
classes: classes.value,
|
||||
filtreCol: filtreColType.value,
|
||||
ordreCol: ordreCol.value,
|
||||
afficherVal: afficherVal,
|
||||
trierVal: trierVal,
|
||||
maj: maj.value,
|
||||
};
|
||||
localStorage.setItem("header_" + nameLocalStorage, JSON.stringify($header));
|
||||
|
|
Loading…
Add table
Reference in a new issue