SnapshotRecordApi.js 2.25 KB
import axiosInstance from "@/Request/PublicAxiosInstance"
import {filterEmptyValueInObject} from "@/PublicUtil/PublicUtil"

class SnapshotRecordApi {
    getSnapshotRecordList(data) {
        return axiosInstance.request(
            {
                method: 'GET',
                url: `/faceRecognitions/faceRecord`,
                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
                    },
                )
            }
        )
    }
    getResidenceList(data) {
        return axiosInstance.request(
            {
                method: 'GET',
                url: `/residence`,
                params:data
            }
        )
    }

    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,
                    },
                )
            }
        )
    }
    delRecord(data) {
        return axiosInstance.request(
            {
                method: 'DELETE',
                url: `/faceRecognitions/${data.id}`,
            }
        )
    }

}

const snapshotRecordApi = new SnapshotRecordApi()

export default snapshotRecordApi