On ajoute la possibilite d'exporter en pdf, un simple bouton qui amener sur une page html
This commit is contained in:
parent
6189c900c2
commit
0557915e61
5 changed files with 43 additions and 4 deletions
|
@ -16,8 +16,13 @@ Choisir entre la version minifiée de vuejs (sans le debug) ou la version de dev
|
|||
|
||||
Ou avec tous les arguments facultatifs
|
||||
|
||||
[(#SET{pdfuri,#URL_PAGE{spipdf}
|
||||
|parametre_url{spipdf,mon_fichier_pdf}
|
||||
|parametre_url{nom_fichier,mon_nom_de_fichier_pdf}
|
||||
})]
|
||||
<INCLURE{fond=inclure/gamutable,
|
||||
apiuri="spip.php?page=json_souscripteurs.json",
|
||||
pdfuri="#GET{pdfuri}",
|
||||
tparpage=[15,25,50,'Tous'],
|
||||
champcsv="search",
|
||||
delimitercsv=";",
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
[(#SET{sort_asc,[(#CHEMIN{img/sprite_gamutable.svg})#sort_asc]})]
|
||||
[(#SET{sort_desc,[(#CHEMIN{img/sprite_gamutable.svg})#sort_desc]})]
|
||||
<span class="crayon gamutable-yyyy-nn"></span>
|
||||
|
||||
<div id="app">
|
||||
<div class="container_un">
|
||||
<div class="gamutableUn"[ id="(#ENV{id_gamutable})"]>
|
||||
|
@ -12,10 +11,12 @@
|
|||
[<span class="titre titreGamutableUn">(#ENV{titreGamutableUn})</span>]
|
||||
<mon-tableau
|
||||
apiuri="[(#ENV{apiuri,spip.php?page=json_gamutable.json})]"
|
||||
pdfuri="[(#ENV{pdfuri})]"
|
||||
:tparpage="#ENV{tparpage, [10, 20, 50, 'Tous']}"
|
||||
champcsv="#ENV{champcsv,html}"
|
||||
delimitercsv="#ENV{delimitercsv,','}"
|
||||
namecsv="#ENV{namecsv}"
|
||||
namepdf="#ENV{namepdf}"
|
||||
urlvuebloc="[(#ENV{urlvuebloc})]"
|
||||
url_sort_asc="#ENV{sort_asc,#GET{sort_asc}}"
|
||||
url_sort_desc="#ENV{sort_desc,#GET{sort_desc}}"
|
||||
|
@ -39,10 +40,13 @@
|
|||
[<span class="titre titreGamutableDeux">(#ENV{titreGamutableDeux})</span>]
|
||||
<mon-tableau
|
||||
apiuri="[(#ENV{apiuri_deux})]"
|
||||
pdfuri="[(#ENV{pdfuri_deux})]"
|
||||
:tparpage="#ENV{tparpage_deux, [10, 20, 50, 'Tous']}"
|
||||
champcsv="[(#ENV{champcsv_deux, #ENV{champcsv,html}})]"
|
||||
delimitercsv="[(#ENV{delimitercsv_deux, #ENV{delimitercsv,','}})]"
|
||||
namecsv="[(#ENV{namecsv_deux, #ENV{namecsv}})]"
|
||||
namepdf="[(#ENV{namepdf_deux, #ENV{namepdf}})]"
|
||||
fichierpdf="[(#ENV{fichierpdf_deux, #ENV{fichierpdf}})]"
|
||||
urlvuebloc="[(#ENV{urlvuebloc_deux})]"
|
||||
url_sort_asc="[(#ENV{sort_asc_deux, #ENV{sort_asc,#GET{sort_asc}}})]"
|
||||
url_sort_desc="[(#ENV{sort_desc_deux, #ENV{sort_desc,#GET{sort_desc}}})]"
|
||||
|
|
|
@ -176,6 +176,9 @@ let monTableau = {
|
|||
type: String,
|
||||
required: true,
|
||||
},
|
||||
pdfuri: {
|
||||
type: String,
|
||||
},
|
||||
champcsv: {
|
||||
type: String,
|
||||
},
|
||||
|
@ -185,6 +188,12 @@ let monTableau = {
|
|||
namecsv: {
|
||||
type: String,
|
||||
},
|
||||
namepdf: {
|
||||
type: String,
|
||||
},
|
||||
fichierpdf: {
|
||||
type: String,
|
||||
},
|
||||
url_sort_asc: {
|
||||
type: String,
|
||||
},
|
||||
|
@ -694,6 +703,9 @@ let monTableau = {
|
|||
}
|
||||
}
|
||||
},
|
||||
genererPDF() {
|
||||
window.location.assign(this.pdfuri);
|
||||
},
|
||||
exportCSV(quoi = 'tableau') {
|
||||
let $csv = [];
|
||||
let $header = [];
|
||||
|
@ -777,6 +789,12 @@ let monTableau = {
|
|||
>
|
||||
<i class="fas fas fa-file-excel" aria-hidden="true" alt="csv"></i>
|
||||
</button>
|
||||
<button class="btn" type="button" @click.stop="genererPDF()"
|
||||
v-show="this.pdfuri"
|
||||
title="Générer le PDF du tableau complet"
|
||||
>
|
||||
<i class="fas fa-file-pdf rouge" aria-hidden="true" alt="pdf"></i>
|
||||
</button>
|
||||
<span v-show="chargement" class="rouge">
|
||||
<i class="fa fa-refresh fa-spin fa-fw rouge fas fa-sync fa-spin"></i>
|
||||
<span class="texteMajBDD">
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,7 +1,7 @@
|
|||
<paquet
|
||||
prefix="gamutable"
|
||||
categorie="outil"
|
||||
version="3.6.1"
|
||||
version="3.6.2"
|
||||
etat="dev"
|
||||
compatibilite="[3.2.0-dev;4.1.*]"
|
||||
logo="prive/themes/spip/images/gamutable-xx.svg"
|
||||
|
|
Loading…
Add table
Reference in a new issue