import { getBoroughInfo } from "./orgApi/getBoroughInfo.js"; import { getDetachmentInfo } from "./orgApi/getDetachmentInfo.js"; import { getstationcount,stationInfoPageReq } from "./orgApi/getStationInfo.js"; import { getSkynetIpcList } from "./orgApi/getSkynetIpcList.js"; import { getSignedSchools } from "./orgApi/getSignedSchools.js"; import { getStarRatingList } from "./orgApi/getStarRatingList.js"; import { getColorratingList } from "./orgApi/getColorratingList.js"; import { getAlarmEventDiff } from "./orgApi/getAlarmEventDiff.js"; import { getSkynetFaceAlarmLast } from "./orgApi/getSkynetFaceAlarmLast.js"; import { getAibehavioralEventLast } from "./orgApi/getAibehavioralEventLast.js"; import { getMdevAlarmByorgList } from "./orgApi/getMdevAlarmByorgList.js"; import { getSensorAlarmEventList } from "./orgApi/getSensorAlarmEventList.js"; import { getMdevCount,mdevInfoPageReq} from "./orgApi/getMdevList.js"; import { showSchoolDistribution } from "./pages/schooldistribution.js"; import { showStartRating } from "./pages/startRating.js"; import { showColorRating } from "./pages/threeColor.js"; import { showScholStyle } from "./pages/schoolStyle.js"; import { schoolVideoPolling } from "./pages/schoolVideoPolling.js"; import { showSchoolclockInData } from "./pages/schoolClockIn.js"; import { showIpcAlarmList } from "./pages/ipcAlarm.js"; import { showIntelligentAlarm } from "./pages/showIntelligentAlarm.js"; import { addNavEvent } from "./event.js"; import { getWeekDate,getCurrentTimeM } from "../../../public/js/timestamp.js"; import { setTokenActive } from "./session.js"; import { getYearStarTime,getYearColorTime } from "../../newIndex/js/orgApi/getYearTime.js"; import { serverIp } from "../../../public/js/url.js"; let boroughArr=[]; let detachmentArr=[]; let stationList=[];//学校列表 let moveDeviceHash={};//移动设备 let ipcSkyArr=[];//摄像头 let ipcSkyStationHash={}; let starRatingList=[];//获取星级评定的列表 let colorRatingList=[];//获取三色预警的列表 let signedSchoolsArr=[];//获取打卡的数据 let ipcAlarmList=[];//ipc告警的数据 let skynetFaceAlarmList=[];//查询天网告警,最新的5条 let aiBehavioralEventList=[];//行为预警,最近10条 let mdevAlarmByorgList=[];//移动告警,半年的 let sensorAlarmEventList=[];//一键告警pushbutton的,最近半年的 let layuiObj={}; var starYearTimeList=[]; var colorYearTimeList=[]; var unameInfoStr=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; unameInfoStr = JSON.parse(sessionStorage.getItem("unameInfoStr")); initIndexApi(); }) async function initIndexApi(){ //1.给axios设置Authorization setAuthorizationAxios(); //设置seesion有效时长 setTokenActive(); //获取评分时间 var yearReq=await getYearStarTime() starYearTimeList=yearReq.data.data; var yearReq=await getYearColorTime() colorYearTimeList=yearReq.data.data; await getBoroughList(); await getDetachmentList(); //获取所有的学校信息 await getStationList(); //获取学校的保安数据 await getMdevList(); //获取IPC await getIpcList(); //获取打卡的数据 await getSignedSchoolsList() //获取星级评定 await getStarRatingListReq(); //获取三色预警 await getColorratingListReq(); //获取告警的数据 await getAlarmList(); await getSkynetFaceAlarmReq(); await getAiBehavioralEventReq(); await getMdevAlarmByorgListReq(); await getSensorAlarmEventListReq(); //显示所有的数据 showIndexDataPage(); //显示系统的时间跟星期 showSystemTime(); //是否显示海康的视频 showHikVideoPage(); //添加弹出层点击事件 addNavEvent(); } function showHikVideoPage(){ if(serverIp=="www.lonsungsh.com"){{ var oli=`
  • 实时视频
  • `; $(".schoolNavContent>ul").append(oli) }} } //显示系统的时间跟星期 function showSystemTime(){ $(".systemweek").html(getWeekDate()); $(".systemtime").html(getCurrentTimeM()); setInterval(()=>{ $(".systemtime").html(getCurrentTimeM()); },1000) } //获取派出所信息 async function getBoroughList(){ var boroughReq= await getBoroughInfo(); if(boroughReq.data.data!=null){ boroughArr=boroughReq.data.data; } } //获取警务区 async function getDetachmentList(){ var detachmentRes= await getDetachmentInfo(); if(detachmentRes.data.data!=null){ detachmentArr=detachmentRes.data.data; } } //获取所有的学校信息 async function getStationList(){ 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{ var data=item.data.data; for(let i=0;i