Ver Fonte

删除console

lighter há 3 anos atrás
pai
commit
326da1cc38
1 ficheiros alterados com 37 adições e 39 exclusões
  1. 37 39
      src/components/reports/huanZheZhuYuanTianShu.vue

+ 37 - 39
src/components/reports/huanZheZhuYuanTianShu.vue

@@ -2,13 +2,13 @@
   <el-button @click="dialog = true">患者住院天数</el-button>
   <el-dialog v-model="dialog" title="患者住院天数">
     <el-date-picker
-        v-model="dateRange"
-        type="daterange"
-        range-separator="至"
-        start-placeholder="开始日期"
-        end-placeholder="结束日期"
-        :shortcuts="shortcuts"
-        style="width: 260px"
+      v-model="dateRange"
+      type="daterange"
+      range-separator="至"
+      start-placeholder="开始日期"
+      end-placeholder="结束日期"
+      :shortcuts="shortcuts"
+      style="width: 260px"
     ></el-date-picker>
     <el-input-number v-model="tianShu" :precision="0" @keyup.enter="dianJiChaXun"></el-input-number>
     <el-divider direction="vertical"></el-divider>
@@ -16,9 +16,9 @@
     <el-divider direction="vertical"></el-divider>
     <el-button type="primary" icon="el-icon-upload" @click="exportExcelHuanZhe">导出Excel</el-button>
     <el-table
-        :data="huanZheShuJu.data.slice((huanZheShuJu.currentPage - 1) *
-        huanZheShuJu.pageSize , huanZheShuJu.pageSize * huanZheShuJu.currentPage)"
-        :height="windowSize.h / 2.1">
+      :data="huanZheShuJu.data.slice((huanZheShuJu.currentPage - 1) * huanZheShuJu.pageSize, huanZheShuJu.pageSize * huanZheShuJu.currentPage)"
+      :height="windowSize.h / 2.1"
+    >
       <el-table-column prop="inpatientNo" label="住院号"></el-table-column>
       <el-table-column prop="name" label="姓名"></el-table-column>
       <el-table-column prop="deptName" label="科室"></el-table-column>
@@ -27,33 +27,33 @@
       <el-table-column prop="differDate" label="住院天数"></el-table-column>
     </el-table>
     <el-pagination
-        :page-size="huanZheShuJu.pageSize"
-        layout="total,  prev, pager, next"
-        :total="huanZheShuJu.data.length"
-        @current-change="handleCurrentChange"
-        :current-page="huanZheShuJu.currentPage"
+      :page-size="huanZheShuJu.pageSize"
+      layout="total,  prev, pager, next"
+      :total="huanZheShuJu.data.length"
+      @current-change="handleCurrentChange"
+      :current-page="huanZheShuJu.currentPage"
     >
     </el-pagination>
   </el-dialog>
 </template>
 
 <script>
-import {computed, ref, watch} from "vue";
-import {shortcuts} from '@/data/shortcuts'
-import {chaXunHuanZheZhuYuanJianGe} from "../../api/reports/illegal-charges-analysis";
-import {getDateRangeFormatDate} from "../../utils/date";
-import {stringIsBlank} from "../../utils/blank-utils";
-import {ElMessage} from "element-plus";
-import store from "../../store"
-import {ExcelName} from "../../utils/ExportExcel";
+import { computed, ref, watch } from 'vue'
+import { shortcuts } from '@/data/shortcuts'
+import { chaXunHuanZheZhuYuanJianGe } from '../../api/reports/illegal-charges-analysis'
+import { getDateRangeFormatDate } from '../../utils/date'
+import { stringIsBlank } from '../../utils/blank-utils'
+import { ElMessage } from 'element-plus'
+import store from '../../store'
+import { ExcelName } from '../../utils/ExportExcel'
 
 export default {
   props: {
     dateRange: {
-      default: []
-    }
+      default: [],
+    },
   },
-  name: "huanZheZhuYuanTianShu",
+  name: 'huanZheZhuYuanTianShu',
   setup(props, ctx) {
     const dialog = ref(false)
     const dateRange = ref([])
@@ -62,20 +62,18 @@ export default {
       return store.state.app.windowSize
     })
 
-
     const huanZheShuJu = ref({
       currentPage: 1,
       pageSize: 30,
-      data: []
+      data: [],
     })
 
     const dianJiChaXun = () => {
       let dateS = getDateRangeFormatDate(dateRange.value)
       if (stringIsBlank(dateS.startTime)) {
-        return ElMessage.error("请输入日期")
+        return ElMessage.error('请输入日期')
       }
       chaXunHuanZheZhuYuanJianGe(dateS.startTime, dateS.endTime, tianShu.value).then((res) => {
-        console.log(res)
         huanZheShuJu.value.data = res
         huanZheShuJu.value.currentPage = 1
       })
@@ -97,10 +95,12 @@ export default {
       ExcelName(huanZheShuJu.value.data, title)
     }
 
-    watch(() => props.dateRange, () => {
-      dateRange.value = props.dateRange
-    })
-
+    watch(
+      () => props.dateRange,
+      () => {
+        dateRange.value = props.dateRange
+      }
+    )
 
     return {
       dialog,
@@ -111,12 +111,10 @@ export default {
       huanZheShuJu,
       windowSize,
       handleCurrentChange,
-      exportExcelHuanZhe
+      exportExcelHuanZhe,
     }
-  }
+  },
 }
 </script>
 
-<style scoped>
-
-</style>
+<style scoped></style>