فهرست منبع

pms 瑞都日报 功能优化 项目任务基本信息完善 任务进度

zhangcl 2 روز پیش
والد
کامیت
b2339ce705
2فایلهای تغییر یافته به همراه131 افزوده شده و 6 حذف شده
  1. 5 0
      src/views/pms/iotprojectinfo/index.vue
  2. 126 6
      src/views/pms/iotrddailyreport/FillDailyReportForm.vue

+ 5 - 0
src/views/pms/iotprojectinfo/index.vue

@@ -218,6 +218,11 @@
           </template>
         </el-table-column>
         <el-table-column label="设计工作量" align="center" prop="workloadDesign" />
+        <el-table-column label="工作量单位" align="center" prop="workloadUnit" :width="columnWidths.payment">
+          <template #default="scope">
+            <dict-tag :type="DICT_TYPE.PMS_PROJECT_WORKLOAD_UNIT" :value="scope.row.workloadUnit" />
+          </template>
+        </el-table-column>
         <el-table-column label="施工队伍" align="center">
           <template #default="{ row }">
             <el-tooltip

+ 126 - 6
src/views/pms/iotrddailyreport/FillDailyReportForm.vue

@@ -64,20 +64,20 @@
         <div class="table-row">
           <div class="table-cell">
             <div class="cell-content">
-              <span class="cell-label">搬迁日期:</span>
-              <span class="cell-value">{{ formatDate(dailyReportData.dpDate) || '-' }}</span>
+              <span class="cell-label">设计工作量:</span>
+              <span class="cell-value">{{ dailyReportData.workloadDesign || '-' }}</span>
             </div>
           </div>
           <div class="table-cell">
             <div class="cell-content">
               <span class="cell-label">开工日期:</span>
-              <span class="cell-value">{{ formatDate(dailyReportData.sgDate) || '-' }}</span>
+              <span class="cell-value">{{ dailyReportData.commencementDate || '-' }}</span>
             </div>
           </div>
           <div class="table-cell">
             <div class="cell-content">
               <span class="cell-label">完工日期:</span>
-              <span class="cell-value">{{ formatDate(dailyReportData.wgDate) || '-' }}</span>
+              <span class="cell-value">{{ dailyReportData.completionDate || '-' }}</span>
             </div>
           </div>
         </div>
@@ -86,13 +86,13 @@
           <div class="table-cell">
             <div class="cell-content">
               <span class="cell-label">施工周期D:</span>
-              <span class="cell-value">{{ constructionPeriod || 0 }}</span>
+              <span class="cell-value">{{ dailyReportData.constructionPeriod || '' }}</span>
             </div>
           </div>
           <div class="table-cell">
             <div class="cell-content">
               <span class="cell-label">停待时间D:</span>
-              <span class="cell-value">{{ dailyReportData.faultDowntime || 0 }}</span>
+              <span class="cell-value">{{ dailyReportData.idleTime || '' }}</span>
             </div>
           </div>
           <div class="table-cell">
@@ -115,6 +115,27 @@
       </div>
     </ContentWrap>
 
+    <!-- 实际进度显示区域(新增) -->
+    <ContentWrap class="section-padding" v-if="showActualProgress">
+      <h3 class="progress-title">任务进度</h3>
+      <div class="actual-progress-container">
+        <div v-if="actualProgressData.length > 0">
+          <el-steps direction="horizontal" :active="actualProgressData.length - 1" finish-status="success">
+            <el-step
+              v-for="(step, index) in actualProgressData"
+              :key="index"
+              :title="step.title"
+              :description="step.description"
+              :status="step.status"
+            />
+          </el-steps>
+        </div>
+        <div v-else class="no-progress-data">
+          暂无实际进度数据
+        </div>
+      </div>
+    </ContentWrap>
+
     <!-- 第三部分:日报填报表单 -->
     <ContentWrap class="section-padding">
       <el-form
@@ -1799,6 +1820,48 @@ const getCurrentExtProperties = () => {
   })
 }
 
+// 是否显示实际进度
+const showActualProgress = computed(() => {
+  // 在所有模式下都显示,如果有数据就显示
+  return dailyReportData.value?.taskProgresses && dailyReportData.value.taskProgresses.length > 0
+})
+
+// 实际进度数据
+const actualProgressData = computed(() => {
+  if (!dailyReportData.value?.taskProgresses || !Array.isArray(dailyReportData.value.taskProgresses)) {
+    return []
+  }
+
+  // 将 taskProgresses 转换为 el-steps 需要的格式
+  return dailyReportData.value.taskProgresses.map((progress: any, index: number) => {
+    // 格式化日期:如果只有日期部分,使用日期格式;如果有时间,使用日期时间格式
+    let formattedDate = ''
+    if (progress.createTime) {
+      // 判断日期格式,如果包含时间则显示完整时间,否则只显示日期
+      if (progress.createTime.includes(' ')) {
+        // 已经是完整的日期时间格式
+        formattedDate = progress.createTime
+      } else {
+        // 只有日期部分
+        formattedDate = progress.createTime
+      }
+    }
+
+    // 构建标题:日期 + 状态
+    const title = formattedDate && progress.rdStatusLabel
+      ? `${formattedDate} ${progress.rdStatusLabel}`
+      : progress.rdStatusLabel || '未知状态'
+
+    return {
+      title: title,
+      description: '', // 可以根据需要添加描述信息
+      status: undefined, // el-steps 会自动计算状态
+      // 保留原始数据,便于调试
+      rawData: progress
+    }
+  })
+})
+
 // 初始化表单数据
 const initFormData = (reportData: any) => {
   // 处理附件数据格式转换
@@ -2732,4 +2795,61 @@ const handleApprove = async (action: 'pass' | 'reject') => {
   color: #606266;
   cursor: not-allowed;
 }
+
+/* 实际进度区域样式 */
+.actual-progress-container {
+  margin-top: 10px;
+  padding: 20px;
+  border: 1px solid #e6e6e6;
+  border-radius: 8px;
+  background-color: #fafafa;
+}
+
+.progress-title {
+  margin: 0 0 16px 0;
+  font-size: 16px;
+  font-weight: bold;
+  color: #67c23a; /* 实际进度使用绿色标题 */
+}
+
+.no-progress-data {
+  text-align: center;
+  padding: 20px 0;
+  color: #909399;
+  font-style: italic;
+}
+
+/* 调整步骤组件样式以适应水平布局 */
+:deep(.actual-progress-container .el-steps--horizontal) {
+  flex-wrap: nowrap;
+  overflow-x: auto;
+  padding-bottom: 10px;
+}
+
+:deep(.actual-progress-container .el-step__title) {
+  font-size: 12px;
+  line-height: 1.4;
+  white-space: nowrap;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  max-width: 120px;
+}
+
+/* 确保步骤容器有足够空间 */
+:deep(.actual-progress-container .el-step) {
+  flex-basis: auto;
+  flex-shrink: 0;
+}
+
+/* 响应式调整 */
+@media (max-width: 768px) {
+  :deep(.actual-progress-container .el-step__title) {
+    font-size: 11px;
+    max-width: 100px;
+  }
+
+  .actual-progress-container {
+    padding: 15px;
+  }
+}
 </style>