Commit c390484a by wangshuangqing

添加途径与频率的下拉数据

parent 307d754b
...@@ -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-12 10:28:45 * @LastEditTime: 2023-02-02 16:06:18
* @Description: * @Description:
--> -->
<template> <template>
...@@ -22,7 +22,10 @@ ...@@ -22,7 +22,10 @@
</div> </div>
</div> </div>
<div class="Entrypath_top_right"> <div class="Entrypath_top_right">
<el-button style="background-color:#0283bb;color:#ffff" size="mini" @click="okbtn()" <el-button
style="background-color: #0283bb; color: #ffff"
size="mini"
@click="okbtn()"
>确定进入路径</el-button >确定进入路径</el-button
> >
</div> </div>
...@@ -32,11 +35,28 @@ ...@@ -32,11 +35,28 @@
<div class="Entrypath_table_lefttab"> <div class="Entrypath_table_lefttab">
<div class="Entrypath_table_lefttab_select"> <div class="Entrypath_table_lefttab_select">
<div class="Entrypath_table_lefttab_select_inp"> <div class="Entrypath_table_lefttab_select_inp">
<span>检索路径:</span> <el-input v-model="pathinput" size="mini" clearable/> <span>检索路径:</span>
<el-input v-model="pathinput" size="mini" clearable />
</div> </div>
<div class="Entrypath_table_lefttab_select_chack"> <div class="Entrypath_table_lefttab_select_chack">
<el-button style="background-color:#ffff;color:#91cbcd;margin-right:10px;border:1px solid #91cbcd" plain size="mini" @click="selectbtn()">查询</el-button> <el-button
<el-checkbox v-model="checked" label="只显示推荐路径" size="large" @change="checkchange"/> style="
background-color: #ffff;
color: #91cbcd;
margin-right: 10px;
border: 1px solid #91cbcd;
"
plain
size="mini"
@click="selectbtn()"
>查询</el-button
>
<el-checkbox
v-model="checked"
label="只显示推荐路径"
size="large"
@change="checkchange"
/>
</div> </div>
</div> </div>
<div class="Entrypath_table_lefttab_table"> <div class="Entrypath_table_lefttab_table">
...@@ -71,7 +91,7 @@ ...@@ -71,7 +91,7 @@
:data="OnetableData" :data="OnetableData"
border border
stripe stripe
:header-cell-style="{background:'#0184bc',color:'#ffff'}" :header-cell-style="{ background: '#0184bc', color: '#ffff' }"
> >
<el-table-column <el-table-column
show-overflow-tooltip show-overflow-tooltip
...@@ -94,7 +114,7 @@ ...@@ -94,7 +114,7 @@
scrollbar-always-on scrollbar-always-on
height="100%" height="100%"
stripe stripe
:header-cell-style="{background:'#0184bc',color:'#ffff'}" :header-cell-style="{ background: '#0184bc', color: '#ffff' }"
> >
<el-table-column <el-table-column
show-overflow-tooltip show-overflow-tooltip
...@@ -117,7 +137,7 @@ ...@@ -117,7 +137,7 @@
scrollbar-always-on scrollbar-always-on
height="100%" height="100%"
stripe stripe
:header-cell-style="{background:'#0184bc',color:'#ffff'}" :header-cell-style="{ background: '#0184bc', color: '#ffff' }"
> >
<el-table-column <el-table-column
show-overflow-tooltip show-overflow-tooltip
...@@ -143,7 +163,7 @@ import { ...@@ -143,7 +163,7 @@ import {
} from "@vue/composition-api"; } from "@vue/composition-api";
import { decimal } from "../utils/decimal"; import { decimal } from "../utils/decimal";
import { img } from "../assets/img/zu.png"; import { img } from "../assets/img/zu.png";
import { Message,MessageBox } from "element-ui"; import { Message, MessageBox } from "element-ui";
import { useRoute, useRouter } from "../utils/useVueRouter"; import { useRoute, useRouter } from "../utils/useVueRouter";
import { setItem, getItem } from "../utils/auth"; import { setItem, getItem } from "../utils/auth";
import { Loading } from "element-ui"; import { Loading } from "element-ui";
...@@ -159,7 +179,7 @@ export default { ...@@ -159,7 +179,7 @@ export default {
//输入框 //输入框
pathinput: "", pathinput: "",
//选择框 //选择框
checked:false, checked: false,
//标识 //标识
IsRoute: "", IsRoute: "",
//患者信息 //患者信息
...@@ -222,13 +242,12 @@ export default { ...@@ -222,13 +242,12 @@ export default {
.catch((error) => {}); .catch((error) => {});
}; };
//显示推荐路径单选框变化 //显示推荐路径单选框变化
const checkchange=(val)=>{ const checkchange = (val) => {
state.checked=val state.checked = val;
}; };
//查询 //查询
const selectbtn=()=>{ const selectbtn = () => {
getLeftdata() getLeftdata();
}; };
//获取左侧表格数据 //获取左侧表格数据
const getLeftdata = () => { const getLeftdata = () => {
...@@ -265,50 +284,48 @@ export default { ...@@ -265,50 +284,48 @@ export default {
//点击进入路径按钮 //点击进入路径按钮
const okbtn = () => { const okbtn = () => {
MessageBox.confirm( MessageBox.confirm(
'确定进入路径吗?', "确定进入路径吗?",
{ {
confirmButtonText: '确定', confirmButtonText: "确定",
cancelButtonText: '取消', cancelButtonText: "取消",
type: 'warning',
}
)
.then(() => {
if (state.iscid == 0) {
Message({
message: "请先选择路径名称!",
type: "warning", type: "warning",
}); }
} else if (state.iscid != 0) { )
http .then(() => {
.post( if (state.iscid == 0) {
`/ClinicalRoute/ClinicalRoute/CreatePatientRoute?pid=${route.value.query.pid}&crid=${state.iscid}`,
{}
)
.then((data) => {
Message({ Message({
message: "成功", message: "请先选择路径名称!",
type: "success", type: "warning",
}); });
router.push({ } else if (state.iscid != 0) {
path: "outClinicalpathway", http
query: { .post(
pid: route.value.query.pid, `/ClinicalRoute/ClinicalRoute/CreatePatientRoute?pid=${route.value.query.pid}&crid=${state.iscid}`,
}, {}
}); )
}) .then((data) => {
.catch((error) => {}); Message({
} message: "成功",
}) type: "success",
.catch(() => { });
Message({ router.push({
type: 'info', path: "outClinicalpathway",
message: '取消', query: {
}) pid: route.value.query.pid,
}) },
});
})
.catch((error) => {});
}
})
.catch(() => {
Message({
type: "info",
message: "取消",
});
});
}; };
onMounted(() => { onMounted(() => {
...@@ -326,7 +343,7 @@ export default { ...@@ -326,7 +343,7 @@ export default {
rowclick, rowclick,
okbtn, okbtn,
checkchange, checkchange,
selectbtn selectbtn,
}; };
}, },
}; };
...@@ -343,22 +360,20 @@ export default { ...@@ -343,22 +360,20 @@ export default {
background-color: #32a0d3 !important; background-color: #32a0d3 !important;
} }
//多选框选中状态文本颜色 //多选框选中状态文本颜色
::v-deep .el-checkbox__input.is-checked+.el-checkbox__label{ ::v-deep .el-checkbox__input.is-checked + .el-checkbox__label {
color: black !important; color: black !important;
} }
//多选框选中状态背景颜色 //多选框选中状态背景颜色
::v-deep .el-checkbox__input.is-checked .el-checkbox__inner{ ::v-deep .el-checkbox__input.is-checked .el-checkbox__inner {
background-color: #1097e0 !important; background-color: #1097e0 !important;
border-color: #1097e0 !important; border-color: #1097e0 !important;
} }
//输入框高亮颜色 //输入框高亮颜色
::v-deep .el-input__inner{ ::v-deep .el-input__inner {
background-color: #f3fbfe; background-color: #f3fbfe;
border: 1px solid #91cbcd; border: 1px solid #91cbcd;
} }
// 滚动条的宽度 // 滚动条的宽度
::v-deep .el-table__body-wrapper::-webkit-scrollbar { ::v-deep .el-table__body-wrapper::-webkit-scrollbar {
/*滚动条整体样式*/ /*滚动条整体样式*/
...@@ -442,7 +457,7 @@ export default { ...@@ -442,7 +457,7 @@ export default {
span { span {
width: 80%; width: 80%;
color: #181617; color: #181617;
display: flex; display: flex;
justify-content: flex-start; justify-content: flex-start;
align-items: center; align-items: center;
...@@ -461,7 +476,7 @@ export default { ...@@ -461,7 +476,7 @@ export default {
padding-left: 20px; padding-left: 20px;
span { span {
width: 80%; width: 80%;
color: #181617; color: #181617;
display: flex; display: flex;
justify-content: flex-start; justify-content: flex-start;
align-items: center; align-items: center;
......
...@@ -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-31 17:53:02 * @LastEditTime: 2023-02-03 13:16:40
* @Description: * @Description:
--> -->
<template> <template>
...@@ -142,7 +142,7 @@ ...@@ -142,7 +142,7 @@
default-expand-all default-expand-all
> >
<el-table-column type="selection" width="55" /> <el-table-column type="selection" width="55" />
<el-table-column label="医嘱类型" width="180" fixed="left"> <el-table-column label="医嘱类型" width="180">
<template #default="scope">{{ yztype[scope.row.type] }}</template> <template #default="scope">{{ yztype[scope.row.type] }}</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
...@@ -150,21 +150,18 @@ ...@@ -150,21 +150,18 @@
property="advice_name" property="advice_name"
label="路径名称" label="路径名称"
width="150" width="150"
fixed="left"
/> />
<el-table-column <el-table-column
show-overflow-tooltip show-overflow-tooltip
property="project_code" property="project_code"
label="医院项目编码" label="医院项目编码"
width="120" width="120"
fixed="left"
/> />
<el-table-column <el-table-column
show-overflow-tooltip show-overflow-tooltip
property="project_name" property="project_name"
label="医院项目名称" label="医院项目名称"
width="150" width="150"
fixed="left"
/> />
<el-table-column <el-table-column
...@@ -221,12 +218,48 @@ ...@@ -221,12 +218,48 @@
show-overflow-tooltip show-overflow-tooltip
property="medicUseMode" property="medicUseMode"
label="途径" label="途径"
/> width="120"
>
<template #default="scope">
<el-select
v-if="scope.row.advice_name == null && scope.row.ischeck == 1"
size="mini"
v-model="scope.row.medicUseMode"
>
<el-option
v-for="item in medicUseModeoptions"
:key="item.id"
:label="item.describe"
:value="item.describe"
>
</el-option>
</el-select>
<span v-else>{{ scope.row.medicUseMode }}</span>
</template>
</el-table-column>
<el-table-column <el-table-column
show-overflow-tooltip show-overflow-tooltip
property="medicUsePlan" property="medicUsePlan"
label="频率" label="频率"
/> width="140"
>
<template #default="scope">
<el-select
v-if="scope.row.advice_name == null && scope.row.ischeck == 1"
size="mini"
v-model="scope.row.medicUsePlan"
>
<el-option
v-for="item in medicUsePlanoptions"
:key="item.id"
:label="item.describe"
:value="item.describe"
>
</el-option>
</el-select>
<span v-else>{{ scope.row.medicUsePlan }}</span>
</template>
</el-table-column>
<el-table-column prop="dropNumber" label="滴数" width="120"> <el-table-column prop="dropNumber" label="滴数" width="120">
<template #default="scope"> <template #default="scope">
...@@ -302,6 +335,11 @@ export default { ...@@ -302,6 +335,11 @@ export default {
const route = useRoute(); const route = useRoute();
const router = useRouter(); const router = useRouter();
const fromRef = ref(); const fromRef = ref();
function tableLayout() {
nextTick(() => {
fromRef.value.doLayout();
});
}
const monthlyPlanTable = ref(); const monthlyPlanTable = ref();
const multipleTable = ref(); const multipleTable = ref();
let state = reactive({ let state = reactive({
...@@ -349,7 +387,34 @@ export default { ...@@ -349,7 +387,34 @@ export default {
], ],
tempRow: {}, //储存正在编辑的行 tempRow: {}, //储存正在编辑的行
tempRowChildren: [], tempRowChildren: [],
medicUseModeoptions: [], //途径
medicUsePlanoptions: [], //频率
}); });
//获取途径,频率的下拉数据
const gemedicUseModeoptions = () => {
http
.post(
`/ClinicalRoute/ClinicalRoute/GetStaCRParametersByType?type=1`,
{}
)
.then((data) => {
state.medicUseModeoptions = data;
})
.catch((error) => {});
};
//获取频率,频率的下拉数据
const gemedicUsePlanoptions = () => {
http
.post(
`/ClinicalRoute/ClinicalRoute/GetStaCRParametersByType?type=2`,
{}
)
.then((data) => {
state.medicUsePlanoptions = data;
})
.catch((error) => {});
};
//获取患者信息 //获取患者信息
const gettopdata = () => { const gettopdata = () => {
...@@ -386,14 +451,7 @@ export default { ...@@ -386,14 +451,7 @@ export default {
}) })
) { ) {
row.ischeck = 1; row.ischeck = 1;
state.tempRow = _.cloneDeep(row);
if (row.children) { if (row.children) {
for (let a = 0; a < row.children.length; a++) {
state.tempRowChildren = _.cloneDeep(row.children[a]);
console.log("state.tempRowChildren[a]", state.tempRowChildren);
}
row.children.map((j) => { row.children.map((j) => {
toggleSelection(j, true); toggleSelection(j, true);
}); });
...@@ -403,34 +461,10 @@ export default { ...@@ -403,34 +461,10 @@ export default {
if (row.children) { if (row.children) {
row.children.map((p) => { row.children.map((p) => {
p.ischeck = 2; p.ischeck = 2;
// for (var i = 0; i < state.tableData.length; i++) {
// if (state.tableData[i].children.length > 0) {
// for (let j = 0; j < state.tableData[i].children.length; j++) {
// if (state.tableData[i].children[j].id == p.id) {
// state.tableData[i].children[j] =
// state.tempRowChildren[j - 1];
// console.log("p.id", p.id);
// console.log(
// "state.tempRowChildren[j-1]",
// state.tempRowChildren[j - 1]
// );
// }
// }
// }
// }
toggleSelection(p, false); toggleSelection(p, false);
}); });
} else { } else {
//取消选中 还原数据
for (var i = 0; i < state.tableData.length; i++) {
if (state.tableData[i].children.length > 0) {
for (let j = 0; j < state.tableData[i].children.length; j++) {
if (state.tableData[i].children[j].id == row.id) {
state.tableData[i].children[j] = state.tempRow;
}
}
}
}
//取消的行数据 //取消的行数据
row.ischeck = 2; row.ischeck = 2;
} }
...@@ -543,6 +577,7 @@ export default { ...@@ -543,6 +577,7 @@ export default {
state.timeindex = val.inhosdays; state.timeindex = val.inhosdays;
state.case_routeid = val.case_routeid; state.case_routeid = val.case_routeid;
state.inhosdays = val.inhosdays; state.inhosdays = val.inhosdays;
//获取表格数据
http http
.post( .post(
`/ClinicalRoute/ClinicalRoute/GetGetRouteAdvicesRight?pid=${route.value.query.pid}&case_routeid=${state.case_routeid}&searchQuery=${state.inhosdays}`, `/ClinicalRoute/ClinicalRoute/GetGetRouteAdvicesRight?pid=${route.value.query.pid}&case_routeid=${state.case_routeid}&searchQuery=${state.inhosdays}`,
...@@ -567,7 +602,6 @@ export default { ...@@ -567,7 +602,6 @@ export default {
}; };
//加入医嘱 //加入医嘱
const joinorder = () => { const joinorder = () => {
console.log("加入按钮-tabledata", state.tableData);
http http
.post( .post(
`/ClinicalRoute/ClinicalRoute/SetPatientRoutes?pid=${route.value.query.pid}`, `/ClinicalRoute/ClinicalRoute/SetPatientRoutes?pid=${route.value.query.pid}`,
...@@ -652,6 +686,8 @@ export default { ...@@ -652,6 +686,8 @@ export default {
onMounted(() => { onMounted(() => {
gettopdata(); gettopdata();
getlefttime(); getlefttime();
gemedicUseModeoptions();
gemedicUsePlanoptions();
}); });
return { return {
...@@ -678,6 +714,9 @@ export default { ...@@ -678,6 +714,9 @@ export default {
getreasonoptions, getreasonoptions,
getTitle, getTitle,
confirm, confirm,
tableLayout,
gemedicUseModeoptions,
gemedicUsePlanoptions,
}; };
}, },
}; };
......
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