Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpenQuizz
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
10
Issues
10
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Weber Rodolphe
OpenQuizz
Commits
072443eb
Commit
072443eb
authored
Jun 25, 2021
by
Jérémie Passerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
correction des url pour correspondre aux namespace de flask
parent
27204268
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
70 additions
and
67 deletions
+70
-67
Maj.vue
src/Maj.vue
+2
-1
NewContenu.vue
src/NewContenu.vue
+0
-2
Volet_Base.vue
src/components/Volet_Base.vue
+3
-3
Service.js
src/service/Service.js
+65
-61
No files found.
src/Maj.vue
View file @
072443eb
...
...
@@ -115,8 +115,9 @@ export default {
Service
.
creerNouveauContenu
(
data
).
then
(
function
(
response
)
{
let
nvoContenu
=
response
.
data
nvoContenu
.
provenance
=
"
en-cours
"
nvoContenu
.
provenance
=
"
perso
"
that
.
$emit
(
"majNvoContenu"
,
{
contenu
:
response
.
data
})
that
.
contenusPropose
=
that
.
contenusPropose
.
filter
(
contenu
=>
contenu
.
_id
!==
item
.
_id
)
}
)
},
...
...
src/NewContenu.vue
View file @
072443eb
...
...
@@ -45,10 +45,8 @@ export default {
let
that
=
this
Service
.
creerContenuPerso
(
data
).
then
(
function
(
reponse
)
{
console
.
log
(
reponse
.
data
)
let
nouveauContenu
=
reponse
.
data
nouveauContenu
.
provenance
=
"perso"
console
.
log
(
nouveauContenu
)
that
.
$emit
(
"contenuAjoute"
,
{
contenu
:
nouveauContenu
})
that
.
contenuSaisi
=
''
that
.
retourArriere
()
...
...
src/components/Volet_Base.vue
View file @
072443eb
...
...
@@ -151,6 +151,7 @@ export default {
},
computed
:{
filterContenu
:
function
()
{
return
this
.
contenus
.
filter
(
item
=>
item
.
isPublie
!==
'oui'
)
}
},
...
...
@@ -162,7 +163,6 @@ export default {
},
contenuAjoute
:
function
(){
console
.
log
(
this
.
contenuAjoute
)
this
.
contenus
.
push
(
this
.
contenuAjoute
)
},
...
...
@@ -181,7 +181,7 @@ export default {
// Dès que l'auteur est connu, on charge tous ses contenus
Service
.
getPanierAuteur
(
this
.
auteur
).
then
(
function
(
response
)
{
that
.
contenusTotal
=
response
.
data
that
.
contenusTotal
=
Array
.
from
(
response
.
data
)
that
.
contenus
=
that
.
contenusTotal
})
},
...
...
@@ -189,7 +189,7 @@ export default {
let
that
=
this
Service
.
getBanqueAuteur
(
this
.
auteur
).
then
(
function
(
response
)
{
that
.
contenusTotalBanque
=
response
.
data
that
.
contenusTotalBanque
=
Array
.
from
(
response
.
data
)
that
.
contenusbanque
=
that
.
contenusTotalBanque
})
},
...
...
src/service/Service.js
View file @
072443eb
import
axios
from
'axios'
const
urlBase
=
"http://127.0.0.1:5000/"
const
users
=
"utilisateurs/"
const
contenus
=
"contenus/"
const
en_cours
=
"en_cours/"
const
demande_pub
=
"demande_pub/"
//const evaluation = "evaluation/
export
default
{
// gestion des utilisateurs
login
(
data
)
{
let
login
=
data
[
0
]
let
motDePasse
=
data
[
1
]
...
...
@@ -11,100 +17,98 @@ export default {
axios.get(urlBase + "checkUser?login=" + login + "&password=" + motDePasse).then(function (response) {
reponse = response.data
})*/
return
axios
.
get
(
urlBase
+
"checkUser?login="
+
login
+
"&password="
+
motDePasse
)
return
axios
.
get
(
urlBase
+
users
+
"checkUser?login="
+
login
+
"&password="
+
motDePasse
)
},
recupererAuteursExistants
(){
return
axios
.
get
(
urlBase
+
users
+
"auteursExistants"
)
},
// gestion des contenus
creerContenuPerso
(
data
)
{
return
axios
.
post
(
urlBase
+
contenus
+
"addContenu"
,
data
)
},
creerContenuTiers
(
data
)
{
return
axios
.
patch
(
urlBase
+
contenus
+
"ajouterTiers"
,
data
)
},
/* getContenuById(idContenu) {
return axios.get(urlBase + contenus + "getContenu/" + idContenu)
},*/
getPanierAuteur
(
auteur
)
{
return
axios
.
get
(
urlBase
+
"getContenuPanier/"
+
auteur
+
"?perso=True&tiers=True&enCours=true"
)
return
axios
.
get
(
urlBase
+
contenus
+
"getContenuPanier/"
+
auteur
+
"?perso=True&tiers=True&enCours=true"
)
},
getBanqueAuteur
(
auteur
)
{
return
axios
.
get
(
urlBase
+
"getContenuBanque/"
+
auteur
)
return
axios
.
get
(
urlBase
+
contenus
+
"getContenuBanque/"
+
auteur
)
},
getContenuById
(
idContenu
)
{
return
axios
.
get
(
urlBase
+
"getContenu/"
+
idContenu
)
supprimerContenu
(
idContenu
)
{
return
axios
.
delete
(
urlBase
+
contenus
+
"deletePerso/"
+
idContenu
)
},
creerContenuTiers
(
data
)
{
return
axios
.
patch
(
urlBase
+
"ajouterTiers"
,
data
)
supprimerTiers
(
auteur
,
id_tiers
)
{
return
axios
.
delete
(
urlBase
+
contenus
+
"deleteTiers?auteur="
+
auteur
+
"&id_tiers="
+
id_tiers
)
},
creer
ContenuPerso
(
data
)
{
return
axios
.
post
(
urlBase
+
"add
Contenu"
,
data
)
creer
NouveauContenu
(
data
)
{
return
axios
.
post
(
urlBase
+
contenus
+
"new
Contenu"
,
data
)
},
majContenu
(
data
)
{
return
axios
.
patch
(
urlBase
+
contenus
+
"majContenu"
,
data
)
creerEnCours
(
data
)
{
return
axios
.
p
ost
(
urlBase
+
"newEnCours
"
,
data
)
},
gererDemandePublication
(
data
)
{
return
axios
.
p
atch
(
urlBase
+
contenus
+
"gererDemandePub
"
,
data
)
},
creerEnCoursRefuse
(
data
)
{
return
axios
.
patch
(
urlBase
+
"newEnCoursRefuse"
,
data
)
isMajTiersDisponible
(
auteur
)
{
return
axios
.
get
(
urlBase
+
contenus
+
"isMajTiersDisponible/"
+
auteur
)
},
supprimerEnCoursParLid
(
idEnCours
)
{
return
axios
.
delete
(
urlBase
+
"supprimerEnCoursParId/"
+
idEnCours
)
listeMajTiers
(
auteur
)
{
return
axios
.
get
(
urlBase
+
contenus
+
"listeMajTiers/"
+
auteur
)
},
supprimerContenu
(
idContenu
)
{
return
axios
.
delete
(
urlBase
+
"deletePerso/"
+
idContenu
)
gererMajTiers
(
data
)
{
return
axios
.
patch
(
urlBase
+
contenus
+
"gererMajTiers"
,
data
)
},
changerTexte
(
data
,
id
)
{
return
axios
.
patch
(
urlBase
+
contenus
+
"changerTexte/"
+
id
,
data
)
},
recupererTexteContenu
(
idContenu
){
return
axios
.
get
(
urlBase
+
contenus
+
"getTexteContenu/"
+
idContenu
)
},
recupererTexteVersionContenu
(
idContenu
,
version
){
return
axios
.
get
(
urlBase
+
"getTexteVersionContenu/"
+
idContenu
+
"/"
+
version
)
},
supprimerTiers
(
auteur
,
id_tiers
)
{
return
axios
.
delete
(
urlBase
+
"deleteTiers?auteur="
+
auteur
+
"&id_tiers="
+
id_tiers
)
// gestion des en-cours
creerEnCours
(
data
)
{
return
axios
.
post
(
urlBase
+
en_cours
+
"newEnCours"
,
data
)
},
majContenu
(
data
)
{
return
axios
.
patch
(
urlBase
+
"majContenu"
,
data
)
creerEnCoursRefuse
(
data
)
{
return
axios
.
patch
(
urlBase
+
en_cours
+
"newEnCoursRefuse"
,
data
)
},
supprimerEnCoursParLid
(
idEnCours
)
{
return
axios
.
delete
(
urlBase
+
en_cours
+
"supprimerEnCoursParId/"
+
idEnCours
)
},
recupererTexteContenuEnCours
(
idContenu
){
return
axios
.
get
(
urlBase
+
en_cours
+
"getTexteContenuEnCours/"
+
idContenu
)
},
//
bonus : fonction de récupération des tags pour getPanier et getBanque
//
gestion des demandes de publication
getPublicationsRecues
(
auteur
)
{
return
axios
.
get
(
urlBase
+
"demandePublication/"
+
auteur
+
"/False"
)
return
axios
.
get
(
urlBase
+
demande_pub
+
"demandePublication/"
+
auteur
+
"/False"
)
},
getPublicationsProposees
(
auteur
)
{
return
axios
.
get
(
urlBase
+
"demandePublication/"
+
auteur
+
"/True"
)
return
axios
.
get
(
urlBase
+
demande_pub
+
"demandePublication/"
+
auteur
+
"/True"
)
},
creerDemandePublication
(
data
)
{
return
axios
.
post
(
urlBase
+
"demandePublication"
,
data
)
return
axios
.
post
(
urlBase
+
demande_pub
+
"demandePublication"
,
data
)
},
supprimerDemandePublication
(
idDemandePublication
)
{
return
axios
.
delete
(
urlBase
+
"demandePublication/"
+
idDemandePublication
)
},
creerNouveauContenu
(
data
)
{
return
axios
.
post
(
urlBase
+
"newContenu"
,
data
)
},
gererDemandePublication
(
data
)
{
return
axios
.
patch
(
urlBase
+
"gererDemandePub"
,
data
)
},
isMajTiersDisponible
(
auteur
)
{
return
axios
.
get
(
urlBase
+
"isMajTiersDisponible/"
+
auteur
)
},
listeMajTiers
(
auteur
)
{
return
axios
.
get
(
urlBase
+
"listeMajTiers/"
+
auteur
)
},
gererMajTiers
(
data
)
{
return
axios
.
patch
(
urlBase
+
"gererMajTiers"
,
data
)
},
changerTexte
(
data
,
id
)
{
return
axios
.
patch
(
urlBase
+
"changerTexte/"
+
id
,
data
)
return
axios
.
delete
(
urlBase
+
demande_pub
+
"demandePublication/"
+
idDemandePublication
)
},
recupererTexteContenu
(
idContenu
){
return
axios
.
get
(
urlBase
+
"getTexteContenu/"
+
idContenu
)
},
recupererTexteContenuEnCours
(
idContenu
){
return
axios
.
get
(
urlBase
+
"getTexteContenuEnCours/"
+
idContenu
)
},
recupererTexteVersionContenu
(
idContenu
,
version
){
return
axios
.
get
(
urlBase
+
"getTexteVersionContenu/"
+
idContenu
+
"/"
+
version
)
},
recupererAuteursExistants
(){
return
axios
.
get
(
urlBase
+
"auteursExistants"
)
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment