import { boroughInfoArr,layuiObj } from "./index.js"; import { getEntranceStaffSign,showEntranceStaffSign } from "./orgApi/getEntranceStaffSign.js"; function showSchoolBaseInfo(obj){ var div=getSchoolInfoDiv(obj); $(".schoolBaseInfo").html(div); $(".schoolName").html(obj["name"]); var value= getGradeValue(obj["score_total"]) //显示文字 layuiObj["rate"].render({ elem: '.schoolInfoGrade', value: value ,//初始值 readonly:true }); $(".policeName").html(obj["borough"]) showBoroughInfo(obj); } function getSchoolInfoDiv(obj){ return `

校园地址: ${obj["address"]}

派出所: ${obj["borough"]}

校长: ${obj["legal_person"]}(${obj["legal_person_phone"]})

综治专干: ${obj["specially_police"]}(${obj["specially_police_phone"]})

职工数量: ${obj["teachers"]}

学生数量: ${obj["students"]}

安保人员: ${obj["guardersmax"]}

校车数量: ${obj["schoolbus"]}

登记车辆: ${obj["vehicles"]}

校外监控: 10

校内监控: 10

安装率: 80%

0?'./pages/cmddispatch/image/optionOK.png':'./pages/cmddispatch/image/optionNO.png'}" alt=""> 防冲撞设施

0?'./pages/cmddispatch/image/optionOK.png':'./pages/cmddispatch/image/optionNO.png'}" alt=""> 封闭式管理

0?'./pages/cmddispatch/image/optionOK.png':'./pages/cmddispatch/image/optionNO.png'}" alt=""> 护学岗

0?'./pages/cmddispatch/image/optionOK.png':'./pages/cmddispatch/image/optionNO.png'}" alt=""> 监控联网

0?'./pages/cmddispatch/image/optionOK.png':'./pages/cmddispatch/image/optionNO.png'}" alt=""> 紧急报警

0?'./pages/cmddispatch/image/optionOK.png':'./pages/cmddispatch/image/optionNO.png'}" alt=""> 明厨亮灶

` } function getGradeValue(score_total){ var value=0; if(score_total<=20){ value=1; }else if(score_total<=40){ value=2; }else if(score_total<=60){ value=3; }else if(score_total<=80){ value=4; }else if(score_total<=80){ value=5; } return value; } function showBoroughInfo(obj){ var borough=obj["borough"]; var div=``; for(var i=0;i

派出所: ${boroughInfoArr[i]["legal_person"]}(${boroughInfoArr[i]["phone"]})

派出所地址: ${boroughInfoArr[i]["address"]}

`; } } $(".policeBaseInfo").html(div); getEntranceStaffSign(obj).then(res=>{ var code=res["data"]["code"]; if(code==0){ var data=res["data"]["data"]; showEntranceStaffSign(data) } }) } export { showSchoolBaseInfo, getSchoolInfoDiv, getGradeValue }