import {mapUrl,stationurl,brigade} from "../../../public/js/url.js"; import {getstationcount,stationInfoPageReq} from "./orgApi/getStationInfo.js"; import {connectClockStationWebsocket} from "../api/stationDeviceWebsocket.js" import {drawSchoolClockMarker} from "./marker/schoolMarker.js"; import {initClockSchoolSearchSelect} from "./schoolSearch.js" import {} from "./event.js" var clockMap=null; var layuiObj={}; var clockStationsInfoArr=[]; var signedSchoolArr=[]; var clockloginInfo=null; layui.use(['carousel','table','form','laydate','slider','element'],function() { layuiObj["layer"] = layui.layer; layuiObj["carousel"] = layui.carousel; layuiObj["layuitable"] = layui.table; layuiObj["rate"] = layui.rate; layuiObj["layuiForm"] = layui.form; layuiObj["laydate"] =layui.laydate; layuiObj["slider"] =layui.slider; layuiObj["element"] =layui.element; var loginJson=sessionStorage.getItem("unameInfoStr"); clockloginInfo=JSON.parse(loginJson); axios.defaults.headers.common['Authorization'] = clockloginInfo["session"]; clockMapInit(); }) async function clockMapInit(){ clockMap = L.map('clockMap',{ center: [28.19,113.03], zoom: 15, attributionControl:false, zoomControl:false, minZoom :1, maxZoom :18 }); L.tileLayer(`${mapUrl}/roadmap/{z}/{x}/{y}.png`, { attribution: '' }).addTo(clockMap); //获取学校的信息 var stationcountRes=await getstationcount(); var stationcount=stationcountRes.data.data.count; var stationlistRes= await stationInfoPageReq(stationcount) stationlistRes.forEach(item=>{ var data=item.data.data; for(let i=0;i{ if(item["totalsign"]>0){ totalsign+=item["totalsign"];//总的 volunteer_sign+=item["volunteer_sign"];//志愿者 police_sign+=item["police_sign"];//警察 guarder_sign+=item["guarder_sign"];//保安 pointCount++; } }) $(".totalsign").html(totalsign); $(".volunteer_sign").html(volunteer_sign); $(".police_sign").html(police_sign); $(".guarder_sign").html(guarder_sign); $(".fininshPointCount").html(pointCount); $(".no_sign").html(signedSchoolArr.length-pointCount); } export { clockStationsInfoArr, signedSchoolArr, clockloginInfo, clockMap, layuiObj, initSchoolSignedData }