import request from '@/utils/request' function customParamsSerializer(params) { let result = '' for (const key in params) { if (params.hasOwnProperty(key)) { if (Array.isArray(params[key])) { params[key].forEach((item, index) => { if (item instanceof Array) { item.forEach((item1, index1) => { result += `${key}[${index}][${index1}]=${item1}&` }) } else if (typeof item === 'object') { for (const key1 in item) { result += `${key}[${index}][${key1}]=${item[key1]}&` } } // result += `${key}[${index}][key]=${item.key}&${key}[${index}][op]=${item.op}&${key}[${index}][value]=${item.value}&`; }) } else { result += `${key}=${params[key]}&` } } } return result.slice(0, -1) } export function endIndex(params, noloading = false) { return request({ method: 'get', url: '/api/ht/contract/end-index', params, noloading, paramsSerializer: customParamsSerializer }) } export function partIndex(params, noloading = false) { return request({ method: 'get', url: '/api/ht/contract/part-index', params, noloading, paramsSerializer: customParamsSerializer }) } export function statisticDepartment(params) { return request({ method: 'get', url: '/api/ht/notice/statistic-department-v2', params }) }