From e14d7c1859457b7ccaf6f7a8f9a544c537a6e9ed Mon Sep 17 00:00:00 2001
From: rain <1679827795@qq.com>
Date: Tue, 15 Apr 2025 14:49:38 +0800
Subject: [PATCH] 优化流程状态空时间不显示

---
 src/views/tickets/ticket.vue |   29 +++++++++++++++++++++--------
 1 files changed, 21 insertions(+), 8 deletions(-)

diff --git a/src/views/tickets/ticket.vue b/src/views/tickets/ticket.vue
index 2f6fa60..e9c2fe0 100644
--- a/src/views/tickets/ticket.vue
+++ b/src/views/tickets/ticket.vue
@@ -84,7 +84,7 @@
             </el-col>
             <el-col :span="12">
               <el-form-item label="处理人员" prop="handler">
-                <el-select v-model="form.handler" placeholder="请选择处理人员" :disabled="!form.department" class="full-width">
+                <el-select v-model="form.handler" placeholder="请先选择所属部门" :disabled="!form.department" class="full-width">
                   <el-option v-for="user in availableHandlers" :key="user.id" :label="user.name" :value="user.id" />
                 </el-select>
               </el-form-item>
@@ -198,7 +198,7 @@
           width: 100px;
           margin-left: 4px;  
           color: #666;
-          font-size: 10px;">耗时: {{ getStepTime(status) }}</span>
+          font-size: 12px;">耗时{{ getStepTime(status) }}</span>
                 </div>
                 <div class="step-description" >
                   {{ getStepCreateTime(status) }}
@@ -1142,9 +1142,10 @@
     },
 
     getStepTime(status) {
-      const step = this.stepInfos.find(step => step.status === status);
-      return step ? step.time : null;
-    },
+  const step = this.stepInfos.find(step => step.status === status);
+  // 如果 step 不存在或 step.time 为 0,返回 false
+  return step && step.time && step.time !== '0' ? step.time : false;
+},
     getStepCreateTime(status) {
       const step = this.stepInfos.find(step => step.status === status);
       console.log('getStepCreateTime:', step);
@@ -1674,9 +1675,11 @@
   }
 
   .location-wrapper {
-    width: 550px;
-    height: 30px;
+    width: 100%; // 修改为100%以适应父容器
+    height: auto; // 修改为auto以自适应内容
     .map-button {
+      width: 100%; // 让按钮填满容器宽度
+      height: 36px; // 与其他输入框保持一致的高度
       display: flex;
       align-items: center;
       justify-content: center;
@@ -1701,7 +1704,7 @@
     .uploader {
       :deep(.el-upload--picture-card) {
         width: 120px;
-        height: 120px;
+        height: 100px;
         line-height: 128px;
       }
 
@@ -1740,6 +1743,16 @@
   :deep(.el-textarea__inner) {
     padding: 8px 12px;
   }
+
+  :deep(.el-input__inner),
+  :deep(.el-select),
+  :deep(.el-select .el-input) {
+    width: 100%; // 确保所有输入框和选择框宽度一致
+  }
+
+  .full-width {
+    width: 100%;
+  }
 }
 
 .dialog-footer {

--
Gitblit v1.9.3