From 906da13b74826f590de443b035778b4be5b67973 Mon Sep 17 00:00:00 2001 From: y505174330 <505174330@qq.com> Date: 星期六, 18 五月 2024 15:40:52 +0800 Subject: [PATCH] Merge branch 'master' of http://182.92.203.7:2001/r/TCM_CharacterLibrary --- src/pages/fileDetail/index.vue | 41 +++++++++++++++++++++++++++-------------- 1 files changed, 27 insertions(+), 14 deletions(-) diff --git a/src/pages/fileDetail/index.vue b/src/pages/fileDetail/index.vue index ad77e4c..c099b5d 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 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> -- Gitblit v1.9.1