<template>
    <global-page :padding="24" title="人员保障列表">
        <template v-for="(item, index) in pData" :key="item.id">
            <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>
