ClusterResultApi.js 2.42 KB
import axiosInstance from "@/Request/PublicAxiosInstance"
import {filterEmptyValueInObject} from "@/PublicUtil/PublicUtil"

class ClusterResultApi {
    getClusterResultList(data) {
        return axiosInstance.request(
            {
                method: 'GET',
                url: `/car4s/reception/page`,
                params: filterEmptyValueInObject(
                    data
                )
            }
        )
    }

    getAccountList() {
        return axiosInstance.request(
            {
                method: 'GET',
                url: `/accounts`,
            }
        )
    }

    getPlazaList(data) {
        return axiosInstance.request(
            {
                method: 'GET',
                url: `/malls`,
                params: filterEmptyValueInObject(
                    {
                        accountIds: data.account_id
                    },
                )
            }
        )
    }

    getZoneList(data) {
        return axiosInstance.request(
            {
                method: 'GET',
                url: `/zones/zoneList`,
                params: filterEmptyValueInObject(
                    {
                        account_id: data.account_id,
                        plaza_id: data.plaza_id,
                    },
                )
            }
        )
    }

    getGateList(data) {
        return axiosInstance.request(
            {
                method: 'GET',
                url: `/gates/gateByInfo`,
                params: filterEmptyValueInObject(
                    {
                        account_id: data.account_id,
                        plaza_id: data.plaza_id,
                        zone_id: data.zone_id,
                        type: data.type,
                    },
                )
            }
        )
    }
    
    getBodyPoint(data) {
        return axiosInstance.request(
            {
                method: 'GET',
                url: `/feature/bodyPoint`,
                params: filterEmptyValueInObject(
                    data
                )
            }
        )
    }
		
		// 上传接待记录
		uploadReception(data) {
		    return axiosInstance.request(
		        {
		            method: 'POST',
		            url: `/car4s/reception/upload`,
								headers: {
								    'Content-Type': 'multipart/form-data'
								},
								data: data
		        }
		    )
		}
}

const clusterResultApi = new ClusterResultApi()

export default clusterResultApi