{% extends 'baseSyntherm.html.twig' %}
{% block stylesheets %}
<link href="{{ asset('dropzone-5.7.0/dist/dropzone.css') }}" rel="stylesheet" type="text/css"/>
<script src="{{ asset('dropzone-5.7.0/dist/dropzone.js') }}" type="text/javascript"></script>
{% endblock %}
{#{% form_theme affichage 'form_div_layout.html.twig' %}#}
{% block title %}
SOBRO XML
{% endblock %}
{% block body %}
<script src="https://cdn.zingchart.com/zingchart.min.js"></script>
<br>
<div class="alert alert-warning justify-content-center" role="alert">
Bienvenue sur l'application SOBRO XML. Cet outil analyse différents indicateurs à partir des fichiers XML issus du calcul RT2012 et RE2020
tels que la compacité ou le taux de brassage global et compare avec le reste de la base de donnée. <br>
</div>
<br>
<br>
{# {{ form(affichage) }}#}
{{ form_start(affichage) }}
<div class="form-row align-items-end ">
<div class="form-group col-3 sm">
{{ form_label(affichage.usage) }}
{{ form_widget(affichage.usage) }}
</div>
<div class="form-group col-3 sm">
{{ form_label(affichage.zoneClimatique) }}
{{ form_widget(affichage.zoneClimatique) }}
</div>
<div class="form-group col-3 sm">
{{ form_label(affichage.abscisse) }}
{{ form_widget(affichage.abscisse) }}
</div>
<div class="form-group col-3 sm">
{{ form_label(affichage.ordonnee) }}
{{ form_widget(affichage.ordonnee) }}
</div>
{{ form_end (affichage) }}
</div>
<!-- Chart Placement[2] -->
<div id="myChart">
</div>
{% if alert is not null %}
<div class="alert alert-warning justify-content-center" role="alert">
{{ alert }}
</div>
{% endif %}
{% if alertUtilisateur is not null %}
<div class="alert alert-warning justify-content-center" role="alert">
{{ alertUtilisateur }}
</div>
{% endif %}
{#{{ form_start(monForm) }}
<div class="form-row ">
<div class="form-group-sm col-md-6">
{{ form(monForm.fichier) }}
</div>
<div class="form-group-sm col-md-4">
{{ form_end (monForm) }}
</div>
</div>#}
<br>
Cliquez sur le nom du projet pour plus de détails :
<br>
{% if listFicheBatiment is not null %}
<table class='table table-striped table-hover table-sm'>
<thead>
<th>Nom du projet</th>
<th >Usage</th>
<th >Ville</th>
<th >Bbio Chaud Annuel</th>
<th >Compacité (m2env /m²SHONRT)</th>
<th >Taux de brassage d'air (vol/h)</th>
<th >Uw moyen (W/m²/K)</th>
<th >Part des baies au sud</th>
<th >Taux de vitrage (m2vitr /m²SHONRT)</th>
</thead>
<tbody>
{% for ficheAct in listFicheBatiment %}
{% if ficheAct is not null %}
<tr>
<td>
<a href="{{ path('fiche_batiment_analyse', {'id': ficheAct.id}) }}"> {{ ficheAct.nomDuProjetCourt }} </a>
</td>
<td>
{{ ficheAct.nomUsageCourt }}
</td>
<td>
{{ ficheAct.ville }}
</td>
<td>
{{ ficheAct.bbiochaudannuel }}
</td>
<td>
{{ ficheAct.compacite }}
</td>
<td>
{{ ficheAct.tauxBrassageBBIO }}
</td>
<td>
{{ ficheAct.uwMoyen }}
</td>
<td>
{{ ficheAct.partBaiesSudBatiment }}%
</td>
<td>
{{ ficheAct.tauxVitrage }}
</td>
</tr>
{% endif %}
{% endfor %}
</tbody>
</table>
{{ knp_pagination_render(listFicheBatiment) }}
{% if is_granted('IS_AUTHENTICATED') %}
<a class="btn btn-primary" href="{{ path('export_xlsx') }}">
<i class="fas fa-download"></i> Exporter en XLSX
</a>
<br/>
{% endif %}
{% endif %}
Faites une recherche "*.xml" dans votre dossier de projets et déplacez-les ici :
<br>
<form method="POST"
action="{{ path("upload-dropzone") }}"
class="dropzone"
id="my-awesome-dropzone"></form>
<br>
<div class="row">
<a class="col-12 btn btn-primary" href="{{ path('homepage') }}">Analyser vos fichiers XML</a>
</div>
<br>
{% if app.user is null %}
<div class="alert alert-info">
Vous pouvez conservez les données de vos fichiers XML, pour ce faire si vous n'avez pas encore de compte utilisateur, vous devez procéder à votre <a href="{{ path('user_security_inscription') }}" title="Inscription">inscription</a> ou bien vous <a href="{{ path('user_security_login') }}" title="Connexion">connecter</a> avec vos identifiants.
</div>
{% endif %}
<script>
document.querySelectorAll('form select').forEach(elem => {
elem.addEventListener('change', function(){ document.querySelector('form').submit(); });
});
let myConfig = {
type: 'scatter',
plot: {
tooltip: {
text:
'BBIO = %v <BR> Uw moyen = %data-uwmoyen W/m².K <BR> Q4 = %data-qpasurf m3/h/m² <BR> taux de vitrage = %data-tauxdevitrage m²v/m²shon',
'html-mode': true
}
},
scaleX: {
label: {
text: '{{ abscisse }}',
fontSize: 14,
},
},
scaleY: {
label: {
text: '{{ ordonnee }}',
fontSize: 14,
}
},
series: [
{
values: {{ graphiqueJsonAll['data'] }},
dataTauxdevitrage: {{ graphiqueJsonAll['taux_de_vitrage'] }},
dataUwmoyen: {{ graphiqueJsonAll['uw_moyen'] }},
dataQpasurf: {{ graphiqueJsonAll['q_4_pasurf'] }},
dataIdFiche: {{ graphiqueJsonAll['ids'] }},
dataType:"other"
}
{% if listFicheBatiment is not null %}
{% if alertUtilisateur is null %}
,
{
values:{{ graphiqueJsonUser['data'] }},
text:"Projets utilisateur",
dataTauxdevitrage: {{ graphiqueJsonUser['taux_de_vitrage'] }},
dataUwmoyen: {{ graphiqueJsonUser['uw_moyen'] }},
dataQpasurf: {{ graphiqueJsonUser['q_4_pasurf'] }},
dataIdFiche: {{ graphiqueJsonUser['ids'] }},
dataType:"user"
}
{% endif %}
{% endif %}
]
};
{#zingchart.bind('myChart', 'node_click', function(e) {
console.log(e);
console.log(e["data-type"]);
if (e["data-type"] == "user") {
window.location.href = Routing.generate('fiche_batiment_analyse', {'id' : e["data-id-fiche"]});
}
});
zingchart.bind('myChart', 'plot_click', function(e) {
console.log(e);
console.log(e["data-type"]);
if (e["data-type"] == "user") {
window.location.href = Routing.generate('fiche_batiment_analyse', {'id' : e["data-id-fiche"]});
}
});#}
// Render Method[3]
zingchart.render({
id: 'myChart',
data: myConfig,
height: 550,
width: '100%',
});
zingchart.node_click = function(p) {
{% if is_granted('ROLE_ADMIN') %}
window.location.href = Routing.generate('fiche_batiment_analyse', {'id' : p["data-id-fiche"]});
{% else %}
if (p["data-type"] == "user") {
window.location.href = Routing.generate('fiche_batiment_analyse', {'id' : p["data-id-fiche"]});
}
{% endif %}
};
// Gère la dropzone
Dropzone.options.myAwesomeDropzone = {
paramName: "fichier", // The name that will be used to transfer the file
maxFilesize: 20, // MB
{# acceptedFiles: ".xml",".zip"#}
};
// var nodesAll = zingchart.exec('myChart', 'getseriesvalues', { plotindex: 0 });
// nodesAll.forEach(element => console.log(element));
zingchart.exec(1, 'removenode');
</script>
{% endblock %}