baseReport.js 3.63 KB
import req from '@/api/http.js'

// baseReport 是定义基础报表的接口
const baseReport = {
    /**
     * 集团取报表 key id
     * @param {Object} params 
     * @param {Object} config 
     */
    reportChart(params, config) {
        return req('get', '/reportCharts', params, config)
    },
    /**
     * 集团单个报表
     * @param {String} reportType 
     * @param {Number} chartId 
     * @param {Object} params 
     * @param {Object} config 
     */
    reportAccSingleChart(reportType, chartId, params, config) {
        return req('get', `/report/${reportType}/account/${chartId}`, params, config)
    },
    /**
     * 集团报表
     * @param {String} reportType 
     * @param {Object} params 
     * @param {Object} config 
     */
    accountReport(reportType, params, config) {
        return req('get', `/report/${reportType}/account`, params, config)
    },
    /**
     * 商场报表
     * @param {String} reportType 
     * @param {Object} params 
     * @param {Object} config 
     */
    mallReport(reportType, params, config) {
        return req('get', `/report/${reportType}/mall`, params, config)
    },
    /**
     * 月份里客流最高位和最低位
     */
    mallReportMaxMin(reportType, params, config) {
        return req('get', `mallDayCountDatas/threshold/${reportType}`, params, config)
    },
    /**
     * 商场单个报表
     * @param {String} reportType 
     * @param {Number} chartId 
     * @param {Object} params 
     * @param {Object} config 
     */
    reportMallSingleChart(reportType, chartId, params, config) {
        return req('get', `/report/${reportType}/mall/${chartId}`, params, config)
    },
    /**
     * 楼层报表
     * @param {String} reportType 
     * @param {Object} params 
     * @param {Object} config 
     */
    floorReport(reportType, params, config) {
        return req('get', `/report/${reportType}/floor`, params, config)
    },
    /**
     * 楼层单个报表
     * @param {String} reportType 
     * @param {Number} chartId 
     * @param {Object} params 
     * @param {Object} config 
     */
    reportFloorSingleChart(reportType, chartId, params, config) {
        return req('get', `/report/${reportType}/floor/${chartId}`, params, config)
    },
    /**
     * 店铺报表
     * @param {String} reportType 
     * @param {Object} params 
     * @param {Object} config 
     */
    zoneReport(reportType, params, config) {
        return req('get', `/report/${reportType}/zone`, params, config)
    },
    /**
     * 店铺单个报表
     * @param {String} reportType 
     * @param {Number} chartId 
     * @param {Object} params 
     * @param {Object} config 
     */
    reportZoneSingleChart(reportType, chartId, params, config) {
        return req('get', `/report/${reportType}/zone/${chartId}`, params, config)
    },


    // 获取集团头部信息
    accountReportHead(reportType, params, config) {
        return req('get', `/report/${reportType}/account/head`, params, config)
    },

    // 获取集团报表 body
    accountReportBody(reportType, params, config) {
        return req('get', `/report/${reportType}/account/body`, params, config)
    },
      /**
     * 店铺漏斗报表
     * @param {String} reportType 
     * @param {Number} chartId 
     * @param {Object} params 
     * @param {Object} config 
     */
    reportZoneFunnelChart(reportType, params, config) {
        return req('get', `/report/${reportType}/zone/trafficFunnel`, params, config)
    },

    /**
     * 店铺关联报表
     */
    zoneAssociatedReport(params, config) {
        return req('get', `/report/day/zone/sankey`, params, config)
    }
}

export default baseReport;