460c732f9ed6de4ae20a91e7c2c3aba6dd0ba4b5.svn-base 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. //部门id
  2. var deptId = top.com.sinosoft.lz.system.user.LoginInfo.getDeptids();
  3. //父部门id
  4. var parentId = top.com.sinosoft.lz.system.user.LoginInfo.getParnet_ids();
  5. //加载信息
  6. $(function(){
  7. //应急预案获取
  8. $("#MEET_EMERGENCIES_PLAN_365").initYewuSelect("214","FD_OBJECTID","PLAN_NAME");
  9. //初始化预警范围下拉框
  10. var deptUrl = $.pathname() + '/ws/dept/DeptService/getDepartTree';
  11. $.post(deptUrl,{id:parentId,name:''},function(data){
  12. $("#EARLY_WARNING_AREA_OBJ_365").data("data",data);
  13. $("#EARLY_WARNING_AREA_OBJ_365").render();
  14. }, "json");
  15. if((window.location.href).indexOf('?')>-1){
  16. var fd_id = (window.location.href).split('?')[1];//获取记录id
  17. getFileList(fd_id);//加载附件调用的方法
  18. $('#fileListLegend').css("display","block");
  19. $('#fileList').css("display","block");
  20. var url = $.pathname() + "/ws/crud/CRUDService/getDataById/";
  21. var params = {
  22. classid : '365',
  23. objectID : fd_id
  24. };
  25. $.ajax({
  26. url : url,
  27. type : 'post',
  28. timeout : 15000,
  29. data : params,
  30. dataType : 'json',
  31. success : function(data){
  32. $('#fillForm').ajaxWrite({data:data});
  33. $('#fillForm input[name="classid"]').val('365');
  34. $('#fillForm input[name="EARLY_WARNING_PROPERTY_365"]').val(data.EARLY_WARNING_PROPERTY_365);
  35. for(var i in data){
  36. $('#'+i).html(data[i]);
  37. }
  38. level();
  39. },
  40. error : function(e){
  41. $.messager.alert('系统提示信息', '访问服务失败!', 'error');
  42. }
  43. });
  44. }
  45. });
  46. //两个预警级别的复选框获取值的方法
  47. function level(){
  48. //预警性质
  49. if($("#temp1").val() == "初次发布"){
  50. $("#EARLY_WARNING_PROPERTY_365").attr('checked','checked');
  51. //$("#EARLY_WARNING_PROPERTY_365").attr("disabled",true);//初次发布禁用
  52. //$("#WETHER_EW_ADJUST_365").attr("disabled",true);//是否预警禁用
  53. $("#last1").attr("disabled",true);//上次预警单号禁用
  54. $("#PREV_EW_LEVEL_365").attr("disabled",true);//上次级别禁用
  55. $("#PREV_EW_LEVEL_365").render();
  56. }
  57. //是否预警调整
  58. if($("#temp2").val() == "是"){
  59. $("#WETHER_EW_ADJUST_365").attr('checked','checked');
  60. $("#EARLY_WARNING_PROPERTY_365").attr("disabled",true);//是否预警调整禁用
  61. //$("#EARLY_WARNING_PROPERTY_365").attr("disabled",true);//初次预警禁用
  62. }
  63. b();
  64. }
  65. /* //选择初次发布
  66. function a(){
  67. $("#EARLY_WARNING_PROPERTY_365").attr('checked','checked');
  68. //$("#EARLY_WARNING_PROPERTY_365").attr("disabled",true);//初次发布禁用
  69. $("#WETHER_EW_ADJUST_365").attr("disabled",true);//是否预警禁用
  70. $("#last1").attr("disabled",true);//上次预警单号禁用
  71. $("#PREV_EW_LEVEL_365").attr("disabled",true);//上次级别禁用
  72. $("#PREV_EW_LEVEL_365").render();
  73. } */
  74. //选择预警调整
  75. function b(){
  76. $("#WETHER_EW_ADJUST_365").attr('checked','checked');//勾选是否预警调整
  77. //$("#WETHER_EW_ADJUST_365").attr("disabled",true);//是否预警调整禁用
  78. $("#EARLY_WARNING_PROPERTY_365").attr('checked',false);//初次发布取消勾选
  79. $("#EARLY_WARNING_PROPERTY_365").attr("disabled",true);//初次预警禁用
  80. $("#last1").attr("disabled",false);//上次预警单号解禁
  81. //$("#last1").attr("val",);
  82. $("#PREV_EW_LEVEL_365").attr("disabled",false);//上次级别解禁
  83. $("#PREV_EW_LEVEL_365").render();
  84. }
  85. //返回主页面
  86. function goBack() {
  87. //获取iframe中的元素值
  88. var iframe =parent.document.getElementsByName("frmright")[0];
  89. iframe.src = "/nwyj/page/business/em/alert/notice/manage.html";
  90. }
  91. //发布按钮点击事件
  92. function issue(){
  93. /* var myDate=allGetServerTime() ;
  94. //alert(myDate);
  95. window.location.href="/nwyj/page/business/em/alert/notice/manage.html";*/
  96. }
  97. //保存按钮点击事件
  98. function save(){
  99. }