import { stationurl,brigade } from "../../public/js/url.js"; import { layuiObj} from "../../pages/cmddispatch/js/index.js" import {getCurrData} from "../../public/js/timestamp.js"; import {getSchoolOptions} from "../cmddispatch/js/tree.js"; import {showAlarmEventImg} from "../cmddispatch/js/orgApi/getAlarmEventList.js" var identityWaringArr=[]; var identityWaringLoad=null; function getIdentityWaringEventList(data){ var loginurl=stationurl+"/firectrl/client/sensor/alarm_event/getlist_diff"; return axios({ method: 'post', url:loginurl, data: data }) } function load(){ identityWaringLoad= layuiObj.layer.load(); } function closeLoad(){ layuiObj.layer.close(identityWaringLoad); } function showIdentityWaring(){ layuiObj.layer.open({ type: 1, title: '身份预警', //不显示标题栏 area: ['1400px', '580px'], shade: 0.6, id:new Date().getTime(), //设定一个id,防止重复弹出 btnAlign: 'c', moveType: 1, //拖拽模式,0或者1 content: `
`, success: function(layero){ identityWaringFromRender(); showIdentityWaringHistoryContent([]) } }); } function identityWaringFromRender(){ $("#identityWaringHistorySelect").html(getSchoolOptions()); layuiObj.layuiForm.render("select","identityWaringHistoryForm"); layuiObj.laydate.render({ elem: '#identityWaringHistoryStart', type: 'datetime', }); layuiObj.laydate.render({ elem: '#identityWaringHistoryEnd', type: 'datetime', }); $("#identityWaringHistoryBtn").on('click',function(e){ e.preventDefault(); var station=$("#identityWaringHistorySelect").find("option:selected").val(); var signobj={ "brigade":brigade, "pagesize":2000, "pageindex":0, "start":$("#identityWaringHistoryStart").val(), "end":$("#identityWaringHistoryEnd").val() } if(station!="000"){ signobj["station"]=station } load(); getIdentityWaringEventList(signobj).then(res=>{ identityWaringArr=[]; var code=res.data.code; if(code==0){ var data=res.data.data; for(var i=0;i` }}, {field:'opear', width:"20%", title: '操作',toolbar: '#identityWaringScript'}, ]], limit:Number.MAX_VALUE // 数据表格默认全部显示 }); //监听行工具事件 layuiObj.layuitable.on('tool(identityWaringHistoryTable)',function(obj){ var data=obj["data"]; showAlarmEventImg(data) }) } export {showIdentityWaring}