From 055c1f8a3ff936b777e625dcb782edf2ccfb0f59 Mon Sep 17 00:00:00 2001
From: WXL (wul) <wl_5969728@163.com>
Date: 星期五, 03 四月 2026 09:55:25 +0800
Subject: [PATCH] 测试完成

---
 src/views/patient/patient/hospital.vue |  416 +++++++++++++++++++++++++++++++++++++++++++++++++++++++----
 1 files changed, 387 insertions(+), 29 deletions(-)

diff --git a/src/views/patient/patient/hospital.vue b/src/views/patient/patient/hospital.vue
index fed951f..bde9c2b 100644
--- a/src/views/patient/patient/hospital.vue
+++ b/src/views/patient/patient/hospital.vue
@@ -336,41 +336,77 @@
       </el-col>
     </el-row>
     <!-- 鎵归噺娣诲姞浠诲姟寮圭獥 -->
+    <!-- 鎵归噺娣诲姞寤剁画鎶ょ悊浠诲姟寮圭獥 -->
     <el-dialog
       title="鎵归噺娣诲姞寤剁画鎶ょ悊"
       :visible.sync="batchTaskVisible"
       width="90%"
       append-to-body
+      class="batch-dialog"
+      :close-on-click-modal="false"
     >
       <el-row :gutter="20">
         <!-- 宸︿晶锛氶�変腑鎮h�呭垪琛� -->
         <el-col :span="12">
           <div class="batch-patient-section">
-            <h4>閫変腑鎮h�咃紙{{ selectedPatients.length }}浜猴級</h4>
+            <div class="section-header">
+              <h4>閫変腑鎮h��</h4>
+              <span class="patient-count">{{ selectedPatients.length }}浜�</span>
+            </div>
             <el-table
               :data="selectedPatients"
               border
               style="width: 100%"
               size="small"
+              :row-class-name="tableRowClassName"
+              :header-cell-style="{ background: '#F5F7FA', color: '#606266' }"
             >
-              <el-table-column prop="patname" label="濮撳悕" width="100" />
-              <el-table-column prop="sex" label="鎬у埆" width="80">
+              <el-table-column
+                prop="patname"
+                label="濮撳悕"
+                width="100"
+                align="center"
+              />
+              <el-table-column
+                prop="sex"
+                label="鎬у埆"
+                width="80"
+                align="center"
+              >
                 <template slot-scope="scope">
-                  {{ scope.row.sex === 1 ? "鐢�" : "濂�" }}
+                  <el-tag
+                    size="small"
+                    :type="scope.row.sex === 1 ? 'primary' : 'danger'"
+                  >
+                    {{ scope.row.sex === 1 ? "鐢�" : "濂�" }}
+                  </el-tag>
                 </template>
               </el-table-column>
               <el-table-column
-                label="鍑洪櫌鏃堕棿"
+                label="鍏ラ櫌鏃堕棿"
                 align="center"
-                key="endtime"
-                prop="endtime"
+                key="starttime"
+                prop="starttime"
+                width="120"
               >
                 <template slot-scope="scope">
-                  <span>{{ formatTime(scope.row.endtime) }}</span>
+                  <span class="time-text">{{
+                    formatTime(scope.row.starttime)
+                  }}</span>
                 </template>
               </el-table-column>
-              <el-table-column prop="inhospno" label="浣忛櫌鍙�" />
-              <el-table-column prop="deptname" label="绉戝" />
+              <el-table-column
+                prop="inhospno"
+                label="浣忛櫌鍙�"
+                width="120"
+                align="center"
+              />
+              <el-table-column prop="deptname" label="绉戝" align="center" />
+              <el-table-column
+                prop="leavehospitaldistrictname"
+                label="鐥呭尯"
+                align="center"
+              />
             </el-table>
           </div>
         </el-col>
@@ -378,14 +414,28 @@
         <!-- 鍙充晶锛氫换鍔″垪琛� -->
         <el-col :span="12">
           <div class="batch-task-section">
