import { DepartMentModel, getDeptList } from "@/api/datamanagement/dataplatform";
import { onMounted, ref } from "vue";


export const BoardSelectList = [
    {
        label: '姓名',
        value: 0,
    },
    {
        label: '工号',
        value: 1,
    },

]


// export enum BoardDeptEnum {
//     all = 100,
//     '5g' = 0,
//     'c02' = 1,
//     'c12' = 2,
//     'top' = 12,
// }

// export const BoardDeptList = [
//     {
//         label: '全部',
//         value: BoardDeptEnum.all,
//     },
//     {
//         label: '总部公司',
//         value: BoardDeptEnum.top,
//     },
// ]


export function getDepartmentList() {
    
  
    const departmentList = ref<DepartMentModel[]>([]);
    const getDepartmentList = () => {
      getDeptList().then((res) => {
        departmentList.value = res;
      });
    };
  
  
    onMounted(() => {
      getDepartmentList();
    })
  
  
    return {  departmentList, getDepartmentList }
  }
  
  export default getDepartmentList;