Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
@@ -188,7 +188,7 @@ public class PatientHomeAppServiceImpl implements IPatientHomeAppService {
|
||||
@Override
|
||||
public List<OrgMetadata> getCaty() {
|
||||
List<Organization> list = iOrganizationService.getList(OrganizationType.DEPARTMENT.getValue(),
|
||||
OrganizationClass.INPATIENT.getCode());
|
||||
String.valueOf(OrganizationClass.INPATIENT.getValue()));
|
||||
List<OrgMetadata> orgMetadataList = new ArrayList<>();
|
||||
OrgMetadata orgMetadata;
|
||||
for (Organization organization : list) {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
/* eslint-env node */
|
||||
import path from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
import globals from "globals";
|
||||
@@ -42,7 +41,7 @@ export default [
|
||||
|
||||
rules: {
|
||||
// 确保导入的模块实际存在(核心规则,防止构建失败)
|
||||
"import-x/no-unresolved": "error",
|
||||
"import-x/no-unresolved": ["error", { ignore: ["^virtual:"] }],
|
||||
// 确保导入的命名导出实际存在
|
||||
"import-x/named": "error",
|
||||
// 确保默认导出存在
|
||||
|
||||
4
healthlink-his-ui/src/api/datacollection/index.d.ts
vendored
Normal file
4
healthlink-his-ui/src/api/datacollection/index.d.ts
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
export function collectClinicalData(data: any): Promise<any>;
|
||||
export function collectOperationalData(data: any): Promise<any>;
|
||||
export function getRealtimeData(): Promise<any>;
|
||||
export function getHistoricalData(params?: any): Promise<any>;
|
||||
@@ -183,7 +183,7 @@
|
||||
style="width: 100%"
|
||||
:class="row.error ? 'error-border' : ''"
|
||||
@change="
|
||||
async (value) => {
|
||||
async (value: any) => {
|
||||
const checkBeforeChange = col.extraprops?.checkBeforeChange;
|
||||
if (checkBeforeChange && typeof checkBeforeChange === 'function') {
|
||||
const result = await checkBeforeChange(row, rowIndex, value);
|
||||
@@ -399,7 +399,7 @@ watch(
|
||||
{ deep: true }
|
||||
);
|
||||
|
||||
const handleAdd = (index) => {
|
||||
const handleAdd = (index: number) => {
|
||||
const newRow = { ...props.defaultRow };
|
||||
tableData.value.splice(index + 1, 0, newRow);
|
||||
nextTick(() => {
|
||||
@@ -407,7 +407,7 @@ const handleAdd = (index) => {
|
||||
});
|
||||
};
|
||||
|
||||
const handleDelete = (index) => {
|
||||
const handleDelete = (index: number) => {
|
||||
if (tableData.value.length === 1) {
|
||||
Object.keys(tableData.value[0]).forEach((key) => {
|
||||
tableData.value[0][key] = '';
|
||||
@@ -484,13 +484,13 @@ const handleSearch = () => {
|
||||
// 搜索逻辑已在 computed 中处理
|
||||
};
|
||||
|
||||
const validate = (callback) => {
|
||||
const validate = (callback: any) => {
|
||||
if (formRef.value) {
|
||||
return formRef.value.validate(callback);
|
||||
}
|
||||
};
|
||||
|
||||
const validateField = (props, callback) => {
|
||||
const validateField = (props: any, callback: any) => {
|
||||
if (formRef.value) {
|
||||
return formRef.value.validateField(props, callback);
|
||||
}
|
||||
@@ -502,7 +502,7 @@ const resetFields = () => {
|
||||
}
|
||||
};
|
||||
|
||||
const clearValidate = (props) => {
|
||||
const clearValidate = (props: any) => {
|
||||
if (formRef.value) {
|
||||
formRef.value.clearValidate(props);
|
||||
}
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
<FormItem
|
||||
:item="item"
|
||||
:model-value="model[item.prop]"
|
||||
@update:model-value="(value) => (model[item.prop] = value)"
|
||||
@change="(value) => item.onChange && item.onChange(value)"
|
||||
@update:model-value="(value: any) => (model[item.prop] = value)"
|
||||
@change="(value: any) => item.onChange && item.onChange(value)"
|
||||
>
|
||||
<template
|
||||
v-for="(_, slotName) in $slots"
|
||||
@@ -65,14 +65,14 @@ const normalizedFormItems = computed(() =>
|
||||
);
|
||||
|
||||
// 表单验证
|
||||
const validate = (callback) => {
|
||||
const validate = (callback: any) => {
|
||||
if (formRef.value) {
|
||||
return formRef.value.validate(callback);
|
||||
}
|
||||
};
|
||||
|
||||
// 验证指定字段
|
||||
const validateField = (props, callback) => {
|
||||
const validateField = (props: any, callback: any) => {
|
||||
if (formRef.value) {
|
||||
return formRef.value.validateField(props, callback);
|
||||
}
|
||||
@@ -86,14 +86,14 @@ const resetFields = () => {
|
||||
};
|
||||
|
||||
// 清除验证
|
||||
const clearValidate = (props) => {
|
||||
const clearValidate = (props: any) => {
|
||||
if (formRef.value) {
|
||||
formRef.value.clearValidate(props);
|
||||
}
|
||||
};
|
||||
|
||||
// 滚动到指定字段
|
||||
const scrollToField = (prop) => {
|
||||
const scrollToField = (prop: any) => {
|
||||
if (formRef.value) {
|
||||
formRef.value.scrollToField(prop);
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
:filterable="item.filterable !== false"
|
||||
:collapse-tags="item.collapseTags !== false"
|
||||
@change="handleChange"
|
||||
@update:model-value="(value) => handleUpdateWithCheck(value, item.checkBeforeChange)"
|
||||
@update:model-value="(value: any) => handleUpdateWithCheck(value, item.checkBeforeChange)"
|
||||
>
|
||||
<el-option
|
||||
v-for="option in item.options || []"
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
:item="item"
|
||||
:model-value="model[item.prop]"
|
||||
@update:model-value="
|
||||
async (value) => {
|
||||
async (value: any) => {
|
||||
if (item.onChange && typeof item.onChange === 'function') {
|
||||
const result = await item.onChange(value);
|
||||
if (result === false) {
|
||||
@@ -82,13 +82,13 @@ const normalizedFormItems = computed(() =>
|
||||
}))
|
||||
);
|
||||
|
||||
const validate = (callback) => {
|
||||
const validate = (callback: any) => {
|
||||
if (formRef.value) {
|
||||
return formRef.value.validate(callback);
|
||||
}
|
||||
};
|
||||
|
||||
const validateField = (props, callback) => {
|
||||
const validateField = (props: any, callback: any) => {
|
||||
if (formRef.value) {
|
||||
return formRef.value.validateField(props, callback);
|
||||
}
|
||||
@@ -100,13 +100,13 @@ const resetFields = () => {
|
||||
}
|
||||
};
|
||||
|
||||
const clearValidate = (props) => {
|
||||
const clearValidate = (props: any) => {
|
||||
if (formRef.value) {
|
||||
formRef.value.clearValidate(props);
|
||||
}
|
||||
};
|
||||
|
||||
const scrollToField = (prop) => {
|
||||
const scrollToField = (prop: any) => {
|
||||
if (formRef.value) {
|
||||
formRef.value.scrollToField(prop);
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ export interface EditableTableColumn {
|
||||
/** 最小宽度 */
|
||||
minWidth?: string | number;
|
||||
/** 是否固定列 */
|
||||
fixed?: boolean | 'left' | 'right';
|
||||
fixed?: 'left' | 'right';
|
||||
/** 对齐方式 */
|
||||
align?: 'left' | 'center' | 'right';
|
||||
/** 列类型 */
|
||||
@@ -56,6 +56,8 @@ export interface EditableTableColumn {
|
||||
onInput?: (row: Record<string, any>, index: number) => void;
|
||||
/** 变更回调 */
|
||||
onChange?: (row: Record<string, any>, index: number, value?: any) => void;
|
||||
/** 额外属性 */
|
||||
extraprops?: Record<string, any>;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -10,6 +10,8 @@ export interface FormItemOption {
|
||||
value: string | number | boolean | null | undefined;
|
||||
/** 是否禁用该选项 */
|
||||
disabled?: boolean;
|
||||
/** 点击回调 */
|
||||
onClick?: (...args: any[]) => void;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -67,6 +69,8 @@ export interface FormItemConfig {
|
||||
checkBeforeChange?: boolean;
|
||||
/** 格式化函数(text 类型,用于格式化显示的文本) */
|
||||
formatter?: (value: any) => string;
|
||||
/** 是否禁用 */
|
||||
disabled?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -73,13 +73,15 @@ console.error = (...args) => {
|
||||
const all = args.map(a => {
|
||||
if (!a) return "";
|
||||
if (typeof a === "string") return a;
|
||||
if (a.stack) return a.stack;
|
||||
if (a.message) return a.message;
|
||||
if (a.stack) return String(a.stack);
|
||||
if (a.message) return String(a.message);
|
||||
try { return JSON.stringify(a); } catch(e) { return ""; }
|
||||
}).join(" ");
|
||||
if (all.includes("form-label") || all.includes("LabelWrap") || all.includes("ElForm") || all.includes("FormItem") || all.includes("deregisterLabel") || all.includes("autoLabel") || all.includes("labelPosition") || all.includes("formContext") || all.includes("label-wrap")) return;
|
||||
} catch(e) {}
|
||||
_origError.apply(console, args);
|
||||
try {
|
||||
_origError.apply(console, args);
|
||||
} catch(e) {}
|
||||
};
|
||||
|
||||
async function bootstrap() {
|
||||
|
||||
5
healthlink-his-ui/src/utils/index.d.ts
vendored
Normal file
5
healthlink-his-ui/src/utils/index.d.ts
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
export function parseTime(time: any, cFormat?: string): string | null;
|
||||
export function formatDate(cellValue: any): string;
|
||||
export function formatDateStr(cellValue: any, format?: string): string;
|
||||
export function formatDateymd(cellValue: any): string;
|
||||
export function formatTime(time: any, option?: any): string;
|
||||
@@ -108,9 +108,9 @@ import { getRealtimeData, getHistoricalData } from '@/api/datacollection'
|
||||
|
||||
const loading = ref(false)
|
||||
const period = ref('month')
|
||||
const screenData = ref({})
|
||||
const screenData = ref<Record<string, any>>({})
|
||||
|
||||
function formatMoney(val) {
|
||||
function formatMoney(val: any) {
|
||||
if (!val) return '0.00'
|
||||
return (val / 10000).toFixed(2)
|
||||
}
|
||||
@@ -118,11 +118,11 @@ function formatMoney(val) {
|
||||
function loadData() {
|
||||
loading.value = true
|
||||
if (period.value === 'all') {
|
||||
getRealtimeData().then(res => {
|
||||
getRealtimeData().then((res: any) => {
|
||||
screenData.value = res.data || {}
|
||||
}).finally(() => { loading.value = false })
|
||||
} else {
|
||||
getHistoricalData({ period: period.value }).then(res => {
|
||||
getHistoricalData({ period: period.value }).then((res: any) => {
|
||||
screenData.value = res.data || {}
|
||||
}).finally(() => { loading.value = false })
|
||||
}
|
||||
|
||||
@@ -920,14 +920,14 @@
|
||||
clearable
|
||||
@change="
|
||||
(value) => {
|
||||
expandOrder = [];
|
||||
expandOrder.value = [];
|
||||
// 当医嘱类型改变时,清空当前选择的项目名称,因为不同类型项目的数据结构可能不兼容
|
||||
prescriptionList[scope.rowIndex].adviceName = undefined;
|
||||
prescriptionList[scope.rowIndex].adviceType_dictText = '';
|
||||
prescriptionList.value[scope.rowIndex].adviceName = undefined;
|
||||
prescriptionList.value[scope.rowIndex].adviceType_dictText = '';
|
||||
// 🔧 Bug Fix: 医嘱类型改变时,重置minUnitQuantity和minUnitCode,避免null值
|
||||
prescriptionList[scope.rowIndex].minUnitQuantity = prescriptionList[scope.rowIndex].quantity || 1;
|
||||
prescriptionList[scope.rowIndex].minUnitCode = prescriptionList[scope.rowIndex].unitCode;
|
||||
prescriptionList[scope.rowIndex].minUnitCode_dictText = prescriptionList[scope.rowIndex].unitCode_dictText;
|
||||
prescriptionList.value[scope.rowIndex].minUnitQuantity = prescriptionList.value[scope.rowIndex].quantity || 1;
|
||||
prescriptionList.value[scope.rowIndex].minUnitCode = prescriptionList.value[scope.rowIndex].unitCode;
|
||||
prescriptionList.value[scope.rowIndex].minUnitCode_dictText = prescriptionList.value[scope.rowIndex].unitCode_dictText;
|
||||
adviceQueryParams.adviceTypes = [value]; // 🎯 修复:改为 adviceTypes(复数)
|
||||
|
||||
// 根据选择的类型设置categoryCode,用于药品分类筛选
|
||||
@@ -2417,10 +2417,14 @@ function checkUnit(item, row) {
|
||||
}
|
||||
|
||||
// 行双击打开编辑块,仅待发送的可编辑
|
||||
function clickRowDb(row, column, event) {
|
||||
// vxe-table v4: @cell-dblclick 只传一个 params 对象,行数据在 params.row,DOM 事件在 params.$event
|
||||
function clickRowDb(params) {
|
||||
const row = params.row;
|
||||
const $event = params.$event;
|
||||
if (!row) return;
|
||||
// 检查点击的是否是复选框
|
||||
if (event && event.target.closest('.el-checkbox')) {
|
||||
return; // 如果是复选框点击,不执行行点击逻辑
|
||||
if ($event && $event.target && $event.target.closest('.el-checkbox')) {
|
||||
return;
|
||||
}
|
||||
if (expandOrder.value.length > 0) {
|
||||
proxy.$modal.msgWarning('有医嘱处于编辑状态,请先保存,再编辑此条医嘱');
|
||||
@@ -2431,8 +2435,15 @@ function clickRowDb(row, column, event) {
|
||||
row.isEdit = true;
|
||||
const index = prescriptionList.value.findIndex((item) => item.uniqueKey === row.uniqueKey);
|
||||
prescriptionList.value[index] = row;
|
||||
// 确保只有当前行展开,先清空数组再添加当前行的uniqueKey
|
||||
updateExpandOrder([row.uniqueKey]);
|
||||
nextTick(() => {
|
||||
if (prescriptionRef.value?.setRowExpand) {
|
||||
const rowObj = prescriptionList.value.find(item => item.uniqueKey === row.uniqueKey);
|
||||
if (rowObj) {
|
||||
prescriptionRef.value.setRowExpand([rowObj], true);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
width="100"
|
||||
>
|
||||
<template #default="{row}">
|
||||
<span :style="primaryPatient && primaryPatient.id === row.id ? 'color:#409eff;font-weight:bold' : ''">
|
||||
<span :style="primaryPatient && primaryPatient.id === row.id ? 'color:#409eff;font-weight:bold' : ''">
|
||||
{{ row.name }}
|
||||
</span>
|
||||
</template>
|
||||
@@ -135,12 +135,11 @@
|
||||
<template #default="{row}">
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
size="small"
|
||||
:type="primaryPatient && primaryPatient.id === row.id ? 'success' : ''"
|
||||
:type="primaryPatient && primaryPatient.id === row.id ? 'success' : ''"
|
||||
@click="setPrimary(row)"
|
||||
>
|
||||
{{ primaryPatient && primaryPatient.id === row.id ? '已选为主' : '设为主患者' }}
|
||||
{{ primaryPatient && primaryPatient.id === row.id ? '已选为主' : '设为主患者' }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
@@ -115,6 +115,8 @@
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import {onMounted, reactive, ref} from 'vue'
|
||||
declare function getPatInfoSenior(params: any): Promise<any>;
|
||||
const statusFormatter = ref<any>(null);
|
||||
// const { proxy } = getCurrentInstance();
|
||||
|
||||
const emits = defineEmits(['settling', 'paying'])
|
||||
|
||||
@@ -277,6 +277,7 @@ const invoiceSkipVisible = ref(false)
|
||||
const close = () => {
|
||||
visible.value = false
|
||||
}
|
||||
const collectFeeCancel = (row: any) => {};
|
||||
const submitForm = () => {
|
||||
ElMessage({
|
||||
message: '打印发票!',
|
||||
|
||||
@@ -122,6 +122,7 @@ function loadPatientList(wardId, resolve) {
|
||||
getPatientList({
|
||||
wardId: wardId,
|
||||
searchKey: searchKey.value || '',
|
||||
pageSize: 999,
|
||||
})
|
||||
.then((res) => {
|
||||
// 处理返回的患者数据
|
||||
|
||||
19
healthlink-his-ui/src/views/inpatientNurse/inOut/components/api.d.ts
vendored
Normal file
19
healthlink-his-ui/src/views/inpatientNurse/inOut/components/api.d.ts
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
export function getInit(queryParams?: any): Promise<any>;
|
||||
export function getPendingInfo(queryParams?: any): Promise<any>;
|
||||
export function getBedInfo(queryParams?: any): Promise<any>;
|
||||
export function getPatientInfo(queryParams?: any): Promise<any>;
|
||||
export function getDoctorInfo(queryParams?: any): Promise<any>;
|
||||
export function getNurseInfo(queryParams?: any): Promise<any>;
|
||||
export function bedAssignment(data: any): Promise<any>;
|
||||
export function childLocationList(queryParams?: any): Promise<any>;
|
||||
export function getPractitionerWard(queryParams?: any): Promise<any>;
|
||||
export function getPrescriptionList(queryParams?: any): Promise<any>;
|
||||
export function getPersonAccount(queryParams?: any): Promise<any>;
|
||||
export function getDRMedication(queryParams?: any): Promise<any>;
|
||||
export function updateTransferDepartment(encounterId: any): Promise<any>;
|
||||
export function updateOutHospital(encounterId: any): Promise<any>;
|
||||
export function getTransferOptions(): Promise<any>;
|
||||
export function terminalCleaning(encounterId: any): Promise<any>;
|
||||
export function cancelBedAssignment(encounterId: any): Promise<any>;
|
||||
export function changeBedAssignment(encounterId: any, targetBedId: any): Promise<any>;
|
||||
export function getWardList(queryParams?: any): Promise<any>;
|
||||
@@ -120,11 +120,11 @@
|
||||
@ok-act="handleTransferInOk"
|
||||
/>
|
||||
<SignEntryDialog v-model:visible="signEntryDialogVisible" />
|
||||
<ChangeBedDialog
|
||||
<!-- <ChangeBedDialog
|
||||
v-model:visible="changeBedDialogVisible"
|
||||
:bad-list="badList"
|
||||
@ok-act="handleTransferInOk"
|
||||
/>
|
||||
/> -->
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
@@ -132,10 +132,11 @@ import Filter from '@/components/TableLayout/Filter.vue';
|
||||
import {computed, onBeforeMount, onMounted, reactive, ref} from 'vue';
|
||||
import TransferInDialog from './transferInDialog.vue';
|
||||
import SignEntryDialog from './signEntryDialog.vue';
|
||||
import ChangeBedDialog from './changeBedDialog.vue';
|
||||
// import ChangeBedDialog from './changeBedDialog.vue';
|
||||
import {childLocationList, getBedInfo, getInit, getPendingInfo, getPractitionerWard, cancelBedAssignment} from './api';
|
||||
import {ElLoading, ElMessage, ElMessageBox} from 'element-plus';
|
||||
import PendingPatientList from '@/components/PendingPatientList/index.vue';
|
||||
import type { FormItemConfig } from '@/components/types/FormItem';
|
||||
|
||||
// 定义相关类型
|
||||
interface OptionItem {
|
||||
@@ -152,7 +153,7 @@ interface InitInfoOptions {
|
||||
encounterStatusOptions: OptionItemTwo[];
|
||||
bedStatusOptions: OptionItemTwo[];
|
||||
priorityOptions: OptionItem[];
|
||||
wardListOptions: OptionItemTwo[];
|
||||
wardListOptions: OptionItem[];
|
||||
}
|
||||
|
||||
const transferInDialogVisible = ref(false);
|
||||
@@ -189,7 +190,7 @@ const activePatientId = computed(() => {
|
||||
return active?.encounterId || '';
|
||||
});
|
||||
|
||||
const filterItems = computed(() => [
|
||||
const filterItems = computed<FormItemConfig[]>(() => [
|
||||
{
|
||||
type: 'select',
|
||||
label: '入院病区',
|
||||
@@ -202,7 +203,7 @@ const filterItems = computed(() => [
|
||||
value: i.id,
|
||||
})),
|
||||
extraprops: { loading: selectHosLoding.value, clearable: false },
|
||||
onChange: (value) => {
|
||||
onChange: (value: any) => {
|
||||
changeWardLocationId(value);
|
||||
},
|
||||
},
|
||||
@@ -364,7 +365,7 @@ function changeWardLocationId(id: string | number, isInit = false) {
|
||||
};
|
||||
queryParams.value.houseId = '';
|
||||
selectHoouseLoding.value = true;
|
||||
return childLocationList(params).then((res) => {
|
||||
return childLocationList(params).then((res: any) => {
|
||||
selectHoouseLoding.value = false;
|
||||
wardLocationList.value = res;
|
||||
if (!isInit) {
|
||||
@@ -375,7 +376,7 @@ function changeWardLocationId(id: string | number, isInit = false) {
|
||||
...queryParams.value,
|
||||
encounterStatus: undefined, // 移除encounterStatus,确保不影响床位列表查询
|
||||
};
|
||||
getBedInfo(bedQueryParams).then((bedRes) => {
|
||||
getBedInfo(bedQueryParams).then((bedRes: any) => {
|
||||
badList.value = bedRes.data.records;
|
||||
});
|
||||
}
|
||||
|
||||
@@ -37,10 +37,10 @@
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<div>电话:{{ pendingInfo.phone }}</div>
|
||||
<div>电话:{{ patientDetail.phone }}</div>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<div>住院诊断:{{ pendingInfo.conditionNames }}</div>
|
||||
<div>住院诊断:{{ patientDetail.conditionNames }}</div>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
{{ props.pendingInfo.patientId }}
|
||||
@@ -401,7 +401,7 @@
|
||||
import {computed, nextTick, onMounted, reactive, ref, watch} from 'vue';
|
||||
import type {FormInstance, FormRules} from 'element-plus';
|
||||
import {dayjs, ElMessage} from 'element-plus';
|
||||
// import type { IInPatient } from '@/model/IInPatient'
|
||||
import type { IInPatient } from '@/model/IInPatient'
|
||||
import {bedAssignment, getBedInfo, getDoctorInfo, getInit, getNurseInfo, getPatientInfo,} from './api';
|
||||
|
||||
const props = defineProps({
|
||||
@@ -438,7 +438,7 @@ const chiefDoctorOptions = computed(() => {
|
||||
});
|
||||
const InitInfoOptions = ref<any>({});
|
||||
const priorityListOptions = ref<{ info: string; value: string }[]>([]);
|
||||
const pendingInfo = ref<any>({});
|
||||
const patientDetail = ref<any>({});
|
||||
|
||||
const initCurrentInPatient = () => {
|
||||
currentInPatient.value = {
|
||||
@@ -478,9 +478,9 @@ const loadPatientInfo = () => {
|
||||
return;
|
||||
}
|
||||
console.log('查询患者信息的 encounterId:', props.pendingInfo.encounterId);
|
||||
getPatientInfo({ encounterId: props.pendingInfo.encounterId }).then((res) => {
|
||||
getPatientInfo({ encounterId: props.pendingInfo.encounterId }).then((res: any) => {
|
||||
console.log('后端返回的患者信息:', res.data);
|
||||
pendingInfo.value = res.data;
|
||||
patientDetail.value = res.data;
|
||||
// 从后端获取数据后设置医生和护士 ID
|
||||
// 医生使用 ToStringSerializer,返回字符串;护士直接返回数字
|
||||
console.log('admittingDoctorId:', res.data.admittingDoctorId);
|
||||
@@ -564,7 +564,7 @@ const init = () => {
|
||||
const promises = [];
|
||||
|
||||
const initPromise = getInit()
|
||||
.then((res) => {
|
||||
.then((res: any) => {
|
||||
InitInfoOptions.value = res.data;
|
||||
if (res.data && res.data.priorityListOptions) {
|
||||
priorityListOptions.value = res.data.priorityListOptions;
|
||||
@@ -577,7 +577,7 @@ const init = () => {
|
||||
|
||||
if (props.pendingInfo.wardLocationId) {
|
||||
const bedPromise = getBedInfo({ wardLocationId: props.pendingInfo.wardLocationId })
|
||||
.then((res) => {
|
||||
.then((res: any) => {
|
||||
bedInfoOptions.value = res.data || [];
|
||||
})
|
||||
.catch((error) => {
|
||||
@@ -589,7 +589,7 @@ const init = () => {
|
||||
|
||||
if (props.pendingInfo.organizationId) {
|
||||
const doctorPromise = getDoctorInfo({ organizationId: props.pendingInfo.organizationId })
|
||||
.then((res) => {
|
||||
.then((res: any) => {
|
||||
doctorInfoOptions.value = res.data.records || [];
|
||||
// 只有在新分配床位模式(entranceType != 1)时才设置默认主任医生
|
||||
// 并且只在当前没有选择主任医生时才设置默认值(避免覆盖已从后端获取的数据)
|
||||
@@ -608,7 +608,7 @@ const init = () => {
|
||||
promises.push(doctorPromise);
|
||||
|
||||
const nursePromise = getNurseInfo({ organizationId: props.pendingInfo.organizationId })
|
||||
.then((res) => {
|
||||
.then((res: any) => {
|
||||
// 将护士ID转换为字符串以匹配医生选项的数据类型
|
||||
nurseInfoOptions.value = (res.data || []).map((item: any) => ({
|
||||
...item,
|
||||
@@ -663,9 +663,9 @@ const handleSubmit = async () => {
|
||||
const valid = await interventionFormRef.value.validate();
|
||||
if (valid) {
|
||||
// 过滤掉空字符串的字段,只保留用户实际选择的值
|
||||
const formData = {};
|
||||
const formData: Record<string, any> = {};
|
||||
Object.keys(interventionForm.value).forEach(key => {
|
||||
const value = interventionForm.value[key];
|
||||
const value = (interventionForm.value as Record<string, any>)[key];
|
||||
// 保留非空的值(0、false等有效值也需要保留)
|
||||
// 特别注意:体征字段(height, weight等)即使为空字符串也要提交,用于清除已有数据
|
||||
const vitalSignFields = ['height', 'weight', 'temperature', 'hertRate', 'pulse', 'endBloodPressure', 'highBloodPressure'];
|
||||
@@ -679,7 +679,7 @@ const handleSubmit = async () => {
|
||||
}
|
||||
});
|
||||
const params = {
|
||||
...pendingInfo.value,
|
||||
...patientDetail.value,
|
||||
...formData,
|
||||
targetBedId: props.pendingInfo.bedId,
|
||||
busNo: props.pendingInfo.busNo,
|
||||
|
||||
@@ -606,6 +606,11 @@ import {formatDate} from '@/utils/index';
|
||||
import {ElMessage} from 'element-plus';
|
||||
import dayjs from 'dayjs';
|
||||
|
||||
interface OptionItem {
|
||||
id: string | number;
|
||||
name: string;
|
||||
}
|
||||
|
||||
interface OptionItemTwo {
|
||||
value: string | number;
|
||||
label: string;
|
||||
@@ -613,14 +618,14 @@ interface OptionItemTwo {
|
||||
|
||||
interface InitInfoOptions {
|
||||
encounterStatusOptions: OptionItemTwo[];
|
||||
wardListOptions: OptionItemTwo[];
|
||||
wardListOptions: OptionItem[];
|
||||
}
|
||||
// 接收父组件传递的操作类型
|
||||
const props = defineProps<{
|
||||
operationType: 'transfer' | 'discharge';
|
||||
}>();
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const { proxy }: any = getCurrentInstance() ?? {};
|
||||
const { med_category_code, activity_category_code, unit_code } = proxy.useDict(
|
||||
'med_category_code',
|
||||
'activity_category_code',
|
||||
@@ -717,7 +722,7 @@ const changeHouseId = () => {
|
||||
};
|
||||
|
||||
// 病区切换事件
|
||||
const changeWardLocationId = (id) => {
|
||||
const changeWardLocationId = (id: any) => {
|
||||
if (currentOperationType.value === 'transfer') {
|
||||
// 转科模式:入院病房独立数据源,选中后刷新患者列表
|
||||
queryParams.value.houseId = '';
|
||||
@@ -731,7 +736,7 @@ const changeWardLocationId = (id) => {
|
||||
};
|
||||
queryParams.value.houseId = '';
|
||||
childLocationList(params)
|
||||
.then((res) => {
|
||||
.then((res: any) => {
|
||||
wardLocationList.value = res;
|
||||
})
|
||||
.catch((err) => {
|
||||
@@ -752,14 +757,16 @@ const resetSearchForm = () => {
|
||||
searchKey: '',
|
||||
wardId: '',
|
||||
houseId: '',
|
||||
transferTargetWardId: undefined,
|
||||
transferTargetOrgId: undefined,
|
||||
};
|
||||
wardLocationList.value = [];
|
||||
getPractitionerWard().then((res) => {
|
||||
getPractitionerWard().then((res: any) => {
|
||||
initInfoOptions.value.wardListOptions = res.data || [];
|
||||
});
|
||||
// 转科页面:额外获取转科申请数据覆盖下拉框
|
||||
if (currentOperationType.value === 'transfer') {
|
||||
getTransferOptions().then((res) => {
|
||||
getTransferOptions().then((res: any) => {
|
||||
if (res.data && res.data.wardListOptions) {
|
||||
initInfoOptions.value.wardListOptions = res.data.wardListOptions || [];
|
||||
wardLocationList.value = res.data.departmentListOptions || [];
|
||||
@@ -772,7 +779,7 @@ const resetSearchForm = () => {
|
||||
// 获取患者列表
|
||||
function getPatientList() {
|
||||
// 根据操作类型构建请求参数:转科模式使用 transferTargetWardId/transferTargetOrgId
|
||||
let params = { ...queryParams.value };
|
||||
let params: Record<string, any> = { ...queryParams.value };
|
||||
if (currentOperationType.value === 'transfer') {
|
||||
params.transferTargetWardId = queryParams.value.wardId || undefined;
|
||||
params.transferTargetOrgId = queryParams.value.houseId || undefined;
|
||||
@@ -781,7 +788,7 @@ function getPatientList() {
|
||||
}
|
||||
console.log('queryParams==========>', JSON.stringify(params));
|
||||
// 根据操作类型筛选不同状态的患者
|
||||
getPendingInfo(params).then((res) => {
|
||||
getPendingInfo(params).then((res: any) => {
|
||||
console.log('res==========>', JSON.stringify(res.data));
|
||||
let filteredPatients = [];
|
||||
if (currentOperationType.value === 'transfer') {
|
||||
@@ -789,11 +796,11 @@ function getPatientList() {
|
||||
// filteredPatients = res.data.records.filter(
|
||||
// (item) => item.encounterStatus === 6 || item.encounterStatus === 2
|
||||
// );
|
||||
filteredPatients = res.data.records.filter((item) => item.encounterStatus === 6);
|
||||
filteredPatients = res.data.records.filter((item: any) => item.encounterStatus === 6);
|
||||
} else {
|
||||
// 出院患者筛选条件(状态3)
|
||||
filteredPatients = res.data.records.filter(
|
||||
(item) =>
|
||||
(item: any) =>
|
||||
item.encounterStatus === 3 || item.encounterStatus === 4 || item.encounterStatus === 7
|
||||
);
|
||||
}
|
||||
@@ -830,9 +837,9 @@ function getPatientDetail(item: any): Promise<void> {
|
||||
try {
|
||||
detailLoading.value = true;
|
||||
getPatientInfo(item)
|
||||
.then((res) => {
|
||||
.then((res: any) => {
|
||||
const patientDetail = res.data;
|
||||
return getPersonAccount(item).then((accountRes) => {
|
||||
return getPersonAccount(item).then((accountRes: any) => {
|
||||
selectedPatient.value = patientDetail;
|
||||
selectedAccount.value = accountRes.data;
|
||||
return;
|
||||
@@ -865,7 +872,7 @@ function handleGetPrescription() {
|
||||
encounterId: selectedPatient.value.encounterId,
|
||||
therapyEnum: therapyEnum.value,
|
||||
})
|
||||
.then((response) => {
|
||||
.then((response: any) => {
|
||||
prescriptionList.value = response.data.records || [];
|
||||
})
|
||||
.catch((error) => {
|
||||
@@ -990,7 +997,7 @@ function handleGetDRMedication() {
|
||||
getDRMedication({
|
||||
encounterId: selectedPatient.value.encounterId,
|
||||
})
|
||||
.then((response) => {
|
||||
.then((response: any) => {
|
||||
medicationList.value = response.data || [];
|
||||
})
|
||||
.catch((error) => {
|
||||
|
||||
Reference in New Issue
Block a user