-            <h4>浠诲姟鍒楄〃锛堣閫夋嫨1涓换鍔★級</h4>
+            <div class="section-header">
+              <h4>寤剁画鎶ょ悊浠诲姟</h4>
+              <div v-if="selectedTask" class="task-selected-hint selected">
+                <i class="el-icon-success"></i>
+                <span>宸查�夋嫨锛歿{ selectedTask.taskName }}</span>
+              </div>
+              <div v-else class="task-selected-hint">
+                <i class="el-icon-info"></i>
+                <span>璇风偣鍑婚�夋嫨涓�涓换鍔�</span>
+              </div>
+            </div>
             <el-table
               :data="taskList"
               border
+               height="680"
               style="width: 100%"
               size="small"
               @current-change="handleTaskSelectionChange"
               highlight-current-row
+              :row-class-name="taskRowClassName"
+              :header-cell-style="{ background: '#F5F7FA', color: '#606266' }"
+              :current-row-key="selectedTask ? selectedTask.taskid : ''"
             >
               <el-table-column
                 label="浠诲姟鍚嶇О"
@@ -394,6 +444,7 @@
                 key="taskName"
                 prop="taskName"
                 :show-overflow-tooltip="true"
+                width="180"
               />
 
               <el-table-column
@@ -418,13 +469,16 @@
                 prop="createTime"
               >
                 <template slot-scope="scope">
-                  <span>{{ formatTime(scope.row.createTime) }}</span>
+                  <span class="time-text">{{
+                    formatTime(scope.row.createTime)
+                  }}</span>
                 </template>
               </el-table-column>
               <template #empty>
                 <div class="empty-message">
-                  <i class="el-icon-warning"></i>
-                  <span>鎮h�呯瀹ゆ棤鍖归厤鏈嶅姟</span>
+                  <i class="el-icon-document"></i>
+                  <span>鏆傛棤鍙敤寤剁画鎶ょ悊浠诲姟</span>
+                  <span class="empty-tips">璇疯仈绯荤鐞嗗憳鍒涘缓浠诲姟</span>
                 </div>
               </template>
             </el-table>
@@ -434,13 +488,17 @@
 
       <!-- 搴曢儴鎸夐挳 -->
       <div slot="footer" class="dialog-footer">
-        <el-button @click="batchTaskVisible = false">鍙� 娑�</el-button>
+        <el-button @click="batchTaskVisible = false" :disabled="batchLoading"
+          >鍙� 娑�</el-button
+        >
         <el-button
           type="primary"
           :loading="batchLoading"
           @click="submitBatchTask"
-          >鍒涘缓浠诲姟</el-button
+          :disabled="!selectedTask || batchLoading"
         >
+          {{ batchLoading ? "鍒涘缓涓�..." : "鍒涘缓寤剁画鎶ょ悊浠诲姟" }}
+        </el-button>
       </div>
     </el-dialog>
     <!-- 鐢ㄦ埛瀵煎叆瀵硅瘽妗� -->
@@ -824,7 +882,23 @@
       // 鑾峰彇浠诲姟鍒楄〃
       this.loadTaskList(deptcode);
     },
+    /** 琛ㄦ牸琛屾牱寮� */
+    tableRowClassName({ row, rowIndex }) {
+      if (rowIndex % 2 === 0) {
+        return "even-row";
+      } else {
+        return "odd-row";
+      }
+    },
 
