42 lines
920 B
JavaScript
42 lines
920 B
JavaScript
import { brigade,stationurl } from "../../../../public/js/url.js";
|
|
import { unameInfoStr } from "../index.js";
|
|
function getstationcount(){
|
|
var data={
|
|
"brigade":brigade
|
|
}
|
|
var url=stationurl+"/firectrl/client/getstationcount";
|
|
return axios({
|
|
method: 'post',
|
|
url:url,
|
|
data:data
|
|
})
|
|
}
|
|
|
|
function getstationlist(data){
|
|
var url=stationurl+"/firectrl/client/getstationlist";
|
|
return axios({
|
|
method: 'post',
|
|
url:url,
|
|
data:data
|
|
})
|
|
}
|
|
|
|
function stationInfoPageReq(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(getstationlist(obj));
|
|
}
|
|
return Promise.all(stationlist);
|
|
}
|
|
|
|
export {
|
|
getstationcount,
|
|
stationInfoPageReq
|
|
} |