| | |
| | | }); |
| | | }; |
| | | |
| | | export const getPersonDataOutput = (Obj) => { |
| | | return req1({ |
| | | url: "/person/dataOutput", |
| | | method: "post", |
| | | params: Obj |
| | | }); |
| | | }; |
| | | |
| | | // ----------- |
| | | |
| | | // 中国医学人物知识库 |
| | |
| | | text-align: center; |
| | | margin-right: 0.15rem; |
| | | " |
| | | @click="openFileClick(1)" |
| | | > |
| | | RDF |
| | | </li> |
| | |
| | | font-size: 0.12rem; |
| | | text-align: center; |
| | | margin-right: 0.15rem; |
| | | cursor: pointer; |
| | | " |
| | | @click="openFileClick(2)" |
| | | > |
| | | NT |
| | | </li> |
| | |
| | | font-size: 0.12rem; |
| | | text-align: center; |
| | | margin-right: 0.15rem; |
| | | cursor: pointer; |
| | | " |
| | | @click="openFileClick(3)" |
| | | > |
| | | XML |
| | | </li> |
| | |
| | | font-size: 0.12rem; |
| | | text-align: center; |
| | | margin-right: 0.15rem; |
| | | cursor: pointer; |
| | | " |
| | | @click="openFileClick(4)" |
| | | > |
| | | JSON |
| | | </li> |
| | |
| | | font-weight: normal; |
| | | line-height: 0.2rem; |
| | | letter-spacing: 0.03rem; |
| | | cursor: pointer; |
| | | " |
| | | > |
| | | {{ biogData.length ? biogData[0].content : "-" }} |
| | |
| | | behavior: "smooth" // 使用平滑滚动 |
| | | }); |
| | | }, |
| | | openFileClick(index) { |
| | | let obj = { |
| | | id: this.detailId, |
| | | type: "Person" |
| | | }; |
| | | switch (index) { |
| | | case 1: |
| | | obj.outputType = "RDF"; |
| | | break; |
| | | case 2: |
| | | obj.outputType = "NT"; |
| | | break; |
| | | case 3: |
| | | obj.outputType = "XML"; |
| | | break; |
| | | case 4: |
| | | obj.outputType = "JSON"; |
| | | break; |
| | | } |
| | | let queryString = Object.keys(obj) |
| | | .map( |
| | | (key) => `${encodeURIComponent(key)}=${encodeURIComponent(obj[key])}` |
| | | ) |
| | | .join("&"); |
| | | window.open(`#/pages/fileDetail/index?${queryString}`); |
| | | }, |
| | | handleClick(tab) { |
| | | let index = tab.$attrs["data-id"] - 1; |
| | | this.$nextTick(() => { |
| | |
| | | <template> |
| | | <view id="box"> |
| | | <!-- RDF对应的参数 --> |
| | | <pre v-if="options.outputType == 'XML' || options.outputType == 'JSON'"> |
| | | <code> |
| | | {{data}} |
| | | </code> |
| | | </pre> |
| | | <div v-else v-html="data"></div> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import { getMedicalDataOutput } from "@/api/index.js"; |
| | | import { getMedicalDataOutput, getPersonDataOutput } from "@/api/index.js"; |
| | | |
| | | export default { |
| | | data() { |
| | | return { |
| | | Obj: {}, |
| | | options: {}, |
| | | data: "" |
| | | }; |
| | | }, |
| | | onLoad(options) { |
| | | this.Obj = options; |
| | | }, |
| | | mounted() { |
| | | this.options = options; |
| | | this.innt(); |
| | | }, |
| | | methods: { |
| | | innt() { |
| | | getMedicalDataOutput(this.Obj).then((res) => { |
| | | if (this.options.type == "Person") { |
| | | getPersonDataOutput({ |
| | | personId: this.options.id, |
| | | dataTypeEO: this.options.outputType |
| | | }).then((res) => { |
| | | console.log(res); |
| | | this.data = res; |
| | | }); |
| | | } else { |
| | | getMedicalDataOutput(this.options).then((res) => { |
| | | console.log(res); |
| | | this.data = res; |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | }; |
| | |
| | | searchType: this.searchType, |
| | | path: this.conditionId, |
| | | }).then((res) => { |
| | | console.log(res); |
| | | for (let i = 0; i < res.object.nodeList.length; i++) { |
| | | const node = res.object.nodeList[i]; |
| | | if ( |