anxiao_web/pages/cmddispatch/js/popNotifyDetail.js

84 lines
3.0 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import {layuiObj} from './index.js';
let notifyDetailIndex=null;
function notifyDetailList(notifyDetail){
if(notifyDetailIndex==null){
notifyDetailIndex=layuiObj["layer"].open({
type: 1,
title: false, //不显示标题栏
closeBtn: false,
area: ['580px', 'auto'],
shade: 0,
id: new Date().getTime(), //设定一个id防止重复弹出
move:'.layui-move',
moveType: 1, //拖拽模式0或者1
content:`<div class="popTaskDetail">
<div class="taskDetailBox">
<div class="taskDetailTitle" >
<span class="layui-move">通知详情</span>
<img src="./pages/cmddispatch/image/closeInfoWindow.png">
</div>
<div class="taskDetailContent">
<div>
<p>
<span>通知标题:</span>
<span>${notifyDetail["title"]}</span>
</p>
</div>
<div>
<p>
<span>通知内容:</span>
<span>${notifyDetail["content"]}</span>
</p>
</div>
<div>
<p>
<span>下发时间:</span>
<span>${notifyDetail["timestamp"]}</span>
</p>
</div>
<div>
<p>
<span>接受者:</span>
<span>${notifyDetail["showname"]}</span>
</p>
</div>
<div>
<p>
<span>查看时间</span>
<span>${notifyDetail["readtime"]}</span>
</p>
</div>
<div>
<p>
<span>消息状态:</span>
${notifyDetail['img']}
</p>
</div>
<div>
<p>
<span>发送者</span>
${notifyDetail['sender']}
</p>
</div>
</div>
</div>
</div>`
})
}else{
closeNotifyIndex()
taskDetailList();
}
//关闭
$(".taskDetailTitle>img").click(function(){
closeNotifyIndex()
})
}
function closeNotifyIndex(){
layuiObj["layer"].close(notifyDetailIndex);
notifyDetailIndex=null;
}
export {notifyDetailList}