95cfe7730dc68ee85fff97d97b05ff816e73a4c3.svn-base 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. //加载信息
  2. $(function(){
  3. //应急预案获取
  4. $("#MEET_EMERGENCIES_PLAN_365").initYewuSelect("214","FD_OBJECTID","PLAN_NAME");
  5. if((window.location.href).indexOf('?')>-1){
  6. var fd_id = (window.location.href).split('?')[1];//获取记录id
  7. getFileList(fd_id);//加载附件调用的方法
  8. $('#fileListLegend').css("display","block");
  9. $('#fileList').css("display","block");
  10. var url = $.pathname() + "/ws/crud/CRUDService/getDataById/";
  11. var params = {
  12. classid : '365',
  13. objectID : fd_id
  14. };
  15. $.ajax({
  16. url : url,
  17. type : 'post',
  18. timeout : 15000,
  19. data : params,
  20. dataType : 'json',
  21. success : function(data){
  22. $('#fillForm').ajaxWrite({data:data});
  23. $('#fillForm input[name="classid"]').val('365');
  24. $('#fillForm input[name="EARLY_WARNING_PROPERTY_365"]').val(data.EARLY_WARNING_PROPERTY_365);
  25. //alert(data.MEET_EMERGENCIES_PLAN_365);
  26. $("#MEET_EMERGENCIES_PLAN_365").attr("selectedValue",data.MEET_EMERGENCIES_PLAN_365);//应急预案
  27. for(var i in data){
  28. $('#'+i).html(data[i]);
  29. }
  30. level();
  31. },
  32. error : function(e){
  33. $.messager.alert('系统提示信息', '访问服务失败!', 'error');
  34. }
  35. });
  36. }
  37. });
  38. //两个预警级别的复选框获取值的方法
  39. function level(){
  40. //预警性质
  41. if($("#temp1").val() == "初次发布"){
  42. $("#EARLY_WARNING_PROPERTY_365").attr('checked','checked');
  43. $("#EARLY_WARNING_PROPERTY_365").attr("disabled",true);//初次发布禁用
  44. $("#WETHER_EW_ADJUST_365").attr("disabled",true);//是否预警禁用
  45. $("#last1").attr("disabled",true);//上次预警单号禁用
  46. $("#PREV_EW_LEVEL_365").attr("disabled",true);//上次级别禁用
  47. $("#PREV_EW_LEVEL_365").render();
  48. }
  49. //是否预警调整
  50. if($("#temp2").val() == "是"){
  51. $("#WETHER_EW_ADJUST_365").attr('checked','checked');
  52. $("#EARLY_WARNING_PROPERTY_365").attr("disabled",true);//是否预警调整禁用
  53. $("#EARLY_WARNING_PROPERTY_365").attr("disabled",true);//初次预警禁用
  54. }
  55. }
  56. //返回主页面
  57. function goBack() {
  58. //获取iframe中的元素值
  59. var iframe =parent.document.getElementsByName("frmright")[0];
  60. iframe.src = "/nwyj/page/business/em/alert/notice/manage.html";
  61. }
  62. //发布按钮点击事件
  63. function issue(){
  64. /* var myDate=allGetServerTime() ;
  65. //alert(myDate);
  66. window.location.href="/nwyj/page/business/em/alert/notice/manage.html";*/
  67. }
  68. //上报按钮点击事件
  69. function reported(){
  70. }