You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1438 lines
50 KiB
1438 lines
50 KiB
10 months ago
|
<!--任务下发,监管用户-->
|
||
|
<#include "../../_include/_t.ftl"/>
|
||
|
<!DOCTYPE html>
|
||
|
<html>
|
||
|
<head>
|
||
|
<title></title>
|
||
|
<#include "../../_include/_h.ftl"/>
|
||
|
<#include "../../_include/_l.ftl"/>
|
||
|
<#include "../../_include/_j.ftl"/>
|
||
|
<#include "../../_include/_z.ftl"/>
|
||
|
<#include "../../_include/_p.ftl"/>
|
||
|
<#include "../../_include/work/_c_0.ftl"/>
|
||
|
<style type="text/css">
|
||
|
.layui-side{
|
||
|
background: url(${ctx}/style/cls1/img/nb-con.png) no-repeat;
|
||
|
background-size: 100% 100%;
|
||
|
}
|
||
|
.page_content_noside{
|
||
|
background: url(${ctx}/style/cls1/img/nb-con.png) no-repeat;
|
||
|
background-size: 100% 100%;
|
||
|
}
|
||
|
.layui-form ,.layui-border-box ,.layui-table-view{
|
||
|
box-sizing:border-box;
|
||
|
}
|
||
|
</style>
|
||
|
</head>
|
||
|
<body class="layui-layout-body">
|
||
|
<div class="layui-layout layui-layout-admin">
|
||
|
<div class="layui-body">
|
||
|
<div class="page_content_noside" style="padding:20px;box-sizing:border-box;">
|
||
|
<div id="taskl_0_01_div" class="layui-show">
|
||
|
<div class="page_tools">
|
||
|
<div class="layui-input-inline" style="width:130px;">
|
||
|
<input class="layui-input" type="text" value="${.now?string('yyyy-MM')}-01" id="taskl0_beginTime" placeholder="开始时间" readonly="true" autocomplete="off"/>
|
||
|
</div>
|
||
|
<div class="layui-input-inline" style="width:130px;">
|
||
|
<input class="layui-input" type="text" value="${.now?string('yyyy-MM-dd')}" id="taskl0_endTime" placeholder="结束时间" readonly="true" autocomplete="off"/>
|
||
|
</div>
|
||
|
<div class="layui-inline layui-form" style="width:200px;">
|
||
|
<select id="taskl0_timet" lay-filter="taskl0_timet_filter">
|
||
|
<option value="0">今天</option>
|
||
|
<option value="1" selected>当前月(截止至今天)</option>
|
||
|
<option value="2">上一月</option>
|
||
|
<option value="3">自定义</option>
|
||
|
</select>
|
||
|
</div>
|
||
|
<!--
|
||
|
<div class="layui-inline layui-form" style="width:100px;">
|
||
|
<select id="taskl0_taskState" lay-filter="taskl0_taskState_filter">
|
||
|
<option value="">全部</option>
|
||
|
<option value="0">暂时保存</option>
|
||
|
<option value="1">已下发</option>
|
||
|
</select>
|
||
|
</div>
|
||
|
-->
|
||
|
<button id="taskl0_queryBtn" class="layui-btn layui-btn-normal"><i class="layui-icon"></i>查询</button>
|
||
|
<button id="taskl0_resetBtn" class="layui-btn layui-btn-normal"><i class="layui-icon"></i>重置</button>
|
||
|
<button id="taskl0_addBtn" class="layui-btn"><i class="layui-icon"></i>检查任务下发</button>
|
||
|
<!--
|
||
|
<button id="taskl0_customBtn" class="layui-btn layui-btn-danger"><i class="layui-icon"></i>检查表模板自定义</button>
|
||
|
-->
|
||
|
</div>
|
||
|
<table id="taskl0_dataTable" lay-filter="taskl0_dataTable_filter" lay-size="sm"></table>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
<!--添加页面-->
|
||
|
<div id="taskl0_addWin" class="page_win page_win_hide">
|
||
|
<form id="taskl0_addForm" lay-filter="taskl0_addForm_filter" class="layui-form">
|
||
|
<input type="hidden" name="regionId" value="${manager_user['regionId']}"/>
|
||
|
<input type="hidden" name="regionIds" value="${manager_user['regionIds']}"/>
|
||
|
<input type="hidden" name="regionVal" value="${manager_user['regionVal']}"/>
|
||
|
<input type="hidden" name="regionVals" value="${manager_user['regionVals']}"/>
|
||
|
<input type="hidden" name="usersInfo" value="${manager_user['usersUid']},${manager_user['usersName']}"/>
|
||
|
<input type="hidden" name="orgInfo" value="${manager_user['baseId']},${manager_user['groupName']}"/>
|
||
|
<input type="hidden" name="isdel" value="0"/>
|
||
|
<div style="float:left;width:590px;">
|
||
|
<div class="layui-form-item">
|
||
|
<label class="layui-form-label">任务标题:</label>
|
||
|
<div class="layui-input-inline" style="width:366px;">
|
||
|
<input type="text" name="taskName" class="layui-input" placeholder="请输入任务标题" lay-verify="required" lay-verType="tips" autocomplete="off"/>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="layui-form-item">
|
||
|
<label class="layui-form-label">检查类型:</label>
|
||
|
<div class="layui-input-inline" style="width:366px;">
|
||
|
<select name="taskType" lay-verify="required" lay-verType="tips">
|
||
|
<option value="">请选择检查类型</option>
|
||
|
<option value="1">年度工作任务</option>
|
||
|
<option value="2">月工作任务</option>
|
||
|
<option value="3">周工作任务</option>
|
||
|
<option value="4">临时工作任务</option>
|
||
|
<option value="5">专项工作任务</option>
|
||
|
<option value="6">其它</option>
|
||
|
</select>
|
||
|
</div>
|
||
|
</div>
|
||
|
<!--
|
||
|
<div class="layui-form-item">
|
||
|
<div class="layui-inline">
|
||
|
<label class="layui-form-label">结束时间:</label>
|
||
|
<div class="layui-input-inline" style="width:560px;">
|
||
|
<input class="layui-input" type="text" id="taskl0_addForm_taskEnd" name="taskEnd" placeholder="任务下发开始时间" autocomplete="off"/>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
-->
|
||
|
<div class="layui-form-item">
|
||
|
<label class="layui-form-label">任务描述:</label>
|
||
|
<div class="layui-input-inline" style="width:366px;">
|
||
|
<textarea name="taskDes" placeholder="请输入任务概要描述" class="layui-textarea" autocomplete="off" style="resize:none;height:120px;"></textarea>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="layui-form-item">
|
||
|
<label class="layui-form-label">开始时间:</label>
|
||
|
<div class="layui-input-inline" style="width:140px;">
|
||
|
<input class="layui-input" type="text" id="taskl0_addForm_taskBegin" name="taskBegin" placeholder="任务预计开始时间" autocomplete="off"/>
|
||
|
</div>
|
||
|
</div>
|
||
|
<!--
|
||
|
<div class="layui-form-item">
|
||
|
<label class="layui-form-label">任务状态:</label>
|
||
|
<div class="layui-input-inline">
|
||
|
<input type="radio" name="taskState" value="1" title="<font color='blue'>直接下发</font>" checked/>
|
||
|
<input type="radio" name="taskState" value="0" title="<font color='green'>暂时保存</font>"/>
|
||
|
</div>
|
||
|
</div>
|
||
|
-->
|
||
|
<div class="layui-form-item">
|
||
|
<label class="layui-form-label">相关附件:</label>
|
||
|
<div class="layui-input-inline">
|
||
|
<input type="file" name="taskAttas" multiple="multiple" style="margin-top:6px;"/>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div style="float:left;width:400px;margin-left: 92px;">
|
||
|
<div class="layui-form-item">
|
||
|
<label class="layui-form-label" style="width:70px;">接收单位:</label>
|
||
|
<div class="layui-input-inline">
|
||
|
<div class="layui-btn-group" style="width:100px;">
|
||
|
<button id="taskl0_addForm_receiveBtn" t="2" class="layui-btn layui-btn-normal">下辖企业单位</button>
|
||
|
<!--
|
||
|
<button id="taskl0_addForm_receiveBtn" t="1" class="layui-btn layui-btn-normal layui-btn-disabled"">下级消防主管</button>
|
||
|
<button id="taskl0_addForm_receiveBtn" t="3" class="layui-btn layui-btn-normal layui-btn-disabled"">本部管理人员</button>
|
||
|
-->
|
||
|
</div>
|
||
|
<div id="taskl0_addForm_receiveInfos" style="margin-top:2px;border:1px solid #496bc9;width:280px;height:280px;padding:3px;word-break:break-all;overflow-x:hidden;overflow-y:auto;" onmouseover="javascript:this.style.borderColor='#D2D2D2';" onmouseout="javascript:this.style.borderColor='#e3e3e3';">
|
||
|
</div>
|
||
|
<textarea id="taskl0_addForm_receiveIds" name="receiveIds" style="display:none;"></textarea>
|
||
|
<textarea id="taskl0_addForm_receiveClses" name="receiveClses" style="display:none;"></textarea>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
<button lay-submit class="layui-btn layui-btn-normal layui-hide" lay-filter="taskl0_addForm_filter"><i class="icon_submit"></i>提交数据</button>
|
||
|
</form>
|
||
|
</div>
|
||
|
<!--详情页面-->
|
||
|
<div id="taskl0_detailWin" class="page_win page_win_hide">
|
||
|
<form class="layui-form">
|
||
|
<input type="hidden" id="taskl0_detail_id"/>
|
||
|
<div class="layui-form-item">
|
||
|
<label class="layui-form-label">任务标题:</label>
|
||
|
<div class="layui-form-mid"><span id="taskl0_detail_taskName"></span></div>
|
||
|
</div>
|
||
|
<div class="layui-form-item">
|
||
|
<label class="layui-form-label">检查类型:</label>
|
||
|
<div class="layui-form-mid"><span id="taskl0_detail_taskType"></span></div>
|
||
|
</div>
|
||
|
<div class="layui-form-item">
|
||
|
<label class="layui-form-label">任务描述:</label>
|
||
|
<div class="layui-form-mid"><div id="taskl0_detail_taskDes" style="width:366px;"></div></div>
|
||
|
</div>
|
||
|
<div class="layui-form-item">
|
||
|
<label class="layui-form-label">预计开始:</label>
|
||
|
<div class="layui-form-mid"><span id="taskl0_detail_taskBegin"></span></div>
|
||
|
</div>
|
||
|
<div class="layui-form-item">
|
||
|
<label class="layui-form-label">相关附件:</label>
|
||
|
<div class="layui-form-mid"><div id="taskl0_detail_taskAttas"></div></div>
|
||
|
</div>
|
||
|
<div class="layui-form-item">
|
||
|
<label class="layui-form-label">落实情况:</label>
|
||
|
<div class="layui-form-mid">
|
||
|
<div id="taskl0_detail_receive"></div>
|
||
|
<button id="taskl0_detail_btn" class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top:15px;"><i class="icon_show"></i>点击查看企业单位任务落实详情</button>
|
||
|
</div>
|
||
|
</div>
|
||
|
</form>
|
||
|
</div>
|
||
|
<!--单位落实详情页面-->
|
||
|
<div id="taskl0_receive_detailWin" class="page_win page_win_hide">
|
||
|
<div class="page_tools">
|
||
|
<div class="layui-inline layui-form" style="width:160px;">
|
||
|
<select id="taskl0_receive_detail_taskState" lay-filter="taskl0_receive_detail_level_filter">
|
||
|
<option value="">全部企业单位</option>
|
||
|
<option value="1">已落实企业单位</option>
|
||
|
<option value="0">未落实企业单位</option>
|
||
|
</select>
|
||
|
</div>
|
||
|
<div class="layui-inline layui-form" style="width:160px;">
|
||
|
<select id="taskl0_receive_detail_level" lay-filter="taskl0_receive_detail_level_filter">
|
||
|
<option value="">企业单位消防等级</option>
|
||
|
<option value="1">消防安全重点单位</option>
|
||
|
<option value="2">消防安全一般单位</option>
|
||
|
<option value="3">九小场所</option>
|
||
|
<option value="4">其它</option>
|
||
|
</select>
|
||
|
</div>
|
||
|
<div class="layui-inline" style="width:160px;">
|
||
|
<input class="layui-input" id="taskl0_receive_detail_socName" placeholder="企业单位(支持模糊)" autocomplete="off"/>
|
||
|
</div>
|
||
|
<button id="taskl0_receive_detail_queryBtn" class="layui-btn layui-btn-normal"><i class="layui-icon"></i>查询</button>
|
||
|
<button id="taskl0_receive_detail_resetBtn" class="layui-btn layui-btn-normal"><i class="layui-icon"></i>重置</button>
|
||
|
</div>
|
||
|
<table id="taskl0_receive_detail_dataTable" lay-filter="taskl0_receive_detail_dataTable_filter" lay-size="sm"></table>
|
||
|
</div>
|
||
|
<!--计划详情页面-->
|
||
|
<div id="taskl0_plan_detailWin" class="page_win page_win_hide">
|
||
|
<div class="page_tools" style="margin-bottom:20px;">
|
||
|
<div class="layui-inline layui-form" style="width:565px;">
|
||
|
<select id="taskl0_plan_detail_ls" lay-filter="taskl0_plan_detail_ls_filter">
|
||
|
</select>
|
||
|
</div>
|
||
|
</div>
|
||
|
<input type="hidden" id="taskl0_plan_detail_planId"/>
|
||
|
<input type="hidden" id="taskl0_plan_detail_taskId"/>
|
||
|
<input type="hidden" id="taskl0_plan_detail_baseId"/>
|
||
|
<div class="layui-form-item">
|
||
|
<label class="layui-form-label" style="width:100px;">检查任务:</label>
|
||
|
<div class="layui-form-mid"><span id="taskl0_plan_detail_tasks"></span></div>
|
||
|
</div>
|
||
|
<div class="layui-form-item">
|
||
|
<label class="layui-form-label" style="width:100px;">计划概要:</label>
|
||
|
<div class="layui-form-mid"><span id="taskl0_plan_detail_planDes"></span></div>
|
||
|
</div>
|
||
|
<div class="layui-form-item">
|
||
|
<label class="layui-form-label" style="width:100px;">检查周期:</label>
|
||
|
<div class="layui-form-mid"><span id="taskl0_plan_detail_planValType"></span></div>
|
||
|
</div>
|
||
|
<div class="layui-form-item">
|
||
|
<label class="layui-form-label" style="width:100px;">检查时间:</label>
|
||
|
<div class="layui-form-mid"><span id="taskl0_plan_detail_planTimep"></span></div>
|
||
|
</div>
|
||
|
<div class="layui-form-item">
|
||
|
<label class="layui-form-label" style="width:100px;">检查日期:</label>
|
||
|
<div class="layui-form-mid"><span id="taskl0_plan_detail_planBeginEnd"></span></div>
|
||
|
</div>
|
||
|
<div class="layui-form-item">
|
||
|
<label class="layui-form-label" style="width:100px;">不检查日期:</label>
|
||
|
<div class="layui-form-mid"><span id="taskl0_plan_detail_planNo"></span></div>
|
||
|
</div>
|
||
|
<div class="layui-form-item">
|
||
|
<label class="layui-form-label" style="width:100px;">检查人员:</label>
|
||
|
<div class="layui-form-mid"><span id="taskl0_plan_detail_planUsers"></span></div>
|
||
|
</div>
|
||
|
<div class="layui-form-item">
|
||
|
<label class="layui-form-label" style="width:100px;">巡检点详情:</label>
|
||
|
<div class="layui-form-mid"><span>详见列表</span></div>
|
||
|
</div>
|
||
|
<div class="layui-form-item" style="padding-left:20px;margin-top:-70px;">
|
||
|
<table id="taskl0_plan_detail_checks_dataTable" lay-filter="taskl0_plan_detail_checks_dataTable_filter" lay-size="sm"></table>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<!--接收单位窗口对应 2 下辖企业单位-->
|
||
|
<div id="taskl0_receiveWin_2" class="page_win page_win_hide">
|
||
|
<div class="page_tools">
|
||
|
<div class="layui-inline layui-form" style="width:100px;">
|
||
|
<select id="taskl0_receiveWin_2_cls" lay-filter="taskl0_receiveWin_2_cls_filter">
|
||
|
<option value="1">行政区划</option>
|
||
|
<option value="2">单位类别</option>
|
||
|
</select>
|
||
|
</div>
|
||
|
<div class="layui-inline layui-form" style="width:160px;">
|
||
|
<select id="taskl0_receiveWin_2_level" lay-filter="taskl0_receiveWin_2_level_filter">
|
||
|
<option value="">企业单位消防等级</option>
|
||
|
<option value="1">消防安全重点单位</option>
|
||
|
<option value="2">消防安全一般单位</option>
|
||
|
<option value="3">九小场所</option>
|
||
|
<option value="4">其它</option>
|
||
|
</select>
|
||
|
</div>
|
||
|
<div class="layui-inline" style="width:160px;">
|
||
|
<input class="layui-input" id="taskl0_receiveWin_2_socName" placeholder="企业单位(支持模糊)" autocomplete="off"/>
|
||
|
</div>
|
||
|
<button id="taskl0_receiveWin_2_queryBtn" class="layui-btn layui-btn-normal"><i class="layui-icon"></i>查询</button>
|
||
|
<button id="taskl0_receiveWin_2_resetBtn" class="layui-btn layui-btn-normal"><i class="layui-icon"></i>重置</button>
|
||
|
<button id="taskl0_receiveWin_2_allBtn" class="layui-btn layui-btn-danger"><i class="layui-icon">စ</i>选择下辖所有单位</button>
|
||
|
</div>
|
||
|
<div style="float:left;width:295px;height:510px;margin:1px 0 0 0;padding:0;overflow:auto;">
|
||
|
<button id="taskl0_receiveWin_2_refreshBtn" class="layui-btn layui-btn-normal layui-btn-xs" style="float:right;margin:10px 10px 0 0;"><i class="layui-icon"></i>刷新树</button>
|
||
|
<ul id="taskl0_receiveWin_2_optTree1" class="ztree page_tree layui-hide"></ul>
|
||
|
<ul id="taskl0_receiveWin_2_optTree2" class="ztree page_tree layui-hide"></ul>
|
||
|
</div>
|
||
|
<div style="margin-left:300px;height:512px;overflow:auto;">
|
||
|
<table id="taskl0_receiveWin_2_dataTable" lay-filter="taskl0_receiveWin_2_dataTable_filter" lay-size="sm"></table>
|
||
|
</div>
|
||
|
<div id="taskl0_receiveWin_2_div" style="width:780px;height:50px;padding:3px;margin:2px auto 0;word-break:break-all;overflow-x:hidden;overflow-y:auto;">
|
||
|
</div>
|
||
|
<textarea id="taskl0_receiveWin_2_baseIds" style="display:none;"></textarea>
|
||
|
</div>
|
||
|
<!--接收单位窗口对应 1 下级消防主管-->
|
||
|
<!--
|
||
|
<div id="taskl0_receiveWin_1" class="page_win page_win_hide">
|
||
|
</div>
|
||
|
-->
|
||
|
<!--接收单位窗口对应 3 本部接收人-->
|
||
|
<!--
|
||
|
<div id="taskl0_receiveWin_3" class="page_win page_win_hide">
|
||
|
</div>
|
||
|
-->
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<script type="text/javascript">
|
||
|
layuiplus.on_w_1(function(){
|
||
|
layuiplus.init(1);
|
||
|
//定义窗口变量============
|
||
|
var taskl0_addWin = null;
|
||
|
var taskl0_detailWin = null;
|
||
|
var taskl0_receiveWin = null;
|
||
|
var taskl0_receive_detailWin = null;
|
||
|
var taskl0_plan_detailWin = null;
|
||
|
//时间选择的select监听
|
||
|
form.on("select(taskl0_timet_filter)",function(data){
|
||
|
var begin = $("#taskl0_beginTime");
|
||
|
var end = $("#taskl0_endTime");
|
||
|
if(data.value == "0"){
|
||
|
begin.val("${.now?string('yyyy-MM-dd')}");
|
||
|
end.val("${.now?string('yyyy-MM-dd')}");
|
||
|
}
|
||
|
if(data.value == "1"){
|
||
|
var date = new Date("${.now?string('yyyy-MM-dd')}");
|
||
|
var year = date.getFullYear()+"";
|
||
|
var month = date.getMonth()+1+"";
|
||
|
if(month.length == 1){
|
||
|
month = "0" + month;
|
||
|
}
|
||
|
begin.val(year+"-"+month+"-01");
|
||
|
end.val("${.now?string('yyyy-MM-dd')}");
|
||
|
}
|
||
|
if(data.value == "2"){
|
||
|
var date = new Date("${.now?string('yyyy-MM-dd')}");
|
||
|
var year = date.getFullYear();
|
||
|
var month = date.getMonth();
|
||
|
var firstDate = new Date(year,month-1,1);
|
||
|
var datetime = firstDate.getFullYear()
|
||
|
+ "-"// "年"
|
||
|
+ ((firstDate.getMonth()+1)>=10?(firstDate.getMonth() + 1):"0"+(firstDate.getMonth()+1))
|
||
|
+ "-"// "月"
|
||
|
+ (firstDate.getDate()<10?"0"+firstDate.getDate():firstDate.getDate());
|
||
|
begin.val(datetime);
|
||
|
var day = new Date(year,month,0).getDate();
|
||
|
var lastDate = new Date(year,month-1,day);
|
||
|
datetime = lastDate.getFullYear()
|
||
|
+ "-"// "年"
|
||
|
+ ((lastDate.getMonth()+1)>=10?(lastDate.getMonth() + 1):"0"+(lastDate.getMonth()+1))
|
||
|
+ "-"// "月"
|
||
|
+ (lastDate.getDate()<10?"0"+lastDate.getDate():lastDate.getDate());
|
||
|
end.val(datetime);
|
||
|
}
|
||
|
if(data.value == "3"){
|
||
|
begin.val("");
|
||
|
end.val("");
|
||
|
}
|
||
|
});
|
||
|
//查询按钮
|
||
|
$("#taskl0_queryBtn").click(function(){
|
||
|
var begin = $("#taskl0_beginTime");
|
||
|
if(begin.val() == ""){
|
||
|
layer.tips("请选择起始时间","#taskl0_beginTime",{tips:3});
|
||
|
return false;
|
||
|
}
|
||
|
var end = $("#taskl0_endTime");
|
||
|
if(end.val() == ""){
|
||
|
layer.tips("请选择结束时间","#taskl0_endTime",{tips:3});
|
||
|
return false;
|
||
|
}
|
||
|
taskl0_dataTable.reload({
|
||
|
where:{
|
||
|
beginTime:$("#taskl0_beginTime").val(),
|
||
|
endTime:$("#taskl0_endTime").val(),
|
||
|
usersInfo:"${manager_user['usersUid']}"
|
||
|
}
|
||
|
});
|
||
|
});
|
||
|
//重置按钮
|
||
|
$("#taskl0_resetBtn").click(function(){
|
||
|
$("#taskl0_timet").val("1");
|
||
|
var date = new Date("${.now?string('yyyy-MM-dd')}");
|
||
|
var year = date.getFullYear()+"";
|
||
|
var month = date.getMonth()+1+"";
|
||
|
if(month.length == 1){
|
||
|
month = "0" + month;
|
||
|
}
|
||
|
$("#taskl0_beginTime").val(year+"-"+month+"-01");
|
||
|
$("#taskl0_endTime").val("${.now?string('yyyy-MM-dd')}");
|
||
|
form.render();
|
||
|
taskl0_dataTable.reload({
|
||
|
where:{
|
||
|
beginTime:$("#taskl0_beginTime").val(),
|
||
|
endTime:$("#taskl0_endTime").val(),
|
||
|
usersInfo:"${manager_user['usersUid']}"
|
||
|
}
|
||
|
});
|
||
|
});
|
||
|
/*
|
||
|
//检查表模板自定义按钮
|
||
|
$("#taskl0_customBtn").click(function(){
|
||
|
layer.msg("请关注版本更新",{time:3000});
|
||
|
layer.tips("请关注版本更新。","#taskl0_customBtn",{tips:2});
|
||
|
});
|
||
|
*/
|
||
|
//任务下发新增按钮
|
||
|
$("#taskl0_addBtn").click(function(){
|
||
|
taskl0_addWin = layer.open({
|
||
|
id:"taskl0_addWin_id",
|
||
|
type:1,
|
||
|
title:"<i class=\"icon_add\"></i>检查任务下发",
|
||
|
shade:0.3,
|
||
|
area:["1000px","700px"],
|
||
|
resize:false,
|
||
|
content:$("#taskl0_addWin"),
|
||
|
btn:["<i class=\"icon_tick\"></i>提交数据"],
|
||
|
yes:function(index,layero){
|
||
|
$("#taskl0_addForm").find("button[lay-filter=taskl0_addForm_filter]").click();
|
||
|
},
|
||
|
end:function(){
|
||
|
$("#taskl0_addForm_receiveInfos").empty();
|
||
|
$("#taskl0_addForm_receiveIds").val("");
|
||
|
$("#taskl0_addForm_receiveClses").val("");
|
||
|
$("#taskl0_addForm")[0].reset();
|
||
|
}
|
||
|
});
|
||
|
//layer.full(taskl0_addWin);
|
||
|
});
|
||
|
//任务下发添加窗口提交按钮操作
|
||
|
form.on("submit(taskl0_addForm_filter)",function(formData){
|
||
|
layer.confirm("<span style=\"color:#fff;\">检查任务下发提交操作将会立即开启各个指定单位检查任务信息,这些信息将不能修改。</span><br/>如果继续请点击“确定”,否则点击“取消”<br/>是否继续?",{title:"提示",icon:3},function(index){
|
||
|
var ids = $("#taskl0_addForm_receiveIds");
|
||
|
if(ids.val() == ""){
|
||
|
layer.tips("请选择接收单位","#taskl0_addForm_receiveInfos",{tips:4});
|
||
|
return false;
|
||
|
}else{
|
||
|
if(ids.val().substring(0,1) == ","){
|
||
|
ids.val(ids.val().substring(1));
|
||
|
}
|
||
|
if(ids.val() == "allRegions"){
|
||
|
var _region = "${manager_user['regionIds']}".split(",");
|
||
|
//$("#taskl0_addForm_receiveClses").val("${manager_user['regionIds']}");
|
||
|
if(_region.length == 2){//支队
|
||
|
$("#taskl0_addForm_receiveClses").val(_region[1]);
|
||
|
}else if(_region.length > 2){//大队
|
||
|
$("#taskl0_addForm_receiveClses").val(_region[2]);
|
||
|
}else{//总队
|
||
|
$("#taskl0_addForm_receiveClses").val(_region[0]);
|
||
|
}
|
||
|
|
||
|
}else{
|
||
|
var spans = $("#taskl0_addForm_receiveInfos").find("span");
|
||
|
if(spans.length != 0){
|
||
|
//处理企业单位
|
||
|
var clsArr = new Array();
|
||
|
$.each(spans,function(){
|
||
|
//var _cls = $(this).find("p").attr("baseCls");
|
||
|
//console.log(_cls)
|
||
|
clsArr.push($(this).find("p").attr("baseCls"));
|
||
|
|
||
|
});
|
||
|
$("#taskl0_addForm_receiveClses").val(clsArr.join(","));
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
layerload.on();
|
||
|
console.log($("#taskl0_addForm_receiveClses").val() + "123");
|
||
|
$.ajax({
|
||
|
type:"post",
|
||
|
url:"${ctx}/work/task/taskl0/taskBase/add",
|
||
|
cache:false,
|
||
|
data:new FormData($("#taskl0_addForm")[0]),
|
||
|
processData:false,
|
||
|
contentType:false,
|
||
|
dataType:"json",
|
||
|
success:function(data){
|
||
|
if(data.status == true){
|
||
|
taskl0_dataTable.reload({
|
||
|
where:{
|
||
|
beginTime:$("#taskl0_beginTime").val(),
|
||
|
endTime:$("#taskl0_endTime").val(),
|
||
|
usersInfo:"${manager_user['usersUid']}"
|
||
|
}
|
||
|
});
|
||
|
layer.close(taskl0_addWin);
|
||
|
layer.msg("操作成功",{time:2000});
|
||
|
layerload.off();
|
||
|
}
|
||
|
}
|
||
|
});
|
||
|
});
|
||
|
return false;
|
||
|
});
|
||
|
//数据表格taskl0_dataTable
|
||
|
var taskl0_dataTable = table.render({
|
||
|
elem:"#taskl0_dataTable",
|
||
|
url:"${ctx}/work/task/taskl0/taskBase/list",
|
||
|
where:{
|
||
|
beginTime:$("#taskl0_beginTime").val(),
|
||
|
endTime:$("#taskl0_endTime").val(),
|
||
|
usersInfo:"${manager_user['usersUid']}"
|
||
|
},
|
||
|
method:"get",
|
||
|
cols:[[
|
||
|
{field:"taskRun",title:"任务下发时间",unresize:true,width:200,templet:function(d){
|
||
|
if(d.taskRun != null) return d.taskRun;
|
||
|
return "-";
|
||
|
}},
|
||
|
{field:"taskName",title:"检查任务",unresize:true,width:500},
|
||
|
{field:"taskType",title:"检查类别",unresize:true,width:200,templet:function(d){
|
||
|
if(d.taskType == "1") return "年度工作任务";
|
||
|
if(d.taskType == "2") return "月工作任务";
|
||
|
if(d.taskType == "3") return "周工作任务";
|
||
|
if(d.taskType == "4") return "临时工作任务";
|
||
|
if(d.taskType == "5") return "专项工作任务";
|
||
|
if(d.taskType == "6") return "其它";
|
||
|
return "";
|
||
|
}},
|
||
|
{field:"taskDes",title:"任务描述",unresize:true,width:500,templet:"<div><span title=\"{{d.taskDes==null?'':d.taskDes}}\">{{d.taskDes==null?'':d.taskDes}}</span></div>"},
|
||
|
{title:"操作 ",unresize:true,align:"left",templet:function(d){
|
||
|
var opt = "<a class=\"layui-btn layui-btn-normal layui-btn-xs\" lay-event=\"opt_detail\">点击查看详情</a> ";
|
||
|
return opt;
|
||
|
}}
|
||
|
]],
|
||
|
text:{none:"暂无数据,您可以更改查询时间段进行查询"},
|
||
|
page:{
|
||
|
layout:["prev","page","next","skip","count","limit"],
|
||
|
limits:[10,20,30]
|
||
|
}
|
||
|
});
|
||
|
//数据表格taskl0_dataTable每行数据操作监听
|
||
|
table.on("tool(taskl0_dataTable_filter)",function(row){//row.data row.event
|
||
|
if(row.event == "opt_detail"){
|
||
|
taskl0_detailWin = layer.open({
|
||
|
id:"taskl0_detailWin_id",
|
||
|
type:1,
|
||
|
title:"<i class=\"icon_detail\"></i>检查任务详情",
|
||
|
shade:0.3,
|
||
|
area:["600px","600px"],
|
||
|
resize:false,
|
||
|
content:$("#taskl0_detailWin"),
|
||
|
success:function(){
|
||
|
$.ajax({
|
||
|
type:"get",
|
||
|
url:"${ctx}/work/task/taskl0/taskBase/get",
|
||
|
data:{id:row.data.id},
|
||
|
dataType:"json",
|
||
|
success:function(data){
|
||
|
var base = data.base;
|
||
|
$("#taskl0_detail_id").val(base.id);
|
||
|
$("#taskl0_detail_taskName").html(base.taskName);
|
||
|
switch(base.taskType){
|
||
|
case "1":$("#taskl0_detail_taskType").html("年度工作任务");
|
||
|
break;
|
||
|
case "2":$("#taskl0_detail_taskType").html("月工作任务");
|
||
|
break;
|
||
|
case "3":$("#taskl0_detail_taskType").html("周工作任务");
|
||
|
break;
|
||
|
case "4":$("#taskl0_detail_taskType").html("临时工作任务");
|
||
|
break;
|
||
|
case "5":$("#taskl0_detail_taskType").html("专项工作任务");
|
||
|
break;
|
||
|
case "6":$("#taskl0_detail_taskType").html("其它");
|
||
|
break;
|
||
|
default:$("#taskl0_detail_taskType").html("-");
|
||
|
}
|
||
|
$("#taskl0_detail_taskDes").html(base.taskDes);
|
||
|
$("#taskl0_detail_taskBegin").html(base.taskBegin);
|
||
|
//处理附件
|
||
|
var attas = data.attas;
|
||
|
if(attas.length == 0){
|
||
|
$("#taskl0_detail_taskAttas").html("无相关附件");
|
||
|
}else{
|
||
|
var _html = "";
|
||
|
$.each(attas,function(){
|
||
|
_html += "<p><a href=\"${ctx}/work/task/taskl0/taskFiles/down/?filesName="+$(this).get(0).filesName+"&filesNew="+$(this).get(0).filesNew+"\" title=\"点击下载附件\">"+$(this).get(0).filesName+"</a></p>";
|
||
|
});
|
||
|
$("#taskl0_detail_taskAttas").html(_html);
|
||
|
}
|
||
|
//处理落实统计
|
||
|
var receive = data.receive;
|
||
|
$("#taskl0_detail_receive").empty();
|
||
|
$("#taskl0_detail_receive").append("<p>共下发["+receive.state1+"]家下辖企业单位</p>").append("<br/>");
|
||
|
if(receive.state2 == "0"){
|
||
|
$("#taskl0_detail_receive").append("<p>截止目前暂无企业单位落实检查任务</p>");
|
||
|
}else{
|
||
|
$("#taskl0_detail_receive").append("<p>截止目前共["+receive.state2+"]家企业单位已落实检查任务</p>");
|
||
|
}
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
});
|
||
|
//添加窗口接收单位选择按钮
|
||
|
$("button[id='taskl0_addForm_receiveBtn']").each(function(){
|
||
|
var _this = $(this);
|
||
|
_this.click(function(){
|
||
|
var t = _this.attr("t");
|
||
|
var _area = new Array();
|
||
|
//临时提醒版本问题
|
||
|
if(t == "1" || t == "3"){
|
||
|
layer.msg("暂不支持,请关注版本更新",{time:3000});
|
||
|
return false;
|
||
|
}
|
||
|
if(t == "2"){
|
||
|
var _area = ["1000px","auto"];
|
||
|
}
|
||
|
taskl0_receiveWin = layer.open({
|
||
|
id:"taskl0_receiveWin_id",
|
||
|
type:1,
|
||
|
title:"<i class=\"icon_detail\"></i>选择接收单位",
|
||
|
shade:0.3,
|
||
|
area:_area,
|
||
|
resize:false,
|
||
|
content:$("#taskl0_receiveWin_"+t),
|
||
|
btn:["<i class=\"icon_tick\"></i>确定选择"],
|
||
|
yes:function(index,layero){
|
||
|
if(t == "1"){
|
||
|
return false;
|
||
|
}
|
||
|
if(t == "2"){
|
||
|
var html = $("#taskl0_receiveWin_2_div").html();
|
||
|
var reg = new RegExp("page_receive", "g");
|
||
|
html = html.replace(reg,"page_receive_add");
|
||
|
reg = new RegExp("removeReceive", "g");
|
||
|
html = html.replace(reg,"removeReceive4add");
|
||
|
$("#taskl0_addForm_receiveInfos").html(html);
|
||
|
var ids = $("#taskl0_receiveWin_2_baseIds").val();
|
||
|
if(ids.substring(0,1) == ","){
|
||
|
$("#taskl0_addForm_receiveIds").val(ids.substring(1));
|
||
|
}else{
|
||
|
$("#taskl0_addForm_receiveIds").val(ids);
|
||
|
}
|
||
|
}
|
||
|
if(t == "3"){
|
||
|
return false;
|
||
|
}
|
||
|
layer.close(index);
|
||
|
},
|
||
|
end:function(){
|
||
|
$("#taskl0_receiveWin_2_div").empty();
|
||
|
$("#taskl0_receiveWin_2_baseIds").val("");
|
||
|
},
|
||
|
success:function(){
|
||
|
if(t == "1"){//加载下级消防主管数据
|
||
|
}
|
||
|
if(t == "2"){//加载下辖企业单位数据
|
||
|
//taskl0_receiveWin_2_dataTable
|
||
|
var _region = "${manager_user['regionIds']}".split(",");//获取这个数据为了默认查询第一区域下的数据
|
||
|
var regionId = "";
|
||
|
if(_region.length == 2){//支队
|
||
|
regionId = _region[1];
|
||
|
}else if(_region.length > 2){//大队
|
||
|
regionId = _region[2];
|
||
|
}else{//总队
|
||
|
regionId = _region[0];
|
||
|
}
|
||
|
var cls = $("#taskl0_receiveWin_2_cls").val();
|
||
|
if(cls == "1"){
|
||
|
$("#taskl0_receiveWin_2_optTree1").removeClass("layui-hide");
|
||
|
//分析区划树
|
||
|
var treeObj = $.fn.zTree.getZTreeObj("taskl0_receiveWin_2_optTree1");
|
||
|
var _nodes = treeObj.getSelectedNodes();
|
||
|
if(_nodes.length != 0){
|
||
|
regionId = _nodes[0].id;
|
||
|
}
|
||
|
taskl0_receiveWin_2_dataTable.reload({
|
||
|
url:"${ctx}/work/task/taskl0/social/list",
|
||
|
where:{
|
||
|
socName:$("#taskl0_receiveWin_2_socName").val(),
|
||
|
socLevel:$("#taskl0_receiveWin_2_level").val(),
|
||
|
regionIds:regionId,
|
||
|
socClass:""
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
if(cls == "2"){
|
||
|
$("#taskl0_receiveWin_2_optTree2").removeClass("layui-hide");
|
||
|
//分析单位类别树
|
||
|
var classVal = "";
|
||
|
var treeObj = $.fn.zTree.getZTreeObj("taskl0_receiveWin_2_optTree2");
|
||
|
var _nodes = treeObj.getSelectedNodes();
|
||
|
if(_nodes.length != 0){
|
||
|
classVal = _nodes[0].id;
|
||
|
}
|
||
|
taskl0_receiveWin_2_dataTable.reload({
|
||
|
url:"${ctx}/work/task/taskl0/social/list",
|
||
|
where:{
|
||
|
socName:$("#taskl0_receiveWin_2_socName").val(),
|
||
|
socLevel:$("#taskl0_receiveWin_2_level").val(),
|
||
|
regionIds:regionId,
|
||
|
socClass:classVal
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
}
|
||
|
if(t == "3"){//加载本部管理人员数据
|
||
|
}
|
||
|
}
|
||
|
});
|
||
|
return false;
|
||
|
});
|
||
|
});
|
||
|
//添加窗口接收单位弹出窗口之后的按钮监听
|
||
|
//添加窗口接收单位弹出窗口之后的行政区划&单位类别select
|
||
|
form.on("select(taskl0_receiveWin_2_cls_filter)",function(data){
|
||
|
if(data.value == "1"){
|
||
|
$("#taskl0_receiveWin_2_optTree1").removeClass("layui-hide");
|
||
|
$("#taskl0_receiveWin_2_optTree2").addClass("layui-hide");
|
||
|
}
|
||
|
if(data.value == "2"){
|
||
|
$("#taskl0_receiveWin_2_optTree1").addClass("layui-hide");
|
||
|
$("#taskl0_receiveWin_2_optTree2").removeClass("layui-hide");
|
||
|
}
|
||
|
});
|
||
|
//添加窗口接收单位弹出窗口之后的企业单位消防等级select
|
||
|
form.on("select(taskl0_receiveWin_2_level_filter)",function(data){
|
||
|
var _region = "${manager_user['regionIds']}".split(",");
|
||
|
var regionId = "";
|
||
|
if(_region.length == 2){//支队
|
||
|
regionId = _region[1];
|
||
|
}else if(_region.length > 2){//大队
|
||
|
regionId = _region[2];
|
||
|
}else{//总队
|
||
|
regionId = _region[0];
|
||
|
}
|
||
|
var cls = $("#taskl0_receiveWin_2_cls").val();
|
||
|
if(cls == "1"){
|
||
|
//分析区划树
|
||
|
var treeObj = $.fn.zTree.getZTreeObj("taskl0_receiveWin_2_optTree1");
|
||
|
var _nodes = treeObj.getSelectedNodes();
|
||
|
if(_nodes.length != 0){
|
||
|
regionId = _nodes[0].id;
|
||
|
}
|
||
|
taskl0_receiveWin_2_dataTable.reload({
|
||
|
url:"${ctx}/work/task/taskl0/social/list",
|
||
|
where:{
|
||
|
socName:$("#taskl0_receiveWin_2_socName").val(),
|
||
|
socLevel:$("#taskl0_receiveWin_2_level").val(),
|
||
|
regionIds:regionId,
|
||
|
socClass:""
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
if(cls == "2"){
|
||
|
//分析单位类别树
|
||
|
var treeObj = $.fn.zTree.getZTreeObj("taskl0_receiveWin_2_optTree2");
|
||
|
var _nodes = treeObj.getSelectedNodes();
|
||
|
var classVal = "";
|
||
|
if(_nodes.length != 0){
|
||
|
classVal = _nodes[0].id;
|
||
|
}
|
||
|
taskl0_receiveWin_2_dataTable.reload({
|
||
|
url:"${ctx}/work/task/taskl0/social/list",
|
||
|
where:{
|
||
|
socName:$("#taskl0_receiveWin_2_socName").val(),
|
||
|
socLevel:$("#taskl0_receiveWin_2_level").val(),
|
||
|
regionIds:regionId,
|
||
|
socClass:classVal
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
});
|
||
|
//添加窗口接收单位弹出窗口之后的//行政区划&单位类别中的刷新按钮
|
||
|
$("#taskl0_receiveWin_2_refreshBtn").click(function(){
|
||
|
var cls = $("#taskl0_receiveWin_2_cls");
|
||
|
if(cls.val() == "1") rgTreeOpt();
|
||
|
if(cls.val() == "2") classTreeOpt();
|
||
|
});
|
||
|
//添加窗口接收单位弹出窗口之后的//数据表格taskl0_receiveWin_2_dataTable
|
||
|
var taskl0_receiveWin_2_dataTable = table.render({
|
||
|
elem:"#taskl0_receiveWin_2_dataTable",
|
||
|
//url:"${ctx}/work/task/taskl0/taskBase/list",
|
||
|
method:"get",
|
||
|
width:"975",
|
||
|
height:"475",
|
||
|
cols:[[
|
||
|
{unresize:true,width:72,align:"center",templet:function(d){
|
||
|
var opt = "<a class=\"layui-btn layui-btn-normal layui-btn-xs\" lay-event=\"opt_choose\">选择</a> ";
|
||
|
return opt;
|
||
|
}},
|
||
|
{field:"socName",title:"企业单位名称",unresize:true,width:260,templet:"<div><span title=\"{{d.socName}}\">{{d.socName}}</span></div>"},
|
||
|
{field:"regionVals",title:"所属行政区划",unresize:true,width:300,templet:"<div><span title=\"{{d.regionVals}}\">{{d.regionVals}}</span></div>"},
|
||
|
{field:"socLevel",title:"消防等级",unresize:true,width:150,templet:function(d){
|
||
|
if(d.socLevel == "1") return "消防安全重点单位";
|
||
|
if(d.socLevel == "2") return "消防安全一般单位";
|
||
|
if(d.socLevel == "3") return "九小场所";
|
||
|
if(d.socLevel == "4") return "其它";
|
||
|
return "";
|
||
|
}},
|
||
|
{field:"socProp",title:"单位性质",unresize:true,width:90,templet:function(d){
|
||
|
if(d.socProp == "1") return "机关";
|
||
|
if(d.socProp == "2") return "团体";
|
||
|
if(d.socProp == "3") return "企业";
|
||
|
if(d.socProp == "4") return "事业";
|
||
|
if(d.socProp == "5") return "其它";
|
||
|
return "";
|
||
|
}},
|
||
|
{field:"socIsrisk",title:"是否高危",unresize:true,width:90,templet:function(d){
|
||
|
if(d.socIsrisk == "1") return "是";
|
||
|
return "";
|
||
|
}}
|
||
|
]],
|
||
|
page:{
|
||
|
layout:["prev","page","next","skip","count","limit"],
|
||
|
limits:[10]
|
||
|
}
|
||
|
});
|
||
|
//添加窗口接收单位弹出窗口之后的//数据表格taskl0_receiveWin_2_dataTable每行数据操作监听
|
||
|
table.on("tool(taskl0_receiveWin_2_dataTable_filter)",function(row){//row.data row.event
|
||
|
if(row.event == "opt_choose"){
|
||
|
var ids = $("#taskl0_receiveWin_2_baseIds");
|
||
|
if(ids.val() == "allRegions") return false;
|
||
|
var div = $("#taskl0_receiveWin_2_div");
|
||
|
if(ids.val() == ""){
|
||
|
var _ids = "";
|
||
|
_ids += row.data.id;
|
||
|
ids.val(_ids);
|
||
|
var _span = "<span class='page_receive' title='点击可删除' onclick='javascript:removeReceive("+row.data.id+");'><p baseId='"+row.data.id+"' baseCls='"+row.data.baseCls+"'>"+row.data.socName+"</p></span>";
|
||
|
div.append(_span);
|
||
|
}else{
|
||
|
var idsArr = ids.val().split(",");
|
||
|
if($.inArray(row.data.id.toString(),idsArr) == -1){
|
||
|
idsArr.push(row.data.id);
|
||
|
ids.val(idsArr.join(","));
|
||
|
var _span = "<span class='page_receive' title='点击可删除' onclick='javascript:removeReceive("+row.data.id+");'><p baseId='"+row.data.id+"' baseCls='"+row.data.baseCls+"'>"+row.data.socName+"</p></span>";
|
||
|
div.append(_span);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
});
|
||
|
//添加窗口接收单位弹出窗口之后的//查询按钮
|
||
|
$("#taskl0_receiveWin_2_queryBtn").click(function(){
|
||
|
var _region = "${manager_user['regionIds']}".split(",");
|
||
|
var regionId = "";
|
||
|
if(_region.length == 2){//支队
|
||
|
regionId = _region[1];
|
||
|
}else if(_region.length > 2){//大队
|
||
|
regionId = _region[2];
|
||
|
}else{//总队
|
||
|
regionId = _region[0];
|
||
|
}
|
||
|
var cls = $("#taskl0_receiveWin_2_cls").val();
|
||
|
if(cls == "1"){
|
||
|
//分析区划树
|
||
|
var treeObj = $.fn.zTree.getZTreeObj("taskl0_receiveWin_2_optTree1");
|
||
|
var _nodes = treeObj.getSelectedNodes();
|
||
|
if(_nodes.length != 0){
|
||
|
regionId = _nodes[0].id;
|
||
|
}
|
||
|
taskl0_receiveWin_2_dataTable.reload({
|
||
|
url:"${ctx}/work/task/taskl0/social/list",
|
||
|
where:{
|
||
|
socName:$("#taskl0_receiveWin_2_socName").val(),
|
||
|
socLevel:$("#taskl0_receiveWin_2_level").val(),
|
||
|
regionIds:regionId,
|
||
|
socClass:""
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
if(cls == "2"){
|
||
|
//分析单位类别树
|
||
|
var treeObj = $.fn.zTree.getZTreeObj("taskl0_receiveWin_2_optTree2");
|
||
|
var _nodes = treeObj.getSelectedNodes();
|
||
|
var classVal = "";
|
||
|
if(_nodes.length != 0){
|
||
|
classVal = _nodes[0].id;
|
||
|
}
|
||
|
taskl0_receiveWin_2_dataTable.reload({
|
||
|
url:"${ctx}/work/task/taskl0/social/list",
|
||
|
where:{
|
||
|
socName:$("#taskl0_receiveWin_2_socName").val(),
|
||
|
socLevel:$("#taskl0_receiveWin_2_level").val(),
|
||
|
regionIds:regionId,
|
||
|
socClass:classVal
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
});
|
||
|
//添加窗口接收单位弹出窗口之后的//重置按钮
|
||
|
$("#taskl0_receiveWin_2_resetBtn").click(function(){
|
||
|
$("#taskl0_receiveWin_2_socName").val("");
|
||
|
$("#taskl0_receiveWin_2_level").val("");
|
||
|
form.render();
|
||
|
var _region = "${manager_user['regionIds']}".split(",");
|
||
|
var regionId = "";
|
||
|
if(_region.length == 2){//支队
|
||
|
regionId = _region[1];
|
||
|
}else if(_region.length > 2){//大队
|
||
|
regionId = _region[2];
|
||
|
}else{//总队
|
||
|
regionId = _region[0];
|
||
|
}
|
||
|
var treeObj = $.fn.zTree.getZTreeObj("taskl0_receiveWin_2_optTree1");
|
||
|
treeObj.cancelSelectedNode();
|
||
|
treeObj = $.fn.zTree.getZTreeObj("taskl0_receiveWin_2_optTree2");
|
||
|
treeObj.cancelSelectedNode();
|
||
|
taskl0_receiveWin_2_dataTable.reload({
|
||
|
url:"${ctx}/work/task/taskl0/social/list",
|
||
|
where:{
|
||
|
socName:"",
|
||
|
socLevel:"",
|
||
|
regionIds:regionId,
|
||
|
socClass:""
|
||
|
}
|
||
|
});
|
||
|
});
|
||
|
//添加窗口接收单位弹出窗口之后的//选择所有下辖单位按钮
|
||
|
$("#taskl0_receiveWin_2_allBtn").click(function(){
|
||
|
var div = $("#taskl0_receiveWin_2_div");
|
||
|
var ids = $("#taskl0_receiveWin_2_baseIds");
|
||
|
var _region = "${manager_user['regionIds']}".split(",");
|
||
|
if(_region.length == 2){//支队
|
||
|
_region = _region[1];
|
||
|
}else if(_region.length > 2){//大队
|
||
|
_region = _region[2];
|
||
|
}else{//总队
|
||
|
_region = _region[0];
|
||
|
}
|
||
|
ids.val("allRegions");
|
||
|
div.html("<span class='page_receive' title='点击可删除' onclick='javascript:removeReceive("+_region+",1);'><p t='"+_region+"'>下辖所有企业单位</p></span>");
|
||
|
});
|
||
|
//详情窗口查看单位落实情况按钮
|
||
|
$("#taskl0_detail_btn").click(function(){
|
||
|
//taskl0_receive_detailWin
|
||
|
taskl0_receive_detailWin = layer.open({
|
||
|
id:"taskl0_receive_detailWin_id",
|
||
|
type:1,
|
||
|
title:"<i class=\"icon_detail\"></i>检查任务单位落实详情",
|
||
|
shade:0.3,
|
||
|
area:["1000px","600px"],
|
||
|
resize:false,
|
||
|
content:$("#taskl0_receive_detailWin"),
|
||
|
success:function(){
|
||
|
taskl0_receive_detail_dataTable.reload({
|
||
|
url:"${ctx}/work/task/taskl0/taskReceive/list",
|
||
|
where:{
|
||
|
taskId:$("#taskl0_detail_id").val(),
|
||
|
taskState:"",
|
||
|
socName:"",
|
||
|
socLevel:""
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
});
|
||
|
return false;
|
||
|
});
|
||
|
//单位落实情况页面的taskl0_receive_detail_dataTable
|
||
|
var taskl0_receive_detail_dataTable = table.render({
|
||
|
elem:"#taskl0_receive_detail_dataTable",
|
||
|
method:"get",
|
||
|
height:"485",
|
||
|
cols:[[
|
||
|
{field:"taskState",title:"落实情况",unresize:true,width:160,templet:function(d){
|
||
|
if(d.taskState == "0") return "<span style=\"color:red;\">未落实</span>";
|
||
|
return "<span style=\"color:green;\">已落实</span> <a class=\"layui-btn layui-btn-normal layui-btn-xs\" lay-event=\"opt_show\">点击查看</a>";
|
||
|
}},
|
||
|
{field:"socName",title:"企业单位名称",unresize:true,width:200,templet:"<div><span title=\"{{d.socName}}\">{{d.socName}}</span></div>"},
|
||
|
{field:"regionVals",title:"所属行政区划",unresize:true,width:260,templet:"<div><span title=\"{{d.regionVals}}\">{{d.regionVals}}</span></div>"},
|
||
|
{field:"socLevel",title:"消防等级",unresize:true,width:150,templet:function(d){
|
||
|
if(d.socLevel == "1") return "消防安全重点单位";
|
||
|
if(d.socLevel == "2") return "消防安全一般单位";
|
||
|
if(d.socLevel == "3") return "九小场所";
|
||
|
if(d.socLevel == "4") return "其它";
|
||
|
return "";
|
||
|
}},
|
||
|
{field:"socProp",title:"单位性质",unresize:true,width:90,templet:function(d){
|
||
|
if(d.socProp == "1") return "机关";
|
||
|
if(d.socProp == "2") return "团体";
|
||
|
if(d.socProp == "3") return "企业";
|
||
|
if(d.socProp == "4") return "事业";
|
||
|
if(d.socProp == "5") return "其它";
|
||
|
return "";
|
||
|
}},
|
||
|
{field:"socIsrisk",title:"是否高危",unresize:true,width:90,templet:function(d){
|
||
|
if(d.socIsrisk == "1") return "是";
|
||
|
return "";
|
||
|
}}
|
||
|
]],
|
||
|
page:{
|
||
|
layout:["prev","page","next","skip","count","limit"],
|
||
|
limits:[10,20,30]
|
||
|
}
|
||
|
});
|
||
|
table.on("tool(taskl0_receive_detail_dataTable_filter)",function(row){//row.data row.event
|
||
|
if(row.event == "opt_show"){
|
||
|
taskl0_plan_detailWin = layer.open({
|
||
|
id:"taskl0_plan_detailWin_id",
|
||
|
type:1,
|
||
|
title:"<i class=\"icon_detail\"></i>巡检巡查计划详情",
|
||
|
shade:0.3,
|
||
|
area:["600px","600px"],
|
||
|
resize:false,
|
||
|
content:$("#taskl0_plan_detailWin"),
|
||
|
success:function(){
|
||
|
$.ajax({
|
||
|
type:"get",
|
||
|
url:"${ctx}/work/task/taskl0/planBase/show",
|
||
|
data:{
|
||
|
taskId:row.data.taskId,
|
||
|
baseId:row.data.baseId
|
||
|
},
|
||
|
dataType:"json",
|
||
|
success:function(data){
|
||
|
//加载select
|
||
|
var data_ls = data;
|
||
|
var selectLs = $("#taskl0_plan_detail_ls");
|
||
|
selectLs[0].options.length = 0;
|
||
|
$.each(data_ls,function(){
|
||
|
selectLs.append("<option value=\""+$(this)[0].id+"\">["+$(this)[0].planCreate+"]"+$(this)[0].planDes+"</option>");
|
||
|
});
|
||
|
form.render();
|
||
|
//默认展示第一个
|
||
|
var data_base = data[0];
|
||
|
$("#taskl0_plan_detail_planId").val(data_base.id);
|
||
|
$("#taskl0_plan_detail_taskId").val(data_base.taskId);
|
||
|
$("#taskl0_plan_detail_baseId").val(data_base.baseId);
|
||
|
$("#taskl0_plan_detail_tasks").html("巡检任务落实");
|
||
|
$("#taskl0_plan_detail_planDes").html(data_base.planDes);
|
||
|
var _type = "天";
|
||
|
if(data_base.planType == "2") _type = "周";
|
||
|
if(data_base.planType == "3") _type = "月";
|
||
|
if(data_base.planType == "4") _type = "季度";
|
||
|
if(data_base.planType == "5") _type = "年";
|
||
|
$("#taskl0_plan_detail_planValType").html(data_base.planVal+_type);
|
||
|
$("#taskl0_plan_detail_planTimep").html(data_base.planTimep.replace(","," - "));
|
||
|
$("#taskl0_plan_detail_planBeginEnd").html(data_base.planBegin+" - "+data_base.planEnd);
|
||
|
if(data_base.planNo == null){
|
||
|
$("#taskl0_plan_detail_planNo").html("无");
|
||
|
}else{
|
||
|
var _no = data_base.planNo.replace("1","周一");
|
||
|
_no = _no.replace("2","周二");
|
||
|
_no = _no.replace("3","周三");
|
||
|
_no = _no.replace("4","周四");
|
||
|
_no = _no.replace("5","周五");
|
||
|
_no = _no.replace("6","周六");
|
||
|
_no = _no.replace("0","周日");
|
||
|
$("#taskl0_plan_detail_planNo").html(_no);
|
||
|
}
|
||
|
$("#taskl0_plan_detail_planUsers").html(data_base.usersInfo.split(",")[1]);
|
||
|
taskl0_plan_detail_checks_dataTable.reload({
|
||
|
url:"${ctx}/work/task/taskl0/socChecks/list",
|
||
|
where:{
|
||
|
baseId:data_base.baseId,
|
||
|
taskId:data_base.taskId,
|
||
|
planId:data_base.id
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
});
|
||
|
//巡检详情中巡检点select
|
||
|
form.on("select(taskl0_plan_detail_ls_filter)",function(data){
|
||
|
if(data.value == "") return false;
|
||
|
$.ajax({
|
||
|
type:"get",
|
||
|
url:"${ctx}/work/task/taskl0/planBase/get",
|
||
|
data:{id:data.value},
|
||
|
dataType:"json",
|
||
|
success:function(data){
|
||
|
$("#taskl0_plan_detail_planId").val(data.id);
|
||
|
$("#taskl0_plan_detail_taskId").val(data.taskId);
|
||
|
$("#taskl0_plan_detail_baseId").val(data.baseId);
|
||
|
$("#taskl0_plan_detail_tasks").html("巡检任务落实");
|
||
|
$("#taskl0_plan_detail_planDes").html(data.planDes);
|
||
|
var _type = "天";
|
||
|
if(data.planType == "2") _type = "周";
|
||
|
if(data.planType == "3") _type = "月";
|
||
|
if(data.planType == "4") _type = "季度";
|
||
|
if(data.planType == "5") _type = "年";
|
||
|
$("#taskl0_plan_detail_planValType").html(data.planVal+_type);
|
||
|
$("#taskl0_plan_detail_planTimep").html(data.planTimep.replace(","," - "));
|
||
|
$("#taskl0_plan_detail_planBeginEnd").html(data.planBegin+" - "+data.planEnd);
|
||
|
if(data.planNo == null){
|
||
|
$("#taskl0_plan_detail_planNo").html("无");
|
||
|
}else{
|
||
|
var _no = data.planNo.replace("1","周一");
|
||
|
_no = _no.replace("2","周二");
|
||
|
_no = _no.replace("3","周三");
|
||
|
_no = _no.replace("4","周四");
|
||
|
_no = _no.replace("5","周五");
|
||
|
_no = _no.replace("6","周六");
|
||
|
_no = _no.replace("0","周日");
|
||
|
$("#taskl0_plan_detail_planNo").html(_no);
|
||
|
}
|
||
|
$("#taskl0_plan_detail_planUsers").html(data.usersInfo.split(",")[1]);
|
||
|
taskl0_plan_detail_checks_dataTable.reload({
|
||
|
url:"${ctx}/work/task/taskl0/socChecks/list",
|
||
|
where:{
|
||
|
baseId:data.baseId,
|
||
|
taskId:data.taskId,
|
||
|
planId:data.id
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
});
|
||
|
});
|
||
|
//巡检详情中巡检点dataTable
|
||
|
var taskl0_plan_detail_checks_dataTable = table.render({
|
||
|
elem:"#taskl0_plan_detail_checks_dataTable",
|
||
|
method:"get",
|
||
|
height:485,
|
||
|
cols:[[
|
||
|
{title:"分区&位置",unresize:true,width:200,templet:function(d){
|
||
|
return d.valsname1+","+d.valsname2;
|
||
|
}},
|
||
|
{field:"checksDes",title:"具体位置",unresize:true,width:218},
|
||
|
{field:"checksRfid",title:"RFID码",unresize:true,width:100}
|
||
|
]],
|
||
|
page:{
|
||
|
layout:["prev","page","next","skip","count","limit"],
|
||
|
limits:[10]
|
||
|
}
|
||
|
});
|
||
|
$("#taskl0_receive_detail_queryBtn").click(function(){
|
||
|
taskl0_receive_detail_dataTable.reload({
|
||
|
url:"${ctx}/work/task/taskl0/taskReceive/list",
|
||
|
where:{
|
||
|
taskId:$("#taskl0_detail_id").val(),
|
||
|
taskState:$("#taskl0_receive_detail_taskState").val(),
|
||
|
socName:$("#taskl0_receive_detail_socName").val(),
|
||
|
socLevel:$("#taskl0_receive_detail_level").val(),
|
||
|
}
|
||
|
});
|
||
|
});
|
||
|
$("#taskl0_receive_detail_resetBtn").click(function(){
|
||
|
$("#taskl0_receive_detail_taskState").val("");
|
||
|
$("#taskl0_receive_detail_socName").val("");
|
||
|
$("#taskl0_receive_detail_level").val("");
|
||
|
form.render();
|
||
|
taskl0_receive_detail_dataTable.reload({
|
||
|
url:"${ctx}/work/task/taskl0/taskReceive/list",
|
||
|
where:{
|
||
|
taskId:$("#taskl0_detail_id").val(),
|
||
|
taskState:"",
|
||
|
socName:"",
|
||
|
socLevel:"",
|
||
|
}
|
||
|
});
|
||
|
});
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
//日期input
|
||
|
ldate.render({
|
||
|
elem:"#taskl0_beginTime"
|
||
|
});
|
||
|
ldate.render({
|
||
|
elem:"#taskl0_endTime"
|
||
|
});
|
||
|
ldate.render({
|
||
|
elem:"#taskl0_addForm_taskBegin"
|
||
|
});
|
||
|
//默认需要加载的数据
|
||
|
//加载行政区划
|
||
|
rgTreeOpt();
|
||
|
//加载单位类别
|
||
|
classTreeOpt();
|
||
|
});
|
||
|
var rgTreeOpt = function(){
|
||
|
var zSet = {
|
||
|
data:{
|
||
|
key:{
|
||
|
title:"des"
|
||
|
}
|
||
|
},
|
||
|
view:{
|
||
|
selectedMulti:false
|
||
|
},
|
||
|
async:{
|
||
|
enable:true,
|
||
|
type:"get",
|
||
|
url:"${ctx}/work/task/task/region",
|
||
|
dataType:"json"
|
||
|
//autoParam:["id"],
|
||
|
//otherParam:{"id":"zTreeAsyncTest"}
|
||
|
},
|
||
|
callback:{
|
||
|
onAsyncSuccess:function(e,treeId,treeNode){
|
||
|
rgTreeHandle("${manager_user['regionIds']}","taskl0_receiveWin_2_optTree1");
|
||
|
},
|
||
|
beforeClick:function(treeId,treeNode){
|
||
|
return rgTreeHandle("${manager_user['regionIds']}","",treeNode);
|
||
|
},
|
||
|
onClick:function(e,treeId,treeNode){
|
||
|
table.reload("taskl0_receiveWin_2_dataTable",{
|
||
|
url:"${ctx}/work/task/taskl0/social/list",
|
||
|
where:{
|
||
|
socName:$("#taskl0_receiveWin_2_socName").val(),
|
||
|
socLevel:$("#taskl0_receiveWin_2_level").val(),
|
||
|
regionIds:treeNode.id,
|
||
|
socClass:""
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
}
|
||
|
};
|
||
|
$.fn.zTree.init($("#taskl0_receiveWin_2_optTree1"),zSet);
|
||
|
}
|
||
|
var rgTreeHandle = function(region,treeId,treeNode){
|
||
|
var _region = region.split(",");
|
||
|
if(treeId != ""){
|
||
|
var treeObj = $.fn.zTree.getZTreeObj(treeId);
|
||
|
//全国或者总队
|
||
|
if(_region.length == 1){
|
||
|
//全国
|
||
|
if(_region[0] == "100000"){
|
||
|
nodes = treeObj.getNodesByFilter(function(node){return node.level == 0});
|
||
|
for(var i = 0;i < nodes.length;i++){
|
||
|
treeObj.expandNode(nodes[i]);
|
||
|
}
|
||
|
}
|
||
|
//总队
|
||
|
if(_region[0] != "100000"){
|
||
|
nodes = treeObj.getNodesByFilter(function(node){return node.level == 1});
|
||
|
for(var i = 0;i < nodes.length;i++){
|
||
|
if(nodes[i].id == _region[0]){
|
||
|
treeObj.expandNode(nodes[i]);
|
||
|
continue;
|
||
|
}
|
||
|
treeObj.removeNode(nodes[i]);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
//支队
|
||
|
if(_region.length == 2){
|
||
|
var nodes = treeObj.getNodesByFilter(function(node){return node.level == 1});
|
||
|
for(var i = 0;i < nodes.length;i++){
|
||
|
if(nodes[i].id == _region[0]){
|
||
|
continue;
|
||
|
}
|
||
|
treeObj.removeNode(nodes[i]);
|
||
|
}
|
||
|
nodes = treeObj.getNodesByFilter(function(node){return node.level == 2});
|
||
|
for(var i = 0;i < nodes.length;i++){
|
||
|
if(nodes[i].id == _region[1]){
|
||
|
continue;
|
||
|
}
|
||
|
treeObj.removeNode(nodes[i]);
|
||
|
}
|
||
|
treeObj.expandAll(true);
|
||
|
}
|
||
|
//大队
|
||
|
if(_region.length > 2){
|
||
|
var nodes = treeObj.getNodesByFilter(function(node){return node.level == 1});
|
||
|
for(var i = 0;i < nodes.length;i++){
|
||
|
if(nodes[i].id == _region[0]){
|
||
|
continue;
|
||
|
}
|
||
|
treeObj.removeNode(nodes[i]);
|
||
|
}
|
||
|
nodes = treeObj.getNodesByFilter(function(node){return node.level == 2});
|
||
|
for(var i = 0;i < nodes.length;i++){
|
||
|
if(nodes[i].id == _region[1]){
|
||
|
continue;
|
||
|
}
|
||
|
treeObj.removeNode(nodes[i]);
|
||
|
}
|
||
|
nodes = treeObj.getNodesByFilter(function(node){return node.level == 3});
|
||
|
for(var i = 0;i < nodes.length;i++){
|
||
|
if(nodes[i].id == _region[2]){
|
||
|
continue;
|
||
|
}
|
||
|
treeObj.removeNode(nodes[i]);
|
||
|
}
|
||
|
treeObj.expandAll(true);
|
||
|
}
|
||
|
}else{
|
||
|
//全国或者总队
|
||
|
if(_region.length == 1){
|
||
|
//全国不做处理
|
||
|
//总队
|
||
|
if(_region[0] != "100000"){
|
||
|
if(treeNode.level == 0) return false;
|
||
|
}
|
||
|
}
|
||
|
//支队
|
||
|
if(_region.length == 2){
|
||
|
if(treeNode.level == 0) return false;
|
||
|
if(treeNode.level == 1) return false;
|
||
|
}
|
||
|
//大队
|
||
|
if(_region.length > 2){
|
||
|
if(treeNode.level == 0) return false;
|
||
|
if(treeNode.level == 1) return false;
|
||
|
if(treeNode.level == 2) return false;
|
||
|
}
|
||
|
return true;
|
||
|
}
|
||
|
}
|
||
|
var classTreeOpt = function(){
|
||
|
var zSet = {
|
||
|
view:{
|
||
|
selectedMulti:false
|
||
|
},
|
||
|
async:{
|
||
|
enable:true,
|
||
|
type:"get",
|
||
|
url:"${ctx}/work/task/task/dic/dwlb",
|
||
|
dataType:"json"
|
||
|
//autoParam:["id"],
|
||
|
//otherParam:{"id":"zTreeAsyncTest"}
|
||
|
},
|
||
|
callback:{
|
||
|
onAsyncSuccess:function(e,treeId,treeNode){
|
||
|
menuIconOpt("taskl0_receiveWin_2_optTree2");
|
||
|
//$.fn.zTree.getZTreeObj("taskl0_receiveWin_2_optTree2").expandAll(true);
|
||
|
},
|
||
|
onClick:function(e,treeId,treeNode){
|
||
|
var _region = "${manager_user['regionIds']}".split(",");
|
||
|
var regionId = "";
|
||
|
if(_region.length == 2){//支队
|
||
|
regionId = _region[1];
|
||
|
}else if(_region.length > 2){//大队
|
||
|
regionId = _region[2];
|
||
|
}else{//总队
|
||
|
regionId = _region[0];
|
||
|
}
|
||
|
table.reload("taskl0_receiveWin_2_dataTable",{
|
||
|
url:"${ctx}/work/task/taskl0/social/list",
|
||
|
where:{
|
||
|
socName:$("#taskl0_receiveWin_2_socName").val(),
|
||
|
socLevel:$("#taskl0_receiveWin_2_level").val(),
|
||
|
regionIds:regionId,
|
||
|
socClass:treeNode.id
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
}
|
||
|
};
|
||
|
$.fn.zTree.init($("#taskl0_receiveWin_2_optTree2"),zSet);
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
//删除选择单位窗口选择的单位
|
||
|
var removeReceive4add = function(id,n){
|
||
|
if(n == 1){
|
||
|
var _dom = $(".page_receive_add").find("p[t='"+id+"']");
|
||
|
_dom.parent().remove();
|
||
|
var ids = $("#taskl0_addForm_receiveIds");
|
||
|
ids.val(ids.val().replace("allRegions",""));
|
||
|
return false;
|
||
|
}
|
||
|
var _dom = $(".page_receive_add").find("p[baseId='"+id+"']");
|
||
|
_dom.parent().remove();
|
||
|
var ids = $("#taskl0_addForm_receiveIds");
|
||
|
if(ids.val().substring(0,1) == ","){
|
||
|
var _ids = ids.val();
|
||
|
ids.val(_ids.replace(","+id,""));
|
||
|
}else{
|
||
|
var _ids = ","+ids.val();
|
||
|
ids.val(_ids.replace(","+id,""));
|
||
|
}
|
||
|
}
|
||
|
var removeReceive = function(id,n){
|
||
|
if(n == 1){
|
||
|
var _dom = $(".page_receive").find("p[t='"+id+"']");
|
||
|
_dom.parent().remove();
|
||
|
var ids = $("#taskl0_receiveWin_2_baseIds");
|
||
|
ids.val(ids.val().replace("allRegions",""));
|
||
|
return false;
|
||
|
}
|
||
|
var _dom = $(".page_receive").find("p[baseId='"+id+"']");
|
||
|
_dom.parent().remove();
|
||
|
var ids = $("#taskl0_receiveWin_2_baseIds");
|
||
|
if(ids.val().substring(0,1) == ","){
|
||
|
ids.val(ids.val().replace(","+id,""));
|
||
|
}else{
|
||
|
var _ids = ","+ids.val();
|
||
|
ids.val(_ids.replace(","+id,""));
|
||
|
}
|
||
|
}
|
||
|
</script>
|
||
|
</body>
|
||
|
</html>
|