appoint-hospital.js 2.1 KB

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