|
@@ -16,11 +16,16 @@
|
|
<div v-for="(note, i) in content.note" :key="i" class="note" v-html="note" />
|
|
<div v-for="(note, i) in content.note" :key="i" class="note" v-html="note" />
|
|
</section>
|
|
</section>
|
|
|
|
|
|
- <section v-if="content.autorities.length" class="autorities">
|
|
|
|
- <h3>Autorities</h3>
|
|
|
|
|
|
+ <section v-if="content.attestedForms" class="attested-forms">
|
|
|
|
+ <h3>formes attestées</h3>
|
|
<ul>
|
|
<ul>
|
|
- <li v-for="(aut, i) in content.autorities" :key="i">
|
|
|
|
- <a :href="aut.identifier" target="_blanck">{{ aut.autority }}</a>
|
|
|
|
|
|
+ <li v-for="(af, i) in content.attestedForms" :key="i">
|
|
|
|
+ <span class="form">{{ af.title }}</span>
|
|
|
|
+ <!-- <ul>
|
|
|
|
+ <li v-for="(uuid, j) in af.uuid" :key="j">
|
|
|
|
+ <a href="#">{{ uuid }}</a>
|
|
|
|
+ </li>
|
|
|
|
+ </ul> -->
|
|
</li>
|
|
</li>
|
|
</ul>
|
|
</ul>
|
|
</section>
|
|
</section>
|
|
@@ -30,16 +35,11 @@
|
|
<IndexItemOcurrences v-if="content" :content="content" />
|
|
<IndexItemOcurrences v-if="content" :content="content" />
|
|
|
|
|
|
<template v-if="content" v-slot:nav>
|
|
<template v-if="content" v-slot:nav>
|
|
- <section v-if="content.attestedForms" class="attested-forms">
|
|
|
|
- <h3>Attested forms</h3>
|
|
|
|
|
|
+ <section v-if="content.autorities.length" class="autorities">
|
|
|
|
+ <h3>Autorities</h3>
|
|
<ul>
|
|
<ul>
|
|
- <li v-for="(af, i) in content.attestedForms" :key="i">
|
|
|
|
- <h4>{{ af.title }}</h4>
|
|
|
|
- <ul>
|
|
|
|
- <li v-for="(uuid, j) in af.uuid" :key="j">
|
|
|
|
- <a href="#">{{ uuid }}</a>
|
|
|
|
- </li>
|
|
|
|
- </ul>
|
|
|
|
|
|
+ <li v-for="(aut, i) in content.autorities" :key="i">
|
|
|
|
+ <a :href="aut.identifier" target="_blanck">{{ aut.autority }}</a>
|
|
</li>
|
|
</li>
|
|
</ul>
|
|
</ul>
|
|
</section>
|
|
</section>
|
|
@@ -88,6 +88,7 @@ export default {
|
|
methods: {
|
|
methods: {
|
|
parseOccurences (content) {
|
|
parseOccurences (content) {
|
|
console.log('parseOccurences', content)
|
|
console.log('parseOccurences', content)
|
|
|
|
+ // ! parsing occurences
|
|
for (let i = 0; i < content.occurences.length; i++) {
|
|
for (let i = 0; i < content.occurences.length; i++) {
|
|
let ed = content.occurences[i]
|
|
let ed = content.occurences[i]
|
|
for (let j = 0; j < ed.occurences.length; j++) {
|
|
for (let j = 0; j < ed.occurences.length; j++) {
|
|
@@ -104,6 +105,34 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ // ! parsing attested-forms
|
|
|
|
+ for (let f = 0; f < content.attestedForms.length; f++) {
|
|
|
|
+ let form = content.attestedForms[f]
|
|
|
|
+ content.attestedForms[f].occurences = []
|
|
|
|
+ for (let u = 0; u < form.uuid.length; u++) {
|
|
|
|
+ // ? some UUID are duplicate
|
|
|
|
+ let oc = {
|
|
|
|
+ uuid: form.uuid[u]
|
|
|
|
+ }
|
|
|
|
+ for (let e = 0; e < content.occurences.length; e++) {
|
|
|
|
+ let ed = content.occurences[e]
|
|
|
|
+ for (let o = 0; o < ed.occurences.length; o++) {
|
|
|
|
+ let occ = ed.occurences[o]
|
|
|
|
+ if (oc.uuid === occ.uuid && occ.title) {
|
|
|
|
+ oc.title = occ.title
|
|
|
|
+ oc.ed = {
|
|
|
|
+ uuid: ed.item,
|
|
|
|
+ title: ed.biblio
|
|
|
|
+ }
|
|
|
|
+ content.attestedForms[f].occurences.push(oc)
|
|
|
|
+ // content.attestedForms[f].uuid[u] = oc
|
|
|
|
+ break
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if (oc.title) break
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
this.content = content
|
|
this.content = content
|
|
}
|
|
}
|
|
}
|
|
}
|