修改bug

beetlsql3-dev
姚丹ab 2 years ago
parent 7e5ce4ca45
commit 26af3badc7

@ -1099,8 +1099,6 @@ var Lib = {
});
layui.form.render();
},downloadFile:function (data){ //下载指定文件/或者预览文件 resourcesInfoType资源类型(1视频 2课件(ppt 、pdf) 3附件)
window.location.href = Common.ctxPath + "/jlw/resourcesInfo/previewData.do?resourcesInfoId="+data.resourcesInfoId;
return;
if(data.resourcesInfoType == 3){//前端下载文件
var a = document.createElement('a');
a.setAttribute('href', Common.ctxPath + data.resourcesInfoContent); //a.href='文件链接'

@ -142,7 +142,11 @@ layui.define(['form', 'laydate', 'table'], function (exports) {
{
field: 'userId', title: '操作', align: "center", field: 'right', templet: function (d) {
var htm = '<a class="layui-table-link" lay-event="edit">编辑</a>';
htm += '<a class="layui-table-link" lay-event="previewPage">' + (d.resourcesInfoType == 3 ? '下载' : '预览') + '</a>';
if(d.resourcesInfoType == 4){
htm += '<a class="layui-table-link" href="'+ d.resourcesInfoContent+'" target="_blank">预览</a>';
}else {
htm += '<a class="layui-table-link" lay-event="previewPage" >' + (d.resourcesInfoType == 3 ? '下载' : '预览') + '</a>';
}
htm += '<a class="layui-table-link" lay-event="del">删除</a>';
return htm;
}

Loading…
Cancel
Save