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