<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 useOperationalSurveyStore from 'mocp/store/operationalSurvey'
import { timeStampFormat } from 'mocp/utils/tool'

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