7
回答
EasyUI combobox 返回正确json格式 却无反应
注册华为云得mate10,2.9折抢先购!>>>   

JS中combotree的初始化:

$('#zb_select').combotree({
			url:'URL地址',
			multiple:false,
			lines:true
		});



URL返回的json串:

[ {
  "id" : "SC001",
  "text" : "业务宣传费",
  "children" : [ {
    "id" : "SC001_JC001",
    "text" : "业务宣传费占收比(%)"
  }, {
    "id" : "SC001_JC002",
    "text" : "户均新增用户宣传费(元/户)"
  } ]
}, {
  "id" : "SC002",
  "text" : "社会渠道费用",
  "children" : [ {
    "id" : "SC002_JC001",
    "text" : "社会渠道费用占收比(%)"
  }, {
    "id" : "SC002_JC002",
    "text" : "渠道费用类型结构占比(%)"
  }, {
    "id" : "SC002_JC003",
    "text" : "渠道支撑费用占收比(%)"
  }, {
    "id" : "SC002_JC004",
    "text" : "户均社会渠道费用(元/户)"
  } ]
}, {
  "id" : "SC003",
  "text" : "客户接入成本",
  "children" : [ {
    "id" : "SC003_JC001",
    "text" : "ONU设备成本占收比(%)"
  } ]
}, {
  "id" : "SC004",
  "text" : "客户服务成本",
  "children" : [ {
    "id" : "SC004_JC001",
    "text" : "客户服务成本占收比(%)"
  }, {
    "id" : "SC004_JC002",
    "text" : "存量用户户均客户服务成本(元/百户)"
  } ]
}, {
  "id" : "SC005",
  "text" : "用户获取/维系成本",
  "children" : [ {
    "id" : "SC005_JC001",
    "text" : "获取成本占收比(%)"
  }, {
    "id" : "SC005_JC002",
    "text" : "维系成本占收比(%)"
  }, {
    "id" : "SC005_JC003",
    "text" : "新增用户户均获取成本(元/户)"
  }, {
    "id" : "SC005_JC004",
    "text" : "存量用户户均维系成本(元/户)"
  } ]
}, {
  "id" : "SC006",
  "text" : "终端补贴成本",
  "children" : [ {
    "id" : "SC006_JC001",
    "text" : "终端成本占收比(%)"
  }, {
    "id" : "SC006_JC002",
    "text" : "户均终端成本(元/户)"
  }, {
    "id" : "SC006_JC003",
    "text" : "分套餐户数占比(%)"
  }, {
    "id" : "SC006_JC004",
    "text" : "分套餐终端补贴占比(%)"
  }, {
    "id" : "SC006_JC005",
    "text" : "分套餐户均终端补贴成本(元/户)"
  }, {
    "id" : "SC006_JC006",
    "text" : "无预存合约户数占比(%)"
  }, {
    "id" : "SC006_JC007",
    "text" : "存费送机离网用户户数占比(%)"
  } ]
}, {
  "id" : "SC007",
  "text" : "销售通信产品亏损",
  "children" : [ {
    "id" : "SC007_JC001",
    "text" : "终端销售成本占收比(%)"
  }, {
    "id" : "SC007_JC002",
    "text" : "新增用户户均售卡成本(元/户)"
  } ]
}, {
  "id" : "SC008",
  "text" : "其他",
  "children" : [ {
    "id" : "SC008_JC001",
    "text" : "发票印制费占收比(%)"
  }, {
    "id" : "SC008_JC002",
    "text" : "业务用品印制费及材料费占收比(%)"
  }, {
    "id" : "SC008_JC003",
    "text" : "支付业务服务费占收比(%)"
  } ]
}, {
  "id" : "SC009",
  "text" : "ICT成本",
  "children" : [ {
    "id" : "SC009_JC001",
    "text" : "ICT业务利润率(%)"
  }, {
    "id" : "SC009_JC002",
    "text" : "第三方设备销售成本占总成本比(%)"
  }, {
    "id" : "SC009_JC003",
    "text" : "ICT欠费占收比(%)"
  } ]
}, {
  "id" : "SC010",
  "text" : "资产减值损失",
  "children" : [ {
    "id" : "SC010_JC001",
    "text" : "资产减值损失占收比(%)"
  }, {
    "id" : "SC010_JC002",
    "text" : "坏账率(%)"
  }, {
    "id" : "SC010_JC003",
    "text" : "各账龄欠费占比(%)"
  }, {
    "id" : "SC010_JC004",
    "text" : "应收账款-其他坏账占收比(%)"
  }, {
    "id" : "SC010_JC005",
    "text" : "应收账款周转率(%)"
  }, {
    "id" : "SC010_JC006",
    "text" : "其他应收款坏账占收比(%)"
  }, {
    "id" : "SC010_JC007",
    "text" : "其他应收款坏账占余额比()"
  }, {
    "id" : "SC010_JC008",
    "text" : "存货减值占收比(%)"
  } ]
}, {
  "id" : "SC011",
  "text" : "网间结算支出",
  "children" : [ {
    "id" : "SC011_JC001",
    "text" : "网间结算支出占收比(%)"
  }, {
    "id" : "SC011_JC002",
    "text" : "网间结算收支差(万元)"
  }, {
    "id" : "SC011_JC003",
    "text" : "网间结算收支差占网间结算收入比(%)"
  }, {
    "id" : "SC011_JC004",
    "text" : "网间结算支出结构:各专业占比(%)"
  }, {
    "id" : "SC011_JC005",
    "text" : "省际结算净额/网间结算收入(%)"
  }, {
    "id" : "SC011_JC006",
    "text" : "企业间结算结构(%)"
  }, {
    "id" : "SC011_JC007",
    "text" : "网间话务量类型分析(万分钟)"
  } ]
}, {
  "id" : "SC012",
  "text" : "紧密型外包",
  "children" : [ {
    "id" : "SC012_JC001",
    "text" : "紧密型成本占收比(%)"
  }, {
    "id" : "SC012_JC002",
    "text" : "人均紧密型成本(元/人)"
  } ]
} ]



但是combotree无反应,不知为何,之前没用过这个,做个试验却很失败。求解。

举报
蜡笔小新_
发帖于3年前 7回/2K+阅
顶部