Compare commits

...

2 Commits

Author SHA1 Message Date
18bf54c3e4 Merge branch 'main' of http://47.97.125.165:8902/jiangs/lis8.0-vue3 2026-01-15 17:35:05 +08:00
092ab763b8 检验报告查询 2026-01-15 17:34:50 +08:00
13 changed files with 97 additions and 70 deletions

View File

@ -116,9 +116,9 @@ export function getqcval(data?: Object) {
})
}
// 保存质控数据(当天所有项目)
export function saveqcvalmonth(data?: Object) {
export function saveqcvalItem(data?: Object) {
return request({
url: '/qc/saveqcvalmonth',
url: '/qc/saveqcvalitem',
method: 'post',
data
})
@ -140,9 +140,9 @@ export function getqcvalmonth(data?: Object) {
})
}
//保存质控数据(单项目一个月)
export function saveQcvalItem(data?: Object) {
export function saveQcvalMonth(data?: Object) {
return request({
url: '/qc/saveqcvalitem',
url: '/qc/saveqcvalmonth',
method: 'post',
data
})

View File

@ -35,8 +35,8 @@
<el-table-column v-for="field in props.fields" :prop="field.prop" :label="field.label"
:width="field.width" show-overflow-tooltip align="center" />
</el-table> -->
<vxe-table class="mytable-style" ref="tableRef" border resizable highlight-current-row max-height="350px"
:row-config="{ isHover: true, keyField: 'value', height: 30 }" :data="filterData"
<vxe-table class="mytable-style" ref="tableRef" border resizable max-height="350px"
:row-config="{ isHover: true, keyField: 'value', height: 30, isCurrent: true }" :data="filterData"
:current-row="currentRow" @current-change="currentChange"
:tooltip-config="{ appendToBody: true, zIndex: 3000 }" :show-overflow="true"
:scroll-y="{ enabled: true, rSize: 30, height: '100%' }">

View File

@ -16,8 +16,7 @@
<vxe-table :data="tableData" :loading="loading" border :checkbox-config="config.checkboxConfig"
:height="scrollYConfig.height" @checkbox-change="handleCheckboxChange" :row-config="rowConfig"
:show-overflow="showOverflow" @current-change="handleRowClick" ref="tableRef" :size="size"
:current-row="currentRow" :highlight-current-row="highlightCurrentRow" :scroll-y="scrollYConfig"
:tooltip-config="{ appendToBody: true, zIndex: 3000 }"
:current-row="currentRow" :scroll-y="scrollYConfig" :tooltip-config="{ appendToBody: true, zIndex: 3000 }"
:header-cell-class-name="enableColumnDrag ? 'el-table-header-cell' : ''" v-bind="$attrs">
<!-- 动态渲染列 -->
<template v-for="(column, i) in columns" :key="`${column.field}-${i}`">
@ -74,7 +73,9 @@ const props = defineProps({
// 行配置
rowConfig: {
type: Object,
default: () => ({ isHover: true, height: 30 })
default: () => ({
isHover: true, height: 30, isCurrent: true, keyField: '_index'
})
},
// 表格配置
config: {
@ -86,7 +87,7 @@ const props = defineProps({
type: Boolean,
default: true
},
// 是否高亮当前行
// 是否高亮当前行 已废弃
highlightCurrentRow: {
type: Boolean,
default: true

View File

@ -178,6 +178,7 @@ interface OriginalItem {
yq: string | null;
ld: string | null;
zkrq: string | null;
daynum?: number | undefined;
}
// 定义原始数据的接口
@ -200,6 +201,7 @@ interface ResultItem {
xmmc: string;
sd: string;
zkbz: string;
daynum?: number | undefined;
cs1: string;
cs2: string;
cs3: string;

View File

@ -72,9 +72,8 @@
:columns="columns"></right-toolbar> -->
</el-row>
<CustomVxeTable :table-data="tableData" :loading="loading" :columns="columns"
:row-config="{ isHover: true, keyField: '_index' }" @current-change="rowHandle" size="small"
:row-style="rowClassNameHd" :cell-style="cellStyleHd" class="mytable-style" ref="tableRef"
<CustomVxeTable :table-data="tableData" :loading="loading" :columns="columns" @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">
<template #dy="{ row }">

View File

@ -87,11 +87,10 @@
:columns="columns"></right-toolbar> -->
</el-row>
<CustomVxeTable :table-data="tableData" :loading="loading" :columns="columns"
: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">
<CustomVxeTable :table-data="tableData" :loading="loading" :columns="columns" @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">
<template #dybz="{ row }">
<svg-icon v-if="row.dybz == 1" icon-class="lvgou" />
</template>
@ -357,10 +356,15 @@ const rowHandle = (row: any) => {
reportResult(data).then((res: any) => {
if (res.code == 0) {
rightTableData.value = res.data
nextTick(() => {
rightTableRef.value.setCurrentRow(res.data[0])
})
xmrowHandle(res.data[0])
if (res.data.length) {
nextTick(() => {
rightTableRef.value.setCurrentRow(res.data[0])
})
xmrowHandle(res.data[0])
} else {
bottomTableData.value = []
}
}
})
}

View File

@ -70,26 +70,17 @@
</el-form>
</el-row>
</div>
<el-row :gutter="10" class="mb8 mt10">
<el-col :span="1.5">
<el-button type="primary" plain icon="Edit" :size="aotuSize" @click="selectStatusRows">勾选所有未打印</el-button>
</el-col>
<el-col :span="1.5">
</el-col>
<el-col :span="1.5">
<el-button type="primary" plain icon="Upload" :size="aotuSize" @click="printPdf">打印报告</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="primary" plain icon="edit" :size="aotuSize" @click="editHandle">编辑</el-button>
</el-col>
</el-row>
<div class="mb8 mt10">
<el-button type="primary" plain icon="Edit" :size="aotuSize" @click="selectStatusRows">勾选所有未打印</el-button>
<el-button type="primary" plain icon="Upload" :size="aotuSize" @click="printPdf">打印报告</el-button>
<el-button type="primary" plain icon="edit" :size="aotuSize" @click="editHandle">编辑</el-button>
</div>
<el-row :gutter="15">
<el-col :span="16" class="right-table">
<CustomVxeTable :table-data="tableData" :loading="loading" :columns="columns"
: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">
<CustomVxeTable :table-data="tableData" :loading="loading" :columns="columns" @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">
<template #dybz="{ row }">
<svg-icon v-if="row.dybz == 1" icon-class="lvgou" />
</template>
@ -129,7 +120,6 @@
import { ref, reactive, toRaw, computed, watch, nextTick, onMounted } from 'vue';
import CustomTable from '@/components/elTable/index.vue'
import CustomVxeTable from '@/components/vxeTable/index.vue'
import { useRouter } from 'vue-router'
import { reportList, reportPrintPdf, reportResult, reportMedList, reportFsresult } from '@/api/checkCode/index'
import dayjs from 'dayjs';
import SelectTable from '@/components/SelectTable/index.vue';
@ -142,8 +132,10 @@ import { comDict } from '@/utils/dict'
import { usePrintStore } from '@/store/modules/printStore'
//@ts-ignore
import useUserStore from '@/store/modules/user'
import { useRoute } from 'vue-router'
import { useRoute, useRouter } from 'vue-router'
const route = useRoute()
const router = useRouter();
const aotuSize = classCom.useAutoSize();
const tableRefs = ref()
@ -242,6 +234,7 @@ const columns = ref([
{ field: 'ybh', title: '样本号', align: 'center', resizable: true, width: 60 },
{ field: 'yqmc', title: '仪器名称', align: 'center', resizable: true, width: 150 },
{ field: 'yqdl', title: '仪器', align: 'center', resizable: true, width: 100 },
])
const selectionChange = (selection: any) => {
@ -276,10 +269,15 @@ const rowHandle = (row: any) => {
reportResult(data).then((res: any) => {
if (res.code == 0) {
rightTableData.value = res.data
nextTick(() => {
rightTableRef.value.setCurrentRow(res.data[0])
})
xmrowHandle(res.data[0])
if (res.data.length) {
nextTick(() => {
rightTableRef.value.setCurrentRow(res.data[0])
})
xmrowHandle(res.data[0])
} else {
bottomTableData.value = []
}
}
})
}
@ -316,11 +314,23 @@ const printPdf = () => {
}
const editHandle = () => {
// Info.value
if (!Info.value.ybh) return
if (Info.value.yqdl == '细菌仪') {
router.push({
name: 'Micro', // 必须用 name 跳转,不能用 path
state: { // 核心:参数存在 state 中
id: 123,
name: '测试参数',
}
});
} else {
router.push({
name: 'Work',
state: {
id: 123,
name: '测试参数',
}
});
}
}
@ -549,7 +559,7 @@ onMounted(async () => {
const startDate = route.query.startdate ? String(route.query.startdate) : startOfWeek.format('YYYY-MM-DD');
const endDate = route.query.endate ? String(route.query.endate) : today.format('YYYY-MM-DD');
queryParams.times = [startDate, endDate];
// queryParams.times = [startDate, endDate];
getList()

View File

@ -1,9 +1,8 @@
<template>
<div class="table-container">
<ContextMenu :items="contextMenuItems" @select="handleMenuSelect" menu-width="200">
<CommonTable :table-data="labPatList" :loading="loading" :columns="tableColumns"
:row-config="{ isHover: true, keyField: 'ybh' }" @current-change="handleRowClick" size="small"
:scrollYConfig="{ enabled: true, rSize: 30, height: '100%', }" :row-style="rowStyle"
<CommonTable :table-data="labPatList" :loading="loading" :columns="tableColumns" @current-change="handleRowClick"
size="small" :scrollYConfig="{ enabled: true, rSize: 30, height: '100%', }" :row-style="rowStyle"
:cell-style="cellStyle" class="mytable-style" ref="tableRef" :enable-column-drag="true"
@column-drag-end="handleColumnDragEnd">
<!-- 完成状态列 -->

View File

@ -26,8 +26,7 @@
<el-row :gutter="10" class="table-row">
<el-col :span="8" class="table-col left-table">
<CustomVxeTable ref="leftTableRef" class="mytable-style" :table-data="tableData" :columns="columns"
:row-config="{ isHover: true, keyField: 'batchno' }" @current-change="batchClick"
:scrollYConfig="{ enabled: true, rSize: 30, height: '100%', }">
@current-change="batchClick" :scrollYConfig="{ enabled: true, rSize: 30, height: '100%', }">
<template #conc="{ row }">
{{concList.find(item => item.value == row.conc)?.label || row.conc}}
</template>
@ -40,7 +39,6 @@
<div style="height:59%" class="mb8">
<CustomVxeTable ref="topTableRef" class="mytable-style" :table-data="topTableData" :columns="topColumns"
:cell-render-delay="10" :loading="loading" @current-change="rowClick"
:row-config="{ isHover: true, keyField: 'xmdh' }"
:scrollYConfig="{ enabled: true, rSize: 30, height: '100%', }">
<template #xmdh="{ row }">
{{ row.xmdh }} {{ row.xmmc }}

View File

@ -40,9 +40,6 @@
<div class="table-box">
<CustomVxeTable class="mytable-style" ref="tableRef" :table-data="tableData" :columns="columns"
:scrollYConfig="{ enabled: true, rSize: 30, height: '100%', }" :cell-style="cellStyleHd">
<template #zkrq="{ row, $index }">
{{ $index + 1 }}
</template>
<template #cs1="{ row }">
<el-input v-model="row.cs1" class="full-width-input" />
</template>
@ -70,7 +67,7 @@
</template>
<script setup lang="ts">
import { getqcvalmonth, queryXmItem, saveQcvalItem } from '@/api/liswork/qualityControl/index'
import { getqcvalmonth, queryXmItem, saveQcvalMonth } from '@/api/liswork/qualityControl/index'
import dayjs from 'dayjs'
import { ResultItem, OriginalData, OriginalItem } from '@/types/index'
import { queryValue } from '@/api/liswork/xtwh/ComOpt'
@ -90,7 +87,7 @@ const tabList = [
const tableData = ref<ResultItem[]>([])
const columns = ref([
{ field: 'zkrq', title: '日期', resizable: true, width: 50, slotName: 'zkrq', align: 'center' },
{ field: 'daynum', title: '日期', resizable: true, width: 50, align: 'center' },
{ field: 'cs1', title: '次数1', resizable: true, slotName: 'cs1' },
{ field: 'cs2', title: '次数2', resizable: true, slotName: 'cs2' },
{ field: 'cs3', title: '次数3', resizable: true, slotName: 'cs3' },
@ -191,6 +188,7 @@ const mergeDataByXmdh = (rawData: OriginalData): ResultItem[] => {
xmmc: baseItem.xmmc || '',
sd: baseItem.sd || '',
zkbz: baseItem.zkbz || '',
daynum: baseItem.daynum,
cs1: '',
cs2: '',
cs3: '',
@ -214,7 +212,7 @@ const mergeDataByXmdh = (rawData: OriginalData): ResultItem[] => {
return result;
}
const handleSave = () => {
saveQcvalItem(tableData.value).then((res: any) => {
saveQcvalMonth(tableData.value).then((res: any) => {
if (res.code == 0) {
ElMessage.success('保存成功')
getXmInfo()

View File

@ -32,8 +32,8 @@
<div class="table-box">
<CustomVxeTable class="mytable-style" ref="tableRef" :table-data="tableData" :columns="columns"
:scrollYConfig="{ enabled: true, rSize: 30, height: '100%', }" :cell-style="cellStyleHd"
:highlightCurrentRow="false">
:rowConfig="{ isHover: true, height: 30, isCurrent: false }"
:scrollYConfig="{ enabled: true, rSize: 30, height: '100%', }" :cell-style="cellStyleHd">
<template #xmdh="{ row }">
{{ row.xmdh }} {{ row.xmmc }}
</template>
@ -64,7 +64,7 @@
</template>
<script setup lang="ts">
import { getqcval, saveqcvalmonth } from '@/api/liswork/qualityControl/index'
import { getqcval, saveqcvalItem } from '@/api/liswork/qualityControl/index'
import { queryValue } from '@/api/liswork/xtwh/ComOpt'
import dayjs from 'dayjs'
import { color } from 'echarts';
@ -188,7 +188,7 @@ const mergeDataByXmdh = (rawData: OriginalData): ResultItem[] => {
}
const handleSave = () => {
saveqcvalmonth(tableData.value).then((res: any) => {
saveqcvalItem(tableData.value).then((res: any) => {
if (res.code == 0) {
getXmList()
ElMessage.success('保存成功')

View File

@ -649,7 +649,23 @@ const getSysList = () => {
getSysList()
const userList = ref([]);
// 定义参数类型(类型安全)
interface RouteStateParams {
id: number;
name: string;
}
onMounted(async () => {
const state = history.state as Partial<RouteStateParams>;
console.log("🚀 ~ state:", state)
// 只读取一次参数
if (state && state.id) {
// 读取后清空 state 刷新/回退不重复读取
history.replaceState({}, document.title);
}
const data = { status: 0, del_flag: 0, pageSize: 1000, pageNum: 1 }
listUser(data).then((res: any) => {
userList.value = res.rows;

View File

@ -1,10 +1,10 @@
<template>
<div class="table-container">
<ContextMenu :items="contextMenuItems" @select="handleMenuSelect" menu-width="200">
<CommonTable :table-data="labPatList" :loading="loading" :columns="tableColumns"
:row-config="{ isHover: true, keyField: 'ybh' }" @current-change="handleRowClick" size="small"
:scrollYConfig="{ enabled: true, rSize: 30, height: '100%', }" :row-style="rowStyle" :cell-style="cellStyle"
class="mytable-style" ref="tableRef" :enable-column-drag="true" @column-drag-end="handleColumnDragEnd">
<CommonTable :table-data="labPatList" :loading="loading" :columns="tableColumns" @current-change="handleRowClick"
size="small" :scrollYConfig="{ enabled: true, rSize: 30, height: '100%', }" :row-style="rowStyle"
:cell-style="cellStyle" class="mytable-style" ref="tableRef" :enable-column-drag="true"
@column-drag-end="handleColumnDragEnd">
<!-- 完成状态列 -->
<template #finish="{ row }">
<svg-icon v-if="row.finish == 1" icon-class="lvgou" />