From d5f572496c5fb12fec2fe346b847bf58331299c9 Mon Sep 17 00:00:00 2001
From: YM <479443481@qq.com>
Date: 星期三, 17 七月 2024 15:56:51 +0800
Subject: [PATCH] 1

---
 src/pages/fileDetail/index.vue |   55 ++++++++++++++++++++++++++++++++++++++++++++-----------
 1 files changed, 44 insertions(+), 11 deletions(-)

diff --git a/src/pages/fileDetail/index.vue b/src/pages/fileDetail/index.vue
index c099b5d..6275b57 100644
--- a/src/pages/fileDetail/index.vue
+++ b/src/pages/fileDetail/index.vue
@@ -1,11 +1,22 @@
 <template>
-  <view id="box">
-    <pre v-if="options.outputType == 'XML' || options.outputType == 'JSON'">
-      <code>
-        {{ data }}
-      </code>
-    </pre>
-    <div v-else v-html="data"></div>
+  <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>
 
@@ -30,12 +41,14 @@
           personId: this.options.id,
           dataTypeEO: this.options.outputType
         }).then((res) => {
-          console.log(res);
-          this.data = res;
+          if (this.options.outputType == 'RDF') {
+            this.data = res.object;
+          } else {
+            this.data = res;
+          }
         });
       } else {
         getMedicalDataOutput(this.options).then((res) => {
-          console.log(res);
           this.data = res;
         });
       }
@@ -45,7 +58,27 @@
 </script>
 
 <style>
-#box {
+.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>

--
Gitblit v1.9.1