Vue.component('nav-tab', { template: '
\
\
\ \
\

{{downListName}}

\
    \
  • {{o.typeName}}
  • \
\
\
\
\ \
\ \
\
\
\
\ \
\
', props: [], data: function() { return { activetemplate: null, isLeader: storage.docInfo.isLeader, searchKey:'', diseaseList: [{type:'', typeName: '全部'}], downListName: '全部', downListValue: '', showDownList: false } }, mounted: function() { var vm = this EventBus.$on('active-template', function(template) { vm.activetemplate = template }) this.$refs.guidanceTemplatePanel.debounceTempList(vm.downListValue,vm.searchKey) this.selectType() }, methods: { onSearch: function(){ var vm = this this.$refs.guidanceTemplatePanel.debounceTempList(vm.downListValue,vm.searchKey) }, selectDisease: function(o, i){ var vm = this this.downListName = o.typeName this.downListValue = o.type this.showDownList = false this.$refs.guidanceTemplatePanel.debounceTempList(vm.downListValue,vm.searchKey) }, setDownList: function(){ this.showDownList = !this.showDownList }, // 获取十大病种字典 selectType: function(){ var vm=this; var params={ } rehaAPI.selectType(params).then(function(res){ if(res.status==200){ vm.diseaseList = vm.diseaseList.concat(res.data) }else{ layer.msg(res.msg,{icon:5}); } }) }, } })