ci框架配合miniui,使用combox二级联动,联动的下拉框中不显示数据。

img


img

浏览器中查看时已经查询到title数据了

前端代码
 <tr>
                        <td>使用的物品:</td>
                        <td><input id="cid" class="mini-treeselect" url="<?=WEBPATH?>goods/goods_class/listsbyhospid/0" multiSelect="false"
                                   textField="title" valueField="UID" parentField="ParentID" checkRecursive="false" style="width: 200px"
                                   showFolderCheckBox="false"  expandOnLoad="true" showClose="true" oncloseclick="onCloseClick" emptyText="请选择分类"
                                   popupWidth="200" name="cid"  showRadioButton="true" onvaluechanged="onDeptChanged"
                            /></td>
                        <td>物品:</td>
                        <td><input id="title"  class="mini-combobox" style="width:150px;" textField="text" valueField="id"
                                    /></td>
                    </tr>
这是js代码

```javascript
 var cid = mini.get("cid");
    var title = mini.get("title");
    function onDeptChanged(e) {
        var id = cid.getValue();
        title.setValue("");
        var url = "<?=WEBPATH?>goods/goods/setnexttitle/"+id;
        title.setUrl(url);
        title.select(0);
    }


这是控制器代码

 public function setnexttitle(){

        $id=$this->uri->segment(4);
        $where=" 1=1";
        if(!empty($id)){
            $where.=" and cid=".$id ;
        }
        $data=$this->my_ezclass->select_all("goods",'title', $where );
        $resultData = array("data"=>$data);
        $this->View($resultData);
        exit;
    }