<template>
    <global-page title="故障历史详情">
        <global-table :columns="columns" :data="details?.historicalFault">
            <template #sendingTime="{ row }">
                {{ timeStampFormat(row.sendingTime) }}
            </template>
        </global-table>
    </global-page>
</template>

<script setup>
import { ref } from 'vue'
import { storeToRefs } from 'pinia'
import { timeStampFormat } from 'mocp/utils/tool'
import useTechnicalAnalysisStore from 'mocp/store/technicalAnalysis'

const technicalAnalysisStore = useTechnicalAnalysisStore()
const { details } = storeToRefs(technicalAnalysisStore)
const columns = ref([
    { title: '机号', dataIndex: 'machineNumber' },
    { title: '故障描述', dataIndex: 'faultDescribe' },
    { title: '处理措施', dataIndex: 'handle' },
    { title: 'ATA章节', dataIndex: 'ata' },
    { title: '发生时间', dataIndex: 'sendingTime' }
])
</script>
<style lang="scss" scoped></style>
