| | |
| | | <template> |
| | | <view id="box"> |
| | | <!-- RDF对应的参数 --> |
| | | {{data}} |
| | | <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) => { |
| | | console.log(res); |
| | | this.data = 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; |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style> |
| | | #box{ |
| | | font-size: 14px; |
| | | } |
| | | #box { |
| | | font-size: 14px; |
| | | } |
| | | </style> |