xuzhancheng hace 1 mes
padre
commit
eb086c3148

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

@@ -367,9 +367,14 @@
                 {{formatDate(row.nextLegalCheckDate, 'YYYY-MM-DD') || '-'}}
               </span>
             </span>
-            <span class="schedule-count">
+            <span 
+              class="schedule-count" 
+              :class="{ 'schedule-count-completed': row.legalScheduledCount === row.legalTotalCount && row.legalTotalCount > 0 }"
+              v-if="row.legalScheduledCount > 0"
+            >
               ({{ row.legalScheduledCount || 0 }}/{{ row.legalTotalCount || 0  }})
             </span>
+            <span v-else class="schedule-count-placeholder"></span>
           </div>
         </template>
       </el-table-column>
@@ -381,9 +386,14 @@
                 {{formatDate(row.nextYearCheckDate, 'YYYY-MM-DD') || '-'}}
               </span>
             </span>
-            <span class="schedule-count">
+            <span 
+              class="schedule-count" 
+              :class="{ 'schedule-count-completed': row.yearScheduledCount === row.yearTotalCount && row.yearTotalCount > 0 }"
+              v-if="row.yearScheduledCount > 0"
+            >
               ({{ row.yearScheduledCount || 0 }}/{{ row.yearTotalCount || 0  }})
             </span>
+            <span v-else class="schedule-count-placeholder"></span>
           </div>
         </template>
       </el-table-column>
@@ -1274,21 +1284,39 @@ onUnmounted(()=>{
   font-size: 12px;
   color: var(--el-color-info);
   font-weight: 500;
+  background-color: #FFFF99;
+}
+
+// 已完成排期的样式
+.schedule-count-completed {
+  color: var(--el-color-info);
+  background-color: #C5F1C1;
+}
+
+// 分数占位符,用于对齐
+.schedule-count-placeholder {
+  width: 60px;
+  flex-shrink: 0;
 }
 
 // 排期单元格样式
 .schedule-cell {
   display: flex;
-  align-items: baseline;
-  justify-content: center;
+  align-items: center;
+  justify-content: flex-start;
   min-height: 24px;
-  gap: 10px;
+  gap: 5px;
+  padding-left: 20px;
+  margin-left: 10px;
+  position: relative;
 }
 
 // 日期文本容器
 .schedule-date {
-  min-width: 70px;
+  min-width: 80px;
   text-align: center;
+  flex-shrink: 0;
+  line-height: 24px;
 }
 
 .ml-10px {

+ 6 - 2
yudao-ui-admin-vue3/src/views/pressure2/schedule/pipeindex.vue

@@ -202,6 +202,7 @@
 
 <script setup lang="ts">
 import { ref, onMounted, onUnmounted, watch } from 'vue'
+ import {useUserStore} from "@/store/modules/user";
 import { ArrowLeft, ArrowRight, Delete, Document, Location, Place, Edit } from '@element-plus/icons-vue'
 import DeptSelect from "@/views/pressure2/equipboilerscheduling/components/DeptSelect.vue";
 import { ElMessage, ElMessageBox } from 'element-plus'
@@ -217,6 +218,8 @@ const EQUIP_TYPES = {
   BOILER: '300' // 锅炉
 } as const
 
+const userStore = useUserStore()
+
 // 设备类型显示名称
 const EQUIP_TYPE_NAMES: Record<string, string> = {
   [EQUIP_TYPES.PIPELINE]: '管道',
@@ -227,7 +230,7 @@ const EQUIP_TYPE_NAMES: Record<string, string> = {
 // 查询参数
 const queryParams = ref({
   planDate: [] as string[],
-  relateDepartment: undefined as string | undefined,
+  relateDepartment: userStore.user.deptId,
   type: '100',
 })
 
@@ -369,7 +372,8 @@ const resetQuery = () => {
   const endDate = dayjs().endOf('month').format('YYYY-MM-DD')
   queryParams.value = {
     type: '100',
-    planDate: [startDate, endDate]
+    planDate: [startDate, endDate],
+    relateDepartment: userStore.user.deptId,
   } as any;
   handleQuery()
 }