84 lines
3.0 KiB
JavaScript
84 lines
3.0 KiB
JavaScript
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} |