修改同步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>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" data-toggle="tab" href="#tab_borders_icons-3"
|
||||
role="tab"><i class="fal fa-cog mr-1"></i> 角色權限</a>
|
||||
<a class="nav-link" data-toggle="tab" href="#tab_borders_icons-3"
|
||||
role="tab"><i class="fal fa-cog mr-1"></i> 角色權限</a>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="tab-content border border-top-0 p-3 w-100">
|
||||
@ -252,6 +252,8 @@
|
||||
|
||||
<script>
|
||||
var rolAuthTable = null;
|
||||
var accManTable = null;
|
||||
var rolManTable = null;
|
||||
$(function () {
|
||||
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() {
|
||||
@ -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() {
|
||||
@ -552,7 +554,7 @@
|
||||
$("#selRolAuth").append(creOption(roleObj.full_name, roleObj.role_guid));
|
||||
|
||||
if (index == 0)
|
||||
pageAct.selRolAuth = roleObj.role_guid
|
||||
pageAct.selRolAuth = roleObj.role_guid;
|
||||
})
|
||||
}
|
||||
}, null, "POST").send();
|
||||
@ -663,6 +665,17 @@
|
||||
});
|
||||
|
||||
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.accManId = null;
|
||||
$('#roleSel').html('');
|
||||
@ -728,7 +741,7 @@
|
||||
if (!res || res.code != "0000" || !res.msg) {
|
||||
|
||||
} else {
|
||||
toast_ok(common.DelSuc);
|
||||
toast_ok(common.EditSuc);
|
||||
//$("#groupModal").modal("hide");
|
||||
$('#accRolCanBtn').click();
|
||||
pageAct.rolManId = null;
|
||||
@ -900,27 +913,27 @@
|
||||
}
|
||||
|
||||
function initCallBack() {
|
||||
clearPagSes();
|
||||
getRoleSel();
|
||||
loadAccManTable();
|
||||
loadRolManTable();
|
||||
loadAuthPageTable();
|
||||
loadRolAuthTable();
|
||||
setAuthPage();
|
||||
events();
|
||||
clearPagSes();
|
||||
getRoleSel();
|
||||
loadAccManTable();
|
||||
loadRolManTable();
|
||||
loadAuthPageTable();
|
||||
loadRolAuthTable();
|
||||
setAuthPage();
|
||||
events();
|
||||
}
|
||||
|
||||
function asyncUser() {
|
||||
getUserByBaja(syncUsrCallBack)
|
||||
function asyncUser() {
|
||||
getUserByBaja(syncUsrCallBack)
|
||||
}
|
||||
|
||||
function syncUsrCallBack(rel) {
|
||||
let url = baseApiUrl + "/User/SyncUser";
|
||||
var data = JSON.parse(rel);
|
||||
var data = JSON.parse(rel);
|
||||
objSendData.Data = data.data;
|
||||
|
||||
ytAjax = new YourTeam.Ajax(url, objSendData, function () {
|
||||
initCallBack();
|
||||
initCallBack();
|
||||
}, null, "POST").send();
|
||||
}
|
||||
</script>
|
Loading…
Reference in New Issue
Block a user