这里要处理的数据,是一组树型结构。如下
let options=
[
{"value":1,"label":"三甲","children":[
{"value":68,"label":"上海三甲","children":[{"value":681,"label":"---无--- ","children":null}]},
{"value":69,"label":"江苏三甲","children":[{"value":691,"label":"---无---","children":null}]},
{"value":70,"label":"浙江三甲","children":[{"value":701,"label":"---无---","children":null}]}]
},
{"value":71,"label":"二甲","children":[
{"value":72,"label":"上海二甲","children":[{"value":721,"label":"---无---","children":null}]},
{"value":73,"label":"江苏二甲","children":[{"value":731,"label":"---无---","children":null}]},
{"value":74,"label":"浙江二甲","children":[{"value":741,"label":"---无---","children":null}]}]
},
{"value":75,"label":"社区医院","children":[
{"value":76,"label":"上海社区医院","children":[{"value":761,"label":"---无---","children":null}]},
{"value":77,"label":