100 lines
3.8 KiB
JavaScript
100 lines
3.8 KiB
JavaScript
|
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"
|
|||
|
function showbuttonWarning(){
|
|||
|
layuiObj.layer.open({
|
|||
|
type: 1,
|
|||
|
title: '一键报警', //不显示标题栏
|
|||
|
area: ['1400px', '580px'],
|
|||
|
shade: 0.6,
|
|||
|
id:new Date().getTime(), //设定一个id,防止重复弹出
|
|||
|
btnAlign: 'c',
|
|||
|
moveType: 1, //拖拽模式,0或者1
|
|||
|
content: `<div style="padding:10px;color:#fff;background:#032357;height:calc(100% - 20px);overflow-y:auto;">
|
|||
|
<div class="staffSignSelectInfo">
|
|||
|
<form class="layui-form" action="" id="staffSignHistoryForm" lay-filter="staffSignHistoryForm" >
|
|||
|
<div class="layui-input-inline">
|
|||
|
<select name="interest" lay-filter="staffSignHistorySelect" id="staffSignHistorySelect" lay-search></select>
|
|||
|
</div>
|
|||
|
<div class="layui-input-inline">
|
|||
|
<input type="text" class="layui-input" id="staffSignHistoryStart" placeholder="请输入开始时间" value='${getCurrData()} 00:00:00'>
|
|||
|
</div>
|
|||
|
<div class="layui-input-inline">
|
|||
|
<input type="text" class="layui-input" id="staffSignHistoryEnd" placeholder="请输入结束时间" value='${getCurrData()} 23:59:59'>
|
|||
|
</div>
|
|||
|
<div class="layui-input-inline">
|
|||
|
<button class="layui-btn" id="staffSignHistoryBtn" style="height:38px !important;line-height:38px !important;">查询</button>
|
|||
|
</div>
|
|||
|
</form>
|
|||
|
</div>
|
|||
|
<div class="staffSignSelectContent">
|
|||
|
<table class="layui-hide" id="staffSignHistoryTable" lay-filter="staffSignHistoryTable"></table>
|
|||
|
</div>
|
|||
|
</div>`,
|
|||
|
success: function(layero){
|
|||
|
staffSignFromRender();
|
|||
|
showstaffSignHistoryContent([])
|
|||
|
}
|
|||
|
});
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
function staffSignFromRender(){
|
|||
|
$("#staffSignHistorySelect").html(getSchoolOptions());
|
|||
|
layuiObj.layuiForm.render("select","staffSignHistoryForm");
|
|||
|
|
|||
|
layuiObj.laydate.render({
|
|||
|
elem: '#staffSignHistoryStart',
|
|||
|
type: 'datetime',
|
|||
|
});
|
|||
|
layuiObj.laydate.render({
|
|||
|
elem: '#staffSignHistoryEnd',
|
|||
|
type: 'datetime',
|
|||
|
});
|
|||
|
|
|||
|
$("#staffSignHistoryBtn").on('click',function(e){
|
|||
|
e.preventDefault();
|
|||
|
})
|
|||
|
|
|||
|
$("#addSignHistoryBtn").on('click',function(e){
|
|||
|
e.preventDefault();
|
|||
|
addSafetyCheck();
|
|||
|
})
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
function showstaffSignHistoryContent(data){
|
|||
|
var data=[{
|
|||
|
"number":1,
|
|||
|
"address":"实验小学东门200米",
|
|||
|
"police":"2023-04-04 12:25:36",
|
|||
|
"school":"实验小学",
|
|||
|
"checkPerson":"陈某某",
|
|||
|
"checkPhone":"135*********",
|
|||
|
},
|
|||
|
{
|
|||
|
"number":2,
|
|||
|
"address":"实验小学西门120米",
|
|||
|
"police":"2023-04-04 12:25:36",
|
|||
|
"policeDistrict":"金沙里警务区",
|
|||
|
"school":"实验小学",
|
|||
|
"checkPerson":"张某某",
|
|||
|
"checkPhone":"138*********",
|
|||
|
}]
|
|||
|
layuiObj.layuitable.render({
|
|||
|
elem:'#staffSignHistoryTable',
|
|||
|
data:data,
|
|||
|
cols: [[
|
|||
|
{field:'number', width:"12%", title: '编号'},
|
|||
|
{field:'address', width:"12%", title: '报警点'},
|
|||
|
{field:'police', width:"16%",title: '时间'},
|
|||
|
{field:'school', width:"12%", title: '学校'},
|
|||
|
{field:'checkPerson', width:"12%", title: '负责人'},
|
|||
|
{field:'checkPhone', width:"12%", title: '电话'},
|
|||
|
]],
|
|||
|
limit:Number.MAX_VALUE // 数据表格默认全部显示
|
|||
|
});
|
|||
|
}
|
|||
|
|
|||
|
export {showbuttonWarning}
|