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


                       /**
                       * 导出测试
                       * @param {Object} data
                       * @return {Promise} api
                       */
                       export function exportExcel(data) {
                           downloadFile(createApiUrl('Test.Test/exportExcel'), data);
                       }
                       
                       /**
                        * 下载测试模板
                        * @param {Object} data
                        * @return {Promise} api
                        */
                       export function downloadTemplate(data) {
                           downloadFile(createApiUrl('Test.Test/downloadTemplate'), data);
                       }
                       
                       /**
                        * 导入测试
                        * @param {Object} data
                        * @return {Promise} api
                        */
                       export const importExcel = createApiUrl('Test.Test/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 getTestList(data) {
  return api.post('Test.Test/getTestList', data);
}

/**
 * 删除测试
 * @param {Object} data
 * @return {Promise} api
 */
export function deleteTest(data) {
  return api.post('Test.Test/deleteTest', data, {
    isTransformResponse: true,
    isShowSuccessMessage: true,
    errorMessageText: '删除失败'
  });
}

/**
 * 添加测试
 * @param {Object} data
 * @return {Promise} api
 */
export function addTest(data) {
  return api.post('Test.Test/addTest', data, {
    isTransformResponse: true,
    isShowSuccessMessage: true,
    errorMessageText: '添加失败'
  });
}
/**
 * 编辑测试
 * @param {Object} data
 * @return {Promise} api
 */
export function editTest(data) {
  return api.post('Test.Test/editTest', data, {
    isTransformResponse: true,
    isShowSuccessMessage: true,
    errorMessageText: '编辑失败'
  });
}
