<template>
    <ifrm ref="ifrm">
        <u-subsection :list="list" mode="subsection" :current="current" @change="sectionChange"
            style="margin-bottom: 10rpx;"></u-subsection>
        <first-retrospect-defend ref="firstRetrospectDefendRef" v-show="current == 0" />
        <remarry-retrospect-defend v-show="current == 1" />
    </ifrm>
</template>

<script>
    import ifrm from '@/pages/index/ifrm';
    import firstRetrospectDefend from './firstRetrospectDefend.vue';
    import remarryRetrospectDefend from './remarryRetrospectDefend.vue';
    export default {
        components: {
            ifrm,
            firstRetrospectDefend,
            remarryRetrospectDefend
        },
        data() {
            return {
                list: ['首次维护', '后续维护'],
                current: 0,
            };
        },
        onNavigationBarButtonTap(btn) {
            this.$refs.ifrm.topMenuClick(btn);
        },
        onReady() {
            this.$refs.firstRetrospectDefendRef.getEquipmentCard()
        },
        methods: {
            sectionChange(index) {
                this.current = index;
            }
        }
    };
</script>

<style scoped lang="scss">

</style>