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(''); $.ajax({ type: 'post', url: request_url + '/czl/publicLogin/getRoleList', data: {}, async: false, headers: { Authorization: "Bearer " + localStorage.getItem("public_token"), }, success: function (data) { var data = data.obj; if (data.length > 0) { data.forEach(function (d) { select.append(''); }); layui.form.render('select'); } else { select.append(''); layui.form.render('select'); } } }); }