96ca76650fcbc13326ed132482df53384c7b7d5c.svn-base 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. <%@page contentType="text/html" pageEncoding="UTF-8"%>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <head>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  6. <title></title>
  7. <%@include file="/page/include.jsp" %>
  8. <!--引用资源文件,JS CSS-->
  9. <script type="text/javascript" src="<%=path%>/scripts/jquery/plugins/jquery.extension.util.js"></script>
  10. <script type="text/javascript" src="<%=path%>/scripts/freamwork/com/sinosoft/common/common.js"></script>
  11. <script type="text/javascript" src="<%=path%>/scripts/freamwork/com/sinosoft/common/utils/utils.js"></script>
  12. <script type="text/javascript" src="<%=path%>/scripts/freamwork/com/sinosoft/common/frameWork/frameWork.js"></script>
  13. <script type="text/javascript" src="<%=path%>/scripts/freamwork/com/sinosoft/common/utils/Request.js"></script>
  14. <link rel="stylesheet" type="text/css" href="<%=path%>/scripts/qui/libs/js/tree/ztree/ztree.css" />
  15. <script type="text/javascript" src="<%=path%>/scripts/qui/libs/js/tree/ztree/ztree.js"></script>
  16. <script type="text/javascript" src="<%=path%>/scripts/qui/libs/js/form/selectTree.js"></script>
  17. <script type="text/javascript" src="<%=path%>/scripts/qui/libs/js/form/validation.js"></script>
  18. <script type="text/javascript" src="<%=path%>/scripts/qui/libs/js/form/validationRule.js"></script>
  19. <script type="text/javascript">
  20. var fd_id = "<%=request.getParameter("fd_id")%>";
  21. //取得用户真实名字
  22. var realName = top.com.sinosoft.lz.system.user.LoginInfo.getReal_name();
  23. //部门id
  24. var deptId = top.com.sinosoft.lz.system.user.LoginInfo.getCorp_ids();
  25. //部门名称
  26. var deptName = top.com.sinosoft.lz.system.user.LoginInfo.getDeptnames();
  27. //父部门id
  28. var parentId = top.com.sinosoft.lz.system.user.LoginInfo.getParent_ids();
  29. //页面初始化
  30. $(function(){
  31. var url = $.pathname() + '/ws/crud/CRUDService/getDataById/';
  32. var params = {
  33. classid : '363',
  34. objectID : fd_id
  35. };
  36. $.request.query(url,params,function(data){
  37. $("#titleShow").html(data.EVENT_NAME_363);
  38. });
  39. //绑定重置
  40. $("#reset").bind("click",function(e,state){
  41. $("#listerTree1").resetValue();
  42. });
  43. //绑定返回
  44. $("#back").bind("click",function(e,state){
  45. $('#frmright',window.parent.document).attr('src',$.pathname()+"/page/business/em/event/EventManager.jsp");
  46. });
  47. //绑定保存
  48. $("#save").bind("click",function(e,state){
  49. var noticeIds = $("#listerTree1").attr("relValue");
  50. if(!noticeIds || noticeIds.trim()==""){
  51. top.Dialog.alert("未选择要关联的事件!");
  52. return false
  53. }else{
  54. noticeIds = fd_id+ ","+ noticeIds;
  55. noticeIds = noticeIds.replace(/,/g, "_")
  56. $.ajax({
  57. url : $.pathname() + '/ws/response/responseService/updateAndAddEventGuanLian/',
  58. data : {
  59. "value": encodeURI(encodeURI(noticeIds))
  60. },
  61. type : 'post',
  62. dataType : 'text',
  63. success : function(data) {
  64. top.Dialog.alert("保存成功");
  65. $('#frmright',window.parent.document).attr('src',$.pathname()+"/page/business/em/event/EventManager.jsp");
  66. },
  67. error:function(e){
  68. console.log("关联事件失败!");
  69. }
  70. });
  71. }
  72. });
  73. //初始化树形双向选择器
  74. $.ajax({
  75. url : $.pathname()+'/ws/EventService/EventService/getFromList/',
  76. type : 'post',
  77. data : {
  78. 'deptId' : deptId,
  79. 'fd_id':fd_id
  80. },
  81. dataType : 'text',
  82. success : function(data) {
  83. var obj = eval('('+data+')');
  84. //赋给data属性
  85. $("#listerTree1").data("data",obj);
  86. //已选值
  87. $("#listerTree1").attr("selectedValue",obj.selectedValue);
  88. //刷新下拉框
  89. $("#listerTree1").render();
  90. },
  91. error : function(e) {
  92. $.messager.alert('系统提示信息', '访问服务失败!', 'error');
  93. }
  94. });
  95. })
  96. </script>
  97. </head>
  98. <body>
  99. <div class="box1" id="formContent" style="overflow:auto;height:545px;border: 1px solid #E4E4E4;background: #F8F8F8;">
  100. <div style="height: 50px;background: #F8F8F8;" align="center">
  101. <a href="javascript:;"><img id="back" align="left" alt="返回" title="返回" src="/nwyj/images/temp/back.png"></img></a>
  102. <font style="font-weight: bold;font-size: 20px;line-height: 45px;" id="titleShow">关联突发事件</font>
  103. </div>
  104. <center>
  105. <div class="listerTree" listerWidth="500"listerHeight="400" id="listerTree1"></div>
  106. <input type="button" value="关联" id="save">
  107. <input type="button" value="重置" id="reset">
  108. </center>
  109. </div>
  110. </body>
  111. </html>