ClusterResultApi.js 4.8 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,
                    },
                )
            }
        )
    }
		// 查询系统级人员类型
		getPersonType(data) {
		    return axiosInstance.request(
		        {
		            method: 'GET',
		            url: `/persontype/getByMallId`,
		            params: filterEmptyValueInObject(
		                {
		                    plaza_id: data.plaza_id,
		                },
		            )
		        }
		    )
		}
		// 查询集团级人员类型
		getPersonPoolType(data) {
		    return axiosInstance.request(
		        {
		            method: 'GET',
		            url: `/persontype/getPersonPoolType`,
		            params: filterEmptyValueInObject(
		                {
		                    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
                )
            }
        )
    }
		// 聚类结果--上传数据
    uploadGroupData(data) {
        return axiosInstance.request(
            {
                method: 'POST',
                url: `/faceRecognitions/sendDataToLabel`,
                data: data
            }
        )
    }
    // 人员类型修正
    updatePerson(data) {
        return axiosInstance.request(
            {
                method: 'POST',
                url: `/faceRecognitions/updatePerson`,
                data: data
            }
        )
    }
    // 多选删除
    deletePerson(data) {
        return axiosInstance.request(
            {
                method: 'DELETE',
                url: `/faceRecognitions/${data.id}`,
            }
        )
    }
		// 添加店员库
		addDataToShopkeeper(data) {
		    return axiosInstance.request(
		        {
		            method: 'POST',
		            url: `/faceRecognitions/addStaff`,
		            data: data
		        }
		    )
		}
		// 添加人员库
		addPerson(data) {
		    return axiosInstance.request(
		        {
		            method: 'POST',
		            url: `/faceRecognitions/addPerson`,
		            data: data
		        }
		    )
		}
    // 剔除或移动
    updateRecognition(data) {
        return axiosInstance.request(
            {
                method: 'POST',
                url: `/faceRecognitions/updateRecognition`,
                data: data
            }
        )
    }
    // 删除图片
    deleteRecognition(data) {
        return axiosInstance.request(
            {
                method: 'POST',
                url: `/faceRecognitions/batchDelete`,
                data: data
            }
        )
    }
    // 获取UUID,移动图片时需要
    getClusterResultUidList(data) {
        return axiosInstance.request(
            {
                method: 'GET',
                url: `/faceRecognitions/faceIdsGroup`,
                params: filterEmptyValueInObject(
                    data
                )
            }
        )
    }
}

const clusterResultApi = new ClusterResultApi()

export default clusterResultApi