SnapshotRecordApi.js 2.94 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`,
            }
        )
    }
		getProductList(data) {
		    return axiosInstance.request(
		        {
		            method: 'GET',
		            url: `/product/list`,
		            params: filterEmptyValueInObject(
		                {
		                    accountId: data.account_id
		                },
		            )
		        }
		    )
		}
		// 查询系统级人员类型
		getPersonType(data) {
		    return axiosInstance.request(
		        {
		            method: 'GET',
		            url: `/persontype/getByMallId`,
		            params: filterEmptyValueInObject(
		                {
		                    plaza_id: data.plaza_id,
		                },
		            )
		        }
		    )
		}

    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