2025-11-11 18:17:47 +08:00
|
|
|
|
<template>
|
|
|
|
|
|
<div class="app-container">
|
|
|
|
|
|
<div class="compact-form">
|
|
|
|
|
|
<el-form :model="queryParams" ref="queryRef" label-width="5rem" style="width: 100%;" :size="aotuSize">
|
|
|
|
|
|
<el-row :gutter="10">
|
|
|
|
|
|
<el-col :span="5">
|
2025-11-12 18:17:02 +08:00
|
|
|
|
<el-form-item label="委托机构:" prop="SrcHospName">
|
|
|
|
|
|
<SelectTable v-model:data="queryParams.srcHospName" :fields="ksdhFields" :tableData="hosList"
|
|
|
|
|
|
label="label" :size="aotuSize" value="value" objKey="value" :border="true" placeholder="请选择委托机构" />
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="5">
|
|
|
|
|
|
<el-form-item label="检测医院:" prop="DstHospName">
|
|
|
|
|
|
<SelectTable v-model:data="queryParams.DstHospName" :fields="ksdhFields" :tableData="hosList"
|
|
|
|
|
|
label="label" :size="aotuSize" value="label" objKey="label" :border="true" placeholder="请选择" />
|
2025-11-11 18:17:47 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
2025-11-12 18:17:02 +08:00
|
|
|
|
|
2025-11-11 18:17:47 +08:00
|
|
|
|
<el-col :span="5">
|
2025-11-12 18:17:02 +08:00
|
|
|
|
<el-form-item label="条码号:" prop="Barcode">
|
2025-11-11 18:17:47 +08:00
|
|
|
|
<el-input v-model="queryParams.barcode" placeholder="请输入条码号" clearable @change="handleQuery" />
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="5">
|
2025-11-12 18:17:02 +08:00
|
|
|
|
<el-form-item label="姓名:" prop="PatName">
|
2025-11-11 18:17:47 +08:00
|
|
|
|
<el-input v-model="queryParams.patName" placeholder="请输入姓名" clearable @change="handleQuery" />
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="5">
|
2025-11-12 18:17:02 +08:00
|
|
|
|
<el-form-item label="申请项目:" prop="checkPUR">
|
|
|
|
|
|
<el-input v-model="queryParams.checkPUR" placeholder="请输入申请项目" clearable @change="handleQuery" />
|
2025-11-11 18:17:47 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
2025-11-12 18:17:02 +08:00
|
|
|
|
|
2025-11-11 18:17:47 +08:00
|
|
|
|
<el-col :span="5">
|
2025-11-12 18:17:02 +08:00
|
|
|
|
<el-form-item label="时间类型:" prop="DateType">
|
|
|
|
|
|
<el-select v-model="queryParams.DateType" placeholder="请选择">
|
|
|
|
|
|
<el-option label="登记时间" value="登记时间" />
|
|
|
|
|
|
<el-option label="采样时间" value="采样时间" />
|
|
|
|
|
|
<el-option label="送出时间" value="送出时间" />
|
|
|
|
|
|
<el-option label="签收时间" value="签收时间" />
|
2025-11-11 18:17:47 +08:00
|
|
|
|
</el-select>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
|
|
|
|
<el-col :span="5">
|
|
|
|
|
|
<el-form-item label="日期:" prop="times">
|
|
|
|
|
|
<el-date-picker v-model="queryParams.times" type="daterange" range-separator="-" start-placeholder="开始时间"
|
|
|
|
|
|
end-placeholder="结束时间" format="YYYY-MM-DD" value-format="YYYY-MM-DD" />
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="4">
|
2025-11-12 18:17:02 +08:00
|
|
|
|
<el-button type="primary" @click="handleQuery">查询</el-button>
|
|
|
|
|
|
<el-button @click="resetHandle">重置</el-button>
|
2025-11-11 18:17:47 +08:00
|
|
|
|
</el-col>
|
|
|
|
|
|
</el-row>
|
|
|
|
|
|
</el-form>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
2025-11-12 18:17:02 +08:00
|
|
|
|
<div class="cz_box">
|
|
|
|
|
|
<el-row :gutter="10">
|
|
|
|
|
|
<el-col :span="1.5"> 送检医院:</el-col>
|
|
|
|
|
|
<el-col :span="3">
|
|
|
|
|
|
<SelectTable v-model:data="queryParams.DstHospName" :fields="ksdhFields" :tableData="hosList" label="label"
|
|
|
|
|
|
:size="aotuSize" value="label" objKey="label" :border="true" placeholder="请选择" />
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="1.5"> <el-button type="primary">标本送检</el-button></el-col>
|
|
|
|
|
|
<el-col :span="1.5"> <el-button type="primary">取消送检</el-button></el-col>
|
|
|
|
|
|
</el-row>
|
2025-11-11 18:17:47 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<CustomTable ref="tableRefs" :data="tableData" :columns="columns" :config="tableConfig" :pagination="pagination">
|
2025-11-12 18:17:02 +08:00
|
|
|
|
<template #patAge="{ row }">
|
|
|
|
|
|
{{ row.patAge }}{{ row.ageUnit }}
|
|
|
|
|
|
</template>
|
|
|
|
|
|
<template #status="{ row }">
|
|
|
|
|
|
{{ formatDict(row.status, regdictList) }}
|
|
|
|
|
|
</template>
|
|
|
|
|
|
<template #patSex="{ row }">
|
|
|
|
|
|
{{ row.patSex == 1 ? '男' : '女' }}
|
|
|
|
|
|
</template>
|
2025-11-11 18:17:47 +08:00
|
|
|
|
</CustomTable>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
|
|
|
import CustomTable from '@/components/elTable/index.vue'
|
|
|
|
|
|
import { querySample } from '@/api/regional/index'
|
2025-11-12 18:17:02 +08:00
|
|
|
|
// @ts-ignore
|
|
|
|
|
|
import { listhospital } from "@/api/regional/dict/hospital.js";
|
|
|
|
|
|
// @ts-ignore
|
|
|
|
|
|
import { listregdict } from "@/api/regional/dict/regdict.js";
|
2025-11-11 18:17:47 +08:00
|
|
|
|
import SelectTable from '@/components/SelectTable/index.vue';
|
|
|
|
|
|
import { classCom } from '@/utils/classCom';
|
|
|
|
|
|
const aotuSize = classCom.useAutoSize();
|
|
|
|
|
|
|
2025-11-12 18:17:02 +08:00
|
|
|
|
const queryParams: any = ref({
|
|
|
|
|
|
pageSize: 50,
|
|
|
|
|
|
pageNum: 1,
|
|
|
|
|
|
Status: '30'
|
|
|
|
|
|
})
|
2025-11-11 18:17:47 +08:00
|
|
|
|
const tableData: any = ref([])
|
|
|
|
|
|
const columns: any = ref([
|
|
|
|
|
|
{ type: 'selection', align: 'center', visible: true, },
|
|
|
|
|
|
{ prop: 'barcode', label: '条码号', align: 'center', visible: true, },
|
2025-11-12 18:17:02 +08:00
|
|
|
|
{ prop: 'srcHospName', label: '委托机构', align: 'center', visible: true, width: 200 },
|
|
|
|
|
|
{ prop: 'patName', label: '姓名', align: 'center', visible: true, width: 60 },
|
|
|
|
|
|
{ prop: 'patSex', label: '性别', align: 'center', visible: true, width: 60, slot: "patSex" },
|
|
|
|
|
|
{ prop: 'patAge', label: '年龄', align: 'center', visible: true, slot: "patAge", width: 60 },
|
|
|
|
|
|
{ prop: 'checkPUR', label: '申请项目', align: 'center', visible: true, width: 200 },
|
2025-11-11 18:17:47 +08:00
|
|
|
|
{ prop: 'sampleTypeName', label: '标本类型名称', align: 'center', visible: true, },
|
2025-11-12 18:17:02 +08:00
|
|
|
|
{ prop: 'status', label: '标本状态', align: 'center', visible: true, slot: "status" },
|
|
|
|
|
|
{ prop: 'affirmUserName', label: '采样人', align: 'center', visible: true, },
|
|
|
|
|
|
{ prop: 'affirmTime', label: '采样时间', align: 'center', visible: true, width: 150 },
|
2025-11-11 18:17:47 +08:00
|
|
|
|
{ prop: 'affirmTime', label: '送检时间', align: 'center', visible: true, },
|
|
|
|
|
|
{ prop: 'dstHospName', label: '检测机构名称', align: 'center', visible: true, },
|
|
|
|
|
|
])
|
|
|
|
|
|
const tableConfig = ref({
|
|
|
|
|
|
border: true, // 边框
|
2025-11-12 18:17:02 +08:00
|
|
|
|
height: '70vh', // 高度
|
2025-11-11 18:17:47 +08:00
|
|
|
|
highlightCurrentRow: true, // 高亮当前行
|
|
|
|
|
|
// fit: true, // 列宽自适应
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
const pagination = ref({
|
|
|
|
|
|
show: true,
|
|
|
|
|
|
total: 0,
|
|
|
|
|
|
pageSize: 50,
|
|
|
|
|
|
currentPage: 1,
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
const ksdhFields = ref([
|
|
|
|
|
|
{ prop: 'label', label: '名称', enablePinyinSearch: true },
|
|
|
|
|
|
{ prop: 'value', label: '代号', width: 80, enablePinyinSearch: true },
|
|
|
|
|
|
])
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-11-12 18:17:02 +08:00
|
|
|
|
const barcodes = ref([])
|
|
|
|
|
|
const handleSelectionChange = (val: any) => {
|
|
|
|
|
|
barcodes.value = val.map((item: any) => item.barcode)
|
|
|
|
|
|
}
|
|
|
|
|
|
const currentChange = (page: { currentPage: number, pageSize: number }) => {
|
|
|
|
|
|
queryParams.value.pageNum = page.currentPage
|
|
|
|
|
|
handleQuery()
|
|
|
|
|
|
}
|
|
|
|
|
|
const sizeChange = (page: { currentPage: number, pageSize: number }) => {
|
|
|
|
|
|
queryParams.value.pageSize = page.pageSize
|
|
|
|
|
|
handleQuery()
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-11-11 18:17:47 +08:00
|
|
|
|
|
|
|
|
|
|
const handleQuery = () => {
|
2025-11-12 18:17:02 +08:00
|
|
|
|
if (queryParams.value.times && queryParams.value.times.length > 0) {
|
|
|
|
|
|
queryParams.value.DateStart = queryParams.value.times[0]
|
|
|
|
|
|
queryParams.value.DateEnd = queryParams.value.times[1]
|
|
|
|
|
|
} else {
|
|
|
|
|
|
queryParams.value.DateStart = ''
|
|
|
|
|
|
queryParams.value.DateEnd = ''
|
|
|
|
|
|
}
|
2025-11-11 18:17:47 +08:00
|
|
|
|
|
2025-11-12 18:17:02 +08:00
|
|
|
|
getList()
|
|
|
|
|
|
}
|
|
|
|
|
|
const resetHandle = () => {
|
|
|
|
|
|
queryParams.value = {
|
|
|
|
|
|
pageSize: 50,
|
|
|
|
|
|
pageNum: 1,
|
|
|
|
|
|
Status: '30'
|
|
|
|
|
|
}
|
|
|
|
|
|
handleQuery()
|
|
|
|
|
|
}
|
2025-11-11 18:17:47 +08:00
|
|
|
|
const getList = () => {
|
2025-11-12 18:17:02 +08:00
|
|
|
|
querySample(queryParams.value).then((res: any) => {
|
|
|
|
|
|
tableData.value = res.rows
|
|
|
|
|
|
pagination.value.total = res.total
|
|
|
|
|
|
})
|
2025-11-11 18:17:47 +08:00
|
|
|
|
}
|
2025-11-12 18:17:02 +08:00
|
|
|
|
const hosList = ref([])
|
|
|
|
|
|
const regdictList: any = ref([])
|
|
|
|
|
|
onMounted(() => {
|
|
|
|
|
|
getList()
|
|
|
|
|
|
listhospital().then((res: any) => {
|
|
|
|
|
|
hosList.value = res.rows.map((item: any) => {
|
|
|
|
|
|
return {
|
|
|
|
|
|
label: item.hospitalName,
|
|
|
|
|
|
value: item.hospitalCode
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
listregdict({ pageSize: 100, pageNum: 1, dictType: 'ZT' }).then((res: any) => {
|
|
|
|
|
|
regdictList.value = res.rows;
|
|
|
|
|
|
})
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
const formatDict = (v: string, arr: Array<any>) => {
|
|
|
|
|
|
return arr.find((item: any) => item.dictCode == v)?.dictName || v;
|
|
|
|
|
|
};
|
2025-11-11 18:17:47 +08:00
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
|
|
|
.compact-form {
|
|
|
|
|
|
.el-form-item {
|
|
|
|
|
|
margin-bottom: 5px;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.btns {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
justify-content: space-around;
|
|
|
|
|
|
|
|
|
|
|
|
&>button {
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
margin-left: 0;
|
|
|
|
|
|
margin-bottom: 5px;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2025-11-12 18:17:02 +08:00
|
|
|
|
|
|
|
|
|
|
.cz_box {
|
|
|
|
|
|
padding: .3125rem 0;
|
|
|
|
|
|
border-top: 1px solid #ccc;
|
|
|
|
|
|
}
|
2025-11-11 18:17:47 +08:00
|
|
|
|
</style>
|