anxiao_web/pages/newIntelligenceEarlyWarning/js/schoolSearch.js

26 lines
784 B
JavaScript
Raw Permalink Normal View History

2024-07-24 09:22:32 +08:00
import {layuiObj,stationInfoTableList} from "./index.js"
//获取所有的设备
function getSchoolOptions(){
var options="<option value='000'>请选择学校</option>"
for(var i=0;i<stationInfoTableList.length;i++){
var name=stationInfoTableList[i]["name"];
options+=`<option value="${name}">${name}</option>`
}
return options;
}
//监听select变化
function schoolSearchSelectChange(){
layuiObj.layuiForm.on('select(mainContentC_schoolSelect)', function(data){
var name=data["value"];
for(var i=0;i<stationInfoTableList.length;i++){
if(name==stationInfoTableList[i]["name"]){
ccconsole.log(stationInfoTableList[i]);
break;
}
}
})
}
export {getSchoolOptions}