|
|
|
@ -117,11 +117,15 @@ function openDirectoryEditLayer(data, callback, view) { |
|
|
|
|
</div> |
|
|
|
|
<a lay-submit lay-filter="directoryEditForm" id="directoryEditFormSubmit" style=""></a> |
|
|
|
|
</div> |
|
|
|
|
<div class="layui-inline" style="width: calc(100% - 30px); margin:15px 15px 0 15px"> |
|
|
|
|
<div class="layui-inline" style="width: calc(63% - 30px); margin:15px 15px 0 15px"> |
|
|
|
|
<label style="color: #555">目录创建人:</label><span style="color: #000" >${data.createUserName || user.userName}</span> |
|
|
|
|
<input type="hidden" name="createUserName" value="${data.createUserName || user.userName}" /> |
|
|
|
|
<input type="hidden" name="createUser" value="${data.createUser || user.userId}" /> |
|
|
|
|
</div> |
|
|
|
|
<div class="layui-inline" style="width: calc(37% - 40px); margin:15px 15px 0 15px"> |
|
|
|
|
<label style="color: #555">目录顺序:</label> |
|
|
|
|
<input class="layui-input" type="text" name="sort" value="${data.sort}" style="width: 60px"/> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div>`, |
|
|
|
|
success: function () { |
|
|
|
@ -137,12 +141,12 @@ function openDirectoryEditLayer(data, callback, view) { |
|
|
|
|
click: dirOwnerChangeCallback |
|
|
|
|
}); |
|
|
|
|
layui.dict.render(); |
|
|
|
|
if(!data || !data.secretLevel){ |
|
|
|
|
if (!data || !data.secretLevel) { |
|
|
|
|
data['secretLevel'] = 0; |
|
|
|
|
} |
|
|
|
|
layui.dict.setData('dict-secret-level', data) |
|
|
|
|
$('div.dict-component').css({'margin-top': '5px', 'width': '380px', 'margin-left': '4px'}) |
|
|
|
|
if(view){ |
|
|
|
|
if (view) { |
|
|
|
|
layui.dict.setReadonly(); |
|
|
|
|
} |
|
|
|
|
// 目录成员管理事件
|
|
|
|
@ -166,7 +170,9 @@ function openDirectoryEditLayer(data, callback, view) { |
|
|
|
|
applyChildCheckbox(isEdit); |
|
|
|
|
}, |
|
|
|
|
yes: function (index) { |
|
|
|
|
if(view){return;} |
|
|
|
|
if (view) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
saveDirectory(index, callback); |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
@ -174,10 +180,16 @@ function openDirectoryEditLayer(data, callback, view) { |
|
|
|
|
|
|
|
|
|
function saveDirectory(index, callback) { |
|
|
|
|
form.on('submit(directoryEditForm)', function ({elem, field}) { |
|
|
|
|
if(field.secretLevel > user.secretLevel){ |
|
|
|
|
layer.alert('禁止上传超过自身涉密等级的文件,您的涉密等级为【'+ DICT.getText('secret_level', user.secretLevel) +'】', {icon:2}) |
|
|
|
|
if (field.secretLevel > user.secretLevel) { |
|
|
|
|
layer.alert('禁止上传超过自身涉密等级的文件,您的涉密等级为【' + DICT.getText('secret_level', user.secretLevel) + '】', {icon: 2}) |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (isNaN(parseInt(field.sort))) { |
|
|
|
|
layer.alert('目录顺序只能为数字'); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 转换数据类型
|
|
|
|
|
field.basicDir = field.basicDir === '1'; |
|
|
|
|
// 如果是基础数据目录,则自动为提交状态
|
|
|
|
|