fix(diagnosis): 修复诊断组件中的条件判断和数据类型问题
- 在el-popconfirm中添加条件判断,仅在非常用和非历史节点显示删除确认 - 移除重复的按钮条件判断逻辑,统一删除确认按钮的显示条件 - 将diagSrtNo的默认值从字符串'1'改为数字1,保持数据类型一致性 - 修复订单状态标签的颜色配置,将停止状态从error类型改为danger类型 - 添加保存按钮的禁用条件计算,当没有患者信息或处方列表为空时禁用 - 移除调试用的console.log语句,清理生产环境代码
This commit is contained in:
@@ -46,6 +46,11 @@
|
|||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
<el-popconfirm
|
<el-popconfirm
|
||||||
|
v-if="
|
||||||
|
node.level === 2 &&
|
||||||
|
node.parent.data.name != '常用' &&
|
||||||
|
node.parent.data.name != '历史'
|
||||||
|
"
|
||||||
width="200"
|
width="200"
|
||||||
:hide-after="10"
|
:hide-after="10"
|
||||||
title="确认删除此常用诊断吗"
|
title="确认删除此常用诊断吗"
|
||||||
@@ -54,11 +59,6 @@
|
|||||||
>
|
>
|
||||||
<template #reference>
|
<template #reference>
|
||||||
<el-button
|
<el-button
|
||||||
v-if="
|
|
||||||
node.level === 2 &&
|
|
||||||
node.parent.data.name != '常用' &&
|
|
||||||
node.parent.data.name != '历史'
|
|
||||||
"
|
|
||||||
style="color: #000000"
|
style="color: #000000"
|
||||||
type="text"
|
type="text"
|
||||||
size="small"
|
size="small"
|
||||||
@@ -404,7 +404,7 @@ function getList() {
|
|||||||
...item,
|
...item,
|
||||||
};
|
};
|
||||||
if (obj.diagSrtNo == null) {
|
if (obj.diagSrtNo == null) {
|
||||||
obj.diagSrtNo = '1';
|
obj.diagSrtNo = 1;
|
||||||
}
|
}
|
||||||
return obj;
|
return obj;
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -255,7 +255,7 @@
|
|||||||
<el-tag v-else-if="scope.row.statusEnum == 10" type="primary">已校对</el-tag>
|
<el-tag v-else-if="scope.row.statusEnum == 10" type="primary">已校对</el-tag>
|
||||||
<el-tag v-else-if="scope.row.statusEnum == 11" type="primary">待接收</el-tag>
|
<el-tag v-else-if="scope.row.statusEnum == 11" type="primary">待接收</el-tag>
|
||||||
<el-tag v-else-if="scope.row.statusEnum == 3" type="success">已完成</el-tag>
|
<el-tag v-else-if="scope.row.statusEnum == 3" type="success">已完成</el-tag>
|
||||||
<el-tag v-else-if="scope.row.statusEnum == 6" type="error">停止</el-tag>
|
<el-tag v-else-if="scope.row.statusEnum == 6" type="danger">停止</el-tag>
|
||||||
<el-tag v-else type="info">{{ scope.row.chargeStatus_enumText }}</el-tag>
|
<el-tag v-else type="info">{{ scope.row.chargeStatus_enumText }}</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@@ -489,6 +489,9 @@ const unitMap = ref({
|
|||||||
const buttonDisabled = computed(() => {
|
const buttonDisabled = computed(() => {
|
||||||
return !patientInfo.value;
|
return !patientInfo.value;
|
||||||
});
|
});
|
||||||
|
const isSaveDisabled = computed(() => {
|
||||||
|
return !patientInfo.value || prescriptionList.value.length === 0;
|
||||||
|
});
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
patientInfo: {
|
patientInfo: {
|
||||||
type: Object,
|
type: Object,
|
||||||
@@ -676,7 +679,6 @@ function getListInfo(addNewRow) {
|
|||||||
organization.value = res?.data?.records ?? res?.data ?? [];
|
organization.value = res?.data?.records ?? res?.data ?? [];
|
||||||
});
|
});
|
||||||
getPrescriptionList(patientInfo.value.encounterId).then((res) => {
|
getPrescriptionList(patientInfo.value.encounterId).then((res) => {
|
||||||
console.log('getListInfo==========>', JSON.stringify(res.data));
|
|
||||||
// 等待科室树加载完成后再处理处方数据,确保 resolveOrgId 能正确匹配
|
// 等待科室树加载完成后再处理处方数据,确保 resolveOrgId 能正确匹配
|
||||||
orgTreePromise.then(() => {
|
orgTreePromise.then(() => {
|
||||||
loadingInstance.close();
|
loadingInstance.close();
|
||||||
@@ -684,7 +686,6 @@ function getListInfo(addNewRow) {
|
|||||||
.map((item) => {
|
.map((item) => {
|
||||||
const parsedContent = JSON.parse(item.contentJson);
|
const parsedContent = JSON.parse(item.contentJson);
|
||||||
// 构造 unitCodeList,确保编辑时下拉框有正确的选项
|
// 构造 unitCodeList,确保编辑时下拉框有正确的选项
|
||||||
console.log('【DEBUG】unitCode:', parsedContent?.unitCode, typeof parsedContent?.unitCode, 'unitCodeList:', JSON.stringify(parsedContent?.unitCodeList));
|
|
||||||
const unitCodeListData = parsedContent?.unitCodeList || [
|
const unitCodeListData = parsedContent?.unitCodeList || [
|
||||||
{ value: String(parsedContent?.unitCode ?? item.unitCode ?? ''), label: parsedContent?.unitCode_dictText ?? item.unitCode_dictText ?? '', type: 'unit' },
|
{ value: String(parsedContent?.unitCode ?? item.unitCode ?? ''), label: parsedContent?.unitCode_dictText ?? item.unitCode_dictText ?? '', type: 'unit' },
|
||||||
{ value: String(parsedContent?.doseUnitCode ?? ''), label: parsedContent?.doseUnitCode_dictText ?? '', type: 'dose' },
|
{ value: String(parsedContent?.doseUnitCode ?? ''), label: parsedContent?.doseUnitCode_dictText ?? '', type: 'dose' },
|
||||||
|
|||||||
Reference in New Issue
Block a user