123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135 |
- var template = ''
- $.ajax('../../../component/statistics/BuildBed/index.html', {
- data: {},
- dataType: 'html',
- cache: false,
- timeout: 60000,
- async: false,
- error: function (res) {},
- success: function (res) {
- template = res
- }
- })
- Vue.component('build-bed', {
- template: template,
- props: [],
- data: function () {
- return {
- years: [],
- yearType: '1',
- chooseYear: null,
- chooseTime: null,
- form: {},
- tableData: [],
- tableHeader: [
- { label: '病人姓名', prop: 'patientName', width: '90' },
- { label: '性别', prop: 'sex',width: '80' },
- { label: '年龄', prop: 'age',width:'80' },
- { label: '手机号', prop: 'mobile',width: '130' },
- { label: '身份证号', prop: 'idcard',width: '170' },
- { label: '住院号', prop: 'visitNo',width: '110' },
- { label: '护理等级', prop: 'sickTendLevelName',width: '110' },
- { label: '病情', prop: 'sickStateName',width: '110' },
- { label: '主诊断', prop: 'sickDiagnoseCodeName',width: '110' },
- { label: '责任医师', prop: 'adminVisitOperatorName',width: '90' },
- { label: '上级医师', prop: 'upperOperatorName',width: '90' },
- { label: '主营护士', prop: 'adminTendOperatorName',width: '90' },
- { label: '床位名称', prop: 'sickBedName' ,width: '110'},
- { label: '建床时间', prop: 'buildingTime',width: '160' }
- ],
- page: 1,
- size: 10,
- total: 0
- }
- },
- 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)
- }
- },
- getList() {
- var vm = this
- this.loading = true
- var params = {
- ...this.form,
- page: this.page,
- pageSize: this.size
- }
- if (this.yearType == '1') {
- params.startDate = this.chooseYear + '-01-01 00:00'
- params.endDate = this.chooseYear + '-12-31 23:59'
- } else {
- if (this.chooseTime) {
- params.startDate = this.chooseTime[0] + ' 00:00'
- params.endDate = this.chooseTime[1] + ' 23:59'
- }
- }
- httpRequest.get('statistics/bed/getFamilyBedRecord', { data: params }).then(function (res) {
- if (res.status == 200) {
- vm.tableData = res.detailModelList
- vm.total = res.totalCount
- }
- vm.loading = false
- })
- },
- queryDate() {
- this.page = 1
- this.getList()
- },
- exportTable() {
- var vm = this
- this.loading = true
- var params = {
- ...this.form,
- page: this.page,
- pageSize: this.size
- }
- if (this.yearType == '1') {
- params.startDate = this.chooseYear + '-01-01 00:00'
- params.endDate = this.chooseYear + '-12-31 23:59'
- } else {
- if (this.chooseTime) {
- params.startDate = this.chooseTime[0] + ' 00:00'
- params.endDate = this.chooseTime[1] + ' 23:59'
- }
- }
- this.exportLoading = true
- var fileName = `建床人数${new Date().getTime()}.xls`
- httpRequest.downLoadFileForAjax('statistics/bed/exportGetFamilyBedRecord', fileName, params).then(function () {
- vm.exportLoading = false
- })
- },
- eliminateClick() {
- this.yearType = '1'
- this.chooseYear = new Date().getFullYear()
- this.chooseTime = null
- this.form = {}
- },
- closeDialog() {
- this.dialogShow = false
- },
- previewRecord(row) {
- this.dialogShow = true
- },
- handleCurrentChange(val) {
- this.page = val
- this.getList()
- },
- handleSizeChange(val) {
- this.size = val
- this.getList()
- }
- },
- mounted() {
- this.initTime()
- this.getList()
- }
- })
|