xuzhancheng 1 månad sedan
förälder
incheckning
89d4fafc75

+ 4 - 0
yudao-ui-admin-vue3/src/api/pressure2/pipescheduling/index.ts

@@ -20,6 +20,10 @@ export interface EquipPipeSchedulingVO {
   nextYearCheckDate: string //下次外部检验日期
   legalEquipIds: string | null
   yearEquipIds: string | null
+  legalScheduledCount: number // 定检已排期数
+  legalTotalCount: number // 定检总需排期数
+  yearScheduledCount: number // 年检已排期数
+  yearTotalCount: number // 年检总需排期数
 }
 
 export interface EquipPipeSchedulingDetailVO {

+ 10 - 0
yudao-ui-admin-vue3/src/views/pressure2/pipescheduling/components/PipePlanScheduleDialog.vue

@@ -808,6 +808,16 @@ watch(() => checkItemList.value, () => {
   calculateYearAmounts()
 }, {deep: true})
 
+// 根据检验类型获取设备数量
+const getEquipCountByType = (type: string) => {
+  if (type == 100) {
+    return legalEquipCount.value
+  } else if (type == 200) {
+    return yearEquipCount.value
+  }
+  return 0
+}
+
 /** 更新 teamList */
 const updateTeamList = (type) => {
   const checkerMap = {

+ 46 - 6
yudao-ui-admin-vue3/src/views/pressure2/pipescheduling/index.vue

@@ -361,16 +361,30 @@
       <el-table-column label="工程名称" prop="projectName" align="center" min-width="150"/>
       <el-table-column label="定期检验" prop="nextLegalCheckDate" align="center" min-width="150"  sortable="custom">
         <template #default="{ row }">
-          <span class="schedule-date-link" @click.stop="handleSchedule(row,'100')">
-          {{formatDate(row.nextLegalCheckDate, 'YYYY-MM-DD') || '-'}}
-          </span>
+          <div class="schedule-cell">
+            <span class="schedule-date">
+              <span class="schedule-date-link" @click.stop="handleSchedule(row,'100')">
+                {{formatDate(row.nextLegalCheckDate, 'YYYY-MM-DD') || '-'}}
+              </span>
+            </span>
+            <span class="schedule-count">
+              ({{ row.legalScheduledCount || 0 }}/{{ row.legalTotalCount || 0  }})
+            </span>
+          </div>
         </template>
       </el-table-column>
       <el-table-column label="年度检查" prop="nextYearCheckDate" align="center" min-width="150"  sortable="custom">
         <template #default="{ row }">
-          <span class="schedule-date-link" @click.stop="handleSchedule(row,'200')">
-          {{formatDate(row.nextYearCheckDate, 'YYYY-MM-DD') || '-'}}
-          </span>
+          <div class="schedule-cell">
+            <span class="schedule-date">
+              <span class="schedule-date-link" @click.stop="handleSchedule(row,'200')">
+                {{formatDate(row.nextYearCheckDate, 'YYYY-MM-DD') || '-'}}
+              </span>
+            </span>
+            <span class="schedule-count">
+              ({{ row.yearScheduledCount || 0 }}/{{ row.yearTotalCount || 0  }})
+            </span>
+          </div>
         </template>
       </el-table-column>
       <el-table-column label="管道数量" prop="pipeCount" align="center" min-width="100"/>
@@ -1255,6 +1269,32 @@ onUnmounted(()=>{
   }
 }
 
+// 排期统计分数样式
+.schedule-count {
+  font-size: 12px;
+  color: var(--el-color-info);
+  font-weight: 500;
+}
+
+// 排期单元格样式
+.schedule-cell {
+  display: flex;
+  align-items: baseline;
+  justify-content: center;
+  min-height: 24px;
+  gap: 10px;
+}
+
+// 日期文本容器
+.schedule-date {
+  min-width: 70px;
+  text-align: center;
+}
+
+.ml-10px {
+  margin-left: 10px;
+}
+
 // 已排期的单元格黄色背景
 :deep(.cell-scheduled) {
   background-color: #FFFF99 !important;