12345678910111213141516171819202122232425262728293031323334353637 |
- Vue.component('appoint-doptroon', {
- template:
- '<div>\
- <div class="c-f16 c-border-b pb5 ui-grid middle search-wrapper">\
- <div>科  室  </div>\
- <div class=" ml30" id="search"><input class="h34 " v-model="keyword" @keyup.enter="searchItem" placeholder="请输入科室名称查询"/><span @click="searchItem"></span></div>\
- </div>\
- <ul class="clearfix">\
- <li class="w138 fl mb10 h28" v-for="(list, index) in doptroon">\
- <a v-show="ind != index" class="h28" href="javascript:void(0)" :title="list.name" @click="selDoptroon(index, list)">{{list.name}}</a>\
- <a v-show="ind == index" class="h28 active" href="javascript:void(0)" :title="list.name" @click="selDoptroon(index, list)">{{list.name}}</a>\
- </li>\
- </ul>\
- </div>',
- props: ['doptroon'],
- data: function () {
- return {
- ind: null,
- keyword: ''
- }
- },
- watch: {
- keyword: function (i) {
- // this.$parent.initData(i)
- }
- },
- mounted: function () {},
- methods: {
- selDoptroon: function (index, list) {
- this.ind = index
- this.$emit('seldoptroon', list)
- },
- searchItem: function () {
- this.$parent.initData(this.keyword)
- }
- }
- })
|