Merge branch 'main' of http://114.55.171.231:3000/lxd/inspect-front
This commit is contained in:
commit
f9bf2491db
@ -85,13 +85,25 @@
|
|||||||
:class="{ active: selectedPatient?.id === patient.id }"
|
:class="{ active: selectedPatient?.id === patient.id }"
|
||||||
>
|
>
|
||||||
<div class="patient-info">
|
<div class="patient-info">
|
||||||
<span class="name">{{ patient.pname }}</span>
|
<div class="info-row">
|
||||||
<span class="medical-sn">{{ patient.medicalSn }}</span>
|
<span class="name">{{ patient.pname }}</span>
|
||||||
<el-tag :type="getStatusTagType(patient)" size="small" class="status-tag">
|
<span class="medical-sn">{{ truncateMedicalSn(patient.medicalSn) }}</span>
|
||||||
{{ getStatusText(patient) }}
|
<el-tag
|
||||||
</el-tag>
|
size="small"
|
||||||
|
:type="getStatusTagType(patient)"
|
||||||
|
class="status-tag"
|
||||||
|
>
|
||||||
|
{{ getStatusText(patient) }}
|
||||||
|
</el-tag>
|
||||||
|
<el-button
|
||||||
|
v-if="patient.status === '1' || patient.status === 1"
|
||||||
|
type="primary"
|
||||||
|
size="small"
|
||||||
|
@click.stop="resetPatientStatus(patient)"
|
||||||
|
class="reset-status-btn"
|
||||||
|
>打回</el-button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!--<span class="card-id">{{ patient.cardId }}</span>-->
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<!-- 将分页组件移到list-content外部底部 -->
|
<!-- 将分页组件移到list-content外部底部 -->
|
||||||
@ -2509,6 +2521,73 @@ const handleDateRangeChange = async (val) => {
|
|||||||
ElMessage.error('获取患者列表失败')
|
ElMessage.error('获取患者列表失败')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 添加重置患者状态的方法
|
||||||
|
const resetPatientStatus = async (patient) => {
|
||||||
|
try {
|
||||||
|
// 确认是否要重置状态
|
||||||
|
await ElMessageBox.confirm('确定要重置该患者的状态吗?重置后将无法恢复。', '重置状态确认', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
})
|
||||||
|
|
||||||
|
const loading = ElLoading.service({
|
||||||
|
lock: true,
|
||||||
|
text: '处理中...',
|
||||||
|
background: 'rgba(255, 255, 255, 0.7)'
|
||||||
|
})
|
||||||
|
|
||||||
|
try {
|
||||||
|
// 更新数据库中的status字段为0,同时更新体检日期为当前时间戳
|
||||||
|
await PatientApi.updatePatient({
|
||||||
|
id: patient.id,
|
||||||
|
status: 0, // 设置为待检查状态
|
||||||
|
medicalDateTime: Date.now() // 更新体检日期为当前时间
|
||||||
|
})
|
||||||
|
|
||||||
|
// 更新本地状态
|
||||||
|
patient.status = 0
|
||||||
|
patient.medicalDateTime = Date.now()
|
||||||
|
|
||||||
|
// 更新列表中的患者状态
|
||||||
|
const patientIndex = patients.value.findIndex((p) => p.id === patient.id)
|
||||||
|
if (patientIndex !== -1) {
|
||||||
|
patients.value[patientIndex].status = 0
|
||||||
|
patients.value[patientIndex].medicalDateTime = Date.now()
|
||||||
|
}
|
||||||
|
|
||||||
|
// 更新过滤后的列表中的患者状态
|
||||||
|
const filteredIndex = filteredPatients.value.findIndex(
|
||||||
|
(p) => p.id === patient.id
|
||||||
|
)
|
||||||
|
if (filteredIndex !== -1) {
|
||||||
|
filteredPatients.value[filteredIndex].status = 0
|
||||||
|
filteredPatients.value[filteredIndex].medicalDateTime = Date.now()
|
||||||
|
}
|
||||||
|
|
||||||
|
loading.close()
|
||||||
|
ElMessage.success('状态重置成功')
|
||||||
|
|
||||||
|
// 刷新数据
|
||||||
|
await refreshExamData()
|
||||||
|
} catch (error) {
|
||||||
|
loading.close()
|
||||||
|
console.error('重置状态失败:', error)
|
||||||
|
ElMessage.error('重置状态失败,请稍后重试')
|
||||||
|
}
|
||||||
|
} catch {
|
||||||
|
// 用户取消重置状态
|
||||||
|
ElMessage.info('已取消重置状态')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 添加一个函数用于截断体检编号,如果空间不足
|
||||||
|
const truncateMedicalSn = (sn) => {
|
||||||
|
if (!sn) return '';
|
||||||
|
// 如果编号长度超过10个字符,则截断并添加省略号
|
||||||
|
return sn.length > 10 ? sn.substring(0, 8) + '...' : sn;
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
@ -2625,9 +2704,40 @@ const handleDateRangeChange = async (val) => {
|
|||||||
.patient-item {
|
.patient-item {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: flex-start;
|
||||||
padding: 12px 15px;
|
padding: 12px 15px;
|
||||||
border-bottom: 1px solid #e6e6e6;
|
border-bottom: 1px solid #e6e6e6;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.patient-item:hover {
|
||||||
|
background-color: #f5f7fa;
|
||||||
|
}
|
||||||
|
|
||||||
|
.patient-item.active {
|
||||||
|
background-color: #ecf5ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.patient-item .name {
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 14px;
|
||||||
|
color: #303133;
|
||||||
|
}
|
||||||
|
|
||||||
|
.patient-item .medical-sn {
|
||||||
|
font-size: 12px;
|
||||||
|
color: #909399;
|
||||||
|
}
|
||||||
|
|
||||||
|
.patient-item .card-id {
|
||||||
|
font-size: 12px;
|
||||||
|
color: #909399;
|
||||||
|
display: block;
|
||||||
|
margin-top: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.status-tag {
|
||||||
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.report-content {
|
.report-content {
|
||||||
@ -2719,7 +2829,9 @@ const handleDateRangeChange = async (val) => {
|
|||||||
|
|
||||||
.info-row {
|
.info-row {
|
||||||
display: flex;
|
display: flex;
|
||||||
margin-bottom: 15px;
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
margin-bottom: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.info-row:last-child {
|
.info-row:last-child {
|
||||||
@ -3004,10 +3116,10 @@ const handleDateRangeChange = async (val) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.patient-info {
|
.patient-info {
|
||||||
|
flex: 1;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
flex-direction: column;
|
||||||
gap: 8px;
|
width: 100%;
|
||||||
flex-wrap: wrap;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.name {
|
.name {
|
||||||
@ -3086,14 +3198,8 @@ const handleDateRangeChange = async (val) => {
|
|||||||
|
|
||||||
/* 修改分页容器样式 */
|
/* 修改分页容器样式 */
|
||||||
.pagination-container {
|
.pagination-container {
|
||||||
padding: 8px;
|
padding: 10px 15px;
|
||||||
background: #fff;
|
text-align: right;
|
||||||
border-top: 1px solid #e6e6e6;
|
|
||||||
margin-top: auto; /* 确保分页始终在底部 */
|
|
||||||
position: sticky; /* 添加粘性定位 */
|
|
||||||
bottom: 0; /* 固定在底部 */
|
|
||||||
z-index: 1; /* 确保在内容之上 */
|
|
||||||
width: 100%; /* 确保宽度填满容器 */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 自定义分页组件样式 */
|
/* 自定义分页组件样式 */
|
||||||
@ -3629,4 +3735,58 @@ const handleDateRangeChange = async (val) => {
|
|||||||
:deep(.el-input.is-disabled) {
|
:deep(.el-input.is-disabled) {
|
||||||
opacity: 0.7;
|
opacity: 0.7;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.reset-status-btn {
|
||||||
|
background-color: #ff7b7b;
|
||||||
|
color: white;
|
||||||
|
border: none;
|
||||||
|
padding: 5px 10px;
|
||||||
|
border-radius: 3px;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: background-color 0.3s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reset-status-btn:hover {
|
||||||
|
background-color: #ff5b5b;
|
||||||
|
}
|
||||||
|
|
||||||
|
.patient-info {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.info-row {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
flex-wrap: nowrap;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.name {
|
||||||
|
font-weight: bold;
|
||||||
|
margin-right: 10px;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.medical-sn {
|
||||||
|
color: #909399;
|
||||||
|
font-size: 0.9em;
|
||||||
|
margin-right: 10px;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
max-width: 100px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.status-tag {
|
||||||
|
margin-right: 10px;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reset-status-btn {
|
||||||
|
padding: 2px 8px;
|
||||||
|
height: 24px;
|
||||||
|
font-size: 12px;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -335,7 +335,7 @@ const saveSummary = async () => {
|
|||||||
//更新总检医生id
|
//更新总检医生id
|
||||||
const saveData2 = {
|
const saveData2 = {
|
||||||
medicalSn: props.patient.medicalSn,
|
medicalSn: props.patient.medicalSn,
|
||||||
chiefinspectorid: selectedDoctor.value.split('|')[0],
|
chiefinspectorid: parseInt(selectedDoctor.value.split('|')[0]),
|
||||||
chiefinspector: selectedDoctor.value.split('|')[1]
|
chiefinspector: selectedDoctor.value.split('|')[1]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -271,13 +271,7 @@ onMounted(() => {
|
|||||||
/** 打印报告按钮操作 */
|
/** 打印报告按钮操作 */
|
||||||
const handlePrint = async (row: PatientVO) => {
|
const handlePrint = async (row: PatientVO) => {
|
||||||
try {
|
try {
|
||||||
const data = await PatientApi.getPatientInfo(row.medicalSn)
|
await PatientApi.bindPatientProject(row.medicalSn)
|
||||||
//判断是否存在血常规、尿常规、生化检查编号
|
|
||||||
if(!data.xcgcode && !data.ncgcode && !data.shqx){
|
|
||||||
await PatientApi.bindPatientProject(row.medicalSn)
|
|
||||||
await PatientApi.syncinspectApplyTj(row.medicalSn)
|
|
||||||
await createPrint(row.medicalSn)
|
|
||||||
}
|
|
||||||
await PatientApi.syncinspectApplyTj(row.medicalSn)
|
await PatientApi.syncinspectApplyTj(row.medicalSn)
|
||||||
await createPrint(row.medicalSn)
|
await createPrint(row.medicalSn)
|
||||||
// 打印完成后更新状态,添加当前时间戳
|
// 打印完成后更新状态,添加当前时间戳
|
||||||
|
Loading…
Reference in New Issue
Block a user