You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
66 lines
1.7 KiB
66 lines
1.7 KiB
import request from '@/utils/request'
|
|
|
|
function customParamsSerializer(params) {
|
|
let result = '';
|
|
for (let key in params) {
|
|
if (params.hasOwnProperty(key)) {
|
|
if (Array.isArray(params[key])) {
|
|
params[key].forEach((item,index) => {
|
|
if(item.key){
|
|
result += `${key}[${index}][key]=${item.key}&${key}[${index}][op]=${item.op}&${key}[${index}][value]=${item.value}&`;
|
|
|
|
}else{
|
|
result +=`${key}[${index}]=${item}&`
|
|
}
|
|
});
|
|
}else if( typeof params[key] === 'object' ){
|
|
for(var k in params[key]){
|
|
result +=`${key}[${k}]=${params[key][k]}&`
|
|
}
|
|
} else {
|
|
result += `${key}=${params[key]}&`;
|
|
}
|
|
}
|
|
}
|
|
|
|
// result += 'token='+getToken()
|
|
console.log("result",result, result.slice(0, -1))
|
|
return result.slice(0, -1);
|
|
}
|
|
export function endIndex2(params, noloading = false) {
|
|
return request({
|
|
method: 'get',
|
|
url: '/api/ht/contract/end-index-v2',
|
|
params,
|
|
noloading,
|
|
paramsSerializer: customParamsSerializer
|
|
})
|
|
}
|
|
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
|
|
})
|
|
}
|