appoint-country.js 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. Vue.component('appoint-country', {
  2. template:
  3. '<div>\
  4. <div class="c-f16 c-border-b pb5 ui-grid middle search-wrapper">\
  5. <div>社区服务中心&emsp;&emsp;</div>\
  6. <div class=" ml30" id="search"><input class="h34 " v-model="keyword" @keyup.enter="searchItem" placeholder="请输入社区名称查询"/><span @click="searchItem"></span></div>\
  7. </div>\
  8. <ul class="clearfix">\
  9. <li v-for="(list, index) in country">\
  10. <a href="javascript: void(0)" :title="list.address" @click="selCountry(list)">{{list.address}}</a>\
  11. </li>\
  12. </ul>\
  13. </div>',
  14. props: ['country'],
  15. data: function () {
  16. return {
  17. keyword: ''
  18. }
  19. },
  20. mounted: function () {},
  21. watch: {
  22. keyword: function (i) {
  23. // this.$parent.initTypeof(2,i)
  24. }
  25. },
  26. methods: {
  27. selCountry: function (list) {
  28. var str = JSON.stringify(list)
  29. var content =
  30. '../../jbsc/html/appointment/appoint-doctor-detail.html?hospital=' +
  31. encodeURIComponent(str) +
  32. '&patient=' +
  33. patient +
  34. '&callCode=' +
  35. callCode
  36. if (backToSynergy) {
  37. content += '&backToSynergy=1'
  38. }
  39. top.layer.open({
  40. type: 2,
  41. title: false,
  42. area: ['800px', '90%'],
  43. content: content
  44. })
  45. closeLayer()
  46. },
  47. searchItem: function () {
  48. this.$parent.initTypeof(2, this.keyword)
  49. }
  50. }
  51. })