<template>
  <div>
    <Breadcrumb :items="['项目中心', '项目周报']" :title="'项目周报'">
    </Breadcrumb>
    <ReportLayout
      :prj-list="prjList"
      :account-list="accountList"
      container-height="calc(100vh - 200px)"
    />
  </div>
</template>

<script lang="ts" setup>
import { ref, onMounted } from 'vue'
import { getStaffList } from '@/api/base/staff'
import { getProjectList } from '@/api/project/info'
import ReportLayout from '../project/components/detail/report-layout.vue'

const accountList = ref<{ id: string; name: string }[]>([])
const prjList = ref<{ id: string; name: string }[]>([])
// 获取主责人账号信息
const getAccounts = async () => {
  const { list } = await getStaffList({ page_no: 1, page_size: 9999 })
  accountList.value = list
}
// 获取主责人账号信息
const getProjects = async () => {
  const { list } = await getProjectList({ page_no: 1, page_size: 9999 })
  prjList.value = list
}

onMounted(() => {
  getAccounts()
  getProjects()
})
</script>

<script lang="ts">
export default {
  name: 'WeekReport'
}
</script>
