db1ec7ebdc860035380a8359a6eeac6f240d0293.svn-base 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. var su ;
  2. var ai ;
  3. $(function(){
  4. su = new SearchUtil();
  5. var fd_id = window.location.href.split("?")[1];
  6. fd_id = fd_id.split("=")[1];
  7. var deptId = su.getSubDept(fd_id);
  8. var teamUrl = $.pathname() + "/ws/cockpit/CockpitService/queryTeam";
  9. var data = su.getJsonData(teamUrl, {deptId:deptId});
  10. $("#TEAM").data("data",data);
  11. $("#TEAM").attr("selectedValue",data["treeNodes"]["0"]["id"]);
  12. $("#TEAM").render();
  13. showTeamInfo($("#TEAM").attr("relValue")) ;
  14. }) ;
  15. function initComplete(){
  16. //绑定change事件
  17. $("#TEAM").bind("change",function(){
  18. if($(this).attr("relValue")){
  19. var id = $(this).attr("relValue") ;
  20. showTeamInfo(id) ;
  21. }
  22. }) ;
  23. } ;
  24. function showTeamInfo(id){
  25. var url = $.pathname() + '/ws/cockpit/CockpitService/queryTeamInfo/';
  26. var params = { fdId : id };
  27. var data = su.getJsonData(url, params);
  28. $("#TEAM_TYPE_261").html(data["TYPE"]) ;
  29. $("#TEAM_LEVEL_261").html(data["LEVEL"]) ;
  30. $("#TEAM_LEADER_261").html(data["LEADER"]) ;
  31. $("#TEAM_PHONE_261").html(data["PHONE"]) ;
  32. }
  33. /**
  34. * 针对单位下拉复选框改变应急队伍选择框
  35. */
  36. /*function changeTameSelect(id){
  37. var tameUrl = "/nwyj/ws/cockpit/CockpitService/queryTeamByDept" ;
  38. var params = { deptId:id } ;
  39. $.post(tameUrl,params,function(data){
  40. if(data){
  41. $("#TAME").data("data", data) ;
  42. $("#TAME").render() ;
  43. } else {
  44. $("#TAME").data("data", data) ;
  45. $("#TAME").render() ;
  46. }
  47. },"json") ;
  48. } ;*/
  49. function forConfim(){
  50. var inciId = $("#TEAM").attr("relValue") ;
  51. var teamName = $("#TEAM").attr("relText") ;
  52. if(inciId){
  53. var params = {fd_id:inciId, name:teamName, teamDesc:$("#description").val()} ;
  54. parent.getTeamId(params);
  55. } else {
  56. ai.setMes(320, 186, 200, 500, "系统提示", "没有数据可以保存!");
  57. ai.createAlert();
  58. };
  59. parent.removeAlter();
  60. }