2cae5ab9e7e3dc500a50defbae32428ae69e1e2b.svn-base 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  1. var deptId = top.com.sinosoft.lz.system.user.LoginInfo.getCorp_ids();
  2. var role_id = top.com.sinosoft.lz.system.user.LoginInfo.getRoleids();
  3. $(function(){
  4. // fileShare();
  5. $searchOne = $("#searchOne");//查询图标绑定查询事件
  6. $searchOne.bind('click', function() {
  7. searchHandler();
  8. });
  9. });
  10. var BUSINE_ID1 ="";
  11. var BUSINE_ID ="";
  12. var temp1 = new Array();
  13. var temp = new Array();
  14. // function fileShare(){
  15. // var url = $.pathname() + '/ws/PlanHuiZong/ContingencyPlanHuiZong/fileShare/';
  16. // var params = {
  17. // units : deptId,
  18. // receiveMan:role_id,
  19. // type:"2"
  20. // };
  21. //
  22. // $.ajax({
  23. // url : url,
  24. // type : 'post',
  25. // timeout : 60000,
  26. // data : params,
  27. // dataType : 'json',
  28. // success : function(data){
  29. //
  30. // if(JSON.stringify(data).length>11){
  31. // BUSINE_ID1 = data.rows[0].BUSINE_ID;//取业务ID
  32. // BUSINE_ID=BUSINE_ID1.substring(0,BUSINE_ID1.length-1);
  33. // temp = BUSINE_ID.split(",");
  34. // for(var i=0; i<temp.length;i++){
  35. // temp1.push("'" + temp[i] +"'");
  36. // }
  37. // }
  38. // if(temp1.length>0){
  39. // initComplete111();
  40. // }else{
  41. // temp1="'0'";
  42. // initComplete111();
  43. // }
  44. // },
  45. // error : function(e){
  46. // $.messager.alert('系统提示信息', '访问服务失败!', 'error');
  47. // }
  48. // });
  49. // }
  50. var g;
  51. /**定义变量**/
  52. var getUser_id = top.com.sinosoft.lz.system.user.LoginInfo.getUser_id()+""; //登录人ID
  53. function initComplete(){
  54. // var condition = "IS_DEL='0' and FD_OBJECTID IN("+temp1+") and IS_SHARE='1'";
  55. var condition = "IS_DEL='0' and IS_SHARE='1'";
  56. var loadParams = {
  57. "listId" : '231',
  58. "condition" : condition,
  59. direction:'DESC',
  60. sort: 'UPDATEDATE'
  61. };
  62. /**
  63. * 工具条
  64. */
  65. var roleCons = roleButtonArr();
  66. var toolBarOpt1 = {
  67. items: [
  68. // {text: '下载', click: "onDownload", iconClass: 'download_tem',id:"10007"}
  69. ],
  70. roleCons:roleCons
  71. };
  72. /**
  73. * 树形列
  74. */
  75. var grid_option1 = {
  76. columns: [
  77. {display : '文件标题',name : 'FILE_TITLE_231', align : 'center',width : '15%',isPrimaryKey:true,
  78. render : function(rowdata, value) {
  79. return '<a href="javascript:void(0)" '
  80. + 'onclick=jumpPage("'
  81. + rowdata.FD_OBJECTID231
  82. +'")>'+ rowdata.FILE_TITLE_231 +'</a>';
  83. }
  84. },
  85. {display : '发布单位',name : 'PUBLISH_COMP_ID_231_SHOW', align : 'center',width : '15%'},
  86. {display : '文件分类',name : 'FILE_CLASSIFY_231_SHOW', align : 'center',width : '10%'},
  87. {display : '发文日期',name : 'FILE_ADD_DATE_231', align : 'center',width : '10%'},
  88. {display : '归档人',name : 'PIGEONHOLE_MAN_ID_231_SHOW', align : 'center',width : '10%'},
  89. {display : '归档日期',name : 'PIGEONHOLE_DATE_231', align : 'center',width : '10%'},
  90. // {display : '文件摘要',name : 'FILE_CONTENT_231', align : 'center',width : '10%'},
  91. {display : '变更说明',name : 'CHANGE_DETAIL_231', align : 'center',width : '10%'},
  92. {display : '保密等级',name : 'COLUMN_2_231_SHOW', align : 'center',width : '10%'},
  93. {display : '变更类型',name : 'CHANGE_TYPE_231_SHOW', align : 'center',width : '10%'}
  94. // {display : '电子文件',name : 'ELECTRONIC_FILE_231', align : 'center',width : '7%'},
  95. //
  96. // { display: '操作', isAllowHide: false, align: 'center', width:'10%',
  97. // render: function (rowdata, rowindex, value, column){
  98. // //判断是否已经发布。取发布的状态,如果已经发布为“1”;未发布为“0”
  99. // var fabu='';//fabu
  100. // if(rowdata.FABU_231=="1"){
  101. // fabu = '<span class="fashang_07 hand" title="发布" onclick="onPublish1()"></span>';
  102. // }else{
  103. // fabu = '<span class="fashang_06 hand" title="发布" onclick="onPublish(' + rowindex + ')"></span>';
  104. // }
  105. // //判断是否已经发布。取发布的状态,如果已经上报为“1”;未上报为“0”fashang_09
  106. // var shangbao='';
  107. // if(rowdata.SHANGBAO_231=="1"){
  108. // shangbao = '<span class="sendup_templan hand" title="上报" onclick="shangbao1()"></span>';
  109. // }else{
  110. // shangbao = '<span class="fashang_plan hand" title="上报" onclick="onReport(' + rowindex + ')"></span>';
  111. // }
  112. // return fabu
  113. // + shangbao;
  114. // }
  115. // }
  116. ],
  117. rownumbers : true,
  118. checkbox : true,
  119. pageSize : 10,
  120. percentWidthMode : true
  121. };
  122. var options1={
  123. url :'/nwyj/ws/crud/CRUDService/queryQui',
  124. params:loadParams,
  125. width:'100%',
  126. sortName : 'UPDATEDATE_231',
  127. gridOptions:grid_option1,
  128. singleRecodeOptions:{a:"aa"},
  129. paperOpration:{showInput:"true"},
  130. toolBarOptions:toolBarOpt1
  131. };
  132. g=gridAndSingleRecode=$("#maingrid").quickgridAndSingleRecode(options1);
  133. }
  134. //查询
  135. function searchHandler() {
  136. var title = $('#FILE_TITLE_231').val();//标题
  137. var condition = "IS_DEL='0' and IS_SHARE='1' ";
  138. if(title!=""&&title!="请输入文件名称"){
  139. condition += " AND FILE_TITLE LIKE '%" +title+"%'";
  140. }
  141. g.setOptions({// 重置加载列表的参数
  142. params : {
  143. "listId" : '231',
  144. "condition" : condition,
  145. direction:'DESC',
  146. sort: 'UPDATEDATE'
  147. }
  148. });
  149. g.rend();
  150. }
  151. //点击查看
  152. function jumpPage(id){
  153. window.location.href="/nwyj/page/business/am/PPSFile/FileEMInfo.jsp?"+id;
  154. }
  155. //下载
  156. function onDownload(){
  157. var rows = g.getSelectedRows();
  158. var rowsLength = rows.length;
  159. if (rowsLength == 0) {
  160. top.Dialog.alert("请选中要下载的文件!");
  161. return;
  162. }
  163. var fd_id = rows[0].FD_OBJECTID231;
  164. showFile(fd_id);
  165. }
  166. function showFile(fd_id){
  167. var diag = new top.Dialog();// 定义一个窗口对象
  168. diag.Title = "下载";// 窗口标题
  169. diag.URL = $.pathname() +"/page/business/am/base/showDownloadFile.html?fd_id="+fd_id;// 窗口对应的页面
  170. diag.Height = 400;
  171. diag.ShowOkButton=false;// 不显示确认按钮
  172. diag.ShowCancelButton=false;// 不显示取消按钮
  173. diag.ButtonAlign="center";// 按钮居中
  174. diag.show();// 显示窗口
  175. }
  176. $.messager=top.Dialog;