diff --git a/package-lock.json b/package-lock.json index a1a8995122879ac63c845d8be924e5f278af265a..4c7d4b0c0a26c5060ede383834ba79b04cedf45c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3088,7 +3088,8 @@ "version": "4.6.0", "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", - "dev": true + "dev": true, + "optional": true }, "coa": { "version": "2.0.2", @@ -5383,7 +5384,8 @@ "ansi-regex": { "version": "2.1.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "aproba": { "version": "1.2.0", @@ -5404,12 +5406,14 @@ "balanced-match": { "version": "1.0.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, "dev": true, + "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -5424,17 +5428,20 @@ "code-point-at": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "concat-map": { "version": "0.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "console-control-strings": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -5551,7 +5558,8 @@ "inherits": { "version": "2.0.3", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "ini": { "version": "1.3.5", @@ -5563,6 +5571,7 @@ "version": "1.0.0", "bundled": true, "dev": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -5577,6 +5586,7 @@ "version": "3.0.4", "bundled": true, "dev": true, + "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -5584,12 +5594,14 @@ "minimist": { "version": "0.0.8", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "minipass": { "version": "2.3.5", "bundled": true, "dev": true, + "optional": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -5608,6 +5620,7 @@ "version": "0.5.1", "bundled": true, "dev": true, + "optional": true, "requires": { "minimist": "0.0.8" } @@ -5688,7 +5701,8 @@ "number-is-nan": { "version": "1.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "object-assign": { "version": "4.1.1", @@ -5700,6 +5714,7 @@ "version": "1.4.0", "bundled": true, "dev": true, + "optional": true, "requires": { "wrappy": "1" } @@ -5785,7 +5800,8 @@ "safe-buffer": { "version": "5.1.2", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "safer-buffer": { "version": "2.1.2", @@ -5821,6 +5837,7 @@ "version": "1.0.2", "bundled": true, "dev": true, + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -5840,6 +5857,7 @@ "version": "3.0.1", "bundled": true, "dev": true, + "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -5883,12 +5901,14 @@ "wrappy": { "version": "1.0.2", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "yallist": { "version": "3.0.3", "bundled": true, - "dev": true + "dev": true, + "optional": true } } }, @@ -9640,7 +9660,8 @@ "version": "4.0.8", "resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-4.0.8.tgz", "integrity": "sha1-Cx4Rr4vESDbwSmQH6S2kJGe3lEQ=", - "dev": true + "dev": true, + "optional": true }, "rx-lite-aggregates": { "version": "4.0.8", diff --git a/src/components/display/pharma_display/PhDJsonld.vue b/src/components/display/pharma_display/PhDJsonld.vue index 98b0bf59805cbaf9282ab974a1c507838a4373ff..0232f31d84ccbbaaaabf95e5f05c0521fa185851 100644 --- a/src/components/display/pharma_display/PhDJsonld.vue +++ b/src/components/display/pharma_display/PhDJsonld.vue @@ -376,21 +376,21 @@ </div> </v-flex> <v-flex xs11> - l.fields - {{l.fields}} + <v-card v-for="(inputf,index) in l.fields" :key="index+'subjectField'"> + <p-d-skos-preflabel v-if="getSkosexactMatch(inputf)==undefined" :p="getLabel(inputf['@type'])" :o="inputf" :key="inputf+index+'pharmafreesubject'" ></p-d-skos-preflabel> - inputfhere {{inputf}} + inputfhere {{inputf}} -------------------- index {{index+'subjectField'}} <ph-d-metadata v-if="getSkosexactMatch(inputf)" - :o="inputf" + :o="getSkosexactMatch(inputf)" :p="p" - :key="inputf+index+'pharmasubject'" + :key="index+'pharmasubject'" ></ph-d-metadata> <v-divider></v-divider> </v-card> diff --git a/src/components/display/pharma_display/PhDMetadata.vue b/src/components/display/pharma_display/PhDMetadata.vue index d7c46e9ce66275e15d88d8d5aed5503b86cf5b52..7aa7def852ca70dc23493797806a4bb390d6c35c 100644 --- a/src/components/display/pharma_display/PhDMetadata.vue +++ b/src/components/display/pharma_display/PhDMetadata.vue @@ -1,14 +1,14 @@ <template> <v-flex> <v-layout column> - <v-btn @click="alert(getMetadata())">see metadata</v-btn> + <v-btn @click="alert(newdata)">see metadata</v-btn> <v-flex> - hello o {{ o }} - data============================================ {{getMetadata()}} + o {{o}}===================== iri {{iri}} + data============================================ {{ndata}} <template - v-for="(l, i) in getMetadata()" + v-for="(l, i) in ndata" > - l {{l}} + <v-layout :key="'lay' + i"> <v-flex v-if="i == 'skos:prefLabel'" @@ -34,7 +34,7 @@ <v-flex md8 xs12 v-if="i == 'skos:exactMatch'"> <a class="valuefield" - :href="getSkosexactMatch(data)" + :href="getSkosexactMatch(ndata)" target="_blank" >{{ getSkosexactMatch(data) }}</a> </v-flex> @@ -48,7 +48,7 @@ >Cell Line Name</v-flex> <v-flex md8 xs12 v-if="i == 'cellLineName'" class="valuefield"> {{ - getCelllinename(data) + getCelllinename(ndata) }} </v-flex> @@ -62,7 +62,7 @@ <v-flex md8 xs12 v-if="i == 'accessionNumber'" class="valuefield"> {{ - getAccessionnumber(data) + getAccessionnumber(ndata) }} </v-flex> <v-flex @@ -74,7 +74,7 @@ >Uniprot Name</v-flex> <v-flex md8 xs12 v-if="i == 'uniprotName'" class="valuefield"> {{ - getUniprotName(data) + getUniprotName(ndata) }} </v-flex> @@ -91,7 +91,7 @@ xs12 v-if="i == 'proteinRecommendedName'" class="valuefield" - >{{ getProteinRecommendedName(data) }}</v-flex> + >{{ getProteinRecommendedName(newdata) }}</v-flex> <v-flex v-if="i == 'uniprotAccession'" md4 @@ -105,7 +105,7 @@ xs12 v-if="i == 'uniprotAccession'" class="valuefield" - >{{ getUniprotAccession(data) }}</v-flex> + >{{ getUniprotAccession(ndata) }}</v-flex> <v-flex v-if="i == 'organismName'" md4 @@ -116,7 +116,7 @@ <v-flex md8 xs12 v-if="i == 'organismName'" class="valuefield"> {{ - getOrganismName(data) + getOrganismName(ndata) }} </v-flex> @@ -133,7 +133,7 @@ xs12 v-if="i == 'proteinAlternativeName'" class="valuefield" - >{{ getProteinAlternativeName(data) }}</v-flex> + >{{ getProteinAlternativeName(ndata) }}</v-flex> <v-flex v-if="i == 'skos:altLabel'" md4 @@ -144,7 +144,7 @@ <v-flex md8 xs12 v-if="i == 'skos:altLabel'" class="valuefield"> {{ - getSynonyms(data) + getSynonyms(ndata) }} </v-flex> </v-layout> @@ -172,16 +172,18 @@ export default { } }, //mounted: function() { - // this.getMetadata(); + // this.getMetadata(this.o); //}, computed: { + newdata() { + this.getMetadata(this.o); + return this.ndata; + }, getIri() { // console.log("o", this.getSkosexactMatch(this.o)); - return this.getSkosexactMatch(this.o); - }, - det() { - return this.getMetadata(); + this.iri = this.getSkosexactMatch(this.o); }, + //getData() { //return this.getMetadata(); //return this.getMetadata(this.getSkosexactMatch(this.o)); @@ -207,7 +209,7 @@ export default { }, data() { return { - data: {} + ndata: {} }; }, methods: { @@ -218,12 +220,12 @@ export default { // console.log("o", this.getSkosexactMatch(this.o)); // return this.getSkosexactMatch(this.o); //}, - getMetadata: function(ndata) { + getMetadata: function(i) { var self = this; //var iri = self.getSkosexactMatch(this.o); - var iri = this.getIri; - console.log("irir", iri); + + console.log("irir ", i); //before I was getting it all in an array in the parent component @@ -234,7 +236,7 @@ export default { //promise to fetch data var params = { - iri: iri + iri: i }; var query = qs.stringify(params); @@ -258,14 +260,14 @@ export default { return response.json(); }) .then(function(body) { - //data = body; - ndata = body; + self.ndata = body; + //ndata = body; //if body is empty, then just use whatever was there already in the data getData if (body.result == "empty") { - //data = self.o; - ndata = self.o; + self.ndata = self.o; + //ndata = self.o; } - return ndata; + //return ndata; }) .catch(function(error) {