You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
99 lines
3.1 KiB
99 lines
3.1 KiB
var turnPage = new turnPageClass();
|
|
var oper;
|
|
var sourceId;
|
|
var sourceType
|
|
|
|
function backClick(){
|
|
let showInfo = parent.window.data.showInfo;
|
|
showInfo.close();
|
|
}
|
|
|
|
function queryClick()
|
|
{
|
|
sourceId = parent.window.data.id;
|
|
oper = parent.window.data.oper;
|
|
if(typeof sourceId == 'undefined' || sourceId == null || sourceId === ''
|
|
|| typeof oper == 'undefined' || oper == null || oper === ''){
|
|
alert("请先选中一个资源");
|
|
return;
|
|
}
|
|
var sourceName = document.getElementById("sourceName").value;
|
|
var sourceValue = document.getElementById("sourceValue").value;
|
|
var sourceType = document.getElementById("sourceType").value;
|
|
var param = [
|
|
sourceName,
|
|
sourceValue,
|
|
sourceType,
|
|
sourceId,
|
|
oper
|
|
]
|
|
var mySql = wrapSql("source.ResourceMngSql", "unselect", param, "systemmanage");
|
|
var sqlStr=mySql;
|
|
turnPage.queryModal(sqlStr, SourceGrpGrid,1);
|
|
}
|
|
|
|
//增加资源关联
|
|
function addClick()
|
|
{
|
|
sourceId = parent.window.data.id;
|
|
oper = parent.window.data.oper;
|
|
if(typeof sourceId == 'undefined' || sourceId == null || sourceId === ''
|
|
|| typeof oper == 'undefined' || oper == null || oper === ''){
|
|
alert("请先选中一个资源");
|
|
return;
|
|
}
|
|
var gridCount = SourceGrpGrid.mulLineCount;
|
|
var currentPage = turnPage.pageIndex;
|
|
var pageLineNum = turnPage.pageLineNum;
|
|
let queryAllRecordCount = turnPage.queryAllRecordCount;
|
|
let iArray = new Array();
|
|
for (var i = 0; i< gridCount; i++) {
|
|
let offset = i + currentPage * pageLineNum;
|
|
if (offset >= queryAllRecordCount)
|
|
continue;
|
|
if (SourceGrpGrid.getChkNo(i)){
|
|
iArray.push(SourceGrpGrid.getRowColData(i,1));
|
|
}
|
|
}
|
|
if(iArray.length === 0){
|
|
alert("请先选中要添加的资源");
|
|
return;
|
|
}
|
|
ajaxSubmit3({
|
|
url: "../API/systemmanage/resourceMng/addrela",
|
|
data: {
|
|
id: sourceId,
|
|
oper: oper,
|
|
relaIds: iArray
|
|
},
|
|
callBackMethod: (flagStr, content, result) => {
|
|
alert(content);
|
|
if(flagStr === 'Succ'){
|
|
queryClick();
|
|
}
|
|
}
|
|
});
|
|
}
|
|
|
|
function selectOneRow(){
|
|
//判断是否勾选要修改的资源
|
|
var selSourceNo = SourceGrpGrid.getSelNo();
|
|
//将选择的资源信息拷贝到各个信息输入框内
|
|
document.getElementById('sourceId').value = SourceGrpGrid.getRowColData(selSourceNo-1,1);
|
|
document.getElementById('sourceName').value = SourceGrpGrid.getRowColData(selSourceNo-1,2);
|
|
document.getElementById('sourceValue').value = SourceGrpGrid.getRowColData(selSourceNo-1,3);
|
|
document.getElementById('sourceType').value = SourceGrpGrid.getRowColData(selSourceNo-1,4);
|
|
showTypeName(document.getElementById('sourceType').value);
|
|
}
|
|
|
|
function showTypeName(type){
|
|
if(type === "menu"){
|
|
document.getElementById('sourceTypeName').value = "菜单页面";
|
|
}else if(type === "jsp"){
|
|
document.getElementById('sourceTypeName').value = "非菜单页面";
|
|
}if(type === "url"){
|
|
document.getElementById('sourceTypeName').value = "请求url";
|
|
}
|
|
}
|
|
|
|
|
|
|