645 【住院管理-住院医生工作站】临床医嘱中的新增一条医嘱,请选择项目没有数据回显
615 【住院医生工作站-临床医嘱】录入“临时”医嘱时,【用药频次】字段被置灰锁死为“立即”且无法更改 577 [住院医生工作站-检验] 检验申请单项目列表中的单价/使用单位展示异常,单位回显为字典数字ID(如 6, 16)而非中文名称
This commit is contained in:
@@ -49,7 +49,7 @@ const tableWrapper = ref<HTMLDivElement | null>(null);
|
||||
const currentIndex = ref<number>(0);
|
||||
const currentSelectRow = ref<any>({});
|
||||
const queryParams = ref({
|
||||
pageSize: 100,
|
||||
pageSize: 30,
|
||||
pageNo: 1,
|
||||
adviceTypes: [1, 2, 3, 6],
|
||||
searchKey: '',
|
||||
|
||||
@@ -649,18 +649,18 @@ onMounted(() => {
|
||||
nextTick(() => {
|
||||
registerFormRef();
|
||||
});
|
||||
// Bug #589: 出院带药不自动设置频次为ST,由医生手动选择
|
||||
// Bug #615: 临时医嘱频次默认改为 ONCE(临时一次),不再强制设为 ST
|
||||
if (props.row.therapyEnum == '2' && !props.row.rateCode && props.row.adviceType != 7) {
|
||||
setRateCodeToST();
|
||||
setDefaultRateCode();
|
||||
}
|
||||
});
|
||||
|
||||
watch(
|
||||
() => props.row.therapyEnum,
|
||||
(newVal) => {
|
||||
// Bug #589: 出院带药不自动设置频次为ST,由医生手动选择
|
||||
if (newVal == '2' && props.row.adviceType != 7) {
|
||||
setRateCodeToST();
|
||||
// Bug #615: 临时医嘱频次仅在字段为空时给默认值,允许医生自主修改
|
||||
if (newVal == '2' && !props.row.rateCode && props.row.adviceType != 7) {
|
||||
setDefaultRateCode();
|
||||
} else if (newVal == '1') {
|
||||
props.row.rateCode = '';
|
||||
props.row.rateCode_dictText = '';
|
||||
@@ -668,15 +668,22 @@ watch(
|
||||
}
|
||||
);
|
||||
|
||||
const setRateCodeToST = () => {
|
||||
const setDefaultRateCode = () => {
|
||||
if (Array.isArray(props.config.rateCode)) {
|
||||
const stOption = props.config.rateCode.find((item) => item.value === 'ST');
|
||||
if (stOption) {
|
||||
props.row.rateCode = 'ST';
|
||||
props.row.rateCode_dictText = 'ST ' + stOption.label;
|
||||
// 临时医嘱默认频次:优先选 ONCE(临时一次),其次 ST(立即)
|
||||
const onceOption = props.config.rateCode.find((item) => item.value === 'ONCE');
|
||||
if (onceOption) {
|
||||
props.row.rateCode = 'ONCE';
|
||||
props.row.rateCode_dictText = 'ONCE ' + onceOption.label;
|
||||
} else {
|
||||
props.row.rateCode = 'ST';
|
||||
props.row.rateCode_dictText = 'ST 立即';
|
||||
const stOption = props.config.rateCode.find((item) => item.value === 'ST');
|
||||
if (stOption) {
|
||||
props.row.rateCode = 'ST';
|
||||
props.row.rateCode_dictText = 'ST ' + stOption.label;
|
||||
} else {
|
||||
props.row.rateCode = 'ST';
|
||||
props.row.rateCode_dictText = 'ST 立即';
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -450,7 +450,7 @@ const filterMethod = (query, item) => {
|
||||
|
||||
const mapToTransferItem = (item) => ({
|
||||
key: String(item.adviceDefinitionId),
|
||||
label: `${item.adviceName} - ${item.unitCode || ''}`,
|
||||
label: `${item.adviceName} - ${item.unitCode_dictText || item.unitCode || ''}`,
|
||||
disabled: false,
|
||||
});
|
||||
|
||||
|
||||
@@ -1031,8 +1031,7 @@ function handleDiagnosisChange(item) {
|
||||
function handleFocus(row, index) {
|
||||
rowIndex.value = index;
|
||||
row.showPopover = true;
|
||||
// Bug #555: handleFocus 只负责开 popover 和初始化查询参数,搜索由 handleChange 统一处理
|
||||
// 避免异步 refresh 用旧闭包 searchKey 覆盖 handleChange 的搜索结果
|
||||
// Bug #555: handleFocus 初始化查询参数并加载初始数据(searchKey 为空,无竞态风险)
|
||||
const adviceType = row.adviceType !== undefined ? row.adviceType : adviceQueryParams.value.adviceType;
|
||||
let categoryCode = '';
|
||||
if (row.adviceType !== undefined) {
|
||||
@@ -1041,6 +1040,11 @@ function handleFocus(row, index) {
|
||||
categoryCode = selectedItem ? selectedItem.categoryCode : (row.categoryCode || '');
|
||||
}
|
||||
adviceQueryParams.value = { adviceType, categoryCode, searchKey: '' };
|
||||
// 弹窗首次打开时加载初始数据
|
||||
const tableRef = Array.isArray(adviceTableRef.value) ? adviceTableRef.value[index] : adviceTableRef.value;
|
||||
if (tableRef && tableRef.refresh) {
|
||||
tableRef.refresh(adviceType, categoryCode, '');
|
||||
}
|
||||
}
|
||||
|
||||
function handleBlur(row) {
|
||||
|
||||
Reference in New Issue
Block a user