From e3a5e7b77fab64b69b31af664b6e8877c2c4c23e Mon Sep 17 00:00:00 2001 From: Guo XIn <371864209@qq.com> Date: Tue, 4 Jul 2023 16:03:54 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9C=A8=E4=B8=8A=E4=BC=A0=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E6=97=B6=E5=A2=9E=E5=8A=A0=E5=AF=B9=E5=AF=86=E7=BA=A7=E7=9A=84?= =?UTF-8?q?=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../static/js/business/directory/directory.js | 4 ++-- .../src/main/resources/static/js/sys/file/dirUpload.js | 10 +++++++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/shandan-bianmu/src/main/resources/static/js/business/directory/directory.js b/shandan-bianmu/src/main/resources/static/js/business/directory/directory.js index 4c75d92..ca5bd09 100644 --- a/shandan-bianmu/src/main/resources/static/js/business/directory/directory.js +++ b/shandan-bianmu/src/main/resources/static/js/business/directory/directory.js @@ -193,7 +193,7 @@ function startRender() { }) metaListTable.addTableRowEvent('addFile', function () { - upload(basicData, `${ctx}/sys/file/layer/dir?directoryId=${basicData.id}`, function (res) { + upload(basicData, `${ctx}/sys/file/layer/dir?directoryId=${basicData.id}&secretLevel=${basicData.secretLevel}`, function (res) { if (res.success) { refreshDirectoryNode(tempNode, basicData); metaListTable.reloadTable(); @@ -205,7 +205,7 @@ function startRender() { }); metaListTable.addTableRowEvent('addDirectory', function (obj) { - upload(basicData, `${ctx}/sys/file/layer/dir?directoryId=${basicData.id}&dirUpload=true`, function (res) { + upload(basicData, `${ctx}/sys/file/layer/dir?directoryId=${basicData.id}&secretLevel=${basicData.secretLevel}&dirUpload=true`, function (res) { if (res.success) { refreshPermis().then(() => { refreshDirectoryNode(tempNode, basicData); diff --git a/shandan-system/src/main/resources/static/js/sys/file/dirUpload.js b/shandan-system/src/main/resources/static/js/sys/file/dirUpload.js index 34cd9f2..35db2bf 100644 --- a/shandan-system/src/main/resources/static/js/sys/file/dirUpload.js +++ b/shandan-system/src/main/resources/static/js/sys/file/dirUpload.js @@ -46,6 +46,14 @@ layui.use(['layer', 'uploader', 'element', 'form', 'laydate', 'dict', 'datalabel showErrorMsg("请选择文件密级"); return false; } + if(json['secretLevel'] > param.secretLevel){ + layer.alert('禁止上传超过当前目录数据密级的文件,当前目录的密级为【'+ DICT.getText('secret_level', param.secretLevel) +'】', {icon:2}) + return false; + } + if(json['secretLevel'] > user.secretLevel){ + layer.alert('禁止上传超过自身涉密等级的文件,您的涉密等级为【'+ DICT.getText('secret_level', user.secretLevel) +'】', {icon:2}) + return false; + } if (json.exerciseData === '1') { if (uploader.getFiles().length <= 0) { showErrorMsg("还没有选择文件"); @@ -75,7 +83,7 @@ layui.use(['layer', 'uploader', 'element', 'form', 'laydate', 'dict', 'datalabel showErrorMsg('装备型号不能为空') return false; } - ; + } $('#fileUploadAction').addClass('layui-disabled').attr('disabled', 'true') uploader.uploadToServer();