|
|
@@ -2,8 +2,31 @@
|
|
|
<div class="layout_container">
|
|
|
<header style="padding: 12px 0 0 4px">
|
|
|
住院号:
|
|
|
- <el-input style="width: 120px" v-model="patNo" clearable/>
|
|
|
+ <el-input style="width: 100px" v-model="patNo" clearable/>
|
|
|
<el-button @click="queryClick(null)">查询</el-button>
|
|
|
+
|
|
|
+ <el-dropdown
|
|
|
+ trigger="click"
|
|
|
+ @command="exportExcel"
|
|
|
+ style="margin-left: 12px"
|
|
|
+ >
|
|
|
+ <el-button type="primary">
|
|
|
+ 导出Excel
|
|
|
+ <el-icon>
|
|
|
+ <ArrowDown/>
|
|
|
+ </el-icon>
|
|
|
+ </el-button>
|
|
|
+ <template #dropdown>
|
|
|
+ <el-dropdown-menu>
|
|
|
+ <el-dropdown-item command="1week">近一周</el-dropdown-item>
|
|
|
+ <el-dropdown-item divided command="1month">近一月</el-dropdown-item>
|
|
|
+ <el-dropdown-item divided command="3months">近三月</el-dropdown-item>
|
|
|
+ <el-dropdown-item divided command="6months">近半年</el-dropdown-item>
|
|
|
+ <el-dropdown-item divided command="1year">近一年</el-dropdown-item>
|
|
|
+ </el-dropdown-menu>
|
|
|
+ </template>
|
|
|
+ </el-dropdown>
|
|
|
+
|
|
|
<span style="margin-left: 12px; color: #8e8e8e">
|
|
|
提示:
|
|
|
<span style="font-weight: bold;color: #727272">双击</span>
|
|
|
@@ -23,12 +46,13 @@
|
|
|
|
|
|
<script setup>
|
|
|
import {huanZheXinXi, onChangePatient} from "@/views/hospitalization/zhu-yuan-yi-sheng/public-js/zhu-yuan-yi-sheng";
|
|
|
-import {getCriticalValues, handleZyCriticalValue} from "@/api/zhu-yuan-yi-sheng/critical-value";
|
|
|
+import {getCriticalValues, handleZyCriticalValue, getExportCriticalValues} from "@/api/zhu-yuan-yi-sheng/critical-value";
|
|
|
import XcTable from "@/components/xiao-chan/xc-table/XcTable.vue";
|
|
|
import {xcMessage} from "@/utils/xiaochan-element-plus";
|
|
|
import {formatDatetime} from "@/utils/date";
|
|
|
import router from '@/router'
|
|
|
import {useUserStore} from "@/pinia/user-store";
|
|
|
+import {Export} from "@/utils/ExportExcel.js";
|
|
|
|
|
|
const patNo = ref('')
|
|
|
const data = ref([])
|
|
|
@@ -63,6 +87,36 @@ onChangePatient(() => {
|
|
|
queryClick()
|
|
|
})
|
|
|
|
|
|
+function exportExcel(command) {
|
|
|
+ const field = {
|
|
|
+ content: '危急值',
|
|
|
+ createTime: '创建时间',
|
|
|
+ handleStaffName: '处理人',
|
|
|
+ handleTime: '处理时间'
|
|
|
+ }
|
|
|
+ const fileName = getLabel(command) + '危急值导出'
|
|
|
+ getExportCriticalValues(command).then((res) => {
|
|
|
+ Export(res, field, fileName);
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
+function getLabel(command) {
|
|
|
+ switch (command) {
|
|
|
+ case "1week":
|
|
|
+ return '近一周'
|
|
|
+ case "1month":
|
|
|
+ return '近一月'
|
|
|
+ case "3months":
|
|
|
+ return '近三月'
|
|
|
+ case "6months":
|
|
|
+ return '近半年'
|
|
|
+ case "1year":
|
|
|
+ return '近一年'
|
|
|
+ default:
|
|
|
+ return ''
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
onActivated(() => {
|
|
|
if (router.currentRoute.value.query.id) {
|
|
|
queryClick(router.currentRoute.value.query.id)
|