Commit 722cf5cf authored by Jérémie Passerat's avatar Jérémie Passerat

Correction bugs

parent 84cbe060
...@@ -71,6 +71,7 @@ export default { ...@@ -71,6 +71,7 @@ export default {
nouveauContenu.tags_libres = [] nouveauContenu.tags_libres = []
that.$emit("contenuAjoute", {contenu: nouveauContenu}) that.$emit("contenuAjoute", {contenu: nouveauContenu})
that.contenuSaisi = '' that.contenuSaisi = ''
that.titreContenu = ''
that.retourArriere(true) that.retourArriere(true)
that.isCreation = true that.isCreation = true
} }
......
...@@ -51,11 +51,13 @@ export default { ...@@ -51,11 +51,13 @@ export default {
if (this.source === 'moodle') { if (this.source === 'moodle') {
console.log("this.provenance : " + this.provenance !== 'maj') console.log("this.provenance : " + this.provenance !== 'maj')
if (!(this.provenance === 'en-cours' || this.provenance === 'maj')) { if (!(this.provenance === 'en-cours' || this.provenance === 'maj')) {
console.log("Je le suis ici")
Service.parserTexte(JSON.stringify(this.id)).then(function (response) { Service.parserTexte(JSON.stringify(this.id)).then(function (response) {
that.questionParsee = response.data that.questionParsee = response.data
}) })
} else { } else {
Service.parserTexteEnCours(JSON.stringify(this.id)).then(function (response) { console.log("Je le suis là")
Service.parserTexteEnCours(JSON.stringify(this.id)).then(function (response) {
that.questionParsee = response.data that.questionParsee = response.data
}) })
} }
......
...@@ -9,18 +9,18 @@ ...@@ -9,18 +9,18 @@
<label>Choisir le tag de niveau 1</label><br><br> <label>Choisir le tag de niveau 1</label><br><br>
<select @change="niveau1()" v-model="tagUn" :disabled="(provenance === 'tiers' || provenance === 'en-cours') && provenance !== undefined"> <select @change="niveau1()" v-model="tagUn" :disabled="(provenance === 'tiers' || provenance === 'en-cours') && provenance !== undefined">
<option>Informatique</option> <option>Informatique</option>
<option>Genie Civil</option> <option>Genie_Civil</option>
<option>Systemes Electriques</option> <option>Systemes_Electriques</option>
</select><br><br> </select><br><br>
<label>Choisir le tag de niveau 2</label><br><br> <label>Choisir le tag de niveau 2</label><br><br>
<select @change="niveau2()" :disabled="niveauDeux === 0 || (provenance === 'tiers' || provenance === 'en-cours') && provenance !== undefined" v-model="tagDeux"> <select @change="niveau2()" :disabled="niveauDeux === 0 || (provenance === 'tiers' || provenance === 'en-cours') && provenance !== undefined" v-model="tagDeux">
<option v-for="i in 3" :key="i">{{tagUn}}.{{ i }}</option> <option v-for="i in 3" :key="i">{{tagUn}}_{{ i }}</option>
</select><br><br> </select><br><br>
<label>Choisir le tag de niveau 3</label><br><br> <label>Choisir le tag de niveau 3</label><br><br>
<select @change="niveau3()" :disabled="niveauTrois === 0 || (provenance === 'tiers' || provenance === 'en-cours') && provenance !== undefined" v-model="tagTrois"> <select :disabled="niveauTrois === 0 || (provenance === 'tiers' || provenance === 'en-cours') && provenance !== undefined" v-model="tagTrois">
<option v-for="i in 5" :key="i">{{tagDeux}}.{{ i }}</option> <option v-for="i in 5" :key="i">{{tagDeux}}_{{ i }}</option>
</select><br><br> </select><br><br>
<button v-on:click="validerTags" :disabled="validationTags === 0" v-show="provenance === undefined || provenance === 'perso'">Valider</button> <button v-on:click="validerTags" :disabled="validationTags === 0" v-show="provenance === undefined || provenance === 'perso'">Valider</button>
</div> </div>
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
style="margin-right: 5px; background: none; border: none" > style="margin-right: 5px; background: none; border: none" >
<option v-for="i in versionMax" v-bind:key="i"> {{i}}</option> <option v-for="i in versionMax" v-bind:key="i"> {{i}}</option>
</select> </select>
<input type="text" id="titreDuContenu" placeholder="titre du contenu" style="width: 350px; outline: none; border: none" v-model="titreContenu"> <input type="text" id="titreDuContenu" placeholder="titre du contenu" style="width: 15vw; outline: none; border: none; margin-right: 1vw" v-model="titreContenu">
</div> </div>
<div id="voirNote"> <div id="voirNote">
<button style="margin-left: 10px; background: floralwhite; border: none" v-show="contenuCliqueProvenance === 'tiers' && !notePresente" id="noterContenu">{{ messageNoter }}</button> <button style="margin-left: 10px; background: floralwhite; border: none" v-show="contenuCliqueProvenance === 'tiers' && !notePresente" id="noterContenu">{{ messageNoter }}</button>
...@@ -34,8 +34,8 @@ ...@@ -34,8 +34,8 @@
<star-rating @rating-selected ="setRating" v-model="rating" :read-only="notePresente" :show-rating="false" :increment=0.5 :star-size=25 /> <star-rating @rating-selected ="setRating" v-model="rating" :read-only="notePresente" :show-rating="false" :increment=0.5 :star-size=25 />
</b-popover> </b-popover>
<star-rating v-show="notePresente" @rating-selected ="setRating" v-model="rating" :read-only="notePresente" <star-rating id="etoiles" v-show="notePresente" @rating-selected ="setRating" v-model="rating" :read-only="notePresente"
:show-rating="false" :increment=0.5 :star-size=25 /> :show-rating="false" :increment=0.5 :star-size=25 style="margin-right: 0.1vw" />
</div> </div>
</div> </div>
...@@ -338,9 +338,11 @@ export default { ...@@ -338,9 +338,11 @@ export default {
if (this.contenuCliqueProvenance !== 'banque'){ if (this.contenuCliqueProvenance !== 'banque'){
Service.recupererNoteContenu(JSON.stringify(this.contenuClique._id), this.auteur, this.versionChoisie).then(function (result) { Service.recupererNoteContenu(JSON.stringify(this.contenuClique._id), this.auteur, this.versionChoisie).then(function (result) {
let nombre = result.data let nombre = result.data
console.log("nombre : " + nombre + " " + typeof (nombre))
if (nombre !== '-') { if (nombre !== '-') {
nombre = JSON.parse(nombre) //nombre = JSON.parse(nombre)
that.rating = nombre.note //that.rating = nombre.note
that.rating = nombre
that.notePresente = true that.notePresente = true
} }
}) })
...@@ -512,4 +514,8 @@ button { ...@@ -512,4 +514,8 @@ button {
} }
#etoiles {
margin-left: 10px;
}
</style> </style>
\ No newline at end of file
...@@ -53,8 +53,7 @@ export default { ...@@ -53,8 +53,7 @@ export default {
Authorization: "Bearer " + localStorage.token, Authorization: "Bearer " + localStorage.token,
'Access-Control-Allow-Origin': '*', 'Access-Control-Allow-Origin': '*',
'Access-Control-Allow-Headers': 'Authorization', 'Access-Control-Allow-Headers': 'Authorization',
'Content-Type': 'application/json', 'Content-Type': 'application/json'
Chameau: "Chamelle"
} }
} }
//console.log("headon : " + header) //console.log("headon : " + header)
...@@ -83,7 +82,7 @@ export default { ...@@ -83,7 +82,7 @@ export default {
return { return {
headers: headers:
{ {
HTTP_AUTHORIZATION: "Bearer " + token, Authorization: "Bearer " + token,
} }
} }
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment