Compare commits

..

2 Commits

Author SHA1 Message Date
846442e93a Merge branch 'main' of http://47.97.125.165:8902/jiangs/lis8.0-vue3 2025-12-04 18:13:44 +08:00
e86dda5502 wsw历史对照 2025-12-04 18:13:38 +08:00
9 changed files with 324 additions and 61 deletions

View File

@ -19,6 +19,14 @@ export function wswsamplelistpage(query?: Object) {
}) })
} }
// 获取微生物样本信息 // 获取微生物样本信息
export function wswsampleinfo(query?: Object) {
return request({
url: '/lisworkgerm/germsampleinfo',
method: 'get',
params: query
})
}
// 获取微生物结果信息
export function sampleMedInfo(query?: Object) { export function sampleMedInfo(query?: Object) {
return request({ return request({
url: '/lisworkgerm/getresultlist', url: '/lisworkgerm/getresultlist',

View File

@ -5,67 +5,67 @@
/** 基础通用 **/ /** 基础通用 **/
.pt5 { .pt5 {
padding-top: 5px; padding-top: .3125rem;
} }
.pr5 { .pr5 {
padding-right: 5px; padding-right: .3125rem;
} }
.pb5 { .pb5 {
padding-bottom: 5px; padding-bottom: .3125rem;
} }
.mt5 { .mt5 {
margin-top: 5px; margin-top: .3125rem;
} }
.mr5 { .mr5 {
margin-right: 5px; margin-right: .3125rem;
} }
.mb5 { .mb5 {
margin-bottom: 5px; margin-bottom: .3125rem;
} }
.mb8 { .mb8 {
margin-bottom: 8px; margin-bottom: .5rem;
} }
.ml5 { .ml5 {
margin-left: 5px; margin-left: .3125rem;
} }
.mt10 { .mt10 {
margin-top: 10px; margin-top: .625rem;
} }
.mr10 { .mr10 {
margin-right: 10px; margin-right: .625rem;
} }
.mb10 { .mb10 {
margin-bottom: 10px; margin-bottom: .625rem;
} }
.ml10 { .ml10 {
margin-left: 10px; margin-left: .625rem;
} }
.mt20 { .mt20 {
margin-top: 20px; margin-top: 1.25rem;
} }
.mr20 { .mr20 {
margin-right: 20px; margin-right: 1.25rem;
} }
.mb20 { .mb20 {
margin-bottom: 20px; margin-bottom: 1.25rem;
} }
.ml20 { .ml20 {
margin-left: 20px; margin-left: 1.25rem;
} }
.cp { .cp {
@ -213,8 +213,8 @@
.el-table__body-wrapper .el-table-column--selection>.cell { .el-table__body-wrapper .el-table-column--selection>.cell {
padding: 0 !important; padding: 0 !important;
height: 30px; height: 1.875rem;
line-height: 30px; line-height: 1.875rem;
} }
.el-table--enable-row-hover .el-table__body tr:hover>td.el-table__cell { .el-table--enable-row-hover .el-table__body tr:hover>td.el-table__cell {
@ -224,8 +224,8 @@
.cell.el-tooltip { .cell.el-tooltip {
padding: 0 !important; padding: 0 !important;
height: 30px; height: 1.875rem;
line-height: 30px; line-height: 1.875rem;
} }
.el-table-header-cell .cell { .el-table-header-cell .cell {
@ -241,8 +241,8 @@
.el-table__cell { .el-table__cell {
padding: 0 !important; padding: 0 !important;
height: 30px; height: 1.875rem;
line-height: 30px; line-height: 1.875rem;
} }
.el-checkbox { .el-checkbox {

View File

@ -120,6 +120,9 @@ service.interceptors.response.use(res => {
if (res.request.responseType === 'blob' || res.request.responseType === 'arraybuffer') { if (res.request.responseType === 'blob' || res.request.responseType === 'arraybuffer') {
return res.data return res.data
} }
if (code == -1) {
return Promise.resolve(res.data)
}
if (code === 401) { if (code === 401) {
if (!isRelogin.show) { if (!isRelogin.show) {
isRelogin.show = true; isRelogin.show = true;

View File

@ -134,6 +134,9 @@ const formatHeader = (column: any, prefix: string) => {
const getList = () => { const getList = () => {
historyInfo(queryParams.value).then((res: any) => { historyInfo(queryParams.value).then((res: any) => {
tableData.value = []
getEcharts(null)
if (!res.data) return
const periods = ['first', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine']; const periods = ['first', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine'];
const dataMaps = new Map(); const dataMaps = new Map();
@ -194,9 +197,12 @@ const getList = () => {
return row; return row;
}); });
nextTick(() => { nextTick(() => {
if (tableData.value.length) {
tableRef.value.setCurrentRow(tableData.value[0]); tableRef.value.setCurrentRow(tableData.value[0]);
getEcharts(tableData.value[0]) getEcharts(tableData.value[0])
}
}) })
// console.log('合并后的表格数据==>', tableData.value); // console.log('合并后的表格数据==>', tableData.value);
}); });
}; };
@ -217,9 +223,27 @@ const handleRowClick = (row: any) => {
const myEcharts = ref() const myEcharts = ref()
const getEcharts = (data: any) => { const getEcharts = (data: any) => {
const periods = ['nine', 'eight', 'seven', 'six', 'five', 'four', 'three', 'two', 'one', 'first'] const periods = ['nine', 'eight', 'seven', 'six', 'five', 'four', 'three', 'two', 'one', 'first']
if (!data) return
if (!data) {
// 数据为空时清空图表
if (myEcharts.value) {
const existingInstance = echarts.getInstanceByDom(myEcharts.value);
if (existingInstance) {
existingInstance.clear();
}
}
return;
}
const xData = periods.map(period => { return data[`${period}Date`] })?.filter(Boolean) //过滤掉空值 const xData = periods.map(period => { return data[`${period}Date`] })?.filter(Boolean) //过滤掉空值
const yData = periods.map(period => { return data[`${period}Csjg`] })?.filter(Boolean) const yData = periods.map(period => { return data[`${period}Csjg`] })?.filter(Boolean)
// 先获取已有实例并销毁
if (myEcharts.value) {
const existingInstance = echarts.getInstanceByDom(myEcharts.value);
if (existingInstance) {
echarts.dispose(existingInstance);
}
}
const Intance = echarts.init(myEcharts.value); const Intance = echarts.init(myEcharts.value);

View File

@ -153,7 +153,10 @@ const formatHeader = (column: any, prefix: string) => {
}; };
// 获取其他结果信息 // 获取其他结果信息
const getOthersInfo = () => { const getOthersInfo = () => {
tableData.value = []
tableDataDetail.value = []
otherinstr(queryParams.value).then((res: any) => { otherinstr(queryParams.value).then((res: any) => {
if (!res.data) return
tableData.value = res.data.map((item: any) => { tableData.value = res.data.map((item: any) => {
return { return {
...item, ...item,
@ -185,6 +188,7 @@ const handleRowClick = (row: any) => {
ybh: row.ybh ybh: row.ybh
} }
otherInstrDetail(data).then((res: any) => { otherInstrDetail(data).then((res: any) => {
if (!res.data) return
const periods = ['first', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine']; const periods = ['first', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine'];
const dataMaps = new Map(); const dataMaps = new Map();

View File

@ -0,0 +1,210 @@
<template>
<div>
<CustomTable ref="tableRef" :data="tableData" :columns="columns" :config="tableConfig" :enable-column-drag="true"
@column-drag-end="handleColumnDragEnd" @row-click="rowHandle">
<template #yblx="{ row }">
{{ formatDict(row.yblx, 'BT') }}
</template>
<template #jgbz="{ row }">
{{ formatJgbz(row.jgbz) }}
</template>
</CustomTable>
<div class="mt5"></div>
<CustomTable ref="ymTableRef" :data="ymTableData" :columns="ymColumns" :config="ymTableConfig"
:enable-column-drag="true" @column-drag-end="ymHandleColumnDragEnd">
<template #jgbz="{ row }">
<el-radio-group v-model="row.jgbz" disabled>
<el-radio value="R">R</el-radio>
<el-radio value="I">I</el-radio>
<el-radio value="S">S</el-radio>
<el-radio value="N">N</el-radio>
<el-radio value="D">SDD</el-radio>
</el-radio-group>
</template>
</CustomTable>
</div>
</template>
<script setup lang="ts">
import { getresultmedList } from "@/api/liswork/micro";
import { historyInfo } from "@/api/liswork/work/LisWork";
import CustomTable from "@/components/elTable/index.vue"
import { LabResultItem, ymTableDataItem } from '@/types/index';
const props = defineProps({
queryParams: {
type: Object,
required: true
},
tablekey: {
type: Object,
required: true
},
dictData: {
type: Object,
default: () => ({})
},
})
const { queryParams, tablekey, } = toRefs(props)
const tableData = ref([])
const columns = ref([
{ label: "标本", prop: "yblx", align: 'center', visible: true, slot: "yblx" },
{ label: "细菌", prop: "xmmc", align: 'center', visible: true, },
{ label: "样本号", prop: "ybh", align: 'center', visible: true, },
{ label: "菌落计数", prop: "od", align: 'center', visible: true, },
{ label: "检验结果", prop: "csjg", align: 'center', visible: true, slot: "csjg" },
{ label: "阴阳性", prop: "jgbz", align: 'center', visible: true, slot: "jgbz" },
{ label: "检验日期", prop: "jyrq", align: 'center', visible: true, },
{ label: "仪器", prop: "yq", align: 'center', visible: true, },
{ label: "病人代号", prop: "brdh", align: 'center', visible: true, },
{ label: "性别", prop: "brxb", align: 'center', visible: true, },
{ label: "年龄", prop: "nl", align: 'center', visible: true, },
])
const CellStyleHd = ({ row, column, rowIndex, columnIndex }: {
row: any;
column: any;
rowIndex: number;
columnIndex: number;
}) => {
if (column.label == "检验结果" && row.jgbz == "H") {
return { background: '#ffc0c0 !important', color: '#606266' };
}
if (column.label == "检验结果" && row.jgbz == "L") {
return { background: '#8080ff !important', color: '#fff' };
}
if (column.label == "检验结果" && row.jgbz == "P") {
return { background: '#ffc0c0 !important', color: '#606266' };
}
if (column.label == "检验结果" && row.jgbz == "Q") {
return { background: '#ffff80 !important', color: '#606266' };
}
if (column.label == "阴阳性" && row.jgbz == "H") {
return { background: '#ffc0c0 !important', color: '#606266' };
}
if (column.label == "阴阳性" && row.jgbz == "L") {
return { background: '#8080ff !important', color: '#fff' };
}
if (column.label == "阴阳性" && row.jgbz == "P") {
return { background: '#ffc0c0 !important', color: '#606266' };
}
if (column.label == "阴阳性" && row.jgbz == "Q") {
return { background: '#ffff80 !important', color: '#606266' };
}
};
const tableConfig = ref({
height: '24vh',
border: true,
highlightCurrentRow: true,
cellStyle: CellStyleHd
});
const handleColumnDragEnd = (data: any) => {
columns.value = data.columns;
}
const getList = () => {
tableData.value = []
const data = {
ybh: tablekey.value.ybh,
yq: tablekey.value.yq,
jyrq: tablekey.value.jyrq,
}
historyInfo(data).then((res: any) => {
if (!res.data) return
tableData.value = res.data
if (res.data.length) {
rowHandle(res.data[0])
}
})
}
watch(() => props.tablekey, (newValue) => {
getList()
}, {
immediate: true,
deep: true
})
const rowHandle = (row: any) => {
const data = {
ybh: tablekey.value.ybh,
yq: tablekey.value.yq,
jyrq: tablekey.value.jyrq,
xmdh: row.xmdh
}
getresultmedList(data).then((res: any) => {
if (res.code == 0) {
ymTableData.value = res.data
}
})
}
const ymTableData = ref<ymTableDataItem[]>([]);
const ymColumns = ref([
{ label: "抗生素", prop: "ywmc", visible: true, align: 'center', },
{ label: "Mic", prop: "mic", align: 'center', visible: true, },
{ label: "KB", prop: "rad", align: 'center', visible: true, },
{ label: "结果", prop: "csjg", align: 'center', visible: true, },
{ label: "结果标志", prop: "jgbz", align: 'center', visible: true, slot: 'jgbz', showOverflowTooltip: false, width: 180 },
])
const ymCellStyleHd = ({ row, column, rowIndex, columnIndex }: {
row: any;
column: any;
rowIndex: number;
columnIndex: number;
}) => {
if (column.label == "结果" && row.jgbz == "R") {
return { background: '#ffc0c0 !important', color: '#606266' };
}
if (column.label == "结果" && row.jgbz == "I") {
return { background: '#ffff80 !important', color: '#606266' };
}
}
const ymTableConfig = ref({
height: '57vh',
border: true,
highlightCurrentRow: true,
cellStyle: ymCellStyleHd,
});
const ymHandleColumnDragEnd = (data: any) => {
ymColumns.value = data.columns;
}
const formatDict = (v: string, dictType: string) => {
return props.dictData[dictType]?.find((item: any) => item.value == v)?.label || v;
}
const formatJgbz = (v: string) => {
const jgbzMap = {
'H': '高',
'L': '低',
'N': '阴性',
'P': '阳性',
'Q': '弱阳性',
'M': '正常'
};
return jgbzMap[v as keyof typeof jgbzMap] ?? '';
}
</script>
<style scoped lang="scss">
.el-radio {
margin-right: .3125rem;
:deep(.el-radio__label) {
padding-left: 2px !important;
}
}
</style>

View File

@ -159,7 +159,7 @@ import tabView from '@/components/tabViews/index.vue';
// @ts-ignore // @ts-ignore
import iFrame from "@/components/iFrame/index.vue"; import iFrame from "@/components/iFrame/index.vue";
import LabPatList from './labpatlist.vue'; import LabPatList from './labpatlist.vue';
import History from '../components/history/index.vue' import History from '../components/wswHistory/index.vue'
import OthersResult from '../components/othersResult/index.vue' import OthersResult from '../components/othersResult/index.vue'
import Reexamination from '../components/reexamination/index.vue' import Reexamination from '../components/reexamination/index.vue'
import Charge from '../components/charge/index.vue' import Charge from '../components/charge/index.vue'
@ -176,8 +176,8 @@ import Pyj from './labresult/pyj.vue';
import Record from './labresult/record.vue'; import Record from './labresult/record.vue';
// @ts-ignore // @ts-ignore
import { comDict } from '@/utils/dict' import { comDict } from '@/utils/dict'
import { queryLabResults, loadDefault, queryLabPat, instrdconfig, delSample, getGroupInstrdList, checkuser, updateLabPat } from "@/api/liswork/work/LisWork"; import { queryLabResults, loadDefault, instrdconfig, delSample, getGroupInstrdList, checkuser, updateLabPat } from "@/api/liswork/work/LisWork";
import { wswsamplelistpage, sampleMedInfo, changepatjyrq } from "@/api/liswork/micro/index"; import { wswsamplelistpage, sampleMedInfo, changepatjyrq, wswsampleinfo } from "@/api/liswork/micro/index";
import { getComDicts, queryComDictListService } from "@/api/liswork/dict/ComDict"; import { getComDicts, queryComDictListService } from "@/api/liswork/dict/ComDict";
import { ElMessage, ElMessageBox } from "element-plus"; import { ElMessage, ElMessageBox } from "element-plus";
import BatchCode from '../work/components/batchCode.vue'; import BatchCode from '../work/components/batchCode.vue';
@ -481,7 +481,7 @@ const fetchLabPat = () => {
yq: labInfo.value.yq, yq: labInfo.value.yq,
ybh: labInfo.value.ybh ybh: labInfo.value.ybh
} }
queryLabPat(data).then((response: any) => { wswsampleinfo(data).then((response: any) => {
labPat.value = response.data; labPat.value = response.data;
}) })
} }
@ -506,19 +506,25 @@ const handleQuery = () => {
// queryParams.value = { ...queryParams.value }; // queryParams.value = { ...queryParams.value };
// 查找匹配的行 // 查找匹配的行
const matchedIndex = labPatList.value.findIndex((item: any) => item.ybh == queryParams.value.ybh); const matchedIndex = labPatList.value.findIndex((item: any) => item.ybh == queryParams.value.ybh);
const row = labPatList.value[matchedIndex]
// 查询样本信息是否存在
wswsampleinfo(queryParams.value).then((response: any) => {
if (response.data) {
if (matchedIndex !== -1) { if (matchedIndex !== -1) {
highlightRowIndex.value = matchedIndex; highlightRowIndex.value = matchedIndex;
// 等待DOM更新后滚动到目标行 // 等待DOM更新后滚动到目标行
nextTick(() => { nextTick(() => {
labPatListRef.value.setCurrentRow(row); if (activeTab.value == 'LabPatList') {
labPatListRef.value.setCurrentRow(response.data);
}
}); });
selectJob(row); }
selectJob(response.data);
} else { } else {
handleCreate() handleCreate()
highlightRowIndex.value = -1; highlightRowIndex.value = -1;
} }
})
} }
@ -652,7 +658,7 @@ const changeStatus = (updatedPat: any, flag: boolean) => {
yq: updatedPat.yq.trim(), yq: updatedPat.yq.trim(),
ybh: updatedPat.ybh, ybh: updatedPat.ybh,
} }
queryLabPat(data).then((response: any) => { wswsampleinfo(data).then((response: any) => {
if (response.code == 0) { if (response.code == 0) {
labPat.value = response.data; labPat.value = response.data;
const index = labPatList.value.findIndex((item: any) => item.ybh == updatedPat.ybh); const index = labPatList.value.findIndex((item: any) => item.ybh == updatedPat.ybh);

View File

@ -128,7 +128,7 @@
<el-button class="btns_box" type="primary" :size="autoSize" plain :disabled="labPat.jgbz == 2" <el-button class="btns_box" type="primary" :size="autoSize" plain :disabled="labPat.jgbz == 2"
@click="pyMb">评语模板</el-button> @click="pyMb">评语模板</el-button>
<el-button type="primary" class="btns_box" plain :size="autoSize" :disabled="labPat.jgbz == 2" <el-button type="primary" class="btns_box" plain :size="autoSize" :disabled="labPat.jgbz == 2"
@click="handleTextarea">确定</el-button> @click="handleTextarea">保存</el-button>
<el-button type="primary" class="btns_box" plain :size="autoSize" :disabled="labPat.jgbz == 2" <el-button type="primary" class="btns_box" plain :size="autoSize" :disabled="labPat.jgbz == 2"
@click="textarea = ''">清除</el-button> @click="textarea = ''">清除</el-button>
</template> </template>
@ -670,6 +670,8 @@ const mbStore = useCommonStore();
const tableData: any = ref([]) const tableData: any = ref([])
watch(labResutsData, (newVal: any) => { watch(labResutsData, (newVal: any) => {
console.log("🚀 ~ newVal:", newVal)
if (newVal.length) { if (newVal.length) {
tableData.value = newVal.map((item: any) => { tableData.value = newVal.map((item: any) => {
return { return {
@ -688,7 +690,7 @@ watch(labResutsData, (newVal: any) => {
ymselectedRows.value = [] ymselectedRows.value = []
} }
if (props.labPat.jgbz != null && props.labPat.jgbz != 0 && props.labPat.jgbz != 'C') return; if (labPat.value.jgbz == 2) return;
// console.log('mbStore==>', mbStore.lxsrs); // console.log('mbStore==>', mbStore.lxsrs);
if (mbStore.lxsrs.length > 0) { if (mbStore.lxsrs.length > 0) {
mbStore.lxsrs.forEach((mbmc) => { mbStore.lxsrs.forEach((mbmc) => {
@ -714,7 +716,6 @@ watch(labResutsData, (newVal: any) => {
const handleTextarea = () => { const handleTextarea = () => {
if (!rowInfo.value.xmdh) return if (!rowInfo.value.xmdh) return
if (!textarea.value) return ElMessage.warning('请填写专家评语!')
savetestResult({ ...rowInfo.value, textresult: textarea.value }).then((res: any) => { savetestResult({ ...rowInfo.value, textresult: textarea.value }).then((res: any) => {
if (res.code == 0) { if (res.code == 0) {
ElMessage.success('保存成功'); ElMessage.success('保存成功');
@ -723,15 +724,16 @@ const handleTextarea = () => {
}; };
const rowInfo: any = ref({}) const rowInfo: any = ref({})
const rowHandle = (row: any) => { const rowHandle = (row: any) => {
console.log('row==>', row);
selectedRows.value = [row]; selectedRows.value = [row];
emitter.emitWithCache('refreshClinical', row); emitter.emitWithCache('refreshClinical', row);
rowInfo.value = row rowInfo.value = row
textarea.value = row.textresult textarea.value = row.textresult
const data = { const data = {
ybh: labPat.value.ybh, ybh: row.ybh,
yq: labPat.value.yq, yq: row.yq,
jyrq: labPat.value.jyrq, jyrq: row.jyrq,
xmdh: row.xmdh xmdh: row.xmdh
} }
getresultmedList(data).then((res: any) => { getresultmedList(data).then((res: any) => {
@ -1053,6 +1055,7 @@ const formatJgbz = (v: string) => {
.el-radio { .el-radio {
margin-right: .3125rem; margin-right: .3125rem;
height: 1.875rem;
:deep(.el-radio__label) { :deep(.el-radio__label) {
padding-left: 2px !important; padding-left: 2px !important;

View File

@ -399,22 +399,27 @@ const handleQuery = () => {
return; return;
} }
queryParams.value = { ...queryParams.value }; queryParams.value = { ...queryParams.value };
// 查找匹配的行 // 查找匹配的行
const matchedIndex = labPatList.value.findIndex((item: any) => item.ybh == queryParams.value.ybh); const matchedIndex = labPatList.value.findIndex((item: any) => item.ybh == queryParams.value.ybh);
const row = labPatList.value[matchedIndex]
if (matchedIndex !== -1) { // 查询样本信息是否存在
queryLabPat(queryParams.value).then((response: any) => {
if (response.data) {
highlightRowIndex.value = matchedIndex; highlightRowIndex.value = matchedIndex;
// 等待DOM更新后滚动到目标行 // 等待DOM更新后滚动到目标行
nextTick(() => { nextTick(() => {
labPatListRef.value.setCurrentRow(row); if (activeTab.value == 'LabPatList') {
labPatListRef.value.setCurrentRow(response.data);
}
}); });
selectJob(row); selectJob(response.data);
} else { } else {
handleCreate() handleCreate()
highlightRowIndex.value = -1; highlightRowIndex.value = -1;
} }
})
} }
// 创建新样本 // 创建新样本