(function (c) { config.init(); var b = { master: [], detail: [], newData: [], obj: "#list ul", doing: function (d) { d.sort(function (f, e) { return f.orderId > e.orderId ? 1 : -1 }); for (i = 0; i < d.length; i++) { if (d[i].parentId == "-1") { this.master.push(d[i]) } } for (i = 0; i < this.master.length; i++) { this.newData.push(this.master[i]); for (j = 0; j < d.length; j++) { if (this.master[i].deptId == d[j].parentId) { this.newData.push(d[j]) } } } // for(var i = 0; i '+this.master[i].deptName+''; } c('.wraplist.left ul').html(leftStr); //左边栏目点击事件 c('.wraplist.left ul').on('tap','li',function (e) { c(e.target).addClass('active').siblings().removeClass('active'); c('#'+c(e.target).attr('name')).addClass('active'); c('#'+c(e.target).attr('name')).siblings().removeClass('active'); }); c('.wraplist.left li').eq(0).addClass('active'); //生成右边栏目 for(var j = 0;j'; //判断参数是否带日期,因为从不同入口进来 //带日期是从按日期预约进来 if(window.Fx.getUrlParam('date')){ liStr += '
  • '+this.newData[k].deptName+'
  • '; }else{ liStr += '
  • '+this.newData[k].deptName+'
  • '; } } } liStr = ''; rightStr += liStr; } c('.wraplist.right').html(rightStr); c('.wraplist.right ul').eq(0).addClass('active'); } }; // var a = {hospitalId: Fx.getUrlParam("hospitalId")}; var a = {hospitalId: 1000}; hzAPI.getDataNoTemp(window.apiUrl + "?c=Index&a=deptList", a, b) })(Zepto);