baseReport.js 2.82 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)
    },
}

export default baseReport;