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

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

    // 人员类型修正
    updatePerson(data) {
        return axiosInstance.request(
            {
                method: 'POST',
                url: `/faceRecognitions/updatePerson`,
                data: data
            }
        )
    }
}

const clusterResultApi = new ClusterResultApi()

export default clusterResultApi