123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162 |
- var template = ''
- $.ajax('../../../component/statistics/Referral/index.html', {
- data: {},
- dataType: 'html',
- cache: false,
- timeout: 60000,
- async: false,
- error: function (res) {},
- success: function (res) {
- template = res
- }
- })
- Vue.component('referral', {
- template: template,
- props: [],
- data: function () {
- return {
- years: [],
- yearType: '1',
- chooseYear: null,
- chooseTime: null,
- turnOverOptions: [],
- form: {
- turnOver: ""
- },
- tableData: [],
- tableHeader: [
- { label: '住院号', prop: 'visitNo' },
- { label: '病人姓名', prop: 'patientName' },
- { label: '性别', prop: 'sex' },
- { label: '年龄', prop: 'age' },
- { label: '建床诊断', prop: 'diagnoseName' },
- { label: '建床日期', prop: 'buildingDate', width: '140' },
- { label: '建床天数', prop: 'buildingDays' },
- { label: '撤床日期', prop: 'withdrawalTime', width: '140' },
- { label: '撤床诊断', prop: 'sickOutDiagnoseName' },
- { label: '转归情况', prop: 'turnOver' }
- ],
- dialogShow: false,
- info: {},
- page: 1,
- size: 10,
- total: 0,
- loading: false,
- exportLoading: false,
- sexDict: {
- 1: '男',
- 2: '女'
- },
- turnOverObj: {}
- }
- },
- 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/getFamilyBedWithdrawalStatistics', { 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
- 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/exportGetFamilyBedWithdrawalStatistics', fileName, params).then(function () {
- vm.exportLoading = false
- })
- },
- eliminateClick() {
- this.form = {
- turnOver: ""
- }
- this.yearType = '1'
- this.chooseYear = new Date().getFullYear()
- this.chooseTime = null
- },
- closeDialog() {
- this.dialogShow = false
- },
- previewRecord(row) {
- var vm = this
- this.dialogShow = true
- httpRequest.get('doctor/familyBed/findBedWithdrawal', { data: { bedRecordCode: row.code } }).then(function (res) {
- vm.info = res.data
- })
- },
- getDictData() {
- var vm = this
- statisticAPI.getDictByDictName({ name: 'jkcopd_disease_conversion' }).then(function (res) {
- vm.turnOverOptions = [{ value: '全部', code:"" }]
- vm.turnOverOptions = vm.turnOverOptions.concat(res.list)
- for (var item of res.list) {
- vm.turnOverObj[item.code] = item.value
- }
- })
- },
- handleCurrentChange(val) {
- this.page = val
- this.getList()
- },
- handleSizeChange(val) {
- this.size = val
- this.getList()
- },
- getImgUrl(url) {
- return httpRequest.getImgUrl(url)
- }
- },
- mounted() {
- this.initTime()
- this.getDictData()
- this.getList()
- }
- })
|