// 慢阻肺患者档案表格组件 var template = '' $.ajax('../../../component/statistics/jtbcTablePage/index.html', { data: {}, dataType: 'html', cache: false, timeout: 60000, async: false, error: function (res) {}, success: function (res) { template = res } }) Vue.component('jtbc-table-page', { template: template, props: [], data() { return { show1: true, show2: false, show3: false, show4: false, show5: false, currentSize:50, currentPage: 1, totalCount: 0, docInfo: JSON.parse(window.localStorage.getItem('docInfo')), daLoading:false, dataList: [ ], // show1 name: '', // show2 || show4 obj2: {name: '1', way: '1', toHospital: '1', cost: '2'}, toHospitalOptions: [{value: '1', code: '1'}], // show3 obj3: { name: '123', doctorName: '456' }, // show5 obj5: {organization: '1', name: '1'} } }, mounted() { var vm = this EventBus.$on('jtbc-table-page', function (obj) { vm.show1 = false vm.show2 = false vm.show3 = false vm.show4 = false vm.show5 = false if (obj.id == 71) vm.show1 = true else if (obj.id == 72) vm.show2 = true else if (obj.id == 73) vm.show3 = true else if (obj.id == 74) vm.show4 = true if (obj.id == 75) vm.show5 = true }) }, destroyed() { // EventBus.$off('jtbc-table-page') }, methods: { handleCurrentChange:function(val) { console.log(val) }, } })