<template>
    <global-page :padding="24" title="故障历史详情" auto :localData="details?.historicalFault || []">
        <template #default="{ item }">
            <view class="mocp-cell">
                <up-cell-group>
                    <up-cell title="机号" :value="item.machineNumber || '-'"></up-cell>
                    <up-cell title="故障描述" :label="item.faultDescribe || '-'"></up-cell>
                    <up-cell title="处理措施" :value="item.handle || '-'"></up-cell>
                    <up-cell title="ATA章节" :value="item.ata || '-'"></up-cell>
                    <up-cell title="发生时间" :value="timeStampFormat(item.sendingTime) || '-'"></up-cell>
                </up-cell-group>
            </view>
        </template>
    </global-page>
</template>

<script setup>
import { storeToRefs } from 'pinia'
import { timeStampFormat } from 'mocp/utils/tool'
import useQualityAnalysisStore from 'mocp/store/qualityAnalysis'

const qualityAnalysisStore = useQualityAnalysisStore()
const { details } = storeToRefs(qualityAnalysisStore)
</script>
<style lang="scss" scoped>
.mocp-cell {
    background: #fff;
    margin-bottom: 16rpx;
}
</style>
