检验申请优化、全局加水印
This commit is contained in:
parent
67a31892c2
commit
7dee664561
@ -1,8 +1,8 @@
|
||||
# 页面标题
|
||||
VITE_APP_TITLE = 检验平台流转系统
|
||||
VITE_APP_TITLE = 区域检验数据平台
|
||||
|
||||
# 开发环境配置
|
||||
VITE_APP_ENV = 'development'
|
||||
|
||||
# 检验平台流转系统/开发环境
|
||||
# 区域检验数据平台/开发环境
|
||||
VITE_APP_BASE_API = '/dev-api'
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
# 页面标题
|
||||
VITE_APP_TITLE = 检验平台流转系统
|
||||
VITE_APP_TITLE = 区域检验数据平台
|
||||
|
||||
# 生产环境配置
|
||||
VITE_APP_ENV = 'production'
|
||||
|
||||
# 检验平台流转系统/生产环境
|
||||
# 区域检验数据平台/生产环境
|
||||
VITE_APP_BASE_API = '/prod-api'
|
||||
|
||||
# 是否在打包时开启压缩,支持 gzip 和 brotli
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
# 页面标题
|
||||
VITE_APP_TITLE = 检验平台流转系统
|
||||
VITE_APP_TITLE = 区域检验数据平台
|
||||
|
||||
# 生产环境配置
|
||||
VITE_APP_ENV = 'staging'
|
||||
|
||||
# 检验平台流转系统/生产环境
|
||||
# 区域检验数据平台/生产环境
|
||||
VITE_APP_BASE_API = '/stage-api'
|
||||
|
||||
# 是否在打包时开启压缩,支持 gzip 和 brotli
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 509 KiB After Width: | Height: | Size: 176 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 137 KiB |
@ -17,9 +17,10 @@
|
||||
-->
|
||||
<template>
|
||||
<div class="select-table-container">
|
||||
<el-select ref="selectTable" v-model="selectShowValue" :placeholder="props.placeholder" :size="props.size"
|
||||
:style="{ width: props.width }" @visible-change="visibleChange" @clear="clearHandle" :clearable="props.clearable"
|
||||
:disabled="props.disabled" v-bind="$attrs">
|
||||
<el-select ref="selectTable" class="select-table__wrapper" v-model="selectShowValue"
|
||||
:placeholder="props.placeholder" :size="props.size" :style="{ width: props.width }"
|
||||
@visible-change="visibleChange" @clear="clearHandle" :clearable="props.clearable" :disabled="props.disabled"
|
||||
v-bind="$attrs">
|
||||
<template #empty>
|
||||
<div class="select-table-dropdown">
|
||||
<div style="text-align: left;">
|
||||
@ -268,6 +269,7 @@ const handleKeydown = (e: any) => {
|
||||
if (e.key === "Enter") {
|
||||
const currentRow = filterData.value[currentIndex.value];
|
||||
handleRowChange(currentRow);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -325,6 +327,7 @@ const currentChange = (params: { row: any }) => {
|
||||
const handleRowChange = (val: any) => {
|
||||
emits("update:data", props.value ? val[props.value] : val);
|
||||
setLabel(val);
|
||||
emits('enter-press');
|
||||
};
|
||||
|
||||
const setLabel = (val: any) => {
|
||||
|
||||
@ -1,8 +1,7 @@
|
||||
//仪器,字典数据自动格式化类
|
||||
import { DictData } from "@/types/index";
|
||||
import { getGroupInstrdList } from "@/api/liswork/work/LisWork";
|
||||
//@ts-ignore
|
||||
import { comDict } from "@/utils/dict";
|
||||
import { comDict } from "@/utils/dict";
|
||||
|
||||
const dictData = ref<DictData>({});
|
||||
const instrOptions = ref<{ yq: string; yqmc: string }[]>([]);
|
||||
|
||||
@ -3,7 +3,9 @@
|
||||
<router-view v-slot="{ Component, route }">
|
||||
<transition name="fade-transform" mode="out-in">
|
||||
<keep-alive :include="tagsViewStore.cachedViews">
|
||||
<component v-if="!route.meta.link" :is="Component" :key="route.path" />
|
||||
<el-watermark :font="font" :content="content">
|
||||
<component v-if="!route.meta.link" :is="Component" :key="route.path" />
|
||||
</el-watermark>
|
||||
</keep-alive>
|
||||
</transition>
|
||||
</router-view>
|
||||
@ -17,6 +19,29 @@ import copyright from "./Copyright/index.vue"
|
||||
import iframeToggle from "./IframeToggle/index.vue"
|
||||
import useTagsViewStore from '@/store/modules/tagsView'
|
||||
|
||||
import useUserStore from '@/store/modules/user'
|
||||
import dayjs from 'dayjs'
|
||||
|
||||
const userStore = useUserStore()
|
||||
|
||||
const font = reactive({
|
||||
color: 'rgba(0, 0, 0, .2)',
|
||||
})
|
||||
|
||||
|
||||
const currentTime = ref(Date.now())
|
||||
|
||||
|
||||
const timer = setInterval(() => {
|
||||
currentTime.value = Date.now()
|
||||
}, 1000)
|
||||
|
||||
const content = computed(() => {
|
||||
|
||||
const timeStr = dayjs(currentTime.value).format('YYYY-MM-DD HH:mm:ss')
|
||||
return `${userStore.nickName || ''} ${timeStr}`.trim()
|
||||
})
|
||||
|
||||
const route = useRoute()
|
||||
const tagsViewStore = useTagsViewStore()
|
||||
|
||||
@ -33,6 +58,10 @@ function addIframe(): void {
|
||||
useTagsViewStore().addIframeView(route)
|
||||
}
|
||||
}
|
||||
|
||||
onUnmounted(() => {
|
||||
clearInterval(timer)
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@ -154,7 +154,7 @@ onMounted(() => {
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
//background: #fff;
|
||||
background: #0d9488;
|
||||
background: #304156;
|
||||
box-shadow: 0 1px 4px rgba(0, 21, 41, 0.15);
|
||||
//box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
|
||||
display: flex;
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div :class="classObj" class="app-wrapper" :style="{ '--current-color': theme }">
|
||||
<div v-if="device === 'mobile' && sidebar.opened" class="drawer-bg" @click="handleClickOutside"/>
|
||||
<div v-if="device === 'mobile' && sidebar.opened" class="drawer-bg" @click="handleClickOutside" />
|
||||
<sidebar v-if="!sidebar.hide" class="sidebar-container" />
|
||||
<div :class="{ hasTagsView: needTagsView, sidebarHide: sidebar.hide }" class="main-container">
|
||||
<div :class="{ 'fixed-header': fixedHeader }">
|
||||
|
||||
1
src/types/SelectTable.d.ts
vendored
1
src/types/SelectTable.d.ts
vendored
@ -1,6 +1,7 @@
|
||||
export interface Emits {
|
||||
(e: "update:data", val: any): void;
|
||||
(e: "getDataValue", val: any): void;
|
||||
(e: 'enter-press'): void;
|
||||
}
|
||||
|
||||
export interface Props {
|
||||
|
||||
@ -24,7 +24,7 @@ export function useFingerprint() {
|
||||
|
||||
// 指纹标识符
|
||||
fingerprint.value = result.visitorId;
|
||||
if (!mbStore.fingerprint) {
|
||||
if (mbStore.fingerprint != result.visitorId) {
|
||||
mbStore.setFingerprint(result.visitorId)
|
||||
}
|
||||
// 可以获取更多详细信息
|
||||
|
||||
@ -1,60 +1,60 @@
|
||||
<template>
|
||||
<div class="labpat_box">
|
||||
<el-form :model="labPat" label-width="5rem" label-position="right" class="left-form">
|
||||
<el-form :model="labPat" label-width="5rem" label-position="right" ref="formRef" class="left-form">
|
||||
<div :class="['sh_box', getColor(newStatus)]" v-if="visbileMask">
|
||||
<div class="text">{{ getLableType(newStatus) }}</div>
|
||||
</div>
|
||||
<el-form-item label="病人来源">
|
||||
<SelectTable v-model:data="labPat.patType" :fields="brlyFields" :table-data="dictData.PT" placeholder=""
|
||||
@getDataValue="handleFieldChange" />
|
||||
@getDataValue="handleFieldChange" @enter-press="selectEnter(1)" />
|
||||
</el-form-item>
|
||||
<el-form-item label="病人代号" required>
|
||||
<el-input v-model="labPat.patId" @change="brdhHandle" />
|
||||
<el-input v-model="labPat.patId" @change="brdhHandle" @keydown.enter="nextFocus" />
|
||||
</el-form-item>
|
||||
<el-form-item label="姓 名" required>
|
||||
<el-input v-model="labPat.patName" @change="handleFieldChange" />
|
||||
<el-input v-model="labPat.patName" @change="handleFieldChange" @keydown.enter="nextFocus" />
|
||||
</el-form-item>
|
||||
<el-form-item label="性 别" required>
|
||||
<SelectTable v-model:data="labPat.patSex" :table-data="dictData.SX" placeholder=""
|
||||
@getDataValue="handleFieldChange" />
|
||||
@getDataValue="handleFieldChange" @enter-press="selectEnter(4)" />
|
||||
</el-form-item>
|
||||
<el-form-item label="年龄" required>
|
||||
<el-col :span="14">
|
||||
<el-input v-model="labPat.patAge" @change="handleFieldChange" />
|
||||
<el-input v-model="labPat.patAge" @change="handleFieldChange" @keydown.enter="nextFocus" />
|
||||
</el-col>
|
||||
<el-col :span="10">
|
||||
<SelectTable v-model:data="labPat.ageUnit" :table-data="dictData.AU" placeholder="" :clearable="false"
|
||||
@getDataValue="handleFieldChange" />
|
||||
@getDataValue="handleFieldChange" @enter-press="selectEnter(6)" />
|
||||
</el-col>
|
||||
</el-form-item>
|
||||
<el-form-item label="生理周期" v-if="labPat.patSex == '2'">
|
||||
<SelectTable v-model:data="labPat.slzq" :table-data="dictData.SLZQ" placeholder=""
|
||||
@getDataValue="handleFieldChange" />
|
||||
@getDataValue="handleFieldChange" @enter-press="selectEnter(labPat.patSex == '2' ? 7 : -1)" />
|
||||
</el-form-item>
|
||||
<el-form-item label="送检医生">
|
||||
<SelectTable v-model:data="labPat.doctorCode" :tableData="dictData.DOCTOR" placeholder=""
|
||||
@getDataValue="doctorHandle" />
|
||||
@getDataValue="doctorHandle" @enter-press="selectEnter(labPat.patSex == '2' ? 8 : 7)" />
|
||||
</el-form-item>
|
||||
<el-form-item label="送检科室">
|
||||
<SelectTable v-model:data="labPat.departCode" :table-data="dictData.DEPT" placeholder=""
|
||||
@getDataValue="deptHandle" />
|
||||
@getDataValue="deptHandle" @enter-press="selectEnter(labPat.patSex == '2' ? 9 : 8)" />
|
||||
</el-form-item>
|
||||
<el-form-item label="床 号">
|
||||
<el-input v-model="labPat.patBed" @change="handleFieldChange" />
|
||||
<el-input v-model="labPat.patBed" @change="handleFieldChange" @keydown.enter="nextFocus" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="临床诊断">
|
||||
<el-input v-model="labPat.diagnosisName" @change="handleFieldChange" />
|
||||
<el-input v-model="labPat.diagnosisName" @change="handleFieldChange" @keydown.enter="nextFocus" />
|
||||
</el-form-item>
|
||||
<el-form-item label="备 注">
|
||||
<el-input v-model="labPat.bz" @change="handleFieldChange" />
|
||||
<el-input v-model="labPat.bz" @change="handleFieldChange" @keydown.enter="nextFocus" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="登记人员">
|
||||
<el-input v-model="labPat.userName" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item label="登记时间">
|
||||
<el-date-picker v-model="labPat.orderTime" type="datetime" format="YYYY-MM-DD HH:mm:ss" :disabled="true"
|
||||
<el-date-picker v-model="labPat.orderTime" type="datetime" format="YYYY-MM-DD HH:mm:ss" disabled
|
||||
value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="医疗机构">
|
||||
@ -62,13 +62,13 @@
|
||||
</el-form-item>
|
||||
<el-form-item label="证件类型">
|
||||
<SelectTable v-model:data="labPat.zjlx" :table-data="dictData.ZJLX" placeholder=""
|
||||
@getDataValue="handleFieldChange" />
|
||||
@getDataValue="handleFieldChange" @enter-press="selectEnter(labPat.patSex == '2' ? 13 : 12)" />
|
||||
</el-form-item>
|
||||
<el-form-item label="证件号码">
|
||||
<el-input v-model="labPat.patIdentity" />
|
||||
<el-input v-model="labPat.patIdentity" @keydown.enter="nextFocus" />
|
||||
</el-form-item>
|
||||
<el-form-item label="联系电话">
|
||||
<el-input v-model="labPat.phone" />
|
||||
<el-input v-model="labPat.phone" @keydown.enter="nextFocus" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
@ -77,6 +77,7 @@
|
||||
<script setup lang="ts">
|
||||
import SelectTable from '@/components/SelectTable/index.vue';
|
||||
import { getDictData, formatDict, dictData } from '@/hooks'
|
||||
import { E } from 'vue-router/dist/router-CWoNjPRp.mjs';
|
||||
|
||||
const props = defineProps({
|
||||
labPat: {
|
||||
@ -147,6 +148,63 @@ const brdhHandle = () => {
|
||||
emit('getBrdh', props.labPat.patId)
|
||||
}
|
||||
|
||||
const formRef = useTemplateRef('formRef')
|
||||
const currentTarget = ref(null);
|
||||
// 回车跳转到下一个表单元素
|
||||
const nextFocus = (e?: Event, idx?: number) => {
|
||||
if (e) e.preventDefault() // 禁止回车提交表单
|
||||
|
||||
// 找到所有可聚焦的表单项:
|
||||
const els = formRef.value.$el.querySelectorAll(
|
||||
'input:not([type="hidden"]):not([disabled]), select:not([disabled]), textarea:not([disabled]), ' +
|
||||
'.select-table__wrapper .el-select__input:not([disabled]), ' + '.el-date-editor input:not([disabled])'
|
||||
);
|
||||
|
||||
const arr = Array.from(els).filter((el: any) => {
|
||||
// 额外过滤:排除隐藏元素、禁用状态的父级封装组件(如 SelectTable 被 disabled 时)
|
||||
const isHidden = el.offsetParent === null;
|
||||
const isDisabled = el.hasAttribute('disabled') || el.parentElement?.closest('.is-disabled') !== null;
|
||||
return !isHidden && !isDisabled;
|
||||
});
|
||||
|
||||
let index: number;
|
||||
if (!idx) {
|
||||
// 找到当前触发元素在列表中的位置
|
||||
currentTarget.value = e?.target as HTMLElement;
|
||||
// 兼容 SelectTable:如果点击的是组件外层,定位到内部输入框
|
||||
if (currentTarget.value.closest('.select-table-container')) {
|
||||
currentTarget.value = currentTarget.value.closest('.select-table-container').querySelector('.el-select__input');
|
||||
}
|
||||
|
||||
index = arr.findIndex((item: any) => item === currentTarget.value || item.contains(currentTarget.value));
|
||||
} else {
|
||||
index = idx - 1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 跳转到下一个可聚焦元素(循环到第一个 if 最后一个)
|
||||
if (index > -1) {
|
||||
const nextIndex = (index + 1) % arr.length;
|
||||
// 确保下一个元素存在且可聚焦
|
||||
if (arr[nextIndex]) {
|
||||
nextTick(() => {
|
||||
(arr[nextIndex] as HTMLElement)?.focus();
|
||||
});
|
||||
|
||||
// 针对 SelectTable 额外处理:聚焦后激活下拉框
|
||||
if ((arr[nextIndex] as HTMLElement).closest('.select-table-container')) {
|
||||
(arr[nextIndex] as HTMLElement).dispatchEvent(new Event('click'));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const selectEnter = (index: number) => {
|
||||
const emptyEvent = new Event('keydown', { cancelable: true });
|
||||
nextFocus(emptyEvent, index)
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
|
||||
|
||||
|
||||
@ -10,15 +10,15 @@
|
||||
<el-col :span="16" style="height: 100%;">
|
||||
<div class="box-shadow">
|
||||
<el-row class="top-box">
|
||||
<el-col :span="7">
|
||||
<el-button type="primary" size="small" :loading="saveLoading" @click="saveHandle">保存</el-button>
|
||||
<el-button type="primary" size="small" @click="addHandle">新增</el-button>
|
||||
<el-button type="primary" size="small" @click="printHandle">打印</el-button>
|
||||
<el-button type="danger" size="small" @click="deleteHandle">作废</el-button>
|
||||
<el-col :span="8" class="col_box">
|
||||
<el-button type="primary" :loading="saveLoading" @click="saveHandle">保存</el-button>
|
||||
<el-button type="primary" @click="addHandle">新增</el-button>
|
||||
<el-button type="primary" :loading="printLoading" @click="printHandle">打印</el-button>
|
||||
<el-button type="danger" @click="deleteHandle">作废</el-button>
|
||||
</el-col>
|
||||
<el-col :span="17">
|
||||
<el-col :span="16">
|
||||
<div class="tips">
|
||||
项目检索: <el-input v-model="searchKey" size="small" style="width: 150px;" @clear="filterDictData"
|
||||
项目检索: <el-input v-model="searchKey" style="width: 150px;" @clear="filterDictData"
|
||||
@input="filterDictData" />
|
||||
</div>
|
||||
</el-col>
|
||||
@ -32,7 +32,7 @@
|
||||
<el-tab-pane v-for="item in xmdlList" :key="item.dictCode" :label="item.dictName" :name="item.dictCode">
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
<div style="height: calc(60% - 50px)" class="mb5">
|
||||
<div style="height: calc(60% - 55px)" class="mb5">
|
||||
<CustomVxeTable :table-data="filterData" :columns="xmColumns" @cell-dblclick="dbRowclick"
|
||||
:cell-style="xmcellStyle" keyField='applyid'
|
||||
:scrollYConfig="{ enabled: true, rSize: 30, height: '100%', }" class="mytable-style">
|
||||
@ -48,9 +48,6 @@
|
||||
<template #newitemclass="{ row }">
|
||||
{{itemclassList.find((item) => item.itemclassCode == row.newitemclass)?.itemclassName}}
|
||||
</template>
|
||||
<!-- <template #newbarcode="{ row }">
|
||||
条码号({{ barcodes }}条)
|
||||
</template> -->
|
||||
<template #itemclass_yblx="{ row }">
|
||||
<SelectTable v-model:data="row.itemclass_yblx" :tableData="dictData.BT" placeholder="请选择"
|
||||
:clearable="false" v-if="row.status == 10" value="label"
|
||||
@ -61,31 +58,35 @@
|
||||
<span v-if="row.rowSeq == 1"> {{ formatDict(row.status, 'ZT') }}</span>
|
||||
</template>
|
||||
<template #action="{ row }">
|
||||
<el-button type="danger" :text='true' v-if="row.status == 10" size="small"
|
||||
<el-button type="danger" :text='true' v-if="row.status == 10 || !row.status" size="small"
|
||||
@click="delItem(row)">删除</el-button>
|
||||
</template>
|
||||
</CustomVxeTable>
|
||||
</div>
|
||||
<div class="yblxtext">共有{{ barcodes }}个样本类型</div>
|
||||
<div class="yblxtext">共有{{ barcodes }}个样本,合计金额:<span>{{ totalAmount }}</span></div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="8" style="height: 100%;">
|
||||
<div class="box-shadow">
|
||||
<el-form :model="searchForm" inline size="small">
|
||||
<el-form :model="searchForm" inline>
|
||||
<el-form-item label="" prop="brxm">
|
||||
<el-input v-model="searchForm.brxm" clearable style="width: 9.5rem;" @change="handleQuery"
|
||||
<el-input v-model="searchForm.brxm" clearable style="width: 8rem;" @change="handleQuery"
|
||||
placeholder="请输入姓名" />
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="status">
|
||||
<SelectTable v-model:data="searchForm.status" :tableData="dictData.SQDS" clearable style="width: 9.5rem;"
|
||||
placeholder="请选择状态" size="small" @getDataValue="handleQuery" />
|
||||
<div class="radio_box">
|
||||
<el-radio-group v-model="searchForm.status" @change="handleQuery" size="small">
|
||||
<el-radio :value="''">所有</el-radio>
|
||||
<el-radio :value="item.value" v-for="item in dictData.SQDS">{{ item.label }}</el-radio>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="" prop="begdate">
|
||||
<div class="radio_box">
|
||||
<el-radio-group v-model="searchForm.days" @change="changeDays">
|
||||
<el-radio-group v-model="searchForm.days" @change="changeDays" size="small">
|
||||
<el-radio :value="3">近3天</el-radio>
|
||||
<el-radio :value="7">近7天</el-radio>
|
||||
<el-radio :value="0">此日
|
||||
@ -96,13 +97,7 @@
|
||||
</el-radio-group>
|
||||
<el-date-picker v-model="today" type="date" value-format="YYYY-MM-DD" style="width: 9rem;"
|
||||
@change="dateHandle" />
|
||||
<el-button type="primary" icon="RefreshRight" size="small" @click="handleQuery">刷新</el-button>
|
||||
<!-- <el-tooltip class="box-item" effect="dark" content="打印" placement="top">
|
||||
<el-button type="primary" circle size="small" icon="Memo" @click="printHandle"></el-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip class="box-item" effect="dark" content="作废" placement="top">
|
||||
<el-button type="danger" circle size="small" icon="Delete" @click="deleteHandle"></el-button>
|
||||
</el-tooltip> -->
|
||||
<el-button type="primary" icon="RefreshRight" @click="handleQuery">刷新</el-button>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
@ -300,7 +295,7 @@ const saveHandle = () => {
|
||||
if (!labpat.value.patId) return ElMessage.warning('病人代号不能为空!')
|
||||
if (!labpat.value.patName) return ElMessage.warning('病人姓名不能为空!')
|
||||
if (!labpat.value.patSex) return ElMessage.warning('病人性别不能为空!')
|
||||
if (!labpat.value.patAge && !labpat.value.ageUnit) return ElMessage.warning('病人年龄不能为空!')
|
||||
if (!labpat.value.patAge || !labpat.value.ageUnit) return ElMessage.warning('病人年龄不能为空!')
|
||||
if (!sqXmList.value.length) return ElMessage.warning('请选择项目!')
|
||||
labpat.value.status = labpat.value.status ? labpat.value.status : ''
|
||||
const data = {
|
||||
@ -332,6 +327,7 @@ const addHandle = () => {
|
||||
ageUnit: '1'
|
||||
}
|
||||
sqXmList.value = []
|
||||
visbileMask.value = false
|
||||
updateInitialData()
|
||||
}
|
||||
const deleteHandle = () => {
|
||||
@ -351,6 +347,7 @@ const deleteHandle = () => {
|
||||
|
||||
}
|
||||
|
||||
const printLoading = ref(false)
|
||||
const printHandle = () => {
|
||||
if (isDataChanged()) {
|
||||
ElMessageBox.confirm('数据已修改,请先保存后再打印!', '提示', {
|
||||
@ -380,16 +377,18 @@ const printHandle = () => {
|
||||
uniqueData.push(item);
|
||||
}
|
||||
});
|
||||
if (labpat.value.status > 10) return ElMessage.warning('申请单已审核,不能打印条码!')
|
||||
if (!uniqueData.length) return ElMessage.warning('请选择要打印的条码!')
|
||||
checkPrintService().then((isConnected) => {
|
||||
if (!isConnected) return
|
||||
printLoading.value = true
|
||||
reqPrint(uniqueData).then(res => {
|
||||
if (res.code == 0) {
|
||||
handleRowClick({ row: rowInfo.value })
|
||||
ElMessage.success('正在打印中...')
|
||||
handleQuery()
|
||||
}
|
||||
}).finally(() => {
|
||||
printLoading.value = false
|
||||
})
|
||||
})
|
||||
|
||||
@ -506,7 +505,7 @@ watch(
|
||||
nextTick(() => {
|
||||
// 等待 DOM 渲染完成后执行勾选
|
||||
sqxmCzList.value.forEach(item => {
|
||||
if (item.status == 10) {
|
||||
if (item.status < 30) {
|
||||
xmRef.value.toggleRowSelection(item, true)
|
||||
}
|
||||
});
|
||||
@ -521,6 +520,12 @@ const barcodes = computed(() => {
|
||||
return Array.from(new Set(sqxmCzList.value.map(item => item.barcode))).length
|
||||
})
|
||||
|
||||
const totalAmount = computed(() => {
|
||||
return sqxmCzList.value.reduce((total, item) => {
|
||||
return total + (item.amount || 0);
|
||||
}, 0)
|
||||
})
|
||||
|
||||
|
||||
|
||||
const tableConfig = ref({
|
||||
@ -534,8 +539,8 @@ const tableConfig = ref({
|
||||
reserve: false, // 是否保留勾选状态(分页/筛选时)
|
||||
highlight: false, // 是否高亮选中行
|
||||
checkMethod: ({ row }) => {
|
||||
//检验申请状态才能勾选
|
||||
return row.status == 10;
|
||||
//标本送检之前状态才能勾选
|
||||
return row.status < 30;
|
||||
}
|
||||
}
|
||||
})
|
||||
@ -546,7 +551,7 @@ const xmRef = useTemplateRef('xmRef')
|
||||
const selectionChange = (checked, row, selection) => {
|
||||
// console.log('==>', checked, row, selection);
|
||||
sqxmCzList.value.forEach(item => {
|
||||
if (row.barcode === item.barcode && row.status == 10) {
|
||||
if (row.barcode === item.barcode && row.status < 30) {
|
||||
xmRef.value.toggleRowSelection(item, checked)
|
||||
}
|
||||
});
|
||||
@ -623,7 +628,7 @@ onMounted(() => {
|
||||
|
||||
.table-box {
|
||||
margin-top: 2px;
|
||||
height: calc(100% - 65px);
|
||||
height: calc(100% - 80px);
|
||||
}
|
||||
|
||||
.el-form-item {
|
||||
@ -679,4 +684,10 @@ onMounted(() => {
|
||||
margin-right: .3125rem;
|
||||
}
|
||||
}
|
||||
|
||||
.col_box {
|
||||
.el-button+.el-button {
|
||||
margin-left: .5rem;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -1,77 +0,0 @@
|
||||
<template>
|
||||
<div class="table-container">
|
||||
<!-- vxe-table 核心组件 -->
|
||||
<vxe-table border :data="tableData" :group-config="groupConfig" :expand-config="{ trigger: 'row', showIcon: true }"
|
||||
style="width: 100%;">
|
||||
<!-- 时间列:格式化显示 -->
|
||||
<vxe-column field="createTime" title="创建时间" width="220" :formatter="formatDate" />
|
||||
<!-- 业务列 -->
|
||||
<vxe-column field="name" title="订单名称" width="150" />
|
||||
<vxe-column field="amount" title="订单金额" width="120" />
|
||||
<vxe-column field="status" title="订单状态" width="120" />
|
||||
</vxe-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive } from 'vue'
|
||||
|
||||
|
||||
// 2. 定义响应式表格数据(包含时间字段)
|
||||
const tableData = ref([
|
||||
{ id: 1, name: '订单1', amount: 100, status: '已支付', createTime: '2026-03-15 08:30:00' },
|
||||
{ id: 2, name: '订单2', amount: 200, status: '已支付', createTime: '2026-03-15 09:40:00' },
|
||||
{ id: 3, name: '订单3', amount: 150, status: '待支付', createTime: '2026-03-16 10:20:00' },
|
||||
{ id: 4, name: '订单4', amount: 300, status: '已取消', createTime: '2026-04-15 14:10:00' },
|
||||
{ id: 5, name: '订单5', amount: 250, status: '已支付', createTime: '2026-04-16 15:30:00' }
|
||||
])
|
||||
|
||||
// 3. 时间格式化方法
|
||||
const formatDate = ({ cellValue }) => {
|
||||
return cellValue
|
||||
// 格式化时间为:年-月-日 时:分:秒
|
||||
// return xeUtils.toDateString(cellValue, 'yyyy-MM-dd HH:mm:ss')
|
||||
}
|
||||
|
||||
// 4. 分组配置(核心:按时间分组)
|
||||
const groupConfig = reactive({
|
||||
// 分组字段配置
|
||||
fields: [
|
||||
{
|
||||
field: 'createTime', // 要分组的原始字段
|
||||
// 分组标题显示格式
|
||||
formatter: ({ cellValue }) => {
|
||||
// 分组行显示:xxxx年xx月xx日
|
||||
const date = xeUtils.toDate(cellValue)
|
||||
return `${date.getFullYear()}年${date.getMonth() + 1}月${date.getDate()}日`
|
||||
},
|
||||
// 分组判断逻辑(核心:返回相同值则归为一组)
|
||||
getter: ({ cellValue }) => {
|
||||
// 👉 按需修改分组粒度:
|
||||
// 按【日】分组(默认):return xeUtils.toDateString(cellValue, 'yyyy-MM-dd')
|
||||
// 按【月】分组:return xeUtils.toDateString(cellValue, 'yyyy-MM')
|
||||
// 按【年】分组:return xeUtils.toDateString(cellValue, 'yyyy')
|
||||
return xeUtils.toDateString(cellValue, 'yyyy-MM-dd')
|
||||
}
|
||||
}
|
||||
],
|
||||
showGroup: true, // 显示分组汇总行
|
||||
showFooter: true, // 显示分组脚注
|
||||
expandAll: true, // 默认展开所有分组
|
||||
// 可选:分组汇总行的自定义内容
|
||||
groupMethod: ({ rows, field }) => {
|
||||
if (field === 'createTime') {
|
||||
// 计算当前分组的金额总和
|
||||
const total = rows.reduce((sum, item) => sum + item.amount, 0)
|
||||
return { amount: `合计:${total} 元` }
|
||||
}
|
||||
return ''
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.table-container {
|
||||
padding: 20px;
|
||||
}
|
||||
</style>
|
||||
@ -96,7 +96,9 @@
|
||||
</el-form>
|
||||
|
||||
<div class="el-login-footer">
|
||||
<span>版权所有(R)2022-2026 {{ oem.compay }} 电话:{{ oem.phone }} E-mail:{{ oem.Email }} version:{{ oem.version }}</span>
|
||||
<span>版权所有(R){{ oem.copyrightyear }} {{ oem.compay }} 电话:{{ oem.phone }} E-mail:{{ oem.Email }} version:{{
|
||||
oem.version
|
||||
}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@ -118,11 +120,12 @@ const userStore = useUserStore();
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
const oem = ref({
|
||||
appname: "实验室信息管理系统",
|
||||
appname: "区域检验数据平台",
|
||||
phone: "",
|
||||
compay: "",
|
||||
version: "",
|
||||
Email: ""
|
||||
Email: "",
|
||||
copyrightyear: ""
|
||||
});
|
||||
const loginRef = ref(null); // 修复:直接用ref获取表单引用
|
||||
const loginForm = ref({
|
||||
@ -219,10 +222,10 @@ const getCookie = () => {
|
||||
if (cookieloginYLJG !== undefined && cookieloginYLJG !== null && cookieloginYLJG !== "") {
|
||||
loginForm.value.loginParam.loginYLJG = cookieloginYLJG;
|
||||
}
|
||||
const cookieloginYLJGName = Cookies.get("czlisjy_loginYLJGName");
|
||||
if (cookieloginYLJGName !== undefined && cookieloginYLJGName !== null && cookieloginYLJGName !== "") {
|
||||
loginForm.value.loginParam.loginYLJGName = cookieloginYLJGName;
|
||||
}
|
||||
// const cookieloginYLJGName = Cookies.get("czlisjy_loginYLJGName");
|
||||
// if (cookieloginYLJGName !== undefined && cookieloginYLJGName !== null && cookieloginYLJGName !== "") {
|
||||
// loginForm.value.loginParam.loginYLJGName = cookieloginYLJGName;
|
||||
// }
|
||||
};
|
||||
|
||||
// 获取本地配置
|
||||
|
||||
@ -160,8 +160,8 @@ const pagination = ref({
|
||||
})
|
||||
|
||||
const ksdhFields = ref([
|
||||
{ prop: 'label', label: '名称', width: 150, enablePinyinSearch: true },
|
||||
{ prop: 'value', label: '代号', width: 120, enablePinyinSearch: true },
|
||||
{ prop: 'label', label: '名称', width: 180, enablePinyinSearch: true },
|
||||
{ prop: 'value', label: '代号', width: 80, enablePinyinSearch: true },
|
||||
])
|
||||
|
||||
// 时间线数据
|
||||
@ -256,7 +256,7 @@ onMounted(() => {
|
||||
hosList.value = res.rows.map((item) => {
|
||||
return {
|
||||
label: item.hospitalName,
|
||||
value: item.hospitalCode
|
||||
value: item.hospitalId.toString()
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
@ -218,7 +218,7 @@ onMounted(() => {
|
||||
hosList.value = res.rows.map((item) => {
|
||||
return {
|
||||
label: item.hospitalName,
|
||||
value: item.hospitalCode
|
||||
value: item.hospitalId.toString()
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
@ -185,7 +185,7 @@ onMounted(() => {
|
||||
hosList.value = res.rows.map((item: any) => {
|
||||
return {
|
||||
label: item.hospitalName,
|
||||
value: item.hospitalCode
|
||||
value: item.hospitalId.toString()
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
@ -76,7 +76,7 @@ const tableConfig = ref({
|
||||
|
||||
const ksdhFields = ref([
|
||||
{ prop: 'label', label: '名称', width: 200, enablePinyinSearch: true },
|
||||
{ prop: 'value', label: '代号', width: 200, enablePinyinSearch: true },
|
||||
{ prop: 'value', label: '代号', width: 120, enablePinyinSearch: true },
|
||||
])
|
||||
|
||||
const dstHospName = ref('')
|
||||
@ -114,10 +114,6 @@ const sjHandle = (val: number) => {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
const getList = () => {
|
||||
const index = tableData.value.findIndex((item) => item.barcode == queryParams.value.barcode)
|
||||
if (index != -1) {
|
||||
@ -139,10 +135,10 @@ onMounted(() => {
|
||||
hosList.value = res.rows.map((item) => {
|
||||
return {
|
||||
label: item.hospitalName,
|
||||
value: item.hospitalCode
|
||||
value: item.hospitalId.toString(),
|
||||
}
|
||||
})
|
||||
dstHospCode.value = res.rows[0].hospitalCode
|
||||
dstHospCode.value = res.rows[0].hospitalId.toString()
|
||||
dstHospName.value = res.rows[0].hospitalName
|
||||
})
|
||||
|
||||
|
||||
@ -599,7 +599,7 @@ onMounted(async () => {
|
||||
hosList.value = res.rows.map((item: any) => {
|
||||
return {
|
||||
label: item.hospitalName,
|
||||
value: item.hospitalCode
|
||||
value: item.hospitalId
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
@ -128,8 +128,8 @@
|
||||
<div>
|
||||
<CustomTable :data="rightTableData" :columns="rightColumns" :config="rightTableConfig"
|
||||
@row-click="xmrowHandle" ref="rightTableRef">
|
||||
<template #jgbz="{ row }">
|
||||
{{ formatJgbz(row.jgbz) }}
|
||||
<template #result_flag="{ row }">
|
||||
{{ formatDict(row.result_flag, 'RESUTLFLAG') }}
|
||||
</template>
|
||||
</CustomTable>
|
||||
</div>
|
||||
@ -187,7 +187,7 @@ import SelectTable from '@/components/SelectTable/index.vue';
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { classCom } from '@/utils/classCom'
|
||||
import * as echarts from 'echarts';
|
||||
import { comDict } from '@/utils/dict'
|
||||
import { getDictData, formatDict, dictData } from '@/hooks'
|
||||
import useUserStore from '@/store/modules/user'
|
||||
import { listhospital } from '@/api/regional/dict/hospital';
|
||||
import { checkRole } from '@/utils/permission'
|
||||
@ -311,22 +311,22 @@ const rows = ref<any[]>([])
|
||||
const tableData = ref([])
|
||||
// 配置项
|
||||
const columns = ref([
|
||||
{ type: 'selection', visible: true, align: 'center', width: 30, label: '多选框' },
|
||||
// { type: 'selection', visible: true, align: 'center', width: 30, label: '多选框' },
|
||||
{ prop: 'yljg', label: '委托机构', align: 'center', visible: true, width: 200 },
|
||||
{ prop: 'applyid', label: '申请单号', align: 'center', visible: true, width: 120 },
|
||||
{ prop: 'brdh', label: '病人代号', align: 'center', visible: true, width: 100 },
|
||||
{ prop: 'brxm', label: '病人姓名', align: 'center', visible: true, },
|
||||
{ prop: 'brxbname', label: '性别', align: 'center', visible: true, width: 40 },
|
||||
{ prop: 'ch', label: '床号', align: 'center', visible: true, width: 50 },
|
||||
{ prop: 'sqh', label: '条码号', align: 'center', visible: true, width: 140 },
|
||||
{ prop: 'barcode_zt', label: '状态', align: 'center', visible: true, width: 100, slot: 'barcode_zt' },
|
||||
{ prop: 'jymd', label: '检验目的', align: 'center', visible: true, width: 200 },
|
||||
{ prop: 'yblxname', label: '样本类型', align: 'center', visible: true, },
|
||||
{ prop: 'sqsj', label: '申请时间', align: 'center', visible: true, width: 150 },
|
||||
{ prop: 'sqh', label: '条码号', align: 'center', visible: true, width: 150 },
|
||||
{ prop: 'barcode_zt', label: '状态', align: 'center', visible: true, width: 150, slot: 'barcode_zt' },
|
||||
{ prop: 'confirmtime', label: '报告时间', align: 'center', visible: true, sortable: true, width: 150 },
|
||||
{ prop: 'sjysname', label: '送检医生', align: 'center', visible: true, width: 80 },
|
||||
{ prop: 'brlyname', label: '病人类型', align: 'center', visible: true, width: 80 },
|
||||
{ prop: 'jyrq', label: '检验日期', align: 'center', visible: true, width: 100 },
|
||||
{ prop: 'applyid', label: '申请单号', align: 'center', visible: true, width: 120 },
|
||||
{ prop: 'ybh', label: '样本号', align: 'center', visible: true, width: 60 },
|
||||
{ prop: 'yqmc', label: '仪器名称', align: 'center', visible: true, width: 150 },
|
||||
{ prop: 'dybz', label: '印', align: 'center', visible: true, slot: 'dybz', width: 40 },
|
||||
@ -344,7 +344,6 @@ const selectionChange = (selection: any) => {
|
||||
|
||||
const rightTableRef = ref()
|
||||
const rowHandle = (row: any) => {
|
||||
console.log('row==>', row);
|
||||
if (row.yqdl == 2) {
|
||||
rightColumns.value[1].visible = false
|
||||
rightColumns.value[2].visible = true
|
||||
@ -372,11 +371,22 @@ const rowHandle = (row: any) => {
|
||||
|
||||
reportResult({ bgdh: row.bgdh }).then((res) => {
|
||||
if (res.code == 0) {
|
||||
rightTableData.value = res.data
|
||||
nextTick(() => {
|
||||
rightTableRef.value.setCurrentRow(res.data[0])
|
||||
})
|
||||
xmrowHandle(res.data[0])
|
||||
rightTableData.value = res.data.sort((a, b) => a.dyxh - b.dyxh);
|
||||
|
||||
if (res.data.length > 0) {
|
||||
nextTick(() => {
|
||||
rightTableRef.value.setCurrentRow(res.data[0])
|
||||
})
|
||||
xmrowHandle(res.data[0])
|
||||
} else {
|
||||
nextTick(() => {
|
||||
rightTableConfig.value.height = '60.5vh'
|
||||
rightTableRef.value?.doLayout && rightTableRef.value.doLayout();
|
||||
});
|
||||
bottomTableData.value = []
|
||||
expertComment.value = ''
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
@ -391,7 +401,7 @@ const printPdf = () => {
|
||||
reportPrintPdf({ bgdh: Info.value.bgdh }).then((res) => {
|
||||
if (res.code == 0) {
|
||||
if (!res.data) return ElMessage.warning('未找到打印文件')
|
||||
classCom.printBase64PDF(res.data.report)
|
||||
classCom.printBase64PDF(res.data)
|
||||
}
|
||||
}).finally(() => {
|
||||
printLoading.value = false
|
||||
@ -474,8 +484,8 @@ const updateColumns = (arr: any[]) => {
|
||||
};
|
||||
|
||||
const ksdhFields = ref([
|
||||
{ prop: 'label', label: '名称', width: 150, enablePinyinSearch: true },
|
||||
{ prop: 'value', label: '代号', width: 120, enablePinyinSearch: true },
|
||||
{ prop: 'label', label: '名称', width: 180, enablePinyinSearch: true },
|
||||
{ prop: 'value', label: '代号', width: 80, enablePinyinSearch: true },
|
||||
])
|
||||
|
||||
const brlxFields = ref([
|
||||
@ -496,7 +506,7 @@ const rightColumns = ref([
|
||||
{ prop: 'refs', label: '参考值', align: 'center', visible: true, },
|
||||
{ prop: 'dw', label: '单位', align: 'center', visible: true, },
|
||||
{ prop: 'od', label: '菌落计数', align: 'center', visible: true, },
|
||||
{ prop: 'jgbz', label: '结果标志', align: 'center', visible: true, slot: 'jgbz' },
|
||||
{ prop: 'result_flag', label: '结果标志', align: 'center', visible: true, slot: 'result_flag' },
|
||||
])
|
||||
|
||||
const rightCellStyleHd = ({ row, column, rowIndex, columnIndex }: {
|
||||
@ -509,16 +519,16 @@ const rightCellStyleHd = ({ row, column, rowIndex, columnIndex }: {
|
||||
return { background: '#f00 !important', color: '#FFF' };
|
||||
}
|
||||
|
||||
if (column.label == "检验结果" && row.jgbz == "H") {
|
||||
if (column.label == "检验结果" && row.result_flag == "H") {
|
||||
return { background: '#ffc0c0 !important', color: '#606266' };
|
||||
}
|
||||
if (column.label == "检验结果" && row.jgbz == "L") {
|
||||
if (column.label == "检验结果" && row.result_flag == "L") {
|
||||
return { background: '#8080ff !important', color: '#fff' };
|
||||
}
|
||||
if (column.label == "检验结果" && row.jgbz == "P") {
|
||||
if (column.label == "检验结果" && row.result_flag == "P") {
|
||||
return { background: '#ffc0c0 !important', color: '#606266' };
|
||||
}
|
||||
if (column.label == "检验结果" && row.jgbz == "Q") {
|
||||
if (column.label == "检验结果" && row.result_flag == "Q") {
|
||||
return { background: '#ffff80 !important', color: '#606266' };
|
||||
}
|
||||
};
|
||||
@ -682,105 +692,10 @@ const formatGroupedData = (data: any[]) => {
|
||||
};
|
||||
|
||||
const handleRowClick = (row: any) => {
|
||||
getEcharts(row)
|
||||
// getEcharts(row)
|
||||
}
|
||||
|
||||
const getEcharts = (data: any) => {
|
||||
const dateKeys = Object.keys(data).filter(key =>
|
||||
/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$/.test(key)
|
||||
);
|
||||
const Intance = echarts.init(myEcharts.value);
|
||||
const xData = dateKeys;
|
||||
let seriesData: string[] = []
|
||||
seriesData = dateKeys.map(item => data[item]);
|
||||
|
||||
const option = {
|
||||
title: {
|
||||
text: data.xmmc,
|
||||
top: '5',
|
||||
right: '5%',
|
||||
left: '20',
|
||||
// bottom: '20%'
|
||||
// subtext: 'Feature Sample: Gradient Color, Shadow, Click Zoom'
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'axis'
|
||||
},
|
||||
grid: {
|
||||
top: '20%',
|
||||
left: '3%',
|
||||
right: '4%',
|
||||
// bottom: '3%',
|
||||
height: '80%',
|
||||
containLabel: true
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
data: xData,
|
||||
axisTick: {
|
||||
show: false
|
||||
},
|
||||
axisLine: {
|
||||
lineStyle: {
|
||||
// color: 'rgba(193, 207, 220, 1)',
|
||||
}
|
||||
},
|
||||
axisLabel: {
|
||||
rotate: 30,
|
||||
textStyle: {
|
||||
color: "#8D949B "
|
||||
}
|
||||
},
|
||||
},
|
||||
yAxis: [{
|
||||
// name: '单位(mm)',
|
||||
type: 'value',
|
||||
axisLabel: {
|
||||
textStyle: {
|
||||
color: "#8D949B"
|
||||
},
|
||||
// formatter: '{value}%'
|
||||
|
||||
|
||||
},
|
||||
axisLine: {
|
||||
show: false,
|
||||
lineStyle: {
|
||||
color: '#24abf2'
|
||||
}
|
||||
},
|
||||
splitLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
type: 'dashed'
|
||||
},
|
||||
},
|
||||
}
|
||||
],
|
||||
series: [{
|
||||
name: data.xmmc,
|
||||
type: 'line',
|
||||
data: seriesData,
|
||||
symbol: 'circle',
|
||||
symbolSize: 5, //标记的大小
|
||||
lineStyle: {
|
||||
normal: {
|
||||
width: 2,
|
||||
color: '#24abf2',
|
||||
}
|
||||
},
|
||||
itemStyle: {
|
||||
normal: {
|
||||
color: '#24abf2',
|
||||
}
|
||||
},
|
||||
smooth: true
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
Intance.setOption(option);
|
||||
}
|
||||
|
||||
// 右侧数据源
|
||||
const bottomTableData = ref([])
|
||||
@ -815,22 +730,14 @@ const bottomTableConfig = ref(
|
||||
cellStyle: botCellStyleHd
|
||||
}
|
||||
)
|
||||
interface DictData {
|
||||
DP?: Array<any>;
|
||||
PT?: Array<any>;
|
||||
[key: string]: any[] | undefined; // 添加索引签名以支持动态访问
|
||||
}
|
||||
|
||||
const hosList = ref([])
|
||||
// 字典数据存储
|
||||
const dictData = ref<DictData>({});
|
||||
|
||||
onMounted(async () => {
|
||||
// 初始化3天区间(今天-前两天)
|
||||
const end = dayjs().format('YYYY-MM-DD');
|
||||
const start = dayjs().subtract(2, 'day').format('YYYY-MM-DD'); //add 时间往后
|
||||
queryParams.times = [start, end];
|
||||
// console.log(queryParams.times);
|
||||
getList()
|
||||
adjustTableHeight();
|
||||
|
||||
@ -838,28 +745,22 @@ onMounted(async () => {
|
||||
hosList.value = res.rows.map((item) => {
|
||||
return {
|
||||
label: item.hospitalName,
|
||||
value: item.hospitalCode
|
||||
value: item.hospitalId.toString(),
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
// 加载病人来源字典
|
||||
const dictRefs = await comDict('PT', 'DP', 'ZT');
|
||||
// 加载字典
|
||||
getDictData('PT', 'DP', 'ZT', 'RESUTLFLAG');
|
||||
|
||||
// 从 ref 中获取实际数据
|
||||
dictData.value = {
|
||||
PT: toRaw(dictRefs.PT.value) || [],
|
||||
DP: toRaw(dictRefs.DP.value) || [],
|
||||
ZT: toRaw(dictRefs.ZT.value) || [],
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
const getList = () => {
|
||||
const data = { ...queryParams, st: '', et: '', alarmflag: alarmflag.value, jzbz: jzbz.value, }
|
||||
if (queryParams.times && queryParams.times.length) {
|
||||
data.st = queryParams.times[0]
|
||||
data.et = queryParams.times[1]
|
||||
data.st = queryParams.times[0] + ' 00:00:00'
|
||||
data.et = queryParams.times[1] + ' 23:59:59'
|
||||
} else {
|
||||
return ElMessage.error('日期时间段不能为空');
|
||||
}
|
||||
@ -874,6 +775,7 @@ const getList = () => {
|
||||
tableRefs.value.setCurrentRow(res.rows[0])
|
||||
rowHandle(res.rows[0])
|
||||
} else {
|
||||
Info.value = {}
|
||||
rightTableData.value = []
|
||||
bottomTableData.value = []
|
||||
}
|
||||
@ -901,12 +803,7 @@ function adjustTableHeight() {
|
||||
}
|
||||
|
||||
|
||||
const formatDict = (v: string, dictType: string) => {
|
||||
if (v == undefined) return;
|
||||
return (
|
||||
dictData.value[dictType]?.find(item => item.value == v.trim())?.label || v
|
||||
);
|
||||
};
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
@ -199,7 +199,7 @@ onMounted(() => {
|
||||
hosList.value = res.rows.map((item: any) => {
|
||||
return {
|
||||
label: item.hospitalName,
|
||||
value: item.hospitalCode
|
||||
value: item.hospitalId.toString()
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
@ -140,7 +140,7 @@ onMounted(() => {
|
||||
hosList.value = res.rows.map((item: any) => {
|
||||
return {
|
||||
label: item.hospitalName,
|
||||
value: item.hospitalCode
|
||||
value: item.hospitalId.toString(),
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user