import request from '/frontEnd/api/config/axios.js'
export const getTypeCode = ({ typeCode }) => (
  request({
    url: '/dictionary/do_findByParentCode',
    method: 'get',
    params: {
      parentCode: typeCode
    }
  })
)

export const getCreditSubject = () => (
  request({
    url: '/refinancingCredit/creditSubjectList',
    method: 'get',
  })
)

// 获取按钮权限
export const getJurisdictionBtnCode = () => (
  request({
    url: '/user/do_getAllPermissionEname',
    method: 'get',
  })
)

// 获取部门
export const getDepartment = () => (
  request({
    url: '/refinancingUseCredit/department/list',
    method: 'get',
  })
)

// 获取产品类型
export const getProductType = () => (
  request({
    url: '/refinancingUseCredit/asset/productList',
    method: 'get',
  })
)

// 获取时间轴
export const getTimeAxis = (params) => (
  request({
    url: '/businessProcessingTask/doTimelineList',
    method: 'get',
    params
  })
)

// 获取流程业务节点信息
export const getProcessNodeInfo = (params) => (
  request({
    url: '/businessProcessingTask/doBusinessHistoryView',
    method: 'get',
    params
  })
)

// 获取登录信息
export const getUserInfo = (params) => (
  request({
    url: '/user/do_getLongUser',
    method: 'get',
    params
  })
)

// 获取组织结构
export const getOrgInfo = (params) => (
  request({
    url: '/org/findOrgAndUserTreeNodeAndAdmin/new',
    method: 'get',
    params
  })
)
