This commit is contained in:
wyuu 2026-03-27 09:03:32 +08:00
parent dc30a21d8f
commit 38189dfd11
7 changed files with 57 additions and 34 deletions

View File

@ -356,7 +356,8 @@ const handleSave = async (flag: any) => {
const valid = await tableTabRef.value.validate(); // 调用基本资料子组件的验证方法
if (!valid) return ElMessage.error('表单验证失败,请检查输入项!');
}
const flagCommon = modelParam.value.commonlyValuesData.every((item: any) => item.qz && item.srm && item.jgbz)
if (!flagCommon) return ElMessage.warning('请完整填写常用取值项!');
saveDataService({
xmInfoNew: modelParam.value.basicData,
xmDoubleRows: [],

View File

@ -25,12 +25,12 @@
<el-form-item label="日期:" prop="jyrq">
<el-date-picker v-model="ybJyrq" type="date" label-width="1.25rem" placeholder="检验日期"
value-format="YYYY-MM-DD" :clearable="false" @change="jyrqChange" ref="datePickerRef"
style="width:7.5rem" />
style="width: 8.5rem" />
</el-form-item>
<el-form-item label="部门:" prop="instrGroup">
<SelectTable v-model:data="queryParams.instrGroup" :fields="instrGroupFields"
:tableData="instrGroupOptions" label="zdmc" value="zddh" objKey="zddh" :border="true" width="9rem"
:tableData="instrGroupOptions" label="zdmc" value="zddh" objKey="zddh" :border="true" width="8rem"
placeholder="请选择部门" @getDataValue="handleinstrGroupChange" :clearable="false" :size="aotuSize" />
</el-form-item>
@ -572,8 +572,12 @@ const delSampleHd = () => {
}
const row = labPatList.value[highlightRowIndex.value];
labPatListRef.value.setCurrentRow(row);
selectJob(row);
if (row) {
labPatListRef.value.setCurrentRow(row);
selectJob(row);
} else {
handleCreate()
}
}
})
})
@ -665,7 +669,11 @@ const changeStatus = (updatedPat: any, flag: boolean) => {
// 更新样本列表中的样本信息
labPatList.value = labPatList.value.map((item, i) => i === index ? { ...labPat.value } : item);
highlightRowIndex.value = index;
setTimeout(() => {
nextTick(() => {
labPatListRef.value.setCurrentRow(labPatList.value[index]);
});
}, 10)
// 条码号输入后操作
if (flag) {
setTimeout(() => { handleNext() }, 10)
@ -719,16 +727,17 @@ const fetchlabPatList = () => {
const row = labPatList.value[index];
setTimeout(() => { labPatListRef.value.setCurrentRow(row); }, 10)
selectJob(row);
} else {
highlightRowIndex.value = 0;
setTimeout(() => { labPatListRef.value.setCurrentRow(res.data[0]) }, 10)
selectJob(res.data[0])
}
} else {
highlightRowIndex.value = 0;
setTimeout(() => { labPatListRef.value.setCurrentRow(res.data[0]) }, 10)
selectJob(res.data[0])
}
} else {
labInfo.value = {}
labPat.value = {}
zbLabResuts.value = []
handleCreate()
}
}
})
@ -850,11 +859,12 @@ const initSocket = () => {
// 页面卸载时清理
onUnmounted(() => {
closeWebSocket();
// closeWebSocket();
});
// 发送消息
const sendMessage = () => {
return
const isSuccess = sendWebSocketMessage({ yq: queryParams.value.yq });
if (isSuccess) {
console.log(`发送消息`);

View File

@ -61,7 +61,7 @@
<el-input v-model="fcYbh" @keyup.enter="subHandle()" />
</div>
<div class="mt10" style="text-align: center; width: 100%;">
<el-button type="primary" @click="subHandle()"> 确认 </el-button>
<el-button type="primary" :loading="subloading" @click="subHandle()"> 确认 </el-button>
<el-button @click="closeHandle">取消</el-button>
</div>
</el-dialog>
@ -100,9 +100,10 @@ const show = ref(false)
const fcYbh = ref('')
const fcYq = ref('')
const subloading = ref(false)
const subHandle = () => {
if (!fcYbh.value.trim()) return ElMessage.warning('请输入复查的样本号')
subloading.value = true
const data = {
newybh: fcYbh.value,
newyq: fcYq.value,
@ -113,6 +114,8 @@ const subHandle = () => {
ElMessage.success('操作成功')
closeHandle()
}
}).finally(() => {
subloading.value = false
})
}
const closeHandle = () => {

View File

@ -26,12 +26,12 @@
<el-form-item label="日期:" prop="jyrq">
<el-date-picker v-model="queryParams.jyrq" type="date" label-width="1.25rem" placeholder="检验日期"
value-format="YYYY-MM-DD" :clearable="false" @change="fetchlabPatList"
style="width:7.5rem"></el-date-picker>
style="width:8.5rem"></el-date-picker>
</el-form-item>
<el-form-item label="部门:" prop="instrGroup">
<SelectTable v-model:data="queryParams.instrGroup" :fields="instrGroupFields"
:tableData="instrGroupOptions" label="zdmc" value="zddh" objKey="zddh" :border="true" width="9rem"
:tableData="instrGroupOptions" label="zdmc" value="zddh" objKey="zddh" :border="true" width="8rem"
placeholder="请选择部门" @getDataValue="handleinstrGroupChange" :clearable="false" :size="aotuSize" />
</el-form-item>
@ -460,8 +460,12 @@ const delSampleHd = () => {
}
const row = labPatList.value[highlightRowIndex.value];
labPatListRef.value.setCurrentRow(row);
selectJob(row);
if (row) {
labPatListRef.value.setCurrentRow(row);
selectJob(row);
} else {
handleCreate()
}
}
})
})
@ -549,10 +553,11 @@ const changeStatus = (updatedPat: any, flag: boolean) => {
// 更新列表中对应的样本信息
labPatList.value = labPatList.value.map((item, i) => i === index ? { ...labPat.value } : item);
highlightRowIndex.value = index;
// nextTick(() => {
// labPatListRef.value.setCurrentRow(labPat.value);
// });
setTimeout(() => {
nextTick(() => {
labPatListRef.value.setCurrentRow(labPatList.value[index]);
});
}, 10)
// 条码号输入后操作
if (flag) {
@ -602,13 +607,13 @@ const fetchlabPatList = () => {
if (index !== -1) {
highlightRowIndex.value = index;
const row = labPatList.value[index];
setTimeout(() => { labPatListRef.value.setCurrentRow(row); }, 100)
setTimeout(() => { labPatListRef.value.setCurrentRow(row); }, 10)
selectJob(row);
} else {
highlightRowIndex.value = 0;
setTimeout(() => { labPatListRef.value.setCurrentRow(res.data[0]); }, 10)
selectJob(res.data[0])
}
} else {
highlightRowIndex.value = 0;
setTimeout(() => { labPatListRef.value.setCurrentRow(res.data[0]); }, 100)
selectJob(res.data[0])
}
getTotals()
} else {
@ -739,11 +744,12 @@ const initSocket = () => {
// 页面卸载时清理
onUnmounted(() => {
closeWebSocket();
// closeWebSocket();
});
// 发送消息
const sendMessage = () => {
return
const isSuccess = sendWebSocketMessage({ yq: queryParams.value.yq });
if (isSuccess) {
console.log(`发送消息`);

View File

@ -227,7 +227,7 @@ const handleFieldChange = async () => {
// 保存病人信息
const saveLabPat = async (changedField: any) => {
if (props.labPat.id) {
updateLabPat({ ...props.labPatKey, ...props.labPat }).then((res: any) => {
updateLabPat({ ...props.labPatKey, ...props.labPat, ybh: props.labPatKey.ybh }).then((res: any) => {
if (res.code == 0) {
if (sqhFlag.value) {
sqhValue.value = ''
@ -245,7 +245,7 @@ const saveLabPat = async (changedField: any) => {
})
} else {
if (!changedField) return
changepatcolumn({ ...props.labPatKey, column: changedField?.field, value: changedField?.newValue }).then((res: any) => {
changepatcolumn({ ...props.labPatKey, column: changedField?.field, value: changedField?.newValue, ybh: props.labPatKey.ybh }).then((res: any) => {
if (res.code == 0) {
if (sqhFlag.value) {
sqhValue.value = ''

View File

@ -68,7 +68,7 @@
<el-input v-model="fcYbh" @keyup.enter="subHandle()" />
</div>
<div class="mt10" style="text-align: center; width: 100%;">
<el-button type="primary" @click="subHandle()"> 确认 </el-button>
<el-button type="primary" :loading="subloading" @click="subHandle()"> 确认 </el-button>
<el-button @click="closeHandle">取消</el-button>
</div>
</el-dialog>
@ -107,9 +107,10 @@ const show = ref(false)
const fcYbh = ref('')
const fcYq = ref('')
const subloading = ref(false)
const subHandle = () => {
if (!fcYbh.value.trim()) return ElMessage.warning('请输入复查的样本号')
subloading.value = true
const data = {
newybh: fcYbh.value,
newyq: fcYq.value,
@ -120,6 +121,8 @@ const subHandle = () => {
ElMessage.success('操作成功')
closeHandle()
}
}).finally(() => {
subloading.value = false
})
}
const closeHandle = () => {

View File

@ -29,8 +29,8 @@
<el-table v-if="refreshTable" v-loading="loading" :data="deptList" row-key="deptId"
:default-expand-all="isExpandAll" :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
height="calc(100vh - 280px)">
<el-table-column prop="deptName" label="部门名称" width="260"></el-table-column>
<el-table-column prop="orderNum" label="排序" width="200"></el-table-column>
<el-table-column prop="deptName" label="部门名称"></el-table-column>
<el-table-column prop="orderNum" label="排序" width="100"></el-table-column>
<el-table-column prop="status" label="状态" width="100">
<template #default="scope">
<dict-tag :options="sys_normal_disable" :value="scope.row.status" />
@ -93,7 +93,7 @@
<el-form-item label="部门状态">
<el-radio-group v-model="form.status">
<el-radio v-for="dict in sys_normal_disable" :key="dict.value" :label="dict.value">{{ dict.label
}}</el-radio>
}}</el-radio>
</el-radio-group>
</el-form-item>
</el-col>