spring
2 天以前 c39a0308db98f3678253f6318b125631e3eccfea
src/pages/routingInspection/detail/indexJX.vue
@@ -50,7 +50,7 @@
      </view>
      <wd-col :span="24">
        <wd-form-item label="日期" prop="recordDate">
          {{ formatDate(recordData.fixedInfo?.recordDate) }}
          {{ formattedRecordDate }}
        </wd-form-item>
        <wd-form-item label="班次" prop="workShift">
          {{ formatValue(recordData.fixedInfo?.workShift) }}
@@ -641,6 +641,17 @@
  });
};
// 格式化日期计算属性(用于模板显示,避免编译处理)
const formattedRecordDate = computed(() => {
  const date = recordData.value.fixedInfo?.recordDate;
  if (!date) return "-";
  const d = new Date(date);
  const year = d.getFullYear();
  const month = String(d.getMonth() + 1).padStart(2, "0");
  const day = String(d.getDate()).padStart(2, "0");
  return `${year}-${month}-${day}`;
});
// 计算节径比
const calculatePitchRatio = (pitch: string, dia: string) => {
  // 如果pitch或dia为空,则返回"-"