/**
 * 经营承诺
 */

import zlbApi from "@/api/zlbApi";
import {commonUpload,  myFetch} from "@/utils/fetch";

/**
 * 模板列表
 * /promise/template/getTemplateList
 */
export function getTemplateList (data) {
    const url = zlbApi.getTemplateList;
    return myFetch(url, 'get', data, 'json');
}

/**
 * 获取企业承诺详情
 * /promise/manage/getDetail
 */
export function getDetail (data) {
    const url = zlbApi.getPromiseDetail;
    return myFetch(url, 'get', data, 'json');
}

/**
 * 获取模板详情
 * /promise/template/templateDetails
 */
export function templateDetails (data) {
    const url = zlbApi.templateDetails;
    return myFetch(url, 'get', data, 'json');
}

/**
 * 创建承诺
 * /promise/manage/createPromise
 */
export function createPromise (data) {
    const url = zlbApi.createPromise;
    return myFetch(url, 'post', data, 'json');
}

/**
 * 获取承诺列表
 * /promise/manage/getList
 */
export function getPromiseList (data) {
    const url = zlbApi.getPromiseList;
    return myFetch(url, 'get', data, 'json');
}

/**
 * 获取企业详情
 * /promise/enterprise/getDetail
 */
export function getEnterpriseDetail (data) {
    const url = zlbApi.getEnterpriseDetail;
    return myFetch(url, 'get', data, 'json');
}

/**
 * 获取企业列表
 * /promise/enterprise/getList
 */
export function getEnterpriseList (data) {
    const url = zlbApi.getEnterpriseList;
    return myFetch(url, 'get', data, 'json');
}

/**
 * 获取搜索记录
 * /promise/common/getSearchRecordList
 */
export function getSearchRecordList (data) {
    const url = zlbApi.getSearchRecordList;
    return myFetch(url, 'get', data, 'json');
}

/**
 * 删除搜索记录
 * /promise/common/deleteSearchRecord
 */
export function deleteSearchRecord (data) {
    const url = zlbApi.deleteSearchRecord;
    return myFetch(url, 'post', data, 'json');
}

/**
 * 综合搜索
 * /promise/common/searchCommitment
 */
export function searchCommitment (data) {
    const url = zlbApi.searchCommitment;
    return myFetch(url, 'get', data, 'json');
}

/**
 * 承诺核查列表
 * /promise/verify/getPromiseVerifyList
 */
export function getPromiseVerifyList (data) {
    const url = zlbApi.getPromiseVerifyList;
    return myFetch(url, 'get', data, 'json');
}

/**
 * 核查详情
 * /promise/verify/getVerifyDetails
 */
export function getVerifyDetails (data) {
    const url = zlbApi.getVerifyDetails;
    return myFetch(url, 'get', data, 'json');
}

/**
 * 上传图片
 * /promise/Indicator/uploadFile
 */
export function uploadFile (data) {
    const url = zlbApi.uploadFile;
    return myFetch(url,'get',data,'formData');
}

/**
 * 下载文件
 * /promise/Indicator/downFileBase64
 */
export function downFileBase64 (data) {
    const url = zlbApi.downFileBase64;
    return myFetch(url, 'get', data, 'json');
}

/**
 * 编辑核查/批量编辑
 * /promise/verify/editVerifyTask
 */
export function editVerifyTask (data) {
    const url = zlbApi.editVerifyTask;
    return myFetch(url, 'post', data, 'json');
}

/**
 * 提醒列表
 * /promise/reminder/getReminderList
 */
export function getReminderList (data) {
    const url = zlbApi.getReminderList;
    return myFetch(url, 'get', data, 'json');
}

/**
 * 提醒详情
 * /promise/reminder/reminderDetails
 */
export function reminderDetails (data) {
    const url = zlbApi.reminderDetails;
    return myFetch(url, 'get', data, 'json');
}