2026-03-09 14:09:14 +08:00
|
|
|
|
<template>
|
|
|
|
|
|
<div class="labpat_box">
|
2026-03-13 17:49:15 +08:00
|
|
|
|
<el-form :model="labPat" label-width="5rem" label-position="right" class="left-form ">
|
|
|
|
|
|
<!-- <div :class="['sh_box', getColor(lastJgbz)]" v-if="lastJgbz != null && lastJgbz != 0 && lastJgbz != 'C'">
|
2026-03-09 14:09:14 +08:00
|
|
|
|
<div class="text">{{ getLableType(lastJgbz) }}</div>
|
2026-03-13 17:49:15 +08:00
|
|
|
|
</div> -->
|
2026-03-09 14:09:14 +08:00
|
|
|
|
<el-form-item label="病人来源">
|
2026-03-13 17:49:15 +08:00
|
|
|
|
<!-- <el-col :span="16"> -->
|
|
|
|
|
|
<SelectTable v-model:data="labPat.patType" :fields="brlyFields" :table-data="dictData.PT" placeholder=""
|
|
|
|
|
|
@getDataValue="handleFieldChange" />
|
|
|
|
|
|
<!-- </el-col> -->
|
|
|
|
|
|
<!-- <el-col :span="8">
|
2026-03-09 14:09:14 +08:00
|
|
|
|
<el-checkbox v-model="labPat.jzbz" true-value="1" class="check_box"> 急诊 </el-checkbox>
|
2026-03-13 17:49:15 +08:00
|
|
|
|
</el-col> -->
|
2026-03-09 14:09:14 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="病人代号" required>
|
2026-03-13 17:49:15 +08:00
|
|
|
|
<el-input v-model="labPat.patId" @keyup.enter="brdhHandle" />
|
2026-03-09 14:09:14 +08:00
|
|
|
|
</el-form-item>
|
2026-03-13 17:49:15 +08:00
|
|
|
|
<el-form-item label="姓 名" required>
|
|
|
|
|
|
<el-input v-model="labPat.patName" @change="handleFieldChange" />
|
2026-03-09 14:09:14 +08:00
|
|
|
|
</el-form-item>
|
2026-03-13 17:49:15 +08:00
|
|
|
|
<el-form-item label="性 别" required>
|
|
|
|
|
|
<SelectTable v-model:data="labPat.patSex" :table-data="dictData.SX" placeholder=""
|
2026-03-09 14:09:14 +08:00
|
|
|
|
@getDataValue="handleFieldChange" />
|
|
|
|
|
|
</el-form-item>
|
2026-03-13 17:49:15 +08:00
|
|
|
|
<el-form-item label="年龄" required>
|
2026-03-09 14:09:14 +08:00
|
|
|
|
<el-col :span="14">
|
2026-03-13 17:49:15 +08:00
|
|
|
|
<el-input v-model="labPat.patAge" @change="handleFieldChange" />
|
2026-03-09 14:09:14 +08:00
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="10">
|
2026-03-13 17:49:15 +08:00
|
|
|
|
<SelectTable v-model:data="labPat.ageUnit" :table-data="dictData.AU" placeholder=""
|
2026-03-09 14:09:14 +08:00
|
|
|
|
@getDataValue="handleFieldChange" />
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="送检医生">
|
|
|
|
|
|
<SelectTable v-model:data="labPat.yhdh" :fields="ysFields" :tableData="userList || []" label="nickName"
|
2026-03-13 17:49:15 +08:00
|
|
|
|
value="userName" objKey="userName" :border="true" placeholder="" @getDataValue="handleFieldChange" />
|
2026-03-09 14:09:14 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="送检科室">
|
2026-03-13 17:49:15 +08:00
|
|
|
|
<SelectTable v-model:data="labPat.execDeptCode" :table-data="dictData.DP" placeholder=""
|
2026-03-09 14:09:14 +08:00
|
|
|
|
@getDataValue="handleFieldChange" />
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="床 号">
|
2026-03-13 17:49:15 +08:00
|
|
|
|
<el-input v-model="labPat.patBed" @change="handleFieldChange" />
|
2026-03-09 14:09:14 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
|
|
<el-form-item label="临床诊断">
|
2026-03-13 17:49:15 +08:00
|
|
|
|
<el-input v-model="labPat.diagnosisName" @change="handleFieldChange" />
|
2026-03-09 14:09:14 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="备 注">
|
2026-03-13 17:49:15 +08:00
|
|
|
|
<el-input v-model="labPat.bz" @change="handleFieldChange" />
|
2026-03-09 14:09:14 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
|
|
<el-form-item label="登记人员">
|
2026-03-13 17:49:15 +08:00
|
|
|
|
<!-- <SelectTable v-model:data="labPat.userName" :table-data="dictData.SRD" placeholder="" :disabled="true" /> -->
|
|
|
|
|
|
<el-input v-model="labPat.userName" disabled />
|
2026-03-09 14:09:14 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="登记时间">
|
2026-03-13 17:49:15 +08:00
|
|
|
|
<el-date-picker v-model="labPat.orderTime" type="datetime" format="YYYY-MM-DD HH:mm:ss" :disabled="true"
|
|
|
|
|
|
value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%;" />
|
2026-03-09 14:09:14 +08:00
|
|
|
|
</el-form-item>
|
2026-03-13 17:49:15 +08:00
|
|
|
|
<el-form-item label="医疗机构">
|
|
|
|
|
|
<el-input v-model="labPat.srcHospName" disabled />
|
2026-03-09 14:09:14 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="证件类型">
|
2026-03-13 17:49:15 +08:00
|
|
|
|
<SelectTable v-model:data="labPat.zjlx" :table-data="dictData.ZJLX" placeholder=""
|
2026-03-09 14:09:14 +08:00
|
|
|
|
@getDataValue="handleFieldChange" />
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="证件号码">
|
2026-03-13 17:49:15 +08:00
|
|
|
|
<el-input v-model="labPat.patIdentity" />
|
2026-03-09 14:09:14 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="联系电话">
|
2026-03-13 17:49:15 +08:00
|
|
|
|
<el-input v-model="labPat.phone" />
|
2026-03-09 14:09:14 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-form>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
2026-03-11 18:08:00 +08:00
|
|
|
|
// import { queryPatInfo } from '@/api/liswork/order'
|
2026-03-09 14:09:14 +08:00
|
|
|
|
import SelectTable from '@/components/SelectTable/index.vue';
|
|
|
|
|
|
import { getDictData, formatDict, dictData } from '@/hooks'
|
|
|
|
|
|
// @ts-ignore
|
|
|
|
|
|
import { listUser } from '@/api/system/user.js'
|
|
|
|
|
|
//@ts-ignore
|
|
|
|
|
|
import { getDicts } from '@/api/system/dict/data'
|
|
|
|
|
|
const props = defineProps({
|
|
|
|
|
|
labPat: {
|
|
|
|
|
|
type: Object,
|
|
|
|
|
|
required: true
|
|
|
|
|
|
},
|
|
|
|
|
|
//结果主键
|
|
|
|
|
|
labPatKey: {
|
|
|
|
|
|
type: Object,
|
|
|
|
|
|
default: () => { }
|
|
|
|
|
|
},
|
|
|
|
|
|
});
|
|
|
|
|
|
const lastJgbz = ref();
|
2026-03-13 17:49:15 +08:00
|
|
|
|
// watch(() => props.labPat, (newVal) => {
|
|
|
|
|
|
// lastValue.value = JSON.stringify(newVal);
|
|
|
|
|
|
// })
|
2026-03-09 14:09:14 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const emit = defineEmits(['update:labPat']);
|
|
|
|
|
|
const lastValue = ref('');
|
|
|
|
|
|
|
|
|
|
|
|
const brlyFields = ref([
|
|
|
|
|
|
{ prop: 'value', label: '代号', width: 80, enablePinyinSearch: true },
|
|
|
|
|
|
{ prop: 'label', label: '名称', width: 120, enablePinyinSearch: true },
|
|
|
|
|
|
])
|
|
|
|
|
|
|
|
|
|
|
|
const ysFields = ref([
|
|
|
|
|
|
{ prop: 'userName', label: '用户代号', width: 80, enablePinyinSearch: true },
|
|
|
|
|
|
{ prop: 'nickName', label: '用户姓名', width: 150, enablePinyinSearch: true },
|
|
|
|
|
|
])
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 通用字段变化处理(失焦、回车触发)
|
|
|
|
|
|
*/
|
|
|
|
|
|
const handleFieldChange = async () => {
|
|
|
|
|
|
// // 将当前labPat转为字符串用于比较
|
|
|
|
|
|
// const currentValue = JSON.stringify(props.labPat);
|
|
|
|
|
|
// // 对比与上一次保存的值是否有变化
|
|
|
|
|
|
// if (currentValue !== lastValue.value) {
|
|
|
|
|
|
|
|
|
|
|
|
// // 找出变化的字段
|
|
|
|
|
|
// const oldObj = JSON.parse(lastValue.value);
|
|
|
|
|
|
// const newObj = props.labPat;
|
|
|
|
|
|
// const changedField = getChangedField(oldObj, newObj);
|
|
|
|
|
|
// if (changedField) {
|
|
|
|
|
|
// // 这里可以添加实际的更新逻辑,比如调用接口
|
|
|
|
|
|
// try {
|
|
|
|
|
|
// // saveLabPat(changedField)
|
|
|
|
|
|
// } catch (error) {
|
|
|
|
|
|
// console.error('更新失败:', error);
|
|
|
|
|
|
// // 失败时可以恢复旧值
|
|
|
|
|
|
// // emit('update:labPat', oldObj);
|
|
|
|
|
|
// lastValue.value = JSON.stringify(oldObj);
|
|
|
|
|
|
// }
|
|
|
|
|
|
// }
|
|
|
|
|
|
// }
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
const getLableType = (type: string) => {
|
|
|
|
|
|
const item = lisReqs.value.find((p: any) => p.value === type);
|
|
|
|
|
|
return item ? item.label : '开单';
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const getColor = (type: string) => {
|
|
|
|
|
|
switch (type) {
|
|
|
|
|
|
case '1':
|
|
|
|
|
|
return 'cs_color';
|
|
|
|
|
|
case '2':
|
|
|
|
|
|
return 'sh_color';
|
|
|
|
|
|
case '3':
|
|
|
|
|
|
return 'cb_color';
|
|
|
|
|
|
case '4':
|
|
|
|
|
|
return 'eb_color';
|
|
|
|
|
|
case '5':
|
|
|
|
|
|
return 'sd_color';
|
|
|
|
|
|
default:
|
|
|
|
|
|
return 'default';
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 病人代号查询病人信息的逻辑
|
|
|
|
|
|
const brdhHandle = () => {
|
2026-03-11 18:08:00 +08:00
|
|
|
|
// queryPatInfo({ brdh: props.labPat.brdh }).then((res: any) => {
|
|
|
|
|
|
// if (res.data) {
|
|
|
|
|
|
// emit('update:labPat', { ...props.labPat, ...res.data })
|
|
|
|
|
|
// }
|
|
|
|
|
|
// })
|
2026-03-09 14:09:14 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const lisReqs = ref([]);
|
|
|
|
|
|
const userList = ref([]);
|
|
|
|
|
|
onMounted(() => {
|
|
|
|
|
|
const data = { status: '0', del_flag: '0', pageSize: 1000, pageNum: 1 }
|
|
|
|
|
|
listUser(data).then((res: any) => {
|
|
|
|
|
|
userList.value = res.rows;
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
getDicts('lis_req_type').then((resp: any) => {
|
|
|
|
|
|
lisReqs.value = resp.data.map((p: any) => ({
|
|
|
|
|
|
label: p.dictLabel,
|
|
|
|
|
|
value: p.dictValue,
|
|
|
|
|
|
elTagType: p.listClass,
|
|
|
|
|
|
elTagClass: p.cssClass
|
|
|
|
|
|
}))
|
|
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
|
|
|
.labpat_box {
|
|
|
|
|
|
height: calc(90vh - 40px);
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
border-right: 1px solid #E6E9ED;
|
|
|
|
|
|
padding-right: 5px;
|
|
|
|
|
|
|
|
|
|
|
|
.check_box {
|
|
|
|
|
|
:deep(.el-checkbox__input.is-checked+.el-checkbox__label) {
|
|
|
|
|
|
color: #f00 !important;
|
|
|
|
|
|
font-size: .875rem;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
:deep(.el-checkbox__label) {
|
|
|
|
|
|
font-size: .875rem;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
:deep(.el-input__wrapper) {
|
|
|
|
|
|
box-shadow: 0 0 0 1px #96B8D9 inset;
|
|
|
|
|
|
background-color: rgba(236, 244, 251, 0.5);
|
|
|
|
|
|
color: #08355E;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.is-focus {
|
|
|
|
|
|
box-shadow: 0 0 0 1px #1f6dd3 inset !important;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
|
|
box-shadow: 0 0 0 1px #1f6dd3 inset !important;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// .el-input__placeholder {
|
|
|
|
|
|
// color: none !important;
|
|
|
|
|
|
// }
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
:deep(.el-select__wrapper) {
|
|
|
|
|
|
box-shadow: 0 0 0 1px #96B8D9 inset;
|
|
|
|
|
|
background-color: rgba(236, 244, 251, 0.5);
|
|
|
|
|
|
color: #08355E;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.is-focus {
|
|
|
|
|
|
box-shadow: 0 0 0 1px #1f6dd3 inset !important;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
|
|
box-shadow: 0 0 0 1px #1f6dd3 inset !important;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.el-select__placeholder {
|
|
|
|
|
|
color: #08355E !important;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
:deep(.el-input__inner) {
|
|
|
|
|
|
color: #08355E !important;
|
|
|
|
|
|
-webkit-text-fill-color: #08355E;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
:deep(.el-select__input) {
|
|
|
|
|
|
color: #08355E !important;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2026-03-13 17:49:15 +08:00
|
|
|
|
.left-form {
|
2026-03-09 14:09:14 +08:00
|
|
|
|
flex: 1;
|
|
|
|
|
|
position: relative;
|
|
|
|
|
|
height: 100%;
|
|
|
|
|
|
overflow-y: auto;
|
|
|
|
|
|
overflow-x: hidden;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.el-form-item {
|
2026-03-13 17:49:15 +08:00
|
|
|
|
margin-bottom: 8px;
|
2026-03-09 14:09:14 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-03-13 17:49:15 +08:00
|
|
|
|
:deep(.el-form-item__label) {
|
2026-03-09 14:09:14 +08:00
|
|
|
|
padding-bottom: 0px;
|
|
|
|
|
|
color: #08355E;
|
2026-03-13 17:49:15 +08:00
|
|
|
|
font-size: .875rem !important;
|
|
|
|
|
|
|
|
|
|
|
|
}
|
2026-03-09 14:09:14 +08:00
|
|
|
|
|
2026-03-13 17:49:15 +08:00
|
|
|
|
:deep(.el-form-item__label:before) {
|
|
|
|
|
|
margin-right: 0 !important;
|
2026-03-09 14:09:14 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
:deep(.el-form-item--default .el-form-item__label) {
|
|
|
|
|
|
height: 27px !important;
|
|
|
|
|
|
line-height: 27px !important;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
:deep(.el-form-item--default .el-form-item__content) {
|
|
|
|
|
|
line-height: 27px !important;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// pointer-events: none;
|
|
|
|
|
|
|
|
|
|
|
|
:deep(.el-radio__label) {
|
|
|
|
|
|
color: #08355E;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
:deep(.el-switch__label) {
|
|
|
|
|
|
color: #08355E;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.sh_box {
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
top: 0;
|
|
|
|
|
|
left: 0;
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
height: 100%;
|
|
|
|
|
|
background: rgba(0, 0, 0, 0);
|
|
|
|
|
|
z-index: 9;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
justify-content: center;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
writing-mode: vertical-rl;
|
|
|
|
|
|
font-weight: 500;
|
|
|
|
|
|
font-size: 100px;
|
|
|
|
|
|
|
|
|
|
|
|
.text {
|
|
|
|
|
|
font-style: italic;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// pointer-events: none;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.cs_color {
|
|
|
|
|
|
color: rgba(40, 189, 187, 0.25);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.sh_color {
|
|
|
|
|
|
color: rgba(238, 8, 8, 0.25);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.cb_color {
|
|
|
|
|
|
color: rgba(0, 128, 0, 0.25);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.eb_color {
|
|
|
|
|
|
color: rgba(255, 165, 0, 0.25);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.sd_color {
|
|
|
|
|
|
color: rgb(233, 126, 32, .25);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.default {
|
|
|
|
|
|
color: rgba(40, 189, 187, 0.25);
|
|
|
|
|
|
}
|
|
|
|
|
|
</style>
|