右键功能菜单

This commit is contained in:
wyuu 2025-11-06 09:20:22 +08:00
parent 0c77a93fb3
commit 817aceee78
13 changed files with 506 additions and 74 deletions

View File

@ -386,5 +386,45 @@ export function changeLinkList(query?: Object) {
data: query data: query
}) })
} }
// 清除所有未做项目
export function clearnotComplete(query?: Object) {
return request({
url: '/liswork/clearnotcomplete',
method: 'get',
params: query
})
}
// 查看备份数据
export function viewBackup(query?: Object) {
return request({
url: '/liswork/viewbackup',
method: 'get',
params: query
})
}
// 未建项目结果
export function noiteMresult(query?: Object) {
return request({
url: '/liswork/noitemresult',
method: 'get',
params: query
})
}
// 项目与通道号对照
export function setitemInter(query?: Object) {
return request({
url: '/liswork/setiteminter',
method: 'get',
params: query
})
}
// 清除打印标志
export function clearPrintflag(query?: Object) {
return request({
url: '/liswork/clearprintflag',
method: 'get',
params: query
})
}

View File

@ -173,6 +173,32 @@ aside {
} }
} }
.compact-form {
flex: 1;
position: relative;
height: 100%;
overflow-y: auto;
overflow-x: hidden;
.el-form-item {
margin-bottom: 0px;
}
.el-form-item__label {
padding-bottom: 0px;
color: #08355E;
font-size: 12px;
}
// pointer-events: none;
:deep(.el-radio__label) {
color: #08355E;
}
}
.filter-container { .filter-container {
padding-bottom: 10px; padding-bottom: 10px;

View File

@ -172,6 +172,10 @@
padding: 0 !important; padding: 0 !important;
} }
.el-table--default .cell {
padding: 0 !important;
}
.el-table__cell { .el-table__cell {
padding: 0 !important; padding: 0 !important;
height: 30px; height: 30px;
@ -231,6 +235,10 @@
background-color: #dfdcdc !important; background-color: #dfdcdc !important;
} }
.el-select-dropdown__item.is-hovering {
background-color: #a4beef !important;
}
.el-input.is-disabled .el-input__wrapper { .el-input.is-disabled .el-input__wrapper {
background-color: #dfdcdc !important; background-color: #dfdcdc !important;
} }

View File

