From a971d0c13ab9cd5107152f6eba5e1e724a37fa0b Mon Sep 17 00:00:00 2001 From: 杨磊 <505174330@qq.com> Date: 星期五, 07 六月 2024 17:20:31 +0800 Subject: [PATCH] Merge branch 'master' of http://182.92.203.7:2001/r/TCM_CharacterLibrary --- src/pages/fileDetail/index.vue | 47 ++++++++++++++++++++++++++++++----------------- 1 files changed, 30 insertions(+), 17 deletions(-) diff --git a/src/pages/fileDetail/index.vue b/src/pages/fileDetail/index.vue index ad77e4c..d38d632 100644 --- a/src/pages/fileDetail/index.vue +++ b/src/pages/fileDetail/index.vue @@ -1,38 +1,51 @@ <template> <view id="box"> - <!-- RDF瀵瑰簲鐨勫弬鏁� --> - {{data}} + <pre v-if="options.outputType == 'XML' || options.outputType == 'JSON'"> + <code> + {{ data }} + </code> + </pre> + <div v-else-if="'NT'" v-html="data"></div> + <div v-else-if="'RDF'" 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: {}, - data: "" + 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) => { + this.data = res; + }); + } else { + getMedicalDataOutput(this.options).then((res) => { + this.data = res; + console.log(this.data, "data"); + }); + } + }, + }, }; </script> <style> - #box{ - font-size: 14px; - } +#box { + font-size: 14px; +} </style> -- Gitblit v1.9.1