Bläddra i källkod

门诊特殊病统计

hsh 2 år sedan
förälder
incheckning
06816d193d

+ 47 - 0
src/api/reports/high-report.js

@@ -0,0 +1,47 @@
+import request from '../../utils/request'
+import { ElMessage, ElMessageBox } from 'element-plus'
+import { downloadExcel } from '@/utils/excel'
+
+// 查询菜单报表
+export function selectReportPortalMenu(data) {
+    return request({
+        url: '/highReport/selectReportPortalMenu',
+        method: 'post',
+        data,
+    })
+}
+
+export function exportReportPortalData(params) {
+    ElMessageBox.prompt('导出文件名字', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        inputPattern: /\S/,
+        inputErrorMessage: '文件名不能为空 (∩•̀ω•́)⊃-*⋆',
+    }).then(({ value }) => {
+        const data = {
+            param: params,
+            url: '/highReport/exportReportPortalData',
+            fileName: value + '.xlsx',
+        }
+        setTimeout(() => {
+            downloadExcel(data)
+        }, 500)
+    }).catch((res) => {
+        if (res.code === '0') {
+            ElMessage({
+                message: res === null ? '导出excel成功!' : res.message,
+                type: 'success',
+                duration: 2000,
+                showClose: true,
+            })
+        } else {
+            ElMessage({
+                message: res === null ? '导出excel失败!' : res.message,
+                type: 'warning',
+                duration: 3000,
+                showClose: true,
+            })
+        }
+    })
+
+}

+ 5 - 0
src/router/modules/dashboard.js

@@ -344,6 +344,11 @@ const route = [
                 component: createNameComponent(() => import('@/views/reports/OutpatientCoordination.vue')),
                 meta: {title: '门诊统筹统计', icon: 'iconfont icon-menzhenteshubingdingdianbiangeng2'},
             },
+            {
+                path: 'mzSpecialDisease',
+                component: createNameComponent(() => import('@/views/reports/MzSpecialDisease.vue')),
+                meta: {title: '门诊特殊病统计', icon: 'iconfont icon-menzhenteshubingdingdianbiangeng2'},
+            },
         ],
     },
     {

+ 1 - 1
src/views/medical-insurance/statistical/ClnTimesAvg.vue

@@ -112,7 +112,7 @@
     </el-dialog>
 </template>
 
-<script>
+<script >
 import PageLayer from "@/layout/PageLayer";
 import { reactive, ref } from '@vue/reactivity'
 import store from '@/store'

+ 1 - 1
src/views/medical-insurance/statistical/CssybBzTj.vue

@@ -139,7 +139,7 @@
   </el-dialog>
 
 </template>
-<script>
+<script >
 import { reactive, ref } from '@vue/reactivity'
 import store from '@/store'
 import { clone } from '@/utils/clone'

+ 100 - 0
src/views/reports/MzSpecialDisease.vue

@@ -0,0 +1,100 @@
+<template>
+    <page-layer>
+        <template #header>
+            <el-date-picker v-model="dateRange" type="daterange" range-separator="至" start-placeholder="开始日期"
+                end-placeholder="结束日期" :shortcuts="shortcuts"> </el-date-picker>
+            <el-input v-model="ill" clearable style="width: 220px" placeholder="请输入关键字">
+                <template #prepend>诊断</template>
+            </el-input>
+            <el-button type="primary" icon="Search" @click="query" style="margin-left: 5px">查询</el-button>
+            <el-button type="primary" icon="Download" @click="exportData" style="margin-left: 5px">导出</el-button>
+        </template>
+        <template #main>
+            <xc-table :data="returnData" localPaging :height="105">
+                <el-table-column type="index" label="序号" align="center"></el-table-column>
+                <template v-for="col in returnData.tableDisplays">
+                    <el-table-column v-if="col.sortable" :prop="col.prop" :label="col.label" :width="col.width"
+                        :align="col.align" sortable show-overflow-tooltip>
+                    </el-table-column>
+                    <el-table-column v-else :prop="col.prop" :label="col.label" :width="col.width" :align="col.align"
+                        show-overflow-tooltip>
+                    </el-table-column>
+                </template>
+            </xc-table>
+        </template>
+    </page-layer>
+</template>
+<script setup name="MzSpecialDisease">
+import PageLayer from '@/layout/PageLayer.vue'
+import { reactive, ref } from '@vue/reactivity'
+import { shortcuts, clockinShortcuts } from '@/data/shortcuts'
+import { formatDate, getDateRangeFormatDate } from '@/utils/date'
+import { selectReportPortalMenu, exportReportPortalData } from '@/api/reports/high-report'
+import XcTable from '@/components/xc/xc-table/XcTable.vue'
+
+const start = formatDate(clockinShortcuts[1].value[0]);
+const end = formatDate(clockinShortcuts[1].value[1]);
+const ill = ref('');
+const queryTerm = reactive({
+    startTime: "",
+    endTime: "",
+    diagn: "",
+    reportId: "mz_tsb",
+    menuId: "118",
+    type: "1",
+});
+onMounted(() => {
+    queryTerm.startTime = start;
+    queryTerm.endTime = end + " 23:59:59";
+    dateRange.value = [start, end];
+    queryTerm.diagn = ill.value;
+    query();
+});
+const dateRange = ref([]);
+const returnData = ref({
+    currentPage: 1,
+    pageSize: 30,
+    total: 0,
+    data: []
+});
+
+const query = async () => {
+    if (dateRange.value) {
+        let dateS = getDateRangeFormatDate(dateRange.value);
+        queryTerm.startTime = dateS.startTime;
+        queryTerm.endTime = dateS.endTime;
+        queryTerm.diagn = ill.value;
+    }
+    else {
+        queryTerm.startTime = start;
+        queryTerm.endTime = end;
+        queryTerm.diagn = ill.value;
+        ElMessage({
+            type: "info",
+            message: "默认查询本月的数据",
+            duration: 2500,
+            showClose: true,
+        });
+    }
+    selectReportPortalMenu(queryTerm)
+        .then((res) => {
+            returnData.value.tableDisplays = res.tableDisplays
+            returnData.value.data = res.dataList
+            returnData.value.total = returnData.value.data.length
+        });
+};
+const exportData = () => {
+    if (returnData.value.data.length <= 0) {
+        ElMessage({
+            message: '没有可以导出的数据!',
+            type: 'warning',
+            duration: 2500,
+            showClose: true,
+        })
+    }
+    queryTerm.diagn = ill.value;
+    // 导出excel表格标题
+    queryTerm.exportName = '门诊特殊病统计';
+    exportReportPortalData(queryTerm)
+}
+</script>

+ 1 - 1
src/views/reports/OutpatientCoordination.vue

@@ -30,7 +30,7 @@
     </template>
   </page-layer>
 </template>
-<script>
+<script >
 import { reactive, ref } from '@vue/reactivity'
 import { formatMonth1 } from '@/utils/date'
 import { ElMessage } from 'element-plus'