From e4717b437f7b4ef27c9801508f252f811fc65b3e Mon Sep 17 00:00:00 2001
From: lkk <364857242@qq.com>
Date: 星期三, 09 四月 2025 13:43:22 +0800
Subject: [PATCH] 111

---
 src/views/doctor/pacsCheck/index.vue |   20 +++++++++++++++++++-
 1 files changed, 19 insertions(+), 1 deletions(-)

diff --git a/src/views/doctor/pacsCheck/index.vue b/src/views/doctor/pacsCheck/index.vue
index 255134d..19002ad 100644
--- a/src/views/doctor/pacsCheck/index.vue
+++ b/src/views/doctor/pacsCheck/index.vue
@@ -6,6 +6,7 @@
       size="small"
       :inline="true"
       label-width="68px"
+      @submit.native.prevent
     >
       <el-form-item label="浣撴鍙�" prop="reportDoctorCode">
         <el-input
@@ -15,6 +16,7 @@
           clearable
           @keyup.enter.native="handleQuery"
           style="width: 170px"
+          @input="onInput"
         />
       </el-form-item>
       <!--  <el-form-item label="濮撳悕" prop="name">
@@ -88,7 +90,7 @@
       :data="exaLists"
       v-loading="loading"
       border
-      max-height="350"
+      height="350"
       @current-change="handleCurrentChange"
       @selection-change="handleSelectionChange"
       :row-class-name="tableRowClassName"
@@ -130,6 +132,7 @@
         align="center"
         prop="examinationDate"
         width="150px"
+        :formatter="formatDate"
       />
 
       <el-table-column label="闂ㄨ瘖鍙�" align="center" prop="mzh" width="140px" />
@@ -253,6 +256,7 @@
   
   <script>
 import { getLeftList, getRightList, asyncPacs } from "@/api/doctor/pacsCheck";
+import moment from "moment";
 
 export default {
   dicts: ["dict_tj_status"],
@@ -328,6 +332,9 @@
     });
   },
   methods: {
+    onInput(val) {
+      this.inputVal = val.replace(/\s+/g, ""); // 娓呴櫎鎵�鏈夌┖鏍�
+    },
     handleDateChange(val) {
       if (val && val.length === 2) {
         this.queryParams.start = val[0]; // 璁剧疆寮�濮嬫椂闂�
@@ -344,6 +351,17 @@
     tableRowClassName({ row }) {
       return !row.mzh ? "row-disabled" : "";
     },
+    formatDate(row) {
+      if (!row.examinationDate) return "";
+
+      // 浣跨敤 moment 瑙f瀽鎸囧畾鏍煎紡鐨勬棩鏈熷瓧绗︿覆
+      const date = moment(row.examinationDate, "MM DD YYYY hh:mmA");
+
+      if (!date.isValid()) return "鏃犳晥鏃ユ湡";
+
+      // 鏍煎紡鍖栦负鎵�闇�鏍煎紡
+      return date.format("YYYY-MM-DD HH:mm");
+    },
 
     handleSelectionChange(val) {
       console.log(val);

--
Gitblit v1.8.0