| | |
| | | </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) }} |
| | |
| | | }); |
| | | }; |
| | | |
| | | // 格式化日期计算属性(用于模板显示,避免编译处理) |
| | | 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为空,则返回"-" |