From 4c9fdc87987140e8b2c3f0dfc2f6608cdb6be774 Mon Sep 17 00:00:00 2001
From: WXL <wl_5969728@163.com>
Date: 星期三, 21 十月 2026 17:39:24 +0800
Subject: [PATCH] 青岛维护

---
 src/views/business/appear/caseDetail.vue |  330 +++++++++++++++++++++++++++++++++++++-----------------
 1 files changed, 224 insertions(+), 106 deletions(-)

diff --git a/src/views/business/appear/caseDetail.vue b/src/views/business/appear/caseDetail.vue
index 3b27c8b..a792150 100644
--- a/src/views/business/appear/caseDetail.vue
+++ b/src/views/business/appear/caseDetail.vue
@@ -29,11 +29,15 @@
         </el-descriptions-item>
         <el-descriptions-item label="Rh闃存��">
           {{
-            caseData.rhYin === "1" ? "鏄�" : caseData.rhYin === "0" ? "鍚�" : "-"
+            caseData.rhYin == "1" ? "鏄�" : caseData.rhYin == "0" ? "鍚�" : "-"
           }}
         </el-descriptions-item>
+
         <el-descriptions-item label="璇佷欢绫诲瀷">
-          {{ getIdCardTypeText(caseData.idcardtype) }}
+          <dict-tag
+            :options="dict.type.sys_IDType"
+            :value="caseData.idcardtype"
+          />
         </el-descriptions-item>
         <el-descriptions-item label="璇佷欢鍙风爜">{{
           caseData.idcardno || "-"
@@ -47,12 +51,16 @@
         <el-descriptions-item label="绫嶈疮">{{
           caseData.nativeplace || "-"
         }}</el-descriptions-item>
-        <el-descriptions-item label="瀛﹀巻">{{
-          caseData.education || "-"
-        }}</el-descriptions-item>
-        <el-descriptions-item label="鑱屼笟">{{
-          caseData.occupation || "-"
-        }}</el-descriptions-item>
+        <el-descriptions-item label="瀛﹀巻">
+          <dict-tag
+            :options="dict.type.sys_education"
+            :value="String(caseData.education)"
+        /></el-descriptions-item>
+        <el-descriptions-item label="鑱屼笟">
+          <dict-tag
+            :options="dict.type.sys_occupation"
+            :value="caseData.occupation"
+        /></el-descriptions-item>
         <el-descriptions-item label="鍑虹敓鏃ユ湡">{{
           formatDate(caseData.birthday)
         }}</el-descriptions-item>
@@ -63,7 +71,7 @@
     </el-card>
 
     <!-- 鍦板潃淇℃伅妯″潡 -->
-    <!-- <el-card class="detail-section">
+    <el-card class="detail-section">
       <div slot="header" class="section-header">
         <span class="section-title">鍦板潃淇℃伅</span>
       </div>
@@ -75,7 +83,7 @@
           {{ getFullResidenceAddress() }}
         </el-descriptions-item>
       </el-descriptions>
-    </el-card> -->
+    </el-card>
 
     <!-- 鍖荤枟淇℃伅妯″潡 -->
     <el-card class="detail-section">
@@ -106,7 +114,13 @@
           >{{ caseData.infectiousOther }}</el-descriptions-item
         >
         <el-descriptions-item label="鏄惁闇�瑕佽浆杩�">
-          {{ caseData.isTransport === "2" ? "闇�瑕�" : "涓嶉渶瑕�" }}
+          {{
+            caseData.isTransport == "1"
+              ? "涓嶉渶瑕�"
+              : caseData.isTransport == "2"
+              ? "闇�瑕�"
+              : "寰呭畾"
+          }}
         </el-descriptions-item>
       </el-descriptions>
     </el-card>
@@ -117,7 +131,13 @@
         <span class="section-title">鍖婚櫌淇℃伅</span>
       </div>
       <el-descriptions :column="2" border>
-        <el-descriptions-item label="娌荤枟鍖婚櫌鍚嶇О">{{
+        <el-descriptions-item label="ICU璇勪及鍖荤敓">{{
+          caseData.icuDoctor || "-"
+        }}</el-descriptions-item>
+        <el-descriptions-item label="ICU鍖荤敓鐢佃瘽">{{
+          caseData.icuDoctorPhone || "-"
+        }}</el-descriptions-item
+        ><el-descriptions-item label="娌荤枟鍖婚櫌鍚嶇О">{{
           caseData.treatmenthospitalname || "-"
         }}</el-descriptions-item>
         <!-- <el-descriptions-item label="娌荤枟绉戝鍚嶇О">{{
@@ -166,7 +186,7 @@
           formatDateTime(caseData.createTime)
         }}</el-descriptions-item>
         <el-descriptions-item label="鏄惁缁堟妗堜緥">
-          {{ caseData.terminationCase === "1" ? "宸茬粓姝�" : "杩涜涓�" }}
+          {{ caseData.terminationCase == "1" ? "宸茬粓姝�" : "杩涜涓�" }}
         </el-descriptions-item>
       </el-descriptions>
     </el-card>
@@ -180,91 +200,98 @@
         <span class="section-title">闄勪欢淇℃伅</span>
       </div>
       <div class="detail-attachments">
-        <div class="attachment-grid">
-          <div
-            v-for="file in caseData.annexfilesList"
-            :key="file.id || file.fileName"
-            class="attachment-card"
-          >
-            <template v-if="isImageFile(file.fileName || file.path)">
-              <!-- 鍥剧墖浣跨敤 el-image 棰勮 -->
-              <el-image
-                class="image-attachment"
-                :src="getFileUrl(file)"
-                :preview-src-list="getImagePreviewList(file)"
-                fit="cover"
-                :style="{ width: '120px', height: '120px' }"
-                lazy
-              >
-                <div slot="error" class="image-error">
-                  <i class="el-icon-picture-outline"></i>
-                  <span>鍔犺浇澶辫触</span>
-                </div>
-                <div slot="placeholder" class="image-loading">
-                  <i class="el-icon-loading"></i>
-                </div>
-              </el-image>
-              <div class="image-info">
-                <div class="file-name" :title="file.fileName">
-                  {{ file.fileName }}
-                </div>
-                <div class="file-actions">
-                  <el-button
-                    type="text"
-                    size="mini"
-                    @click="handleDownload(file)"
-                    icon="el-icon-download"
-                    title="涓嬭浇"
-                  />
-                  <el-button
-                    type="text"
-                    size="mini"
-                    @click="handlePreview(file)"
-                    icon="el-icon-view"
-                    title="棰勮"
-                  />
-                </div>
-              </div>
-            </template>
-
-            <template v-else>
-              <!-- 闈炲浘鐗囨枃浠朵娇鐢ㄥ崱鐗囨牱寮� -->
-              <el-card shadow="hover" class="file-card">
-                <div class="file-content">
-                  <i :class="getFileIcon(file.fileName)" class="file-icon"></i>
-                  <div class="file-info">
-                    <div class="file-name" :title="file.fileName">
-                      {{ file.fileName }}
-                    </div>
-                    <div class="file-meta">
-                      <span class="file-type">{{
-                        getFileTypeText(file.fileName)
-                      }}</span>
-                      <span v-if="file.createTime" class="file-time">
-                        {{ formatDateTime(file.createTime) }}
-                      </span>
-                    </div>
+        <div
+          v-for="group in attachmentGroups"
+          :key="group.label"
+          class="attachment-group"
+        >
+          <div class="attachment-group-title">{{ group.label }}</div>
+          <div class="attachment-grid">
+            <div
+              v-for="file in group.files"
+              :key="file.id || file.fileName"
+              class="attachment-card"
+            >
+              <template v-if="isImageFile(file.fileName || file.path)">
+                <!-- 鍥剧墖浣跨敤 el-image 棰勮 -->
+                <el-image
+                  class="image-attachment"
+                  :src="getFileUrl(file)"
+                  :preview-src-list="getImagePreviewList(file)"
+                  fit="cover"
+                  :style="{ width: '120px', height: '120px' }"
+                  lazy
+                >
+                  <div slot="error" class="image-error">
+                    <i class="el-icon-picture-outline"></i>
+                    <span>鍔犺浇澶辫触</span>
+                  </div>
+                  <div slot="placeholder" class="image-loading">
+                    <i class="el-icon-loading"></i>
+                  </div>
+                </el-image>
+                <div class="image-info">
+                  <div class="file-name" :title="file.fileName">
+                    {{ file.fileName }}
+                  </div>
+                  <div class="file-actions">
+                    <el-button
+                      type="text"
+                      size="mini"
+                      @click="handleDownload(file)"
+                      icon="el-icon-download"
+                      title="涓嬭浇"
+                    />
+                    <el-button
+                      type="text"
+                      size="mini"
+                      @click="handlePreview(file)"
+                      icon="el-icon-view"
+                      title="棰勮"
+                    />
                   </div>
                 </div>
-                <div class="file-actions">
-                  <el-button
-                    type="text"
-                    size="mini"
-                    @click="handleDownload(file)"
-                  >
-                    涓嬭浇
-                  </el-button>
-                  <el-button
-                    v-if="canPreview(file.fileName)"
-                    type="text"
-                    size="mini"
-                    @click="handlePreview(file)"
-                  >
-                    棰勮
-                  </el-button>
-                </div>
-              </el-card>
-            </template>
+              </template>
+
+              <template v-else>
+                <!-- 闈炲浘鐗囨枃浠朵娇鐢ㄥ崱鐗囨牱寮� -->
+                <el-card shadow="hover" class="file-card">
+                  <div class="file-content">
+                    <i :class="getFileIcon(file.fileName)" class="file-icon"></i>
+                    <div class="file-info">
+                      <div class="file-name" :title="file.fileName">
+                        {{ file.fileName }}
+                      </div>
+                      <div class="file-meta">
+                        <span class="file-type">{{
+                          getFileTypeText(file.fileName)
+                        }}</span>
+                        <span v-if="file.createTime" class="file-time">
+                          {{ formatDateTime(file.createTime) }}
+                        </span>
+                      </div>
+                    </div>
+                  </div>
+                  <div class="file-actions">
+                    <el-button
+                      type="text"
+                      size="mini"
+                      @click="handleDownload(file)"
+                    >
+                      涓嬭浇
+                    </el-button>
+                    <el-button
+                      v-if="canPreview(file.fileName)"
+                      type="text"
+                      size="mini"
+                      @click="handlePreview(file)"
+                    >
+                      棰勮
+                    </el-button>
+                  </div>
+                </el-card>
+              </template>
+            </div>
           </div>
         </div>
       </div>
@@ -283,15 +310,15 @@
     <!-- 瀹℃壒淇℃伅妯″潡锛堢姸鎬佷负宸插悓鎰忔垨宸查┏鍥炴椂鏄剧ず锛� -->
     <el-card
       class="detail-section"
-      v-if="caseData.reportStatus === '3' || caseData.reportStatus === '4'"
+      v-if="caseData.reportStatus == '3' || caseData.reportStatus == '4'"
     >
       <div slot="header" class="section-header">
         <span class="section-title">瀹℃壒淇℃伅</span>
       </div>
       <el-descriptions :column="1" border>
         <el-descriptions-item label="瀹℃壒缁撴灉">
-          <el-tag :type="caseData.reportStatus === '3' ? 'success' : 'danger'">
-            {{ caseData.reportStatus === "3" ? "宸插悓鎰�" : "宸查┏鍥�" }}
+          <el-tag :type="caseData.reportStatus == '3' ? 'success' : 'danger'">
+            {{ caseData.reportStatus == "3" ? "宸插悓鎰�" : "宸查┏鍥�" }}
           </el-tag>
         </el-descriptions-item>
         <el-descriptions-item
@@ -325,7 +352,7 @@
       <div slot="header" class="section-header">
         <span class="section-title">杞繍淇℃伅</span>
         <el-button
-          v-if="caseData.reportStatus === '3'"
+          v-if="caseData.reportStatus == '3'"
           type="primary"
           size="small"
           icon="el-icon-truck"
@@ -376,7 +403,7 @@
     <!-- 鏃犺浆杩愪俊鎭絾闇�瑕佽浆杩愮殑鎻愮ず -->
     <el-card
       class="detail-section"
-      v-else-if="caseData.isTransport === '2' && caseData.reportStatus === '3'"
+      v-else-if="caseData.isTransport == '2' && caseData.reportStatus == '3'"
     >
       <div slot="header" class="section-header">
         <span class="section-title">杞繍淇℃伅</span>
@@ -422,6 +449,15 @@
     pdf,
     FilePreviewDialog
   },
+  dicts: [
+    "sys_user_sex",
+    "sys_BloodType",
+    "sys_Infectious",
+    "sys_IDType",
+    "sys_education",
+    "sys_occupation",
+    "reject_type"
+  ],
   props: {
     caseData: {
       type: Object,
@@ -432,13 +468,13 @@
       default: true
     }
   },
-  dicts: ["sys_user_sex", "sys_BloodType", "sys_Infectious", "reject_type"],
   data() {
     return {
       // 棰勮鐩稿叧
       previewVisible: false,
       currentPreviewFile: null,
-
+      // 鍔ㄦ�佽绠楃殑 baseUrlHt
+      baseUrlHt: "",
       // 鍥剧墖棰勮鐩稿叧
       imagePreviewUrls: [],
       rejectOptions: [
@@ -463,13 +499,59 @@
         .filter(file => this.isImageFile(file.fileName || file.path))
         .map(file => this.getFileUrl(file))
         .filter(url => url);
+    },
+    // 鎸夊垎绫诲垎缁勯檮浠讹紙鎹愮尞鑰呯櫥璁伴樁娈碉細鐧昏琛ㄩ檮浠�/璇佷欢鐓�/鐤剧梾璇婃柇娌荤枟锛�
+    attachmentGroups() {
+      const list = this.caseData.annexfilesList;
+      if (!Array.isArray(list) || list.length === 0) return [];
+      const categories = [
+        { value: "鐧昏琛ㄩ檮浠�", label: "浜轰綋鍣ㄥ畼娼滃湪鎹愮尞鑰呯櫥璁拌〃闄勪欢" },
+        { value: "璇佷欢鐓�", label: "璇佷欢鐓�" },
+        { value: "鐤剧梾璇婃柇娌荤枟", label: "鐤剧梾璇婃柇娌荤枟" }
+      ];
+      const groups = categories
+        .map(cat => ({
+          label: cat.label,
+          files: list.filter(f => (f.fileType || "").trim() === cat.value)
+        }))
+        .filter(group => group.files.length > 0);
+      // 鏈垎绫婚檮浠跺厹搴曪紝閬垮厤涓㈠け鏃ф暟鎹�
+      const classifiedValues = categories.map(c => c.value);
+      const unclassified = list.filter(f => {
+        const t = (f.fileType || "").trim();
+        return !t || !classifiedValues.includes(t);
+      });
+      if (unclassified.length > 0) {
+        groups.push({ label: "鏈垎绫�", files: unclassified });
+      }
+      return groups;
     }
+  },
+  created() {
+    this.calculateBaseUrl();
   },
   methods: {
     handleClose() {
       this.$emit("close");
     },
+    /** 璁$畻 baseUrlHt */
+    calculateBaseUrl() {
+      const currentUrl = window.location.href;
 
+      try {
+        const urlObj = new URL(currentUrl);
+        const hostname = urlObj.hostname;
+        this.baseUrlHt = `http://${hostname}:9095`;
+      } catch (error) {
+        console.error("瑙f瀽URL澶辫触:", error);
+        const match = currentUrl.match(/https?:\/\/([^:\/]+)/);
+        if (match) {
+          this.baseUrlHt = `http://${match[1]}:9095`;
+        } else {
+          this.baseUrlHt = "http://localhost:9095";
+        }
+      }
+    },
     // 鏍煎紡鍖栨棩鏈熸椂闂�
     formatDateTime(dateTime) {
       if (!dateTime) return "-";
@@ -651,7 +733,30 @@
     },
 
     getFileUrl(file) {
-      return file.path || file.fileUrl || "";
+      if (!file) return "";
+      const url = file.path || file.fileUrl || file.url || "";
+      return this.processFileUrl(url);
+    },
+    // URL澶勭悊鍑芥暟 - 灏嗗畬鏁碪RL鏇挎崲涓篵aseUrlHt
+    processFileUrl(url) {
+      if (!url) return "";
+
+      // 濡傛灉宸茬粡鏄畬鏁寸殑http鎴杊ttps閾炬帴
+      if (url.startsWith("http://") || url.startsWith("https://")) {
+        // 鎵惧埌绗笁涓枩鏉犲悗鐨勪綅缃紝鎻愬彇璺緞閮ㄥ垎
+        const thirdSlashIndex = url.indexOf("/", 8);
+        if (thirdSlashIndex !== -1) {
+          return `${this.baseUrlHt}${url.substring(thirdSlashIndex)}`;
+        }
+        return this.baseUrlHt;
+      }
+
+      // 鐩稿璺緞澶勭悊
+      if (url.startsWith("/")) {
+        return `${this.baseUrlHt}${url}`;
+      }
+
+      return `${this.baseUrlHt}/${url}`;
     },
 
     getImagePreviewList(file) {
@@ -713,7 +818,7 @@
     handlePreview(file) {
       this.currentPreviewFile = {
         fileName: file.fileName,
-        fileUrl: this.getFileUrl(file),
+        fileUrl: this.getFileUrl(file), // 宸茬粡澶勭悊杩嘦RL
         fileType: this.getFileType(file.fileName)
       };
       this.previewVisible = true;
@@ -737,7 +842,7 @@
 
     // 鏂囦欢涓嬭浇
     handleDownload(file) {
-      const fileUrl = this.getFileUrl(file);
+      const fileUrl = this.getFileUrl(file); // 浣跨敤澶勭悊杩囩殑URL
       const fileName = file.fileName;
 
       if (fileUrl) {
@@ -783,6 +888,19 @@
   padding: 10px 0;
 }
 
+.attachment-group {
+  margin-bottom: 20px;
+}
+
+.attachment-group-title {
+  font-size: 14px;
+  font-weight: bold;
+  color: #409eff;
+  margin-bottom: 12px;
+  padding-left: 10px;
+  border-left: 3px solid #409eff;
+}
+
 .attachment-grid {
   display: grid;
   grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));

--
Gitblit v1.9.3