批量审核界面
This commit is contained in:
parent
c09b7dc5f8
commit
a150feb640
@ -27,3 +27,12 @@ export function cancelBatchCheckService(data: any) {
|
||||
data,
|
||||
});
|
||||
}
|
||||
|
||||
//获取检验结果明细数据
|
||||
export function queryBatchCheckDetailService(query: any) {
|
||||
return request({
|
||||
url: "/batchCheck/queryDetailResult",
|
||||
method: "get",
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
@ -27,7 +27,7 @@ const props = withDefaults(defineProps<{
|
||||
data: ''
|
||||
})
|
||||
|
||||
const instrOptions = ref<Array<{ yq: string; yqmc: string }>>([]);
|
||||
const instrOptions = ref<Array<{ yq: string; yqmc: string; yqdl: string }>>([]);
|
||||
|
||||
const fields = ref(
|
||||
[
|
||||
@ -48,6 +48,7 @@ const getYqConfig = () => {
|
||||
instrOptions.value = res.data.map((item: any) => ({
|
||||
yq: item.yq.trim(),
|
||||
yqmc: item.yqmc,
|
||||
yqdl: item.yqdl,
|
||||
lisgroupid: item.lisgroup
|
||||
}))
|
||||
}
|
||||
|
||||
@ -15,7 +15,5 @@ export function displayBRNL(nl: string | number, nldw: string) {
|
||||
if (nl === "" || nl === null || nl === undefined) {
|
||||
return "";
|
||||
}
|
||||
return (
|
||||
nl + (nldw === "1" ? "岁" : nldw === "2" ? "月" : nldw === "3" ? "天" : "")
|
||||
);
|
||||
return nl + (nldw === "1" ? "岁" : nldw === "2" ? "月" : nldw === "3" ? "天" : "");
|
||||
}
|
||||
|
||||
46
src/views/liswork/batchCheck/LabResult.vue
Normal file
46
src/views/liswork/batchCheck/LabResult.vue
Normal file
@ -0,0 +1,46 @@
|
||||
<!-- 检验明细 -->
|
||||
<template>
|
||||
<div>
|
||||
<CustomTable ref="tableRef" :data="tableData" :columns="columns" :config="tableConfig">
|
||||
</CustomTable>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { queryBatchCheckDetailService } from '@/api/liswork/batchCheck/batchCheckApi'
|
||||
|
||||
const tableData = ref([])
|
||||
const columns = ref([
|
||||
{ prop: 'xmdh', label: '项目代号', visible: true, align: 'center' },
|
||||
{ prop: 'xmmc', label: '项目名称', visible: true, align: 'center', width: 120 },
|
||||
{ prop: 'csjg', label: '检验结果', visible: true, align: 'center', width: 150 },
|
||||
{ prop: 'refs', label: '参考值', visible: true, align: 'center', width: 100 },
|
||||
{ prop: 'dw', label: '单位', visible: true, align: 'center', width: 80 },
|
||||
{ prop: 'od', label: 'OD值', visible: true, align: 'center', width: 150 },
|
||||
{ prop: 'cutoff', label: 'Cutoff值', visible: true, align: 'center', width: 150 },
|
||||
])
|
||||
|
||||
const tableConfig = ref({
|
||||
border: true, // 边框
|
||||
height: 'calc(100vh - 220px)', // 高度,
|
||||
highlightCurrentRow: true, // 高亮当前行
|
||||
})
|
||||
|
||||
const paramObj = defineModel<any>()
|
||||
|
||||
const getData = async (params: any) => {
|
||||
const res = await queryBatchCheckDetailService(params)
|
||||
tableData.value = res.data.labResultList || []
|
||||
}
|
||||
|
||||
|
||||
watch(() => paramObj.value, (newVal) => {
|
||||
if (newVal) {
|
||||
// 根据传入的参数获取数据
|
||||
getData(newVal)
|
||||
}
|
||||
}, { immediate: true })
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
||||
52
src/views/liswork/batchCheck/LabResultMed.vue
Normal file
52
src/views/liswork/batchCheck/LabResultMed.vue
Normal file
@ -0,0 +1,52 @@
|
||||
<!-- 药敏结果界面 -->
|
||||
<template>
|
||||
<div>
|
||||
<CustomTable ref="tableRefUp" :data="tableDataUp" :columns="columnsUp" :config="tableConfig" />
|
||||
<CustomTable ref="tableRefDown" :data="tableDataDown" :columns="columnsDown" :config="tableConfig" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { queryBatchCheckDetailService } from '@/api/liswork/batchCheck/batchCheckApi'
|
||||
|
||||
|
||||
const tableDataUp = ref([])
|
||||
const tableDataDown = ref([])
|
||||
const columnsUp = ref([
|
||||
{ prop: 'xmmc', label: '细菌', visible: true, align: 'center', width: 150 },
|
||||
{ prop: 'od', label: '菌落计数', visible: true, align: 'center' },
|
||||
{ prop: 'csjg', label: '检验结果', visible: true, align: 'center', width: 100 },
|
||||
])
|
||||
const columnsDown = ref([
|
||||
{ prop: 'ywmc', label: '抗生素', visible: true, align: 'center' },
|
||||
{ prop: 'csjg', label: '测试结果', visible: true, align: 'center', width: 80 },
|
||||
{ prop: 'jgbz', label: '结果标志', visible: true, align: 'center', width: 80 },
|
||||
{ prop: 'mic', label: 'mic', visible: true, align: 'center', width: 50 },
|
||||
{ prop: 'rad', label: 'rad', visible: true, align: 'center' },
|
||||
|
||||
])
|
||||
const tableConfig = ref({
|
||||
border: true, // 边框
|
||||
height: 'calc((100vh - 220px)/2)', // 高度,
|
||||
highlightCurrentRow: true, // 高亮当前行
|
||||
})
|
||||
|
||||
const paramObj = defineModel<any>()
|
||||
|
||||
const getData = async (params: any) => {
|
||||
const res = await queryBatchCheckDetailService(params)
|
||||
tableDataDown.value = res.data.labResultMedList || []
|
||||
tableDataUp.value = res.data.labResultList || []
|
||||
}
|
||||
|
||||
|
||||
watch(() => paramObj.value, (newVal) => {
|
||||
if (newVal) {
|
||||
// 根据传入的参数获取数据
|
||||
getData(newVal)
|
||||
}
|
||||
}, { immediate: true })
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
||||
@ -1,36 +1,35 @@
|
||||
<!-- 批量审核 -->
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form ref="form" :model="formData" class="form" label-width="80px" :rules="rules" inline inline-message
|
||||
size="small">
|
||||
<el-form-item label="仪器分组" prop="lisgroup" size="small">
|
||||
<SelectTable v-model:data="formData.lisgroup" :fields="fields" width="100px" dict-type="GROUP" />
|
||||
<el-form ref="form" :model="formData" class="form" label-width="80px" :rules="rules" inline size="small">
|
||||
<el-form-item label="仪器分组" prop="lisgroup">
|
||||
<SelectTable v-model:data="formData.lisgroup" size="small" :fields="fields" width="150px" dict-type="GROUP" />
|
||||
</el-form-item>
|
||||
<el-form-item label="医疗机构" prop="yljg">
|
||||
<SelectTable v-model:data="formData.yljg" :fields="fields" width="200px" dict-type="HOS" />
|
||||
<SelectTable v-model:data="formData.yljg" size="small" :fields="fields" width="150px" dict-type="HOS" />
|
||||
</el-form-item>
|
||||
<el-form-item label="申请科室" prop="ksdh">
|
||||
<SelectTable v-model:data="formData.ksdh" :fields="fields" width="200px" dict-type="DP" />
|
||||
<SelectTable v-model:data="formData.ksdh" size="small" :fields="fields" width="150px" dict-type="DP" />
|
||||
</el-form-item>
|
||||
<el-form-item label="检验仪器" prop="yq">
|
||||
<YQSelectTable v-model:data="formData.yq" width="200px" clearable @get-data-value="getList"></YQSelectTable>
|
||||
<YQSelectTable v-model:data="formData.yq" size="small" width="150px" clearable @get-data-value="getYQList" />
|
||||
</el-form-item>
|
||||
<el-form-item label="检验医师" prop="yhdh">
|
||||
<el-input placeholder="请填写检验医师" v-model="formData.yhdh" width="150px"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="病人来源" prop="brly">
|
||||
<SelectTable v-model:data="formData.brly" size="small" :fields="fields" width="150px" dict-type="PT" />
|
||||
</el-form-item>
|
||||
<el-form-item label="标本日期" prop="jyrq">
|
||||
<el-date-picker v-model="formData.jyrq1" type="date" style="width: 150px;" /> - <el-date-picker
|
||||
v-model="formData.jyrq2" type="date" style="width: 150px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="检验医师" prop="yhdh">
|
||||
<el-input placeholder="请填写检验医师" v-model="formData.yhdh"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="病人来源" prop="brly">
|
||||
<SelectTable v-model:data="formData.brly" :fields="fields" width="120px" dict-type="PT" />
|
||||
</el-form-item>
|
||||
<el-form-item label="标本号" prop="ybh">
|
||||
<el-input placeholder="请输入开始标本号" v-model="formData.ybh1" style="width: 120px;"></el-input> - <el-input
|
||||
placeholder="请输入结束标本号" v-model="formData.ybh2" style="width: 120px;"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="审核标志">
|
||||
<el-select v-model="formData.jgbz" style="width: 120px" clearable>
|
||||
<el-select v-model="formData.jgbz" style="width: 150px" clearable>
|
||||
<el-option v-for="item in jgbzOption" :key="item.value" :label="item.label" :value="item.value"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@ -45,26 +44,42 @@
|
||||
</el-form>
|
||||
<h3>{{ msg }}</h3>
|
||||
<div class="table-container">
|
||||
<CustomTable ref="tableRef" :data="tableData" :columns="columns" :config="tableConfig">
|
||||
<template #jgbz="{ row }">
|
||||
<span>{{ displayJGBZ(row.jgbz) }}</span>
|
||||
</template>
|
||||
<template #brly="{ row }">
|
||||
<span>{{ formatDict(row.brly, 'PT') }}</span>
|
||||
</template>
|
||||
<template #brxb="{ row }">
|
||||
<span>{{ displayBRXB(row.brxb) }}</span>
|
||||
</template>
|
||||
<template #brnl="{ row }">
|
||||
<span>{{ displayBRNL(row.nl, row.nldw) }}</span>
|
||||
</template>
|
||||
<template #ksdh="{ row }">
|
||||
<span>{{ formatDict(row.ksdh, 'DP') }}</span>
|
||||
</template>
|
||||
<template #sjys="{ row }">
|
||||
<span>{{ formatDict(row.sjys, 'SRD') }}</span>
|
||||
</template>
|
||||
</CustomTable>
|
||||
<el-row :gutter="0">
|
||||
<el-col :span="18">
|
||||
<CustomTable ref="tableRef" :data="tableData" :columns="columns" :config="tableConfig"
|
||||
v-on:row-click="tableRowClick">
|
||||
<template #jgbz="{ row }">
|
||||
<span>{{ displayJGBZ(row.jgbz) }}</span>
|
||||
</template>
|
||||
<template #brly="{ row }">
|
||||
<span>{{ formatDict(row.brly, 'PT') }}</span>
|
||||
</template>
|
||||
<template #brxb="{ row }">
|
||||
<span>{{ displayBRXB(row.brxb) }}</span>
|
||||
</template>
|
||||
<template #brnl="{ row }">
|
||||
<span>{{ displayBRNL(row.nl, row.nldw) }}</span>
|
||||
</template>
|
||||
<template #ksdh="{ row }">
|
||||
<span>{{ formatDict(row.ksdh, 'DP') }}</span>
|
||||
</template>
|
||||
<template #sjys="{ row }">
|
||||
<span>{{ formatDict(row.sjys, 'SRD') }}</span>
|
||||
</template>
|
||||
<template #yblx="{ row }">
|
||||
<span>{{ formatDict(row.yblx, 'BT') }}</span>
|
||||
</template>
|
||||
<template #dybz="{ row }">
|
||||
<span>{{ row.dybz === "1" ? "已打印" : "未打印" }}</span>
|
||||
</template>
|
||||
</CustomTable>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<LabResult v-model="paramObj" v-if="!isXJY" />
|
||||
<LabResultMed v-model="paramObj" v-if="isXJY" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@ -77,6 +92,11 @@ import { batchCheckService, queryBatchCheckListService, cancelBatchCheckService
|
||||
import dayjs from 'dayjs';
|
||||
import { formatDict, getDictData } from '@/hooks'
|
||||
import { displayBRNL, displayBRXB } from '@/utils/czUtil/lisUtil'
|
||||
//@ts-ignore
|
||||
import useUserStore from '@/store/modules/user';
|
||||
import LabResult from './LabResult.vue';
|
||||
import LabResultMed from './LabResultMed.vue';
|
||||
|
||||
|
||||
const formData = ref({
|
||||
lisgroup: '', //仪器分组
|
||||
@ -96,6 +116,9 @@ const tableRef = ref();
|
||||
const form = ref();
|
||||
const msg = ref('') //审核后结果显示
|
||||
const tableData = ref()
|
||||
const userStore = useUserStore()
|
||||
const paramObj = ref<any>(null) // 用于传递给 LabResult 组件的参数对象
|
||||
const isXJY = ref(false)
|
||||
const columns = ref([
|
||||
{ type: 'selection', title: '选择', visible: true, align: 'center', width: 40 },
|
||||
{ prop: 'jgbz', label: '审核标志', visible: true, align: 'center', slot: 'jgbz' },
|
||||
@ -111,13 +134,13 @@ const columns = ref([
|
||||
{ prop: 'ksdh', label: '科室', visible: true, align: 'center', slot: 'ksdh' },
|
||||
{ prop: 'ch', label: '床号', visible: true, align: 'center' },
|
||||
{ prop: 'sjys', label: '送检医生', visible: true, align: 'center', slot: 'sjys' },
|
||||
{ prop: 'sqsj', label: '申请时间', visible: true, align: 'center', width: 150 },
|
||||
{ prop: 'cysj', label: '采样时间', visible: true, align: 'center', width: 150 },
|
||||
{ prop: 'sqsj', label: '送检时间', visible: true, align: 'center', width: 150 },
|
||||
{ prop: 'cyrq', label: '采样时间', visible: true, align: 'center', width: 150 },
|
||||
{ prop: 'yhdhmc', label: '检验医师', visible: true, align: 'center' },
|
||||
{ prop: 'dysj', label: '报告日期', visible: true, align: 'center', width: 150 },
|
||||
{ prop: 'yblx', label: '样本', visible: true, align: 'center' },
|
||||
{ prop: 'yblx', label: '样本类型', visible: true, align: 'center', slot: 'yblx' },
|
||||
{ prop: 'hdysmc', label: '核对医生', visible: true, align: 'center' },
|
||||
{ prop: 'dybz', label: '打印标志', visible: true, align: 'center' },
|
||||
{ prop: 'dybz', label: '打印标志', visible: true, align: 'center', slot: 'dybz' },
|
||||
{ prop: 'zd', label: '临床诊断', visible: true, align: 'center' },
|
||||
{ prop: 'bz', label: '备注', visible: true, align: 'center' },
|
||||
{ prop: 'confirmermc', label: '审核人', visible: true, align: 'center' },
|
||||
@ -207,9 +230,8 @@ const checkData = async () => {
|
||||
const selected = tableRef.value?.getSelectionRows
|
||||
? tableRef.value.getSelectionRows()
|
||||
: (tableRef.value?.tableRef?.getSelectionRows ? tableRef.value.tableRef.getSelectionRows() : [])
|
||||
|
||||
const paramList = (selected || []).map((item: any) => ({
|
||||
userId: "",
|
||||
userId: userStore.name || '',
|
||||
yq: String(item.yq).trim(),
|
||||
jyrq: dayjs(item.jyrq).format('YYYY-MM-DD HH:mm:ss'),
|
||||
ybh: item.ybh,
|
||||
@ -219,8 +241,6 @@ const checkData = async () => {
|
||||
msg.value = '请先选择要审核的行'
|
||||
return
|
||||
}
|
||||
|
||||
console.log(paramList)
|
||||
const ret = await batchCheckService(paramList)
|
||||
if (ret && ret.code === 200) {
|
||||
msg.value = '审核成功:' + ret.msg
|
||||
@ -229,15 +249,43 @@ const checkData = async () => {
|
||||
}
|
||||
|
||||
const cancelCheck = async () => {
|
||||
const paramList = tableRef.value.getSelectedRows()
|
||||
const selected = tableRef.value?.getSelectionRows
|
||||
? tableRef.value.getSelectionRows()
|
||||
: (tableRef.value?.tableRef?.getSelectionRows ? tableRef.value.tableRef.getSelectionRows() : [])
|
||||
const paramList = (selected || []).map((item: any) => ({
|
||||
userId: userStore.name || '',
|
||||
yq: String(item.yq).trim(),
|
||||
jyrq: dayjs(item.jyrq).format('YYYY-MM-DD HH:mm:ss'),
|
||||
ybh: item.ybh,
|
||||
}))
|
||||
|
||||
if (!paramList.length) {
|
||||
msg.value = '请先选择要审核的行'
|
||||
return
|
||||
}
|
||||
const ret = await cancelBatchCheckService(paramList)
|
||||
if (ret.code === 200) {
|
||||
getList()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const tableRowClick = (row: any) => {
|
||||
paramObj.value = {
|
||||
yq: String(row.yq).trim(),
|
||||
jyrq: dayjs(row.jyrq).format('YYYY-MM-DD'),
|
||||
ybh: row.ybh,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const getYQList = (val: { yq: string; yqmc: string; yqdl: string } | null) => {
|
||||
isXJY.value = String(val?.yqdl ?? '').trim() === '细菌仪';
|
||||
console.log('选择的仪器大类:', val?.yqdl, '是否是细菌仪:', isXJY.value)
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
getDictData('DP', 'SRD')
|
||||
getDictData('DP', 'SRD', 'BT', 'PT')
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user