anxiao_web/pages/poplayui/legalitySchool.js

94 lines
3.8 KiB
JavaScript
Raw Permalink 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 { 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 {stationInfoTableList} from "../cmddispatch/js/index.js"
import {getSchoolInfoDiv,getGradeValue} from "../cmddispatch/js/schoolBaseInfo.js"
function showlegalitySchool(){
layuiObj.layer.open({
type: 1,
title: '法制校园', //不显示标题栏
area: ['1100px', '700px'],
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="legalitySchoolInfo">
<form class="layui-form" action="" id="legalitySchoolForm" lay-filter="legalitySchoolForm" >
<div class="layui-input-inline">
<select name="interest" lay-filter="legalitySchoolSelect" id="legalitySchoolSelect" lay-search></select>
</div>
<div class="layui-input-inline">
<input type="text" class="layui-input" id="elegantDemeanourStart" placeholder="请输入开始时间" value='${getCurrData()} 00:00:00'>
</div>
<div class="layui-input-inline">
<input type="text" class="layui-input" id="elegantDemeanourEnd" placeholder="请输入结束时间" value='${getCurrData()} 23:59:59'>
</div>
<div class="layui-input-inline">
<button class="layui-btn" id="legalitySchoolBtn" style="height:38px !important;line-height:38px !important;">查询</button>
</div>
</form>
</div>
<div class="staffSignSelectContent legalitySchoolContent">
</div>
</div>`,
success: function(layero){
legalitySchoolFromRender();
}
});
}
function legalitySchoolFromRender(){
$("#legalitySchoolSelect").html(getSchoolOptions());
layuiObj.layuiForm.render("select","legalitySchoolForm");
$("#legalitySchoolBtn").on('click',function(e){
e.preventDefault();
var name=$("#legalitySchoolSelect").find("option:selected").val();
for(var i=0;i<stationInfoTableList.length;i++){
if(name==stationInfoTableList[i]["name"]){
showlegalitySchoolContent(stationInfoTableList[i])
}
}
})
}
function showlegalitySchoolContent(obj){
var schooldiv=getSchoolInfoDiv(obj);
var div=`
<div style="padding:0 22px;">
${schooldiv}
</div>
<div style="padding:10px;color:#fff;background:#032357;height:calc(100% - 138px);overflow-y:auto; clear:both;">
<div class="schoolElegantDemeanourBox">
<div>
<img src="./pages/cmddispatch/schoolInfoImg/1.png">
</div>
<div>
<img src="./pages/cmddispatch/schoolInfoImg/2.png">
</div>
<div>
<img src="./pages/cmddispatch/schoolInfoImg/3.png">
</div>
<div>
<img src="./pages/cmddispatch/schoolInfoImg/4.png">
</div>
<div>
<img src="./pages/cmddispatch/schoolInfoImg/5.png">
</div>
<div>
<img src="./pages/cmddispatch/schoolInfoImg/6.png">
</div>
</div>
</div>
`
$(".legalitySchoolContent").html(div);
}
export {showlegalitySchool}