From bad2bc143be3f8ddb93a1c9f984127b3ccf43e8f Mon Sep 17 00:00:00 2001 From: lkk <364857242@qq.com> Date: 星期一, 31 三月 2025 17:47:14 +0800 Subject: [PATCH] 11 --- src/views/doctor/pacsCheck/index.vue | 14 ++++++++++++++ src/views/doctor/inspectCheck/index.vue | 20 ++++++++++++++++++-- package.json | 2 +- 3 files changed, 33 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 226c7d4..d48b66a 100644 --- a/package.json +++ b/package.json @@ -53,7 +53,7 @@ "jsbarcode": "^3.11.6", "jsencrypt": "3.0.0-rc.1", "lodash": "^4.17.21", - "moment": "^2.29.4", + "moment": "^2.30.1", "nprogress": "0.2.0", "pinyin-match": "^1.2.2", "print-js": "^1.6.0", diff --git a/src/views/doctor/inspectCheck/index.vue b/src/views/doctor/inspectCheck/index.vue index 398854f..4733eb7 100644 --- a/src/views/doctor/inspectCheck/index.vue +++ b/src/views/doctor/inspectCheck/index.vue @@ -6,6 +6,7 @@ size="small" :inline="true" label-width="68px" + @submit.native.prevent > <el-form-item label="浣撴鍙�" prop="reportDoctorCode"> <el-input @@ -61,6 +62,7 @@ style="width: 100%" @selection-change="handleSelectionChange" :header-cell-style="{ background: '#aad8df' }" + height="350" > <el-table-column fixed @@ -120,6 +122,7 @@ align="center" prop="examinationDate" width="150px" + :formatter="formatDate" /> <el-table-column @@ -281,10 +284,11 @@ </div> <el-table border - max-height="280" + height="350" ref="tab1" :data="checkList" v-loading="loading" + style="width: 100%" @selection-change="handleSelectionChangeSecond" > <el-table-column type="selection" width="55"> </el-table-column> @@ -345,6 +349,7 @@ <script> import { getlisList, getJyTjList, asyncPacs } from "@/api/doctor/pacsCheck"; +import moment from "moment"; export default { dicts: ["dict_tj_status"], @@ -429,6 +434,17 @@ this.queryParams.end = null; } console.log("Query Params:", this.queryParams); + }, + 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"); }, // isSelectable(row) { // return !!row.mzh; @@ -594,7 +610,7 @@ .table-title { text-align: center; - margin-bottom: 15px; + margin-bottom: 10px; } .row-disabled { color: #ccc; /* 璁剧疆绂佺敤琛岀殑瀛椾綋棰滆壊 */ diff --git a/src/views/doctor/pacsCheck/index.vue b/src/views/doctor/pacsCheck/index.vue index 255134d..e3975ef 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 @@ -130,6 +131,7 @@ align="center" prop="examinationDate" width="150px" + :formatter="formatDate" /> <el-table-column label="闂ㄨ瘖鍙�" align="center" prop="mzh" width="140px" /> @@ -253,6 +255,7 @@ <script> import { getLeftList, getRightList, asyncPacs } from "@/api/doctor/pacsCheck"; +import moment from "moment"; export default { dicts: ["dict_tj_status"], @@ -344,6 +347,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