import { useDictionaryStore } from "@/store";

const { dicts } = useDictionaryStore();

export const tableConfig = {
  USERS: {
    url: "/api/v1/syn/user/info",
    column: [
      {
        label: "员工编码",
        prop: "employeeCode",
      },
      {
        label: "用户id",
        prop: "id",
        /*display:false,*/
      },
      {
        label: "用户名",
        prop: "userName",
        search: true,
        width: "120",
      },
      {
        label: "用户电话",
        prop: "phone",
      },
      //
      // {
      //   label: "部门",
      //   prop: "deptNames",
      //   search: true,
      //   overHidden: true,
      //   disabled: true,
      // },
      {
        label: "部门",
        prop: "deptIds",
        search: true,
        overHidden: true,
        disabled: true,
        type: "tree",
        dicUrl: import.meta.env.VITE_APP_BASE_API + "/api/v1/syn/dept/info/orgTree", // 使用树形结构数据
        props: {
          label: "deptName", // 显示的字段
          value: "id", // 传递给后端的字段
          children: "children", // 子节点字段
        },
        multiple: true, // 支持多选
        showCheckbox: true, // 显示复选框
        valueformat: "array",
      }
      /* {
        label: "所属机构",
        prop: "institution",
        filterable: true,
        type: "select",
        width: 100,
        overHidden: true,
        dicUrl: dictDataUtil.dept_list_url,
        dicMethod: "post",
        props: { label: "deptName", value: "id" },
        disabled: true,
      },*/
    ],
  },
};
