Compare commits

...

2 Commits

Author SHA1 Message Date
98894a3582 Merge branch 'main' of http://47.97.125.165:8902/jiangs/lis8.0-vue3 2026-01-09 17:19:51 +08:00
8a337223f6 条码打印 2026-01-09 17:19:49 +08:00
6 changed files with 134 additions and 52 deletions

View File

@ -35,6 +35,14 @@ export function fetchCodeExec(query?: Object) {
params: query,
});
}
// 执行条码
export function printSendSample(query?: Object) {
return request({
url: '/zyreq/printSendSample',
method: 'post',
data: query,
});
}
// 获取申请单主表信息
export function fetchCodeReqmain(query?: Object) {
return request({

View File

@ -22,7 +22,11 @@
<!-- 动态渲染列 -->
<template v-for="(column, i) in columns" :key="`${column.field}-${i}`">
<vxe-column type="checkbox" width="40" align="center" v-if="column.type == 'selection'" />
<vxe-column type="seq" width="40" :title="column.title || '序号'" align="center" v-if="column.type == 'seq'" />
<vxe-column width="40" align="center" :title="column.title || '序号'" v-if="column.type == 'seq'">
<template #default="scope">
{{ scope.row._index }}
</template>
</vxe-column>
<vxe-column v-bind="column" v-if="column.field">
<!-- 自定义列模板 -->
<template v-if="column.slotName" #default="scope">
@ -160,7 +164,12 @@ onMounted(() => {
});
// 监听数据变化时重置当前行
watch(() => props.tableData, () => {
watch(() => props.tableData, (newVal) => {
// 自定义索引
props.tableData.forEach((item: any, index) => {
item._index = index + 1
})
currentRow.value = null
})

View File

@ -53,7 +53,7 @@ export const constantRoutes = [{
hidden: true
},
{
path: '/checkCode',
path: '/zycx/checkCode',
component: () => import('@/views/checkCode/index'),
hidden: true
},

View File

@ -7,7 +7,7 @@
<el-form-item label="日期:" prop="failed1">
<el-date-picker v-model="queryParams.times" type="datetimerange" range-separator="-"
start-placeholder="开始时间" end-placeholder="结束时间" format="YYYY-MM-DD HH:mm:ss"
value-format="YYYY-MM-DD HH:mm:ss" @change="handletime" style="width: 25rem;" />
value-format="YYYY-MM-DD HH:mm:ss" @change="handletime" style="width: 28rem;" />
</el-form-item>
<!-- <el-form-item label="医疗机构:" prop="yljg">
@ -16,7 +16,7 @@
</el-select>
</el-form-item> -->
<el-form-item label="条码状态:" prop="zt">
<el-select v-model="queryParams.zt" placeholder="请选择" style="width: 8rem;">
<el-select v-model="queryParams.zt" placeholder="请选择" style="width: 8rem;" clearable>
<el-option v-for="item in dictData.ST" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</el-form-item>
@ -64,16 +64,16 @@
</el-col>
<!-- <el-col :span="1.5">
<el-button type="warning" :size="aotuSize" plain>打印机设置</el-button>
</el-col>
</el-col>-->
<el-col :span="1.5">
<el-button type="warning" :size="aotuSize" plain>清单打印</el-button>
</el-col> -->
<el-button type="warning" :size="aotuSize" plain @click="sendSampleHandle">清单打印</el-button>
</el-col>
<!-- <right-toolbar v-model:showSearch="showSearch" @updateColumns="updateColumns" @queryTable="handleQuery"
:columns="columns"></right-toolbar> -->
</el-row>
<CustomVxeTable :table-data="tableData" :loading="loading" :columns="columns"
:row-config="{ isHover: true, keyField: 'ybh' }" @current-change="rowHandle" size="small"
:row-config="{ isHover: true, keyField: '_index' }" @current-change="rowHandle" size="small"
:row-style="rowClassNameHd" :cell-style="cellStyleHd" class="mytable-style" ref="tableRef"
:scrollYConfig="{ enabled: true, rSize: 30, height: '100%', }" @selection-change="selectionChange"
:config="tableConfig" :enable-column-drag="true" @column-drag-end="handleColumnDragEnd">
@ -153,7 +153,9 @@
</template>
</CustomTable>
</el-dialog>
<el-dialog v-model="previewShow" title="预览" width="90vw" :close-on-click-modal="false">
<iFrame v-if="pdfUrl" :src="pdfUrl" />
</el-dialog>
</div>
</template>
@ -165,20 +167,27 @@ import CustomTable from '@/components/elTable/index.vue'
import CustomVxeTable from '@/components/vxeTable/index.vue'
import { useRouter, useRoute } from 'vue-router'
import { usePrintStore } from '@/store/modules/printStore'
import { fetchCodeList, addObj, fetchCodeDetail, fetchCodeExec, fetchCodeReqmain } from '@/api/checkCode/index'
import { fetchCodeList, addObj, fetchCodeDetail, fetchCodeExec, fetchCodeReqmain, printSendSample } from '@/api/checkCode/index'
const aotuSize = classCom.useAutoSize();
//@ts-ignore
import useUserStore from '@/store/modules/user'
// @ts-ignore
import iFrame from "@/components/iFrame/index.vue";
//@ts-ignore
import { comDict } from '@/utils/dict'
import { ElMessage, ElMessageBox } from 'element-plus'
import dayjs from 'dayjs';
import { log } from 'vxe-pc-ui';
const router = useRouter()
const route = useRoute()
const userStore = useUserStore()
const printStore = usePrintStore();
//@ts-ignore
const { proxy } = getCurrentInstance();
const compactForm = ref<HTMLElement | null>(null);
const heightForm = ref(90);
const { lis_req_type } = proxy.useDict("lis_req_type"); //参数类别
const dialogVisible = ref(false)
const title = ref('采样登记')
const sqhText = ref('')
@ -230,6 +239,10 @@ const options = [
label: '通过床号搜索',
},
]
const previewShow = ref(false)
const pdfUrl = ref('')
interface DictData {
SX?: Array<any>;
HOS?: Array<any>;
@ -303,9 +316,13 @@ const cellStyleHd = ({ row, column, rowIndex, columnIndex }: {
color: textColor,
};
}
if (column.title == "状态") {
const bgColor = lis_req_type.value.find((item: any) => item.value == row.zt.trim())?.elTagClass || '#FFF';
return {
backgroundColor: `${bgColor} !important`,
};
}
};
const rowClassNameHd = ({ row, rowIndex }: {
row: any;
rowIndex: number;
@ -550,6 +567,19 @@ const cancelHandle = () => {
}
const sendSampleHandle = () => {
const selections = tableRef.value.allSelection()
if (selections.length <= 0) return ElMessage.warning('请选择数据!')
const arr = selections.map((item: any) => { return item.sqh });
printSendSample(arr).then((res: any) => {
if (res.code == 0) {
const url = res.data
if (!url) return ElMessage.warning('未查询到文件')
pdfUrl.value = `data:application/pdf;base64,${url}`
previewShow.value = true
}
})
}
onMounted(async () => {
@ -559,10 +589,10 @@ onMounted(async () => {
// 计算前6天的日期(当天 + 前6天 = 7天)
const startOfWeek = today.subtract(6, 'day');
const startDate = route.query.startdate ? String(route.query.startdate) : startOfWeek.format('YYYY-MM-DD HH:mm:ss');
const endDate = route.query.endate ? String(route.query.endate) : today.format('YYYY-MM-DD HH:mm:ss');
// const startDate = route.query.startdate ? String(route.query.startdate) : startOfWeek.format('YYYY-MM-DD HH:mm:ss');
// const endDate = route.query.endate ? String(route.query.endate) : today.format('YYYY-MM-DD HH:mm:ss');
queryParams.times = [startDate, endDate];
// queryParams.times = [startDate, endDate];
queryParams.ksdh = (route.query.deptcode as string) ? (route.query.deptcode as string) : '';
queryParams.userid = (route.query.userid as string) ? (route.query.userid as string) : '';
queryParams.yljg = (route.query.yljg as string) ? (route.query.yljg as string) : '1';
@ -642,7 +672,8 @@ const getList = () => {
et: queryParams.times[1],
yljg: queryParams.yljg,
queryType: queryParams.queryType,
queryValue: queryParams.queryValue
queryValue: queryParams.queryValue,
zt: queryParams.zt
}
if (!data.yljg) return ElMessage.warning('医疗机构不能为空!')

View File

@ -5,7 +5,7 @@
<el-row :gutter="5" class="compact-form" v-show="showSearch">
<el-form :model="queryParams" ref="queryRef" label-width="100px" :rules="queryRules" style="width: 100%;">
<el-row>
<el-col :span="5">
<el-col :span="6">
<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"
@ -23,21 +23,19 @@
<el-col :span="5">
<el-form-item label="科室:" prop="ksdh">
<SelectTable v-model:data="queryParams.ksdh" :fields="ksdhFields" :tableData="dictData.DP || []"
label="label" value="value" objKey="value" :border="true" placeholder="请选择科室"
@getDataValue="handleQuery" />
label="label" value="value" objKey="value" placeholder="请选择科室" @getDataValue="handleQuery" />
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="病人类型:" prop="brlyname">
<SelectTable v-model:data="queryParams.brlyname" :fields="brlxFields" :tableData="dictData.PT || []"
label="label" value="label" objKey="label" :border="true" placeholder="请选择科室"
@getDataValue="handleQuery" />
label="label" value="label" objKey="label" placeholder="请选择" @getDataValue="handleQuery" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="5">
<el-col :span="6">
<el-form-item label-width="50px">
<el-checkbox v-model="queryParams.alarmflag" label="仅危急值" @change="alarmHandle" size="large" />
<el-checkbox v-model="queryParams.jzbz" label="仅急诊" @change="jzbzHandle" size="large" />
@ -61,7 +59,7 @@
@clear="handleQuery" />
</el-form-item>
</el-col>
<el-col :span="4">
<el-col :span="3">
<el-form-item label-width="50px">
<el-button icon="search" type="primary" @click="handleQuery">
搜索
@ -73,7 +71,7 @@
</el-form>
</el-row>
</div>
<el-row :gutter="20">
<el-row :gutter="15">
<el-col :span="16" class="right-table">
<el-row :gutter="10" class="mb8 mt10">
<el-col :span="1.5">
@ -89,11 +87,8 @@
:columns="columns"></right-toolbar> -->
</el-row>
<!-- <CustomTable ref="tableRefs" :data="tableData" :columns="columns" :config="tableConfig" :loading="loading"
@selection-change="selectionChange" @row-click="rowHandle" :enableColumnDrag="true"
@column-drag-end="handleColumnDragEnd"> -->
<CustomVxeTable :table-data="tableData" :loading="loading" :columns="columns"
:row-config="{ isHover: true, keyField: 'ybh' }" @current-change="rowHandle" size="small"
:row-config="{ isHover: true, keyField: '_index' }" @current-change="rowHandle" size="small"
:scrollYConfig="{ enabled: true, rSize: 30, height: '100%', }" class="mytable-style" ref="tableRefs"
:cell-style="cellStyleHd" @selection-change="selectionChange" :config="tableConfig" :enable-column-drag="true"
@column-drag-end="handleColumnDragEnd">
@ -329,7 +324,6 @@ const selectionChange = (selection: any) => {
const rightTableRef = ref()
const rowHandle = (row: any) => {
console.log('row==>', row);
if (row.yqdl == '细菌仪') {
rightColumns.value[1].visible = false
rightColumns.value[2].visible = true
@ -557,7 +551,7 @@ const xmRow = ref<any>({})
// 查询抗生素
const xmrowHandle = (row: any) => {
xmRow.value = row
expertComment.value = row.textresult ?? ''
expertComment.value = row?.textresult || ''
const data = {
jyrq: Info.value.jyrq,
yq: Info.value.yq,

View File

@ -14,7 +14,7 @@
</el-col>
<el-col :span="16">
<span class="tips">靶值列表</span> &nbsp;
<el-button type="primary" plain>复制第一个开始日期到每日项目</el-button>
<el-button type="primary" plain @click="dateClick">复制第一个开始日期到每个项目</el-button>
</el-col>
</el-row>
</div>
@ -30,18 +30,46 @@
</el-col>
<el-col :span="16" class="table-col">
<div style="height:59%" class="mb8">
<CustomTable ref="leftTableRef" :data="topTableData" :columns="topColumns" @row-click="rowClick"
:config="{ border: true, highlightCurrentRow: true, height: '100%' }">
<CustomVxeTable ref="topTableRef" class="mytable-style" :table-data="topTableData" :columns="topColumns"
@current-change="rowClick" :row-config="{ isHover: true, keyField: 'xmdh' }"
:scrollYConfig="{ enabled: true, rSize: 30, height: '100%', }">
<template #xmdh="{ row }">
{{ row.xmdh }} {{ row.xmmc }}
</template>
<template #qcuselog="{ row }">
<el-checkbox :model-value="row.qcuselog == 1" readonly></el-checkbox>
<template #zkbz="{ row }">
<el-input v-model="row.zkbz" class="full-width-input" />
</template>
<template #qcusepos="{ row }">
<el-checkbox :model-value="row.qcusepos == 1" readonly></el-checkbox>
<template #sd="{ row }">
<el-input v-model="row.sd" class="full-width-input" />
</template>
</CustomTable>
<template #cv="{ row }">
<el-input v-model="row.cv" class="full-width-input" />
</template>
<template #bc="{ row }">
<el-input v-model="row.bc" class="full-width-input" />
</template>
<template #ksrq="{ row }">
<el-date-picker v-model="row.ksrq" type="date" value-format="YYYY-MM-DD" class="full-width-input"
style="width:100%" />
</template>
<template #stopdate="{ row }">
<el-date-picker v-model="row.stopdate" type="date" value-format="YYYY-MM-DD" class="full-width-input"
style="width:100%" />
</template>
<template #ff="{ row }">
<el-select v-model="row.ff" placeholder="请选择" class="full-width-input">
<!-- <el-option /> -->
</el-select>
</template>
<template #sjph="{ row }">
<el-select v-model="row.sjph" placeholder="请选择" class="full-width-input">
<!-- <el-option /> -->
</el-select>
</template>
<template #qccv="{ row }">
<el-input v-model="row.qccv" class="full-width-input" />
</template>
</CustomVxeTable>
</div>
<div style="height:40%">
<CustomTable ref="rightTableRef" :data="bottomTableData" :columns="bottomColumns" :enableColumnDrag="true"
@ -113,6 +141,7 @@
<script setup lang="ts">
import { queryBatch, queryQcSample, queryBatchXm } from '@/api/liswork/qualityControl'
import { templateRef } from '@vueuse/core'
import { ElMessage } from 'element-plus'
const yq = defineModel<string>()
@ -153,18 +182,18 @@ const columns = ref([
{ title: '备注', field: 'bk', resizable: true, align: 'center', width: 100 },
{ title: '仪器', field: 'yq', resizable: true, align: 'center', },
])
const topTableData = ref([])
const topTableData: any = ref([])
const topColumns = [
{ label: '项目代号', prop: 'xmdh', visible: true, slot: 'xmdh', width: 150 },
{ label: '靶值', prop: 'zkbz', visible: true, align: 'center', },
{ label: 'Sd', prop: 'sd', visible: true, align: 'center', },
{ label: 'Cv', prop: 'cv', visible: true, align: 'center', },
{ label: '开始日期', prop: 'ksrq', visible: true, align: 'center', },
{ label: '结束日期', prop: 'stopdate', visible: true, align: 'center', },
{ label: '波长', prop: 'bc', visible: true, align: 'center', },
{ label: '方法', prop: 'ff', visible: true, align: 'center', },
{ label: '试剂', prop: 'sjph', visible: true, align: 'center', },
{ label: '目标CV(%)', prop: 'qccv', visible: true, align: 'center', },
{ title: '项目代号', field: 'xmdh', resizable: true, slotName: 'xmdh', width: 150 },
{ title: '靶值', field: 'zkbz', resizable: true, align: 'center', slotName: 'zkbz' },
{ title: 'Sd', field: 'sd', resizable: true, align: 'center', slotName: 'sd' },
{ title: 'Cv', field: 'cv', resizable: true, align: 'center', slotName: 'cv' },
{ title: '开始日期', field: 'ksrq', resizable: true, align: 'center', slotName: 'ksrq', width: 100 },
{ title: '结束日期', field: 'stopdate', resizable: true, align: 'center', slotName: 'stopdate', width: 100 },
{ title: '波长', field: 'bc', resizable: true, align: 'center', slotName: 'bc', },
{ title: '方法', field: 'ff', resizable: true, align: 'center', slotName: 'ff', },
{ title: '试剂', field: 'sjph', resizable: true, align: 'center', slotName: 'sjph', },
{ title: '目标CV(%)', field: 'qccv', resizable: true, align: 'center', slotName: 'qccv', width: 80 },
]
const bottomTableData = ref([])
const bottomColumns = ref([
@ -195,6 +224,13 @@ const rowClick = (row: any) => {
})
}
const dateClick = () => {
if (!topTableData.value[0].ksrq) return
topTableData.value.forEach((item: any) => {
item.ksrq = topTableData.value[0].ksrq
})
}
const addHandle = () => {
visible.value = true
}
@ -231,7 +267,7 @@ const getBatchList = () => {
const getXmList = () => {
queryBatchXm({ yq: yq.value, }).then((res: any) => {
topTableData.value = res.data
rowClick(topTableData.value[0])
// rowClick(topTableData.value[0])
})
}
@ -265,4 +301,8 @@ watch(yq, (val) => {
height: 100%;
}
}
:deep(.el-input__prefix) {
display: none;
}
</style>