@ -115,14 +115,17 @@ const handleKeyDown = (e: KeyboardEvent) => {
onMounted(() => { onMounted(() => {
document.addEventListener('click', handleClickOutside); // 关闭所有菜单
document.addEventListener('keydown', handleKeyDown);
emitter.on('closeAllContextMenus', () => { emitter.on('closeAllContextMenus', () => {
if (visible.value) { if (visible.value) {
hideMenu(); hideMenu();
} }
}); });
document.addEventListener('click', handleClickOutside);
document.addEventListener('keydown', handleKeyDown);
}); });
// 卸载时移除事件监听 // 卸载时移除事件监听

View File

@ -3,8 +3,8 @@
<!-- 字典选择弹窗 --> <!-- 字典选择弹窗 -->
<el-dialog v-model="dialogVisible" :title="dialogTitle" width="30vw" :close-on-click-modal="false" :draggable="true" <el-dialog v-model="dialogVisible" :title="dialogTitle" width="30vw" :close-on-click-modal="false" :draggable="true"
@close="handleDialogClose"> @close="handleDialogClose">
<el-input v-model="searchKey" placeholder="搜索(支持名称、编码、简拼)..." class="mb10" clearable @clear="filterDictData" <el-input ref="inputRef" v-model="searchKey" placeholder="搜索(支持名称、编码、简拼)..." class="mb10" clearable
@input="filterDictData" /> @clear="filterDictData" @input="filterDictData" />
<el-table :data="filteredDictData" height="300px" border @row-dblclick="selectItem" highlight-current-row> <el-table :data="filteredDictData" height="300px" border @row-dblclick="selectItem" highlight-current-row>
<el-table-column prop="value" label="编码" align="center" width="150" /> <el-table-column prop="value" label="编码" align="center" width="150" />
@ -100,7 +100,7 @@ const filterDictData = () => {
}); });
}; };
const inputRef = ref()
// 关键修改:打开弹窗时重新加载数据 // 关键修改:打开弹窗时重新加载数据
const openDictSelector = async () => { const openDictSelector = async () => {
if (props.disabled || isDictLoading.value) { if (props.disabled || isDictLoading.value) {
@ -113,6 +113,11 @@ const openDictSelector = async () => {
// 数据加载完成后再显示弹窗 // 数据加载完成后再显示弹窗
dialogVisible.value = true; dialogVisible.value = true;
searchKey.value = ''; searchKey.value = '';
nextTick(() => {
setTimeout(() => {
inputRef.value.focus();
}, 100);
});
filterDictData(); filterDictData();
}; };

View File

@ -1,7 +1,7 @@
<template> <template>
<div> <div>
<el-dialog :title="dialogTitle" v-model="csjgVisible" width="300px" :close-on-click-modal="false" :draggable="true"> <el-dialog :title="dialogTitle" v-model="csjgVisible" width="300px" :close-on-click-modal="false" :draggable="true">
<el-input v-model="searchKey" :placeholder="placeholder" size="small" class="mb10" clearable <el-input ref="inputRef" v-model="searchKey" :placeholder="placeholder" size="small" class="mb10" clearable
@clear="filterDictData" @input="filterDictData" /> @clear="filterDictData" @input="filterDictData" />
<el-table :data="filterData" max-height="300px" border @row-dblclick="selectItem" highlight-current-row <el-table :data="filterData" max-height="300px" border @row-dblclick="selectItem" highlight-current-row
@ -85,9 +85,15 @@ const processTableData = (data: object[]) => {
}); });
}; };
const inputRef = ref()
const open = () => { const open = () => {
csjgVisible.value = true; csjgVisible.value = true;
nextTick(() => {
searchKey.value = '';
setTimeout(() => {
inputRef.value.focus();
}, 100);
});
}; };
defineExpose({ defineExpose({

View File

@ -101,7 +101,6 @@ const cancel = () => {
const handleChange = (value: string) => { const handleChange = (value: string) => {
props.formValue.userName = props.userList.find((item: any) => item.userName == value)?.nickName props.formValue.userName = props.userList.find((item: any) => item.userName == value)?.nickName
console.log(' props.userList==>', props.userList);
}; };

View File

@ -321,7 +321,6 @@ const selectionChange = (selection: any) => {
const rightTableRef = ref() const rightTableRef = ref()
const rowHandle = (row: any) => { const rowHandle = (row: any) => {
console.log('row==>', row);
timelineItems.value = timelineItems.value =
[ [
{ title: '检验申请', time: row.sqsj }, { title: '检验申请', time: row.sqsj },

View File

@ -112,8 +112,9 @@ const lastJgbz = ref();
const sqhValue = ref(''); // 条码号 const sqhValue = ref(''); // 条码号
const sqhRef = ref(); const sqhRef = ref();
watch(() => props.labPat, (newVal) => { watch(() => props.labPat, (newVal) => {
// console.log('newVal==>', newVal);
lastValue.value = JSON.stringify(newVal); lastValue.value = JSON.stringify(newVal);
lastJgbz.value = newVal.jgbz; lastJgbz.value = newVal?.jgbz;
sqhValue.value = ''; sqhValue.value = '';
}) })

View File

@ -47,7 +47,7 @@
</template> </template>
<template #fslx="{ row }"> <template #fslx="{ row }">
<el-checkbox :model-value="row.dybz === '1'" readonly /> <el-checkbox :model-value="row.fslx === '1'" readonly />
</template> </template>
<template #yljg="{ row }"> <template #yljg="{ row }">
@ -128,7 +128,7 @@ const closeHandle = () => {
} }
const contextMenuItems = computed<ContextMenuItem[]>(() => [ const contextMenuItems = computed<ContextMenuItem[]>(() => [
{ label: '标准结果作为某标本复查结果', action: 'view' } { label: '本标本结果作其复查结果', action: 'view' }
]); ]);
const handleMenuSelect = ((item: ContextMenuItem) => { const handleMenuSelect = ((item: ContextMenuItem) => {
show.value = true show.value = true

View File

@ -205,7 +205,7 @@
<!-- 双工流水线 --> <!-- 双工流水线 -->
<el-dialog v-model="dlShow" title="双工流水线申请单列表" width="40vw" :close-on-click-modal="false" :draggable="true"> <el-dialog v-model="dlShow" title="双工流水线申请单列表" width="40vw" :close-on-click-modal="false" :draggable="true">
<div class="mb10"> <div class="mb10">
<el-button type="primary" @clcick="getDlList">刷新</el-button> <el-button type="primary" @click="getDlList">刷新</el-button>
<el-button type="primary" @click="cfHandle">重发申请单</el-button> <el-button type="primary" @click="cfHandle">重发申请单</el-button>
<el-button @click="closeHandle">取消申请单</el-button> <el-button @click="closeHandle">取消申请单</el-button>
</div> </div>
@ -224,6 +224,43 @@
<div class="mt5" style="text-align: center;color:blue;">样本总数:{{ dlTableData.length }}</div> <div class="mt5" style="text-align: center;color:blue;">样本总数:{{ dlTableData.length }}</div>
</el-dialog> </el-dialog>
<!-- 查看备份数据 -->
<ViewBackup ref="backRef" :backLabInfo="backLabInfo" :backTableData="backTableData" :userList="userList"
:dictData="dictData" />
<!-- 未建项目结果 -->
<el-dialog v-model="builtShow" title="检验结果对照" width="40vw" :close-on-click-modal="false" :draggable="true">
<div class="tips mb10">字典中不存在项目</div>
<el-row :gutter="10">
<el-col :span="16">
<el-table :data="builtTableData" height="50vh" border show-overflow-tooltip>
<el-table-column label="接口/通道号" prop="xmdh" />
<el-table-column label="结果" prop="csjg" />
<el-table-column label="对应检验项目" width="180">
<template #default="{ row }">
<el-select v-model="row.xmdh0" placeholder="" filterable @change="" size="small"
class="full-width-input">
<el-option v-for="item in builtOptions" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</template>
</el-table-column>
</el-table>
</el-col>
<el-col :span="8">
<div class="tips">
提示:<br />
如果结果就是某个检验项目的结果,请在“对应检验项目”列表中直接选择进行对照。<br />
如果不是,<br />
请选择菜单“字典”一>“检验项目”进入检验维护作业后点击按钮<br />
自动加载”加入项目。<br />
</div>
<div class="btns_box">
<div class="btn" @click="cpHandle">存盘</div>
<div class="btn" @click="builtShow = false">退出</div>
<div class="btn" @lcick="clearProHandle">清除未做</div>
</div>
</el-col>
</el-row>
</el-dialog>
</div> </div>
</template> </template>
@ -233,7 +270,8 @@ import { ref, toRefs, watch, nextTick, onMounted, computed } from "vue";
import userVerification from "@/components/userVerification/index.vue"; import userVerification from "@/components/userVerification/index.vue";
import { import {
check1, check2, uncheck2, unconfirmlog, checkuser, reglimit, deleteresult, changeresult, allPatquery, emrquery, datalink, changeLinkList, check1, check2, uncheck2, unconfirmlog, checkuser, reglimit, deleteresult, changeresult, allPatquery, emrquery, datalink, changeLinkList,
newresult, queryXmVal, printListwork, getresultchangelog, setinputmdl, saveResult, lockSample, unLockSample viewBackup, newresult, queryXmVal, printListwork, getresultchangelog, setinputmdl, saveResult, lockSample, unLockSample, clearnotComplete, clearPrintflag,
noiteMresult, queryXmInfo, setitemInter
} from "@/api/liswork/work/LisWork"; } from "@/api/liswork/work/LisWork";
import { ElMessageBox, ElMessage } from "element-plus"; import { ElMessageBox, ElMessage } from "element-plus";
import ProjectDetails from "@/components/projectDetails/index.vue"; import ProjectDetails from "@/components/projectDetails/index.vue";
@ -241,12 +279,10 @@ import projectsJg from "@/components/projectsjg/index.vue"
import { classCom } from '@/utils/classCom' import { classCom } from '@/utils/classCom'
import CustomTable from '@/components/elTable/index.vue' import CustomTable from '@/components/elTable/index.vue'
import dayjs from 'dayjs'; import dayjs from 'dayjs';
// @ts-ignore
import { listUser } from '@/api/system/user.js'
import emitter from "@/utils/mitt"; import emitter from "@/utils/mitt";
import { useCommonStore } from "@/store/modules/commonStore"; import { useCommonStore } from "@/store/modules/commonStore";
import ContextMenu from "@/components/contextMenu/index.vue"; import ContextMenu from "@/components/contextMenu/index.vue";
import ViewBackup from "./viewBackup.vue";
// 组件属性定义 // 组件属性定义
const props = defineProps({ const props = defineProps({
resultSysList: { type: Array, required: true }, resultSysList: { type: Array, required: true },
@ -336,7 +372,14 @@ const contextMenuItems = computed(() => [
// { label: '删除记录', action: 'delete', danger: true, shortcut: 'd', }, // { label: '删除记录', action: 'delete', danger: true, shortcut: 'd', },
{ label: '查看电子病历', action: 'emrquery', shortcut: 'E', }, { label: '查看电子病历', action: 'emrquery', shortcut: 'E', },
{ label: '查看360全景视图', action: 'patquery', shortcut: 'Y', }, { label: '查看360全景视图', action: 'patquery', shortcut: 'Y', },
{ label: '查看备份数据', action: 'viewbackup', shortcut: 'P', },
{ label: '双工流水线', action: 'datalink', shortcut: 'F', }, { label: '双工流水线', action: 'datalink', shortcut: 'F', },
{ type: 'divider' },
{ label: '解除审核', action: 'unblock', shortcut: 'C', },
{ label: '清除打印标志', action: 'clearPrint', shortcut: 'U', },
{ label: '清除所有未做项目', action: 'clearPro', shortcut: 'T', },
{ type: 'divider' },
{ label: '未建项目结果', action: 'unbuilt', shortcut: 'N', },
]); ]);
// 处理菜单选择 // 处理菜单选择
@ -364,9 +407,24 @@ const handleMenuSelect = (item) => {
case 'patquery': case 'patquery':
patqueryHandle() //360视图 patqueryHandle() //360视图
break; break;
case 'viewbackup':
viewbackupHandle() //查看备份数据
break;
case 'datalink': case 'datalink':
datalinkHandle() //流水线 datalinkHandle() //流水线
break; break;
case 'unblock':
handleCheck(3) //解除审核
break;
case 'clearPrint':
clearPrintHandle() //清除打印标志
break;
case 'clearPro':
clearProHandle() //清除所有未做项目
break;
case 'unbuilt':
unbuiltHandle() //未建项目结果
break;
case 'delete': case 'delete':
if (confirm(`确定要删除患者的记录吗?`)) { if (confirm(`确定要删除患者的记录吗?`)) {
@ -374,6 +432,98 @@ const handleMenuSelect = (item) => {
break; break;
} }
}; };
const builtShow = ref(false)
const builtTableData = ref([])
const builtOptions = ref([])
const unbuiltHandle = () => {
queryXmInfo({ yq: tableKey.value.yq }).then(res => {
if (res.code == 0) {
builtOptions.value = res.data.map(item => {
return {
value: item.xmdh,
label: item.xmdh + ' - ' + item.xmmc
}
})
}
})
noiteMresult(tableKey.value).then(res => {
builtTableData.value = res.data.map(item => {
return {
...item,
xmdh0: ''
}
})
})
builtShow.value = true
};
const cpHandle = () => {
const validItems = builtTableData.value.filter(item => item.xmdh0);
if (validItems.length === 0) {
console.log("没有需要处理的项");
return;
}
let successCount = 0;
let failCount = 0;
const requests = validItems.map((item, index) => {
return setitemInter({ ...tableKey.value, xmdh0: item.xmdh0, xmdh: item.xmdh })
.then(response => ({
index,
success: true,
data: response
}))
.catch(error => ({
index,
success: false,
error: error
}));
});
Promise.all(requests).then(results => {
results.forEach(result => {
if (result.success) {
successCount++;
// console.log(`第 ${result.index + 1} 项成功:`, result.data);
} else {
failCount++;
// console.error(`第 ${result.index + 1} 项失败:`, result.error);
}
});
// 输出统计结果
ElMessageBox.alert(
`项目与通道号对照已经完成,成功${successCount}个;失败${failCount}个。<br />你可以重新从仪器端传送一遍数据,就可以看到正确的结果了。`,
'信息',
{
dangerouslyUseHTMLString: true,
}
)
})
};
const clearPrintHandle = () => {
clearPrintflag(tableKey.value).then(res => {
if (res.code == 0) {
emits('changeStatus', labPat.value)
}
})
};
const clearProHandle = () => {
clearnotComplete(tableKey.value).then(res => {
if (res.code == 0) {
emits('fetchLabResults')
}
})
};
const mTableData = ref([]) const mTableData = ref([])
@ -420,6 +570,18 @@ const patqueryHandle = () => {
} }
}) })
}; };
const backRef = ref()
const backLabInfo = ref({})
const backTableData = ref([])
const viewbackupHandle = () => {
viewBackup(tableKey.value).then(res => {
if (res.data) {
backTableData.value = res.data.labresultbk
backLabInfo.value = res.data.labpatbk
}
})
backRef.value.openDialog()
};
const dlObj = { const dlObj = {
0: '申请发送', 0: '申请发送',
1: '已发送指令', 1: '已发送指令',
@ -526,7 +688,7 @@ const handleConfirm = (data) => {
if (res.code == 0) { if (res.code == 0) {
formRef.value?.cancel() formRef.value?.cancel()
ElMessage.success(res.msg) ElMessage.success(res.msg)
emits('fetchLabResults') emits('fetchLabResults', true)
} }
}); });
} else { } else {
@ -534,7 +696,7 @@ const handleConfirm = (data) => {
if (res.code == 0) { if (res.code == 0) {
formRef.value?.cancel() formRef.value?.cancel()
ElMessage.success(res.msg) ElMessage.success(res.msg)
emits('fetchLabResults') emits('fetchLabResults', true)
} }
}); });
} }
@ -614,7 +776,6 @@ const handleColumnDragEnd = (data) => {
}; };
const lastResult = ref({}); const lastResult = ref({});
const beforeEnter = (row) => { const beforeEnter = (row) => {
console.log('row==>', row);
const data = { const data = {
...tableKey.value, ...tableKey.value,
xmdh: row.xmdh, xmdh: row.xmdh,
@ -1083,4 +1244,43 @@ const formatDict = (v, dictType) => {
.custom-table-container { .custom-table-container {
height: 100%; height: 100%;
} }
.tips {
font-family: SourceHanSansCN, SourceHanSansCN;
}
.btns_box {
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
margin-top: 1.875rem;
.btn {
width: 80%;
height: 2.5rem;
line-height: 2.5rem;
margin-bottom: 0.5rem;
font-size: 0.9rem;
font-weight: 500;
border-radius: 0.5rem;
background-color: var(--el-color-primary);
color: var(--el-color-white);
cursor: pointer;
&:hover {
background-color: var(--el-color-primary-light-2);
}
&:last-child {
margin-bottom: 0;
}
&.disabled {
background-color: var(--el-color-primary-light-5);
cursor: not-allowed;
}
}
}
</style> </style>

View File

@ -0,0 +1,154 @@
<!-- 备份数据详情弹窗 -->
<template>
<div>
<el-dialog v-model="backShow" title="查看标本备份数据" width="35vw" :close-on-click-modal="false" :draggable="true">
<div>
<el-button type="primary">确定</el-button>
<el-button @click="backShow = false">取消</el-button>
</div>
<el-row :gutter="10">
<el-col :span="12">
<el-form :model="backLabInfo" label-width="70px" class="compact-form" label-position="right">
<el-form-item label="病人来源">
<el-col :span="14">
<SelectTable v-model:data="backLabInfo.brly" :fields="brlyFields" :tableData="dictData.PT || []"
label="label" value="value" objKey="value" :border="true" placeholder="请选择" size="small" />
</el-col>
<el-col :span="10">
<el-switch v-model="backLabInfo.jzbz" active-text="急诊" active-color="#FD0101" active-value="1"
inactive-value="0"></el-switch>
</el-col>
</el-form-item>
<el-form-item label="病 历 号">
<el-input v-model="backLabInfo.brdh" placeholder="请输入病历号" size="small" />
</el-form-item>
<el-form-item label="姓 名">
<el-input v-model="backLabInfo.brxm" placeholder="请输入姓名" size="small" />
</el-form-item>
<el-form-item label="性 别">
<el-select v-model="backLabInfo.brxb" placeholder="请选择" style="width: 100%;" size="small">
<el-option v-for="item in dictData.SX" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</el-form-item>
<el-form-item label="年龄">
<el-row :gutter="5">
<el-col :span="14">
<el-input v-model="backLabInfo.nl" placeholder="年龄" style="width:100%" size="small" />
</el-col>
<el-col :span="10">
<el-select v-model="backLabInfo.nldw" placeholder="请选择" style="width: 100%;" filterable size="small">
<el-option v-for="item in dictData.AU" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</el-col>
</el-row>
</el-form-item>
<el-form-item label="送检科室">
<SelectTable v-model:data="backLabInfo.ksdh" :fields="ksdhFields" :tableData="dictData.DP || []"
label="label" value="value" objKey="value" :border="true" placeholder="请选择" size="small" />
</el-form-item>
<el-form-item label="床 号">
<el-input v-model="backLabInfo.ch" placeholder="请输入床号" size="small" />
</el-form-item>
<el-form-item label="样本类型">
<SelectTable v-model:data="backLabInfo.yblx" :fields="ksdhFields" :tableData="dictData.BT || []"
label="label" value="value" objKey="value" :border="true" placeholder="请选择" size="small" />
</el-form-item>
<el-form-item label="申请医生">
<SelectTable v-model:data="backLabInfo.sjys" :fields="ksdhFields" :tableData="dictData.SRD || []"
label="label" value="value" objKey="value" :border="true" placeholder="请选择" size="small" />
</el-form-item>
<el-form-item label="上机时间">
<el-date-picker v-model="backLabInfo.sqsj" type="datetime" placeholder="上机时间" format="YYYY-MM-DD HH:mm:ss"
value-format="YYYY-MM-DD HH:mm:ss" size="small" style="width: 100%;" />
</el-form-item>
<el-form-item label="采样时间">
<el-date-picker v-model="backLabInfo.cyrq" type="datetime" placeholder="采样时间" format="YYYY-MM-DD HH:mm:ss"
value-format="YYYY-MM-DD HH:mm:ss" size="small" style="width: 100%;" />
</el-form-item>
<el-form-item label="报告时间">
<el-date-picker v-model="backLabInfo.dysj" type="datetime" placeholder="报告时间" format="YYYY-MM-DD HH:mm:ss"
value-format="YYYY-MM-DD HH:mm:ss" size="small" style="width: 100%;" />
</el-form-item>
<el-form-item label="临床诊断">
<el-input v-model="backLabInfo.zd" placeholder="请输入临床诊断" size="small" />
</el-form-item>
<el-form-item label="备 注">
<el-input v-model="backLabInfo.bz" placeholder="请输入备注" size="small" />
</el-form-item>
<el-form-item label="检验医生">
<SelectTable v-model:data="backLabInfo.yhdh" :fields="ysFields" :tableData="userList || []"
label="nickName" value="userName" objKey="userName" :border="true" placeholder="请选择" size="small" />
</el-form-item>
<el-form-item label="审核医生">
<SelectTable v-model:data="backLabInfo.hdys" :fields="ysFields" :tableData="userList || []"
label="nickName" value="userName" objKey="userName" :border="true" placeholder="请选择" size="small" />
</el-form-item>
<el-form-item label="审核状态">
<el-radio-group v-model="backLabInfo.jgbz">
<el-radio :label="'0'">未审核</el-radio>
<el-radio :label="'2'">已审核</el-radio>
</el-radio-group>
</el-form-item>
</el-form>
</el-col>
<el-col :span="12">
<el-table :data="backTableData" height="100%" border>
<el-table-column label="检验项目" prop="xmdh" />
<el-table-column label="检验结果" prop="csjg" />
</el-table>
</el-col>
</el-row>
</el-dialog>
</div>
</template>
<script setup lang="ts">
import SelectTable from '@/components/SelectTable/index.vue';
const props = defineProps({
backTableData: {
type: Array,
default: () => [],
},
backLabInfo: {
type: Object,
default: () => { },
},
userList: {
type: Array as PropType<object[]>,
default: () => [],
},
dictData: {
type: Object,
default: () => ({})
}
})
const brlyFields = ref([
{ prop: 'value', label: '代号', width: 80, enablePinyinSearch: true },
{ prop: 'label', label: '名称', width: 120, enablePinyinSearch: true },
])
const ksdhFields = ref([
{ prop: 'value', label: '代号', width: 80, enablePinyinSearch: true },
{ prop: 'label', label: '名称', width: 150, enablePinyinSearch: true },
])
const ysFields = ref([
{ prop: 'userName', label: '用户代号', width: 80, enablePinyinSearch: true },
{ prop: 'nickName', label: '用户姓名', width: 150, enablePinyinSearch: true },
])
const backShow = ref(false)
const backTableData = ref([])
const backLabInfo: any = ref({})
const openDialog = () => {
backShow.value = true
}
defineExpose({
openDialog
})
</script>
<style scoped></style>

View File

@ -51,9 +51,9 @@
:userList="userList" @changeStatus="changeStatus" /> :userList="userList" @changeStatus="changeStatus" />
</el-col> </el-col>
<el-col :span="16"> <el-col :span="16">
<LabResult ref="labResultRef" v-model:labPat="labPat" :tableData="labResuts" :tableKey="queryParams" <LabResult ref="labResultRef" :labPat="labPat" :tableData="labResuts" :tableKey="queryParams"
:userList="userList" :resultSysList="resultConfig" @fetchLabResults="fetchLabResults" :userList="userList" :resultSysList="resultConfig" @fetchLabResults="resultsHandle" :dictData="dictData"
:dictData="dictData" @changeStatus="changeStatus" @previewHandle="previewHandle" /> @changeStatus="changeStatus" @previewHandle="previewHandle" />
</el-col> </el-col>
</el-row> </el-row>
</div> </div>
@ -63,7 +63,7 @@
<div> <div>
<tabView :tabList="tabList" v-model:activeTab="activeTab" /> <tabView :tabList="tabList" v-model:activeTab="activeTab" />
<div class="box-shadow right_box"> <div class="box-shadow right_box">
<template v-if="activeTab == 1"> <template v-if="activeTab == 'LabPatList'">
<div class="flex-between"> <div class="flex-between">
<div> <div>
<el-button type="primary" :size="aotuSize" icon="RefreshRight" @click="fetchlabPatList">刷新</el-button> <el-button type="primary" :size="aotuSize" icon="RefreshRight" @click="fetchlabPatList">刷新</el-button>
@ -87,40 +87,12 @@
<div class="text2">未审:<span>{{ ws }}</span></div> <div class="text2">未审:<span>{{ ws }}</span></div>
<div class="text3">危:<span>{{ wjs }}</span></div> <div class="text3">危:<span>{{ wjs }}</span></div>
</div> </div>
</template>
<component :is="activeTabName" :queryParams="queryParams" :dictData="dictData" :instrOptions="instrOptions"
@fetchResults="fetchLabResults" :tablekey="queryParams" />
</template>
<!-- 历史对照 -->
<template v-if="activeTab == 2">
<History :queryParams="queryParams" />
</template>
<!-- 其他结果 -->
<template v-if="activeTab == 3">
<Others :queryParams="queryParams" :dictData="dictData" :instrOptions="instrOptions" />
</template>
<!-- 结果复查 -->
<template v-if="activeTab == 4">
<Reexamination :queryParams="queryParams" @fetchResults="fetchLabResults" :tablekey="queryParams" />
</template>
<!-- 收费信息 -->
<template v-if="activeTab == 5">
<Charge :queryParams="queryParams" :dictData="dictData" />
</template>
<!-- 组合项目 -->
<template v-if="activeTab == 6">
<Combination :queryParams="queryParams" />
</template>
<!-- 临床意义 -->
<template v-if="activeTab == 7">
<Clinical :queryParams="queryParams" />
</template>
<!-- 样本流转 -->
<template v-if="activeTab == 8">
<Sample :queryParams="queryParams" :dictData="dictData" />
</template>
<!-- 结果图形 -->
<template v-if="activeTab == 9">
<ResultGraph :queryParams="queryParams" />
</template>
</div> </div>
</div> </div>
</el-col> </el-col>
@ -177,19 +149,33 @@ const queryParams = ref({
const ybs = ref(0) const ybs = ref(0)
const ws = ref(0) const ws = ref(0)
const wjs = ref(0) const wjs = ref(0)
const activeTab = ref(1) const activeTab = ref('LabPatList')
const tabList = ref([ const tabList = ref([
{ label: '标本列表', value: 1 }, { label: '标本列表', value: 'LabPatList' },
{ label: '结果图形', value: 9 }, { label: '结果图形', value: 'ResultGraph' },
{ label: '历史对照', value: 2 }, { label: '历史对照', value: 'History' },
{ label: '其他结果', value: 3 }, { label: '其他结果', value: 'Others' },
{ label: '结果复查', value: 4 }, { label: '结果复查', value: 'Reexamination' },
{ label: '收费信息', value: 5 }, { label: '收费信息', value: 'Charge' },
{ label: '组合项目', value: 6 }, { label: '组合项目', value: 'Combination' },
{ label: '临床意义', value: 7 }, { label: '临床意义', value: 'Clinical' },
{ label: '样本流转', value: 8 }, { label: '样本流转', value: 'Sample' },
]) ])
const labPat = ref<any>({},)
const activeTabMap = {
ResultGraph,
History,
Others,
Reexamination,
Charge,
Combination,
Clinical,
Sample
}
const activeTabName = computed(() => activeTabMap[activeTab.value as keyof typeof activeTabMap] || 'LabPatList');
const labPat = ref<any>({})
const labPatList = ref<Array<{ ybh: string; jgbz: string }>>([]); const labPatList = ref<Array<{ ybh: string; jgbz: string }>>([]);
const originalLabPatList = ref([]) //原始数据 const originalLabPatList = ref([]) //原始数据
const loading = ref(false) const loading = ref(false)
@ -340,6 +326,13 @@ const getYqConfig = () => {
}) })
} }
const resultsHandle = (flag: boolean) => {
if (flag) {
fetchLabPat();
}
fetchLabResults()
}
const highlightRowIndex = ref(-1) const highlightRowIndex = ref(-1)
const labPatListRef = ref() const labPatListRef = ref()
//样本列表点击切换样本信息,同步载入左边样本信息表单和中间结果表单 //样本列表点击切换样本信息,同步载入左边样本信息表单和中间结果表单
@ -350,13 +343,13 @@ const selectJob = (job: any) => {
queryParams.value.jyrq = job.jyrq; queryParams.value.jyrq = job.jyrq;
queryParams.value.yq = job.yq.trim(); queryParams.value.yq = job.yq.trim();
queryParams.value.ybh = job.ybh; queryParams.value.ybh = job.ybh;
fetchLabPat();
fetchLabResults(); fetchLabResults();
highlightRowIndex.value = labPatList.value.findIndex((item: any) => item.ybh == queryParams.value.ybh); highlightRowIndex.value = labPatList.value.findIndex((item: any) => item.ybh == queryParams.value.ybh);
} }
const labResuts = ref([]) const labResuts = ref([])
//载入样本结果表单(中间labresult.vue组件) //载入样本结果表单(中间labresult.vue组件)
const fetchLabResults = async () => { const fetchLabResults = async () => {
fetchLabPat();
queryLabResults({ jyrq: queryParams.value.jyrq, yq: queryParams.value.yq, ybh: queryParams.value.ybh }).then((response: any) => { queryLabResults({ jyrq: queryParams.value.jyrq, yq: queryParams.value.yq, ybh: queryParams.value.ybh }).then((response: any) => {
labResuts.value = response.data; labResuts.value = response.data;
}) })
@ -365,7 +358,7 @@ const fetchLabResults = async () => {
//载入样本编辑表单(左边labpat.vue组件) //载入样本编辑表单(左边labpat.vue组件)
const fetchLabPat = () => { const fetchLabPat = () => {
queryLabPat(queryParams.value).then((response: any) => { queryLabPat(queryParams.value).then((response: any) => {
labPat.value = response.data[0]; labPat.value = response.data;
}) })
} }
@ -373,7 +366,6 @@ const lastRow: any = ref({})
const handleQuery = () => { const handleQuery = () => {
if (!labPatList.value.length) return if (!labPatList.value.length) return
// fetchlabPatList()
if (!queryParams.value.ybh) { if (!queryParams.value.ybh) {
highlightRowIndex.value = -1; highlightRowIndex.value = -1;
ElMessage.warning('请输入样本编号') ElMessage.warning('请输入样本编号')
@ -504,7 +496,7 @@ const handleNext = () => {
const changeStatus = (updatedPat: any, flag: boolean) => { const changeStatus = (updatedPat: any, flag: boolean) => {
queryLabPat(queryParams.value).then((response: any) => { queryLabPat(queryParams.value).then((response: any) => {
if (response.code == 0) { if (response.code == 0) {
labPat.value = response.data[0]; labPat.value = response.data;
const index = labPatList.value.findIndex((item: any) => item.ybh == updatedPat.ybh); const index = labPatList.value.findIndex((item: any) => item.ybh == updatedPat.ybh);
if (index !== -1) { if (index !== -1) {
labPatList.value = labPatList.value.map((item, i) => labPatList.value = labPatList.value.map((item, i) =>
@ -558,7 +550,6 @@ const fetchlabPatList = () => {
loading.value = false; loading.value = false;
if (res.data.length > 0) { if (res.data.length > 0) {
highlightRowIndex.value = 0; highlightRowIndex.value = 0;
labPat.value = res.data[0];
setTimeout(() => { labPatListRef.value.setCurrentRow(res.data[0]); }, 100) setTimeout(() => { labPatListRef.value.setCurrentRow(res.data[0]); }, 100)
selectJob(res.data[0]) selectJob(res.data[0])
getTotals() getTotals()