Merge branch 'develop' of http://192.168.110.253:3000/wangyizhe/his into develop
This commit is contained in:
@@ -675,7 +675,7 @@ getList();
|
||||
}
|
||||
|
||||
/* 表格样式调整,移除默认的最大宽度限制 */
|
||||
.table-scroll-container { :deep(.el-table) {
|
||||
.table-scroll-container :deep(.el-table) {
|
||||
min-width: 100%;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
@@ -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: '',
|
||||
|
||||
@@ -48,31 +48,31 @@
|
||||
/>
|
||||
<el-option
|
||||
label="待签发"
|
||||
value="0"
|
||||
/>
|
||||
<el-option
|
||||
label="已签发"
|
||||
value="1"
|
||||
/>
|
||||
<el-option
|
||||
label="已校对"
|
||||
label="已签发"
|
||||
value="2"
|
||||
/>
|
||||
<el-option
|
||||
label="已执行"
|
||||
label="已校对"
|
||||
value="3"
|
||||
/>
|
||||
<el-option
|
||||
label="已安排"
|
||||
label="已执行"
|
||||
value="4"
|
||||
/>
|
||||
<el-option
|
||||
label="已完成"
|
||||
label="已安排"
|
||||
value="5"
|
||||
/>
|
||||
<el-option
|
||||
label="已完成"
|
||||
value="6"
|
||||
/>
|
||||
<el-option
|
||||
label="已作废"
|
||||
value="7"
|
||||
value="10"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@@ -118,7 +118,7 @@
|
||||
/>
|
||||
<el-table-column
|
||||
label="手术单号"
|
||||
width="160"
|
||||
min-width="160"
|
||||
align="center"
|
||||
>
|
||||
<template #default="scope">
|
||||
@@ -133,25 +133,40 @@
|
||||
<el-table-column
|
||||
prop="patientName"
|
||||
label="患者姓名"
|
||||
width="120"
|
||||
min-width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="name"
|
||||
label="申请单名称"
|
||||
width="140"
|
||||
min-width="140"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="createTime"
|
||||
label="创建时间"
|
||||
width="160"
|
||||
min-width="160"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="requesterId_dictText"
|
||||
label="申请者"
|
||||
width="120"
|
||||
min-width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
label="状态"
|
||||
min-width="100"
|
||||
align="center"
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-tag
|
||||
:type="getStatusType(scope.row.status)"
|
||||
size="small"
|
||||
>
|
||||
{{ getStatusText(scope.row.status) }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
min-width="100"
|
||||
align="center"
|
||||
fixed="right"
|
||||
>
|
||||
@@ -397,6 +412,25 @@ const handleRefresh = async () => {
|
||||
await fetchData();
|
||||
};
|
||||
|
||||
/** 手术申请单状态映射 (与后端 SurgeryAppStatusEnum 对齐) */
|
||||
const statusMap = {
|
||||
1: { text: '待签发', type: 'info' },
|
||||
2: { text: '已签发', type: 'primary' },
|
||||
3: { text: '已校对', type: 'success' },
|
||||
4: { text: '已执行', type: 'warning' },
|
||||
5: { text: '已安排', type: 'warning' },
|
||||
6: { text: '已完成', type: 'success' },
|
||||
10: { text: '已作废', type: 'danger' },
|
||||
};
|
||||
|
||||
const getStatusText = (status) => {
|
||||
return statusMap[status]?.text || '未知';
|
||||
};
|
||||
|
||||
const getStatusType = (status) => {
|
||||
return statusMap[status]?.type || 'info';
|
||||
};
|
||||
|
||||
const labelMap = {
|
||||
categoryType: '项目类别',
|
||||
targetDepartment: '发往科室',
|
||||
|
||||
@@ -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