初报
This commit is contained in:
parent
47017d791d
commit
57e11ad63c
@ -124,3 +124,11 @@ export function deletemedresult(data?: Object) {
|
|||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
//获取培养基记录
|
||||||
|
export function getmediumList(data?: Object) {
|
||||||
|
return request({
|
||||||
|
url: '/lisworkgerm/getmedium',
|
||||||
|
method: 'get',
|
||||||
|
params: data
|
||||||
|
})
|
||||||
|
}
|
||||||
@ -106,13 +106,63 @@
|
|||||||
|
|
||||||
.el-dialog:not(.is-fullscreen) {
|
.el-dialog:not(.is-fullscreen) {
|
||||||
margin-top: 6vh !important;
|
margin-top: 6vh !important;
|
||||||
|
padding: 0;
|
||||||
|
// border-radius: 20px;
|
||||||
|
|
||||||
|
.el-dialog__body {
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-dialog.scrollbar .el-dialog__body {
|
.el-dialog.scrollbar .el-dialog__body {
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
max-height: 70vh;
|
max-height: 70vh;
|
||||||
padding: 10px 20px 0;
|
padding: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-dialog__header {
|
||||||
|
background: linear-gradient(90deg, #0c1a97 0%, #1373d3 100%);
|
||||||
|
padding: 10px 20px;
|
||||||
|
position: relative;
|
||||||
|
font-family: SourceHanSansCN, SourceHanSansCN;
|
||||||
|
|
||||||
|
&::before {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
left: 20px;
|
||||||
|
top: 50%;
|
||||||
|
transform: translateY(-50%);
|
||||||
|
width: 28px;
|
||||||
|
height: 28px;
|
||||||
|
background: url('@/assets/logo/logo.png') no-repeat center;
|
||||||
|
background-size: contain;
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 标题文本样式
|
||||||
|
.el-dialog__title {
|
||||||
|
color: #fff;
|
||||||
|
/* 标题文字颜色 */
|
||||||
|
padding-left: 40px;
|
||||||
|
/* 给 Logo 留出空间 */
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-dialog__headerbtn .el-dialog__close {
|
||||||
|
color: #fff;
|
||||||
|
/* 关闭按钮颜色 */
|
||||||
|
font-size: 18px;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-dialog__footer {
|
||||||
|
padding: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-table {
|
.el-table {
|
||||||
@ -125,7 +175,7 @@
|
|||||||
word-break: break-word;
|
word-break: break-word;
|
||||||
background-color: #1F6DD3 !important;
|
background-color: #1F6DD3 !important;
|
||||||
color: #FFF;
|
color: #FFF;
|
||||||
height: 1.875rem !important;
|
height: 1.6875rem !important;
|
||||||
font-size: .8125rem;
|
font-size: .8125rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -136,6 +186,11 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.el-table__body td {
|
||||||
|
font-size: .8125rem;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* 表格最外层边框(可选) */
|
/* 表格最外层边框(可选) */
|
||||||
.el-table--border {
|
.el-table--border {
|
||||||
@ -177,9 +232,12 @@
|
|||||||
padding: 0 !important;
|
padding: 0 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-table--default .cell {
|
.el-table--default {
|
||||||
|
.cell {
|
||||||
padding: 0 !important;
|
padding: 0 !important;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
.el-table__cell {
|
.el-table__cell {
|
||||||
padding: 0 !important;
|
padding: 0 !important;
|
||||||
@ -249,7 +307,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.el-input.is-disabled .el-input__inner {
|
.el-input.is-disabled .el-input__inner {
|
||||||
-webkit-text-fill-color: #4e4c4c
|
-webkit-text-fill-color: #4e4c4c;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -41,7 +41,7 @@ export function useFingerprint() {
|
|||||||
|
|
||||||
// 组件挂载时自动获取指纹
|
// 组件挂载时自动获取指纹
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getFingerprint();
|
// getFingerprint();
|
||||||
});
|
});
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|||||||
@ -41,7 +41,7 @@ const columns = ref([
|
|||||||
// 左侧表格配置
|
// 左侧表格配置
|
||||||
const tableConfig = ref({
|
const tableConfig = ref({
|
||||||
border: true, // 边框
|
border: true, // 边框
|
||||||
height: '', // 高度
|
height: '82vh', // 高度
|
||||||
highlightCurrentRow: true, // 高亮当前行
|
highlightCurrentRow: true, // 高亮当前行
|
||||||
})
|
})
|
||||||
const getCombination = () => {
|
const getCombination = () => {
|
||||||
|
|||||||
@ -56,12 +56,11 @@
|
|||||||
@previewHandle="previewHandle" />
|
@previewHandle="previewHandle" />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="初级和二级报告" name="second">
|
<el-tab-pane label="初级和二级报告" name="second">
|
||||||
<CbReport v-model:labPat="labInfo" :labPatKey="queryParams" :dictData="dictData"
|
<CbReport v-model:labPat="labInfo" :labPatKey="queryParams" :instrdComOpt="instrdComOpt"
|
||||||
:labResutsData="zbLabResuts" @fetchLabResults="resultsHandle" @changeStatus="changeStatus"
|
:dictData="dictData" @changeStatus="changeStatus" @previewHandle="previewHandle" />
|
||||||
@previewHandle="previewHandle" />
|
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="培养基接种" name="third">
|
<el-tab-pane label="培养基接种" name="third">
|
||||||
<Byj />
|
<Byj :labPat="labInfo" :labPatKey="queryParams" />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="操作记录" name="fourth">
|
<el-tab-pane label="操作记录" name="fourth">
|
||||||
<Record :labPat="labInfo" :labPatKey="queryParams" />
|
<Record :labPat="labInfo" :labPatKey="queryParams" />
|
||||||
@ -195,7 +194,7 @@ const queryParams = ref({
|
|||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
const activeName = ref('first')
|
const activeName = ref('second');
|
||||||
|
|
||||||
const total = ref(0)
|
const total = ref(0)
|
||||||
const ybs = ref(0)
|
const ybs = ref(0)
|
||||||
@ -255,11 +254,6 @@ interface QueryParams {
|
|||||||
|
|
||||||
watch(() => labPat.value, (newValue) => {
|
watch(() => labPat.value, (newValue) => {
|
||||||
queryParams.value.ybh = newValue.ybh;
|
queryParams.value.ybh = newValue.ybh;
|
||||||
// if (newValue.jgbz == '2') {
|
|
||||||
// activeName.value = 'first'
|
|
||||||
// } else if (newValue.jgbz == '0' || newValue.jgbz == '3' || newValue.jgbz == '4') {
|
|
||||||
// activeName.value = 'second'
|
|
||||||
// }
|
|
||||||
}, { deep: true });
|
}, { deep: true });
|
||||||
|
|
||||||
// 模糊查询
|
// 模糊查询
|
||||||
@ -279,8 +273,6 @@ const searchQuery = () => {
|
|||||||
}
|
}
|
||||||
labPatList.value = filterMhList;
|
labPatList.value = filterMhList;
|
||||||
|
|
||||||
getTotals();
|
|
||||||
|
|
||||||
if (filterMhList.length > 0) {
|
if (filterMhList.length > 0) {
|
||||||
highlightRowIndex.value = 0;
|
highlightRowIndex.value = 0;
|
||||||
const firstRow = filterMhList[0];
|
const firstRow = filterMhList[0];
|
||||||
@ -290,7 +282,6 @@ const searchQuery = () => {
|
|||||||
labPat.value = {};
|
labPat.value = {};
|
||||||
labInfo.value = {};
|
labInfo.value = {};
|
||||||
zbLabResuts.value = [];
|
zbLabResuts.value = [];
|
||||||
cbLabResuts.value = [];
|
|
||||||
highlightRowIndex.value = -1;
|
highlightRowIndex.value = -1;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -320,8 +311,6 @@ const handleQueryResult = (params: QueryParams) => {
|
|||||||
|
|
||||||
labPatList.value = filteredList;
|
labPatList.value = filteredList;
|
||||||
|
|
||||||
getTotals();
|
|
||||||
|
|
||||||
if (filteredList.length > 0) {
|
if (filteredList.length > 0) {
|
||||||
highlightRowIndex.value = 0;
|
highlightRowIndex.value = 0;
|
||||||
const firstRow = filteredList[0];
|
const firstRow = filteredList[0];
|
||||||
@ -331,7 +320,6 @@ const handleQueryResult = (params: QueryParams) => {
|
|||||||
labPat.value = {};
|
labPat.value = {};
|
||||||
labInfo.value = {};
|
labInfo.value = {};
|
||||||
zbLabResuts.value = [];
|
zbLabResuts.value = [];
|
||||||
cbLabResuts.value = [];
|
|
||||||
highlightRowIndex.value = -1;
|
highlightRowIndex.value = -1;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -339,7 +327,6 @@ const handleQueryResult = (params: QueryParams) => {
|
|||||||
// 处理重置
|
// 处理重置
|
||||||
const handleReset = () => {
|
const handleReset = () => {
|
||||||
labPatList.value = [...originalLabPatList.value];
|
labPatList.value = [...originalLabPatList.value];
|
||||||
getTotals();
|
|
||||||
}
|
}
|
||||||
const previewHandle = (url: string) => {
|
const previewHandle = (url: string) => {
|
||||||
if (!url) return ElMessage.warning('未查询到文件')
|
if (!url) return ElMessage.warning('未查询到文件')
|
||||||
@ -348,14 +335,11 @@ const previewHandle = (url: string) => {
|
|||||||
}
|
}
|
||||||
const handleinstrGroupChange = (val: any) => {
|
const handleinstrGroupChange = (val: any) => {
|
||||||
queryParams.value.yq = ''
|
queryParams.value.yq = ''
|
||||||
// labResuts.value = []
|
|
||||||
// labPat.value = {}
|
|
||||||
getYqConfig()
|
getYqConfig()
|
||||||
}
|
}
|
||||||
const mbStore = useCommonStore();
|
const mbStore = useCommonStore();
|
||||||
const yqHandleChange = (val: any) => {
|
const yqHandleChange = (val: any) => {
|
||||||
zbLabResuts.value = [];
|
zbLabResuts.value = [];
|
||||||
cbLabResuts.value = [];
|
|
||||||
labPat.value = {}
|
labPat.value = {}
|
||||||
labInfo.value = {}
|
labInfo.value = {}
|
||||||
mbStore.setLxsrList([]);
|
mbStore.setLxsrList([]);
|
||||||
@ -414,19 +398,10 @@ const selectJob = (job: any) => {
|
|||||||
highlightRowIndex.value = labPatList.value.findIndex((item: any) => item.ybh == labInfo.value.ybh);
|
highlightRowIndex.value = labPatList.value.findIndex((item: any) => item.ybh == labInfo.value.ybh);
|
||||||
}
|
}
|
||||||
const zbLabResuts = ref([])
|
const zbLabResuts = ref([])
|
||||||
const cbLabResuts = ref([])
|
|
||||||
//载入样本结果表单(中间labresult.vue组件)
|
//载入样本结果表单(中间labresult.vue组件)
|
||||||
const fetchLabResults = async () => {
|
const fetchLabResults = async () => {
|
||||||
sampleMedInfo({ jyrq: labInfo.value.jyrq ? labInfo.value.jyrq : queryParams.value.jyrq, yq: labInfo.value.yq, ybh: labInfo.value.ybh }).then((response: any) => {
|
sampleMedInfo({ jyrq: labInfo.value.jyrq ? labInfo.value.jyrq : queryParams.value.jyrq, yq: labInfo.value.yq, ybh: labInfo.value.ybh }).then((response: any) => {
|
||||||
zbLabResuts.value = response.data;
|
zbLabResuts.value = response.data;
|
||||||
if (labPat.value.jgbz == '2') {
|
|
||||||
}
|
|
||||||
if (labPat.value.jgbz == '3') {
|
|
||||||
cbLabResuts.value = response.data;
|
|
||||||
}
|
|
||||||
|
|
||||||
console.log(' zbLabResuts.value==>', zbLabResuts.value);
|
|
||||||
console.log(' cbLabResuts.value==>', cbLabResuts.value);
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -439,7 +414,6 @@ const fetchLabPat = () => {
|
|||||||
}
|
}
|
||||||
queryLabPat(data).then((response: any) => {
|
queryLabPat(data).then((response: any) => {
|
||||||
labPat.value = response.data;
|
labPat.value = response.data;
|
||||||
labInfo.value = response.data;
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -487,7 +461,6 @@ const handleCreate = () => {
|
|||||||
labInfo.value = response.data;
|
labInfo.value = response.data;
|
||||||
labPat.value.id = `temp_${Date.now()}_${Math.random().toString(36).substr(2, 8)}`;
|
labPat.value.id = `temp_${Date.now()}_${Math.random().toString(36).substr(2, 8)}`;
|
||||||
zbLabResuts.value = [];
|
zbLabResuts.value = [];
|
||||||
cbLabResuts.value = [];
|
|
||||||
labPatListRef.value?.clearCurrentRow();
|
labPatListRef.value?.clearCurrentRow();
|
||||||
fetchLabResults()
|
fetchLabResults()
|
||||||
}
|
}
|
||||||
@ -518,7 +491,6 @@ const delSampleHd = () => {
|
|||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
ElMessage.success('删除成功')
|
ElMessage.success('删除成功')
|
||||||
labPatList.value = labPatList.value.filter((item: any) => item.ybh != labInfo.value.ybh)
|
labPatList.value = labPatList.value.filter((item: any) => item.ybh != labInfo.value.ybh)
|
||||||
getTotals()
|
|
||||||
// 删除跳当前页面下一个样本
|
// 删除跳当前页面下一个样本
|
||||||
// handleNext()
|
// handleNext()
|
||||||
if (highlightRowIndex.value > labPatList.value.length - 1) {
|
if (highlightRowIndex.value > labPatList.value.length - 1) {
|
||||||
@ -636,7 +608,6 @@ const changeStatus = (updatedPat: any, flag: boolean) => {
|
|||||||
labPatListRef.value.setCurrentRow(labPat.value);
|
labPatListRef.value.setCurrentRow(labPat.value);
|
||||||
});
|
});
|
||||||
}, 10)
|
}, 10)
|
||||||
getTotals()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -670,13 +641,8 @@ const fetchlabPatList = () => {
|
|||||||
loading.value = false;
|
loading.value = false;
|
||||||
if (res.rows.length > 0) {
|
if (res.rows.length > 0) {
|
||||||
highlightRowIndex.value = 0;
|
highlightRowIndex.value = 0;
|
||||||
setTimeout(() => { labPatListRef.value.setCurrentRow(res.rows[0]); }, 100)
|
setTimeout(() => { labPatListRef.value.setCurrentRow(res.rows[0]) }, 10)
|
||||||
selectJob(res.rows[0])
|
selectJob(res.rows[0])
|
||||||
getTotals()
|
|
||||||
} else {
|
|
||||||
ybs.value = 0
|
|
||||||
ws.value = 0
|
|
||||||
wjs.value = 0
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -708,12 +674,15 @@ interface DictData {
|
|||||||
const dictData = ref<DictData>({});
|
const dictData = ref<DictData>({});
|
||||||
const labInputcolList = ref([])
|
const labInputcolList = ref([])
|
||||||
const resultConfig = ref([])
|
const resultConfig = ref([])
|
||||||
|
|
||||||
|
const instrdComOpt = ref({}) //仪器通用配置
|
||||||
// 获取参数配置
|
// 获取参数配置
|
||||||
const getSysList = () => {
|
const getSysList = () => {
|
||||||
instrdconfig({ yq: queryParams.value.yq }).then((res: any) => {
|
instrdconfig({ yq: queryParams.value.yq }).then((res: any) => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
labInputcolList.value = res.data.labInputcolList.filter((item: any) => item.mrts != "年龄单位" && item.mrts != "!")
|
labInputcolList.value = res.data.labInputcolList.filter((item: any) => item.mrts != "年龄单位" && item.mrts != "!")
|
||||||
resultConfig.value = res.data.ResultConfig
|
resultConfig.value = res.data.ResultConfig
|
||||||
|
instrdComOpt.value = res.data.instrdComOpt
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
mbStore.setLxsrList([]);
|
mbStore.setLxsrList([]);
|
||||||
@ -742,13 +711,13 @@ onMounted(async () => {
|
|||||||
GMC: toRaw(dictRefs.GMC.value) || [],
|
GMC: toRaw(dictRefs.GMC.value) || [],
|
||||||
};
|
};
|
||||||
// 初始化Socket
|
// 初始化Socket
|
||||||
// initSocket()
|
initSocket()
|
||||||
});
|
});
|
||||||
|
|
||||||
const initSocket = () => {
|
const initSocket = () => {
|
||||||
initWebSocket({
|
initWebSocket({
|
||||||
// fullUrl: `ws://47.97.125.165:8904/ws/instr/${mbStore.fingerprint}`,
|
fullUrl: `ws://47.97.125.165:8904/ws/instr/${mbStore.fingerprint}`,
|
||||||
fullUrl: `ws://192.168.1.151:9801/ws/instr/${mbStore.fingerprint}`,
|
// fullUrl: `ws://192.168.1.151:9801/ws/instr/${mbStore.fingerprint}`,
|
||||||
onOpen: () => {
|
onOpen: () => {
|
||||||
console.log('WebSocket连接成功');
|
console.log('WebSocket连接成功');
|
||||||
},
|
},
|
||||||
|
|||||||
@ -1,10 +1,72 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
培养基接种
|
<div class="mb5">
|
||||||
|
<el-button type="primary" plain size="small">打印培养基条码</el-button>
|
||||||
|
<el-checkbox v-model="checked">自动打印培养基条码</el-checkbox>
|
||||||
|
</div>
|
||||||
|
<CustomTable ref="tableRef" :data="tableData" :columns="columns" :config="tableConfig" :enable-column-drag="true"
|
||||||
|
@column-drag-end="handleColumnDragEnd">
|
||||||
|
</CustomTable>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import CustomTable from '@/components/elTable/index.vue';
|
||||||
|
import { getmediumList } from '@/api/liswork/micro/index'
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
labPat: {
|
||||||
|
type: Object,
|
||||||
|
required: true
|
||||||
|
},
|
||||||
|
//结果主键
|
||||||
|
labPatKey: {
|
||||||
|
type: Object,
|
||||||
|
default: () => { }
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const { labPat, labPatKey } = toRefs(props);
|
||||||
|
|
||||||
|
const checked = ref(false);
|
||||||
|
const tableRef = ref();
|
||||||
|
const tableData = ref([]);
|
||||||
|
const columns = ref([
|
||||||
|
{ label: "培养基", prop: "zhxmdh", align: 'center', visible: true, headerSlot: 'xmdh', width: 100 },
|
||||||
|
{ label: "接种时间", prop: "zhxmdh", align: 'center', visible: true, width: 100 },
|
||||||
|
{ label: "培养基结果", prop: "zhxmdh", align: 'center', visible: true, width: 100 },
|
||||||
|
{ label: "转种类型", prop: "zhxmdh", align: 'center', visible: true, width: 100 },
|
||||||
|
{ label: "培养周期(小时)", prop: "zhxmdh", align: 'center', visible: true, width: 100 },
|
||||||
|
{ label: "观察间隔(小时)", prop: "zhxmdh", align: 'center', visible: true, width: 100 },
|
||||||
|
]);
|
||||||
|
const tableConfig = ref({
|
||||||
|
border: true,
|
||||||
|
height: '100%',
|
||||||
|
})
|
||||||
|
|
||||||
|
const handleColumnDragEnd = (data: any) => {
|
||||||
|
columns.value = data.columns;
|
||||||
|
}
|
||||||
|
|
||||||
|
const getbyjList = () => {
|
||||||
|
const data = {
|
||||||
|
jyrq: labPat.value.jyrq,
|
||||||
|
yq: labPat.value.yq,
|
||||||
|
ybh: labPat.value.ybh,
|
||||||
|
}
|
||||||
|
getmediumList(data).then((res: any) => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
tableData.value = res.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
watch(() => props.labPat, (newValue) => {
|
||||||
|
if (newValue.jyrq && newValue.ybh && newValue.yq) {
|
||||||
|
getbyjList()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@ -1,16 +1,22 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<div class="title"><span>初报人:</span>{{ labPat.confirmer }} <span>报告时间:</span>{{ labPat.confirmdt
|
<div class="title">
|
||||||
}} </div>
|
|
||||||
<div>
|
<div>
|
||||||
<el-button class="btn_green btns_box" :size="autoSize" v-if="labPat.jgbz != 2"
|
<span>初报人:</span>{{ cbInfo?.confirmer }} <span>报告时间:</span>{{ cbInfo?.confirmdt }}
|
||||||
@click="handleCheck(1)">初报审核</el-button>
|
</div>
|
||||||
<el-button class="btns_box" :size="autoSize" v-if="labPat.jgbz == 2" @click="handleCheck(3)">取消审核</el-button>
|
<div><span>{{ cbInfo?.jgbz == '2' ? '已初报' : '' }}</span></div>
|
||||||
<el-button class="btns_box" type="primary" :size="autoSize" plain
|
</div>
|
||||||
:disabled="labPat.jgbz != null && labPat.jgbz != 0" @click="openItemDictDialog">新增</el-button>
|
<div>
|
||||||
<el-button class="btns_box" type="danger" :size="autoSize" :disabled="labPat.jgbz != null && labPat.jgbz != 0"
|
<el-button class="btn_green btns_box" :size="autoSize" v-if="cbInfo?.jgbz != 2"
|
||||||
plain @click="handleBatchDelete">删除</el-button>
|
@click="handleCheck(1, 'cb')">初报审核</el-button>
|
||||||
<el-button class="btn_green btns_box" :size="autoSize" @click="zhHandel">组合项目</el-button>
|
<el-button class="btns_box" :size="autoSize" v-if="cbInfo?.jgbz == 2"
|
||||||
|
@click="handleCheck(2, 'cb')">取消审核</el-button>
|
||||||
|
<el-button class="btns_box" type="primary" :size="autoSize" plain :disabled="cbInfo?.jgbz == '2'"
|
||||||
|
@click="openItemDictDialog(1)">新增</el-button>
|
||||||
|
<el-button class="btns_box" type="danger" :size="autoSize" :disabled="cbInfo?.jgbz == '2'" plain
|
||||||
|
@click="handleBatchDelete(1)">删除</el-button>
|
||||||
|
<el-button class="btn_green btns_box" :size="autoSize" :disabled="cbInfo?.jgbz == '2'"
|
||||||
|
@click="zhHandel(1)">组合项目</el-button>
|
||||||
</div>
|
</div>
|
||||||
<CustomTable :data="tableData" :columns="columns" :config="tableConfig" :enable-column-drag="true"
|
<CustomTable :data="tableData" :columns="columns" :config="tableConfig" :enable-column-drag="true"
|
||||||
@column-drag-end="handleColumnDragEnd">
|
@column-drag-end="handleColumnDragEnd">
|
||||||
@ -18,31 +24,31 @@
|
|||||||
细菌/结果({{ tableData.length }})项
|
细菌/结果({{ tableData.length }})项
|
||||||
</template>
|
</template>
|
||||||
<template #od="{ row }">
|
<template #od="{ row }">
|
||||||
<el-input v-model="row.od" v-if="labPat.jgbz == 0 || labPat.jgbz == null" size="small"
|
<el-input v-model="row.od" v-if="cbInfo?.jgbz != '2'" size="small" class="full-width-input foucs-input"
|
||||||
class="full-width-input foucs-input" @change="handleCsjgEnter(row)" />
|
@change="handleCsjgEnter(row, 1)" />
|
||||||
<span v-else>{{ row.od }}</span>
|
<span v-else>{{ row.od }}</span>
|
||||||
</template>
|
</template>
|
||||||
<template #csjg="{ row }">
|
<template #csjg="{ row }">
|
||||||
<el-input v-model="row.csjg" v-if="labPat.jgbz == 0 || labPat.jgbz == null" size="small"
|
<el-input v-model="row.csjg" v-if="cbInfo?.jgbz != '2'" size="small" class="full-width-input"
|
||||||
class="full-width-input" @change="handleCsjgEnter(row)" @dblclick="handleInputFocus(row)" />
|
@change="handleCsjgEnter(row, 1)" @dblclick="handleInputFocus(row, 1)" />
|
||||||
<span v-else>{{ row.csjg }}</span>
|
<span v-else>{{ row.csjg }}</span>
|
||||||
</template>
|
</template>
|
||||||
<template #jgbz="{ row }">
|
<template #jgbz="{ row }">
|
||||||
<el-select v-model="row.jgbz" class="full-width-input" v-if="labPat.jgbz == 0 || labPat.jgbz == null"
|
<el-select v-model="row.jgbz" class="full-width-input" v-if="cbInfo?.jgbz != '2'" placeholder=""
|
||||||
placeholder="" @change="handleCsjgEnter(row)">
|
@change="handleCsjgEnter(row, 1)">
|
||||||
<el-option label="阳性" value="P" />
|
<el-option label="阳性" value="P" />
|
||||||
<el-option label="阴性" value="N" />
|
<el-option label="阴性" value="N" />
|
||||||
</el-select>
|
</el-select>
|
||||||
<span v-else> {{ formatJgbz(row.jgbz) }}</span>
|
<span v-else> {{ formatJgbz(row.jgbz) }}</span>
|
||||||
</template>
|
</template>
|
||||||
<template #cutoff="{ row }">
|
<template #cutoff="{ row }">
|
||||||
<el-input v-model="row.cutoff" v-if="labPat.jgbz == 0 || labPat.jgbz == null" size="small"
|
<el-input v-model="row.cutoff" v-if="cbInfo?.jgbz != '2'" size="small" class="full-width-input"
|
||||||
class="full-width-input" @change="handleCsjgEnter(row)" />
|
@change="handleCsjgEnter(row, 1)" />
|
||||||
<span v-else>{{ row.cutoff }}</span>
|
<span v-else>{{ row.cutoff }}</span>
|
||||||
</template>
|
</template>
|
||||||
<template #alarm_flag="{ row }">
|
<template #alarm_flag="{ row }">
|
||||||
<el-select v-model="row.alarm_flag" class="full-width-input" v-if="labPat.jgbz == 0 || labPat.jgbz == null"
|
<el-select v-model="row.alarm_flag" class="full-width-input" v-if="cbInfo?.jgbz != '2'" placeholder=""
|
||||||
placeholder="" @change="handleCsjgEnter(row)">
|
@change="handleCsjgEnter(row, 1)">
|
||||||
<el-option label="危急值" value="H" />
|
<el-option label="危急值" value="H" />
|
||||||
<el-option label="无" value="" />
|
<el-option label="无" value="" />
|
||||||
</el-select>
|
</el-select>
|
||||||
@ -52,19 +58,94 @@
|
|||||||
{{ formatDict(row.germclass, 'germclass') }}
|
{{ formatDict(row.germclass, 'germclass') }}
|
||||||
</template>
|
</template>
|
||||||
</CustomTable>
|
</CustomTable>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="title ertext">
|
||||||
|
<div>
|
||||||
|
<span>二报人:</span>{{ erInfo?.confirmer }} <span>报告时间:</span>{{ erInfo?.confirmdt }}
|
||||||
|
</div>
|
||||||
|
<div><span>{{ erInfo?.jgbz == '2' ? '已二报' : '' }}</span></div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<el-button class="btn_green btns_box" :size="autoSize" v-if="erInfo?.jgbz != 2"
|
||||||
|
@click="handleCheck(1, 'erb')">二报审核</el-button>
|
||||||
|
<el-button class="btns_box" :size="autoSize" v-if="erInfo?.jgbz == 2"
|
||||||
|
@click="handleCheck(2, 'erb')">取消审核</el-button>
|
||||||
|
<el-button class="btns_box" type="primary" :size="autoSize" plain :disabled="erInfo?.jgbz == '2'"
|
||||||
|
@click="openItemDictDialog(2)">新增</el-button>
|
||||||
|
<el-button class="btns_box" type="danger" :size="autoSize" :disabled="erInfo?.jgbz == '2'" plain
|
||||||
|
@click="handleBatchDelete(2)">删除</el-button>
|
||||||
|
<el-button class="btn_green btns_box" :size="autoSize" :disabled="erInfo?.jgbz == '2'"
|
||||||
|
@click="zhHandel(2)">组合项目</el-button>
|
||||||
|
</div>
|
||||||
|
<CustomTable :data="tableData2" :columns="columns" :config="tableConfig" :enable-column-drag="true"
|
||||||
|
@column-drag-end="handleColumnDragEnd">
|
||||||
|
<template #xmdh="{ column }">
|
||||||
|
细菌/结果({{ tableData2.length }})项
|
||||||
|
</template>
|
||||||
|
<template #od="{ row }">
|
||||||
|
<el-input v-model="row.od" v-if="erInfo?.jgbz != '2'" size="small" class="full-width-input foucs-input"
|
||||||
|
@change="handleCsjgEnter(row, 2)" />
|
||||||
|
<span v-else>{{ row.od }}</span>
|
||||||
|
</template>
|
||||||
|
<template #csjg="{ row }">
|
||||||
|
<el-input v-model="row.csjg" v-if="erInfo?.jgbz != '2'" size="small" class="full-width-input"
|
||||||
|
@change="handleCsjgEnter(row, 2)" @dblclick="handleInputFocus(row, 2)" />
|
||||||
|
<span v-else>{{ row.csjg }}</span>
|
||||||
|
</template>
|
||||||
|
<template #jgbz="{ row }">
|
||||||
|
<el-select v-model="row.jgbz" class="full-width-input" v-if="erInfo?.jgbz != '2'" placeholder=""
|
||||||
|
@change="handleCsjgEnter(row, 2)">
|
||||||
|
<el-option label="阳性" value="P" />
|
||||||
|
<el-option label="阴性" value="N" />
|
||||||
|
</el-select>
|
||||||
|
<span v-else> {{ formatJgbz(row.jgbz) }}</span>
|
||||||
|
</template>
|
||||||
|
<template #cutoff="{ row }">
|
||||||
|
<el-input v-model="row.cutoff" v-if="erInfo?.jgbz != '2'" size="small" class="full-width-input"
|
||||||
|
@change="handleCsjgEnter(row, 2)" />
|
||||||
|
<span v-else>{{ row.cutoff }}</span>
|
||||||
|
</template>
|
||||||
|
<template #alarm_flag="{ row }">
|
||||||
|
<el-select v-model="row.alarm_flag" class="full-width-input" v-if="erInfo?.jgbz != '2'" placeholder=""
|
||||||
|
@change="handleCsjgEnter(row, 2)">
|
||||||
|
<el-option label="危急值" value="H" />
|
||||||
|
<el-option label="无" value="" />
|
||||||
|
</el-select>
|
||||||
|
<span v-else> {{ row.alarm_flag == 'H' ? '危急值' : '' }}</span>
|
||||||
|
</template>
|
||||||
|
<template #germclass="{ row }">
|
||||||
|
{{ formatDict(row.germclass, 'germclass') }}
|
||||||
|
</template>
|
||||||
|
</CustomTable>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- 新增明细 -->
|
||||||
|
<ProjectDetails ref="itemDictRef" :dialog-title="'选择检验项目'" :tableKey="labPatKey" @select="handleItemSelect" />
|
||||||
|
|
||||||
|
<!-- 测试结果项目常用结果选择 -->
|
||||||
|
<projectsJg ref="csjgRef" :tableData='csjgTableData' :dialog-title="'项目常用结果选择'" @selectItem="selectItem"
|
||||||
|
label="qz" />
|
||||||
|
|
||||||
|
<!-- 组合项目 -->
|
||||||
|
<Combined ref="combinedRef" :queryParams="labPatKey" @dbMbHandle="combinedHandel" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import CustomTable from '@/components/elTable/index.vue'
|
import CustomTable from '@/components/elTable/index.vue'
|
||||||
import { LabResultItem, ymTableDataItem } from '@/types/index';
|
import { LabResultItem, ymTableDataItem } from '@/types/index';
|
||||||
import { getresultmedList, savetestResult, changeresult, saveresult, newresult, getmeddictList, savemedresult, savemedresultall, deletemedresult } from '@/api/liswork/micro/index';
|
import { changeresult, saveresult, newresult, sampleMedInfo } from '@/api/liswork/micro/index';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
check1, check2, uncheck2, unconfirmlog, checkuser, reglimit, deleteresult, allPatquery, emrquery, datalink, changeLinkList,
|
check1, check2, uncheck2, unconfirmlog, checkuser, reglimit, deleteresult, allPatquery, emrquery, datalink, changeLinkList,
|
||||||
viewBackup, queryXmVal, printListwork, getresultchangelog, setinputmdl, lockSample, unLockSample, clearnotComplete, clearPrintflag,
|
viewBackup, queryXmVal, printListwork, getresultchangelog, setinputmdl, lockSample, unLockSample, clearnotComplete, clearPrintflag,
|
||||||
noiteMresult, queryXmInfo, setitemInter
|
noiteMresult, queryXmInfo, setitemInter, queryLabPat
|
||||||
} from "@/api/liswork/work/LisWork";
|
} from "@/api/liswork/work/LisWork";
|
||||||
|
// @ts-ignore
|
||||||
|
import ProjectDetails from "@/components/projectDetails/index.vue";
|
||||||
|
import projectsJg from "@/components/projectsjg/index.vue";
|
||||||
|
// @ts-ignore
|
||||||
|
import Combined from "./components/combinedDialog.vue";
|
||||||
import emitter from '@/utils/mitt';
|
import emitter from '@/utils/mitt';
|
||||||
import { ElMessage } from 'element-plus';
|
import { ElMessage } from 'element-plus';
|
||||||
import { useCommonStore } from "@/store/modules/commonStore";
|
import { useCommonStore } from "@/store/modules/commonStore";
|
||||||
@ -80,34 +161,84 @@ const props = defineProps({
|
|||||||
type: Object,
|
type: Object,
|
||||||
default: () => { }
|
default: () => { }
|
||||||
},
|
},
|
||||||
labResutsData: {
|
// 主键仪器参数
|
||||||
type: Array as PropType<LabResultItem[]>,
|
instrdComOpt: {
|
||||||
default: () => []
|
type: Object,
|
||||||
|
required: true
|
||||||
},
|
},
|
||||||
|
|
||||||
dictData: {
|
dictData: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default: () => { }
|
default: () => { }
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
const { labPat, labPatKey, labResutsData, dictData } = toRefs(props);
|
const { labPat, labPatKey, instrdComOpt } = toRefs(props);
|
||||||
|
|
||||||
|
const tableData = ref<LabResultItem[]>([])
|
||||||
|
const tableData2 = ref<LabResultItem[]>([])
|
||||||
|
|
||||||
|
const cbInfo = ref<any>({})
|
||||||
|
const erInfo = ref<any>({})
|
||||||
|
|
||||||
const mbStore = useCommonStore();
|
const mbStore = useCommonStore();
|
||||||
watch(labResutsData, (newVal: any) => {
|
watch(labPat, (newVal: any) => {
|
||||||
if (newVal.length) {
|
//获取结果列表
|
||||||
tableData.value = newVal.map((item: any) => {
|
getResultList()
|
||||||
|
// 获取病人信息
|
||||||
|
getLabPatInfo()
|
||||||
|
})
|
||||||
|
|
||||||
|
watch(() => tableData, (newValue) => {
|
||||||
|
// 模板数据
|
||||||
|
if (labPat.value.jgbz != null && labPat.value.jgbz != 0 && labPat.value.jgbz != 'C') return;
|
||||||
|
mbList(1)
|
||||||
|
})
|
||||||
|
|
||||||
|
watch(() => tableData2, (newValue) => {
|
||||||
|
// 模板数据
|
||||||
|
if (labPat.value.jgbz != null && labPat.value.jgbz != 0 && labPat.value.jgbz != 'C') return;
|
||||||
|
mbList(2)
|
||||||
|
})
|
||||||
|
|
||||||
|
const getLabPatInfo = () => {
|
||||||
|
queryLabPat({ jyrq: labPat.value.jyrq, yq: instrdComOpt.value.yq1, ybh: labPat.value.ybh, }).then((response: any) => {
|
||||||
|
cbInfo.value = response.data;
|
||||||
|
})
|
||||||
|
queryLabPat({ jyrq: labPat.value.jyrq, yq: instrdComOpt.value.yq2, ybh: labPat.value.ybh, }).then((response: any) => {
|
||||||
|
erInfo.value = response.data;
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const getResultList = () => {
|
||||||
|
// 初级数据
|
||||||
|
sampleMedInfo({ jyrq: labPat.value.jyrq, yq: instrdComOpt.value.yq1, ybh: labPat.value.ybh, }).then((res: any) => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
tableData.value = res.data.map((item: any) => {
|
||||||
return {
|
return {
|
||||||
...item,
|
...item,
|
||||||
zhxmdh: item.xmdh + ' ' + item.xmmc,
|
zhxmdh: item.xmdh + ' ' + item.xmmc,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
console.log('tableData==>', tableData.value);
|
|
||||||
} else {
|
|
||||||
tableData.value = []
|
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
// 二级数据
|
||||||
|
sampleMedInfo({ jyrq: labPat.value.jyrq, yq: instrdComOpt.value.yq2, ybh: labPat.value.ybh, }).then((res: any) => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
tableData2.value = res.data.map((item: any) => {
|
||||||
|
return {
|
||||||
|
...item,
|
||||||
|
zhxmdh: item.xmdh + ' ' + item.xmmc,
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
if (props.labPat.jgbz != null && props.labPat.jgbz != 0 && props.labPat.jgbz != 'C') return;
|
}
|
||||||
// console.log('mbStore==>', mbStore.lxsrs);
|
|
||||||
|
|
||||||
|
const mbList = (type: number) => {
|
||||||
|
const targetTable = type === 1 ? tableData.value : tableData2.value;
|
||||||
if (mbStore.lxsrs.length > 0) {
|
if (mbStore.lxsrs.length > 0) {
|
||||||
mbStore.lxsrs.forEach((mbmc) => {
|
mbStore.lxsrs.forEach((mbmc) => {
|
||||||
const data = {
|
const data = {
|
||||||
@ -116,10 +247,10 @@ watch(labResutsData, (newVal: any) => {
|
|||||||
}
|
}
|
||||||
setinputmdl(data).then((res: any) => {
|
setinputmdl(data).then((res: any) => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
const existingNames = new Set(tableData.value.map((item: any) => item.xmdh))
|
const existingNames = new Set(targetTable.map((item: any) => item.xmdh))
|
||||||
res.data?.forEach((item: any) => {
|
res.data?.forEach((item: any) => {
|
||||||
if (!existingNames.has(item.xmdh)) {
|
if (!existingNames.has(item.xmdh)) {
|
||||||
tableData.value.push({ ...item, jyrq: labPat.value.jyrq, zhxmdh: item.xmdh + ' ' + item.xmmc })
|
targetTable.push({ ...item, jyrq: labPat.value.jyrq, zhxmdh: item.xmdh + ' ' + item.xmmc })
|
||||||
existingNames.add(item.xmdh)
|
existingNames.add(item.xmdh)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -128,7 +259,7 @@ watch(labResutsData, (newVal: any) => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
})
|
}
|
||||||
|
|
||||||
|
|
||||||
// 事件定义
|
// 事件定义
|
||||||
@ -138,7 +269,6 @@ const emits = defineEmits([
|
|||||||
'previewHandle'
|
'previewHandle'
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const tableData = ref<LabResultItem[]>([])
|
|
||||||
|
|
||||||
const columns = ref([
|
const columns = ref([
|
||||||
{ label: "细菌/结果", prop: "zhxmdh", align: 'center', visible: true, headerSlot: 'xmdh', width: 150 },
|
{ label: "细菌/结果", prop: "zhxmdh", align: 'center', visible: true, headerSlot: 'xmdh', width: 150 },
|
||||||
@ -193,9 +323,9 @@ const CellStyleHd = ({ row, column, rowIndex, columnIndex }: {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const tableConfig = ref({
|
const tableConfig = ref({
|
||||||
height: '28vh',
|
height: '32vh',
|
||||||
border: true,
|
border: true,
|
||||||
highlightCurrentRow: true,
|
// highlightCurrentRow: true,
|
||||||
cellStyle: CellStyleHd
|
cellStyle: CellStyleHd
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -203,60 +333,93 @@ const handleColumnDragEnd = (data: any) => {
|
|||||||
columns.value = data.columns;
|
columns.value = data.columns;
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleCheck = (checkType: number) => {
|
const shType = ref('') // 审核类型 cb初报 erb二报
|
||||||
|
const bgType = ref(1) // 报告类型 1初报 2二报
|
||||||
|
|
||||||
|
const handleCheck = (checkType: number, shtype: string) => {
|
||||||
|
shType.value = shtype
|
||||||
// yhdh = checkuserid.value
|
// yhdh = checkuserid.value
|
||||||
switch (checkType) {
|
switch (checkType) {
|
||||||
case 1: // 初审
|
// case 1: // 初审
|
||||||
check1({ ...labPatKey.value, jyrq: labPat.value.jyrq, yhdh: props.labPat.yhdh }).then((res: any) => {
|
// check1({ ...labPatKey.value, jyrq: labPat.value.jyrq, yhdh: props.labPat.yhdh }).then((res: any) => {
|
||||||
emits("changeStatus", props.labPat);
|
// emits("changeStatus", props.labPat);
|
||||||
})
|
// })
|
||||||
break;
|
// break;
|
||||||
case 2: // 审核
|
case 1: // 审核
|
||||||
labPatKey.value.problemId = 0
|
labPatKey.value.problemId = 0
|
||||||
// shHandleCheck()
|
shHandleCheck()
|
||||||
break;
|
break;
|
||||||
case 3: // 取消审核
|
case 2: // 取消审核
|
||||||
labPatKey.value.problemId = 0
|
labPatKey.value.problemId = 0
|
||||||
// unShHandle()
|
unShHandle()
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const openItemDictDialog = () => {
|
const unCheckshow = ref(false);
|
||||||
|
const reasonText = ref('');
|
||||||
|
const warningMsgdata = ref('');
|
||||||
|
const showuploadwarning = ref(false);
|
||||||
|
|
||||||
|
const shHandleCheck = () => {
|
||||||
|
check2({ ...labPatKey.value, jyrq: labPat.value.jyrq, yhdh: labPat.value.yhdh, yq: labPat.value.yq }).then((res: any) => {
|
||||||
|
if (res.code == "4" && res.problemId === 4) {
|
||||||
|
labPatKey.value.problemId = res.problemId;
|
||||||
|
warningMsgdata.value = res.msg;
|
||||||
|
showuploadwarning.value = true;
|
||||||
|
}
|
||||||
|
getLabPatInfo()
|
||||||
|
})
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleBatchDelete = () => { }
|
|
||||||
|
const unShHandle = () => {
|
||||||
|
uncheck2({ ...labPatKey.value, jyrq: labPat.value.jyrq, yhdh: labPat.value.yhdh, yq: labPat.value.yq }).then((res: any) => {
|
||||||
|
if (res.code == "4") {
|
||||||
|
labPatKey.value.problemId = res.problemId;
|
||||||
|
reasonText.value = res.msg;
|
||||||
|
unCheckshow.value = true;
|
||||||
|
}
|
||||||
|
getLabPatInfo()
|
||||||
|
})
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
const handleBatchDelete = (type: number) => {
|
||||||
|
bgType.value = type
|
||||||
|
}
|
||||||
|
|
||||||
// 项目结果保存
|
// 项目结果保存
|
||||||
const handleCsjgEnter = async (row: any) => {
|
const handleCsjgEnter = async (row: any, type: number) => {
|
||||||
|
bgType.value = type
|
||||||
|
const yq = type === 1 ? instrdComOpt.value.yq1 : instrdComOpt.value.yq2
|
||||||
|
const targetTable = type === 1 ? tableData.value : tableData2.value;
|
||||||
// 判断数据中包含模板新增的数据 flag
|
// 判断数据中包含模板新增的数据 flag
|
||||||
if (tableData.value.length == 0) return
|
if (targetTable.length == 0) return
|
||||||
const flag = tableData.value.some((item: any) => item.changeflag == 2)
|
const flag = targetTable.some((item: any) => item.changeflag == 2)
|
||||||
if (flag) {
|
if (flag) {
|
||||||
saveresult(tableData.value).then((res: any) => {
|
saveresult(targetTable).then((res: any) => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
emitter.emit('wswSaveResult');
|
getResultList()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
if (!row) return
|
if (!row) return
|
||||||
if (row && row.id) {
|
if (row && row.id) {
|
||||||
emitter.emit('wswSaveResult');
|
newresult({ ...row, ybh: labPat.value.ybh, jyrq: labPat.value.jyrq, yq }).then((response: any) => {
|
||||||
newresult({ ...row, ybh: labPat.value.ybh, jyrq: labPat.value.jyrq, yq: labPat.value.yq }).then((response: any) => {
|
|
||||||
ElMessage.success("结果保存成功");
|
ElMessage.success("结果保存成功");
|
||||||
emits('fetchLabResults');
|
getResultList()
|
||||||
}).catch((error: any) => {
|
}).catch((error: any) => {
|
||||||
emits('fetchLabResults');
|
getResultList()
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
changeresult(row).then((response: any) => {
|
changeresult(row).then((response: any) => {
|
||||||
ElMessage.success("结果保存成功");
|
ElMessage.success("结果保存成功");
|
||||||
emits('fetchLabResults');
|
getResultList()
|
||||||
}).catch((error: any) => {
|
}).catch((error: any) => {
|
||||||
emits('fetchLabResults');
|
getResultList()
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -267,9 +430,60 @@ const handleCsjgEnter = async (row: any) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
const itemDictRef = ref();
|
||||||
|
const openItemDictDialog = (type: number) => {
|
||||||
|
bgType.value = type
|
||||||
|
itemDictRef.value.openDictSelector();
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleItemSelect = async (selectedItem: any) => {
|
||||||
|
const yq = bgType.value === 1 ? instrdComOpt.value.yq1 : instrdComOpt.value.yq2
|
||||||
|
const targetTable = bgType.value === 1 ? tableData.value : tableData2.value;
|
||||||
|
// 1. 构造新增行数据
|
||||||
|
const newRow = {
|
||||||
|
id: `temp_${Date.now()}_${Math.random().toString(36).substr(2, 8)}`,
|
||||||
|
xmdh: selectedItem.value,
|
||||||
|
xmmc: selectedItem.label,
|
||||||
|
dw: selectedItem.dw || "",
|
||||||
|
refs: selectedItem.refs || "",
|
||||||
|
jyrq: labPatKey.value.jyrq,
|
||||||
|
yq: yq,
|
||||||
|
ybh: labPatKey.value.ybh,
|
||||||
|
od: '',
|
||||||
|
csjg: "",
|
||||||
|
jgbz: "",
|
||||||
|
alarm_flag: '',
|
||||||
|
cutoff: '',
|
||||||
|
qz: '',
|
||||||
|
zhxmdh: selectedItem.value + ' ' + selectedItem.label,
|
||||||
|
};
|
||||||
|
|
||||||
|
const isDuplicate = targetTable.some((item: any) => item.xmdh === newRow.xmdh);
|
||||||
|
if (isDuplicate) return ElMessage.warning(`项目【${newRow.xmmc}】已存在`);
|
||||||
|
|
||||||
|
|
||||||
|
targetTable.push(newRow);
|
||||||
|
newresult({ ...newRow, ybh: labPat.value.ybh, jyrq: labPat.value.jyrq, yq })
|
||||||
|
// 5. 自动聚焦
|
||||||
|
// nextTick(() => {
|
||||||
|
// selectedRows.value = [newRow];
|
||||||
|
// tableRef.value.setCurrentRow(newRow);
|
||||||
|
// tableRef.value.setScrollTo(targetTable.length - 1)
|
||||||
|
// // 聚焦到新行的输入框
|
||||||
|
// const inputs = Array.from(document.querySelectorAll('.foucs-input .el-input__inner'))
|
||||||
|
// .filter(el => el instanceof HTMLElement) as HTMLElement[];
|
||||||
|
// if (inputs.length > 0) {
|
||||||
|
// inputs[inputs.length - 1].focus();
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
// ElMessage.success(`已新增项目:${newRow.xmmc}`);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
const csjgRef = ref()
|
const csjgRef = ref()
|
||||||
const csjgTableData = ref([])
|
const csjgTableData = ref([])
|
||||||
const handleInputFocus = (row: any) => {
|
const handleInputFocus = (row: any, type: number) => {
|
||||||
|
bgType.value = type
|
||||||
// dbRow.value = row
|
// dbRow.value = row
|
||||||
queryXmVal({ yq: labPatKey.value.yq, xmdh: row.xmdh }).then((res: any) => {
|
queryXmVal({ yq: labPatKey.value.yq, xmdh: row.xmdh }).then((res: any) => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
@ -282,10 +496,11 @@ const handleInputFocus = (row: any) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const selectItem = (row: any) => {
|
const selectItem = (row: any) => {
|
||||||
|
const targetTable = bgType.value === 1 ? tableData.value : tableData2.value;
|
||||||
// 查找修改行
|
// 查找修改行
|
||||||
const index = tableData.value.findIndex((item: any) => item.xmdh == row.xmdh)
|
const index = targetTable.findIndex((item: any) => item.xmdh == row.xmdh)
|
||||||
tableData.value[index].csjg = row.qz
|
targetTable[index].csjg = row.qz
|
||||||
handleCsjgEnter(tableData.value[index])
|
handleCsjgEnter(targetTable[index], bgType.value)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -293,26 +508,27 @@ const selectItem = (row: any) => {
|
|||||||
// 组合项目
|
// 组合项目
|
||||||
const combinedRef = ref()
|
const combinedRef = ref()
|
||||||
|
|
||||||
const zhHandel = () => {
|
const zhHandel = (type: number) => {
|
||||||
|
bgType.value = type
|
||||||
combinedRef.value.open()
|
combinedRef.value.open()
|
||||||
};
|
};
|
||||||
|
|
||||||
const combinedHandel = (row: any) => {
|
const combinedHandel = (row: any) => {
|
||||||
if (props.labPat.jgbz != null && props.labPat.jgbz != 0 && props.labPat.jgbz != 'C') return ElMessage.warning('已审核结果不可添加模板项目');
|
const targetTable = bgType.value === 1 ? tableData.value : tableData2.value;
|
||||||
const data = {
|
const data = {
|
||||||
...labPatKey.value,
|
...labPatKey.value,
|
||||||
mbmc: row.mbmc,
|
mbmc: row.mbmc,
|
||||||
}
|
}
|
||||||
setinputmdl(data).then((res: any) => {
|
setinputmdl(data).then((res: any) => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
const existingNames = new Set(tableData.value.map((item: any) => item.xmdh))
|
const existingNames = new Set(targetTable.map((item: any) => item.xmdh))
|
||||||
res.data?.forEach((item: any) => {
|
res.data?.forEach((item: any) => {
|
||||||
if (!existingNames.has(item.xmdh)) {
|
if (!existingNames.has(item.xmdh)) {
|
||||||
tableData.value.push({ ...item, jyrq: labPat.value.jyrq, zhxmdh: item.xmdh + ' ' + item.xmmc })
|
targetTable.push({ ...item, jyrq: labPat.value.jyrq, zhxmdh: item.xmdh + ' ' + item.xmmc })
|
||||||
existingNames.add(item.xmdh)
|
existingNames.add(item.xmdh)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
handleCsjgEnter(null)
|
handleCsjgEnter(null, bgType.value)
|
||||||
emitter.emit('clearLxsrList')
|
emitter.emit('clearLxsrList')
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -329,9 +545,22 @@ const formatJgbz = (v: string) => {
|
|||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.title {
|
.title {
|
||||||
|
border-bottom: 1px solid #e8e8e8;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 3px 0;
|
||||||
|
font-family: SourceHanSansCN, SourceHanSansCN;
|
||||||
|
|
||||||
span {
|
span {
|
||||||
color: #00ff64;
|
color: #057c34;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.ertext {
|
||||||
|
margin-top: 10px;
|
||||||
|
|
||||||
|
span {
|
||||||
|
color: #e2e20c;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@ -81,7 +81,7 @@
|
|||||||
<el-radio value="I">I</el-radio>
|
<el-radio value="I">I</el-radio>
|
||||||
<el-radio value="S">S</el-radio>
|
<el-radio value="S">S</el-radio>
|
||||||
<el-radio value="N">N</el-radio>
|
<el-radio value="N">N</el-radio>
|
||||||
<el-radio value="SDD">SDD</el-radio>
|
<el-radio value="D">SDD</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -178,12 +178,11 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import CustomTable from "@/components/elTable/index.vue";
|
import CustomTable from "@/components/elTable/index.vue";
|
||||||
import { classCom } from "@/utils/classCom";
|
import { classCom } from "@/utils/classCom";
|
||||||
import { getresultmedList, savetestResult, changeresult, saveresult, newresult, getmeddictList, savemedresult, savemedresultall, deletemedresult, getmedgroupMbList } from '@/api/liswork/micro/index';
|
|
||||||
import {
|
import {
|
||||||
check1, check2, uncheck2, unconfirmlog, checkuser, reglimit, deleteresult, allPatquery, emrquery,
|
getresultmedList, savetestResult, changeresult, saveresult, newresult, getmeddictList, savemedresult,
|
||||||
viewBackup, queryXmVal, printListwork, getresultchangelog, setinputmdl, lockSample, unLockSample, clearnotComplete, clearPrintflag,
|
savemedresultall, deletemedresult, getmedgroupMbList
|
||||||
noiteMresult, queryXmInfo, setitemInter
|
} from '@/api/liswork/micro/index';
|
||||||
} from "@/api/liswork/work/LisWork";
|
import { check2, uncheck2, unconfirmlog, checkuser, deleteresult, queryXmVal, setinputmdl, } from "@/api/liswork/work/LisWork";
|
||||||
import { useCommonStore } from "@/store/modules/commonStore";
|
import { useCommonStore } from "@/store/modules/commonStore";
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
import ProjectDetails from "@/components/projectDetails/index.vue";
|
import ProjectDetails from "@/components/projectDetails/index.vue";
|
||||||
@ -663,8 +662,8 @@ const ymTableData = ref<ymTableDataItem[]>([]);
|
|||||||
const ymColumns = ref([
|
const ymColumns = ref([
|
||||||
{ label: "抗生素", prop: "zhywdh", visible: true, width: 120, headerSlot: 'ywdhHead' },
|
{ label: "抗生素", prop: "zhywdh", visible: true, width: 120, headerSlot: 'ywdhHead' },
|
||||||
{ label: "Mic", prop: "mic", align: 'center', visible: true, width: 60, slot: 'mic' },
|
{ label: "Mic", prop: "mic", align: 'center', visible: true, width: 60, slot: 'mic' },
|
||||||
{ label: "KB", prop: "rad", align: 'center', visible: true, width: 40, slot: 'rad' },
|
{ label: "KB", prop: "rad", align: 'center', visible: true, width: 50, slot: 'rad' },
|
||||||
{ label: "结果", prop: "csjg", align: 'center', visible: true, width: 50, slot: 'csjg' },
|
{ label: "结果", prop: "csjg", align: 'center', visible: true, width: 60, slot: 'csjg' },
|
||||||
{ label: "结果标志", prop: "jgbz", align: 'center', visible: true, slot: 'jgbz', width: 200, showOverflowTooltip: false },
|
{ label: "结果标志", prop: "jgbz", align: 'center', visible: true, slot: 'jgbz', width: 200, showOverflowTooltip: false },
|
||||||
{ label: "折点", prop: "ckz", align: 'center', visible: true, },
|
{ label: "折点", prop: "ckz", align: 'center', visible: true, },
|
||||||
{ label: "分组", prop: "bz", align: 'center', visible: true, slot: 'bz' },
|
{ label: "分组", prop: "bz", align: 'center', visible: true, slot: 'bz' },
|
||||||
@ -822,7 +821,7 @@ const jgbzHandle = (val: string, row: any) => {
|
|||||||
I: '中介',
|
I: '中介',
|
||||||
S: '敏感',
|
S: '敏感',
|
||||||
N: '非敏感',
|
N: '非敏感',
|
||||||
SDD: '剂量依赖性敏感'
|
D: '剂量依赖性敏感'
|
||||||
}
|
}
|
||||||
row.csjg = obj[val]
|
row.csjg = obj[val]
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user