123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189 |
- var deptId = top.com.sinosoft.lz.system.user.LoginInfo.getCorp_ids();
- var role_id = top.com.sinosoft.lz.system.user.LoginInfo.getRoleids();
- $(function(){
- // fileShare();
-
- $searchOne = $("#searchOne");//查询图标绑定查询事件
- $searchOne.bind('click', function() {
- searchHandler();
- });
- });
-
- var BUSINE_ID1 ="";
- var BUSINE_ID ="";
- var temp1 = new Array();
- var temp = new Array();
-
- // function fileShare(){
- // var url = $.pathname() + '/ws/PlanHuiZong/ContingencyPlanHuiZong/fileShare/';
- // var params = {
- // units : deptId,
- // receiveMan:role_id,
- // type:"2"
- // };
- //
- // $.ajax({
- // url : url,
- // type : 'post',
- // timeout : 60000,
- // data : params,
- // dataType : 'json',
- // success : function(data){
- //
- // if(JSON.stringify(data).length>11){
- // BUSINE_ID1 = data.rows[0].BUSINE_ID;//取业务ID
- // BUSINE_ID=BUSINE_ID1.substring(0,BUSINE_ID1.length-1);
- // temp = BUSINE_ID.split(",");
- // for(var i=0; i<temp.length;i++){
- // temp1.push("'" + temp[i] +"'");
- // }
- // }
- // if(temp1.length>0){
- // initComplete111();
- // }else{
- // temp1="'0'";
- // initComplete111();
- // }
- // },
- // error : function(e){
- // $.messager.alert('系统提示信息', '访问服务失败!', 'error');
- // }
- // });
- // }
- var g;
- /**定义变量**/
- var getUser_id = top.com.sinosoft.lz.system.user.LoginInfo.getUser_id()+""; //登录人ID
- function initComplete(){
- // var condition = "IS_DEL='0' and FD_OBJECTID IN("+temp1+") and IS_SHARE='1'";
- var condition = "IS_DEL='0' and IS_SHARE='1'";
- var loadParams = {
- "listId" : '231',
- "condition" : condition,
- direction:'DESC',
- sort: 'UPDATEDATE'
- };
- /**
- * 工具条
- */
- var roleCons = roleButtonArr();
- var toolBarOpt1 = {
- items: [
- // {text: '下载', click: "onDownload", iconClass: 'download_tem',id:"10007"}
- ],
- roleCons:roleCons
- };
- /**
- * 树形列
- */
- var grid_option1 = {
- columns: [
- {display : '文件标题',name : 'FILE_TITLE_231', align : 'center',width : '15%',isPrimaryKey:true,
- render : function(rowdata, value) {
- return '<a href="javascript:void(0)" '
- + 'onclick=jumpPage("'
- + rowdata.FD_OBJECTID231
- +'")>'+ rowdata.FILE_TITLE_231 +'</a>';
- }
- },
- {display : '发布单位',name : 'PUBLISH_COMP_ID_231_SHOW', align : 'center',width : '15%'},
- {display : '文件分类',name : 'FILE_CLASSIFY_231_SHOW', align : 'center',width : '10%'},
- {display : '发文日期',name : 'FILE_ADD_DATE_231', align : 'center',width : '10%'},
- {display : '归档人',name : 'PIGEONHOLE_MAN_ID_231_SHOW', align : 'center',width : '10%'},
- {display : '归档日期',name : 'PIGEONHOLE_DATE_231', align : 'center',width : '10%'},
- // {display : '文件摘要',name : 'FILE_CONTENT_231', align : 'center',width : '10%'},
- {display : '变更说明',name : 'CHANGE_DETAIL_231', align : 'center',width : '10%'},
- {display : '保密等级',name : 'COLUMN_2_231_SHOW', align : 'center',width : '10%'},
- {display : '变更类型',name : 'CHANGE_TYPE_231_SHOW', align : 'center',width : '10%'}
- // {display : '电子文件',name : 'ELECTRONIC_FILE_231', align : 'center',width : '7%'},
- //
- // { display: '操作', isAllowHide: false, align: 'center', width:'10%',
- // render: function (rowdata, rowindex, value, column){
- // //判断是否已经发布。取发布的状态,如果已经发布为“1”;未发布为“0”
- // var fabu='';//fabu
- // if(rowdata.FABU_231=="1"){
- // fabu = '<span class="fashang_07 hand" title="发布" onclick="onPublish1()"></span>';
- // }else{
- // fabu = '<span class="fashang_06 hand" title="发布" onclick="onPublish(' + rowindex + ')"></span>';
- // }
- // //判断是否已经发布。取发布的状态,如果已经上报为“1”;未上报为“0”fashang_09
- // var shangbao='';
- // if(rowdata.SHANGBAO_231=="1"){
- // shangbao = '<span class="sendup_templan hand" title="上报" onclick="shangbao1()"></span>';
- // }else{
- // shangbao = '<span class="fashang_plan hand" title="上报" onclick="onReport(' + rowindex + ')"></span>';
- // }
- // return fabu
- // + shangbao;
- // }
- // }
- ],
- rownumbers : true,
- checkbox : true,
- pageSize : 10,
- percentWidthMode : true
- };
- var options1={
- url :'/nwyj/ws/crud/CRUDService/queryQui',
- params:loadParams,
- width:'100%',
- sortName : 'UPDATEDATE_231',
- gridOptions:grid_option1,
- singleRecodeOptions:{a:"aa"},
- paperOpration:{showInput:"true"},
- toolBarOptions:toolBarOpt1
- };
- g=gridAndSingleRecode=$("#maingrid").quickgridAndSingleRecode(options1);
- }
- //查询
- function searchHandler() {
- var title = $('#FILE_TITLE_231').val();//标题
- var condition = "IS_DEL='0' and IS_SHARE='1' ";
-
- if(title!=""&&title!="请输入文件名称"){
- condition += " AND FILE_TITLE LIKE '%" +title+"%'";
- }
-
- g.setOptions({// 重置加载列表的参数
- params : {
- "listId" : '231',
- "condition" : condition,
- direction:'DESC',
- sort: 'UPDATEDATE'
- }
- });
- g.rend();
- }
- //点击查看
- function jumpPage(id){
- window.location.href="/nwyj/page/business/am/PPSFile/FileEMInfo.jsp?"+id;
- }
- //下载
- function onDownload(){
- var rows = g.getSelectedRows();
- var rowsLength = rows.length;
- if (rowsLength == 0) {
- top.Dialog.alert("请选中要下载的文件!");
- return;
- }
-
- var fd_id = rows[0].FD_OBJECTID231;
- showFile(fd_id);
- }
-
- function showFile(fd_id){
- var diag = new top.Dialog();// 定义一个窗口对象
- diag.Title = "下载";// 窗口标题
- diag.URL = $.pathname() +"/page/business/am/base/showDownloadFile.html?fd_id="+fd_id;// 窗口对应的页面
- diag.Height = 400;
- diag.ShowOkButton=false;// 不显示确认按钮
- diag.ShowCancelButton=false;// 不显示取消按钮
- diag.ButtonAlign="center";// 按钮居中
- diag.show();// 显示窗口
- }
-
- $.messager=top.Dialog;
|