Commit c335bfa4 by liuyang

1.文档库授权文档授权添加过滤

parent 96a1fa80
......@@ -34,6 +34,8 @@ $(function () {
$(window).load(function () {
// 查询
query();
showAuthButton();
});
/**
......@@ -164,3 +166,63 @@ let checkSelectMain = function () {
}
return true;
}
/**
* 显示授权按钮
*/
let showAuthButton = function () {
let label = IPLAT.EFInput.value($("#inqu_status-0-fileId"))
// 管理员或者是项目经理,才能进行授权和操作用户
let inInfo = new EiInfo();
inInfo.set("inqu_status-0-fileId", label);
EiCommunicator.send("HPWD001", "queryProjectManager", inInfo, {
onSuccess(ei) {
if (ei.status != -1){
switch (ei.extAttr.isManager) {
case 1:
$("#SAVE").show();
$("#AUTH").show();
$("#REMOVE_USER").show();
$("#COPY_USER").show();
break;
case 2:
$("#SAVE").hide();
$("#AUTH").show();
$("#REMOVE_USER").show();
$("#COPY_USER").show();
break
default:
$("#SAVE").hide();
$("#AUTH").hide();
$("#REMOVE_USER").hide();
$("#COPY_USER").hide();
}
}
}
}, {async: false})
EiCommunicator.send('HPWD001', 'isProjectManager', inInfo, {
onSuccess: function (res) {
let status = res.getStatus();
if (status >= 0 && res.extAttr.isManager == 1) {
$("#AUTH").show();
$("#REMOVE_USER").show();
$("#COPY_USER").show();
$("#SAVE").show();
} else if (status >= 0 && res.extAttr.isProjectManager == 1) {
$("#AUTH").show();
$("#REMOVE_USER").show();
$("#COPY_USER").show();
$("#SAVE").hide();
} else {
$("#SAVE").hide();
$("#AUTH").hide();
$("#REMOVE_USER").hide();
$("#COPY_USER").hide();
}
},
onFail: function (res) {
NotificationUtil("操作失败,原因[" + res.getMsg() + "]", "error");
}
});
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment