26 lines
782 B
JavaScript
26 lines
782 B
JavaScript
|
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"]){
|
||
|
console.log(stationInfoTableList[i]);
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
})
|
||
|
}
|
||
|
|
||
|
export {getSchoolOptions}
|