var template = '' $.ajax('../../../component/statistics/BedCheck/index.html', { data: {}, dataType: 'html', cache: false, timeout: 60000, async: false, error: function (res) {}, success: function (res) { template = res } }) Vue.component('bed-check', { template: template, props: [], data: function () { return { years: [], yearType: '1', chooseYear: null, chooseTime: null, form: {}, tableData: [], tableHeader: [ {label: '住院号',prop: 'a'}, {label: '患者姓名',prop: 'b'}, {label: '性别',prop: 'c'}, {label: '年龄',prop: 'd'}, {label: '建床日期',prop: 'a'}, {label: '计划查床时间',prop: 'a'}, {label: '完成时间',prop: 'a'}, {label: '查床人员',prop: 'a'}, {label: '服务内容',prop: 'a'}, ], dialogShow: true, info: { name:'黄小蕾', sex: '1', age: '60岁', zhuyuan: '38593246', phone: '12223456789', checkTime: '2024-04-09 10:00:00', serviceContent: '上门服务', }, } }, methods: { initTime() { var vm = this var now = new Date() vm.nowyear = vm.chooseYear = now.getFullYear() vm.years = [] for (i = vm.nowyear; i >= 2013; i--) { vm.years.push(i) } }, queryDate(){}, exportTable(){}, eliminateClick(){ this.turnStatus = null this.name = "" this.yearType = '1' this.chooseYear = new Date().getFullYear() this.chooseTime = null }, closeDialog(){ this.dialogShow = false }, previewRecord(row){ this.dialogShow = true } }, mounted() { this.initTime() } })