<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 useQualityAnalysisStore from 'mocp/store/qualityAnalysis'

const qualityAnalysisStore = useQualityAnalysisStore()
const { details } = storeToRefs(qualityAnalysisStore)
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>
