杨磊
2024-06-07 a971d0c13ab9cd5107152f6eba5e1e724a37fa0b
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>