d78b21ae0e43b4c29ad7c729ad8bd93f513b7e58.svn-base 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. var deptName;
  2. //数据表格
  3. var g;
  4. var myCols = [{
  5. display: '网级制度文件', name: 'netclass', width: "20%", align: 'center'
  6. },{
  7. display: '省级制度文件', name: 'provincial', width: "20%", align: 'center'
  8. },{
  9. display: '地市级制度文件', name: 'municipal', width: "20%", align: 'center'
  10. },{
  11. display: '行政规章制度', name: 'administrative', width: "20%", align: 'center'
  12. }];
  13. function initComplete(){
  14. deptName = (window.location.href).split('?')[1];
  15. g = $("#maingrid").quiGrid({
  16. columns: [{display : '所属单位',"name" : 'name',id : 'name',width : "10%",dept_id:'dept_id',align : 'center',render: addStatus},
  17. {display: '文件分类', columns: myCols, width: "80%"},
  18. {display: '合计', name: 'num', width: "10%", align: 'center'}
  19. ],
  20. url : $.pathname() + '/ws/FILEPOLL/FileAMService/getFileAMInfo',
  21. params : {
  22. id : deptName
  23. },
  24. rownumbers : true,
  25. height : '100%',
  26. width : "100%",
  27. usePager : false,
  28. // autoCheckChildren : true,
  29. // tree : {
  30. // columnId : 'name'
  31. // },
  32. // treeAjax : true,
  33. // treeChildDataPath : $.pathname() + '/ws/EXPERT/ExpertService/getExpertInfoList?deptId=',
  34. // treeAutoParam:"dept_id"
  35. });
  36. }
  37. function addStatus(rowdata, rowindex, value, column){
  38. var comp_id='"'+rowdata.dept_id+'"';
  39. var name = '"'+value+'"';
  40. return "<a href='javascript:newHtml("+comp_id+","+name+")'>" + value +" </a>";
  41. }
  42. function newHtml(comp_id,name){
  43. if(name=="总计"){
  44. return;
  45. }else if(deptName==comp_id){
  46. return;
  47. }else{
  48. window.open("/nwyj/page/business/am/file/FileAM-poll1.jsp?"+comp_id);
  49. // window.location.href = "/nwyj/page/business/am/resource/expert/expert-poll.jsp?"+comp_id;
  50. // alert(comp_id);
  51. }
  52. }