Compare commits

..

No commits in common. "846442e93a3d6f0dc438bff84c2f24a876a3e279" and "f3c715875da302a617308ba92b37a643411df28f" have entirely different histories.

9 changed files with 61 additions and 324 deletions

View File

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

View File

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

View File

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

View File

@ -134,9 +134,6 @@ const formatHeader = (column: any, prefix: string) => {
const getList = () => {
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 dataMaps = new Map();
@ -197,12 +194,9 @@ const getList = () => {
return row;
});
nextTick(() => {
if (tableData.value.length) {
tableRef.value.setCurrentRow(tableData.value[0]);
getEcharts(tableData.value[0])
}
tableRef.value.setCurrentRow(tableData.value[0]);
getEcharts(tableData.value[0])
})
// console.log('合并后的表格数据==>', tableData.value);
});
};
@ -223,27 +217,9 @@ const handleRowClick = (row: any) => {
const myEcharts = ref()
const getEcharts = (data: any) => {
const periods = ['nine', 'eight', 'seven', 'six', 'five', 'four', 'three', 'two', 'one', 'first']
if (!data) {
// 数据为空时清空图表
if (myEcharts.value) {
const existingInstance = echarts.getInstanceByDom(myEcharts.value);
if (existingInstance) {
existingInstance.clear();
}
}
return;
}
if (!data) return
const xData = periods.map(period => { return data[`${period}Date`] })?.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);

View File

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

View File

@ -1,210 +0,0 @@
<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
import iFrame from "@/components/iFrame/index.vue";
import LabPatList from './labpatlist.vue';
import History from '../components/wswHistory/index.vue'
import History from '../components/history/index.vue'
import OthersResult from '../components/othersResult/index.vue'
import Reexamination from '../components/reexamination/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';
// @ts-ignore
import { comDict } from '@/utils/dict'
import { queryLabResults, loadDefault, instrdconfig, delSample, getGroupInstrdList, checkuser, updateLabPat } from "@/api/liswork/work/LisWork";
import { wswsamplelistpage, sampleMedInfo, changepatjyrq, wswsampleinfo } from "@/api/liswork/micro/index";
import { queryLabResults, loadDefault, queryLabPat, instrdconfig, delSample, getGroupInstrdList, checkuser, updateLabPat } from "@/api/liswork/work/LisWork";
import { wswsamplelistpage, sampleMedInfo, changepatjyrq } from "@/api/liswork/micro/index";
import { getComDicts, queryComDictListService } from "@/api/liswork/dict/ComDict";
import { ElMessage, ElMessageBox } from "element-plus";
import BatchCode from '../work/components/batchCode.vue';
@ -481,7 +481,7 @@ const fetchLabPat = () => {
yq: labInfo.value.yq,
ybh: labInfo.value.ybh
}
wswsampleinfo(data).then((response: any) => {
queryLabPat(data).then((response: any) => {
labPat.value = response.data;
})
}
@ -506,25 +506,19 @@ const handleQuery = () => {
// queryParams.value = { ...queryParams.value };
// 查找匹配的行
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) {
highlightRowIndex.value = matchedIndex;
// 等待DOM更新后滚动到目标行
nextTick(() => {
if (activeTab.value == 'LabPatList') {
labPatListRef.value.setCurrentRow(response.data);
}
});
}
selectJob(response.data);
} else {
handleCreate()
highlightRowIndex.value = -1;
}
})
if (matchedIndex !== -1) {
highlightRowIndex.value = matchedIndex;
// 等待DOM更新后滚动到目标行
nextTick(() => {
labPatListRef.value.setCurrentRow(row);
});
selectJob(row);
} else {
handleCreate()
highlightRowIndex.value = -1;
}
}
@ -658,7 +652,7 @@ const changeStatus = (updatedPat: any, flag: boolean) => {
yq: updatedPat.yq.trim(),
ybh: updatedPat.ybh,
}
wswsampleinfo(data).then((response: any) => {
queryLabPat(data).then((response: any) => {
if (response.code == 0) {
labPat.value = response.data;
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"
@click="pyMb">评语模板</el-button>
<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"
@click="textarea = ''">清除</el-button>
</template>
@ -670,8 +670,6 @@ const mbStore = useCommonStore();
const tableData: any = ref([])
watch(labResutsData, (newVal: any) => {
console.log("🚀 ~ newVal:", newVal)
if (newVal.length) {
tableData.value = newVal.map((item: any) => {
return {
@ -690,7 +688,7 @@ watch(labResutsData, (newVal: any) => {
ymselectedRows.value = []
}
if (labPat.value.jgbz == 2) return;
if (props.labPat.jgbz != null && props.labPat.jgbz != 0 && props.labPat.jgbz != 'C') return;
// console.log('mbStore==>', mbStore.lxsrs);
if (mbStore.lxsrs.length > 0) {
mbStore.lxsrs.forEach((mbmc) => {
@ -716,6 +714,7 @@ watch(labResutsData, (newVal: any) => {
const handleTextarea = () => {
if (!rowInfo.value.xmdh) return
if (!textarea.value) return ElMessage.warning('请填写专家评语!')
savetestResult({ ...rowInfo.value, textresult: textarea.value }).then((res: any) => {
if (res.code == 0) {
ElMessage.success('保存成功');
@ -724,16 +723,15 @@ const handleTextarea = () => {
};
const rowInfo: any = ref({})
const rowHandle = (row: any) => {
console.log('row==>', row);
selectedRows.value = [row];
emitter.emitWithCache('refreshClinical', row);
rowInfo.value = row
textarea.value = row.textresult
const data = {
ybh: row.ybh,
yq: row.yq,
jyrq: row.jyrq,
ybh: labPat.value.ybh,
yq: labPat.value.yq,
jyrq: labPat.value.jyrq,
xmdh: row.xmdh
}
getresultmedList(data).then((res: any) => {
@ -1055,7 +1053,6 @@ const formatJgbz = (v: string) => {
.el-radio {
margin-right: .3125rem;
height: 1.875rem;
:deep(.el-radio__label) {
padding-left: 2px !important;

View File

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