import CONFIG from "@/config";

export default function useColumns() {
  const TableColumns = [
    {
      item: { key: "year", title: "年度" },
      attr: {},
    },
    {
      item: { key: "name", title: "模板名称" },
      attr: {},
    },
    {
      item: { key: "startTime", title: "开始日期" },
      attr: {},
    },
    {
      item: { key: "deadlineTime", title: "结束日期" },
      attr: {},
    },
    {
      item: { key: "cycle", title: "周期" },
      attr: {
        is: "el-dict-tag",
        dictName: "mk_periodic_unit",
      },
    },
    {
      item: { key: "unfold", title: "按列展开" },
      attr: {
        is: "el-dict-tag",
        dictName: "mk_expansion_mode",
      },
    },
    
   
  ];

  const TabColumns = [
    {
      item: {
        title: "指标",
        key: "indexs",
      },
      attr: {
        value: [],
      },
      TableColumns: [
        {
          item: { key: "target", title: "指标" },
          attr: {
            is: "el-dict-tag",
            dictName: "mk_index_type",
          },
        },
      ],
    },
    {
      item: {
        title: "维度",
        key: "dimensionalitys",
      },
      attr: {
        value: [],
      },
      TableColumns: [
        {
          item: { key: "dimensionality", title: "维度" },
          attr: {
            is: "el-dict-tag",
            dictName: "mk_dimensionality",
          },
        },
      ],
    },
    {
      item: {
        title: "周期",
        key: "cycles",
      },
      attr: {
        value: [],
      },
      TableColumns: [
        {
          item: { key: "name", title: "周期名称", require: true },
          attr: {},
        },
        {
          item: {
            key: "startTime",
            title: "周期开始日期",
            require: true,
          },
          attr: {},
        },
        {
          item: {
            key: "deadlineTime",
            title: "周期结束日期",
            require: true,
          },
          attr: {},
        },
      ],
    },
  ];

  return { TableColumns, TabColumns };
}
