123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115 |
- <%@page contentType="text/html" pageEncoding="UTF-8"%>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title></title>
- <%@include file="/page/include.jsp" %>
- <!--引用资源文件,JS CSS-->
- <script type="text/javascript" src="<%=path%>/scripts/jquery/plugins/jquery.extension.util.js"></script>
- <script type="text/javascript" src="<%=path%>/scripts/freamwork/com/sinosoft/common/common.js"></script>
- <script type="text/javascript" src="<%=path%>/scripts/freamwork/com/sinosoft/common/utils/utils.js"></script>
- <script type="text/javascript" src="<%=path%>/scripts/freamwork/com/sinosoft/common/frameWork/frameWork.js"></script>
- <script type="text/javascript" src="<%=path%>/scripts/freamwork/com/sinosoft/common/utils/Request.js"></script>
- <link rel="stylesheet" type="text/css" href="<%=path%>/scripts/qui/libs/js/tree/ztree/ztree.css" />
- <script type="text/javascript" src="<%=path%>/scripts/qui/libs/js/tree/ztree/ztree.js"></script>
- <script type="text/javascript" src="<%=path%>/scripts/qui/libs/js/form/selectTree.js"></script>
- <script type="text/javascript" src="<%=path%>/scripts/qui/libs/js/form/validation.js"></script>
- <script type="text/javascript" src="<%=path%>/scripts/qui/libs/js/form/validationRule.js"></script>
- <script type="text/javascript">
- var fd_id = "<%=request.getParameter("fd_id")%>";
- //取得用户真实名字
- var realName = top.com.sinosoft.lz.system.user.LoginInfo.getReal_name();
- //部门id
- var deptId = top.com.sinosoft.lz.system.user.LoginInfo.getCorp_ids();
- //部门名称
- var deptName = top.com.sinosoft.lz.system.user.LoginInfo.getDeptnames();
- //父部门id
- var parentId = top.com.sinosoft.lz.system.user.LoginInfo.getParent_ids();
- //页面初始化
- $(function(){
- var url = $.pathname() + '/ws/crud/CRUDService/getDataById/';
- var params = {
- classid : '363',
- objectID : fd_id
- };
- $.request.query(url,params,function(data){
- $("#titleShow").html(data.EVENT_NAME_363);
- });
-
-
- //绑定重置
- $("#reset").bind("click",function(e,state){
- $("#listerTree1").resetValue();
- });
- //绑定返回
- $("#back").bind("click",function(e,state){
- $('#frmright',window.parent.document).attr('src',$.pathname()+"/page/business/em/event/EventManager.jsp");
- });
- //绑定保存
- $("#save").bind("click",function(e,state){
- var noticeIds = $("#listerTree1").attr("relValue");
- if(!noticeIds || noticeIds.trim()==""){
- top.Dialog.alert("未选择要关联的事件!");
- return false
- }else{
- noticeIds = fd_id+ ","+ noticeIds;
- noticeIds = noticeIds.replace(/,/g, "_")
- $.ajax({
- url : $.pathname() + '/ws/response/responseService/updateAndAddEventGuanLian/',
- data : {
- "value": encodeURI(encodeURI(noticeIds))
- },
- type : 'post',
- dataType : 'text',
- success : function(data) {
- top.Dialog.alert("保存成功");
- $('#frmright',window.parent.document).attr('src',$.pathname()+"/page/business/em/event/EventManager.jsp");
- },
- error:function(e){
- console.log("关联事件失败!");
- }
- });
-
- }
-
- });
- //初始化树形双向选择器
- $.ajax({
- url : $.pathname()+'/ws/EventService/EventService/getFromList/',
- type : 'post',
- data : {
- 'deptId' : deptId,
- 'fd_id':fd_id
- },
- dataType : 'text',
- success : function(data) {
- var obj = eval('('+data+')');
- //赋给data属性
- $("#listerTree1").data("data",obj);
- //已选值
- $("#listerTree1").attr("selectedValue",obj.selectedValue);
- //刷新下拉框
- $("#listerTree1").render();
- },
- error : function(e) {
- $.messager.alert('系统提示信息', '访问服务失败!', 'error');
- }
- });
- })
- </script>
- </head>
- <body>
- <div class="box1" id="formContent" style="overflow:auto;height:545px;border: 1px solid #E4E4E4;background: #F8F8F8;">
- <div style="height: 50px;background: #F8F8F8;" align="center">
- <a href="javascript:;"><img id="back" align="left" alt="返回" title="返回" src="/nwyj/images/temp/back.png"></img></a>
- <font style="font-weight: bold;font-size: 20px;line-height: 45px;" id="titleShow">关联突发事件</font>
- </div>
- <center>
- <div class="listerTree" listerWidth="500"listerHeight="400" id="listerTree1"></div>
- <input type="button" value="关联" id="save">
- <input type="button" value="重置" id="reset">
- </center>
- </div>
- </body>
- </html>
|