<template>
    <global-page :padding="24" title="AOG施工列表">
        <template v-for="(item, index) in bbData" :key="item.id">
            <global-card :title="`步骤${index + 1}`" titleSuffix="查看详情" @handleTitleClick="goTo(index)">
                <global-text-status :value="item.state" dictkey="bbDetails_status"></global-text-status>
            </global-card>
        </template>
    </global-page>
</template>

<script setup>
import { storeToRefs } from 'pinia'
import useAogStore from 'mocp/store/aog'

const aogStore = useAogStore()
const { bbData } = storeToRefs(aogStore)
const goTo = (index) => {
    uni.$mocpJump.navigateTo('/panel/aog/construction-details').then(() => {
        aogStore.setState('bbIndex', index)
    })
}
</script>
<style lang="scss" scoped></style>
