瀏覽代碼

Merge branch 'master' into 'master'

新增门诊统筹人数统计

See merge request lighter/vue-intergration-platform!21
huangshuhua 2 年之前
父節點
當前提交
6b85a603ff

+ 10 - 0
src/api/ybkf/yb-mztc.js

@@ -0,0 +1,10 @@
+import request from '../../utils/request'
+
+// 门诊统筹
+export function selectOutpatientCoordination(month) {
+    return request({
+        url: '/outpatientCoordination/selectOutpatientCoordination',
+        method: 'get',
+        params: { month },
+    })
+}

+ 7 - 3
src/icons/iconfont.css

@@ -1,8 +1,8 @@
 @font-face {
   font-family: "iconfont"; /* Project id 2473230 */
-  src: url('iconfont.woff2?t=1664419404679') format('woff2'),
-       url('iconfont.woff?t=1664419404679') format('woff'),
-       url('iconfont.ttf?t=1664419404679') format('truetype');
+  src: url('iconfont.woff2?t=1666142029173') format('woff2'),
+       url('iconfont.woff?t=1666142029173') format('woff'),
+       url('iconfont.ttf?t=1666142029173') format('truetype');
 }
 
 .iconfont {
@@ -13,6 +13,10 @@
   -moz-osx-font-smoothing: grayscale;
 }
 
+.icon-menzhenrenci:before {
+  content: "\e6ff";
+}
+
 .icon-xuetang:before {
   content: "\e622";
 }

二進制
src/icons/iconfont.ttf


二進制
src/icons/iconfont.woff


二進制
src/icons/iconfont.woff2


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

@@ -329,6 +329,11 @@ const route = [
                 component: createNameComponent(() => import('@/views/reports/InpatientAddrAnalyze.vue')),
                 meta: {title: '住院患者分布', icon: 'iconfont icon-menzhenteshubingdingdianbiangeng2'},
             },
+            {
+                path: 'outpatientCoordination',
+                component: createNameComponent(() => import('@/views/reports/OutpatientCoordination.vue')),
+                meta: {title: '门诊统筹统计', icon: 'iconfont icon-menzhenrenci'},
+            },
         ],
     },
     {

+ 10 - 1
src/utils/date.js

@@ -1,4 +1,4 @@
-import {stringIsBlank} from '@/utils/blank-utils'
+import { stringIsBlank } from '@/utils/blank-utils'
 import moment from 'moment'
 
 export function getDate() {
@@ -180,3 +180,12 @@ export function getLastMonth() {
   }
   return year + '-' + ('0' + month).slice(-2)
 }
+
+export function formatMonth1(date) {
+  if (typeof date === 'undefined') return null
+  if (date === '' || date === null) return null
+  if (typeof date === 'string') return date
+  const year = date.getFullYear()
+  const month = date.getMonth() + 1
+  return year + ('0' + month).slice(-2)
+}

+ 74 - 0
src/views/reports/OutpatientCoordination.vue

@@ -0,0 +1,74 @@
+<template>
+  <el-container>
+    <el-header height="35px" style="margin-top: 5px">
+      <el-date-picker v-model="queryTerm.month" :clearable="false" placeholder="请选择" style="width: 160px" type="month"></el-date-picker>
+      <el-button type="primary" icon="Search" @click="query" style="margin-left: 5px">查询</el-button>
+    </el-header>
+    <el-main>
+      <el-table :data="returnData.resultData" :height="tableHeight" stripe highlight-current-row>
+        <el-table-column type="expand">
+          <template #default="props">
+            <el-table :data="props.row.children" v-show="props.row.isChildren">
+              <template v-for="(col, index) in returnData.headTitle" :key="index">
+                <el-table-column v-if="col.prop === 'item'" :prop="col.prop" :label="col.label" fixed width="140"></el-table-column>
+                <el-table-column v-else-if="col.prop === 'total'" :prop="col.prop" :label="col.label" fixed></el-table-column>
+                <el-table-column v-else :prop="col.prop" :label="col.label"></el-table-column>
+              </template>
+            </el-table>
+          </template>
+        </el-table-column>
+        <template v-for="(col, index) in returnData.headTitle" :key="index">
+          <el-table-column v-if="col.prop === 'item'" :prop="col.prop" :label="col.label" fixed width="140"></el-table-column>
+          <el-table-column v-else-if="col.prop === 'total'" :prop="col.prop" :label="col.label" fixed></el-table-column>
+          <el-table-column v-else :prop="col.prop" :label="col.label"></el-table-column>
+        </template>
+      </el-table>
+    </el-main>
+  </el-container>
+</template>
+<script>
+import { reactive, ref } from '@vue/reactivity'
+import { formatMonth1 } from '@/utils/date'
+import { ElMessage } from 'element-plus'
+import store from '@/store'
+import { selectOutpatientCoordination } from '@/api/ybkf/yb-mztc'
+
+export default {
+  setup() {
+    const windowSize = store.state.app.windowSize
+    const tableHeight = windowSize.h / 1.1
+
+    const queryTerm = reactive({
+      month: formatMonth1(new Date()),
+    })
+
+    const returnData = ref([])
+    const query = () => {
+      if (queryTerm.month) {
+        queryTerm.month = formatMonth1(queryTerm.month)
+      } else {
+        ElMessage({
+          type: 'info',
+          message: '默认查询当天的数据',
+          duration: 2500,
+          showClose: true,
+        })
+      }
+      selectOutpatientCoordination(queryTerm.month)
+        .then((res) => {
+          returnData.value = res
+        })
+        .catch(() => {
+          returnData.value = []
+        })
+    }
+
+    return {
+      queryTerm,
+      returnData,
+      tableHeight,
+      query,
+    }
+  },
+}
+</script>