import {
  getMyArticalList,
  getArticalLikeList,
  getViewArticalList,
  getDownloadArticalList
} from '@/api/article'

const departs = [{
    "department_id": "47",
    "department": "交易中心"
  },
  {
    "department_id": "49",
    "department": "人事科"
  },
  {
    "department_id": "51",
    "department": "人才中心"
  },
  {
    "department_id": "53",
    "department": "住房保障中心"
  },
  {
    "department_id": "55",
    "department": "党办"
  },
  {
    "department_id": "57",
    "department": "办公室"
  },
  {
    "department_id": "59",
    "department": "图审中心"
  },
  {
    "department_id": "61",
    "department": "城建科"
  },
  {
    "department_id": "63",
    "department": "审批科"
  },
  {
    "department_id": "65",
    "department": "建筑业"
  },
  {
    "department_id": "67",
    "department": "房产保障科"
  },
  {
    "department_id": "69",
    "department": "房屋征收中心"
  },
  {
    "department_id": "71",
    "department": "法规科"
  },
  {
    "department_id": "73",
    "department": "消防中心"
  },
  {
    "department_id": "75",
    "department": "燃管站"
  },
  {
    "department_id": "77",
    "department": "节水站"
  },
  {
    "department_id": "79",
    "department": "财务中心"
  },
  {
    "department_id": "81",
    "department": "质安站"
  },
  {
    "department_id": "83",
    "department": "造价站"
  },
  {
    "department_id": "85",
    "department": "项目中心"
  }
];

export default {
  departs,
  categorys: {
    laws: "法律法规",
    mechanism: "机制制度类",
    result: "基础性成果类",
    other: "其他"
  },
  owners: {
    0: '无权限',
    1: '经办人',
    2: '负责人',
    3: '分管领导'
  },
  getDepart: (id)=> {
    for (let i in departs) {
      if (departs[i].department_id == id) {
        return departs[i]
      }
    }
    return {
      department_id: 0,
      department: ''
    }
  },
  myfiles: [{
    id: "1",
    value: '我发布的文件',
    label: '我发布的文件',
    listApi: getMyArticalList
  }, {
    id: "2",
    value: '我收藏的文件',
    label: '我收藏的文件',
    listApi: getArticalLikeList
  }, {
    id: "3",
    value: '最近浏览的文件',
    label: '最近浏览的文件',
    listApi: getViewArticalList

  }, {
    id: "4",
    value: '最近下载的文件',
    label: '最近下载的文件',
    listApi: getDownloadArticalList
  }]
}
