//实时异常的信息窗体
export default function (data) {
const { eventType, eventNO, eventName, eventPlace, eventAnnex, position, alarmTime } = data;
let submitPerson = eventAnnex && JSON.parse(eventAnnex)[0].userName;
var content = [];
content.push(
"
" +
eventType +
"
事件标题:" +
eventName +
"
事件编号:" +
eventNO +
"
事件地址:" +
eventPlace +
"
事件时间:" +
eventName +
"
提交人:" +
submitPerson +
"
"
);
content.join("
");
var info = document.createElement("div");
info.className = "content-window-card";
//可以通过下面的方式修改自定义窗体的宽高
info.style.width = "300px";
// 定义内容
var middle = document.createElement("div");
middle.className = "info-middle";
middle.innerHTML = content;
info.appendChild(middle);
//定义详情
var detail = document.createElement("div");
detail.className = "detail-div";
info.appendChild(detail);
//定义关闭按钮
// var detail = document.createElement("div");
// detail.className = "close-div";
// var a = document.createElement("a");
// a.innerHTML = "x";
// a.onclick = () => {
// this.clear('setSelectIndex')
// };
// detail.appendChild(a);
info.appendChild(detail);
return info;
}