function getPackageType(form,combinTypeId) { $("#combinType").html(""); $.ajax({ type: 'post', url: ctxPath + '/utilConnection/getPackageType', data: { }, async: false, success: function (data) { var html = ''; for (var i = 0; i < data.length; i++) { if (combinTypeId == data[i].key) { html += ''; } else { html += ''; } } $("#combinType").html(html); layui.form.render('select'); //这里就是我们要渲染的地方了 // form.render('select' ,'combinType'); }, error: function (err) { console.log("获取套餐类型下拉列表出错:", err); } }); } function getPersonType(form,personTypeId) { $("#personType").html(""); $.ajax({ type: 'post', url: ctxPath + '/utilConnection/getPersonType', data: { }, async: false, success: function (data) { var html = ''; for (var i = 0; i < data.length; i++) { if (personTypeId == data[i].key) { html += ''; } else { html += ''; } } $("#personType").html(html); layui.form.render('select'); //这里就是我们要渲染的地方了 // form.render('select' ,'combinType'); }, error: function (err) { console.log("获取人员类别下拉列表出错:", err); } }); } function getExaminationHospital(form,personTypeId) { $("#hospital").html(""); $.ajax({ type: 'post', url: ctxPath + '/utilConnection/getExaminationHospital', data: { }, async: false, success: function (data) { var html = ''; for (var i = 0; i < data.length; i++) { if (personTypeId == data[i].key) { html += ''; } else { html += ''; } } $("#hospital").html(html); layui.form.render('select'); //这里就是我们要渲染的地方了 }, error: function (err) { console.log("获取体检医院下拉列表出错:", err); } }); } /** * * 获取阳性疾病下拉框 * @param form //form对象 * @param selectId //下拉框选中id * @param htmlId //添加htmlID */ function getPositiveDisease(form,selectId,htmlId,keyWord) { console.log("selectId="+selectId) $("#"+htmlId).html(""); $.ajax({ type: 'post', url: ctxPath + '/type/getPositiveDisease', data: { keyWord:keyWord }, async: false, success: function (data) { // alert(JSON.stringify(data)); var data = data.data; var html = ''; for (var i = 0; i < data.length; i++) { if (selectId == data[i].key) { html += ''; } else { html += ''; } } $("#"+htmlId).html(html); layui.form.render('select'); //这里就是我们要渲染的地方了 // form.render('select' ,'combinType'); }, error: function (err) { console.log("获取人员类别下拉列表出错:", err); } }); } function getSpecialPost(form,specialPostId) { $("#specialPost").html(""); $.ajax({ type: 'post', url: ctxPath + '/utilConnection/getSpecialPost', data: { }, async: false, success: function (data) { var html = ''; for (var i = 0; i < data.length; i++) { if (specialPostId == data[i].key) { html += ''; } else { html += ''; } } $("#specialPost").html(html); layui.form.render('select'); //这里就是我们要渲染的地方了 // form.render('select' ,'combinType'); }, error: function (err) { console.log("获取特殊岗位下拉列表出错:", err); } }); } function getRole(form,roleId) { $("#roleId").html(""); $.ajax({ type: 'post', url: ctxPath + '/utilConnection/getRole', data: { }, async: false, success: function (data) { var html = ''; for (var i = 0; i < data.length; i++) { if (roleId == data[i].key) { html += ''; } else { html += ''; } } $("#roleId").html(html); layui.form.render('select'); //这里就是我们要渲染的地方了 // form.render('select' ,'combinType'); }, error: function (err) { console.log("获取人员角色下拉列表出错:", err); } }); } function gethospital(form,hospitalId) { $("#hospitalId").html(""); $.ajax({ type: 'post', url: ctxPath + '/utilConnection/getHospitalSelect', data: { value:hospitalId }, async: false, success: function (data) { var data =data.data; // var html = ''; var html = ''; for (var i = 0; i < data.length; i++) { if (hospitalId == data[i].key) { html += ''; } else { html += ''; } $("#hospitalId").html(html); layui.form.render('select'); //这里就是我们要渲染的地方了 // form.render('select' ,'combinType'); } }, error: function (err) { console.log("获取人员角色下拉列表出错:", err); } }); } function getHazard(form,hazard) { $("#hazards").html(""); $.ajax({ type: 'post', url: ctxPath + '/utilConnection/getHazard', data: { }, async: false, success: function (data) { var html = ''; for (var i = 0; i < data.length; i++) { if (hazard == data[i].key) { html += ''; } else { html += ''; } $("#hazards").html(html); layui.form.render('select'); //这里就是我们要渲染的地方了 } }, error: function (err) { console.log("获取危害因素下拉列表出错:", err); } }); }