429 433 438 476 477 478

This commit is contained in:
Ranyunqiao
2026-05-12 12:21:25 +08:00
committed by 华佗
parent 1476c406cf
commit b21d499f66
14 changed files with 755 additions and 256 deletions

View File

@@ -127,6 +127,7 @@ const queryParams = ref({
pageSize: 100,
pageNo: 1,
adviceTypes: '1,2,3',
categoryCode: '',
});
// 节流函数 - 与V1.3一致300ms首次立即响应
@@ -148,6 +149,7 @@ watch(
} else {
queryParams.value.adviceTypes = '1,2,3';
}
queryParams.value.categoryCode = newValue.categoryCode || '';
throttledGetList();
},
{ deep: true }
@@ -175,6 +177,12 @@ function getList() {
const types = adviceTypes.split(',').map(t => parseInt(t));
filteredData = filteredData.filter(item => types.includes(item.adviceType));
}
// 根据 categoryCode 过滤(如西药='2',中成药='1'
const categoryCode = queryParams.value.categoryCode;
if (categoryCode) {
filteredData = filteredData.filter(item => String(item.categoryCode) === String(categoryCode));
}
// 根据搜索关键词过滤
if (searchKey && searchKey.length >= 1) {

View File

@@ -918,6 +918,13 @@ function handleSave() {
ElMessage.warning('请至少选择一个检查明细项目');
return;
}
// 检查每个项目是否已选择检查方法
const itemsWithoutMethod = selectedItems.value.filter(item => !item.selectedMethod);
if (itemsWithoutMethod.length > 0) {
const names = itemsWithoutMethod.map(item => item.name).join('、');
ElMessage.warning(`以下项目未选择检查方法:${names},请在右侧勾选后再保存`);
return;
}
// 从已选项目推导检查类型编码(取第一个项目的 checkType如 CT / ECG / GI
const firstCheckType = selectedItems.value[0]?.checkType || 'unknown';
form.examTypeCode = firstCheckType;
@@ -1105,12 +1112,6 @@ async function handleItemSelect(checked, item, cat) {
form.performDeptCode = cat.performDeptName;
}
// 如果有且仅有一个检查方法,自动选中并更新显示
if (methods.length === 1) {
const lastIdx = selectedItems.value.length - 1;
selectedItems.value[lastIdx].selectedMethod = methods[0];
updateMethodDisplay(); // Bug #384修复: 联动更新显示
}
} else {
const idx = selectedItems.value.findIndex(s => s.id === item.id);
if (idx > -1) selectedItems.value.splice(idx, 1);

View File

@@ -24,7 +24,7 @@
style="width: 100%"
>
<el-table-column type="index" label="序号" width="60" align="center" />
<!-- 手术单号 -->
<el-table-column label="手术单号" align="center" width="150">
<template #default="scope">
@@ -33,29 +33,31 @@
</el-link>
</template>
</el-table-column>
<!-- 申请日期 -->
<el-table-column label="申请日期" align="center" prop="createTime" width="180">
<template #default="scope">
{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{i}:{s}') }}
</template>
</el-table-column>
<!-- 患者姓名 -->
<el-table-column label="患者姓名" align="center" prop="patientName" width="100" />
<!-- 申请医生 -->
<el-table-column label="申请医生" align="center" prop="applyDoctorName" width="100" />
<!-- 申请科室 -->
<el-table-column label="申请科室" align="center" prop="applyDeptName" width="120" show-overflow-tooltip />
<!-- 手术名称 -->
<el-table-column label="手术名称" align="center" prop="surgeryName" min-width="150" show-overflow-tooltip />
<!-- 手术等级 -->
<el-table-column label="手术等级" align="center" prop="surgeryLevel_dictText" width="100" />
<!-- 手术室确认时间 -->
<el-table-column label="手术室确认时间" align="center" prop="operatingRoomConfirmTime" width="180">
<template #default="scope">
{{ scope.row.operatingRoomConfirmTime ? parseTime(scope.row.operatingRoomConfirmTime, '{y}-{m}-{d} {h}:{i}:{s}') : '-' }}
@@ -73,16 +75,16 @@
</el-tag>
</template>
</el-table-column>
<!-- 操作 -->
<el-table-column label="操作" align="center" width="200" fixed="right">
<template #default="scope">
<!-- 查看显示手术申请详情只读模式 -->
<el-button link type="primary" icon="View" @click="handleView(scope.row)">查看</el-button>
<!-- 编辑修改手术申请信息只有状态为新开的能修改 -->
<el-button link type="primary" icon="Edit" @click="handleEdit(scope.row)" v-if="scope.row.statusEnum === 0">编辑</el-button>
<!-- 删除取消手术申请作废 -->
<el-button link type="danger" icon="Delete" @click="handleDelete(scope.row)" v-if="scope.row.statusEnum === 0 || scope.row.statusEnum === 1">删除</el-button>
</template>
@@ -509,6 +511,10 @@ const props = defineProps({
})
const loading = ref(true)
const surgeryLoading = ref(false)
const anesthesiaLoading = ref(false)
let surgerySearchTimer = null
let anesthesiaSearchTimer = null
const surgeryList = ref([])
const open = ref(false)
const viewOpen = ref(false)

View File

@@ -182,7 +182,7 @@ import {computed, getCurrentInstance, ref, watch} from 'vue';
import {Refresh, Search} from '@element-plus/icons-vue';
import {patientInfo} from '../../store/patient.js';
import {getInspection} from './api';
import {getDepartmentList} from '@/api/public.js';
import {getOrgList} from '@/views/doctorstation/components/api.js';
const { proxy } = getCurrentInstance();
@@ -353,11 +353,13 @@ const getLocationInfo = async () => {
};
const recursionFun = (targetDepartment) => {
if (!targetDepartment) return '';
let name = '';
for (let index = 0; index < orgOptions.value.length; index++) {
const obj = orgOptions.value[index];
if (obj.id == targetDepartment) {
name = obj.name;
break;
}
const subObjArray = obj['children'];
if (subObjArray && subObjArray.length > 0) {
@@ -365,9 +367,11 @@ const recursionFun = (targetDepartment) => {
const item = subObjArray[i];
if (item.id == targetDepartment) {
name = item.name;
break;
}
}
}
if (name) break;
}
return name;
};
@@ -385,7 +389,6 @@ const handleViewDetail = async (row) => {
const obj = JSON.parse(row.descJson);
obj.targetDepartment = recursionFun(obj.targetDepartment);
descJsonData.value = obj;
// descJsonData.value = JSON.parse(row.descJson);
} catch (e) {
console.error('解析 descJson 失败:', e);
descJsonData.value = null;

View File

@@ -112,6 +112,8 @@ const showApplicationFormDialog = (name) => {
setTimeout(() => {
applicationFormName.value = components.value[name];
applicationFormDialogVisible.value = true;
// 列表(项目列表)
applicationFormNameRef?.value.getList?.();
// 科室列表
applicationFormNameRef?.value.getLocationInfo();
// 诊断目录列表
@@ -121,6 +123,8 @@ const showApplicationFormDialog = (name) => {
applicationFormName.value = components.value[name];
applicationFormDialogVisible.value = true;
nextTick(() => {
// 列表(项目列表)
applicationFormNameRef?.value.getList?.();
// 科室列表
applicationFormNameRef?.value.getLocationInfo();
// 诊断目录列表

View File

@@ -81,7 +81,7 @@
import {getCurrentInstance, onBeforeMount, onMounted, reactive, watch} from 'vue';
import {patientInfo} from '../../../store/patient.js';
import {getApplicationList, saveInspection} from './api';
import {getDepartmentList} from '@/api/public.js';
import {getOrgList} from '@/views/doctorstation/components/api.js';
import {getEncounterDiagnosis} from '../../api.js';
import {ElMessage} from 'element-plus';
@@ -164,7 +164,7 @@ onMounted(() => {
* type(1watch监听类型 2:点击保存类型)
* selectProjectIds(选中项目的id数组)
* */
const projectWithDepartment = (selectProjectIds, type) => {
const projectWithDepartment = (selectProjectIds) => {
//1.获取选中的项目 2.判断项目的执行科室是否相同 3.判断执行科室是否配置 4.将项目的执行科室复值到执行科室下拉选位置
let isRelease = true;
// 选中项目的数组
@@ -208,10 +208,8 @@ const projectWithDepartment = (selectProjectIds, type) => {
});
}
}
if (type == 1) {
if (isRelease) {
form.targetDepartment = findItem.id;
}
if (findItem && isRelease) {
form.targetDepartment = findItem.id;
}
}
return isRelease;
@@ -272,8 +270,8 @@ const submit = () => {
};
/** 查询科室 */
const getLocationInfo = () => {
getDepartmentList().then((res) => {
orgOptions.value = res.data || [];
getOrgList().then((res) => {
orgOptions.value = res.data.records;
console.log('科室========>', JSON.stringify(orgOptions.value));
});
};
@@ -310,7 +308,7 @@ function getDiagnosisList() {
}
});
}
defineExpose({ state, submit, getLocationInfo, getDiagnosisList });
defineExpose({ state, submit, getLocationInfo, getDiagnosisList, getList });
</script>
<style lang="scss" scoped>
.LaboratoryTests-container {