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();