123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- Vue.component('nav-tab', {
- template: '<div style="padding-top: 10px;">\
- <div class="ml20 mr20">\
- <div class="ui-grid" style="align-items: center;">\
- <label class="title c-999 c-f14">病种:</label>\
- <div class="ui-col-1 downList" @click="setDownList">\
- <p class="m0 p0 plr10 c-border cur-pit downList-value c-border-all">{{downListName}}</p>\
- <ul v-if="showDownList" class="m0 p0 c-border-b c-border-l c-border-r c-position-a downList-inner" style="overflow-y: auto; height: 100px;">\
- <li class="plr10 c-border-t cur-pit" v-for="(o, i) in diseaseList" @click.stop="selectDisease(o, i)">{{o.typeName}}</li>\
- </ul>\
- </div>\
- </div>\
- <div class="ui-grid" style="align-items: center;">\
- <label class="title c-999 c-f14">模板:</label>\
- <div class="search-warp ui-col-1">\
- <input class="inp-search" placeholder="请输入康复指导名称查询" v-model="searchKey" @input="onSearch"/>\
- </div>\
- </div>\
- </div>\
- <div>\
- <guidance-template-panel ref="guidanceTemplatePanel" :activetemplate="activetemplate"></guidance-template-panel>\
- </div>\
- </div>',
- 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});
- }
- })
- },
- }
- })
|