+    /** 浠诲姟琛ㄦ牸琛屾牱寮� */
+    taskRowClassName({ row, rowIndex }) {
+      if (rowIndex % 2 === 0) {
+        return "task-even-row";
+      } else {
+        return "task-odd-row";
+      }
+    },
     /** 鍔犺浇浠诲姟鍒楄〃 */
     loadTaskList(deptcode) {
       this.batchLoading = true;
@@ -874,13 +948,15 @@
             taskid: this.selectedTask.taskid,
             type: this.selectedTask.type,
             taskName: this.selectedTask.taskName,
-            serviceType: this.selectedTask.serviceType,
+            serviceType: 99,
             preachform: this.selectedTask.preachform,
             templateid: this.selectedTask.templateid,
             libtemplateid: this.selectedTask.libtemplateid,
             sendstate: 2,
+            continueFlag: 2,
             ...patient,
             sendname: patient.patname,
+            starttime: patient.starttime ? patient.starttime + " 00:00:00" : "",
             endtime: patient.endtime ? patient.endtime + " 00:00:00" : "",
             leavediagname: patient.leavediagname || patient.diagname || "",
             age: patient.age || "",
@@ -1214,34 +1290,258 @@
 .button-textsc {
   color: #3664d9;
 }
-// 鎵归噺浠诲姟寮圭獥鏍峰紡
-.batch-patient-section,
-.batch-task-section {
-  h4 {
-    margin: 0 0 10px 0;
-    color: #606266;
-    font-size: 16px;
+// 鎵归噺浠诲姟寮圭獥浼樺寲鏍峰紡
+.batch-dialog {
+  .el-dialog__body {
+    padding: 20px 20px 10px;
+  }
+
+  .el-dialog__header {
+    background: linear-gradient(135deg, #5788fe, #7aa1ff);
+    padding: 15px 20px;
+
+    .el-dialog__title {
+      color: white;
+      font-weight: 600;
+      font-size: 16px;
+    }
+
+    .el-dialog__headerbtn {
+      .el-dialog__close {
+        color: white;
+        font-size: 18px;
+
+        &:hover {
+          color: #f0f0f0;
+        }
+      }
+    }
   }
 }
 
+// 寮圭獥鍐呭鍖哄煙
+.batch-patient-section,
+.batch-task-section {
+  h4 {
+    margin: 0 0 12px 0;
+    color: #333;
+    font-size: 16px;
+    font-weight: 600;
+    padding-left: 8px;
+    border-left: 4px solid #5788fe;
+    display: flex;
+    align-items: center;
+
+    &::before {
+      content: "";
+      display: inline-block;
+      width: 6px;
+      height: 6px;
+      background-color: #5788fe;
+      border-radius: 50%;
+      margin-right: 8px;
+    }
+  }
+
+  .section-header {
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    margin-bottom: 12px;
+
+    .patient-count {
+      color: #5788fe;
+      font-weight: 500;
+      background: #f0f5ff;
+      padding: 4px 12px;
+      border-radius: 12px;
+      font-size: 13px;
+    }
+  }
+}
+
+// 鎮h�呰〃鏍间紭鍖�
+.batch-patient-section {
+  .el-table {
+    border: 1px solid #e8eaec;
+    border-radius: 6px;
+    overflow: hidden;
+
+    .el-table__header-wrapper {
+      th {
+        background-color: #f5f7fa;
+        color: #606266;
+        font-weight: 600;
+        height: 40px;
+      }
+    }
+
+    .el-table__body-wrapper {
+      tr:hover > td {
+        background-color: #f5f9ff;
+      }
+    }
+  }
+}
+
+// 浠诲姟琛ㄦ牸浼樺寲
+.batch-task-section {
+  .el-table {
+    border: 1px solid #e8eaec;
+    border-radius: 6px;
+    overflow: hidden;
+
+    .el-table__header-wrapper {
+      th {
+        background-color: #f5f7fa;
+        color: #606266;
+        font-weight: 600;
+        height: 40px;
+      }
+    }
+
+    .el-table__body-wrapper {
+      tr {
+        cursor: pointer;
+        transition: all 0.3s;
+
+        &:hover > td {
+          background-color: #f5f9ff;
+        }
+
+        // 閫変腑琛屾牱寮�
+        &.current-row {
+          td {
+            background-color: #e8f1ff !important;
+            border-left: 3px solid #5788fe;
+
+            &:first-child {
+              border-left: none;
+            }
+          }
+        }
+      }
+
+      .selected-row {
+        position: relative;
+
+        &::after {
+          content: "鉁�";
+          position: absolute;
+          right: 10px;
+          top: 50%;
+          transform: translateY(-50%);
+          color: #5788fe;
+          font-weight: bold;
+          font-size: 16px;
+        }
+      }
+    }
+
+    .el-table__empty-block {
+      min-height: 200px;
+      display: flex;
+      align-items: center;
+      justify-content: center;
+    }
+  }
+}
+
+// 绌虹姸鎬佷紭鍖�
 .empty-message {
   display: flex;
   flex-direction: column;
   align-items: center;
-  padding: 20px;
+  padding: 40px 20px;
   color: #909399;
 
   i {
-    font-size: 24px;
-    margin-bottom: 8px;
+    font-size: 48px;
+    margin-bottom: 12px;
+    color: #c0c4cc;
+  }
+
+  span {
+    font-size: 14px;
+    color: #c0c4cc;
+  }
+
+  .empty-tips {
+    margin-top: 8px;
+    font-size: 12px;
+    color: #dcdfe6;
   }
 }
 
+// 搴曢儴鎸夐挳鍖哄煙
 .dialog-footer {
   display: flex;
   justify-content: flex-end;
-  padding-top: 20px;
-  border-top: 1px solid #ebeef5;
+  padding: 20px 0 0;
+  border-top: 1px solid #f0f0f0;
+  margin-top: 20px;
+
+  .el-button {
+    min-width: 80px;
+    height: 36px;
+    border-radius: 4px;
+    font-size: 14px;
+
+    &.el-button--default {
+      color: #666;
+      border-color: #dcdfe6;
+
+      &:hover {
+        color: #5788fe;
+        border-color: #5788fe;
+        background-color: #f0f5ff;
+      }
+    }
+
+    &.el-button--primary {
+      background: linear-gradient(135deg, #5788fe, #7aa1ff);
+      border-color: #5788fe;
+
+      &:hover {
+        background: linear-gradient(135deg, #4a7cfe, #6b94ff);
+        border-color: #4a7cfe;
+      }
+
+      &:active {
+        background: linear-gradient(135deg, #3d70fe, #5e87ff);
+        border-color: #3d70fe;
+      }
+
+      &.is-loading {
+        position: relative;
+        pointer-events: none;
+
+        &::after {
+          content: "";
+          position: absolute;
+          right: 10px;
+          top: 50%;
+          transform: translateY(-50%);
+          width: 16px;
+          height: 16px;
+          border: 2px solid transparent;
+          border-top-color: white;
+          border-radius: 50%;
+          animation: loading-rotate 1s linear infinite;
+        }
+      }
+    }
+  }
+}
+
+// 鍔犺浇鍔ㄧ敾
+@keyframes loading-rotate {
+  0% {
+    transform: translateY(-50%) rotate(0deg);
+  }
+  100% {
+    transform: translateY(-50%) rotate(360deg);
+  }
 }
 
 // 鍝嶅簲寮忚皟鏁�
@@ -1250,5 +1550,63 @@
   .batch-task-section {
     margin-bottom: 20px;
   }
+
+  .el-row {
+    flex-wrap: wrap;
+  }
+
+  .el-col-12 {
+    width: 100%;
+  }
+}
+
+// 浠诲姟鍒楄〃閫変腑鎻愮ず
+.task-selected-hint {
+  margin-top: 8px;
+  font-size: 12px;
+  color: #5788fe;
+  display: flex;
+  align-items: center;
+
+  i {
+    margin-right: 4px;
+    font-size: 14px;
+  }
+
+  &.selected {
+    color: #67c23a;
+  }
+}
+
+// 寮圭獥婊氬姩浼樺寲
+.el-dialog__wrapper {
+  .el-dialog {
+    border-radius: 8px;
+    overflow: hidden;
+    box-shadow: 0 4px 20px rgba(87, 136, 254, 0.1);
+
+    .el-dialog__body {
+      max-height: 70vh;
+      overflow-y: auto;
+
+      &::-webkit-scrollbar {
+        width: 6px;
+      }
+
+      &::-webkit-scrollbar-track {
+        background: #f5f5f5;
+        border-radius: 3px;
+      }
+
+      &::-webkit-scrollbar-thumb {
+        background: #c0c4cc;
+        border-radius: 3px;
+
+        &:hover {
+          background: #a0a4ab;
+        }
+      }
+    }
+  }
 }
 </style>

--
Gitblit v1.9.3