import { requests } from './index';
const PREFIX = 'api-marketing/';

import config from '@/config';
export const url = config.api + PREFIX;

//智能营销--ECM营销引擎分页列表
export const loadEcmList = params => requests(PREFIX + 'page-ecm-list', params);

//扫码营销--分页列表排序
export const changeEcmPlanSort = params => requests(PREFIX + 'change-ecm-plan-sort', params);

//扫码营销-日志
export const listEcmScanLogPage = params => requests(PREFIX + 'list-ecm-scan-log-page', params);

//智能营销--ECM营销引擎-- 删除
export const deleteEcm = params => requests(PREFIX + 'delete-ecm', params);

//智能营销--ECM营销引擎-- 支付方式查询
export const gicPaymentList = params => requests(PREFIX + 'query-gic-payment-list', params);

//智能营销--ECM营销引擎-- 新建/修改 回显智能引擎计划信息
export const getEcmInfo = params => requests(PREFIX + 'get-ecm-info', params);

// 智能营销--ECM营销引擎-- 新建/修改 [保存]计划信息
export const saveEcmInfo = params => requests(PREFIX + 'save-update-ecm', params);

// 智能营销--下线
export const offlineEcmPlan = params => requests(PREFIX + 'ecm-plan-offline', params);

// 智能营销--记录--批次记录页面
export const ecmBatchSendInfos = params => requests(PREFIX + 'ecm-batch-send-infos', params);

// 智能营销--记录--批次人员列表
export const ecmBatchSendDetails = params => requests(PREFIX + 'ecm-batch-send-details', params);

// 智能营销--实时发送记录类型
export const ecmCurrentSendInfos = params => requests(PREFIX + 'ecm-current-send-infos', params);

// 智能营销--实时发送人员列表
export const ecmCurrentSendDetails = params => requests(PREFIX + 'ecm-current-send-details', params);

// 智能营销--记录--批次人员列表 导出csv
export const exportBatchSendDetails = config.api + PREFIX + 'export-batch-send-details';

// 智能营销--实时人员列表--导出csv
export const exportCurrentSendDetails = config.api + PREFIX + 'export-current-send-details';

// 智能营销--触达效果
export const ecmTouchEffectColumnDiagram = params => requests(PREFIX + 'ecmTouchEffectColumnDiagram', params);
export const ecmTouchEffectTable = params => requests(PREFIX + 'ecmTouchEffectTable', params);
export const ecmTouchTypeTableList = params => requests(PREFIX + 'ecmTouchTypeTableList', params); // 获取（1 群发任务、2 群发失败-话务、3 群发失败-短信、4 话务、5 短信、6 微信）列表
export const ecmPlanTouchConfig = params => requests(PREFIX + 'ecmPlanTouchConfig', params);
export const getCardLeads = params => requests(PREFIX + 'getCardLeads', params); // 卡券收益
export const getCardLeadsList = params => requests(PREFIX + 'getCardLeadsList', params); // 卡券收益表格
// 计划整体详情
export const overAllList = params => requests(PREFIX + 'ecmOverAllTable', params); // 单独数据
export const overAllTable = params => requests(PREFIX + 'ecmOverAllPage', params); // 下钻表格
export const overAllTableExport = config.api + PREFIX + 'ecmOverAllPageExport'; // 导出数据
// 话务详情
export const telTaskDiagram = params => requests(PREFIX + 'ecmTelTaskColumnDiagram', params); // 柱线图
export const telTaskList = params => requests(PREFIX + 'ecmTelTaskTable', params); // 单独数据
export const telTaskTable = params => requests(PREFIX + 'ecmTelTaskPage', params); // 下钻表格
export const telTaskTableExport = config.api + PREFIX + 'ecmTelTaskPageExport'; // 导出数据
// 群发详情
export const massDiagram = params => requests(PREFIX + 'ecmMassColumnDiagram', params); // 柱线图
export const massList = params => requests(PREFIX + 'ecmMassTaskTable', params); // 单独数据
export const massTable = params => requests(PREFIX + 'ecmMassTaskPage', params); // 下钻表格
export const massTableExport = config.api + PREFIX + 'ecmMassTaskPageExport'; // 导出数据
// 营销类型
export const getTouchType = params => requests(PREFIX + 'ecmTouchTypeForWx', params);
// 智能营销线索页tree
export const getGroupTree = params => requests(PREFIX + 'getGroupTree', params);

export const getUseStoredFalg = params => requests(PREFIX + 'get-ecm-store-flag', params);

export const getXsxsFalg = params => requests(PREFIX + 'get-xsxs-open-flag', params);

export const getEcmLog = params => requests(PREFIX + 'get-ecm-operator_log', params);

export const getLinkResourceStatus = params => requests('api-admin/get-link-resource-status', params);

export const getLinkResourceStatusECM = params => requests('api-admin/get-link-resource-status-ecm', params);
