| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
- <%@include file="/context/mytags.jsp"%>
- <t:base type="jquery,easyui,tools,DatePicker"></t:base>
- <div class="easyui-layout" fit="true">
- <div region="center" style="padding:0px;border:0px">
- <t:datagrid name="tSysFileList" checkbox="false" sortName="createDate" pagination="true" fitColumns="true" title=""
- actionUrl="PersonalFileController.do?datagridmessage" idField="id" fit="true" queryMode="group">
- <t:dgCol title="主键" field="id" hidden="true" queryMode="single" width="120"></t:dgCol>
- <t:dgCol title="文件访问路径" field="fileUrl" queryMode="single" hidden="true" width="120"></t:dgCol>
- <t:dgCol title="业务表单" field="busiTable" queryMode="single" hidden="true" width="120"></t:dgCol>
- <t:dgCol title="业务id" field="busiId" queryMode="single" hidden="true" width="120"></t:dgCol>
- <t:dgCol title="备注" field="remark" queryMode="single" hidden="true" width="120"></t:dgCol>
- <t:dgCol title="文件种类" field="tagetType" queryMode="single" hidden="true" width="120"></t:dgCol>
- <t:dgCol title="文件名称" field="fileName" query="true" queryMode="single" width="200"></t:dgCol>
- <t:dgCol title="创建日期" field="createDate" formatter="yyyy-MM-dd" queryMode="single" width="120"></t:dgCol>
- <t:dgCol title="是否预览Flg" field="isPreviewFlg" hidden="true" queryMode="single" width="120"></t:dgCol>
- <t:dgCol title="操作" field="opt"></t:dgCol>
- <t:dgFunOpt title="下载" funname="downloadFile" urlclass="ace_button" urlfont="fa-download" />
- <t:dgFunOpt title="查看" exp="isPreviewFlg#eq#1" funname="showViewFile" urlclass="ace_button" urlfont="fa-file" />
- </t:datagrid>
- </div>
- </div>
- <script type="text/javascript">
- var showAndDownUrl = "${showAndDownUrl}";
- $(document).ready(function() {
- $(":input[name='fileName']").css("width","300px");
- $(":input[name='fileName']").css("margin","5px");
- });
- function downloadFile(index) {
- var rows = $('#tSysFileList').datagrid('getRows');//获取所有当前加载的数据行
- var fileUrl = rows[index].fileUrl;
- //var downsrc = "tSysFileController/showOrDownByurl.do?dbPath=" + fileUrl + '&down=1';
- var downsrc = showAndDownUrl + fileUrl + '&down=1';
- location.href = downsrc;
- };
- function showViewFile(index) {
- var rows = $('#tSysFileList').datagrid('getRows');//获取所有当前加载的数据行
- var fileUrl = rows[index].fileUrl;
- // 默认文件不是在阿里云
- var aliyunflg = "0";
- var tempStr = "aliyun";
- if(showAndDownUrl.indexOf(tempStr) >= 0) {
- aliyunflg = "1";
- }
-
- $.dialog.setting.zIndex = getzIndex();
- $.dialog(
- {
- content : 'url:tSysFileController/showViewFile.do?fileUrl=' + fileUrl + '&aliyunflg=' + aliyunflg,
- //content : 'url:'+ urlSee,
- zIndex : getzIndex(),
- title : '查看文件',//选择框标题
- lock : true,//是否锁定 当为true 时 下层有蒙版,不允许用户在弹出窗口以外有其它操作
- width : '600px',// 选择框宽度
- height : '600px',//选择框高度
- opacity : 0.4,//透明度 (经过测试 效果好像不太明显 )
- button : [ {
- name : '关闭',
- focus : true,
- callback : function() {
- }
- } ]
- }).zindex();
- };
- function tSysFileListAjaxCallback(data) {
- tip(data.msg);
- tSysFileListsearch();
- }
- </script>
|