| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163 | var template = ''$.ajax('../../../component/statistics/PlanService/index.html', {  data: {},  dataType: 'html',  cache: false,  timeout: 60000,  async: false,  error: function (res) {},  success: function (res) {    template = res  }})Vue.component('plan-service', {  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', width: '140' },        { label: '查床周期', prop: 'checkBedCircleName' },        { label: '查床开始日期', prop: 'checkTime' },        { label: '查床人员', prop: 'doctorName' }      ],      dialogShow: false,      planList: [        { checkTime: '2024-11-01 9:30', patientName: '黄小蕾', checkPlanStatusName: '计划中', color: '#0099ff' },        { checkTime: '2024-11-02 9:30', patientName: '黄小蕾', checkPlanStatusName: '已完成', color: '#099d09' },        { checkTime: '2024-11-03 9:30', patientName: '黄小蕾', checkPlanStatusName: '计划超时', color: '#ff0000' },        { checkTime: '2024-11-04 9:30', patientName: '黄小蕾', checkPlanStatusName: '计划中', color: '#0099ff' }      ],      page: 1,      size: 10,      total: 0,      loading: false,      exportLoading: false    }  },  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/getFamilyBedRecordPlanStatistics', { 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/exportGetFamilyBedRecordPlanStatistics', 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      vm.planList = []      httpRequest.get('doctor/familyBed/findBedCheckPlanList', { data: { bedRecordCode: row.code,bedTeamId:row.adminTeamId } }).then(function (res) {        vm.planList = res.data      })    },    handleCurrentChange(val) {      this.page = val      this.getList()    },    handleSizeChange(val) {      this.size = val      this.getList()    },    getStatusTextColor: function (status) {      switch (status) {        case '0':          return 'c-ff5e6c'        case '1':          return 'c-17b3ec'        case '2':          return 'c-20d7ad'      }    },    getStatusCircleColor: function (status) {      switch (status) {        case '0':          return 'bg-ff5e6c'        case '1':          return 'bg-17b3ec'        case '2':          return 'bg-20d7ad'      }    },  },  mounted() {    this.initTime()    this.getList()  }})
 |