...
|
...
|
@@ -182,8 +182,7 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'upload', 'admin', 'form', |
|
|
|
|
|
//新增
|
|
|
$("#resManageAdd").unbind("click").on("click", function () {
|
|
|
if ($.inArray('back:resource:save', checkList) == -1) {
|
|
|
layer.msg('暂无权限!', {icon: 7, time: 3000});
|
|
|
if (!common.hasPermission('back:resource:save')){
|
|
|
return;
|
|
|
}
|
|
|
var data = curTreeNode.data;
|
...
|
...
|
@@ -215,8 +214,7 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'upload', 'admin', 'form', |
|
|
|
|
|
//拷贝
|
|
|
$("#resManageCopy").unbind().on("click", function () {
|
|
|
if ($.inArray('back:resource:query', checkList) == -1) {
|
|
|
layer.msg('暂无权限!', {icon: 7, time: 3000});
|
|
|
if (!common.hasPermission('back:resource:query')){
|
|
|
return;
|
|
|
}
|
|
|
var data = table.checkStatus('resManageTable').data;
|
...
|
...
|
@@ -230,8 +228,7 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'upload', 'admin', 'form', |
|
|
|
|
|
//分配任务
|
|
|
$("#res_task_assignment").unbind("click").on("click", function () {
|
|
|
if ($.inArray('back:resource:task', checkList) == -1) {
|
|
|
layer.msg('暂无权限!', {icon: 7, time: 3000});
|
|
|
if (!common.hasPermission('back:resource:task')){
|
|
|
return;
|
|
|
}
|
|
|
var treeData = {id: '', children: []};
|
...
|
...
|
@@ -277,8 +274,7 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'upload', 'admin', 'form', |
|
|
|
|
|
// 模板下载
|
|
|
$('#resManageDownloadTemp').unbind().on('click', function () {
|
|
|
if ($.inArray('back:resource:export', checkList) == -1) {
|
|
|
layer.msg('暂无权限!', {icon: 7, time: 3000});
|
|
|
if (!common.hasPermission('back:resource:export')){
|
|
|
return;
|
|
|
}
|
|
|
var data = curTreeNode.data;
|
...
|
...
|
@@ -357,16 +353,14 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'upload', 'admin', 'form', |
|
|
});
|
|
|
//点击上传按钮事件
|
|
|
$("#resManageImport").on("click", function () {
|
|
|
if ($.inArray('back:resource:lead', checkList) == -1) {
|
|
|
layer.msg('暂无权限!', {icon: 7, time: 3000});
|
|
|
if (!common.hasPermission('back:resource:lead')){
|
|
|
return;
|
|
|
}
|
|
|
$('#btn-resManageImport').click();
|
|
|
});
|
|
|
// 点击导出资源
|
|
|
$('#resManageExportExcel').unbind('click').on('click', function () {
|
|
|
if ($.inArray('back:resource:export', checkList) == -1) {
|
|
|
layer.msg('暂无权限!', {icon: 7, time: 3000});
|
|
|
if (!common.hasPermission('back:resource:export')){
|
|
|
return;
|
|
|
}
|
|
|
var data = curTreeNode.data;
|
...
|
...
|
@@ -435,8 +429,7 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'upload', 'admin', 'form', |
|
|
});
|
|
|
|
|
|
$("#resManageColl").unbind().on("click", function () {
|
|
|
if ($.inArray('back:resource:relcolltemp', checkList) == -1) {
|
|
|
layer.msg('暂无权限!', {icon: 7, time: 3000});
|
|
|
if (!common.hasPermission('back:resource:relcolltemp')){
|
|
|
return;
|
|
|
}
|
|
|
var data = table.checkStatus('resManageTable').data;
|
...
|
...
|
@@ -468,8 +461,9 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'upload', 'admin', 'form', |
|
|
return false;
|
|
|
}
|
|
|
var loding = layer.load(2);
|
|
|
$.ajax({
|
|
|
url: common.domainName + '/api-web/manage/restemp/resourceTaskTemplate?resIds=' + resIds.toString() + '&taskId=' + taskId + '&checkTempId=' + checkTempId + '&access_token=' + accessToken,
|
|
|
admin.req({
|
|
|
type: "get",
|
|
|
url: common.domainName + '/api-web/manage/restemp/resourceTaskTemplate?resIds=' + resIds.toString() + '&taskId=' + taskId + '&checkTempId=' + checkTempId ,
|
|
|
success: function (res) {
|
|
|
layer.close(loding);
|
|
|
layer.msg('配置成功', {
|
...
|
...
|
@@ -481,11 +475,29 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'upload', 'admin', 'form', |
|
|
reloadTable();
|
|
|
});
|
|
|
},
|
|
|
error: function () {
|
|
|
error: function (err) {
|
|
|
layer.close(loding)
|
|
|
layer.msg("配置失败!服务异常", {offset: '15px', icon: 7, time: 2000});
|
|
|
}
|
|
|
})
|
|
|
});
|
|
|
// $.ajax({
|
|
|
// url: common.domainName + '/api-web/manage/restemp/resourceTaskTemplate?resIds=' + resIds.toString() + '&taskId=' + taskId + '&checkTempId=' + checkTempId + '&access_token=' + accessToken,
|
|
|
// success: function (res) {
|
|
|
// layer.close(loding);
|
|
|
// layer.msg('配置成功', {
|
|
|
// offset: '15px'
|
|
|
// , icon: 1
|
|
|
// , time: 1500
|
|
|
// }, function () {
|
|
|
// layer.closeAll();
|
|
|
// reloadTable();
|
|
|
// });
|
|
|
// },
|
|
|
// error: function () {
|
|
|
// layer.close(loding)
|
|
|
// layer.msg("配置失败!服务异常", {offset: '15px', icon: 7, time: 2000});
|
|
|
// }
|
|
|
// })
|
|
|
})
|
|
|
}
|
|
|
})
|
...
|
...
|
@@ -537,8 +549,8 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'upload', 'admin', 'form', |
|
|
resize: false,
|
|
|
area: ['50%', '40%'],
|
|
|
success: function (indexm, layero) {
|
|
|
$.ajax({
|
|
|
url: common.domainName + '/api-web/manage/task/page?page=-1&limit=-1&access_token=' + accessToken,
|
|
|
admin.req({
|
|
|
url: common.domainName + '/api-web/manage/task/page?page=-1&limit=-1' ,
|
|
|
success: function (res) {
|
|
|
$.each(res.data, function (i, e) {
|
|
|
var option = '<option value="' + e.taskId + '">' + e.taskName + '</option>'
|
...
|
...
|
@@ -560,8 +572,35 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'upload', 'admin', 'form', |
|
|
})
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
error: function (err) {
|
|
|
}
|
|
|
})
|
|
|
});
|
|
|
// $.ajax({
|
|
|
// url: common.domainName + '/api-web/manage/task/page?page=-1&limit=-1&access_token=' + accessToken,
|
|
|
// success: function (res) {
|
|
|
// $.each(res.data, function (i, e) {
|
|
|
// var option = '<option value="' + e.taskId + '">' + e.taskName + '</option>'
|
|
|
// $("#resChooseTaskSelect").append(option);
|
|
|
// })
|
|
|
// $("#resChooseTaskSelect").on("change", function () {
|
|
|
// var $that = $(this);
|
|
|
// $("#resChooseTaskTempSelect").empty();
|
|
|
// $("#resChooseTaskTempSelect").append('<option value="">请选择</option>')
|
|
|
// if ($that.val()) {
|
|
|
// $.ajax({
|
|
|
// url: common.domainName + '/api-web/manage/restemp/findByTaskId?taskId=' + $that.val() + '&access_token=' + accessToken,
|
|
|
// success: function (tempRes) {
|
|
|
// $.each(tempRes.data, function (k, j) {
|
|
|
// var option = '<option value="' + j.checkTempId + '">' + j.taskId + '</option>'
|
|
|
// $("#resChooseTaskTempSelect").append(option);
|
|
|
// })
|
|
|
// }
|
|
|
// })
|
|
|
// }
|
|
|
// })
|
|
|
// }
|
|
|
// })
|
|
|
},
|
|
|
yes: function (index, layero) {
|
|
|
if (callback && callback()) {
|
...
|
...
|
@@ -574,8 +613,7 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'upload', 'admin', 'form', |
|
|
|
|
|
//告警模板
|
|
|
$("#resManageAlarmTemp").unbind("click").on("click", function () {
|
|
|
if ($.inArray('back:resource:relalarmtemp', checkList) == -1) {
|
|
|
layer.msg('暂无权限!', {icon: 7, time: 3000});
|
|
|
if (!common.hasPermission('back:resource:relalarmtemp')){
|
|
|
return;
|
|
|
}
|
|
|
var data = table.checkStatus('resManageTable').data;
|
...
|
...
|
@@ -593,8 +631,8 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'upload', 'admin', 'form', |
|
|
return false;
|
|
|
}
|
|
|
var loding = layer.load(2);
|
|
|
$.ajax({
|
|
|
url: common.domainName + '/api-web/manage/resource/alarmTemplate?resIds=' + resIds.toString() + '&alarmTempId=' + alarmtemplateData[0].alarmTempId + '&access_token=' + accessToken,
|
|
|
admin.req({
|
|
|
url: common.domainName + '/api-web/manage/resource/alarmTemplate?resIds=' + resIds.toString() + '&alarmTempId=' + alarmtemplateData[0].alarmTempId ,
|
|
|
success: function (res) {
|
|
|
layer.close(loding);
|
|
|
layer.msg('配置成功', {
|
...
|
...
|
@@ -606,11 +644,29 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'upload', 'admin', 'form', |
|
|
reloadTable();
|
|
|
});
|
|
|
},
|
|
|
error: function () {
|
|
|
error: function (err) {
|
|
|
layer.close(loding)
|
|
|
layer.msg("配置失败!服务异常", {offset: '15px', icon: 7, time: 2000});
|
|
|
}
|
|
|
})
|
|
|
});
|
|
|
// $.ajax({
|
|
|
// url: common.domainName + '/api-web/manage/resource/alarmTemplate?resIds=' + resIds.toString() + '&alarmTempId=' + alarmtemplateData[0].alarmTempId + '&access_token=' + accessToken,
|
|
|
// success: function (res) {
|
|
|
// layer.close(loding);
|
|
|
// layer.msg('配置成功', {
|
|
|
// offset: '15px'
|
|
|
// , icon: 1
|
|
|
// , time: 1500
|
|
|
// }, function () {
|
|
|
// layer.closeAll();
|
|
|
// reloadTable();
|
|
|
// });
|
|
|
// },
|
|
|
// error: function () {
|
|
|
// layer.close(loding)
|
|
|
// layer.msg("配置失败!服务异常", {offset: '15px', icon: 7, time: 2000});
|
|
|
// }
|
|
|
// })
|
|
|
}, resIds);
|
|
|
}
|
|
|
})
|
...
|
...
|
@@ -645,8 +701,7 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'upload', 'admin', 'form', |
|
|
|
|
|
//资源管理告警订阅
|
|
|
$("#resManageSub").unbind("click").on("click", function () {
|
|
|
if ($.inArray('back:resource:setResSubsrib', checkList) == -1) {
|
|
|
layer.msg('暂无权限!', {icon: 7, time: 3000});
|
|
|
if (!common.hasPermission('back:resource:setResSubsrib')){
|
|
|
return;
|
|
|
}
|
|
|
var data = table.checkStatus('resManageTable').data;
|
...
|
...
|
@@ -664,8 +719,8 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'upload', 'admin', 'form', |
|
|
return false;
|
|
|
}
|
|
|
var loding = layer.load(2);
|
|
|
$.ajax({
|
|
|
url: common.domainName + '/api-web/manage/resource/resourceSub?resIds=' + resIds.toString() + '&subId=' + subData[0].subId + '&access_token=' + accessToken,
|
|
|
admin.req({
|
|
|
url: common.domainName + '/api-web/manage/resource/resourceSub?resIds=' + resIds.toString() + '&subId=' + subData[0].subId ,
|
|
|
success: function (res) {
|
|
|
layer.close(loding);
|
|
|
layer.msg('配置成功', {
|
...
|
...
|
@@ -677,11 +732,29 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'upload', 'admin', 'form', |
|
|
reloadTable();
|
|
|
});
|
|
|
},
|
|
|
error: function () {
|
|
|
error: function (err) {
|
|
|
layer.close(loding)
|
|
|
layer.msg("配置失败!服务异常", {offset: '15px', icon: 7, time: 2000});
|
|
|
}
|
|
|
})
|
|
|
});
|
|
|
// $.ajax({
|
|
|
// url: common.domainName + '/api-web/manage/resource/resourceSub?resIds=' + resIds.toString() + '&subId=' + subData[0].subId + '&access_token=' + accessToken,
|
|
|
// success: function (res) {
|
|
|
// layer.close(loding);
|
|
|
// layer.msg('配置成功', {
|
|
|
// offset: '15px'
|
|
|
// , icon: 1
|
|
|
// , time: 1500
|
|
|
// }, function () {
|
|
|
// layer.closeAll();
|
|
|
// reloadTable();
|
|
|
// });
|
|
|
// },
|
|
|
// error: function () {
|
|
|
// layer.close(loding)
|
|
|
// layer.msg("配置失败!服务异常", {offset: '15px', icon: 7, time: 2000});
|
|
|
// }
|
|
|
// })
|
|
|
}, resIds)
|
|
|
form.render();
|
|
|
}
|
...
|
...
|
@@ -732,8 +805,7 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'upload', 'admin', 'form', |
|
|
|
|
|
//资源授权
|
|
|
$('#res-user-grant-btn').unbind("click").on('click', function () {
|
|
|
if ($.inArray('back:resource:impower', checkList) == -1) {
|
|
|
layer.msg('暂无权限!', {icon: 7, time: 3000});
|
|
|
if (!common.hasPermission('back:resource:impower')){
|
|
|
return;
|
|
|
}
|
|
|
resManageAuthorization()
|
...
|
...
|
@@ -931,8 +1003,7 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'upload', 'admin', 'form', |
|
|
|
|
|
//点击协议名称 进行编辑
|
|
|
$('[resmanage-data-edit]').unbind("click").on('click', function () {
|
|
|
if ($.inArray('back:resource:update', checkList) == -1) {
|
|
|
layer.msg('暂无权限!', {icon: 7, time: 3000});
|
|
|
if (!common.hasPermission('back:resource:update')){
|
|
|
return;
|
|
|
}
|
|
|
openEditHtml($(this).attr("resmanage-data-edit"), $(this).data("restype"), false);
|
...
|
...
|
@@ -958,12 +1029,12 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'upload', 'admin', 'form', |
|
|
resId: $that.attr("resmanage-data-stopcoll"),
|
|
|
state: $that.data("param")
|
|
|
}
|
|
|
$.ajax({
|
|
|
url: common.domainName + '/api-web/manage/resource/stopOrStartColl?access_token=' + accessToken
|
|
|
, data: JSON.stringify(opj)
|
|
|
admin.req({
|
|
|
url: common.domainName + '/api-web/manage/resource/stopOrStartColl'
|
|
|
,data: JSON.stringify(opj)
|
|
|
, type: 'post'
|
|
|
, contentType: "application/json; charset=utf-8"
|
|
|
, success: function (res) {
|
|
|
, contentType: "application/json; charset=utf-8",
|
|
|
success: function (res) {
|
|
|
if (res.success) {
|
|
|
layer.close(loding);
|
|
|
layer.msg('操作成功', {
|
...
|
...
|
@@ -982,7 +1053,32 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'upload', 'admin', 'form', |
|
|
layer.closeAll();
|
|
|
console.error(res);
|
|
|
}
|
|
|
})
|
|
|
});
|
|
|
// $.ajax({
|
|
|
// url: common.domainName + '/api-web/manage/resource/stopOrStartColl?access_token=' + accessToken
|
|
|
// , data: JSON.stringify(opj)
|
|
|
// , type: 'post'
|
|
|
// , contentType: "application/json; charset=utf-8"
|
|
|
// , success: function (res) {
|
|
|
// if (res.success) {
|
|
|
// layer.close(loding);
|
|
|
// layer.msg('操作成功', {
|
|
|
// offset: '15px'
|
|
|
// , icon: 1
|
|
|
// , time: 1500
|
|
|
// }, function () {
|
|
|
// layer.closeAll();
|
|
|
// reloadTable();
|
|
|
// });
|
|
|
// } else {
|
|
|
// layer.msg('操作异常:' + res.msg, {icon: 7, time: 3000});
|
|
|
// }
|
|
|
// },
|
|
|
// error: function (res) {
|
|
|
// layer.closeAll();
|
|
|
// console.error(res);
|
|
|
// }
|
|
|
// })
|
|
|
});
|
|
|
});
|
|
|
// 加入/移出收藏夹
|
...
|
...
|
@@ -1427,10 +1523,11 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'upload', 'admin', 'form', |
|
|
subIds: formdata.subIds
|
|
|
}
|
|
|
var loding = layer.load(2);
|
|
|
$.ajax({
|
|
|
url: common.domainName + '/api-web/manage/resource/saveResAlarmAndTaskInfo?access_token=' + accessToken,
|
|
|
admin.req({
|
|
|
//修改扩展字段T3/IOp值
|
|
|
url: common.domainName + '/api-web/manage/resource/saveResAlarmAndTaskInfo',
|
|
|
data: param,
|
|
|
success: function (res) {
|
|
|
success: function (response) {
|
|
|
layer.msg('配置成功', {offset: '15px', icon: 1, time: 2000}, function () {
|
|
|
layer.closeAll();
|
|
|
reloadTable();
|
...
|
...
|
@@ -1440,10 +1537,27 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'upload', 'admin', 'form', |
|
|
});
|
|
|
|
|
|
},
|
|
|
error: function (res) {
|
|
|
error: function (err) {
|
|
|
layer.close(loding);
|
|
|
}
|
|
|
})
|
|
|
});
|
|
|
// $.ajax({
|
|
|
// url: common.domainName + '/api-web/manage/resource/saveResAlarmAndTaskInfo?access_token=' + accessToken,
|
|
|
// data: param,
|
|
|
// success: function (res) {
|
|
|
// layer.msg('配置成功', {offset: '15px', icon: 1, time: 2000}, function () {
|
|
|
// layer.closeAll();
|
|
|
// reloadTable();
|
|
|
// if (next == '1') {
|
|
|
// openResourceRelationConfigHtml(bean.resId, bean.resType)
|
|
|
// }
|
|
|
// });
|
|
|
//
|
|
|
// },
|
|
|
// error: function (res) {
|
|
|
// layer.close(loding);
|
|
|
// }
|
|
|
// })
|
|
|
})
|
|
|
|
|
|
},
|
...
|
...
|
@@ -1472,8 +1586,7 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'upload', 'admin', 'form', |
|
|
|
|
|
//资源关系配置
|
|
|
$('#res_relation_config').unbind().on('click', function (obj) {
|
|
|
if ($.inArray('back:resource:relation', checkList) == -1) {
|
|
|
layer.msg('暂无权限!', {icon: 7, time: 3000});
|
|
|
if (!common.hasPermission('back:resource:relation')){
|
|
|
return;
|
|
|
}
|
|
|
var data = table.checkStatus('resManageTable').data;
|
...
|
...
|
@@ -1521,7 +1634,8 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'upload', 'admin', 'form', |
|
|
layer.msg("请先选择关系类型!", {offset: '15px', icon: 7, time: 2000});
|
|
|
return false;
|
|
|
}
|
|
|
$.ajax({
|
|
|
admin.req({
|
|
|
//修改扩展字段T3/IOp值
|
|
|
url: common.domainName + '/api-web/manage/resource/findResRelationByResId',
|
|
|
async: false,
|
|
|
data: {
|
...
|
...
|
@@ -1535,8 +1649,26 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'upload', 'admin', 'form', |
|
|
resIds = res.data.map(item => {
|
|
|
return item.targetId;
|
|
|
})
|
|
|
},
|
|
|
error: function (err) {
|
|
|
}
|
|
|
})
|
|
|
});
|
|
|
// $.ajax({
|
|
|
// url: common.domainName + '/api-web/manage/resource/findResRelationByResId',
|
|
|
// async: false,
|
|
|
// data: {
|
|
|
// access_token: accessToken,
|
|
|
// resId: resId,
|
|
|
// reType: reType,
|
|
|
// page: 1,
|
|
|
// limit: -1
|
|
|
// },
|
|
|
// success: function (res) {
|
|
|
// resIds = res.data.map(item => {
|
|
|
// return item.targetId;
|
|
|
// })
|
|
|
// }
|
|
|
// })
|
|
|
common.openWin("template/res/reslist", "选择资源", {oldData: resIds}, ["选择"], function () {
|
|
|
var reslist = layui.reslist({});
|
|
|
var data = reslist.getData();
|
...
|
...
|
@@ -1559,8 +1691,9 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'upload', 'admin', 'form', |
|
|
reType: reType,
|
|
|
arr: arr
|
|
|
}
|
|
|
$.ajax({
|
|
|
url: common.domainName + '/api-web/manage/resource/saveResRelation?access_token=' + accessToken,
|
|
|
admin.req({
|
|
|
//修改扩展字段T3/IOp值
|
|
|
url: common.domainName + '/api-web/manage/resource/saveResRelation',
|
|
|
type: 'post',
|
|
|
contentType: "application/json; charset=utf-8",
|
|
|
data: JSON.stringify(param),
|
...
|
...
|
@@ -1570,10 +1703,25 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'upload', 'admin', 'form', |
|
|
relationTableRender(resId);
|
|
|
});
|
|
|
},
|
|
|
error: function (res) {
|
|
|
error: function (err) {
|
|
|
layer.close(loding);
|
|
|
}
|
|
|
})
|
|
|
});
|
|
|
// $.ajax({
|
|
|
// url: common.domainName + '/api-web/manage/resource/saveResRelation?access_token=' + accessToken,
|
|
|
// type: 'post',
|
|
|
// contentType: "application/json; charset=utf-8",
|
|
|
// data: JSON.stringify(param),
|
|
|
// success: function (res) {
|
|
|
// layer.msg('保存成功!', {icon: 1, time: 1500}, function () {
|
|
|
// layer.close(loding);
|
|
|
// relationTableRender(resId);
|
|
|
// });
|
|
|
// },
|
|
|
// error: function (res) {
|
|
|
// layer.close(loding);
|
|
|
// }
|
|
|
// })
|
|
|
return true;
|
|
|
})
|
|
|
})
|
...
|
...
|
@@ -1809,8 +1957,7 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'upload', 'admin', 'form', |
|
|
}
|
|
|
|
|
|
function deleteByIds(ids) {
|
|
|
if ($.inArray('back:resource:delete', checkList) == -1) {
|
|
|
layer.msg('暂无权限!', {icon: 7, time: 3000});
|
|
|
if (!common.hasPermission('back:resource:delete')){
|
|
|
return;
|
|
|
}
|
|
|
//确认提示框
|
...
|
...
|
@@ -1928,8 +2075,9 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'upload', 'admin', 'form', |
|
|
extend: extend
|
|
|
}
|
|
|
var loding = layer.load(2)
|
|
|
$.ajax({
|
|
|
url: common.domainName + '/api-web/manage/resource/save?access_token=' + accessToken,
|
|
|
admin.req({
|
|
|
//修改扩展字段T3/IOp值
|
|
|
url: common.domainName + '/api-web/manage/resource/save',
|
|
|
type: 'post',
|
|
|
data: JSON.stringify(param),
|
|
|
contentType: "application/json;charset=utf-8",
|
...
|
...
|
@@ -1944,10 +2092,30 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'upload', 'admin', 'form', |
|
|
}
|
|
|
});
|
|
|
},
|
|
|
error: function (res) {
|
|
|
error: function (err) {
|
|
|
layer.close(loding)
|
|
|
}
|
|
|
})
|
|
|
});
|
|
|
// $.ajax({
|
|
|
// url: common.domainName + '/api-web/manage/resource/save?access_token=' + accessToken,
|
|
|
// type: 'post',
|
|
|
// data: JSON.stringify(param),
|
|
|
// contentType: "application/json;charset=utf-8",
|
|
|
// success: function (res) {
|
|
|
// layer.close(loding)
|
|
|
// layer.msg('保存成功!', {icon: 1, time: 1500}, function () {
|
|
|
// layer.closeAll();
|
|
|
// reloadTable();
|
|
|
// if (next == '1') {
|
|
|
// //openCollTaskAndAlarm(res.object)
|
|
|
// openResourceRelationConfigHtml(res.object.resId, res.object.resType)
|
|
|
// }
|
|
|
// });
|
|
|
// },
|
|
|
// error: function (res) {
|
|
|
// layer.close(loding)
|
|
|
// }
|
|
|
// })
|
|
|
}
|
|
|
|
|
|
//资源协议验证
|
...
|
...
|
@@ -2084,9 +2252,9 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'upload', 'admin', 'form', |
|
|
userIds = userId.toString()
|
|
|
var loading = layer.load(2);
|
|
|
var param = {userIds: userIds, resIds: resIds}
|
|
|
$.ajax({
|
|
|
type: "post",
|
|
|
url: domainName + "/api-web/manage/resource/grant?access_token=" + accessToken,
|
|
|
admin.req({
|
|
|
//修改扩展字段T3/IOp值
|
|
|
url: domainName + "/api-web/manage/resource/grant",
|
|
|
contentType: 'application/json;charset=UTF-8',
|
|
|
data: JSON.stringify(param),
|
|
|
async: true,
|
...
|
...
|
@@ -2101,11 +2269,33 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'upload', 'admin', 'form', |
|
|
reloadTable()
|
|
|
});
|
|
|
},
|
|
|
error: function () {
|
|
|
error: function (err) {
|
|
|
layer.close(loading)
|
|
|
layer.msg("授权失败,请联系管理员!", {offset: '15px', icon: 7, time: 2000});
|
|
|
}
|
|
|
})
|
|
|
});
|
|
|
// $.ajax({
|
|
|
// type: "post",
|
|
|
// url: domainName + "/api-web/manage/resource/grant?access_token=" + accessToken,
|
|
|
// contentType: 'application/json;charset=UTF-8',
|
|
|
// data: JSON.stringify(param),
|
|
|
// async: true,
|
|
|
// success: function (res) {
|
|
|
// layer.close(loading);
|
|
|
// layer.msg('授权成功', {
|
|
|
// offset: '15px'
|
|
|
// , icon: 1
|
|
|
// , time: 1500
|
|
|
// }, function () {
|
|
|
// layer.closeAll();
|
|
|
// reloadTable()
|
|
|
// });
|
|
|
// },
|
|
|
// error: function () {
|
|
|
// layer.close(loading)
|
|
|
// layer.msg("授权失败,请联系管理员!", {offset: '15px', icon: 7, time: 2000});
|
|
|
// }
|
|
|
// })
|
|
|
}
|
|
|
})
|
|
|
})
|
...
|
...
|
@@ -2134,9 +2324,9 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'upload', 'admin', 'form', |
|
|
})
|
|
|
var loading = layer.load(2);
|
|
|
var param = {resType: resType, checkTempId: checkTempId.toString(), resId: resIds};
|
|
|
$.ajax({
|
|
|
admin.req({
|
|
|
type: "get",
|
|
|
url: domainName + "/api-web/manage/restemp/saveResTaskAndTemp?access_token=" + accessToken,
|
|
|
url: domainName + "/api-web/manage/restemp/saveResTaskAndTemp" ,
|
|
|
data: param,
|
|
|
async: true,
|
|
|
success: function (res) {
|
...
|
...
|
@@ -2154,11 +2344,36 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'upload', 'admin', 'form', |
|
|
reloadTable()
|
|
|
});
|
|
|
},
|
|
|
error: function () {
|
|
|
error: function (err) {
|
|
|
layer.close(loading)
|
|
|
layer.msg("保存失败,请联系管理员!", {offset: '15px', icon: 7, time: 2000});
|
|
|
}
|
|
|
})
|
|
|
});
|
|
|
// $.ajax({
|
|
|
// type: "get",
|
|
|
// url: domainName + "/api-web/manage/restemp/saveResTaskAndTemp?access_token=" + accessToken,
|
|
|
// data: param,
|
|
|
// async: true,
|
|
|
// success: function (res) {
|
|
|
// layer.close(loading);
|
|
|
// var icon = 1;
|
|
|
// if ((res.success && res.data.length != 0) || !res.success) {
|
|
|
// icon = 7;
|
|
|
// }
|
|
|
// layer.msg(res.msg, {
|
|
|
// offset: '15px'
|
|
|
// , icon: icon
|
|
|
// , time: 1500
|
|
|
// }, function () {
|
|
|
// layer.closeAll();
|
|
|
// reloadTable()
|
|
|
// });
|
|
|
// },
|
|
|
// error: function () {
|
|
|
// layer.close(loading)
|
|
|
// layer.msg("保存失败,请联系管理员!", {offset: '15px', icon: 7, time: 2000});
|
|
|
// }
|
|
|
// })
|
|
|
}
|
|
|
})
|
|
|
})
|
...
|
...
|
|