appoint-hospital.js 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. Vue.component('appoint-hospital', {
  2. template:
  3. '<div>\
  4. <div class="c-f16 c-border-b pb5 ui-grid middle search-wrapper">\
  5. <div>医&emsp;&emsp;院&emsp;&emsp;</div>\
  6. <div class="ml30" id="search"><input class="h34" v-model="HosKeyword" @keyup.enter="searchItem" placeholder="请输入医院名称查询"/><span @click="searchItem"></span></div>\
  7. </div>\
  8. <ul class="clearfix">\
  9. <li v-for="(list, index) in hospital">\
  10. <a href="javascript:void(0)" :title="list.address" @click="selHospital(list)">{{list.address}}<span class="col-999" v-show="list.level">(</span><span class="col-red" v-show="list.level">{{list.level}}</span><span class="col-999" v-show="list.level">)</span></a>\
  11. </li>\
  12. <li>\
  13. <div v-if="hospital.length<2" style="border: 1px solid #12b7f5;color:#12b7f5 ;width:200px;text-align: center;cursor: pointer" @click="moreHospital">更多医院</div>\
  14. </li>\
  15. </ul>\
  16. </div>',
  17. props: ['hospital'],
  18. data: function () {
  19. return {
  20. HosKeyword: '',
  21. docHospitalName: ''
  22. }
  23. },
  24. mounted: function () {
  25. this.docHospitalName = JSON.parse(sessionStorage.getItem('LoginUser')).hospitalName
  26. },
  27. watch: {
  28. HosKeyword: function (i) {}
  29. },
  30. methods: {
  31. selHospital: function (list) {
  32. var str = JSON.stringify(list)
  33. var content =
  34. '../../jbsc/html/appointment/appoint-doctor-detail.html?hospital=' +
  35. encodeURIComponent(str) +
  36. '&patient=' +
  37. patient +
  38. '&callCode=' +
  39. callCode
  40. if (backToSynergy) {
  41. content += '&backToSynergy=1'
  42. }
  43. console.log('11111111111111111111111111', patient)
  44. top.layer.open({
  45. type: 2,
  46. title: false,
  47. area: ['800px', '90%'],
  48. content: content
  49. })
  50. closeLayer()
  51. },
  52. moreHospital() {
  53. this.$parent.initTypeof(1, '')
  54. },
  55. searchItem: function () {
  56. this.$parent.initTypeof(1, this.HosKeyword)
  57. }
  58. }
  59. })