1
QYF-GitLab1
2024-07-26 4f21c80fe12140f9e9e3272617ad37a3bb7f007b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
<template>
  <view class="pageBox">
    <headNav :idIndex="1 + ''" text="历代人物" />
    <div class="contentBox">
      <pre v-if="options.outputType == 'XML' || options.outputType == 'JSON'">
        <code>
          {{ data }}
        </code>
      </pre>
      <div v-else-if="options.outputType == 'NT'" v-html="data"></div>
      <div v-else-if="options.outputType == 'RDF'">
        <ul>
          <li v-for="key in Object.keys(data)" class="itemBox">
            <span style="color: #666;">{{key.split(':')[0]}}:<b style="color: #000">{{key.split(':')[1]}}</b></span>
            <span>{{data[key]}}</span>
          </li>
        </ul>
      </div>
    </div>
  </view>
</template>
 
<script>
import { getMedicalDataOutput, getPersonDataOutput } from "@/api/index.js";
 
export default {
  data() {
    return {
      options: {},
      data: ""
    };
  },
  onLoad(options) {
    this.options = options;
    this.innt();
  },
  methods: {
    innt() {
      if (this.options.type == "Person") {
        getPersonDataOutput({
          personId: this.options.id,
          dataTypeEO: this.options.outputType
        }).then((res) => {
          if (this.options.outputType == 'RDF') {
            this.data = res.object;
          } else {
            this.data = res;
          }
        });
      } else {
        getMedicalDataOutput(this.options).then((res) => {
          this.data = res;
        });
      }
    }
  }
};
</script>
 
<style>
.pageBox {
  font-size: 14px;
}
.contentBox {
  padding: 30px;
}
.itemBox{
  margin-bottom: 10px;
  display: flex;
}
.itemBox span{
  display: inline-block;
}
.itemBox span:first-child{
  width: 200px;
  line-height: 40px;
}
.itemBox span:last-child{
  flex: 1;
  line-height: 40px;
  border-bottom: 1px solid #ccc;
}
 
</style>