修改同步table
This commit is contained in:
parent
51976e360f
commit
b403e2e631
@ -13,8 +13,8 @@
|
|||||||
role="tab"><i class="fal fa-users mr-1"></i> 角色管理</a>
|
role="tab"><i class="fal fa-users mr-1"></i> 角色管理</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" data-toggle="tab" href="#tab_borders_icons-3"
|
<a class="nav-link" data-toggle="tab" href="#tab_borders_icons-3"
|
||||||
role="tab"><i class="fal fa-cog mr-1"></i> 角色權限</a>
|
role="tab"><i class="fal fa-cog mr-1"></i> 角色權限</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<div class="tab-content border border-top-0 p-3 w-100">
|
<div class="tab-content border border-top-0 p-3 w-100">
|
||||||
@ -252,6 +252,8 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
var rolAuthTable = null;
|
var rolAuthTable = null;
|
||||||
|
var accManTable = null;
|
||||||
|
var rolManTable = null;
|
||||||
$(function () {
|
$(function () {
|
||||||
asyncUser(initCallBack);
|
asyncUser(initCallBack);
|
||||||
})
|
})
|
||||||
@ -328,7 +330,7 @@
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
let accManTable = new YourTeam.JqDataTables.getTableByAjax(ajaxObj, tag, null, columns, column_defs);
|
accManTable = new YourTeam.JqDataTables.getTableByAjax(ajaxObj, tag, null, columns, column_defs);
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadRolManTable() {
|
function loadRolManTable() {
|
||||||
@ -380,7 +382,7 @@
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
let rolManTable = new YourTeam.JqDataTables.getTableByAjax(ajaxObj, tag, null, columns, column_defs);
|
rolManTable = new YourTeam.JqDataTables.getTableByAjax(ajaxObj, tag, null, columns, column_defs);
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadRolAuthTable() {
|
function loadRolAuthTable() {
|
||||||
@ -552,7 +554,7 @@
|
|||||||
$("#selRolAuth").append(creOption(roleObj.full_name, roleObj.role_guid));
|
$("#selRolAuth").append(creOption(roleObj.full_name, roleObj.role_guid));
|
||||||
|
|
||||||
if (index == 0)
|
if (index == 0)
|
||||||
pageAct.selRolAuth = roleObj.role_guid
|
pageAct.selRolAuth = roleObj.role_guid;
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}, null, "POST").send();
|
}, null, "POST").send();
|
||||||
@ -663,6 +665,17 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
onEvent("click", "li.nav-item", function () {
|
onEvent("click", "li.nav-item", function () {
|
||||||
|
let acc_table = $('#' + $(this).find('a').prop('href').split('#')[1]).data('id');
|
||||||
|
if (acc_table == "accMan") {
|
||||||
|
loadAccManTable();
|
||||||
|
}
|
||||||
|
else if (acc_table == "rolMan")
|
||||||
|
loadRolManTable();
|
||||||
|
else if (acc_table == "rolAuth") {
|
||||||
|
loadRolAuthTable();
|
||||||
|
setAuthPage();
|
||||||
|
}
|
||||||
|
|
||||||
pageAct.rolManId = null;
|
pageAct.rolManId = null;
|
||||||
pageAct.accManId = null;
|
pageAct.accManId = null;
|
||||||
$('#roleSel').html('');
|
$('#roleSel').html('');
|
||||||
@ -728,7 +741,7 @@
|
|||||||
if (!res || res.code != "0000" || !res.msg) {
|
if (!res || res.code != "0000" || !res.msg) {
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
toast_ok(common.DelSuc);
|
toast_ok(common.EditSuc);
|
||||||
//$("#groupModal").modal("hide");
|
//$("#groupModal").modal("hide");
|
||||||
$('#accRolCanBtn').click();
|
$('#accRolCanBtn').click();
|
||||||
pageAct.rolManId = null;
|
pageAct.rolManId = null;
|
||||||
@ -900,27 +913,27 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function initCallBack() {
|
function initCallBack() {
|
||||||
clearPagSes();
|
clearPagSes();
|
||||||
getRoleSel();
|
getRoleSel();
|
||||||
loadAccManTable();
|
loadAccManTable();
|
||||||
loadRolManTable();
|
loadRolManTable();
|
||||||
loadAuthPageTable();
|
loadAuthPageTable();
|
||||||
loadRolAuthTable();
|
loadRolAuthTable();
|
||||||
setAuthPage();
|
setAuthPage();
|
||||||
events();
|
events();
|
||||||
}
|
}
|
||||||
|
|
||||||
function asyncUser() {
|
function asyncUser() {
|
||||||
getUserByBaja(syncUsrCallBack)
|
getUserByBaja(syncUsrCallBack)
|
||||||
}
|
}
|
||||||
|
|
||||||
function syncUsrCallBack(rel) {
|
function syncUsrCallBack(rel) {
|
||||||
let url = baseApiUrl + "/User/SyncUser";
|
let url = baseApiUrl + "/User/SyncUser";
|
||||||
var data = JSON.parse(rel);
|
var data = JSON.parse(rel);
|
||||||
objSendData.Data = data.data;
|
objSendData.Data = data.data;
|
||||||
|
|
||||||
ytAjax = new YourTeam.Ajax(url, objSendData, function () {
|
ytAjax = new YourTeam.Ajax(url, objSendData, function () {
|
||||||
initCallBack();
|
initCallBack();
|
||||||
}, null, "POST").send();
|
}, null, "POST").send();
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
Loading…
Reference in New Issue
Block a user