import request from '@/assets/js/workutils/workrequest'

export const getList = (current, size, params) => {
  return request({
    url: '/bidprocurement/common-workclow/dict/list',
    method: 'get',
    params: {
      ...params,
      current,
      size
    }
  })
}
export const remove = (ids) => {
  return request({
    url: '/bidprocurement/common-workclow/dict/remove',
    method: 'post',
    params: {
      ids
    }
  })
}

export const add = (row) => {
  return request({
    url: '/bidprocurement/common-workclow/dict/submit',
    method: 'post',
    data: row
  })
}

export const update = (row) => {
  return request({
    url: '/bidprocurement/common-workclow/dict/submit',
    method: 'post',
    data: row
  })
}

export const getDict = (id) => {
  return request({
    url: '/bidprocurement/common-workclow/dict/detail',
    method: 'get',
    params: {
      id
    }
  })
}
export const getDictTree = () => {
  return request({
    url: '/bidprocurement/common-workclow/dict/tree?code=DICT',
    method: 'get'
  })
}

export const getDictionary = (params) => {
  return request({
    url: '/bidprocurement/common-workclow/dict/dictionary',
    method: 'get',
    params
  })
}
