From b6d09f7f62acdb1870d2180d7f415700ad2ebb57 Mon Sep 17 00:00:00 2001 From: liangkun Date: Thu, 8 Apr 2021 10:39:23 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=9A=E4=B8=AA=E4=B8=8A=E4=BC=A0=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E9=A2=84=E8=A7=88=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LR_SystemModule/Views/Annexes/DownForm.js | 24 ++++++++++++++++--- .../LR_Content/plugin/uploader/lr-uploader.js | 2 +- .../Views/Utility/ListContentIndex.js | 2 +- 3 files changed, 23 insertions(+), 5 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_SystemModule/Views/Annexes/DownForm.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_SystemModule/Views/Annexes/DownForm.js index d5ea4fbd1..a38b67383 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_SystemModule/Views/Annexes/DownForm.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_SystemModule/Views/Annexes/DownForm.js @@ -10,13 +10,16 @@ var bootstrap = function ($, learun) { var $item = $('
'); $item.append('
'); $item.append('' + item.F_FileName + '(' + learun.countFileSize(item.F_FileSize) + ')'); - $item.append('
'); - + $item.append('
'); $item.find('.lr-tool-bar .fa-cloud-download').on('click', function () { var fileId = $(this).attr('data-value'); DownFile(fileId); }); - + //预览 + $item.find('.lr-tool-bar .fa-eye').on('click', function () { + var fileId = $(this).attr('data-value'); + ViewFile(fileId); + }); $('#lr_form_file_queue_list').append($item); } }); @@ -28,6 +31,21 @@ var bootstrap = function ($, learun) { learun.postFormSilence(top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveFile/Read', { keyValue: RFileId }, function () {}); } } + //预览 + var ViewFile = function (fileId) { + learun.layerForm({ + id: 'PreviewForm', + title: '文件预览', + url: top.$.rootUrl + '/LR_SystemModule/Annexes/PreviewFile?fileId=' + fileId, + width: 1080, + height: 850, + btn: null + }); + //公文查阅:已读 + if (RFileId !== null && RFileId !== "") { + learun.postFormSilence(top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveFile/Read', { keyValue: RFileId }, function () {}); + } + } $('#lr_form_file_queue').lrscroll(); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/plugin/uploader/lr-uploader.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/plugin/uploader/lr-uploader.js index 5611c564c..76cde15b5 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/plugin/uploader/lr-uploader.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/plugin/uploader/lr-uploader.js @@ -19,7 +19,7 @@ var $btnGroup = $('
'); var $uploadBtn = $('上传'); - var $downBtn = $('下载'); + var $downBtn = $('下载/预览'); var $viewBtn = $('预览'); $self.append($wrap); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Utility/ListContentIndex.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Utility/ListContentIndex.js index aae2c4473..e2cedfba8 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Utility/ListContentIndex.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Utility/ListContentIndex.js @@ -11,7 +11,7 @@ var bootstrap = function ($, learun) { var page = { init: function () { - $('#F_NewsImage').lrUploader({ isUpload:false}); + $('#F_NewsImage').lrUploader({ isUpload: false, isView:false}); $('.warpper').lrscroll(); var item = top['dtlist' + id]; if(false){// (!!item) {