import { stationurl,brigade } from "../../../../public/js/url.js"; import { getCurrData } from "../../../../public/js/timestamp.js"; import { layuiObj } from "../index.js"; var alarmEventList=[]; function getAlarmEventList(){ var data={ "brigade":brigade, "pagesize":2000, "pageindex":0, "start":getCurrData()+" 00:00:00", "end":getCurrData()+" 23:59:59", "state":"close" } var loginurl=stationurl+"/firectrl/client/sensor/alarm_event/getlist_diff"; return axios({ method: 'post', url:loginurl, data: data }) } function showAlarmEventList(){ alarmEventList=[]; getAlarmEventList().then(res=>{ var code=res.data.code; if(code==0){ var data=res.data.data; for(var i=0;i` }}, ]], limit:Number.MAX_VALUE // 数据表格默认全部显示 }); //监听行工具事件 layuiObj.layuitable.on('tool(eventUpload)',function(obj){ var data=obj["data"]; showAlarmEventImg(data) }) } var alarmEventIndex=null; function showAlarmEventImg(data){ var eventDataJson=data.eventData; var eventData=JSON.parse(eventDataJson); var pic=eventData["pic"]; alarmEventIndex=layuiObj.layer.open({ type: 1, title: '事件照片', //不显示标题栏 offset: 'auto', shade: 0.6, id:new Date().getTime(), //设定一个id,防止重复弹出 btnAlign: 'c', moveType: 1, //拖拽模式,0或者1 content: `

报警信息

预警点:${data["station"]}

预警类型:${data["alarmType"]}

预警时间:${data["timestamp"]}

`, success: function(layero){ } }); } export { showAlarmEventList, alarmEventListTable, alarmEventList }