123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171 |
- 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: 'visitNo' },
- { label: '患者姓名', prop: 'patientName' },
- { label: '性别', prop: 'sex' },
- { label: '年龄', prop: 'age' },
- { label: '建床日期', prop: 'buildingTime' },
- { label: '计划查床时间', prop: 'checkTime' },
- { label: '完成时间', prop: 'checkDate' },
- { label: '查床人员', prop: 'doctorName' },
- { label: '服务内容', prop: 'diseaseCondition' }
- ],
- dialogShow: false,
- info: {
- name: '黄小蕾',
- sex: '1',
- age: '60岁',
- zhuyuan: '38593246',
- phone: '12223456789',
- checkTime: '2024-04-09 10:00:00',
- serviceContent: '上门服务'
- },
- page: 1,
- size: 10,
- total: 0,
- loading: false,
- exportLoading: false,
- sexDict: {
- 1: '男',
- 2: '女'
- },
- serviceList: {}
- }
- },
- 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,
- status: 1
- }
- 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/getFamilyBedPlanStatistics', { 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/exportGetFamilyBedPlanStatistics', fileName, params).then(function () {
- vm.exportLoading = false
- })
- },
- eliminateClick() {
- this.form = {}
- 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/findCheckPlanDetail', { data: {id: row.id} }).then(function (res) {
- if (res.status == 200) {
- vm.info = res.data
- if (res.data.planDoctorList) {
- vm.info.planDoctor = res.data.planDoctorList.map(function(item){return item.doctorName}).join(',')
- }
- if (res.data.signWay) {
- vm.info.signMethod = res.data.signWay == 1 ? '定位签到' : '拍照签到'
- }
- console.log(vm.info,"info");
-
- }
- })
- },
- handleCurrentChange(val) {
- this.page = val
- this.getList()
- },
- handleSizeChange(val) {
- this.size = val
- this.getList()
- },
- getDictData() {
- var vm = this
- statisticAPI.getDictByDictName({ name: 'IV_FAMILY_BED_SERVICE_TYPE' }).then(function (res) {
- for(var item of res.list){
- vm.serviceList[item.code] = item.value
- }
- })
- }
- },
- mounted() {
- this.initTime()
- this.getList()
- this.getDictData()
- }
- })
|