<template>
    <global-page :padding="24" title="部件信息详情" auto :localData="details?.partList || []">
        <template #default="{ item }">
            <view class="mocp-cell">
                <up-cell-group>
                    <up-cell title="机号" :value="item.partNo || '-'"></up-cell>
                    <up-cell title="序号" :value="item.serialNo || '-'"></up-cell>
                    <up-cell title="部件名称" :value="item.partName || '-'"></up-cell>
                    <up-cell title="部件性质" :value="item.partNature || '-'"></up-cell>
                    <up-cell title="部件情况" :value="item.partSituation || '-'"></up-cell>
                    <up-cell title="装机时间" :value="timeStampFormat(item.installTime, { format: 'YYYY/MM/DD' }) || '-'"></up-cell>
                    <up-cell title="CSN" :value="item.csn || '-'"></up-cell>
                    <up-cell title="TSN" :value="item.tsn || '-'"></up-cell>
                    <up-cell title="CSR" :value="item.csr || '-'"></up-cell>
                    <up-cell title="TSR" :value="item.tsr || '-'"></up-cell>
                    <up-cell title="当地航材" :value="useGetDictByValue('ta_localMaterials', item.localMaterials) || '-'"></up-cell>
                    <up-cell title="当地配置标准" :value="item.localConf || '-'"></up-cell>
                    <up-cell title="软时限" :value="item.companyReliability || '-'"></up-cell>
                    <up-cell title="航空集团平均使用时间" :value="item.useAverageTime || '-'"></up-cell>
                    <up-cell title="世界机队平均使用时间" :value="item.worldFleet || '-'"></up-cell>
                </up-cell-group>
            </view>
        </template>
    </global-page>
</template>

<script setup>
import { storeToRefs } from 'pinia'
import { timeStampFormat } from 'mocp/utils/tool'
import useTechnicalAnalysisStore from 'mocp/store/technicalAnalysis'
import { useGetDictByValue } from 'mocp/hooks/use-dict/useDict'

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