Commit f69307aa by wangshuangqing

1.对接获取左侧时间线接口

2.点击左侧获取右侧表格数据
parent c9fb06c5
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: wsq * @Author: wsq
* @Date: 2022-04-22 15:20:58 * @Date: 2022-04-22 15:20:58
* @LastEditors: wsq * @LastEditors: wsq
* @LastEditTime: 2023-01-10 14:28:56 * @LastEditTime: 2023-01-10 17:53:58
* @Description: * @Description:
--> -->
<template> <template>
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<div class="outClinicalpathway_top_left_one"> <div class="outClinicalpathway_top_left_one">
<span><img src="../assets/img/peo.png" alt="" /></span> <span><img src="../assets/img/peo.png" alt="" /></span>
<div class="outClinicalpathway_top_left_one_t1"> <div class="outClinicalpathway_top_left_one_t1">
患者姓名:<span>{{topdata.patientName}}</span> 患者姓名:<span>{{ topdata.patientName }}</span>
</div> </div>
<div class="outClinicalpathway_top_left_one_t2"> <div class="outClinicalpathway_top_left_one_t2">
住院号:<span>{{ topdata.regCode }}</span> 住院号:<span>{{ topdata.regCode }}</span>
...@@ -24,10 +24,9 @@ ...@@ -24,10 +24,9 @@
住院次数:<span>{{ topdata.inHosNum }}</span> 住院次数:<span>{{ topdata.inHosNum }}</span>
</div> </div>
<div class="outClinicalpathway_top_left_one_t4"> <div class="outClinicalpathway_top_left_one_t4">
符合临床路径:<span>{{topdata.clinical_route_name }}</span> 符合临床路径:<span>{{ topdata.clinical_route_name }}</span>
</div> </div>
</div> </div>
</div> </div>
<!-- 右侧按钮 --> <!-- 右侧按钮 -->
<div class="outClinicalpathway_top_right"> <div class="outClinicalpathway_top_right">
...@@ -50,7 +49,7 @@ ...@@ -50,7 +49,7 @@
:hollow="activity.hollow" :hollow="activity.hollow"
:timestamp="activity.timestamp" :timestamp="activity.timestamp"
> >
{{ activity.content }} <span :class="timeindex==index?'outClinicalpathway_table_left_timespan':'outClinicalpathway_table_left_timespan2'" @click="timeclick(activity,index)">{{ activity.inhosdays }}</span>
</el-timeline-item> </el-timeline-item>
</el-timeline> </el-timeline>
</div> </div>
...@@ -67,10 +66,23 @@ ...@@ -67,10 +66,23 @@
> >
<el-table-column type="selection" width="55" /> <el-table-column type="selection" width="55" />
<el-table-column label="医嘱类型" width="180"> <el-table-column label="医嘱类型" width="180">
<template #default="scope">{{ scope.row.date }}</template> <template #default="scope">{{yztype[scope.row.type] }}</template>
</el-table-column> </el-table-column>
<el-table-column show-overflow-tooltip property="name" label="路径名称" width="120" /> <el-table-column
<el-table-column show-overflow-tooltip property="address" label="医院项目编码" /> show-overflow-tooltip
property="advice_name"
label="路径名称"
/>
<el-table-column
show-overflow-tooltip
property="project_code"
label="医院项目编码"
/>
<el-table-column
show-overflow-tooltip
property="project_name"
label="医院项目名称"
/>
</el-table> </el-table>
</div> </div>
</div> </div>
...@@ -102,124 +114,82 @@ export default { ...@@ -102,124 +114,82 @@ export default {
const monthlyPlanTable = ref(); const monthlyPlanTable = ref();
const multipleTableRef = ref(); const multipleTableRef = ref();
let state = reactive({ let state = reactive({
pid:'7e3c6a2e-e5a8-11ec-9998-9016ba5908d0',
//患者信息 //患者信息
topdata:{ topdata: {
patientName:'', //患者姓名 patientName: "", //患者姓名
regCode:'',// 住院号 regCode: "", // 住院号
inHosNum:'',// 住院次数 inHosNum: "", // 住院次数
clinical_route_name:''// 符合临床路径 clinical_route_name: "", // 符合临床路径
}, },
multipleSelection: [], //被选择的数据 multipleSelection: [], //被选择的数据
tableData: [ tableData: [],//表格数据
{ yztype:{
id: 1, 1:'长期医嘱',
date: "2016-05-02", 2:'短期医嘱'
name: "wangxiaohu",
address: "No. 189, Grove St, Los Angeles",
},
{
id: 2,
date: "2016-05-04",
name: "wangxiaohu",
address: "No. 189, Grove St, Los Angeles",
},
{
id: 3,
date: "2016-05-01",
name: "wangxiaohu",
address: "No. 189, Grove St, Los Angeles",
children: [
{
id: 31,
date: "",
name: "wangxiaohu",
address: "No. 189, Grove St, Los Angeles",
}, },
{ //被点击的index
id: 32, timeindex:null,
date: "",
name: "wangxiaohu",
address: "No. 189, Grove St, Los Angeles",
},
],
},
{
id: 4,
date: "2016-05-03",
name: "wangxiaohu",
address: "No. 189, Grove St, Los Angeles",
},
],
//时间线 //时间线
activities: [ activities: [],
{
content: "住院第1天",
timestamp: "2022-04-03~2022-05-08",
size: "large",
type: "success",
icon:img,
},
{
content: "住院第2~3天",
size: "large",
timestamp: "2022-04-03~2022-05-08",
type: "success",
},
{
content: "住院第4~5天",
timestamp: "2018-04-03 20:46",
size: "large",
},
{
content: "住院第6~7天",
size: "large",
timestamp: "2018-04-03 20:46",
type: "primary",
hollow: true,
},
{
content: "住院第8~9天",
size: "large",
timestamp: "2018-04-03 20:46",
},
],
}); });
//获取患者信息 //获取患者信息
const gettopdata=()=>{ const gettopdata = () => {
http http
.post(`/ClinicalRoute/ClinicalRoute/GetPatientInfo?pid=${route.value.query.pid}`, {}) .post(
`/ClinicalRoute/ClinicalRoute/GetPatientInfo?pid=${route.value.query.pid}`,
{}
)
.then((data) => { .then((data) => {
state.topdata=data; state.topdata = data;
}) })
.catch((error) => {}); .catch((error) => {});
}; };
//当选择项发生变化时会触发该事件 //当选择项发生变化时会触发该事件
const handleSelectionChange = (val) => { const handleSelectionChange = (val) => {
state.multipleSelection = val; state.multipleSelection = val;
}; };
//递归选中 //递归选中
const checkFun=(data,status)=>{ const checkFun = (data, status) => {
data.forEach(element => { // data.forEach((element) => {
element.isCheck=status; // element.isCheck = status;
// });
}); };
//获取左侧时间线数据
const getlefttime = () => {
http
.post(
`/ClinicalRoute/ClinicalRoute/GetGetRouteAdvicesLeft?pid=${route.value.query.pid}`,
{}
)
.then((data) => {
state.activities = data;
})
.catch((error) => {});
};
//点击左侧时间线 获取右侧表格数据
const timeclick = (val,index) => {
state.timeindex=index
http
.post(
`/ClinicalRoute/ClinicalRoute/GetGetRouteAdvicesRight?pid=${route.value.query.pid}&case_routeid=${val.case_routeid}&searchQuery=${val.inhosdays}`,
{}
)
.then((data) => {
state.tableData = data;
})
.catch((error) => {});
}; };
onMounted(() => { onMounted(() => {
gettopdata() gettopdata();
getlefttime();
}); });
return { return {
...toRefs(state), ...toRefs(state),
decimal, decimal,
monthlyPlanTable, monthlyPlanTable,
...@@ -227,6 +197,8 @@ export default { ...@@ -227,6 +197,8 @@ export default {
handleSelectionChange, handleSelectionChange,
checkFun, checkFun,
gettopdata, gettopdata,
getlefttime,
timeclick,
}; };
}, },
}; };
...@@ -375,7 +347,6 @@ export default { ...@@ -375,7 +347,6 @@ export default {
} }
} }
} }
} }
&_right { &_right {
height: 100%; height: 100%;
...@@ -395,11 +366,24 @@ export default { ...@@ -395,11 +366,24 @@ export default {
margin-right: 5px; margin-right: 5px;
background-color: #ffff; background-color: #ffff;
padding-top: 10px; padding-top: 10px;
&_timespan{
width: 80%;
height:20px;
display: flex;
background-color: #f2fafd;
color: #5dbee9;
}
&_timespan2{
width: 80%;
height:20px;
display: flex;
}
} }
&_right { &_right {
width: 84%; width: 84%;
height: 100%; height: 100%;
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment