batchesResultApi.js 1.44 KB
import axiosInstance from "@/Request/PublicAxiosInstance"
import {filterEmptyValueInObject} from "@/PublicUtil/PublicUtil"

class ClusterResultApi {
    getBatchesResultList(data) {
        return axiosInstance.request(
            {
                method: 'GET',
                url: `/car4s/group/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
                    },
                )
            }
        )
    }

		// 合并批次分组
		concatTwoBatches(data) {
		    return axiosInstance.request(
		        {
		            method: 'PUT',
		            url: `/car4s/group/merge`,
								data: filterEmptyValueInObject(data)
		        }
		    )
		}
		
		// 删除批次记录
    deleteOneBatches(data) {
        return axiosInstance.request(
            {
                method: 'PUT',
                url: `/car4s/group/remove`,
								data: filterEmptyValueInObject(data)
            }
        )
    }
}

const clusterResultApi = new ClusterResultApi()

export default clusterResultApi