postdischarge-ui/src/views/manage/components/cardlist.vue

387 lines
10 KiB
Vue
Raw Normal View History

2024-08-01 15:19:05 +08:00
<template>
2024-08-08 09:17:05 +08:00
<div :style="{ height: maxTableHeight + 'px' }" class="cardlist">
<div v-for="(item, index) in patientInfoList" :key="item.id">
2024-08-09 13:58:54 +08:00
<div @click="handleAuthRole(item, index)" class="cards">
2024-08-08 09:17:05 +08:00
<div class="carditem">
2024-08-09 16:00:42 +08:00
<div class="top">
2024-08-08 09:17:05 +08:00
<img
v-if="item.sex == 'FEMALE'"
src="../../../assets/manage/nvtouxiang.png"
alt=""
class="img"
2024-08-09 15:57:33 +08:00
@click="handleAuth(item, index)"
2024-08-08 09:17:05 +08:00
/>
<img
v-if="item.sex == 'MALE'"
src="../../../assets/manage/touxiang.png"
alt=""
class="img"
2024-08-09 15:57:33 +08:00
@click="handleAuth(item, index)"
2024-08-08 09:17:05 +08:00
/>
2024-08-08 17:41:35 +08:00
<el-tooltip
class="name"
effect="dark"
:content="item.patientName"
placement="top"
>
2024-08-09 16:00:42 +08:00
<span @click="handleAuth(item, index)">
{{ item.patientName }}
</span>
2024-08-08 17:41:35 +08:00
</el-tooltip>
2024-08-08 09:17:05 +08:00
<div class="agesex">
{{ item.sex == "MALE" ? "男" : "" }}
{{ item.sex == "FEMALE" ? "女" : "" }}
<span style="padding: 0 1px">|</span>
<span v-if="item.age"> {{ item.age }} </span>
<span class="zy" v-if="item.patientType == 'IN_HOSPITAL_PATIENT'"
>在院</span
>
<span class="cy" v-if="item.patientType == 'DISCHARGED_PATIENT'"
>出院</span
>
<span
class="yzy"
v-if="item.patientType == 'PRE_HOSPITALIZED_PATIENT'"
>预住院</span
>
<span class="mz" v-if="item.patientType == 'OUTPATIENT'"
>门诊</span
>
<!-- <span class="mz" v-if="item.patientType == 'CONTRACTED_PATIENT'">签约</span> -->
</div>
<div class="diagnosis">诊断名称{{ item.mainDiagnosis }}</div>
2024-08-09 10:14:42 +08:00
<div class="diagnosi">诊断状态:{{ item.patientSignStatus }}</div>
2024-08-08 17:41:35 +08:00
<div class="formitembutton" @click.stop="handleedit(item)">
画像编辑
</div>
2024-08-09 13:58:54 +08:00
</div>
<div class="bottom">
2024-08-08 09:17:05 +08:00
<div class="formitem">医生{{ item.attendingPhysician }}</div>
<div class="formitem">科室{{ item.departmentName }}</div>
<div class="formitem">就诊时间{{ item.visitDate }}</div>
<div class="formitem flex">
2024-08-09 10:54:07 +08:00
<span> 康复计划执行率</span>
2024-08-09 13:58:54 +08:00
<el-progress
v-if="item.taskExecuteRate == 0 || item.taskExecuteRate == null"
:percentage="0"
></el-progress>
<el-progress
v-else
:percentage="item.taskExecuteRate"
></el-progress>
2024-08-08 09:17:05 +08:00
<span style="flex: 0.1"
>({{ item.taskExecuteNum }}/{{ item.taskNum }})</span
>
</div>
<div class="formitem flex">
<span> 康复计划完成率 </span>
2024-08-09 13:58:54 +08:00
<el-progress
v-if="item.taskFinishRate == 0 || item.taskFinishRate == null"
:percentage="0"
></el-progress>
<el-progress
v-else
:percentage="item.taskFinishRate"
></el-progress>
2024-08-08 09:17:05 +08:00
<span style="flex: 0.1"
>({{ item.taskFinishNum }}/{{ item.taskNum }})</span
>
</div>
<div class="formitem">下次任务</div>
</div>
2024-08-01 15:19:05 +08:00
</div>
2024-08-08 09:17:05 +08:00
</div>
2024-08-01 15:19:05 +08:00
</div>
2024-08-08 09:17:05 +08:00
</div>
2024-08-01 15:19:05 +08:00
</template>
<script>
2024-08-08 09:17:05 +08:00
import { getAge } from "@/utils/age";
2024-08-01 15:19:05 +08:00
export default {
2024-08-08 09:17:05 +08:00
name: "cardlist",
props: {
maxTableHeight: {
type: Number,
default: 0,
2024-08-01 15:19:05 +08:00
},
2024-08-08 09:17:05 +08:00
patientInfoList: {
type: Array,
default: [],
2024-08-01 15:19:05 +08:00
},
2024-08-08 09:17:05 +08:00
},
data() {
return {
2024-08-09 13:58:54 +08:00
isDoubleClicked: false,
2024-08-08 09:17:05 +08:00
};
},
mounted() {},
methods: {
2024-08-09 13:58:54 +08:00
// 单机头像和姓名进入详情
handleAuth(item, index) {
2024-08-08 09:17:05 +08:00
this.$router.push({
path: "/patient/patientdetails",
query: {
path: "/patient/patientInfo",
patientId: item.id,
cardNo: item.cardNo,
patientName: item.patientName,
patientPhone: item.patientPhone,
sex: item.sex,
birthDate: item.birthDate,
familyMemberPhone: item.familyMemberPhone,
address: item.address,
patientSource: item.patientSource,
createTime: item.createTime,
age: item.birthDate ? getAge(item.birthDate) : "",
},
});
2024-08-01 15:19:05 +08:00
},
2024-08-09 16:00:42 +08:00
// 双击进入详情
2024-08-09 13:58:54 +08:00
handleAuthRole(item, index) {
if (this.isDoubleClicked) {
//这里写你实现双击后的逻辑代码
console.log("实现双击!");
this.$router.push({
path: "/patient/patientdetails",
query: {
path: "/patient/patientInfo",
patientId: item.id,
cardNo: item.cardNo,
patientName: item.patientName,
patientPhone: item.patientPhone,
sex: item.sex,
birthDate: item.birthDate,
familyMemberPhone: item.familyMemberPhone,
address: item.address,
patientSource: item.patientSource,
createTime: item.createTime,
age: item.birthDate ? getAge(item.birthDate) : "",
},
});
} else {
this.isDoubleClicked = true;
setTimeout(() => {
this.isDoubleClicked = false;
}, 250);
}
},
2024-08-08 09:17:05 +08:00
// 画像编辑
handleedit(item) {
this.$router.push({
path: "/patient/Portraitedit",
query: {
path: "/patient/patientInfo",
patientId: item.id,
cardNo: item.cardNo,
patientName: item.patientName,
patientPhone: item.patientPhone,
sex: item.sex,
birthDate: item.birthDate,
familyMemberPhone: item.familyMemberPhone,
address: item.address,
patientSource: item.patientSource,
createTime: item.createTime,
hospitalAgencyName: item.hospitalAgencyName,
mainDiagnosis: item.mainDiagnosis,
age: item.birthDate ? getAge(item.birthDate) : "",
},
});
},
},
};
2024-08-01 15:19:05 +08:00
</script>
<style lang="scss" scoped>
2024-08-08 09:17:05 +08:00
.cards {
margin-right: 10px;
margin-bottom: 10px;
2024-08-09 10:54:07 +08:00
overflow: hidden;
width: 263px;
2024-08-08 09:17:05 +08:00
height: 262px;
border-radius: 10px;
font-size: 14px;
font-weight: 600;
z-index: 9999;
}
2024-08-09 13:58:54 +08:00
.cards:hover {
border: 2px solid #1890ff;
cursor: pointer;
}
2024-08-01 15:19:05 +08:00
.cardlist {
2024-08-08 09:17:05 +08:00
display: flex;
flex-wrap: wrap;
align-content: flex-start;
overflow-y: auto;
.carditem {
margin-right: 10px;
margin-bottom: 10px;
width: 260px;
min-height: 200px;
border: 1px solid #dcdfe6;
border-radius: 10px;
font-size: 14px;
font-weight: 600;
.bottom {
height: 165px;
padding: 0 6px;
.formitem {
height: 26px;
line-height: 26px;
font-size: 12px;
color: #756a5e;
font-weight: 550;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
overflow: hidden;
}
.flex {
display: flex;
align-items: center;
::v-deep .el-progress-bar {
flex: 1;
2024-08-01 16:18:16 +08:00
}
2024-08-01 15:19:05 +08:00
2024-08-08 09:17:05 +08:00
::v-deep .el-progress__text {
font-size: 12px !important;
flex: 0.5;
text-align: right;
2024-08-01 15:19:05 +08:00
}
2024-08-08 09:17:05 +08:00
span {
flex: 0.5;
max-width: 50%;
}
::v-deep .el-progress {
flex: 1;
display: flex;
align-items: center;
}
}
}
.top {
height: 85px;
background-color: #f7f8fa;
position: relative;
border-radius: 10px 10px 0 0;
margin-bottom: 10px;
.img {
margin: 10px 0 0 10px;
width: 50px;
height: 50px;
}
.agesex {
position: absolute;
right: 10px;
top: 16px;
//预住院
.yzy {
background-color: #e8f4ec;
color: #2fb844;
border: 1.5px solid #2fb844;
border-radius: 2px;
padding: 3px 5px;
margin-left: 4px;
}
//门诊
.mz {
background-color: #dfe4f6;
color: #2d56fb;
border: 1.5px solid #2d56fb;
border-radius: 2px;
padding: 3px 5px;
margin-left: 4px;
}
// 在院
.zy {
background-color: #deedf4;
color: #1d98c6;
border: 1.5px solid #1d98c6;
border-radius: 2px;
padding: 3px 5px;
margin-left: 4px;
}
// 出院
.cy {
background-color: #deefee;
color: #2a9a82;
border: 1.5px solid #2a9a82;
border-radius: 2px;
padding: 3px 5px;
margin-left: 4px;
}
}
.diagnosis {
position: absolute;
color: #756a5e;
font-weight: 550;
left: 70px;
top: 42px;
font-size: 12px;
height: 32px;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
padding-right: 4px;
}
.diagnosi {
position: absolute;
color: #756a5e;
font-weight: 550;
left: 70px;
top: 60px;
font-size: 12px;
height: 32px;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
padding-right: 4px;
}
2024-08-09 13:58:54 +08:00
.formitembutton {
position: absolute;
color: #756a5e;
font-weight: 550;
left: 200px;
top: 60px;
font-size: 12px;
height: 19px;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
padding-right: 4px;
}
.formitembutton:hover {
color: #2d56fb;
border-bottom: 1px solid #2d56fb;
}
2024-08-08 09:17:05 +08:00
.name {
position: absolute;
left: 70px;
top: 16px;
width: 76px;
white-space: nowrap; /* 确保文本在一行内显示 */
overflow: hidden; /* 超出容器部分隐藏 */
text-overflow: ellipsis; /* 超出部分显示省略号 */
}
2024-08-01 15:19:05 +08:00
}
2024-08-08 09:17:05 +08:00
}
2024-08-01 15:19:05 +08:00
}
2024-08-08 09:17:05 +08:00
</style>