index.js 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. // 慢阻肺患者档案表格组件
  2. var template = ''
  3. $.ajax('../../../component/statistics/jtbcTablePage/index.html', {
  4. data: {},
  5. dataType: 'html',
  6. cache: false,
  7. timeout: 60000,
  8. async: false,
  9. error: function (res) {},
  10. success: function (res) {
  11. template = res
  12. }
  13. })
  14. Vue.component('jtbc-table-page', {
  15. template: template,
  16. props: [],
  17. data() {
  18. return {
  19. show1: true,
  20. show2: false,
  21. show3: false,
  22. show4: false,
  23. show5: false,
  24. currentSize:50,
  25. currentPage: 1,
  26. totalCount: 0,
  27. docInfo: JSON.parse(window.localStorage.getItem('docInfo')),
  28. daLoading:false,
  29. dataList: [
  30. ],
  31. // show1
  32. name: '',
  33. // show2 || show4
  34. obj2: {name: '1', way: '1', toHospital: '1', cost: '2'},
  35. toHospitalOptions: [{value: '1', code: '1'}],
  36. // show3
  37. obj3: { name: '123', doctorName: '456' },
  38. // show5
  39. obj5: {organization: '1', name: '1'}
  40. }
  41. },
  42. mounted() {
  43. var vm = this
  44. EventBus.$on('jtbc-table-page', function (obj) {
  45. vm.show1 = false
  46. vm.show2 = false
  47. vm.show3 = false
  48. vm.show4 = false
  49. vm.show5 = false
  50. if (obj.id == 71) vm.show1 = true
  51. else if (obj.id == 72) vm.show2 = true
  52. else if (obj.id == 73) vm.show3 = true
  53. else if (obj.id == 74) vm.show4 = true
  54. if (obj.id == 75) vm.show5 = true
  55. })
  56. },
  57. destroyed() {
  58. // EventBus.$off('jtbc-table-page')
  59. },
  60. methods: {
  61. handleCurrentChange:function(val) {
  62. console.log(val)
  63. },
  64. }
  65. })