fix: les datas ne sont pas attachées à this
This commit is contained in:
parent
3921ce0709
commit
73d9a47160
3 changed files with 11 additions and 4 deletions
1
dist/assets/gamutable.43aa3660.js
vendored
1
dist/assets/gamutable.43aa3660.js
vendored
File diff suppressed because one or more lines are too long
2
dist/manifest.json
vendored
2
dist/manifest.json
vendored
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"gamutable.js": {
|
"gamutable.js": {
|
||||||
"file": "assets/gamutable.43aa3660.js",
|
"file": "assets/gamutable.fc8c39d9.js",
|
||||||
"src": "gamutable.js",
|
"src": "gamutable.js",
|
||||||
"isEntry": true,
|
"isEntry": true,
|
||||||
"imports": [
|
"imports": [
|
||||||
|
|
|
@ -959,7 +959,11 @@ function selectLigne(id, col) {
|
||||||
}
|
}
|
||||||
function genererPDF(quoi = "tableau") {
|
function genererPDF(quoi = "tableau") {
|
||||||
let $tableau = [];
|
let $tableau = [];
|
||||||
Object.values(this[quoi]).forEach((d) => {
|
let surQuoi = tableau.value;
|
||||||
|
if (quoi === "table") {
|
||||||
|
surQuoi = table.value;
|
||||||
|
}
|
||||||
|
Object.values(surQuoi).forEach((d) => {
|
||||||
$tableau.push(d.html);
|
$tableau.push(d.html);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -987,8 +991,12 @@ function exportCSV(quoi = "tableau") {
|
||||||
let $csv = [];
|
let $csv = [];
|
||||||
let $header = [];
|
let $header = [];
|
||||||
let $tableau = [];
|
let $tableau = [];
|
||||||
|
let surQuoi = tableau.value;
|
||||||
|
if (quoi === "table") {
|
||||||
|
surQuoi = table.value;
|
||||||
|
}
|
||||||
Object.keys(header.value).forEach((k) => $header.push(k));
|
Object.keys(header.value).forEach((k) => $header.push(k));
|
||||||
$tableau = this[quoi].reduce((acc, ligne) => {
|
$tableau = surQuoi.reduce((acc, ligne) => {
|
||||||
let $uneLigne = [];
|
let $uneLigne = [];
|
||||||
Object.values(ligne[props.champcsv]).forEach((l) => $uneLigne.push(l));
|
Object.values(ligne[props.champcsv]).forEach((l) => $uneLigne.push(l));
|
||||||
return [...acc, [...$uneLigne]];
|
return [...acc, [...$uneLigne]];
|
||||||
|
|
Loading…
Add table
Reference in a new issue