import { api, downloadFile, createApiUrl} from '~/utils/axios';


                       /**
                       * 导出心愿单
                       * @param {Object} data
                       * @return {Promise} api
                       */
                       export function exportExcel(data) {
                           downloadFile(createApiUrl('WishList.WishList/exportExcel'), data);
                       }
                       
                       /**
                        * 下载心愿单模板
                        * @param {Object} data
                        * @return {Promise} api
                        */
                       export function downloadTemplate(data) {
                           downloadFile(createApiUrl('WishList.WishList/downloadTemplate'), data);
                       }
                       
                       /**
                        * 导入心愿单
                        * @param {Object} data
                        * @return {Promise} api
                        */
                       export const importExcel = createApiUrl('WishList.WishList/importExcel');
                       






                       /**
                        * 获取字典值
                        * @param {Object} data
                        * @return {Promise} api
                        */
                       export function getDictionary(data) {
                         return api.post('Dictionary.Dictionary/getDictionary', data, {
                         });
                       }
                       

/**
 * 获取心愿单列表
 * @param {Object} data
 * @return {Promise} api
 */
export function getWishListList(data) {
  return api.post('WishList.WishList/getWishListList', data);
}

/**
 * 删除心愿单
 * @param {Object} data
 * @return {Promise} api
 */
export function deleteWishList(data) {
  return api.post('WishList.WishList/deleteWishList', data, {
    isTransformResponse: true,
    isShowSuccessMessage: true,
    errorMessageText: '删除失败'
  });
}

/**
 * 添加心愿单
 * @param {Object} data
 * @return {Promise} api
 */
export function addWishList(data) {
  return api.post('WishList.WishList/addWishList', data, {
    isTransformResponse: true,
    isShowSuccessMessage: true,
    errorMessageText: '添加失败'
  });
}
/**
 * 编辑心愿单
 * @param {Object} data
 * @return {Promise} api
 */
export function editWishList(data) {
  return api.post('WishList.WishList/editWishList', data, {
    isTransformResponse: true,
    isShowSuccessMessage: true,
    errorMessageText: '编辑失败'
  });
}
