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: `
`,
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}