hn_cloud_web/public/login/js/companyTreeCzl.js

37 lines
1.1 KiB
JavaScript

bindTreeSelector({
inputTextId: "department",
inputValueId: "departmentId",
panelId: "orgContentCzl",
treeId: "departmentTree",
ajaxUrl: request_url + "/czl/publicLogin/getDeptTree",
extraSet: function (node) {
examPerfession = node.id;
isParent = node.isParent;
typeId = node.type;
}
});
function initRolesCzl(orgId){
var select = $('#roleIdCzl');
select.empty();
select.append('<option value="">请选择角色</option>');
$.ajax({
type: 'post',
url: request_url + '/czl/publicLogin/getRoleList',
data: {},
async: false,
success: function (data) {
var data = data.obj;
if (data.length > 0) {
data.forEach(function (d) {
select.append('<option value="' + d.key + '">' + d.value + '</option>');
});
layui.form.render('select');
} else {
select.append('<option value="">暂无数据</option>');
layui.form.render('select');
}
}
});
}