2026-04-30 18:00:47 +08:00
|
|
|
|
<template>
|
|
|
|
|
|
<div class="app-container ">
|
|
|
|
|
|
<el-row :gutter="20" class="top-area">
|
|
|
|
|
|
<el-col :span="16" class="top-left-col">
|
|
|
|
|
|
<el-form :model="queryForm" label-width="100px" class="query-form">
|
|
|
|
|
|
<el-row :gutter="16">
|
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
|
<el-form-item label="样本日期:">
|
|
|
|
|
|
<el-date-picker v-model="queryForm.jyrq" type="date" format="YYYY-MM-DD" value-format="YYYY-MM-DD"
|
|
|
|
|
|
placeholder="选择日期" style="width: 100%" />
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
|
<el-form-item label="组别:">
|
2026-07-03 18:03:45 +08:00
|
|
|
|
<SelectTable v-model:data="queryForm.yqz" :tableData="instrGroupOptions" placeholder=""
|
|
|
|
|
|
@getDataValue="handleinstrGroupChange" />
|
2026-04-30 18:00:47 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
|
<el-form-item label="检验仪器:">
|
2026-07-03 18:03:45 +08:00
|
|
|
|
<SelectTable v-model:data="queryForm.yq" :tableData="instrOptions" clearable placeholder=""
|
|
|
|
|
|
@getDataValue="" />
|
2026-04-30 18:00:47 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
</el-row>
|
|
|
|
|
|
<el-row :gutter="16">
|
|
|
|
|
|
<el-col :span="8">
|
2026-07-03 18:03:45 +08:00
|
|
|
|
<el-form-item label="标本号:">
|
|
|
|
|
|
<el-input v-model="queryForm.ybh" placeholder="可以输入如:1,2,5-6等格式" clearable />
|
2026-04-30 18:00:47 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
|
<el-form-item label="病人类型:">
|
2026-07-03 18:03:45 +08:00
|
|
|
|
<SelectTable v-model:data="queryForm.brly" :tableData="dictData.PT" placeholder="" />
|
2026-04-30 18:00:47 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
|
<el-form-item label="科室:">
|
2026-07-03 18:03:45 +08:00
|
|
|
|
<SelectTable v-model:data="queryForm.ksdh" :tableData="dictData.DP" placeholder="" />
|
2026-04-30 18:00:47 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
|
|
|
<el-row :gutter="16">
|
|
|
|
|
|
<el-form-item label="打印顺序:" class="print-order-item">
|
2026-07-03 18:03:45 +08:00
|
|
|
|
<el-radio-group v-model="queryForm.sorttype">
|
2026-04-30 18:00:47 +08:00
|
|
|
|
<el-radio v-for="order in printOrders" :key="order.value" :label="order.value">
|
|
|
|
|
|
{{ order.label }}
|
|
|
|
|
|
</el-radio>
|
|
|
|
|
|
</el-radio-group>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-row>
|
|
|
|
|
|
</el-form>
|
2026-05-13 17:50:49 +08:00
|
|
|
|
<div>
|
2026-07-03 18:03:45 +08:00
|
|
|
|
<el-button type="primary" icon="search" @click="searchHandle">查询</el-button>
|
|
|
|
|
|
<el-button type="warning" icon="Printer" :loading="printLoading" plain @click="printHandle">打印</el-button>
|
2026-05-13 17:50:49 +08:00
|
|
|
|
</div>
|
2026-04-30 18:00:47 +08:00
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="8" class="top-right-col">
|
|
|
|
|
|
<div class="option-panel">
|
|
|
|
|
|
<div class="option-title">过滤选项</div>
|
2026-07-03 18:03:45 +08:00
|
|
|
|
<el-row :gutter="12" class="option-list">
|
|
|
|
|
|
<el-col :span="12" v-for="option in optionItems">
|
|
|
|
|
|
<el-checkbox v-model="queryForm[option.key]" :label="option.label" :true-value="1" :false-value="0"
|
|
|
|
|
|
:disabled="option.disabled" />
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
</el-row>
|
2026-04-30 18:00:47 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="bottom-card mt10">
|
2026-07-03 18:03:45 +08:00
|
|
|
|
<el-table :data="tableData" border style="width: 100%" height="100%" v-loading="loading">
|
|
|
|
|
|
<el-table-column label="样本号" prop="ybh" width="120" align="center" />
|
|
|
|
|
|
<el-table-column label="病人姓名" prop="brxm" width="120" align="center" />
|
|
|
|
|
|
<el-table-column label="病人类型" prop="brly" width="120" align="center">
|
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
|
{{ formatDict(scope.row.brly, 'PT') }}
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
<el-table-column label="科室" prop="ksdh" width="200" align="center">
|
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
|
{{ formatDict(scope.row.ksdh, 'DP') }}
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
<el-table-column label="床号" prop="ch" width="120" />
|
|
|
|
|
|
<el-table-column label="消息提示" prop="cp_msg">
|
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
|
<span v-if="scope.row.flag == 0" style="color:#f00"> {{ scope.row.cp_msg }} </span>
|
|
|
|
|
|
<span> {{ scope.row.cp_msg }} </span>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
</el-table>
|
2026-04-30 18:00:47 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
|
|
|
import { getComDicts } from '@/api/liswork/dict/ComDict';
|
|
|
|
|
|
import { getGroupInstrdList } from '@/api/liswork/work/LisWork';
|
2026-07-03 18:03:45 +08:00
|
|
|
|
import dayjs from 'dayjs';
|
|
|
|
|
|
import { queryBatchPrintService, batchPrintAll } from '@/api/liswork/batch/index';
|
|
|
|
|
|
import { getDictData, formatDict, dictData } from '@/hooks'
|
|
|
|
|
|
import { useCommonStore } from '@/store/modules/commonStore';
|
|
|
|
|
|
import { ElMessage, ElNotification } from 'element-plus';
|
|
|
|
|
|
import { classCom } from '@/utils/classCom';
|
|
|
|
|
|
const mbStore = useCommonStore();
|
2026-04-30 18:00:47 +08:00
|
|
|
|
|
|
|
|
|
|
const queryForm = reactive({
|
2026-07-03 18:03:45 +08:00
|
|
|
|
jyrq: dayjs().format('YYYY-MM-DD'),
|
|
|
|
|
|
yqz: '',
|
|
|
|
|
|
yq: mbStore.defaultConfig.defaultinstr || '',
|
2026-04-30 18:00:47 +08:00
|
|
|
|
ybh: '',
|
|
|
|
|
|
brly: '',
|
|
|
|
|
|
ksdh: '',
|
2026-07-03 18:03:45 +08:00
|
|
|
|
sorttype: 1,
|
|
|
|
|
|
notbrly: null,
|
|
|
|
|
|
notksdh: null,
|
|
|
|
|
|
pcyx: null,
|
|
|
|
|
|
dyyx: null,
|
|
|
|
|
|
nobrxm: null,
|
|
|
|
|
|
nocsjg: null,
|
|
|
|
|
|
fzdy: null,
|
|
|
|
|
|
dybz: null,
|
|
|
|
|
|
jgbz: null,
|
|
|
|
|
|
jgbz2: 1,
|
2026-04-30 18:00:47 +08:00
|
|
|
|
});
|
|
|
|
|
|
|
2026-07-03 18:03:45 +08:00
|
|
|
|
const printLoading = ref(false);
|
|
|
|
|
|
const loading = ref(false);
|
|
|
|
|
|
|
2026-04-30 18:00:47 +08:00
|
|
|
|
const tableData = ref([]);
|
|
|
|
|
|
|
|
|
|
|
|
const printOrders = ref([
|
2026-07-03 18:03:45 +08:00
|
|
|
|
{ label: '样本号', value: 1 },
|
|
|
|
|
|
{ label: '科室+床号+样本号', value: 2 },
|
|
|
|
|
|
{ label: '病人类型+科室+床号+样本号', value: 3 },
|
|
|
|
|
|
{ label: '病人类型+科室+样本号', value: 4 },
|
|
|
|
|
|
{ label: '阳性结果', value: 5 }
|
2026-04-30 18:00:47 +08:00
|
|
|
|
]);
|
|
|
|
|
|
|
2026-07-03 18:03:45 +08:00
|
|
|
|
const optionItems = ref([
|
|
|
|
|
|
{ key: 'notbrly', label: '排除选择的病人类型', disabled: false },
|
|
|
|
|
|
{ key: 'notksdh', label: '排除选择的科室', disabled: false },
|
|
|
|
|
|
{ key: 'pcyx', label: '排除阴性报告', disabled: false },
|
|
|
|
|
|
{ key: 'dyyx', label: '仅打印阳性报告', disabled: false },
|
|
|
|
|
|
{ key: 'nobrxm', label: '无病人姓名不打印', disabled: false },
|
|
|
|
|
|
{ key: 'nocsjg', label: '无检验结果不打印', disabled: false },
|
|
|
|
|
|
{ key: 'fzdy', label: '分组打印报告', disabled: false },
|
|
|
|
|
|
{ key: 'dybz', label: '打印未打印报告', disabled: false },
|
|
|
|
|
|
{ key: 'jgbz', label: '打印未审核报告', disabled: true },
|
|
|
|
|
|
{ key: 'jgbz2', label: '打印已审核报告', disabled: true }
|
|
|
|
|
|
])
|
|
|
|
|
|
// 查询
|
|
|
|
|
|
const searchHandle = () => {
|
|
|
|
|
|
if (!queryForm.yq) return ElMessage.warning('检验仪器不能为空!')
|
|
|
|
|
|
loading.value = true
|
|
|
|
|
|
queryForm.jyrq = dayjs(queryForm.jyrq).format('YYYY-MM-DD') + ' 00:00:00'
|
|
|
|
|
|
queryBatchPrintService(queryForm).then((res) => {
|
|
|
|
|
|
loading.value = false
|
|
|
|
|
|
if (res.code == 0) {
|
|
|
|
|
|
tableData.value = res.data
|
|
|
|
|
|
} else {
|
|
|
|
|
|
tableData.value = []
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
2026-04-30 18:00:47 +08:00
|
|
|
|
}
|
2026-07-03 18:03:45 +08:00
|
|
|
|
// 打印
|
2026-05-13 17:50:49 +08:00
|
|
|
|
const printHandle = () => {
|
2026-07-03 18:03:45 +08:00
|
|
|
|
if (!tableData.value.length) return ElMessage.warning('样本打印数据为空')
|
|
|
|
|
|
printLoading.value = true
|
|
|
|
|
|
batchPrintAll(queryForm).then((res) => {
|
|
|
|
|
|
printLoading.value = false
|
|
|
|
|
|
if (res.code == 0) {
|
|
|
|
|
|
classCom.printBase64PDF(res.data.base64data)
|
|
|
|
|
|
tableData.value = res.data.printflag
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
2026-04-30 18:00:47 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const handleinstrGroupChange = () => {
|
|
|
|
|
|
queryForm.yq = ''
|
|
|
|
|
|
getYqConfig()
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const instrGroupOptions = ref<{ value: string, label: string }[]>([])
|
|
|
|
|
|
const instrOptions = ref<{ value: string, label: string }[]>([])
|
|
|
|
|
|
|
|
|
|
|
|
const getYqConfig = () => {
|
2026-07-03 18:03:45 +08:00
|
|
|
|
getGroupInstrdList({ lisgroup: queryForm.yqz })
|
2026-04-30 18:00:47 +08:00
|
|
|
|
.then((res: any) => {
|
|
|
|
|
|
if (res.code == 0) {
|
|
|
|
|
|
instrOptions.value = res.data.map((item: any) => ({
|
|
|
|
|
|
value: item.yq.trim(),
|
|
|
|
|
|
label: item.yqmc
|
|
|
|
|
|
}))
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
onMounted(() => {
|
|
|
|
|
|
getComDicts({ zdlb: 'GROUP' }).then((res: any) => {
|
|
|
|
|
|
instrGroupOptions.value = res.data.map((item: any) => ({
|
|
|
|
|
|
value: item.zddh.trim(),
|
|
|
|
|
|
label: item.zdmc
|
|
|
|
|
|
}))
|
|
|
|
|
|
instrGroupOptions.value.push({ value: 'ALL', label: '所有仪器' })
|
|
|
|
|
|
getYqConfig()
|
2026-07-03 18:03:45 +08:00
|
|
|
|
|
|
|
|
|
|
getDictData('PT', 'DP')
|
2026-04-30 18:00:47 +08:00
|
|
|
|
});
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<style scoped lang="scss">
|
2026-07-03 18:03:45 +08:00
|
|
|
|
.app-container {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-04-30 18:00:47 +08:00
|
|
|
|
.query-form {
|
|
|
|
|
|
.el-form-item {
|
|
|
|
|
|
margin-bottom: 10px;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.option-panel {
|
|
|
|
|
|
padding: 5px 12px;
|
|
|
|
|
|
background: #f8fbff;
|
|
|
|
|
|
border: 1px solid #d9e8fb;
|
|
|
|
|
|
border-radius: 8px;
|
|
|
|
|
|
|
|
|
|
|
|
.option-title {
|
|
|
|
|
|
position: relative;
|
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
|
font-weight: 700;
|
|
|
|
|
|
padding-left: 10px;
|
|
|
|
|
|
|
|
|
|
|
|
&::before {
|
|
|
|
|
|
content: '';
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
left: 0;
|
|
|
|
|
|
top: 3px;
|
|
|
|
|
|
width: 4px;
|
|
|
|
|
|
height: 16px;
|
|
|
|
|
|
border-radius: 2px;
|
|
|
|
|
|
background: #3282F6;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.bottom-card {
|
|
|
|
|
|
border-top: 1px solid #d9e8fb;
|
2026-07-03 18:03:45 +08:00
|
|
|
|
padding: 10px 0;
|
|
|
|
|
|
flex: 1;
|
|
|
|
|
|
overflow: hidden;
|
2026-04-30 18:00:47 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.action-buttons {
|
|
|
|
|
|
text-align: center;
|
|
|
|
|
|
}
|
|
|
|
|
|
</style>
|