columns : [
{
field : "dept",
edit : {
type : 'select',//下拉框
data : [
{
id:"${item.id }",
text:"${item.name }",
deptnum:"${item.deptnum }"
},
/c:forEach
],
valueField : 'deptnum',
textField : 'text',
onSelect : function(val, rec) {
alert(val);
$.ajax({
type: "POST",
url: "../operate/getKufangs",
dataType: "json",
data: {
dept:val
},
success: function (data) {
if (data.type == 'success') {
$("#kufangs2").val(data.kufangs);
}
}
});
console.log(val, rec);
}
},
title : "机构",
align : "center",
width : "200px"
},
{
field : "kufangid",
edit : {
type : 'select',//下拉框
data : [
{
id:"${item.id }",
text:"${item.name }"
},
/c:forEach
],
valueField : 'id',
textField : 'text',
onSelect : function(val, rec) {
console.log(val, rec);
}
},
title : "名称",
align : "center",
width : "200px"
},
这两个要怎么动态关联,请大神解答
https://blog.csdn.net/weixin_37020977/article/details/81006755