anxiao_web/pages/newIndex/js/orgApi/getMdevList.js

38 lines
797 B
JavaScript
Raw Normal View History

2024-07-24 09:22:32 +08:00
import { brigade,movedeviceurl } from "../../../../public/js/url.js";
export function getMdevCount(){
var data={
"brigade":brigade
}
var url=movedeviceurl+"/mdev/getcount";
return axios({
method: 'post',
url:url,
data:data
})
}
function getMdevList(data){
var url=movedeviceurl+"/mdev/getlist";
return axios({
method: 'post',
url:url,
data:data
})
}
export function mdevInfoPageReq(result){
var count=500;
var page=Math.ceil(result/count);
var stationlist=[];
for(let i=0;i<page;i++){
var obj={
"brigade":brigade,
"pagesize":count,
"pageindex":i,
}
stationlist.push(getMdevList(obj));
}
return Promise.all(stationlist);
}