Easyui数据表格加载Json的内嵌对象数据

json格式

{
    "total": 3, 
    "rows": [
        {
            "id": null, 
            "in_number": 3, 
            "use_count": 3, 
            "nsVo": {
                "id": 0, 
                "ns_name": "疯子养老院", 
                "ns_address": "建军路13号", 
                "contact_name": "何俊", 
                "contact_phone": "13244596321", 
                "manager_name": "莉莉", 
                "province": "直辖市", 
                "city": "天津市", 
                "county": "和平区"
            }, 
            "devicesVo": {
                "devices_name": "水疗马桶", 
                "provider": null, 
                "maintain_name": null, 
                "com_address": null, 
                "in_address": null, 
                "maintain_phone": null, 
                "use_count": null, 
                "createtime": null, 
                "mendtime": null
            }
        }, 
        {
            "id": null, 
            "in_number": 5, 
            "use_count": 5, 
            "nsVo": {
                "id": 0, 
                "ns_name": "疯子养老院", 
                "ns_address": "建军路13号", 
                "contact_name": "何俊", 
                "contact_phone": "13244596321", 
                "manager_name": "莉莉", 
                "province": "直辖市", 
                "city": "天津市", 
                "county": "和平区"
            }, 
            "devicesVo": {
                "devices_name": "多功能马桶", 
                "provider": null, 
                "maintain_name": null, 
                "com_address": null, 
                "in_address": null, 
                "maintain_phone": null, 
                "use_count": null, 
                "createtime": null, 
                "mendtime": null
            }
        }, 
        {
            "id": null, 
            "in_number": 2, 
            "use_count": 1, 
            "nsVo": {
                "id": 0, 
                "ns_name": "疯子养老院", 
                "ns_address": "建军路13号", 
                "contact_name": "何俊", 
                "contact_phone": "13244596321", 
                "manager_name": "莉莉", 
                "province": "直辖市", 
                "city": "天津市", 
                "county": "和平区"
            }, 
            "devicesVo": {
                "devices_name": "浴缸", 
                "provider": null, 
                "maintain_name": null, 
                "com_address": null, 
                "in_address": null, 
                "maintain_phone": null, 
                "use_count": null, 
                "createtime": null, 
                "mendtime": null
            }
        }
    ]
}

获取devices_name

var columnsDev = [ [ {
	field : 'ck',
	checkbox : true
},{
	field : 'devicesVo.devices_name',
	title : '设备名称',
	width : 80,
	align : 'center',
	formatter : function (value, rec) {
        return rec.devicesVo['devices_name'];
    } 
}, {
	field : 'in_number',
	title : '安装设备数量',
	width : 50,
	align : 'center'
}, {
	field : 'use_count',
	title : '设备使用人数',
	width : 50,
	align : 'center'
}]]


评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值