import HttpKit from '@/utils/http-kit'

export default {
  /**
   * 功能描述：查询[字典]
   */
  page(form) {
    return HttpKit.post(`/platform/dict/page`, form).then(
      res => res.data
    )
  },
  /**
   * 功能描述：保存/更新[字典]
   */
  saveOrUpdate(form) {
    return HttpKit.post(`/platform/dict/save-or-update`, form).then(
      res => res.data
    )
  },
  /**
   * 功能描述：替换[字典]删除状态
   * @param id
   */
  handleIsDel(id) {
    return HttpKit.post(`/platform/dict/handle-is-del`, { id: id }).then(
      res => res.data
    )
  },

  /**
   * 功能描述：查询[部门实体]
   */
  entryList(form) {
    return HttpKit.post(`/platform/dict/entry/list`, form).then(
      res => res.data
    )
  },
  /**
   * 功能描述：保存/更新[部门实体]
   */
  entrySaveOrUpdate(form) {
    return HttpKit.post(`/platform/dict/entry/save-or-update`, form).then(
      res => res.data
    )
  },
  /**
   * 功能描述：替换[部门实体]删除状态
   * @param id
   */
  entryHandleIsDel(id) {
    return HttpKit.post(`/platform/dict/entry/handle-is-del`, { id: id }).then(
      res => res.data
    )
  }
}
