<template>
    <global-page :padding="24" title="人员保障列表" auto :localData="pData">
        <template #default="{ item, index }">
            <global-card :title="item.personnel" titleSuffix="查看详情" @handleTitleClick="goTo(index)">
                <global-text-status :value="item.state" dictkey="aogDetails_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 { pData } = storeToRefs(aogStore)
const goTo = (index) => {
    uni.$mocpJump.navigateTo('/panel/aog/personal-details').then(() => {
        aogStore.setState('pIndex', index)
    })
}
</script>
<style lang="scss" scoped></style>
