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" import {openClockInfo} from "../cmddispatch/js/orgApi/getEntranceStaffSign.js" function showSafetyCheck(){ 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":"定王台所", "policeDistrict":"金沙里警务区", "school":"实验小学", "checkPerson":"陈某某", "checkPhone":"135*********", "remark":"灭火器已过期,请及时更换" }, { "number":2, "address":"实验小学西门120米", "police":"定王台所", "policeDistrict":"金沙里警务区", "school":"实验小学", "checkPerson":"张某某", "checkPhone":"138*********", "remark":"一切正常" }] layuiObj.layuitable.render({ elem:'#staffSignHistoryTable', data:data, cols: [[ {field:'number', width:"12%", title: '编号'}, {field:'address', width:"12%", title: '地区'}, {field:'police', width:"12%",title: '派出所'}, {field:'policeDistrict', width:"12%", title: '警务区'}, {field:'school', width:"12%", title: '学校'}, {field:'checkPerson', width:"12%", title: '检查人'}, {field:'checkPhone', width:"12%", title: '电话'}, {field:'remark', width:"16%", title: '备注'} ]], limit:Number.MAX_VALUE // 数据表格默认全部显示 }); } function addSafetyCheck(){ layuiObj.layer.open({ type: 1, title: '新增检查事件', //不显示标题栏 area: ['360px', '460px'], shade: 0.6, id:new Date().getTime(), //设定一个id,防止重复弹出 btnAlign: 'c', moveType: 1, //拖拽模式,0或者1 content: `
`, success: function(layero){ } }); } export {showSafetyCheck}