38 lines
797 B
JavaScript
38 lines
797 B
JavaScript
|
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);
|
||
|
}
|