Commit 56db58d3 by wangshuangqing

1.默认展示选择项

2.调用调用医嘱接口
3.获取选择的数据
parent aa1953ff
......@@ -2,7 +2,7 @@
* @Author: wsq
* @Date: 2022-04-22 15:20:58
* @LastEditors: wsq
* @LastEditTime: 2023-01-11 15:25:24
* @LastEditTime: 2023-01-11 23:19:56
* @Description:
-->
<template>
......@@ -92,7 +92,7 @@
>
<span
:class="
timeindex == index
timeindex == activity.inhosdays
? 'outClinicalpathway_table_left_timespan'
: 'outClinicalpathway_table_left_timespan2'
"
......@@ -195,6 +195,7 @@ export default {
},
//路径天数下拉数据
options: [],
chickid: [], //选中的id
});
//获取患者信息
const gettopdata = () => {
......@@ -227,6 +228,8 @@ export default {
return row.id === el.id;
})
) {
// console.log("选中-row", row);
row.ischeck = 1;
if (row.children) {
row.children.map((j) => {
toggleSelection(j, true);
......@@ -234,8 +237,13 @@ export default {
}
//取消
} else {
// console.log("取消-row", row);
//取消的行数据
row.ischeck = 2;
if (row.children) {
row.children.map((j) => {
j.ischeck = 2;
toggleSelection(j, false);
});
}
......@@ -244,10 +252,17 @@ export default {
// 控制选框是否被选中
const toggleSelection = (row, select) => {
if (row) {
// console.log("row-亮", row);
nextTick(() => {
multipleTable.value &&
multipleTable.value.toggleRowSelection(row, select);
});
if (select == true) {
row.ischeck = 1;
} else {
row.ischeck = 2;
}
}
};
......@@ -286,13 +301,10 @@ export default {
//当选择项发生变化时会触发该事件
const SelectionChange = (val) => {
state.multipleSelection = val;
console.log('val',val);
// console.log("val", val);
};
// console.log("state.multipleSelection", state.multipleSelection);
//获取左侧时间线数据
const getlefttime = () => {
......@@ -303,13 +315,14 @@ export default {
)
.then((data) => {
state.activities = data;
// console.log("state.activities", state.activities);
state.options = data;
})
.catch((error) => {});
};
//点击左侧时间线 获取右侧表格数据
const timeclick = (val, index) => {
state.timeindex = index;
state.timeindex = val.inhosdays;
state.case_routeid = val.case_routeid;
state.inhosdays = val.inhosdays;
http
......@@ -319,27 +332,33 @@ export default {
)
.then((data) => {
state.tableData = data;
// console.log(" state.tableData", state.tableData);
state.tableData.map((el) => {
// console.log(" el",el);
if (el.children) {
for (let i = 0; i < el.children.length; i++) {
if (el.children[i].ischeck == 1) {
toggleSelection(el.children[i], true);
toggleSelection(el, true);
}
}
}
});
})
.catch((error) => {});
};
//加入医嘱
const joinorder = () => {
// console.log("加入按钮-tabledata", state.tableData);
http
.post(
`/ClinicalRoute/ClinicalRoute/SetPatientRoutes?pid=${route.value.query.pid}`,
state.selectArr
state.tableData
)
.then((data) => {
// 重新加载表格数据接口
http
.post(
`/ClinicalRoute/ClinicalRoute/GetGetRouteAdvicesRight?pid=${route.value.query.pid}&case_routeid=${state.case_routeid}&searchQuery=${state.inhosdays}`,
{}
)
.then((data) => {
state.tableData = data;
})
.catch((error) => {});
//重新获取左侧时间线数据
getlefttime();
Message({
message: data.message,
type: "success",
......
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