<div id="add_form" class="add_form">
<%--基本信息--%>
<div class="blockTitle"><i class="fa fa-bookmark" style="color:#666666;"></i><span class="titleSapn">基本信息</span>
</div>
<table width="100%" class="tableInfo">
<tr>
<td nowrap="nowrap" class="titleTd"><span class="asterisk">*</span><span>报送单位</span></td>
<td nowrap="nowrap">
<select id="recordCorpId" onchange="ajaxGetGsDep()">
<option value="">请选择</option>
</select>
</td>
<td nowrap="nowrap" class="titleTd"><span class="asterisk">*</span><span>报送部门</span></td>
<td nowrap="nowrap">
<select id="recordDepId">
<option value="">请选择</option>
</select>
</td>
<td nowrap="nowrap" class="titleTd"><span class="asterisk">*</span><span>报送人</span></td>
<td nowrap="nowrap">
<input type="text" autocomplete="off" id="recordUserName" placeholder="请选择"
onclick="getUserTree(12)"
value=""/>
<input type="hidden" id="recordUserId" value=""/>
</td>
</tr>
<tr>
<td nowrap="nowrap" class="titleTd"><span class="asterisk">*</span><span>联系方式</span></td>
<td nowrap="nowrap">
<input type="text" autocomplete="off" id="recordUserPhone" placeholder="请输入" onblur="clearPhone()"
value=""/>
</td>
<td nowrap="nowrap" class="titleTd"><span>报告方式</span></td>
<td nowrap="nowrap">
<input type="text" disabled autocomplete="off" id="isFirst" value="首次报告"/>
</td>
<td nowrap="nowrap" class="titleTd"><span>报送时间</span></td>
<td nowrap="nowrap">
<input type="text" autocomplete="off" disabled id="recordTime" value=""/>
</td>
</tr>
<tr>
<td nowrap="nowrap" class="titleTd"><span class="asterisk">*</span><span>事故事件名称</span></td>
<td nowrap="nowrap" colspan="5">
<input type="text" autocomplete="off" id="sgsj_sgsjkb_name" value="" style="width: 98.7%"
placeholder="请输入"/>
</td>
</tr>
<tr>
<td nowrap="nowrap" class="titleTd"><span class="asterisk">*</span><span>事发单位</span></td>
<td nowrap="nowrap">
<input type="text" autocomplete="off" onclick="getCorpTree()" placeholder="请选择"
id="corpName"
readonly>
<tree-input></tree-input>
<input type="hidden" id="corpId" value=""/>
</td>
<td nowrap="nowrap" class="titleTd"><span class="asterisk">*</span><span>事发时间</span></td>
<td nowrap="nowrap">
<input type="text" autocomplete="off" disabled id="occurredTime" placeholder="请选择"
class="Wdate sipt"
onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm',readOnly:'true',maxDate:'%y-%M-%d'})"/>
</td>
<td nowrap="nowrap" class="titleTd"><span class="asterisk">*</span><span>事发地点</span></td>
<td nowrap="nowrap">
<input type="text" autocomplete="off" id="address" maxlength="500" placeholder="请输入" value=""/>
<del for="address"></del>
</td>
</tr>
<tr>
<td nowrap="nowrap" class="titleTd"><span class="asterisk">*</span><span>事故/事件大类</span></td>
<td nowrap="nowrap">
<input id="sgsjdl" class="sipt" value="" readonly onclick="getSgsjDl(0)" placeholder="请选择"/>
<tree-input></tree-input>
<input type="hidden" id="sgsjdl_id" value=""/>
</td>
</tr>
</table>
<%--人身伤亡--%>
<div class="personInfo" id="div_rssw" hidden>
<div class="blockTitle"><i class="fa fa-bookmark" style="color:#666666;"></i><span
class="titleSapn">人身伤亡</span></div>
<table width="100%" class="tableInfo">
<tr>
<td nowrap="nowrap" class="titleTd"><span class="asterisk">*</span><span>事故/事件小类</span></td>
<td nowrap="nowrap">
<input class="sipt" id="sgsjxl_rs" value="" onclick="getAcciSmallType(0)" placeholder="请选择"/>
<tree-input></tree-input>
<input type="hidden" id="sgsjxl_rs_id" value=""/>
</td>
<td nowrap="nowrap" class="titleTd"><span>死亡人数</span></td>
<td nowrap="nowrap">
<input type="text" id="rssw_swrs" autocomplete="off" placeholder="请输入" onblur="countDj(1)"
onkeyup="value=value.replace(/[^\d.]/g,'')"/>
</td>
<td nowrap="nowrap" class="titleTd"><span>重伤人数</span></td>
<td nowrap="nowrap">
<input type="text" id="rssw_zsrs" autocomplete="off" placeholder="请输入" onblur="countDj(1)"
onkeyup="value=value.replace(/[^\d.]/g,'')"/>
</td>
</tr>
<tr>
<td nowrap="nowrap" class="titleTd"><span>轻伤人数</span></td>
<td nowrap="nowrap">
<input type="text" id="rssw_qsrs" autocomplete="off" placeholder="请输入" onblur="countDj(1)"
onkeyup="value=value.replace(/[^\d.]/g,'')"/>
</td>
<td nowrap="nowrap" class="titleTd"><span>失踪人数</span></td>
<td nowrap="nowrap">
<input type="text" id="rssw_szrs" autocomplete="off" placeholder="请输入" onblur="countDj(1)"
onkeyup="value=value.replace(/[^\d.]/g,'')"/>
</td>
<td nowrap="nowrap" class="titleTd"><span></span></td>
<td nowrap="nowrap">
</td>
</tr>
<tr>
<td nowrap="nowrap" class="titleTd"><span>伤亡人数详情</span></td>
<td nowrap="nowrap" colspan="5">
<div class="add_check_btn"><span id="rssw_xq" onclick="gotoSwxq(0)">添加</span></div>
</td>
</tr>
<tr>
<td nowrap="nowrap" class="titleTd"><span>说明</span></td>
<td nowrap="nowrap" colspan="5">
<textarea maxlength="2000" placeholder="请输入" id="rssw_report"></textarea>
</td>
</tr>
</table>
</div>
<%--设备--%>
<div class="personInfo" id="div_sb" hidden>
<div class="blockTitle"><i class="fa fa-bookmark" style="color:#666666;"></i><span
class="titleSapn">设备</span></div>
<table width="100%" class="tableInfo">
<tr>
<td nowrap="nowrap" class="titleTd"><span class="asterisk">*</span><span>故障设备设施数量</span></td>
<td nowrap="nowrap">
<input class="sipt" id="sb_sbsssl" value="" placeholder="请输入"
onkeyup="value=value.replace(/[^\d.]/g,'')"/>
</td>
<td nowrap="nowrap" class="titleTd"><span class="asterisk">*</span><span>直接经济损失/万元</span></td>
<td nowrap="nowrap">
<input type="text" id="sb_jjss" autocomplete="off" placeholder="请输入" onblur="countDj(2)"
onkeyup="value=value.replace(/[^\d.]/g,'')"/>
</td>
</tr>
<tr>
<td nowrap="nowrap" class="titleTd"><span>其他后果</span></td>
<td nowrap="nowrap" colspan="5">
<input class="sipt" id="sgsjhg_sb" value="" onclick="getSgsjhgType(0)"
placeholder="请选择"/>
<tree-input></tree-input>
<input type="hidden" id="sgsjhg_sb_id" value=""/>
</td>
</tr>
<tr>
<td nowrap="nowrap" class="titleTd"><span>故障设备设施详情</span></td>
<td nowrap="nowrap" colspan="5">
<div class="add_check_btn"><span id="sb_xq" onclick="gotoSbxq()">添加</span></div>
</td>
</tr>
<tr>
<td nowrap="nowrap" class="titleTd"><span>说明</span></td>
<td nowrap="nowrap" colspan="5">
<textarea maxlength="2000" placeholder="请输入" id="sb_report"></textarea>
</td>
</tr>
</table>
</div>
<%--电力安全--%>
<div class="personInfo" id="div_dlaq" hidden>
<div class="blockTitle"><i class="fa fa-bookmark" style="color:#666666;"></i><span
class="titleSapn">电力安全</span></div>
<table width="100%" class="tableInfo">
<tr>
<td nowrap="nowrap" class="titleTd"><span class="asterisk">*</span><span>后果</span></td>
<td nowrap="nowrap" colspan="5">
<input class="sipt" id="sgsjhg_dl" value="" onclick="getSgsjhgType(1)"
placeholder="请选择"/>
<tree-input></tree-input>
<input type="hidden" id="sgsjhg_dl_id" value=""/>
</td>
</tr>
<tr>
<td nowrap="nowrap" class="titleTd"><span>说明</span></td>
<td nowrap="nowrap" colspan="5">
<textarea maxlength="2000" placeholder="请选择" id="dlaq_report"></textarea>
</td>
</tr>
</table>
</div>
<%--水上交通--%>
<div class="personInfo" id="div_ssjt" hidden>
<div class="blockTitle"><i class="fa fa-bookmark" style="color:#666666;"></i><span
class="titleSapn">水上交通</span></div>
<table width="100%" class="tableInfo">
<tr>
<td nowrap="nowrap" class="titleTd"><span class="asterisk">*</span><span>船舶/设施名称</span></td>
<td nowrap="nowrap">
<input type="text" id="ssjt_name" autocomplete="off" value="" placeholder="请输入"/>
</td>
<td nowrap="nowrap" class="titleTd"><span class="asterisk">*</span><span>船舶/设施所有人</span></td>
<td nowrap="nowrap">
<input type="text" id="ssjt_username" autocomplete="off" value="" placeholder="请输入"/>
</td>
<td nowrap="nowrap" class="titleTd"><span class="asterisk">*</span><span>国籍</span></td>
<td nowrap="nowrap">
<select class="ssl" id="ssjt_gj" placeholder="请选择">
<option value="0">请选择</option>
<option value="1">中国</option>
<option value="2">韩国</option>
<option value="4">日本</option>
<option value="5">美国</option>
<option value="6">英国</option>
<option value="7">德国</option>
<option value="8">法国</option>
</select>
</td>
</tr>
<tr>
<td nowrap="nowrap" class="titleTd"><span>起讫港</span></td>
<td nowrap="nowrap">
<input type="text" id="ssjt_qqgq" autocomplete="off" value="" placeholder="请输入"/>
</td>
<td nowrap="nowrap" class="titleTd"><span>至</span></td>
<td nowrap="nowrap">
<input type="text" id="ssjt_qqgz" autocomplete="off" value="" placeholder="请输入"/>
</td>
<td nowrap="nowrap" class="titleTd"><span>海况</span></td>
<td nowrap="nowrap">
<select class="ssl" id="ssjt_hk" placeholder="请选择">
<option value="0">请选择</option>
<option value="1">无浪</option>
<option value="2">微浪</option>
<option value="4">小浪</option>
<option value="5">中浪</option>
<option value="6">大浪</option>
<option value="7">巨浪</option>
<option value="8">狂浪</option>
<option value="8">狂涛</option>
<option value="8">怒涛</option>
</select>
</td>
</tr>
<tr>
<td nowrap="nowrap" class="titleTd"><span class="asterisk">*</span><span>事故/事件小类</span></td>
<td nowrap="nowrap">
<input class="sipt" id="sgsjxl_ss" value="" onclick="getAcciSmallType(1)" placeholder="请选择"/>
<tree-input></tree-input>
<input type="hidden" id="sgsjxl_ss_id" value=""/>
</td>
<td nowrap="nowrap" class="titleTd"><span>死亡人数</span></td>
<td nowrap="nowrap">
<input type="text" id="ssjt_swrs" autocomplete="off" value="" placeholder="请输入"
onblur="countDj(4)"
onkeyup="value=value.replace(/[^\d.]/g,'')"/>
</td>
<td nowrap="nowrap" class="titleTd"><span>重伤人数</span></td>
<td nowrap="nowrap">
<input type="text" id="ssjt_zsrs" autocomplete="off" value="" placeholder="请输入"
onblur="countDj(4)"
onkeyup="value=value.replace(/[^\d.]/g,'')"/>
</td>
</tr>
<tr>
<td nowrap="nowrap" class="titleTd"><span>轻伤人数</span></td>
<td nowrap="nowrap">
<input type="text" id="ssjt_qsrs" autocomplete="off" value="" placeholder="请输入"
onblur="countDj(4)"
onkeyup="value=value.replace(/[^\d.]/g,'')"/>
</td>
<td nowrap="nowrap" class="titleTd"><span>失踪人数</span></td>
<td nowrap="nowrap">
<input type="text" id="ssjt_szrs" autocomplete="off" value="" placeholder="请输入"
onblur="countDj(4)"
onkeyup="value=value.replace(/[^\d.]/g,'')"/>
</td>
<td nowrap="nowrap" class="titleTd"><span>溢油/吨</span></td>
<td nowrap="nowrap">
<input type="text" id="ssjt_yy" autocomplete="off" value="" placeholder="请输入"
onblur="countDj(4)"
onkeyup="value=value.replace(/[^\d.]/g,'')"/>
</td>
</tr>
<tr>
<td nowrap="nowrap" class="titleTd"><span>直接经济损失/万元</span></td>
<td nowrap="nowrap">
<input type="text" id="ssjt_jjss" autocomplete="off" value="" placeholder="请输入"
onblur="countDj(4)"
onkeyup="value=value.replace(/[^\d.]/g,'')"/>
</td>
<td nowrap="nowrap" class="titleTd"><span>船舶/设备损坏程度</span></td>
<td nowrap="nowrap">
<input type="text" id="ssjt_shcd" autocomplete="off" value="" placeholder="请输入"/>
</td>
<td nowrap="nowrap" class="titleTd"><span>伤亡人员详情</span></td>
<td nowrap="nowrap">
<div class="add_check_btn"><span id="ssjt_xq" onclick="gotoSwxq(1)">添加</span></div>
</td>
</tr>
<tr>
<td nowrap="nowrap" class="titleTd"><span>救助要求</span></td>
<td nowrap="nowrap" colspan="5">
<textarea maxlength="2000" placeholder="请输入" id="ssjt_yzyq"></textarea>
</td>
</tr>
<tr>
<td nowrap="nowrap" class="titleTd"><span>说明</span></td>
<td nowrap="nowrap" colspan="5">
<textarea maxlength="2000" placeholder="请输入" id="ssjt_report"></textarea>
</td>
</tr>
</table>
</div>
<%--未遂事件--%>
<div class="personInfo" id="div_wssj" hidden>
<div class="blockTitle"><i class="fa fa-bookmark" style="color:#666666;"></i><span
class="titleSapn">未遂事件</span></div>
<table width="100%" class="tableInfo">
<tr>
<td nowrap="nowrap" class="titleTd"><span class="asterisk">*</span><span>潜在事故/事件类型</span></td>
<td nowrap="nowrap" colspan="5">
<input id="sgsjdl_ws" class="sipt" value="" readonly onclick="getSgsjDl(1)" placeholder="请选择"/>
<tree-input></tree-input>
<input type="hidden" id="sgsjdl_ws_id" value=""/>
</td>
</tr>
<tr>
<td nowrap="nowrap" class="titleTd"><span class="asterisk">*</span><span>潜在事故/事件后果</span></td>
<td nowrap="nowrap" colspan="5">
<textarea maxlength="2000" placeholder="请输入" id="wssj_report"></textarea>
</td>
</tr>
</table>
</div>
<%--基本信息下半部分--%>
<table width="100%" class="tableInfo">
<tr>
<td nowrap="nowrap" class="titleTd"><span class="asterisk">*</span><span>事故/事件等级</span></td>
<td nowrap="nowrap" colspan="5">
<select style="width: 27%;" id="dj_id" onchange="setjsr()">
<option value="0">请选择</option>
<option value="1">特别重大</option>
<option value="2">重大</option>
<option value="3">较大</option>
<option value="4">一般</option>
<option value="5">小事故</option>
<option value="6">10人以上人身轻伤事件</option>
<option value="7">5至10人人身轻伤事件</option>
<option value="8">5人以下人身轻伤事件</option>
<option value="9">A类障碍</option>
<option value="10">B类障碍</option>
<option value="11">C类障碍</option>
<option value="12">设备异常</option>
<option value="13">电力安全事件</option>
<option value="14">无</option>
</select>
</td>
</tr>
<tr>
<td nowrap="nowrap" class="titleTd"><span>事故/事件简要经过</span></td>
<td nowrap="nowrap" colspan="5">
<textarea maxlength="2000" placeholder="请输入" id="sfjg"></textarea>
</td>
</tr>
<tr>
<td nowrap="nowrap" class="titleTd"><span>初步原因分析</span></td>
<td nowrap="nowrap" colspan="5">
<textarea maxlength="2000" placeholder="请输入" id="analyze"></textarea>
</td>
</tr>
<tr>
<td nowrap="nowrap" class="titleTd"><span>损失情况</span></td>
<td nowrap="nowrap" colspan="5">
<textarea maxlength="2000" placeholder="请输入" id="ssqk"></textarea>
</td>
</tr>
<tr>
<td nowrap="nowrap" class="titleTd"><span>已采取的措施</span></td>
<td nowrap="nowrap" colspan="5">
<textarea maxlength="2000" placeholder="请输入" id="description"></textarea>
</td>
</tr>
</table>
<%--信息报送--%>
<div class="blockTitle"><i class="fa fa-bookmark" style="color:#666666;"></i><span class="titleSapn">信息报送</span>
</div>
<table width="100%" class="tableInfo" id="maintable">
<tr>
<td nowrap="nowrap" class="titleTd"><span class="asterisk">*</span><span>报送内容</span></td>
<td nowrap="nowrap" colspan="5">
<div class="bsnr"><span onclick="makeReport()">生成报送内容</span></div>
<div class="bsnr_zhu">如需生成/重新生成报送内容,请点击”生成报送内容“按扭</div>
</td>
</tr>
<tr>
<td nowrap="nowrap" class="titleTd"><span></span></td>
<td nowrap="nowrap" colspan="5">
<textarea maxlength="4000" placeholder="请输入" id="report_content"></textarea>
</td>
</tr>
<tr>
<td nowrap="nowrap" class="titleTd"><span class="asterisk">*</span><span></span></td>
<td nowrap="nowrap" colspan="5">
<span style="font-size:inherit; font-weight:normal; margin: 0px 3px;">提交时是否将报送内容短信发送至内部单位人员:</span>
<span> <input type="radio" name="is_fsdx" value="1" checked/>
<label>是</label>
<input type="radio" name="is_fsdx" value="0"/>
<label>否</label></span>
</td>
</tr>
</table>
</div>
<%--接收人--%>
<table width="100%" class="persontab">
<tr>
<td nowrap="nowrap" class="perfix"><span>接收人</span></td>
<td nowrap="nowrap" class="other tipj" class="perwid"><span class="asterisk">*</span><span>内部单位人员</span>
</td>
<td nowrap="nowrap" colspan="7" class="other">
<input type="text" id="nbNAMES" onclick="getUserTree1(0)" placeholder="请选择" readonly>
<tree-input></tree-input>
<input type="hidden" id="nbIDS">
</td>
</tr>
<tr>
<td nowrap="nowrap" class="perfix"><span></span></td>
<td nowrap="nowrap" class="other tipj"><span>上级单位人员</span></td>
<td nowrap="nowrap" colspan="7" class="other">
<input type="text" id="sjNAMES" onclick="getUserTree1(1)" placeholder="请选择" readonly>
<tree-input></tree-input>
<input type="hidden" id="sjIDS">
</td>
</tr>
<tr>
<td nowrap="nowrap" class="perfix"><span></span></td>
<td nowrap="nowrap" class="other tipj"><span>外部单位人员</span></td>
<td nowrap="nowrap" colspan="7" class="other">
<input type="text" id="wbNAMES" onclick="getUserTree2(2)" placeholder="请选择" readonly>
<tree-input></tree-input>
<input type="hidden" id="wbIDS">
</td>
</tr>
<tr id="trlist">
<td class="perfix"></td>
<td class="other tipj">其他人员</td>
<td class="other">单位名称</td>
<td class="other"><input type="text" id="qt_corpname0" placeholder="请输入"></td>
<td class="other">姓名</td>
<td class="other"><input type="text" id="qt_username0" placeholder="请输入"></td>
<td class="other">手机号</td>
<td class="other"><input type="text" id="qt_phone0" placeholder="请输入"></td>
<td class="other">
<div class="perout">
<a onclick="addInfo();">添加</a>
<a onclick="restets()">重置</a>
</div>
</td>
</tr>
<tr id="coinbg">
<td nowrap="nowrap" class="titleTd"><span class="asterisk">*</span><span></span></td>
<td nowrap="nowrap" colspan="5">
<span>是否需要后续报告::</span>
<span> <input type="radio" name="is_hxbg" id="rad1" value="1" checked/>
<label>是</label>
<input type="radio" name="is_hxbg" id="rad2" value="0"/>
<label>否</label></span>
<span style="margin-left: 25px;">选择“是”,则倒计时启用;选择“否”,则倒计时停止。</span>
</td>
</tr>
</table>
<%--审批--%>
<div class="blockTitle"><i class="fa fa-bookmark" style="color:#666666;"></i><span class="titleSapn">审批</span></div>
<table width="100%" class="tableInfo" style="margin-top: 0px!important;">
<tr>
<td nowrap="nowrap" class="titleTd"><span>审批方式</span></td>
<td nowrap="nowrap">
<input type="text" autocomplete="off" maxlength="100" id="spName" disabled/>
</td>
<td nowrap="nowrap" class="titleTd"><span></span></td>
<td nowrap="nowrap"></td>
<td nowrap="nowrap" class="titleTd"><span></span></td>
<td nowrap="nowrap"></td>
</tr>
<tr id="second">
<td nowrap="nowrap" class="titleTd"><font color="red">*</font><span>审批人</span></td>
<td nowrap="nowrap">
<input class="tree-input longText sipt" placeholder="请选择" type="text" id="spUserNames" autocomplete="off"
value="" onclick="getSpUserTree()"/>
<tree-input></tree-input>
<input id="spUserIds" type="hidden" value=""/>
</td>
</tr>
<tr id="first">
<td nowrap="nowrap" class="titleTd"><span class="asterisk">*</span><span>对应人员</span></td>
<td colspan="5">
<div id="default_div">
</div>
</td>
</tr>
<input type="hidden" id="operateUserId" value="${loginUserId}"/>
<input type="hidden" id="operateUserName" value="${loginUserName}"/>
<input type="hidden" id="sgsj_sgsjkb_id" value="${sgsj_sgsjkb_id}"/>
<input type="hidden" id="opType" value="${opType}"/>
<input type="hidden" id="checkType" value=""/>
</table>
<div class="blockTitle">
<i class="fa fa-bookmark" style="color:#666666;"></i><span class="titleSapn">历史处理情况</span>
</div>
<div id="historyInfo" style="margin-top: 5px;">
<table id="log" style="width:98%"></table>
</div>
前端初始化数据
//获取初始化信息
function ajaxGetSgsjkbInfo() {
$.ajax({
url: '<%=request.getContextPath()%>/sgsj/sgsjkb/ajaxGetAcciInfoNew',
cache: false,
type: 'post',
dataType: 'json',
data: {sgsj_sgsjkb_id: $('#sgsj_sgsjkb_id').val()},
success: function (data) {
var dataList = JSON.parse(data.msg);
$('#recordCorpId').empty();
$('#recordCorpId').append(' dataList.RECORD_CORP_ID + '">' + dataList.TB_CORP_NAME + '');
if (dataList.RECORD_DEP_ID != null) {
$('#recordDepId').empty();
$('#recordDepId').append(' dataList.RECORD_DEP_ID + '">' + dataList.RECORD_DEP_NAME + '');
}
$('#recordUserName').val(dataList.USER_NAME);
$('#recordUserId').val(dataList.RECORD_USER_ID);
$('#recordUserPhone').val(dataList.RECORD_PHONE);
$('#checkType').val(dataList.CHECKTYPE);
if(dataList.BG_TYPE=='1'){
$('#isFirst').val('首次报告');
}else{
$('#isFirst').val('后续报告');
}
$('#recordTime').val(dataList.RE_RECORD_TIME);
$('#sgsj_sgsjkb_name').val(dataList.SGSJ_SGSJKB_NAME);
$('#corpId').val(dataList.CORP_ID);
$('#corpName').val(dataList.SF_CORP_NAME);
$('#address').val(dataList.ADDRESS);
$('#address').attr("title", dataList.ADDRESS);
if(dataList.RE_OCCURRED_TIME!=null){
$('#occurredTime').val(dataList.RE_OCCURRED_TIME);
}else{
$('#occurredTime').attr("disabled", false);
}
$('#sgsjdl_id').val(dataList.DL_ID);
$('#sgsjdl').val(dataList.DL_NAME);
$('#dj_id').val(dataList.DJ_ID);
$('#report_content').val(dataList.REPORT_CONTENT);
$("input[name='is_fsdx'][value=" + dataList.IS_FSDX + "]").attr("checked", true);//是否发送到内部单位
$("input[name='is_hxbg'][value=" + dataList.IS_HXBG + "]").attr("checked", true);//是否需要后续报告
if (dataList.SFJG != null) {
$('#sfjg').val(dataList.SFJG);
}
if (dataList.ANALYZE != null) {
$('#analyze').val(dataList.ANALYZE);
}
if (dataList.SSQK != null) {
$('#ssqk').val(dataList.SSQK);
}
if (dataList.DESCRIPTION != null) {
$('#description').val(dataList.DESCRIPTION);
}
//开始加载大类的展示
if (dataList.DL_ID != null && dataList.DL_ID != "") {
var ids = dataList.DL_ID.split(",");
for (var i = 0; i < ids.length; i++) {
var showid = ids[i];
if (showid == '1') {//人身伤亡
$('#div_rssw').show();
if (dataList.rsswXq != null) {
rsswdatalist = dataList.rsswXq;
var size = rsswdatalist.length;
if (size > 0) {
$('#rssw_xq').html(size + '人');
} else {
$('#rssw_xq').html('添加');
}
}
if (dataList.RSSW_XL_ID != null) {
$('#sgsjxl_rs_id').val(dataList.RSSW_XL_ID);//事故/事件小类
$('#sgsjxl_rs').val(dataList.RSSW_XL_NAME);//事故/事件小类
}
if (dataList.RSSW_SWRS != null) {
$('#rssw_swrs').val(dataList.RSSW_SWRS);
}
if (dataList.RSSW_ZSRS != null) {
$('#rssw_zsrs').val(dataList.RSSW_ZSRS);
}
if (dataList.RSSW_QSRS != null) {
$('#rssw_qsrs').val(dataList.RSSW_QSRS);
}
if (dataList.RSSW_SZRS != null) {
$('#rssw_szrs').val(dataList.RSSW_SZRS);
}
if (dataList.RSSW_REPORT != null) {
$('#rssw_report').val(dataList.RSSW_REPORT);
}
} else if (showid == '2') {//设备
$('#div_sb').show();
if (dataList.sbXq != null) {
sbdatalist = dataList.sbXq;
var size = sbdatalist.length;
if (size > 0) {
$('#sb_xq').html(size + '设备');
} else {
$('#sb_xq').html('添加');
}
}
if (dataList.SB_GZSBSSSL != null) {
$('#sb_sbsssl').val(dataList.SB_GZSBSSSL);
}
if (dataList.SB_ZJJJSS != null) {
$('#sb_jjss').val(dataList.SB_ZJJJSS);
}
if (dataList.SB_HG_ID != null) {
$('#sgsjhg_sb_id').val(dataList.SB_HG_ID);
$('#sgsjhg_sb').val(dataList.SB_HG_NAME);
}
if (dataList.SB_REPORT != null) {
$('#sb_report').val(dataList.SB_REPORT);
}
} else if (showid == '3') {//电力
$('#div_dlaq').show();
if (dataList.DLAQ_HG_ID != null) {
$('#sgsjhg_dl_id').val(dataList.DLAQ_HG_ID);
$('#sgsjhg_dl').val(dataList.DLAQ_HG_NAME);
}
if (dataList.DLAQ_REPORT != null) {
$('#dlaq_report').val(dataList.DLAQ_REPORT);
}
} else if (showid == '4') {//水上交通
$('#div_ssjt').show();
if (dataList.ssjtXq != null) {
ssjtdatalist = dataList.ssjtXq;
var size = ssjtdatalist.length;
if (size > 0) {
$('#ssjt_xq').html(size + '人');
} else {
$('#ssjt_xq').html('添加');
}
}
if (dataList.SSJT_XL_ID != null) {
$('#sgsjxl_ss_id').val(dataList.SSJT_XL_ID);//事故/事件小类
$('#sgsjxl_ss').val(dataList.SSJT_XL_NAME);//事故/事件小类
}
if (dataList.SSJT_YZYQ != null) {
$('#ssjt_yzyq').val(dataList.SSJT_YZYQ);
}
if (dataList.SSJT_SHCD != null) {
$('#ssjt_shcd').val(dataList.SSJT_SHCD);
}
if (dataList.SSJT_ZSRS != null) {
$('#ssjt_zsrs').val(dataList.SSJT_ZSRS);
}
if (dataList.SSJT_JJSS != null) {
$('#ssjt_jjss').val(dataList.SSJT_JJSS);
}
if (dataList.SSJT_USER_NAME != null) {
$('#ssjt_username').val(dataList.SSJT_USER_NAME);
}
if (dataList.SSJT_QQGZ != null) {
$('#ssjt_qqgz').val(dataList.SSJT_QQGZ);
}
if (dataList.SSJT_QSRS != null) {
$('#ssjt_qsrs').val(dataList.SSJT_QSRS);
}
if (dataList.SSJT_YY != null) {
$('#ssjt_yy').val(dataList.SSJT_YY);
}
if (dataList.SSJT_SWRS != null) {
$('#ssjt_swrs').val(dataList.SSJT_SWRS);
}
if (dataList.SSJT_QQGQ != null) {
$('#ssjt_qqgq').val(dataList.SSJT_QQGQ);
}
if (dataList.SSJT_REPORT != null) {
$('#ssjt_report').val(dataList.SSJT_REPORT);
}
if (dataList.SSJT_GJ != null) {
$('#ssjt_gj').val(dataList.SSJT_GJ);
}
if (dataList.SSJT_HK != null) {
$('#ssjt_hk').val(dataList.SSJT_HK);
}
if (dataList.SSJT_NAME != null) {
$('#ssjt_name').val(dataList.SSJT_NAME);
}
if (dataList.SSJT_SZRS != null) {
$('#ssjt_szrs').val(dataList.SSJT_SZRS);
}
} else if (showid == '6') {//未遂事件
$('#div_wssj').show();
if (dataList.WSSJ_QZSGSJHG != null) {
$('#wssj_report').val(dataList.WSSJ_QZSGSJHG);
}
if (dataList.WSSJ_LX_ID != null) {
$('#sgsjdl_ws_id').val(dataList.WSSJ_LX_ID);
$('#sgsjdl_ws').val(dataList.WSSJ_LX_NAME);
}
}
}
}
if (dataList.nbIDS != null) {
nbCorpDepUserIds = dataList.nbIDS;
$('#nbIDS').val(dataList.nbIDS);
$('#nbNAMES').val(dataList.nbNAMES);
}
if (dataList.sjNAMES != null) {
sjCorpDepUserIds = dataList.sjIDS;
$('#sjIDS').val(dataList.sjIDS);
$('#sjNAMES').val(dataList.sjNAMES);
}
if (dataList.wbNAMES != null) {
wbCorpDepUserNames=dataList.wbNAMES;
$('#wbIDS').val(dataList.wbIDS);
$('#wbNAMES').val(dataList.wbNAMES);
}
var qtUser=dataList.qtNAMES;
if (qtUser!= null) {
var aa=qtUser.split(',');
for(var i=0;i<aa.length;i++){
var bb=aa[i].split('-');
if(i==0){
$('#qt_corpname0').val(bb[0]);
$('#qt_username0').val(bb[2]);
$('#qt_phone0').val(bb[1]);
}else{
addInfo();
$('#qt_corpname'+i).val(bb[0]);
$('#qt_username'+i).val(bb[2]);
$('#qt_phone'+i).val(bb[1]);
}
}
}
if (dataList.sjqtNAMES != undefined&&dataList.sjqtNAMES!="") {
var aa=dataList.sjqtNAMES.split(',');
if (dataList.sjNAMES != undefined) {
var ids=dataList.sjIDS;
}
if(aa.length>0){
for(var i=0;i<aa.length;i++){
var sNode = {};
var uuid=getUuid();
sNode.pId='';
sNode.id=uuid;
sNode.name = aa[i];
tempItemList.push(sNode);
if (ids != '') {
ids += ',';
}
ids+=uuid;
if (saveList != '') {
saveList += ',';
}
saveList+=aa[i];
}
$('#sjIDS').val(ids);
}
var allname="";
if (dataList.sjNAMES != undefined) {
allname=dataList.sjNAMES;
}
if (allname != '') {
allname += ',';
}
allname+=dataList.sjqtNAMES;
$('#sjNAMES').val(allname);
}
if(dataList.logList != null){
initLog(dataList.logList);
}
//获取审批方式
sscorp_id = dataList.RECORD_CORP_ID;
getSpmain();
}
})
}
后台接口
@RequestMapping(value = "/ajaxGetAcciInfoNew")
public void ajaxGetAcciInfoNew(HttpSession session, HttpServletResponse response, String sgsj_sgsjkb_id, String WHATCS) {
try {
LoginUserInfo loginUserInfo = (LoginUserInfo) session.getAttribute(SessionConstant.SESSION_LOGINUSER);
Map map = sgsjkbNewService.ajaxGetAcciInfoNew(sgsj_sgsjkb_id, WHATCS);
JsonMsg msg = new JsonMsg(true, JsonUtils.toJson(map));
ResponseUtils.renderHtml(response, JsonUtils.toJson(msg));
} catch (Exception e) {
logger.error("事故详细信息查询失败", e);
JsonMsg msg = new JsonMsg(false, "操作失败!");
ResponseUtils.renderHtml(response, JsonUtils.toJson(msg));
}
}
具体services层的调用
public Map ajaxGetAcciInfoNew(String sgsj_sgsjkb_id, String WHATCS) {
Map map = sgsjkbNewDao.ajaxGetAcciInfoNew(sgsj_sgsjkb_id);
String REPORT_CONTENT = null;
try {
REPORT_CONTENT = Stringutils.ClobToStringAndHh((Clob) map.get("REPORT_CONTENT"));
} catch (Exception e) {
e.printStackTrace();
}
map.put("REPORT_CONTENT", REPORT_CONTENT);
//历史记录
List<?> logList = sgsjkbNewDao.findLogBySgsjkbId(sgsj_sgsjkb_id);
if (logList != null && logList.size() > 0) {
for (int i = 0; i < logList.size(); i++) {
Map<String, Object> m = (Map<String, Object>) logList.get(i);
List<?> logdetailList = sgsjkbNewDao.findLogdetailByLogId(m.get("SGSJ_LOG_ID").toString());
if (logdetailList != null && logdetailList.size() > 0) {
m.put("LOGDETAIL", logdetailList);
} else {
m.put("LOGDETAIL", "");
}
}
}
String LogJosn = JsonUtils.toJson(logList);
LogJosn = LogJosn.replace("'", "\\'");
LogJosn = LogJosn.replace("null", "null").replace("\\\\", "#");
LogJosn = LogJosn.replace("\\n", "\\\\n");
LogJosn = LogJosn.replace("\\r", "\\\\r");
map.put("logList", LogJosn);
if (map.get("DL_ID") != null) {
String dl_id = map.get("DL_ID").toString();//大类的集合,可能是一个,可能是多个,也可能为空
String[] ss = dl_id.split(",");//1人身伤亡2设备3电力4水上交通6未遂事件
for (int i = 0; i < ss.length; i++) {
if (ss[i] != null && !ss[i].equals("")) {
if ("1".equals(ss[i])) {//1人身伤亡
Map rsswMap = sgsjkbNewDao.getRsswMapBySgsjkbId(sgsj_sgsjkb_id);
map.putAll(rsswMap);
if (rsswMap.get("SGSJ_SGSJKB_RSSW_ID") != null) {
List<Map<String, Object>> rsswXq = sgsjkbNewDao.getRsswXq(rsswMap.get("SGSJ_SGSJKB_RSSW_ID").toString(), "0");//人身伤亡中 人员详情
map.put("rsswXq", rsswXq);
}
} else if ("2".equals(ss[i])) {//2设备
Map sbMap = sgsjkbNewDao.getSbMapBySgsjkbId(sgsj_sgsjkb_id);
map.putAll(sbMap);
if (sbMap.get("SGSJ_SGSJKB_SB_ID") != null) {
List<Map<String, Object>> sbXq = sgsjkbNewDao.getSbXq(sbMap.get("SGSJ_SGSJKB_SB_ID").toString());//设备中 设备详情
map.put("sbXq", sbXq);
}
} else if ("3".equals(ss[i])) {//3电力
Map dlaqMap = sgsjkbNewDao.getDlaqMapBySgsjkbId(sgsj_sgsjkb_id);
map.putAll(dlaqMap);
} else if ("4".equals(ss[i])) {//4水上交通
Map ssjtMap = sgsjkbNewDao.getSsjtMapBySgsjkbId(sgsj_sgsjkb_id);
map.putAll(ssjtMap);
if (ssjtMap.get("SGSJ_SGSJKB_SHJT_ID") != null) {
List<Map<String, Object>> ssjtXq = sgsjkbNewDao.getRsswXq(ssjtMap.get("SGSJ_SGSJKB_SHJT_ID").toString(), "1");//水上交通 人员详情
map.put("ssjtXq", ssjtXq);
}
} else if ("6".equals(ss[i])) {//6未遂事件
Map wssjMap = sgsjkbNewDao.getWssjMapBySgsjkbId(sgsj_sgsjkb_id);
map.putAll(wssjMap);
}
}
}
}
List nbryList = sgsjkbNewDao.getNbryListById(sgsj_sgsjkb_id, "0");
if (nbryList.size() > 0) {
Map map1 = (Map) nbryList.get(0);
String nbNAMES = map1.get("NAMES") == null ? "" : map1.get("NAMES").toString();
String nbIDS = map1.get("IDS") == null ? "" : map1.get("IDS").toString();
map.put("nbNAMES", nbNAMES);
map.put("nbIDS", nbIDS);
} else {
map.put("nbNAMES", "");
map.put("nbIDS", "");
}
List sjryList = sgsjkbNewDao.getNbryListById(sgsj_sgsjkb_id, "1");
if (sjryList.size() > 0) {
Map map1 = (Map) sjryList.get(0);
String nbNAMES = map1.get("NAMES") == null ? "" : map1.get("NAMES").toString();
String nbIDS = map1.get("IDS") == null ? "" : map1.get("IDS").toString();
map.put("sjNAMES", nbNAMES);
map.put("sjIDS", nbIDS);
} else {
map.put("sjNAMES", "");
map.put("sjIDS", "");
}
List wbList = sgsjkbNewDao.getwbListById(sgsj_sgsjkb_id, "2");
if (wbList.size() > 0) {
Map map1 = (Map) wbList.get(0);
String wbNAMES = map1.get("USER_NAME") == null ? "" : map1.get("USER_NAME").toString();
String wbIDS = map1.get("IDS") == null ? "" : map1.get("IDS").toString();
map.put("wbNAMES", wbNAMES);
map.put("wbIDS", wbIDS);
} else {
map.put("wbNAMES", "");
map.put("wbIDS", "");
}
List qtList = sgsjkbNewDao.getwbListById(sgsj_sgsjkb_id, "3");
if (qtList.size() > 0) {
Map map1 = (Map) qtList.get(0);
String wbNAMES = map1.get("USER_NAME") == null ? "" : map1.get("USER_NAME").toString();
String wbIDS = map1.get("IDS") == null ? "" : map1.get("IDS").toString();
map.put("qtNAMES", wbNAMES);
map.put("qtIDS", wbIDS);
} else {
map.put("qtNAMES", "");
map.put("qtIDS", "");
}
List list = sgsjkbNewDao.getwbListById(sgsj_sgsjkb_id, "1");//上级中其他人员
if (list.size() > 0) {
Map map1 = (Map) list.get(0);
String sjqtNAMES = map1.get("USER_NAME") == null ? "" : map1.get("USER_NAME").toString();
map.put("sjqtNAMES", sjqtNAMES);
} else {
map.put("sjqtNAMES", "");
}
return map;
}